@wix/design-system-tokens 1.3.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/README.md +23 -0
- package/all.st.css +1617 -0
- package/component.st.css +685 -0
- package/foundation.st.css +337 -0
- package/package.json +36 -0
- package/semantic.st.css +601 -0
- package/studio/all.st.css +1563 -0
- package/studio/component.st.css +685 -0
- package/studio/foundation.st.css +305 -0
- package/studio/semantic.st.css +579 -0
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Wix Design System Tokens
|
|
2
|
+
This package contains:
|
|
3
|
+
1. JSON files containing WDS token definitions.
|
|
4
|
+
2. `style-dictionary` script to process these files and create required output.
|
|
5
|
+
3. output generated with `style-dictionary`.
|
|
6
|
+
|
|
7
|
+
## How it works
|
|
8
|
+
Source files which are used to generate style-dictionary output are stored in `src/tokens` directory in JSON format. These files are processed by style-dictionary, which transforms data into a specific structure & format and outputs files to root `tokens` directory.
|
|
9
|
+
|
|
10
|
+
To generate output, run
|
|
11
|
+
```
|
|
12
|
+
$ yarn generate
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Since this package just exports static files, the `build` script is only used to prepare package for publishing by moving generated files to the root of the package to allow more elegant imports.
|
|
16
|
+
|
|
17
|
+
## Build & Configuration
|
|
18
|
+
Build entry point is `generate.ts` file which controls the execution of input parsing & output generation. Main configuration for expected output is stored in `build-config.ts` file. Current solution is partly customized, we use custom Format and Transform to suit our needs.
|
|
19
|
+
|
|
20
|
+
You can find more details on Style Dictionary and its' configuration [here](https://amzn.github.io/style-dictionary/).
|
|
21
|
+
|
|
22
|
+
## Consumption
|
|
23
|
+
Tokens are available in 2 themes - **default** and **Studio**. Default theme resides at the root of the package, while Studio theme is under the `studio` directory. Each theme has files named `foundation`, `semantic` and `component`, these correspond directly to the tiers of the tokens. File named `all` contains the tokens from all of the tiers.
|