@boriaui/tokens 0.0.0-stage → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Burhan Aghazada
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 CHANGED
@@ -1,3 +1,49 @@
1
- # Temporary Holding Version
1
+ # @boriaui/tokens
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Design tokens and the Tailwind CSS v4 theme for [Boria UI](https://boriaui.vercel.app).
4
+ Token names follow [shadcn/ui](https://ui.shadcn.com) (`--primary`, `--card`, `--sidebar-*`, …), so shadcn registry blocks work unchanged.
5
+
6
+ ## Install
7
+
8
+ ```sh
9
+ pnpm add @boriaui/tokens tailwindcss
10
+ ```
11
+
12
+ ## CSS setup
13
+
14
+ ```css
15
+ /* app.css */
16
+ @import "tailwindcss";
17
+ @import "@boriaui/tokens";
18
+ ```
19
+
20
+ The default entry includes `tw-animate-css`, the token → Tailwind mapping (`theme.css`) and the default theme (`themes/default.css`). Dark mode is class-based: add `dark` to `<html>`.
21
+
22
+ Parts can be imported separately:
23
+
24
+ ```css
25
+ @import "@boriaui/tokens/theme.css";
26
+ @import "@boriaui/tokens/themes/default.css";
27
+ ```
28
+
29
+ ## Theme override
30
+
31
+ Override any token after the import:
32
+
33
+ ```css
34
+ :root {
35
+ --primary: oklch(0.55 0.2 260);
36
+ --primary-foreground: oklch(0.98 0 0);
37
+ --radius: 0.5rem;
38
+ }
39
+
40
+ .dark {
41
+ --primary: oklch(0.7 0.15 260);
42
+ }
43
+ ```
44
+
45
+ Several themes in one app: scope overrides with an attribute, e.g. `[data-theme="ocean"] { --primary: …; }`.
46
+
47
+ ## License
48
+
49
+ MIT
package/index.css ADDED
@@ -0,0 +1,15 @@
1
+ /*
2
+ Boria UI tokens — default entry.
3
+
4
+ Usage in an app stylesheet (Tailwind v4):
5
+
6
+ @import "tailwindcss";
7
+ @import "@boriaui/tokens";
8
+ @source "../node_modules/@boriaui/react/dist";
9
+
10
+ Override any token after the import to theme the app, e.g.
11
+ :root { --primary: oklch(0.55 0.2 260); --radius: 0.5rem; }
12
+ */
13
+ @import 'tw-animate-css';
14
+ @import './theme.css';
15
+ @import './themes/default.css';
package/package.json CHANGED
@@ -1,6 +1,45 @@
1
1
  {
2
2
  "name": "@boriaui/tokens",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Boria UI — design tokens and Tailwind v4 theme",
5
+ "license": "MIT",
6
+ "author": "Burhan Aghazada",
7
+ "homepage": "https://boriaui.vercel.app",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/ab192130/boriaui.git",
11
+ "directory": "packages/tokens"
12
+ },
13
+ "keywords": [
14
+ "tailwindcss",
15
+ "design-tokens",
16
+ "css-variables",
17
+ "theme",
18
+ "shadcn",
19
+ "design-system"
20
+ ],
21
+ "type": "module",
22
+ "files": [
23
+ "index.css",
24
+ "theme.css",
25
+ "themes"
26
+ ],
27
+ "exports": {
28
+ ".": {
29
+ "style": "./index.css",
30
+ "default": "./index.css"
31
+ },
32
+ "./theme.css": "./theme.css",
33
+ "./themes/*": "./themes/*",
34
+ "./package.json": "./package.json"
35
+ },
36
+ "dependencies": {
37
+ "tw-animate-css": "^1.4.0"
38
+ },
39
+ "peerDependencies": {
40
+ "tailwindcss": "^4.0.0"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ }
45
+ }
package/theme.css ADDED
@@ -0,0 +1,105 @@
1
+ /*
2
+ Token → Tailwind mapping, base styles and shared utilities.
3
+ Contains no colour values: those live in themes/*.css.
4
+ Token names follow shadcn/ui so shadcn registry blocks work unchanged.
5
+ */
6
+ @custom-variant dark (&:is(.dark *));
7
+
8
+ @theme inline {
9
+
10
+ --color-background: var(--background);
11
+ --color-foreground: var(--foreground);
12
+ --color-card: var(--card);
13
+ --color-card-foreground: var(--card-foreground);
14
+ --color-popover: var(--popover);
15
+ --color-popover-foreground: var(--popover-foreground);
16
+ --color-primary: var(--primary);
17
+ --color-primary-foreground: var(--primary-foreground);
18
+ --color-secondary: var(--secondary);
19
+ --color-secondary-foreground: var(--secondary-foreground);
20
+ --color-muted: var(--muted);
21
+ --color-muted-foreground: var(--muted-foreground);
22
+ --color-accent: var(--accent);
23
+ --color-accent-foreground: var(--accent-foreground);
24
+ --color-destructive: var(--destructive);
25
+ --color-destructive-foreground: var(--destructive-foreground);
26
+ --color-border: var(--border);
27
+ --color-input: var(--input);
28
+ --color-ring: var(--ring);
29
+ --color-overlay: var(--overlay);
30
+
31
+ --color-chart-1: var(--chart-1);
32
+ --color-chart-2: var(--chart-2);
33
+ --color-chart-3: var(--chart-3);
34
+ --color-chart-4: var(--chart-4);
35
+ --color-chart-5: var(--chart-5);
36
+
37
+ --color-sidebar: var(--sidebar);
38
+ --color-sidebar-foreground: var(--sidebar-foreground);
39
+ --color-sidebar-primary: var(--sidebar-primary);
40
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
41
+ --color-sidebar-accent: var(--sidebar-accent);
42
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
43
+ --color-sidebar-border: var(--sidebar-border);
44
+ --color-sidebar-ring: var(--sidebar-ring);
45
+
46
+ --radius-sm: calc(var(--radius) - 4px);
47
+ --radius-md: calc(var(--radius) - 2px);
48
+ --radius-lg: var(--radius);
49
+ --radius-xl: calc(var(--radius) + 4px);
50
+ }
51
+
52
+ @layer base {
53
+ * {
54
+ @apply border-border outline-ring/50;
55
+ }
56
+ body {
57
+ @apply bg-background text-foreground font-sans antialiased;
58
+ }
59
+ }
60
+
61
+ /* Disables colour transitions while the theme switches (set by ThemeProvider
62
+ with `disableTransitionOnChange`). Unlayered so it is always emitted. */
63
+ html.theme-transition-disabled,
64
+ html.theme-transition-disabled *,
65
+ html.theme-transition-disabled *::before,
66
+ html.theme-transition-disabled *::after {
67
+ transition: none !important;
68
+ }
69
+
70
+ @utility scroll-gradient {
71
+ position: relative;
72
+ &::after {
73
+ content: '';
74
+ position: absolute;
75
+ bottom: 0;
76
+ left: 0;
77
+ right: 0;
78
+ height: 50px;
79
+ background: linear-gradient(to bottom, transparent 0%, var(--background) 100%);
80
+ pointer-events: none;
81
+ z-index: 10;
82
+ }
83
+ }
84
+ @utility scroll-gradient-sm {
85
+ &::after { height: 30px; }
86
+ }
87
+ @utility scroll-gradient-lg {
88
+ &::after { height: 70px; }
89
+ }
90
+ @utility scrollbar-gutter-stable {
91
+ scrollbar-gutter: stable;
92
+ }
93
+ @utility no-scrollbar {
94
+ -ms-overflow-style: none;
95
+ scrollbar-width: none;
96
+ &::-webkit-scrollbar { display: none; }
97
+ }
98
+
99
+ @keyframes indeterminate-progress {
100
+ 0% { transform: translateX(-100%); }
101
+ 100% { transform: translateX(100%); }
102
+ }
103
+ @utility animate-indeterminate {
104
+ animation: indeterminate-progress 1.5s ease-in-out infinite;
105
+ }
@@ -0,0 +1,86 @@
1
+ /*
2
+ Default theme (neutral zinc). Values are full colours (shadcn v4 format).
3
+ `.light` re-scopes light tokens inside a dark page (e.g. theme previews).
4
+ */
5
+ .light,
6
+ :root {
7
+ --radius: 0.75rem;
8
+ --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
9
+ 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
10
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
11
+ 'Liberation Mono', 'Courier New', monospace;
12
+
13
+ --background: hsl(0 0% 100%);
14
+ --foreground: hsl(240 10% 3.9%);
15
+ --card: hsl(0 0% 100%);
16
+ --card-foreground: hsl(240 10% 3.9%);
17
+ --popover: hsl(0 0% 100%);
18
+ --popover-foreground: hsl(240 10% 3.9%);
19
+ --primary: hsl(240 5.9% 10%);
20
+ --primary-foreground: hsl(0 0% 98%);
21
+ --secondary: hsl(240 4.8% 95.9%);
22
+ --secondary-foreground: hsl(240 5.9% 10%);
23
+ --muted: hsl(240 4.8% 95.9%);
24
+ --muted-foreground: hsl(240 3.8% 46.1%);
25
+ --accent: hsl(240 4.8% 95.9%);
26
+ --accent-foreground: hsl(240 5.9% 10%);
27
+ --destructive: hsl(0 84.2% 60.2%);
28
+ --destructive-foreground: hsl(0 0% 98%);
29
+ --border: hsl(240 5.9% 90%);
30
+ --input: hsl(240 5.9% 90%);
31
+ --ring: hsl(240 10% 3.9%);
32
+ --overlay: hsl(0 0% 0% / 0.8);
33
+
34
+ --chart-1: hsl(12 76% 61%);
35
+ --chart-2: hsl(173 58% 39%);
36
+ --chart-3: hsl(197 37% 24%);
37
+ --chart-4: hsl(43 74% 66%);
38
+ --chart-5: hsl(27 87% 67%);
39
+
40
+ --sidebar: hsl(0 0% 98%);
41
+ --sidebar-foreground: hsl(240 5.3% 26.1%);
42
+ --sidebar-primary: hsl(240 5.9% 10%);
43
+ --sidebar-primary-foreground: hsl(0 0% 98%);
44
+ --sidebar-accent: hsl(240 4.8% 95.9%);
45
+ --sidebar-accent-foreground: hsl(240 5.9% 10%);
46
+ --sidebar-border: hsl(220 13% 91%);
47
+ --sidebar-ring: hsl(217.2 91.2% 59.8%);
48
+ }
49
+
50
+ .dark {
51
+ --background: hsl(240 10% 3.9%);
52
+ --foreground: hsl(0 0% 98%);
53
+ --card: hsl(240 10% 3.9%);
54
+ --card-foreground: hsl(0 0% 98%);
55
+ --popover: hsl(240 10% 3.9%);
56
+ --popover-foreground: hsl(0 0% 98%);
57
+ --primary: hsl(0 0% 98%);
58
+ --primary-foreground: hsl(240 5.9% 10%);
59
+ --secondary: hsl(240 3.7% 15.9%);
60
+ --secondary-foreground: hsl(0 0% 98%);
61
+ --muted: hsl(240 3.7% 15.9%);
62
+ --muted-foreground: hsl(240 5% 64.9%);
63
+ --accent: hsl(240 3.7% 15.9%);
64
+ --accent-foreground: hsl(0 0% 98%);
65
+ --destructive: hsl(0 62.8% 30.6%);
66
+ --destructive-foreground: hsl(0 0% 98%);
67
+ --border: hsl(240 3.7% 15.9%);
68
+ --input: hsl(240 3.7% 15.9%);
69
+ --ring: hsl(240 4.9% 83.9%);
70
+ --overlay: hsl(0 0% 0% / 0.8);
71
+
72
+ --chart-1: hsl(220 70% 50%);
73
+ --chart-2: hsl(160 60% 45%);
74
+ --chart-3: hsl(30 80% 55%);
75
+ --chart-4: hsl(280 65% 60%);
76
+ --chart-5: hsl(340 75% 55%);
77
+
78
+ --sidebar: hsl(240 5.9% 10%);
79
+ --sidebar-foreground: hsl(240 4.8% 95.9%);
80
+ --sidebar-primary: hsl(224.3 76.3% 48%);
81
+ --sidebar-primary-foreground: hsl(0 0% 100%);
82
+ --sidebar-accent: hsl(240 3.7% 15.9%);
83
+ --sidebar-accent-foreground: hsl(240 4.8% 95.9%);
84
+ --sidebar-border: hsl(240 3.7% 15.9%);
85
+ --sidebar-ring: hsl(217.2 91.2% 59.8%);
86
+ }