@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/esm/index.js CHANGED
@@ -32749,7 +32749,7 @@ function IconToggleButton(_a) {
32749
32749
  }
32750
32750
 
32751
32751
  function Modal(_a) {
32752
- 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;
32752
+ 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;
32753
32753
  var buttonBarProps = hasChanged
32754
32754
  ? {
32755
32755
  variant: "validate",
@@ -32770,7 +32770,7 @@ function Modal(_a) {
32770
32770
  React__default.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
32771
32771
  ? "s-m-0 s-h-full s-max-h-full s-w-full s-max-w-full"
32772
32772
  : "s-max-w-2xl s-rounded-lg s-shadow-xl lg:s-w-1/2") },
32773
- React__default.createElement(BarHeader, { title: title || "", rightActions: React__default.createElement(BarHeader.ButtonBar, __assign({}, buttonBarProps)) }),
32773
+ React__default.createElement(BarHeader, { title: title || "", leftActions: action ? React__default.createElement(Button, __assign({}, action)) : undefined, rightActions: React__default.createElement(BarHeader.ButtonBar, __assign({}, buttonBarProps)) }),
32774
32774
  React__default.createElement("div", { className: "s-pb-6 s-pt-14 ".concat(isFullScreen ? "s-h-full s-overflow-y-auto" : "") }, children))))))));
32775
32775
  }
32776
32776
 
@@ -32795,7 +32795,7 @@ function Searchbar(_a) {
32795
32795
  onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value);
32796
32796
  }, onKeyDown: onKeyDown, disabled: disabled }),
32797
32797
  React__default.createElement(SvgMagnifyingGlass, { className: "s-absolute s-right-3 s-top-2 s-h-5 s-w-5" })),
32798
- React__default.createElement("div", { className: "s-ml-2 s-h-4 s-text-red-500" }, showErrorLabel && error ? error : null)));
32798
+ React__default.createElement("div", { className: classNames("s-ml-2 s-h-4 s-text-red-500", showErrorLabel ? "" : "hidden") }, showErrorLabel && error ? error : null)));
32799
32799
  }
32800
32800
 
32801
32801
  var SvgLogoHorizontalColor = function (props) { return (React.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 96 24" }, props),