@nesso-how/ui 1.0.0-alpha.33 → 1.0.0-alpha.34
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.d.ts +2 -1
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ export declare function DialogActions({ className, children }: {
|
|
|
112
112
|
className?: string;
|
|
113
113
|
children: ReactNode;
|
|
114
114
|
}): import("react").JSX.Element;
|
|
115
|
-
export declare function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, confirmLabel, onConfirm, initialFocus, finalFocus, children }: {
|
|
115
|
+
export declare function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, confirmLabel, onConfirm, disabled, initialFocus, finalFocus, children }: {
|
|
116
116
|
open: boolean;
|
|
117
117
|
onOpenChange: (open: boolean) => void;
|
|
118
118
|
title: string;
|
|
@@ -120,6 +120,7 @@ export declare function ConfirmDialog({ open, onOpenChange, title, description,
|
|
|
120
120
|
cancelLabel: string;
|
|
121
121
|
confirmLabel: string;
|
|
122
122
|
onConfirm: () => void;
|
|
123
|
+
disabled?: boolean;
|
|
123
124
|
initialFocus?: Dialog.Popup.Props['initialFocus'];
|
|
124
125
|
finalFocus?: Dialog.Popup.Props['finalFocus'];
|
|
125
126
|
children?: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -781,7 +781,7 @@ function DialogActions({ className, children }) {
|
|
|
781
781
|
children
|
|
782
782
|
});
|
|
783
783
|
}
|
|
784
|
-
function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, confirmLabel, onConfirm, initialFocus, finalFocus, children }) {
|
|
784
|
+
function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, confirmLabel, onConfirm, disabled = false, initialFocus, finalFocus, children }) {
|
|
785
785
|
const cancel = useRef(null);
|
|
786
786
|
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
787
787
|
open,
|
|
@@ -802,10 +802,12 @@ function ConfirmDialog({ open, onOpenChange, title, description, cancelLabel, co
|
|
|
802
802
|
/* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Dialog.Close, {
|
|
803
803
|
render: /* @__PURE__ */ jsx(Button, {
|
|
804
804
|
ref: cancel,
|
|
805
|
-
variant: "outline"
|
|
805
|
+
variant: "outline",
|
|
806
|
+
disabled
|
|
806
807
|
}),
|
|
807
808
|
children: cancelLabel
|
|
808
809
|
}), /* @__PURE__ */ jsx(Button, {
|
|
810
|
+
disabled,
|
|
809
811
|
onClick: onConfirm,
|
|
810
812
|
children: confirmLabel
|
|
811
813
|
})] })
|
package/package.json
CHANGED