@evinvest/uikit 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 +162 -0
- package/dist/index.d.ts +1183 -0
- package/dist/index.js +6722 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -0
- package/styles/tokens.css +106 -0
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@evinvest/uikit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Dep-light React UI kit: shadcn-semantics components with zero @radix-ui / cva, mirroring the ev::uikit Rust feature. Ships the shared design tokens.",
|
|
5
|
+
"license": "BlueOak-1.0.0",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/EV-invest/lib.git",
|
|
12
|
+
"directory": "ts/uikit"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./styles/tokens.css": "./styles/tokens.css"
|
|
21
|
+
},
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"styles"
|
|
27
|
+
],
|
|
28
|
+
"sideEffects": [
|
|
29
|
+
"*.css"
|
|
30
|
+
],
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=20"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsup",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"typecheck": "tsc --noEmit",
|
|
38
|
+
"prepare": "tsup"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"react": "^18 || ^19",
|
|
42
|
+
"react-dom": "^18 || ^19"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"clsx": "^2.1.1",
|
|
46
|
+
"tailwind-merge": "^3.3.1"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
50
|
+
"@testing-library/react": "^16.1.0",
|
|
51
|
+
"@types/node": "^22.10.0",
|
|
52
|
+
"@types/react": "^19.0.0",
|
|
53
|
+
"@types/react-dom": "^19.0.0",
|
|
54
|
+
"jsdom": "^25.0.1",
|
|
55
|
+
"react": "^19.2.1",
|
|
56
|
+
"react-dom": "^19.2.1",
|
|
57
|
+
"tsup": "^8.3.5",
|
|
58
|
+
"typescript": "^5.7.2",
|
|
59
|
+
"vitest": "^2.1.8"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Shared design tokens — the theme contract for the `ev::uikit` (Rust) and
|
|
3
|
+
* `@evinvest/uikit` (TypeScript) components. Import this file from any Tailwind v4
|
|
4
|
+
* entrypoint. Kept byte-for-byte in parity with `@evinvest/uikit`'s
|
|
5
|
+
* `styles/tokens.css`; change one, change the other.
|
|
6
|
+
*
|
|
7
|
+
* Structure:
|
|
8
|
+
* @theme inline {} — wires values into Tailwind utilities (processed by
|
|
9
|
+
* Tailwind v4; ignored as unknown at-rule by browsers)
|
|
10
|
+
* :root {} — raw CSS custom properties; work everywhere
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@theme inline {
|
|
14
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
15
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
16
|
+
--radius-lg: var(--radius);
|
|
17
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
18
|
+
|
|
19
|
+
--font-sans: var(--font-inter), "Inter", ui-sans-serif, system-ui, sans-serif;
|
|
20
|
+
--font-serif: var(--font-playfair), "Playfair Display", ui-serif, Georgia, serif;
|
|
21
|
+
--font-mono: var(--font-inter), "Inter", ui-monospace, monospace;
|
|
22
|
+
|
|
23
|
+
/* shadcn semantic utilities */
|
|
24
|
+
--color-background: var(--background);
|
|
25
|
+
--color-foreground: var(--foreground);
|
|
26
|
+
--color-card: var(--card);
|
|
27
|
+
--color-card-foreground: var(--card-foreground);
|
|
28
|
+
--color-popover: var(--popover);
|
|
29
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
30
|
+
--color-primary: var(--primary);
|
|
31
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
32
|
+
--color-secondary: var(--secondary);
|
|
33
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
34
|
+
--color-muted: var(--muted);
|
|
35
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
36
|
+
--color-accent: var(--accent);
|
|
37
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
38
|
+
--color-destructive: var(--destructive);
|
|
39
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
40
|
+
--color-border: var(--border);
|
|
41
|
+
--color-input: var(--input);
|
|
42
|
+
--color-ring: var(--ring);
|
|
43
|
+
|
|
44
|
+
/* sidebar utilities (PC) */
|
|
45
|
+
--color-sidebar: var(--sidebar);
|
|
46
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
47
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
48
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
49
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
50
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
51
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
52
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
53
|
+
|
|
54
|
+
/*
|
|
55
|
+
* Brand palette — navy-led institutional base + tiered Vietnam-inspired accents.
|
|
56
|
+
* Named by ROLE, not hue. Tier hierarchy:
|
|
57
|
+
* t1 (Ha Long Teal) — recurring workhorse: labels, nav, secondary numbers
|
|
58
|
+
* t2 (Jungle Green) — positive financial signals: yields, growth %, FDI
|
|
59
|
+
* t3 (Rice Gold) — headline return figures: IRR, ROI, appreciation
|
|
60
|
+
* t4 (Lotus Pink) — ≤1 per section; the punctuation jewel
|
|
61
|
+
*/
|
|
62
|
+
--color-main-brand: #001e4e;
|
|
63
|
+
--color-main-black: #070d18;
|
|
64
|
+
--color-main-surface: #081020;
|
|
65
|
+
--color-main-card: #0c1626;
|
|
66
|
+
--color-main-mist: #e6e1d3;
|
|
67
|
+
--color-main-accent-t1: #2a9d8f;
|
|
68
|
+
--color-main-accent-t2: #2e9e5b;
|
|
69
|
+
--color-main-accent-t3: #f2c94c;
|
|
70
|
+
--color-main-accent-t4: #e58aae;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:root {
|
|
74
|
+
/* ── shadcn semantic tokens ──────────────────────────────────── */
|
|
75
|
+
--background: #070d18;
|
|
76
|
+
--foreground: white;
|
|
77
|
+
--card: #0c1626;
|
|
78
|
+
--card-foreground: white;
|
|
79
|
+
--popover: #0c1626;
|
|
80
|
+
--popover-foreground: white;
|
|
81
|
+
--primary: #001e4e;
|
|
82
|
+
--primary-foreground: #e6e1d3;
|
|
83
|
+
--secondary: #081020;
|
|
84
|
+
--secondary-foreground: white;
|
|
85
|
+
--muted: #16213a;
|
|
86
|
+
--muted-foreground: color-mix(in srgb, #e6e1d3 40%, transparent);
|
|
87
|
+
--accent: color-mix(in srgb, #e6e1d3 8%, transparent);
|
|
88
|
+
--accent-foreground: white;
|
|
89
|
+
--destructive: #da251d;
|
|
90
|
+
--destructive-foreground: #e6e1d3;
|
|
91
|
+
--border: color-mix(in srgb, #e6e1d3 10%, transparent);
|
|
92
|
+
--input: color-mix(in srgb, #e6e1d3 20%, transparent);
|
|
93
|
+
--ring: #2a9d8f;
|
|
94
|
+
--radius: 0.5rem;
|
|
95
|
+
|
|
96
|
+
/* ── sidebar (PC nav) ───────────────────────────────────────── */
|
|
97
|
+
--sidebar: #0c1626;
|
|
98
|
+
--sidebar-foreground: white;
|
|
99
|
+
--sidebar-primary: #001e4e;
|
|
100
|
+
--sidebar-primary-foreground: #e6e1d3;
|
|
101
|
+
--sidebar-accent: color-mix(in srgb, #e6e1d3 8%, transparent);
|
|
102
|
+
--sidebar-accent-foreground: white;
|
|
103
|
+
--sidebar-border: color-mix(in srgb, #e6e1d3 10%, transparent);
|
|
104
|
+
--sidebar-ring: #2a9d8f;
|
|
105
|
+
--sidebar-width: 14rem;
|
|
106
|
+
}
|