@dust-tt/sparkle 0.1.90 → 0.1.92
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 @@ interface ModalProps {
|
|
|
10
10
|
title?: string;
|
|
11
11
|
isFullScreen?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare function Modal({ isOpen, onClose, children, hasChanged, onSave, title, isFullScreen, }: ModalProps): React.JSX.Element;
|
|
13
|
+
export declare function Modal({ isOpen, onClose, action, children, hasChanged, onSave, title, isFullScreen, }: ModalProps): React.JSX.Element;
|
|
14
14
|
export {};
|
package/dist/cjs/index.js
CHANGED
|
@@ -32769,7 +32769,7 @@ function IconToggleButton(_a) {
|
|
|
32769
32769
|
}
|
|
32770
32770
|
|
|
32771
32771
|
function Modal(_a) {
|
|
32772
|
-
var isOpen = _a.isOpen, onClose = _a.onClose, children = _a.children, hasChanged = _a.hasChanged, onSave = _a.onSave, title = _a.title, _b = _a.isFullScreen, isFullScreen = _b === void 0 ? false : _b;
|
|
32772
|
+
var isOpen = _a.isOpen, onClose = _a.onClose, action = _a.action, children = _a.children, hasChanged = _a.hasChanged, onSave = _a.onSave, title = _a.title, _b = _a.isFullScreen, isFullScreen = _b === void 0 ? false : _b;
|
|
32773
32773
|
var buttonBarProps = hasChanged
|
|
32774
32774
|
? {
|
|
32775
32775
|
variant: "validate",
|
|
@@ -32790,7 +32790,7 @@ function Modal(_a) {
|
|
|
32790
32790
|
React.createElement(_t.Panel, { className: classNames("s-relative s-transform s-overflow-hidden s-bg-white s-px-4 s-transition-all sm:s-px-6", isFullScreen
|
|
32791
32791
|
? "s-m-0 s-h-full s-max-h-full s-w-full s-max-w-full"
|
|
32792
32792
|
: "s-max-w-2xl s-rounded-lg s-shadow-xl lg:s-w-1/2") },
|
|
32793
|
-
React.createElement(BarHeader, { title: title || "", rightActions: React.createElement(BarHeader.ButtonBar, __assign({}, buttonBarProps)) }),
|
|
32793
|
+
React.createElement(BarHeader, { title: title || "", leftActions: action ? React.createElement(Button, __assign({}, action)) : undefined, rightActions: React.createElement(BarHeader.ButtonBar, __assign({}, buttonBarProps)) }),
|
|
32794
32794
|
React.createElement("div", { className: "s-pb-6 s-pt-14 ".concat(isFullScreen ? "s-h-full s-overflow-y-auto" : "") }, children))))))));
|
|
32795
32795
|
}
|
|
32796
32796
|
|
|
@@ -32815,7 +32815,7 @@ function Searchbar(_a) {
|
|
|
32815
32815
|
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
|
|
32816
32816
|
}, onKeyDown: onKeyDown, disabled: disabled }),
|
|
32817
32817
|
React.createElement(SvgMagnifyingGlass, { className: "s-absolute s-right-3 s-top-2 s-h-5 s-w-5" })),
|
|
32818
|
-
React.createElement("div", { className: "s-ml-2 s-h-4 s-text-red-500" }, showErrorLabel && error ? error : null)));
|
|
32818
|
+
React.createElement("div", { className: classNames("s-ml-2 s-h-4 s-text-red-500", showErrorLabel ? "" : "hidden") }, showErrorLabel && error ? error : null)));
|
|
32819
32819
|
}
|
|
32820
32820
|
|
|
32821
32821
|
var SvgLogoHorizontalColor = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 96 24" }, props),
|