@dust-tt/sparkle 0.2.270 → 0.2.271
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 +12 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/TextArea.d.ts +6 -3
- package/dist/esm/components/TextArea.d.ts.map +1 -1
- package/dist/esm/components/TextArea.js +16 -6
- package/dist/esm/components/TextArea.js.map +1 -1
- package/dist/esm/stories/TextArea.stories.d.ts +1 -1
- package/dist/sparkle.css +12 -34
- package/package.json +1 -1
- package/src/components/TextArea.tsx +45 -16
package/dist/cjs/index.js
CHANGED
|
@@ -142897,14 +142897,22 @@ function Tab(_a) {
|
|
|
142897
142897
|
React.createElement("nav", { className: "s-flex s-space-x-0", "aria-label": "Tabs" }, renderTabs())));
|
|
142898
142898
|
}
|
|
142899
142899
|
|
|
142900
|
+
var textAreaStyles = cn("s-flex s-w-full s-px-3 s-py-2", "s-transition s-duration-100", "s-text-sm placeholder:s-text-muted-foreground s-text-foreground", "s-ring-offset-background s-border s-border-border-dark s-bg-background s-rounded-xl", "focus-visible:s-outline-none focus-visible:s-ring-2 focus-visible:s-ring-offset-2 ", "disabled:s-cursor-not-allowed disabled:s-opacity-50 disabled:s-text-muted-foreground");
|
|
142900
142901
|
var TextArea = React.forwardRef(function (_a, ref) {
|
|
142901
|
-
var
|
|
142902
|
+
var className = _a.className, _b = _a.resize, resize = _b === void 0 ? "both" : _b, _c = _a.minRows, minRows = _c === void 0 ? 10 : _c, error = _a.error, showErrorLabel = _a.showErrorLabel, props = __rest(_a, ["className", "resize", "minRows", "error", "showErrorLabel"]);
|
|
142903
|
+
var resizeClass = {
|
|
142904
|
+
none: "s-resize-none",
|
|
142905
|
+
vertical: "s-resize-y",
|
|
142906
|
+
horizontal: "s-resize-x",
|
|
142907
|
+
both: "s-resize",
|
|
142908
|
+
};
|
|
142902
142909
|
return (React.createElement("div", { className: "s-flex s-flex-col s-gap-1 s-p-px" },
|
|
142903
|
-
React.createElement("textarea", __assign({
|
|
142904
|
-
? "s-
|
|
142905
|
-
: "s-
|
|
142910
|
+
React.createElement("textarea", __assign({ className: cn(textAreaStyles, resizeClass[resize], className, !error
|
|
142911
|
+
? cn("s-ring-structure-200 focus:s-ring-action-300", "dark:s-ring-structure-300-dark dark:focus:s-ring-action-300-dark")
|
|
142912
|
+
: cn("s-ring-warning-200 focus:s-ring-warning-300", "dark:s-ring-warning-200-dark dark:focus:s-ring-warning-300-dark")), ref: ref, rows: minRows }, props)),
|
|
142906
142913
|
error && showErrorLabel && (React.createElement("div", { className: "s-ml-2 s-text-sm s-text-warning-500" }, error))));
|
|
142907
142914
|
});
|
|
142915
|
+
TextArea.displayName = "TextArea";
|
|
142908
142916
|
|
|
142909
142917
|
function Tree(_a) {
|
|
142910
142918
|
var children = _a.children, isLoading = _a.isLoading, _b = _a.isBoxed, isBoxed = _b === void 0 ? false : _b, tailwindIconTextColor = _a.tailwindIconTextColor, _c = _a.variant, variant = _c === void 0 ? "finder" : _c;
|