@wix/design-system-tokens 1.82.0 → 1.84.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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.83.0 - 2025-03-10
2
+
3
+ ### Features
4
+
5
+ - feat(WixelTheme): add wixel theme tokens [14572](https://github.com/wix-private/wix-design-systems/pull/14572)
6
+
1
7
  ## 1.81.0 - 2025-03-05
2
8
 
3
9
  ### Visual Breaking Changes
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Wix Design System Tokens
2
2
 
3
3
  This package contains:
4
+
4
5
  1. JSON files containing WDS token definitions.
5
6
  2. `style-dictionary` script to process these files and create required output.
6
7
  3. output generated with `style-dictionary`.
@@ -8,9 +9,11 @@ This package contains:
8
9
  If you're looking to contribute, refer to [Add Tokens Guide](./docs/ADD_TOKENS_GUIDE.md).
9
10
 
10
11
  ## How it works
12
+
11
13
  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.
12
14
 
13
15
  To generate output, run
16
+
14
17
  ```
15
18
  $ yarn generate
16
19
  ```
@@ -18,19 +21,23 @@ $ yarn generate
18
21
  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.
19
22
 
20
23
  ## Build & Configuration
24
+
21
25
  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.
22
26
 
23
27
  You can find more details on Style Dictionary and its' configuration [here](https://amzn.github.io/style-dictionary/).
24
28
 
25
29
  ## Consumption
30
+
26
31
  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.
27
32
 
28
33
  ## Custom Formats
34
+
29
35
  Style Dictionary allows to create your own output format, it's called Formats. These are our custom formats:
30
36
 
31
37
  ### `css/properties-stylable`
32
38
 
33
39
  It outputs [Stylable](https://stylable.io/) file with `.st.css` extension. This file contains:
40
+
34
41
  1. Variable declarations using partially correct [@property rule](https://developer.mozilla.org/en-US/docs/Web/CSS/@property) syntax, which in this form is only valid for Stylable pre-processor.
35
42
  2. Variable definitions under `.root` class.
36
43
 
@@ -44,9 +51,11 @@ It outputs [Stylable](https://stylable.io/) file with `.st.css` extension. This
44
51
  ```
45
52
 
46
53
  ## Custom Transforms
54
+
47
55
  Style Dictionary supports defining your own custom token value parsers, they're called Transforms. We have several custom transforms.
48
56
 
49
57
  ### `color/gradient`
58
+
50
59
  Only applies to tokens which have attribute `"type": "gradient"`. Refer to `transforms/color-gradient.ts` to find object structure definition. Outputs [linear-gradient](https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient) function to be assigned to `background` property.
51
60
 
52
61
  ```
@@ -54,6 +63,7 @@ background: var(--wds-color-fill-gradient-light-bottom-to-top);
54
63
  ```
55
64
 
56
65
  ### `shadow/box`
66
+
57
67
  Only applies to tokens which have attribute `"type": "shadow"`. Refer to `transforms/shadow.ts` to find object structure definition. Outputs shadow values to be assigned to [box-shadow](https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow) property.
58
68
 
59
69
  ```
@@ -61,6 +71,5 @@ box-shadow: var(--wds-shadow-focus-warning);
61
71
  ```
62
72
 
63
73
  ### `size/px-custom`
64
- Only applies to tokens which have attribute `"type": "float"`. Adds `px` unit to token values.
65
-
66
74
 
75
+ Only applies to tokens which have attribute `"type": "float"`. Adds `px` unit to token values.