@dust-tt/sparkle 0.2.117 → 0.2.119
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.
|
@@ -10,5 +10,5 @@ type ModalProps = {
|
|
|
10
10
|
validateVariant?: "primary" | "primaryWarning";
|
|
11
11
|
isSaving?: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare function Dialog({ isOpen, children, onCancel, onValidate, cancelLabel, validateLabel, validateVariant, title, }: ModalProps): React.JSX.Element;
|
|
13
|
+
export declare function Dialog({ isOpen, children, onCancel, onValidate, cancelLabel, validateLabel, validateVariant, title, isSaving, }: ModalProps): React.JSX.Element;
|
|
14
14
|
export {};
|
package/dist/esm/index.js
CHANGED
|
@@ -32411,7 +32411,7 @@ function Banner(_a) {
|
|
|
32411
32411
|
useEffect(function () {
|
|
32412
32412
|
setIsDismissed(hidden);
|
|
32413
32413
|
}, [hidden]);
|
|
32414
|
-
return isDismissed ? (React__default.createElement(React__default.Fragment, null)) : (React__default.createElement("div", { className: classNames(variantClasses[variant], "sm:s-before:flex-1 s-
|
|
32414
|
+
return isDismissed ? (React__default.createElement(React__default.Fragment, null)) : (React__default.createElement("div", { className: classNames(variantClasses[variant], "sm:s-before:flex-1 s-min-h-16 s-flex s-items-center s-px-6 s-py-4 s-text-sm sm:s-px-3.5", className) },
|
|
32415
32415
|
children,
|
|
32416
32416
|
allowDismiss && (React__default.createElement("div", { className: "s-flex s-flex-1 s-items-center s-justify-end" },
|
|
32417
32417
|
React__default.createElement("span", { className: "s-sr-only" }, "Dismiss"),
|
|
@@ -33764,7 +33764,7 @@ function ElementModal(_a) {
|
|
|
33764
33764
|
}
|
|
33765
33765
|
|
|
33766
33766
|
function Dialog(_a) {
|
|
33767
|
-
var isOpen = _a.isOpen, children = _a.children, onCancel = _a.onCancel, onValidate = _a.onValidate, _b = _a.cancelLabel, cancelLabel = _b === void 0 ? "Cancel" : _b, _c = _a.validateLabel, validateLabel = _c === void 0 ? "Ok" : _c, _d = _a.validateVariant, validateVariant = _d === void 0 ? "primary" : _d, title = _a.title;
|
|
33767
|
+
var isOpen = _a.isOpen, children = _a.children, onCancel = _a.onCancel, onValidate = _a.onValidate, _b = _a.cancelLabel, cancelLabel = _b === void 0 ? "Cancel" : _b, _c = _a.validateLabel, validateLabel = _c === void 0 ? "Ok" : _c, _d = _a.validateVariant, validateVariant = _d === void 0 ? "primary" : _d, title = _a.title, isSaving = _a.isSaving;
|
|
33768
33768
|
return (React__default.createElement(tt, { show: isOpen, as: Fragment, appear: true },
|
|
33769
33769
|
React__default.createElement(_t, { as: "div", className: "s-relative s-z-50", onClose: onCancel },
|
|
33770
33770
|
React__default.createElement(tt.Child, { as: Fragment, enter: "s-ease-out s-duration-150", enterFrom: "s-opacity-0", enterTo: "s-opacity-100", leave: "s-ease-in s-duration-150", leaveFrom: "s-opacity-100", leaveTo: "s-opacity-0" },
|
|
@@ -33777,8 +33777,10 @@ function Dialog(_a) {
|
|
|
33777
33777
|
React__default.createElement("div", { className: "s-text-base s-text-element-700" }, children),
|
|
33778
33778
|
React__default.createElement("div", { className: "s-flex s-w-full s-justify-end" },
|
|
33779
33779
|
React__default.createElement(Button.List, null,
|
|
33780
|
-
React__default.createElement(
|
|
33781
|
-
|
|
33780
|
+
!isSaving && (React__default.createElement(React__default.Fragment, null,
|
|
33781
|
+
React__default.createElement(Button, { label: cancelLabel, variant: "tertiary", onClick: onCancel }),
|
|
33782
|
+
React__default.createElement(Button, { label: validateLabel, variant: validateVariant, onClick: onValidate }))),
|
|
33783
|
+
isSaving && React__default.createElement(Spinner, null))))))))));
|
|
33782
33784
|
}
|
|
33783
33785
|
|
|
33784
33786
|
var sizeInputClasses = {
|