@dust-tt/sparkle 0.2.136-pr → 0.2.136
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/cjs/components/ElementDialog.d.ts +2 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/ElementDialog.d.ts +2 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,8 @@ import { ModalProps } from "./Dialog";
|
|
|
3
3
|
type ElementDialogProps<T> = Omit<ModalProps, "isOpen" | "onValidate" | "onCancel"> & {
|
|
4
4
|
openOnElement: T | null;
|
|
5
5
|
onValidate: (closeDialogFn: () => void) => void;
|
|
6
|
+
onCancel: (closeDialogFn: () => void) => void;
|
|
6
7
|
closeDialogFn: () => void;
|
|
7
8
|
};
|
|
8
|
-
export declare function ElementDialog<T>({ openOnElement, closeDialogFn, onValidate, ...props }: ElementDialogProps<T>): React.JSX.Element;
|
|
9
|
+
export declare function ElementDialog<T>({ openOnElement, closeDialogFn, onValidate, onCancel, ...props }: ElementDialogProps<T>): React.JSX.Element;
|
|
9
10
|
export {};
|
package/dist/cjs/index.js
CHANGED
|
@@ -55170,7 +55170,7 @@ function Dialog(_a) {
|
|
|
55170
55170
|
}
|
|
55171
55171
|
|
|
55172
55172
|
function ElementDialog(_a) {
|
|
55173
|
-
var openOnElement = _a.openOnElement, closeDialogFn = _a.closeDialogFn, onValidate = _a.onValidate, props = __rest(_a, ["openOnElement", "closeDialogFn", "onValidate"]);
|
|
55173
|
+
var openOnElement = _a.openOnElement, closeDialogFn = _a.closeDialogFn, onValidate = _a.onValidate, onCancel = _a.onCancel, props = __rest(_a, ["openOnElement", "closeDialogFn", "onValidate", "onCancel"]);
|
|
55174
55174
|
var _b = __read(React.useState(false), 2), isClosingTransition = _b[0], setIsClosingTransition = _b[1];
|
|
55175
55175
|
var transitionOnClose = React.useCallback(function () {
|
|
55176
55176
|
setIsClosingTransition(true);
|
|
@@ -55179,7 +55179,7 @@ function ElementDialog(_a) {
|
|
|
55179
55179
|
setIsClosingTransition(false);
|
|
55180
55180
|
}, 200);
|
|
55181
55181
|
}, [closeDialogFn]);
|
|
55182
|
-
return (React.createElement(Dialog, __assign({ isOpen: openOnElement !== null && !isClosingTransition, onCancel: transitionOnClose, onValidate: function () { return onValidate(transitionOnClose); } }, props)));
|
|
55182
|
+
return (React.createElement(Dialog, __assign({ isOpen: openOnElement !== null && !isClosingTransition, onCancel: function () { return onCancel(transitionOnClose); }, onValidate: function () { return onValidate(transitionOnClose); } }, props)));
|
|
55183
55183
|
}
|
|
55184
55184
|
|
|
55185
55185
|
var sizeInputClasses = {
|