@dust-tt/sparkle 0.2.17 → 0.2.19

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.
@@ -9,6 +9,7 @@ export default meta;
9
9
  type Story = StoryObj<typeof meta>;
10
10
  export declare const BasicBarHeader: Story;
11
11
  export declare const BasicBarHeaderValidate: () => React.JSX.Element;
12
+ export declare const BasicBarHeaderValidateCustomLabel: () => React.JSX.Element;
12
13
  export declare const BasicBarHeaderValidateSaveDisabled: () => React.JSX.Element;
13
14
  export declare const BasicBarHeaderBack: () => React.JSX.Element;
14
15
  export declare const BasicBarHeaderClose: () => React.JSX.Element;
@@ -21,6 +21,7 @@ type BarHeaderButtonBarValidateProps = {
21
21
  variant: "validate";
22
22
  onCancel?: () => void;
23
23
  onSave?: () => void;
24
+ saveLabel?: string;
24
25
  isSaving?: boolean;
25
26
  };
26
27
  type BarHeaderButtonBarConversationProps = {
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from "react";
2
2
  type ChipProps = {
3
3
  size?: "xs" | "sm";
4
- color?: "emerald" | "amber" | "slate" | "violet" | "warning" | "sky" | "pink" | "indigo" | "action";
4
+ color?: "emerald" | "amber" | "slate" | "violet" | "warning" | "sky" | "pink" | "indigo" | "action" | "red";
5
5
  label?: string;
6
6
  children?: ReactNode;
7
7
  className?: string;
@@ -9,6 +9,7 @@ interface ModalProps {
9
9
  onSave?: () => void;
10
10
  title?: string;
11
11
  type?: "full-screen" | "right-side" | "default";
12
+ saveLabel?: string;
12
13
  }
13
- export declare function Modal({ isOpen, onClose, action, children, hasChanged, onSave, title, type, }: ModalProps): React.JSX.Element;
14
+ export declare function Modal({ isOpen, onClose, action, children, hasChanged, onSave, title, type, saveLabel, }: ModalProps): React.JSX.Element;
14
15
  export {};
package/dist/esm/index.js CHANGED
@@ -32684,7 +32684,7 @@ 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 ? "Saving" : "Save", variant: "primary", onClick: props.onSave, disabled: !props.onSave || 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 })));
32688
32688
  case "conversation":
32689
32689
  return (React__default.createElement(React__default.Fragment, null,
32690
32690
  React__default.createElement(Button, { size: "sm", label: "Delete", icon: SvgTrash$1, variant: "secondaryWarning", labelVisible: false, tooltipPosition: "below", onClick: props.onDelete }),
@@ -32955,12 +32955,13 @@ function IconToggleButton(_a) {
32955
32955
  }
32956
32956
 
32957
32957
  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;
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;
32959
32959
  var buttonBarProps = hasChanged
32960
32960
  ? {
32961
32961
  variant: "validate",
32962
32962
  onCancel: onClose,
32963
32963
  onSave: onSave,
32964
+ saveLabel: saveLabel,
32964
32965
  }
32965
32966
  : {
32966
32967
  variant: "close",