@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/esm/index.js
CHANGED
|
@@ -55150,7 +55150,7 @@ function Dialog(_a) {
|
|
|
55150
55150
|
}
|
|
55151
55151
|
|
|
55152
55152
|
function ElementDialog(_a) {
|
|
55153
|
-
var openOnElement = _a.openOnElement, closeDialogFn = _a.closeDialogFn, onValidate = _a.onValidate, props = __rest(_a, ["openOnElement", "closeDialogFn", "onValidate"]);
|
|
55153
|
+
var openOnElement = _a.openOnElement, closeDialogFn = _a.closeDialogFn, onValidate = _a.onValidate, onCancel = _a.onCancel, props = __rest(_a, ["openOnElement", "closeDialogFn", "onValidate", "onCancel"]);
|
|
55154
55154
|
var _b = __read(useState(false), 2), isClosingTransition = _b[0], setIsClosingTransition = _b[1];
|
|
55155
55155
|
var transitionOnClose = useCallback(function () {
|
|
55156
55156
|
setIsClosingTransition(true);
|
|
@@ -55159,7 +55159,7 @@ function ElementDialog(_a) {
|
|
|
55159
55159
|
setIsClosingTransition(false);
|
|
55160
55160
|
}, 200);
|
|
55161
55161
|
}, [closeDialogFn]);
|
|
55162
|
-
return (React__default.createElement(Dialog, __assign({ isOpen: openOnElement !== null && !isClosingTransition, onCancel: transitionOnClose, onValidate: function () { return onValidate(transitionOnClose); } }, props)));
|
|
55162
|
+
return (React__default.createElement(Dialog, __assign({ isOpen: openOnElement !== null && !isClosingTransition, onCancel: function () { return onCancel(transitionOnClose); }, onValidate: function () { return onValidate(transitionOnClose); } }, props)));
|
|
55163
55163
|
}
|
|
55164
55164
|
|
|
55165
55165
|
var sizeInputClasses = {
|