@adsgency_npm/adsgency-ads-ui 0.1.0-alpha.1 → 0.1.0-alpha.2
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 +537 -512
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +480 -456
- package/dist/index.js.map +1 -1
- package/package.json +19 -20
package/dist/index.cjs
CHANGED
|
@@ -133,6 +133,7 @@ __export(src_exports, {
|
|
|
133
133
|
AdsSeparator: () => AdsSeparator,
|
|
134
134
|
AdsSkeleton: () => AdsSkeleton,
|
|
135
135
|
AdsSlider: () => AdsSlider,
|
|
136
|
+
AdsSpinner: () => AdsSpinner,
|
|
136
137
|
AdsSwitch: () => AdsSwitch,
|
|
137
138
|
AdsTable: () => AdsTable,
|
|
138
139
|
AdsTableBody: () => AdsTableBody,
|
|
@@ -840,7 +841,7 @@ var AdsAlertDialogAction = AlertDialogAction;
|
|
|
840
841
|
var AdsAlertDialogCancel = AlertDialogCancel;
|
|
841
842
|
|
|
842
843
|
// src/components/AdsButton/index.tsx
|
|
843
|
-
var
|
|
844
|
+
var React10 = __toESM(require("react"), 1);
|
|
844
845
|
|
|
845
846
|
// src/primitives/button.tsx
|
|
846
847
|
var React8 = __toESM(require("react"), 1);
|
|
@@ -887,8 +888,56 @@ var Button = React8.forwardRef(
|
|
|
887
888
|
);
|
|
888
889
|
Button.displayName = "Button";
|
|
889
890
|
|
|
890
|
-
// src/components/
|
|
891
|
+
// src/components/AdsSpinner/index.tsx
|
|
892
|
+
var React9 = __toESM(require("react"), 1);
|
|
893
|
+
var import_lucide_react3 = require("lucide-react");
|
|
891
894
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
895
|
+
var sizeClassName = {
|
|
896
|
+
xs: "h-3 w-3",
|
|
897
|
+
sm: "h-4 w-4",
|
|
898
|
+
md: "h-6 w-6",
|
|
899
|
+
lg: "h-8 w-8"
|
|
900
|
+
};
|
|
901
|
+
var toneClassName = {
|
|
902
|
+
current: "text-current",
|
|
903
|
+
foreground: "text-foreground",
|
|
904
|
+
muted: "text-muted-foreground",
|
|
905
|
+
primary: "text-primary",
|
|
906
|
+
success: "text-success",
|
|
907
|
+
warning: "text-warning",
|
|
908
|
+
info: "text-info",
|
|
909
|
+
destructive: "text-destructive"
|
|
910
|
+
};
|
|
911
|
+
var AdsSpinner = React9.forwardRef(
|
|
912
|
+
({
|
|
913
|
+
"aria-label": ariaLabel,
|
|
914
|
+
className,
|
|
915
|
+
size = "sm",
|
|
916
|
+
strokeWidth = 1.75,
|
|
917
|
+
tone = "current",
|
|
918
|
+
...props
|
|
919
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
920
|
+
import_lucide_react3.LoaderCircle,
|
|
921
|
+
{
|
|
922
|
+
"aria-hidden": ariaLabel ? void 0 : true,
|
|
923
|
+
"aria-label": ariaLabel,
|
|
924
|
+
className: cn(
|
|
925
|
+
"shrink-0 animate-spin",
|
|
926
|
+
sizeClassName[size],
|
|
927
|
+
toneClassName[tone],
|
|
928
|
+
className
|
|
929
|
+
),
|
|
930
|
+
"data-slot": "ads-spinner",
|
|
931
|
+
ref,
|
|
932
|
+
strokeWidth,
|
|
933
|
+
...props
|
|
934
|
+
}
|
|
935
|
+
)
|
|
936
|
+
);
|
|
937
|
+
AdsSpinner.displayName = "AdsSpinner";
|
|
938
|
+
|
|
939
|
+
// src/components/AdsButton/index.tsx
|
|
940
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
892
941
|
var intentClassName = {
|
|
893
942
|
brand: "border-0 bg-brand-gradient text-primary-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] hover:opacity-90",
|
|
894
943
|
primary: "border-0 bg-primary text-primary-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] hover:bg-brand-primary-hover",
|
|
@@ -899,7 +948,7 @@ var intentClassName = {
|
|
|
899
948
|
destructive: "border-0 bg-destructive text-primary-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] hover:bg-destructive/90",
|
|
900
949
|
link: "border-0 bg-transparent text-primary shadow-none underline-offset-2 hover:bg-transparent hover:text-primary hover:underline"
|
|
901
950
|
};
|
|
902
|
-
var
|
|
951
|
+
var sizeClassName2 = {
|
|
903
952
|
sm: "!h-8 px-md py-sm",
|
|
904
953
|
md: "!h-9 px-lg py-sm",
|
|
905
954
|
lg: "!h-10 px-xl py-[10px]"
|
|
@@ -918,47 +967,15 @@ function renderLeadingIcon(icon) {
|
|
|
918
967
|
if (!icon) {
|
|
919
968
|
return null;
|
|
920
969
|
}
|
|
921
|
-
if (
|
|
922
|
-
const sizedIcon =
|
|
970
|
+
if (React10.isValidElement(icon)) {
|
|
971
|
+
const sizedIcon = React10.cloneElement(icon, {
|
|
923
972
|
className: cn("!h-4 !w-4 h-4 w-4", icon.props.className)
|
|
924
973
|
});
|
|
925
|
-
return /* @__PURE__ */ (0,
|
|
974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "inline-flex h-4 w-4 items-center justify-center [&>svg]:!h-4 [&>svg]:!w-4", children: sizedIcon });
|
|
926
975
|
}
|
|
927
|
-
return /* @__PURE__ */ (0,
|
|
928
|
-
}
|
|
929
|
-
function AdsButtonLoadingIcon() {
|
|
930
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
931
|
-
"svg",
|
|
932
|
-
{
|
|
933
|
-
"aria-hidden": true,
|
|
934
|
-
className: "!h-4 !w-4 h-4 w-4 animate-spin",
|
|
935
|
-
"data-testid": "ads-button-loading-icon",
|
|
936
|
-
fill: "none",
|
|
937
|
-
viewBox: "0 0 20 20",
|
|
938
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
939
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
940
|
-
"g",
|
|
941
|
-
{
|
|
942
|
-
stroke: "currentColor",
|
|
943
|
-
strokeLinecap: "round",
|
|
944
|
-
strokeWidth: "1.6",
|
|
945
|
-
transform: "translate(1.675 1.675)",
|
|
946
|
-
children: [
|
|
947
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M8.1667 0.6667V3.1667" }),
|
|
948
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M8.1667 13.1667V15.6667" }),
|
|
949
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M15.6667 8.1667H13.1667" }),
|
|
950
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M3.1667 8.1667H0.6667" }),
|
|
951
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M13.4696 2.8631L11.7018 4.6309" }),
|
|
952
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M4.6317 11.7018L2.8639 13.4696" }),
|
|
953
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M13.4696 13.4696L11.7018 11.7018" }),
|
|
954
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", { d: "M4.6317 4.6309L2.8639 2.8631" })
|
|
955
|
-
]
|
|
956
|
-
}
|
|
957
|
-
)
|
|
958
|
-
}
|
|
959
|
-
);
|
|
976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "inline-flex h-4 w-4 items-center justify-center", children: icon });
|
|
960
977
|
}
|
|
961
|
-
var AdsButton =
|
|
978
|
+
var AdsButton = React10.forwardRef(
|
|
962
979
|
({
|
|
963
980
|
children,
|
|
964
981
|
className,
|
|
@@ -976,9 +993,9 @@ var AdsButton = React9.forwardRef(
|
|
|
976
993
|
const isDisabled = disabled || loading;
|
|
977
994
|
const resolvedIcon = icon ?? leadingIcon;
|
|
978
995
|
const resolvedLoadingLabel = loadingLabel ?? messages.button.loading;
|
|
979
|
-
const hasTextContent =
|
|
996
|
+
const hasTextContent = React10.Children.count(children) > 0;
|
|
980
997
|
const isIconOnly = Boolean(resolvedIcon) && !hasTextContent;
|
|
981
|
-
return /* @__PURE__ */ (0,
|
|
998
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
982
999
|
Button,
|
|
983
1000
|
{
|
|
984
1001
|
"aria-busy": loading || void 0,
|
|
@@ -990,7 +1007,7 @@ var AdsButton = React9.forwardRef(
|
|
|
990
1007
|
"disabled:pointer-events-none",
|
|
991
1008
|
intentClassName[intent],
|
|
992
1009
|
focusClassName[intent],
|
|
993
|
-
|
|
1010
|
+
sizeClassName2[size],
|
|
994
1011
|
isIconOnly && (size === "sm" ? "!w-8 px-0" : size === "lg" ? "!w-10 px-0" : "!w-9 px-0"),
|
|
995
1012
|
loading ? "disabled:opacity-100" : "disabled:opacity-[0.65]",
|
|
996
1013
|
className
|
|
@@ -1000,14 +1017,21 @@ var AdsButton = React9.forwardRef(
|
|
|
1000
1017
|
type,
|
|
1001
1018
|
variant: "ghost",
|
|
1002
1019
|
...props,
|
|
1003
|
-
children: /* @__PURE__ */ (0,
|
|
1004
|
-
/* @__PURE__ */ (0,
|
|
1020
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "inline-flex items-center justify-center gap-1", children: [
|
|
1021
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "inline-flex items-center justify-center gap-sm", children: [
|
|
1005
1022
|
renderLeadingIcon(resolvedIcon),
|
|
1006
|
-
hasTextContent ? /* @__PURE__ */ (0,
|
|
1023
|
+
hasTextContent ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children }) : null
|
|
1007
1024
|
] }),
|
|
1008
|
-
loading ? /* @__PURE__ */ (0,
|
|
1009
|
-
/* @__PURE__ */ (0,
|
|
1010
|
-
|
|
1025
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1027
|
+
AdsSpinner,
|
|
1028
|
+
{
|
|
1029
|
+
className: "!h-4 !w-4 h-4 w-4",
|
|
1030
|
+
"data-testid": "ads-button-loading-icon",
|
|
1031
|
+
size: "sm"
|
|
1032
|
+
}
|
|
1033
|
+
),
|
|
1034
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "sr-only", children: resolvedLoadingLabel })
|
|
1011
1035
|
] }) : null
|
|
1012
1036
|
] })
|
|
1013
1037
|
}
|
|
@@ -1017,15 +1041,15 @@ var AdsButton = React9.forwardRef(
|
|
|
1017
1041
|
AdsButton.displayName = "AdsButton";
|
|
1018
1042
|
|
|
1019
1043
|
// src/components/AdsBreadcrumb/index.tsx
|
|
1020
|
-
var
|
|
1021
|
-
var
|
|
1044
|
+
var React12 = __toESM(require("react"), 1);
|
|
1045
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1022
1046
|
|
|
1023
1047
|
// src/primitives/breadcrumb.tsx
|
|
1024
|
-
var
|
|
1048
|
+
var React11 = __toESM(require("react"), 1);
|
|
1025
1049
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1026
|
-
var
|
|
1027
|
-
var
|
|
1028
|
-
var Breadcrumb =
|
|
1050
|
+
var import_lucide_react4 = require("lucide-react");
|
|
1051
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1052
|
+
var Breadcrumb = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1029
1053
|
"nav",
|
|
1030
1054
|
{
|
|
1031
1055
|
"aria-label": "breadcrumb",
|
|
@@ -1035,7 +1059,7 @@ var Breadcrumb = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1035
1059
|
}
|
|
1036
1060
|
));
|
|
1037
1061
|
Breadcrumb.displayName = "Breadcrumb";
|
|
1038
|
-
var BreadcrumbList =
|
|
1062
|
+
var BreadcrumbList = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1039
1063
|
"ul",
|
|
1040
1064
|
{
|
|
1041
1065
|
className: cn(
|
|
@@ -1047,7 +1071,7 @@ var BreadcrumbList = React10.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1047
1071
|
}
|
|
1048
1072
|
));
|
|
1049
1073
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
1050
|
-
var BreadcrumbItem =
|
|
1074
|
+
var BreadcrumbItem = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1051
1075
|
"li",
|
|
1052
1076
|
{
|
|
1053
1077
|
className: cn("inline-flex items-center gap-1.5", className),
|
|
@@ -1056,14 +1080,14 @@ var BreadcrumbItem = React10.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1056
1080
|
}
|
|
1057
1081
|
));
|
|
1058
1082
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
1059
|
-
var BreadcrumbLink =
|
|
1083
|
+
var BreadcrumbLink = React11.forwardRef(
|
|
1060
1084
|
({ asChild = false, className, ...props }, ref) => {
|
|
1061
1085
|
const Comp = asChild ? import_react_slot2.Slot : "a";
|
|
1062
|
-
return /* @__PURE__ */ (0,
|
|
1086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Comp, { className: cn("transition-colors", className), ref, ...props });
|
|
1063
1087
|
}
|
|
1064
1088
|
);
|
|
1065
1089
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
1066
|
-
var BreadcrumbPage =
|
|
1090
|
+
var BreadcrumbPage = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1067
1091
|
"span",
|
|
1068
1092
|
{
|
|
1069
1093
|
"aria-current": "page",
|
|
@@ -1079,21 +1103,21 @@ var BreadcrumbSeparator = ({
|
|
|
1079
1103
|
children,
|
|
1080
1104
|
className,
|
|
1081
1105
|
...props
|
|
1082
|
-
}) => /* @__PURE__ */ (0,
|
|
1106
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1083
1107
|
"li",
|
|
1084
1108
|
{
|
|
1085
1109
|
"aria-hidden": "true",
|
|
1086
1110
|
className: cn("[&_svg]:size-3.5", className),
|
|
1087
1111
|
role: "presentation",
|
|
1088
1112
|
...props,
|
|
1089
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
1113
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.ChevronRight, {})
|
|
1090
1114
|
}
|
|
1091
1115
|
);
|
|
1092
1116
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
1093
1117
|
var BreadcrumbEllipsis = ({
|
|
1094
1118
|
className,
|
|
1095
1119
|
...props
|
|
1096
|
-
}) => /* @__PURE__ */ (0,
|
|
1120
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1097
1121
|
"span",
|
|
1098
1122
|
{
|
|
1099
1123
|
"aria-hidden": "true",
|
|
@@ -1101,18 +1125,18 @@ var BreadcrumbEllipsis = ({
|
|
|
1101
1125
|
role: "presentation",
|
|
1102
1126
|
...props,
|
|
1103
1127
|
children: [
|
|
1104
|
-
/* @__PURE__ */ (0,
|
|
1105
|
-
/* @__PURE__ */ (0,
|
|
1128
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.MoreHorizontal, { className: "size-3.5" }),
|
|
1129
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "sr-only", children: "More" })
|
|
1106
1130
|
]
|
|
1107
1131
|
}
|
|
1108
1132
|
);
|
|
1109
1133
|
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
|
|
1110
1134
|
|
|
1111
1135
|
// src/components/AdsBreadcrumb/index.tsx
|
|
1112
|
-
var
|
|
1113
|
-
var AdsBreadcrumb =
|
|
1136
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1137
|
+
var AdsBreadcrumb = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Breadcrumb, { className: cn("w-full", className), ref, ...props }));
|
|
1114
1138
|
AdsBreadcrumb.displayName = "AdsBreadcrumb";
|
|
1115
|
-
var AdsBreadcrumbList =
|
|
1139
|
+
var AdsBreadcrumbList = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1116
1140
|
BreadcrumbList,
|
|
1117
1141
|
{
|
|
1118
1142
|
className: cn(
|
|
@@ -1124,7 +1148,7 @@ var AdsBreadcrumbList = React11.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1124
1148
|
}
|
|
1125
1149
|
));
|
|
1126
1150
|
AdsBreadcrumbList.displayName = "AdsBreadcrumbList";
|
|
1127
|
-
var AdsBreadcrumbItem =
|
|
1151
|
+
var AdsBreadcrumbItem = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1128
1152
|
BreadcrumbItem,
|
|
1129
1153
|
{
|
|
1130
1154
|
className: cn("inline-flex items-center gap-1.5", className),
|
|
@@ -1133,7 +1157,7 @@ var AdsBreadcrumbItem = React11.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1133
1157
|
}
|
|
1134
1158
|
));
|
|
1135
1159
|
AdsBreadcrumbItem.displayName = "AdsBreadcrumbItem";
|
|
1136
|
-
var AdsBreadcrumbLink =
|
|
1160
|
+
var AdsBreadcrumbLink = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1137
1161
|
BreadcrumbLink,
|
|
1138
1162
|
{
|
|
1139
1163
|
className: cn(
|
|
@@ -1145,7 +1169,7 @@ var AdsBreadcrumbLink = React11.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1145
1169
|
}
|
|
1146
1170
|
));
|
|
1147
1171
|
AdsBreadcrumbLink.displayName = "AdsBreadcrumbLink";
|
|
1148
|
-
var AdsBreadcrumbPage =
|
|
1172
|
+
var AdsBreadcrumbPage = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1149
1173
|
BreadcrumbPage,
|
|
1150
1174
|
{
|
|
1151
1175
|
className: cn("text-sm font-normal leading-5 text-foreground", className),
|
|
@@ -1155,15 +1179,15 @@ var AdsBreadcrumbPage = React11.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1155
1179
|
));
|
|
1156
1180
|
AdsBreadcrumbPage.displayName = "AdsBreadcrumbPage";
|
|
1157
1181
|
var separatorIcons = {
|
|
1158
|
-
chevron: /* @__PURE__ */ (0,
|
|
1159
|
-
slash: /* @__PURE__ */ (0,
|
|
1182
|
+
chevron: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react5.ChevronRight, { className: "size-3.5" }),
|
|
1183
|
+
slash: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react5.Slash, { className: "size-3.5" })
|
|
1160
1184
|
};
|
|
1161
1185
|
var AdsBreadcrumbSeparator = ({
|
|
1162
1186
|
children,
|
|
1163
1187
|
className,
|
|
1164
1188
|
icon = "chevron",
|
|
1165
1189
|
...props
|
|
1166
|
-
}) => /* @__PURE__ */ (0,
|
|
1190
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1167
1191
|
BreadcrumbSeparator,
|
|
1168
1192
|
{
|
|
1169
1193
|
className: cn("text-muted-foreground [&_svg]:size-3.5", className),
|
|
@@ -1176,25 +1200,25 @@ var AdsBreadcrumbEllipsis = ({
|
|
|
1176
1200
|
className,
|
|
1177
1201
|
children,
|
|
1178
1202
|
...props
|
|
1179
|
-
}) => /* @__PURE__ */ (0,
|
|
1203
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1180
1204
|
BreadcrumbEllipsis,
|
|
1181
1205
|
{
|
|
1182
1206
|
className: cn("size-3.5 text-muted-foreground", className),
|
|
1183
1207
|
...props,
|
|
1184
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
1208
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react5.MoreHorizontal, { className: "size-3.5" })
|
|
1185
1209
|
}
|
|
1186
1210
|
);
|
|
1187
1211
|
AdsBreadcrumbEllipsis.displayName = "AdsBreadcrumbEllipsis";
|
|
1188
1212
|
|
|
1189
1213
|
// src/components/AdsCheckbox/index.tsx
|
|
1190
|
-
var
|
|
1214
|
+
var React17 = __toESM(require("react"), 1);
|
|
1191
1215
|
|
|
1192
1216
|
// src/primitives/checkbox.tsx
|
|
1193
|
-
var
|
|
1217
|
+
var React13 = __toESM(require("react"), 1);
|
|
1194
1218
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
1195
|
-
var
|
|
1196
|
-
var
|
|
1197
|
-
var Checkbox =
|
|
1219
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1220
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1221
|
+
var Checkbox = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1198
1222
|
CheckboxPrimitive.Root,
|
|
1199
1223
|
{
|
|
1200
1224
|
ref,
|
|
@@ -1203,11 +1227,11 @@ var Checkbox = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1203
1227
|
className
|
|
1204
1228
|
),
|
|
1205
1229
|
...props,
|
|
1206
|
-
children: /* @__PURE__ */ (0,
|
|
1230
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1207
1231
|
CheckboxPrimitive.Indicator,
|
|
1208
1232
|
{
|
|
1209
1233
|
className: cn("grid place-content-center text-current"),
|
|
1210
|
-
children: /* @__PURE__ */ (0,
|
|
1234
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.Check, { className: "h-4 w-4" })
|
|
1211
1235
|
}
|
|
1212
1236
|
)
|
|
1213
1237
|
}
|
|
@@ -1215,21 +1239,21 @@ var Checkbox = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1215
1239
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
1216
1240
|
|
|
1217
1241
|
// src/components/AdsField/index.tsx
|
|
1218
|
-
var
|
|
1242
|
+
var React16 = __toESM(require("react"), 1);
|
|
1219
1243
|
|
|
1220
1244
|
// src/primitives/field.tsx
|
|
1221
1245
|
var import_react = require("react");
|
|
1222
1246
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
1223
1247
|
|
|
1224
1248
|
// src/primitives/label.tsx
|
|
1225
|
-
var
|
|
1249
|
+
var React14 = __toESM(require("react"), 1);
|
|
1226
1250
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
1227
1251
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
1228
|
-
var
|
|
1252
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1229
1253
|
var labelVariants = (0, import_class_variance_authority6.cva)(
|
|
1230
1254
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
1231
1255
|
);
|
|
1232
|
-
var Label =
|
|
1256
|
+
var Label = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1233
1257
|
LabelPrimitive.Root,
|
|
1234
1258
|
{
|
|
1235
1259
|
ref,
|
|
@@ -1240,11 +1264,11 @@ var Label = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1240
1264
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
1241
1265
|
|
|
1242
1266
|
// src/primitives/separator.tsx
|
|
1243
|
-
var
|
|
1267
|
+
var React15 = __toESM(require("react"), 1);
|
|
1244
1268
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
1245
|
-
var
|
|
1246
|
-
var Separator =
|
|
1247
|
-
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1269
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1270
|
+
var Separator = React15.forwardRef(
|
|
1271
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1248
1272
|
SeparatorPrimitive.Root,
|
|
1249
1273
|
{
|
|
1250
1274
|
ref,
|
|
@@ -1262,9 +1286,9 @@ var Separator = React14.forwardRef(
|
|
|
1262
1286
|
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
1263
1287
|
|
|
1264
1288
|
// src/primitives/field.tsx
|
|
1265
|
-
var
|
|
1289
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1266
1290
|
function FieldSet({ className, ...props }) {
|
|
1267
|
-
return /* @__PURE__ */ (0,
|
|
1291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1268
1292
|
"fieldset",
|
|
1269
1293
|
{
|
|
1270
1294
|
"data-slot": "field-set",
|
|
@@ -1282,7 +1306,7 @@ function FieldLegend({
|
|
|
1282
1306
|
variant = "legend",
|
|
1283
1307
|
...props
|
|
1284
1308
|
}) {
|
|
1285
|
-
return /* @__PURE__ */ (0,
|
|
1309
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1286
1310
|
"legend",
|
|
1287
1311
|
{
|
|
1288
1312
|
"data-slot": "field-legend",
|
|
@@ -1298,7 +1322,7 @@ function FieldLegend({
|
|
|
1298
1322
|
);
|
|
1299
1323
|
}
|
|
1300
1324
|
function FieldGroup({ className, ...props }) {
|
|
1301
|
-
return /* @__PURE__ */ (0,
|
|
1325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1302
1326
|
"div",
|
|
1303
1327
|
{
|
|
1304
1328
|
"data-slot": "field-group",
|
|
@@ -1338,7 +1362,7 @@ function Field({
|
|
|
1338
1362
|
orientation = "vertical",
|
|
1339
1363
|
...props
|
|
1340
1364
|
}) {
|
|
1341
|
-
return /* @__PURE__ */ (0,
|
|
1365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1342
1366
|
"div",
|
|
1343
1367
|
{
|
|
1344
1368
|
role: "group",
|
|
@@ -1353,7 +1377,7 @@ function FieldLabel({
|
|
|
1353
1377
|
className,
|
|
1354
1378
|
...props
|
|
1355
1379
|
}) {
|
|
1356
|
-
return /* @__PURE__ */ (0,
|
|
1380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1357
1381
|
Label,
|
|
1358
1382
|
{
|
|
1359
1383
|
"data-slot": "field-label",
|
|
@@ -1368,7 +1392,7 @@ function FieldLabel({
|
|
|
1368
1392
|
);
|
|
1369
1393
|
}
|
|
1370
1394
|
function FieldTitle({ className, ...props }) {
|
|
1371
|
-
return /* @__PURE__ */ (0,
|
|
1395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1372
1396
|
"div",
|
|
1373
1397
|
{
|
|
1374
1398
|
"data-slot": "field-label",
|
|
@@ -1381,7 +1405,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
1381
1405
|
);
|
|
1382
1406
|
}
|
|
1383
1407
|
function FieldDescription({ className, ...props }) {
|
|
1384
|
-
return /* @__PURE__ */ (0,
|
|
1408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1385
1409
|
"p",
|
|
1386
1410
|
{
|
|
1387
1411
|
"data-slot": "field-description",
|
|
@@ -1400,7 +1424,7 @@ function FieldSeparator({
|
|
|
1400
1424
|
className,
|
|
1401
1425
|
...props
|
|
1402
1426
|
}) {
|
|
1403
|
-
return /* @__PURE__ */ (0,
|
|
1427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1404
1428
|
"div",
|
|
1405
1429
|
{
|
|
1406
1430
|
"data-slot": "field-separator",
|
|
@@ -1411,8 +1435,8 @@ function FieldSeparator({
|
|
|
1411
1435
|
),
|
|
1412
1436
|
...props,
|
|
1413
1437
|
children: [
|
|
1414
|
-
/* @__PURE__ */ (0,
|
|
1415
|
-
children && /* @__PURE__ */ (0,
|
|
1438
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Separator, { className: "absolute inset-0 top-1/2" }),
|
|
1439
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1416
1440
|
"span",
|
|
1417
1441
|
{
|
|
1418
1442
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
@@ -1440,14 +1464,14 @@ function FieldError({
|
|
|
1440
1464
|
if (errors?.length === 1 && errors[0]?.message) {
|
|
1441
1465
|
return errors[0].message;
|
|
1442
1466
|
}
|
|
1443
|
-
return /* @__PURE__ */ (0,
|
|
1444
|
-
(error, index) => error?.message && /* @__PURE__ */ (0,
|
|
1467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "ml-4 flex list-disc flex-col gap-1", children: errors.map(
|
|
1468
|
+
(error, index) => error?.message && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { children: error.message }, index)
|
|
1445
1469
|
) });
|
|
1446
1470
|
}, [children, errors]);
|
|
1447
1471
|
if (!content) {
|
|
1448
1472
|
return null;
|
|
1449
1473
|
}
|
|
1450
|
-
return /* @__PURE__ */ (0,
|
|
1474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1451
1475
|
"div",
|
|
1452
1476
|
{
|
|
1453
1477
|
role: "alert",
|
|
@@ -1460,14 +1484,14 @@ function FieldError({
|
|
|
1460
1484
|
}
|
|
1461
1485
|
|
|
1462
1486
|
// src/components/AdsField/index.tsx
|
|
1463
|
-
var
|
|
1487
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1464
1488
|
function useAdsFieldDescription({
|
|
1465
1489
|
describedBy,
|
|
1466
1490
|
errorText,
|
|
1467
1491
|
helperText,
|
|
1468
1492
|
id
|
|
1469
1493
|
}) {
|
|
1470
|
-
const generatedId =
|
|
1494
|
+
const generatedId = React16.useId();
|
|
1471
1495
|
const inputId = id ?? generatedId;
|
|
1472
1496
|
const helperId = helperText ? `${inputId}-helper` : void 0;
|
|
1473
1497
|
const errorId = errorText ? `${inputId}-error` : void 0;
|
|
@@ -1479,7 +1503,7 @@ function useAdsFieldDescription({
|
|
|
1479
1503
|
inputId
|
|
1480
1504
|
};
|
|
1481
1505
|
}
|
|
1482
|
-
var AdsField =
|
|
1506
|
+
var AdsField = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1483
1507
|
FieldGroup,
|
|
1484
1508
|
{
|
|
1485
1509
|
className: cn("w-full gap-7", className),
|
|
@@ -1488,14 +1512,14 @@ var AdsField = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
1488
1512
|
}
|
|
1489
1513
|
));
|
|
1490
1514
|
AdsField.displayName = "AdsField";
|
|
1491
|
-
var AdsFieldHeader =
|
|
1492
|
-
({ className, description, title, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1493
|
-
/* @__PURE__ */ (0,
|
|
1494
|
-
description ? /* @__PURE__ */ (0,
|
|
1515
|
+
var AdsFieldHeader = React16.forwardRef(
|
|
1516
|
+
({ className, description, title, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: cn("flex w-full flex-col gap-3", className), ref, ...props, children: [
|
|
1517
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FieldTitle, { className: "w-full text-base font-medium leading-6 text-foreground", children: title }),
|
|
1518
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FieldDescription, { className: "w-full text-sm leading-5 text-muted-foreground", children: description }) : null
|
|
1495
1519
|
] })
|
|
1496
1520
|
);
|
|
1497
1521
|
AdsFieldHeader.displayName = "AdsFieldHeader";
|
|
1498
|
-
var AdsFieldItem =
|
|
1522
|
+
var AdsFieldItem = React16.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1499
1523
|
Field,
|
|
1500
1524
|
{
|
|
1501
1525
|
className: cn("w-full gap-3", className),
|
|
@@ -1505,7 +1529,7 @@ var AdsFieldItem = React15.forwardRef(({ className, orientation = "vertical", ..
|
|
|
1505
1529
|
}
|
|
1506
1530
|
));
|
|
1507
1531
|
AdsFieldItem.displayName = "AdsFieldItem";
|
|
1508
|
-
var AdsFieldLabel =
|
|
1532
|
+
var AdsFieldLabel = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1509
1533
|
FieldLabel,
|
|
1510
1534
|
{
|
|
1511
1535
|
className: cn("w-full text-sm font-medium leading-5 text-foreground", className),
|
|
@@ -1514,7 +1538,7 @@ var AdsFieldLabel = React15.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1514
1538
|
}
|
|
1515
1539
|
));
|
|
1516
1540
|
AdsFieldLabel.displayName = "AdsFieldLabel";
|
|
1517
|
-
var AdsFieldLegend =
|
|
1541
|
+
var AdsFieldLegend = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1518
1542
|
FieldLegend,
|
|
1519
1543
|
{
|
|
1520
1544
|
className: cn("mb-3 text-base font-medium leading-6 text-foreground", className),
|
|
@@ -1523,7 +1547,7 @@ var AdsFieldLegend = React15.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1523
1547
|
}
|
|
1524
1548
|
));
|
|
1525
1549
|
AdsFieldLegend.displayName = "AdsFieldLegend";
|
|
1526
|
-
var AdsFieldDescription =
|
|
1550
|
+
var AdsFieldDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1527
1551
|
FieldDescription,
|
|
1528
1552
|
{
|
|
1529
1553
|
className: cn("text-sm leading-5 text-muted-foreground", className),
|
|
@@ -1532,7 +1556,7 @@ var AdsFieldDescription = React15.forwardRef(({ className, ...props }, ref) => /
|
|
|
1532
1556
|
}
|
|
1533
1557
|
));
|
|
1534
1558
|
AdsFieldDescription.displayName = "AdsFieldDescription";
|
|
1535
|
-
var AdsFieldError =
|
|
1559
|
+
var AdsFieldError = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1536
1560
|
FieldError,
|
|
1537
1561
|
{
|
|
1538
1562
|
className: cn("text-sm leading-5 text-destructive", className),
|
|
@@ -1541,7 +1565,7 @@ var AdsFieldError = React15.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1541
1565
|
}
|
|
1542
1566
|
));
|
|
1543
1567
|
AdsFieldError.displayName = "AdsFieldError";
|
|
1544
|
-
var AdsFieldSeparator =
|
|
1568
|
+
var AdsFieldSeparator = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1545
1569
|
FieldSeparator,
|
|
1546
1570
|
{
|
|
1547
1571
|
className: cn("py-2 text-muted-foreground", className),
|
|
@@ -1550,7 +1574,7 @@ var AdsFieldSeparator = React15.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1550
1574
|
}
|
|
1551
1575
|
));
|
|
1552
1576
|
AdsFieldSeparator.displayName = "AdsFieldSeparator";
|
|
1553
|
-
var AdsFieldGroup =
|
|
1577
|
+
var AdsFieldGroup = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1554
1578
|
FieldGroup,
|
|
1555
1579
|
{
|
|
1556
1580
|
className: cn("w-full gap-6", className),
|
|
@@ -1559,28 +1583,28 @@ var AdsFieldGroup = React15.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
1559
1583
|
}
|
|
1560
1584
|
));
|
|
1561
1585
|
AdsFieldGroup.displayName = "AdsFieldGroup";
|
|
1562
|
-
var AdsFieldSet =
|
|
1586
|
+
var AdsFieldSet = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FieldSet, { className: cn("w-full gap-6", className), ref, ...props }));
|
|
1563
1587
|
AdsFieldSet.displayName = "AdsFieldSet";
|
|
1564
|
-
var AdsFieldCheckboxRow =
|
|
1565
|
-
({ className, control, description, label, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1588
|
+
var AdsFieldCheckboxRow = React16.forwardRef(
|
|
1589
|
+
({ className, control, description, label, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1566
1590
|
"div",
|
|
1567
1591
|
{
|
|
1568
1592
|
className: cn("flex w-full items-start gap-3", description ? "min-h-5" : "items-center", className),
|
|
1569
1593
|
ref,
|
|
1570
1594
|
...props,
|
|
1571
1595
|
children: [
|
|
1572
|
-
/* @__PURE__ */ (0,
|
|
1573
|
-
/* @__PURE__ */ (0,
|
|
1574
|
-
/* @__PURE__ */ (0,
|
|
1575
|
-
description ? /* @__PURE__ */ (0,
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "shrink-0 pt-px", children: control }),
|
|
1597
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-sm leading-5 text-foreground", children: label }),
|
|
1599
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AdsFieldDescription, { className: "text-sm leading-5", children: description }) : null
|
|
1576
1600
|
] })
|
|
1577
1601
|
]
|
|
1578
1602
|
}
|
|
1579
1603
|
)
|
|
1580
1604
|
);
|
|
1581
1605
|
AdsFieldCheckboxRow.displayName = "AdsFieldCheckboxRow";
|
|
1582
|
-
var AdsFieldChoiceCard =
|
|
1583
|
-
({ checked, className, control, description, title, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1606
|
+
var AdsFieldChoiceCard = React16.forwardRef(
|
|
1607
|
+
({ checked, className, control, description, title, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1584
1608
|
"label",
|
|
1585
1609
|
{
|
|
1586
1610
|
className: cn(
|
|
@@ -1591,17 +1615,17 @@ var AdsFieldChoiceCard = React15.forwardRef(
|
|
|
1591
1615
|
ref,
|
|
1592
1616
|
...props,
|
|
1593
1617
|
children: [
|
|
1594
|
-
control ? /* @__PURE__ */ (0,
|
|
1595
|
-
/* @__PURE__ */ (0,
|
|
1596
|
-
/* @__PURE__ */ (0,
|
|
1597
|
-
description ? /* @__PURE__ */ (0,
|
|
1618
|
+
control ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "shrink-0 pt-px", children: control }) : null,
|
|
1619
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
1620
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "text-sm font-medium leading-5 text-foreground", children: title }),
|
|
1621
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AdsFieldDescription, { className: "text-sm leading-5", children: description }) : null
|
|
1598
1622
|
] })
|
|
1599
1623
|
]
|
|
1600
1624
|
}
|
|
1601
1625
|
)
|
|
1602
1626
|
);
|
|
1603
1627
|
AdsFieldChoiceCard.displayName = "AdsFieldChoiceCard";
|
|
1604
|
-
var AdsFieldActions =
|
|
1628
|
+
var AdsFieldActions = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1605
1629
|
"div",
|
|
1606
1630
|
{
|
|
1607
1631
|
className: cn("flex w-full flex-wrap items-center gap-3", className),
|
|
@@ -1612,15 +1636,15 @@ var AdsFieldActions = React15.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
1612
1636
|
AdsFieldActions.displayName = "AdsFieldActions";
|
|
1613
1637
|
|
|
1614
1638
|
// src/components/AdsCheckbox/index.tsx
|
|
1615
|
-
var
|
|
1639
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1616
1640
|
var checkboxBaseClassName = "h-4 w-4 rounded-[4px] border-border bg-card text-primary shadow-[0px_1px_2px_rgba(0,0,0,0.1)] focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground";
|
|
1617
|
-
var Checkbox2 =
|
|
1641
|
+
var Checkbox2 = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Checkbox, { className: cn(checkboxBaseClassName, className), ref, ...props }));
|
|
1618
1642
|
Checkbox2.displayName = "Checkbox";
|
|
1619
|
-
var AdsCheckbox =
|
|
1620
|
-
const generatedId =
|
|
1643
|
+
var AdsCheckbox = React17.forwardRef(({ checkboxClassName, className, description, id, label, wrapperClassName, ...props }, ref) => {
|
|
1644
|
+
const generatedId = React17.useId();
|
|
1621
1645
|
const inputId = id ?? generatedId;
|
|
1622
1646
|
if (!label) {
|
|
1623
|
-
return /* @__PURE__ */ (0,
|
|
1647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1624
1648
|
Checkbox2,
|
|
1625
1649
|
{
|
|
1626
1650
|
className: cn(className, checkboxClassName),
|
|
@@ -1630,10 +1654,10 @@ var AdsCheckbox = React16.forwardRef(({ checkboxClassName, className, descriptio
|
|
|
1630
1654
|
}
|
|
1631
1655
|
);
|
|
1632
1656
|
}
|
|
1633
|
-
return /* @__PURE__ */ (0,
|
|
1657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("label", { className: cn("block w-full cursor-pointer", wrapperClassName), htmlFor: inputId, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1634
1658
|
AdsFieldCheckboxRow,
|
|
1635
1659
|
{
|
|
1636
|
-
control: /* @__PURE__ */ (0,
|
|
1660
|
+
control: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1637
1661
|
Checkbox2,
|
|
1638
1662
|
{
|
|
1639
1663
|
className: cn(className, checkboxClassName),
|
|
@@ -1650,15 +1674,15 @@ var AdsCheckbox = React16.forwardRef(({ checkboxClassName, className, descriptio
|
|
|
1650
1674
|
AdsCheckbox.displayName = "AdsCheckbox";
|
|
1651
1675
|
|
|
1652
1676
|
// src/components/AdsButtonGroup/index.tsx
|
|
1653
|
-
var
|
|
1677
|
+
var React19 = __toESM(require("react"), 1);
|
|
1654
1678
|
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
1655
1679
|
|
|
1656
1680
|
// src/primitives/input.tsx
|
|
1657
|
-
var
|
|
1658
|
-
var
|
|
1659
|
-
var Input =
|
|
1681
|
+
var React18 = __toESM(require("react"), 1);
|
|
1682
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1683
|
+
var Input = React18.forwardRef(
|
|
1660
1684
|
({ className, type, ...props }, ref) => {
|
|
1661
|
-
return /* @__PURE__ */ (0,
|
|
1685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1662
1686
|
"input",
|
|
1663
1687
|
{
|
|
1664
1688
|
type,
|
|
@@ -1677,7 +1701,7 @@ Input.displayName = "Input";
|
|
|
1677
1701
|
// src/primitives/button-group.tsx
|
|
1678
1702
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
1679
1703
|
var import_class_variance_authority8 = require("class-variance-authority");
|
|
1680
|
-
var
|
|
1704
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1681
1705
|
var buttonGroupVariants = (0, import_class_variance_authority8.cva)(
|
|
1682
1706
|
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
1683
1707
|
{
|
|
@@ -1697,7 +1721,7 @@ function ButtonGroupSeparator({
|
|
|
1697
1721
|
orientation = "vertical",
|
|
1698
1722
|
...props
|
|
1699
1723
|
}) {
|
|
1700
|
-
return /* @__PURE__ */ (0,
|
|
1724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1701
1725
|
Separator,
|
|
1702
1726
|
{
|
|
1703
1727
|
"data-slot": "button-group-separator",
|
|
@@ -1716,7 +1740,7 @@ function ButtonGroupSeparator({
|
|
|
1716
1740
|
}
|
|
1717
1741
|
|
|
1718
1742
|
// src/components/AdsButtonGroup/index.tsx
|
|
1719
|
-
var
|
|
1743
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1720
1744
|
var buttonGroupPressClassName = "[&_button]:transition-[background-color,box-shadow,filter] [&_button]:active:translate-y-0 [&_button]:active:brightness-95";
|
|
1721
1745
|
var segmentSizeClassName = {
|
|
1722
1746
|
sm: "h-8 px-md text-sm",
|
|
@@ -1724,14 +1748,14 @@ var segmentSizeClassName = {
|
|
|
1724
1748
|
lg: "h-10 px-xl text-base"
|
|
1725
1749
|
};
|
|
1726
1750
|
function isAdsButtonElement(child) {
|
|
1727
|
-
return
|
|
1751
|
+
return React19.isValidElement(child) && child.type === AdsButton;
|
|
1728
1752
|
}
|
|
1729
1753
|
function enhanceChildren(children, attached, size, surface) {
|
|
1730
|
-
return
|
|
1754
|
+
return React19.Children.map(children, (child) => {
|
|
1731
1755
|
if (!isAdsButtonElement(child)) {
|
|
1732
1756
|
return child;
|
|
1733
1757
|
}
|
|
1734
|
-
return
|
|
1758
|
+
return React19.cloneElement(child, {
|
|
1735
1759
|
className: cn(
|
|
1736
1760
|
attached && "rounded-none shadow-none",
|
|
1737
1761
|
attached && surface === "secondary" && "bg-secondary hover:bg-secondary/90",
|
|
@@ -1741,7 +1765,7 @@ function enhanceChildren(children, attached, size, surface) {
|
|
|
1741
1765
|
});
|
|
1742
1766
|
});
|
|
1743
1767
|
}
|
|
1744
|
-
var AdsButtonGroup =
|
|
1768
|
+
var AdsButtonGroup = React19.forwardRef(
|
|
1745
1769
|
({
|
|
1746
1770
|
attached = true,
|
|
1747
1771
|
children,
|
|
@@ -1760,7 +1784,7 @@ var AdsButtonGroup = React18.forwardRef(
|
|
|
1760
1784
|
buttonGroupVariants({ orientation }),
|
|
1761
1785
|
surface === "pill" ? "rounded-full" : "rounded-radius-md"
|
|
1762
1786
|
);
|
|
1763
|
-
return /* @__PURE__ */ (0,
|
|
1787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1764
1788
|
"div",
|
|
1765
1789
|
{
|
|
1766
1790
|
"aria-orientation": orientation,
|
|
@@ -1802,7 +1826,7 @@ var inputSizeClassName = {
|
|
|
1802
1826
|
md: "h-9 text-sm leading-5",
|
|
1803
1827
|
lg: "h-10 text-base leading-6"
|
|
1804
1828
|
};
|
|
1805
|
-
var AdsButtonGroupText =
|
|
1829
|
+
var AdsButtonGroupText = React19.forwardRef(
|
|
1806
1830
|
({
|
|
1807
1831
|
align = "start",
|
|
1808
1832
|
asChild = false,
|
|
@@ -1813,7 +1837,7 @@ var AdsButtonGroupText = React18.forwardRef(
|
|
|
1813
1837
|
...props
|
|
1814
1838
|
}, ref) => {
|
|
1815
1839
|
const Comp = asChild ? import_react_slot4.Slot : "div";
|
|
1816
|
-
return /* @__PURE__ */ (0,
|
|
1840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1817
1841
|
Comp,
|
|
1818
1842
|
{
|
|
1819
1843
|
className: cn(
|
|
@@ -1833,7 +1857,7 @@ var AdsButtonGroupText = React18.forwardRef(
|
|
|
1833
1857
|
}
|
|
1834
1858
|
);
|
|
1835
1859
|
AdsButtonGroupText.displayName = "AdsButtonGroupText";
|
|
1836
|
-
var AdsButtonGroupInput =
|
|
1860
|
+
var AdsButtonGroupInput = React19.forwardRef(({ className, size = "md", type = "text", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1837
1861
|
Input,
|
|
1838
1862
|
{
|
|
1839
1863
|
className: cn(
|
|
@@ -1850,19 +1874,19 @@ AdsButtonGroupInput.displayName = "AdsButtonGroupInput";
|
|
|
1850
1874
|
var AdsButtonGroupSeparator = ButtonGroupSeparator;
|
|
1851
1875
|
|
|
1852
1876
|
// src/components/AdsSeparator/index.tsx
|
|
1853
|
-
var
|
|
1854
|
-
var
|
|
1855
|
-
var
|
|
1877
|
+
var React20 = __toESM(require("react"), 1);
|
|
1878
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1879
|
+
var toneClassName2 = {
|
|
1856
1880
|
default: "bg-border",
|
|
1857
1881
|
muted: "bg-border-muted"
|
|
1858
1882
|
};
|
|
1859
|
-
var AdsSeparator =
|
|
1883
|
+
var AdsSeparator = React20.forwardRef(({ className, orientation = "horizontal", tone = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1860
1884
|
Separator,
|
|
1861
1885
|
{
|
|
1862
1886
|
className: cn(
|
|
1863
1887
|
"shrink-0",
|
|
1864
1888
|
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
1865
|
-
|
|
1889
|
+
toneClassName2[tone],
|
|
1866
1890
|
className
|
|
1867
1891
|
),
|
|
1868
1892
|
orientation,
|
|
@@ -1873,13 +1897,13 @@ var AdsSeparator = React19.forwardRef(({ className, orientation = "horizontal",
|
|
|
1873
1897
|
AdsSeparator.displayName = "AdsSeparator";
|
|
1874
1898
|
|
|
1875
1899
|
// src/components/AdsSkeleton/index.tsx
|
|
1876
|
-
var
|
|
1900
|
+
var React22 = __toESM(require("react"), 1);
|
|
1877
1901
|
|
|
1878
1902
|
// src/primitives/skeleton.tsx
|
|
1879
|
-
var
|
|
1880
|
-
var
|
|
1881
|
-
var Skeleton =
|
|
1882
|
-
({ animated = true, className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1903
|
+
var React21 = __toESM(require("react"), 1);
|
|
1904
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1905
|
+
var Skeleton = React21.forwardRef(
|
|
1906
|
+
({ animated = true, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1883
1907
|
"div",
|
|
1884
1908
|
{
|
|
1885
1909
|
className: cn(
|
|
@@ -1895,21 +1919,21 @@ var Skeleton = React20.forwardRef(
|
|
|
1895
1919
|
Skeleton.displayName = "Skeleton";
|
|
1896
1920
|
|
|
1897
1921
|
// src/components/AdsSkeleton/index.tsx
|
|
1898
|
-
var
|
|
1922
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1899
1923
|
var shapeClassName = {
|
|
1900
1924
|
default: "rounded-radius-md",
|
|
1901
1925
|
line: "h-4 w-full rounded-full",
|
|
1902
1926
|
circle: "rounded-full"
|
|
1903
1927
|
};
|
|
1904
|
-
var
|
|
1928
|
+
var toneClassName3 = {
|
|
1905
1929
|
default: "bg-secondary",
|
|
1906
1930
|
muted: "bg-accent"
|
|
1907
1931
|
};
|
|
1908
|
-
var AdsSkeleton =
|
|
1909
|
-
({ className, shape = "default", tone = "default", ...props }, ref) => /* @__PURE__ */ (0,
|
|
1932
|
+
var AdsSkeleton = React22.forwardRef(
|
|
1933
|
+
({ className, shape = "default", tone = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1910
1934
|
Skeleton,
|
|
1911
1935
|
{
|
|
1912
|
-
className: cn(shapeClassName[shape],
|
|
1936
|
+
className: cn(shapeClassName[shape], toneClassName3[tone], className),
|
|
1913
1937
|
ref,
|
|
1914
1938
|
...props
|
|
1915
1939
|
}
|
|
@@ -1918,8 +1942,8 @@ var AdsSkeleton = React21.forwardRef(
|
|
|
1918
1942
|
AdsSkeleton.displayName = "AdsSkeleton";
|
|
1919
1943
|
|
|
1920
1944
|
// src/components/AdsInput/index.tsx
|
|
1921
|
-
var
|
|
1922
|
-
var
|
|
1945
|
+
var React23 = __toESM(require("react"), 1);
|
|
1946
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1923
1947
|
var inputBaseClassName = "flex w-full rounded-md border border-border bg-card px-3 py-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm";
|
|
1924
1948
|
var inputSizeClasses = {
|
|
1925
1949
|
sm: "h-8 text-sm leading-5",
|
|
@@ -1943,7 +1967,7 @@ function getInputSurfaceClassName({
|
|
|
1943
1967
|
className
|
|
1944
1968
|
);
|
|
1945
1969
|
}
|
|
1946
|
-
var AdsInput =
|
|
1970
|
+
var AdsInput = React23.forwardRef(
|
|
1947
1971
|
({
|
|
1948
1972
|
action,
|
|
1949
1973
|
className,
|
|
@@ -1962,7 +1986,7 @@ var AdsInput = React22.forwardRef(
|
|
|
1962
1986
|
...props
|
|
1963
1987
|
}, ref) => {
|
|
1964
1988
|
const { messages } = useAdsI18n();
|
|
1965
|
-
const [selectedFiles, setSelectedFiles] =
|
|
1989
|
+
const [selectedFiles, setSelectedFiles] = React23.useState([]);
|
|
1966
1990
|
const description = useAdsFieldDescription({
|
|
1967
1991
|
describedBy: props["aria-describedby"],
|
|
1968
1992
|
errorText,
|
|
@@ -1979,7 +2003,7 @@ var AdsInput = React22.forwardRef(
|
|
|
1979
2003
|
const isFileInput = type === "file";
|
|
1980
2004
|
const resolvedFileTriggerLabel = fileTriggerLabel ?? messages.input.chooseFile;
|
|
1981
2005
|
const resolvedEmptyFileLabel = emptyFileLabel ?? messages.input.noFileChosen;
|
|
1982
|
-
const handleChange =
|
|
2006
|
+
const handleChange = React23.useCallback(
|
|
1983
2007
|
(event) => {
|
|
1984
2008
|
if (isFileInput) {
|
|
1985
2009
|
setSelectedFiles(Array.from(event.target.files ?? [], (file) => file.name));
|
|
@@ -1989,10 +2013,10 @@ var AdsInput = React22.forwardRef(
|
|
|
1989
2013
|
[isFileInput, onChange]
|
|
1990
2014
|
);
|
|
1991
2015
|
const fileNameText = selectedFiles.length > 0 ? selectedFiles.join(", ") : resolvedEmptyFileLabel;
|
|
1992
|
-
const helperNode = helperText ? /* @__PURE__ */ (0,
|
|
1993
|
-
const errorNode = errorText ? /* @__PURE__ */ (0,
|
|
1994
|
-
const inputNode = isFileInput ? /* @__PURE__ */ (0,
|
|
1995
|
-
/* @__PURE__ */ (0,
|
|
2016
|
+
const helperNode = helperText ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
|
|
2017
|
+
const errorNode = errorText ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AdsFieldError, { id: description.errorId, children: errorText }) : null;
|
|
2018
|
+
const inputNode = isFileInput ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "relative flex w-full min-w-0 flex-1 items-center", children: [
|
|
2019
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1996
2020
|
Input,
|
|
1997
2021
|
{
|
|
1998
2022
|
"aria-describedby": description.describedBy,
|
|
@@ -2009,7 +2033,7 @@ var AdsInput = React22.forwardRef(
|
|
|
2009
2033
|
...props
|
|
2010
2034
|
}
|
|
2011
2035
|
),
|
|
2012
|
-
/* @__PURE__ */ (0,
|
|
2036
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2013
2037
|
"div",
|
|
2014
2038
|
{
|
|
2015
2039
|
"aria-hidden": "true",
|
|
@@ -2019,8 +2043,8 @@ var AdsInput = React22.forwardRef(
|
|
|
2019
2043
|
props.disabled ? "cursor-not-allowed opacity-50" : void 0
|
|
2020
2044
|
),
|
|
2021
2045
|
children: [
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2023
|
-
/* @__PURE__ */ (0,
|
|
2046
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "shrink-0 pr-sm text-sm font-medium leading-5 text-foreground", children: resolvedFileTriggerLabel }),
|
|
2047
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2024
2048
|
"span",
|
|
2025
2049
|
{
|
|
2026
2050
|
className: cn(
|
|
@@ -2033,9 +2057,9 @@ var AdsInput = React22.forwardRef(
|
|
|
2033
2057
|
]
|
|
2034
2058
|
}
|
|
2035
2059
|
)
|
|
2036
|
-
] }) : /* @__PURE__ */ (0,
|
|
2037
|
-
prefix ? /* @__PURE__ */ (0,
|
|
2038
|
-
/* @__PURE__ */ (0,
|
|
2060
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "relative flex w-full min-w-0 flex-1 items-center", children: [
|
|
2061
|
+
prefix ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "pointer-events-none absolute left-md inline-flex text-icon-muted", children: prefix }) : null,
|
|
2062
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2039
2063
|
Input,
|
|
2040
2064
|
{
|
|
2041
2065
|
"aria-describedby": description.describedBy,
|
|
@@ -2048,14 +2072,14 @@ var AdsInput = React22.forwardRef(
|
|
|
2048
2072
|
...props
|
|
2049
2073
|
}
|
|
2050
2074
|
),
|
|
2051
|
-
suffix ? /* @__PURE__ */ (0,
|
|
2075
|
+
suffix ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "absolute right-md inline-flex items-center text-icon-muted", children: suffix }) : null
|
|
2052
2076
|
] });
|
|
2053
|
-
return /* @__PURE__ */ (0,
|
|
2054
|
-
label ? /* @__PURE__ */ (0,
|
|
2077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(AdsFieldItem, { children: [
|
|
2078
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AdsFieldLabel, { htmlFor: description.inputId, children: label }) : null,
|
|
2055
2079
|
descriptionPlacement === "above" ? helperNode : null,
|
|
2056
|
-
/* @__PURE__ */ (0,
|
|
2080
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex w-full items-center gap-sm", children: [
|
|
2057
2081
|
inputNode,
|
|
2058
|
-
action ? /* @__PURE__ */ (0,
|
|
2082
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "shrink-0", children: action }) : null
|
|
2059
2083
|
] }),
|
|
2060
2084
|
descriptionPlacement === "below" ? helperNode : null,
|
|
2061
2085
|
errorNode
|
|
@@ -2065,13 +2089,13 @@ var AdsInput = React22.forwardRef(
|
|
|
2065
2089
|
AdsInput.displayName = "AdsInput";
|
|
2066
2090
|
|
|
2067
2091
|
// src/components/AdsInputGroup/index.tsx
|
|
2068
|
-
var
|
|
2092
|
+
var React25 = __toESM(require("react"), 1);
|
|
2069
2093
|
|
|
2070
2094
|
// src/primitives/textarea.tsx
|
|
2071
|
-
var
|
|
2072
|
-
var
|
|
2073
|
-
var Textarea =
|
|
2074
|
-
return /* @__PURE__ */ (0,
|
|
2095
|
+
var React24 = __toESM(require("react"), 1);
|
|
2096
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2097
|
+
var Textarea = React24.forwardRef(({ className, ...props }, ref) => {
|
|
2098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2075
2099
|
"textarea",
|
|
2076
2100
|
{
|
|
2077
2101
|
className: cn(
|
|
@@ -2086,7 +2110,7 @@ var Textarea = React23.forwardRef(({ className, ...props }, ref) => {
|
|
|
2086
2110
|
Textarea.displayName = "Textarea";
|
|
2087
2111
|
|
|
2088
2112
|
// src/components/AdsInputGroup/index.tsx
|
|
2089
|
-
var
|
|
2113
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2090
2114
|
function useAdsInputGroupDescription(describedBy, helperText, errorText, idBase) {
|
|
2091
2115
|
const helperId = helperText ? `${idBase}-helper` : void 0;
|
|
2092
2116
|
const errorId = errorText ? `${idBase}-error` : void 0;
|
|
@@ -2105,11 +2129,11 @@ function AdsInputGroupChrome({
|
|
|
2105
2129
|
helperText,
|
|
2106
2130
|
label
|
|
2107
2131
|
}) {
|
|
2108
|
-
return /* @__PURE__ */ (0,
|
|
2109
|
-
label ? /* @__PURE__ */ (0,
|
|
2132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex w-full flex-col gap-md", children: [
|
|
2133
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "text-sm font-medium leading-5 text-foreground", children: label }) : null,
|
|
2110
2134
|
children,
|
|
2111
|
-
helperText ? /* @__PURE__ */ (0,
|
|
2112
|
-
errorText ? /* @__PURE__ */ (0,
|
|
2135
|
+
helperText ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm leading-5 text-muted-foreground", id: helperId, children: helperText }) : null,
|
|
2136
|
+
errorText ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-sm leading-5 text-destructive", id: errorId, children: errorText }) : null
|
|
2113
2137
|
] });
|
|
2114
2138
|
}
|
|
2115
2139
|
var addonBaseClassName = "flex shrink-0 items-center self-stretch bg-secondary px-lg text-sm leading-5 text-foreground";
|
|
@@ -2130,21 +2154,21 @@ function AdsInputGroup({
|
|
|
2130
2154
|
trailingAddon,
|
|
2131
2155
|
trailingAddonClassName
|
|
2132
2156
|
}) {
|
|
2133
|
-
const generatedId =
|
|
2157
|
+
const generatedId = React25.useId();
|
|
2134
2158
|
const description = useAdsInputGroupDescription(
|
|
2135
2159
|
void 0,
|
|
2136
2160
|
helperText,
|
|
2137
2161
|
errorText,
|
|
2138
2162
|
id ?? generatedId
|
|
2139
2163
|
);
|
|
2140
|
-
return /* @__PURE__ */ (0,
|
|
2164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2141
2165
|
AdsInputGroupChrome,
|
|
2142
2166
|
{
|
|
2143
2167
|
errorText,
|
|
2144
2168
|
helperText,
|
|
2145
2169
|
label,
|
|
2146
2170
|
...description,
|
|
2147
|
-
children: /* @__PURE__ */ (0,
|
|
2171
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("w-full", className), children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2148
2172
|
"div",
|
|
2149
2173
|
{
|
|
2150
2174
|
className: cn(
|
|
@@ -2154,9 +2178,9 @@ function AdsInputGroup({
|
|
|
2154
2178
|
surfaceClassName
|
|
2155
2179
|
),
|
|
2156
2180
|
children: [
|
|
2157
|
-
header ? /* @__PURE__ */ (0,
|
|
2158
|
-
/* @__PURE__ */ (0,
|
|
2159
|
-
leadingAddon ? /* @__PURE__ */ (0,
|
|
2181
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "border-b border-border px-md py-md text-sm text-foreground", children: header }) : null,
|
|
2182
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex min-h-11 w-full items-stretch", children: [
|
|
2183
|
+
leadingAddon ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2160
2184
|
"div",
|
|
2161
2185
|
{
|
|
2162
2186
|
className: cn(
|
|
@@ -2167,7 +2191,7 @@ function AdsInputGroup({
|
|
|
2167
2191
|
children: leadingAddon
|
|
2168
2192
|
}
|
|
2169
2193
|
) : null,
|
|
2170
|
-
/* @__PURE__ */ (0,
|
|
2194
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2171
2195
|
"div",
|
|
2172
2196
|
{
|
|
2173
2197
|
className: cn(
|
|
@@ -2177,7 +2201,7 @@ function AdsInputGroup({
|
|
|
2177
2201
|
children
|
|
2178
2202
|
}
|
|
2179
2203
|
),
|
|
2180
|
-
trailingAddon ? /* @__PURE__ */ (0,
|
|
2204
|
+
trailingAddon ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2181
2205
|
"div",
|
|
2182
2206
|
{
|
|
2183
2207
|
className: cn(
|
|
@@ -2189,14 +2213,14 @@ function AdsInputGroup({
|
|
|
2189
2213
|
}
|
|
2190
2214
|
) : null
|
|
2191
2215
|
] }),
|
|
2192
|
-
footer ? /* @__PURE__ */ (0,
|
|
2216
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "border-t border-border px-md py-sm text-sm text-muted-foreground", children: footer }) : null
|
|
2193
2217
|
]
|
|
2194
2218
|
}
|
|
2195
2219
|
) })
|
|
2196
2220
|
}
|
|
2197
2221
|
);
|
|
2198
2222
|
}
|
|
2199
|
-
var AdsInputGroupInput =
|
|
2223
|
+
var AdsInputGroupInput = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2200
2224
|
Input,
|
|
2201
2225
|
{
|
|
2202
2226
|
className: cn(
|
|
@@ -2209,7 +2233,7 @@ var AdsInputGroupInput = React24.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2209
2233
|
}
|
|
2210
2234
|
));
|
|
2211
2235
|
AdsInputGroupInput.displayName = "AdsInputGroupInput";
|
|
2212
|
-
var AdsInputGroupTextarea =
|
|
2236
|
+
var AdsInputGroupTextarea = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2213
2237
|
Textarea,
|
|
2214
2238
|
{
|
|
2215
2239
|
className: cn(
|
|
@@ -2224,14 +2248,14 @@ var AdsInputGroupTextarea = React24.forwardRef(({ className, ...props }, ref) =>
|
|
|
2224
2248
|
AdsInputGroupTextarea.displayName = "AdsInputGroupTextarea";
|
|
2225
2249
|
|
|
2226
2250
|
// src/components/AdsInputOTP/index.tsx
|
|
2227
|
-
var
|
|
2251
|
+
var React27 = __toESM(require("react"), 1);
|
|
2228
2252
|
|
|
2229
2253
|
// src/primitives/input-otp.tsx
|
|
2230
|
-
var
|
|
2254
|
+
var React26 = __toESM(require("react"), 1);
|
|
2231
2255
|
var import_input_otp = require("input-otp");
|
|
2232
|
-
var
|
|
2233
|
-
var
|
|
2234
|
-
var InputOTP =
|
|
2256
|
+
var import_lucide_react7 = require("lucide-react");
|
|
2257
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2258
|
+
var InputOTP = React26.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2235
2259
|
import_input_otp.OTPInput,
|
|
2236
2260
|
{
|
|
2237
2261
|
ref,
|
|
@@ -2244,12 +2268,12 @@ var InputOTP = React25.forwardRef(({ className, containerClassName, ...props },
|
|
|
2244
2268
|
}
|
|
2245
2269
|
));
|
|
2246
2270
|
InputOTP.displayName = "InputOTP";
|
|
2247
|
-
var InputOTPGroup =
|
|
2271
|
+
var InputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
2248
2272
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
2249
|
-
var InputOTPSlot =
|
|
2250
|
-
const inputOTPContext =
|
|
2273
|
+
var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
|
|
2274
|
+
const inputOTPContext = React26.useContext(import_input_otp.OTPInputContext);
|
|
2251
2275
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
2252
|
-
return /* @__PURE__ */ (0,
|
|
2276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2253
2277
|
"div",
|
|
2254
2278
|
{
|
|
2255
2279
|
ref,
|
|
@@ -2261,19 +2285,19 @@ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
2261
2285
|
...props,
|
|
2262
2286
|
children: [
|
|
2263
2287
|
char,
|
|
2264
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
2288
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
2265
2289
|
]
|
|
2266
2290
|
}
|
|
2267
2291
|
);
|
|
2268
2292
|
});
|
|
2269
2293
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
2270
|
-
var InputOTPSeparator =
|
|
2294
|
+
var InputOTPSeparator = React26.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react7.Dot, {}) }));
|
|
2271
2295
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
2272
2296
|
|
|
2273
2297
|
// src/components/AdsInputOTP/index.tsx
|
|
2274
|
-
var
|
|
2298
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2275
2299
|
function useFieldDescription(id, describedBy, helperText, errorText) {
|
|
2276
|
-
const generatedId =
|
|
2300
|
+
const generatedId = React27.useId();
|
|
2277
2301
|
const inputId = id ?? generatedId;
|
|
2278
2302
|
const helperId = helperText ? `${inputId}-helper` : void 0;
|
|
2279
2303
|
const errorId = errorText ? `${inputId}-error` : void 0;
|
|
@@ -2294,21 +2318,21 @@ function AdsInputOTPChrome({
|
|
|
2294
2318
|
inputId,
|
|
2295
2319
|
label
|
|
2296
2320
|
}) {
|
|
2297
|
-
return /* @__PURE__ */ (0,
|
|
2298
|
-
label ? /* @__PURE__ */ (0,
|
|
2321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex w-full flex-col gap-md", children: [
|
|
2322
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { className: "text-sm font-medium leading-5 text-foreground", htmlFor: inputId, children: label }) : null,
|
|
2299
2323
|
children,
|
|
2300
|
-
helperText ? /* @__PURE__ */ (0,
|
|
2301
|
-
errorText ? /* @__PURE__ */ (0,
|
|
2324
|
+
helperText ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm leading-5 text-muted-foreground", id: helperId, children: helperText }) : null,
|
|
2325
|
+
errorText ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-sm leading-5 text-destructive", id: errorId, children: errorText }) : null
|
|
2302
2326
|
] });
|
|
2303
2327
|
}
|
|
2304
2328
|
function buildSeparator(node, key) {
|
|
2305
2329
|
if (node === void 0) {
|
|
2306
|
-
return /* @__PURE__ */ (0,
|
|
2330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AdsInputOTPSeparator, {}, key);
|
|
2307
2331
|
}
|
|
2308
|
-
if (
|
|
2309
|
-
return
|
|
2332
|
+
if (React27.isValidElement(node)) {
|
|
2333
|
+
return React27.cloneElement(node, { key });
|
|
2310
2334
|
}
|
|
2311
|
-
return /* @__PURE__ */ (0,
|
|
2335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: node }, key);
|
|
2312
2336
|
}
|
|
2313
2337
|
function buildOtpChildren(groups, separator) {
|
|
2314
2338
|
const defaultGroup = groups.length > 0 ? groups : [6];
|
|
@@ -2316,7 +2340,7 @@ function buildOtpChildren(groups, separator) {
|
|
|
2316
2340
|
let index = 0;
|
|
2317
2341
|
defaultGroup.forEach((size, indexOfGroup) => {
|
|
2318
2342
|
items.push(
|
|
2319
|
-
/* @__PURE__ */ (0,
|
|
2343
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(AdsInputOTPGroup, { children: Array.from({ length: size }, (_, slotOffset) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2320
2344
|
AdsInputOTPSlot,
|
|
2321
2345
|
{
|
|
2322
2346
|
index: index + slotOffset
|
|
@@ -2331,11 +2355,11 @@ function buildOtpChildren(groups, separator) {
|
|
|
2331
2355
|
});
|
|
2332
2356
|
return items;
|
|
2333
2357
|
}
|
|
2334
|
-
var AdsInputOTP =
|
|
2358
|
+
var AdsInputOTP = React27.forwardRef(({ action, errorText, groups, helperText, label, separator, children, id, ...props }, ref) => {
|
|
2335
2359
|
const totalSlots = groups && groups.length > 0 ? groups.reduce((sum, value) => sum + value, 0) : 6;
|
|
2336
2360
|
const description = useFieldDescription(id, props["aria-describedby"], helperText, errorText);
|
|
2337
2361
|
const otpChildren = children ?? buildOtpChildren(groups ?? [], separator);
|
|
2338
|
-
return /* @__PURE__ */ (0,
|
|
2362
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2339
2363
|
AdsInputOTPChrome,
|
|
2340
2364
|
{
|
|
2341
2365
|
errorText,
|
|
@@ -2344,8 +2368,8 @@ var AdsInputOTP = React26.forwardRef(({ action, errorText, groups, helperText, l
|
|
|
2344
2368
|
helperId: description.helperId,
|
|
2345
2369
|
inputId: description.inputId,
|
|
2346
2370
|
label,
|
|
2347
|
-
children: /* @__PURE__ */ (0,
|
|
2348
|
-
/* @__PURE__ */ (0,
|
|
2371
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex w-full items-center gap-sm", children: [
|
|
2372
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2349
2373
|
InputOTP,
|
|
2350
2374
|
{
|
|
2351
2375
|
"aria-describedby": description.describedBy,
|
|
@@ -2357,15 +2381,15 @@ var AdsInputOTP = React26.forwardRef(({ action, errorText, groups, helperText, l
|
|
|
2357
2381
|
children: otpChildren
|
|
2358
2382
|
}
|
|
2359
2383
|
),
|
|
2360
|
-
action ? /* @__PURE__ */ (0,
|
|
2384
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "shrink-0", children: action }) : null
|
|
2361
2385
|
] })
|
|
2362
2386
|
}
|
|
2363
2387
|
);
|
|
2364
2388
|
});
|
|
2365
2389
|
AdsInputOTP.displayName = "AdsInputOTP";
|
|
2366
|
-
var AdsInputOTPGroup =
|
|
2390
|
+
var AdsInputOTPGroup = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(InputOTPGroup, { className, ref, ...props }));
|
|
2367
2391
|
AdsInputOTPGroup.displayName = "AdsInputOTPGroup";
|
|
2368
|
-
var AdsInputOTPSeparator =
|
|
2392
|
+
var AdsInputOTPSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2369
2393
|
InputOTPSeparator,
|
|
2370
2394
|
{
|
|
2371
2395
|
className: className ?? "h-px w-6 shrink-0 bg-border text-transparent [&_svg]:hidden",
|
|
@@ -2374,7 +2398,7 @@ var AdsInputOTPSeparator = React26.forwardRef(({ className, ...props }, ref) =>
|
|
|
2374
2398
|
}
|
|
2375
2399
|
));
|
|
2376
2400
|
AdsInputOTPSeparator.displayName = "AdsInputOTPSeparator";
|
|
2377
|
-
var AdsInputOTPSlot =
|
|
2401
|
+
var AdsInputOTPSlot = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2378
2402
|
InputOTPSlot,
|
|
2379
2403
|
{
|
|
2380
2404
|
className: [
|
|
@@ -2391,14 +2415,14 @@ var AdsInputOTPSlot = React26.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
2391
2415
|
AdsInputOTPSlot.displayName = "AdsInputOTPSlot";
|
|
2392
2416
|
|
|
2393
2417
|
// src/components/AdsPagination/index.tsx
|
|
2394
|
-
var
|
|
2395
|
-
var
|
|
2418
|
+
var React29 = __toESM(require("react"), 1);
|
|
2419
|
+
var import_lucide_react9 = require("lucide-react");
|
|
2396
2420
|
|
|
2397
2421
|
// src/primitives/pagination.tsx
|
|
2398
|
-
var
|
|
2399
|
-
var
|
|
2400
|
-
var
|
|
2401
|
-
var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
2422
|
+
var React28 = __toESM(require("react"), 1);
|
|
2423
|
+
var import_lucide_react8 = require("lucide-react");
|
|
2424
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2425
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2402
2426
|
"nav",
|
|
2403
2427
|
{
|
|
2404
2428
|
role: "navigation",
|
|
@@ -2408,7 +2432,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
2408
2432
|
}
|
|
2409
2433
|
);
|
|
2410
2434
|
Pagination.displayName = "Pagination";
|
|
2411
|
-
var PaginationContent =
|
|
2435
|
+
var PaginationContent = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2412
2436
|
"ul",
|
|
2413
2437
|
{
|
|
2414
2438
|
ref,
|
|
@@ -2417,14 +2441,14 @@ var PaginationContent = React27.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2417
2441
|
}
|
|
2418
2442
|
));
|
|
2419
2443
|
PaginationContent.displayName = "PaginationContent";
|
|
2420
|
-
var PaginationItem =
|
|
2444
|
+
var PaginationItem = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("li", { ref, className: cn("", className), ...props }));
|
|
2421
2445
|
PaginationItem.displayName = "PaginationItem";
|
|
2422
2446
|
var PaginationLink = ({
|
|
2423
2447
|
className,
|
|
2424
2448
|
isActive,
|
|
2425
2449
|
size = "icon",
|
|
2426
2450
|
...props
|
|
2427
|
-
}) => /* @__PURE__ */ (0,
|
|
2451
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2428
2452
|
"a",
|
|
2429
2453
|
{
|
|
2430
2454
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -2442,7 +2466,7 @@ PaginationLink.displayName = "PaginationLink";
|
|
|
2442
2466
|
var PaginationPrevious = ({
|
|
2443
2467
|
className,
|
|
2444
2468
|
...props
|
|
2445
|
-
}) => /* @__PURE__ */ (0,
|
|
2469
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2446
2470
|
PaginationLink,
|
|
2447
2471
|
{
|
|
2448
2472
|
"aria-label": "Go to previous page",
|
|
@@ -2450,8 +2474,8 @@ var PaginationPrevious = ({
|
|
|
2450
2474
|
className: cn("gap-1 pl-2.5", className),
|
|
2451
2475
|
...props,
|
|
2452
2476
|
children: [
|
|
2453
|
-
/* @__PURE__ */ (0,
|
|
2454
|
-
/* @__PURE__ */ (0,
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react8.ChevronLeft, { className: "h-4 w-4" }),
|
|
2478
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Previous" })
|
|
2455
2479
|
]
|
|
2456
2480
|
}
|
|
2457
2481
|
);
|
|
@@ -2459,7 +2483,7 @@ PaginationPrevious.displayName = "PaginationPrevious";
|
|
|
2459
2483
|
var PaginationNext = ({
|
|
2460
2484
|
className,
|
|
2461
2485
|
...props
|
|
2462
|
-
}) => /* @__PURE__ */ (0,
|
|
2486
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2463
2487
|
PaginationLink,
|
|
2464
2488
|
{
|
|
2465
2489
|
"aria-label": "Go to next page",
|
|
@@ -2467,8 +2491,8 @@ var PaginationNext = ({
|
|
|
2467
2491
|
className: cn("gap-1 pr-2.5", className),
|
|
2468
2492
|
...props,
|
|
2469
2493
|
children: [
|
|
2470
|
-
/* @__PURE__ */ (0,
|
|
2471
|
-
/* @__PURE__ */ (0,
|
|
2494
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { children: "Next" }),
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react8.ChevronRight, { className: "h-4 w-4" })
|
|
2472
2496
|
]
|
|
2473
2497
|
}
|
|
2474
2498
|
);
|
|
@@ -2476,27 +2500,27 @@ PaginationNext.displayName = "PaginationNext";
|
|
|
2476
2500
|
var PaginationEllipsis = ({
|
|
2477
2501
|
className,
|
|
2478
2502
|
...props
|
|
2479
|
-
}) => /* @__PURE__ */ (0,
|
|
2503
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2480
2504
|
"span",
|
|
2481
2505
|
{
|
|
2482
2506
|
"aria-hidden": true,
|
|
2483
2507
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
2484
2508
|
...props,
|
|
2485
2509
|
children: [
|
|
2486
|
-
/* @__PURE__ */ (0,
|
|
2487
|
-
/* @__PURE__ */ (0,
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react8.MoreHorizontal, { className: "h-4 w-4" }),
|
|
2511
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
2488
2512
|
]
|
|
2489
2513
|
}
|
|
2490
2514
|
);
|
|
2491
2515
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
2492
2516
|
|
|
2493
2517
|
// src/components/AdsPagination/index.tsx
|
|
2494
|
-
var
|
|
2518
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2495
2519
|
var paginationLinkBaseClassName = "inline-flex h-9 min-w-9 items-center justify-center rounded-radius-md border text-sm font-medium leading-5 tracking-normal transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background";
|
|
2496
2520
|
var paginationLinkInactiveClassName = "border-transparent bg-transparent px-[10px] text-foreground shadow-none hover:bg-accent hover:shadow-[0px_1px_2px_rgba(0,0,0,0.1)]";
|
|
2497
2521
|
var paginationLinkActiveClassName = "border-border bg-card px-[10px] text-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)]";
|
|
2498
2522
|
function AdsPagination({ className, ...props }) {
|
|
2499
|
-
return /* @__PURE__ */ (0,
|
|
2523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2500
2524
|
Pagination,
|
|
2501
2525
|
{
|
|
2502
2526
|
className: cn("mx-0 w-auto justify-start", className),
|
|
@@ -2505,14 +2529,14 @@ function AdsPagination({ className, ...props }) {
|
|
|
2505
2529
|
);
|
|
2506
2530
|
}
|
|
2507
2531
|
AdsPagination.displayName = "AdsPagination";
|
|
2508
|
-
var AdsPaginationContent =
|
|
2532
|
+
var AdsPaginationContent = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PaginationContent, { ref, className: cn("gap-1", className), ...props }));
|
|
2509
2533
|
AdsPaginationContent.displayName = "AdsPaginationContent";
|
|
2510
|
-
var AdsPaginationItem =
|
|
2511
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2534
|
+
var AdsPaginationItem = React29.forwardRef(
|
|
2535
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PaginationItem, { ref, className, ...props })
|
|
2512
2536
|
);
|
|
2513
2537
|
AdsPaginationItem.displayName = "AdsPaginationItem";
|
|
2514
|
-
var AdsPaginationLink =
|
|
2515
|
-
({ className, isActive = false, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2538
|
+
var AdsPaginationLink = React29.forwardRef(
|
|
2539
|
+
({ className, isActive = false, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2516
2540
|
"a",
|
|
2517
2541
|
{
|
|
2518
2542
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -2527,10 +2551,10 @@ var AdsPaginationLink = React28.forwardRef(
|
|
|
2527
2551
|
)
|
|
2528
2552
|
);
|
|
2529
2553
|
AdsPaginationLink.displayName = "AdsPaginationLink";
|
|
2530
|
-
var AdsPaginationPrevious =
|
|
2554
|
+
var AdsPaginationPrevious = React29.forwardRef(({ "aria-label": ariaLabel, children, className, ...props }, ref) => {
|
|
2531
2555
|
const { messages } = useAdsI18n();
|
|
2532
2556
|
const label = children ?? messages.pagination.previous;
|
|
2533
|
-
return /* @__PURE__ */ (0,
|
|
2557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2534
2558
|
AdsPaginationLink,
|
|
2535
2559
|
{
|
|
2536
2560
|
"aria-label": ariaLabel ?? messages.pagination.previous,
|
|
@@ -2538,18 +2562,18 @@ var AdsPaginationPrevious = React28.forwardRef(({ "aria-label": ariaLabel, child
|
|
|
2538
2562
|
ref,
|
|
2539
2563
|
...props,
|
|
2540
2564
|
children: [
|
|
2541
|
-
/* @__PURE__ */ (0,
|
|
2542
|
-
/* @__PURE__ */ (0,
|
|
2565
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react9.ChevronLeft, { "aria-hidden": true, className: "h-4 w-4" }),
|
|
2566
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: label })
|
|
2543
2567
|
]
|
|
2544
2568
|
}
|
|
2545
2569
|
);
|
|
2546
2570
|
});
|
|
2547
2571
|
AdsPaginationPrevious.displayName = "AdsPaginationPrevious";
|
|
2548
|
-
var AdsPaginationNext =
|
|
2572
|
+
var AdsPaginationNext = React29.forwardRef(
|
|
2549
2573
|
({ "aria-label": ariaLabel, children, className, ...props }, ref) => {
|
|
2550
2574
|
const { messages } = useAdsI18n();
|
|
2551
2575
|
const label = children ?? messages.pagination.next;
|
|
2552
|
-
return /* @__PURE__ */ (0,
|
|
2576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2553
2577
|
AdsPaginationLink,
|
|
2554
2578
|
{
|
|
2555
2579
|
"aria-label": ariaLabel ?? messages.pagination.next,
|
|
@@ -2557,8 +2581,8 @@ var AdsPaginationNext = React28.forwardRef(
|
|
|
2557
2581
|
ref,
|
|
2558
2582
|
...props,
|
|
2559
2583
|
children: [
|
|
2560
|
-
/* @__PURE__ */ (0,
|
|
2561
|
-
/* @__PURE__ */ (0,
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: label }),
|
|
2585
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react9.ChevronRight, { "aria-hidden": true, className: "h-4 w-4" })
|
|
2562
2586
|
]
|
|
2563
2587
|
}
|
|
2564
2588
|
);
|
|
@@ -2572,7 +2596,7 @@ function AdsPaginationEllipsis({
|
|
|
2572
2596
|
}) {
|
|
2573
2597
|
const { messages } = useAdsI18n();
|
|
2574
2598
|
const resolvedLabel = label ?? messages.pagination.morePages;
|
|
2575
|
-
return /* @__PURE__ */ (0,
|
|
2599
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2576
2600
|
"span",
|
|
2577
2601
|
{
|
|
2578
2602
|
"aria-hidden": true,
|
|
@@ -2582,8 +2606,8 @@ function AdsPaginationEllipsis({
|
|
|
2582
2606
|
),
|
|
2583
2607
|
...props,
|
|
2584
2608
|
children: [
|
|
2585
|
-
/* @__PURE__ */ (0,
|
|
2586
|
-
/* @__PURE__ */ (0,
|
|
2609
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react9.MoreHorizontal, { className: "h-4 w-4" }),
|
|
2610
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "sr-only", children: resolvedLabel })
|
|
2587
2611
|
]
|
|
2588
2612
|
}
|
|
2589
2613
|
);
|
|
@@ -2591,15 +2615,15 @@ function AdsPaginationEllipsis({
|
|
|
2591
2615
|
AdsPaginationEllipsis.displayName = "AdsPaginationEllipsis";
|
|
2592
2616
|
|
|
2593
2617
|
// src/components/AdsPopover/index.tsx
|
|
2594
|
-
var
|
|
2618
|
+
var React31 = __toESM(require("react"), 1);
|
|
2595
2619
|
|
|
2596
2620
|
// src/primitives/popover.tsx
|
|
2597
|
-
var
|
|
2621
|
+
var React30 = __toESM(require("react"), 1);
|
|
2598
2622
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
2599
|
-
var
|
|
2623
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2600
2624
|
var Popover = PopoverPrimitive.Root;
|
|
2601
2625
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
2602
|
-
var PopoverContent =
|
|
2626
|
+
var PopoverContent = React30.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2603
2627
|
PopoverPrimitive.Content,
|
|
2604
2628
|
{
|
|
2605
2629
|
ref,
|
|
@@ -2615,11 +2639,11 @@ var PopoverContent = React29.forwardRef(({ className, align = "center", sideOffs
|
|
|
2615
2639
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
2616
2640
|
|
|
2617
2641
|
// src/components/AdsPopover/index.tsx
|
|
2618
|
-
var
|
|
2642
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2619
2643
|
var popoverContentClassName = "z-50 w-[320px] rounded-radius-lg border border-border bg-popover p-lg text-popover-foreground shadow-[0px_2px_4px_-2px_rgba(0,0,0,0.1),0px_4px_6px_-1px_rgba(0,0,0,0.1)] outline-none 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 origin-[--radix-popover-content-transform-origin]";
|
|
2620
2644
|
var AdsPopover = Popover;
|
|
2621
2645
|
var AdsPopoverTrigger = PopoverTrigger;
|
|
2622
|
-
var AdsPopoverContent =
|
|
2646
|
+
var AdsPopoverContent = React31.forwardRef(({ align = "center", className, inset = false, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2623
2647
|
PopoverContent,
|
|
2624
2648
|
{
|
|
2625
2649
|
align,
|
|
@@ -2634,8 +2658,8 @@ var AdsPopoverContent = React30.forwardRef(({ align = "center", className, inset
|
|
|
2634
2658
|
}
|
|
2635
2659
|
));
|
|
2636
2660
|
AdsPopoverContent.displayName = "AdsPopoverContent";
|
|
2637
|
-
var AdsPopoverHeader =
|
|
2638
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2661
|
+
var AdsPopoverHeader = React31.forwardRef(
|
|
2662
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2639
2663
|
"div",
|
|
2640
2664
|
{
|
|
2641
2665
|
className: cn("flex flex-col gap-sm", className),
|
|
@@ -2645,12 +2669,12 @@ var AdsPopoverHeader = React30.forwardRef(
|
|
|
2645
2669
|
)
|
|
2646
2670
|
);
|
|
2647
2671
|
AdsPopoverHeader.displayName = "AdsPopoverHeader";
|
|
2648
|
-
var AdsPopoverBody =
|
|
2649
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2672
|
+
var AdsPopoverBody = React31.forwardRef(
|
|
2673
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn("mt-md flex flex-col gap-md", className), ref, ...props })
|
|
2650
2674
|
);
|
|
2651
2675
|
AdsPopoverBody.displayName = "AdsPopoverBody";
|
|
2652
|
-
var AdsPopoverTitle =
|
|
2653
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
2676
|
+
var AdsPopoverTitle = React31.forwardRef(
|
|
2677
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2654
2678
|
"h4",
|
|
2655
2679
|
{
|
|
2656
2680
|
className: cn("text-base font-medium leading-6 text-foreground", className),
|
|
@@ -2660,7 +2684,7 @@ var AdsPopoverTitle = React30.forwardRef(
|
|
|
2660
2684
|
)
|
|
2661
2685
|
);
|
|
2662
2686
|
AdsPopoverTitle.displayName = "AdsPopoverTitle";
|
|
2663
|
-
var AdsPopoverDescription =
|
|
2687
|
+
var AdsPopoverDescription = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2664
2688
|
"p",
|
|
2665
2689
|
{
|
|
2666
2690
|
className: cn("text-sm leading-5 text-muted-foreground", className),
|
|
@@ -2671,20 +2695,20 @@ var AdsPopoverDescription = React30.forwardRef(({ className, ...props }, ref) =>
|
|
|
2671
2695
|
AdsPopoverDescription.displayName = "AdsPopoverDescription";
|
|
2672
2696
|
|
|
2673
2697
|
// src/components/AdsProgress/index.tsx
|
|
2674
|
-
var
|
|
2698
|
+
var React33 = __toESM(require("react"), 1);
|
|
2675
2699
|
|
|
2676
2700
|
// src/primitives/progress.tsx
|
|
2677
|
-
var
|
|
2701
|
+
var React32 = __toESM(require("react"), 1);
|
|
2678
2702
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
2679
|
-
var
|
|
2680
|
-
var Progress =
|
|
2703
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2704
|
+
var Progress = React32.forwardRef(({ className, indicatorClassName, value, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2681
2705
|
ProgressPrimitive.Root,
|
|
2682
2706
|
{
|
|
2683
2707
|
className: cn("relative h-4 w-full overflow-hidden rounded-full bg-secondary", className),
|
|
2684
2708
|
ref,
|
|
2685
2709
|
value,
|
|
2686
2710
|
...props,
|
|
2687
|
-
children: /* @__PURE__ */ (0,
|
|
2711
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2688
2712
|
ProgressPrimitive.Indicator,
|
|
2689
2713
|
{
|
|
2690
2714
|
className: cn("h-full w-full flex-1 bg-primary transition-all", indicatorClassName),
|
|
@@ -2696,13 +2720,13 @@ var Progress = React31.forwardRef(({ className, indicatorClassName, value, ...pr
|
|
|
2696
2720
|
Progress.displayName = ProgressPrimitive.Root.displayName;
|
|
2697
2721
|
|
|
2698
2722
|
// src/components/AdsProgress/index.tsx
|
|
2699
|
-
var
|
|
2723
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2700
2724
|
var progressBaseClassName = "h-2 rounded-radius-full bg-[color:color-mix(in_srgb,var(--primary)_20%,transparent)]";
|
|
2701
2725
|
var progressIndicatorVariantClassName = {
|
|
2702
2726
|
ai: "bg-brand-gradient",
|
|
2703
2727
|
default: "bg-primary"
|
|
2704
2728
|
};
|
|
2705
|
-
var Progress2 =
|
|
2729
|
+
var Progress2 = React33.forwardRef(({ className, indicatorClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2706
2730
|
Progress,
|
|
2707
2731
|
{
|
|
2708
2732
|
className: cn(progressBaseClassName, className),
|
|
@@ -2712,7 +2736,7 @@ var Progress2 = React32.forwardRef(({ className, indicatorClassName, ...props },
|
|
|
2712
2736
|
}
|
|
2713
2737
|
));
|
|
2714
2738
|
Progress2.displayName = "Progress";
|
|
2715
|
-
var AdsProgress =
|
|
2739
|
+
var AdsProgress = React33.forwardRef(
|
|
2716
2740
|
({
|
|
2717
2741
|
className,
|
|
2718
2742
|
descriptionPlacement = "above",
|
|
@@ -2731,12 +2755,12 @@ var AdsProgress = React32.forwardRef(
|
|
|
2731
2755
|
id
|
|
2732
2756
|
});
|
|
2733
2757
|
const labelId = label ? `${description.inputId}-label` : void 0;
|
|
2734
|
-
const helperNode = helperText ? /* @__PURE__ */ (0,
|
|
2735
|
-
const errorNode = errorText ? /* @__PURE__ */ (0,
|
|
2736
|
-
return /* @__PURE__ */ (0,
|
|
2737
|
-
label ? /* @__PURE__ */ (0,
|
|
2758
|
+
const helperNode = helperText ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
|
|
2759
|
+
const errorNode = errorText ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AdsFieldError, { id: description.errorId, children: errorText }) : null;
|
|
2760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(AdsFieldItem, { children: [
|
|
2761
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(AdsFieldLabel, { id: labelId, children: label }) : null,
|
|
2738
2762
|
descriptionPlacement === "above" ? helperNode : null,
|
|
2739
|
-
/* @__PURE__ */ (0,
|
|
2763
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2740
2764
|
Progress,
|
|
2741
2765
|
{
|
|
2742
2766
|
"aria-describedby": description.describedBy,
|
|
@@ -2760,15 +2784,15 @@ var AdsProgress = React32.forwardRef(
|
|
|
2760
2784
|
AdsProgress.displayName = "AdsProgress";
|
|
2761
2785
|
|
|
2762
2786
|
// src/components/AdsRadioGroup/index.tsx
|
|
2763
|
-
var
|
|
2787
|
+
var React35 = __toESM(require("react"), 1);
|
|
2764
2788
|
|
|
2765
2789
|
// src/primitives/radio-group.tsx
|
|
2766
|
-
var
|
|
2790
|
+
var React34 = __toESM(require("react"), 1);
|
|
2767
2791
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
2768
|
-
var
|
|
2769
|
-
var
|
|
2770
|
-
var RadioGroup =
|
|
2771
|
-
return /* @__PURE__ */ (0,
|
|
2792
|
+
var import_lucide_react10 = require("lucide-react");
|
|
2793
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2794
|
+
var RadioGroup = React34.forwardRef(({ className, ...props }, ref) => {
|
|
2795
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2772
2796
|
RadioGroupPrimitive.Root,
|
|
2773
2797
|
{
|
|
2774
2798
|
className: cn("grid gap-2", className),
|
|
@@ -2778,8 +2802,8 @@ var RadioGroup = React33.forwardRef(({ className, ...props }, ref) => {
|
|
|
2778
2802
|
);
|
|
2779
2803
|
});
|
|
2780
2804
|
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
2781
|
-
var RadioGroupItem =
|
|
2782
|
-
return /* @__PURE__ */ (0,
|
|
2805
|
+
var RadioGroupItem = React34.forwardRef(({ className, ...props }, ref) => {
|
|
2806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
2783
2807
|
RadioGroupPrimitive.Item,
|
|
2784
2808
|
{
|
|
2785
2809
|
ref,
|
|
@@ -2788,19 +2812,19 @@ var RadioGroupItem = React33.forwardRef(({ className, ...props }, ref) => {
|
|
|
2788
2812
|
className
|
|
2789
2813
|
),
|
|
2790
2814
|
...props,
|
|
2791
|
-
children: /* @__PURE__ */ (0,
|
|
2815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react10.Circle, { className: "h-2.5 w-2.5 fill-current text-current" }) })
|
|
2792
2816
|
}
|
|
2793
2817
|
);
|
|
2794
2818
|
});
|
|
2795
2819
|
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
2796
2820
|
|
|
2797
2821
|
// src/components/AdsRadioGroup/index.tsx
|
|
2798
|
-
var
|
|
2822
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2799
2823
|
var radioGroupBaseClassName = "gap-3";
|
|
2800
2824
|
var radioItemBaseClassName = "h-4 w-4 border-border bg-card text-primary shadow-[0px_1px_2px_rgba(0,0,0,0.1)] focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0";
|
|
2801
|
-
var RadioGroup2 =
|
|
2825
|
+
var RadioGroup2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(RadioGroup, { className: cn(radioGroupBaseClassName, className), ref, ...props }));
|
|
2802
2826
|
RadioGroup2.displayName = "RadioGroup";
|
|
2803
|
-
var RadioGroupItem2 =
|
|
2827
|
+
var RadioGroupItem2 = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2804
2828
|
RadioGroupItem,
|
|
2805
2829
|
{
|
|
2806
2830
|
className: cn(radioItemBaseClassName, className),
|
|
@@ -2809,7 +2833,7 @@ var RadioGroupItem2 = React34.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
2809
2833
|
}
|
|
2810
2834
|
));
|
|
2811
2835
|
RadioGroupItem2.displayName = "RadioGroupItem";
|
|
2812
|
-
var AdsRadioGroup =
|
|
2836
|
+
var AdsRadioGroup = React35.forwardRef(
|
|
2813
2837
|
({
|
|
2814
2838
|
children,
|
|
2815
2839
|
className,
|
|
@@ -2825,12 +2849,12 @@ var AdsRadioGroup = React34.forwardRef(
|
|
|
2825
2849
|
helperText,
|
|
2826
2850
|
id
|
|
2827
2851
|
});
|
|
2828
|
-
const helperNode = helperText ? /* @__PURE__ */ (0,
|
|
2829
|
-
const errorNode = errorText ? /* @__PURE__ */ (0,
|
|
2830
|
-
return /* @__PURE__ */ (0,
|
|
2831
|
-
label ? /* @__PURE__ */ (0,
|
|
2852
|
+
const helperNode = helperText ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
|
|
2853
|
+
const errorNode = errorText ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AdsFieldError, { id: description.errorId, children: errorText }) : null;
|
|
2854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(AdsFieldItem, { children: [
|
|
2855
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AdsFieldLabel, { children: label }) : null,
|
|
2832
2856
|
descriptionPlacement === "above" ? helperNode : null,
|
|
2833
|
-
/* @__PURE__ */ (0,
|
|
2857
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2834
2858
|
RadioGroup2,
|
|
2835
2859
|
{
|
|
2836
2860
|
"aria-describedby": description.describedBy,
|
|
@@ -2846,11 +2870,11 @@ var AdsRadioGroup = React34.forwardRef(
|
|
|
2846
2870
|
}
|
|
2847
2871
|
);
|
|
2848
2872
|
AdsRadioGroup.displayName = "AdsRadioGroup";
|
|
2849
|
-
var AdsRadioGroupOption =
|
|
2850
|
-
const generatedId =
|
|
2873
|
+
var AdsRadioGroupOption = React35.forwardRef(({ className, description, id, label, value, ...props }, ref) => {
|
|
2874
|
+
const generatedId = React35.useId();
|
|
2851
2875
|
const inputId = id ?? generatedId;
|
|
2852
|
-
return /* @__PURE__ */ (0,
|
|
2853
|
-
/* @__PURE__ */ (0,
|
|
2876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("label", { className: "flex w-full cursor-pointer items-start gap-2", htmlFor: inputId, children: [
|
|
2877
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2854
2878
|
RadioGroupItem2,
|
|
2855
2879
|
{
|
|
2856
2880
|
className: cn(className),
|
|
@@ -2860,20 +2884,20 @@ var AdsRadioGroupOption = React34.forwardRef(({ className, description, id, labe
|
|
|
2860
2884
|
...props
|
|
2861
2885
|
}
|
|
2862
2886
|
),
|
|
2863
|
-
/* @__PURE__ */ (0,
|
|
2864
|
-
/* @__PURE__ */ (0,
|
|
2865
|
-
description ? /* @__PURE__ */ (0,
|
|
2887
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
2888
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "text-sm leading-5 text-foreground", children: label }),
|
|
2889
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AdsFieldDescription, { className: "text-sm leading-5", children: description }) : null
|
|
2866
2890
|
] })
|
|
2867
2891
|
] });
|
|
2868
2892
|
});
|
|
2869
2893
|
AdsRadioGroupOption.displayName = "AdsRadioGroupOption";
|
|
2870
|
-
var AdsRadioGroupCardOption =
|
|
2871
|
-
const generatedId =
|
|
2894
|
+
var AdsRadioGroupCardOption = React35.forwardRef(({ className, description, disabled, id, label, value, ...props }, ref) => {
|
|
2895
|
+
const generatedId = React35.useId();
|
|
2872
2896
|
const inputId = id ?? generatedId;
|
|
2873
2897
|
const titleId = `${inputId}-label`;
|
|
2874
2898
|
const descriptionId = description ? `${inputId}-description` : void 0;
|
|
2875
|
-
return /* @__PURE__ */ (0,
|
|
2876
|
-
/* @__PURE__ */ (0,
|
|
2899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "relative", children: [
|
|
2900
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2877
2901
|
RadioGroupItem2,
|
|
2878
2902
|
{
|
|
2879
2903
|
"aria-describedby": descriptionId,
|
|
@@ -2886,7 +2910,7 @@ var AdsRadioGroupCardOption = React34.forwardRef(({ className, description, disa
|
|
|
2886
2910
|
...props
|
|
2887
2911
|
}
|
|
2888
2912
|
),
|
|
2889
|
-
/* @__PURE__ */ (0,
|
|
2913
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
2890
2914
|
"div",
|
|
2891
2915
|
{
|
|
2892
2916
|
className: cn(
|
|
@@ -2895,16 +2919,16 @@ var AdsRadioGroupCardOption = React34.forwardRef(({ className, description, disa
|
|
|
2895
2919
|
className
|
|
2896
2920
|
),
|
|
2897
2921
|
children: [
|
|
2898
|
-
/* @__PURE__ */ (0,
|
|
2899
|
-
/* @__PURE__ */ (0,
|
|
2900
|
-
description ? /* @__PURE__ */ (0,
|
|
2922
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
2923
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "text-sm font-medium leading-5 text-foreground", id: titleId, children: label }),
|
|
2924
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AdsFieldDescription, { className: "text-xs leading-4", id: descriptionId, children: description }) : null
|
|
2901
2925
|
] }),
|
|
2902
|
-
/* @__PURE__ */ (0,
|
|
2926
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex h-full shrink-0 items-start justify-center pt-px", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2903
2927
|
"div",
|
|
2904
2928
|
{
|
|
2905
2929
|
className: "grid h-4 w-4 place-content-center rounded-full border bg-card shadow-[0px_1px_2px_rgba(0,0,0,0.1)]",
|
|
2906
2930
|
"data-indicator": true,
|
|
2907
|
-
children: /* @__PURE__ */ (0,
|
|
2931
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2908
2932
|
"span",
|
|
2909
2933
|
{
|
|
2910
2934
|
className: "h-2 w-2 rounded-full bg-primary transition-opacity",
|
|
@@ -2921,14 +2945,14 @@ var AdsRadioGroupCardOption = React34.forwardRef(({ className, description, disa
|
|
|
2921
2945
|
AdsRadioGroupCardOption.displayName = "AdsRadioGroupCardOption";
|
|
2922
2946
|
|
|
2923
2947
|
// src/primitives/select.tsx
|
|
2924
|
-
var
|
|
2948
|
+
var React36 = __toESM(require("react"), 1);
|
|
2925
2949
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
2926
|
-
var
|
|
2927
|
-
var
|
|
2950
|
+
var import_lucide_react11 = require("lucide-react");
|
|
2951
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2928
2952
|
var Select = SelectPrimitive.Root;
|
|
2929
2953
|
var SelectGroup = SelectPrimitive.Group;
|
|
2930
2954
|
var SelectValue = SelectPrimitive.Value;
|
|
2931
|
-
var SelectTrigger =
|
|
2955
|
+
var SelectTrigger = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2932
2956
|
SelectPrimitive.Trigger,
|
|
2933
2957
|
{
|
|
2934
2958
|
ref,
|
|
@@ -2939,12 +2963,12 @@ var SelectTrigger = React35.forwardRef(({ className, children, ...props }, ref)
|
|
|
2939
2963
|
...props,
|
|
2940
2964
|
children: [
|
|
2941
2965
|
children,
|
|
2942
|
-
/* @__PURE__ */ (0,
|
|
2966
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react11.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
2943
2967
|
]
|
|
2944
2968
|
}
|
|
2945
2969
|
));
|
|
2946
2970
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2947
|
-
var SelectScrollUpButton =
|
|
2971
|
+
var SelectScrollUpButton = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2948
2972
|
SelectPrimitive.ScrollUpButton,
|
|
2949
2973
|
{
|
|
2950
2974
|
ref,
|
|
@@ -2953,11 +2977,11 @@ var SelectScrollUpButton = React35.forwardRef(({ className, ...props }, ref) =>
|
|
|
2953
2977
|
className
|
|
2954
2978
|
),
|
|
2955
2979
|
...props,
|
|
2956
|
-
children: /* @__PURE__ */ (0,
|
|
2980
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react11.ChevronUp, { className: "h-4 w-4" })
|
|
2957
2981
|
}
|
|
2958
2982
|
));
|
|
2959
2983
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2960
|
-
var SelectScrollDownButton =
|
|
2984
|
+
var SelectScrollDownButton = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2961
2985
|
SelectPrimitive.ScrollDownButton,
|
|
2962
2986
|
{
|
|
2963
2987
|
ref,
|
|
@@ -2966,11 +2990,11 @@ var SelectScrollDownButton = React35.forwardRef(({ className, ...props }, ref) =
|
|
|
2966
2990
|
className
|
|
2967
2991
|
),
|
|
2968
2992
|
...props,
|
|
2969
|
-
children: /* @__PURE__ */ (0,
|
|
2993
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react11.ChevronDown, { className: "h-4 w-4" })
|
|
2970
2994
|
}
|
|
2971
2995
|
));
|
|
2972
2996
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2973
|
-
var SelectContent =
|
|
2997
|
+
var SelectContent = React36.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
2974
2998
|
SelectPrimitive.Content,
|
|
2975
2999
|
{
|
|
2976
3000
|
ref,
|
|
@@ -2982,8 +3006,8 @@ var SelectContent = React35.forwardRef(({ className, children, position = "poppe
|
|
|
2982
3006
|
position,
|
|
2983
3007
|
...props,
|
|
2984
3008
|
children: [
|
|
2985
|
-
/* @__PURE__ */ (0,
|
|
2986
|
-
/* @__PURE__ */ (0,
|
|
3009
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectScrollUpButton, {}),
|
|
3010
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
2987
3011
|
SelectPrimitive.Viewport,
|
|
2988
3012
|
{
|
|
2989
3013
|
className: cn(
|
|
@@ -2993,12 +3017,12 @@ var SelectContent = React35.forwardRef(({ className, children, position = "poppe
|
|
|
2993
3017
|
children
|
|
2994
3018
|
}
|
|
2995
3019
|
),
|
|
2996
|
-
/* @__PURE__ */ (0,
|
|
3020
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectScrollDownButton, {})
|
|
2997
3021
|
]
|
|
2998
3022
|
}
|
|
2999
3023
|
) }));
|
|
3000
3024
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
3001
|
-
var SelectLabel =
|
|
3025
|
+
var SelectLabel = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3002
3026
|
SelectPrimitive.Label,
|
|
3003
3027
|
{
|
|
3004
3028
|
ref,
|
|
@@ -3007,7 +3031,7 @@ var SelectLabel = React35.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3007
3031
|
}
|
|
3008
3032
|
));
|
|
3009
3033
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
3010
|
-
var SelectItem =
|
|
3034
|
+
var SelectItem = React36.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3011
3035
|
SelectPrimitive.Item,
|
|
3012
3036
|
{
|
|
3013
3037
|
ref,
|
|
@@ -3017,13 +3041,13 @@ var SelectItem = React35.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
3017
3041
|
),
|
|
3018
3042
|
...props,
|
|
3019
3043
|
children: [
|
|
3020
|
-
/* @__PURE__ */ (0,
|
|
3021
|
-
/* @__PURE__ */ (0,
|
|
3044
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react11.Check, { className: "h-4 w-4" }) }) }),
|
|
3045
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectPrimitive.ItemText, { children })
|
|
3022
3046
|
]
|
|
3023
3047
|
}
|
|
3024
3048
|
));
|
|
3025
3049
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
3026
|
-
var SelectSeparator =
|
|
3050
|
+
var SelectSeparator = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3027
3051
|
SelectPrimitive.Separator,
|
|
3028
3052
|
{
|
|
3029
3053
|
ref,
|
|
@@ -3034,7 +3058,7 @@ var SelectSeparator = React35.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3034
3058
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
3035
3059
|
|
|
3036
3060
|
// src/components/AdsSelect/index.tsx
|
|
3037
|
-
var
|
|
3061
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3038
3062
|
var selectTriggerBaseClassName = "h-9 rounded-radius-md border border-border bg-card px-md py-2 text-sm leading-5 text-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] focus:border-border-focus focus:ring-[3px] focus:ring-[rgba(161,161,161,0.5)] focus:ring-offset-0 data-[placeholder]:text-muted-foreground";
|
|
3039
3063
|
var selectContentBaseClassName = "rounded-radius-md border-border bg-popover text-popover-foreground shadow-[0px_8px_24px_rgba(0,0,0,0.22)]";
|
|
3040
3064
|
function AdsSelect({
|
|
@@ -3055,23 +3079,23 @@ function AdsSelect({
|
|
|
3055
3079
|
helperText,
|
|
3056
3080
|
id
|
|
3057
3081
|
});
|
|
3058
|
-
const helperNode = helperText ? /* @__PURE__ */ (0,
|
|
3059
|
-
const errorNode = errorText ? /* @__PURE__ */ (0,
|
|
3060
|
-
return /* @__PURE__ */ (0,
|
|
3061
|
-
label ? /* @__PURE__ */ (0,
|
|
3082
|
+
const helperNode = helperText ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
|
|
3083
|
+
const errorNode = errorText ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AdsFieldError, { id: description.errorId, children: errorText }) : null;
|
|
3084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(AdsFieldItem, { children: [
|
|
3085
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(AdsFieldLabel, { htmlFor: description.inputId, children: label }) : null,
|
|
3062
3086
|
descriptionPlacement === "above" ? helperNode : null,
|
|
3063
|
-
/* @__PURE__ */ (0,
|
|
3064
|
-
/* @__PURE__ */ (0,
|
|
3087
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Select, { ...props, children: [
|
|
3088
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3065
3089
|
SelectTrigger,
|
|
3066
3090
|
{
|
|
3067
3091
|
"aria-describedby": description.describedBy,
|
|
3068
3092
|
"aria-invalid": errorText ? true : void 0,
|
|
3069
3093
|
className: cn(selectTriggerBaseClassName, triggerClassName),
|
|
3070
3094
|
id: description.inputId,
|
|
3071
|
-
children: /* @__PURE__ */ (0,
|
|
3095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SelectValue, { placeholder })
|
|
3072
3096
|
}
|
|
3073
3097
|
),
|
|
3074
|
-
/* @__PURE__ */ (0,
|
|
3098
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SelectContent, { className: cn(selectContentBaseClassName, contentClassName3), children })
|
|
3075
3099
|
] }),
|
|
3076
3100
|
descriptionPlacement === "below" ? helperNode : null,
|
|
3077
3101
|
errorNode
|
|
@@ -3079,13 +3103,13 @@ function AdsSelect({
|
|
|
3079
3103
|
}
|
|
3080
3104
|
|
|
3081
3105
|
// src/components/AdsSlider/index.tsx
|
|
3082
|
-
var
|
|
3106
|
+
var React38 = __toESM(require("react"), 1);
|
|
3083
3107
|
|
|
3084
3108
|
// src/primitives/slider.tsx
|
|
3085
|
-
var
|
|
3109
|
+
var React37 = __toESM(require("react"), 1);
|
|
3086
3110
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
3087
|
-
var
|
|
3088
|
-
var Slider =
|
|
3111
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3112
|
+
var Slider = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3089
3113
|
SliderPrimitive.Root,
|
|
3090
3114
|
{
|
|
3091
3115
|
ref,
|
|
@@ -3095,10 +3119,10 @@ var Slider = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
3095
3119
|
),
|
|
3096
3120
|
...props,
|
|
3097
3121
|
children: [
|
|
3098
|
-
/* @__PURE__ */ (0,
|
|
3122
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
3099
3123
|
Array.from({
|
|
3100
3124
|
length: Array.isArray(props.value) ? props.value.length : Array.isArray(props.defaultValue) ? props.defaultValue.length : 1
|
|
3101
|
-
}).map((_, index) => /* @__PURE__ */ (0,
|
|
3125
|
+
}).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3102
3126
|
SliderPrimitive.Thumb,
|
|
3103
3127
|
{
|
|
3104
3128
|
className: "block h-5 w-5 rounded-full border border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
@@ -3111,11 +3135,11 @@ var Slider = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
3111
3135
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
3112
3136
|
|
|
3113
3137
|
// src/components/AdsSlider/index.tsx
|
|
3114
|
-
var
|
|
3138
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3115
3139
|
var sliderBaseClassName = "py-1";
|
|
3116
|
-
var Slider2 =
|
|
3140
|
+
var Slider2 = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Slider, { className: cn(sliderBaseClassName, className), ref, ...props }));
|
|
3117
3141
|
Slider2.displayName = "Slider";
|
|
3118
|
-
var AdsSlider =
|
|
3142
|
+
var AdsSlider = React38.forwardRef(
|
|
3119
3143
|
({
|
|
3120
3144
|
className,
|
|
3121
3145
|
descriptionPlacement = "above",
|
|
@@ -3130,12 +3154,12 @@ var AdsSlider = React37.forwardRef(
|
|
|
3130
3154
|
helperText,
|
|
3131
3155
|
id
|
|
3132
3156
|
});
|
|
3133
|
-
const helperNode = helperText ? /* @__PURE__ */ (0,
|
|
3134
|
-
const errorNode = errorText ? /* @__PURE__ */ (0,
|
|
3135
|
-
return /* @__PURE__ */ (0,
|
|
3136
|
-
label ? /* @__PURE__ */ (0,
|
|
3157
|
+
const helperNode = helperText ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
|
|
3158
|
+
const errorNode = errorText ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AdsFieldError, { id: description.errorId, children: errorText }) : null;
|
|
3159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(AdsFieldItem, { children: [
|
|
3160
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AdsFieldLabel, { children: label }) : null,
|
|
3137
3161
|
descriptionPlacement === "above" ? helperNode : null,
|
|
3138
|
-
/* @__PURE__ */ (0,
|
|
3162
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3139
3163
|
Slider2,
|
|
3140
3164
|
{
|
|
3141
3165
|
"aria-describedby": description.describedBy,
|
|
@@ -3152,13 +3176,13 @@ var AdsSlider = React37.forwardRef(
|
|
|
3152
3176
|
AdsSlider.displayName = "AdsSlider";
|
|
3153
3177
|
|
|
3154
3178
|
// src/components/AdsSwitch/index.tsx
|
|
3155
|
-
var
|
|
3179
|
+
var React40 = __toESM(require("react"), 1);
|
|
3156
3180
|
|
|
3157
3181
|
// src/primitives/switch.tsx
|
|
3158
|
-
var
|
|
3182
|
+
var React39 = __toESM(require("react"), 1);
|
|
3159
3183
|
var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
|
|
3160
|
-
var
|
|
3161
|
-
var Switch =
|
|
3184
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3185
|
+
var Switch = React39.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3162
3186
|
SwitchPrimitives.Root,
|
|
3163
3187
|
{
|
|
3164
3188
|
className: cn(
|
|
@@ -3167,7 +3191,7 @@ var Switch = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
3167
3191
|
),
|
|
3168
3192
|
...props,
|
|
3169
3193
|
ref,
|
|
3170
|
-
children: /* @__PURE__ */ (0,
|
|
3194
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3171
3195
|
SwitchPrimitives.Thumb,
|
|
3172
3196
|
{
|
|
3173
3197
|
className: cn(
|
|
@@ -3180,15 +3204,15 @@ var Switch = React38.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
3180
3204
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
3181
3205
|
|
|
3182
3206
|
// src/components/AdsSwitch/index.tsx
|
|
3183
|
-
var
|
|
3207
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3184
3208
|
var switchBaseClassName = "h-6 w-11 border border-transparent bg-muted shadow-[0px_1px_2px_rgba(0,0,0,0.1)] focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0 data-[state=checked]:bg-primary data-[state=unchecked]:bg-muted";
|
|
3185
|
-
var Switch2 =
|
|
3209
|
+
var Switch2 = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Switch, { className: cn(switchBaseClassName, className), ref, ...props }));
|
|
3186
3210
|
Switch2.displayName = "Switch";
|
|
3187
|
-
var AdsSwitch =
|
|
3188
|
-
const generatedId =
|
|
3211
|
+
var AdsSwitch = React40.forwardRef(({ className, description, id, label, switchClassName, wrapperClassName, ...props }, ref) => {
|
|
3212
|
+
const generatedId = React40.useId();
|
|
3189
3213
|
const inputId = id ?? generatedId;
|
|
3190
3214
|
if (!label) {
|
|
3191
|
-
return /* @__PURE__ */ (0,
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3192
3216
|
Switch2,
|
|
3193
3217
|
{
|
|
3194
3218
|
className: cn(className, switchClassName),
|
|
@@ -3198,12 +3222,12 @@ var AdsSwitch = React39.forwardRef(({ className, description, id, label, switchC
|
|
|
3198
3222
|
}
|
|
3199
3223
|
);
|
|
3200
3224
|
}
|
|
3201
|
-
return /* @__PURE__ */ (0,
|
|
3202
|
-
/* @__PURE__ */ (0,
|
|
3203
|
-
/* @__PURE__ */ (0,
|
|
3204
|
-
description ? /* @__PURE__ */ (0,
|
|
3225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("label", { className: cn("block w-full cursor-pointer", wrapperClassName), htmlFor: inputId, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex w-full items-start gap-3", children: [
|
|
3226
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1.5 pt-0.5", children: [
|
|
3227
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "text-sm font-medium leading-5 text-foreground", children: label }),
|
|
3228
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(AdsFieldDescription, { className: "text-sm leading-5", children: description }) : null
|
|
3205
3229
|
] }),
|
|
3206
|
-
/* @__PURE__ */ (0,
|
|
3230
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3207
3231
|
Switch2,
|
|
3208
3232
|
{
|
|
3209
3233
|
className: cn(className, switchClassName),
|
|
@@ -3217,14 +3241,14 @@ var AdsSwitch = React39.forwardRef(({ className, description, id, label, switchC
|
|
|
3217
3241
|
AdsSwitch.displayName = "AdsSwitch";
|
|
3218
3242
|
|
|
3219
3243
|
// src/components/AdsTabs/index.tsx
|
|
3220
|
-
var
|
|
3244
|
+
var React42 = __toESM(require("react"), 1);
|
|
3221
3245
|
|
|
3222
3246
|
// src/primitives/tabs.tsx
|
|
3223
|
-
var
|
|
3247
|
+
var React41 = __toESM(require("react"), 1);
|
|
3224
3248
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
3225
|
-
var
|
|
3249
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3226
3250
|
var Tabs = TabsPrimitive.Root;
|
|
3227
|
-
var TabsList =
|
|
3251
|
+
var TabsList = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3228
3252
|
TabsPrimitive.List,
|
|
3229
3253
|
{
|
|
3230
3254
|
className: cn("inline-flex items-center", className),
|
|
@@ -3233,7 +3257,7 @@ var TabsList = React40.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3233
3257
|
}
|
|
3234
3258
|
));
|
|
3235
3259
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3236
|
-
var TabsTrigger =
|
|
3260
|
+
var TabsTrigger = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3237
3261
|
TabsPrimitive.Trigger,
|
|
3238
3262
|
{
|
|
3239
3263
|
className: cn(
|
|
@@ -3245,7 +3269,7 @@ var TabsTrigger = React40.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3245
3269
|
}
|
|
3246
3270
|
));
|
|
3247
3271
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3248
|
-
var TabsContent =
|
|
3272
|
+
var TabsContent = React41.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3249
3273
|
TabsPrimitive.Content,
|
|
3250
3274
|
{
|
|
3251
3275
|
className: cn("focus-visible:outline-none", className),
|
|
@@ -3256,9 +3280,9 @@ var TabsContent = React40.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3256
3280
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3257
3281
|
|
|
3258
3282
|
// src/components/AdsTabs/index.tsx
|
|
3259
|
-
var
|
|
3283
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3260
3284
|
var AdsTabs = Tabs;
|
|
3261
|
-
var AdsTabsList =
|
|
3285
|
+
var AdsTabsList = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3262
3286
|
TabsList,
|
|
3263
3287
|
{
|
|
3264
3288
|
className: cn(
|
|
@@ -3270,7 +3294,7 @@ var AdsTabsList = React41.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3270
3294
|
}
|
|
3271
3295
|
));
|
|
3272
3296
|
AdsTabsList.displayName = "AdsTabsList";
|
|
3273
|
-
var AdsTabsTrigger =
|
|
3297
|
+
var AdsTabsTrigger = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3274
3298
|
TabsTrigger,
|
|
3275
3299
|
{
|
|
3276
3300
|
className: cn(
|
|
@@ -3282,7 +3306,7 @@ var AdsTabsTrigger = React41.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
3282
3306
|
}
|
|
3283
3307
|
));
|
|
3284
3308
|
AdsTabsTrigger.displayName = "AdsTabsTrigger";
|
|
3285
|
-
var AdsTabsContent =
|
|
3309
|
+
var AdsTabsContent = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3286
3310
|
TabsContent,
|
|
3287
3311
|
{
|
|
3288
3312
|
className: cn(
|
|
@@ -3296,13 +3320,13 @@ var AdsTabsContent = React41.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
3296
3320
|
AdsTabsContent.displayName = "AdsTabsContent";
|
|
3297
3321
|
|
|
3298
3322
|
// src/components/AdsToggle/index.tsx
|
|
3299
|
-
var
|
|
3323
|
+
var React44 = __toESM(require("react"), 1);
|
|
3300
3324
|
|
|
3301
3325
|
// src/primitives/toggle.tsx
|
|
3302
|
-
var
|
|
3326
|
+
var React43 = __toESM(require("react"), 1);
|
|
3303
3327
|
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
3304
|
-
var
|
|
3305
|
-
var Toggle =
|
|
3328
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3329
|
+
var Toggle = React43.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3306
3330
|
TogglePrimitive.Root,
|
|
3307
3331
|
{
|
|
3308
3332
|
className: cn(
|
|
@@ -3316,8 +3340,8 @@ var Toggle = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
3316
3340
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
3317
3341
|
|
|
3318
3342
|
// src/components/AdsToggle/index.tsx
|
|
3319
|
-
var
|
|
3320
|
-
var
|
|
3343
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3344
|
+
var sizeClassName3 = {
|
|
3321
3345
|
sm: "!h-8 px-[6px] text-sm",
|
|
3322
3346
|
md: "!h-9 px-md text-sm",
|
|
3323
3347
|
lg: "!h-10 px-[10px] text-sm"
|
|
@@ -3331,15 +3355,15 @@ var variantClassName = {
|
|
|
3331
3355
|
default: "border border-transparent bg-transparent text-foreground shadow-none hover:bg-muted/70 data-[state=on]:bg-muted data-[state=on]:shadow-[0px_1px_1px_rgba(0,0,0,0.1)]",
|
|
3332
3356
|
outline: "border border-border bg-transparent text-foreground shadow-none hover:bg-muted/70 data-[state=on]:border-transparent data-[state=on]:bg-muted data-[state=on]:shadow-[0px_1px_1px_rgba(0,0,0,0.1)]"
|
|
3333
3357
|
};
|
|
3334
|
-
var AdsToggle =
|
|
3335
|
-
const childCount =
|
|
3336
|
-
const isIconOnly = childCount === 1 &&
|
|
3337
|
-
return /* @__PURE__ */ (0,
|
|
3358
|
+
var AdsToggle = React44.forwardRef(({ children, className, size = "md", variant = "default", ...props }, ref) => {
|
|
3359
|
+
const childCount = React44.Children.count(children);
|
|
3360
|
+
const isIconOnly = childCount === 1 && React44.isValidElement(children);
|
|
3361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3338
3362
|
Toggle,
|
|
3339
3363
|
{
|
|
3340
3364
|
className: cn(
|
|
3341
3365
|
"inline-flex shrink-0 items-center justify-center gap-2 rounded-radius-md font-medium leading-5 text-foreground focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0 disabled:opacity-50",
|
|
3342
|
-
|
|
3366
|
+
sizeClassName3[size],
|
|
3343
3367
|
variantClassName[variant],
|
|
3344
3368
|
isIconOnly && iconOnlySizeClassName[size],
|
|
3345
3369
|
className
|
|
@@ -3353,13 +3377,13 @@ var AdsToggle = React43.forwardRef(({ children, className, size = "md", variant
|
|
|
3353
3377
|
AdsToggle.displayName = "AdsToggle";
|
|
3354
3378
|
|
|
3355
3379
|
// src/components/AdsToggleGroup/index.tsx
|
|
3356
|
-
var
|
|
3380
|
+
var React46 = __toESM(require("react"), 1);
|
|
3357
3381
|
|
|
3358
3382
|
// src/primitives/toggle-group.tsx
|
|
3359
|
-
var
|
|
3383
|
+
var React45 = __toESM(require("react"), 1);
|
|
3360
3384
|
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
3361
|
-
var
|
|
3362
|
-
var ToggleGroup =
|
|
3385
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3386
|
+
var ToggleGroup = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3363
3387
|
ToggleGroupPrimitive.Root,
|
|
3364
3388
|
{
|
|
3365
3389
|
className: cn("inline-flex items-center justify-start", className),
|
|
@@ -3368,7 +3392,7 @@ var ToggleGroup = React44.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3368
3392
|
}
|
|
3369
3393
|
));
|
|
3370
3394
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
3371
|
-
var ToggleGroupItem =
|
|
3395
|
+
var ToggleGroupItem = React45.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3372
3396
|
ToggleGroupPrimitive.Item,
|
|
3373
3397
|
{
|
|
3374
3398
|
className: cn(
|
|
@@ -3382,8 +3406,8 @@ var ToggleGroupItem = React44.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3382
3406
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
3383
3407
|
|
|
3384
3408
|
// src/components/AdsToggleGroup/index.tsx
|
|
3385
|
-
var
|
|
3386
|
-
var
|
|
3409
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3410
|
+
var sizeClassName4 = {
|
|
3387
3411
|
sm: "h-8 min-w-7 px-[6px] text-sm",
|
|
3388
3412
|
md: "h-9 min-w-[34px] px-md text-sm",
|
|
3389
3413
|
lg: "h-10 min-w-9 px-[10px] text-sm"
|
|
@@ -3392,8 +3416,8 @@ var variantClassName2 = {
|
|
|
3392
3416
|
default: "border-transparent bg-transparent text-foreground hover:bg-muted/70 data-[state=on]:bg-muted data-[state=on]:shadow-[0px_1px_1px_rgba(0,0,0,0.1)]",
|
|
3393
3417
|
outline: "border border-border bg-transparent text-foreground hover:bg-muted/70 data-[state=on]:border-transparent data-[state=on]:bg-muted data-[state=on]:shadow-[0px_1px_1px_rgba(0,0,0,0.1)]"
|
|
3394
3418
|
};
|
|
3395
|
-
var AdsToggleGroupContext =
|
|
3396
|
-
var AdsToggleGroup =
|
|
3419
|
+
var AdsToggleGroupContext = React46.createContext(null);
|
|
3420
|
+
var AdsToggleGroup = React46.forwardRef(
|
|
3397
3421
|
({
|
|
3398
3422
|
children,
|
|
3399
3423
|
className,
|
|
@@ -3401,7 +3425,7 @@ var AdsToggleGroup = React45.forwardRef(
|
|
|
3401
3425
|
size = "md",
|
|
3402
3426
|
variant = "default",
|
|
3403
3427
|
...props
|
|
3404
|
-
}, ref) => /* @__PURE__ */ (0,
|
|
3428
|
+
}, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AdsToggleGroupContext.Provider, { value: { orientation, size, variant }, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3405
3429
|
ToggleGroup,
|
|
3406
3430
|
{
|
|
3407
3431
|
className: cn(
|
|
@@ -3417,17 +3441,17 @@ var AdsToggleGroup = React45.forwardRef(
|
|
|
3417
3441
|
) })
|
|
3418
3442
|
);
|
|
3419
3443
|
AdsToggleGroup.displayName = "AdsToggleGroup";
|
|
3420
|
-
var AdsToggleGroupItem =
|
|
3421
|
-
const context =
|
|
3444
|
+
var AdsToggleGroupItem = React46.forwardRef(({ className, size, variant, ...props }, ref) => {
|
|
3445
|
+
const context = React46.useContext(AdsToggleGroupContext);
|
|
3422
3446
|
const resolvedOrientation = context?.orientation ?? "horizontal";
|
|
3423
3447
|
const resolvedSize = size ?? context?.size ?? "md";
|
|
3424
3448
|
const resolvedVariant = variant ?? context?.variant ?? "default";
|
|
3425
|
-
return /* @__PURE__ */ (0,
|
|
3449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3426
3450
|
ToggleGroupItem,
|
|
3427
3451
|
{
|
|
3428
3452
|
className: cn(
|
|
3429
3453
|
"inline-flex shrink-0 items-center justify-center font-medium leading-5 text-foreground focus-visible:relative focus-visible:z-10 focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] focus-visible:ring-offset-0 disabled:opacity-50",
|
|
3430
|
-
|
|
3454
|
+
sizeClassName4[resolvedSize],
|
|
3431
3455
|
variantClassName2[resolvedVariant],
|
|
3432
3456
|
resolvedOrientation === "horizontal" ? "first:rounded-l-radius-md first:rounded-r-none last:rounded-l-none last:rounded-r-radius-md not-first:not-last:rounded-none" : "first:rounded-t-radius-md first:rounded-b-none last:rounded-t-none last:rounded-b-radius-md not-first:not-last:rounded-none",
|
|
3433
3457
|
className
|
|
@@ -3440,10 +3464,10 @@ var AdsToggleGroupItem = React45.forwardRef(({ className, size, variant, ...prop
|
|
|
3440
3464
|
AdsToggleGroupItem.displayName = "AdsToggleGroupItem";
|
|
3441
3465
|
|
|
3442
3466
|
// src/components/AdsTextarea/index.tsx
|
|
3443
|
-
var
|
|
3444
|
-
var
|
|
3467
|
+
var React47 = __toESM(require("react"), 1);
|
|
3468
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3445
3469
|
var textareaBaseClassName = "w-full rounded-radius-md border border-border bg-card px-md py-md text-base leading-6 text-foreground shadow-[0px_1px_2px_rgba(0,0,0,0.1)] placeholder:text-muted-foreground focus-visible:border-border-focus focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-[rgba(161,161,161,0.5)] disabled:cursor-not-allowed disabled:opacity-50";
|
|
3446
|
-
var AdsTextarea =
|
|
3470
|
+
var AdsTextarea = React47.forwardRef(
|
|
3447
3471
|
({
|
|
3448
3472
|
action,
|
|
3449
3473
|
className,
|
|
@@ -3462,12 +3486,12 @@ var AdsTextarea = React46.forwardRef(
|
|
|
3462
3486
|
helperText,
|
|
3463
3487
|
id
|
|
3464
3488
|
});
|
|
3465
|
-
const helperNode = helperText ? /* @__PURE__ */ (0,
|
|
3466
|
-
const errorNode = errorText ? /* @__PURE__ */ (0,
|
|
3467
|
-
return /* @__PURE__ */ (0,
|
|
3468
|
-
label ? /* @__PURE__ */ (0,
|
|
3489
|
+
const helperNode = helperText ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AdsFieldDescription, { id: description.helperId, children: helperText }) : null;
|
|
3490
|
+
const errorNode = errorText ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AdsFieldError, { id: description.errorId, children: errorText }) : null;
|
|
3491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(AdsFieldItem, { children: [
|
|
3492
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AdsFieldLabel, { htmlFor: description.inputId, children: label }) : null,
|
|
3469
3493
|
descriptionPlacement === "above" ? helperNode : null,
|
|
3470
|
-
/* @__PURE__ */ (0,
|
|
3494
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
3471
3495
|
Textarea,
|
|
3472
3496
|
{
|
|
3473
3497
|
"aria-describedby": description.describedBy,
|
|
@@ -3484,7 +3508,7 @@ var AdsTextarea = React46.forwardRef(
|
|
|
3484
3508
|
...props
|
|
3485
3509
|
}
|
|
3486
3510
|
),
|
|
3487
|
-
action ? /* @__PURE__ */ (0,
|
|
3511
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-full [&>*]:w-full", children: action }) : null,
|
|
3488
3512
|
descriptionPlacement === "below" ? helperNode : null,
|
|
3489
3513
|
errorNode
|
|
3490
3514
|
] });
|
|
@@ -3493,17 +3517,17 @@ var AdsTextarea = React46.forwardRef(
|
|
|
3493
3517
|
AdsTextarea.displayName = "AdsTextarea";
|
|
3494
3518
|
|
|
3495
3519
|
// src/components/AdsTooltip/index.tsx
|
|
3496
|
-
var
|
|
3520
|
+
var React49 = __toESM(require("react"), 1);
|
|
3497
3521
|
|
|
3498
3522
|
// src/primitives/tooltip.tsx
|
|
3499
|
-
var
|
|
3523
|
+
var React48 = __toESM(require("react"), 1);
|
|
3500
3524
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
3501
|
-
var
|
|
3525
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3502
3526
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
3503
3527
|
var Tooltip = TooltipPrimitive.Root;
|
|
3504
3528
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
3505
3529
|
var TooltipArrow = TooltipPrimitive.Arrow;
|
|
3506
|
-
var TooltipContent =
|
|
3530
|
+
var TooltipContent = React48.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
3507
3531
|
TooltipPrimitive.Content,
|
|
3508
3532
|
{
|
|
3509
3533
|
className: cn(
|
|
@@ -3518,12 +3542,12 @@ var TooltipContent = React47.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
3518
3542
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
3519
3543
|
|
|
3520
3544
|
// src/components/AdsTooltip/index.tsx
|
|
3521
|
-
var
|
|
3545
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3522
3546
|
var tooltipContentClassName = "z-50 rounded-[6px] border-0 bg-[#844fff] px-3 py-2 text-sm font-normal leading-5 text-[#fdfdfd] shadow-[0px_8px_24px_rgba(0,0,0,0.22)]";
|
|
3523
3547
|
var AdsTooltipProvider = TooltipProvider;
|
|
3524
3548
|
var AdsTooltip = Tooltip;
|
|
3525
3549
|
var AdsTooltipTrigger = TooltipTrigger;
|
|
3526
|
-
var AdsTooltipContent =
|
|
3550
|
+
var AdsTooltipContent = React49.forwardRef(({ align = "center", className, sideOffset = 10, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3527
3551
|
TooltipContent,
|
|
3528
3552
|
{
|
|
3529
3553
|
align,
|
|
@@ -3534,7 +3558,7 @@ var AdsTooltipContent = React48.forwardRef(({ align = "center", className, sideO
|
|
|
3534
3558
|
}
|
|
3535
3559
|
));
|
|
3536
3560
|
AdsTooltipContent.displayName = "AdsTooltipContent";
|
|
3537
|
-
var AdsTooltipArrow =
|
|
3561
|
+
var AdsTooltipArrow = React49.forwardRef(({ className, height = 5, width = 10, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
3538
3562
|
TooltipArrow,
|
|
3539
3563
|
{
|
|
3540
3564
|
className: cn("fill-[#844fff]", className),
|
|
@@ -3547,16 +3571,16 @@ var AdsTooltipArrow = React48.forwardRef(({ className, height = 5, width = 10, .
|
|
|
3547
3571
|
AdsTooltipArrow.displayName = "AdsTooltipArrow";
|
|
3548
3572
|
|
|
3549
3573
|
// src/components/AdsToast/index.tsx
|
|
3550
|
-
var
|
|
3551
|
-
var
|
|
3574
|
+
var React50 = __toESM(require("react"), 1);
|
|
3575
|
+
var import_lucide_react12 = require("lucide-react");
|
|
3552
3576
|
var import_sonner = require("sonner");
|
|
3553
|
-
var
|
|
3577
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3554
3578
|
var adsToastIconMap = {
|
|
3555
|
-
success:
|
|
3556
|
-
info:
|
|
3557
|
-
warning:
|
|
3558
|
-
error:
|
|
3559
|
-
loading:
|
|
3579
|
+
success: import_lucide_react12.CircleCheck,
|
|
3580
|
+
info: import_lucide_react12.Info,
|
|
3581
|
+
warning: import_lucide_react12.TriangleAlert,
|
|
3582
|
+
error: import_lucide_react12.OctagonX,
|
|
3583
|
+
loading: import_lucide_react12.LoaderCircle
|
|
3560
3584
|
};
|
|
3561
3585
|
function resolveToastIcon(intent, icon) {
|
|
3562
3586
|
if (icon) {
|
|
@@ -3566,7 +3590,7 @@ function resolveToastIcon(intent, icon) {
|
|
|
3566
3590
|
return null;
|
|
3567
3591
|
}
|
|
3568
3592
|
const Icon2 = adsToastIconMap[intent];
|
|
3569
|
-
return /* @__PURE__ */ (0,
|
|
3593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3570
3594
|
Icon2,
|
|
3571
3595
|
{
|
|
3572
3596
|
"aria-hidden": true,
|
|
@@ -3575,7 +3599,7 @@ function resolveToastIcon(intent, icon) {
|
|
|
3575
3599
|
}
|
|
3576
3600
|
);
|
|
3577
3601
|
}
|
|
3578
|
-
var AdsToast =
|
|
3602
|
+
var AdsToast = React50.forwardRef(
|
|
3579
3603
|
({
|
|
3580
3604
|
action,
|
|
3581
3605
|
className,
|
|
@@ -3586,7 +3610,7 @@ var AdsToast = React49.forwardRef(
|
|
|
3586
3610
|
...props
|
|
3587
3611
|
}, ref) => {
|
|
3588
3612
|
const resolvedIcon = resolveToastIcon(intent, icon);
|
|
3589
|
-
return /* @__PURE__ */ (0,
|
|
3613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
3590
3614
|
"div",
|
|
3591
3615
|
{
|
|
3592
3616
|
className: cn(
|
|
@@ -3600,11 +3624,11 @@ var AdsToast = React49.forwardRef(
|
|
|
3600
3624
|
...props,
|
|
3601
3625
|
children: [
|
|
3602
3626
|
resolvedIcon,
|
|
3603
|
-
/* @__PURE__ */ (0,
|
|
3604
|
-
/* @__PURE__ */ (0,
|
|
3605
|
-
description ? /* @__PURE__ */ (0,
|
|
3627
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
3628
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-sm font-medium leading-5 text-foreground", children: title }),
|
|
3629
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-xs font-normal leading-4 text-muted-foreground", children: description }) : null
|
|
3606
3630
|
] }),
|
|
3607
|
-
action ? /* @__PURE__ */ (0,
|
|
3631
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3608
3632
|
AdsButton,
|
|
3609
3633
|
{
|
|
3610
3634
|
className: "shrink-0 rounded-radius-lg",
|
|
@@ -3630,7 +3654,7 @@ function AdsToaster({
|
|
|
3630
3654
|
...props
|
|
3631
3655
|
}) {
|
|
3632
3656
|
const { messages } = useAdsI18n();
|
|
3633
|
-
return /* @__PURE__ */ (0,
|
|
3657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3634
3658
|
import_sonner.Toaster,
|
|
3635
3659
|
{
|
|
3636
3660
|
closeButton: false,
|
|
@@ -3648,7 +3672,7 @@ function AdsToaster({
|
|
|
3648
3672
|
);
|
|
3649
3673
|
}
|
|
3650
3674
|
function toStageNode(intent, title, options) {
|
|
3651
|
-
return /* @__PURE__ */ (0,
|
|
3675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3652
3676
|
AdsToast,
|
|
3653
3677
|
{
|
|
3654
3678
|
action: options?.action,
|
|
@@ -3662,7 +3686,7 @@ function toStageNode(intent, title, options) {
|
|
|
3662
3686
|
function showAdsToast(intent, title, options) {
|
|
3663
3687
|
const { action, description, icon, ...toastOptions } = options ?? {};
|
|
3664
3688
|
return import_sonner.toast.custom(
|
|
3665
|
-
(id) => /* @__PURE__ */ (0,
|
|
3689
|
+
(id) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3666
3690
|
AdsToast,
|
|
3667
3691
|
{
|
|
3668
3692
|
action: action ? {
|
|
@@ -3716,17 +3740,17 @@ var AdsToastManager = Object.assign(
|
|
|
3716
3740
|
);
|
|
3717
3741
|
|
|
3718
3742
|
// src/components/AdsDialog/index.tsx
|
|
3719
|
-
var
|
|
3743
|
+
var React51 = __toESM(require("react"), 1);
|
|
3720
3744
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
3721
|
-
var
|
|
3722
|
-
var
|
|
3745
|
+
var import_lucide_react13 = require("lucide-react");
|
|
3746
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3723
3747
|
var overlayClassName2 = "fixed inset-0 z-50 bg-black/80 backdrop-blur-[2px] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0";
|
|
3724
3748
|
var contentClassName2 = "fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-[423px] -translate-x-1/2 -translate-y-1/2 gap-lg rounded-radius-md border border-border bg-card p-xl text-foreground shadow-[0px_4px_6px_-4px_rgba(0,0,0,0.1),0px_10px_15px_-3px_rgba(0,0,0,0.1)] duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]";
|
|
3725
3749
|
var closeButtonClassName = "absolute right-xl top-xl inline-flex h-6 w-6 items-center justify-center rounded-sm text-foreground/80 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card disabled:pointer-events-none";
|
|
3726
3750
|
var Dialog = DialogPrimitive.Root;
|
|
3727
3751
|
var DialogTrigger = DialogPrimitive.Trigger;
|
|
3728
3752
|
var DialogPortal = DialogPrimitive.Portal;
|
|
3729
|
-
var DialogOverlay =
|
|
3753
|
+
var DialogOverlay = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3730
3754
|
DialogPrimitive.Overlay,
|
|
3731
3755
|
{
|
|
3732
3756
|
className: cn(overlayClassName2, className),
|
|
@@ -3735,7 +3759,7 @@ var DialogOverlay = React50.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
3735
3759
|
}
|
|
3736
3760
|
));
|
|
3737
3761
|
DialogOverlay.displayName = "DialogOverlay";
|
|
3738
|
-
var DialogClose =
|
|
3762
|
+
var DialogClose = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3739
3763
|
DialogPrimitive.Close,
|
|
3740
3764
|
{
|
|
3741
3765
|
className: cn(
|
|
@@ -3747,12 +3771,12 @@ var DialogClose = React50.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3747
3771
|
}
|
|
3748
3772
|
));
|
|
3749
3773
|
DialogClose.displayName = "DialogClose";
|
|
3750
|
-
var DialogContent =
|
|
3774
|
+
var DialogContent = React51.forwardRef(({ children, className, closeLabel, hideCloseButton = false, ...props }, ref) => {
|
|
3751
3775
|
const { messages } = useAdsI18n();
|
|
3752
3776
|
const resolvedCloseLabel = closeLabel ?? messages.dialog.close;
|
|
3753
|
-
return /* @__PURE__ */ (0,
|
|
3754
|
-
/* @__PURE__ */ (0,
|
|
3755
|
-
/* @__PURE__ */ (0,
|
|
3777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(DialogPortal, { children: [
|
|
3778
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DialogOverlay, {}),
|
|
3779
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
3756
3780
|
DialogPrimitive.Content,
|
|
3757
3781
|
{
|
|
3758
3782
|
className: cn(contentClassName2, className),
|
|
@@ -3760,14 +3784,14 @@ var DialogContent = React50.forwardRef(({ children, className, closeLabel, hideC
|
|
|
3760
3784
|
...props,
|
|
3761
3785
|
children: [
|
|
3762
3786
|
children,
|
|
3763
|
-
!hideCloseButton ? /* @__PURE__ */ (0,
|
|
3787
|
+
!hideCloseButton ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
3764
3788
|
DialogPrimitive.Close,
|
|
3765
3789
|
{
|
|
3766
3790
|
"aria-label": resolvedCloseLabel,
|
|
3767
3791
|
className: closeButtonClassName,
|
|
3768
3792
|
children: [
|
|
3769
|
-
/* @__PURE__ */ (0,
|
|
3770
|
-
/* @__PURE__ */ (0,
|
|
3793
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react13.X, { "aria-hidden": true, className: "h-4 w-4" }),
|
|
3794
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "sr-only", children: resolvedCloseLabel })
|
|
3771
3795
|
]
|
|
3772
3796
|
}
|
|
3773
3797
|
) : null
|
|
@@ -3777,8 +3801,8 @@ var DialogContent = React50.forwardRef(({ children, className, closeLabel, hideC
|
|
|
3777
3801
|
] });
|
|
3778
3802
|
});
|
|
3779
3803
|
DialogContent.displayName = "DialogContent";
|
|
3780
|
-
var DialogHeader =
|
|
3781
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3804
|
+
var DialogHeader = React51.forwardRef(
|
|
3805
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3782
3806
|
"div",
|
|
3783
3807
|
{
|
|
3784
3808
|
className: cn("flex flex-col gap-sm pr-8 text-left", className),
|
|
@@ -3788,8 +3812,8 @@ var DialogHeader = React50.forwardRef(
|
|
|
3788
3812
|
)
|
|
3789
3813
|
);
|
|
3790
3814
|
DialogHeader.displayName = "DialogHeader";
|
|
3791
|
-
var DialogFooter =
|
|
3792
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
3815
|
+
var DialogFooter = React51.forwardRef(
|
|
3816
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3793
3817
|
"div",
|
|
3794
3818
|
{
|
|
3795
3819
|
className: cn(
|
|
@@ -3802,7 +3826,7 @@ var DialogFooter = React50.forwardRef(
|
|
|
3802
3826
|
)
|
|
3803
3827
|
);
|
|
3804
3828
|
DialogFooter.displayName = "DialogFooter";
|
|
3805
|
-
var DialogTitle =
|
|
3829
|
+
var DialogTitle = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3806
3830
|
DialogPrimitive.Title,
|
|
3807
3831
|
{
|
|
3808
3832
|
className: cn("text-lg font-semibold leading-7 text-foreground", className),
|
|
@@ -3811,7 +3835,7 @@ var DialogTitle = React50.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3811
3835
|
}
|
|
3812
3836
|
));
|
|
3813
3837
|
DialogTitle.displayName = "DialogTitle";
|
|
3814
|
-
var DialogDescription =
|
|
3838
|
+
var DialogDescription = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3815
3839
|
DialogPrimitive.Description,
|
|
3816
3840
|
{
|
|
3817
3841
|
className: cn("text-sm leading-5 text-muted-foreground", className),
|
|
@@ -3833,7 +3857,7 @@ var AdsDialogDescription = DialogDescription;
|
|
|
3833
3857
|
|
|
3834
3858
|
// src/components/AdsEmpty/index.tsx
|
|
3835
3859
|
var import_class_variance_authority9 = require("class-variance-authority");
|
|
3836
|
-
var
|
|
3860
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3837
3861
|
var adsEmptyVariants = (0, import_class_variance_authority9.cva)(
|
|
3838
3862
|
"flex w-full flex-col items-center justify-center gap-6 p-12 text-center",
|
|
3839
3863
|
{
|
|
@@ -3850,7 +3874,7 @@ var adsEmptyVariants = (0, import_class_variance_authority9.cva)(
|
|
|
3850
3874
|
}
|
|
3851
3875
|
);
|
|
3852
3876
|
function AdsEmpty({ className, variant, ...props }) {
|
|
3853
|
-
return /* @__PURE__ */ (0,
|
|
3877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3854
3878
|
"div",
|
|
3855
3879
|
{
|
|
3856
3880
|
"data-slot": "ads-empty",
|
|
@@ -3860,7 +3884,7 @@ function AdsEmpty({ className, variant, ...props }) {
|
|
|
3860
3884
|
);
|
|
3861
3885
|
}
|
|
3862
3886
|
function AdsEmptyHeader({ className, ...props }) {
|
|
3863
|
-
return /* @__PURE__ */ (0,
|
|
3887
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3864
3888
|
"div",
|
|
3865
3889
|
{
|
|
3866
3890
|
"data-slot": "ads-empty-header",
|
|
@@ -3870,7 +3894,7 @@ function AdsEmptyHeader({ className, ...props }) {
|
|
|
3870
3894
|
);
|
|
3871
3895
|
}
|
|
3872
3896
|
function AdsEmptyMedia({ className, ...props }) {
|
|
3873
|
-
return /* @__PURE__ */ (0,
|
|
3897
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3874
3898
|
"div",
|
|
3875
3899
|
{
|
|
3876
3900
|
"data-slot": "ads-empty-media",
|
|
@@ -3884,7 +3908,7 @@ function AdsEmptyMedia({ className, ...props }) {
|
|
|
3884
3908
|
);
|
|
3885
3909
|
}
|
|
3886
3910
|
function AdsEmptyTitle({ className, ...props }) {
|
|
3887
|
-
return /* @__PURE__ */ (0,
|
|
3911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3888
3912
|
"div",
|
|
3889
3913
|
{
|
|
3890
3914
|
"data-slot": "ads-empty-title",
|
|
@@ -3894,7 +3918,7 @@ function AdsEmptyTitle({ className, ...props }) {
|
|
|
3894
3918
|
);
|
|
3895
3919
|
}
|
|
3896
3920
|
function AdsEmptyDescription({ className, ...props }) {
|
|
3897
|
-
return /* @__PURE__ */ (0,
|
|
3921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3898
3922
|
"p",
|
|
3899
3923
|
{
|
|
3900
3924
|
"data-slot": "ads-empty-description",
|
|
@@ -3904,7 +3928,7 @@ function AdsEmptyDescription({ className, ...props }) {
|
|
|
3904
3928
|
);
|
|
3905
3929
|
}
|
|
3906
3930
|
function AdsEmptyContent({ className, ...props }) {
|
|
3907
|
-
return /* @__PURE__ */ (0,
|
|
3931
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3908
3932
|
"div",
|
|
3909
3933
|
{
|
|
3910
3934
|
"data-slot": "ads-empty-content",
|
|
@@ -3914,7 +3938,7 @@ function AdsEmptyContent({ className, ...props }) {
|
|
|
3914
3938
|
);
|
|
3915
3939
|
}
|
|
3916
3940
|
function AdsEmptyActions({ className, ...props }) {
|
|
3917
|
-
return /* @__PURE__ */ (0,
|
|
3941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3918
3942
|
"div",
|
|
3919
3943
|
{
|
|
3920
3944
|
"data-slot": "ads-empty-actions",
|
|
@@ -3924,7 +3948,7 @@ function AdsEmptyActions({ className, ...props }) {
|
|
|
3924
3948
|
);
|
|
3925
3949
|
}
|
|
3926
3950
|
function AdsEmptyFooter({ className, ...props }) {
|
|
3927
|
-
return /* @__PURE__ */ (0,
|
|
3951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3928
3952
|
"div",
|
|
3929
3953
|
{
|
|
3930
3954
|
"data-slot": "ads-empty-footer",
|
|
@@ -3935,12 +3959,12 @@ function AdsEmptyFooter({ className, ...props }) {
|
|
|
3935
3959
|
}
|
|
3936
3960
|
|
|
3937
3961
|
// src/components/AdsTable/index.tsx
|
|
3938
|
-
var
|
|
3962
|
+
var React53 = __toESM(require("react"), 1);
|
|
3939
3963
|
|
|
3940
3964
|
// src/primitives/table.tsx
|
|
3941
|
-
var
|
|
3942
|
-
var
|
|
3943
|
-
var Table =
|
|
3965
|
+
var React52 = __toESM(require("react"), 1);
|
|
3966
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3967
|
+
var Table = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3944
3968
|
"table",
|
|
3945
3969
|
{
|
|
3946
3970
|
ref,
|
|
@@ -3949,9 +3973,9 @@ var Table = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
3949
3973
|
}
|
|
3950
3974
|
) }));
|
|
3951
3975
|
Table.displayName = "Table";
|
|
3952
|
-
var TableHeader =
|
|
3976
|
+
var TableHeader = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
3953
3977
|
TableHeader.displayName = "TableHeader";
|
|
3954
|
-
var TableBody =
|
|
3978
|
+
var TableBody = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3955
3979
|
"tbody",
|
|
3956
3980
|
{
|
|
3957
3981
|
ref,
|
|
@@ -3960,7 +3984,7 @@ var TableBody = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3960
3984
|
}
|
|
3961
3985
|
));
|
|
3962
3986
|
TableBody.displayName = "TableBody";
|
|
3963
|
-
var TableFooter =
|
|
3987
|
+
var TableFooter = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3964
3988
|
"tfoot",
|
|
3965
3989
|
{
|
|
3966
3990
|
ref,
|
|
@@ -3972,7 +3996,7 @@ var TableFooter = React51.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3972
3996
|
}
|
|
3973
3997
|
));
|
|
3974
3998
|
TableFooter.displayName = "TableFooter";
|
|
3975
|
-
var TableRow =
|
|
3999
|
+
var TableRow = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3976
4000
|
"tr",
|
|
3977
4001
|
{
|
|
3978
4002
|
ref,
|
|
@@ -3984,7 +4008,7 @@ var TableRow = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3984
4008
|
}
|
|
3985
4009
|
));
|
|
3986
4010
|
TableRow.displayName = "TableRow";
|
|
3987
|
-
var TableHead =
|
|
4011
|
+
var TableHead = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3988
4012
|
"th",
|
|
3989
4013
|
{
|
|
3990
4014
|
ref,
|
|
@@ -3996,7 +4020,7 @@ var TableHead = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
3996
4020
|
}
|
|
3997
4021
|
));
|
|
3998
4022
|
TableHead.displayName = "TableHead";
|
|
3999
|
-
var TableCell =
|
|
4023
|
+
var TableCell = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4000
4024
|
"td",
|
|
4001
4025
|
{
|
|
4002
4026
|
ref,
|
|
@@ -4005,7 +4029,7 @@ var TableCell = React51.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
4005
4029
|
}
|
|
4006
4030
|
));
|
|
4007
4031
|
TableCell.displayName = "TableCell";
|
|
4008
|
-
var TableCaption =
|
|
4032
|
+
var TableCaption = React52.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4009
4033
|
"caption",
|
|
4010
4034
|
{
|
|
4011
4035
|
ref,
|
|
@@ -4016,9 +4040,9 @@ var TableCaption = React51.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4016
4040
|
TableCaption.displayName = "TableCaption";
|
|
4017
4041
|
|
|
4018
4042
|
// src/components/AdsTable/index.tsx
|
|
4019
|
-
var
|
|
4020
|
-
var AdsTable =
|
|
4021
|
-
({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4043
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
4044
|
+
var AdsTable = React53.forwardRef(
|
|
4045
|
+
({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "w-full overflow-hidden rounded-radius-md border border-border bg-card", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4022
4046
|
Table,
|
|
4023
4047
|
{
|
|
4024
4048
|
ref,
|
|
@@ -4028,7 +4052,7 @@ var AdsTable = React52.forwardRef(
|
|
|
4028
4052
|
) })
|
|
4029
4053
|
);
|
|
4030
4054
|
AdsTable.displayName = "AdsTable";
|
|
4031
|
-
var AdsTableHeader =
|
|
4055
|
+
var AdsTableHeader = React53.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4032
4056
|
TableHeader,
|
|
4033
4057
|
{
|
|
4034
4058
|
ref,
|
|
@@ -4037,7 +4061,7 @@ var AdsTableHeader = React52.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
4037
4061
|
}
|
|
4038
4062
|
));
|
|
4039
4063
|
AdsTableHeader.displayName = "AdsTableHeader";
|
|
4040
|
-
var AdsTableBody =
|
|
4064
|
+
var AdsTableBody = React53.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4041
4065
|
TableBody,
|
|
4042
4066
|
{
|
|
4043
4067
|
ref,
|
|
@@ -4046,7 +4070,7 @@ var AdsTableBody = React52.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4046
4070
|
}
|
|
4047
4071
|
));
|
|
4048
4072
|
AdsTableBody.displayName = "AdsTableBody";
|
|
4049
|
-
var AdsTableFooter =
|
|
4073
|
+
var AdsTableFooter = React53.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4050
4074
|
TableFooter,
|
|
4051
4075
|
{
|
|
4052
4076
|
ref,
|
|
@@ -4055,7 +4079,7 @@ var AdsTableFooter = React52.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
4055
4079
|
}
|
|
4056
4080
|
));
|
|
4057
4081
|
AdsTableFooter.displayName = "AdsTableFooter";
|
|
4058
|
-
var AdsTableRow =
|
|
4082
|
+
var AdsTableRow = React53.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4059
4083
|
TableRow,
|
|
4060
4084
|
{
|
|
4061
4085
|
ref,
|
|
@@ -4067,7 +4091,7 @@ var AdsTableRow = React52.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4067
4091
|
}
|
|
4068
4092
|
));
|
|
4069
4093
|
AdsTableRow.displayName = "AdsTableRow";
|
|
4070
|
-
var AdsTableHead =
|
|
4094
|
+
var AdsTableHead = React53.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4071
4095
|
TableHead,
|
|
4072
4096
|
{
|
|
4073
4097
|
ref,
|
|
@@ -4079,7 +4103,7 @@ var AdsTableHead = React52.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4079
4103
|
}
|
|
4080
4104
|
));
|
|
4081
4105
|
AdsTableHead.displayName = "AdsTableHead";
|
|
4082
|
-
var AdsTableCell =
|
|
4106
|
+
var AdsTableCell = React53.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4083
4107
|
TableCell,
|
|
4084
4108
|
{
|
|
4085
4109
|
ref,
|
|
@@ -4091,7 +4115,7 @@ var AdsTableCell = React52.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4091
4115
|
}
|
|
4092
4116
|
));
|
|
4093
4117
|
AdsTableCell.displayName = "AdsTableCell";
|
|
4094
|
-
var AdsTableCaption =
|
|
4118
|
+
var AdsTableCaption = React53.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
4095
4119
|
TableCaption,
|
|
4096
4120
|
{
|
|
4097
4121
|
ref,
|
|
@@ -4268,6 +4292,7 @@ var designTokens = {
|
|
|
4268
4292
|
AdsSeparator,
|
|
4269
4293
|
AdsSkeleton,
|
|
4270
4294
|
AdsSlider,
|
|
4295
|
+
AdsSpinner,
|
|
4271
4296
|
AdsSwitch,
|
|
4272
4297
|
AdsTable,
|
|
4273
4298
|
AdsTableBody,
|