@dust-tt/sparkle 0.2.233 → 0.2.236
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/index.js +3 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Dialog.d.ts +2 -1
- package/dist/esm/components/Dialog.d.ts.map +1 -1
- package/dist/esm/components/Dialog.js +2 -2
- package/dist/esm/components/Dialog.js.map +1 -1
- package/dist/esm/components/PaginatedCitationsGrid.d.ts +1 -1
- package/dist/esm/components/PaginatedCitationsGrid.d.ts.map +1 -1
- package/dist/esm/components/TextArea.d.ts.map +1 -1
- package/dist/esm/components/TextArea.js +1 -0
- package/dist/esm/components/TextArea.js.map +1 -1
- package/dist/esm/stories/Dialog.stories.d.ts.map +1 -1
- package/dist/esm/stories/Dialog.stories.js +6 -1
- package/dist/esm/stories/Dialog.stories.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Dialog.tsx +4 -1
- package/src/components/PaginatedCitationsGrid.tsx +1 -1
- package/src/components/TextArea.tsx +1 -0
- package/src/stories/Dialog.stories.tsx +13 -0
package/dist/cjs/index.js
CHANGED
|
@@ -103528,7 +103528,7 @@ DataTable.Caption = function Caption(_a) {
|
|
|
103528
103528
|
};
|
|
103529
103529
|
|
|
103530
103530
|
function Dialog(_a) {
|
|
103531
|
-
var isOpen = _a.isOpen, children = _a.children, onCancel = _a.onCancel, onValidate = _a.onValidate, _b = _a.cancelLabel, cancelLabel = _b === void 0 ? "Cancel" : _b, _c = _a.validateLabel, validateLabel = _c === void 0 ? "Ok" : _c, _d = _a.validateVariant, validateVariant = _d === void 0 ? "primary" : _d,
|
|
103531
|
+
var title = _a.title, isOpen = _a.isOpen, children = _a.children, disabled = _a.disabled, onCancel = _a.onCancel, onValidate = _a.onValidate, _b = _a.cancelLabel, cancelLabel = _b === void 0 ? "Cancel" : _b, _c = _a.validateLabel, validateLabel = _c === void 0 ? "Ok" : _c, _d = _a.validateVariant, validateVariant = _d === void 0 ? "primary" : _d, isSaving = _a.isSaving, _e = _a.backgroundType, backgroundType = _e === void 0 ? "none" : _e;
|
|
103532
103532
|
var referentRef = React.useRef(null);
|
|
103533
103533
|
return (React.createElement(qe, { show: isOpen, as: React.Fragment, appear: true },
|
|
103534
103534
|
React.createElement(_t, { as: "div", className: "s-relative s-z-50", onClose: onCancel },
|
|
@@ -103544,7 +103544,7 @@ function Dialog(_a) {
|
|
|
103544
103544
|
React.createElement(Button.List, null,
|
|
103545
103545
|
!isSaving && (React.createElement(React.Fragment, null,
|
|
103546
103546
|
React.createElement(Button, { label: cancelLabel, variant: "tertiary", onClick: onCancel }),
|
|
103547
|
-
React.createElement(Button, { label: validateLabel, variant: validateVariant, onClick: onValidate }))),
|
|
103547
|
+
React.createElement(Button, { disabled: disabled, label: validateLabel, variant: validateVariant, onClick: onValidate }))),
|
|
103548
103548
|
isSaving && React.createElement(Spinner, { variant: "color" }))),
|
|
103549
103549
|
backgroundType !== "none" && (React.createElement("div", { className: "s-absolute s-bottom-0 s-left-0 s-right-0 s-top-0 s-z-0" },
|
|
103550
103550
|
React.createElement(ConfettiBackground, { variant: backgroundType, referentSize: referentRef }))))))))));
|
|
@@ -129115,6 +129115,7 @@ function TextArea(_a) {
|
|
|
129115
129115
|
React.useEffect(function () {
|
|
129116
129116
|
var textarea = textareaRef.current;
|
|
129117
129117
|
if (textarea) {
|
|
129118
|
+
textarea.style.height = 'auto'; // Reset height
|
|
129118
129119
|
textarea.style.height = "".concat(textarea.scrollHeight, "px"); // Set to scroll height
|
|
129119
129120
|
}
|
|
129120
129121
|
}, [value]); // Re-run when value changes
|