@gusarov-studio/rubik-ui 3.0.0 → 3.1.1

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.
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import "./Textarea.scss";
3
+ import type { CSSUnit } from "../types/CSSUnit";
4
+ type WidthValue = CSSUnit | `${number}` | `calc(${string})` | number;
5
+ type HeightType = "autocalc" | CSSUnit | `${number}` | `calc(${string})` | number;
6
+ interface TextareaPropsBase extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
7
+ variant?: "fill" | "outline";
8
+ quiet?: boolean;
9
+ size?: "24" | "32" | "36" | "40" | "44" | "48";
10
+ placeholder?: string;
11
+ disabled?: boolean;
12
+ invalid?: boolean;
13
+ width?: WidthValue;
14
+ resize?: "none" | "vertical" | "horizontal" | "both";
15
+ minRowNum?: number;
16
+ rows: never;
17
+ }
18
+ type TextareaProps = TextareaPropsBase & {
19
+ height?: HeightType;
20
+ resize?: "none" | "vertical" | "horizontal" | "both";
21
+ } & ({
22
+ height: "autocalc";
23
+ resize?: "none";
24
+ } | {
25
+ height?: Exclude<HeightType, "autocalc">;
26
+ resize?: "vertical" | "horizontal" | "both";
27
+ });
28
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
29
+ export { Textarea, type TextareaProps };
@@ -0,0 +1,5 @@
1
+ declare const RESIZE_VERTICAL = "vertical";
2
+ declare const RESIZE_HORIZONTAL = "horizontal";
3
+ declare const RESIZE_BOTH = "both";
4
+ declare const RESIZE_NONE = "none";
5
+ export { RESIZE_VERTICAL, RESIZE_HORIZONTAL, RESIZE_BOTH, RESIZE_NONE };
@@ -0,0 +1 @@
1
+ export * from "./Textarea";
package/dist/index.d.ts CHANGED
@@ -12,5 +12,6 @@ export * from "./InputSlider";
12
12
  export * from "./Stack";
13
13
  export * from "./Tabs";
14
14
  export * from "./Text";
15
+ export * from "./Textarea";
15
16
  export * from "./ThemesProvider";
16
17
  export * from "./utils";