@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/cjs/index.js
CHANGED
|
@@ -32431,7 +32431,7 @@ function Banner(_a) {
|
|
|
32431
32431
|
React.useEffect(function () {
|
|
32432
32432
|
setIsDismissed(hidden);
|
|
32433
32433
|
}, [hidden]);
|
|
32434
|
-
return isDismissed ? (React.createElement(React.Fragment, null)) : (React.createElement("div", { className: classNames(variantClasses[variant], "sm:s-before:flex-1 s-
|
|
32434
|
+
return isDismissed ? (React.createElement(React.Fragment, null)) : (React.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) },
|
|
32435
32435
|
children,
|
|
32436
32436
|
allowDismiss && (React.createElement("div", { className: "s-flex s-flex-1 s-items-center s-justify-end" },
|
|
32437
32437
|
React.createElement("span", { className: "s-sr-only" }, "Dismiss"),
|
|
@@ -33784,7 +33784,7 @@ function ElementModal(_a) {
|
|
|
33784
33784
|
}
|
|
33785
33785
|
|
|
33786
33786
|
function Dialog(_a) {
|
|
33787
|
-
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;
|
|
33787
|
+
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;
|
|
33788
33788
|
return (React.createElement(tt, { show: isOpen, as: React.Fragment, appear: true },
|
|
33789
33789
|
React.createElement(_t, { as: "div", className: "s-relative s-z-50", onClose: onCancel },
|
|
33790
33790
|
React.createElement(tt.Child, { as: React.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" },
|
|
@@ -33797,8 +33797,10 @@ function Dialog(_a) {
|
|
|
33797
33797
|
React.createElement("div", { className: "s-text-base s-text-element-700" }, children),
|
|
33798
33798
|
React.createElement("div", { className: "s-flex s-w-full s-justify-end" },
|
|
33799
33799
|
React.createElement(Button.List, null,
|
|
33800
|
-
React.createElement(
|
|
33801
|
-
|
|
33800
|
+
!isSaving && (React.createElement(React.Fragment, null,
|
|
33801
|
+
React.createElement(Button, { label: cancelLabel, variant: "tertiary", onClick: onCancel }),
|
|
33802
|
+
React.createElement(Button, { label: validateLabel, variant: validateVariant, onClick: onValidate }))),
|
|
33803
|
+
isSaving && React.createElement(Spinner, null))))))))));
|
|
33802
33804
|
}
|
|
33803
33805
|
|
|
33804
33806
|
var sizeInputClasses = {
|