@nucleux/textarea 0.2.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nucleux
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,26 @@
1
+ # @nucleux/textarea
2
+
3
+ Multi-line text input — Nucleux agentic UI for React.
4
+
5
+ Part of **[Nucleux](https://github.com/intelligaia-open-labs/nucleux)** — agentic UI components for React. Install a single component, or the full kit via [`@nucleux/react`](https://www.npmjs.com/package/@nucleux/react).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pnpm add @nucleux/textarea @nucleux/tokens
11
+ ```
12
+
13
+ `react` / `react-dom` are peer dependencies.
14
+
15
+ ## Usage
16
+
17
+ ```tsx
18
+ import { Textarea } from "@nucleux/textarea";
19
+ ```
20
+
21
+ Requires the theme once in your app: `import "@nucleux/tokens/styles.css";`
22
+ and the Tailwind preset from `@nucleux/tokens/preset`.
23
+
24
+ ## License
25
+
26
+ MIT © Nucleux
package/dist/index.cjs ADDED
@@ -0,0 +1,52 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React = require('react');
5
+ var utils = require('@nucleux/utils');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ // src/index.tsx
29
+ var Textarea = React__namespace.forwardRef(
30
+ ({ className, invalid = false, "aria-invalid": ariaInvalid, rows = 3, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
31
+ "textarea",
32
+ {
33
+ ref,
34
+ rows,
35
+ "aria-invalid": ariaInvalid ?? (invalid || void 0),
36
+ className: utils.cn(
37
+ "flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-sm transition-colors",
38
+ "placeholder:text-muted-foreground",
39
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
40
+ "disabled:cursor-not-allowed disabled:opacity-50",
41
+ invalid && "border-destructive focus-visible:ring-destructive",
42
+ className
43
+ ),
44
+ ...props
45
+ }
46
+ )
47
+ );
48
+ Textarea.displayName = "Textarea";
49
+
50
+ exports.Textarea = Textarea;
51
+ //# sourceMappingURL=index.cjs.map
52
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.tsx"],"names":["React","jsx","cn"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AASO,IAAM,QAAA,GAAiBA,gBAAA,CAAA,UAAA;AAAA,EAC5B,CAAC,EAAE,SAAA,EAAW,OAAA,GAAU,KAAA,EAAO,cAAA,EAAgB,WAAA,EAAa,IAAA,GAAO,CAAA,EAAG,GAAG,KAAA,EAAM,EAAG,GAAA,qBAChFC,cAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA;AAAA,MACA,cAAA,EAAc,gBAAgB,OAAA,IAAW,MAAA,CAAA;AAAA,MACzC,SAAA,EAAWC,QAAA;AAAA,QACT,qIAAA;AAAA,QACA,mCAAA;AAAA,QACA,0IAAA;AAAA,QACA,iDAAA;AAAA,QACA,OAAA,IAAW,mDAAA;AAAA,QACX;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA;AAGV;AACA,QAAA,CAAS,WAAA,GAAc,UAAA","file":"index.cjs","sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@nucleux/utils\";\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Render an error ring and set `aria-invalid`. */\n invalid?: boolean;\n}\n\n/** A multi-line text input, tokenized and themeable. */\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, invalid = false, \"aria-invalid\": ariaInvalid, rows = 3, ...props }, ref) => (\n <textarea\n ref={ref}\n rows={rows}\n aria-invalid={ariaInvalid ?? (invalid || undefined)}\n className={cn(\n \"flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-sm transition-colors\",\n \"placeholder:text-muted-foreground\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n invalid && \"border-destructive focus-visible:ring-destructive\",\n className,\n )}\n {...props}\n />\n ),\n);\nTextarea.displayName = \"Textarea\";\n"]}
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+
3
+ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
4
+ /** Render an error ring and set `aria-invalid`. */
5
+ invalid?: boolean;
6
+ }
7
+ /** A multi-line text input, tokenized and themeable. */
8
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
9
+
10
+ export { Textarea, type TextareaProps };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+
3
+ interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
4
+ /** Render an error ring and set `aria-invalid`. */
5
+ invalid?: boolean;
6
+ }
7
+ /** A multi-line text input, tokenized and themeable. */
8
+ declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
9
+
10
+ export { Textarea, type TextareaProps };
package/dist/index.js ADDED
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ import { cn } from '@nucleux/utils';
4
+ import { jsx } from 'react/jsx-runtime';
5
+
6
+ // src/index.tsx
7
+ var Textarea = React.forwardRef(
8
+ ({ className, invalid = false, "aria-invalid": ariaInvalid, rows = 3, ...props }, ref) => /* @__PURE__ */ jsx(
9
+ "textarea",
10
+ {
11
+ ref,
12
+ rows,
13
+ "aria-invalid": ariaInvalid ?? (invalid || void 0),
14
+ className: cn(
15
+ "flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-sm transition-colors",
16
+ "placeholder:text-muted-foreground",
17
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
18
+ "disabled:cursor-not-allowed disabled:opacity-50",
19
+ invalid && "border-destructive focus-visible:ring-destructive",
20
+ className
21
+ ),
22
+ ...props
23
+ }
24
+ )
25
+ );
26
+ Textarea.displayName = "Textarea";
27
+
28
+ export { Textarea };
29
+ //# sourceMappingURL=index.js.map
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.tsx"],"names":[],"mappings":";;;;;AASO,IAAM,QAAA,GAAiB,KAAA,CAAA,UAAA;AAAA,EAC5B,CAAC,EAAE,SAAA,EAAW,OAAA,GAAU,KAAA,EAAO,cAAA,EAAgB,WAAA,EAAa,IAAA,GAAO,CAAA,EAAG,GAAG,KAAA,EAAM,EAAG,GAAA,qBAChF,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,IAAA;AAAA,MACA,cAAA,EAAc,gBAAgB,OAAA,IAAW,MAAA,CAAA;AAAA,MACzC,SAAA,EAAW,EAAA;AAAA,QACT,qIAAA;AAAA,QACA,mCAAA;AAAA,QACA,0IAAA;AAAA,QACA,iDAAA;AAAA,QACA,OAAA,IAAW,mDAAA;AAAA,QACX;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA;AAGV;AACA,QAAA,CAAS,WAAA,GAAc,UAAA","file":"index.js","sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@nucleux/utils\";\n\nexport interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Render an error ring and set `aria-invalid`. */\n invalid?: boolean;\n}\n\n/** A multi-line text input, tokenized and themeable. */\nexport const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, invalid = false, \"aria-invalid\": ariaInvalid, rows = 3, ...props }, ref) => (\n <textarea\n ref={ref}\n rows={rows}\n aria-invalid={ariaInvalid ?? (invalid || undefined)}\n className={cn(\n \"flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground shadow-sm transition-colors\",\n \"placeholder:text-muted-foreground\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n invalid && \"border-destructive focus-visible:ring-destructive\",\n className,\n )}\n {...props}\n />\n ),\n);\nTextarea.displayName = \"Textarea\";\n"]}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@nucleux/textarea",
3
+ "version": "0.2.0",
4
+ "type": "module",
5
+ "sideEffects": false,
6
+ "description": "Multi-line text input — Nucleux agentic UI for React.",
7
+ "keywords": [
8
+ "nucleux",
9
+ "react",
10
+ "ui",
11
+ "components",
12
+ "agentic",
13
+ "ai",
14
+ "tailwind",
15
+ "textarea"
16
+ ],
17
+ "main": "./dist/index.cjs",
18
+ "module": "./dist/index.js",
19
+ "types": "./dist/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "import": "./dist/index.js",
24
+ "require": "./dist/index.cjs"
25
+ }
26
+ },
27
+ "files": [
28
+ "dist",
29
+ "README.md"
30
+ ],
31
+ "peerDependencies": {
32
+ "react": ">=18",
33
+ "react-dom": ">=18"
34
+ },
35
+ "dependencies": {
36
+ "@nucleux/utils": "0.2.0"
37
+ },
38
+ "devDependencies": {
39
+ "tsup": "^8.3.5",
40
+ "typescript": "^5.7.2",
41
+ "@types/react": "^18.3.18",
42
+ "react": "^18.3.1",
43
+ "lucide-react": "^0.469.0"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "license": "MIT",
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/intelligaia-open-labs/nucleux.git",
52
+ "directory": "packages/textarea"
53
+ },
54
+ "homepage": "https://github.com/intelligaia-open-labs/nucleux#readme",
55
+ "scripts": {
56
+ "build": "tsup"
57
+ }
58
+ }