@bubo-squared/ui-framework 0.2.12 → 0.2.14
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 +1028 -637
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +108 -32
- package/dist/index.d.ts +108 -32
- package/dist/index.js +1042 -653
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -1
package/dist/index.js
CHANGED
|
@@ -518,7 +518,7 @@ var Typography = (props) => {
|
|
|
518
518
|
return /* @__PURE__ */ jsx9(
|
|
519
519
|
Comp,
|
|
520
520
|
{
|
|
521
|
-
className: cn(variant, weightClassName, mbClassName, className),
|
|
521
|
+
className: cn("text-primary", variant, weightClassName, mbClassName, className),
|
|
522
522
|
...rest,
|
|
523
523
|
children
|
|
524
524
|
}
|
|
@@ -890,56 +890,112 @@ var Divider = (props) => {
|
|
|
890
890
|
Divider.displayName = "Divider";
|
|
891
891
|
|
|
892
892
|
// src/components/Content/Progress.tsx
|
|
893
|
+
import * as React14 from "react";
|
|
894
|
+
|
|
895
|
+
// src/components/Inputs/Field.tsx
|
|
893
896
|
import * as React13 from "react";
|
|
894
897
|
import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
898
|
+
var fieldBase = "flex flex-col gap-2 items-start";
|
|
899
|
+
var Field = (props) => {
|
|
900
|
+
const {
|
|
901
|
+
label,
|
|
902
|
+
labelRight = false,
|
|
903
|
+
hint,
|
|
904
|
+
hideHint,
|
|
905
|
+
status = "default",
|
|
906
|
+
disabled,
|
|
907
|
+
className,
|
|
908
|
+
children
|
|
909
|
+
} = props;
|
|
910
|
+
const fieldId = React13.useId();
|
|
911
|
+
const labelId = label ? `${fieldId}-label` : void 0;
|
|
912
|
+
const hintId = hint ? `${fieldId}-hint` : void 0;
|
|
913
|
+
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
914
|
+
const labelColorClass = disabled ? "text-primary-disabled" : "text-primary";
|
|
915
|
+
return /* @__PURE__ */ jsxs8("div", { className: cn(fieldBase, className), children: [
|
|
916
|
+
label && /* @__PURE__ */ jsxs8("div", { className: "flex w-full items-center justify-between", children: [
|
|
917
|
+
/* @__PURE__ */ jsx15("label", { id: labelId, className: cn("paragraph-sm", labelColorClass), children: label }),
|
|
918
|
+
labelRight
|
|
919
|
+
] }),
|
|
920
|
+
/* @__PURE__ */ jsx15("div", { className: "relative w-full", children }),
|
|
921
|
+
!hideHint && /* @__PURE__ */ jsx15(
|
|
922
|
+
"p",
|
|
923
|
+
{
|
|
924
|
+
id: hint ? hintId : void 0,
|
|
925
|
+
className: cn("caption", hint ? hintColorClass : "invisible"),
|
|
926
|
+
children: hint || "\xA0"
|
|
927
|
+
}
|
|
928
|
+
)
|
|
929
|
+
] });
|
|
930
|
+
};
|
|
931
|
+
Field.displayName = "Field";
|
|
932
|
+
|
|
933
|
+
// src/components/Content/Progress.tsx
|
|
934
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
895
935
|
var sizeToBarClasses = {
|
|
896
936
|
lg: "h-4 rounded-16",
|
|
897
937
|
md: "h-2 rounded-8",
|
|
898
938
|
sm: "h-1 rounded-4"
|
|
899
939
|
};
|
|
900
|
-
var Progress =
|
|
940
|
+
var Progress = React14.forwardRef(
|
|
901
941
|
(props, ref) => {
|
|
902
942
|
const {
|
|
903
943
|
value,
|
|
904
944
|
label,
|
|
905
945
|
hint,
|
|
906
|
-
|
|
907
|
-
|
|
946
|
+
showProgressLabel = true,
|
|
947
|
+
hideHint,
|
|
908
948
|
size = "lg",
|
|
949
|
+
status = "default",
|
|
950
|
+
disabled,
|
|
909
951
|
className,
|
|
910
952
|
...rest
|
|
911
953
|
} = props;
|
|
912
954
|
const clamped = Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;
|
|
913
955
|
const percentageLabel = `${Math.round(clamped)}%`;
|
|
914
956
|
const barHeightClasses = sizeToBarClasses[size];
|
|
915
|
-
return /* @__PURE__ */
|
|
916
|
-
|
|
957
|
+
return /* @__PURE__ */ jsx16(
|
|
958
|
+
Field,
|
|
917
959
|
{
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
"
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
"
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
960
|
+
label,
|
|
961
|
+
labelRight: showProgressLabel && label ? /* @__PURE__ */ jsx16("span", { className: "footnote text-(--color-secondary)", children: percentageLabel }) : void 0,
|
|
962
|
+
hint,
|
|
963
|
+
hideHint,
|
|
964
|
+
status,
|
|
965
|
+
disabled,
|
|
966
|
+
className: cn("w-full", className),
|
|
967
|
+
children: /* @__PURE__ */ jsx16(
|
|
968
|
+
"div",
|
|
969
|
+
{
|
|
970
|
+
ref,
|
|
971
|
+
role: "progressbar",
|
|
972
|
+
"aria-valuenow": clamped,
|
|
973
|
+
"aria-valuemin": 0,
|
|
974
|
+
"aria-valuemax": 100,
|
|
975
|
+
"aria-label": label,
|
|
976
|
+
...rest,
|
|
977
|
+
children: /* @__PURE__ */ jsx16(
|
|
978
|
+
"div",
|
|
979
|
+
{
|
|
980
|
+
className: cn(
|
|
981
|
+
"w-full bg-(--chart-mono) overflow-hidden",
|
|
982
|
+
barHeightClasses,
|
|
983
|
+
disabled && "opacity-50"
|
|
984
|
+
),
|
|
985
|
+
children: /* @__PURE__ */ jsx16(
|
|
986
|
+
"div",
|
|
987
|
+
{
|
|
988
|
+
className: cn(
|
|
989
|
+
"bg-(--chart-brand) h-full",
|
|
990
|
+
size === "lg" ? "rounded-4" : size === "md" ? "rounded-2" : "rounded-[1px]"
|
|
991
|
+
),
|
|
992
|
+
style: { width: `${clamped}%` }
|
|
993
|
+
}
|
|
994
|
+
)
|
|
995
|
+
}
|
|
996
|
+
)
|
|
997
|
+
}
|
|
998
|
+
)
|
|
943
999
|
}
|
|
944
1000
|
);
|
|
945
1001
|
}
|
|
@@ -947,7 +1003,7 @@ var Progress = React13.forwardRef(
|
|
|
947
1003
|
Progress.displayName = "Progress";
|
|
948
1004
|
|
|
949
1005
|
// src/components/Content/StatusAvatar.tsx
|
|
950
|
-
import * as
|
|
1006
|
+
import * as React15 from "react";
|
|
951
1007
|
import { cva as cva10 } from "class-variance-authority";
|
|
952
1008
|
import {
|
|
953
1009
|
BookmarkCheckIcon,
|
|
@@ -956,7 +1012,7 @@ import {
|
|
|
956
1012
|
PlusIcon,
|
|
957
1013
|
StarIcon
|
|
958
1014
|
} from "@bubo-squared/icons";
|
|
959
|
-
import { jsx as
|
|
1015
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
960
1016
|
var iconStatusVariants = cva10(
|
|
961
1017
|
"inline-flex size-5 items-center justify-center rounded-full border-1 border-(--color-primary-inverse) p-1",
|
|
962
1018
|
{
|
|
@@ -981,11 +1037,11 @@ var presenceDotByVariant = {
|
|
|
981
1037
|
away: "bg-(--background-warning) border-1 border-(--color-primary-inverse)",
|
|
982
1038
|
busy: "bg-(--background-error) border-1 border-(--color-primary-inverse)"
|
|
983
1039
|
};
|
|
984
|
-
var StatusAvatar =
|
|
1040
|
+
var StatusAvatar = React15.forwardRef((props, ref) => {
|
|
985
1041
|
const { variant = "verified", className, ...rest } = props;
|
|
986
1042
|
if (variant === "offline" || variant === "online" || variant === "away" || variant === "busy") {
|
|
987
1043
|
const dotClasses = presenceDotByVariant[variant];
|
|
988
|
-
return /* @__PURE__ */
|
|
1044
|
+
return /* @__PURE__ */ jsx17(
|
|
989
1045
|
"div",
|
|
990
1046
|
{
|
|
991
1047
|
ref,
|
|
@@ -994,7 +1050,7 @@ var StatusAvatar = React14.forwardRef((props, ref) => {
|
|
|
994
1050
|
className
|
|
995
1051
|
),
|
|
996
1052
|
...rest,
|
|
997
|
-
children: /* @__PURE__ */
|
|
1053
|
+
children: /* @__PURE__ */ jsx17("div", { className: cn(dotClasses, "size-3.5 rounded-full") })
|
|
998
1054
|
}
|
|
999
1055
|
);
|
|
1000
1056
|
}
|
|
@@ -1006,11 +1062,11 @@ var StatusAvatar = React14.forwardRef((props, ref) => {
|
|
|
1006
1062
|
className: cn(iconStatusVariants({ variant: iconVariant }), className),
|
|
1007
1063
|
...rest,
|
|
1008
1064
|
children: [
|
|
1009
|
-
iconVariant === "verified" && /* @__PURE__ */
|
|
1010
|
-
iconVariant === "bookmark" && /* @__PURE__ */
|
|
1011
|
-
iconVariant === "favorite" && /* @__PURE__ */
|
|
1012
|
-
iconVariant === "add" && /* @__PURE__ */
|
|
1013
|
-
iconVariant === "remove" && /* @__PURE__ */
|
|
1065
|
+
iconVariant === "verified" && /* @__PURE__ */ jsx17(CheckIcon, { className: "size-3 text-button-white" }),
|
|
1066
|
+
iconVariant === "bookmark" && /* @__PURE__ */ jsx17(BookmarkCheckIcon, { className: "size-3 text-button-white" }),
|
|
1067
|
+
iconVariant === "favorite" && /* @__PURE__ */ jsx17(StarIcon, { className: "size-3 text-button-white" }),
|
|
1068
|
+
iconVariant === "add" && /* @__PURE__ */ jsx17(PlusIcon, { className: "size-3 text-button-white" }),
|
|
1069
|
+
iconVariant === "remove" && /* @__PURE__ */ jsx17(CrossIcon, { className: "size-3 text-button-white" })
|
|
1014
1070
|
]
|
|
1015
1071
|
}
|
|
1016
1072
|
);
|
|
@@ -1018,10 +1074,10 @@ var StatusAvatar = React14.forwardRef((props, ref) => {
|
|
|
1018
1074
|
StatusAvatar.displayName = "StatusAvatar";
|
|
1019
1075
|
|
|
1020
1076
|
// src/components/Content/Tag.tsx
|
|
1021
|
-
import * as
|
|
1077
|
+
import * as React16 from "react";
|
|
1022
1078
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
1023
1079
|
import { cva as cva11 } from "class-variance-authority";
|
|
1024
|
-
import { jsx as
|
|
1080
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1025
1081
|
var tagVariants = cva11(
|
|
1026
1082
|
"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 ",
|
|
1027
1083
|
{
|
|
@@ -1038,7 +1094,7 @@ var tagVariants = cva11(
|
|
|
1038
1094
|
);
|
|
1039
1095
|
var disabledTag = "pointer-events-none border-(--border-secondary-disabled) bg-(--background-neutral-disabled) text-primary-disabled";
|
|
1040
1096
|
var iconClasses = "flex items-center justify-center w-5 h-5 [&>*]:w-5 [&>*]:h-5 shrink-0 text-primary";
|
|
1041
|
-
var Tag =
|
|
1097
|
+
var Tag = React16.forwardRef(
|
|
1042
1098
|
(props, ref) => {
|
|
1043
1099
|
const {
|
|
1044
1100
|
size = "sm",
|
|
@@ -1050,8 +1106,8 @@ var Tag = React15.forwardRef(
|
|
|
1050
1106
|
...rest
|
|
1051
1107
|
} = props;
|
|
1052
1108
|
const Comp = asChild ? Slot6 : "div";
|
|
1053
|
-
const leading = props.leadingIcon &&
|
|
1054
|
-
const trailing = props.trailingIcon &&
|
|
1109
|
+
const leading = props.leadingIcon && React16.isValidElement(props.leadingIcon) ? React16.cloneElement(props.leadingIcon, { disabled, ...props.leadingIcon.props }) : null;
|
|
1110
|
+
const trailing = props.trailingIcon && React16.isValidElement(props.trailingIcon) ? React16.cloneElement(props.trailingIcon, { disabled, ...props.trailingIcon.props }) : null;
|
|
1055
1111
|
return /* @__PURE__ */ jsxs10(
|
|
1056
1112
|
Comp,
|
|
1057
1113
|
{
|
|
@@ -1059,13 +1115,13 @@ var Tag = React15.forwardRef(
|
|
|
1059
1115
|
ref,
|
|
1060
1116
|
...rest,
|
|
1061
1117
|
children: [
|
|
1062
|
-
leading && /* @__PURE__ */
|
|
1118
|
+
leading && /* @__PURE__ */ jsx18("div", { className: iconClasses, children: leading }),
|
|
1063
1119
|
value ? /* @__PURE__ */ jsxs10("div", { className: "flex flex-row gap-1 items-center", children: [
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
/* @__PURE__ */
|
|
1066
|
-
/* @__PURE__ */
|
|
1067
|
-
] }) : /* @__PURE__ */
|
|
1068
|
-
trailing && /* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ jsx18("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: label }),
|
|
1121
|
+
/* @__PURE__ */ jsx18("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: ":" }),
|
|
1122
|
+
/* @__PURE__ */ jsx18("span", { className: "text-primary paragraph-lg-medium mb-0! cursor-default font-medium", children: value })
|
|
1123
|
+
] }) : /* @__PURE__ */ jsx18("span", { className: "text-primary paragraph-lg mb-0! cursor-default", children: label }),
|
|
1124
|
+
trailing && /* @__PURE__ */ jsx18("div", { className: iconClasses, children: trailing })
|
|
1069
1125
|
]
|
|
1070
1126
|
}
|
|
1071
1127
|
);
|
|
@@ -1077,10 +1133,10 @@ import "react";
|
|
|
1077
1133
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
1078
1134
|
import { CheckIcon as CheckIcon2 } from "@bubo-squared/icons";
|
|
1079
1135
|
import { MinusIcon } from "@bubo-squared/icons";
|
|
1080
|
-
import { jsx as
|
|
1136
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1081
1137
|
function Checkbox({ label, className, ...props }) {
|
|
1082
1138
|
return /* @__PURE__ */ jsxs11("label", { className: "inline-flex items-center gap-(--space-12) cursor-pointer select-none", children: [
|
|
1083
|
-
/* @__PURE__ */
|
|
1139
|
+
/* @__PURE__ */ jsx19(
|
|
1084
1140
|
CheckboxPrimitive.Root,
|
|
1085
1141
|
{
|
|
1086
1142
|
className: cn(
|
|
@@ -1097,23 +1153,23 @@ function Checkbox({ label, className, ...props }) {
|
|
|
1097
1153
|
),
|
|
1098
1154
|
...props,
|
|
1099
1155
|
children: /* @__PURE__ */ jsxs11(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
|
|
1100
|
-
/* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ jsx19(CheckIcon2, { className: "h-5 w-5 hidden group-data-[state=checked]:block" }),
|
|
1157
|
+
/* @__PURE__ */ jsx19(MinusIcon, { className: "h-5 w-5 hidden group-data-[state=indeterminate]:block" })
|
|
1102
1158
|
] })
|
|
1103
1159
|
}
|
|
1104
1160
|
),
|
|
1105
|
-
label && /* @__PURE__ */
|
|
1161
|
+
label && /* @__PURE__ */ jsx19("span", { className: "paragraph-md-medium text-primary", children: label })
|
|
1106
1162
|
] });
|
|
1107
1163
|
}
|
|
1108
1164
|
|
|
1109
|
-
// src/components/Inputs/
|
|
1110
|
-
import * as
|
|
1165
|
+
// src/components/Inputs/Select.tsx
|
|
1166
|
+
import * as React18 from "react";
|
|
1167
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1111
1168
|
import { cva as cva12 } from "class-variance-authority";
|
|
1112
1169
|
import { ChevronDownIcon } from "@bubo-squared/icons";
|
|
1113
|
-
import { jsx as
|
|
1114
|
-
var
|
|
1115
|
-
|
|
1116
|
-
"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",
|
|
1170
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1171
|
+
var selectTriggerVariants = cva12(
|
|
1172
|
+
"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",
|
|
1117
1173
|
{
|
|
1118
1174
|
variants: {
|
|
1119
1175
|
size: {
|
|
@@ -1134,7 +1190,7 @@ var dropdownTriggerVariants = cva12(
|
|
|
1134
1190
|
}
|
|
1135
1191
|
}
|
|
1136
1192
|
);
|
|
1137
|
-
var
|
|
1193
|
+
var textVariants = cva12("truncate", {
|
|
1138
1194
|
variants: {
|
|
1139
1195
|
size: {
|
|
1140
1196
|
sm: "paragraph-md",
|
|
@@ -1143,7 +1199,7 @@ var dropdownTextVariants = cva12("truncate", {
|
|
|
1143
1199
|
xl: "h6-title"
|
|
1144
1200
|
},
|
|
1145
1201
|
hasValue: {
|
|
1146
|
-
false: "text-
|
|
1202
|
+
false: "text-secondary",
|
|
1147
1203
|
true: "text-primary"
|
|
1148
1204
|
},
|
|
1149
1205
|
disabled: {
|
|
@@ -1155,13 +1211,13 @@ var dropdownTextVariants = cva12("truncate", {
|
|
|
1155
1211
|
hasValue: false
|
|
1156
1212
|
}
|
|
1157
1213
|
});
|
|
1158
|
-
var
|
|
1214
|
+
var selectIconVariants = cva12("flex items-center justify-center shrink-0", {
|
|
1159
1215
|
variants: {
|
|
1160
1216
|
size: {
|
|
1161
|
-
sm: "
|
|
1162
|
-
md: "
|
|
1163
|
-
lg: "
|
|
1164
|
-
xl: "
|
|
1217
|
+
sm: "size-4",
|
|
1218
|
+
md: "size-5",
|
|
1219
|
+
lg: "size-5",
|
|
1220
|
+
xl: "size-6"
|
|
1165
1221
|
},
|
|
1166
1222
|
disabled: {
|
|
1167
1223
|
false: "text-(--icon-primary)",
|
|
@@ -1173,12 +1229,25 @@ var dropdownIconVariants = cva12("flex items-center justify-center shrink-0", {
|
|
|
1173
1229
|
disabled: false
|
|
1174
1230
|
}
|
|
1175
1231
|
});
|
|
1176
|
-
var
|
|
1232
|
+
var selectButtonVariants = cva12(
|
|
1233
|
+
"flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) text-left paragraph-lg text-primary hover:bg-(--background-secondary)",
|
|
1234
|
+
{
|
|
1235
|
+
variants: {
|
|
1236
|
+
size: {
|
|
1237
|
+
sm: "paragraph-sm py-(--space-4) ",
|
|
1238
|
+
md: "paragraph-md py-(--space-6) ",
|
|
1239
|
+
lg: "paragraph-lg py-(--space-8) ",
|
|
1240
|
+
xl: "subtitle py-(--space-10) "
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
);
|
|
1245
|
+
var Select = (props) => {
|
|
1177
1246
|
const {
|
|
1178
1247
|
label = "Field Label",
|
|
1179
|
-
showLabel = true,
|
|
1180
1248
|
hint = "This is a hint text to help user.",
|
|
1181
1249
|
hideHint = false,
|
|
1250
|
+
name,
|
|
1182
1251
|
placeholder = "Placeholder text",
|
|
1183
1252
|
size = "lg",
|
|
1184
1253
|
status = "default",
|
|
@@ -1189,186 +1258,140 @@ var Dropdown = (props) => {
|
|
|
1189
1258
|
onChange,
|
|
1190
1259
|
className,
|
|
1191
1260
|
showMenu,
|
|
1261
|
+
required = false,
|
|
1192
1262
|
...buttonProps
|
|
1193
1263
|
} = props;
|
|
1194
|
-
const dropdownRef = React17.useRef(null);
|
|
1195
1264
|
const isControlled = value !== void 0;
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1265
|
+
const controlledValue = value ?? "";
|
|
1266
|
+
const [internalValue, setInternalValue] = React18.useState(
|
|
1267
|
+
defaultValue ?? ""
|
|
1198
1268
|
);
|
|
1199
|
-
const [open, setOpen] =
|
|
1200
|
-
const
|
|
1201
|
-
const selectedOption = options.find((opt) => opt.value ===
|
|
1269
|
+
const [open, setOpen] = React18.useState(false);
|
|
1270
|
+
const rawValue = isControlled ? controlledValue : internalValue;
|
|
1271
|
+
const selectedOption = options.find((opt) => opt.value === rawValue);
|
|
1272
|
+
const currentValue = selectedOption ? selectedOption.value : "";
|
|
1202
1273
|
const hasValue = !!selectedOption;
|
|
1203
1274
|
const isOpen = showMenu ?? open;
|
|
1204
|
-
const
|
|
1205
|
-
if (disabled) return;
|
|
1275
|
+
const handleOpenChange = (nextOpen) => {
|
|
1206
1276
|
if (showMenu === void 0) {
|
|
1207
|
-
setOpen(
|
|
1277
|
+
setOpen(nextOpen);
|
|
1208
1278
|
}
|
|
1209
1279
|
};
|
|
1210
|
-
const
|
|
1280
|
+
const handleValueChange = (nextValue) => {
|
|
1211
1281
|
if (!isControlled) {
|
|
1212
|
-
setInternalValue(
|
|
1282
|
+
setInternalValue(nextValue);
|
|
1213
1283
|
}
|
|
1214
|
-
onChange?.(
|
|
1284
|
+
onChange?.(nextValue);
|
|
1215
1285
|
if (showMenu === void 0) {
|
|
1216
1286
|
setOpen(false);
|
|
1217
1287
|
}
|
|
1218
1288
|
};
|
|
1219
|
-
const
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
{
|
|
1239
|
-
htmlFor: triggerId,
|
|
1240
|
-
id: labelId,
|
|
1241
|
-
className: cn(
|
|
1242
|
-
"paragraph-sm",
|
|
1243
|
-
disabled ? "text-primary-disabled" : "text-primary"
|
|
1244
|
-
),
|
|
1245
|
-
children: label
|
|
1246
|
-
}
|
|
1247
|
-
),
|
|
1248
|
-
/* @__PURE__ */ jsxs12("div", { className: "relative w-full", children: [
|
|
1249
|
-
/* @__PURE__ */ jsxs12(
|
|
1250
|
-
"button",
|
|
1289
|
+
const handleClear = () => {
|
|
1290
|
+
if (!isControlled) {
|
|
1291
|
+
setInternalValue("");
|
|
1292
|
+
}
|
|
1293
|
+
onChange?.("");
|
|
1294
|
+
if (showMenu === void 0) {
|
|
1295
|
+
setOpen(false);
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
return /* @__PURE__ */ jsx20(
|
|
1299
|
+
Field,
|
|
1300
|
+
{
|
|
1301
|
+
label,
|
|
1302
|
+
hint,
|
|
1303
|
+
hideHint,
|
|
1304
|
+
status,
|
|
1305
|
+
disabled,
|
|
1306
|
+
children: /* @__PURE__ */ jsxs12(
|
|
1307
|
+
SelectPrimitive.Root,
|
|
1251
1308
|
{
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
"aria-labelledby": showLabel ? labelId : void 0,
|
|
1257
|
-
"aria-describedby": !hideHint ? hintId : void 0,
|
|
1309
|
+
value: currentValue,
|
|
1310
|
+
onValueChange: handleValueChange,
|
|
1311
|
+
open: isOpen,
|
|
1312
|
+
onOpenChange: handleOpenChange,
|
|
1258
1313
|
disabled,
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
className
|
|
1262
|
-
),
|
|
1263
|
-
onClick: handleToggle,
|
|
1264
|
-
"data-open": isOpen || void 0,
|
|
1265
|
-
...buttonProps,
|
|
1314
|
+
name,
|
|
1315
|
+
required,
|
|
1266
1316
|
children: [
|
|
1267
|
-
/* @__PURE__ */
|
|
1268
|
-
"
|
|
1317
|
+
/* @__PURE__ */ jsx20(SelectPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs12(
|
|
1318
|
+
"button",
|
|
1269
1319
|
{
|
|
1320
|
+
type: "button",
|
|
1321
|
+
"aria-haspopup": "listbox",
|
|
1322
|
+
"aria-expanded": isOpen,
|
|
1323
|
+
disabled,
|
|
1270
1324
|
className: cn(
|
|
1271
|
-
|
|
1325
|
+
selectTriggerVariants({ size, status }),
|
|
1326
|
+
textVariants({
|
|
1272
1327
|
size,
|
|
1273
1328
|
hasValue,
|
|
1274
1329
|
disabled: !!disabled
|
|
1275
|
-
})
|
|
1330
|
+
}),
|
|
1331
|
+
hasValue ? "text-primary" : "text-secondary",
|
|
1332
|
+
className
|
|
1276
1333
|
),
|
|
1277
|
-
|
|
1334
|
+
"data-open": isOpen || void 0,
|
|
1335
|
+
...buttonProps,
|
|
1336
|
+
children: [
|
|
1337
|
+
/* @__PURE__ */ jsx20(SelectPrimitive.Value, { placeholder }),
|
|
1338
|
+
/* @__PURE__ */ jsx20(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx20(
|
|
1339
|
+
"span",
|
|
1340
|
+
{
|
|
1341
|
+
className: cn(selectIconVariants({ size, disabled: !!disabled })),
|
|
1342
|
+
children: /* @__PURE__ */ jsx20(ChevronDownIcon, {})
|
|
1343
|
+
}
|
|
1344
|
+
) })
|
|
1345
|
+
]
|
|
1278
1346
|
}
|
|
1279
|
-
),
|
|
1280
|
-
/* @__PURE__ */
|
|
1281
|
-
|
|
1347
|
+
) }),
|
|
1348
|
+
/* @__PURE__ */ jsx20(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx20(
|
|
1349
|
+
SelectPrimitive.Content,
|
|
1282
1350
|
{
|
|
1351
|
+
position: "popper",
|
|
1352
|
+
align: "start",
|
|
1353
|
+
sideOffset: 4,
|
|
1283
1354
|
className: cn(
|
|
1284
|
-
|
|
1355
|
+
"z-50 rounded-4 border border-(--border-secondary-hover) bg-(--background-neutral) shadow-card-md overflow-y-scroll dropdown-scrollbar max-h-79",
|
|
1356
|
+
"min-w-343"
|
|
1285
1357
|
),
|
|
1286
|
-
|
|
1358
|
+
style: { minWidth: "var(--radix-select-trigger-width)" },
|
|
1359
|
+
children: /* @__PURE__ */ jsx20(SelectPrimitive.Viewport, { children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col", children: [
|
|
1360
|
+
hasValue && /* @__PURE__ */ jsx20("div", { className: cn("bg-(--background-neutral) border-b border-(--border-secondary)"), children: /* @__PURE__ */ jsx20(
|
|
1361
|
+
"button",
|
|
1362
|
+
{
|
|
1363
|
+
type: "button",
|
|
1364
|
+
className: cn(
|
|
1365
|
+
selectButtonVariants({ size }),
|
|
1366
|
+
"text-secondary"
|
|
1367
|
+
),
|
|
1368
|
+
onClick: handleClear,
|
|
1369
|
+
children: "Clear"
|
|
1370
|
+
}
|
|
1371
|
+
) }),
|
|
1372
|
+
options.map((opt) => /* @__PURE__ */ jsx20(
|
|
1373
|
+
SelectPrimitive.Item,
|
|
1374
|
+
{
|
|
1375
|
+
value: opt.value,
|
|
1376
|
+
className: cn(
|
|
1377
|
+
"bg-(--background-neutral) border-b border-(--border-secondary) last:border-b-0",
|
|
1378
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:border-(--border-secondary-hover) data-highlighted:outline-none",
|
|
1379
|
+
"data-[state=checked]:bg-(--background-secondary)"
|
|
1380
|
+
),
|
|
1381
|
+
children: /* @__PURE__ */ jsx20("div", { className: selectButtonVariants({ size }), children: /* @__PURE__ */ jsx20(SelectPrimitive.ItemText, { children: opt.label }) })
|
|
1382
|
+
},
|
|
1383
|
+
opt.value
|
|
1384
|
+
))
|
|
1385
|
+
] }) })
|
|
1287
1386
|
}
|
|
1288
|
-
)
|
|
1387
|
+
) })
|
|
1289
1388
|
]
|
|
1290
1389
|
}
|
|
1291
|
-
)
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
return /* @__PURE__ */ jsx19(
|
|
1295
|
-
"li",
|
|
1296
|
-
{
|
|
1297
|
-
className: cn(
|
|
1298
|
-
"bg-(--background-neutral) border-b border-(--border-secondary) last:border-b-0",
|
|
1299
|
-
selected && "bg-(--background-secondary)"
|
|
1300
|
-
),
|
|
1301
|
-
children: /* @__PURE__ */ jsx19(
|
|
1302
|
-
"button",
|
|
1303
|
-
{
|
|
1304
|
-
type: "button",
|
|
1305
|
-
className: "flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) py-(--space-8) text-left paragraph-lg text-primary hover:bg-(--background-secondary)",
|
|
1306
|
-
role: "option",
|
|
1307
|
-
"aria-selected": selected,
|
|
1308
|
-
onClick: () => handleSelect(opt.value),
|
|
1309
|
-
children: opt.label
|
|
1310
|
-
}
|
|
1311
|
-
)
|
|
1312
|
-
},
|
|
1313
|
-
opt.value
|
|
1314
|
-
);
|
|
1315
|
-
}) }) })
|
|
1316
|
-
] }),
|
|
1317
|
-
!hideHint && /* @__PURE__ */ jsx19(
|
|
1318
|
-
"p",
|
|
1319
|
-
{
|
|
1320
|
-
id: hintId,
|
|
1321
|
-
className: cn(
|
|
1322
|
-
"caption",
|
|
1323
|
-
disabled ? "text-primary-disabled" : "text-(--color-secondary)"
|
|
1324
|
-
),
|
|
1325
|
-
children: hint
|
|
1326
|
-
}
|
|
1327
|
-
)
|
|
1328
|
-
] });
|
|
1329
|
-
};
|
|
1330
|
-
Dropdown.displayName = "Dropdown";
|
|
1331
|
-
|
|
1332
|
-
// src/components/Inputs/Field.tsx
|
|
1333
|
-
import * as React18 from "react";
|
|
1334
|
-
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1335
|
-
var fieldBase = "flex flex-col gap-2 items-start";
|
|
1336
|
-
var Field = (props) => {
|
|
1337
|
-
const {
|
|
1338
|
-
label,
|
|
1339
|
-
hint,
|
|
1340
|
-
hideHint,
|
|
1341
|
-
status = "default",
|
|
1342
|
-
disabled,
|
|
1343
|
-
className,
|
|
1344
|
-
children
|
|
1345
|
-
} = props;
|
|
1346
|
-
const fieldId = React18.useId();
|
|
1347
|
-
const labelId = label ? `${fieldId}-label` : void 0;
|
|
1348
|
-
const hintId = hint ? `${fieldId}-hint` : void 0;
|
|
1349
|
-
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
1350
|
-
const labelColorClass = disabled ? "text-primary-disabled" : "text-primary";
|
|
1351
|
-
return /* @__PURE__ */ jsxs13("div", { className: cn(fieldBase, className), children: [
|
|
1352
|
-
label && /* @__PURE__ */ jsx20(
|
|
1353
|
-
"label",
|
|
1354
|
-
{
|
|
1355
|
-
id: labelId,
|
|
1356
|
-
className: cn("paragraph-sm", labelColorClass),
|
|
1357
|
-
children: label
|
|
1358
|
-
}
|
|
1359
|
-
),
|
|
1360
|
-
/* @__PURE__ */ jsx20("div", { className: "relative w-full", children }),
|
|
1361
|
-
!hideHint && /* @__PURE__ */ jsx20(
|
|
1362
|
-
"p",
|
|
1363
|
-
{
|
|
1364
|
-
id: hint ? hintId : void 0,
|
|
1365
|
-
className: cn("caption", hint ? hintColorClass : "invisible"),
|
|
1366
|
-
children: hint || "\xA0"
|
|
1367
|
-
}
|
|
1368
|
-
)
|
|
1369
|
-
] });
|
|
1390
|
+
)
|
|
1391
|
+
}
|
|
1392
|
+
);
|
|
1370
1393
|
};
|
|
1371
|
-
|
|
1394
|
+
Select.displayName = "Select";
|
|
1372
1395
|
|
|
1373
1396
|
// src/components/Inputs/PasswordInput.tsx
|
|
1374
1397
|
import * as React21 from "react";
|
|
@@ -1448,7 +1471,8 @@ var InputShell = React20.forwardRef(
|
|
|
1448
1471
|
InputShell.displayName = "InputShell";
|
|
1449
1472
|
|
|
1450
1473
|
// src/components/Inputs/PasswordInput.tsx
|
|
1451
|
-
import {
|
|
1474
|
+
import { EyeIcon, EyeSlashIcon } from "@bubo-squared/icons";
|
|
1475
|
+
import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1452
1476
|
var passwordTextVariants = cva14("truncate", {
|
|
1453
1477
|
variants: {
|
|
1454
1478
|
size: {
|
|
@@ -1513,13 +1537,10 @@ var PasswordInput = (props) => {
|
|
|
1513
1537
|
placeholder = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
1514
1538
|
size = "lg",
|
|
1515
1539
|
status = "default",
|
|
1516
|
-
variant = "
|
|
1540
|
+
variant = "icon",
|
|
1517
1541
|
disabled,
|
|
1518
1542
|
className,
|
|
1519
1543
|
leadingIcon,
|
|
1520
|
-
trailingIcon,
|
|
1521
|
-
actionLabel = "Action",
|
|
1522
|
-
onActionClick,
|
|
1523
1544
|
value,
|
|
1524
1545
|
defaultValue,
|
|
1525
1546
|
onChange,
|
|
@@ -1529,8 +1550,10 @@ var PasswordInput = (props) => {
|
|
|
1529
1550
|
const [internalValue, setInternalValue] = React21.useState(
|
|
1530
1551
|
defaultValue ?? ""
|
|
1531
1552
|
);
|
|
1553
|
+
const [isRevealed, setIsRevealed] = React21.useState(false);
|
|
1532
1554
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
1533
1555
|
const inputRef = React21.useRef(null);
|
|
1556
|
+
const showLeadingIcon = !!leadingIcon;
|
|
1534
1557
|
const handleContainerClick = () => {
|
|
1535
1558
|
if (disabled) return;
|
|
1536
1559
|
inputRef.current?.focus();
|
|
@@ -1541,9 +1564,6 @@ var PasswordInput = (props) => {
|
|
|
1541
1564
|
}
|
|
1542
1565
|
onChange?.(event);
|
|
1543
1566
|
};
|
|
1544
|
-
const showLeadingIcon = variant === "icons" && !!leadingIcon;
|
|
1545
|
-
const showTrailingIcon = variant === "icons" && !!trailingIcon;
|
|
1546
|
-
const showAction = variant === "action" && !!actionLabel;
|
|
1547
1567
|
return /* @__PURE__ */ jsx23(
|
|
1548
1568
|
Field,
|
|
1549
1569
|
{
|
|
@@ -1552,7 +1572,7 @@ var PasswordInput = (props) => {
|
|
|
1552
1572
|
hideHint,
|
|
1553
1573
|
status,
|
|
1554
1574
|
disabled,
|
|
1555
|
-
children: /* @__PURE__ */
|
|
1575
|
+
children: /* @__PURE__ */ jsxs13(
|
|
1556
1576
|
InputShell,
|
|
1557
1577
|
{
|
|
1558
1578
|
size,
|
|
@@ -1574,37 +1594,33 @@ var PasswordInput = (props) => {
|
|
|
1574
1594
|
Input,
|
|
1575
1595
|
{
|
|
1576
1596
|
ref: inputRef,
|
|
1577
|
-
type: "password",
|
|
1597
|
+
type: isRevealed ? "text" : "password",
|
|
1578
1598
|
disabled: disabled ?? void 0,
|
|
1579
1599
|
placeholder,
|
|
1580
1600
|
value: isControlled ? value : currentValue,
|
|
1581
1601
|
defaultValue: isControlled ? void 0 : defaultValue,
|
|
1582
1602
|
onChange: handleChange,
|
|
1583
1603
|
variant: "bare",
|
|
1584
|
-
className: cn(
|
|
1585
|
-
passwordTextVariants({ size, disabled: !!disabled })
|
|
1586
|
-
),
|
|
1604
|
+
className: cn(passwordTextVariants({ size, disabled: !!disabled })),
|
|
1587
1605
|
...inputProps
|
|
1588
1606
|
}
|
|
1589
1607
|
),
|
|
1590
|
-
|
|
1591
|
-
"span",
|
|
1592
|
-
{
|
|
1593
|
-
className: cn(
|
|
1594
|
-
iconWrapperVariants({ size, disabled: !!disabled })
|
|
1595
|
-
),
|
|
1596
|
-
children: trailingIcon
|
|
1597
|
-
}
|
|
1598
|
-
),
|
|
1599
|
-
showAction && /* @__PURE__ */ jsx23(
|
|
1608
|
+
/* @__PURE__ */ jsx23(
|
|
1600
1609
|
"button",
|
|
1601
1610
|
{
|
|
1602
1611
|
type: "button",
|
|
1612
|
+
disabled: !!disabled,
|
|
1613
|
+
onClick: () => {
|
|
1614
|
+
if (disabled) return;
|
|
1615
|
+
setIsRevealed((prev) => !prev);
|
|
1616
|
+
inputRef.current?.focus();
|
|
1617
|
+
},
|
|
1618
|
+
"aria-label": isRevealed ? "Hide password" : "Show password",
|
|
1603
1619
|
className: cn(
|
|
1604
|
-
|
|
1620
|
+
"cursor-pointer",
|
|
1621
|
+
variant === "text" ? actionButtonVariants({ size, disabled: !!disabled }) : iconWrapperVariants({ size, disabled: !!disabled })
|
|
1605
1622
|
),
|
|
1606
|
-
|
|
1607
|
-
children: actionLabel
|
|
1623
|
+
children: variant === "icon" ? isRevealed ? /* @__PURE__ */ jsx23(EyeSlashIcon, {}) : /* @__PURE__ */ jsx23(EyeIcon, {}) : isRevealed ? "Hide" : "Show"
|
|
1608
1624
|
}
|
|
1609
1625
|
)
|
|
1610
1626
|
]
|
|
@@ -1681,10 +1697,113 @@ import { SearchIcon } from "@bubo-squared/icons";
|
|
|
1681
1697
|
// src/components/ui/dialog.tsx
|
|
1682
1698
|
import "react";
|
|
1683
1699
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
1684
|
-
|
|
1700
|
+
|
|
1701
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1702
|
+
import { forwardRef as forwardRef14, createElement as createElement2 } from "react";
|
|
1703
|
+
|
|
1704
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
1705
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1706
|
+
var toCamelCase = (string) => string.replace(
|
|
1707
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
1708
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
1709
|
+
);
|
|
1710
|
+
var toPascalCase = (string) => {
|
|
1711
|
+
const camelCase = toCamelCase(string);
|
|
1712
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
1713
|
+
};
|
|
1714
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
1715
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
1716
|
+
}).join(" ").trim();
|
|
1717
|
+
var hasA11yProp = (props) => {
|
|
1718
|
+
for (const prop in props) {
|
|
1719
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
1720
|
+
return true;
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
};
|
|
1724
|
+
|
|
1725
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
|
|
1726
|
+
import { forwardRef as forwardRef13, createElement } from "react";
|
|
1727
|
+
|
|
1728
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
1729
|
+
var defaultAttributes = {
|
|
1730
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1731
|
+
width: 24,
|
|
1732
|
+
height: 24,
|
|
1733
|
+
viewBox: "0 0 24 24",
|
|
1734
|
+
fill: "none",
|
|
1735
|
+
stroke: "currentColor",
|
|
1736
|
+
strokeWidth: 2,
|
|
1737
|
+
strokeLinecap: "round",
|
|
1738
|
+
strokeLinejoin: "round"
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
|
|
1742
|
+
var Icon2 = forwardRef13(
|
|
1743
|
+
({
|
|
1744
|
+
color = "currentColor",
|
|
1745
|
+
size = 24,
|
|
1746
|
+
strokeWidth = 2,
|
|
1747
|
+
absoluteStrokeWidth,
|
|
1748
|
+
className = "",
|
|
1749
|
+
children,
|
|
1750
|
+
iconNode,
|
|
1751
|
+
...rest
|
|
1752
|
+
}, ref) => createElement(
|
|
1753
|
+
"svg",
|
|
1754
|
+
{
|
|
1755
|
+
ref,
|
|
1756
|
+
...defaultAttributes,
|
|
1757
|
+
width: size,
|
|
1758
|
+
height: size,
|
|
1759
|
+
stroke: color,
|
|
1760
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
1761
|
+
className: mergeClasses("lucide", className),
|
|
1762
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
1763
|
+
...rest
|
|
1764
|
+
},
|
|
1765
|
+
[
|
|
1766
|
+
...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
|
|
1767
|
+
...Array.isArray(children) ? children : [children]
|
|
1768
|
+
]
|
|
1769
|
+
)
|
|
1770
|
+
);
|
|
1771
|
+
|
|
1772
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1773
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
1774
|
+
const Component = forwardRef14(
|
|
1775
|
+
({ className, ...props }, ref) => createElement2(Icon2, {
|
|
1776
|
+
ref,
|
|
1777
|
+
iconNode,
|
|
1778
|
+
className: mergeClasses(
|
|
1779
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
1780
|
+
`lucide-${iconName}`,
|
|
1781
|
+
className
|
|
1782
|
+
),
|
|
1783
|
+
...props
|
|
1784
|
+
})
|
|
1785
|
+
);
|
|
1786
|
+
Component.displayName = toPascalCase(iconName);
|
|
1787
|
+
return Component;
|
|
1788
|
+
};
|
|
1789
|
+
|
|
1790
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
1791
|
+
var __iconNode = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
1792
|
+
var ChevronRight = createLucideIcon("chevron-right", __iconNode);
|
|
1793
|
+
|
|
1794
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/ellipsis.js
|
|
1795
|
+
var __iconNode2 = [
|
|
1796
|
+
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
1797
|
+
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
1798
|
+
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
1799
|
+
];
|
|
1800
|
+
var Ellipsis = createLucideIcon("ellipsis", __iconNode2);
|
|
1801
|
+
|
|
1802
|
+
// src/components/ui/dialog.tsx
|
|
1803
|
+
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1685
1804
|
|
|
1686
1805
|
// src/components/ui/command.tsx
|
|
1687
|
-
import { jsx as jsx26, jsxs as
|
|
1806
|
+
import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1688
1807
|
function Command({
|
|
1689
1808
|
className,
|
|
1690
1809
|
...props
|
|
@@ -1705,7 +1824,7 @@ function CommandInput({
|
|
|
1705
1824
|
className,
|
|
1706
1825
|
...props
|
|
1707
1826
|
}) {
|
|
1708
|
-
return /* @__PURE__ */
|
|
1827
|
+
return /* @__PURE__ */ jsxs15(
|
|
1709
1828
|
"div",
|
|
1710
1829
|
{
|
|
1711
1830
|
"data-slot": "command-input-wrapper",
|
|
@@ -1826,13 +1945,13 @@ function PopoverContent({
|
|
|
1826
1945
|
// src/components/ui/scroll-area.tsx
|
|
1827
1946
|
import "react";
|
|
1828
1947
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
1829
|
-
import { jsx as jsx28, jsxs as
|
|
1948
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1830
1949
|
function ScrollArea({
|
|
1831
1950
|
className,
|
|
1832
1951
|
children,
|
|
1833
1952
|
...props
|
|
1834
1953
|
}) {
|
|
1835
|
-
return /* @__PURE__ */
|
|
1954
|
+
return /* @__PURE__ */ jsxs16(
|
|
1836
1955
|
ScrollAreaPrimitive.Root,
|
|
1837
1956
|
{
|
|
1838
1957
|
"data-slot": "scroll-area",
|
|
@@ -1884,7 +2003,7 @@ function ScrollBar({
|
|
|
1884
2003
|
|
|
1885
2004
|
// src/components/Inputs/PhoneInput.tsx
|
|
1886
2005
|
import { cva as cva16 } from "class-variance-authority";
|
|
1887
|
-
import { jsx as jsx29, jsxs as
|
|
2006
|
+
import { jsx as jsx29, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1888
2007
|
var inputBase = "h-full rounded-4 border-(--border-secondary) bg-(--background-primary) hover:border-(--border-secondary-hover)";
|
|
1889
2008
|
var sizeBase = cva16(
|
|
1890
2009
|
"flex w-full",
|
|
@@ -1992,17 +2111,19 @@ var CountrySelect = ({
|
|
|
1992
2111
|
const scrollAreaRef = React27.useRef(null);
|
|
1993
2112
|
const [searchValue, setSearchValue] = React27.useState("");
|
|
1994
2113
|
const [isOpen, setIsOpen] = React27.useState(false);
|
|
1995
|
-
return /* @__PURE__ */
|
|
2114
|
+
return /* @__PURE__ */ jsxs17(
|
|
1996
2115
|
Popover,
|
|
1997
2116
|
{
|
|
1998
2117
|
open: isOpen,
|
|
1999
2118
|
modal: true,
|
|
2000
2119
|
onOpenChange: (open) => {
|
|
2001
2120
|
setIsOpen(open);
|
|
2002
|
-
|
|
2121
|
+
if (open) {
|
|
2122
|
+
setSearchValue("");
|
|
2123
|
+
}
|
|
2003
2124
|
},
|
|
2004
2125
|
children: [
|
|
2005
|
-
/* @__PURE__ */ jsx29(PopoverTrigger, { asChild: true, children: /* @__PURE__ */
|
|
2126
|
+
/* @__PURE__ */ jsx29(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs17(
|
|
2006
2127
|
Button2,
|
|
2007
2128
|
{
|
|
2008
2129
|
type: "button",
|
|
@@ -2034,7 +2155,7 @@ var CountrySelect = ({
|
|
|
2034
2155
|
{
|
|
2035
2156
|
align: "start",
|
|
2036
2157
|
className: "p-0 bg-(--background-primary) shadow-card-md rounded-4 border-none outline-1 outline-solid outline-(--border-secondary-hover) **:data-[slot='command-input-wrapper']:border-b-(--border-secondary)",
|
|
2037
|
-
children: /* @__PURE__ */
|
|
2158
|
+
children: /* @__PURE__ */ jsxs17(Command, { children: [
|
|
2038
2159
|
/* @__PURE__ */ jsx29(
|
|
2039
2160
|
CommandInput,
|
|
2040
2161
|
{
|
|
@@ -2055,7 +2176,7 @@ var CountrySelect = ({
|
|
|
2055
2176
|
placeholder: "Search country..."
|
|
2056
2177
|
}
|
|
2057
2178
|
),
|
|
2058
|
-
/* @__PURE__ */ jsx29(CommandList, { children: /* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ jsx29(CommandList, { children: /* @__PURE__ */ jsxs17(ScrollArea, { ref: scrollAreaRef, className: "h-72", children: [
|
|
2059
2180
|
/* @__PURE__ */ jsx29(CommandEmpty, { children: "No country found." }),
|
|
2060
2181
|
/* @__PURE__ */ jsx29(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(
|
|
2061
2182
|
({ value, label }) => value ? /* @__PURE__ */ jsx29(
|
|
@@ -2090,7 +2211,7 @@ var CountrySelectOption = (props) => {
|
|
|
2090
2211
|
onChange(country);
|
|
2091
2212
|
onSelectComplete();
|
|
2092
2213
|
};
|
|
2093
|
-
return /* @__PURE__ */
|
|
2214
|
+
return /* @__PURE__ */ jsxs17(
|
|
2094
2215
|
CommandItem,
|
|
2095
2216
|
{
|
|
2096
2217
|
className: "gap-2 data-[selected=true]:text-primary",
|
|
@@ -2117,8 +2238,7 @@ var FlagComponent = ({ country, countryName }) => {
|
|
|
2117
2238
|
// src/components/Inputs/RadioGroup.tsx
|
|
2118
2239
|
import * as React28 from "react";
|
|
2119
2240
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2120
|
-
import { jsx as jsx30, jsxs as
|
|
2121
|
-
var wrapperBase = "flex flex-col gap-2 items-start";
|
|
2241
|
+
import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2122
2242
|
var RadioGroup = ({
|
|
2123
2243
|
label,
|
|
2124
2244
|
hint,
|
|
@@ -2138,124 +2258,103 @@ var RadioGroup = ({
|
|
|
2138
2258
|
onValueChange?.(next);
|
|
2139
2259
|
};
|
|
2140
2260
|
const isHorizontal = orientation === "horizontal";
|
|
2141
|
-
return /* @__PURE__ */
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
)
|
|
2232
|
-
]
|
|
2233
|
-
}
|
|
2234
|
-
)
|
|
2235
|
-
},
|
|
2236
|
-
option.value
|
|
2237
|
-
))
|
|
2238
|
-
}
|
|
2239
|
-
),
|
|
2240
|
-
!hideHint && /* @__PURE__ */ jsx30(
|
|
2241
|
-
"p",
|
|
2242
|
-
{
|
|
2243
|
-
id: hintId,
|
|
2244
|
-
className: cn(
|
|
2245
|
-
"caption text-(--color-secondary)",
|
|
2246
|
-
disabled && "text-primary-disabled"
|
|
2247
|
-
),
|
|
2248
|
-
children: hint ?? "\xA0"
|
|
2249
|
-
}
|
|
2250
|
-
)
|
|
2251
|
-
] });
|
|
2261
|
+
return /* @__PURE__ */ jsx30(
|
|
2262
|
+
Field,
|
|
2263
|
+
{
|
|
2264
|
+
label,
|
|
2265
|
+
hint,
|
|
2266
|
+
hideHint,
|
|
2267
|
+
disabled,
|
|
2268
|
+
children: /* @__PURE__ */ jsx30(
|
|
2269
|
+
RadioGroupPrimitive.Root,
|
|
2270
|
+
{
|
|
2271
|
+
...rootProps,
|
|
2272
|
+
value,
|
|
2273
|
+
defaultValue,
|
|
2274
|
+
onValueChange: handleValueChange,
|
|
2275
|
+
disabled,
|
|
2276
|
+
"aria-describedby": hintId,
|
|
2277
|
+
className: cn(
|
|
2278
|
+
"flex",
|
|
2279
|
+
isHorizontal ? "flex-row gap-6" : "flex-col gap-2",
|
|
2280
|
+
className
|
|
2281
|
+
),
|
|
2282
|
+
children: options.map((option) => /* @__PURE__ */ jsx30("div", { className: "relative inline-flex", children: /* @__PURE__ */ jsxs18(
|
|
2283
|
+
RadioGroupPrimitive.Item,
|
|
2284
|
+
{
|
|
2285
|
+
value: option.value,
|
|
2286
|
+
disabled: disabled || option.disabled,
|
|
2287
|
+
className: cn(
|
|
2288
|
+
"group inline-flex items-center gap-2 outline-none",
|
|
2289
|
+
"data-disabled:pointer-events-none",
|
|
2290
|
+
disabled || option.disabled ? "cursor-default" : "cursor-pointer"
|
|
2291
|
+
),
|
|
2292
|
+
children: [
|
|
2293
|
+
/* @__PURE__ */ jsx30(
|
|
2294
|
+
"span",
|
|
2295
|
+
{
|
|
2296
|
+
className: cn(
|
|
2297
|
+
"flex items-center justify-center shrink-0 h-5 w-5 rounded-full border bg-(--background-primary) transition-all",
|
|
2298
|
+
// 1: enabled, unchecked, unfocused, unhovered
|
|
2299
|
+
"group-data-[state=unchecked]:border-(--border-secondary)",
|
|
2300
|
+
// 2: enabled, checked, unfocused, unhovered
|
|
2301
|
+
"group-data-[state=checked]:border-(--border-brand)",
|
|
2302
|
+
// 3: enabled, unchecked, hovered, unfocused
|
|
2303
|
+
"group-data-[state=unchecked]:group-hover:border-(--border-secondary-hover)",
|
|
2304
|
+
// 4: enabled, checked, hovered, unfocused
|
|
2305
|
+
"group-data-[state=checked]:group-hover:border-(--border-brand-hover)",
|
|
2306
|
+
"group-data-[state=checked]:group-hover:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-secondary)]",
|
|
2307
|
+
// 5: enabled, unchecked, focused (override 1/3)
|
|
2308
|
+
"group-data-[state=unchecked]:group-focus-visible:border-(--border-secondary-hover)",
|
|
2309
|
+
// 6: enabled, checked, focused (override 2/4)
|
|
2310
|
+
"group-data-[state=checked]:group-focus-visible:border-(--border-brand-focus)",
|
|
2311
|
+
"group-data-[state=checked]:group-focus-visible:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-primary)]",
|
|
2312
|
+
// 7: disabled, unchecked (override everything above)
|
|
2313
|
+
"group-[&[data-disabled][data-state=unchecked]]:border-none",
|
|
2314
|
+
"group-[&[data-disabled][data-state=unchecked]]:bg-(--background-primary-disabled)",
|
|
2315
|
+
// 8: disabled, checked (override everything above)
|
|
2316
|
+
"group-[&[data-disabled][data-state=checked]]:border-(--border-primary-disabled)",
|
|
2317
|
+
"group-[&[data-disabled][data-state=checked]]:bg-(--background-primary-disabled)"
|
|
2318
|
+
),
|
|
2319
|
+
children: /* @__PURE__ */ jsx30(
|
|
2320
|
+
"span",
|
|
2321
|
+
{
|
|
2322
|
+
className: cn(
|
|
2323
|
+
"h-4 w-4 rounded-full bg-(--background-brand) scale-0 transition-transform",
|
|
2324
|
+
"group-data-[state=checked]:scale-100",
|
|
2325
|
+
"group-data-[state=checked]:group-hover:bg-(--background-brand-hover)",
|
|
2326
|
+
"group-data-[state=checked]:group-focus-visible:bg-(--background-brand-hover)",
|
|
2327
|
+
"group-[&[data-disabled][data-state=checked]]:bg-(--background-brand-disabled)",
|
|
2328
|
+
"group-[&[data-disabled][data-state=unchecked]]:scale-0"
|
|
2329
|
+
)
|
|
2330
|
+
}
|
|
2331
|
+
)
|
|
2332
|
+
}
|
|
2333
|
+
),
|
|
2334
|
+
/* @__PURE__ */ jsx30(
|
|
2335
|
+
"span",
|
|
2336
|
+
{
|
|
2337
|
+
className: cn(
|
|
2338
|
+
"paragraph-sm text-primary",
|
|
2339
|
+
"group-data-disabled:text-primary-disabled whitespace-nowrap"
|
|
2340
|
+
),
|
|
2341
|
+
children: option.label
|
|
2342
|
+
}
|
|
2343
|
+
)
|
|
2344
|
+
]
|
|
2345
|
+
}
|
|
2346
|
+
) }, option.value))
|
|
2347
|
+
}
|
|
2348
|
+
)
|
|
2349
|
+
}
|
|
2350
|
+
);
|
|
2252
2351
|
};
|
|
2253
2352
|
|
|
2254
2353
|
// src/components/Inputs/SearchInput.tsx
|
|
2255
2354
|
import * as React29 from "react";
|
|
2256
2355
|
import { cva as cva17 } from "class-variance-authority";
|
|
2257
2356
|
import { SearchIcon as SearchIcon2 } from "@bubo-squared/icons";
|
|
2258
|
-
import { jsx as jsx31, jsxs as
|
|
2357
|
+
import { jsx as jsx31, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2259
2358
|
var searchTextVariants = cva17("truncate", {
|
|
2260
2359
|
variants: {
|
|
2261
2360
|
size: {
|
|
@@ -2302,7 +2401,7 @@ var SearchInput = (props) => {
|
|
|
2302
2401
|
inputRef.current?.focus();
|
|
2303
2402
|
};
|
|
2304
2403
|
const showTrailingIcon = !!trailingIcon;
|
|
2305
|
-
return /* @__PURE__ */ jsx31("div", { className: "flex flex-col gap-2 items-start", children: /* @__PURE__ */ jsx31("div", { className: "relative w-full", children: /* @__PURE__ */
|
|
2404
|
+
return /* @__PURE__ */ jsx31("div", { className: "flex flex-col gap-2 items-start w-full", children: /* @__PURE__ */ jsx31("div", { className: "relative w-full", children: /* @__PURE__ */ jsxs19(
|
|
2306
2405
|
InputShell,
|
|
2307
2406
|
{
|
|
2308
2407
|
size,
|
|
@@ -2335,8 +2434,8 @@ SearchInput.displayName = "SearchInput";
|
|
|
2335
2434
|
|
|
2336
2435
|
// src/components/Inputs/Slider.tsx
|
|
2337
2436
|
import * as React30 from "react";
|
|
2338
|
-
import { jsx as jsx32, jsxs as
|
|
2339
|
-
var
|
|
2437
|
+
import { Fragment as Fragment2, jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2438
|
+
var wrapperBase = "flex flex-col gap-2 items-start";
|
|
2340
2439
|
var isRangeProps = (props) => {
|
|
2341
2440
|
return Array.isArray(props.value) || Array.isArray(props.defaultValue);
|
|
2342
2441
|
};
|
|
@@ -2346,6 +2445,7 @@ var toArray = (value) => {
|
|
|
2346
2445
|
};
|
|
2347
2446
|
var Slider = (props) => {
|
|
2348
2447
|
const {
|
|
2448
|
+
name,
|
|
2349
2449
|
display = "flat",
|
|
2350
2450
|
tooltipPlacement = "top",
|
|
2351
2451
|
tooltipFormatter,
|
|
@@ -2393,29 +2493,12 @@ var Slider = (props) => {
|
|
|
2393
2493
|
const trackRef = React30.useRef(null);
|
|
2394
2494
|
const [draggingThumbIndex, setDraggingThumbIndex] = React30.useState(null);
|
|
2395
2495
|
const [hoveredThumbIndex, setHoveredThumbIndex] = React30.useState(null);
|
|
2396
|
-
const clamp = (val) => {
|
|
2496
|
+
const clamp = React30.useCallback((val) => {
|
|
2397
2497
|
if (val < min) return min;
|
|
2398
2498
|
if (val > max) return max;
|
|
2399
2499
|
return val;
|
|
2400
|
-
};
|
|
2401
|
-
React30.
|
|
2402
|
-
if (!isControlled) {
|
|
2403
|
-
setInternalValue((prev) => {
|
|
2404
|
-
const clamped = prev.map((v) => clamp(v));
|
|
2405
|
-
if (isRange && clamped.length === 2 && step > 0) {
|
|
2406
|
-
return enforceMinGap(clamped, prev);
|
|
2407
|
-
}
|
|
2408
|
-
return clamped;
|
|
2409
|
-
});
|
|
2410
|
-
}
|
|
2411
|
-
}, [isControlled, min, max, isRange]);
|
|
2412
|
-
const snap = (val) => {
|
|
2413
|
-
const range = max - min;
|
|
2414
|
-
if (range <= 0 || step <= 0) return clamp(val);
|
|
2415
|
-
const stepsFromMin = Math.round((val - min) / step);
|
|
2416
|
-
return clamp(min + stepsFromMin * step);
|
|
2417
|
-
};
|
|
2418
|
-
const enforceMinGap = (next, prev) => {
|
|
2500
|
+
}, [min, max]);
|
|
2501
|
+
const enforceMinGap = React30.useCallback((next, prev) => {
|
|
2419
2502
|
if (!isRange || next.length !== 2 || step <= 0) return next;
|
|
2420
2503
|
let [low, high] = next;
|
|
2421
2504
|
const [prevLow, prevHigh] = prev.length === 2 ? prev : next;
|
|
@@ -2438,6 +2521,23 @@ var Slider = (props) => {
|
|
|
2438
2521
|
}
|
|
2439
2522
|
}
|
|
2440
2523
|
return [low, high];
|
|
2524
|
+
}, [isRange, step, clamp]);
|
|
2525
|
+
React30.useEffect(() => {
|
|
2526
|
+
if (!isControlled) {
|
|
2527
|
+
setInternalValue((prev) => {
|
|
2528
|
+
const clamped = prev.map((v) => clamp(v));
|
|
2529
|
+
if (isRange && clamped.length === 2 && step > 0) {
|
|
2530
|
+
return enforceMinGap(clamped, prev);
|
|
2531
|
+
}
|
|
2532
|
+
return clamped;
|
|
2533
|
+
});
|
|
2534
|
+
}
|
|
2535
|
+
}, [isControlled, clamp, enforceMinGap, isRange, step]);
|
|
2536
|
+
const snap = (val) => {
|
|
2537
|
+
const range = max - min;
|
|
2538
|
+
if (range <= 0 || step <= 0) return clamp(val);
|
|
2539
|
+
const stepsFromMin = Math.round((val - min) / step);
|
|
2540
|
+
return clamp(min + stepsFromMin * step);
|
|
2441
2541
|
};
|
|
2442
2542
|
const updateValue = (next) => {
|
|
2443
2543
|
let normalized = normalizeArray(next, current);
|
|
@@ -2606,7 +2706,7 @@ var Slider = (props) => {
|
|
|
2606
2706
|
marginBottom: isTooltipAbove ? 8 : void 0,
|
|
2607
2707
|
marginTop: isTooltipAbove ? void 0 : 8
|
|
2608
2708
|
},
|
|
2609
|
-
children: /* @__PURE__ */
|
|
2709
|
+
children: /* @__PURE__ */ jsxs20(
|
|
2610
2710
|
"div",
|
|
2611
2711
|
{
|
|
2612
2712
|
className: cn("relative rounded-4 shadow-card-md px-(--space-8) py-(--space-4) bg-(--background-tooltip)"),
|
|
@@ -2660,7 +2760,7 @@ var Slider = (props) => {
|
|
|
2660
2760
|
style: {
|
|
2661
2761
|
left: `${percent}%`,
|
|
2662
2762
|
top: `calc(50% - ${trackHeight / 2}px)`,
|
|
2663
|
-
|
|
2763
|
+
"--slider-halo-color": "color-mix(in srgb, var(--color-brand) 10%, transparent)"
|
|
2664
2764
|
},
|
|
2665
2765
|
onPointerEnter: () => {
|
|
2666
2766
|
setHoveredThumbIndex(index);
|
|
@@ -2679,66 +2779,88 @@ var Slider = (props) => {
|
|
|
2679
2779
|
index
|
|
2680
2780
|
);
|
|
2681
2781
|
};
|
|
2682
|
-
return /* @__PURE__ */
|
|
2782
|
+
return /* @__PURE__ */ jsxs20(
|
|
2683
2783
|
"div",
|
|
2684
2784
|
{
|
|
2685
|
-
className:
|
|
2785
|
+
className: wrapperBase,
|
|
2686
2786
|
style: { marginInline: `${thumbRadius}px` },
|
|
2687
|
-
children:
|
|
2688
|
-
/* @__PURE__ */
|
|
2689
|
-
|
|
2690
|
-
"
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
secondaryPercent,
|
|
2698
|
-
formatDisplayValue(secondary),
|
|
2699
|
-
hoveredThumbIndex === 1 || draggingThumbIndex === 1
|
|
2787
|
+
children: [
|
|
2788
|
+
name && /* @__PURE__ */ jsxs20(Fragment2, { children: [
|
|
2789
|
+
/* @__PURE__ */ jsx32(
|
|
2790
|
+
"input",
|
|
2791
|
+
{
|
|
2792
|
+
type: "hidden",
|
|
2793
|
+
name,
|
|
2794
|
+
value: primary === void 0 ? "" : String(primary),
|
|
2795
|
+
disabled
|
|
2796
|
+
}
|
|
2700
2797
|
),
|
|
2701
|
-
/* @__PURE__ */
|
|
2702
|
-
"
|
|
2798
|
+
isRange && secondary !== void 0 && /* @__PURE__ */ jsx32(
|
|
2799
|
+
"input",
|
|
2703
2800
|
{
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
style: { height: `${trackHeight}px` },
|
|
2709
|
-
ref: trackRef,
|
|
2710
|
-
onPointerDown: handleTrackPointerDown,
|
|
2711
|
-
children: [
|
|
2712
|
-
/* @__PURE__ */ jsx32(
|
|
2713
|
-
"div",
|
|
2714
|
-
{
|
|
2715
|
-
className: cn(
|
|
2716
|
-
"absolute h-full rounded-4",
|
|
2717
|
-
disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-secondary)"
|
|
2718
|
-
),
|
|
2719
|
-
style: {
|
|
2720
|
-
width: `calc(100% + ${thumbWidth}px)`,
|
|
2721
|
-
left: `-${thumbRadius}px`
|
|
2722
|
-
}
|
|
2723
|
-
}
|
|
2724
|
-
),
|
|
2725
|
-
renderHandle(0, primaryPercent, formatDisplayValue(primary)),
|
|
2726
|
-
isRange && secondary !== void 0 && renderHandle(1, secondaryPercent, formatDisplayValue(secondary))
|
|
2727
|
-
]
|
|
2801
|
+
type: "hidden",
|
|
2802
|
+
name,
|
|
2803
|
+
value: String(secondary),
|
|
2804
|
+
disabled
|
|
2728
2805
|
}
|
|
2729
2806
|
)
|
|
2730
2807
|
] }),
|
|
2731
|
-
|
|
2732
|
-
"
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2808
|
+
/* @__PURE__ */ jsxs20("div", { className: cn("w-full flex flex-col gap-1", className), children: [
|
|
2809
|
+
/* @__PURE__ */ jsxs20("div", { className: "relative w-full", children: [
|
|
2810
|
+
showTooltip && primary !== void 0 && renderTooltipBubble(
|
|
2811
|
+
"primary",
|
|
2812
|
+
primaryPercent,
|
|
2813
|
+
formatDisplayValue(primary),
|
|
2814
|
+
hoveredThumbIndex === 0 || draggingThumbIndex === 0
|
|
2737
2815
|
),
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2816
|
+
showTooltip && isRange && secondary !== void 0 && renderTooltipBubble(
|
|
2817
|
+
"secondary",
|
|
2818
|
+
secondaryPercent,
|
|
2819
|
+
formatDisplayValue(secondary),
|
|
2820
|
+
hoveredThumbIndex === 1 || draggingThumbIndex === 1
|
|
2821
|
+
),
|
|
2822
|
+
/* @__PURE__ */ jsxs20(
|
|
2823
|
+
"div",
|
|
2824
|
+
{
|
|
2825
|
+
className: cn(
|
|
2826
|
+
"relative w-full flex items-center rounded-4",
|
|
2827
|
+
disabled ? "bg-(--background-primary-disabled) cursor-default" : "bg-(--background-secondary) cursor-pointer"
|
|
2828
|
+
),
|
|
2829
|
+
style: { height: `${trackHeight}px` },
|
|
2830
|
+
ref: trackRef,
|
|
2831
|
+
onPointerDown: handleTrackPointerDown,
|
|
2832
|
+
children: [
|
|
2833
|
+
/* @__PURE__ */ jsx32(
|
|
2834
|
+
"div",
|
|
2835
|
+
{
|
|
2836
|
+
className: cn(
|
|
2837
|
+
"absolute h-full rounded-4",
|
|
2838
|
+
disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-secondary)"
|
|
2839
|
+
),
|
|
2840
|
+
style: {
|
|
2841
|
+
width: `calc(100% + ${thumbWidth}px)`,
|
|
2842
|
+
left: `-${thumbRadius}px`
|
|
2843
|
+
}
|
|
2844
|
+
}
|
|
2845
|
+
),
|
|
2846
|
+
renderHandle(0, primaryPercent, formatDisplayValue(primary)),
|
|
2847
|
+
isRange && secondary !== void 0 && renderHandle(1, secondaryPercent, formatDisplayValue(secondary))
|
|
2848
|
+
]
|
|
2849
|
+
}
|
|
2850
|
+
)
|
|
2851
|
+
] }),
|
|
2852
|
+
showNumeric && /* @__PURE__ */ jsx32(
|
|
2853
|
+
"p",
|
|
2854
|
+
{
|
|
2855
|
+
className: cn(
|
|
2856
|
+
"paragraph-sm text-primary",
|
|
2857
|
+
disabled && "text-primary-disabled"
|
|
2858
|
+
),
|
|
2859
|
+
children: formatNumericLabel()
|
|
2860
|
+
}
|
|
2861
|
+
)
|
|
2862
|
+
] })
|
|
2863
|
+
]
|
|
2742
2864
|
}
|
|
2743
2865
|
);
|
|
2744
2866
|
};
|
|
@@ -2747,8 +2869,7 @@ Slider.displayName = "Slider";
|
|
|
2747
2869
|
// src/components/Inputs/TextArea.tsx
|
|
2748
2870
|
import * as React31 from "react";
|
|
2749
2871
|
import { MaximizeIcon } from "@bubo-squared/icons";
|
|
2750
|
-
import { jsx as jsx33, jsxs as
|
|
2751
|
-
var wrapperBase3 = "flex flex-col gap-2 items-start w-full";
|
|
2872
|
+
import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2752
2873
|
var TextArea = (props) => {
|
|
2753
2874
|
const {
|
|
2754
2875
|
label,
|
|
@@ -2763,6 +2884,8 @@ var TextArea = (props) => {
|
|
|
2763
2884
|
defaultValue,
|
|
2764
2885
|
onChange,
|
|
2765
2886
|
rows = 3,
|
|
2887
|
+
id,
|
|
2888
|
+
name,
|
|
2766
2889
|
...textareaProps
|
|
2767
2890
|
} = props;
|
|
2768
2891
|
const isControlled = value !== void 0;
|
|
@@ -2790,9 +2913,8 @@ var TextArea = (props) => {
|
|
|
2790
2913
|
}
|
|
2791
2914
|
onChange?.(event);
|
|
2792
2915
|
};
|
|
2793
|
-
const
|
|
2794
|
-
const
|
|
2795
|
-
const hintId = `${inputId}-hint`;
|
|
2916
|
+
const generatedId = React31.useId();
|
|
2917
|
+
const textareaId = id ?? generatedId;
|
|
2796
2918
|
const statusBorderClass = {
|
|
2797
2919
|
default: "",
|
|
2798
2920
|
success: "border-(--border-success)",
|
|
@@ -2803,7 +2925,6 @@ var TextArea = (props) => {
|
|
|
2803
2925
|
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)]",
|
|
2804
2926
|
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)]"
|
|
2805
2927
|
};
|
|
2806
|
-
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
2807
2928
|
const counterColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-primary";
|
|
2808
2929
|
const handleResizePointerDown = (event) => {
|
|
2809
2930
|
if (disabled) return;
|
|
@@ -2829,109 +2950,97 @@ var TextArea = (props) => {
|
|
|
2829
2950
|
window.addEventListener("pointermove", handlePointerMove);
|
|
2830
2951
|
window.addEventListener("pointerup", handlePointerUp);
|
|
2831
2952
|
};
|
|
2832
|
-
return /* @__PURE__ */
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
disabled && "bg-(--background-primary-disabled) border-(--border-secondary-disabled) cursor-default",
|
|
2852
|
-
statusBorderClass[status],
|
|
2853
|
-
!disabled && statusFocusClass[status],
|
|
2854
|
-
className
|
|
2855
|
-
),
|
|
2856
|
-
ref: containerRef,
|
|
2857
|
-
style: {
|
|
2858
|
-
...type === "responsive" && height !== void 0 ? { height } : {},
|
|
2859
|
-
...type === "responsive" && width !== void 0 ? { width } : {}
|
|
2860
|
-
},
|
|
2861
|
-
onClick: handleContainerClick,
|
|
2862
|
-
"aria-disabled": disabled || void 0,
|
|
2863
|
-
children: [
|
|
2864
|
-
/* @__PURE__ */ jsx33(
|
|
2865
|
-
"textarea",
|
|
2866
|
-
{
|
|
2867
|
-
id: inputId,
|
|
2868
|
-
ref: textareaRef,
|
|
2869
|
-
"aria-labelledby": label ? labelId : void 0,
|
|
2870
|
-
"aria-describedby": hint ? hintId : void 0,
|
|
2871
|
-
disabled: disabled ?? void 0,
|
|
2872
|
-
value: isControlled ? value : currentValue,
|
|
2873
|
-
defaultValue: isControlled ? void 0 : defaultValue,
|
|
2874
|
-
onChange: handleChange,
|
|
2875
|
-
rows,
|
|
2876
|
-
maxLength: effectiveMaxLength,
|
|
2877
|
-
className: cn(
|
|
2878
|
-
"paragraph-md bg-transparent outline-none w-full h-full resize-none px-2 py-2 pr-8",
|
|
2879
|
-
disabled ? "text-primary-disabled" : hasValue ? "text-primary" : "text-(--color-secondary)",
|
|
2880
|
-
showCharacterLimit && "pr-16"
|
|
2881
|
-
),
|
|
2882
|
-
...textareaProps
|
|
2883
|
-
}
|
|
2884
|
-
),
|
|
2885
|
-
showCharacterLimit && /* @__PURE__ */ jsxs22(
|
|
2886
|
-
"span",
|
|
2887
|
-
{
|
|
2888
|
-
className: cn(
|
|
2889
|
-
"absolute bottom-1 right-1 footnote mb-0!",
|
|
2890
|
-
counterColorClass
|
|
2891
|
-
),
|
|
2892
|
-
children: [
|
|
2893
|
-
currentLength,
|
|
2894
|
-
"/",
|
|
2895
|
-
effectiveMaxLength
|
|
2896
|
-
]
|
|
2897
|
-
}
|
|
2953
|
+
return /* @__PURE__ */ jsx33(
|
|
2954
|
+
Field,
|
|
2955
|
+
{
|
|
2956
|
+
className: "w-full",
|
|
2957
|
+
label,
|
|
2958
|
+
hint,
|
|
2959
|
+
hideHint,
|
|
2960
|
+
status,
|
|
2961
|
+
disabled,
|
|
2962
|
+
children: /* @__PURE__ */ jsxs21(
|
|
2963
|
+
"div",
|
|
2964
|
+
{
|
|
2965
|
+
className: cn(
|
|
2966
|
+
"relative flex w-full rounded-4 border bg-(--background-primary) cursor-text transition-colors",
|
|
2967
|
+
"border-(--border-secondary) hover:border-(--border-secondary-hover) hover:bg-(--background-primary-hover)",
|
|
2968
|
+
disabled && "bg-(--background-primary-disabled) border-(--border-secondary-disabled) cursor-default",
|
|
2969
|
+
statusBorderClass[status],
|
|
2970
|
+
!disabled && statusFocusClass[status],
|
|
2971
|
+
className
|
|
2898
2972
|
),
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
{
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2973
|
+
ref: containerRef,
|
|
2974
|
+
style: {
|
|
2975
|
+
...type === "responsive" && height !== void 0 ? { height } : {},
|
|
2976
|
+
...type === "responsive" && width !== void 0 ? { width } : {}
|
|
2977
|
+
},
|
|
2978
|
+
onClick: handleContainerClick,
|
|
2979
|
+
"aria-disabled": disabled || void 0,
|
|
2980
|
+
children: [
|
|
2981
|
+
/* @__PURE__ */ jsx33(
|
|
2982
|
+
"textarea",
|
|
2983
|
+
{
|
|
2984
|
+
id: textareaId,
|
|
2985
|
+
name,
|
|
2986
|
+
ref: textareaRef,
|
|
2987
|
+
disabled: disabled ?? void 0,
|
|
2988
|
+
value: isControlled ? value : currentValue,
|
|
2989
|
+
defaultValue: isControlled ? void 0 : defaultValue,
|
|
2990
|
+
onChange: handleChange,
|
|
2991
|
+
rows,
|
|
2992
|
+
maxLength: effectiveMaxLength,
|
|
2993
|
+
className: cn(
|
|
2994
|
+
"paragraph-md bg-transparent outline-none w-full h-full resize-none px-2 py-2 pr-8",
|
|
2995
|
+
disabled ? "text-primary-disabled" : hasValue ? "text-primary" : "text-(--color-secondary)",
|
|
2996
|
+
showCharacterLimit && "pr-16"
|
|
2997
|
+
),
|
|
2998
|
+
...textareaProps
|
|
2999
|
+
}
|
|
3000
|
+
),
|
|
3001
|
+
showCharacterLimit && /* @__PURE__ */ jsxs21(
|
|
3002
|
+
"span",
|
|
3003
|
+
{
|
|
3004
|
+
className: cn(
|
|
3005
|
+
"absolute bottom-1 right-1 footnote mb-0!",
|
|
3006
|
+
counterColorClass
|
|
3007
|
+
),
|
|
3008
|
+
children: [
|
|
3009
|
+
currentLength,
|
|
3010
|
+
"/",
|
|
3011
|
+
effectiveMaxLength
|
|
3012
|
+
]
|
|
3013
|
+
}
|
|
3014
|
+
),
|
|
3015
|
+
type === "responsive" && /* @__PURE__ */ jsx33(
|
|
3016
|
+
"div",
|
|
3017
|
+
{
|
|
3018
|
+
className: "absolute bottom-1 right-1 h-3 w-3 " + (disabled ? "cursor-auto" : "cursor-nwse-resize"),
|
|
3019
|
+
onPointerDown: disabled ? void 0 : handleResizePointerDown,
|
|
3020
|
+
children: /* @__PURE__ */ jsx33(
|
|
3021
|
+
"span",
|
|
3022
|
+
{
|
|
3023
|
+
className: cn(
|
|
3024
|
+
"absolute bottom-0 right-0 flex h-4 w-4 items-center justify-center text-(--icon-primary)",
|
|
3025
|
+
disabled && "text-(--icon-primary-disabled)"
|
|
3026
|
+
),
|
|
3027
|
+
children: /* @__PURE__ */ jsx33(MaximizeIcon, {})
|
|
3028
|
+
}
|
|
3029
|
+
)
|
|
3030
|
+
}
|
|
3031
|
+
)
|
|
3032
|
+
]
|
|
3033
|
+
}
|
|
3034
|
+
)
|
|
3035
|
+
}
|
|
3036
|
+
);
|
|
2928
3037
|
};
|
|
2929
3038
|
TextArea.displayName = "TextArea";
|
|
2930
3039
|
|
|
2931
3040
|
// src/components/Inputs/TextInput.tsx
|
|
2932
3041
|
import * as React32 from "react";
|
|
2933
3042
|
import { cva as cva18 } from "class-variance-authority";
|
|
2934
|
-
import { jsx as jsx34, jsxs as
|
|
3043
|
+
import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2935
3044
|
var inputTextVariants2 = cva18("truncate", {
|
|
2936
3045
|
variants: {
|
|
2937
3046
|
size: {
|
|
@@ -3007,7 +3116,7 @@ var TextInput = (props) => {
|
|
|
3007
3116
|
hideHint,
|
|
3008
3117
|
status,
|
|
3009
3118
|
disabled,
|
|
3010
|
-
children: /* @__PURE__ */
|
|
3119
|
+
children: /* @__PURE__ */ jsxs22(
|
|
3011
3120
|
InputShell,
|
|
3012
3121
|
{
|
|
3013
3122
|
size,
|
|
@@ -3062,10 +3171,10 @@ TextInput.displayName = "TextInput";
|
|
|
3062
3171
|
|
|
3063
3172
|
// src/components/Inputs/Toggle.tsx
|
|
3064
3173
|
import "react";
|
|
3065
|
-
import { jsx as jsx35, jsxs as
|
|
3174
|
+
import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3066
3175
|
var Toggle = (props) => {
|
|
3067
3176
|
const { label, className, disabled, ...inputProps } = props;
|
|
3068
|
-
return /* @__PURE__ */
|
|
3177
|
+
return /* @__PURE__ */ jsxs23(
|
|
3069
3178
|
"label",
|
|
3070
3179
|
{
|
|
3071
3180
|
className: cn(
|
|
@@ -3073,7 +3182,7 @@ var Toggle = (props) => {
|
|
|
3073
3182
|
disabled ? "cursor-default" : "cursor-pointer"
|
|
3074
3183
|
),
|
|
3075
3184
|
children: [
|
|
3076
|
-
/* @__PURE__ */
|
|
3185
|
+
/* @__PURE__ */ jsxs23("span", { className: "relative inline-flex items-center", children: [
|
|
3077
3186
|
/* @__PURE__ */ jsx35(
|
|
3078
3187
|
"input",
|
|
3079
3188
|
{
|
|
@@ -3153,7 +3262,7 @@ Toggle.displayName = "Toggle";
|
|
|
3153
3262
|
|
|
3154
3263
|
// src/components/Inputs/WebsiteInput.tsx
|
|
3155
3264
|
import "react";
|
|
3156
|
-
import { jsx as jsx36, jsxs as
|
|
3265
|
+
import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3157
3266
|
var WebsiteInput = (props) => {
|
|
3158
3267
|
const {
|
|
3159
3268
|
hierarchy = "leading",
|
|
@@ -3190,11 +3299,11 @@ var WebsiteInput = (props) => {
|
|
|
3190
3299
|
size === "xl" ? "[&>svg]:w-6 [&>svg]:h-6" : size === "sm" ? "[&>svg]:w-4 [&>svg]:h-4" : "[&>svg]:w-5 [&>svg]:h-5",
|
|
3191
3300
|
disabled ? "text-(--icon-primary-disabled)" : "text-(--icon-primary) group-hover:text-(--icon-primary-hover) group-focus-within:text-(--icon-primary-focus)"
|
|
3192
3301
|
);
|
|
3193
|
-
const leadingAddon = /* @__PURE__ */
|
|
3302
|
+
const leadingAddon = /* @__PURE__ */ jsxs24("div", { className: baseAddonClass, children: [
|
|
3194
3303
|
/* @__PURE__ */ jsx36("div", { className: addonTextClass, children: protocolLabel }),
|
|
3195
3304
|
icon != null && /* @__PURE__ */ jsx36("span", { className: iconWrapperClass, children: icon })
|
|
3196
3305
|
] });
|
|
3197
|
-
const trailingAddon = /* @__PURE__ */
|
|
3306
|
+
const trailingAddon = /* @__PURE__ */ jsxs24("div", { className: baseAddonClass, children: [
|
|
3198
3307
|
icon != null && /* @__PURE__ */ jsx36("span", { className: iconWrapperClass, children: icon }),
|
|
3199
3308
|
/* @__PURE__ */ jsx36("div", { className: addonTextClass, children: protocolLabel })
|
|
3200
3309
|
] });
|
|
@@ -3215,7 +3324,7 @@ WebsiteInput.displayName = "WebsiteInput";
|
|
|
3215
3324
|
// src/components/Feedback/Popover.tsx
|
|
3216
3325
|
import * as React35 from "react";
|
|
3217
3326
|
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
|
3218
|
-
import { jsx as jsx37, jsxs as
|
|
3327
|
+
import { jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3219
3328
|
var PopoverArrow = PopoverPrimitive2.Arrow;
|
|
3220
3329
|
var Popover2 = (props) => {
|
|
3221
3330
|
const {
|
|
@@ -3241,9 +3350,9 @@ var Popover2 = (props) => {
|
|
|
3241
3350
|
onOk?.();
|
|
3242
3351
|
setOpen(false);
|
|
3243
3352
|
};
|
|
3244
|
-
const popoverClasses = "group bg-(--background-popover) popover w-80 max-w-[calc(100vw-2rem)] shadow-card-md border-none [
|
|
3245
|
-
const popoverArrowClasses = "relative fill-(--background-popover) transition-[filter,transform] group-data-[side=top]:top-[-2px] group-data-[side=top]:drop-shadow-[
|
|
3246
|
-
const
|
|
3353
|
+
const popoverClasses = "group bg-(--background-popover) popover w-80 max-w-[calc(100vw-2rem)] shadow-card-md border-none [&>span]:scale-240 rounded-4";
|
|
3354
|
+
const popoverArrowClasses = "relative fill-(--background-popover) transition-[filter,transform] group-data-[side=top]:top-[-2px] group-data-[side=top]:drop-shadow-[0px_2px_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)]";
|
|
3355
|
+
const mapPlacementToSideAndAlign2 = (placement2) => {
|
|
3247
3356
|
switch (placement2) {
|
|
3248
3357
|
case "top":
|
|
3249
3358
|
return { side: "top", align: "center" };
|
|
@@ -3273,10 +3382,10 @@ var Popover2 = (props) => {
|
|
|
3273
3382
|
return { side: "bottom", align: "center" };
|
|
3274
3383
|
}
|
|
3275
3384
|
};
|
|
3276
|
-
const { side, align } =
|
|
3277
|
-
return /* @__PURE__ */
|
|
3385
|
+
const { side, align } = mapPlacementToSideAndAlign2(placement);
|
|
3386
|
+
return /* @__PURE__ */ jsxs25(Popover, { open, onOpenChange: setOpen, children: [
|
|
3278
3387
|
/* @__PURE__ */ jsx37(PopoverTrigger, { asChild: true, children }),
|
|
3279
|
-
/* @__PURE__ */
|
|
3388
|
+
/* @__PURE__ */ jsxs25(
|
|
3280
3389
|
PopoverContent,
|
|
3281
3390
|
{
|
|
3282
3391
|
side,
|
|
@@ -3285,13 +3394,13 @@ var Popover2 = (props) => {
|
|
|
3285
3394
|
className: cn(popoverClasses, className),
|
|
3286
3395
|
children: [
|
|
3287
3396
|
showArrow && /* @__PURE__ */ jsx37(PopoverArrow, { className: popoverArrowClasses }),
|
|
3288
|
-
/* @__PURE__ */
|
|
3289
|
-
/* @__PURE__ */
|
|
3397
|
+
/* @__PURE__ */ jsxs25("div", { className: "grid gap-4", children: [
|
|
3398
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
|
|
3290
3399
|
/* @__PURE__ */ jsx37("span", { className: "caption text-secondary", children: strapline }),
|
|
3291
3400
|
/* @__PURE__ */ jsx37("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
3292
3401
|
/* @__PURE__ */ jsx37("p", { className: "paragraph-sm text-primary", children: description })
|
|
3293
3402
|
] }),
|
|
3294
|
-
/* @__PURE__ */
|
|
3403
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex justify-start items-center gap-4 flex-wrap", children: [
|
|
3295
3404
|
/* @__PURE__ */ jsx37(Button, { size: "sm", variant: "secondary", onClick: handleCancel, children: cancelText || "Cancel" }),
|
|
3296
3405
|
/* @__PURE__ */ jsx37(Button, { size: "sm", variant: "primary", onClick: handleOk, children: okText || "Ok" })
|
|
3297
3406
|
] })
|
|
@@ -3303,82 +3412,344 @@ var Popover2 = (props) => {
|
|
|
3303
3412
|
};
|
|
3304
3413
|
Popover2.displayName = "Popover";
|
|
3305
3414
|
|
|
3306
|
-
// src/components/
|
|
3307
|
-
import
|
|
3308
|
-
import
|
|
3309
|
-
import {
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
}
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
}
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3415
|
+
// src/components/Feedback/Tooltip.tsx
|
|
3416
|
+
import "react";
|
|
3417
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3418
|
+
import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3419
|
+
var TooltipArrow = TooltipPrimitive.Arrow;
|
|
3420
|
+
var mapPlacementToSideAndAlign = (placement) => {
|
|
3421
|
+
switch (placement) {
|
|
3422
|
+
case "top":
|
|
3423
|
+
return { side: "top", align: "center" };
|
|
3424
|
+
case "topLeft":
|
|
3425
|
+
return { side: "top", align: "start" };
|
|
3426
|
+
case "topRight":
|
|
3427
|
+
return { side: "top", align: "end" };
|
|
3428
|
+
case "bottom":
|
|
3429
|
+
return { side: "bottom", align: "center" };
|
|
3430
|
+
case "bottomLeft":
|
|
3431
|
+
return { side: "bottom", align: "start" };
|
|
3432
|
+
case "bottomRight":
|
|
3433
|
+
return { side: "bottom", align: "end" };
|
|
3434
|
+
case "left":
|
|
3435
|
+
return { side: "left", align: "center" };
|
|
3436
|
+
case "leftTop":
|
|
3437
|
+
return { side: "left", align: "start" };
|
|
3438
|
+
case "leftBottom":
|
|
3439
|
+
return { side: "left", align: "end" };
|
|
3440
|
+
case "right":
|
|
3441
|
+
return { side: "right", align: "center" };
|
|
3442
|
+
case "rightTop":
|
|
3443
|
+
return { side: "right", align: "start" };
|
|
3444
|
+
case "rightBottom":
|
|
3445
|
+
return { side: "right", align: "end" };
|
|
3446
|
+
default:
|
|
3447
|
+
return { side: "top", align: "center" };
|
|
3339
3448
|
}
|
|
3340
|
-
|
|
3341
|
-
var
|
|
3449
|
+
};
|
|
3450
|
+
var Tooltip = (props) => {
|
|
3342
3451
|
const {
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
showText = true,
|
|
3348
|
-
icon,
|
|
3452
|
+
strapline,
|
|
3453
|
+
title,
|
|
3454
|
+
description,
|
|
3455
|
+
showArrow = true,
|
|
3349
3456
|
className,
|
|
3457
|
+
placement = "top",
|
|
3458
|
+
offset = 10,
|
|
3459
|
+
disableHoverableContent,
|
|
3460
|
+
open,
|
|
3461
|
+
defaultOpen,
|
|
3462
|
+
onOpenChange,
|
|
3463
|
+
children
|
|
3464
|
+
} = props;
|
|
3465
|
+
const { side, align } = mapPlacementToSideAndAlign(placement);
|
|
3466
|
+
const tooltipClasses = "group bg-(--background-popover) max-w-[calc(100vw-2rem)] shadow-card-md border-none rounded-4 p-4 [&>span]:scale-200 data-[state=delayed-open]:animate-in data-[state=instant-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[state=instant-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=instant-open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
3467
|
+
const tooltipArrowClasses = "relative fill-(--background-popover) transition-[filter,transform] group-data-[side=top]:top-[-2px] group-data-[side=top]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=bottom]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=left]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=right]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)]";
|
|
3468
|
+
return /* @__PURE__ */ jsxs26(
|
|
3469
|
+
TooltipPrimitive.Root,
|
|
3470
|
+
{
|
|
3471
|
+
open,
|
|
3472
|
+
defaultOpen,
|
|
3473
|
+
onOpenChange,
|
|
3474
|
+
disableHoverableContent,
|
|
3475
|
+
children: [
|
|
3476
|
+
/* @__PURE__ */ jsx38(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
3477
|
+
/* @__PURE__ */ jsx38(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs26(
|
|
3478
|
+
TooltipPrimitive.Content,
|
|
3479
|
+
{
|
|
3480
|
+
side,
|
|
3481
|
+
align,
|
|
3482
|
+
sideOffset: offset,
|
|
3483
|
+
className: cn(tooltipClasses, className),
|
|
3484
|
+
children: [
|
|
3485
|
+
showArrow && /* @__PURE__ */ jsx38(TooltipArrow, { className: tooltipArrowClasses }),
|
|
3486
|
+
/* @__PURE__ */ jsxs26("div", { className: "grid gap-2", children: [
|
|
3487
|
+
(strapline ?? "") !== "" && /* @__PURE__ */ jsx38("span", { className: "caption text-secondary", children: strapline }),
|
|
3488
|
+
/* @__PURE__ */ jsx38("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
3489
|
+
(description ?? "") !== "" && /* @__PURE__ */ jsx38("p", { className: "paragraph-sm text-primary", children: description })
|
|
3490
|
+
] })
|
|
3491
|
+
]
|
|
3492
|
+
}
|
|
3493
|
+
) })
|
|
3494
|
+
]
|
|
3495
|
+
}
|
|
3496
|
+
);
|
|
3497
|
+
};
|
|
3498
|
+
Tooltip.displayName = "Tooltip";
|
|
3499
|
+
|
|
3500
|
+
// src/components/Feedback/TooltipProvider.tsx
|
|
3501
|
+
import "react";
|
|
3502
|
+
import * as TooltipPrimitive2 from "@radix-ui/react-tooltip";
|
|
3503
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3504
|
+
var TooltipProvider = (props) => {
|
|
3505
|
+
const {
|
|
3350
3506
|
children,
|
|
3351
|
-
|
|
3507
|
+
delayDuration = 200,
|
|
3508
|
+
skipDelayDuration = 300,
|
|
3509
|
+
disableHoverableContent = false
|
|
3352
3510
|
} = props;
|
|
3353
|
-
|
|
3354
|
-
|
|
3511
|
+
return /* @__PURE__ */ jsx39(
|
|
3512
|
+
TooltipPrimitive2.Provider,
|
|
3513
|
+
{
|
|
3514
|
+
delayDuration,
|
|
3515
|
+
skipDelayDuration,
|
|
3516
|
+
disableHoverableContent,
|
|
3517
|
+
children
|
|
3518
|
+
}
|
|
3519
|
+
);
|
|
3520
|
+
};
|
|
3521
|
+
TooltipProvider.displayName = "TooltipProvider";
|
|
3522
|
+
|
|
3523
|
+
// src/components/Navigation/Breadcrumbs.tsx
|
|
3524
|
+
import * as React40 from "react";
|
|
3525
|
+
|
|
3526
|
+
// src/components/ui/breadcrumb.tsx
|
|
3527
|
+
import "react";
|
|
3528
|
+
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
3529
|
+
import { jsx as jsx40, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3530
|
+
var breadcrumbItemClasses = "h6-title inline-flex items-center gap-1.5 text-(--color-secondary) hover:text-(--color-primary-hover) focus-within:text-(--color-secondary-focus) [&_[aria-current=page]]:font-medium [&_[aria-current=page]]:text-primary";
|
|
3531
|
+
var disabledItemClasses = "text-primary-disabled cursor-default pointer-events-none";
|
|
3532
|
+
function Breadcrumb({ ...props }) {
|
|
3533
|
+
return /* @__PURE__ */ jsx40("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
3534
|
+
}
|
|
3535
|
+
function BreadcrumbList({ className, ...props }) {
|
|
3536
|
+
return /* @__PURE__ */ jsx40(
|
|
3537
|
+
"ol",
|
|
3538
|
+
{
|
|
3539
|
+
"data-slot": "breadcrumb-list",
|
|
3540
|
+
className: cn(
|
|
3541
|
+
"flex flex-wrap items-center gap-1.5 wrap-break-word sm:gap-2.5",
|
|
3542
|
+
className
|
|
3543
|
+
),
|
|
3544
|
+
...props
|
|
3545
|
+
}
|
|
3546
|
+
);
|
|
3547
|
+
}
|
|
3548
|
+
function BreadcrumbItem({ className, disabled, ...props }) {
|
|
3549
|
+
return /* @__PURE__ */ jsx40(
|
|
3550
|
+
"li",
|
|
3551
|
+
{
|
|
3552
|
+
"data-slot": "breadcrumb-item",
|
|
3553
|
+
className: cn(breadcrumbItemClasses, disabled && disabledItemClasses, className),
|
|
3554
|
+
style: { marginBottom: "7px" },
|
|
3555
|
+
...props
|
|
3556
|
+
}
|
|
3557
|
+
);
|
|
3558
|
+
}
|
|
3559
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
3560
|
+
return /* @__PURE__ */ jsx40(
|
|
3561
|
+
"span",
|
|
3562
|
+
{
|
|
3563
|
+
"data-slot": "breadcrumb-page",
|
|
3564
|
+
role: "link",
|
|
3565
|
+
"aria-disabled": "true",
|
|
3566
|
+
"aria-current": "page",
|
|
3567
|
+
className: cn(className),
|
|
3568
|
+
...props
|
|
3569
|
+
}
|
|
3570
|
+
);
|
|
3571
|
+
}
|
|
3572
|
+
function BreadcrumbSeparator({
|
|
3573
|
+
children,
|
|
3574
|
+
className,
|
|
3575
|
+
...props
|
|
3576
|
+
}) {
|
|
3577
|
+
return /* @__PURE__ */ jsx40(
|
|
3578
|
+
"li",
|
|
3579
|
+
{
|
|
3580
|
+
"data-slot": "breadcrumb-separator",
|
|
3581
|
+
role: "presentation",
|
|
3582
|
+
"aria-hidden": "true",
|
|
3583
|
+
className: cn("[&>svg]:size-6 [&>svg]:text-(--color-secondary)", className),
|
|
3584
|
+
...props,
|
|
3585
|
+
children: children ?? /* @__PURE__ */ jsx40(ChevronRight, {})
|
|
3586
|
+
}
|
|
3587
|
+
);
|
|
3588
|
+
}
|
|
3589
|
+
function BreadcrumbEllipsis({
|
|
3590
|
+
className,
|
|
3591
|
+
...props
|
|
3592
|
+
}) {
|
|
3355
3593
|
return /* @__PURE__ */ jsxs27(
|
|
3356
|
-
|
|
3594
|
+
"span",
|
|
3357
3595
|
{
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3596
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
3597
|
+
role: "presentation",
|
|
3598
|
+
"aria-hidden": "true",
|
|
3599
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
3600
|
+
...props,
|
|
3362
3601
|
children: [
|
|
3363
|
-
|
|
3364
|
-
|
|
3602
|
+
/* @__PURE__ */ jsx40(Ellipsis, { className: "size-4" }),
|
|
3603
|
+
/* @__PURE__ */ jsx40("span", { className: "sr-only", children: "More" })
|
|
3365
3604
|
]
|
|
3366
3605
|
}
|
|
3367
3606
|
);
|
|
3368
|
-
}
|
|
3369
|
-
|
|
3607
|
+
}
|
|
3608
|
+
|
|
3609
|
+
// src/components/ui/dropdown-menu.tsx
|
|
3610
|
+
import "react";
|
|
3611
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3612
|
+
import { jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3613
|
+
function DropdownMenu({
|
|
3614
|
+
...props
|
|
3615
|
+
}) {
|
|
3616
|
+
return /* @__PURE__ */ jsx41(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
3617
|
+
}
|
|
3618
|
+
function DropdownMenuTrigger({
|
|
3619
|
+
...props
|
|
3620
|
+
}) {
|
|
3621
|
+
return /* @__PURE__ */ jsx41(
|
|
3622
|
+
DropdownMenuPrimitive.Trigger,
|
|
3623
|
+
{
|
|
3624
|
+
"data-slot": "dropdown-menu-trigger",
|
|
3625
|
+
...props
|
|
3626
|
+
}
|
|
3627
|
+
);
|
|
3628
|
+
}
|
|
3629
|
+
function DropdownMenuContent({
|
|
3630
|
+
className,
|
|
3631
|
+
sideOffset = 4,
|
|
3632
|
+
...props
|
|
3633
|
+
}) {
|
|
3634
|
+
return /* @__PURE__ */ jsx41(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx41(
|
|
3635
|
+
DropdownMenuPrimitive.Content,
|
|
3636
|
+
{
|
|
3637
|
+
"data-slot": "dropdown-menu-content",
|
|
3638
|
+
sideOffset,
|
|
3639
|
+
className: cn(
|
|
3640
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
3641
|
+
className
|
|
3642
|
+
),
|
|
3643
|
+
...props
|
|
3644
|
+
}
|
|
3645
|
+
) });
|
|
3646
|
+
}
|
|
3647
|
+
function DropdownMenuGroup({
|
|
3648
|
+
...props
|
|
3649
|
+
}) {
|
|
3650
|
+
return /* @__PURE__ */ jsx41(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
3651
|
+
}
|
|
3652
|
+
function DropdownMenuItem({
|
|
3653
|
+
className,
|
|
3654
|
+
inset,
|
|
3655
|
+
variant = "default",
|
|
3656
|
+
...props
|
|
3657
|
+
}) {
|
|
3658
|
+
return /* @__PURE__ */ jsx41(
|
|
3659
|
+
DropdownMenuPrimitive.Item,
|
|
3660
|
+
{
|
|
3661
|
+
"data-slot": "dropdown-menu-item",
|
|
3662
|
+
"data-inset": inset,
|
|
3663
|
+
"data-variant": variant,
|
|
3664
|
+
className: cn(
|
|
3665
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3666
|
+
className
|
|
3667
|
+
),
|
|
3668
|
+
...props
|
|
3669
|
+
}
|
|
3670
|
+
);
|
|
3671
|
+
}
|
|
3672
|
+
|
|
3673
|
+
// src/components/Navigation/Breadcrumbs.tsx
|
|
3674
|
+
import { jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3675
|
+
var breadcrumbSeparatorVariants = "size-5 relative bottom-1 [&>svg]:text-secondary group-disabled:text-secondary";
|
|
3676
|
+
var breadcrumbItemBase = "h6-title text-secondary hover:text-primary-hover";
|
|
3677
|
+
var Breadcrumbs = React40.forwardRef(
|
|
3678
|
+
(props, ref) => {
|
|
3679
|
+
const { separator, ellipsis, children, className, ...rest } = props;
|
|
3680
|
+
const items = React40.Children.toArray(children).filter(Boolean);
|
|
3681
|
+
const shouldCollapse = Boolean(ellipsis) && items.length >= 5;
|
|
3682
|
+
const hiddenItems = shouldCollapse ? items.slice(1, -2) : [];
|
|
3683
|
+
const displayItems = shouldCollapse ? [items[0], "__ELLIPSIS__", items[items.length - 2], items[items.length - 1]] : items;
|
|
3684
|
+
return /* @__PURE__ */ jsx42(Breadcrumb, { ref, className, ...rest, children: /* @__PURE__ */ jsx42(BreadcrumbList, { children: displayItems.map((child, index) => {
|
|
3685
|
+
const isEllipsis = child === "__ELLIPSIS__";
|
|
3686
|
+
const key = isEllipsis ? "__ellipsis" : React40.isValidElement(child) && child.key != null ? String(child.key) : String(index);
|
|
3687
|
+
const isLast = index === displayItems.length - 1;
|
|
3688
|
+
return /* @__PURE__ */ jsxs29(React40.Fragment, { children: [
|
|
3689
|
+
isEllipsis ? /* @__PURE__ */ jsx42(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: /* @__PURE__ */ jsxs29(DropdownMenu, { children: [
|
|
3690
|
+
/* @__PURE__ */ jsx42(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx42(
|
|
3691
|
+
"button",
|
|
3692
|
+
{
|
|
3693
|
+
type: "button",
|
|
3694
|
+
className: "inline-flex size-8 items-center justify-center rounded-4 hover:bg-(--background-secondary) focus-ring-primary text-secondary",
|
|
3695
|
+
"aria-label": "Open breadcrumb menu",
|
|
3696
|
+
children: /* @__PURE__ */ jsx42(BreadcrumbEllipsis, {})
|
|
3697
|
+
}
|
|
3698
|
+
) }),
|
|
3699
|
+
/* @__PURE__ */ jsx42(
|
|
3700
|
+
DropdownMenuContent,
|
|
3701
|
+
{
|
|
3702
|
+
align: "start",
|
|
3703
|
+
className: "bg-(--background-neutral) border-(--border-secondary-hover) shadow-card-md rounded-4",
|
|
3704
|
+
children: /* @__PURE__ */ jsx42(DropdownMenuGroup, { children: hiddenItems.map((hidden, hiddenIndex) => {
|
|
3705
|
+
const hiddenKey = React40.isValidElement(hidden) && hidden.key != null ? String(hidden.key) : `hidden-${hiddenIndex}`;
|
|
3706
|
+
if (React40.isValidElement(hidden)) {
|
|
3707
|
+
return /* @__PURE__ */ jsx42(
|
|
3708
|
+
DropdownMenuItem,
|
|
3709
|
+
{
|
|
3710
|
+
asChild: true,
|
|
3711
|
+
className: "cursor-pointer paragraph-md text-primary focus:bg-(--background-secondary)",
|
|
3712
|
+
children: hidden
|
|
3713
|
+
},
|
|
3714
|
+
hiddenKey
|
|
3715
|
+
);
|
|
3716
|
+
}
|
|
3717
|
+
return /* @__PURE__ */ jsx42(
|
|
3718
|
+
DropdownMenuItem,
|
|
3719
|
+
{
|
|
3720
|
+
className: "cursor-pointer paragraph-md text-primary focus:bg-(--background-secondary)",
|
|
3721
|
+
children: String(hidden)
|
|
3722
|
+
},
|
|
3723
|
+
hiddenKey
|
|
3724
|
+
);
|
|
3725
|
+
}) })
|
|
3726
|
+
}
|
|
3727
|
+
)
|
|
3728
|
+
] }) }) : isLast ? /* @__PURE__ */ jsx42(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: /* @__PURE__ */ jsx42(
|
|
3729
|
+
BreadcrumbPage,
|
|
3730
|
+
{
|
|
3731
|
+
className: cn("h6-title-medium cursor-pointer", props.breadcrumbPageClassName),
|
|
3732
|
+
children: child
|
|
3733
|
+
}
|
|
3734
|
+
) }) : /* @__PURE__ */ jsx42(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: child }),
|
|
3735
|
+
!isLast && /* @__PURE__ */ jsx42(BreadcrumbSeparator, { className: cn(breadcrumbSeparatorVariants, props.separatorClassName), children: separator })
|
|
3736
|
+
] }, key);
|
|
3737
|
+
}) }) });
|
|
3738
|
+
}
|
|
3739
|
+
);
|
|
3740
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
3370
3741
|
|
|
3371
3742
|
// src/components/Logo/LogoIcon.tsx
|
|
3372
|
-
import { cva as
|
|
3373
|
-
import { jsx as
|
|
3374
|
-
var LogoIconSvg = (props) => /* @__PURE__ */
|
|
3375
|
-
/* @__PURE__ */
|
|
3376
|
-
/* @__PURE__ */
|
|
3377
|
-
/* @__PURE__ */
|
|
3378
|
-
/* @__PURE__ */
|
|
3379
|
-
/* @__PURE__ */
|
|
3743
|
+
import { cva as cva19 } from "class-variance-authority";
|
|
3744
|
+
import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3745
|
+
var LogoIconSvg = (props) => /* @__PURE__ */ jsxs30("svg", { width: "89", height: "88", viewBox: "0 0 89 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
3746
|
+
/* @__PURE__ */ jsx43("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" }),
|
|
3747
|
+
/* @__PURE__ */ jsx43("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" }),
|
|
3748
|
+
/* @__PURE__ */ jsx43("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" }),
|
|
3749
|
+
/* @__PURE__ */ jsx43("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" }),
|
|
3750
|
+
/* @__PURE__ */ jsx43("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" })
|
|
3380
3751
|
] });
|
|
3381
|
-
var logoIconVariants =
|
|
3752
|
+
var logoIconVariants = cva19(
|
|
3382
3753
|
"relative bg-linear-to-t from-gray-800 to-gray-950 overflow-hidden flex justify-center items-center",
|
|
3383
3754
|
{
|
|
3384
3755
|
variants: {
|
|
@@ -3403,28 +3774,28 @@ var logoIconSizeClass = {
|
|
|
3403
3774
|
xl: "size-96"
|
|
3404
3775
|
};
|
|
3405
3776
|
var LogoIcon = ({ className, size = "md" }) => {
|
|
3406
|
-
return /* @__PURE__ */
|
|
3777
|
+
return /* @__PURE__ */ jsx43("div", { className: cn(logoIconVariants({ size }), className), children: /* @__PURE__ */ jsx43(LogoIconSvg, { className: logoIconSizeClass[size] }) });
|
|
3407
3778
|
};
|
|
3408
3779
|
|
|
3409
3780
|
// src/components/Logo/Logo.tsx
|
|
3410
|
-
import { cva as
|
|
3411
|
-
import { jsx as
|
|
3412
|
-
var LogoIconSvg2 = (props) => /* @__PURE__ */
|
|
3413
|
-
/* @__PURE__ */
|
|
3414
|
-
/* @__PURE__ */
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
/* @__PURE__ */
|
|
3417
|
-
/* @__PURE__ */
|
|
3781
|
+
import { cva as cva20 } from "class-variance-authority";
|
|
3782
|
+
import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3783
|
+
var LogoIconSvg2 = (props) => /* @__PURE__ */ jsxs31("svg", { width: "89", height: "88", viewBox: "0 0 89 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
3784
|
+
/* @__PURE__ */ jsx44("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" }),
|
|
3785
|
+
/* @__PURE__ */ jsx44("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" }),
|
|
3786
|
+
/* @__PURE__ */ jsx44("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" }),
|
|
3787
|
+
/* @__PURE__ */ jsx44("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" }),
|
|
3788
|
+
/* @__PURE__ */ jsx44("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" })
|
|
3418
3789
|
] });
|
|
3419
|
-
var LogoTextSvg = (props) => /* @__PURE__ */
|
|
3420
|
-
/* @__PURE__ */
|
|
3421
|
-
/* @__PURE__ */
|
|
3422
|
-
/* @__PURE__ */
|
|
3423
|
-
/* @__PURE__ */
|
|
3424
|
-
/* @__PURE__ */
|
|
3425
|
-
/* @__PURE__ */
|
|
3790
|
+
var LogoTextSvg = (props) => /* @__PURE__ */ jsxs31("svg", { width: "111", height: "32", viewBox: "0 0 111 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
3791
|
+
/* @__PURE__ */ jsx44("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" }),
|
|
3792
|
+
/* @__PURE__ */ jsx44("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" }),
|
|
3793
|
+
/* @__PURE__ */ jsx44("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" }),
|
|
3794
|
+
/* @__PURE__ */ jsx44("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" }),
|
|
3795
|
+
/* @__PURE__ */ jsx44("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" }),
|
|
3796
|
+
/* @__PURE__ */ jsx44("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" })
|
|
3426
3797
|
] });
|
|
3427
|
-
var logoWrapperVariants =
|
|
3798
|
+
var logoWrapperVariants = cva20("inline-flex", {
|
|
3428
3799
|
variants: {
|
|
3429
3800
|
variant: {
|
|
3430
3801
|
inline: ["w-44", "h-12", "justify-start", "items-center", "gap-4"],
|
|
@@ -3436,7 +3807,7 @@ var logoWrapperVariants = cva21("inline-flex", {
|
|
|
3436
3807
|
variant: "inline"
|
|
3437
3808
|
}
|
|
3438
3809
|
});
|
|
3439
|
-
var logoIconSizeVariants =
|
|
3810
|
+
var logoIconSizeVariants = cva20("", {
|
|
3440
3811
|
variants: {
|
|
3441
3812
|
variant: {
|
|
3442
3813
|
inline: "size-12",
|
|
@@ -3448,7 +3819,7 @@ var logoIconSizeVariants = cva21("", {
|
|
|
3448
3819
|
variant: "inline"
|
|
3449
3820
|
}
|
|
3450
3821
|
});
|
|
3451
|
-
var logoTextSizeVariants =
|
|
3822
|
+
var logoTextSizeVariants = cva20("", {
|
|
3452
3823
|
variants: {
|
|
3453
3824
|
variant: {
|
|
3454
3825
|
inline: "h-8 w-27.5",
|
|
@@ -3462,9 +3833,9 @@ var logoTextSizeVariants = cva21("", {
|
|
|
3462
3833
|
});
|
|
3463
3834
|
var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
3464
3835
|
const textColorClass = textColor === "light" ? "text-(--color-b-white)" : textColor === "dark" ? "text-(--color-b-black)" : "text-primary";
|
|
3465
|
-
return /* @__PURE__ */
|
|
3466
|
-
/* @__PURE__ */
|
|
3467
|
-
/* @__PURE__ */
|
|
3836
|
+
return /* @__PURE__ */ jsxs31("div", { className: cn(logoWrapperVariants({ variant }), className), children: [
|
|
3837
|
+
/* @__PURE__ */ jsx44(LogoIconSvg2, { className: logoIconSizeVariants({ variant }) }),
|
|
3838
|
+
/* @__PURE__ */ jsx44(LogoTextSvg, { className: cn(logoTextSizeVariants({ variant }), textColorClass) })
|
|
3468
3839
|
] });
|
|
3469
3840
|
};
|
|
3470
3841
|
export {
|
|
@@ -3473,12 +3844,11 @@ export {
|
|
|
3473
3844
|
BadgeDigit,
|
|
3474
3845
|
BadgeDot,
|
|
3475
3846
|
BadgeStatus,
|
|
3476
|
-
|
|
3847
|
+
Breadcrumbs,
|
|
3477
3848
|
Button,
|
|
3478
3849
|
ButtonGroup,
|
|
3479
3850
|
Checkbox,
|
|
3480
3851
|
Divider,
|
|
3481
|
-
Dropdown,
|
|
3482
3852
|
Field,
|
|
3483
3853
|
IconButton,
|
|
3484
3854
|
IconButtonGroup,
|
|
@@ -3492,14 +3862,33 @@ export {
|
|
|
3492
3862
|
Progress,
|
|
3493
3863
|
RadioGroup,
|
|
3494
3864
|
SearchInput,
|
|
3865
|
+
Select,
|
|
3495
3866
|
Slider,
|
|
3496
3867
|
StatusAvatar,
|
|
3497
3868
|
Tag,
|
|
3498
3869
|
TextArea,
|
|
3499
3870
|
TextInput,
|
|
3500
3871
|
Toggle,
|
|
3872
|
+
Tooltip,
|
|
3873
|
+
TooltipProvider,
|
|
3501
3874
|
Typography,
|
|
3502
3875
|
WebsiteInput,
|
|
3503
3876
|
cn
|
|
3504
3877
|
};
|
|
3878
|
+
/*! Bundled license information:
|
|
3879
|
+
|
|
3880
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
3881
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
3882
|
+
lucide-react/dist/esm/Icon.js:
|
|
3883
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
3884
|
+
lucide-react/dist/esm/icons/chevron-right.js:
|
|
3885
|
+
lucide-react/dist/esm/icons/ellipsis.js:
|
|
3886
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
3887
|
+
(**
|
|
3888
|
+
* @license lucide-react v0.555.0 - ISC
|
|
3889
|
+
*
|
|
3890
|
+
* This source code is licensed under the ISC license.
|
|
3891
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
3892
|
+
*)
|
|
3893
|
+
*/
|
|
3505
3894
|
//# sourceMappingURL=index.js.map
|