@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.
- package/dist/cjs/components/BarHeader.d.ts +1 -0
- package/dist/cjs/components/Chip.d.ts +1 -1
- package/dist/cjs/components/Modal.d.ts +2 -1
- package/dist/cjs/index.js +3 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/stories/BarHeader.stories.d.ts +1 -0
- package/dist/esm/components/BarHeader.d.ts +1 -0
- package/dist/esm/components/Chip.d.ts +1 -1
- package/dist/esm/components/Modal.d.ts +2 -1
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stories/BarHeader.stories.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -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/cjs/index.js
CHANGED
|
@@ -32704,7 +32704,7 @@ 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 ? "
|
|
32707
|
+
React.createElement(Button, { size: "sm", label: props.isSaving ? "Processing..." : props.saveLabel || "Save", variant: "primary", onClick: props.onSave, disabled: !props.onSave || props.isSaving })));
|
|
32708
32708
|
case "conversation":
|
|
32709
32709
|
return (React.createElement(React.Fragment, null,
|
|
32710
32710
|
React.createElement(Button, { size: "sm", label: "Delete", icon: SvgTrash$1, variant: "secondaryWarning", labelVisible: false, tooltipPosition: "below", onClick: props.onDelete }),
|
|
@@ -32975,12 +32975,13 @@ function IconToggleButton(_a) {
|
|
|
32975
32975
|
}
|
|
32976
32976
|
|
|
32977
32977
|
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;
|
|
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;
|
|
32979
32979
|
var buttonBarProps = hasChanged
|
|
32980
32980
|
? {
|
|
32981
32981
|
variant: "validate",
|
|
32982
32982
|
onCancel: onClose,
|
|
32983
32983
|
onSave: onSave,
|
|
32984
|
+
saveLabel: saveLabel,
|
|
32984
32985
|
}
|
|
32985
32986
|
: {
|
|
32986
32987
|
variant: "close",
|