@coresystems/ui-kit 0.1.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/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # @coresystems/ui-kit
2
+
3
+ React component library, design tokens, and charts for coresystems.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @coresystems/ui-kit
9
+ ```
10
+
11
+ For charts, also install the optional peer dependency:
12
+
13
+ ```bash
14
+ pnpm add recharts
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ### Components
20
+
21
+ ```tsx
22
+ import { Button } from '@coresystems/ui-kit/components';
23
+
24
+ <Button variant='primary' size='md'>Click me</Button>
25
+ ```
26
+
27
+ ### Design Tokens
28
+
29
+ ```ts
30
+ import { colors, spacing, typography } from '@coresystems/ui-kit/tokens';
31
+ ```
32
+
33
+ ### Charts
34
+
35
+ ```tsx
36
+ import { LineChart } from '@coresystems/ui-kit/charts';
37
+ ```
38
+
39
+ ## Subpath Exports
40
+
41
+ | Import | Description |
42
+ |--------|-------------|
43
+ | `@coresystems/ui-kit` | Re-exports everything |
44
+ | `@coresystems/ui-kit/components` | React UI components |
45
+ | `@coresystems/ui-kit/tokens` | Design tokens (colors, spacing, typography) |
46
+ | `@coresystems/ui-kit/charts` | Chart components (requires `recharts`) |
47
+
48
+ ## Requirements
49
+
50
+ - React 18.2+ or 19+
51
+ - Node.js 22.12+
@@ -0,0 +1 @@
1
+ "use strict";const n=require("react/jsx-runtime"),r=require("./colors-CLrPlKf3.cjs"),b={sm:{padding:"0.25rem 0.75rem",fontSize:"0.875rem",height:"2rem"},md:{padding:"0.5rem 1rem",fontSize:"1rem",height:"2.5rem"},lg:{padding:"0.75rem 1.5rem",fontSize:"1.125rem",height:"3rem"}},u={primary:{background:r.colors.brand.primary,color:"#fff",border:"none"},secondary:{background:"transparent",color:r.colors.brand.primary,border:`1px solid ${r.colors.brand.primary}`},ghost:{background:"transparent",color:r.colors.neutral[700],border:"none"},danger:{background:r.colors.semantic.error,color:"#fff",border:"none"}},p=({children:t,variant:i="primary",size:s="md",loading:e=!1,fullWidth:a=!1,disabled:d,style:c,...l})=>{const o=d||e,m={...b[s],...u[i],cursor:o?"not-allowed":"pointer",opacity:o?.6:1,width:a?"100%":void 0,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"0.375rem",fontWeight:500,transition:"opacity 0.15s ease",boxSizing:"border-box",...c};return n.jsx("button",{type:"button",disabled:o,style:m,"aria-busy":e,...l,children:e?n.jsx("span",{"aria-hidden":"true",children:"…"}):t})};exports.Button=p;
@@ -0,0 +1,45 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { c as r } from "./colors-Cwz6P253.js";
3
+ const b = {
4
+ sm: { padding: "0.25rem 0.75rem", fontSize: "0.875rem", height: "2rem" },
5
+ md: { padding: "0.5rem 1rem", fontSize: "1rem", height: "2.5rem" },
6
+ lg: { padding: "0.75rem 1.5rem", fontSize: "1.125rem", height: "3rem" }
7
+ }, p = {
8
+ primary: { background: r.brand.primary, color: "#fff", border: "none" },
9
+ secondary: {
10
+ background: "transparent",
11
+ color: r.brand.primary,
12
+ border: `1px solid ${r.brand.primary}`
13
+ },
14
+ ghost: { background: "transparent", color: r.neutral[700], border: "none" },
15
+ danger: { background: r.semantic.error, color: "#fff", border: "none" }
16
+ }, g = ({
17
+ children: t,
18
+ variant: i = "primary",
19
+ size: a = "md",
20
+ loading: e = !1,
21
+ fullWidth: s = !1,
22
+ disabled: d,
23
+ style: m,
24
+ ...c
25
+ }) => {
26
+ const n = d || e, l = {
27
+ ...b[a],
28
+ ...p[i],
29
+ cursor: n ? "not-allowed" : "pointer",
30
+ opacity: n ? 0.6 : 1,
31
+ width: s ? "100%" : void 0,
32
+ display: "inline-flex",
33
+ alignItems: "center",
34
+ justifyContent: "center",
35
+ borderRadius: "0.375rem",
36
+ fontWeight: 500,
37
+ transition: "opacity 0.15s ease",
38
+ boxSizing: "border-box",
39
+ ...m
40
+ };
41
+ return /* @__PURE__ */ o("button", { type: "button", disabled: n, style: l, "aria-busy": e, ...c, children: e ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: "…" }) : t });
42
+ };
43
+ export {
44
+ g as B
45
+ };
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+
@@ -0,0 +1 @@
1
+ "use strict";const F={brand:{primary:"#0066CC",secondary:"#004499",accent:"#FF6B35"},neutral:{0:"#FFFFFF",50:"#F8F9FA",100:"#F1F3F5",200:"#E9ECEF",300:"#DEE2E6",400:"#CED4DA",500:"#ADB5BD",600:"#6C757D",700:"#495057",800:"#343A40",900:"#212529",1e3:"#000000"},semantic:{success:"#2D9D5C",warning:"#F59E0B",error:"#DC2626",info:"#0EA5E9"}};exports.colors=F;
@@ -0,0 +1,30 @@
1
+ const F = {
2
+ brand: {
3
+ primary: "#0066CC",
4
+ secondary: "#004499",
5
+ accent: "#FF6B35"
6
+ },
7
+ neutral: {
8
+ 0: "#FFFFFF",
9
+ 50: "#F8F9FA",
10
+ 100: "#F1F3F5",
11
+ 200: "#E9ECEF",
12
+ 300: "#DEE2E6",
13
+ 400: "#CED4DA",
14
+ 500: "#ADB5BD",
15
+ 600: "#6C757D",
16
+ 700: "#495057",
17
+ 800: "#343A40",
18
+ 900: "#212529",
19
+ 1e3: "#000000"
20
+ },
21
+ semantic: {
22
+ success: "#2D9D5C",
23
+ warning: "#F59E0B",
24
+ error: "#DC2626",
25
+ info: "#0EA5E9"
26
+ }
27
+ };
28
+ export {
29
+ F as c
30
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../Button-2sDtGC4a.cjs");exports.Button=t.Button;
@@ -0,0 +1,4 @@
1
+ import { B as r } from "../Button-D8bzLGuo.js";
2
+ export {
3
+ r as Button
4
+ };
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Button-2sDtGC4a.cjs"),o=require("./colors-CLrPlKf3.cjs"),t=require("./tokens/index.cjs");exports.Button=e.Button;exports.colors=o.colors;exports.fontFamily=t.fontFamily;exports.fontSize=t.fontSize;exports.fontWeight=t.fontWeight;exports.lineHeight=t.lineHeight;exports.spacing=t.spacing;
package/dist/index.mjs ADDED
@@ -0,0 +1,12 @@
1
+ import { B as e } from "./Button-D8bzLGuo.js";
2
+ import { c as f } from "./colors-Cwz6P253.js";
3
+ import { fontFamily as n, fontSize as a, fontWeight as m, lineHeight as p, spacing as s } from "./tokens/index.mjs";
4
+ export {
5
+ e as Button,
6
+ f as colors,
7
+ n as fontFamily,
8
+ a as fontSize,
9
+ m as fontWeight,
10
+ p as lineHeight,
11
+ s as spacing
12
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../colors-CLrPlKf3.cjs"),r={0:"0rem",1:"0.25rem",2:"0.5rem",3:"0.75rem",4:"1rem",5:"1.25rem",6:"1.5rem",8:"2rem",10:"2.5rem",12:"3rem",16:"4rem",20:"5rem",24:"6rem"},o={sans:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",mono:"'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace"},m={xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem"},t={regular:400,medium:500,semibold:600,bold:700},n={tight:"1.25",normal:"1.5",relaxed:"1.75"};exports.colors=e.colors;exports.fontFamily=o;exports.fontSize=m;exports.fontWeight=t;exports.lineHeight=n;exports.spacing=r;
@@ -0,0 +1,45 @@
1
+ import { c as a } from "../colors-Cwz6P253.js";
2
+ const e = {
3
+ 0: "0rem",
4
+ 1: "0.25rem",
5
+ 2: "0.5rem",
6
+ 3: "0.75rem",
7
+ 4: "1rem",
8
+ 5: "1.25rem",
9
+ 6: "1.5rem",
10
+ 8: "2rem",
11
+ 10: "2.5rem",
12
+ 12: "3rem",
13
+ 16: "4rem",
14
+ 20: "5rem",
15
+ 24: "6rem"
16
+ }, m = {
17
+ sans: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",
18
+ mono: "'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace"
19
+ }, r = {
20
+ xs: "0.75rem",
21
+ sm: "0.875rem",
22
+ md: "1rem",
23
+ lg: "1.125rem",
24
+ xl: "1.25rem",
25
+ "2xl": "1.5rem",
26
+ "3xl": "1.875rem",
27
+ "4xl": "2.25rem"
28
+ }, o = {
29
+ regular: 400,
30
+ medium: 500,
31
+ semibold: 600,
32
+ bold: 700
33
+ }, s = {
34
+ tight: "1.25",
35
+ normal: "1.5",
36
+ relaxed: "1.75"
37
+ };
38
+ export {
39
+ a as colors,
40
+ m as fontFamily,
41
+ r as fontSize,
42
+ o as fontWeight,
43
+ s as lineHeight,
44
+ e as spacing
45
+ };
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@coresystems/ui-kit",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "description": "React component library and design tokens for coresystems",
6
+ "license": "MIT",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "type": "module",
11
+ "sideEffects": false,
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.mjs",
16
+ "require": "./dist/index.cjs"
17
+ },
18
+ "./components": {
19
+ "types": "./dist/components/index.d.ts",
20
+ "import": "./dist/components/index.mjs",
21
+ "require": "./dist/components/index.cjs"
22
+ },
23
+ "./charts": {
24
+ "types": "./dist/charts/index.d.ts",
25
+ "import": "./dist/charts/index.mjs",
26
+ "require": "./dist/charts/index.cjs"
27
+ },
28
+ "./tokens": {
29
+ "types": "./dist/tokens/index.d.ts",
30
+ "import": "./dist/tokens/index.mjs",
31
+ "require": "./dist/tokens/index.cjs"
32
+ }
33
+ },
34
+ "main": "dist/index.cjs",
35
+ "module": "dist/index.mjs",
36
+ "types": "dist/index.d.ts",
37
+ "files": [
38
+ "dist"
39
+ ],
40
+ "devDependencies": {
41
+ "@testing-library/jest-dom": "^6.9.1",
42
+ "@testing-library/react": "^16.3.2",
43
+ "@testing-library/user-event": "^14.6.1",
44
+ "@types/react": "^19.2.14",
45
+ "@types/react-dom": "^19.2.3",
46
+ "@vitejs/plugin-react": "^5.1.4",
47
+ "jsdom": "^28.0.0",
48
+ "react": "^19.2.4",
49
+ "react-dom": "^19.2.4",
50
+ "typescript": "^5.9.3",
51
+ "vite": "^7.3.1",
52
+ "vite-plugin-dts": "^4.5.4",
53
+ "vitest": "^4.0.18",
54
+ "@coresystems/config-typescript": "0.1.0",
55
+ "@coresystems/config-vite": "0.1.0"
56
+ },
57
+ "peerDependencies": {
58
+ "react": "^18.2.0 || ^19.0.0",
59
+ "react-dom": "^18.2.0 || ^19.0.0",
60
+ "recharts": "^2.13.0"
61
+ },
62
+ "peerDependenciesMeta": {
63
+ "recharts": {
64
+ "optional": true
65
+ }
66
+ },
67
+ "scripts": {
68
+ "build": "vite build",
69
+ "typecheck": "tsc --noEmit",
70
+ "test": "vitest run",
71
+ "test:watch": "vitest"
72
+ }
73
+ }