@simple-base/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/LICENSE +21 -0
- package/README.md +32 -0
- package/dist/tailwind.css +121 -0
- package/dist/tokens.css +2365 -0
- package/dist/tokens.d.ts +279 -0
- package/dist/tokens.js +2207 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Reda Salmi
|
|
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
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @simple-base/tokens
|
|
2
|
+
|
|
3
|
+
Generated design tokens for Simple Base.
|
|
4
|
+
|
|
5
|
+
## JavaScript and TypeScript
|
|
6
|
+
|
|
7
|
+
Use the package root for the resolver and token types:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { resolver, type Tokens } from "@simple-base/tokens";
|
|
11
|
+
|
|
12
|
+
const tokens: Tokens = resolver.apply({ theme: "simple-base-dark" });
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Stylesheets
|
|
16
|
+
|
|
17
|
+
Import CSS custom properties through a CSS-aware bundler:
|
|
18
|
+
|
|
19
|
+
```css
|
|
20
|
+
@import "@simple-base/tokens/css";
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For Tailwind CSS v4 integration, use the generated theme instead. It includes
|
|
24
|
+
Tailwind and the token stylesheet and requires Tailwind in the consuming project:
|
|
25
|
+
|
|
26
|
+
```css
|
|
27
|
+
@import "@simple-base/tokens/tailwind";
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Utilities reference the same semantic CSS variables as the component styles, so
|
|
31
|
+
`data-theme` works on the root or a nested region. Breakpoints are generated as
|
|
32
|
+
literal dimensions because CSS media queries cannot resolve custom properties.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* -------------------------------------------
|
|
2
|
+
* Autogenerated by ⛋ Terrazzo. DO NOT EDIT!
|
|
3
|
+
* template: ../src/tailwind.template.css
|
|
4
|
+
* ------------------------------------------- */
|
|
5
|
+
|
|
6
|
+
@import "tailwindcss";
|
|
7
|
+
@import "./tokens.css";
|
|
8
|
+
|
|
9
|
+
/* Inline aliases resolve semantic CSS roles in each element's theme scope. */
|
|
10
|
+
@theme inline {
|
|
11
|
+
--color-accent-on-surface: var(--sb-semantic-color-accent-on-surface);
|
|
12
|
+
--color-accent-soft: var(--sb-semantic-color-accent-soft);
|
|
13
|
+
--color-accent-surface: var(--sb-semantic-color-accent-surface);
|
|
14
|
+
--color-accent-text: var(--sb-semantic-color-accent-text);
|
|
15
|
+
--color-background-canvas: var(--sb-semantic-color-background-canvas);
|
|
16
|
+
--color-background-overlay: var(--sb-semantic-color-background-overlay);
|
|
17
|
+
--color-background-raised: var(--sb-semantic-color-background-raised);
|
|
18
|
+
--color-background-subtle: var(--sb-semantic-color-background-subtle);
|
|
19
|
+
--color-background-surface: var(--sb-semantic-color-background-surface);
|
|
20
|
+
--color-border-default: var(--sb-semantic-color-border-default);
|
|
21
|
+
--color-border-strong: var(--sb-semantic-color-border-strong);
|
|
22
|
+
--color-border-subtle: var(--sb-semantic-color-border-subtle);
|
|
23
|
+
--color-focus-danger-ring: var(--sb-semantic-color-focus-danger-ring);
|
|
24
|
+
--color-focus-ring: var(--sb-semantic-color-focus-ring);
|
|
25
|
+
--color-foreground-inverse: var(--sb-semantic-color-foreground-inverse);
|
|
26
|
+
--color-foreground-muted: var(--sb-semantic-color-foreground-muted);
|
|
27
|
+
--color-foreground-primary: var(--sb-semantic-color-foreground-primary);
|
|
28
|
+
--color-foreground-secondary: var(--sb-semantic-color-foreground-secondary);
|
|
29
|
+
--color-foreground-subtle: var(--sb-semantic-color-foreground-subtle);
|
|
30
|
+
--color-overlay-scrim: var(--sb-semantic-color-overlay-scrim);
|
|
31
|
+
--color-selection-background: var(--sb-semantic-color-selection-background);
|
|
32
|
+
--color-selection-foreground: var(--sb-semantic-color-selection-foreground);
|
|
33
|
+
--color-status-danger-base: var(--sb-semantic-color-status-danger-base);
|
|
34
|
+
--color-status-danger-on-surface: var(--sb-semantic-color-status-danger-on-surface);
|
|
35
|
+
--color-status-danger-soft: var(--sb-semantic-color-status-danger-soft);
|
|
36
|
+
--color-status-danger-surface: var(--sb-semantic-color-status-danger-surface);
|
|
37
|
+
--color-status-danger-text: var(--sb-semantic-color-status-danger-text);
|
|
38
|
+
--color-status-info-base: var(--sb-semantic-color-status-info-base);
|
|
39
|
+
--color-status-info-on-surface: var(--sb-semantic-color-status-info-on-surface);
|
|
40
|
+
--color-status-info-soft: var(--sb-semantic-color-status-info-soft);
|
|
41
|
+
--color-status-info-surface: var(--sb-semantic-color-status-info-surface);
|
|
42
|
+
--color-status-info-text: var(--sb-semantic-color-status-info-text);
|
|
43
|
+
--color-status-success-base: var(--sb-semantic-color-status-success-base);
|
|
44
|
+
--color-status-success-on-surface: var(--sb-semantic-color-status-success-on-surface);
|
|
45
|
+
--color-status-success-soft: var(--sb-semantic-color-status-success-soft);
|
|
46
|
+
--color-status-success-surface: var(--sb-semantic-color-status-success-surface);
|
|
47
|
+
--color-status-success-text: var(--sb-semantic-color-status-success-text);
|
|
48
|
+
--color-status-warning-base: var(--sb-semantic-color-status-warning-base);
|
|
49
|
+
--color-status-warning-on-surface: var(--sb-semantic-color-status-warning-on-surface);
|
|
50
|
+
--color-status-warning-soft: var(--sb-semantic-color-status-warning-soft);
|
|
51
|
+
--color-status-warning-surface: var(--sb-semantic-color-status-warning-surface);
|
|
52
|
+
--color-status-warning-text: var(--sb-semantic-color-status-warning-text);
|
|
53
|
+
--font-body: var(--sb-semantic-typography-family-body);
|
|
54
|
+
--font-code: var(--sb-semantic-typography-family-code);
|
|
55
|
+
--font-display: var(--sb-semantic-typography-family-display);
|
|
56
|
+
--text-2xl: var(--sb-semantic-typography-size-2xl);
|
|
57
|
+
--text-3xl: var(--sb-semantic-typography-size-3xl);
|
|
58
|
+
--text-4xl: var(--sb-semantic-typography-size-4xl);
|
|
59
|
+
--text-5xl: var(--sb-semantic-typography-size-5xl);
|
|
60
|
+
--text-display: var(--sb-semantic-typography-size-display);
|
|
61
|
+
--text-lg: var(--sb-semantic-typography-size-lg);
|
|
62
|
+
--text-md: var(--sb-semantic-typography-size-md);
|
|
63
|
+
--text-sm: var(--sb-semantic-typography-size-sm);
|
|
64
|
+
--text-xl: var(--sb-semantic-typography-size-xl);
|
|
65
|
+
--text-xs: var(--sb-semantic-typography-size-xs);
|
|
66
|
+
--font-weight-bold: var(--sb-semantic-typography-weight-bold);
|
|
67
|
+
--font-weight-medium: var(--sb-semantic-typography-weight-medium);
|
|
68
|
+
--font-weight-regular: var(--sb-semantic-typography-weight-regular);
|
|
69
|
+
--font-weight-semibold: var(--sb-semantic-typography-weight-semibold);
|
|
70
|
+
--leading-none: var(--sb-semantic-typography-line-height-none);
|
|
71
|
+
--leading-normal: var(--sb-semantic-typography-line-height-normal);
|
|
72
|
+
--leading-relaxed: var(--sb-semantic-typography-line-height-relaxed);
|
|
73
|
+
--leading-snug: var(--sb-semantic-typography-line-height-snug);
|
|
74
|
+
--leading-tight: var(--sb-semantic-typography-line-height-tight);
|
|
75
|
+
--tracking-normal: var(--sb-semantic-typography-letter-spacing-normal);
|
|
76
|
+
--tracking-snug: var(--sb-semantic-typography-letter-spacing-snug);
|
|
77
|
+
--tracking-tight: var(--sb-semantic-typography-letter-spacing-tight);
|
|
78
|
+
--tracking-wide: var(--sb-semantic-typography-letter-spacing-wide);
|
|
79
|
+
--tracking-wider: var(--sb-semantic-typography-letter-spacing-wider);
|
|
80
|
+
--spacing-0: var(--sb-semantic-space-0);
|
|
81
|
+
--spacing-1: var(--sb-semantic-space-1);
|
|
82
|
+
--spacing-2: var(--sb-semantic-space-2);
|
|
83
|
+
--spacing-3: var(--sb-semantic-space-3);
|
|
84
|
+
--spacing-4: var(--sb-semantic-space-4);
|
|
85
|
+
--spacing-5: var(--sb-semantic-space-5);
|
|
86
|
+
--spacing-6: var(--sb-semantic-space-6);
|
|
87
|
+
--spacing-8: var(--sb-semantic-space-8);
|
|
88
|
+
--spacing-10: var(--sb-semantic-space-10);
|
|
89
|
+
--spacing-12: var(--sb-semantic-space-12);
|
|
90
|
+
--spacing-16: var(--sb-semantic-space-16);
|
|
91
|
+
--spacing-20: var(--sb-semantic-space-20);
|
|
92
|
+
--radius-full: var(--sb-semantic-radius-full);
|
|
93
|
+
--radius-lg: var(--sb-semantic-radius-lg);
|
|
94
|
+
--radius-md: var(--sb-semantic-radius-md);
|
|
95
|
+
--radius-none: var(--sb-semantic-radius-none);
|
|
96
|
+
--radius-sm: var(--sb-semantic-radius-sm);
|
|
97
|
+
--radius-xl: var(--sb-semantic-radius-xl);
|
|
98
|
+
--breakpoint-2xl: 1536px;
|
|
99
|
+
--breakpoint-lg: 1024px;
|
|
100
|
+
--breakpoint-md: 768px;
|
|
101
|
+
--breakpoint-sm: 640px;
|
|
102
|
+
--breakpoint-xl: 1280px;
|
|
103
|
+
--container-content: var(--sb-semantic-size-container-content);
|
|
104
|
+
--shadow-card: var(--sb-semantic-shadow-card);
|
|
105
|
+
--shadow-overlay: var(--sb-semantic-shadow-overlay);
|
|
106
|
+
--ease-out: var(--sb-semantic-motion-easing-out);
|
|
107
|
+
--ease-standard: var(--sb-semantic-motion-easing-standard);
|
|
108
|
+
--default-transition-duration: var(--sb-semantic-motion-duration-normal);
|
|
109
|
+
--default-transition-timing-function: var(--sb-semantic-motion-easing-standard);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Theme variants match the data-theme selectors emitted in tokens.css. */
|
|
113
|
+
@custom-variant simple-base-dark ([data-theme="simple-base-dark"] &);
|
|
114
|
+
@custom-variant simple-base-light ([data-theme="simple-base-light"] &);
|
|
115
|
+
@custom-variant catppuccin-latte ([data-theme="catppuccin-latte"] &);
|
|
116
|
+
@custom-variant catppuccin-frappe ([data-theme="catppuccin-frappe"] &);
|
|
117
|
+
@custom-variant catppuccin-macchiato ([data-theme="catppuccin-macchiato"] &);
|
|
118
|
+
@custom-variant catppuccin-mocha ([data-theme="catppuccin-mocha"] &);
|
|
119
|
+
@custom-variant dracula ([data-theme="dracula"] &);
|
|
120
|
+
@custom-variant tokyo-night ([data-theme="tokyo-night"] &);
|
|
121
|
+
@custom-variant nord ([data-theme="nord"] &);
|