@ismail-elkorchi/ui-tokens 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,18 @@
1
+ # @ismail-elkorchi/ui-tokens
2
+
3
+ CSS-only design tokens. Load them before Tailwind so the variables are available to `@ismail-elkorchi/ui-primitives` and `@ismail-elkorchi/ui-shell`.
4
+
5
+ ## Usage
6
+
7
+ ```css
8
+ @import '@ismail-elkorchi/ui-tokens/index.css';
9
+ @import 'tailwindcss';
10
+ ```
11
+
12
+ `index.css` forwards to `theme.css`, which defines Tailwind v4 `@layer base` variables plus a matching `@theme` block.
13
+
14
+ ## Build & distribution
15
+
16
+ - `npm run build` copies `index.css` and `theme.css` into `dist/`.
17
+ - Exported entrypoints resolve to `dist/index.css` and `dist/theme.css`.
18
+ - Published output includes only `dist/` and this README; workspace CSS sources stay local.
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ @import './theme.css';
package/dist/theme.css ADDED
@@ -0,0 +1,45 @@
1
+ @layer base {
2
+ :root {
3
+ --background: 240 10% 3.9%;
4
+ --foreground: 0 0% 98%;
5
+ --card: 240 10% 3.9%;
6
+ --card-foreground: 0 0% 98%;
7
+ --popover: 240 10% 3.9%;
8
+ --popover-foreground: 0 0% 98%;
9
+ --primary: 0 0% 98%;
10
+ --primary-foreground: 240 5.9% 10%;
11
+ --secondary: 240 3.7% 15.9%;
12
+ --secondary-foreground: 0 0% 98%;
13
+ --muted: 240 3.7% 15.9%;
14
+ --muted-foreground: 240 5% 64.9%;
15
+ --accent: 240 3.7% 15.9%;
16
+ --accent-foreground: 0 0% 98%;
17
+ --destructive: 0 62.8% 30.6%;
18
+ --destructive-foreground: 0 0% 98%;
19
+ --border: 240 3.7% 15.9%;
20
+ --input: 240 3.7% 15.9%;
21
+ --ring: 240 4.9% 83.9%;
22
+ }
23
+ }
24
+
25
+ @theme {
26
+ --color-background: hsl(var(--background));
27
+ --color-foreground: hsl(var(--foreground));
28
+ --color-card: hsl(var(--card));
29
+ --color-card-foreground: hsl(var(--card-foreground));
30
+ --color-popover: hsl(var(--popover));
31
+ --color-popover-foreground: hsl(var(--popover-foreground));
32
+ --color-primary: hsl(var(--primary));
33
+ --color-primary-foreground: hsl(var(--primary-foreground));
34
+ --color-secondary: hsl(var(--secondary));
35
+ --color-secondary-foreground: hsl(var(--secondary-foreground));
36
+ --color-muted: hsl(var(--muted));
37
+ --color-muted-foreground: hsl(var(--muted-foreground));
38
+ --color-accent: hsl(var(--accent));
39
+ --color-accent-foreground: hsl(var(--accent-foreground));
40
+ --color-destructive: hsl(var(--destructive));
41
+ --color-destructive-foreground: hsl(var(--destructive-foreground));
42
+ --color-border: hsl(var(--border));
43
+ --color-input: hsl(var(--input));
44
+ --color-ring: hsl(var(--ring));
45
+ }
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@ismail-elkorchi/ui-tokens",
3
+ "version": "0.1.0",
4
+ "description": "CSS design tokens packaged as reusable variables for any UI.",
5
+ "author": "Ismail El Korchi",
6
+ "license": "Apache-2.0",
7
+ "type": "module",
8
+ "keywords": ["design-tokens", "css-variables", "theme", "ui-kit"],
9
+ "engines": {"node": ">=20.11"},
10
+ "style": "./dist/index.css",
11
+ "exports": {
12
+ ".": "./dist/index.css",
13
+ "./index.css": "./dist/index.css",
14
+ "./theme.css": "./dist/theme.css"
15
+ },
16
+ "sideEffects": [
17
+ "./dist/**/*.css"
18
+ ],
19
+ "files": [
20
+ "dist",
21
+ "README.md"
22
+ ],
23
+ "scripts": {
24
+ "build": "npm run clean && node -e \"const fs = require('fs'); fs.mkdirSync('dist', {recursive: true}); ['index.css', 'theme.css'].forEach(file => fs.copyFileSync(file, 'dist/' + file));\"",
25
+ "clean": "node -e \"const fs = require('fs'); fs.rmSync('dist', {recursive: true, force: true});\"",
26
+ "typecheck": "echo \"Skipping typecheck for CSS-only package\"",
27
+ "prepack": "npm run build"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/Ismail-elkorchi/ui-kit.git",
32
+ "directory": "packages/ui-tokens"
33
+ },
34
+ "bugs": {
35
+ "url": "https://github.com/Ismail-elkorchi/ui-kit/issues"
36
+ },
37
+ "homepage": "https://github.com/Ismail-elkorchi/ui-kit",
38
+ "publishConfig": {
39
+ "access": "public"
40
+ }
41
+ }