@jameskabz/nextcraft-ui 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 STL Packages
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,51 @@
1
+ # Nextcraft UI
2
+
3
+ Bold, crafted UI components for Next.js + Tailwind CSS.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @jameskabz/nextcraft-ui
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { CraftButton, GlassCard } from "@jameskabz/nextcraft-ui";
15
+
16
+ export default function Example() {
17
+ return (
18
+ <GlassCard tone="aurora" className="max-w-md">
19
+ <h3 className="text-xl font-semibold">Nextcraft UI</h3>
20
+ <p className="mt-2 text-sm text-white/80">
21
+ Crafted components with a bold, modern edge.
22
+ </p>
23
+ <CraftButton className="mt-6">Launch</CraftButton>
24
+ </GlassCard>
25
+ );
26
+ }
27
+ ```
28
+
29
+ ## Tailwind setup
30
+
31
+ This library ships class names only. Make sure Tailwind scans your node_modules
32
+ for the package so the classes are generated:
33
+
34
+ ```ts
35
+ // tailwind.config.ts
36
+ export default {
37
+ content: [
38
+ "./src/**/*.{ts,tsx}",
39
+ "./node_modules/@jameskabz/nextcraft-ui/dist/**/*.{js,mjs}"
40
+ ]
41
+ };
42
+ ```
43
+
44
+ ## Scripts
45
+
46
+ - `npm run build` builds the library with `tsup`.
47
+ - `npm run typecheck` runs TypeScript checks.
48
+
49
+ ## License
50
+
51
+ MIT
package/dist/index.cjs ADDED
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ CraftButton: () => CraftButton,
34
+ CraftInput: () => CraftInput,
35
+ GlassCard: () => GlassCard
36
+ });
37
+ module.exports = __toCommonJS(index_exports);
38
+
39
+ // src/utils/cn.ts
40
+ function cn(...values) {
41
+ return values.filter(Boolean).join(" ");
42
+ }
43
+
44
+ // src/components/craft-button.tsx
45
+ var import_jsx_runtime = require("react/jsx-runtime");
46
+ var sizeClasses = {
47
+ sm: "h-9 px-3 text-xs",
48
+ md: "h-11 px-4 text-sm",
49
+ lg: "h-12 px-5 text-base"
50
+ };
51
+ var variantClasses = {
52
+ solid: "bg-[radial-gradient(120%_120%_at_10%_10%,_#D4FF7B_0%,_#79F2C0_35%,_#0EA5E9_100%)] text-slate-950 shadow-[0_10px_30px_-12px_rgba(14,165,233,0.6)] hover:brightness-105",
53
+ ghost: "bg-white/5 text-white hover:bg-white/10 border border-white/10",
54
+ outline: "bg-transparent text-white border border-sky-300/40 hover:border-sky-200/60"
55
+ };
56
+ function CraftButton({
57
+ className,
58
+ variant = "solid",
59
+ size = "md",
60
+ glow = true,
61
+ ...props
62
+ }) {
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
64
+ "button",
65
+ {
66
+ className: cn(
67
+ "relative inline-flex items-center justify-center gap-2 rounded-full font-semibold tracking-wide transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-300/80",
68
+ sizeClasses[size],
69
+ variantClasses[variant],
70
+ glow && variant === "solid" ? "before:absolute before:-inset-0.5 before:rounded-full before:bg-sky-400/40 before:blur-lg before:-z-10" : "",
71
+ className
72
+ ),
73
+ ...props
74
+ }
75
+ );
76
+ }
77
+
78
+ // src/components/glass-card.tsx
79
+ var import_jsx_runtime2 = require("react/jsx-runtime");
80
+ var toneClasses = {
81
+ aurora: "from-emerald-300/20 via-sky-300/10 to-indigo-400/20 border-emerald-200/20",
82
+ ember: "from-amber-300/20 via-rose-300/10 to-fuchsia-400/20 border-amber-200/20",
83
+ ocean: "from-sky-300/20 via-cyan-300/10 to-blue-400/20 border-sky-200/20"
84
+ };
85
+ function GlassCard({
86
+ className,
87
+ tone = "aurora",
88
+ ...props
89
+ }) {
90
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
91
+ "div",
92
+ {
93
+ className: cn(
94
+ "relative overflow-hidden rounded-2xl border bg-linear-to-br p-6 text-white shadow-[0_25px_70px_-45px_rgba(15,23,42,0.9)]",
95
+ "backdrop-blur-xl",
96
+ toneClasses[tone],
97
+ className
98
+ ),
99
+ ...props
100
+ }
101
+ );
102
+ }
103
+
104
+ // src/components/craft-input.tsx
105
+ var React = __toESM(require("react"), 1);
106
+ var import_jsx_runtime3 = require("react/jsx-runtime");
107
+ var toneClasses2 = {
108
+ aurora: "border-emerald-200/30 focus:border-emerald-200/60 focus:ring-emerald-300/40",
109
+ ember: "border-amber-200/30 focus:border-amber-200/60 focus:ring-amber-300/40",
110
+ ocean: "border-sky-200/30 focus:border-sky-200/60 focus:ring-sky-300/40"
111
+ };
112
+ var sizeClasses2 = {
113
+ sm: "h-9 px-3 text-sm",
114
+ md: "h-11 px-4 text-sm",
115
+ lg: "h-12 px-4 text-base"
116
+ };
117
+ var CraftInput = React.forwardRef(
118
+ ({ className, tone = "aurora", inputSize = "md", glow = true, ...props }, ref) => {
119
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
120
+ "input",
121
+ {
122
+ ref,
123
+ className: cn(
124
+ "w-full rounded-full border bg-white/5 text-white placeholder:text-white/40",
125
+ "shadow-[inset_0_0_0_1px_rgba(15,23,42,0.05)]",
126
+ "focus:outline-none focus:ring-2",
127
+ "transition",
128
+ sizeClasses2[inputSize],
129
+ toneClasses2[tone],
130
+ glow ? "shadow-[0_20px_50px_-35px_rgba(56,189,248,0.7)]" : "",
131
+ className
132
+ ),
133
+ ...props
134
+ }
135
+ );
136
+ }
137
+ );
138
+ CraftInput.displayName = "CraftInput";
139
+ // Annotate the CommonJS export names for ESM import in node:
140
+ 0 && (module.exports = {
141
+ CraftButton,
142
+ CraftInput,
143
+ GlassCard
144
+ });
145
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/utils/cn.ts","../src/components/craft-button.tsx","../src/components/glass-card.tsx","../src/components/craft-input.tsx"],"sourcesContent":["export { CraftButton } from \"./components/craft-button\";\nexport type { CraftButtonProps } from \"./components/craft-button\";\n\nexport { GlassCard } from \"./components/glass-card\";\nexport type { GlassCardProps } from \"./components/glass-card\";\n\nexport { CraftInput } from \"./components/craft-input\";\nexport type { CraftInputProps } from \"./components/craft-input\";\n","export function cn(...values: Array<string | false | null | undefined>): string {\n return values.filter(Boolean).join(\" \");\n}\n","import * as React from \"react\";\n\nimport { cn } from \"../utils/cn\";\n\ntype CraftButtonVariant = \"solid\" | \"ghost\" | \"outline\";\ntype CraftButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport type CraftButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n variant?: CraftButtonVariant;\n size?: CraftButtonSize;\n glow?: boolean;\n};\n\nconst sizeClasses: Record<CraftButtonSize, string> = {\n sm: \"h-9 px-3 text-xs\",\n md: \"h-11 px-4 text-sm\",\n lg: \"h-12 px-5 text-base\",\n};\n\nconst variantClasses: Record<CraftButtonVariant, string> = {\n solid:\n \"bg-[radial-gradient(120%_120%_at_10%_10%,_#D4FF7B_0%,_#79F2C0_35%,_#0EA5E9_100%)] text-slate-950 shadow-[0_10px_30px_-12px_rgba(14,165,233,0.6)] hover:brightness-105\",\n ghost:\n \"bg-white/5 text-white hover:bg-white/10 border border-white/10\",\n outline:\n \"bg-transparent text-white border border-sky-300/40 hover:border-sky-200/60\",\n};\n\nexport function CraftButton({\n className,\n variant = \"solid\",\n size = \"md\",\n glow = true,\n ...props\n}: CraftButtonProps) {\n return (\n <button\n className={cn(\n \"relative inline-flex items-center justify-center gap-2 rounded-full font-semibold tracking-wide transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-300/80\",\n sizeClasses[size],\n variantClasses[variant],\n glow && variant === \"solid\"\n ? \"before:absolute before:-inset-0.5 before:rounded-full before:bg-sky-400/40 before:blur-lg before:-z-10\"\n : \"\",\n className\n )}\n {...props}\n />\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"../utils/cn\";\n\nexport type GlassCardProps = React.HTMLAttributes<HTMLDivElement> & {\n tone?: \"aurora\" | \"ember\" | \"ocean\";\n};\n\nconst toneClasses: Record<NonNullable<GlassCardProps[\"tone\"]>, string> = {\n aurora:\n \"from-emerald-300/20 via-sky-300/10 to-indigo-400/20 border-emerald-200/20\",\n ember: \"from-amber-300/20 via-rose-300/10 to-fuchsia-400/20 border-amber-200/20\",\n ocean: \"from-sky-300/20 via-cyan-300/10 to-blue-400/20 border-sky-200/20\",\n};\n\nexport function GlassCard({\n className,\n tone = \"aurora\",\n ...props\n}: GlassCardProps) {\n return (\n <div\n className={cn(\n \"relative overflow-hidden rounded-2xl border bg-linear-to-br p-6 text-white shadow-[0_25px_70px_-45px_rgba(15,23,42,0.9)]\",\n \"backdrop-blur-xl\",\n toneClasses[tone],\n className\n )}\n {...props}\n />\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"../utils/cn\";\n\ntype CraftInputTone = \"aurora\" | \"ember\" | \"ocean\";\ntype CraftInputSize = \"sm\" | \"md\" | \"lg\";\n\nexport type CraftInputProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"size\"\n> & {\n tone?: CraftInputTone;\n inputSize?: CraftInputSize;\n glow?: boolean;\n};\n\nconst toneClasses: Record<CraftInputTone, string> = {\n aurora:\n \"border-emerald-200/30 focus:border-emerald-200/60 focus:ring-emerald-300/40\",\n ember:\n \"border-amber-200/30 focus:border-amber-200/60 focus:ring-amber-300/40\",\n ocean: \"border-sky-200/30 focus:border-sky-200/60 focus:ring-sky-300/40\",\n};\n\nconst sizeClasses: Record<CraftInputSize, string> = {\n sm: \"h-9 px-3 text-sm\",\n md: \"h-11 px-4 text-sm\",\n lg: \"h-12 px-4 text-base\",\n};\n\nexport const CraftInput = React.forwardRef<HTMLInputElement, CraftInputProps>(\n (\n { className, tone = \"aurora\", inputSize = \"md\", glow = true, ...props },\n ref\n ) => {\n return (\n <input\n ref={ref}\n className={cn(\n \"w-full rounded-full border bg-white/5 text-white placeholder:text-white/40\",\n \"shadow-[inset_0_0_0_1px_rgba(15,23,42,0.05)]\",\n \"focus:outline-none focus:ring-2\",\n \"transition\",\n sizeClasses[inputSize],\n toneClasses[tone],\n glow ? \"shadow-[0_20px_50px_-35px_rgba(56,189,248,0.7)]\" : \"\",\n className\n )}\n {...props}\n />\n );\n }\n);\n\nCraftInput.displayName = \"CraftInput\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,SAAS,MAAM,QAA0D;AAC9E,SAAO,OAAO,OAAO,OAAO,EAAE,KAAK,GAAG;AACxC;;;ACkCI;AAvBJ,IAAM,cAA+C;AAAA,EACnD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,IAAM,iBAAqD;AAAA,EACzD,OACE;AAAA,EACF,OACE;AAAA,EACF,SACE;AACJ;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,GAAG;AACL,GAAqB;AACnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,YAAY,IAAI;AAAA,QAChB,eAAe,OAAO;AAAA,QACtB,QAAQ,YAAY,UAChB,2GACA;AAAA,QACJ;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;;;AC5BI,IAAAA,sBAAA;AAbJ,IAAM,cAAmE;AAAA,EACvE,QACE;AAAA,EACF,OAAO;AAAA,EACP,OAAO;AACT;AAEO,SAAS,UAAU;AAAA,EACxB;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAmB;AACjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,YAAY,IAAI;AAAA,QAChB;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;;;AC/BA,YAAuB;AAoCjB,IAAAC,sBAAA;AApBN,IAAMC,eAA8C;AAAA,EAClD,QACE;AAAA,EACF,OACE;AAAA,EACF,OAAO;AACT;AAEA,IAAMC,eAA8C;AAAA,EAClD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,IAAM,aAAmB;AAAA,EAC9B,CACE,EAAE,WAAW,OAAO,UAAU,YAAY,MAAM,OAAO,MAAM,GAAG,MAAM,GACtE,QACG;AACH,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACAA,aAAY,SAAS;AAAA,UACrBD,aAAY,IAAI;AAAA,UAChB,OAAO,oDAAoD;AAAA,UAC3D;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":["import_jsx_runtime","import_jsx_runtime","toneClasses","sizeClasses"]}
@@ -0,0 +1,31 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ type CraftButtonVariant = "solid" | "ghost" | "outline";
5
+ type CraftButtonSize = "sm" | "md" | "lg";
6
+ type CraftButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
7
+ variant?: CraftButtonVariant;
8
+ size?: CraftButtonSize;
9
+ glow?: boolean;
10
+ };
11
+ declare function CraftButton({ className, variant, size, glow, ...props }: CraftButtonProps): react_jsx_runtime.JSX.Element;
12
+
13
+ type GlassCardProps = React.HTMLAttributes<HTMLDivElement> & {
14
+ tone?: "aurora" | "ember" | "ocean";
15
+ };
16
+ declare function GlassCard({ className, tone, ...props }: GlassCardProps): react_jsx_runtime.JSX.Element;
17
+
18
+ type CraftInputTone = "aurora" | "ember" | "ocean";
19
+ type CraftInputSize = "sm" | "md" | "lg";
20
+ type CraftInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
21
+ tone?: CraftInputTone;
22
+ inputSize?: CraftInputSize;
23
+ glow?: boolean;
24
+ };
25
+ declare const CraftInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
26
+ tone?: CraftInputTone;
27
+ inputSize?: CraftInputSize;
28
+ glow?: boolean;
29
+ } & React.RefAttributes<HTMLInputElement>>;
30
+
31
+ export { CraftButton, type CraftButtonProps, CraftInput, type CraftInputProps, GlassCard, type GlassCardProps };
@@ -0,0 +1,31 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ type CraftButtonVariant = "solid" | "ghost" | "outline";
5
+ type CraftButtonSize = "sm" | "md" | "lg";
6
+ type CraftButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
7
+ variant?: CraftButtonVariant;
8
+ size?: CraftButtonSize;
9
+ glow?: boolean;
10
+ };
11
+ declare function CraftButton({ className, variant, size, glow, ...props }: CraftButtonProps): react_jsx_runtime.JSX.Element;
12
+
13
+ type GlassCardProps = React.HTMLAttributes<HTMLDivElement> & {
14
+ tone?: "aurora" | "ember" | "ocean";
15
+ };
16
+ declare function GlassCard({ className, tone, ...props }: GlassCardProps): react_jsx_runtime.JSX.Element;
17
+
18
+ type CraftInputTone = "aurora" | "ember" | "ocean";
19
+ type CraftInputSize = "sm" | "md" | "lg";
20
+ type CraftInputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
21
+ tone?: CraftInputTone;
22
+ inputSize?: CraftInputSize;
23
+ glow?: boolean;
24
+ };
25
+ declare const CraftInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
26
+ tone?: CraftInputTone;
27
+ inputSize?: CraftInputSize;
28
+ glow?: boolean;
29
+ } & React.RefAttributes<HTMLInputElement>>;
30
+
31
+ export { CraftButton, type CraftButtonProps, CraftInput, type CraftInputProps, GlassCard, type GlassCardProps };
package/dist/index.js ADDED
@@ -0,0 +1,106 @@
1
+ // src/utils/cn.ts
2
+ function cn(...values) {
3
+ return values.filter(Boolean).join(" ");
4
+ }
5
+
6
+ // src/components/craft-button.tsx
7
+ import { jsx } from "react/jsx-runtime";
8
+ var sizeClasses = {
9
+ sm: "h-9 px-3 text-xs",
10
+ md: "h-11 px-4 text-sm",
11
+ lg: "h-12 px-5 text-base"
12
+ };
13
+ var variantClasses = {
14
+ solid: "bg-[radial-gradient(120%_120%_at_10%_10%,_#D4FF7B_0%,_#79F2C0_35%,_#0EA5E9_100%)] text-slate-950 shadow-[0_10px_30px_-12px_rgba(14,165,233,0.6)] hover:brightness-105",
15
+ ghost: "bg-white/5 text-white hover:bg-white/10 border border-white/10",
16
+ outline: "bg-transparent text-white border border-sky-300/40 hover:border-sky-200/60"
17
+ };
18
+ function CraftButton({
19
+ className,
20
+ variant = "solid",
21
+ size = "md",
22
+ glow = true,
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(
26
+ "button",
27
+ {
28
+ className: cn(
29
+ "relative inline-flex items-center justify-center gap-2 rounded-full font-semibold tracking-wide transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-300/80",
30
+ sizeClasses[size],
31
+ variantClasses[variant],
32
+ glow && variant === "solid" ? "before:absolute before:-inset-0.5 before:rounded-full before:bg-sky-400/40 before:blur-lg before:-z-10" : "",
33
+ className
34
+ ),
35
+ ...props
36
+ }
37
+ );
38
+ }
39
+
40
+ // src/components/glass-card.tsx
41
+ import { jsx as jsx2 } from "react/jsx-runtime";
42
+ var toneClasses = {
43
+ aurora: "from-emerald-300/20 via-sky-300/10 to-indigo-400/20 border-emerald-200/20",
44
+ ember: "from-amber-300/20 via-rose-300/10 to-fuchsia-400/20 border-amber-200/20",
45
+ ocean: "from-sky-300/20 via-cyan-300/10 to-blue-400/20 border-sky-200/20"
46
+ };
47
+ function GlassCard({
48
+ className,
49
+ tone = "aurora",
50
+ ...props
51
+ }) {
52
+ return /* @__PURE__ */ jsx2(
53
+ "div",
54
+ {
55
+ className: cn(
56
+ "relative overflow-hidden rounded-2xl border bg-linear-to-br p-6 text-white shadow-[0_25px_70px_-45px_rgba(15,23,42,0.9)]",
57
+ "backdrop-blur-xl",
58
+ toneClasses[tone],
59
+ className
60
+ ),
61
+ ...props
62
+ }
63
+ );
64
+ }
65
+
66
+ // src/components/craft-input.tsx
67
+ import * as React from "react";
68
+ import { jsx as jsx3 } from "react/jsx-runtime";
69
+ var toneClasses2 = {
70
+ aurora: "border-emerald-200/30 focus:border-emerald-200/60 focus:ring-emerald-300/40",
71
+ ember: "border-amber-200/30 focus:border-amber-200/60 focus:ring-amber-300/40",
72
+ ocean: "border-sky-200/30 focus:border-sky-200/60 focus:ring-sky-300/40"
73
+ };
74
+ var sizeClasses2 = {
75
+ sm: "h-9 px-3 text-sm",
76
+ md: "h-11 px-4 text-sm",
77
+ lg: "h-12 px-4 text-base"
78
+ };
79
+ var CraftInput = React.forwardRef(
80
+ ({ className, tone = "aurora", inputSize = "md", glow = true, ...props }, ref) => {
81
+ return /* @__PURE__ */ jsx3(
82
+ "input",
83
+ {
84
+ ref,
85
+ className: cn(
86
+ "w-full rounded-full border bg-white/5 text-white placeholder:text-white/40",
87
+ "shadow-[inset_0_0_0_1px_rgba(15,23,42,0.05)]",
88
+ "focus:outline-none focus:ring-2",
89
+ "transition",
90
+ sizeClasses2[inputSize],
91
+ toneClasses2[tone],
92
+ glow ? "shadow-[0_20px_50px_-35px_rgba(56,189,248,0.7)]" : "",
93
+ className
94
+ ),
95
+ ...props
96
+ }
97
+ );
98
+ }
99
+ );
100
+ CraftInput.displayName = "CraftInput";
101
+ export {
102
+ CraftButton,
103
+ CraftInput,
104
+ GlassCard
105
+ };
106
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/cn.ts","../src/components/craft-button.tsx","../src/components/glass-card.tsx","../src/components/craft-input.tsx"],"sourcesContent":["export function cn(...values: Array<string | false | null | undefined>): string {\n return values.filter(Boolean).join(\" \");\n}\n","import * as React from \"react\";\n\nimport { cn } from \"../utils/cn\";\n\ntype CraftButtonVariant = \"solid\" | \"ghost\" | \"outline\";\ntype CraftButtonSize = \"sm\" | \"md\" | \"lg\";\n\nexport type CraftButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {\n variant?: CraftButtonVariant;\n size?: CraftButtonSize;\n glow?: boolean;\n};\n\nconst sizeClasses: Record<CraftButtonSize, string> = {\n sm: \"h-9 px-3 text-xs\",\n md: \"h-11 px-4 text-sm\",\n lg: \"h-12 px-5 text-base\",\n};\n\nconst variantClasses: Record<CraftButtonVariant, string> = {\n solid:\n \"bg-[radial-gradient(120%_120%_at_10%_10%,_#D4FF7B_0%,_#79F2C0_35%,_#0EA5E9_100%)] text-slate-950 shadow-[0_10px_30px_-12px_rgba(14,165,233,0.6)] hover:brightness-105\",\n ghost:\n \"bg-white/5 text-white hover:bg-white/10 border border-white/10\",\n outline:\n \"bg-transparent text-white border border-sky-300/40 hover:border-sky-200/60\",\n};\n\nexport function CraftButton({\n className,\n variant = \"solid\",\n size = \"md\",\n glow = true,\n ...props\n}: CraftButtonProps) {\n return (\n <button\n className={cn(\n \"relative inline-flex items-center justify-center gap-2 rounded-full font-semibold tracking-wide transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-300/80\",\n sizeClasses[size],\n variantClasses[variant],\n glow && variant === \"solid\"\n ? \"before:absolute before:-inset-0.5 before:rounded-full before:bg-sky-400/40 before:blur-lg before:-z-10\"\n : \"\",\n className\n )}\n {...props}\n />\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"../utils/cn\";\n\nexport type GlassCardProps = React.HTMLAttributes<HTMLDivElement> & {\n tone?: \"aurora\" | \"ember\" | \"ocean\";\n};\n\nconst toneClasses: Record<NonNullable<GlassCardProps[\"tone\"]>, string> = {\n aurora:\n \"from-emerald-300/20 via-sky-300/10 to-indigo-400/20 border-emerald-200/20\",\n ember: \"from-amber-300/20 via-rose-300/10 to-fuchsia-400/20 border-amber-200/20\",\n ocean: \"from-sky-300/20 via-cyan-300/10 to-blue-400/20 border-sky-200/20\",\n};\n\nexport function GlassCard({\n className,\n tone = \"aurora\",\n ...props\n}: GlassCardProps) {\n return (\n <div\n className={cn(\n \"relative overflow-hidden rounded-2xl border bg-linear-to-br p-6 text-white shadow-[0_25px_70px_-45px_rgba(15,23,42,0.9)]\",\n \"backdrop-blur-xl\",\n toneClasses[tone],\n className\n )}\n {...props}\n />\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"../utils/cn\";\n\ntype CraftInputTone = \"aurora\" | \"ember\" | \"ocean\";\ntype CraftInputSize = \"sm\" | \"md\" | \"lg\";\n\nexport type CraftInputProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"size\"\n> & {\n tone?: CraftInputTone;\n inputSize?: CraftInputSize;\n glow?: boolean;\n};\n\nconst toneClasses: Record<CraftInputTone, string> = {\n aurora:\n \"border-emerald-200/30 focus:border-emerald-200/60 focus:ring-emerald-300/40\",\n ember:\n \"border-amber-200/30 focus:border-amber-200/60 focus:ring-amber-300/40\",\n ocean: \"border-sky-200/30 focus:border-sky-200/60 focus:ring-sky-300/40\",\n};\n\nconst sizeClasses: Record<CraftInputSize, string> = {\n sm: \"h-9 px-3 text-sm\",\n md: \"h-11 px-4 text-sm\",\n lg: \"h-12 px-4 text-base\",\n};\n\nexport const CraftInput = React.forwardRef<HTMLInputElement, CraftInputProps>(\n (\n { className, tone = \"aurora\", inputSize = \"md\", glow = true, ...props },\n ref\n ) => {\n return (\n <input\n ref={ref}\n className={cn(\n \"w-full rounded-full border bg-white/5 text-white placeholder:text-white/40\",\n \"shadow-[inset_0_0_0_1px_rgba(15,23,42,0.05)]\",\n \"focus:outline-none focus:ring-2\",\n \"transition\",\n sizeClasses[inputSize],\n toneClasses[tone],\n glow ? \"shadow-[0_20px_50px_-35px_rgba(56,189,248,0.7)]\" : \"\",\n className\n )}\n {...props}\n />\n );\n }\n);\n\nCraftInput.displayName = \"CraftInput\";\n"],"mappings":";AAAO,SAAS,MAAM,QAA0D;AAC9E,SAAO,OAAO,OAAO,OAAO,EAAE,KAAK,GAAG;AACxC;;;ACkCI;AAvBJ,IAAM,cAA+C;AAAA,EACnD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,IAAM,iBAAqD;AAAA,EACzD,OACE;AAAA,EACF,OACE;AAAA,EACF,SACE;AACJ;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,GAAG;AACL,GAAqB;AACnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,YAAY,IAAI;AAAA,QAChB,eAAe,OAAO;AAAA,QACtB,QAAQ,YAAY,UAChB,2GACA;AAAA,QACJ;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;;;AC5BI,gBAAAA,YAAA;AAbJ,IAAM,cAAmE;AAAA,EACvE,QACE;AAAA,EACF,OAAO;AAAA,EACP,OAAO;AACT;AAEO,SAAS,UAAU;AAAA,EACxB;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAmB;AACjB,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA,YAAY,IAAI;AAAA,QAChB;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;;;AC/BA,YAAY,WAAW;AAoCjB,gBAAAC,YAAA;AApBN,IAAMC,eAA8C;AAAA,EAClD,QACE;AAAA,EACF,OACE;AAAA,EACF,OAAO;AACT;AAEA,IAAMC,eAA8C;AAAA,EAClD,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEO,IAAM,aAAmB;AAAA,EAC9B,CACE,EAAE,WAAW,OAAO,UAAU,YAAY,MAAM,OAAO,MAAM,GAAG,MAAM,GACtE,QACG;AACH,WACE,gBAAAF;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACAE,aAAY,SAAS;AAAA,UACrBD,aAAY,IAAI;AAAA,UAChB,OAAO,oDAAoD;AAAA,UAC3D;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":["jsx","jsx","toneClasses","sizeClasses"]}
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@jameskabz/nextcraft-ui",
3
+ "version": "0.1.1",
4
+ "description": "Next.js + Tailwind UI components with a bold, crafted aesthetic.",
5
+ "private": false,
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/James-Kabz/nextcraft-ui.git"
10
+ },
11
+ "homepage": "https://github.com/James-Kabz/nextcraft-ui#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/James-Kabz/nextcraft-ui/issues"
14
+ },
15
+ "type": "module",
16
+ "files": [
17
+ "dist",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "main": "./dist/index.cjs",
22
+ "module": "./dist/index.mjs",
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.mjs",
28
+ "require": "./dist/index.cjs"
29
+ }
30
+ },
31
+ "sideEffects": false,
32
+ "publishConfig": {
33
+ "access": "public"
34
+ },
35
+ "scripts": {
36
+ "dev": "tsup --watch",
37
+ "build": "tsup",
38
+ "lint": "eslint .",
39
+ "typecheck": "tsc -p tsconfig.lib.json --noEmit",
40
+ "test:unit:run": "echo \"No unit tests specified\"",
41
+ "test:coverage": "echo \"No coverage configured\""
42
+ },
43
+ "peerDependencies": {
44
+ "next": "^16.1.4",
45
+ "react": "^19.2.3",
46
+ "react-dom": "^19.2.3",
47
+ "tailwindcss": "^4"
48
+ },
49
+ "devDependencies": {
50
+ "@tailwindcss/postcss": "^4",
51
+ "@types/node": "^20",
52
+ "@types/react": "^19",
53
+ "@types/react-dom": "^19",
54
+ "babel-plugin-react-compiler": "1.0.0",
55
+ "eslint": "^9",
56
+ "eslint-config-next": "16.1.4",
57
+ "next": "16.1.4",
58
+ "react": "19.2.3",
59
+ "react-dom": "19.2.3",
60
+ "tailwindcss": "^4",
61
+ "tsup": "^8.5.0",
62
+ "typescript": "^5"
63
+ }
64
+ }