@autonomys/design-tokens 1.4.18
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 +97 -0
- package/dist/css/utilities.css +1919 -0
- package/dist/css/variables.css +244 -0
- package/dist/index.css +2164 -0
- package/dist/index.d.ts +452 -0
- package/dist/index.esm.js +557 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +565 -0
- package/dist/index.js.map +1 -0
- package/dist/tokens/colors.d.ts +307 -0
- package/dist/tokens/colors.js +192 -0
- package/dist/tokens/shadows.d.ts +66 -0
- package/dist/tokens/shadows.js +40 -0
- package/dist/tokens/spacing.d.ts +159 -0
- package/dist/tokens/spacing.js +100 -0
- package/dist/tokens/typography.d.ts +361 -0
- package/dist/tokens/typography.js +205 -0
- package/package.json +48 -0
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Auto Design Tokens
|
|
2
|
+
|
|
3
|
+
A comprehensive design token system for Auto, providing consistent styling across applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- CSS custom properties (variables) for colors, typography, spacing, and more
|
|
8
|
+
- Utility classes with an `auto-` prefix for easy styling
|
|
9
|
+
- Tailwind CSS integration
|
|
10
|
+
- Dark theme support
|
|
11
|
+
- Explorer-specific styles
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @autonomys/design-tokens
|
|
17
|
+
# or
|
|
18
|
+
yarn add @autonomys/design-tokens
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
### Import All Styles
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
// Import all styles (variables + utility classes)
|
|
27
|
+
import '@autonomys/design-tokens/dist/index.css'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Import Specific Style Categories
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
// Import only CSS variables without utility classes
|
|
34
|
+
import '@autonomys/design-tokens/dist/css/variables.css'
|
|
35
|
+
|
|
36
|
+
// Import only utility classes without variables
|
|
37
|
+
import '@autonomys/design-tokens/dist/css/utilities.css'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Building the Tokens
|
|
41
|
+
|
|
42
|
+
To build the design tokens:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This will:
|
|
49
|
+
|
|
50
|
+
1. Compile TypeScript tokens to JavaScript
|
|
51
|
+
2. Generate CSS files:
|
|
52
|
+
- `index.css`: Complete bundle with all variables and utility classes
|
|
53
|
+
- `css/variables.css`: Only CSS custom properties
|
|
54
|
+
- `css/utilities.css`: Only utility classes
|
|
55
|
+
3. Output everything to the `dist` folder
|
|
56
|
+
|
|
57
|
+
## Available Classes
|
|
58
|
+
|
|
59
|
+
### Color Classes
|
|
60
|
+
|
|
61
|
+
- Text colors: `auto-text-primary`, `auto-text-secondary`, etc.
|
|
62
|
+
- Background colors: `auto-bg-primary`, `auto-bg-secondary`, etc.
|
|
63
|
+
- Border colors: `auto-border-primary`, `auto-border-secondary`, etc.
|
|
64
|
+
- Button styles: `auto-button-primary`, `auto-button-secondary`, etc.
|
|
65
|
+
|
|
66
|
+
### Typography Classes
|
|
67
|
+
|
|
68
|
+
- Headings: `auto-heading-1`, `auto-heading-2`, etc.
|
|
69
|
+
- Body text: `auto-body-default`, `auto-body-small`, etc.
|
|
70
|
+
- Font sizes: `auto-text-xs`, `auto-text-sm`, etc.
|
|
71
|
+
- Font weights: `auto-font-light`, `auto-font-bold`, etc.
|
|
72
|
+
|
|
73
|
+
### Spacing Classes
|
|
74
|
+
|
|
75
|
+
- Margin: `auto-m-1`, `auto-mt-2`, `auto-mx-4`, etc.
|
|
76
|
+
- Padding: `auto-p-1`, `auto-pt-2`, `auto-px-4`, etc.
|
|
77
|
+
- Border radius: `auto-rounded`, `auto-rounded-lg`, etc.
|
|
78
|
+
|
|
79
|
+
### Shadow Classes
|
|
80
|
+
|
|
81
|
+
- Shadows: `auto-shadow-sm`, `auto-shadow-lg`, etc.
|
|
82
|
+
|
|
83
|
+
### Explorer-Specific Classes
|
|
84
|
+
|
|
85
|
+
- Explorer background colors: `auto-explorer-bg-*`
|
|
86
|
+
- Explorer text colors: `auto-explorer-text-*`
|
|
87
|
+
- Explorer gradients: `auto-explorer-bg-gradient-*`, `auto-explorer-button-gradient-*`, etc.
|
|
88
|
+
|
|
89
|
+
## Theme Support
|
|
90
|
+
|
|
91
|
+
Apply dark theme by adding the `auto-theme-dark` class to a container:
|
|
92
|
+
|
|
93
|
+
```html
|
|
94
|
+
<div class="auto-theme-dark">
|
|
95
|
+
<!-- Content will use dark theme styles -->
|
|
96
|
+
</div>
|
|
97
|
+
```
|