@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/esm/index.js CHANGED
@@ -32684,7 +32684,9 @@ BarHeader.ButtonBar = function (props) {
32684
32684
  case "validate":
32685
32685
  return (React__default.createElement(React__default.Fragment, null,
32686
32686
  React__default.createElement(Button, { size: "sm", label: "Cancel", variant: "secondaryWarning", onClick: props.onCancel, disabled: !props.onCancel || props.isSaving }),
32687
- React__default.createElement(Button, { size: "sm", label: props.isSaving ? "Processing..." : props.saveLabel || "Save", variant: "primary", onClick: props.onSave, disabled: !props.onSave || props.isSaving })));
32687
+ React__default.createElement(Button, { size: "sm", label: props.isSaving
32688
+ ? props.savingLabel || "Processing..."
32689
+ : props.saveLabel || "Save", variant: "primary", onClick: props.onSave, disabled: !props.onSave || props.isSaving })));
32688
32690
  case "conversation":
32689
32691
  return (React__default.createElement(React__default.Fragment, null,
32690
32692
  React__default.createElement(Button, { size: "sm", label: "Delete", icon: SvgTrash$1, variant: "secondaryWarning", labelVisible: false, tooltipPosition: "below", onClick: props.onDelete }),
@@ -32955,13 +32957,15 @@ function IconToggleButton(_a) {
32955
32957
  }
32956
32958
 
32957
32959
  function Modal(_a) {
32958
- 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;
32960
+ 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;
32959
32961
  var buttonBarProps = hasChanged
32960
32962
  ? {
32961
32963
  variant: "validate",
32962
32964
  onCancel: onClose,
32963
32965
  onSave: onSave,
32964
32966
  saveLabel: saveLabel,
32967
+ isSaving: isSaving,
32968
+ savingLabel: savingLabel,
32965
32969
  }
32966
32970
  : {
32967
32971
  variant: "close",