@nucleux/select 0.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.
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/select
2
+
3
+ Accessible native-backed select with a chevron — 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/select @nucleux/tokens
11
+ ```
12
+
13
+ `react` / `react-dom` are peer dependencies.
14
+
15
+ ## Usage
16
+
17
+ ```tsx
18
+ import { Select } from "@nucleux/select";
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,51 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React = require('react');
5
+ var lucideReact = require('lucide-react');
6
+ var utils = require('@nucleux/utils');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n.default = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
+
29
+ // src/index.tsx
30
+ var Select = React__namespace.forwardRef(
31
+ ({ className, containerClassName, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils.cn("relative inline-flex w-full", containerClassName), children: [
32
+ /* @__PURE__ */ jsxRuntime.jsx(
33
+ "select",
34
+ {
35
+ ref,
36
+ className: utils.cn(
37
+ "h-9 w-full appearance-none rounded-lg border border-input bg-background pl-3 pr-8 text-sm text-foreground shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
38
+ className
39
+ ),
40
+ ...props,
41
+ children
42
+ }
43
+ ),
44
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "pointer-events-none absolute right-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" })
45
+ ] })
46
+ );
47
+ Select.displayName = "Select";
48
+
49
+ exports.Select = Select;
50
+ //# sourceMappingURL=index.cjs.map
51
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.tsx"],"names":["React","cn","jsx","ChevronDown"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcO,IAAM,MAAA,GAAeA,gBAAA,CAAA,UAAA;AAAA,EAC1B,CAAC,EAAE,SAAA,EAAW,kBAAA,EAAoB,UAAU,GAAG,KAAA,EAAM,EAAG,GAAA,qCACrD,KAAA,EAAA,EAAI,SAAA,EAAWC,QAAA,CAAG,6BAAA,EAA+B,kBAAkB,CAAA,EAClE,QAAA,EAAA;AAAA,oBAAAC,cAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAWD,QAAA;AAAA,UACT,+PAAA;AAAA,UACA;AAAA,SACF;AAAA,QACC,GAAG,KAAA;AAAA,QAEH;AAAA;AAAA,KACH;AAAA,oBACAC,cAAA,CAACC,uBAAA,EAAA,EAAY,SAAA,EAAU,4FAAA,EAA6F;AAAA,GAAA,EACtH;AAEJ;AACA,MAAA,CAAO,WAAA,GAAc,QAAA","file":"index.cjs","sourcesContent":["import * as React from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport { cn } from \"@nucleux/utils\";\n\nexport interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {\n /** Wrapper className (the chevron is positioned within it). */\n containerClassName?: string;\n}\n\n/**\n * An accessible select built on the native `<select>` element (full keyboard +\n * screen-reader support), styled to match the design system with a chevron.\n * Pass `<option>`s as children.\n */\nexport const Select = React.forwardRef<HTMLSelectElement, SelectProps>(\n ({ className, containerClassName, children, ...props }, ref) => (\n <div className={cn(\"relative inline-flex w-full\", containerClassName)}>\n <select\n ref={ref}\n className={cn(\n \"h-9 w-full appearance-none rounded-lg border border-input bg-background pl-3 pr-8 text-sm text-foreground shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n {children}\n </select>\n <ChevronDown className=\"pointer-events-none absolute right-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground\" />\n </div>\n ),\n);\nSelect.displayName = \"Select\";\n"]}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+
3
+ interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
4
+ /** Wrapper className (the chevron is positioned within it). */
5
+ containerClassName?: string;
6
+ }
7
+ /**
8
+ * An accessible select built on the native `<select>` element (full keyboard +
9
+ * screen-reader support), styled to match the design system with a chevron.
10
+ * Pass `<option>`s as children.
11
+ */
12
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
13
+
14
+ export { Select, type SelectProps };
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+
3
+ interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
4
+ /** Wrapper className (the chevron is positioned within it). */
5
+ containerClassName?: string;
6
+ }
7
+ /**
8
+ * An accessible select built on the native `<select>` element (full keyboard +
9
+ * screen-reader support), styled to match the design system with a chevron.
10
+ * Pass `<option>`s as children.
11
+ */
12
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
13
+
14
+ export { Select, type SelectProps };
package/dist/index.js ADDED
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ import { ChevronDown } from 'lucide-react';
4
+ import { cn } from '@nucleux/utils';
5
+ import { jsxs, jsx } from 'react/jsx-runtime';
6
+
7
+ // src/index.tsx
8
+ var Select = React.forwardRef(
9
+ ({ className, containerClassName, children, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: cn("relative inline-flex w-full", containerClassName), children: [
10
+ /* @__PURE__ */ jsx(
11
+ "select",
12
+ {
13
+ ref,
14
+ className: cn(
15
+ "h-9 w-full appearance-none rounded-lg border border-input bg-background pl-3 pr-8 text-sm text-foreground shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
16
+ className
17
+ ),
18
+ ...props,
19
+ children
20
+ }
21
+ ),
22
+ /* @__PURE__ */ jsx(ChevronDown, { className: "pointer-events-none absolute right-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" })
23
+ ] })
24
+ );
25
+ Select.displayName = "Select";
26
+
27
+ export { Select };
28
+ //# sourceMappingURL=index.js.map
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;AAcO,IAAM,MAAA,GAAe,KAAA,CAAA,UAAA;AAAA,EAC1B,CAAC,EAAE,SAAA,EAAW,kBAAA,EAAoB,UAAU,GAAG,KAAA,EAAM,EAAG,GAAA,0BACrD,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,6BAAA,EAA+B,kBAAkB,CAAA,EAClE,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACT,+PAAA;AAAA,UACA;AAAA,SACF;AAAA,QACC,GAAG,KAAA;AAAA,QAEH;AAAA;AAAA,KACH;AAAA,oBACA,GAAA,CAAC,WAAA,EAAA,EAAY,SAAA,EAAU,4FAAA,EAA6F;AAAA,GAAA,EACtH;AAEJ;AACA,MAAA,CAAO,WAAA,GAAc,QAAA","file":"index.js","sourcesContent":["import * as React from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport { cn } from \"@nucleux/utils\";\n\nexport interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {\n /** Wrapper className (the chevron is positioned within it). */\n containerClassName?: string;\n}\n\n/**\n * An accessible select built on the native `<select>` element (full keyboard +\n * screen-reader support), styled to match the design system with a chevron.\n * Pass `<option>`s as children.\n */\nexport const Select = React.forwardRef<HTMLSelectElement, SelectProps>(\n ({ className, containerClassName, children, ...props }, ref) => (\n <div className={cn(\"relative inline-flex w-full\", containerClassName)}>\n <select\n ref={ref}\n className={cn(\n \"h-9 w-full appearance-none rounded-lg border border-input bg-background pl-3 pr-8 text-sm text-foreground shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n {children}\n </select>\n <ChevronDown className=\"pointer-events-none absolute right-2 top-1/2 size-4 -translate-y-1/2 text-muted-foreground\" />\n </div>\n ),\n);\nSelect.displayName = \"Select\";\n"]}
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@nucleux/select",
3
+ "version": "0.1.1",
4
+ "type": "module",
5
+ "sideEffects": false,
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "README.md"
19
+ ],
20
+ "peerDependencies": {
21
+ "react": ">=18",
22
+ "react-dom": ">=18"
23
+ },
24
+ "dependencies": {
25
+ "lucide-react": "^0.469.0",
26
+ "@nucleux/utils": "0.1.1"
27
+ },
28
+ "devDependencies": {
29
+ "tsup": "^8.3.5",
30
+ "typescript": "^5.7.2",
31
+ "@types/react": "^18.3.18",
32
+ "react": "^18.3.1"
33
+ },
34
+ "publishConfig": {
35
+ "access": "public"
36
+ },
37
+ "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/intelligaia-open-labs/nucleux.git",
41
+ "directory": "packages/select"
42
+ },
43
+ "homepage": "https://github.com/intelligaia-open-labs/nucleux#readme",
44
+ "description": "Accessible native-backed select with a chevron — Nucleux agentic UI for React.",
45
+ "keywords": [
46
+ "nucleux",
47
+ "react",
48
+ "ui",
49
+ "components",
50
+ "agentic",
51
+ "ai",
52
+ "tailwind",
53
+ "select"
54
+ ],
55
+ "scripts": {
56
+ "build": "tsup"
57
+ }
58
+ }