@coresystems/ui-kit 0.1.0 → 1.0.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/dist/{Button-D8bzLGuo.js → Button-BShM0joj.js} +23 -10
- package/dist/Button-DW2zPtpm.cjs +1 -0
- package/dist/charts/index.d.ts +1 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +86 -0
- package/dist/index.mjs +1 -1
- package/dist/tokens/index.d.ts +3 -0
- package/dist/ui-kit.css +1 -0
- package/package.json +15 -10
- package/dist/Button-2sDtGC4a.cjs +0 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { c as r } from "./colors-Cwz6P253.js";
|
|
3
|
-
const b = {
|
|
3
|
+
const b = "_dassS_1sj1e_1", p = {
|
|
4
|
+
dassS: b
|
|
5
|
+
}, y = {
|
|
4
6
|
sm: { padding: "0.25rem 0.75rem", fontSize: "0.875rem", height: "2rem" },
|
|
5
7
|
md: { padding: "0.5rem 1rem", fontSize: "1rem", height: "2.5rem" },
|
|
6
8
|
lg: { padding: "0.75rem 1.5rem", fontSize: "1.125rem", height: "3rem" }
|
|
7
|
-
},
|
|
9
|
+
}, f = {
|
|
8
10
|
primary: { background: r.brand.primary, color: "#fff", border: "none" },
|
|
9
11
|
secondary: {
|
|
10
12
|
background: "transparent",
|
|
@@ -13,22 +15,22 @@ const b = {
|
|
|
13
15
|
},
|
|
14
16
|
ghost: { background: "transparent", color: r.neutral[700], border: "none" },
|
|
15
17
|
danger: { background: r.semantic.error, color: "#fff", border: "none" }
|
|
16
|
-
},
|
|
18
|
+
}, h = ({
|
|
17
19
|
children: t,
|
|
18
|
-
variant:
|
|
20
|
+
variant: s = "primary",
|
|
19
21
|
size: a = "md",
|
|
20
22
|
loading: e = !1,
|
|
21
|
-
fullWidth:
|
|
23
|
+
fullWidth: i = !1,
|
|
22
24
|
disabled: d,
|
|
23
25
|
style: m,
|
|
24
26
|
...c
|
|
25
27
|
}) => {
|
|
26
28
|
const n = d || e, l = {
|
|
27
|
-
...
|
|
28
|
-
...
|
|
29
|
+
...y[a],
|
|
30
|
+
...f[s],
|
|
29
31
|
cursor: n ? "not-allowed" : "pointer",
|
|
30
32
|
opacity: n ? 0.6 : 1,
|
|
31
|
-
width:
|
|
33
|
+
width: i ? "100%" : void 0,
|
|
32
34
|
display: "inline-flex",
|
|
33
35
|
alignItems: "center",
|
|
34
36
|
justifyContent: "center",
|
|
@@ -38,8 +40,19 @@ const b = {
|
|
|
38
40
|
boxSizing: "border-box",
|
|
39
41
|
...m
|
|
40
42
|
};
|
|
41
|
-
return /* @__PURE__ */ o(
|
|
43
|
+
return /* @__PURE__ */ o(
|
|
44
|
+
"button",
|
|
45
|
+
{
|
|
46
|
+
type: "button",
|
|
47
|
+
disabled: n,
|
|
48
|
+
style: l,
|
|
49
|
+
className: p.dassS,
|
|
50
|
+
"aria-busy": e,
|
|
51
|
+
...c,
|
|
52
|
+
children: e ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: "…" }) : t
|
|
53
|
+
}
|
|
54
|
+
);
|
|
42
55
|
};
|
|
43
56
|
export {
|
|
44
|
-
|
|
57
|
+
h as B
|
|
45
58
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),r=require("./colors-CLrPlKf3.cjs"),b="_dassS_1sj1e_1",u={dassS:b},p={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"}},y={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"}},f=({children:s,variant:t="primary",size:a="md",loading:e=!1,fullWidth:i=!1,disabled:d,style:c,...l})=>{const o=d||e,m={...p[a],...y[t],cursor:o?"not-allowed":"pointer",opacity:o?.6:1,width:i?"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,className:u.dassS,"aria-busy":e,...l,children:e?n.jsx("span",{"aria-hidden":"true",children:"…"}):s})};exports.Button=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../Button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../Button-DW2zPtpm.cjs");exports.Button=t.Button;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './button';
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Button-DW2zPtpm.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.d.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export declare const colors: {
|
|
2
|
+
readonly brand: {
|
|
3
|
+
readonly primary: "#0066CC";
|
|
4
|
+
readonly secondary: "#004499";
|
|
5
|
+
readonly accent: "#FF6B35";
|
|
6
|
+
};
|
|
7
|
+
readonly neutral: {
|
|
8
|
+
readonly 0: "#FFFFFF";
|
|
9
|
+
readonly 50: "#F8F9FA";
|
|
10
|
+
readonly 100: "#F1F3F5";
|
|
11
|
+
readonly 200: "#E9ECEF";
|
|
12
|
+
readonly 300: "#DEE2E6";
|
|
13
|
+
readonly 400: "#CED4DA";
|
|
14
|
+
readonly 500: "#ADB5BD";
|
|
15
|
+
readonly 600: "#6C757D";
|
|
16
|
+
readonly 700: "#495057";
|
|
17
|
+
readonly 800: "#343A40";
|
|
18
|
+
readonly 900: "#212529";
|
|
19
|
+
readonly 1000: "#000000";
|
|
20
|
+
};
|
|
21
|
+
readonly semantic: {
|
|
22
|
+
readonly success: "#2D9D5C";
|
|
23
|
+
readonly warning: "#F59E0B";
|
|
24
|
+
readonly error: "#DC2626";
|
|
25
|
+
readonly info: "#0EA5E9";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export declare type ColorScale = typeof colors;
|
|
30
|
+
|
|
31
|
+
export declare type FontFamily = typeof fontFamily;
|
|
32
|
+
|
|
33
|
+
export declare const fontFamily: {
|
|
34
|
+
readonly sans: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif";
|
|
35
|
+
readonly mono: "'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace";
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export declare type FontSize = typeof fontSize;
|
|
39
|
+
|
|
40
|
+
export declare const fontSize: {
|
|
41
|
+
readonly xs: "0.75rem";
|
|
42
|
+
readonly sm: "0.875rem";
|
|
43
|
+
readonly md: "1rem";
|
|
44
|
+
readonly lg: "1.125rem";
|
|
45
|
+
readonly xl: "1.25rem";
|
|
46
|
+
readonly '2xl': "1.5rem";
|
|
47
|
+
readonly '3xl': "1.875rem";
|
|
48
|
+
readonly '4xl': "2.25rem";
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export declare type FontWeight = typeof fontWeight;
|
|
52
|
+
|
|
53
|
+
export declare const fontWeight: {
|
|
54
|
+
readonly regular: 400;
|
|
55
|
+
readonly medium: 500;
|
|
56
|
+
readonly semibold: 600;
|
|
57
|
+
readonly bold: 700;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export declare type LineHeight = typeof lineHeight;
|
|
61
|
+
|
|
62
|
+
export declare const lineHeight: {
|
|
63
|
+
readonly tight: "1.25";
|
|
64
|
+
readonly normal: "1.5";
|
|
65
|
+
readonly relaxed: "1.75";
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare const spacing: {
|
|
69
|
+
readonly 0: "0rem";
|
|
70
|
+
readonly 1: "0.25rem";
|
|
71
|
+
readonly 2: "0.5rem";
|
|
72
|
+
readonly 3: "0.75rem";
|
|
73
|
+
readonly 4: "1rem";
|
|
74
|
+
readonly 5: "1.25rem";
|
|
75
|
+
readonly 6: "1.5rem";
|
|
76
|
+
readonly 8: "2rem";
|
|
77
|
+
readonly 10: "2.5rem";
|
|
78
|
+
readonly 12: "3rem";
|
|
79
|
+
readonly 16: "4rem";
|
|
80
|
+
readonly 20: "5rem";
|
|
81
|
+
readonly 24: "6rem";
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export declare type SpacingScale = typeof spacing;
|
|
85
|
+
|
|
86
|
+
export { }
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as e } from "./Button-
|
|
1
|
+
import { B as e } from "./Button-BShM0joj.js";
|
|
2
2
|
import { c as f } from "./colors-Cwz6P253.js";
|
|
3
3
|
import { fontFamily as n, fontSize as a, fontWeight as m, lineHeight as p, spacing as s } from "./tokens/index.mjs";
|
|
4
4
|
export {
|
package/dist/ui-kit.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._dassS_1sj1e_1{z-index:1;display:inline;width:200;padding:auto}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coresystems/ui-kit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "React component library and design tokens for coresystems",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,21 +38,24 @@
|
|
|
38
38
|
"dist"
|
|
39
39
|
],
|
|
40
40
|
"devDependencies": {
|
|
41
|
+
"@storybook/react-vite": "^10.2.13",
|
|
41
42
|
"@testing-library/jest-dom": "^6.9.1",
|
|
42
43
|
"@testing-library/react": "^16.3.2",
|
|
43
44
|
"@testing-library/user-event": "^14.6.1",
|
|
44
45
|
"@types/react": "^19.2.14",
|
|
45
46
|
"@types/react-dom": "^19.2.3",
|
|
46
|
-
"
|
|
47
|
+
"eslint": "10.0.2",
|
|
47
48
|
"jsdom": "^28.0.0",
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
49
|
+
"lint-staged": "16.2.7",
|
|
50
|
+
"prettier": "3.8.1",
|
|
51
|
+
"stylelint": "16.26.1",
|
|
52
|
+
"typescript": "5.9.3",
|
|
51
53
|
"vite": "^7.3.1",
|
|
52
|
-
"vite-plugin-dts": "^4.5.4",
|
|
53
54
|
"vitest": "^4.0.18",
|
|
54
|
-
"@coresystems/config-
|
|
55
|
-
"@coresystems/config-
|
|
55
|
+
"@coresystems/config-eslint": "2.0.0",
|
|
56
|
+
"@coresystems/config-typescript": "2.0.0",
|
|
57
|
+
"@coresystems/config-stylelint": "2.0.0",
|
|
58
|
+
"@coresystems/config-vite": "2.0.0"
|
|
56
59
|
},
|
|
57
60
|
"peerDependencies": {
|
|
58
61
|
"react": "^18.2.0 || ^19.0.0",
|
|
@@ -66,8 +69,10 @@
|
|
|
66
69
|
},
|
|
67
70
|
"scripts": {
|
|
68
71
|
"build": "vite build",
|
|
69
|
-
"typecheck": "tsc --noEmit",
|
|
70
72
|
"test": "vitest run",
|
|
71
|
-
"test:watch": "vitest"
|
|
73
|
+
"test:watch": "vitest",
|
|
74
|
+
"types:check": "tsc --noEmit",
|
|
75
|
+
"lint": "eslint . --cache --fix && stylelint \"**/*.{css,scss}\" --cache --fix",
|
|
76
|
+
"lint:check": "eslint . --cache && stylelint \"**/*.{css,scss}\" --cache"
|
|
72
77
|
}
|
|
73
78
|
}
|
package/dist/Button-2sDtGC4a.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;
|