@dust-tt/sparkle 0.2.231 → 0.2.233-rc
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 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Button.js +1 -1
- package/dist/esm/components/Button.js.map +1 -1
- package/dist/esm/components/TextArea.d.ts +2 -1
- package/dist/esm/components/TextArea.d.ts.map +1 -1
- package/dist/esm/components/TextArea.js +2 -2
- package/dist/esm/components/TextArea.js.map +1 -1
- package/dist/esm/stories/Button.stories.d.ts.map +1 -1
- package/dist/esm/stories/Button.stories.js +8 -1
- package/dist/esm/stories/Button.stories.js.map +1 -1
- package/dist/esm/stories/TextArea.stories.d.ts.map +1 -1
- package/dist/esm/stories/TextArea.stories.js +1 -1
- package/dist/esm/stories/TextArea.stories.js.map +1 -1
- package/dist/sparkle.css +8 -4
- package/package.json +1 -1
- package/src/components/Button.tsx +1 -1
- package/src/components/TextArea.tsx +4 -1
- package/src/stories/Button.stories.tsx +27 -0
- package/src/stories/TextArea.stories.tsx +1 -0
package/dist/cjs/index.js
CHANGED
|
@@ -40533,7 +40533,7 @@ var variantClasses$2 = {
|
|
|
40533
40533
|
},
|
|
40534
40534
|
};
|
|
40535
40535
|
var transitionClasses = "s-transition-all s-ease-out s-duration-200 s-cursor-pointer";
|
|
40536
|
-
var magnifyingClasses = "hover:s-scale-105 hover:s-drop-shadow-md active:s-scale-100 active:s-drop-shadow-none";
|
|
40536
|
+
var magnifyingClasses = "hover:s-scale-105 hover:s-drop-shadow-md active:s-scale-100 active:s-drop-shadow-none s-m-1";
|
|
40537
40537
|
function Button(_a) {
|
|
40538
40538
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
40539
40539
|
var _o = _a.variant, variant = _o === void 0 ? "primary" : _o, _p = _a.type, type = _p === void 0 ? "button" : _p, _q = _a.size, size = _q === void 0 ? "sm" : _q, onClick = _a.onClick, _r = _a.disabled, disabled = _r === void 0 ? false : _r, _s = _a.labelVisible, labelVisible = _s === void 0 ? true : _s, label = _a.label, icon = _a.icon, _t = _a.className, className = _t === void 0 ? "" : _t, _u = _a.tooltipPosition, tooltipPosition = _u === void 0 ? "above" : _u, _v = _a.hasMagnifying, hasMagnifying = _v === void 0 ? true : _v, _w = _a.disabledTooltip, disabledTooltip = _w === void 0 ? false : _w, avatar = _a.avatar;
|
|
@@ -129110,7 +129110,7 @@ function Tab(_a) {
|
|
|
129110
129110
|
}
|
|
129111
129111
|
|
|
129112
129112
|
function TextArea(_a) {
|
|
129113
|
-
var placeholder = _a.placeholder, value = _a.value, onChange = _a.onChange, error = _a.error, _b = _a.showErrorLabel, showErrorLabel = _b === void 0 ? false : _b, className = _a.className;
|
|
129113
|
+
var placeholder = _a.placeholder, value = _a.value, onChange = _a.onChange, error = _a.error, _b = _a.showErrorLabel, showErrorLabel = _b === void 0 ? false : _b, className = _a.className, _c = _a.rows, rows = _c === void 0 ? 10 : _c;
|
|
129114
129114
|
var textareaRef = React.useRef(null);
|
|
129115
129115
|
React.useEffect(function () {
|
|
129116
129116
|
var textarea = textareaRef.current;
|
|
@@ -129119,7 +129119,7 @@ function TextArea(_a) {
|
|
|
129119
129119
|
}
|
|
129120
129120
|
}, [value]); // Re-run when value changes
|
|
129121
129121
|
return (React.createElement("div", { className: "s-flex s-flex-col s-gap-1 s-p-px" },
|
|
129122
|
-
React.createElement("textarea", { ref: textareaRef, className: classNames("overflow-y-auto s-block s-
|
|
129122
|
+
React.createElement("textarea", { rows: rows, ref: textareaRef, className: classNames("overflow-y-auto s-block s-w-full s-min-w-0 s-rounded-xl s-text-sm s-placeholder-element-700 s-transition-all s-duration-200 s-scrollbar-hide", !error
|
|
129123
129123
|
? "s-border-structure-100 focus:s-border-action-300 focus:s-ring-action-300"
|
|
129124
129124
|
: "s-border-red-500 focus:s-border-red-500 focus:s-ring-red-500", "s-border-structure-200 s-bg-structure-50", "s-resize-y", className !== null && className !== void 0 ? className : ""), placeholder: placeholder, value: value !== null && value !== void 0 ? value : "", onChange: function (e) {
|
|
129125
129125
|
var newValue = e.target.value;
|