@nucleux/md3-switch 0.3.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 +21 -0
- package/README.md +26 -0
- package/dist/index.cjs +77 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/package.json +58 -0
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/md3-switch
|
|
2
|
+
|
|
3
|
+
Material 3 switch — 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/md3-switch @nucleux/tokens
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`react` / `react-dom` are peer dependencies.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { Md3Switch } from "@nucleux/md3-switch";
|
|
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,77 @@
|
|
|
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 Md3Switch = React__namespace.forwardRef(
|
|
31
|
+
({ checked, defaultChecked = false, onCheckedChange, showIcon = true, disabled, className, onClick, ...props }, ref) => {
|
|
32
|
+
const isControlled = checked !== void 0;
|
|
33
|
+
const [internal, setInternal] = React__namespace.useState(defaultChecked);
|
|
34
|
+
const on = isControlled ? checked : internal;
|
|
35
|
+
const toggle = (e) => {
|
|
36
|
+
onClick?.(e);
|
|
37
|
+
if (e.defaultPrevented || disabled) return;
|
|
38
|
+
const next = !on;
|
|
39
|
+
if (!isControlled) setInternal(next);
|
|
40
|
+
onCheckedChange?.(next);
|
|
41
|
+
};
|
|
42
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
ref,
|
|
46
|
+
type: "button",
|
|
47
|
+
role: "switch",
|
|
48
|
+
"aria-checked": on,
|
|
49
|
+
disabled,
|
|
50
|
+
onClick: toggle,
|
|
51
|
+
className: utils.cn(
|
|
52
|
+
"relative inline-flex h-8 w-[52px] shrink-0 items-center rounded-full border-2 transition-colors outline-none",
|
|
53
|
+
"focus-visible:ring-2 focus-visible:ring-md-primary focus-visible:ring-offset-2 focus-visible:ring-offset-md-surface",
|
|
54
|
+
"disabled:pointer-events-none disabled:opacity-[0.38]",
|
|
55
|
+
on ? "border-md-primary bg-md-primary" : "border-md-outline bg-md-surface-container-high",
|
|
56
|
+
className
|
|
57
|
+
),
|
|
58
|
+
...props,
|
|
59
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
"span",
|
|
61
|
+
{
|
|
62
|
+
className: utils.cn(
|
|
63
|
+
"pointer-events-none flex items-center justify-center rounded-full transition-all",
|
|
64
|
+
on ? "translate-x-[22px] h-6 w-6 bg-md-on-primary text-md-on-primary-container" : "translate-x-1 h-4 w-4 bg-md-outline text-transparent"
|
|
65
|
+
),
|
|
66
|
+
children: showIcon && on && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { "aria-hidden": true, className: "h-4 w-4" })
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
Md3Switch.displayName = "Md3Switch";
|
|
74
|
+
|
|
75
|
+
exports.Md3Switch = Md3Switch;
|
|
76
|
+
//# sourceMappingURL=index.cjs.map
|
|
77
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx"],"names":["React","jsx","cn","Check"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcO,IAAM,SAAA,GAAkBA,gBAAA,CAAA,UAAA;AAAA,EAC7B,CAAC,EAAE,OAAA,EAAS,cAAA,GAAiB,OAAO,eAAA,EAAiB,QAAA,GAAW,IAAA,EAAM,QAAA,EAAU,SAAA,EAAW,OAAA,EAAS,GAAG,KAAA,IAAS,GAAA,KAAQ;AACtH,IAAA,MAAM,eAAe,OAAA,KAAY,MAAA;AACjC,IAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAUA,0BAAS,cAAc,CAAA;AAC7D,IAAA,MAAM,EAAA,GAAK,eAAe,OAAA,GAAU,QAAA;AAEpC,IAAA,MAAM,MAAA,GAAS,CAAC,CAAA,KAA2C;AACzD,MAAA,OAAA,GAAU,CAAC,CAAA;AACX,MAAA,IAAI,CAAA,CAAE,oBAAoB,QAAA,EAAU;AACpC,MAAA,MAAM,OAAO,CAAC,EAAA;AACd,MAAA,IAAI,CAAC,YAAA,EAAc,WAAA,CAAY,IAAI,CAAA;AACnC,MAAA,eAAA,GAAkB,IAAI,CAAA;AAAA,IACxB,CAAA;AAEA,IAAA,uBACEC,cAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,IAAA,EAAK,QAAA;AAAA,QACL,IAAA,EAAK,QAAA;AAAA,QACL,cAAA,EAAc,EAAA;AAAA,QACd,QAAA;AAAA,QACA,OAAA,EAAS,MAAA;AAAA,QACT,SAAA,EAAWC,QAAA;AAAA,UACT,8GAAA;AAAA,UACA,qHAAA;AAAA,UACA,sDAAA;AAAA,UACA,KAAK,iCAAA,GAAoC,gDAAA;AAAA,UACzC;AAAA,SACF;AAAA,QACC,GAAG,KAAA;AAAA,QAEJ,QAAA,kBAAAD,cAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAWC,QAAA;AAAA,cACT,kFAAA;AAAA,cACA,KACI,0EAAA,GACA;AAAA,aACN;AAAA,YAEC,sBAAY,EAAA,oBAAMD,cAAA,CAACE,qBAAM,aAAA,EAAW,IAAA,EAAC,WAAU,SAAA,EAAU;AAAA;AAAA;AAC5D;AAAA,KACF;AAAA,EAEJ;AACF;AACA,SAAA,CAAU,WAAA,GAAc,WAAA","file":"index.cjs","sourcesContent":["import * as React from \"react\";\nimport { Check } from \"lucide-react\";\nimport { cn } from \"@nucleux/utils\";\n\nexport interface Md3SwitchProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"onChange\"> {\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n /** Show a check icon in the handle when on (Material 3 default behaviour). */\n showIcon?: boolean;\n}\n\n/** A Material Design 3 switch with a growing handle and optional check icon. */\nexport const Md3Switch = React.forwardRef<HTMLButtonElement, Md3SwitchProps>(\n ({ checked, defaultChecked = false, onCheckedChange, showIcon = true, disabled, className, onClick, ...props }, ref) => {\n const isControlled = checked !== undefined;\n const [internal, setInternal] = React.useState(defaultChecked);\n const on = isControlled ? checked : internal;\n\n const toggle = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n if (e.defaultPrevented || disabled) return;\n const next = !on;\n if (!isControlled) setInternal(next);\n onCheckedChange?.(next);\n };\n\n return (\n <button\n ref={ref}\n type=\"button\"\n role=\"switch\"\n aria-checked={on}\n disabled={disabled}\n onClick={toggle}\n className={cn(\n \"relative inline-flex h-8 w-[52px] shrink-0 items-center rounded-full border-2 transition-colors outline-none\",\n \"focus-visible:ring-2 focus-visible:ring-md-primary focus-visible:ring-offset-2 focus-visible:ring-offset-md-surface\",\n \"disabled:pointer-events-none disabled:opacity-[0.38]\",\n on ? \"border-md-primary bg-md-primary\" : \"border-md-outline bg-md-surface-container-high\",\n className,\n )}\n {...props}\n >\n <span\n className={cn(\n \"pointer-events-none flex items-center justify-center rounded-full transition-all\",\n on\n ? \"translate-x-[22px] h-6 w-6 bg-md-on-primary text-md-on-primary-container\"\n : \"translate-x-1 h-4 w-4 bg-md-outline text-transparent\",\n )}\n >\n {showIcon && on && <Check aria-hidden className=\"h-4 w-4\" />}\n </span>\n </button>\n );\n },\n);\nMd3Switch.displayName = \"Md3Switch\";\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Md3SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
7
|
+
/** Show a check icon in the handle when on (Material 3 default behaviour). */
|
|
8
|
+
showIcon?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** A Material Design 3 switch with a growing handle and optional check icon. */
|
|
11
|
+
declare const Md3Switch: React.ForwardRefExoticComponent<Md3SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
|
|
13
|
+
export { Md3Switch, type Md3SwitchProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface Md3SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
7
|
+
/** Show a check icon in the handle when on (Material 3 default behaviour). */
|
|
8
|
+
showIcon?: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** A Material Design 3 switch with a growing handle and optional check icon. */
|
|
11
|
+
declare const Md3Switch: React.ForwardRefExoticComponent<Md3SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
|
|
13
|
+
export { Md3Switch, type Md3SwitchProps };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Check } from 'lucide-react';
|
|
4
|
+
import { cn } from '@nucleux/utils';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
// src/index.tsx
|
|
8
|
+
var Md3Switch = React.forwardRef(
|
|
9
|
+
({ checked, defaultChecked = false, onCheckedChange, showIcon = true, disabled, className, onClick, ...props }, ref) => {
|
|
10
|
+
const isControlled = checked !== void 0;
|
|
11
|
+
const [internal, setInternal] = React.useState(defaultChecked);
|
|
12
|
+
const on = isControlled ? checked : internal;
|
|
13
|
+
const toggle = (e) => {
|
|
14
|
+
onClick?.(e);
|
|
15
|
+
if (e.defaultPrevented || disabled) return;
|
|
16
|
+
const next = !on;
|
|
17
|
+
if (!isControlled) setInternal(next);
|
|
18
|
+
onCheckedChange?.(next);
|
|
19
|
+
};
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
"button",
|
|
22
|
+
{
|
|
23
|
+
ref,
|
|
24
|
+
type: "button",
|
|
25
|
+
role: "switch",
|
|
26
|
+
"aria-checked": on,
|
|
27
|
+
disabled,
|
|
28
|
+
onClick: toggle,
|
|
29
|
+
className: cn(
|
|
30
|
+
"relative inline-flex h-8 w-[52px] shrink-0 items-center rounded-full border-2 transition-colors outline-none",
|
|
31
|
+
"focus-visible:ring-2 focus-visible:ring-md-primary focus-visible:ring-offset-2 focus-visible:ring-offset-md-surface",
|
|
32
|
+
"disabled:pointer-events-none disabled:opacity-[0.38]",
|
|
33
|
+
on ? "border-md-primary bg-md-primary" : "border-md-outline bg-md-surface-container-high",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props,
|
|
37
|
+
children: /* @__PURE__ */ jsx(
|
|
38
|
+
"span",
|
|
39
|
+
{
|
|
40
|
+
className: cn(
|
|
41
|
+
"pointer-events-none flex items-center justify-center rounded-full transition-all",
|
|
42
|
+
on ? "translate-x-[22px] h-6 w-6 bg-md-on-primary text-md-on-primary-container" : "translate-x-1 h-4 w-4 bg-md-outline text-transparent"
|
|
43
|
+
),
|
|
44
|
+
children: showIcon && on && /* @__PURE__ */ jsx(Check, { "aria-hidden": true, className: "h-4 w-4" })
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
Md3Switch.displayName = "Md3Switch";
|
|
52
|
+
|
|
53
|
+
export { Md3Switch };
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;AAcO,IAAM,SAAA,GAAkB,KAAA,CAAA,UAAA;AAAA,EAC7B,CAAC,EAAE,OAAA,EAAS,cAAA,GAAiB,OAAO,eAAA,EAAiB,QAAA,GAAW,IAAA,EAAM,QAAA,EAAU,SAAA,EAAW,OAAA,EAAS,GAAG,KAAA,IAAS,GAAA,KAAQ;AACtH,IAAA,MAAM,eAAe,OAAA,KAAY,MAAA;AACjC,IAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAU,eAAS,cAAc,CAAA;AAC7D,IAAA,MAAM,EAAA,GAAK,eAAe,OAAA,GAAU,QAAA;AAEpC,IAAA,MAAM,MAAA,GAAS,CAAC,CAAA,KAA2C;AACzD,MAAA,OAAA,GAAU,CAAC,CAAA;AACX,MAAA,IAAI,CAAA,CAAE,oBAAoB,QAAA,EAAU;AACpC,MAAA,MAAM,OAAO,CAAC,EAAA;AACd,MAAA,IAAI,CAAC,YAAA,EAAc,WAAA,CAAY,IAAI,CAAA;AACnC,MAAA,eAAA,GAAkB,IAAI,CAAA;AAAA,IACxB,CAAA;AAEA,IAAA,uBACE,GAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,IAAA,EAAK,QAAA;AAAA,QACL,IAAA,EAAK,QAAA;AAAA,QACL,cAAA,EAAc,EAAA;AAAA,QACd,QAAA;AAAA,QACA,OAAA,EAAS,MAAA;AAAA,QACT,SAAA,EAAW,EAAA;AAAA,UACT,8GAAA;AAAA,UACA,qHAAA;AAAA,UACA,sDAAA;AAAA,UACA,KAAK,iCAAA,GAAoC,gDAAA;AAAA,UACzC;AAAA,SACF;AAAA,QACC,GAAG,KAAA;AAAA,QAEJ,QAAA,kBAAA,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAW,EAAA;AAAA,cACT,kFAAA;AAAA,cACA,KACI,0EAAA,GACA;AAAA,aACN;AAAA,YAEC,sBAAY,EAAA,oBAAM,GAAA,CAAC,SAAM,aAAA,EAAW,IAAA,EAAC,WAAU,SAAA,EAAU;AAAA;AAAA;AAC5D;AAAA,KACF;AAAA,EAEJ;AACF;AACA,SAAA,CAAU,WAAA,GAAc,WAAA","file":"index.js","sourcesContent":["import * as React from \"react\";\nimport { Check } from \"lucide-react\";\nimport { cn } from \"@nucleux/utils\";\n\nexport interface Md3SwitchProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"onChange\"> {\n checked?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n /** Show a check icon in the handle when on (Material 3 default behaviour). */\n showIcon?: boolean;\n}\n\n/** A Material Design 3 switch with a growing handle and optional check icon. */\nexport const Md3Switch = React.forwardRef<HTMLButtonElement, Md3SwitchProps>(\n ({ checked, defaultChecked = false, onCheckedChange, showIcon = true, disabled, className, onClick, ...props }, ref) => {\n const isControlled = checked !== undefined;\n const [internal, setInternal] = React.useState(defaultChecked);\n const on = isControlled ? checked : internal;\n\n const toggle = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n if (e.defaultPrevented || disabled) return;\n const next = !on;\n if (!isControlled) setInternal(next);\n onCheckedChange?.(next);\n };\n\n return (\n <button\n ref={ref}\n type=\"button\"\n role=\"switch\"\n aria-checked={on}\n disabled={disabled}\n onClick={toggle}\n className={cn(\n \"relative inline-flex h-8 w-[52px] shrink-0 items-center rounded-full border-2 transition-colors outline-none\",\n \"focus-visible:ring-2 focus-visible:ring-md-primary focus-visible:ring-offset-2 focus-visible:ring-offset-md-surface\",\n \"disabled:pointer-events-none disabled:opacity-[0.38]\",\n on ? \"border-md-primary bg-md-primary\" : \"border-md-outline bg-md-surface-container-high\",\n className,\n )}\n {...props}\n >\n <span\n className={cn(\n \"pointer-events-none flex items-center justify-center rounded-full transition-all\",\n on\n ? \"translate-x-[22px] h-6 w-6 bg-md-on-primary text-md-on-primary-container\"\n : \"translate-x-1 h-4 w-4 bg-md-outline text-transparent\",\n )}\n >\n {showIcon && on && <Check aria-hidden className=\"h-4 w-4\" />}\n </span>\n </button>\n );\n },\n);\nMd3Switch.displayName = \"Md3Switch\";\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nucleux/md3-switch",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"description": "Material 3 switch — Nucleux agentic UI for React.",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"nucleux",
|
|
9
|
+
"react",
|
|
10
|
+
"ui",
|
|
11
|
+
"components",
|
|
12
|
+
"agentic",
|
|
13
|
+
"ai",
|
|
14
|
+
"tailwind",
|
|
15
|
+
"md3-switch"
|
|
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
|
+
"lucide-react": "^0.469.0",
|
|
37
|
+
"@nucleux/utils": "0.3.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"tsup": "^8.3.5",
|
|
41
|
+
"typescript": "^5.7.2",
|
|
42
|
+
"@types/react": "^18.3.18",
|
|
43
|
+
"react": "^18.3.1"
|
|
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/md3-switch"
|
|
53
|
+
},
|
|
54
|
+
"homepage": "https://github.com/intelligaia-open-labs/nucleux#readme",
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "tsup"
|
|
57
|
+
}
|
|
58
|
+
}
|