@volue/design-colors 2.0.4-next.0 → 3.0.0-next.1
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 +28 -5
- package/dist/flat.common.js +777 -0
- package/dist/flat.d.ts +520 -0
- package/dist/flat.module.js +520 -0
- package/dist/generic.common.js +2719 -0
- package/dist/generic.d.ts +1528 -0
- package/dist/generic.module.js +2719 -0
- package/dist/index.common.js +351 -80
- package/dist/index.cssmodules.css +253 -51
- package/dist/index.custom-properties.css +254 -52
- package/dist/index.d.ts +355 -0
- package/dist/index.json +253 -51
- package/dist/index.map.scss +254 -52
- package/dist/index.module.js +351 -80
- package/dist/index.scss +254 -52
- package/dist/internal/fillsWithTextColors.json +572 -0
- package/flat/package.json +5 -0
- package/generic/package.json +5 -0
- package/package.json +40 -9
- package/src/core.json +201 -0
- package/src/datavis.json +197 -0
- package/src/functional.json +532 -0
- package/src/internal/fills.json +163 -0
- package/src/rgb-channels.json +77 -0
- package/dist/backgroundFills.withTextColors.json +0 -622
- package/dist/index.common.d.ts +0 -84
- package/dist/index.module.d.ts +0 -84
- package/dist/textColors.json +0 -27
- package/src/backgroundFills.json +0 -189
- package/src/palette.json +0 -173
- package/src/text.json +0 -92
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Color primitives/tokens to be used across Volue's products
|
|
4
4
|
|
|
5
|
-

|
|
6
|
-
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
9
7
|
```sh
|
|
@@ -21,14 +19,27 @@ Tokens are exported as nested object structure.
|
|
|
21
19
|
|
|
22
20
|
```js
|
|
23
21
|
const tokens = require('@volue/design-colors');
|
|
24
|
-
console.log(tokens.
|
|
22
|
+
console.log(tokens.core.blue100); // rgb(0, 133, 159)
|
|
23
|
+
console.log(tokens.background.surface.default);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
#### Flat tokens
|
|
27
|
+
|
|
28
|
+
Use `flat` entrypoint to consume flattened tokens:
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
const tokens = require('@volue/design-colors/flat');
|
|
32
|
+
console.log(tokens.colorBlue100);
|
|
33
|
+
console.log(tokens.backgroundSurface);
|
|
25
34
|
```
|
|
26
35
|
|
|
36
|
+
### JSON
|
|
37
|
+
|
|
27
38
|
In JSON, design token names are formatted in [SNAKE_CASE](https://en.wikipedia.org/wiki/Snake_case).
|
|
28
39
|
|
|
29
40
|
```js
|
|
30
41
|
const tokens = require('@volue/design-colors/dist/index.json');
|
|
31
|
-
console.log(tokens['
|
|
42
|
+
console.log(tokens['COLOR_WHITE']); // rgb(255, 255, 255)
|
|
32
43
|
```
|
|
33
44
|
|
|
34
45
|
### Sass
|
|
@@ -40,6 +51,18 @@ Sass variables and map keys are formatted in [kebab-case](https://en.wikipedia.o
|
|
|
40
51
|
@import '~@volue/design-colors/dist/index';
|
|
41
52
|
|
|
42
53
|
a {
|
|
43
|
-
color: $color-
|
|
54
|
+
color: $color-accent90;
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### CSS variables
|
|
59
|
+
|
|
60
|
+
CSS variables/custom properties are formatted in [kebab-case](https://en.wikipedia.org/wiki/Kebab_case).
|
|
61
|
+
|
|
62
|
+
```scss
|
|
63
|
+
@import '~@volue/design-colors/dist/index.custom-properties.css';
|
|
64
|
+
|
|
65
|
+
a {
|
|
66
|
+
color: var(--color-accent90);
|
|
44
67
|
}
|
|
45
68
|
```
|