@bi-digital/tokens 0.0.27-alpha.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/dist/tokens.css +131 -0
- package/dist/tokens.d.ts +161 -0
- package/dist/tokens.js +2024 -0
- package/dist/tokens.scss +128 -0
- package/package.json +30 -0
- package/readme.md +65 -0
package/dist/tokens.scss
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
|
|
2
|
+
// Do not edit directly, this file was auto-generated.
|
|
3
|
+
|
|
4
|
+
$bi-basic-key: #000000;
|
|
5
|
+
$bi-basic-white: #ffffff;
|
|
6
|
+
$bi-neutral-5: #f2f4f6;
|
|
7
|
+
$bi-neutral-10: #e4e8ed;
|
|
8
|
+
$bi-neutral-15: #d5dde4;
|
|
9
|
+
$bi-neutral-20: #c8d1db;
|
|
10
|
+
$bi-neutral-25: #bac6d2;
|
|
11
|
+
$bi-neutral-30: #acbbca;
|
|
12
|
+
$bi-neutral-40: #90a3b7;
|
|
13
|
+
$bi-neutral-50: #597694;
|
|
14
|
+
$bi-neutral-60: #475e75;
|
|
15
|
+
$bi-neutral-70: #3e5266;
|
|
16
|
+
$bi-neutral-80: #344557;
|
|
17
|
+
$bi-neutral-85: #303f4f;
|
|
18
|
+
$bi-neutral-90: #2b3947;
|
|
19
|
+
$bi-neutral-95: #26333f;
|
|
20
|
+
$bi-neutral-100: #222d38;
|
|
21
|
+
$bi-primary-5: #d9e6f9;
|
|
22
|
+
$bi-primary-10: #c5d9f7;
|
|
23
|
+
$bi-primary-15: #b2cdf4;
|
|
24
|
+
$bi-primary-20: #9ec0f1;
|
|
25
|
+
$bi-primary-25: #8bb3ee;
|
|
26
|
+
$bi-primary-30: #75a5f1;
|
|
27
|
+
$bi-primary-40: #6196f4;
|
|
28
|
+
$bi-primary-50: #0a64ff;
|
|
29
|
+
$bi-primary-60: #0b4db4;
|
|
30
|
+
$bi-primary-70: #0b49a1;
|
|
31
|
+
$bi-primary-80: #0c468f;
|
|
32
|
+
$bi-primary-85: #093f82;
|
|
33
|
+
$bi-primary-90: #083a76;
|
|
34
|
+
$bi-primary-95: #042f5b;
|
|
35
|
+
$bi-primary-100: #002341;
|
|
36
|
+
$bi-secondary-5: #fcf6df;
|
|
37
|
+
$bi-secondary-10: #f9edbf;
|
|
38
|
+
$bi-secondary-20: #f5e49f;
|
|
39
|
+
$bi-secondary-30: #f2dc7e;
|
|
40
|
+
$bi-secondary-40: #efd35f;
|
|
41
|
+
$bi-secondary-50: #ecca3f;
|
|
42
|
+
$bi-info-5: #e6d5ff;
|
|
43
|
+
$bi-info-10: #d9bfff;
|
|
44
|
+
$bi-info-15: #cdaaff;
|
|
45
|
+
$bi-info-20: #c094ff;
|
|
46
|
+
$bi-info-25: #b480ff;
|
|
47
|
+
$bi-info-30: #a76aff;
|
|
48
|
+
$bi-info-40: #822bff;
|
|
49
|
+
$bi-info-50: #6900ff;
|
|
50
|
+
$bi-info-60: #5c03dc;
|
|
51
|
+
$bi-info-70: #4f05b9;
|
|
52
|
+
$bi-info-80: #420896;
|
|
53
|
+
$bi-info-85: #3b0984;
|
|
54
|
+
$bi-info-90: #350a73;
|
|
55
|
+
$bi-info-95: #2e0b61;
|
|
56
|
+
$bi-info-100: #280d50;
|
|
57
|
+
$bi-warning-5: #fff7d5;
|
|
58
|
+
$bi-warning-10: #fff2bf;
|
|
59
|
+
$bi-warning-15: #ffea95;
|
|
60
|
+
$bi-warning-20: #ffe680;
|
|
61
|
+
$bi-warning-25: #ffe26a;
|
|
62
|
+
$bi-warning-30: #ffde55;
|
|
63
|
+
$bi-warning-40: #ffd52b;
|
|
64
|
+
$bi-warning-50: #ffcd00;
|
|
65
|
+
$bi-warning-60: #deb300;
|
|
66
|
+
$bi-warning-70: #bd9800;
|
|
67
|
+
$bi-warning-80: #9d7e00;
|
|
68
|
+
$bi-warning-85: #7c6400;
|
|
69
|
+
$bi-warning-90: #5b4900;
|
|
70
|
+
$bi-warning-95: #4a3c01;
|
|
71
|
+
$bi-warning-100: #3a2f00;
|
|
72
|
+
$bi-success-5: #d5f4d6;
|
|
73
|
+
$bi-success-10: #bfeec2;
|
|
74
|
+
$bi-success-15: #aae8ae;
|
|
75
|
+
$bi-success-20: #95e299;
|
|
76
|
+
$bi-success-25: #80dd85;
|
|
77
|
+
$bi-success-30: #55d15c;
|
|
78
|
+
$bi-success-40: #2bc634;
|
|
79
|
+
$bi-success-50: #00ab0b;
|
|
80
|
+
$bi-success-60: #04a30d;
|
|
81
|
+
$bi-success-70: #078b0f;
|
|
82
|
+
$bi-success-80: #0b7411;
|
|
83
|
+
$bi-success-85: #0f5d13;
|
|
84
|
+
$bi-success-90: #124515;
|
|
85
|
+
$bi-success-95: #143a16;
|
|
86
|
+
$bi-success-100: #162e17;
|
|
87
|
+
$bi-alert-5: #ffe1df;
|
|
88
|
+
$bi-alert-10: #ffd7d5;
|
|
89
|
+
$bi-alert-15: #ffc3bf;
|
|
90
|
+
$bi-alert-20: #ffafaa;
|
|
91
|
+
$bi-alert-25: #ff8780;
|
|
92
|
+
$bi-alert-30: #ff5f55;
|
|
93
|
+
$bi-alert-40: #ff372b;
|
|
94
|
+
$bi-alert-50: #ff0f00;
|
|
95
|
+
$bi-alert-60: #e41100;
|
|
96
|
+
$bi-alert-70: #c91300;
|
|
97
|
+
$bi-alert-80: #ae1601;
|
|
98
|
+
$bi-alert-85: #931801;
|
|
99
|
+
$bi-alert-90: #731a15;
|
|
100
|
+
$bi-alert-95: #6a1b16;
|
|
101
|
+
$bi-alert-100: #5d1c18;
|
|
102
|
+
$bi-scale-0: 0;
|
|
103
|
+
$bi-scale-0-25x: 0.0625rem;
|
|
104
|
+
$bi-scale-0-50x: 0.125rem;
|
|
105
|
+
$bi-scale-0-75x: 0.1875rem;
|
|
106
|
+
$bi-scale-1x: 0.25rem;
|
|
107
|
+
$bi-scale-1-5x: 0.375rem;
|
|
108
|
+
$bi-scale-2x: 0.5rem;
|
|
109
|
+
$bi-scale-3x: 0.75rem;
|
|
110
|
+
$bi-scale-4x: 1rem;
|
|
111
|
+
$bi-scale-5x: 1.25rem;
|
|
112
|
+
$bi-scale-6x: 1.5rem;
|
|
113
|
+
$bi-scale-8x: 2rem;
|
|
114
|
+
$bi-scale-9x: 2.25rem;
|
|
115
|
+
$bi-scale-10x: 2.5rem;
|
|
116
|
+
$bi-scale-12x: 3rem;
|
|
117
|
+
$bi-scale-14x: 3.5rem;
|
|
118
|
+
$bi-scale-16x: 4rem;
|
|
119
|
+
$bi-scale-20x: 5rem;
|
|
120
|
+
$bi-scale-24x: 6rem;
|
|
121
|
+
$bi-scale-32x: 8rem;
|
|
122
|
+
$bi-scale-36x: 9rem;
|
|
123
|
+
$bi-scale-40x: 10rem;
|
|
124
|
+
$bi-scale-48x: 12rem;
|
|
125
|
+
$bi-scale-56x: 14rem;
|
|
126
|
+
$bi-scale-64x: 16rem;
|
|
127
|
+
$bi-scale-80x: 20rem;
|
|
128
|
+
$bi-scale-max: 624.9375rem;
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bi-digital/tokens",
|
|
3
|
+
"version": "0.0.27-alpha.0",
|
|
4
|
+
"description": "CSS and SASS variables for the BI Design System",
|
|
5
|
+
"author": "BI Digital",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/tokens.css",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./dist/tokens.css",
|
|
14
|
+
"./dist/*": {
|
|
15
|
+
"types": "./dist/tokens.d.ts",
|
|
16
|
+
"default": "./dist/*"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"/dist"
|
|
21
|
+
],
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"style-dictionary": "^4.3.3"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "style-dictionary build",
|
|
27
|
+
"build:debug": "style-dictionary build --verbose",
|
|
28
|
+
"lint": "eslint ."
|
|
29
|
+
}
|
|
30
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# @bi-digital/tokens
|
|
2
|
+
|
|
3
|
+
The `@bi-digital/tokens` lib contains CSS variables to be used in the BI Web Components library and other places that uses the BI Design System.
|
|
4
|
+
We offer tokens in CSS, SASS, and JS format.
|
|
5
|
+
|
|
6
|
+
> In most cases, you do not need to download the token package itself, as `@bi-digital/css` already offers all tokens as CSS variables.
|
|
7
|
+
|
|
8
|
+
> We recommend using the tokens as CSS variables, as they are a native CSS feature.
|
|
9
|
+
|
|
10
|
+
All tokens are prefixed with `bi`.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
In `.css`-files:
|
|
15
|
+
|
|
16
|
+
```css
|
|
17
|
+
@import '@bi-digital/tokens';
|
|
18
|
+
|
|
19
|
+
.example {
|
|
20
|
+
color: var(--bi-primary-80);
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
In `.scss`-files:
|
|
25
|
+
|
|
26
|
+
```scss
|
|
27
|
+
@use '@bi-digital/tokens/dist/tokens' as tokens;
|
|
28
|
+
|
|
29
|
+
.example {
|
|
30
|
+
color: tokens.$bi-primary-80;
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
CDN:
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@bi-digital/tokens@latest/dist/tokens.css"></script>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
We recommend replacing `latest` with a specific version to avoid errors when the library is updated.
|
|
41
|
+
|
|
42
|
+
### Variables in media queries
|
|
43
|
+
|
|
44
|
+
CSS custom properties do not support the use of variables in media queries, but for users of SCSS, this works. You must import the SCSS variables from `@bi-digital/tokens` directly:
|
|
45
|
+
|
|
46
|
+
```scss
|
|
47
|
+
@use '@bi-digital/tokens/dist/tokens' as tokens;
|
|
48
|
+
|
|
49
|
+
@media (min-width: tokens.$bi-breakpoints-sm) {
|
|
50
|
+
.example {
|
|
51
|
+
color: tokens.$bi-primary-80;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### VSCode-extensions
|
|
57
|
+
|
|
58
|
+
For users of VSCode, you can use the extension "Css Custom Properties" (`Tock.vscode-css-custom-properties`) for autocomplete of tokens. You need to add the following settings:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"cssCustomProperties.files": ["@bi-digital/**/tokens.css"],
|
|
63
|
+
"cssCustomProperties.languages": ["css", "scss"]
|
|
64
|
+
}
|
|
65
|
+
```
|