@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.cjs
CHANGED
|
@@ -35,12 +35,11 @@ __export(index_exports, {
|
|
|
35
35
|
BadgeDigit: () => BadgeDigit,
|
|
36
36
|
BadgeDot: () => BadgeDot,
|
|
37
37
|
BadgeStatus: () => BadgeStatus,
|
|
38
|
-
|
|
38
|
+
Breadcrumbs: () => Breadcrumbs,
|
|
39
39
|
Button: () => Button,
|
|
40
40
|
ButtonGroup: () => ButtonGroup,
|
|
41
41
|
Checkbox: () => Checkbox,
|
|
42
42
|
Divider: () => Divider,
|
|
43
|
-
Dropdown: () => Dropdown,
|
|
44
43
|
Field: () => Field,
|
|
45
44
|
IconButton: () => IconButton,
|
|
46
45
|
IconButtonGroup: () => IconButtonGroup,
|
|
@@ -54,12 +53,15 @@ __export(index_exports, {
|
|
|
54
53
|
Progress: () => Progress,
|
|
55
54
|
RadioGroup: () => RadioGroup,
|
|
56
55
|
SearchInput: () => SearchInput,
|
|
56
|
+
Select: () => Select,
|
|
57
57
|
Slider: () => Slider,
|
|
58
58
|
StatusAvatar: () => StatusAvatar,
|
|
59
59
|
Tag: () => Tag,
|
|
60
60
|
TextArea: () => TextArea,
|
|
61
61
|
TextInput: () => TextInput,
|
|
62
62
|
Toggle: () => Toggle,
|
|
63
|
+
Tooltip: () => Tooltip,
|
|
64
|
+
TooltipProvider: () => TooltipProvider,
|
|
63
65
|
Typography: () => Typography,
|
|
64
66
|
WebsiteInput: () => WebsiteInput,
|
|
65
67
|
cn: () => cn
|
|
@@ -586,7 +588,7 @@ var Typography = (props) => {
|
|
|
586
588
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
587
589
|
Comp,
|
|
588
590
|
{
|
|
589
|
-
className: cn(variant, weightClassName, mbClassName, className),
|
|
591
|
+
className: cn("text-primary", variant, weightClassName, mbClassName, className),
|
|
590
592
|
...rest,
|
|
591
593
|
children
|
|
592
594
|
}
|
|
@@ -958,56 +960,112 @@ var Divider = (props) => {
|
|
|
958
960
|
Divider.displayName = "Divider";
|
|
959
961
|
|
|
960
962
|
// src/components/Content/Progress.tsx
|
|
963
|
+
var React14 = __toESM(require("react"), 1);
|
|
964
|
+
|
|
965
|
+
// src/components/Inputs/Field.tsx
|
|
961
966
|
var React13 = __toESM(require("react"), 1);
|
|
962
967
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
968
|
+
var fieldBase = "flex flex-col gap-2 items-start";
|
|
969
|
+
var Field = (props) => {
|
|
970
|
+
const {
|
|
971
|
+
label,
|
|
972
|
+
labelRight = false,
|
|
973
|
+
hint,
|
|
974
|
+
hideHint,
|
|
975
|
+
status = "default",
|
|
976
|
+
disabled,
|
|
977
|
+
className,
|
|
978
|
+
children
|
|
979
|
+
} = props;
|
|
980
|
+
const fieldId = React13.useId();
|
|
981
|
+
const labelId = label ? `${fieldId}-label` : void 0;
|
|
982
|
+
const hintId = hint ? `${fieldId}-hint` : void 0;
|
|
983
|
+
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
984
|
+
const labelColorClass = disabled ? "text-primary-disabled" : "text-primary";
|
|
985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn(fieldBase, className), children: [
|
|
986
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { id: labelId, className: cn("paragraph-sm", labelColorClass), children: label }),
|
|
988
|
+
labelRight
|
|
989
|
+
] }),
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "relative w-full", children }),
|
|
991
|
+
!hideHint && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
992
|
+
"p",
|
|
993
|
+
{
|
|
994
|
+
id: hint ? hintId : void 0,
|
|
995
|
+
className: cn("caption", hint ? hintColorClass : "invisible"),
|
|
996
|
+
children: hint || "\xA0"
|
|
997
|
+
}
|
|
998
|
+
)
|
|
999
|
+
] });
|
|
1000
|
+
};
|
|
1001
|
+
Field.displayName = "Field";
|
|
1002
|
+
|
|
1003
|
+
// src/components/Content/Progress.tsx
|
|
1004
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
963
1005
|
var sizeToBarClasses = {
|
|
964
1006
|
lg: "h-4 rounded-16",
|
|
965
1007
|
md: "h-2 rounded-8",
|
|
966
1008
|
sm: "h-1 rounded-4"
|
|
967
1009
|
};
|
|
968
|
-
var Progress =
|
|
1010
|
+
var Progress = React14.forwardRef(
|
|
969
1011
|
(props, ref) => {
|
|
970
1012
|
const {
|
|
971
1013
|
value,
|
|
972
1014
|
label,
|
|
973
1015
|
hint,
|
|
974
|
-
|
|
975
|
-
|
|
1016
|
+
showProgressLabel = true,
|
|
1017
|
+
hideHint,
|
|
976
1018
|
size = "lg",
|
|
1019
|
+
status = "default",
|
|
1020
|
+
disabled,
|
|
977
1021
|
className,
|
|
978
1022
|
...rest
|
|
979
1023
|
} = props;
|
|
980
1024
|
const clamped = Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;
|
|
981
1025
|
const percentageLabel = `${Math.round(clamped)}%`;
|
|
982
1026
|
const barHeightClasses = sizeToBarClasses[size];
|
|
983
|
-
return /* @__PURE__ */ (0,
|
|
984
|
-
|
|
1027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1028
|
+
Field,
|
|
985
1029
|
{
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
"
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
"
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1030
|
+
label,
|
|
1031
|
+
labelRight: showProgressLabel && label ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "footnote text-(--color-secondary)", children: percentageLabel }) : void 0,
|
|
1032
|
+
hint,
|
|
1033
|
+
hideHint,
|
|
1034
|
+
status,
|
|
1035
|
+
disabled,
|
|
1036
|
+
className: cn("w-full", className),
|
|
1037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1038
|
+
"div",
|
|
1039
|
+
{
|
|
1040
|
+
ref,
|
|
1041
|
+
role: "progressbar",
|
|
1042
|
+
"aria-valuenow": clamped,
|
|
1043
|
+
"aria-valuemin": 0,
|
|
1044
|
+
"aria-valuemax": 100,
|
|
1045
|
+
"aria-label": label,
|
|
1046
|
+
...rest,
|
|
1047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1048
|
+
"div",
|
|
1049
|
+
{
|
|
1050
|
+
className: cn(
|
|
1051
|
+
"w-full bg-(--chart-mono) overflow-hidden",
|
|
1052
|
+
barHeightClasses,
|
|
1053
|
+
disabled && "opacity-50"
|
|
1054
|
+
),
|
|
1055
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1056
|
+
"div",
|
|
1057
|
+
{
|
|
1058
|
+
className: cn(
|
|
1059
|
+
"bg-(--chart-brand) h-full",
|
|
1060
|
+
size === "lg" ? "rounded-4" : size === "md" ? "rounded-2" : "rounded-[1px]"
|
|
1061
|
+
),
|
|
1062
|
+
style: { width: `${clamped}%` }
|
|
1063
|
+
}
|
|
1064
|
+
)
|
|
1065
|
+
}
|
|
1066
|
+
)
|
|
1067
|
+
}
|
|
1068
|
+
)
|
|
1011
1069
|
}
|
|
1012
1070
|
);
|
|
1013
1071
|
}
|
|
@@ -1015,10 +1073,10 @@ var Progress = React13.forwardRef(
|
|
|
1015
1073
|
Progress.displayName = "Progress";
|
|
1016
1074
|
|
|
1017
1075
|
// src/components/Content/StatusAvatar.tsx
|
|
1018
|
-
var
|
|
1076
|
+
var React15 = __toESM(require("react"), 1);
|
|
1019
1077
|
var import_class_variance_authority10 = require("class-variance-authority");
|
|
1020
1078
|
var import_icons3 = require("@bubo-squared/icons");
|
|
1021
|
-
var
|
|
1079
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1022
1080
|
var iconStatusVariants = (0, import_class_variance_authority10.cva)(
|
|
1023
1081
|
"inline-flex size-5 items-center justify-center rounded-full border-1 border-(--color-primary-inverse) p-1",
|
|
1024
1082
|
{
|
|
@@ -1043,11 +1101,11 @@ var presenceDotByVariant = {
|
|
|
1043
1101
|
away: "bg-(--background-warning) border-1 border-(--color-primary-inverse)",
|
|
1044
1102
|
busy: "bg-(--background-error) border-1 border-(--color-primary-inverse)"
|
|
1045
1103
|
};
|
|
1046
|
-
var StatusAvatar =
|
|
1104
|
+
var StatusAvatar = React15.forwardRef((props, ref) => {
|
|
1047
1105
|
const { variant = "verified", className, ...rest } = props;
|
|
1048
1106
|
if (variant === "offline" || variant === "online" || variant === "away" || variant === "busy") {
|
|
1049
1107
|
const dotClasses = presenceDotByVariant[variant];
|
|
1050
|
-
return /* @__PURE__ */ (0,
|
|
1108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1051
1109
|
"div",
|
|
1052
1110
|
{
|
|
1053
1111
|
ref,
|
|
@@ -1056,23 +1114,23 @@ var StatusAvatar = React14.forwardRef((props, ref) => {
|
|
|
1056
1114
|
className
|
|
1057
1115
|
),
|
|
1058
1116
|
...rest,
|
|
1059
|
-
children: /* @__PURE__ */ (0,
|
|
1117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: cn(dotClasses, "size-3.5 rounded-full") })
|
|
1060
1118
|
}
|
|
1061
1119
|
);
|
|
1062
1120
|
}
|
|
1063
1121
|
const iconVariant = variant;
|
|
1064
|
-
return /* @__PURE__ */ (0,
|
|
1122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1065
1123
|
"div",
|
|
1066
1124
|
{
|
|
1067
1125
|
ref,
|
|
1068
1126
|
className: cn(iconStatusVariants({ variant: iconVariant }), className),
|
|
1069
1127
|
...rest,
|
|
1070
1128
|
children: [
|
|
1071
|
-
iconVariant === "verified" && /* @__PURE__ */ (0,
|
|
1072
|
-
iconVariant === "bookmark" && /* @__PURE__ */ (0,
|
|
1073
|
-
iconVariant === "favorite" && /* @__PURE__ */ (0,
|
|
1074
|
-
iconVariant === "add" && /* @__PURE__ */ (0,
|
|
1075
|
-
iconVariant === "remove" && /* @__PURE__ */ (0,
|
|
1129
|
+
iconVariant === "verified" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons3.CheckIcon, { className: "size-3 text-button-white" }),
|
|
1130
|
+
iconVariant === "bookmark" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons3.BookmarkCheckIcon, { className: "size-3 text-button-white" }),
|
|
1131
|
+
iconVariant === "favorite" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons3.StarIcon, { className: "size-3 text-button-white" }),
|
|
1132
|
+
iconVariant === "add" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons3.PlusIcon, { className: "size-3 text-button-white" }),
|
|
1133
|
+
iconVariant === "remove" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_icons3.CrossIcon, { className: "size-3 text-button-white" })
|
|
1076
1134
|
]
|
|
1077
1135
|
}
|
|
1078
1136
|
);
|
|
@@ -1080,10 +1138,10 @@ var StatusAvatar = React14.forwardRef((props, ref) => {
|
|
|
1080
1138
|
StatusAvatar.displayName = "StatusAvatar";
|
|
1081
1139
|
|
|
1082
1140
|
// src/components/Content/Tag.tsx
|
|
1083
|
-
var
|
|
1141
|
+
var React16 = __toESM(require("react"), 1);
|
|
1084
1142
|
var import_react_slot6 = require("@radix-ui/react-slot");
|
|
1085
1143
|
var import_class_variance_authority11 = require("class-variance-authority");
|
|
1086
|
-
var
|
|
1144
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1087
1145
|
var tagVariants = (0, import_class_variance_authority11.cva)(
|
|
1088
1146
|
"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 ",
|
|
1089
1147
|
{
|
|
@@ -1100,7 +1158,7 @@ var tagVariants = (0, import_class_variance_authority11.cva)(
|
|
|
1100
1158
|
);
|
|
1101
1159
|
var disabledTag = "pointer-events-none border-(--border-secondary-disabled) bg-(--background-neutral-disabled) text-primary-disabled";
|
|
1102
1160
|
var iconClasses = "flex items-center justify-center w-5 h-5 [&>*]:w-5 [&>*]:h-5 shrink-0 text-primary";
|
|
1103
|
-
var Tag =
|
|
1161
|
+
var Tag = React16.forwardRef(
|
|
1104
1162
|
(props, ref) => {
|
|
1105
1163
|
const {
|
|
1106
1164
|
size = "sm",
|
|
@@ -1112,22 +1170,22 @@ var Tag = React15.forwardRef(
|
|
|
1112
1170
|
...rest
|
|
1113
1171
|
} = props;
|
|
1114
1172
|
const Comp = asChild ? import_react_slot6.Slot : "div";
|
|
1115
|
-
const leading = props.leadingIcon &&
|
|
1116
|
-
const trailing = props.trailingIcon &&
|
|
1117
|
-
return /* @__PURE__ */ (0,
|
|
1173
|
+
const leading = props.leadingIcon && React16.isValidElement(props.leadingIcon) ? React16.cloneElement(props.leadingIcon, { disabled, ...props.leadingIcon.props }) : null;
|
|
1174
|
+
const trailing = props.trailingIcon && React16.isValidElement(props.trailingIcon) ? React16.cloneElement(props.trailingIcon, { disabled, ...props.trailingIcon.props }) : null;
|
|
1175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1118
1176
|
Comp,
|
|
1119
1177
|
{
|
|
1120
1178
|
className: cn(tagVariants({ size }), disabled && disabledTag, className),
|
|
1121
1179
|
ref,
|
|
1122
1180
|
...rest,
|
|
1123
1181
|
children: [
|
|
1124
|
-
leading && /* @__PURE__ */ (0,
|
|
1125
|
-
value ? /* @__PURE__ */ (0,
|
|
1126
|
-
/* @__PURE__ */ (0,
|
|
1127
|
-
/* @__PURE__ */ (0,
|
|
1128
|
-
/* @__PURE__ */ (0,
|
|
1129
|
-
] }) : /* @__PURE__ */ (0,
|
|
1130
|
-
trailing && /* @__PURE__ */ (0,
|
|
1182
|
+
leading && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: iconClasses, children: leading }),
|
|
1183
|
+
value ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-row gap-1 items-center", children: [
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: label }),
|
|
1185
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: ":" }),
|
|
1186
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-primary paragraph-lg-medium mb-0! cursor-default font-medium", children: value })
|
|
1187
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default", children: label }),
|
|
1188
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: iconClasses, children: trailing })
|
|
1131
1189
|
]
|
|
1132
1190
|
}
|
|
1133
1191
|
);
|
|
@@ -1135,14 +1193,14 @@ var Tag = React15.forwardRef(
|
|
|
1135
1193
|
);
|
|
1136
1194
|
|
|
1137
1195
|
// src/components/Inputs/Checkbox.tsx
|
|
1138
|
-
var
|
|
1196
|
+
var React17 = require("react");
|
|
1139
1197
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
1140
1198
|
var import_icons4 = require("@bubo-squared/icons");
|
|
1141
1199
|
var import_icons5 = require("@bubo-squared/icons");
|
|
1142
|
-
var
|
|
1200
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1143
1201
|
function Checkbox({ label, className, ...props }) {
|
|
1144
|
-
return /* @__PURE__ */ (0,
|
|
1145
|
-
/* @__PURE__ */ (0,
|
|
1202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("label", { className: "inline-flex items-center gap-(--space-12) cursor-pointer select-none", children: [
|
|
1203
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1146
1204
|
CheckboxPrimitive.Root,
|
|
1147
1205
|
{
|
|
1148
1206
|
className: cn(
|
|
@@ -1158,24 +1216,24 @@ function Checkbox({ label, className, ...props }) {
|
|
|
1158
1216
|
className
|
|
1159
1217
|
),
|
|
1160
1218
|
...props,
|
|
1161
|
-
children: /* @__PURE__ */ (0,
|
|
1162
|
-
/* @__PURE__ */ (0,
|
|
1163
|
-
/* @__PURE__ */ (0,
|
|
1219
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
|
|
1220
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons4.CheckIcon, { className: "h-5 w-5 hidden group-data-[state=checked]:block" }),
|
|
1221
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons5.MinusIcon, { className: "h-5 w-5 hidden group-data-[state=indeterminate]:block" })
|
|
1164
1222
|
] })
|
|
1165
1223
|
}
|
|
1166
1224
|
),
|
|
1167
|
-
label && /* @__PURE__ */ (0,
|
|
1225
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "paragraph-md-medium text-primary", children: label })
|
|
1168
1226
|
] });
|
|
1169
1227
|
}
|
|
1170
1228
|
|
|
1171
|
-
// src/components/Inputs/
|
|
1172
|
-
var
|
|
1229
|
+
// src/components/Inputs/Select.tsx
|
|
1230
|
+
var React18 = __toESM(require("react"), 1);
|
|
1231
|
+
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
1173
1232
|
var import_class_variance_authority12 = require("class-variance-authority");
|
|
1174
1233
|
var import_icons6 = require("@bubo-squared/icons");
|
|
1175
|
-
var
|
|
1176
|
-
var
|
|
1177
|
-
|
|
1178
|
-
"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",
|
|
1234
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1235
|
+
var selectTriggerVariants = (0, import_class_variance_authority12.cva)(
|
|
1236
|
+
"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",
|
|
1179
1237
|
{
|
|
1180
1238
|
variants: {
|
|
1181
1239
|
size: {
|
|
@@ -1196,7 +1254,7 @@ var dropdownTriggerVariants = (0, import_class_variance_authority12.cva)(
|
|
|
1196
1254
|
}
|
|
1197
1255
|
}
|
|
1198
1256
|
);
|
|
1199
|
-
var
|
|
1257
|
+
var textVariants = (0, import_class_variance_authority12.cva)("truncate", {
|
|
1200
1258
|
variants: {
|
|
1201
1259
|
size: {
|
|
1202
1260
|
sm: "paragraph-md",
|
|
@@ -1205,7 +1263,7 @@ var dropdownTextVariants = (0, import_class_variance_authority12.cva)("truncate"
|
|
|
1205
1263
|
xl: "h6-title"
|
|
1206
1264
|
},
|
|
1207
1265
|
hasValue: {
|
|
1208
|
-
false: "text-
|
|
1266
|
+
false: "text-secondary",
|
|
1209
1267
|
true: "text-primary"
|
|
1210
1268
|
},
|
|
1211
1269
|
disabled: {
|
|
@@ -1217,13 +1275,13 @@ var dropdownTextVariants = (0, import_class_variance_authority12.cva)("truncate"
|
|
|
1217
1275
|
hasValue: false
|
|
1218
1276
|
}
|
|
1219
1277
|
});
|
|
1220
|
-
var
|
|
1278
|
+
var selectIconVariants = (0, import_class_variance_authority12.cva)("flex items-center justify-center shrink-0", {
|
|
1221
1279
|
variants: {
|
|
1222
1280
|
size: {
|
|
1223
|
-
sm: "
|
|
1224
|
-
md: "
|
|
1225
|
-
lg: "
|
|
1226
|
-
xl: "
|
|
1281
|
+
sm: "size-4",
|
|
1282
|
+
md: "size-5",
|
|
1283
|
+
lg: "size-5",
|
|
1284
|
+
xl: "size-6"
|
|
1227
1285
|
},
|
|
1228
1286
|
disabled: {
|
|
1229
1287
|
false: "text-(--icon-primary)",
|
|
@@ -1235,12 +1293,25 @@ var dropdownIconVariants = (0, import_class_variance_authority12.cva)("flex item
|
|
|
1235
1293
|
disabled: false
|
|
1236
1294
|
}
|
|
1237
1295
|
});
|
|
1238
|
-
var
|
|
1296
|
+
var selectButtonVariants = (0, import_class_variance_authority12.cva)(
|
|
1297
|
+
"flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) text-left paragraph-lg text-primary hover:bg-(--background-secondary)",
|
|
1298
|
+
{
|
|
1299
|
+
variants: {
|
|
1300
|
+
size: {
|
|
1301
|
+
sm: "paragraph-sm py-(--space-4) ",
|
|
1302
|
+
md: "paragraph-md py-(--space-6) ",
|
|
1303
|
+
lg: "paragraph-lg py-(--space-8) ",
|
|
1304
|
+
xl: "subtitle py-(--space-10) "
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
);
|
|
1309
|
+
var Select = (props) => {
|
|
1239
1310
|
const {
|
|
1240
1311
|
label = "Field Label",
|
|
1241
|
-
showLabel = true,
|
|
1242
1312
|
hint = "This is a hint text to help user.",
|
|
1243
1313
|
hideHint = false,
|
|
1314
|
+
name,
|
|
1244
1315
|
placeholder = "Placeholder text",
|
|
1245
1316
|
size = "lg",
|
|
1246
1317
|
status = "default",
|
|
@@ -1251,186 +1322,140 @@ var Dropdown = (props) => {
|
|
|
1251
1322
|
onChange,
|
|
1252
1323
|
className,
|
|
1253
1324
|
showMenu,
|
|
1325
|
+
required = false,
|
|
1254
1326
|
...buttonProps
|
|
1255
1327
|
} = props;
|
|
1256
|
-
const dropdownRef = React17.useRef(null);
|
|
1257
1328
|
const isControlled = value !== void 0;
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1329
|
+
const controlledValue = value ?? "";
|
|
1330
|
+
const [internalValue, setInternalValue] = React18.useState(
|
|
1331
|
+
defaultValue ?? ""
|
|
1260
1332
|
);
|
|
1261
|
-
const [open, setOpen] =
|
|
1262
|
-
const
|
|
1263
|
-
const selectedOption = options.find((opt) => opt.value ===
|
|
1333
|
+
const [open, setOpen] = React18.useState(false);
|
|
1334
|
+
const rawValue = isControlled ? controlledValue : internalValue;
|
|
1335
|
+
const selectedOption = options.find((opt) => opt.value === rawValue);
|
|
1336
|
+
const currentValue = selectedOption ? selectedOption.value : "";
|
|
1264
1337
|
const hasValue = !!selectedOption;
|
|
1265
1338
|
const isOpen = showMenu ?? open;
|
|
1266
|
-
const
|
|
1267
|
-
if (disabled) return;
|
|
1339
|
+
const handleOpenChange = (nextOpen) => {
|
|
1268
1340
|
if (showMenu === void 0) {
|
|
1269
|
-
setOpen(
|
|
1341
|
+
setOpen(nextOpen);
|
|
1270
1342
|
}
|
|
1271
1343
|
};
|
|
1272
|
-
const
|
|
1344
|
+
const handleValueChange = (nextValue) => {
|
|
1273
1345
|
if (!isControlled) {
|
|
1274
|
-
setInternalValue(
|
|
1346
|
+
setInternalValue(nextValue);
|
|
1275
1347
|
}
|
|
1276
|
-
onChange?.(
|
|
1348
|
+
onChange?.(nextValue);
|
|
1277
1349
|
if (showMenu === void 0) {
|
|
1278
1350
|
setOpen(false);
|
|
1279
1351
|
}
|
|
1280
1352
|
};
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
{
|
|
1301
|
-
htmlFor: triggerId,
|
|
1302
|
-
id: labelId,
|
|
1303
|
-
className: cn(
|
|
1304
|
-
"paragraph-sm",
|
|
1305
|
-
disabled ? "text-primary-disabled" : "text-primary"
|
|
1306
|
-
),
|
|
1307
|
-
children: label
|
|
1308
|
-
}
|
|
1309
|
-
),
|
|
1310
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "relative w-full", children: [
|
|
1311
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1312
|
-
"button",
|
|
1353
|
+
const handleClear = () => {
|
|
1354
|
+
if (!isControlled) {
|
|
1355
|
+
setInternalValue("");
|
|
1356
|
+
}
|
|
1357
|
+
onChange?.("");
|
|
1358
|
+
if (showMenu === void 0) {
|
|
1359
|
+
setOpen(false);
|
|
1360
|
+
}
|
|
1361
|
+
};
|
|
1362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1363
|
+
Field,
|
|
1364
|
+
{
|
|
1365
|
+
label,
|
|
1366
|
+
hint,
|
|
1367
|
+
hideHint,
|
|
1368
|
+
status,
|
|
1369
|
+
disabled,
|
|
1370
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1371
|
+
SelectPrimitive.Root,
|
|
1313
1372
|
{
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
"aria-labelledby": showLabel ? labelId : void 0,
|
|
1319
|
-
"aria-describedby": !hideHint ? hintId : void 0,
|
|
1373
|
+
value: currentValue,
|
|
1374
|
+
onValueChange: handleValueChange,
|
|
1375
|
+
open: isOpen,
|
|
1376
|
+
onOpenChange: handleOpenChange,
|
|
1320
1377
|
disabled,
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
className
|
|
1324
|
-
),
|
|
1325
|
-
onClick: handleToggle,
|
|
1326
|
-
"data-open": isOpen || void 0,
|
|
1327
|
-
...buttonProps,
|
|
1378
|
+
name,
|
|
1379
|
+
required,
|
|
1328
1380
|
children: [
|
|
1329
|
-
/* @__PURE__ */ (0,
|
|
1330
|
-
"
|
|
1381
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1382
|
+
"button",
|
|
1331
1383
|
{
|
|
1384
|
+
type: "button",
|
|
1385
|
+
"aria-haspopup": "listbox",
|
|
1386
|
+
"aria-expanded": isOpen,
|
|
1387
|
+
disabled,
|
|
1332
1388
|
className: cn(
|
|
1333
|
-
|
|
1389
|
+
selectTriggerVariants({ size, status }),
|
|
1390
|
+
textVariants({
|
|
1334
1391
|
size,
|
|
1335
1392
|
hasValue,
|
|
1336
1393
|
disabled: !!disabled
|
|
1337
|
-
})
|
|
1394
|
+
}),
|
|
1395
|
+
hasValue ? "text-primary" : "text-secondary",
|
|
1396
|
+
className
|
|
1338
1397
|
),
|
|
1339
|
-
|
|
1398
|
+
"data-open": isOpen || void 0,
|
|
1399
|
+
...buttonProps,
|
|
1400
|
+
children: [
|
|
1401
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.Value, { placeholder }),
|
|
1402
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1403
|
+
"span",
|
|
1404
|
+
{
|
|
1405
|
+
className: cn(selectIconVariants({ size, disabled: !!disabled })),
|
|
1406
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons6.ChevronDownIcon, {})
|
|
1407
|
+
}
|
|
1408
|
+
) })
|
|
1409
|
+
]
|
|
1340
1410
|
}
|
|
1341
|
-
),
|
|
1342
|
-
/* @__PURE__ */ (0,
|
|
1343
|
-
|
|
1411
|
+
) }),
|
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1413
|
+
SelectPrimitive.Content,
|
|
1344
1414
|
{
|
|
1415
|
+
position: "popper",
|
|
1416
|
+
align: "start",
|
|
1417
|
+
sideOffset: 4,
|
|
1345
1418
|
className: cn(
|
|
1346
|
-
|
|
1419
|
+
"z-50 rounded-4 border border-(--border-secondary-hover) bg-(--background-neutral) shadow-card-md overflow-y-scroll dropdown-scrollbar max-h-79",
|
|
1420
|
+
"min-w-343"
|
|
1347
1421
|
),
|
|
1348
|
-
|
|
1422
|
+
style: { minWidth: "var(--radix-select-trigger-width)" },
|
|
1423
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.Viewport, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-col", children: [
|
|
1424
|
+
hasValue && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("bg-(--background-neutral) border-b border-(--border-secondary)"), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1425
|
+
"button",
|
|
1426
|
+
{
|
|
1427
|
+
type: "button",
|
|
1428
|
+
className: cn(
|
|
1429
|
+
selectButtonVariants({ size }),
|
|
1430
|
+
"text-secondary"
|
|
1431
|
+
),
|
|
1432
|
+
onClick: handleClear,
|
|
1433
|
+
children: "Clear"
|
|
1434
|
+
}
|
|
1435
|
+
) }),
|
|
1436
|
+
options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1437
|
+
SelectPrimitive.Item,
|
|
1438
|
+
{
|
|
1439
|
+
value: opt.value,
|
|
1440
|
+
className: cn(
|
|
1441
|
+
"bg-(--background-neutral) border-b border-(--border-secondary) last:border-b-0",
|
|
1442
|
+
"data-highlighted:bg-(--background-secondary) data-highlighted:border-(--border-secondary-hover) data-highlighted:outline-none",
|
|
1443
|
+
"data-[state=checked]:bg-(--background-secondary)"
|
|
1444
|
+
),
|
|
1445
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: selectButtonVariants({ size }), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(SelectPrimitive.ItemText, { children: opt.label }) })
|
|
1446
|
+
},
|
|
1447
|
+
opt.value
|
|
1448
|
+
))
|
|
1449
|
+
] }) })
|
|
1349
1450
|
}
|
|
1350
|
-
)
|
|
1451
|
+
) })
|
|
1351
1452
|
]
|
|
1352
1453
|
}
|
|
1353
|
-
)
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1357
|
-
"li",
|
|
1358
|
-
{
|
|
1359
|
-
className: cn(
|
|
1360
|
-
"bg-(--background-neutral) border-b border-(--border-secondary) last:border-b-0",
|
|
1361
|
-
selected && "bg-(--background-secondary)"
|
|
1362
|
-
),
|
|
1363
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1364
|
-
"button",
|
|
1365
|
-
{
|
|
1366
|
-
type: "button",
|
|
1367
|
-
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)",
|
|
1368
|
-
role: "option",
|
|
1369
|
-
"aria-selected": selected,
|
|
1370
|
-
onClick: () => handleSelect(opt.value),
|
|
1371
|
-
children: opt.label
|
|
1372
|
-
}
|
|
1373
|
-
)
|
|
1374
|
-
},
|
|
1375
|
-
opt.value
|
|
1376
|
-
);
|
|
1377
|
-
}) }) })
|
|
1378
|
-
] }),
|
|
1379
|
-
!hideHint && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1380
|
-
"p",
|
|
1381
|
-
{
|
|
1382
|
-
id: hintId,
|
|
1383
|
-
className: cn(
|
|
1384
|
-
"caption",
|
|
1385
|
-
disabled ? "text-primary-disabled" : "text-(--color-secondary)"
|
|
1386
|
-
),
|
|
1387
|
-
children: hint
|
|
1388
|
-
}
|
|
1389
|
-
)
|
|
1390
|
-
] });
|
|
1391
|
-
};
|
|
1392
|
-
Dropdown.displayName = "Dropdown";
|
|
1393
|
-
|
|
1394
|
-
// src/components/Inputs/Field.tsx
|
|
1395
|
-
var React18 = __toESM(require("react"), 1);
|
|
1396
|
-
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1397
|
-
var fieldBase = "flex flex-col gap-2 items-start";
|
|
1398
|
-
var Field = (props) => {
|
|
1399
|
-
const {
|
|
1400
|
-
label,
|
|
1401
|
-
hint,
|
|
1402
|
-
hideHint,
|
|
1403
|
-
status = "default",
|
|
1404
|
-
disabled,
|
|
1405
|
-
className,
|
|
1406
|
-
children
|
|
1407
|
-
} = props;
|
|
1408
|
-
const fieldId = React18.useId();
|
|
1409
|
-
const labelId = label ? `${fieldId}-label` : void 0;
|
|
1410
|
-
const hintId = hint ? `${fieldId}-hint` : void 0;
|
|
1411
|
-
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
1412
|
-
const labelColorClass = disabled ? "text-primary-disabled" : "text-primary";
|
|
1413
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn(fieldBase, className), children: [
|
|
1414
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1415
|
-
"label",
|
|
1416
|
-
{
|
|
1417
|
-
id: labelId,
|
|
1418
|
-
className: cn("paragraph-sm", labelColorClass),
|
|
1419
|
-
children: label
|
|
1420
|
-
}
|
|
1421
|
-
),
|
|
1422
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "relative w-full", children }),
|
|
1423
|
-
!hideHint && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1424
|
-
"p",
|
|
1425
|
-
{
|
|
1426
|
-
id: hint ? hintId : void 0,
|
|
1427
|
-
className: cn("caption", hint ? hintColorClass : "invisible"),
|
|
1428
|
-
children: hint || "\xA0"
|
|
1429
|
-
}
|
|
1430
|
-
)
|
|
1431
|
-
] });
|
|
1454
|
+
)
|
|
1455
|
+
}
|
|
1456
|
+
);
|
|
1432
1457
|
};
|
|
1433
|
-
|
|
1458
|
+
Select.displayName = "Select";
|
|
1434
1459
|
|
|
1435
1460
|
// src/components/Inputs/PasswordInput.tsx
|
|
1436
1461
|
var React21 = __toESM(require("react"), 1);
|
|
@@ -1510,6 +1535,7 @@ var InputShell = React20.forwardRef(
|
|
|
1510
1535
|
InputShell.displayName = "InputShell";
|
|
1511
1536
|
|
|
1512
1537
|
// src/components/Inputs/PasswordInput.tsx
|
|
1538
|
+
var import_icons7 = require("@bubo-squared/icons");
|
|
1513
1539
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1514
1540
|
var passwordTextVariants = (0, import_class_variance_authority14.cva)("truncate", {
|
|
1515
1541
|
variants: {
|
|
@@ -1575,13 +1601,10 @@ var PasswordInput = (props) => {
|
|
|
1575
1601
|
placeholder = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
1576
1602
|
size = "lg",
|
|
1577
1603
|
status = "default",
|
|
1578
|
-
variant = "
|
|
1604
|
+
variant = "icon",
|
|
1579
1605
|
disabled,
|
|
1580
1606
|
className,
|
|
1581
1607
|
leadingIcon,
|
|
1582
|
-
trailingIcon,
|
|
1583
|
-
actionLabel = "Action",
|
|
1584
|
-
onActionClick,
|
|
1585
1608
|
value,
|
|
1586
1609
|
defaultValue,
|
|
1587
1610
|
onChange,
|
|
@@ -1591,8 +1614,10 @@ var PasswordInput = (props) => {
|
|
|
1591
1614
|
const [internalValue, setInternalValue] = React21.useState(
|
|
1592
1615
|
defaultValue ?? ""
|
|
1593
1616
|
);
|
|
1617
|
+
const [isRevealed, setIsRevealed] = React21.useState(false);
|
|
1594
1618
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
1595
1619
|
const inputRef = React21.useRef(null);
|
|
1620
|
+
const showLeadingIcon = !!leadingIcon;
|
|
1596
1621
|
const handleContainerClick = () => {
|
|
1597
1622
|
if (disabled) return;
|
|
1598
1623
|
inputRef.current?.focus();
|
|
@@ -1603,9 +1628,6 @@ var PasswordInput = (props) => {
|
|
|
1603
1628
|
}
|
|
1604
1629
|
onChange?.(event);
|
|
1605
1630
|
};
|
|
1606
|
-
const showLeadingIcon = variant === "icons" && !!leadingIcon;
|
|
1607
|
-
const showTrailingIcon = variant === "icons" && !!trailingIcon;
|
|
1608
|
-
const showAction = variant === "action" && !!actionLabel;
|
|
1609
1631
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1610
1632
|
Field,
|
|
1611
1633
|
{
|
|
@@ -1636,37 +1658,33 @@ var PasswordInput = (props) => {
|
|
|
1636
1658
|
Input,
|
|
1637
1659
|
{
|
|
1638
1660
|
ref: inputRef,
|
|
1639
|
-
type: "password",
|
|
1661
|
+
type: isRevealed ? "text" : "password",
|
|
1640
1662
|
disabled: disabled ?? void 0,
|
|
1641
1663
|
placeholder,
|
|
1642
1664
|
value: isControlled ? value : currentValue,
|
|
1643
1665
|
defaultValue: isControlled ? void 0 : defaultValue,
|
|
1644
1666
|
onChange: handleChange,
|
|
1645
1667
|
variant: "bare",
|
|
1646
|
-
className: cn(
|
|
1647
|
-
passwordTextVariants({ size, disabled: !!disabled })
|
|
1648
|
-
),
|
|
1668
|
+
className: cn(passwordTextVariants({ size, disabled: !!disabled })),
|
|
1649
1669
|
...inputProps
|
|
1650
1670
|
}
|
|
1651
1671
|
),
|
|
1652
|
-
|
|
1653
|
-
"span",
|
|
1654
|
-
{
|
|
1655
|
-
className: cn(
|
|
1656
|
-
iconWrapperVariants({ size, disabled: !!disabled })
|
|
1657
|
-
),
|
|
1658
|
-
children: trailingIcon
|
|
1659
|
-
}
|
|
1660
|
-
),
|
|
1661
|
-
showAction && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1672
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1662
1673
|
"button",
|
|
1663
1674
|
{
|
|
1664
1675
|
type: "button",
|
|
1676
|
+
disabled: !!disabled,
|
|
1677
|
+
onClick: () => {
|
|
1678
|
+
if (disabled) return;
|
|
1679
|
+
setIsRevealed((prev) => !prev);
|
|
1680
|
+
inputRef.current?.focus();
|
|
1681
|
+
},
|
|
1682
|
+
"aria-label": isRevealed ? "Hide password" : "Show password",
|
|
1665
1683
|
className: cn(
|
|
1666
|
-
|
|
1684
|
+
"cursor-pointer",
|
|
1685
|
+
variant === "text" ? actionButtonVariants({ size, disabled: !!disabled }) : iconWrapperVariants({ size, disabled: !!disabled })
|
|
1667
1686
|
),
|
|
1668
|
-
|
|
1669
|
-
children: actionLabel
|
|
1687
|
+
children: variant === "icon" ? isRevealed ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons7.EyeSlashIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons7.EyeIcon, {}) : isRevealed ? "Hide" : "Show"
|
|
1670
1688
|
}
|
|
1671
1689
|
)
|
|
1672
1690
|
]
|
|
@@ -1679,7 +1697,7 @@ PasswordInput.displayName = "PasswordInput";
|
|
|
1679
1697
|
|
|
1680
1698
|
// src/components/Inputs/PhoneInput.tsx
|
|
1681
1699
|
var React27 = __toESM(require("react"), 1);
|
|
1682
|
-
var
|
|
1700
|
+
var import_icons9 = require("@bubo-squared/icons");
|
|
1683
1701
|
var RPNInput = __toESM(require("react-phone-number-input"), 1);
|
|
1684
1702
|
var import_flags = __toESM(require("react-phone-number-input/flags"), 1);
|
|
1685
1703
|
|
|
@@ -1738,11 +1756,114 @@ function Button2({
|
|
|
1738
1756
|
// src/components/ui/command.tsx
|
|
1739
1757
|
var React24 = require("react");
|
|
1740
1758
|
var import_cmdk = require("cmdk");
|
|
1741
|
-
var
|
|
1759
|
+
var import_icons8 = require("@bubo-squared/icons");
|
|
1742
1760
|
|
|
1743
1761
|
// src/components/ui/dialog.tsx
|
|
1744
1762
|
var React23 = require("react");
|
|
1745
1763
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1764
|
+
|
|
1765
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1766
|
+
var import_react2 = require("react");
|
|
1767
|
+
|
|
1768
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
1769
|
+
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1770
|
+
var toCamelCase = (string) => string.replace(
|
|
1771
|
+
/^([A-Z])|[\s-_]+(\w)/g,
|
|
1772
|
+
(match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()
|
|
1773
|
+
);
|
|
1774
|
+
var toPascalCase = (string) => {
|
|
1775
|
+
const camelCase = toCamelCase(string);
|
|
1776
|
+
return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
|
|
1777
|
+
};
|
|
1778
|
+
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
|
1779
|
+
return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index;
|
|
1780
|
+
}).join(" ").trim();
|
|
1781
|
+
var hasA11yProp = (props) => {
|
|
1782
|
+
for (const prop in props) {
|
|
1783
|
+
if (prop.startsWith("aria-") || prop === "role" || prop === "title") {
|
|
1784
|
+
return true;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
};
|
|
1788
|
+
|
|
1789
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
|
|
1790
|
+
var import_react = require("react");
|
|
1791
|
+
|
|
1792
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
|
1793
|
+
var defaultAttributes = {
|
|
1794
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1795
|
+
width: 24,
|
|
1796
|
+
height: 24,
|
|
1797
|
+
viewBox: "0 0 24 24",
|
|
1798
|
+
fill: "none",
|
|
1799
|
+
stroke: "currentColor",
|
|
1800
|
+
strokeWidth: 2,
|
|
1801
|
+
strokeLinecap: "round",
|
|
1802
|
+
strokeLinejoin: "round"
|
|
1803
|
+
};
|
|
1804
|
+
|
|
1805
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/Icon.js
|
|
1806
|
+
var Icon2 = (0, import_react.forwardRef)(
|
|
1807
|
+
({
|
|
1808
|
+
color = "currentColor",
|
|
1809
|
+
size = 24,
|
|
1810
|
+
strokeWidth = 2,
|
|
1811
|
+
absoluteStrokeWidth,
|
|
1812
|
+
className = "",
|
|
1813
|
+
children,
|
|
1814
|
+
iconNode,
|
|
1815
|
+
...rest
|
|
1816
|
+
}, ref) => (0, import_react.createElement)(
|
|
1817
|
+
"svg",
|
|
1818
|
+
{
|
|
1819
|
+
ref,
|
|
1820
|
+
...defaultAttributes,
|
|
1821
|
+
width: size,
|
|
1822
|
+
height: size,
|
|
1823
|
+
stroke: color,
|
|
1824
|
+
strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
|
|
1825
|
+
className: mergeClasses("lucide", className),
|
|
1826
|
+
...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
|
|
1827
|
+
...rest
|
|
1828
|
+
},
|
|
1829
|
+
[
|
|
1830
|
+
...iconNode.map(([tag, attrs]) => (0, import_react.createElement)(tag, attrs)),
|
|
1831
|
+
...Array.isArray(children) ? children : [children]
|
|
1832
|
+
]
|
|
1833
|
+
)
|
|
1834
|
+
);
|
|
1835
|
+
|
|
1836
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
1837
|
+
var createLucideIcon = (iconName, iconNode) => {
|
|
1838
|
+
const Component = (0, import_react2.forwardRef)(
|
|
1839
|
+
({ className, ...props }, ref) => (0, import_react2.createElement)(Icon2, {
|
|
1840
|
+
ref,
|
|
1841
|
+
iconNode,
|
|
1842
|
+
className: mergeClasses(
|
|
1843
|
+
`lucide-${toKebabCase(toPascalCase(iconName))}`,
|
|
1844
|
+
`lucide-${iconName}`,
|
|
1845
|
+
className
|
|
1846
|
+
),
|
|
1847
|
+
...props
|
|
1848
|
+
})
|
|
1849
|
+
);
|
|
1850
|
+
Component.displayName = toPascalCase(iconName);
|
|
1851
|
+
return Component;
|
|
1852
|
+
};
|
|
1853
|
+
|
|
1854
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/chevron-right.js
|
|
1855
|
+
var __iconNode = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
1856
|
+
var ChevronRight = createLucideIcon("chevron-right", __iconNode);
|
|
1857
|
+
|
|
1858
|
+
// ../../node_modules/.pnpm/lucide-react@0.555.0_react@19.2.3/node_modules/lucide-react/dist/esm/icons/ellipsis.js
|
|
1859
|
+
var __iconNode2 = [
|
|
1860
|
+
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
1861
|
+
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
1862
|
+
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
1863
|
+
];
|
|
1864
|
+
var Ellipsis = createLucideIcon("ellipsis", __iconNode2);
|
|
1865
|
+
|
|
1866
|
+
// src/components/ui/dialog.tsx
|
|
1746
1867
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1747
1868
|
|
|
1748
1869
|
// src/components/ui/command.tsx
|
|
@@ -1773,7 +1894,7 @@ function CommandInput({
|
|
|
1773
1894
|
"data-slot": "command-input-wrapper",
|
|
1774
1895
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
1775
1896
|
children: [
|
|
1776
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1897
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_icons8.SearchIcon, { className: "size-4 shrink-0 opacity-50 text-(--color-secondary)" }),
|
|
1777
1898
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1778
1899
|
import_cmdk.Command.Input,
|
|
1779
1900
|
{
|
|
@@ -2061,7 +2182,9 @@ var CountrySelect = ({
|
|
|
2061
2182
|
modal: true,
|
|
2062
2183
|
onOpenChange: (open) => {
|
|
2063
2184
|
setIsOpen(open);
|
|
2064
|
-
|
|
2185
|
+
if (open) {
|
|
2186
|
+
setSearchValue("");
|
|
2187
|
+
}
|
|
2065
2188
|
},
|
|
2066
2189
|
children: [
|
|
2067
2190
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
@@ -2080,7 +2203,7 @@ var CountrySelect = ({
|
|
|
2080
2203
|
}
|
|
2081
2204
|
),
|
|
2082
2205
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2083
|
-
|
|
2206
|
+
import_icons9.CodeIcon,
|
|
2084
2207
|
{
|
|
2085
2208
|
className: cn(
|
|
2086
2209
|
"-mr-2 size-4 opacity-50 rotate-90",
|
|
@@ -2162,7 +2285,7 @@ var CountrySelectOption = (props) => {
|
|
|
2162
2285
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "flex-1 text-sm", children: countryName }),
|
|
2163
2286
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "text-sm text-foreground/50", children: `+${RPNInput.getCountryCallingCode(country)}` }),
|
|
2164
2287
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2165
|
-
|
|
2288
|
+
import_icons9.CheckIcon,
|
|
2166
2289
|
{
|
|
2167
2290
|
className: `ml-auto size-4 ${country === selectedCountry ? "opacity-100" : "opacity-0"}`
|
|
2168
2291
|
}
|
|
@@ -2180,7 +2303,6 @@ var FlagComponent = ({ country, countryName }) => {
|
|
|
2180
2303
|
var React28 = __toESM(require("react"), 1);
|
|
2181
2304
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
2182
2305
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2183
|
-
var wrapperBase = "flex flex-col gap-2 items-start";
|
|
2184
2306
|
var RadioGroup = ({
|
|
2185
2307
|
label,
|
|
2186
2308
|
hint,
|
|
@@ -2200,123 +2322,102 @@ var RadioGroup = ({
|
|
|
2200
2322
|
onValueChange?.(next);
|
|
2201
2323
|
};
|
|
2202
2324
|
const isHorizontal = orientation === "horizontal";
|
|
2203
|
-
return /* @__PURE__ */ (0, import_jsx_runtime30.
|
|
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
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
)
|
|
2294
|
-
]
|
|
2295
|
-
}
|
|
2296
|
-
)
|
|
2297
|
-
},
|
|
2298
|
-
option.value
|
|
2299
|
-
))
|
|
2300
|
-
}
|
|
2301
|
-
),
|
|
2302
|
-
!hideHint && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2303
|
-
"p",
|
|
2304
|
-
{
|
|
2305
|
-
id: hintId,
|
|
2306
|
-
className: cn(
|
|
2307
|
-
"caption text-(--color-secondary)",
|
|
2308
|
-
disabled && "text-primary-disabled"
|
|
2309
|
-
),
|
|
2310
|
-
children: hint ?? "\xA0"
|
|
2311
|
-
}
|
|
2312
|
-
)
|
|
2313
|
-
] });
|
|
2325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2326
|
+
Field,
|
|
2327
|
+
{
|
|
2328
|
+
label,
|
|
2329
|
+
hint,
|
|
2330
|
+
hideHint,
|
|
2331
|
+
disabled,
|
|
2332
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2333
|
+
RadioGroupPrimitive.Root,
|
|
2334
|
+
{
|
|
2335
|
+
...rootProps,
|
|
2336
|
+
value,
|
|
2337
|
+
defaultValue,
|
|
2338
|
+
onValueChange: handleValueChange,
|
|
2339
|
+
disabled,
|
|
2340
|
+
"aria-describedby": hintId,
|
|
2341
|
+
className: cn(
|
|
2342
|
+
"flex",
|
|
2343
|
+
isHorizontal ? "flex-row gap-6" : "flex-col gap-2",
|
|
2344
|
+
className
|
|
2345
|
+
),
|
|
2346
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "relative inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2347
|
+
RadioGroupPrimitive.Item,
|
|
2348
|
+
{
|
|
2349
|
+
value: option.value,
|
|
2350
|
+
disabled: disabled || option.disabled,
|
|
2351
|
+
className: cn(
|
|
2352
|
+
"group inline-flex items-center gap-2 outline-none",
|
|
2353
|
+
"data-disabled:pointer-events-none",
|
|
2354
|
+
disabled || option.disabled ? "cursor-default" : "cursor-pointer"
|
|
2355
|
+
),
|
|
2356
|
+
children: [
|
|
2357
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2358
|
+
"span",
|
|
2359
|
+
{
|
|
2360
|
+
className: cn(
|
|
2361
|
+
"flex items-center justify-center shrink-0 h-5 w-5 rounded-full border bg-(--background-primary) transition-all",
|
|
2362
|
+
// 1: enabled, unchecked, unfocused, unhovered
|
|
2363
|
+
"group-data-[state=unchecked]:border-(--border-secondary)",
|
|
2364
|
+
// 2: enabled, checked, unfocused, unhovered
|
|
2365
|
+
"group-data-[state=checked]:border-(--border-brand)",
|
|
2366
|
+
// 3: enabled, unchecked, hovered, unfocused
|
|
2367
|
+
"group-data-[state=unchecked]:group-hover:border-(--border-secondary-hover)",
|
|
2368
|
+
// 4: enabled, checked, hovered, unfocused
|
|
2369
|
+
"group-data-[state=checked]:group-hover:border-(--border-brand-hover)",
|
|
2370
|
+
"group-data-[state=checked]:group-hover:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-secondary)]",
|
|
2371
|
+
// 5: enabled, unchecked, focused (override 1/3)
|
|
2372
|
+
"group-data-[state=unchecked]:group-focus-visible:border-(--border-secondary-hover)",
|
|
2373
|
+
// 6: enabled, checked, focused (override 2/4)
|
|
2374
|
+
"group-data-[state=checked]:group-focus-visible:border-(--border-brand-focus)",
|
|
2375
|
+
"group-data-[state=checked]:group-focus-visible:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-primary)]",
|
|
2376
|
+
// 7: disabled, unchecked (override everything above)
|
|
2377
|
+
"group-[&[data-disabled][data-state=unchecked]]:border-none",
|
|
2378
|
+
"group-[&[data-disabled][data-state=unchecked]]:bg-(--background-primary-disabled)",
|
|
2379
|
+
// 8: disabled, checked (override everything above)
|
|
2380
|
+
"group-[&[data-disabled][data-state=checked]]:border-(--border-primary-disabled)",
|
|
2381
|
+
"group-[&[data-disabled][data-state=checked]]:bg-(--background-primary-disabled)"
|
|
2382
|
+
),
|
|
2383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2384
|
+
"span",
|
|
2385
|
+
{
|
|
2386
|
+
className: cn(
|
|
2387
|
+
"h-4 w-4 rounded-full bg-(--background-brand) scale-0 transition-transform",
|
|
2388
|
+
"group-data-[state=checked]:scale-100",
|
|
2389
|
+
"group-data-[state=checked]:group-hover:bg-(--background-brand-hover)",
|
|
2390
|
+
"group-data-[state=checked]:group-focus-visible:bg-(--background-brand-hover)",
|
|
2391
|
+
"group-[&[data-disabled][data-state=checked]]:bg-(--background-brand-disabled)",
|
|
2392
|
+
"group-[&[data-disabled][data-state=unchecked]]:scale-0"
|
|
2393
|
+
)
|
|
2394
|
+
}
|
|
2395
|
+
)
|
|
2396
|
+
}
|
|
2397
|
+
),
|
|
2398
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2399
|
+
"span",
|
|
2400
|
+
{
|
|
2401
|
+
className: cn(
|
|
2402
|
+
"paragraph-sm text-primary",
|
|
2403
|
+
"group-data-disabled:text-primary-disabled whitespace-nowrap"
|
|
2404
|
+
),
|
|
2405
|
+
children: option.label
|
|
2406
|
+
}
|
|
2407
|
+
)
|
|
2408
|
+
]
|
|
2409
|
+
}
|
|
2410
|
+
) }, option.value))
|
|
2411
|
+
}
|
|
2412
|
+
)
|
|
2413
|
+
}
|
|
2414
|
+
);
|
|
2314
2415
|
};
|
|
2315
2416
|
|
|
2316
2417
|
// src/components/Inputs/SearchInput.tsx
|
|
2317
2418
|
var React29 = __toESM(require("react"), 1);
|
|
2318
2419
|
var import_class_variance_authority17 = require("class-variance-authority");
|
|
2319
|
-
var
|
|
2420
|
+
var import_icons10 = require("@bubo-squared/icons");
|
|
2320
2421
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2321
2422
|
var searchTextVariants = (0, import_class_variance_authority17.cva)("truncate", {
|
|
2322
2423
|
variants: {
|
|
@@ -2364,7 +2465,7 @@ var SearchInput = (props) => {
|
|
|
2364
2465
|
inputRef.current?.focus();
|
|
2365
2466
|
};
|
|
2366
2467
|
const showTrailingIcon = !!trailingIcon;
|
|
2367
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col gap-2 items-start", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "relative w-full", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex flex-col gap-2 items-start w-full", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "relative w-full", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2368
2469
|
InputShell,
|
|
2369
2470
|
{
|
|
2370
2471
|
size,
|
|
@@ -2373,7 +2474,7 @@ var SearchInput = (props) => {
|
|
|
2373
2474
|
className,
|
|
2374
2475
|
onClick: handleContainerClick,
|
|
2375
2476
|
children: [
|
|
2376
|
-
showLeadingIcon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: cn(iconWrapperVariants2({ size, disabled: !!disabled })), children: leadingIcon ?? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2477
|
+
showLeadingIcon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: cn(iconWrapperVariants2({ size, disabled: !!disabled })), children: leadingIcon ?? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_icons10.SearchIcon, {}) }),
|
|
2377
2478
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2378
2479
|
Input,
|
|
2379
2480
|
{
|
|
@@ -2398,7 +2499,7 @@ SearchInput.displayName = "SearchInput";
|
|
|
2398
2499
|
// src/components/Inputs/Slider.tsx
|
|
2399
2500
|
var React30 = __toESM(require("react"), 1);
|
|
2400
2501
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2401
|
-
var
|
|
2502
|
+
var wrapperBase = "flex flex-col gap-2 items-start";
|
|
2402
2503
|
var isRangeProps = (props) => {
|
|
2403
2504
|
return Array.isArray(props.value) || Array.isArray(props.defaultValue);
|
|
2404
2505
|
};
|
|
@@ -2408,6 +2509,7 @@ var toArray = (value) => {
|
|
|
2408
2509
|
};
|
|
2409
2510
|
var Slider = (props) => {
|
|
2410
2511
|
const {
|
|
2512
|
+
name,
|
|
2411
2513
|
display = "flat",
|
|
2412
2514
|
tooltipPlacement = "top",
|
|
2413
2515
|
tooltipFormatter,
|
|
@@ -2455,29 +2557,12 @@ var Slider = (props) => {
|
|
|
2455
2557
|
const trackRef = React30.useRef(null);
|
|
2456
2558
|
const [draggingThumbIndex, setDraggingThumbIndex] = React30.useState(null);
|
|
2457
2559
|
const [hoveredThumbIndex, setHoveredThumbIndex] = React30.useState(null);
|
|
2458
|
-
const clamp = (val) => {
|
|
2560
|
+
const clamp = React30.useCallback((val) => {
|
|
2459
2561
|
if (val < min) return min;
|
|
2460
2562
|
if (val > max) return max;
|
|
2461
2563
|
return val;
|
|
2462
|
-
};
|
|
2463
|
-
React30.
|
|
2464
|
-
if (!isControlled) {
|
|
2465
|
-
setInternalValue((prev) => {
|
|
2466
|
-
const clamped = prev.map((v) => clamp(v));
|
|
2467
|
-
if (isRange && clamped.length === 2 && step > 0) {
|
|
2468
|
-
return enforceMinGap(clamped, prev);
|
|
2469
|
-
}
|
|
2470
|
-
return clamped;
|
|
2471
|
-
});
|
|
2472
|
-
}
|
|
2473
|
-
}, [isControlled, min, max, isRange]);
|
|
2474
|
-
const snap = (val) => {
|
|
2475
|
-
const range = max - min;
|
|
2476
|
-
if (range <= 0 || step <= 0) return clamp(val);
|
|
2477
|
-
const stepsFromMin = Math.round((val - min) / step);
|
|
2478
|
-
return clamp(min + stepsFromMin * step);
|
|
2479
|
-
};
|
|
2480
|
-
const enforceMinGap = (next, prev) => {
|
|
2564
|
+
}, [min, max]);
|
|
2565
|
+
const enforceMinGap = React30.useCallback((next, prev) => {
|
|
2481
2566
|
if (!isRange || next.length !== 2 || step <= 0) return next;
|
|
2482
2567
|
let [low, high] = next;
|
|
2483
2568
|
const [prevLow, prevHigh] = prev.length === 2 ? prev : next;
|
|
@@ -2500,6 +2585,23 @@ var Slider = (props) => {
|
|
|
2500
2585
|
}
|
|
2501
2586
|
}
|
|
2502
2587
|
return [low, high];
|
|
2588
|
+
}, [isRange, step, clamp]);
|
|
2589
|
+
React30.useEffect(() => {
|
|
2590
|
+
if (!isControlled) {
|
|
2591
|
+
setInternalValue((prev) => {
|
|
2592
|
+
const clamped = prev.map((v) => clamp(v));
|
|
2593
|
+
if (isRange && clamped.length === 2 && step > 0) {
|
|
2594
|
+
return enforceMinGap(clamped, prev);
|
|
2595
|
+
}
|
|
2596
|
+
return clamped;
|
|
2597
|
+
});
|
|
2598
|
+
}
|
|
2599
|
+
}, [isControlled, clamp, enforceMinGap, isRange, step]);
|
|
2600
|
+
const snap = (val) => {
|
|
2601
|
+
const range = max - min;
|
|
2602
|
+
if (range <= 0 || step <= 0) return clamp(val);
|
|
2603
|
+
const stepsFromMin = Math.round((val - min) / step);
|
|
2604
|
+
return clamp(min + stepsFromMin * step);
|
|
2503
2605
|
};
|
|
2504
2606
|
const updateValue = (next) => {
|
|
2505
2607
|
let normalized = normalizeArray(next, current);
|
|
@@ -2722,7 +2824,7 @@ var Slider = (props) => {
|
|
|
2722
2824
|
style: {
|
|
2723
2825
|
left: `${percent}%`,
|
|
2724
2826
|
top: `calc(50% - ${trackHeight / 2}px)`,
|
|
2725
|
-
|
|
2827
|
+
"--slider-halo-color": "color-mix(in srgb, var(--color-brand) 10%, transparent)"
|
|
2726
2828
|
},
|
|
2727
2829
|
onPointerEnter: () => {
|
|
2728
2830
|
setHoveredThumbIndex(index);
|
|
@@ -2741,66 +2843,88 @@ var Slider = (props) => {
|
|
|
2741
2843
|
index
|
|
2742
2844
|
);
|
|
2743
2845
|
};
|
|
2744
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.
|
|
2846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2745
2847
|
"div",
|
|
2746
2848
|
{
|
|
2747
|
-
className:
|
|
2849
|
+
className: wrapperBase,
|
|
2748
2850
|
style: { marginInline: `${thumbRadius}px` },
|
|
2749
|
-
children:
|
|
2750
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2751
|
-
|
|
2752
|
-
"
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
secondaryPercent,
|
|
2760
|
-
formatDisplayValue(secondary),
|
|
2761
|
-
hoveredThumbIndex === 1 || draggingThumbIndex === 1
|
|
2851
|
+
children: [
|
|
2852
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
2853
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2854
|
+
"input",
|
|
2855
|
+
{
|
|
2856
|
+
type: "hidden",
|
|
2857
|
+
name,
|
|
2858
|
+
value: primary === void 0 ? "" : String(primary),
|
|
2859
|
+
disabled
|
|
2860
|
+
}
|
|
2762
2861
|
),
|
|
2763
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.
|
|
2764
|
-
"
|
|
2862
|
+
isRange && secondary !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2863
|
+
"input",
|
|
2765
2864
|
{
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
style: { height: `${trackHeight}px` },
|
|
2771
|
-
ref: trackRef,
|
|
2772
|
-
onPointerDown: handleTrackPointerDown,
|
|
2773
|
-
children: [
|
|
2774
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2775
|
-
"div",
|
|
2776
|
-
{
|
|
2777
|
-
className: cn(
|
|
2778
|
-
"absolute h-full rounded-4",
|
|
2779
|
-
disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-secondary)"
|
|
2780
|
-
),
|
|
2781
|
-
style: {
|
|
2782
|
-
width: `calc(100% + ${thumbWidth}px)`,
|
|
2783
|
-
left: `-${thumbRadius}px`
|
|
2784
|
-
}
|
|
2785
|
-
}
|
|
2786
|
-
),
|
|
2787
|
-
renderHandle(0, primaryPercent, formatDisplayValue(primary)),
|
|
2788
|
-
isRange && secondary !== void 0 && renderHandle(1, secondaryPercent, formatDisplayValue(secondary))
|
|
2789
|
-
]
|
|
2865
|
+
type: "hidden",
|
|
2866
|
+
name,
|
|
2867
|
+
value: String(secondary),
|
|
2868
|
+
disabled
|
|
2790
2869
|
}
|
|
2791
2870
|
)
|
|
2792
2871
|
] }),
|
|
2793
|
-
|
|
2794
|
-
"
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2872
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("w-full flex flex-col gap-1", className), children: [
|
|
2873
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "relative w-full", children: [
|
|
2874
|
+
showTooltip && primary !== void 0 && renderTooltipBubble(
|
|
2875
|
+
"primary",
|
|
2876
|
+
primaryPercent,
|
|
2877
|
+
formatDisplayValue(primary),
|
|
2878
|
+
hoveredThumbIndex === 0 || draggingThumbIndex === 0
|
|
2799
2879
|
),
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2880
|
+
showTooltip && isRange && secondary !== void 0 && renderTooltipBubble(
|
|
2881
|
+
"secondary",
|
|
2882
|
+
secondaryPercent,
|
|
2883
|
+
formatDisplayValue(secondary),
|
|
2884
|
+
hoveredThumbIndex === 1 || draggingThumbIndex === 1
|
|
2885
|
+
),
|
|
2886
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2887
|
+
"div",
|
|
2888
|
+
{
|
|
2889
|
+
className: cn(
|
|
2890
|
+
"relative w-full flex items-center rounded-4",
|
|
2891
|
+
disabled ? "bg-(--background-primary-disabled) cursor-default" : "bg-(--background-secondary) cursor-pointer"
|
|
2892
|
+
),
|
|
2893
|
+
style: { height: `${trackHeight}px` },
|
|
2894
|
+
ref: trackRef,
|
|
2895
|
+
onPointerDown: handleTrackPointerDown,
|
|
2896
|
+
children: [
|
|
2897
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2898
|
+
"div",
|
|
2899
|
+
{
|
|
2900
|
+
className: cn(
|
|
2901
|
+
"absolute h-full rounded-4",
|
|
2902
|
+
disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-secondary)"
|
|
2903
|
+
),
|
|
2904
|
+
style: {
|
|
2905
|
+
width: `calc(100% + ${thumbWidth}px)`,
|
|
2906
|
+
left: `-${thumbRadius}px`
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
),
|
|
2910
|
+
renderHandle(0, primaryPercent, formatDisplayValue(primary)),
|
|
2911
|
+
isRange && secondary !== void 0 && renderHandle(1, secondaryPercent, formatDisplayValue(secondary))
|
|
2912
|
+
]
|
|
2913
|
+
}
|
|
2914
|
+
)
|
|
2915
|
+
] }),
|
|
2916
|
+
showNumeric && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2917
|
+
"p",
|
|
2918
|
+
{
|
|
2919
|
+
className: cn(
|
|
2920
|
+
"paragraph-sm text-primary",
|
|
2921
|
+
disabled && "text-primary-disabled"
|
|
2922
|
+
),
|
|
2923
|
+
children: formatNumericLabel()
|
|
2924
|
+
}
|
|
2925
|
+
)
|
|
2926
|
+
] })
|
|
2927
|
+
]
|
|
2804
2928
|
}
|
|
2805
2929
|
);
|
|
2806
2930
|
};
|
|
@@ -2808,9 +2932,8 @@ Slider.displayName = "Slider";
|
|
|
2808
2932
|
|
|
2809
2933
|
// src/components/Inputs/TextArea.tsx
|
|
2810
2934
|
var React31 = __toESM(require("react"), 1);
|
|
2811
|
-
var
|
|
2935
|
+
var import_icons11 = require("@bubo-squared/icons");
|
|
2812
2936
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2813
|
-
var wrapperBase3 = "flex flex-col gap-2 items-start w-full";
|
|
2814
2937
|
var TextArea = (props) => {
|
|
2815
2938
|
const {
|
|
2816
2939
|
label,
|
|
@@ -2825,6 +2948,8 @@ var TextArea = (props) => {
|
|
|
2825
2948
|
defaultValue,
|
|
2826
2949
|
onChange,
|
|
2827
2950
|
rows = 3,
|
|
2951
|
+
id,
|
|
2952
|
+
name,
|
|
2828
2953
|
...textareaProps
|
|
2829
2954
|
} = props;
|
|
2830
2955
|
const isControlled = value !== void 0;
|
|
@@ -2852,9 +2977,8 @@ var TextArea = (props) => {
|
|
|
2852
2977
|
}
|
|
2853
2978
|
onChange?.(event);
|
|
2854
2979
|
};
|
|
2855
|
-
const
|
|
2856
|
-
const
|
|
2857
|
-
const hintId = `${inputId}-hint`;
|
|
2980
|
+
const generatedId = React31.useId();
|
|
2981
|
+
const textareaId = id ?? generatedId;
|
|
2858
2982
|
const statusBorderClass = {
|
|
2859
2983
|
default: "",
|
|
2860
2984
|
success: "border-(--border-success)",
|
|
@@ -2865,7 +2989,6 @@ var TextArea = (props) => {
|
|
|
2865
2989
|
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)]",
|
|
2866
2990
|
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)]"
|
|
2867
2991
|
};
|
|
2868
|
-
const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
|
|
2869
2992
|
const counterColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-primary";
|
|
2870
2993
|
const handleResizePointerDown = (event) => {
|
|
2871
2994
|
if (disabled) return;
|
|
@@ -2891,102 +3014,90 @@ var TextArea = (props) => {
|
|
|
2891
3014
|
window.addEventListener("pointermove", handlePointerMove);
|
|
2892
3015
|
window.addEventListener("pointerup", handlePointerUp);
|
|
2893
3016
|
};
|
|
2894
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
disabled && "bg-(--background-primary-disabled) border-(--border-secondary-disabled) cursor-default",
|
|
2914
|
-
statusBorderClass[status],
|
|
2915
|
-
!disabled && statusFocusClass[status],
|
|
2916
|
-
className
|
|
2917
|
-
),
|
|
2918
|
-
ref: containerRef,
|
|
2919
|
-
style: {
|
|
2920
|
-
...type === "responsive" && height !== void 0 ? { height } : {},
|
|
2921
|
-
...type === "responsive" && width !== void 0 ? { width } : {}
|
|
2922
|
-
},
|
|
2923
|
-
onClick: handleContainerClick,
|
|
2924
|
-
"aria-disabled": disabled || void 0,
|
|
2925
|
-
children: [
|
|
2926
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2927
|
-
"textarea",
|
|
2928
|
-
{
|
|
2929
|
-
id: inputId,
|
|
2930
|
-
ref: textareaRef,
|
|
2931
|
-
"aria-labelledby": label ? labelId : void 0,
|
|
2932
|
-
"aria-describedby": hint ? hintId : void 0,
|
|
2933
|
-
disabled: disabled ?? void 0,
|
|
2934
|
-
value: isControlled ? value : currentValue,
|
|
2935
|
-
defaultValue: isControlled ? void 0 : defaultValue,
|
|
2936
|
-
onChange: handleChange,
|
|
2937
|
-
rows,
|
|
2938
|
-
maxLength: effectiveMaxLength,
|
|
2939
|
-
className: cn(
|
|
2940
|
-
"paragraph-md bg-transparent outline-none w-full h-full resize-none px-2 py-2 pr-8",
|
|
2941
|
-
disabled ? "text-primary-disabled" : hasValue ? "text-primary" : "text-(--color-secondary)",
|
|
2942
|
-
showCharacterLimit && "pr-16"
|
|
2943
|
-
),
|
|
2944
|
-
...textareaProps
|
|
2945
|
-
}
|
|
2946
|
-
),
|
|
2947
|
-
showCharacterLimit && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2948
|
-
"span",
|
|
2949
|
-
{
|
|
2950
|
-
className: cn(
|
|
2951
|
-
"absolute bottom-1 right-1 footnote mb-0!",
|
|
2952
|
-
counterColorClass
|
|
2953
|
-
),
|
|
2954
|
-
children: [
|
|
2955
|
-
currentLength,
|
|
2956
|
-
"/",
|
|
2957
|
-
effectiveMaxLength
|
|
2958
|
-
]
|
|
2959
|
-
}
|
|
3017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3018
|
+
Field,
|
|
3019
|
+
{
|
|
3020
|
+
className: "w-full",
|
|
3021
|
+
label,
|
|
3022
|
+
hint,
|
|
3023
|
+
hideHint,
|
|
3024
|
+
status,
|
|
3025
|
+
disabled,
|
|
3026
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
3027
|
+
"div",
|
|
3028
|
+
{
|
|
3029
|
+
className: cn(
|
|
3030
|
+
"relative flex w-full rounded-4 border bg-(--background-primary) cursor-text transition-colors",
|
|
3031
|
+
"border-(--border-secondary) hover:border-(--border-secondary-hover) hover:bg-(--background-primary-hover)",
|
|
3032
|
+
disabled && "bg-(--background-primary-disabled) border-(--border-secondary-disabled) cursor-default",
|
|
3033
|
+
statusBorderClass[status],
|
|
3034
|
+
!disabled && statusFocusClass[status],
|
|
3035
|
+
className
|
|
2960
3036
|
),
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
{
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
3037
|
+
ref: containerRef,
|
|
3038
|
+
style: {
|
|
3039
|
+
...type === "responsive" && height !== void 0 ? { height } : {},
|
|
3040
|
+
...type === "responsive" && width !== void 0 ? { width } : {}
|
|
3041
|
+
},
|
|
3042
|
+
onClick: handleContainerClick,
|
|
3043
|
+
"aria-disabled": disabled || void 0,
|
|
3044
|
+
children: [
|
|
3045
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3046
|
+
"textarea",
|
|
3047
|
+
{
|
|
3048
|
+
id: textareaId,
|
|
3049
|
+
name,
|
|
3050
|
+
ref: textareaRef,
|
|
3051
|
+
disabled: disabled ?? void 0,
|
|
3052
|
+
value: isControlled ? value : currentValue,
|
|
3053
|
+
defaultValue: isControlled ? void 0 : defaultValue,
|
|
3054
|
+
onChange: handleChange,
|
|
3055
|
+
rows,
|
|
3056
|
+
maxLength: effectiveMaxLength,
|
|
3057
|
+
className: cn(
|
|
3058
|
+
"paragraph-md bg-transparent outline-none w-full h-full resize-none px-2 py-2 pr-8",
|
|
3059
|
+
disabled ? "text-primary-disabled" : hasValue ? "text-primary" : "text-(--color-secondary)",
|
|
3060
|
+
showCharacterLimit && "pr-16"
|
|
3061
|
+
),
|
|
3062
|
+
...textareaProps
|
|
3063
|
+
}
|
|
3064
|
+
),
|
|
3065
|
+
showCharacterLimit && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
3066
|
+
"span",
|
|
3067
|
+
{
|
|
3068
|
+
className: cn(
|
|
3069
|
+
"absolute bottom-1 right-1 footnote mb-0!",
|
|
3070
|
+
counterColorClass
|
|
3071
|
+
),
|
|
3072
|
+
children: [
|
|
3073
|
+
currentLength,
|
|
3074
|
+
"/",
|
|
3075
|
+
effectiveMaxLength
|
|
3076
|
+
]
|
|
3077
|
+
}
|
|
3078
|
+
),
|
|
3079
|
+
type === "responsive" && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3080
|
+
"div",
|
|
3081
|
+
{
|
|
3082
|
+
className: "absolute bottom-1 right-1 h-3 w-3 " + (disabled ? "cursor-auto" : "cursor-nwse-resize"),
|
|
3083
|
+
onPointerDown: disabled ? void 0 : handleResizePointerDown,
|
|
3084
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3085
|
+
"span",
|
|
3086
|
+
{
|
|
3087
|
+
className: cn(
|
|
3088
|
+
"absolute bottom-0 right-0 flex h-4 w-4 items-center justify-center text-(--icon-primary)",
|
|
3089
|
+
disabled && "text-(--icon-primary-disabled)"
|
|
3090
|
+
),
|
|
3091
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons11.MaximizeIcon, {})
|
|
3092
|
+
}
|
|
3093
|
+
)
|
|
3094
|
+
}
|
|
3095
|
+
)
|
|
3096
|
+
]
|
|
3097
|
+
}
|
|
3098
|
+
)
|
|
3099
|
+
}
|
|
3100
|
+
);
|
|
2990
3101
|
};
|
|
2991
3102
|
TextArea.displayName = "TextArea";
|
|
2992
3103
|
|
|
@@ -3303,9 +3414,9 @@ var Popover2 = (props) => {
|
|
|
3303
3414
|
onOk?.();
|
|
3304
3415
|
setOpen(false);
|
|
3305
3416
|
};
|
|
3306
|
-
const popoverClasses = "group bg-(--background-popover) popover w-80 max-w-[calc(100vw-2rem)] shadow-card-md border-none [
|
|
3307
|
-
const popoverArrowClasses = "relative fill-(--background-popover) transition-[filter,transform] group-data-[side=top]:top-[-2px] group-data-[side=top]:drop-shadow-[
|
|
3308
|
-
const
|
|
3417
|
+
const popoverClasses = "group bg-(--background-popover) popover w-80 max-w-[calc(100vw-2rem)] shadow-card-md border-none [&>span]:scale-240 rounded-4";
|
|
3418
|
+
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)]";
|
|
3419
|
+
const mapPlacementToSideAndAlign2 = (placement2) => {
|
|
3309
3420
|
switch (placement2) {
|
|
3310
3421
|
case "top":
|
|
3311
3422
|
return { side: "top", align: "center" };
|
|
@@ -3335,7 +3446,7 @@ var Popover2 = (props) => {
|
|
|
3335
3446
|
return { side: "bottom", align: "center" };
|
|
3336
3447
|
}
|
|
3337
3448
|
};
|
|
3338
|
-
const { side, align } =
|
|
3449
|
+
const { side, align } = mapPlacementToSideAndAlign2(placement);
|
|
3339
3450
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
3340
3451
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PopoverTrigger, { asChild: true, children }),
|
|
3341
3452
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
@@ -3365,82 +3476,344 @@ var Popover2 = (props) => {
|
|
|
3365
3476
|
};
|
|
3366
3477
|
Popover2.displayName = "Popover";
|
|
3367
3478
|
|
|
3368
|
-
// src/components/
|
|
3369
|
-
var React36 =
|
|
3370
|
-
var
|
|
3371
|
-
var import_class_variance_authority19 = require("class-variance-authority");
|
|
3372
|
-
var import_icons11 = require("@bubo-squared/icons");
|
|
3479
|
+
// src/components/Feedback/Tooltip.tsx
|
|
3480
|
+
var React36 = require("react");
|
|
3481
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3373
3482
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3374
|
-
var
|
|
3375
|
-
var
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
}
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3483
|
+
var TooltipArrow = TooltipPrimitive.Arrow;
|
|
3484
|
+
var mapPlacementToSideAndAlign = (placement) => {
|
|
3485
|
+
switch (placement) {
|
|
3486
|
+
case "top":
|
|
3487
|
+
return { side: "top", align: "center" };
|
|
3488
|
+
case "topLeft":
|
|
3489
|
+
return { side: "top", align: "start" };
|
|
3490
|
+
case "topRight":
|
|
3491
|
+
return { side: "top", align: "end" };
|
|
3492
|
+
case "bottom":
|
|
3493
|
+
return { side: "bottom", align: "center" };
|
|
3494
|
+
case "bottomLeft":
|
|
3495
|
+
return { side: "bottom", align: "start" };
|
|
3496
|
+
case "bottomRight":
|
|
3497
|
+
return { side: "bottom", align: "end" };
|
|
3498
|
+
case "left":
|
|
3499
|
+
return { side: "left", align: "center" };
|
|
3500
|
+
case "leftTop":
|
|
3501
|
+
return { side: "left", align: "start" };
|
|
3502
|
+
case "leftBottom":
|
|
3503
|
+
return { side: "left", align: "end" };
|
|
3504
|
+
case "right":
|
|
3505
|
+
return { side: "right", align: "center" };
|
|
3506
|
+
case "rightTop":
|
|
3507
|
+
return { side: "right", align: "start" };
|
|
3508
|
+
case "rightBottom":
|
|
3509
|
+
return { side: "right", align: "end" };
|
|
3510
|
+
default:
|
|
3511
|
+
return { side: "top", align: "center" };
|
|
3387
3512
|
}
|
|
3388
|
-
|
|
3389
|
-
var
|
|
3390
|
-
"font-normal text-[length:var(--font-size-paragraph-lg-18)] leading-[var(--font-line-height-28)] tracking-[var(--font-letter-spacing-02)] whitespace-nowrap",
|
|
3391
|
-
{
|
|
3392
|
-
variants: {
|
|
3393
|
-
variant: {
|
|
3394
|
-
colored: "text-(--color-brand) group-hover:text-(--color-brand-hover) group-focus-visible:text-(--color-brand-focus) group-disabled:text-(--color-brand-disabled)",
|
|
3395
|
-
flat: "text-primary group-hover:text-(--color-primary-hover) group-focus-visible:text-(--color-primary-focus) group-disabled:text-primary-disabled"
|
|
3396
|
-
}
|
|
3397
|
-
},
|
|
3398
|
-
defaultVariants: {
|
|
3399
|
-
variant: "flat"
|
|
3400
|
-
}
|
|
3401
|
-
}
|
|
3402
|
-
);
|
|
3403
|
-
var Breadcrumb = React36.forwardRef((props, ref) => {
|
|
3513
|
+
};
|
|
3514
|
+
var Tooltip = (props) => {
|
|
3404
3515
|
const {
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
showText = true,
|
|
3410
|
-
icon,
|
|
3516
|
+
strapline,
|
|
3517
|
+
title,
|
|
3518
|
+
description,
|
|
3519
|
+
showArrow = true,
|
|
3411
3520
|
className,
|
|
3412
|
-
|
|
3413
|
-
|
|
3521
|
+
placement = "top",
|
|
3522
|
+
offset = 10,
|
|
3523
|
+
disableHoverableContent,
|
|
3524
|
+
open,
|
|
3525
|
+
defaultOpen,
|
|
3526
|
+
onOpenChange,
|
|
3527
|
+
children
|
|
3414
3528
|
} = props;
|
|
3415
|
-
const
|
|
3416
|
-
const
|
|
3529
|
+
const { side, align } = mapPlacementToSideAndAlign(placement);
|
|
3530
|
+
const tooltipClasses = "group bg-(--background-popover) max-w-[calc(100vw-2rem)] shadow-card-md border-none rounded-4 p-4 [&>span]:scale-200 data-[state=delayed-open]:animate-in data-[state=instant-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[state=instant-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=instant-open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
|
|
3531
|
+
const tooltipArrowClasses = "relative fill-(--background-popover) transition-[filter,transform] group-data-[side=top]:top-[-2px] group-data-[side=top]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=bottom]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=left]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=right]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)]";
|
|
3417
3532
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3418
|
-
|
|
3533
|
+
TooltipPrimitive.Root,
|
|
3419
3534
|
{
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3535
|
+
open,
|
|
3536
|
+
defaultOpen,
|
|
3537
|
+
onOpenChange,
|
|
3538
|
+
disableHoverableContent,
|
|
3424
3539
|
children: [
|
|
3425
|
-
|
|
3426
|
-
|
|
3540
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipPrimitive.Trigger, { asChild: true, children }),
|
|
3541
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3542
|
+
TooltipPrimitive.Content,
|
|
3543
|
+
{
|
|
3544
|
+
side,
|
|
3545
|
+
align,
|
|
3546
|
+
sideOffset: offset,
|
|
3547
|
+
className: cn(tooltipClasses, className),
|
|
3548
|
+
children: [
|
|
3549
|
+
showArrow && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TooltipArrow, { className: tooltipArrowClasses }),
|
|
3550
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "grid gap-2", children: [
|
|
3551
|
+
(strapline ?? "") !== "" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "caption text-secondary", children: strapline }),
|
|
3552
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h4", { className: "subtitle-medium text-primary", children: title }),
|
|
3553
|
+
(description ?? "") !== "" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "paragraph-sm text-primary", children: description })
|
|
3554
|
+
] })
|
|
3555
|
+
]
|
|
3556
|
+
}
|
|
3557
|
+
) })
|
|
3427
3558
|
]
|
|
3428
3559
|
}
|
|
3429
3560
|
);
|
|
3430
|
-
}
|
|
3431
|
-
|
|
3561
|
+
};
|
|
3562
|
+
Tooltip.displayName = "Tooltip";
|
|
3432
3563
|
|
|
3433
|
-
// src/components/
|
|
3434
|
-
var
|
|
3564
|
+
// src/components/Feedback/TooltipProvider.tsx
|
|
3565
|
+
var React37 = require("react");
|
|
3566
|
+
var TooltipPrimitive2 = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3435
3567
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3436
|
-
var
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3568
|
+
var TooltipProvider = (props) => {
|
|
3569
|
+
const {
|
|
3570
|
+
children,
|
|
3571
|
+
delayDuration = 200,
|
|
3572
|
+
skipDelayDuration = 300,
|
|
3573
|
+
disableHoverableContent = false
|
|
3574
|
+
} = props;
|
|
3575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3576
|
+
TooltipPrimitive2.Provider,
|
|
3577
|
+
{
|
|
3578
|
+
delayDuration,
|
|
3579
|
+
skipDelayDuration,
|
|
3580
|
+
disableHoverableContent,
|
|
3581
|
+
children
|
|
3582
|
+
}
|
|
3583
|
+
);
|
|
3584
|
+
};
|
|
3585
|
+
TooltipProvider.displayName = "TooltipProvider";
|
|
3586
|
+
|
|
3587
|
+
// src/components/Navigation/Breadcrumbs.tsx
|
|
3588
|
+
var React40 = __toESM(require("react"), 1);
|
|
3589
|
+
|
|
3590
|
+
// src/components/ui/breadcrumb.tsx
|
|
3591
|
+
var React38 = require("react");
|
|
3592
|
+
var import_react_slot8 = require("@radix-ui/react-slot");
|
|
3593
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3594
|
+
var breadcrumbItemClasses = "h6-title inline-flex items-center gap-1.5 text-(--color-secondary) hover:text-(--color-primary-hover) focus-within:text-(--color-secondary-focus) [&_[aria-current=page]]:font-medium [&_[aria-current=page]]:text-primary";
|
|
3595
|
+
var disabledItemClasses = "text-primary-disabled cursor-default pointer-events-none";
|
|
3596
|
+
function Breadcrumb({ ...props }) {
|
|
3597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
3598
|
+
}
|
|
3599
|
+
function BreadcrumbList({ className, ...props }) {
|
|
3600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3601
|
+
"ol",
|
|
3602
|
+
{
|
|
3603
|
+
"data-slot": "breadcrumb-list",
|
|
3604
|
+
className: cn(
|
|
3605
|
+
"flex flex-wrap items-center gap-1.5 wrap-break-word sm:gap-2.5",
|
|
3606
|
+
className
|
|
3607
|
+
),
|
|
3608
|
+
...props
|
|
3609
|
+
}
|
|
3610
|
+
);
|
|
3611
|
+
}
|
|
3612
|
+
function BreadcrumbItem({ className, disabled, ...props }) {
|
|
3613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3614
|
+
"li",
|
|
3615
|
+
{
|
|
3616
|
+
"data-slot": "breadcrumb-item",
|
|
3617
|
+
className: cn(breadcrumbItemClasses, disabled && disabledItemClasses, className),
|
|
3618
|
+
style: { marginBottom: "7px" },
|
|
3619
|
+
...props
|
|
3620
|
+
}
|
|
3621
|
+
);
|
|
3622
|
+
}
|
|
3623
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
3624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3625
|
+
"span",
|
|
3626
|
+
{
|
|
3627
|
+
"data-slot": "breadcrumb-page",
|
|
3628
|
+
role: "link",
|
|
3629
|
+
"aria-disabled": "true",
|
|
3630
|
+
"aria-current": "page",
|
|
3631
|
+
className: cn(className),
|
|
3632
|
+
...props
|
|
3633
|
+
}
|
|
3634
|
+
);
|
|
3635
|
+
}
|
|
3636
|
+
function BreadcrumbSeparator({
|
|
3637
|
+
children,
|
|
3638
|
+
className,
|
|
3639
|
+
...props
|
|
3640
|
+
}) {
|
|
3641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3642
|
+
"li",
|
|
3643
|
+
{
|
|
3644
|
+
"data-slot": "breadcrumb-separator",
|
|
3645
|
+
role: "presentation",
|
|
3646
|
+
"aria-hidden": "true",
|
|
3647
|
+
className: cn("[&>svg]:size-6 [&>svg]:text-(--color-secondary)", className),
|
|
3648
|
+
...props,
|
|
3649
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ChevronRight, {})
|
|
3650
|
+
}
|
|
3651
|
+
);
|
|
3652
|
+
}
|
|
3653
|
+
function BreadcrumbEllipsis({
|
|
3654
|
+
className,
|
|
3655
|
+
...props
|
|
3656
|
+
}) {
|
|
3657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3658
|
+
"span",
|
|
3659
|
+
{
|
|
3660
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
3661
|
+
role: "presentation",
|
|
3662
|
+
"aria-hidden": "true",
|
|
3663
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
3664
|
+
...props,
|
|
3665
|
+
children: [
|
|
3666
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Ellipsis, { className: "size-4" }),
|
|
3667
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "sr-only", children: "More" })
|
|
3668
|
+
]
|
|
3669
|
+
}
|
|
3670
|
+
);
|
|
3671
|
+
}
|
|
3672
|
+
|
|
3673
|
+
// src/components/ui/dropdown-menu.tsx
|
|
3674
|
+
var React39 = require("react");
|
|
3675
|
+
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
|
|
3676
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3677
|
+
function DropdownMenu({
|
|
3678
|
+
...props
|
|
3679
|
+
}) {
|
|
3680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
3681
|
+
}
|
|
3682
|
+
function DropdownMenuTrigger({
|
|
3683
|
+
...props
|
|
3684
|
+
}) {
|
|
3685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3686
|
+
DropdownMenuPrimitive.Trigger,
|
|
3687
|
+
{
|
|
3688
|
+
"data-slot": "dropdown-menu-trigger",
|
|
3689
|
+
...props
|
|
3690
|
+
}
|
|
3691
|
+
);
|
|
3692
|
+
}
|
|
3693
|
+
function DropdownMenuContent({
|
|
3694
|
+
className,
|
|
3695
|
+
sideOffset = 4,
|
|
3696
|
+
...props
|
|
3697
|
+
}) {
|
|
3698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3699
|
+
DropdownMenuPrimitive.Content,
|
|
3700
|
+
{
|
|
3701
|
+
"data-slot": "dropdown-menu-content",
|
|
3702
|
+
sideOffset,
|
|
3703
|
+
className: cn(
|
|
3704
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
3705
|
+
className
|
|
3706
|
+
),
|
|
3707
|
+
...props
|
|
3708
|
+
}
|
|
3709
|
+
) });
|
|
3710
|
+
}
|
|
3711
|
+
function DropdownMenuGroup({
|
|
3712
|
+
...props
|
|
3713
|
+
}) {
|
|
3714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
3715
|
+
}
|
|
3716
|
+
function DropdownMenuItem({
|
|
3717
|
+
className,
|
|
3718
|
+
inset,
|
|
3719
|
+
variant = "default",
|
|
3720
|
+
...props
|
|
3721
|
+
}) {
|
|
3722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3723
|
+
DropdownMenuPrimitive.Item,
|
|
3724
|
+
{
|
|
3725
|
+
"data-slot": "dropdown-menu-item",
|
|
3726
|
+
"data-inset": inset,
|
|
3727
|
+
"data-variant": variant,
|
|
3728
|
+
className: cn(
|
|
3729
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3730
|
+
className
|
|
3731
|
+
),
|
|
3732
|
+
...props
|
|
3733
|
+
}
|
|
3734
|
+
);
|
|
3735
|
+
}
|
|
3736
|
+
|
|
3737
|
+
// src/components/Navigation/Breadcrumbs.tsx
|
|
3738
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3739
|
+
var breadcrumbSeparatorVariants = "size-5 relative bottom-1 [&>svg]:text-secondary group-disabled:text-secondary";
|
|
3740
|
+
var breadcrumbItemBase = "h6-title text-secondary hover:text-primary-hover";
|
|
3741
|
+
var Breadcrumbs = React40.forwardRef(
|
|
3742
|
+
(props, ref) => {
|
|
3743
|
+
const { separator, ellipsis, children, className, ...rest } = props;
|
|
3744
|
+
const items = React40.Children.toArray(children).filter(Boolean);
|
|
3745
|
+
const shouldCollapse = Boolean(ellipsis) && items.length >= 5;
|
|
3746
|
+
const hiddenItems = shouldCollapse ? items.slice(1, -2) : [];
|
|
3747
|
+
const displayItems = shouldCollapse ? [items[0], "__ELLIPSIS__", items[items.length - 2], items[items.length - 1]] : items;
|
|
3748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Breadcrumb, { ref, className, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(BreadcrumbList, { children: displayItems.map((child, index) => {
|
|
3749
|
+
const isEllipsis = child === "__ELLIPSIS__";
|
|
3750
|
+
const key = isEllipsis ? "__ellipsis" : React40.isValidElement(child) && child.key != null ? String(child.key) : String(index);
|
|
3751
|
+
const isLast = index === displayItems.length - 1;
|
|
3752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(React40.Fragment, { children: [
|
|
3753
|
+
isEllipsis ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(DropdownMenu, { children: [
|
|
3754
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3755
|
+
"button",
|
|
3756
|
+
{
|
|
3757
|
+
type: "button",
|
|
3758
|
+
className: "inline-flex size-8 items-center justify-center rounded-4 hover:bg-(--background-secondary) focus-ring-primary text-secondary",
|
|
3759
|
+
"aria-label": "Open breadcrumb menu",
|
|
3760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(BreadcrumbEllipsis, {})
|
|
3761
|
+
}
|
|
3762
|
+
) }),
|
|
3763
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3764
|
+
DropdownMenuContent,
|
|
3765
|
+
{
|
|
3766
|
+
align: "start",
|
|
3767
|
+
className: "bg-(--background-neutral) border-(--border-secondary-hover) shadow-card-md rounded-4",
|
|
3768
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DropdownMenuGroup, { children: hiddenItems.map((hidden, hiddenIndex) => {
|
|
3769
|
+
const hiddenKey = React40.isValidElement(hidden) && hidden.key != null ? String(hidden.key) : `hidden-${hiddenIndex}`;
|
|
3770
|
+
if (React40.isValidElement(hidden)) {
|
|
3771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3772
|
+
DropdownMenuItem,
|
|
3773
|
+
{
|
|
3774
|
+
asChild: true,
|
|
3775
|
+
className: "cursor-pointer paragraph-md text-primary focus:bg-(--background-secondary)",
|
|
3776
|
+
children: hidden
|
|
3777
|
+
},
|
|
3778
|
+
hiddenKey
|
|
3779
|
+
);
|
|
3780
|
+
}
|
|
3781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3782
|
+
DropdownMenuItem,
|
|
3783
|
+
{
|
|
3784
|
+
className: "cursor-pointer paragraph-md text-primary focus:bg-(--background-secondary)",
|
|
3785
|
+
children: String(hidden)
|
|
3786
|
+
},
|
|
3787
|
+
hiddenKey
|
|
3788
|
+
);
|
|
3789
|
+
}) })
|
|
3790
|
+
}
|
|
3791
|
+
)
|
|
3792
|
+
] }) }) : isLast ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3793
|
+
BreadcrumbPage,
|
|
3794
|
+
{
|
|
3795
|
+
className: cn("h6-title-medium cursor-pointer", props.breadcrumbPageClassName),
|
|
3796
|
+
children: child
|
|
3797
|
+
}
|
|
3798
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(BreadcrumbItem, { className: cn(breadcrumbItemBase, props.breadcrumbItemClassName), children: child }),
|
|
3799
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(BreadcrumbSeparator, { className: cn(breadcrumbSeparatorVariants, props.separatorClassName), children: separator })
|
|
3800
|
+
] }, key);
|
|
3801
|
+
}) }) });
|
|
3802
|
+
}
|
|
3803
|
+
);
|
|
3804
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
3805
|
+
|
|
3806
|
+
// src/components/Logo/LogoIcon.tsx
|
|
3807
|
+
var import_class_variance_authority19 = require("class-variance-authority");
|
|
3808
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3809
|
+
var LogoIconSvg = (props) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("svg", { width: "89", height: "88", viewBox: "0 0 89 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
3810
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M83.7156 3.88535C78.5352 -1.29512 70.136 -1.29512 64.9555 3.88535L43.9999 24.8409L43.9995 24.8405L62.3536 6.48637C52.2379 16.5949 35.8584 16.6179 25.7142 6.55523L23.4434 4.28438C18.2629 -0.896082 9.86373 -0.89608 4.68327 4.28438C-0.497191 9.46484 -0.49719 17.864 4.68327 23.0445L6.88526 25.2465C17.0191 35.3875 17.0168 51.8235 6.87859 61.9618L25.2395 43.6008L25.2398 43.601L3.88534 64.9555C-1.29512 70.136 -1.29511 78.5351 3.88535 83.7156C9.06581 88.8961 17.465 88.8961 22.6455 83.7156L25.6458 80.7151L25.6864 80.6747C35.7981 70.6137 52.1313 70.597 62.2636 80.6248L65.7534 84.1146C70.9339 89.2951 79.3331 89.2951 84.5135 84.1146C89.694 78.9342 89.694 70.535 84.5135 65.3545L62.76 43.601L62.7602 43.6009L81.1144 61.9552C70.9806 51.8142 70.9829 35.3782 81.1211 25.24L83.7156 22.6455C88.8961 17.465 88.8961 9.06581 83.7156 3.88535Z", fill: "#1685FF" }),
|
|
3811
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M44.0667 50.4863C44.1213 50.4317 44.21 50.4317 44.2646 50.4863L48.6465 54.8682C48.6942 54.9158 48.7011 54.9907 48.663 55.0463L44.2812 61.4453C44.2256 61.5265 44.1057 61.5265 44.0501 61.4453L39.6683 55.0463C39.6302 54.9907 39.6371 54.9158 39.6848 54.8682L44.0667 50.4863Z", fill: "white" }),
|
|
3812
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M44.107 45.3938C44.0536 45.289 43.9013 45.289 43.8479 45.3938C41.8622 49.293 37.8104 51.9638 33.1347 51.9638C26.4991 51.9638 21.1199 46.5846 21.1199 39.9489C21.1199 33.3133 26.4991 27.9341 33.1347 27.9341C37.8104 27.9341 41.8622 30.6049 43.8479 34.5041C43.9013 34.6089 44.0536 34.6089 44.107 34.5041C46.0926 30.6049 50.1445 27.9341 54.8201 27.9341C61.4558 27.9341 66.835 33.3133 66.835 39.9489C66.835 46.5846 61.4558 51.9638 54.8201 51.9638C50.1445 51.9638 46.0926 49.293 44.107 45.3938Z", fill: "white" }),
|
|
3813
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M60.1113 40.0006C60.1113 43.052 57.6377 45.5256 54.5863 45.5256C51.535 45.5256 49.0614 43.052 49.0614 40.0006C49.0614 36.9493 51.535 34.4757 54.5863 34.4757C57.6377 34.4757 60.1113 36.9493 60.1113 40.0006Z", fill: "#1685FF" }),
|
|
3814
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M38.8954 40.0006C38.8954 43.052 36.4218 45.5256 33.3705 45.5256C30.3192 45.5256 27.8456 43.052 27.8456 40.0006C27.8456 36.9493 30.3192 34.4757 33.3705 34.4757C36.4218 34.4757 38.8954 36.9493 38.8954 40.0006Z", fill: "#1685FF" })
|
|
3442
3815
|
] });
|
|
3443
|
-
var logoIconVariants = (0,
|
|
3816
|
+
var logoIconVariants = (0, import_class_variance_authority19.cva)(
|
|
3444
3817
|
"relative bg-linear-to-t from-gray-800 to-gray-950 overflow-hidden flex justify-center items-center",
|
|
3445
3818
|
{
|
|
3446
3819
|
variants: {
|
|
@@ -3465,28 +3838,28 @@ var logoIconSizeClass = {
|
|
|
3465
3838
|
xl: "size-96"
|
|
3466
3839
|
};
|
|
3467
3840
|
var LogoIcon = ({ className, size = "md" }) => {
|
|
3468
|
-
return /* @__PURE__ */ (0,
|
|
3841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: cn(logoIconVariants({ size }), className), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(LogoIconSvg, { className: logoIconSizeClass[size] }) });
|
|
3469
3842
|
};
|
|
3470
3843
|
|
|
3471
3844
|
// src/components/Logo/Logo.tsx
|
|
3472
|
-
var
|
|
3473
|
-
var
|
|
3474
|
-
var LogoIconSvg2 = (props) => /* @__PURE__ */ (0,
|
|
3475
|
-
/* @__PURE__ */ (0,
|
|
3476
|
-
/* @__PURE__ */ (0,
|
|
3477
|
-
/* @__PURE__ */ (0,
|
|
3478
|
-
/* @__PURE__ */ (0,
|
|
3479
|
-
/* @__PURE__ */ (0,
|
|
3845
|
+
var import_class_variance_authority20 = require("class-variance-authority");
|
|
3846
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3847
|
+
var LogoIconSvg2 = (props) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("svg", { width: "89", height: "88", viewBox: "0 0 89 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
3848
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M83.7156 3.88535C78.5352 -1.29512 70.136 -1.29512 64.9555 3.88535L43.9999 24.8409L43.9995 24.8405L62.3536 6.48637C52.2379 16.5949 35.8584 16.6179 25.7142 6.55523L23.4434 4.28438C18.2629 -0.896082 9.86373 -0.89608 4.68327 4.28438C-0.497191 9.46484 -0.49719 17.864 4.68327 23.0445L6.88526 25.2465C17.0191 35.3875 17.0168 51.8235 6.87859 61.9618L25.2395 43.6008L25.2398 43.601L3.88534 64.9555C-1.29512 70.136 -1.29511 78.5351 3.88535 83.7156C9.06581 88.8961 17.465 88.8961 22.6455 83.7156L25.6458 80.7151L25.6864 80.6747C35.7981 70.6137 52.1313 70.597 62.2636 80.6248L65.7534 84.1146C70.9339 89.2951 79.3331 89.2951 84.5135 84.1146C89.694 78.9342 89.694 70.535 84.5135 65.3545L62.76 43.601L62.7602 43.6009L81.1144 61.9552C70.9806 51.8142 70.9829 35.3782 81.1211 25.24L83.7156 22.6455C88.8961 17.465 88.8961 9.06581 83.7156 3.88535Z", fill: "#1685FF" }),
|
|
3849
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M44.0667 50.4863C44.1213 50.4317 44.21 50.4317 44.2646 50.4863L48.6465 54.8682C48.6942 54.9158 48.7011 54.9907 48.663 55.0463L44.2812 61.4453C44.2256 61.5265 44.1057 61.5265 44.0501 61.4453L39.6683 55.0463C39.6302 54.9907 39.6371 54.9158 39.6848 54.8682L44.0667 50.4863Z", fill: "white" }),
|
|
3850
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M44.107 45.3938C44.0536 45.289 43.9013 45.289 43.8479 45.3938C41.8622 49.293 37.8104 51.9638 33.1347 51.9638C26.4991 51.9638 21.1199 46.5846 21.1199 39.9489C21.1199 33.3133 26.4991 27.9341 33.1347 27.9341C37.8104 27.9341 41.8622 30.6049 43.8479 34.5041C43.9013 34.6089 44.0536 34.6089 44.107 34.5041C46.0926 30.6049 50.1445 27.9341 54.8201 27.9341C61.4558 27.9341 66.835 33.3133 66.835 39.9489C66.835 46.5846 61.4558 51.9638 54.8201 51.9638C50.1445 51.9638 46.0926 49.293 44.107 45.3938Z", fill: "white" }),
|
|
3851
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M60.1113 40.0006C60.1113 43.052 57.6377 45.5256 54.5863 45.5256C51.535 45.5256 49.0614 43.052 49.0614 40.0006C49.0614 36.9493 51.535 34.4757 54.5863 34.4757C57.6377 34.4757 60.1113 36.9493 60.1113 40.0006Z", fill: "#1685FF" }),
|
|
3852
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M38.8954 40.0006C38.8954 43.052 36.4218 45.5256 33.3705 45.5256C30.3192 45.5256 27.8456 43.052 27.8456 40.0006C27.8456 36.9493 30.3192 34.4757 33.3705 34.4757C36.4218 34.4757 38.8954 36.9493 38.8954 40.0006Z", fill: "#1685FF" })
|
|
3480
3853
|
] });
|
|
3481
|
-
var LogoTextSvg = (props) => /* @__PURE__ */ (0,
|
|
3482
|
-
/* @__PURE__ */ (0,
|
|
3483
|
-
/* @__PURE__ */ (0,
|
|
3484
|
-
/* @__PURE__ */ (0,
|
|
3485
|
-
/* @__PURE__ */ (0,
|
|
3486
|
-
/* @__PURE__ */ (0,
|
|
3487
|
-
/* @__PURE__ */ (0,
|
|
3854
|
+
var LogoTextSvg = (props) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("svg", { width: "111", height: "32", viewBox: "0 0 111 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
3855
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M72.7324 20.9658C72.7324 14.4559 77.4246 9.9751 83.8922 9.9751C90.3598 9.9751 95.052 14.4559 95.052 20.9658C95.052 27.4757 90.3598 31.9565 83.8922 31.9565C77.4246 31.9565 72.7324 27.4757 72.7324 20.9658ZM77.8896 20.9658C77.8896 24.7703 80.3414 27.3489 83.8922 27.3489C87.4431 27.3489 89.8948 24.7703 89.8948 20.9658C89.8948 17.1613 87.4431 14.5827 83.8922 14.5827C80.3414 14.5827 77.8896 17.1613 77.8896 20.9658Z", fill: "currentColor" }),
|
|
3856
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M53.4056 31.4503H48.6289V0H53.7861V13.6116C55.1388 11.2866 57.9287 9.89163 61.0991 9.89163C67.0595 9.89163 70.6949 14.5415 70.6949 21.136C70.6949 27.5613 66.7636 31.9998 60.761 31.9998C57.6328 31.9998 54.9697 30.6049 53.7438 28.1954L53.4056 31.4503ZM53.8284 20.9246C53.8284 24.6868 56.1533 27.2654 59.7042 27.2654C63.3395 27.2654 65.4954 24.6445 65.4954 20.9246C65.4954 17.2047 63.3395 14.5415 59.7042 14.5415C56.1533 14.5415 53.8284 17.1624 53.8284 20.9246Z", fill: "currentColor" }),
|
|
3857
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M38.9929 10.5681H44.15V31.4504H39.3733L38.9929 28.6605C37.7247 30.6473 35.0193 32 32.2293 32C27.4103 32 24.5781 28.745 24.5781 23.6301V10.5681H29.7353V21.8124C29.7353 25.786 31.2994 27.3923 34.1739 27.3923C37.4288 27.3923 38.9929 25.4901 38.9929 21.5165V10.5681Z", fill: "currentColor" }),
|
|
3858
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M4.77673 31.4503H0V0H5.15718V13.6116C6.50988 11.2866 9.29983 9.89163 12.4702 9.89163C18.4306 9.89163 22.066 14.5415 22.066 21.136C22.066 27.5613 18.1347 31.9998 12.132 31.9998C9.00392 31.9998 6.34079 30.6049 5.1149 28.1954L4.77673 31.4503ZM5.19945 20.9246C5.19945 24.6868 7.52441 27.2654 11.0752 27.2654C14.7106 27.2654 16.8665 24.6445 16.8665 20.9246C16.8665 17.2047 14.7106 14.5415 11.0752 14.5415C7.52441 14.5415 5.19945 17.1624 5.19945 20.9246Z", fill: "currentColor" }),
|
|
3859
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M103.555 0.5C107.084 0.5 109.944 3.36029 109.944 6.88867C109.944 10.4172 107.084 13.2773 103.555 13.2773C100.027 13.2772 97.1667 10.4171 97.1667 6.88867C97.1669 3.36036 100.027 0.500118 103.555 0.5Z", stroke: "currentColor" }),
|
|
3860
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M105.778 9.98355L101.687 10.0001V9.00978L103.578 7.33457C104.19 6.79817 104.445 6.41856 104.445 5.91517C104.445 5.29625 104.159 4.96616 103.647 4.96616C103.113 4.96616 102.803 5.35402 102.803 6.03896H101.556C101.556 4.66908 102.377 3.77783 103.64 3.77783C104.949 3.77783 105.731 4.52879 105.731 5.83265C105.731 6.66613 105.259 7.34282 104.546 7.97825L103.686 8.74571H105.778V9.98355Z", fill: "currentColor" })
|
|
3488
3861
|
] });
|
|
3489
|
-
var logoWrapperVariants = (0,
|
|
3862
|
+
var logoWrapperVariants = (0, import_class_variance_authority20.cva)("inline-flex", {
|
|
3490
3863
|
variants: {
|
|
3491
3864
|
variant: {
|
|
3492
3865
|
inline: ["w-44", "h-12", "justify-start", "items-center", "gap-4"],
|
|
@@ -3498,7 +3871,7 @@ var logoWrapperVariants = (0, import_class_variance_authority21.cva)("inline-fle
|
|
|
3498
3871
|
variant: "inline"
|
|
3499
3872
|
}
|
|
3500
3873
|
});
|
|
3501
|
-
var logoIconSizeVariants = (0,
|
|
3874
|
+
var logoIconSizeVariants = (0, import_class_variance_authority20.cva)("", {
|
|
3502
3875
|
variants: {
|
|
3503
3876
|
variant: {
|
|
3504
3877
|
inline: "size-12",
|
|
@@ -3510,7 +3883,7 @@ var logoIconSizeVariants = (0, import_class_variance_authority21.cva)("", {
|
|
|
3510
3883
|
variant: "inline"
|
|
3511
3884
|
}
|
|
3512
3885
|
});
|
|
3513
|
-
var logoTextSizeVariants = (0,
|
|
3886
|
+
var logoTextSizeVariants = (0, import_class_variance_authority20.cva)("", {
|
|
3514
3887
|
variants: {
|
|
3515
3888
|
variant: {
|
|
3516
3889
|
inline: "h-8 w-27.5",
|
|
@@ -3524,9 +3897,9 @@ var logoTextSizeVariants = (0, import_class_variance_authority21.cva)("", {
|
|
|
3524
3897
|
});
|
|
3525
3898
|
var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
3526
3899
|
const textColorClass = textColor === "light" ? "text-(--color-b-white)" : textColor === "dark" ? "text-(--color-b-black)" : "text-primary";
|
|
3527
|
-
return /* @__PURE__ */ (0,
|
|
3528
|
-
/* @__PURE__ */ (0,
|
|
3529
|
-
/* @__PURE__ */ (0,
|
|
3900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn(logoWrapperVariants({ variant }), className), children: [
|
|
3901
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(LogoIconSvg2, { className: logoIconSizeVariants({ variant }) }),
|
|
3902
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(LogoTextSvg, { className: cn(logoTextSizeVariants({ variant }), textColorClass) })
|
|
3530
3903
|
] });
|
|
3531
3904
|
};
|
|
3532
3905
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -3536,12 +3909,11 @@ var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
|
3536
3909
|
BadgeDigit,
|
|
3537
3910
|
BadgeDot,
|
|
3538
3911
|
BadgeStatus,
|
|
3539
|
-
|
|
3912
|
+
Breadcrumbs,
|
|
3540
3913
|
Button,
|
|
3541
3914
|
ButtonGroup,
|
|
3542
3915
|
Checkbox,
|
|
3543
3916
|
Divider,
|
|
3544
|
-
Dropdown,
|
|
3545
3917
|
Field,
|
|
3546
3918
|
IconButton,
|
|
3547
3919
|
IconButtonGroup,
|
|
@@ -3555,14 +3927,33 @@ var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
|
3555
3927
|
Progress,
|
|
3556
3928
|
RadioGroup,
|
|
3557
3929
|
SearchInput,
|
|
3930
|
+
Select,
|
|
3558
3931
|
Slider,
|
|
3559
3932
|
StatusAvatar,
|
|
3560
3933
|
Tag,
|
|
3561
3934
|
TextArea,
|
|
3562
3935
|
TextInput,
|
|
3563
3936
|
Toggle,
|
|
3937
|
+
Tooltip,
|
|
3938
|
+
TooltipProvider,
|
|
3564
3939
|
Typography,
|
|
3565
3940
|
WebsiteInput,
|
|
3566
3941
|
cn
|
|
3567
3942
|
});
|
|
3943
|
+
/*! Bundled license information:
|
|
3944
|
+
|
|
3945
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
3946
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
3947
|
+
lucide-react/dist/esm/Icon.js:
|
|
3948
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
3949
|
+
lucide-react/dist/esm/icons/chevron-right.js:
|
|
3950
|
+
lucide-react/dist/esm/icons/ellipsis.js:
|
|
3951
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
3952
|
+
(**
|
|
3953
|
+
* @license lucide-react v0.555.0 - ISC
|
|
3954
|
+
*
|
|
3955
|
+
* This source code is licensed under the ISC license.
|
|
3956
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
3957
|
+
*)
|
|
3958
|
+
*/
|
|
3568
3959
|
//# sourceMappingURL=index.cjs.map
|