@dust-tt/sparkle 0.2.20 → 0.2.21

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.
@@ -23,6 +23,7 @@ type BarHeaderButtonBarValidateProps = {
23
23
  onSave?: () => void;
24
24
  saveLabel?: string;
25
25
  isSaving?: boolean;
26
+ savingLabel?: string;
26
27
  };
27
28
  type BarHeaderButtonBarConversationProps = {
28
29
  variant: "conversation";
@@ -7,9 +7,11 @@ interface ModalProps {
7
7
  children: React.ReactNode;
8
8
  hasChanged: boolean;
9
9
  onSave?: () => void;
10
+ saveLabel?: string;
11
+ isSaving?: boolean;
12
+ savingLabel?: string;
10
13
  title?: string;
11
14
  type?: "full-screen" | "right-side" | "default";
12
- saveLabel?: string;
13
15
  }
14
- export declare function Modal({ isOpen, onClose, action, children, hasChanged, onSave, title, type, saveLabel, }: ModalProps): React.JSX.Element;
16
+ export declare function Modal({ isOpen, onClose, action, children, hasChanged, onSave, saveLabel, isSaving, savingLabel, title, type, }: ModalProps): React.JSX.Element;
15
17
  export {};
package/dist/cjs/index.js CHANGED
@@ -32704,7 +32704,9 @@ BarHeader.ButtonBar = function (props) {
32704
32704
  case "validate":
32705
32705
  return (React.createElement(React.Fragment, null,
32706
32706
  React.createElement(Button, { size: "sm", label: "Cancel", variant: "secondaryWarning", onClick: props.onCancel, disabled: !props.onCancel || props.isSaving }),
32707
- React.createElement(Button, { size: "sm", label: props.isSaving ? "Processing..." : props.saveLabel || "Save", variant: "primary", onClick: props.onSave, disabled: !props.onSave || props.isSaving })));
32707
+ React.createElement(Button, { size: "sm", label: props.isSaving
32708
+ ? props.savingLabel || "Processing..."
32709
+ : props.saveLabel || "Save", variant: "primary", onClick: props.onSave, disabled: !props.onSave || props.isSaving })));
32708
32710
  case "conversation":
32709
32711
  return (React.createElement(React.Fragment, null,
32710
32712
  React.createElement(Button, { size: "sm", label: "Delete", icon: SvgTrash$1, variant: "secondaryWarning", labelVisible: false, tooltipPosition: "below", onClick: props.onDelete }),
@@ -32975,13 +32977,15 @@ function IconToggleButton(_a) {
32975
32977
  }
32976
32978
 
32977
32979
  function Modal(_a) {
32978
- var isOpen = _a.isOpen, onClose = _a.onClose, action = _a.action, children = _a.children, hasChanged = _a.hasChanged, onSave = _a.onSave, title = _a.title, _b = _a.type, type = _b === void 0 ? "default" : _b, _c = _a.saveLabel, saveLabel = _c === void 0 ? "Save" : _c;
32980
+ var isOpen = _a.isOpen, onClose = _a.onClose, action = _a.action, children = _a.children, hasChanged = _a.hasChanged, onSave = _a.onSave, _b = _a.saveLabel, saveLabel = _b === void 0 ? "Save" : _b, isSaving = _a.isSaving, savingLabel = _a.savingLabel, title = _a.title, _c = _a.type, type = _c === void 0 ? "default" : _c;
32979
32981
  var buttonBarProps = hasChanged
32980
32982
  ? {
32981
32983
  variant: "validate",
32982
32984
  onCancel: onClose,
32983
32985
  onSave: onSave,
32984
32986
  saveLabel: saveLabel,
32987
+ isSaving: isSaving,
32988
+ savingLabel: savingLabel,
32985
32989
  }
32986
32990
  : {
32987
32991
  variant: "close",