@ai-matrx/kit 0.5.0 → 0.5.1

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.js CHANGED
@@ -908,9 +908,9 @@ var AlertDialogDescription = React2.forwardRef(({ className, ...props }, ref) =>
908
908
  }
909
909
  ));
910
910
  AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
911
- var AlertDialogContent = React2.forwardRef(({ className, children, ...props }, ref) => {
911
+ var AlertDialogContent = React2.forwardRef(({ className, children, container, ...props }, ref) => {
912
912
  const hasDescription = treeContainsComponent(children, AlertDialogDescription) || treeContainsComponent(children, AlertDialogPrimitive.Description);
913
- return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
913
+ return /* @__PURE__ */ jsxs(AlertDialogPortal, { container: container ?? void 0, children: [
914
914
  /* @__PURE__ */ jsx(AlertDialogOverlay, {}),
915
915
  /* @__PURE__ */ jsxs(
916
916
  AlertDialogContentPrimitive,
@@ -1019,36 +1019,44 @@ function ConfirmDialog({
1019
1019
  variant = "default",
1020
1020
  busy = false,
1021
1021
  confirmDisabled = false,
1022
+ portalContainer,
1022
1023
  onConfirm
1023
1024
  }) {
1024
- return /* @__PURE__ */ jsx2(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs2(AlertDialogContent, { className: contentClassName, children: [
1025
- /* @__PURE__ */ jsxs2(AlertDialogHeader, { children: [
1026
- /* @__PURE__ */ jsx2(AlertDialogTitle, { children: title }),
1027
- description ? /* @__PURE__ */ jsx2(AlertDialogDescription, { children: description }) : null
1028
- ] }),
1029
- content ?? null,
1030
- /* @__PURE__ */ jsxs2(AlertDialogFooter, { children: [
1031
- cancelLabel === null ? null : /* @__PURE__ */ jsx2(AlertDialogCancel, { className: "max-lg:min-h-11", disabled: busy, children: cancelLabel }),
1032
- /* @__PURE__ */ jsxs2(
1033
- AlertDialogAction,
1034
- {
1035
- disabled: busy || confirmDisabled,
1036
- onClick: (event) => {
1037
- event.preventDefault();
1038
- void onConfirm();
1039
- },
1040
- className: cn(
1041
- "max-lg:min-h-11",
1042
- variant === "destructive" && "bg-destructive text-destructive-foreground hover:bg-destructive/90"
1043
- ),
1044
- children: [
1045
- busy ? /* @__PURE__ */ jsx2(SpinnerIcon, { className: "mr-2 h-4 w-4 animate-spin" }) : null,
1046
- confirmLabel
1047
- ]
1048
- }
1049
- )
1050
- ] })
1051
- ] }) });
1025
+ return /* @__PURE__ */ jsx2(AlertDialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs2(
1026
+ AlertDialogContent,
1027
+ {
1028
+ className: contentClassName,
1029
+ container: portalContainer ?? void 0,
1030
+ children: [
1031
+ /* @__PURE__ */ jsxs2(AlertDialogHeader, { children: [
1032
+ /* @__PURE__ */ jsx2(AlertDialogTitle, { children: title }),
1033
+ description ? /* @__PURE__ */ jsx2(AlertDialogDescription, { children: description }) : null
1034
+ ] }),
1035
+ content ?? null,
1036
+ /* @__PURE__ */ jsxs2(AlertDialogFooter, { children: [
1037
+ cancelLabel === null ? null : /* @__PURE__ */ jsx2(AlertDialogCancel, { className: "max-lg:min-h-11", disabled: busy, children: cancelLabel }),
1038
+ /* @__PURE__ */ jsxs2(
1039
+ AlertDialogAction,
1040
+ {
1041
+ disabled: busy || confirmDisabled,
1042
+ onClick: (event) => {
1043
+ event.preventDefault();
1044
+ void onConfirm();
1045
+ },
1046
+ className: cn(
1047
+ "max-lg:min-h-11",
1048
+ variant === "destructive" && "bg-destructive text-destructive-foreground hover:bg-destructive/90"
1049
+ ),
1050
+ children: [
1051
+ busy ? /* @__PURE__ */ jsx2(SpinnerIcon, { className: "mr-2 h-4 w-4 animate-spin" }) : null,
1052
+ confirmLabel
1053
+ ]
1054
+ }
1055
+ )
1056
+ ] })
1057
+ ]
1058
+ }
1059
+ ) });
1052
1060
  }
1053
1061
 
1054
1062
  // src/confirm/host.tsx