diff --git a/.editorconfig b/.editorconfig
index da0310f51..1cd9f64bd 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,7 +7,6 @@ indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
-insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
\ No newline at end of file
diff --git a/.eslintrc.json b/.eslintrc.json
index 7717b8c37..a32eb0a2e 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -2,6 +2,7 @@
"parserOptions": {
"ecmaVersion": 6
},
+ "plugins": ["jest"],
"env": {
"node": true,
"mocha": true,
@@ -11,11 +12,16 @@
"Buffer": true,
"escape": true
},
- "extends": "eslint:recommended",
+ "extends": [
+ "eslint:recommended",
+ "plugin:jest/recommended"
+ ],
"rules": {
"no-console": 0,
"no-unused-vars": 1,
+ "no-control-regex": 0,
"comma-dangle": 0,
- "no-prototype-builtins": 0
+ "no-prototype-builtins": 0,
+ "jest/valid-title": 0
}
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 55c5599c7..c4b250fff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,147 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+## [3.0.0-rc.10](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.9...v3.0.0-rc.10) (2021-05-24)
+
+
+### Features
+
+* **formats:** add typescript declarations formats ([#557](https://github.com/amzn/style-dictionary/issues/557)) ([f517bcf](https://github.com/amzn/style-dictionary/commit/f517bcfa219bddc5a10b5443ccb85c4869711064)), closes [#425](https://github.com/amzn/style-dictionary/issues/425)
+* **types:** cleaning up our type definitions ([#632](https://github.com/amzn/style-dictionary/issues/632)) ([db6269b](https://github.com/amzn/style-dictionary/commit/db6269b636264cc0849f595c0f15a34c977c1398))
+
+
+### Bug Fixes
+
+* **references:** value object references now work ([#623](https://github.com/amzn/style-dictionary/issues/623)) ([23de306](https://github.com/amzn/style-dictionary/commit/23de3062c464a70d9e6492a380e1052e9500ea2d)), closes [#615](https://github.com/amzn/style-dictionary/issues/615)
+* **template:** remove blank lines in scss/map-deep and scss/map-flat templates ([#588](https://github.com/amzn/style-dictionary/issues/588)) ([a88e622](https://github.com/amzn/style-dictionary/commit/a88e622bcc06a98972dddb2b11903828ba3dab2b))
+
+### [2.10.3](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.5...v2.10.3) (2021-03-09)
+
+
+### Bug Fixes
+
+* **extend:** remove prototype pollution ([#560](https://github.com/amzn/style-dictionary/issues/560)) ([89ee39a](https://github.com/amzn/style-dictionary/commit/89ee39a7953c1825ea4578d43f129e23b4ed5da8))
+
+## [3.0.0-rc.9](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.8...v3.0.0-rc.9) (2021-05-04)
+
+
+### Features
+
+* **compose:** Add Jetpack Compose format ([#599](https://github.com/amzn/style-dictionary/issues/599)) ([8a53858](https://github.com/amzn/style-dictionary/commit/8a53858dc35f4b4565abe9a6500c78814e3e6eae)), closes [#478](https://github.com/amzn/style-dictionary/issues/478)
+
+
+### Bug Fixes
+
+* **formats:** bringing mapName back to scss formats ([#611](https://github.com/amzn/style-dictionary/issues/611)) ([7a28f40](https://github.com/amzn/style-dictionary/commit/7a28f40b7f44b37e565b1360683b60268d044e9e))
+* **formats:** fixing formatting options in fileHeader ([#614](https://github.com/amzn/style-dictionary/issues/614)) ([3f7fe96](https://github.com/amzn/style-dictionary/commit/3f7fe9674c0cb1f228e0415ce468d18a48e4a7f0)), closes [#612](https://github.com/amzn/style-dictionary/issues/612)
+* **references:** fixing circular reference errors ([#607](https://github.com/amzn/style-dictionary/issues/607)) ([9af17f4](https://github.com/amzn/style-dictionary/commit/9af17f420c2a11c64f77041f5c2439c093f9c035)), closes [#608](https://github.com/amzn/style-dictionary/issues/608)
+* **references:** flushing the filtered reference warnings ([#598](https://github.com/amzn/style-dictionary/issues/598)) ([d3b5135](https://github.com/amzn/style-dictionary/commit/d3b51352f33cb15765cb152605acd3c44e6fbf69))
+
+## [3.0.0-rc.8](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.7...v3.0.0-rc.8) (2021-04-05)
+
+
+### Features
+
+* **formats:** add an optional selector to css/variables format ([#582](https://github.com/amzn/style-dictionary/issues/582)) ([34922a8](https://github.com/amzn/style-dictionary/commit/34922a8572b7cefc6ca579cca9f73b16bfc4efc0))
+* **formats:** output references handles interpoloated references ([#590](https://github.com/amzn/style-dictionary/issues/590)) ([cc595ca](https://github.com/amzn/style-dictionary/commit/cc595ca0683cc757dfae562a8688eb0b8d121cbe)), closes [#589](https://github.com/amzn/style-dictionary/issues/589)
+
+
+### Bug Fixes
+
+* **combine:** filePath was missing for falsey values ([#583](https://github.com/amzn/style-dictionary/issues/583)) ([8c405e6](https://github.com/amzn/style-dictionary/commit/8c405e6765367aff7eb94fda1a0a235f1c422c9c))
+* **formats:** update output references in formats to handle nested references ([#587](https://github.com/amzn/style-dictionary/issues/587)) ([9ce0311](https://github.com/amzn/style-dictionary/commit/9ce031108979493c7f5d0df34e3546322694feb6))
+
+## [3.0.0-rc.7](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.6...v3.0.0-rc.7) (2021-03-24)
+
+
+### Features
+
+* **formats:** adding custom file headers ([#572](https://github.com/amzn/style-dictionary/issues/572)) ([2a29502](https://github.com/amzn/style-dictionary/commit/2a29502f762c8694dd541dc9c0a0e0aa32e4dec9)), closes [#566](https://github.com/amzn/style-dictionary/issues/566)
+
+
+### Bug Fixes
+
+* **references:** use unfiltered dictionary for reference resolution in formats ([#553](https://github.com/amzn/style-dictionary/issues/553)) ([62c8fb8](https://github.com/amzn/style-dictionary/commit/62c8fb8ddaccb94dc2eee3b4504f38c264689b77))
+
+## [3.0.0-rc.6](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.5...v3.0.0-rc.6) (2021-03-09)
+
+
+### Bug Fixes
+
+* **extend:** remove prototype pollution ([#554](https://github.com/amzn/style-dictionary/issues/554)) ([b99710a](https://github.com/amzn/style-dictionary/commit/b99710a23abf7d49be28f4ce33dbe99a8af5923f))
+
+## [3.0.0-rc.5](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.4...v3.0.0-rc.5) (2021-02-27)
+
+
+### Bug Fixes
+
+* **types:** introduce parser, update config, optional transform options ([#546](https://github.com/amzn/style-dictionary/issues/546)) ([0042354](https://github.com/amzn/style-dictionary/commit/0042354b4ccb43ef26ddb13adab82b73f25dbf4f)), closes [#545](https://github.com/amzn/style-dictionary/issues/545)
+
+## [3.0.0-rc.4](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.3...v3.0.0-rc.4) (2021-02-16)
+
+
+### Features
+
+* **formats:** add stylus/variables format ([#527](https://github.com/amzn/style-dictionary/issues/527)) ([8c56752](https://github.com/amzn/style-dictionary/commit/8c56752d43616884fe6b1f4f7a77994396ce2c3f)), closes [#526](https://github.com/amzn/style-dictionary/issues/526)
+
+## [3.0.0-rc.3](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.2...v3.0.0-rc.3) (2021-02-06)
+
+
+### Features
+
+* **build-file:** do not generate file if properties is empty ([#494](https://github.com/amzn/style-dictionary/issues/494)) ([8945c46](https://github.com/amzn/style-dictionary/commit/8945c46f26a08ff6ffac3a5aa0e84a0f330efdb4))
+* **format:** output references ([#504](https://github.com/amzn/style-dictionary/issues/504)) ([7e7889a](https://github.com/amzn/style-dictionary/commit/7e7889a41c79c58a04297762a31550c9bd7c2ee0))
+* **format:** use named parameters in formatter functions ([#533](https://github.com/amzn/style-dictionary/issues/533)) ([32bd40d](https://github.com/amzn/style-dictionary/commit/32bd40d3a94dd3be49ea795e3dbcc70e149bd6eb))
+* react-native support ([#512](https://github.com/amzn/style-dictionary/issues/512)) ([bd61cd2](https://github.com/amzn/style-dictionary/commit/bd61cd294afccd5299a7103fd2ea6177203e9994))
+
+
+### Bug Fixes
+
+* **examples:** little typo ([#518](https://github.com/amzn/style-dictionary/issues/518)) ([33271b6](https://github.com/amzn/style-dictionary/commit/33271b62b2a0c100a2be8c08f7cd89815e287327))
+* **export platform:** fixing infinite loop when there are reference errors ([#531](https://github.com/amzn/style-dictionary/issues/531)) ([6078c80](https://github.com/amzn/style-dictionary/commit/6078c8041286589eef7515945f771240bf73c8ef))
+* **property setup:** original property being mutated if the value is an object ([#534](https://github.com/amzn/style-dictionary/issues/534)) ([0b13ae2](https://github.com/amzn/style-dictionary/commit/0b13ae212023ba003ab71cc30eadb20ad10ebc0c))
+* **types:** add transitive to value transform type ([#536](https://github.com/amzn/style-dictionary/issues/536)) ([695eed6](https://github.com/amzn/style-dictionary/commit/695eed60f9f56c30542bbec8d0c1622a6a6959df))
+* **types:** Change transforms to transform in Core ([#530](https://github.com/amzn/style-dictionary/issues/530)) ([40a2601](https://github.com/amzn/style-dictionary/commit/40a2601724ed947aa141ff53e874c14c317992df))
+
+## [3.0.0-rc.2](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.1...v3.0.0-rc.2) (2021-01-12)
+
+
+### Features
+
+* **format:** adding android/resources format ([e43aafd](https://github.com/amzn/style-dictionary/commit/e43aafd0e4c5f34158ea0cdc222833b79b35ab16))
+* **transforms:** add 'px to rem' transform ([#491](https://github.com/amzn/style-dictionary/issues/491)) ([75f0ba3](https://github.com/amzn/style-dictionary/commit/75f0ba36e1211edf955c7b6bd6c58cbd9fc6524c))
+
+
+### Bug Fixes
+
+* **extend:** use given file path for token data ([#499](https://github.com/amzn/style-dictionary/issues/499)) ([0b23c9d](https://github.com/amzn/style-dictionary/commit/0b23c9d77e367b2080e4b624fcb294773b2aefcb))
+* **parsers:** fixed an error where parsers weren't running ([#511](https://github.com/amzn/style-dictionary/issues/511)) ([b0077c3](https://github.com/amzn/style-dictionary/commit/b0077c3d06caf5b7fcacd7378aab7827cdaa3961))
+* **types:** fix transform options type [#502](https://github.com/amzn/style-dictionary/issues/502) ([32787f8](https://github.com/amzn/style-dictionary/commit/32787f8a133a61f6132cef4bb88922f72951b804))
+
+## [3.0.0-rc.1](https://github.com/amzn/style-dictionary/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2020-12-04)
+
+## [3.0.0-rc.0](https://github.com/amzn/style-dictionary/compare/v2.10.2...v3.0.0-rc.0) (2020-12-03)
+
+
+### Features
+
+* **examples:** add custom filters example ([c9bfcbc](https://github.com/amzn/style-dictionary/commit/c9bfcbcb07fec4435f2368c66d0db793d676a06e))
+* **examples:** add custom filters example ([f95c420](https://github.com/amzn/style-dictionary/commit/f95c4202e93dcc00b47e595c4910f435a57d1987))
+* **examples:** add matching build files example ([#481](https://github.com/amzn/style-dictionary/issues/481)) ([5a80ef6](https://github.com/amzn/style-dictionary/commit/5a80ef626bacb6b487f2543793e7ed6451e81498)), closes [#251](https://github.com/amzn/style-dictionary/issues/251)
+* add support for !default in SCSS variables format ([#359](https://github.com/amzn/style-dictionary/issues/359)) ([fa82002](https://github.com/amzn/style-dictionary/commit/fa8200221477a7bf0d9fcb031a54dc61ba2e3f72)), closes [#307](https://github.com/amzn/style-dictionary/issues/307)
+* add TypeScript typings ([#410](https://github.com/amzn/style-dictionary/issues/410)) ([a8bb832](https://github.com/amzn/style-dictionary/commit/a8bb83278fa5bf7b1796d7f466f21a7beef0da84))
+* **core:** add new entries on property object ([#356](https://github.com/amzn/style-dictionary/issues/356)) ([fd254a5](https://github.com/amzn/style-dictionary/commit/fd254a5e9f78b9888cf59770e61800357421d934))
+* **formats:** add file object to formatter method ([#439](https://github.com/amzn/style-dictionary/issues/439)) ([1481c46](https://github.com/amzn/style-dictionary/commit/1481c46647808d95dc26ff6c08a0906df09d0316))
+* **formats:** javascript/module-flat format ([#457](https://github.com/amzn/style-dictionary/issues/457)) ([37b06e8](https://github.com/amzn/style-dictionary/commit/37b06e86ba77576fb0619372fd73e16673c6440d))
+* **parser:** adding custom parser support ([#429](https://github.com/amzn/style-dictionary/issues/429)) ([887a837](https://github.com/amzn/style-dictionary/commit/887a837a72f15cb4e2550f883e6d4479e1fa9d42))
+* **transforms:** Make transitive transforms & resolves possible ([#371](https://github.com/amzn/style-dictionary/issues/371)) ([3edbb17](https://github.com/amzn/style-dictionary/commit/3edbb178d53f9e5af2328b7c26271fe436af86d3)), closes [#208](https://github.com/amzn/style-dictionary/issues/208)
+
+### Bug Fixes
+
+* **cli:** update clean config path logic ([#454](https://github.com/amzn/style-dictionary/issues/454)) ([dc3cfa5](https://github.com/amzn/style-dictionary/commit/dc3cfa58aa7cc78a6359a8bb269e6f32ba50b110))
+* **formats:** fix max call stack issue on json/nested format ([#465](https://github.com/amzn/style-dictionary/issues/465)) ([67fb361](https://github.com/amzn/style-dictionary/commit/67fb361fb2448f9b91a1a125ee61d6bbe2f77732))
+* **transforms:** fix transitive transforms ([#476](https://github.com/amzn/style-dictionary/issues/476)) ([ac0c515](https://github.com/amzn/style-dictionary/commit/ac0c515c8b4593b91eb352b1f744895796e3ab49))
+
### [2.10.3](https://github.com/amzn/style-dictionary/compare/v2.10.2...v2.10.3) (2021-03-09)
@@ -9,6 +150,7 @@ All notable changes to this project will be documented in this file. See [standa
* **extend:** remove prototype pollution ([#560](https://github.com/amzn/style-dictionary/issues/560)) ([89ee39a](https://github.com/amzn/style-dictionary/commit/89ee39a7953c1825ea4578d43f129e23b4ed5da8))
+
### [2.10.2](https://github.com/amzn/style-dictionary/compare/v2.10.1...v2.10.2) (2020-10-08)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ef1293cd8..4bdb1f771 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -34,7 +34,7 @@ We use npm as our package manager. After downloading the repo, please use the co
We use ESLint on the code to ensure a consistent style. Any new code committed must pass our ESLint tests. Take a look at our [ESLint file][eslint].
### Code Rules
-1. **Do not mutate property names or values in a format.** Mutations like this should happen in a transformer.
+1. **Do not mutate token names or values in a format.** Mutations like this should happen in a transformer.
1. **Be as generic as possible.** Do not hard-code any values or configuration in formats.
1. **Fail loudly.** Users should be aware if something is missing or configurations aren't correct. This will help debug any issues instead of failing silently.
1. **Rely on few dependencies.** This framework is meant to be extended and allows for customization. We don't want to bring a slew of dependencies that most people don't need.
@@ -82,6 +82,6 @@ We use [docsify](https://docsify.js.org/#/) to transform the markdown files into
[issues]: https://github.com/amzn/style-dictionary/issues
[pr]: https://github.com/amzn/style-dictionary/pulls
-[license]: https://github.com/amzn/style-dictionary/blob/master/LICENSE
+[license]: https://github.com/amzn/style-dictionary/blob/main/LICENSE
[cla]: http://en.wikipedia.org/wiki/Contributor_License_Agreement
-[eslint]: https://github.com/amzn/style-dictionary/blob/master/.eslintrc.json
+[eslint]: https://github.com/amzn/style-dictionary/blob/main/.eslintrc.json
diff --git a/README.md b/README.md
index d0d350a4c..8fdbedeb0 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,21 @@
-Get ready for the next release of Style Dictionary! 🚀
+What's new in Style Dictionary 3.0!
[![npm version](https://img.shields.io/npm/v/style-dictionary.svg?style=flat-square)](https://badge.fury.io/js/style-dictionary)
![license](https://img.shields.io/npm/l/style-dictionary.svg?style=flat-square)
-[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/amzn/style-dictionary/blob/master/CONTRIBUTING.md#submitting-pull-requests)
+[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/amzn/style-dictionary/blob/main/CONTRIBUTING.md#submitting-pull-requests)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/amzn/style-dictionary/Test?style=flat-square)](https://github.com/amzn/style-dictionary/actions/workflows/test.yml)
[![downloads](https://img.shields.io/npm/dm/style-dictionary.svg?style=flat-square)](https://www.npmjs.com/package/style-dictionary)
# Style Dictionary
> *Style once, use everywhere.*
-A Style Dictionary uses design tokens to define styles once and use those styles on any platform or language. It provides a single place to create and edit your styles, and exports these properties to all the places you need - iOS, Android, CSS, JS, HTML, sketch files, style documentation, etc. It is available as a CLI through npm, but can also be used like any normal node module if you want to extend its functionality.
+A Style Dictionary uses design tokens to define styles once and use those styles on any platform or language. It provides a single place to create and edit your styles, and exports these tokens to all the places you need - iOS, Android, CSS, JS, HTML, sketch files, style documentation, etc. It is available as a CLI through npm, but can also be used like any normal node module if you want to extend its functionality.
-When you are managing user experiences, it can be quite challenging to keep styles consistent and synchronized across multiple development platforms and devices. At the same time, designers, developers, PMs and others must be able to have consistent and up-to-date style documentation to enable effective work and communication. Even then, mistakes inevitably happen and the design may not be implemented accurately. StyleDictionary solves this by automatically generating style definitions across all platforms from a single source - removing roadblocks, errors, and inefficiencies across your workflow.
+When you are managing user experiences, it can be quite challenging to keep styles consistent and synchronized across multiple development platforms and devices. At the same time, designers, developers, PMs and others must be able to have consistent and up-to-date style documentation to enable effective work and communication. Even then, mistakes inevitably happen and the design may not be implemented accurately. Style Dictionary solves this by automatically generating style definitions across all platforms from a single source - removing roadblocks, errors, and inefficiencies across your workflow.
For detailed usage head to https://amzn.github.io/style-dictionary
@@ -27,7 +27,7 @@ For detailed usage head to https://amzn.github.io/style-dictionary
* [Usage](#usage)
* [Example](#example)
* [Quick Start](#quick-start)
-* [Style Properties](#style-properties)
+* [Design Tokens](#design-tokens)
* [Extending](#extending)
* [Contributing](#contributing)
* [License](#license)
@@ -76,7 +76,7 @@ StyleDictionary.buildAllPlatforms();
The `.extend()` method is an overloaded method that can also take an object with the configuration in the same format as a config.json file.
```javascript
const StyleDictionary = require('style-dictionary').extend({
- source: ['properties/**/*.json'],
+ source: ['tokens/**/*.json'],
platforms: {
scss: {
transformGroup: 'scss',
@@ -96,10 +96,11 @@ StyleDictionary.buildAllPlatforms();
## Example
[Take a look at some of our examples](examples/)
-A style dictionary is a collection of style properties, key/value pairs that describe stylistic attributes like colors, sizes, icons, motion, etc. A style dictionary defines these style properties in JSON files, and can also include static assets like images and fonts. Here is a basic example of what the package structure can look like:
+A style dictionary is a collection of design tokens, key/value pairs that describe stylistic attributes like colors, sizes, icons, motion, etc. A style dictionary defines these design tokens in JSON or Javascript files, and can also include static assets like images and fonts. Here is a basic example of what the package structure can look like:
+
```
├── config.json
-├── properties/
+├── tokens/
│ ├── size/
│ ├── font.json
│ ├── color/
@@ -111,10 +112,11 @@ A style dictionary is a collection of style properties, key/value pairs that des
```
### config.json
-This tells the style dictionary build system how and what to build. The default file path is config.json in the root of the project, but you can name it whatever you want, you can pass in the `--config` flag.
+This tells the style dictionary build system how and what to build. The default file path is `config.json` or `config.js` in the root of the project, but you can name it whatever you want by passing in the `--config` flag to the [CLI](https://amzn.github.io/style-dictionary/#/using_the_cli).
+
```json
{
- "source": ["properties/**/*.json"],
+ "source": ["tokens/**/*.json"],
"platforms": {
"scss": {
"transformGroup": "scss",
@@ -135,13 +137,14 @@ This tells the style dictionary build system how and what to build. The default
}
}
```
+
| Attribute | Type | Description |
| :--- | :--- | :--- |
-| source | Array | Paths to the property json files. Can have globs. |
+| source | Array | An array of file path [globs](https://github.com/isaacs/node-glob) to design token files. Style Dictionary will do a deep merge of all of the token files, allowing you to organize your files files however you want. |
+| include | Array | An array of file path [globs](https://github.com/isaacs/node-glob) to design token files that contain default styles. The Style Dictionary uses this as a base collection of tokens. The tokens found using the "source" attribute will overwrite tokens found using include. |
| platforms | Object | Sets of platform files to be built. |
-| platforms | Array | Paths to the property json files. Can have globs. |
-| platform.transformGroup | String (optional) | Apply a group of transforms to the properties, must either define this or `transforms`. |
-| platform.transforms | Array (optional) | Transforms to apply sequentially to all properties. Can be a built-in one or you can create your own. |
+| platform.transformGroup | String (optional) | Apply a group of transforms to the tokens, must either define this or `transforms`. |
+| platform.transforms | Array (optional) | Transforms to apply sequentially to all tokens. Can be a built-in one or you can create your own. |
| platform.buildPath | String (optional) | Base path to build the files, must end with a trailing slash. |
| platform.files | Array (optional) | Files to be generated for this platform. |
| platform.file.destination | String (optional) | Location to build the file, will be appended to the buildPath. |
@@ -149,7 +152,8 @@ This tells the style dictionary build system how and what to build. The default
| platform.file.options | Object (optional) | A set of extra options associated with the file. |
| platform.file.options.showFileHeader | Boolean | If the generated file should have a "Do not edit + Timestamp" header (where the format supports it). By default is "true". |
-### Properties
+### Design Tokens
+
```json
{
"size": {
@@ -163,7 +167,7 @@ This tells the style dictionary build system how and what to build. The default
}
```
-Here we are creating some basic font size properties. The style definition size.font.small.value is "10px" for example. The style definition size.font.base.value is automatically aliased to the value found in size.font.medium.value and both of those resolve to "16px".
+Here we are creating some basic font size design tokens. The style definition size.font.small.value is "10px" for example. The style definition size.font.base.value is automatically aliased to the value found in size.font.medium.value and both of those resolve to "16px".
Now what the style dictionary build system will do with this information is convert it to different formats, enabling these values to be used in any type of codebase. From this one file you can generate any number of files like:
@@ -190,16 +194,21 @@ float const SizeFontBase = 16.00f;
## Quick Start
-The style dictionary framework comes with some example code to get you started. Install the node module globally, create a directory and `cd` into it.
+
+The style dictionary framework comes with some example code to get you stared. Install the node module globally, create a directory and `cd` into it.
+
```
$ npm i -g style-dictionary
$ mkdir MyStyleDictionary
$ cd MyStyleDictionary
```
+
Now run:
+
```
$ style-dictionary init basic
```
+
This command will copy over the example files found in [example](examples/) in this repo. Now you have an example project set up. You can make changes to the style dictionary and rebuild the project by running:
```
@@ -209,13 +218,13 @@ $ style-dictionary build
Take a look at the documentation for the example code.
-## Style Properties
+## Design Tokens
-A style property is an attribute to describe something visually. It is atomic (it cannot be broken down further). Style properties have a name, a value, and optional attributes or metadata. The name of a property can be anything, but we have a proposed naming structure that works really well in the next section.
+A design token is an attribute to describe something visually. It is atomic (it cannot be broken down further). Design tokens have a name, a value, and optional attributes or metadata. The name of a token can be anything, but we have a proposed naming structure that we find works really well in the next section.
### Category/Type/Item Structure
-While not exactly necessary, we feel this classification structure of style properties makes the most sense semantically. Style properties can be organized into a hierarchical tree structure with the top level, category, defining the primitive nature of the property. For example, we have the color category and every property underneath is always a color. As you proceed down the tree to type, item, sub-item, and state, you get more specific about what that color is. Is it a background color, a text color, or a border color? What kind of text color is it? You get the point. Now you can structure your property json files like simple objects:
+While not exactly necessary, we feel this classification structure of design tokens makes the most sense semantically. Design tokens can be organized into a hierarchical tree structure with the top level, category, defining the primitive nature of the token. For example, we have the color category and every token underneath is always a color. As you proceed down the tree to type, item, sub-item, and state, you get more specific about what that color is. Is it a background color, a text color, or a border color? What kind of text color is it? You get the point. Now you can structure your token json files like simple objects:
```
{
@@ -228,15 +237,15 @@ While not exactly necessary, we feel this classification structure of style prop
}
```
- The CTI is implicit in the structure, the category and type is 'size' and 'font', and there are 2 properties 'base' and 'large'.
+The CTI is implicit in the structure, the category and type is 'size' and 'font', and there are 2 tokens 'base' and 'large'.
- Structuring style properties in this manner gives us consistent naming and accessing of these properties. You don't need to remember if it is button_color_error or error_button_color, it is color_background_button_error!
+Structuring design tokens in this manner gives us consistent naming and accessing of these tokens. You don't need to remember if it is button_color_error or error_button_color, it is color_background_button_error!
- You can organize and name your style properties however you want, there are no restrictions. But we have a good amount of helpers if you do use this structure, like the 'attribute/cti' transform which adds attributes to the property of its CTI based on the path in the object. There are a lot of name transforms as well for when you want a flat structure like for Sass variables.
+You can organize and name your design tokens however you want, there are no restrictions. But we have a good amount of helpers if you do use this structure, like the 'attribute/cti' transform which adds attributes to the token of its CTI based on the path in the object. There are a lot of name transforms as well for when you want a flat structure like for Sass variables.
- Also, the CTI structure provides a good mechanism to target transforms for specific kinds of properties. All of the transforms provided by the framework use the CTI of a property to know if it should be applied. For instance, the 'color/hex' transform only applies to properties of the category 'color'.
+Also, the CTI structure provides a good mechanism to target transforms for specific kinds of tokens. All of the transforms provided by the framework use the CTI of a token to know if it should be applied. For instance, the 'color/hex' transform only applies to tokens of the category 'color'.
-You can also add a _comment_ to a style property:
+You can also add a _comment_ to a design token:
```
{
diff --git a/__integration__/README.md b/__integration__/README.md
new file mode 100644
index 000000000..f8d9415dd
--- /dev/null
+++ b/__integration__/README.md
@@ -0,0 +1,12 @@
+# Style Dictionary Integration Tests
+
+Style Dictionary is a tool to generate valid source code for multiple platforms and languages to consume. Because of this, unit testing can only get us so far. Simply unit testing or even basic snapshot testing of outputs doesn't give the whole picture.
+
+The integration tests here are meant to show complete end-to-end examples of Style Dictionary being used in order to validate the files it is generating.
+
+The integration tests still use Jest and snapshots, but rather than singling out format code, each test group builds a complete Style Dictionary and then tests the content of the output files with snapshots and validating syntax where possible.
+
+## To do
+
+* Jest snapshots are a good built-in way to test if content has changed, but storing the contents of a source code file like a CSS variables file doesn't get proper syntax highlighting and validation in IDEs. It would be better if we could store the raw output file and test against the new contents, but snapshot testing does not allow for that.
+* Add more syntax validations
\ No newline at end of file
diff --git a/__integration__/__snapshots__/android.test.js.snap b/__integration__/__snapshots__/android.test.js.snap
new file mode 100644
index 000000000..8d8a33582
--- /dev/null
+++ b/__integration__/__snapshots__/android.test.js.snap
@@ -0,0 +1,517 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration android android/resources should match snapshot 1`] = `
+"
+
+
+
+ #ffffffff
+ #fff3f4f4
+ #ffdee1e1
+ #ffffeae9
+ #ffffede3
+ #ffebf9eb
+ #ffe9f8ff
+ #ffdee1e1
+ #ffc8cccc
+ #ff0b8599
+ #ff6f5ed3
+ #ffebf9eb
+ #ffd7f4d7
+ #ffc2f2bd
+ #ff98e58e
+ #ff75dd66
+ #ff59cb59
+ #ff2bb656
+ #ff0ca750
+ #ff008b46
+ #ff006b40
+ #ff08422f
+ #ff002b20
+ #ffe5f9f5
+ #ffcdf7ef
+ #ffb3f2e6
+ #ff7dead5
+ #ff24e0c5
+ #ff08c4b2
+ #ff00a99c
+ #ff0b968f
+ #ff067c7c
+ #ff026661
+ #ff083f3f
+ #ff002528
+ #ffd9fcfb
+ #ffc5f9f9
+ #ffa5f2f2
+ #ff76e5e2
+ #ff33d6e2
+ #ff17b8ce
+ #ff0797ae
+ #ff0b8599
+ #ff0f6e84
+ #ff035e73
+ #ff083d4f
+ #ff002838
+ #ffe9f8ff
+ #ffdcf2ff
+ #ffc7e4f9
+ #ffa1d2f8
+ #ff56adf5
+ #ff3896e3
+ #ff2b87d3
+ #ff2079c3
+ #ff116daa
+ #ff0c5689
+ #ff0a3960
+ #ff002138
+ #fff2f2f9
+ #ffeaeaf9
+ #ffd8d7f9
+ #ffc1c1f7
+ #ffa193f2
+ #ff9180f4
+ #ff816fea
+ #ff6f5ed3
+ #ff5e4eba
+ #ff483a9c
+ #ff2d246b
+ #ff1d1d38
+ #fffef0ff
+ #fff9e3fc
+ #fff4c4f7
+ #ffedadf2
+ #fff282f5
+ #ffdb61db
+ #ffc44eb9
+ #ffac44a8
+ #ff8f3896
+ #ff6c2277
+ #ff451551
+ #ff29192d
+ #ffffe9f3
+ #fffcdbeb
+ #ffffb5d5
+ #ffff95c1
+ #ffff76ae
+ #ffef588b
+ #ffe0447c
+ #ffce3665
+ #ffb22f5b
+ #ff931847
+ #ff561231
+ #ff2b1721
+ #ffffeae9
+ #ffffd5d2
+ #ffffb8b1
+ #ffff9c8f
+ #ffff7f6e
+ #fff76054
+ #ffed4c42
+ #ffdb3e3e
+ #ffc63434
+ #ff992222
+ #ff6d1313
+ #ff2b1111
+ #ffffede3
+ #fffcdccc
+ #ffffc6a4
+ #ffffb180
+ #ffff9c5d
+ #fffc8943
+ #fff57d33
+ #ffed7024
+ #ffce5511
+ #ff962c0b
+ #ff601700
+ #ff2d130e
+ #ffffffff
+ #fff3f4f4
+ #ffdee1e1
+ #ffc8cccc
+ #ffb0b6b7
+ #ff929a9b
+ #ff6e797a
+ #ff515e5f
+ #ff364141
+ #ff273333
+ #ff162020
+ #ff040404
+ #fffff8e2
+ #fffdefcd
+ #ffffe99a
+ #ffffe16e
+ #ffffd943
+ #ffffcd1c
+ #ffffbc00
+ #ffdd9903
+ #ffba7506
+ #ff944c0c
+ #ff542a00
+ #ff2d1a05
+ #ff040404
+ #ff273333
+ #ff364141
+ #ff0b8599
+ #ff0b8599
+ #ff6f5ed3
+ #ff364141
+ #ff6d1313
+ #ff601700
+ #ff08422f
+ 480.00dp
+ 12.00sp
+ 16.00sp
+ 24.00sp
+ 36.00sp
+ 8.00dp
+ 16.00dp
+ 16.00dp
+ 16.00dp
+
+
+"
+`;
+
+exports[`integration android android/resources with filter should match snapshot 1`] = `
+"
+
+
+
+ #ffffffff
+ #fff3f4f4
+ #ffdee1e1
+ #ffffeae9
+ #ffffede3
+ #ffebf9eb
+ #ffe9f8ff
+ #ffdee1e1
+ #ffc8cccc
+ #ff0b8599
+ #ff6f5ed3
+ #ffebf9eb
+ #ffd7f4d7
+ #ffc2f2bd
+ #ff98e58e
+ #ff75dd66
+ #ff59cb59
+ #ff2bb656
+ #ff0ca750
+ #ff008b46
+ #ff006b40
+ #ff08422f
+ #ff002b20
+ #ffe5f9f5
+ #ffcdf7ef
+ #ffb3f2e6
+ #ff7dead5
+ #ff24e0c5
+ #ff08c4b2
+ #ff00a99c
+ #ff0b968f
+ #ff067c7c
+ #ff026661
+ #ff083f3f
+ #ff002528
+ #ffd9fcfb
+ #ffc5f9f9
+ #ffa5f2f2
+ #ff76e5e2
+ #ff33d6e2
+ #ff17b8ce
+ #ff0797ae
+ #ff0b8599
+ #ff0f6e84
+ #ff035e73
+ #ff083d4f
+ #ff002838
+ #ffe9f8ff
+ #ffdcf2ff
+ #ffc7e4f9
+ #ffa1d2f8
+ #ff56adf5
+ #ff3896e3
+ #ff2b87d3
+ #ff2079c3
+ #ff116daa
+ #ff0c5689
+ #ff0a3960
+ #ff002138
+ #fff2f2f9
+ #ffeaeaf9
+ #ffd8d7f9
+ #ffc1c1f7
+ #ffa193f2
+ #ff9180f4
+ #ff816fea
+ #ff6f5ed3
+ #ff5e4eba
+ #ff483a9c
+ #ff2d246b
+ #ff1d1d38
+ #fffef0ff
+ #fff9e3fc
+ #fff4c4f7
+ #ffedadf2
+ #fff282f5
+ #ffdb61db
+ #ffc44eb9
+ #ffac44a8
+ #ff8f3896
+ #ff6c2277
+ #ff451551
+ #ff29192d
+ #ffffe9f3
+ #fffcdbeb
+ #ffffb5d5
+ #ffff95c1
+ #ffff76ae
+ #ffef588b
+ #ffe0447c
+ #ffce3665
+ #ffb22f5b
+ #ff931847
+ #ff561231
+ #ff2b1721
+ #ffffeae9
+ #ffffd5d2
+ #ffffb8b1
+ #ffff9c8f
+ #ffff7f6e
+ #fff76054
+ #ffed4c42
+ #ffdb3e3e
+ #ffc63434
+ #ff992222
+ #ff6d1313
+ #ff2b1111
+ #ffffede3
+ #fffcdccc
+ #ffffc6a4
+ #ffffb180
+ #ffff9c5d
+ #fffc8943
+ #fff57d33
+ #ffed7024
+ #ffce5511
+ #ff962c0b
+ #ff601700
+ #ff2d130e
+ #ffffffff
+ #fff3f4f4
+ #ffdee1e1
+ #ffc8cccc
+ #ffb0b6b7
+ #ff929a9b
+ #ff6e797a
+ #ff515e5f
+ #ff364141
+ #ff273333
+ #ff162020
+ #ff040404
+ #fffff8e2
+ #fffdefcd
+ #ffffe99a
+ #ffffe16e
+ #ffffd943
+ #ffffcd1c
+ #ffffbc00
+ #ffdd9903
+ #ffba7506
+ #ff944c0c
+ #ff542a00
+ #ff2d1a05
+ #ff040404
+ #ff273333
+ #ff364141
+ #ff0b8599
+ #ff0b8599
+ #ff6f5ed3
+ #ff364141
+ #ff6d1313
+ #ff601700
+ #ff08422f
+
+
+"
+`;
+
+exports[`integration android android/resources with references should match snapshot 1`] = `
+"
+
+
+
+ @color/color_core_neutral_0
+ @color/color_core_neutral_100
+ @color/color_core_neutral_200
+ @color/color_core_red_0
+ @color/color_core_orange_0
+ @color/color_core_green_0
+ @color/color_core_blue_0
+ @color/color_background_tertiary
+ @color/color_core_neutral_300
+ @color/color_core_aqua_700
+ @color/color_core_purple_700
+ #ffebf9eb
+ #ffd7f4d7
+ #ffc2f2bd
+ #ff98e58e
+ #ff75dd66
+ #ff59cb59
+ #ff2bb656
+ #ff0ca750
+ #ff008b46
+ #ff006b40
+ #ff08422f
+ #ff002b20
+ #ffe5f9f5
+ #ffcdf7ef
+ #ffb3f2e6
+ #ff7dead5
+ #ff24e0c5
+ #ff08c4b2
+ #ff00a99c
+ #ff0b968f
+ #ff067c7c
+ #ff026661
+ #ff083f3f
+ #ff002528
+ #ffd9fcfb
+ #ffc5f9f9
+ #ffa5f2f2
+ #ff76e5e2
+ #ff33d6e2
+ #ff17b8ce
+ #ff0797ae
+ #ff0b8599
+ #ff0f6e84
+ #ff035e73
+ #ff083d4f
+ #ff002838
+ #ffe9f8ff
+ #ffdcf2ff
+ #ffc7e4f9
+ #ffa1d2f8
+ #ff56adf5
+ #ff3896e3
+ #ff2b87d3
+ #ff2079c3
+ #ff116daa
+ #ff0c5689
+ #ff0a3960
+ #ff002138
+ #fff2f2f9
+ #ffeaeaf9
+ #ffd8d7f9
+ #ffc1c1f7
+ #ffa193f2
+ #ff9180f4
+ #ff816fea
+ #ff6f5ed3
+ #ff5e4eba
+ #ff483a9c
+ #ff2d246b
+ #ff1d1d38
+ #fffef0ff
+ #fff9e3fc
+ #fff4c4f7
+ #ffedadf2
+ #fff282f5
+ #ffdb61db
+ #ffc44eb9
+ #ffac44a8
+ #ff8f3896
+ #ff6c2277
+ #ff451551
+ #ff29192d
+ #ffffe9f3
+ #fffcdbeb
+ #ffffb5d5
+ #ffff95c1
+ #ffff76ae
+ #ffef588b
+ #ffe0447c
+ #ffce3665
+ #ffb22f5b
+ #ff931847
+ #ff561231
+ #ff2b1721
+ #ffffeae9
+ #ffffd5d2
+ #ffffb8b1
+ #ffff9c8f
+ #ffff7f6e
+ #fff76054
+ #ffed4c42
+ #ffdb3e3e
+ #ffc63434
+ #ff992222
+ #ff6d1313
+ #ff2b1111
+ #ffffede3
+ #fffcdccc
+ #ffffc6a4
+ #ffffb180
+ #ffff9c5d
+ #fffc8943
+ #fff57d33
+ #ffed7024
+ #ffce5511
+ #ff962c0b
+ #ff601700
+ #ff2d130e
+ #ffffffff
+ #fff3f4f4
+ #ffdee1e1
+ #ffc8cccc
+ #ffb0b6b7
+ #ff929a9b
+ #ff6e797a
+ #ff515e5f
+ #ff364141
+ #ff273333
+ #ff162020
+ #ff040404
+ #fffff8e2
+ #fffdefcd
+ #ffffe99a
+ #ffffe16e
+ #ffffd943
+ #ffffcd1c
+ #ffffbc00
+ #ffdd9903
+ #ffba7506
+ #ff944c0c
+ #ff542a00
+ #ff2d1a05
+ @color/color_core_neutral_1100
+ @color/color_core_neutral_900
+ @color/color_core_neutral_800
+ @color/color_brand_primary
+ @color/color_brand_primary
+ @color/color_brand_secondary
+ @color/color_font_tertiary
+ @color/color_core_red_1000
+ @color/color_core_orange_1000
+ @color/color_core_green_1000
+ 480.00dp
+ 12.00sp
+ 16.00sp
+ 24.00sp
+ 36.00sp
+ 8.00dp
+ 16.00dp
+ 16.00dp
+ 16.00dp
+
+
+"
+`;
diff --git a/__integration__/__snapshots__/compose.test.js.snap b/__integration__/__snapshots__/compose.test.js.snap
new file mode 100644
index 000000000..eb7f42de0
--- /dev/null
+++ b/__integration__/__snapshots__/compose.test.js.snap
@@ -0,0 +1,363 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration compose compose/object should match snapshot 1`] = `
+"
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+
+package com.example.tokens;
+
+
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.unit.*
+
+object StyleDictionary {
+ val colorBackgroundDanger = Color(0xffffeae9)
+ val colorBackgroundDisabled = Color(0xffdee1e1)
+ val colorBackgroundInfo = Color(0xffe9f8ff)
+ val colorBackgroundPrimary = Color(0xffffffff)
+ val colorBackgroundSecondary = Color(0xfff3f4f4)
+ val colorBackgroundSuccess = Color(0xffebf9eb)
+ val colorBackgroundTertiary = Color(0xffdee1e1)
+ val colorBackgroundWarning = Color(0xffffede3)
+ val colorBorderPrimary = Color(0xffc8cccc)
+ val colorBrandPrimary = Color(0xff0b8599)
+ val colorBrandSecondary = Color(0xff6f5ed3)
+ val colorCoreAqua0 = Color(0xffd9fcfb)
+ val colorCoreAqua100 = Color(0xffc5f9f9)
+ val colorCoreAqua1000 = Color(0xff083d4f)
+ val colorCoreAqua1100 = Color(0xff002838)
+ val colorCoreAqua200 = Color(0xffa5f2f2)
+ val colorCoreAqua300 = Color(0xff76e5e2)
+ val colorCoreAqua400 = Color(0xff33d6e2)
+ val colorCoreAqua500 = Color(0xff17b8ce)
+ val colorCoreAqua600 = Color(0xff0797ae)
+ val colorCoreAqua700 = Color(0xff0b8599)
+ val colorCoreAqua800 = Color(0xff0f6e84)
+ val colorCoreAqua900 = Color(0xff035e73)
+ val colorCoreBlue0 = Color(0xffe9f8ff)
+ val colorCoreBlue100 = Color(0xffdcf2ff)
+ val colorCoreBlue1000 = Color(0xff0a3960)
+ val colorCoreBlue1100 = Color(0xff002138)
+ val colorCoreBlue200 = Color(0xffc7e4f9)
+ val colorCoreBlue300 = Color(0xffa1d2f8)
+ val colorCoreBlue400 = Color(0xff56adf5)
+ val colorCoreBlue500 = Color(0xff3896e3)
+ val colorCoreBlue600 = Color(0xff2b87d3)
+ val colorCoreBlue700 = Color(0xff2079c3)
+ val colorCoreBlue800 = Color(0xff116daa)
+ val colorCoreBlue900 = Color(0xff0c5689)
+ val colorCoreGreen0 = Color(0xffebf9eb)
+ val colorCoreGreen100 = Color(0xffd7f4d7)
+ val colorCoreGreen1000 = Color(0xff08422f)
+ val colorCoreGreen1100 = Color(0xff002b20)
+ val colorCoreGreen200 = Color(0xffc2f2bd)
+ val colorCoreGreen300 = Color(0xff98e58e)
+ val colorCoreGreen400 = Color(0xff75dd66)
+ val colorCoreGreen500 = Color(0xff59cb59)
+ val colorCoreGreen600 = Color(0xff2bb656)
+ val colorCoreGreen700 = Color(0xff0ca750)
+ val colorCoreGreen800 = Color(0xff008b46)
+ val colorCoreGreen900 = Color(0xff006b40)
+ val colorCoreMagenta0 = Color(0xfffef0ff)
+ val colorCoreMagenta100 = Color(0xfff9e3fc)
+ val colorCoreMagenta1000 = Color(0xff451551)
+ val colorCoreMagenta1100 = Color(0xff29192d)
+ val colorCoreMagenta200 = Color(0xfff4c4f7)
+ val colorCoreMagenta300 = Color(0xffedadf2)
+ val colorCoreMagenta400 = Color(0xfff282f5)
+ val colorCoreMagenta500 = Color(0xffdb61db)
+ val colorCoreMagenta600 = Color(0xffc44eb9)
+ val colorCoreMagenta700 = Color(0xffac44a8)
+ val colorCoreMagenta800 = Color(0xff8f3896)
+ val colorCoreMagenta900 = Color(0xff6c2277)
+ val colorCoreNeutral0 = Color(0xffffffff)
+ val colorCoreNeutral100 = Color(0xfff3f4f4)
+ val colorCoreNeutral1000 = Color(0xff162020)
+ val colorCoreNeutral1100 = Color(0xff040404)
+ val colorCoreNeutral200 = Color(0xffdee1e1)
+ val colorCoreNeutral300 = Color(0xffc8cccc)
+ val colorCoreNeutral400 = Color(0xffb0b6b7)
+ val colorCoreNeutral500 = Color(0xff929a9b)
+ val colorCoreNeutral600 = Color(0xff6e797a)
+ val colorCoreNeutral700 = Color(0xff515e5f)
+ val colorCoreNeutral800 = Color(0xff364141)
+ val colorCoreNeutral900 = Color(0xff273333)
+ val colorCoreOrange0 = Color(0xffffede3)
+ val colorCoreOrange100 = Color(0xfffcdccc)
+ val colorCoreOrange1000 = Color(0xff601700)
+ val colorCoreOrange1100 = Color(0xff2d130e)
+ val colorCoreOrange200 = Color(0xffffc6a4)
+ val colorCoreOrange300 = Color(0xffffb180)
+ val colorCoreOrange400 = Color(0xffff9c5d)
+ val colorCoreOrange500 = Color(0xfffc8943)
+ val colorCoreOrange600 = Color(0xfff57d33)
+ val colorCoreOrange700 = Color(0xffed7024)
+ val colorCoreOrange800 = Color(0xffce5511)
+ val colorCoreOrange900 = Color(0xff962c0b)
+ val colorCorePink0 = Color(0xffffe9f3)
+ val colorCorePink100 = Color(0xfffcdbeb)
+ val colorCorePink1000 = Color(0xff561231)
+ val colorCorePink1100 = Color(0xff2b1721)
+ val colorCorePink200 = Color(0xffffb5d5)
+ val colorCorePink300 = Color(0xffff95c1)
+ val colorCorePink400 = Color(0xffff76ae)
+ val colorCorePink500 = Color(0xffef588b)
+ val colorCorePink600 = Color(0xffe0447c)
+ val colorCorePink700 = Color(0xffce3665)
+ val colorCorePink800 = Color(0xffb22f5b)
+ val colorCorePink900 = Color(0xff931847)
+ val colorCorePurple0 = Color(0xfff2f2f9)
+ val colorCorePurple100 = Color(0xffeaeaf9)
+ val colorCorePurple1000 = Color(0xff2d246b)
+ val colorCorePurple1100 = Color(0xff1d1d38)
+ val colorCorePurple200 = Color(0xffd8d7f9)
+ val colorCorePurple300 = Color(0xffc1c1f7)
+ val colorCorePurple400 = Color(0xffa193f2)
+ val colorCorePurple500 = Color(0xff9180f4)
+ val colorCorePurple600 = Color(0xff816fea)
+ val colorCorePurple700 = Color(0xff6f5ed3)
+ val colorCorePurple800 = Color(0xff5e4eba)
+ val colorCorePurple900 = Color(0xff483a9c)
+ val colorCoreRed0 = Color(0xffffeae9)
+ val colorCoreRed100 = Color(0xffffd5d2)
+ val colorCoreRed1000 = Color(0xff6d1313)
+ val colorCoreRed1100 = Color(0xff2b1111)
+ val colorCoreRed200 = Color(0xffffb8b1)
+ val colorCoreRed300 = Color(0xffff9c8f)
+ val colorCoreRed400 = Color(0xffff7f6e)
+ val colorCoreRed500 = Color(0xfff76054)
+ val colorCoreRed600 = Color(0xffed4c42)
+ val colorCoreRed700 = Color(0xffdb3e3e)
+ val colorCoreRed800 = Color(0xffc63434)
+ val colorCoreRed900 = Color(0xff992222)
+ val colorCoreTeal0 = Color(0xffe5f9f5)
+ val colorCoreTeal100 = Color(0xffcdf7ef)
+ val colorCoreTeal1000 = Color(0xff083f3f)
+ val colorCoreTeal1100 = Color(0xff002528)
+ val colorCoreTeal200 = Color(0xffb3f2e6)
+ val colorCoreTeal300 = Color(0xff7dead5)
+ val colorCoreTeal400 = Color(0xff24e0c5)
+ val colorCoreTeal500 = Color(0xff08c4b2)
+ val colorCoreTeal600 = Color(0xff00a99c)
+ val colorCoreTeal700 = Color(0xff0b968f)
+ val colorCoreTeal800 = Color(0xff067c7c)
+ val colorCoreTeal900 = Color(0xff026661)
+ val colorCoreYellow0 = Color(0xfffff8e2)
+ val colorCoreYellow100 = Color(0xfffdefcd)
+ val colorCoreYellow1000 = Color(0xff542a00)
+ val colorCoreYellow1100 = Color(0xff2d1a05)
+ val colorCoreYellow200 = Color(0xffffe99a)
+ val colorCoreYellow300 = Color(0xffffe16e)
+ val colorCoreYellow400 = Color(0xffffd943)
+ val colorCoreYellow500 = Color(0xffffcd1c)
+ val colorCoreYellow600 = Color(0xffffbc00)
+ val colorCoreYellow700 = Color(0xffdd9903)
+ val colorCoreYellow800 = Color(0xffba7506)
+ val colorCoreYellow900 = Color(0xff944c0c)
+ val colorFontDanger = Color(0xff6d1313)
+ val colorFontInteractive = Color(0xff0b8599)
+ val colorFontInteractiveActive = Color(0xff6f5ed3)
+ val colorFontInteractiveDisabled = Color(0xff364141)
+ val colorFontInteractiveHover = Color(0xff0b8599)
+ val colorFontPrimary = Color(0xff040404)
+ val colorFontSecondary = Color(0xff273333)
+ val colorFontSuccess = Color(0xff08422f)
+ val colorFontTertiary = Color(0xff364141)
+ val colorFontWarning = Color(0xff601700)
+ val sizeBorderRadiusLarge = 480.00.dp
+ val sizeFontLarge = 24.00.sp
+ val sizeFontMedium = 16.00.sp
+ val sizeFontSmall = 12.00.sp
+ val sizeFontXl = 36.00.sp
+ val sizePaddingLarge = 16.00.dp
+ val sizePaddingMedium = 16.00.dp
+ val sizePaddingSmall = 8.00.dp
+ val sizePaddingXl = 16.00.dp
+}
+"
+`;
+
+exports[`integration compose compose/object with references should match snapshot 1`] = `
+"
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+
+package com.example.tokens;
+
+
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.unit.*
+
+object StyleDictionary {
+ val sizePaddingXl = 16.00.dp
+ val sizePaddingLarge = 16.00.dp
+ val sizePaddingMedium = 16.00.dp
+ val sizePaddingSmall = 8.00.dp
+ val sizeFontXl = 36.00.sp
+ val sizeFontLarge = 24.00.sp
+ val sizeFontMedium = 16.00.sp
+ val sizeFontSmall = 12.00.sp
+ val sizeBorderRadiusLarge = 480.00.dp
+ val colorCoreYellow1100 = Color(0xff2d1a05)
+ val colorCoreYellow1000 = Color(0xff542a00)
+ val colorCoreYellow900 = Color(0xff944c0c)
+ val colorCoreYellow800 = Color(0xffba7506)
+ val colorCoreYellow700 = Color(0xffdd9903)
+ val colorCoreYellow600 = Color(0xffffbc00)
+ val colorCoreYellow500 = Color(0xffffcd1c)
+ val colorCoreYellow400 = Color(0xffffd943)
+ val colorCoreYellow300 = Color(0xffffe16e)
+ val colorCoreYellow200 = Color(0xffffe99a)
+ val colorCoreYellow100 = Color(0xfffdefcd)
+ val colorCoreYellow0 = Color(0xfffff8e2)
+ val colorCoreNeutral1100 = Color(0xff040404)
+ val colorCoreNeutral1000 = Color(0xff162020)
+ val colorCoreNeutral900 = Color(0xff273333)
+ val colorCoreNeutral800 = Color(0xff364141)
+ val colorCoreNeutral700 = Color(0xff515e5f)
+ val colorCoreNeutral600 = Color(0xff6e797a)
+ val colorCoreNeutral500 = Color(0xff929a9b)
+ val colorCoreNeutral400 = Color(0xffb0b6b7)
+ val colorCoreNeutral300 = Color(0xffc8cccc)
+ val colorCoreNeutral200 = Color(0xffdee1e1)
+ val colorCoreNeutral100 = Color(0xfff3f4f4)
+ val colorCoreNeutral0 = Color(0xffffffff)
+ val colorCoreOrange1100 = Color(0xff2d130e)
+ val colorCoreOrange1000 = Color(0xff601700)
+ val colorCoreOrange900 = Color(0xff962c0b)
+ val colorCoreOrange800 = Color(0xffce5511)
+ val colorCoreOrange700 = Color(0xffed7024)
+ val colorCoreOrange600 = Color(0xfff57d33)
+ val colorCoreOrange500 = Color(0xfffc8943)
+ val colorCoreOrange400 = Color(0xffff9c5d)
+ val colorCoreOrange300 = Color(0xffffb180)
+ val colorCoreOrange200 = Color(0xffffc6a4)
+ val colorCoreOrange100 = Color(0xfffcdccc)
+ val colorCoreOrange0 = Color(0xffffede3)
+ val colorCoreRed1100 = Color(0xff2b1111)
+ val colorCoreRed1000 = Color(0xff6d1313)
+ val colorCoreRed900 = Color(0xff992222)
+ val colorCoreRed800 = Color(0xffc63434)
+ val colorCoreRed700 = Color(0xffdb3e3e)
+ val colorCoreRed600 = Color(0xffed4c42)
+ val colorCoreRed500 = Color(0xfff76054)
+ val colorCoreRed400 = Color(0xffff7f6e)
+ val colorCoreRed300 = Color(0xffff9c8f)
+ val colorCoreRed200 = Color(0xffffb8b1)
+ val colorCoreRed100 = Color(0xffffd5d2)
+ val colorCoreRed0 = Color(0xffffeae9)
+ val colorCorePink1100 = Color(0xff2b1721)
+ val colorCorePink1000 = Color(0xff561231)
+ val colorCorePink900 = Color(0xff931847)
+ val colorCorePink800 = Color(0xffb22f5b)
+ val colorCorePink700 = Color(0xffce3665)
+ val colorCorePink600 = Color(0xffe0447c)
+ val colorCorePink500 = Color(0xffef588b)
+ val colorCorePink400 = Color(0xffff76ae)
+ val colorCorePink300 = Color(0xffff95c1)
+ val colorCorePink200 = Color(0xffffb5d5)
+ val colorCorePink100 = Color(0xfffcdbeb)
+ val colorCorePink0 = Color(0xffffe9f3)
+ val colorCoreMagenta1100 = Color(0xff29192d)
+ val colorCoreMagenta1000 = Color(0xff451551)
+ val colorCoreMagenta900 = Color(0xff6c2277)
+ val colorCoreMagenta800 = Color(0xff8f3896)
+ val colorCoreMagenta700 = Color(0xffac44a8)
+ val colorCoreMagenta600 = Color(0xffc44eb9)
+ val colorCoreMagenta500 = Color(0xffdb61db)
+ val colorCoreMagenta400 = Color(0xfff282f5)
+ val colorCoreMagenta300 = Color(0xffedadf2)
+ val colorCoreMagenta200 = Color(0xfff4c4f7)
+ val colorCoreMagenta100 = Color(0xfff9e3fc)
+ val colorCoreMagenta0 = Color(0xfffef0ff)
+ val colorCorePurple1100 = Color(0xff1d1d38)
+ val colorCorePurple1000 = Color(0xff2d246b)
+ val colorCorePurple900 = Color(0xff483a9c)
+ val colorCorePurple800 = Color(0xff5e4eba)
+ val colorCorePurple700 = Color(0xff6f5ed3)
+ val colorCorePurple600 = Color(0xff816fea)
+ val colorCorePurple500 = Color(0xff9180f4)
+ val colorCorePurple400 = Color(0xffa193f2)
+ val colorCorePurple300 = Color(0xffc1c1f7)
+ val colorCorePurple200 = Color(0xffd8d7f9)
+ val colorCorePurple100 = Color(0xffeaeaf9)
+ val colorCorePurple0 = Color(0xfff2f2f9)
+ val colorCoreBlue1100 = Color(0xff002138)
+ val colorCoreBlue1000 = Color(0xff0a3960)
+ val colorCoreBlue900 = Color(0xff0c5689)
+ val colorCoreBlue800 = Color(0xff116daa)
+ val colorCoreBlue700 = Color(0xff2079c3)
+ val colorCoreBlue600 = Color(0xff2b87d3)
+ val colorCoreBlue500 = Color(0xff3896e3)
+ val colorCoreBlue400 = Color(0xff56adf5)
+ val colorCoreBlue300 = Color(0xffa1d2f8)
+ val colorCoreBlue200 = Color(0xffc7e4f9)
+ val colorCoreBlue100 = Color(0xffdcf2ff)
+ val colorCoreBlue0 = Color(0xffe9f8ff)
+ val colorCoreAqua1100 = Color(0xff002838)
+ val colorCoreAqua1000 = Color(0xff083d4f)
+ val colorCoreAqua900 = Color(0xff035e73)
+ val colorCoreAqua800 = Color(0xff0f6e84)
+ val colorCoreAqua700 = Color(0xff0b8599)
+ val colorCoreAqua600 = Color(0xff0797ae)
+ val colorCoreAqua500 = Color(0xff17b8ce)
+ val colorCoreAqua400 = Color(0xff33d6e2)
+ val colorCoreAqua300 = Color(0xff76e5e2)
+ val colorCoreAqua200 = Color(0xffa5f2f2)
+ val colorCoreAqua100 = Color(0xffc5f9f9)
+ val colorCoreAqua0 = Color(0xffd9fcfb)
+ val colorCoreTeal1100 = Color(0xff002528)
+ val colorCoreTeal1000 = Color(0xff083f3f)
+ val colorCoreTeal900 = Color(0xff026661)
+ val colorCoreTeal800 = Color(0xff067c7c)
+ val colorCoreTeal700 = Color(0xff0b968f)
+ val colorCoreTeal600 = Color(0xff00a99c)
+ val colorCoreTeal500 = Color(0xff08c4b2)
+ val colorCoreTeal400 = Color(0xff24e0c5)
+ val colorCoreTeal300 = Color(0xff7dead5)
+ val colorCoreTeal200 = Color(0xffb3f2e6)
+ val colorCoreTeal100 = Color(0xffcdf7ef)
+ val colorCoreTeal0 = Color(0xffe5f9f5)
+ val colorCoreGreen1100 = Color(0xff002b20)
+ val colorCoreGreen1000 = Color(0xff08422f)
+ val colorCoreGreen900 = Color(0xff006b40)
+ val colorCoreGreen800 = Color(0xff008b46)
+ val colorCoreGreen700 = Color(0xff0ca750)
+ val colorCoreGreen600 = Color(0xff2bb656)
+ val colorCoreGreen500 = Color(0xff59cb59)
+ val colorCoreGreen400 = Color(0xff75dd66)
+ val colorCoreGreen300 = Color(0xff98e58e)
+ val colorCoreGreen200 = Color(0xffc2f2bd)
+ val colorCoreGreen100 = Color(0xffd7f4d7)
+ val colorCoreGreen0 = Color(0xffebf9eb)
+ val colorFontSuccess = colorCoreGreen1000
+ val colorFontWarning = colorCoreOrange1000
+ val colorFontDanger = colorCoreRed1000
+ val colorFontTertiary = colorCoreNeutral800
+ val colorFontSecondary = colorCoreNeutral900
+ val colorFontPrimary = colorCoreNeutral1100
+ val colorBrandSecondary = colorCorePurple700
+ val colorBrandPrimary = colorCoreAqua700
+ val colorBorderPrimary = colorCoreNeutral300
+ val colorBackgroundInfo = colorCoreBlue0
+ val colorBackgroundSuccess = colorCoreGreen0
+ val colorBackgroundWarning = colorCoreOrange0
+ val colorBackgroundDanger = colorCoreRed0
+ val colorBackgroundTertiary = colorCoreNeutral200
+ val colorBackgroundSecondary = colorCoreNeutral100
+ val colorBackgroundPrimary = colorCoreNeutral0
+ val colorFontInteractiveDisabled = colorFontTertiary
+ val colorFontInteractiveActive = colorBrandSecondary
+ val colorFontInteractiveHover = colorBrandPrimary
+ val colorFontInteractive = colorBrandPrimary
+ val colorBackgroundDisabled = colorBackgroundTertiary
+}
+"
+`;
diff --git a/__integration__/__snapshots__/css.test.js.snap b/__integration__/__snapshots__/css.test.js.snap
new file mode 100644
index 000000000..7733336e8
--- /dev/null
+++ b/__integration__/__snapshots__/css.test.js.snap
@@ -0,0 +1,529 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration css css/variables should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --breakpoint-xs: 304px;
+ --breakpoint-sm: 768px;
+ --breakpoint-md: calc(304px / 768px);
+ --color-background-primary: #ffffff;
+ --color-background-secondary: #f3f4f4;
+ --color-background-tertiary: #dee1e1;
+ --color-background-danger: #ffeae9;
+ --color-background-warning: #ffede3;
+ --color-background-success: #ebf9eb;
+ --color-background-info: #e9f8ff;
+ --color-background-disabled: #dee1e1;
+ --color-border-primary: #c8cccc;
+ --color-brand-primary: #0b8599;
+ --color-brand-secondary: #6f5ed3;
+ --color-core-green-0: #ebf9eb;
+ --color-core-green-100: #d7f4d7;
+ --color-core-green-200: #c2f2bd;
+ --color-core-green-300: #98e58e;
+ --color-core-green-400: #75dd66;
+ --color-core-green-500: #59cb59;
+ --color-core-green-600: #2bb656;
+ --color-core-green-700: #0ca750;
+ --color-core-green-800: #008b46;
+ --color-core-green-900: #006b40;
+ --color-core-green-1000: #08422f;
+ --color-core-green-1100: #002b20;
+ --color-core-teal-0: #e5f9f5;
+ --color-core-teal-100: #cdf7ef;
+ --color-core-teal-200: #b3f2e6;
+ --color-core-teal-300: #7dead5;
+ --color-core-teal-400: #24e0c5;
+ --color-core-teal-500: #08c4b2;
+ --color-core-teal-600: #00a99c;
+ --color-core-teal-700: #0b968f;
+ --color-core-teal-800: #067c7c;
+ --color-core-teal-900: #026661;
+ --color-core-teal-1000: #083f3f;
+ --color-core-teal-1100: #002528;
+ --color-core-aqua-0: #d9fcfb;
+ --color-core-aqua-100: #c5f9f9;
+ --color-core-aqua-200: #a5f2f2;
+ --color-core-aqua-300: #76e5e2;
+ --color-core-aqua-400: #33d6e2;
+ --color-core-aqua-500: #17b8ce;
+ --color-core-aqua-600: #0797ae;
+ --color-core-aqua-700: #0b8599;
+ --color-core-aqua-800: #0f6e84;
+ --color-core-aqua-900: #035e73;
+ --color-core-aqua-1000: #083d4f;
+ --color-core-aqua-1100: #002838;
+ --color-core-blue-0: #e9f8ff;
+ --color-core-blue-100: #dcf2ff;
+ --color-core-blue-200: #c7e4f9;
+ --color-core-blue-300: #a1d2f8;
+ --color-core-blue-400: #56adf5;
+ --color-core-blue-500: #3896e3;
+ --color-core-blue-600: #2b87d3;
+ --color-core-blue-700: #2079c3;
+ --color-core-blue-800: #116daa;
+ --color-core-blue-900: #0c5689;
+ --color-core-blue-1000: #0a3960;
+ --color-core-blue-1100: #002138;
+ --color-core-purple-0: #f2f2f9;
+ --color-core-purple-100: #eaeaf9;
+ --color-core-purple-200: #d8d7f9;
+ --color-core-purple-300: #c1c1f7;
+ --color-core-purple-400: #a193f2;
+ --color-core-purple-500: #9180f4;
+ --color-core-purple-600: #816fea;
+ --color-core-purple-700: #6f5ed3;
+ --color-core-purple-800: #5e4eba;
+ --color-core-purple-900: #483a9c;
+ --color-core-purple-1000: #2d246b;
+ --color-core-purple-1100: #1d1d38;
+ --color-core-magenta-0: #fef0ff;
+ --color-core-magenta-100: #f9e3fc;
+ --color-core-magenta-200: #f4c4f7;
+ --color-core-magenta-300: #edadf2;
+ --color-core-magenta-400: #f282f5;
+ --color-core-magenta-500: #db61db;
+ --color-core-magenta-600: #c44eb9;
+ --color-core-magenta-700: #ac44a8;
+ --color-core-magenta-800: #8f3896;
+ --color-core-magenta-900: #6c2277;
+ --color-core-magenta-1000: #451551;
+ --color-core-magenta-1100: #29192d;
+ --color-core-pink-0: #ffe9f3;
+ --color-core-pink-100: #fcdbeb;
+ --color-core-pink-200: #ffb5d5;
+ --color-core-pink-300: #ff95c1;
+ --color-core-pink-400: #ff76ae;
+ --color-core-pink-500: #ef588b;
+ --color-core-pink-600: #e0447c;
+ --color-core-pink-700: #ce3665;
+ --color-core-pink-800: #b22f5b;
+ --color-core-pink-900: #931847;
+ --color-core-pink-1000: #561231;
+ --color-core-pink-1100: #2b1721;
+ --color-core-red-0: #ffeae9;
+ --color-core-red-100: #ffd5d2;
+ --color-core-red-200: #ffb8b1;
+ --color-core-red-300: #ff9c8f;
+ --color-core-red-400: #ff7f6e;
+ --color-core-red-500: #f76054;
+ --color-core-red-600: #ed4c42;
+ --color-core-red-700: #db3e3e;
+ --color-core-red-800: #c63434;
+ --color-core-red-900: #992222;
+ --color-core-red-1000: #6d1313;
+ --color-core-red-1100: #2b1111;
+ --color-core-orange-0: #ffede3;
+ --color-core-orange-100: #fcdccc;
+ --color-core-orange-200: #ffc6a4;
+ --color-core-orange-300: #ffb180;
+ --color-core-orange-400: #ff9c5d;
+ --color-core-orange-500: #fc8943;
+ --color-core-orange-600: #f57d33;
+ --color-core-orange-700: #ed7024;
+ --color-core-orange-800: #ce5511;
+ --color-core-orange-900: #962c0b;
+ --color-core-orange-1000: #601700;
+ --color-core-orange-1100: #2d130e;
+ --color-core-neutral-0: #ffffff;
+ --color-core-neutral-100: #f3f4f4;
+ --color-core-neutral-200: #dee1e1;
+ --color-core-neutral-300: #c8cccc;
+ --color-core-neutral-400: #b0b6b7;
+ --color-core-neutral-500: #929a9b;
+ --color-core-neutral-600: #6e797a;
+ --color-core-neutral-700: #515e5f;
+ --color-core-neutral-800: #364141;
+ --color-core-neutral-900: #273333;
+ --color-core-neutral-1000: #162020;
+ --color-core-neutral-1100: #040404;
+ --color-core-yellow-0: #fff8e2;
+ --color-core-yellow-100: #fdefcd;
+ --color-core-yellow-200: #ffe99a;
+ --color-core-yellow-300: #ffe16e;
+ --color-core-yellow-400: #ffd943;
+ --color-core-yellow-500: #ffcd1c;
+ --color-core-yellow-600: #ffbc00;
+ --color-core-yellow-700: #dd9903;
+ --color-core-yellow-800: #ba7506;
+ --color-core-yellow-900: #944c0c;
+ --color-core-yellow-1000: #542a00;
+ --color-core-yellow-1100: #2d1a05;
+ --color-font-primary: #040404;
+ --color-font-secondary: #273333;
+ --color-font-tertiary: #364141;
+ --color-font-interactive: #0b8599;
+ --color-font-interactive-hover: #0b8599;
+ --color-font-interactive-active: #6f5ed3;
+ --color-font-interactive-disabled: #364141;
+ --color-font-danger: #6d1313;
+ --color-font-warning: #601700;
+ --color-font-success: #08422f;
+ --size-border-radius-large: 30rem;
+ --size-font-small: 0.75rem;
+ --size-font-medium: 1rem;
+ --size-font-large: 1.5rem;
+ --size-font-xl: 2.25rem;
+ --size-padding-small: 0.5rem;
+ --size-padding-medium: 1rem;
+ --size-padding-large: 1rem;
+ --size-padding-xl: 1rem;
+}
+"
+`;
+
+exports[`integration css css/variables with references should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --size-padding-xl: 1rem;
+ --size-padding-large: 1rem;
+ --size-padding-medium: 1rem;
+ --size-padding-small: 0.5rem;
+ --size-font-xl: 2.25rem;
+ --size-font-large: 1.5rem;
+ --size-font-medium: 1rem;
+ --size-font-small: 0.75rem;
+ --size-border-radius-large: 30rem;
+ --color-core-yellow-1100: #2d1a05;
+ --color-core-yellow-1000: #542a00;
+ --color-core-yellow-900: #944c0c;
+ --color-core-yellow-800: #ba7506;
+ --color-core-yellow-700: #dd9903;
+ --color-core-yellow-600: #ffbc00;
+ --color-core-yellow-500: #ffcd1c;
+ --color-core-yellow-400: #ffd943;
+ --color-core-yellow-300: #ffe16e;
+ --color-core-yellow-200: #ffe99a;
+ --color-core-yellow-100: #fdefcd;
+ --color-core-yellow-0: #fff8e2;
+ --color-core-neutral-1100: #040404;
+ --color-core-neutral-1000: #162020;
+ --color-core-neutral-900: #273333;
+ --color-core-neutral-800: #364141;
+ --color-core-neutral-700: #515e5f;
+ --color-core-neutral-600: #6e797a;
+ --color-core-neutral-500: #929a9b;
+ --color-core-neutral-400: #b0b6b7;
+ --color-core-neutral-300: #c8cccc;
+ --color-core-neutral-200: #dee1e1;
+ --color-core-neutral-100: #f3f4f4;
+ --color-core-neutral-0: #ffffff;
+ --color-core-orange-1100: #2d130e;
+ --color-core-orange-1000: #601700;
+ --color-core-orange-900: #962c0b;
+ --color-core-orange-800: #ce5511;
+ --color-core-orange-700: #ed7024;
+ --color-core-orange-600: #f57d33;
+ --color-core-orange-500: #fc8943;
+ --color-core-orange-400: #ff9c5d;
+ --color-core-orange-300: #ffb180;
+ --color-core-orange-200: #ffc6a4;
+ --color-core-orange-100: #fcdccc;
+ --color-core-orange-0: #ffede3;
+ --color-core-red-1100: #2b1111;
+ --color-core-red-1000: #6d1313;
+ --color-core-red-900: #992222;
+ --color-core-red-800: #c63434;
+ --color-core-red-700: #db3e3e;
+ --color-core-red-600: #ed4c42;
+ --color-core-red-500: #f76054;
+ --color-core-red-400: #ff7f6e;
+ --color-core-red-300: #ff9c8f;
+ --color-core-red-200: #ffb8b1;
+ --color-core-red-100: #ffd5d2;
+ --color-core-red-0: #ffeae9;
+ --color-core-pink-1100: #2b1721;
+ --color-core-pink-1000: #561231;
+ --color-core-pink-900: #931847;
+ --color-core-pink-800: #b22f5b;
+ --color-core-pink-700: #ce3665;
+ --color-core-pink-600: #e0447c;
+ --color-core-pink-500: #ef588b;
+ --color-core-pink-400: #ff76ae;
+ --color-core-pink-300: #ff95c1;
+ --color-core-pink-200: #ffb5d5;
+ --color-core-pink-100: #fcdbeb;
+ --color-core-pink-0: #ffe9f3;
+ --color-core-magenta-1100: #29192d;
+ --color-core-magenta-1000: #451551;
+ --color-core-magenta-900: #6c2277;
+ --color-core-magenta-800: #8f3896;
+ --color-core-magenta-700: #ac44a8;
+ --color-core-magenta-600: #c44eb9;
+ --color-core-magenta-500: #db61db;
+ --color-core-magenta-400: #f282f5;
+ --color-core-magenta-300: #edadf2;
+ --color-core-magenta-200: #f4c4f7;
+ --color-core-magenta-100: #f9e3fc;
+ --color-core-magenta-0: #fef0ff;
+ --color-core-purple-1100: #1d1d38;
+ --color-core-purple-1000: #2d246b;
+ --color-core-purple-900: #483a9c;
+ --color-core-purple-800: #5e4eba;
+ --color-core-purple-700: #6f5ed3;
+ --color-core-purple-600: #816fea;
+ --color-core-purple-500: #9180f4;
+ --color-core-purple-400: #a193f2;
+ --color-core-purple-300: #c1c1f7;
+ --color-core-purple-200: #d8d7f9;
+ --color-core-purple-100: #eaeaf9;
+ --color-core-purple-0: #f2f2f9;
+ --color-core-blue-1100: #002138;
+ --color-core-blue-1000: #0a3960;
+ --color-core-blue-900: #0c5689;
+ --color-core-blue-800: #116daa;
+ --color-core-blue-700: #2079c3;
+ --color-core-blue-600: #2b87d3;
+ --color-core-blue-500: #3896e3;
+ --color-core-blue-400: #56adf5;
+ --color-core-blue-300: #a1d2f8;
+ --color-core-blue-200: #c7e4f9;
+ --color-core-blue-100: #dcf2ff;
+ --color-core-blue-0: #e9f8ff;
+ --color-core-aqua-1100: #002838;
+ --color-core-aqua-1000: #083d4f;
+ --color-core-aqua-900: #035e73;
+ --color-core-aqua-800: #0f6e84;
+ --color-core-aqua-700: #0b8599;
+ --color-core-aqua-600: #0797ae;
+ --color-core-aqua-500: #17b8ce;
+ --color-core-aqua-400: #33d6e2;
+ --color-core-aqua-300: #76e5e2;
+ --color-core-aqua-200: #a5f2f2;
+ --color-core-aqua-100: #c5f9f9;
+ --color-core-aqua-0: #d9fcfb;
+ --color-core-teal-1100: #002528;
+ --color-core-teal-1000: #083f3f;
+ --color-core-teal-900: #026661;
+ --color-core-teal-800: #067c7c;
+ --color-core-teal-700: #0b968f;
+ --color-core-teal-600: #00a99c;
+ --color-core-teal-500: #08c4b2;
+ --color-core-teal-400: #24e0c5;
+ --color-core-teal-300: #7dead5;
+ --color-core-teal-200: #b3f2e6;
+ --color-core-teal-100: #cdf7ef;
+ --color-core-teal-0: #e5f9f5;
+ --color-core-green-1100: #002b20;
+ --color-core-green-1000: #08422f;
+ --color-core-green-900: #006b40;
+ --color-core-green-800: #008b46;
+ --color-core-green-700: #0ca750;
+ --color-core-green-600: #2bb656;
+ --color-core-green-500: #59cb59;
+ --color-core-green-400: #75dd66;
+ --color-core-green-300: #98e58e;
+ --color-core-green-200: #c2f2bd;
+ --color-core-green-100: #d7f4d7;
+ --color-core-green-0: #ebf9eb;
+ --breakpoint-sm: 768px;
+ --breakpoint-xs: 304px;
+ --color-font-success: var(--color-core-green-1000);
+ --color-font-warning: var(--color-core-orange-1000);
+ --color-font-danger: var(--color-core-red-1000);
+ --color-font-tertiary: var(--color-core-neutral-800);
+ --color-font-secondary: var(--color-core-neutral-900);
+ --color-font-primary: var(--color-core-neutral-1100);
+ --color-brand-secondary: var(--color-core-purple-700);
+ --color-brand-primary: var(--color-core-aqua-700);
+ --color-border-primary: var(--color-core-neutral-300);
+ --color-background-info: var(--color-core-blue-0);
+ --color-background-success: var(--color-core-green-0);
+ --color-background-warning: var(--color-core-orange-0);
+ --color-background-danger: var(--color-core-red-0);
+ --color-background-tertiary: var(--color-core-neutral-200);
+ --color-background-secondary: var(--color-core-neutral-100);
+ --color-background-primary: var(--color-core-neutral-0);
+ --breakpoint-md: calc(var(--breakpoint-xs) / var(--breakpoint-sm));
+ --color-font-interactive-disabled: var(--color-font-tertiary);
+ --color-font-interactive-active: var(--color-brand-secondary);
+ --color-font-interactive-hover: var(--color-brand-primary);
+ --color-font-interactive: var(--color-brand-primary);
+ --color-background-disabled: var(--color-background-tertiary);
+}
+"
+`;
+
+exports[`integration css css/variables with selector should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+.test {
+ --breakpoint-xs: 304px;
+ --breakpoint-sm: 768px;
+ --breakpoint-md: calc(304px / 768px);
+ --color-background-primary: #ffffff;
+ --color-background-secondary: #f3f4f4;
+ --color-background-tertiary: #dee1e1;
+ --color-background-danger: #ffeae9;
+ --color-background-warning: #ffede3;
+ --color-background-success: #ebf9eb;
+ --color-background-info: #e9f8ff;
+ --color-background-disabled: #dee1e1;
+ --color-border-primary: #c8cccc;
+ --color-brand-primary: #0b8599;
+ --color-brand-secondary: #6f5ed3;
+ --color-core-green-0: #ebf9eb;
+ --color-core-green-100: #d7f4d7;
+ --color-core-green-200: #c2f2bd;
+ --color-core-green-300: #98e58e;
+ --color-core-green-400: #75dd66;
+ --color-core-green-500: #59cb59;
+ --color-core-green-600: #2bb656;
+ --color-core-green-700: #0ca750;
+ --color-core-green-800: #008b46;
+ --color-core-green-900: #006b40;
+ --color-core-green-1000: #08422f;
+ --color-core-green-1100: #002b20;
+ --color-core-teal-0: #e5f9f5;
+ --color-core-teal-100: #cdf7ef;
+ --color-core-teal-200: #b3f2e6;
+ --color-core-teal-300: #7dead5;
+ --color-core-teal-400: #24e0c5;
+ --color-core-teal-500: #08c4b2;
+ --color-core-teal-600: #00a99c;
+ --color-core-teal-700: #0b968f;
+ --color-core-teal-800: #067c7c;
+ --color-core-teal-900: #026661;
+ --color-core-teal-1000: #083f3f;
+ --color-core-teal-1100: #002528;
+ --color-core-aqua-0: #d9fcfb;
+ --color-core-aqua-100: #c5f9f9;
+ --color-core-aqua-200: #a5f2f2;
+ --color-core-aqua-300: #76e5e2;
+ --color-core-aqua-400: #33d6e2;
+ --color-core-aqua-500: #17b8ce;
+ --color-core-aqua-600: #0797ae;
+ --color-core-aqua-700: #0b8599;
+ --color-core-aqua-800: #0f6e84;
+ --color-core-aqua-900: #035e73;
+ --color-core-aqua-1000: #083d4f;
+ --color-core-aqua-1100: #002838;
+ --color-core-blue-0: #e9f8ff;
+ --color-core-blue-100: #dcf2ff;
+ --color-core-blue-200: #c7e4f9;
+ --color-core-blue-300: #a1d2f8;
+ --color-core-blue-400: #56adf5;
+ --color-core-blue-500: #3896e3;
+ --color-core-blue-600: #2b87d3;
+ --color-core-blue-700: #2079c3;
+ --color-core-blue-800: #116daa;
+ --color-core-blue-900: #0c5689;
+ --color-core-blue-1000: #0a3960;
+ --color-core-blue-1100: #002138;
+ --color-core-purple-0: #f2f2f9;
+ --color-core-purple-100: #eaeaf9;
+ --color-core-purple-200: #d8d7f9;
+ --color-core-purple-300: #c1c1f7;
+ --color-core-purple-400: #a193f2;
+ --color-core-purple-500: #9180f4;
+ --color-core-purple-600: #816fea;
+ --color-core-purple-700: #6f5ed3;
+ --color-core-purple-800: #5e4eba;
+ --color-core-purple-900: #483a9c;
+ --color-core-purple-1000: #2d246b;
+ --color-core-purple-1100: #1d1d38;
+ --color-core-magenta-0: #fef0ff;
+ --color-core-magenta-100: #f9e3fc;
+ --color-core-magenta-200: #f4c4f7;
+ --color-core-magenta-300: #edadf2;
+ --color-core-magenta-400: #f282f5;
+ --color-core-magenta-500: #db61db;
+ --color-core-magenta-600: #c44eb9;
+ --color-core-magenta-700: #ac44a8;
+ --color-core-magenta-800: #8f3896;
+ --color-core-magenta-900: #6c2277;
+ --color-core-magenta-1000: #451551;
+ --color-core-magenta-1100: #29192d;
+ --color-core-pink-0: #ffe9f3;
+ --color-core-pink-100: #fcdbeb;
+ --color-core-pink-200: #ffb5d5;
+ --color-core-pink-300: #ff95c1;
+ --color-core-pink-400: #ff76ae;
+ --color-core-pink-500: #ef588b;
+ --color-core-pink-600: #e0447c;
+ --color-core-pink-700: #ce3665;
+ --color-core-pink-800: #b22f5b;
+ --color-core-pink-900: #931847;
+ --color-core-pink-1000: #561231;
+ --color-core-pink-1100: #2b1721;
+ --color-core-red-0: #ffeae9;
+ --color-core-red-100: #ffd5d2;
+ --color-core-red-200: #ffb8b1;
+ --color-core-red-300: #ff9c8f;
+ --color-core-red-400: #ff7f6e;
+ --color-core-red-500: #f76054;
+ --color-core-red-600: #ed4c42;
+ --color-core-red-700: #db3e3e;
+ --color-core-red-800: #c63434;
+ --color-core-red-900: #992222;
+ --color-core-red-1000: #6d1313;
+ --color-core-red-1100: #2b1111;
+ --color-core-orange-0: #ffede3;
+ --color-core-orange-100: #fcdccc;
+ --color-core-orange-200: #ffc6a4;
+ --color-core-orange-300: #ffb180;
+ --color-core-orange-400: #ff9c5d;
+ --color-core-orange-500: #fc8943;
+ --color-core-orange-600: #f57d33;
+ --color-core-orange-700: #ed7024;
+ --color-core-orange-800: #ce5511;
+ --color-core-orange-900: #962c0b;
+ --color-core-orange-1000: #601700;
+ --color-core-orange-1100: #2d130e;
+ --color-core-neutral-0: #ffffff;
+ --color-core-neutral-100: #f3f4f4;
+ --color-core-neutral-200: #dee1e1;
+ --color-core-neutral-300: #c8cccc;
+ --color-core-neutral-400: #b0b6b7;
+ --color-core-neutral-500: #929a9b;
+ --color-core-neutral-600: #6e797a;
+ --color-core-neutral-700: #515e5f;
+ --color-core-neutral-800: #364141;
+ --color-core-neutral-900: #273333;
+ --color-core-neutral-1000: #162020;
+ --color-core-neutral-1100: #040404;
+ --color-core-yellow-0: #fff8e2;
+ --color-core-yellow-100: #fdefcd;
+ --color-core-yellow-200: #ffe99a;
+ --color-core-yellow-300: #ffe16e;
+ --color-core-yellow-400: #ffd943;
+ --color-core-yellow-500: #ffcd1c;
+ --color-core-yellow-600: #ffbc00;
+ --color-core-yellow-700: #dd9903;
+ --color-core-yellow-800: #ba7506;
+ --color-core-yellow-900: #944c0c;
+ --color-core-yellow-1000: #542a00;
+ --color-core-yellow-1100: #2d1a05;
+ --color-font-primary: #040404;
+ --color-font-secondary: #273333;
+ --color-font-tertiary: #364141;
+ --color-font-interactive: #0b8599;
+ --color-font-interactive-hover: #0b8599;
+ --color-font-interactive-active: #6f5ed3;
+ --color-font-interactive-disabled: #364141;
+ --color-font-danger: #6d1313;
+ --color-font-warning: #601700;
+ --color-font-success: #08422f;
+ --size-border-radius-large: 30rem;
+ --size-font-small: 0.75rem;
+ --size-font-medium: 1rem;
+ --size-font-large: 1.5rem;
+ --size-font-xl: 2.25rem;
+ --size-padding-small: 0.5rem;
+ --size-padding-medium: 1rem;
+ --size-padding-large: 1rem;
+ --size-padding-xl: 1rem;
+}
+"
+`;
diff --git a/__integration__/__snapshots__/customFileHeader.test.js.snap b/__integration__/__snapshots__/customFileHeader.test.js.snap
new file mode 100644
index 000000000..21ad10834
--- /dev/null
+++ b/__integration__/__snapshots__/customFileHeader.test.js.snap
@@ -0,0 +1,114 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration valid custom file headers file options config file header should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ * hello, world!
+ */
+
+:root {
+ --color-red: #ff0000;
+}
+"
+`;
+
+exports[`integration valid custom file headers file options inline file header should match snapshot 1`] = `
+"/**
+ * build version 1.0.0
+ */
+
+:root {
+ --color-red: #ff0000;
+}
+"
+`;
+
+exports[`integration valid custom file headers file options registered file header should match snapshot 1`] = `
+"/**
+ * hello
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --color-red: #ff0000;
+}
+"
+`;
+
+exports[`integration valid custom file headers platform options file header override should match snapshot 1`] = `
+"/**
+ * Header overridden
+ */
+
+module.exports = {
+ \\"color\\": {
+ \\"red\\": {
+ \\"value\\": \\"#ff0000\\",
+ \\"original\\": {
+ \\"value\\": \\"#ff0000\\"
+ },
+ \\"name\\": \\"ColorRed\\",
+ \\"attributes\\": {
+ \\"category\\": \\"color\\",
+ \\"type\\": \\"red\\"
+ },
+ \\"path\\": [
+ \\"color\\",
+ \\"red\\"
+ ]
+ }
+ }
+};"
+`;
+
+exports[`integration valid custom file headers platform options no file options should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ * hello, world!
+ */
+
+module.exports = {
+ \\"color\\": {
+ \\"red\\": {
+ \\"value\\": \\"#ff0000\\",
+ \\"original\\": {
+ \\"value\\": \\"#ff0000\\"
+ },
+ \\"name\\": \\"ColorRed\\",
+ \\"attributes\\": {
+ \\"category\\": \\"color\\",
+ \\"type\\": \\"red\\"
+ },
+ \\"path\\": [
+ \\"color\\",
+ \\"red\\"
+ ]
+ }
+ }
+};"
+`;
+
+exports[`integration valid custom file headers platform options showFileHeader should match snapshot 1`] = `
+"module.exports = {
+ \\"color\\": {
+ \\"red\\": {
+ \\"value\\": \\"#ff0000\\",
+ \\"original\\": {
+ \\"value\\": \\"#ff0000\\"
+ },
+ \\"name\\": \\"ColorRed\\",
+ \\"attributes\\": {
+ \\"category\\": \\"color\\",
+ \\"type\\": \\"red\\"
+ },
+ \\"path\\": [
+ \\"color\\",
+ \\"red\\"
+ ]
+ }
+ }
+};"
+`;
diff --git a/__integration__/__snapshots__/customFormats.test.js.snap b/__integration__/__snapshots__/customFormats.test.js.snap
new file mode 100644
index 000000000..842a01f3d
--- /dev/null
+++ b/__integration__/__snapshots__/customFormats.test.js.snap
@@ -0,0 +1,2567 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration custom formats inline custom with new args should match snapshot 1`] = `
+"{
+ \\"dictionary\\": {
+ \\"properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"allProperties\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"tokens\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"allTokens\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"_properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ }
+ },
+ \\"allProperties\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"platform\\": {
+ \\"transformGroup\\": \\"js\\",
+ \\"buildPath\\": \\"__integration__/build/\\",
+ \\"options\\": {
+ \\"otherOption\\": \\"platform option\\"
+ },
+ \\"files\\": [
+ {
+ \\"destination\\": \\"inlineCustomFormatWithOldArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ },
+ {
+ \\"destination\\": \\"inlineCustomFormatWithNewArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ }
+ ],
+ \\"transforms\\": [
+ {
+ \\"type\\": \\"attribute\\"
+ },
+ {
+ \\"type\\": \\"name\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ }
+ ],
+ \\"actions\\": []
+ },
+ \\"file\\": {
+ \\"options\\": {
+ \\"otherOption\\": \\"Test\\",
+ \\"showFileHeader\\": true
+ },
+ \\"destination\\": \\"inlineCustomFormatWithNewArgs.json\\"
+ },
+ \\"options\\": {
+ \\"otherOption\\": \\"Test\\",
+ \\"showFileHeader\\": true
+ }
+}"
+`;
+
+exports[`integration custom formats inline custom with old args should match snapshot 1`] = `
+"{
+ \\"dictionary\\": {
+ \\"dictionary\\": {
+ \\"properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"allProperties\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"tokens\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"allTokens\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"_properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ }
+ },
+ \\"allProperties\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"platform\\": {
+ \\"transformGroup\\": \\"js\\",
+ \\"buildPath\\": \\"__integration__/build/\\",
+ \\"options\\": {
+ \\"otherOption\\": \\"platform option\\"
+ },
+ \\"files\\": [
+ {
+ \\"destination\\": \\"inlineCustomFormatWithOldArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ },
+ {
+ \\"destination\\": \\"inlineCustomFormatWithNewArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ }
+ ],
+ \\"transforms\\": [
+ {
+ \\"type\\": \\"attribute\\"
+ },
+ {
+ \\"type\\": \\"name\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ }
+ ],
+ \\"actions\\": []
+ },
+ \\"file\\": {
+ \\"options\\": {
+ \\"otherOption\\": \\"Test\\",
+ \\"showFileHeader\\": true
+ },
+ \\"destination\\": \\"inlineCustomFormatWithOldArgs.json\\"
+ },
+ \\"options\\": {
+ \\"otherOption\\": \\"Test\\",
+ \\"showFileHeader\\": true
+ }
+ },
+ \\"platform\\": {
+ \\"transformGroup\\": \\"js\\",
+ \\"buildPath\\": \\"__integration__/build/\\",
+ \\"options\\": {
+ \\"otherOption\\": \\"platform option\\"
+ },
+ \\"files\\": [
+ {
+ \\"destination\\": \\"inlineCustomFormatWithOldArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ },
+ {
+ \\"destination\\": \\"inlineCustomFormatWithNewArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ }
+ ],
+ \\"transforms\\": [
+ {
+ \\"type\\": \\"attribute\\"
+ },
+ {
+ \\"type\\": \\"name\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ }
+ ],
+ \\"actions\\": []
+ },
+ \\"file\\": {
+ \\"destination\\": \\"inlineCustomFormatWithOldArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ }
+}"
+`;
+
+exports[`integration custom formats register custom format with new args should match snapshot 1`] = `
+"{
+ \\"dictionary\\": {
+ \\"properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"allProperties\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"tokens\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"allTokens\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"_properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ }
+ },
+ \\"allProperties\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"platform\\": {
+ \\"transformGroup\\": \\"js\\",
+ \\"buildPath\\": \\"__integration__/build/\\",
+ \\"options\\": {
+ \\"otherOption\\": \\"platform option\\"
+ },
+ \\"files\\": [
+ {
+ \\"destination\\": \\"registerCustomFormatWithOldArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ },
+ {
+ \\"destination\\": \\"registerCustomFormatWithNewArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ }
+ ],
+ \\"transforms\\": [
+ {
+ \\"type\\": \\"attribute\\"
+ },
+ {
+ \\"type\\": \\"name\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ }
+ ],
+ \\"actions\\": []
+ },
+ \\"file\\": {
+ \\"options\\": {
+ \\"otherOption\\": \\"Test\\",
+ \\"showFileHeader\\": true
+ },
+ \\"destination\\": \\"registerCustomFormatWithNewArgs.json\\"
+ },
+ \\"options\\": {
+ \\"otherOption\\": \\"Test\\",
+ \\"showFileHeader\\": true
+ }
+}"
+`;
+
+exports[`integration custom formats register custom format with old args should match snapshot 1`] = `
+"{
+ \\"dictionary\\": {
+ \\"dictionary\\": {
+ \\"properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"allProperties\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"tokens\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"allTokens\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"_properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ }
+ },
+ \\"allProperties\\": [
+ {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ ],
+ \\"properties\\": {
+ \\"size\\": {
+ \\"padding\\": {
+ \\"small\\": {
+ \\"value\\": \\"0.5rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 0.5
+ },
+ \\"name\\": \\"SizePaddingSmall\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"small\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"small\\"
+ ]
+ },
+ \\"medium\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingMedium\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"medium\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"medium\\"
+ ]
+ },
+ \\"large\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingLarge\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"large\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"large\\"
+ ]
+ },
+ \\"xl\\": {
+ \\"value\\": \\"1rem\\",
+ \\"filePath\\": \\"__integration__/tokens/size/padding.json\\",
+ \\"isSource\\": true,
+ \\"original\\": {
+ \\"value\\": 1
+ },
+ \\"name\\": \\"SizePaddingXl\\",
+ \\"attributes\\": {
+ \\"category\\": \\"size\\",
+ \\"type\\": \\"padding\\",
+ \\"item\\": \\"xl\\"
+ },
+ \\"path\\": [
+ \\"size\\",
+ \\"padding\\",
+ \\"xl\\"
+ ]
+ }
+ }
+ }
+ },
+ \\"platform\\": {
+ \\"transformGroup\\": \\"js\\",
+ \\"buildPath\\": \\"__integration__/build/\\",
+ \\"options\\": {
+ \\"otherOption\\": \\"platform option\\"
+ },
+ \\"files\\": [
+ {
+ \\"destination\\": \\"registerCustomFormatWithOldArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ },
+ {
+ \\"destination\\": \\"registerCustomFormatWithNewArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ }
+ ],
+ \\"transforms\\": [
+ {
+ \\"type\\": \\"attribute\\"
+ },
+ {
+ \\"type\\": \\"name\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ }
+ ],
+ \\"actions\\": []
+ },
+ \\"file\\": {
+ \\"options\\": {
+ \\"otherOption\\": \\"Test\\",
+ \\"showFileHeader\\": true
+ },
+ \\"destination\\": \\"registerCustomFormatWithOldArgs.json\\"
+ },
+ \\"options\\": {
+ \\"otherOption\\": \\"Test\\",
+ \\"showFileHeader\\": true
+ }
+ },
+ \\"platform\\": {
+ \\"transformGroup\\": \\"js\\",
+ \\"buildPath\\": \\"__integration__/build/\\",
+ \\"options\\": {
+ \\"otherOption\\": \\"platform option\\"
+ },
+ \\"files\\": [
+ {
+ \\"destination\\": \\"registerCustomFormatWithOldArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ },
+ {
+ \\"destination\\": \\"registerCustomFormatWithNewArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ }
+ ],
+ \\"transforms\\": [
+ {
+ \\"type\\": \\"attribute\\"
+ },
+ {
+ \\"type\\": \\"name\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ },
+ {
+ \\"type\\": \\"value\\"
+ }
+ ],
+ \\"actions\\": []
+ },
+ \\"file\\": {
+ \\"destination\\": \\"registerCustomFormatWithOldArgs.json\\",
+ \\"options\\": {
+ \\"showFileHeader\\": true,
+ \\"otherOption\\": \\"Test\\"
+ }
+ }
+}"
+`;
diff --git a/__integration__/__snapshots__/flutter.test.js.snap b/__integration__/__snapshots__/flutter.test.js.snap
new file mode 100644
index 000000000..bad987aaf
--- /dev/null
+++ b/__integration__/__snapshots__/flutter.test.js.snap
@@ -0,0 +1,535 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration flutter flutter/class.dart separate should match snapshot 1`] = `
+"
+//
+// style_dictionary_color.dart
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+
+import 'dart:ui';
+
+class StyleDictionaryColor {
+ StyleDictionaryColor._();
+
+ static const backgroundDanger = Color(0xFFFFEAE9);
+ static const backgroundDisabled = Color(0xFFDEE1E1);
+ static const backgroundInfo = Color(0xFFE9F8FF);
+ static const backgroundPrimary = Color(0xFFFFFFFF);
+ static const backgroundSecondary = Color(0xFFF3F4F4);
+ static const backgroundSuccess = Color(0xFFEBF9EB);
+ static const backgroundTertiary = Color(0xFFDEE1E1);
+ static const backgroundWarning = Color(0xFFFFEDE3);
+ static const borderPrimary = Color(0xFFC8CCCC);
+ static const brandPrimary = Color(0xFF0B8599);
+ static const brandSecondary = Color(0xFF6F5ED3);
+ static const coreAqua0 = Color(0xFFD9FCFB);
+ static const coreAqua100 = Color(0xFFC5F9F9);
+ static const coreAqua1000 = Color(0xFF083D4F);
+ static const coreAqua1100 = Color(0xFF002838);
+ static const coreAqua200 = Color(0xFFA5F2F2);
+ static const coreAqua300 = Color(0xFF76E5E2);
+ static const coreAqua400 = Color(0xFF33D6E2);
+ static const coreAqua500 = Color(0xFF17B8CE);
+ static const coreAqua600 = Color(0xFF0797AE);
+ static const coreAqua700 = Color(0xFF0B8599);
+ static const coreAqua800 = Color(0xFF0F6E84);
+ static const coreAqua900 = Color(0xFF035E73);
+ static const coreBlue0 = Color(0xFFE9F8FF);
+ static const coreBlue100 = Color(0xFFDCF2FF);
+ static const coreBlue1000 = Color(0xFF0A3960);
+ static const coreBlue1100 = Color(0xFF002138);
+ static const coreBlue200 = Color(0xFFC7E4F9);
+ static const coreBlue300 = Color(0xFFA1D2F8);
+ static const coreBlue400 = Color(0xFF56ADF5);
+ static const coreBlue500 = Color(0xFF3896E3);
+ static const coreBlue600 = Color(0xFF2B87D3);
+ static const coreBlue700 = Color(0xFF2079C3);
+ static const coreBlue800 = Color(0xFF116DAA);
+ static const coreBlue900 = Color(0xFF0C5689);
+ static const coreGreen0 = Color(0xFFEBF9EB);
+ static const coreGreen100 = Color(0xFFD7F4D7);
+ static const coreGreen1000 = Color(0xFF08422F);
+ static const coreGreen1100 = Color(0xFF002B20);
+ static const coreGreen200 = Color(0xFFC2F2BD);
+ static const coreGreen300 = Color(0xFF98E58E);
+ static const coreGreen400 = Color(0xFF75DD66);
+ static const coreGreen500 = Color(0xFF59CB59);
+ static const coreGreen600 = Color(0xFF2BB656);
+ static const coreGreen700 = Color(0xFF0CA750);
+ static const coreGreen800 = Color(0xFF008B46);
+ static const coreGreen900 = Color(0xFF006B40);
+ static const coreMagenta0 = Color(0xFFFEF0FF);
+ static const coreMagenta100 = Color(0xFFF9E3FC);
+ static const coreMagenta1000 = Color(0xFF451551);
+ static const coreMagenta1100 = Color(0xFF29192D);
+ static const coreMagenta200 = Color(0xFFF4C4F7);
+ static const coreMagenta300 = Color(0xFFEDADF2);
+ static const coreMagenta400 = Color(0xFFF282F5);
+ static const coreMagenta500 = Color(0xFFDB61DB);
+ static const coreMagenta600 = Color(0xFFC44EB9);
+ static const coreMagenta700 = Color(0xFFAC44A8);
+ static const coreMagenta800 = Color(0xFF8F3896);
+ static const coreMagenta900 = Color(0xFF6C2277);
+ static const coreNeutral0 = Color(0xFFFFFFFF);
+ static const coreNeutral100 = Color(0xFFF3F4F4);
+ static const coreNeutral1000 = Color(0xFF162020);
+ static const coreNeutral1100 = Color(0xFF040404);
+ static const coreNeutral200 = Color(0xFFDEE1E1);
+ static const coreNeutral300 = Color(0xFFC8CCCC);
+ static const coreNeutral400 = Color(0xFFB0B6B7);
+ static const coreNeutral500 = Color(0xFF929A9B);
+ static const coreNeutral600 = Color(0xFF6E797A);
+ static const coreNeutral700 = Color(0xFF515E5F);
+ static const coreNeutral800 = Color(0xFF364141);
+ static const coreNeutral900 = Color(0xFF273333);
+ static const coreOrange0 = Color(0xFFFFEDE3);
+ static const coreOrange100 = Color(0xFFFCDCCC);
+ static const coreOrange1000 = Color(0xFF601700);
+ static const coreOrange1100 = Color(0xFF2D130E);
+ static const coreOrange200 = Color(0xFFFFC6A4);
+ static const coreOrange300 = Color(0xFFFFB180);
+ static const coreOrange400 = Color(0xFFFF9C5D);
+ static const coreOrange500 = Color(0xFFFC8943);
+ static const coreOrange600 = Color(0xFFF57D33);
+ static const coreOrange700 = Color(0xFFED7024);
+ static const coreOrange800 = Color(0xFFCE5511);
+ static const coreOrange900 = Color(0xFF962C0B);
+ static const corePink0 = Color(0xFFFFE9F3);
+ static const corePink100 = Color(0xFFFCDBEB);
+ static const corePink1000 = Color(0xFF561231);
+ static const corePink1100 = Color(0xFF2B1721);
+ static const corePink200 = Color(0xFFFFB5D5);
+ static const corePink300 = Color(0xFFFF95C1);
+ static const corePink400 = Color(0xFFFF76AE);
+ static const corePink500 = Color(0xFFEF588B);
+ static const corePink600 = Color(0xFFE0447C);
+ static const corePink700 = Color(0xFFCE3665);
+ static const corePink800 = Color(0xFFB22F5B);
+ static const corePink900 = Color(0xFF931847);
+ static const corePurple0 = Color(0xFFF2F2F9);
+ static const corePurple100 = Color(0xFFEAEAF9);
+ static const corePurple1000 = Color(0xFF2D246B);
+ static const corePurple1100 = Color(0xFF1D1D38);
+ static const corePurple200 = Color(0xFFD8D7F9);
+ static const corePurple300 = Color(0xFFC1C1F7);
+ static const corePurple400 = Color(0xFFA193F2);
+ static const corePurple500 = Color(0xFF9180F4);
+ static const corePurple600 = Color(0xFF816FEA);
+ static const corePurple700 = Color(0xFF6F5ED3);
+ static const corePurple800 = Color(0xFF5E4EBA);
+ static const corePurple900 = Color(0xFF483A9C);
+ static const coreRed0 = Color(0xFFFFEAE9);
+ static const coreRed100 = Color(0xFFFFD5D2);
+ static const coreRed1000 = Color(0xFF6D1313);
+ static const coreRed1100 = Color(0xFF2B1111);
+ static const coreRed200 = Color(0xFFFFB8B1);
+ static const coreRed300 = Color(0xFFFF9C8F);
+ static const coreRed400 = Color(0xFFFF7F6E);
+ static const coreRed500 = Color(0xFFF76054);
+ static const coreRed600 = Color(0xFFED4C42);
+ static const coreRed700 = Color(0xFFDB3E3E);
+ static const coreRed800 = Color(0xFFC63434);
+ static const coreRed900 = Color(0xFF992222);
+ static const coreTeal0 = Color(0xFFE5F9F5);
+ static const coreTeal100 = Color(0xFFCDF7EF);
+ static const coreTeal1000 = Color(0xFF083F3F);
+ static const coreTeal1100 = Color(0xFF002528);
+ static const coreTeal200 = Color(0xFFB3F2E6);
+ static const coreTeal300 = Color(0xFF7DEAD5);
+ static const coreTeal400 = Color(0xFF24E0C5);
+ static const coreTeal500 = Color(0xFF08C4B2);
+ static const coreTeal600 = Color(0xFF00A99C);
+ static const coreTeal700 = Color(0xFF0B968F);
+ static const coreTeal800 = Color(0xFF067C7C);
+ static const coreTeal900 = Color(0xFF026661);
+ static const coreYellow0 = Color(0xFFFFF8E2);
+ static const coreYellow100 = Color(0xFFFDEFCD);
+ static const coreYellow1000 = Color(0xFF542A00);
+ static const coreYellow1100 = Color(0xFF2D1A05);
+ static const coreYellow200 = Color(0xFFFFE99A);
+ static const coreYellow300 = Color(0xFFFFE16E);
+ static const coreYellow400 = Color(0xFFFFD943);
+ static const coreYellow500 = Color(0xFFFFCD1C);
+ static const coreYellow600 = Color(0xFFFFBC00);
+ static const coreYellow700 = Color(0xFFDD9903);
+ static const coreYellow800 = Color(0xFFBA7506);
+ static const coreYellow900 = Color(0xFF944C0C);
+ static const fontDanger = Color(0xFF6D1313);
+ static const fontInteractive = Color(0xFF0B8599);
+ static const fontInteractiveActive = Color(0xFF6F5ED3);
+ static const fontInteractiveDisabled = Color(0xFF364141);
+ static const fontInteractiveHover = Color(0xFF0B8599);
+ static const fontPrimary = Color(0xFF040404);
+ static const fontSecondary = Color(0xFF273333);
+ static const fontSuccess = Color(0xFF08422F);
+ static const fontTertiary = Color(0xFF364141);
+ static const fontWarning = Color(0xFF601700);
+}"
+`;
+
+exports[`integration flutter flutter/class.dart should match snapshot 1`] = `
+"
+//
+// style_dictionary.dart
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+
+import 'dart:ui';
+
+class StyleDictionary {
+ StyleDictionary._();
+
+ static const colorBackgroundDanger = Color(0xFFFFEAE9);
+ static const colorBackgroundDisabled = Color(0xFFDEE1E1);
+ static const colorBackgroundInfo = Color(0xFFE9F8FF);
+ static const colorBackgroundPrimary = Color(0xFFFFFFFF);
+ static const colorBackgroundSecondary = Color(0xFFF3F4F4);
+ static const colorBackgroundSuccess = Color(0xFFEBF9EB);
+ static const colorBackgroundTertiary = Color(0xFFDEE1E1);
+ static const colorBackgroundWarning = Color(0xFFFFEDE3);
+ static const colorBorderPrimary = Color(0xFFC8CCCC);
+ static const colorBrandPrimary = Color(0xFF0B8599);
+ static const colorBrandSecondary = Color(0xFF6F5ED3);
+ static const colorCoreAqua0 = Color(0xFFD9FCFB);
+ static const colorCoreAqua100 = Color(0xFFC5F9F9);
+ static const colorCoreAqua1000 = Color(0xFF083D4F);
+ static const colorCoreAqua1100 = Color(0xFF002838);
+ static const colorCoreAqua200 = Color(0xFFA5F2F2);
+ static const colorCoreAqua300 = Color(0xFF76E5E2);
+ static const colorCoreAqua400 = Color(0xFF33D6E2);
+ static const colorCoreAqua500 = Color(0xFF17B8CE);
+ static const colorCoreAqua600 = Color(0xFF0797AE);
+ static const colorCoreAqua700 = Color(0xFF0B8599);
+ static const colorCoreAqua800 = Color(0xFF0F6E84);
+ static const colorCoreAqua900 = Color(0xFF035E73);
+ static const colorCoreBlue0 = Color(0xFFE9F8FF);
+ static const colorCoreBlue100 = Color(0xFFDCF2FF);
+ static const colorCoreBlue1000 = Color(0xFF0A3960);
+ static const colorCoreBlue1100 = Color(0xFF002138);
+ static const colorCoreBlue200 = Color(0xFFC7E4F9);
+ static const colorCoreBlue300 = Color(0xFFA1D2F8);
+ static const colorCoreBlue400 = Color(0xFF56ADF5);
+ static const colorCoreBlue500 = Color(0xFF3896E3);
+ static const colorCoreBlue600 = Color(0xFF2B87D3);
+ static const colorCoreBlue700 = Color(0xFF2079C3);
+ static const colorCoreBlue800 = Color(0xFF116DAA);
+ static const colorCoreBlue900 = Color(0xFF0C5689);
+ static const colorCoreGreen0 = Color(0xFFEBF9EB);
+ static const colorCoreGreen100 = Color(0xFFD7F4D7);
+ static const colorCoreGreen1000 = Color(0xFF08422F);
+ static const colorCoreGreen1100 = Color(0xFF002B20);
+ static const colorCoreGreen200 = Color(0xFFC2F2BD);
+ static const colorCoreGreen300 = Color(0xFF98E58E);
+ static const colorCoreGreen400 = Color(0xFF75DD66);
+ static const colorCoreGreen500 = Color(0xFF59CB59);
+ static const colorCoreGreen600 = Color(0xFF2BB656);
+ static const colorCoreGreen700 = Color(0xFF0CA750);
+ static const colorCoreGreen800 = Color(0xFF008B46);
+ static const colorCoreGreen900 = Color(0xFF006B40);
+ static const colorCoreMagenta0 = Color(0xFFFEF0FF);
+ static const colorCoreMagenta100 = Color(0xFFF9E3FC);
+ static const colorCoreMagenta1000 = Color(0xFF451551);
+ static const colorCoreMagenta1100 = Color(0xFF29192D);
+ static const colorCoreMagenta200 = Color(0xFFF4C4F7);
+ static const colorCoreMagenta300 = Color(0xFFEDADF2);
+ static const colorCoreMagenta400 = Color(0xFFF282F5);
+ static const colorCoreMagenta500 = Color(0xFFDB61DB);
+ static const colorCoreMagenta600 = Color(0xFFC44EB9);
+ static const colorCoreMagenta700 = Color(0xFFAC44A8);
+ static const colorCoreMagenta800 = Color(0xFF8F3896);
+ static const colorCoreMagenta900 = Color(0xFF6C2277);
+ static const colorCoreNeutral0 = Color(0xFFFFFFFF);
+ static const colorCoreNeutral100 = Color(0xFFF3F4F4);
+ static const colorCoreNeutral1000 = Color(0xFF162020);
+ static const colorCoreNeutral1100 = Color(0xFF040404);
+ static const colorCoreNeutral200 = Color(0xFFDEE1E1);
+ static const colorCoreNeutral300 = Color(0xFFC8CCCC);
+ static const colorCoreNeutral400 = Color(0xFFB0B6B7);
+ static const colorCoreNeutral500 = Color(0xFF929A9B);
+ static const colorCoreNeutral600 = Color(0xFF6E797A);
+ static const colorCoreNeutral700 = Color(0xFF515E5F);
+ static const colorCoreNeutral800 = Color(0xFF364141);
+ static const colorCoreNeutral900 = Color(0xFF273333);
+ static const colorCoreOrange0 = Color(0xFFFFEDE3);
+ static const colorCoreOrange100 = Color(0xFFFCDCCC);
+ static const colorCoreOrange1000 = Color(0xFF601700);
+ static const colorCoreOrange1100 = Color(0xFF2D130E);
+ static const colorCoreOrange200 = Color(0xFFFFC6A4);
+ static const colorCoreOrange300 = Color(0xFFFFB180);
+ static const colorCoreOrange400 = Color(0xFFFF9C5D);
+ static const colorCoreOrange500 = Color(0xFFFC8943);
+ static const colorCoreOrange600 = Color(0xFFF57D33);
+ static const colorCoreOrange700 = Color(0xFFED7024);
+ static const colorCoreOrange800 = Color(0xFFCE5511);
+ static const colorCoreOrange900 = Color(0xFF962C0B);
+ static const colorCorePink0 = Color(0xFFFFE9F3);
+ static const colorCorePink100 = Color(0xFFFCDBEB);
+ static const colorCorePink1000 = Color(0xFF561231);
+ static const colorCorePink1100 = Color(0xFF2B1721);
+ static const colorCorePink200 = Color(0xFFFFB5D5);
+ static const colorCorePink300 = Color(0xFFFF95C1);
+ static const colorCorePink400 = Color(0xFFFF76AE);
+ static const colorCorePink500 = Color(0xFFEF588B);
+ static const colorCorePink600 = Color(0xFFE0447C);
+ static const colorCorePink700 = Color(0xFFCE3665);
+ static const colorCorePink800 = Color(0xFFB22F5B);
+ static const colorCorePink900 = Color(0xFF931847);
+ static const colorCorePurple0 = Color(0xFFF2F2F9);
+ static const colorCorePurple100 = Color(0xFFEAEAF9);
+ static const colorCorePurple1000 = Color(0xFF2D246B);
+ static const colorCorePurple1100 = Color(0xFF1D1D38);
+ static const colorCorePurple200 = Color(0xFFD8D7F9);
+ static const colorCorePurple300 = Color(0xFFC1C1F7);
+ static const colorCorePurple400 = Color(0xFFA193F2);
+ static const colorCorePurple500 = Color(0xFF9180F4);
+ static const colorCorePurple600 = Color(0xFF816FEA);
+ static const colorCorePurple700 = Color(0xFF6F5ED3);
+ static const colorCorePurple800 = Color(0xFF5E4EBA);
+ static const colorCorePurple900 = Color(0xFF483A9C);
+ static const colorCoreRed0 = Color(0xFFFFEAE9);
+ static const colorCoreRed100 = Color(0xFFFFD5D2);
+ static const colorCoreRed1000 = Color(0xFF6D1313);
+ static const colorCoreRed1100 = Color(0xFF2B1111);
+ static const colorCoreRed200 = Color(0xFFFFB8B1);
+ static const colorCoreRed300 = Color(0xFFFF9C8F);
+ static const colorCoreRed400 = Color(0xFFFF7F6E);
+ static const colorCoreRed500 = Color(0xFFF76054);
+ static const colorCoreRed600 = Color(0xFFED4C42);
+ static const colorCoreRed700 = Color(0xFFDB3E3E);
+ static const colorCoreRed800 = Color(0xFFC63434);
+ static const colorCoreRed900 = Color(0xFF992222);
+ static const colorCoreTeal0 = Color(0xFFE5F9F5);
+ static const colorCoreTeal100 = Color(0xFFCDF7EF);
+ static const colorCoreTeal1000 = Color(0xFF083F3F);
+ static const colorCoreTeal1100 = Color(0xFF002528);
+ static const colorCoreTeal200 = Color(0xFFB3F2E6);
+ static const colorCoreTeal300 = Color(0xFF7DEAD5);
+ static const colorCoreTeal400 = Color(0xFF24E0C5);
+ static const colorCoreTeal500 = Color(0xFF08C4B2);
+ static const colorCoreTeal600 = Color(0xFF00A99C);
+ static const colorCoreTeal700 = Color(0xFF0B968F);
+ static const colorCoreTeal800 = Color(0xFF067C7C);
+ static const colorCoreTeal900 = Color(0xFF026661);
+ static const colorCoreYellow0 = Color(0xFFFFF8E2);
+ static const colorCoreYellow100 = Color(0xFFFDEFCD);
+ static const colorCoreYellow1000 = Color(0xFF542A00);
+ static const colorCoreYellow1100 = Color(0xFF2D1A05);
+ static const colorCoreYellow200 = Color(0xFFFFE99A);
+ static const colorCoreYellow300 = Color(0xFFFFE16E);
+ static const colorCoreYellow400 = Color(0xFFFFD943);
+ static const colorCoreYellow500 = Color(0xFFFFCD1C);
+ static const colorCoreYellow600 = Color(0xFFFFBC00);
+ static const colorCoreYellow700 = Color(0xFFDD9903);
+ static const colorCoreYellow800 = Color(0xFFBA7506);
+ static const colorCoreYellow900 = Color(0xFF944C0C);
+ static const colorFontDanger = Color(0xFF6D1313);
+ static const colorFontInteractive = Color(0xFF0B8599);
+ static const colorFontInteractiveActive = Color(0xFF6F5ED3);
+ static const colorFontInteractiveDisabled = Color(0xFF364141);
+ static const colorFontInteractiveHover = Color(0xFF0B8599);
+ static const colorFontPrimary = Color(0xFF040404);
+ static const colorFontSecondary = Color(0xFF273333);
+ static const colorFontSuccess = Color(0xFF08422F);
+ static const colorFontTertiary = Color(0xFF364141);
+ static const colorFontWarning = Color(0xFF601700);
+ static const sizeBorderRadiusLarge = 480.00;
+ static const sizeFontLarge = 24.00;
+ static const sizeFontMedium = 16.00;
+ static const sizeFontSmall = 12.00;
+ static const sizeFontXl = 36.00;
+ static const sizePaddingLarge = 16.00;
+ static const sizePaddingMedium = 16.00;
+ static const sizePaddingSmall = 8.00;
+ static const sizePaddingXl = 16.00;
+}"
+`;
+
+exports[`integration flutter flutter/class.dart with references should match snapshot 1`] = `
+"
+//
+// style_dictionary_with_references.dart
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+
+import 'dart:ui';
+
+class StyleDictionary {
+ StyleDictionary._();
+
+ static const sizePaddingXl = 16.00;
+ static const sizePaddingLarge = 16.00;
+ static const sizePaddingMedium = 16.00;
+ static const sizePaddingSmall = 8.00;
+ static const sizeFontXl = 36.00;
+ static const sizeFontLarge = 24.00;
+ static const sizeFontMedium = 16.00;
+ static const sizeFontSmall = 12.00;
+ static const sizeBorderRadiusLarge = 480.00;
+ static const colorCoreYellow1100 = Color(0xFF2D1A05);
+ static const colorCoreYellow1000 = Color(0xFF542A00);
+ static const colorCoreYellow900 = Color(0xFF944C0C);
+ static const colorCoreYellow800 = Color(0xFFBA7506);
+ static const colorCoreYellow700 = Color(0xFFDD9903);
+ static const colorCoreYellow600 = Color(0xFFFFBC00);
+ static const colorCoreYellow500 = Color(0xFFFFCD1C);
+ static const colorCoreYellow400 = Color(0xFFFFD943);
+ static const colorCoreYellow300 = Color(0xFFFFE16E);
+ static const colorCoreYellow200 = Color(0xFFFFE99A);
+ static const colorCoreYellow100 = Color(0xFFFDEFCD);
+ static const colorCoreYellow0 = Color(0xFFFFF8E2);
+ static const colorCoreNeutral1100 = Color(0xFF040404);
+ static const colorCoreNeutral1000 = Color(0xFF162020);
+ static const colorCoreNeutral900 = Color(0xFF273333);
+ static const colorCoreNeutral800 = Color(0xFF364141);
+ static const colorCoreNeutral700 = Color(0xFF515E5F);
+ static const colorCoreNeutral600 = Color(0xFF6E797A);
+ static const colorCoreNeutral500 = Color(0xFF929A9B);
+ static const colorCoreNeutral400 = Color(0xFFB0B6B7);
+ static const colorCoreNeutral300 = Color(0xFFC8CCCC);
+ static const colorCoreNeutral200 = Color(0xFFDEE1E1);
+ static const colorCoreNeutral100 = Color(0xFFF3F4F4);
+ static const colorCoreNeutral0 = Color(0xFFFFFFFF);
+ static const colorCoreOrange1100 = Color(0xFF2D130E);
+ static const colorCoreOrange1000 = Color(0xFF601700);
+ static const colorCoreOrange900 = Color(0xFF962C0B);
+ static const colorCoreOrange800 = Color(0xFFCE5511);
+ static const colorCoreOrange700 = Color(0xFFED7024);
+ static const colorCoreOrange600 = Color(0xFFF57D33);
+ static const colorCoreOrange500 = Color(0xFFFC8943);
+ static const colorCoreOrange400 = Color(0xFFFF9C5D);
+ static const colorCoreOrange300 = Color(0xFFFFB180);
+ static const colorCoreOrange200 = Color(0xFFFFC6A4);
+ static const colorCoreOrange100 = Color(0xFFFCDCCC);
+ static const colorCoreOrange0 = Color(0xFFFFEDE3);
+ static const colorCoreRed1100 = Color(0xFF2B1111);
+ static const colorCoreRed1000 = Color(0xFF6D1313);
+ static const colorCoreRed900 = Color(0xFF992222);
+ static const colorCoreRed800 = Color(0xFFC63434);
+ static const colorCoreRed700 = Color(0xFFDB3E3E);
+ static const colorCoreRed600 = Color(0xFFED4C42);
+ static const colorCoreRed500 = Color(0xFFF76054);
+ static const colorCoreRed400 = Color(0xFFFF7F6E);
+ static const colorCoreRed300 = Color(0xFFFF9C8F);
+ static const colorCoreRed200 = Color(0xFFFFB8B1);
+ static const colorCoreRed100 = Color(0xFFFFD5D2);
+ static const colorCoreRed0 = Color(0xFFFFEAE9);
+ static const colorCorePink1100 = Color(0xFF2B1721);
+ static const colorCorePink1000 = Color(0xFF561231);
+ static const colorCorePink900 = Color(0xFF931847);
+ static const colorCorePink800 = Color(0xFFB22F5B);
+ static const colorCorePink700 = Color(0xFFCE3665);
+ static const colorCorePink600 = Color(0xFFE0447C);
+ static const colorCorePink500 = Color(0xFFEF588B);
+ static const colorCorePink400 = Color(0xFFFF76AE);
+ static const colorCorePink300 = Color(0xFFFF95C1);
+ static const colorCorePink200 = Color(0xFFFFB5D5);
+ static const colorCorePink100 = Color(0xFFFCDBEB);
+ static const colorCorePink0 = Color(0xFFFFE9F3);
+ static const colorCoreMagenta1100 = Color(0xFF29192D);
+ static const colorCoreMagenta1000 = Color(0xFF451551);
+ static const colorCoreMagenta900 = Color(0xFF6C2277);
+ static const colorCoreMagenta800 = Color(0xFF8F3896);
+ static const colorCoreMagenta700 = Color(0xFFAC44A8);
+ static const colorCoreMagenta600 = Color(0xFFC44EB9);
+ static const colorCoreMagenta500 = Color(0xFFDB61DB);
+ static const colorCoreMagenta400 = Color(0xFFF282F5);
+ static const colorCoreMagenta300 = Color(0xFFEDADF2);
+ static const colorCoreMagenta200 = Color(0xFFF4C4F7);
+ static const colorCoreMagenta100 = Color(0xFFF9E3FC);
+ static const colorCoreMagenta0 = Color(0xFFFEF0FF);
+ static const colorCorePurple1100 = Color(0xFF1D1D38);
+ static const colorCorePurple1000 = Color(0xFF2D246B);
+ static const colorCorePurple900 = Color(0xFF483A9C);
+ static const colorCorePurple800 = Color(0xFF5E4EBA);
+ static const colorCorePurple700 = Color(0xFF6F5ED3);
+ static const colorCorePurple600 = Color(0xFF816FEA);
+ static const colorCorePurple500 = Color(0xFF9180F4);
+ static const colorCorePurple400 = Color(0xFFA193F2);
+ static const colorCorePurple300 = Color(0xFFC1C1F7);
+ static const colorCorePurple200 = Color(0xFFD8D7F9);
+ static const colorCorePurple100 = Color(0xFFEAEAF9);
+ static const colorCorePurple0 = Color(0xFFF2F2F9);
+ static const colorCoreBlue1100 = Color(0xFF002138);
+ static const colorCoreBlue1000 = Color(0xFF0A3960);
+ static const colorCoreBlue900 = Color(0xFF0C5689);
+ static const colorCoreBlue800 = Color(0xFF116DAA);
+ static const colorCoreBlue700 = Color(0xFF2079C3);
+ static const colorCoreBlue600 = Color(0xFF2B87D3);
+ static const colorCoreBlue500 = Color(0xFF3896E3);
+ static const colorCoreBlue400 = Color(0xFF56ADF5);
+ static const colorCoreBlue300 = Color(0xFFA1D2F8);
+ static const colorCoreBlue200 = Color(0xFFC7E4F9);
+ static const colorCoreBlue100 = Color(0xFFDCF2FF);
+ static const colorCoreBlue0 = Color(0xFFE9F8FF);
+ static const colorCoreAqua1100 = Color(0xFF002838);
+ static const colorCoreAqua1000 = Color(0xFF083D4F);
+ static const colorCoreAqua900 = Color(0xFF035E73);
+ static const colorCoreAqua800 = Color(0xFF0F6E84);
+ static const colorCoreAqua700 = Color(0xFF0B8599);
+ static const colorCoreAqua600 = Color(0xFF0797AE);
+ static const colorCoreAqua500 = Color(0xFF17B8CE);
+ static const colorCoreAqua400 = Color(0xFF33D6E2);
+ static const colorCoreAqua300 = Color(0xFF76E5E2);
+ static const colorCoreAqua200 = Color(0xFFA5F2F2);
+ static const colorCoreAqua100 = Color(0xFFC5F9F9);
+ static const colorCoreAqua0 = Color(0xFFD9FCFB);
+ static const colorCoreTeal1100 = Color(0xFF002528);
+ static const colorCoreTeal1000 = Color(0xFF083F3F);
+ static const colorCoreTeal900 = Color(0xFF026661);
+ static const colorCoreTeal800 = Color(0xFF067C7C);
+ static const colorCoreTeal700 = Color(0xFF0B968F);
+ static const colorCoreTeal600 = Color(0xFF00A99C);
+ static const colorCoreTeal500 = Color(0xFF08C4B2);
+ static const colorCoreTeal400 = Color(0xFF24E0C5);
+ static const colorCoreTeal300 = Color(0xFF7DEAD5);
+ static const colorCoreTeal200 = Color(0xFFB3F2E6);
+ static const colorCoreTeal100 = Color(0xFFCDF7EF);
+ static const colorCoreTeal0 = Color(0xFFE5F9F5);
+ static const colorCoreGreen1100 = Color(0xFF002B20);
+ static const colorCoreGreen1000 = Color(0xFF08422F);
+ static const colorCoreGreen900 = Color(0xFF006B40);
+ static const colorCoreGreen800 = Color(0xFF008B46);
+ static const colorCoreGreen700 = Color(0xFF0CA750);
+ static const colorCoreGreen600 = Color(0xFF2BB656);
+ static const colorCoreGreen500 = Color(0xFF59CB59);
+ static const colorCoreGreen400 = Color(0xFF75DD66);
+ static const colorCoreGreen300 = Color(0xFF98E58E);
+ static const colorCoreGreen200 = Color(0xFFC2F2BD);
+ static const colorCoreGreen100 = Color(0xFFD7F4D7);
+ static const colorCoreGreen0 = Color(0xFFEBF9EB);
+ static const colorFontSuccess = colorCoreGreen1000;
+ static const colorFontWarning = colorCoreOrange1000;
+ static const colorFontDanger = colorCoreRed1000;
+ static const colorFontTertiary = colorCoreNeutral800;
+ static const colorFontSecondary = colorCoreNeutral900;
+ static const colorFontPrimary = colorCoreNeutral1100;
+ static const colorBrandSecondary = colorCorePurple700;
+ static const colorBrandPrimary = colorCoreAqua700;
+ static const colorBorderPrimary = colorCoreNeutral300;
+ static const colorBackgroundInfo = colorCoreBlue0;
+ static const colorBackgroundSuccess = colorCoreGreen0;
+ static const colorBackgroundWarning = colorCoreOrange0;
+ static const colorBackgroundDanger = colorCoreRed0;
+ static const colorBackgroundTertiary = colorCoreNeutral200;
+ static const colorBackgroundSecondary = colorCoreNeutral100;
+ static const colorBackgroundPrimary = colorCoreNeutral0;
+ static const colorFontInteractiveDisabled = colorFontTertiary;
+ static const colorFontInteractiveActive = colorBrandSecondary;
+ static const colorFontInteractiveHover = colorBrandPrimary;
+ static const colorFontInteractive = colorBrandPrimary;
+ static const colorBackgroundDisabled = colorBackgroundTertiary;
+}"
+`;
diff --git a/__integration__/__snapshots__/iOSObjectiveC.test.js.snap b/__integration__/__snapshots__/iOSObjectiveC.test.js.snap
new file mode 100644
index 000000000..2b1d7a3d3
--- /dev/null
+++ b/__integration__/__snapshots__/iOSObjectiveC.test.js.snap
@@ -0,0 +1,1975 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration ios objective-c ios/color.h should match snapshot 1`] = `
+"
+//
+// color.h
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+#import
+
+typedef NS_ENUM(NSInteger, StyleDictionaryColorName) {
+ColorBackgroundPrimary,
+ColorBackgroundSecondary,
+ColorBackgroundTertiary,
+ColorBackgroundDanger,
+ColorBackgroundWarning,
+ColorBackgroundSuccess,
+ColorBackgroundInfo,
+ColorBackgroundDisabled,
+ColorBorderPrimary,
+ColorBrandPrimary,
+ColorBrandSecondary,
+ColorCoreGreen0,
+ColorCoreGreen100,
+ColorCoreGreen200,
+ColorCoreGreen300,
+ColorCoreGreen400,
+ColorCoreGreen500,
+ColorCoreGreen600,
+ColorCoreGreen700,
+ColorCoreGreen800,
+ColorCoreGreen900,
+ColorCoreGreen1000,
+ColorCoreGreen1100,
+ColorCoreTeal0,
+ColorCoreTeal100,
+ColorCoreTeal200,
+ColorCoreTeal300,
+ColorCoreTeal400,
+ColorCoreTeal500,
+ColorCoreTeal600,
+ColorCoreTeal700,
+ColorCoreTeal800,
+ColorCoreTeal900,
+ColorCoreTeal1000,
+ColorCoreTeal1100,
+ColorCoreAqua0,
+ColorCoreAqua100,
+ColorCoreAqua200,
+ColorCoreAqua300,
+ColorCoreAqua400,
+ColorCoreAqua500,
+ColorCoreAqua600,
+ColorCoreAqua700,
+ColorCoreAqua800,
+ColorCoreAqua900,
+ColorCoreAqua1000,
+ColorCoreAqua1100,
+ColorCoreBlue0,
+ColorCoreBlue100,
+ColorCoreBlue200,
+ColorCoreBlue300,
+ColorCoreBlue400,
+ColorCoreBlue500,
+ColorCoreBlue600,
+ColorCoreBlue700,
+ColorCoreBlue800,
+ColorCoreBlue900,
+ColorCoreBlue1000,
+ColorCoreBlue1100,
+ColorCorePurple0,
+ColorCorePurple100,
+ColorCorePurple200,
+ColorCorePurple300,
+ColorCorePurple400,
+ColorCorePurple500,
+ColorCorePurple600,
+ColorCorePurple700,
+ColorCorePurple800,
+ColorCorePurple900,
+ColorCorePurple1000,
+ColorCorePurple1100,
+ColorCoreMagenta0,
+ColorCoreMagenta100,
+ColorCoreMagenta200,
+ColorCoreMagenta300,
+ColorCoreMagenta400,
+ColorCoreMagenta500,
+ColorCoreMagenta600,
+ColorCoreMagenta700,
+ColorCoreMagenta800,
+ColorCoreMagenta900,
+ColorCoreMagenta1000,
+ColorCoreMagenta1100,
+ColorCorePink0,
+ColorCorePink100,
+ColorCorePink200,
+ColorCorePink300,
+ColorCorePink400,
+ColorCorePink500,
+ColorCorePink600,
+ColorCorePink700,
+ColorCorePink800,
+ColorCorePink900,
+ColorCorePink1000,
+ColorCorePink1100,
+ColorCoreRed0,
+ColorCoreRed100,
+ColorCoreRed200,
+ColorCoreRed300,
+ColorCoreRed400,
+ColorCoreRed500,
+ColorCoreRed600,
+ColorCoreRed700,
+ColorCoreRed800,
+ColorCoreRed900,
+ColorCoreRed1000,
+ColorCoreRed1100,
+ColorCoreOrange0,
+ColorCoreOrange100,
+ColorCoreOrange200,
+ColorCoreOrange300,
+ColorCoreOrange400,
+ColorCoreOrange500,
+ColorCoreOrange600,
+ColorCoreOrange700,
+ColorCoreOrange800,
+ColorCoreOrange900,
+ColorCoreOrange1000,
+ColorCoreOrange1100,
+ColorCoreNeutral0,
+ColorCoreNeutral100,
+ColorCoreNeutral200,
+ColorCoreNeutral300,
+ColorCoreNeutral400,
+ColorCoreNeutral500,
+ColorCoreNeutral600,
+ColorCoreNeutral700,
+ColorCoreNeutral800,
+ColorCoreNeutral900,
+ColorCoreNeutral1000,
+ColorCoreNeutral1100,
+ColorCoreYellow0,
+ColorCoreYellow100,
+ColorCoreYellow200,
+ColorCoreYellow300,
+ColorCoreYellow400,
+ColorCoreYellow500,
+ColorCoreYellow600,
+ColorCoreYellow700,
+ColorCoreYellow800,
+ColorCoreYellow900,
+ColorCoreYellow1000,
+ColorCoreYellow1100,
+ColorFontPrimary,
+ColorFontSecondary,
+ColorFontTertiary,
+ColorFontInteractive,
+ColorFontInteractiveHover,
+ColorFontInteractiveActive,
+ColorFontInteractiveDisabled,
+ColorFontDanger,
+ColorFontWarning,
+ColorFontSuccess
+};
+
+@interface StyleDictionaryColor : NSObject
++ (NSArray *)values;
++ (UIColor *)color:(StyleDictionaryColorName)color;
+@end
+"
+`;
+
+exports[`integration ios objective-c ios/color.m should match snapshot 1`] = `
+"
+//
+// color.m
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+#import \\"StyleDictionaryColor.h\\"
+
+@implementation StyleDictionaryColor
+
++ (UIColor *)color:(StyleDictionaryColorName)colorEnum{
+ return [[self values] objectAtIndex:colorEnum];
+}
+
++ (NSArray *)values {
+ static NSArray* colorArray;
+ static dispatch_once_t onceToken;
+
+ dispatch_once(&onceToken, ^{
+ colorArray = @[
+[UIColor colorWithRed:1.000f green:1.000f blue:1.000f alpha:1.000f],
+[UIColor colorWithRed:0.953f green:0.957f blue:0.957f alpha:1.000f],
+[UIColor colorWithRed:0.871f green:0.882f blue:0.882f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.918f blue:0.914f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.929f blue:0.890f alpha:1.000f],
+[UIColor colorWithRed:0.922f green:0.976f blue:0.922f alpha:1.000f],
+[UIColor colorWithRed:0.914f green:0.973f blue:1.000f alpha:1.000f],
+[UIColor colorWithRed:0.871f green:0.882f blue:0.882f alpha:1.000f],
+[UIColor colorWithRed:0.784f green:0.800f blue:0.800f alpha:1.000f],
+[UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f],
+[UIColor colorWithRed:0.435f green:0.369f blue:0.827f alpha:1.000f],
+[UIColor colorWithRed:0.922f green:0.976f blue:0.922f alpha:1.000f],
+[UIColor colorWithRed:0.843f green:0.957f blue:0.843f alpha:1.000f],
+[UIColor colorWithRed:0.761f green:0.949f blue:0.741f alpha:1.000f],
+[UIColor colorWithRed:0.596f green:0.898f blue:0.557f alpha:1.000f],
+[UIColor colorWithRed:0.459f green:0.867f blue:0.400f alpha:1.000f],
+[UIColor colorWithRed:0.349f green:0.796f blue:0.349f alpha:1.000f],
+[UIColor colorWithRed:0.169f green:0.714f blue:0.337f alpha:1.000f],
+[UIColor colorWithRed:0.047f green:0.655f blue:0.314f alpha:1.000f],
+[UIColor colorWithRed:0.000f green:0.545f blue:0.275f alpha:1.000f],
+[UIColor colorWithRed:0.000f green:0.420f blue:0.251f alpha:1.000f],
+[UIColor colorWithRed:0.031f green:0.259f blue:0.184f alpha:1.000f],
+[UIColor colorWithRed:0.000f green:0.169f blue:0.125f alpha:1.000f],
+[UIColor colorWithRed:0.898f green:0.976f blue:0.961f alpha:1.000f],
+[UIColor colorWithRed:0.804f green:0.969f blue:0.937f alpha:1.000f],
+[UIColor colorWithRed:0.702f green:0.949f blue:0.902f alpha:1.000f],
+[UIColor colorWithRed:0.490f green:0.918f blue:0.835f alpha:1.000f],
+[UIColor colorWithRed:0.141f green:0.878f blue:0.773f alpha:1.000f],
+[UIColor colorWithRed:0.031f green:0.769f blue:0.698f alpha:1.000f],
+[UIColor colorWithRed:0.000f green:0.663f blue:0.612f alpha:1.000f],
+[UIColor colorWithRed:0.043f green:0.588f blue:0.561f alpha:1.000f],
+[UIColor colorWithRed:0.024f green:0.486f blue:0.486f alpha:1.000f],
+[UIColor colorWithRed:0.008f green:0.400f blue:0.380f alpha:1.000f],
+[UIColor colorWithRed:0.031f green:0.247f blue:0.247f alpha:1.000f],
+[UIColor colorWithRed:0.000f green:0.145f blue:0.157f alpha:1.000f],
+[UIColor colorWithRed:0.851f green:0.988f blue:0.984f alpha:1.000f],
+[UIColor colorWithRed:0.773f green:0.976f blue:0.976f alpha:1.000f],
+[UIColor colorWithRed:0.647f green:0.949f blue:0.949f alpha:1.000f],
+[UIColor colorWithRed:0.463f green:0.898f blue:0.886f alpha:1.000f],
+[UIColor colorWithRed:0.200f green:0.839f blue:0.886f alpha:1.000f],
+[UIColor colorWithRed:0.090f green:0.722f blue:0.808f alpha:1.000f],
+[UIColor colorWithRed:0.027f green:0.592f blue:0.682f alpha:1.000f],
+[UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f],
+[UIColor colorWithRed:0.059f green:0.431f blue:0.518f alpha:1.000f],
+[UIColor colorWithRed:0.012f green:0.369f blue:0.451f alpha:1.000f],
+[UIColor colorWithRed:0.031f green:0.239f blue:0.310f alpha:1.000f],
+[UIColor colorWithRed:0.000f green:0.157f blue:0.220f alpha:1.000f],
+[UIColor colorWithRed:0.914f green:0.973f blue:1.000f alpha:1.000f],
+[UIColor colorWithRed:0.863f green:0.949f blue:1.000f alpha:1.000f],
+[UIColor colorWithRed:0.780f green:0.894f blue:0.976f alpha:1.000f],
+[UIColor colorWithRed:0.631f green:0.824f blue:0.973f alpha:1.000f],
+[UIColor colorWithRed:0.337f green:0.678f blue:0.961f alpha:1.000f],
+[UIColor colorWithRed:0.220f green:0.588f blue:0.890f alpha:1.000f],
+[UIColor colorWithRed:0.169f green:0.529f blue:0.827f alpha:1.000f],
+[UIColor colorWithRed:0.125f green:0.475f blue:0.765f alpha:1.000f],
+[UIColor colorWithRed:0.067f green:0.427f blue:0.667f alpha:1.000f],
+[UIColor colorWithRed:0.047f green:0.337f blue:0.537f alpha:1.000f],
+[UIColor colorWithRed:0.039f green:0.224f blue:0.376f alpha:1.000f],
+[UIColor colorWithRed:0.000f green:0.129f blue:0.220f alpha:1.000f],
+[UIColor colorWithRed:0.949f green:0.949f blue:0.976f alpha:1.000f],
+[UIColor colorWithRed:0.918f green:0.918f blue:0.976f alpha:1.000f],
+[UIColor colorWithRed:0.847f green:0.843f blue:0.976f alpha:1.000f],
+[UIColor colorWithRed:0.757f green:0.757f blue:0.969f alpha:1.000f],
+[UIColor colorWithRed:0.631f green:0.576f blue:0.949f alpha:1.000f],
+[UIColor colorWithRed:0.569f green:0.502f blue:0.957f alpha:1.000f],
+[UIColor colorWithRed:0.506f green:0.435f blue:0.918f alpha:1.000f],
+[UIColor colorWithRed:0.435f green:0.369f blue:0.827f alpha:1.000f],
+[UIColor colorWithRed:0.369f green:0.306f blue:0.729f alpha:1.000f],
+[UIColor colorWithRed:0.282f green:0.227f blue:0.612f alpha:1.000f],
+[UIColor colorWithRed:0.176f green:0.141f blue:0.420f alpha:1.000f],
+[UIColor colorWithRed:0.114f green:0.114f blue:0.220f alpha:1.000f],
+[UIColor colorWithRed:0.996f green:0.941f blue:1.000f alpha:1.000f],
+[UIColor colorWithRed:0.976f green:0.890f blue:0.988f alpha:1.000f],
+[UIColor colorWithRed:0.957f green:0.769f blue:0.969f alpha:1.000f],
+[UIColor colorWithRed:0.929f green:0.678f blue:0.949f alpha:1.000f],
+[UIColor colorWithRed:0.949f green:0.510f blue:0.961f alpha:1.000f],
+[UIColor colorWithRed:0.859f green:0.380f blue:0.859f alpha:1.000f],
+[UIColor colorWithRed:0.769f green:0.306f blue:0.725f alpha:1.000f],
+[UIColor colorWithRed:0.675f green:0.267f blue:0.659f alpha:1.000f],
+[UIColor colorWithRed:0.561f green:0.220f blue:0.588f alpha:1.000f],
+[UIColor colorWithRed:0.424f green:0.133f blue:0.467f alpha:1.000f],
+[UIColor colorWithRed:0.271f green:0.082f blue:0.318f alpha:1.000f],
+[UIColor colorWithRed:0.161f green:0.098f blue:0.176f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.914f blue:0.953f alpha:1.000f],
+[UIColor colorWithRed:0.988f green:0.859f blue:0.922f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.710f blue:0.835f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.584f blue:0.757f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.463f blue:0.682f alpha:1.000f],
+[UIColor colorWithRed:0.937f green:0.345f blue:0.545f alpha:1.000f],
+[UIColor colorWithRed:0.878f green:0.267f blue:0.486f alpha:1.000f],
+[UIColor colorWithRed:0.808f green:0.212f blue:0.396f alpha:1.000f],
+[UIColor colorWithRed:0.698f green:0.184f blue:0.357f alpha:1.000f],
+[UIColor colorWithRed:0.576f green:0.094f blue:0.278f alpha:1.000f],
+[UIColor colorWithRed:0.337f green:0.071f blue:0.192f alpha:1.000f],
+[UIColor colorWithRed:0.169f green:0.090f blue:0.129f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.918f blue:0.914f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.835f blue:0.824f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.722f blue:0.694f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.612f blue:0.561f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.498f blue:0.431f alpha:1.000f],
+[UIColor colorWithRed:0.969f green:0.376f blue:0.329f alpha:1.000f],
+[UIColor colorWithRed:0.929f green:0.298f blue:0.259f alpha:1.000f],
+[UIColor colorWithRed:0.859f green:0.243f blue:0.243f alpha:1.000f],
+[UIColor colorWithRed:0.776f green:0.204f blue:0.204f alpha:1.000f],
+[UIColor colorWithRed:0.600f green:0.133f blue:0.133f alpha:1.000f],
+[UIColor colorWithRed:0.427f green:0.075f blue:0.075f alpha:1.000f],
+[UIColor colorWithRed:0.169f green:0.067f blue:0.067f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.929f blue:0.890f alpha:1.000f],
+[UIColor colorWithRed:0.988f green:0.863f blue:0.800f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.776f blue:0.643f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.694f blue:0.502f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.612f blue:0.365f alpha:1.000f],
+[UIColor colorWithRed:0.988f green:0.537f blue:0.263f alpha:1.000f],
+[UIColor colorWithRed:0.961f green:0.490f blue:0.200f alpha:1.000f],
+[UIColor colorWithRed:0.929f green:0.439f blue:0.141f alpha:1.000f],
+[UIColor colorWithRed:0.808f green:0.333f blue:0.067f alpha:1.000f],
+[UIColor colorWithRed:0.588f green:0.173f blue:0.043f alpha:1.000f],
+[UIColor colorWithRed:0.376f green:0.090f blue:0.000f alpha:1.000f],
+[UIColor colorWithRed:0.176f green:0.075f blue:0.055f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:1.000f blue:1.000f alpha:1.000f],
+[UIColor colorWithRed:0.953f green:0.957f blue:0.957f alpha:1.000f],
+[UIColor colorWithRed:0.871f green:0.882f blue:0.882f alpha:1.000f],
+[UIColor colorWithRed:0.784f green:0.800f blue:0.800f alpha:1.000f],
+[UIColor colorWithRed:0.690f green:0.714f blue:0.718f alpha:1.000f],
+[UIColor colorWithRed:0.573f green:0.604f blue:0.608f alpha:1.000f],
+[UIColor colorWithRed:0.431f green:0.475f blue:0.478f alpha:1.000f],
+[UIColor colorWithRed:0.318f green:0.369f blue:0.373f alpha:1.000f],
+[UIColor colorWithRed:0.212f green:0.255f blue:0.255f alpha:1.000f],
+[UIColor colorWithRed:0.153f green:0.200f blue:0.200f alpha:1.000f],
+[UIColor colorWithRed:0.086f green:0.125f blue:0.125f alpha:1.000f],
+[UIColor colorWithRed:0.016f green:0.016f blue:0.016f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.973f blue:0.886f alpha:1.000f],
+[UIColor colorWithRed:0.992f green:0.937f blue:0.804f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.914f blue:0.604f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.882f blue:0.431f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.851f blue:0.263f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.804f blue:0.110f alpha:1.000f],
+[UIColor colorWithRed:1.000f green:0.737f blue:0.000f alpha:1.000f],
+[UIColor colorWithRed:0.867f green:0.600f blue:0.012f alpha:1.000f],
+[UIColor colorWithRed:0.729f green:0.459f blue:0.024f alpha:1.000f],
+[UIColor colorWithRed:0.580f green:0.298f blue:0.047f alpha:1.000f],
+[UIColor colorWithRed:0.329f green:0.165f blue:0.000f alpha:1.000f],
+[UIColor colorWithRed:0.176f green:0.102f blue:0.020f alpha:1.000f],
+[UIColor colorWithRed:0.016f green:0.016f blue:0.016f alpha:1.000f],
+[UIColor colorWithRed:0.153f green:0.200f blue:0.200f alpha:1.000f],
+[UIColor colorWithRed:0.212f green:0.255f blue:0.255f alpha:1.000f],
+[UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f],
+[UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f],
+[UIColor colorWithRed:0.435f green:0.369f blue:0.827f alpha:1.000f],
+[UIColor colorWithRed:0.212f green:0.255f blue:0.255f alpha:1.000f],
+[UIColor colorWithRed:0.427f green:0.075f blue:0.075f alpha:1.000f],
+[UIColor colorWithRed:0.376f green:0.090f blue:0.000f alpha:1.000f],
+[UIColor colorWithRed:0.031f green:0.259f blue:0.184f alpha:1.000f]
+ ];
+ });
+
+ return colorArray;
+}
+
+@end
+"
+`;
+
+exports[`integration ios objective-c ios/macros.h should match snapshot 1`] = `
+"
+//
+// macros.h
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+#import
+#import
+
+#define ColorBackgroundPrimary [UIColor colorWithRed:1.000f green:1.000f blue:1.000f alpha:1.000f]
+#define ColorBackgroundSecondary [UIColor colorWithRed:0.953f green:0.957f blue:0.957f alpha:1.000f]
+#define ColorBackgroundTertiary [UIColor colorWithRed:0.871f green:0.882f blue:0.882f alpha:1.000f]
+#define ColorBackgroundDanger [UIColor colorWithRed:1.000f green:0.918f blue:0.914f alpha:1.000f]
+#define ColorBackgroundWarning [UIColor colorWithRed:1.000f green:0.929f blue:0.890f alpha:1.000f]
+#define ColorBackgroundSuccess [UIColor colorWithRed:0.922f green:0.976f blue:0.922f alpha:1.000f]
+#define ColorBackgroundInfo [UIColor colorWithRed:0.914f green:0.973f blue:1.000f alpha:1.000f]
+#define ColorBackgroundDisabled [UIColor colorWithRed:0.871f green:0.882f blue:0.882f alpha:1.000f]
+#define ColorBorderPrimary [UIColor colorWithRed:0.784f green:0.800f blue:0.800f alpha:1.000f]
+#define ColorBrandPrimary [UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f]
+#define ColorBrandSecondary [UIColor colorWithRed:0.435f green:0.369f blue:0.827f alpha:1.000f]
+#define ColorCoreGreen0 [UIColor colorWithRed:0.922f green:0.976f blue:0.922f alpha:1.000f]
+#define ColorCoreGreen100 [UIColor colorWithRed:0.843f green:0.957f blue:0.843f alpha:1.000f]
+#define ColorCoreGreen200 [UIColor colorWithRed:0.761f green:0.949f blue:0.741f alpha:1.000f]
+#define ColorCoreGreen300 [UIColor colorWithRed:0.596f green:0.898f blue:0.557f alpha:1.000f]
+#define ColorCoreGreen400 [UIColor colorWithRed:0.459f green:0.867f blue:0.400f alpha:1.000f]
+#define ColorCoreGreen500 [UIColor colorWithRed:0.349f green:0.796f blue:0.349f alpha:1.000f]
+#define ColorCoreGreen600 [UIColor colorWithRed:0.169f green:0.714f blue:0.337f alpha:1.000f]
+#define ColorCoreGreen700 [UIColor colorWithRed:0.047f green:0.655f blue:0.314f alpha:1.000f]
+#define ColorCoreGreen800 [UIColor colorWithRed:0.000f green:0.545f blue:0.275f alpha:1.000f]
+#define ColorCoreGreen900 [UIColor colorWithRed:0.000f green:0.420f blue:0.251f alpha:1.000f]
+#define ColorCoreGreen1000 [UIColor colorWithRed:0.031f green:0.259f blue:0.184f alpha:1.000f]
+#define ColorCoreGreen1100 [UIColor colorWithRed:0.000f green:0.169f blue:0.125f alpha:1.000f]
+#define ColorCoreTeal0 [UIColor colorWithRed:0.898f green:0.976f blue:0.961f alpha:1.000f]
+#define ColorCoreTeal100 [UIColor colorWithRed:0.804f green:0.969f blue:0.937f alpha:1.000f]
+#define ColorCoreTeal200 [UIColor colorWithRed:0.702f green:0.949f blue:0.902f alpha:1.000f]
+#define ColorCoreTeal300 [UIColor colorWithRed:0.490f green:0.918f blue:0.835f alpha:1.000f]
+#define ColorCoreTeal400 [UIColor colorWithRed:0.141f green:0.878f blue:0.773f alpha:1.000f]
+#define ColorCoreTeal500 [UIColor colorWithRed:0.031f green:0.769f blue:0.698f alpha:1.000f]
+#define ColorCoreTeal600 [UIColor colorWithRed:0.000f green:0.663f blue:0.612f alpha:1.000f]
+#define ColorCoreTeal700 [UIColor colorWithRed:0.043f green:0.588f blue:0.561f alpha:1.000f]
+#define ColorCoreTeal800 [UIColor colorWithRed:0.024f green:0.486f blue:0.486f alpha:1.000f]
+#define ColorCoreTeal900 [UIColor colorWithRed:0.008f green:0.400f blue:0.380f alpha:1.000f]
+#define ColorCoreTeal1000 [UIColor colorWithRed:0.031f green:0.247f blue:0.247f alpha:1.000f]
+#define ColorCoreTeal1100 [UIColor colorWithRed:0.000f green:0.145f blue:0.157f alpha:1.000f]
+#define ColorCoreAqua0 [UIColor colorWithRed:0.851f green:0.988f blue:0.984f alpha:1.000f]
+#define ColorCoreAqua100 [UIColor colorWithRed:0.773f green:0.976f blue:0.976f alpha:1.000f]
+#define ColorCoreAqua200 [UIColor colorWithRed:0.647f green:0.949f blue:0.949f alpha:1.000f]
+#define ColorCoreAqua300 [UIColor colorWithRed:0.463f green:0.898f blue:0.886f alpha:1.000f]
+#define ColorCoreAqua400 [UIColor colorWithRed:0.200f green:0.839f blue:0.886f alpha:1.000f]
+#define ColorCoreAqua500 [UIColor colorWithRed:0.090f green:0.722f blue:0.808f alpha:1.000f]
+#define ColorCoreAqua600 [UIColor colorWithRed:0.027f green:0.592f blue:0.682f alpha:1.000f]
+#define ColorCoreAqua700 [UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f]
+#define ColorCoreAqua800 [UIColor colorWithRed:0.059f green:0.431f blue:0.518f alpha:1.000f]
+#define ColorCoreAqua900 [UIColor colorWithRed:0.012f green:0.369f blue:0.451f alpha:1.000f]
+#define ColorCoreAqua1000 [UIColor colorWithRed:0.031f green:0.239f blue:0.310f alpha:1.000f]
+#define ColorCoreAqua1100 [UIColor colorWithRed:0.000f green:0.157f blue:0.220f alpha:1.000f]
+#define ColorCoreBlue0 [UIColor colorWithRed:0.914f green:0.973f blue:1.000f alpha:1.000f]
+#define ColorCoreBlue100 [UIColor colorWithRed:0.863f green:0.949f blue:1.000f alpha:1.000f]
+#define ColorCoreBlue200 [UIColor colorWithRed:0.780f green:0.894f blue:0.976f alpha:1.000f]
+#define ColorCoreBlue300 [UIColor colorWithRed:0.631f green:0.824f blue:0.973f alpha:1.000f]
+#define ColorCoreBlue400 [UIColor colorWithRed:0.337f green:0.678f blue:0.961f alpha:1.000f]
+#define ColorCoreBlue500 [UIColor colorWithRed:0.220f green:0.588f blue:0.890f alpha:1.000f]
+#define ColorCoreBlue600 [UIColor colorWithRed:0.169f green:0.529f blue:0.827f alpha:1.000f]
+#define ColorCoreBlue700 [UIColor colorWithRed:0.125f green:0.475f blue:0.765f alpha:1.000f]
+#define ColorCoreBlue800 [UIColor colorWithRed:0.067f green:0.427f blue:0.667f alpha:1.000f]
+#define ColorCoreBlue900 [UIColor colorWithRed:0.047f green:0.337f blue:0.537f alpha:1.000f]
+#define ColorCoreBlue1000 [UIColor colorWithRed:0.039f green:0.224f blue:0.376f alpha:1.000f]
+#define ColorCoreBlue1100 [UIColor colorWithRed:0.000f green:0.129f blue:0.220f alpha:1.000f]
+#define ColorCorePurple0 [UIColor colorWithRed:0.949f green:0.949f blue:0.976f alpha:1.000f]
+#define ColorCorePurple100 [UIColor colorWithRed:0.918f green:0.918f blue:0.976f alpha:1.000f]
+#define ColorCorePurple200 [UIColor colorWithRed:0.847f green:0.843f blue:0.976f alpha:1.000f]
+#define ColorCorePurple300 [UIColor colorWithRed:0.757f green:0.757f blue:0.969f alpha:1.000f]
+#define ColorCorePurple400 [UIColor colorWithRed:0.631f green:0.576f blue:0.949f alpha:1.000f]
+#define ColorCorePurple500 [UIColor colorWithRed:0.569f green:0.502f blue:0.957f alpha:1.000f]
+#define ColorCorePurple600 [UIColor colorWithRed:0.506f green:0.435f blue:0.918f alpha:1.000f]
+#define ColorCorePurple700 [UIColor colorWithRed:0.435f green:0.369f blue:0.827f alpha:1.000f]
+#define ColorCorePurple800 [UIColor colorWithRed:0.369f green:0.306f blue:0.729f alpha:1.000f]
+#define ColorCorePurple900 [UIColor colorWithRed:0.282f green:0.227f blue:0.612f alpha:1.000f]
+#define ColorCorePurple1000 [UIColor colorWithRed:0.176f green:0.141f blue:0.420f alpha:1.000f]
+#define ColorCorePurple1100 [UIColor colorWithRed:0.114f green:0.114f blue:0.220f alpha:1.000f]
+#define ColorCoreMagenta0 [UIColor colorWithRed:0.996f green:0.941f blue:1.000f alpha:1.000f]
+#define ColorCoreMagenta100 [UIColor colorWithRed:0.976f green:0.890f blue:0.988f alpha:1.000f]
+#define ColorCoreMagenta200 [UIColor colorWithRed:0.957f green:0.769f blue:0.969f alpha:1.000f]
+#define ColorCoreMagenta300 [UIColor colorWithRed:0.929f green:0.678f blue:0.949f alpha:1.000f]
+#define ColorCoreMagenta400 [UIColor colorWithRed:0.949f green:0.510f blue:0.961f alpha:1.000f]
+#define ColorCoreMagenta500 [UIColor colorWithRed:0.859f green:0.380f blue:0.859f alpha:1.000f]
+#define ColorCoreMagenta600 [UIColor colorWithRed:0.769f green:0.306f blue:0.725f alpha:1.000f]
+#define ColorCoreMagenta700 [UIColor colorWithRed:0.675f green:0.267f blue:0.659f alpha:1.000f]
+#define ColorCoreMagenta800 [UIColor colorWithRed:0.561f green:0.220f blue:0.588f alpha:1.000f]
+#define ColorCoreMagenta900 [UIColor colorWithRed:0.424f green:0.133f blue:0.467f alpha:1.000f]
+#define ColorCoreMagenta1000 [UIColor colorWithRed:0.271f green:0.082f blue:0.318f alpha:1.000f]
+#define ColorCoreMagenta1100 [UIColor colorWithRed:0.161f green:0.098f blue:0.176f alpha:1.000f]
+#define ColorCorePink0 [UIColor colorWithRed:1.000f green:0.914f blue:0.953f alpha:1.000f]
+#define ColorCorePink100 [UIColor colorWithRed:0.988f green:0.859f blue:0.922f alpha:1.000f]
+#define ColorCorePink200 [UIColor colorWithRed:1.000f green:0.710f blue:0.835f alpha:1.000f]
+#define ColorCorePink300 [UIColor colorWithRed:1.000f green:0.584f blue:0.757f alpha:1.000f]
+#define ColorCorePink400 [UIColor colorWithRed:1.000f green:0.463f blue:0.682f alpha:1.000f]
+#define ColorCorePink500 [UIColor colorWithRed:0.937f green:0.345f blue:0.545f alpha:1.000f]
+#define ColorCorePink600 [UIColor colorWithRed:0.878f green:0.267f blue:0.486f alpha:1.000f]
+#define ColorCorePink700 [UIColor colorWithRed:0.808f green:0.212f blue:0.396f alpha:1.000f]
+#define ColorCorePink800 [UIColor colorWithRed:0.698f green:0.184f blue:0.357f alpha:1.000f]
+#define ColorCorePink900 [UIColor colorWithRed:0.576f green:0.094f blue:0.278f alpha:1.000f]
+#define ColorCorePink1000 [UIColor colorWithRed:0.337f green:0.071f blue:0.192f alpha:1.000f]
+#define ColorCorePink1100 [UIColor colorWithRed:0.169f green:0.090f blue:0.129f alpha:1.000f]
+#define ColorCoreRed0 [UIColor colorWithRed:1.000f green:0.918f blue:0.914f alpha:1.000f]
+#define ColorCoreRed100 [UIColor colorWithRed:1.000f green:0.835f blue:0.824f alpha:1.000f]
+#define ColorCoreRed200 [UIColor colorWithRed:1.000f green:0.722f blue:0.694f alpha:1.000f]
+#define ColorCoreRed300 [UIColor colorWithRed:1.000f green:0.612f blue:0.561f alpha:1.000f]
+#define ColorCoreRed400 [UIColor colorWithRed:1.000f green:0.498f blue:0.431f alpha:1.000f]
+#define ColorCoreRed500 [UIColor colorWithRed:0.969f green:0.376f blue:0.329f alpha:1.000f]
+#define ColorCoreRed600 [UIColor colorWithRed:0.929f green:0.298f blue:0.259f alpha:1.000f]
+#define ColorCoreRed700 [UIColor colorWithRed:0.859f green:0.243f blue:0.243f alpha:1.000f]
+#define ColorCoreRed800 [UIColor colorWithRed:0.776f green:0.204f blue:0.204f alpha:1.000f]
+#define ColorCoreRed900 [UIColor colorWithRed:0.600f green:0.133f blue:0.133f alpha:1.000f]
+#define ColorCoreRed1000 [UIColor colorWithRed:0.427f green:0.075f blue:0.075f alpha:1.000f]
+#define ColorCoreRed1100 [UIColor colorWithRed:0.169f green:0.067f blue:0.067f alpha:1.000f]
+#define ColorCoreOrange0 [UIColor colorWithRed:1.000f green:0.929f blue:0.890f alpha:1.000f]
+#define ColorCoreOrange100 [UIColor colorWithRed:0.988f green:0.863f blue:0.800f alpha:1.000f]
+#define ColorCoreOrange200 [UIColor colorWithRed:1.000f green:0.776f blue:0.643f alpha:1.000f]
+#define ColorCoreOrange300 [UIColor colorWithRed:1.000f green:0.694f blue:0.502f alpha:1.000f]
+#define ColorCoreOrange400 [UIColor colorWithRed:1.000f green:0.612f blue:0.365f alpha:1.000f]
+#define ColorCoreOrange500 [UIColor colorWithRed:0.988f green:0.537f blue:0.263f alpha:1.000f]
+#define ColorCoreOrange600 [UIColor colorWithRed:0.961f green:0.490f blue:0.200f alpha:1.000f]
+#define ColorCoreOrange700 [UIColor colorWithRed:0.929f green:0.439f blue:0.141f alpha:1.000f]
+#define ColorCoreOrange800 [UIColor colorWithRed:0.808f green:0.333f blue:0.067f alpha:1.000f]
+#define ColorCoreOrange900 [UIColor colorWithRed:0.588f green:0.173f blue:0.043f alpha:1.000f]
+#define ColorCoreOrange1000 [UIColor colorWithRed:0.376f green:0.090f blue:0.000f alpha:1.000f]
+#define ColorCoreOrange1100 [UIColor colorWithRed:0.176f green:0.075f blue:0.055f alpha:1.000f]
+#define ColorCoreNeutral0 [UIColor colorWithRed:1.000f green:1.000f blue:1.000f alpha:1.000f]
+#define ColorCoreNeutral100 [UIColor colorWithRed:0.953f green:0.957f blue:0.957f alpha:1.000f]
+#define ColorCoreNeutral200 [UIColor colorWithRed:0.871f green:0.882f blue:0.882f alpha:1.000f]
+#define ColorCoreNeutral300 [UIColor colorWithRed:0.784f green:0.800f blue:0.800f alpha:1.000f]
+#define ColorCoreNeutral400 [UIColor colorWithRed:0.690f green:0.714f blue:0.718f alpha:1.000f]
+#define ColorCoreNeutral500 [UIColor colorWithRed:0.573f green:0.604f blue:0.608f alpha:1.000f]
+#define ColorCoreNeutral600 [UIColor colorWithRed:0.431f green:0.475f blue:0.478f alpha:1.000f]
+#define ColorCoreNeutral700 [UIColor colorWithRed:0.318f green:0.369f blue:0.373f alpha:1.000f]
+#define ColorCoreNeutral800 [UIColor colorWithRed:0.212f green:0.255f blue:0.255f alpha:1.000f]
+#define ColorCoreNeutral900 [UIColor colorWithRed:0.153f green:0.200f blue:0.200f alpha:1.000f]
+#define ColorCoreNeutral1000 [UIColor colorWithRed:0.086f green:0.125f blue:0.125f alpha:1.000f]
+#define ColorCoreNeutral1100 [UIColor colorWithRed:0.016f green:0.016f blue:0.016f alpha:1.000f]
+#define ColorCoreYellow0 [UIColor colorWithRed:1.000f green:0.973f blue:0.886f alpha:1.000f]
+#define ColorCoreYellow100 [UIColor colorWithRed:0.992f green:0.937f blue:0.804f alpha:1.000f]
+#define ColorCoreYellow200 [UIColor colorWithRed:1.000f green:0.914f blue:0.604f alpha:1.000f]
+#define ColorCoreYellow300 [UIColor colorWithRed:1.000f green:0.882f blue:0.431f alpha:1.000f]
+#define ColorCoreYellow400 [UIColor colorWithRed:1.000f green:0.851f blue:0.263f alpha:1.000f]
+#define ColorCoreYellow500 [UIColor colorWithRed:1.000f green:0.804f blue:0.110f alpha:1.000f]
+#define ColorCoreYellow600 [UIColor colorWithRed:1.000f green:0.737f blue:0.000f alpha:1.000f]
+#define ColorCoreYellow700 [UIColor colorWithRed:0.867f green:0.600f blue:0.012f alpha:1.000f]
+#define ColorCoreYellow800 [UIColor colorWithRed:0.729f green:0.459f blue:0.024f alpha:1.000f]
+#define ColorCoreYellow900 [UIColor colorWithRed:0.580f green:0.298f blue:0.047f alpha:1.000f]
+#define ColorCoreYellow1000 [UIColor colorWithRed:0.329f green:0.165f blue:0.000f alpha:1.000f]
+#define ColorCoreYellow1100 [UIColor colorWithRed:0.176f green:0.102f blue:0.020f alpha:1.000f]
+#define ColorFontPrimary [UIColor colorWithRed:0.016f green:0.016f blue:0.016f alpha:1.000f]
+#define ColorFontSecondary [UIColor colorWithRed:0.153f green:0.200f blue:0.200f alpha:1.000f]
+#define ColorFontTertiary [UIColor colorWithRed:0.212f green:0.255f blue:0.255f alpha:1.000f]
+#define ColorFontInteractive [UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f]
+#define ColorFontInteractiveHover [UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f]
+#define ColorFontInteractiveActive [UIColor colorWithRed:0.435f green:0.369f blue:0.827f alpha:1.000f]
+#define ColorFontInteractiveDisabled [UIColor colorWithRed:0.212f green:0.255f blue:0.255f alpha:1.000f]
+#define ColorFontDanger [UIColor colorWithRed:0.427f green:0.075f blue:0.075f alpha:1.000f]
+#define ColorFontWarning [UIColor colorWithRed:0.376f green:0.090f blue:0.000f alpha:1.000f]
+#define ColorFontSuccess [UIColor colorWithRed:0.031f green:0.259f blue:0.184f alpha:1.000f]
+#define SizeBorderRadiusLarge 480.00f
+#define SizeFontSmall 12.00f
+#define SizeFontMedium 16.00f
+#define SizeFontLarge 24.00f
+#define SizeFontXl 36.00f
+#define SizePaddingSmall 8.00f
+#define SizePaddingMedium 16.00f
+#define SizePaddingLarge 16.00f
+#define SizePaddingXl 16.00f
+
+"
+`;
+
+exports[`integration ios objective-c ios/singleton.h should match snapshot 1`] = `
+"
+//
+// singleton.h
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+#import
+#import
+
+@interface StyleDictionary : NSObject
+
++ (NSDictionary *)properties;
++ (NSDictionary *)getProperty:(NSString *)keyPath;
++ (nonnull)getValue:(NSString *)keyPath;
+
+@end
+"
+`;
+
+exports[`integration ios objective-c ios/singleton.m should match snapshot 1`] = `
+"
+//
+// singleton.m
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+#import \\"StyleDictionary.h\\"
+
+@implementation StyleDictionary
+
++ (NSDictionary *)getProperty:(NSString *)keyPath {
+ return [[self properties] valueForKeyPath:keyPath];
+}
+
++ (nonnull)getValue:(NSString *)keyPath {
+ return [[self properties] valueForKeyPath:[NSString stringWithFormat:@\\"%@.value\\", keyPath]];
+}
+
++ (NSDictionary *)properties {
+ static NSDictionary * dictionary;
+ static dispatch_once_t onceToken;
+
+ dispatch_once(&onceToken, ^{
+ dictionary = @{
+ @\\"color\\": @{
+ @\\"background\\": @{
+ @\\"primary\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:1.000f blue:1.000f alpha:1.000f],
+ @\\"name\\": @\\"ColorBackgroundPrimary\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"background\\",
+ @\\"item\\": @\\"primary\\"
+ },
+ @\\"secondary\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.953f green:0.957f blue:0.957f alpha:1.000f],
+ @\\"name\\": @\\"ColorBackgroundSecondary\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"background\\",
+ @\\"item\\": @\\"secondary\\"
+ },
+ @\\"tertiary\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.871f green:0.882f blue:0.882f alpha:1.000f],
+ @\\"name\\": @\\"ColorBackgroundTertiary\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"background\\",
+ @\\"item\\": @\\"tertiary\\"
+ },
+ @\\"danger\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.918f blue:0.914f alpha:1.000f],
+ @\\"name\\": @\\"ColorBackgroundDanger\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"background\\",
+ @\\"item\\": @\\"danger\\"
+ },
+ @\\"warning\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.929f blue:0.890f alpha:1.000f],
+ @\\"name\\": @\\"ColorBackgroundWarning\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"background\\",
+ @\\"item\\": @\\"warning\\"
+ },
+ @\\"success\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.922f green:0.976f blue:0.922f alpha:1.000f],
+ @\\"name\\": @\\"ColorBackgroundSuccess\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"background\\",
+ @\\"item\\": @\\"success\\"
+ },
+ @\\"info\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.914f green:0.973f blue:1.000f alpha:1.000f],
+ @\\"name\\": @\\"ColorBackgroundInfo\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"background\\",
+ @\\"item\\": @\\"info\\"
+ },
+ @\\"disabled\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.871f green:0.882f blue:0.882f alpha:1.000f],
+ @\\"name\\": @\\"ColorBackgroundDisabled\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"background\\",
+ @\\"item\\": @\\"disabled\\"
+ }
+ },
+ @\\"border\\": @{
+ @\\"primary\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.784f green:0.800f blue:0.800f alpha:1.000f],
+ @\\"name\\": @\\"ColorBorderPrimary\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"border\\",
+ @\\"item\\": @\\"primary\\"
+ },
+ @\\"secondary\\": @
+ },
+ @\\"tertiary\\": @
+ }
+ },
+ @\\"brand\\": @{
+ @\\"primary\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f],
+ @\\"name\\": @\\"ColorBrandPrimary\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"brand\\",
+ @\\"item\\": @\\"primary\\"
+ },
+ @\\"secondary\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.435f green:0.369f blue:0.827f alpha:1.000f],
+ @\\"name\\": @\\"ColorBrandSecondary\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"brand\\",
+ @\\"item\\": @\\"secondary\\"
+ }
+ },
+ @\\"core\\": @{
+ @\\"green\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.922f green:0.976f blue:0.922f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.843f green:0.957f blue:0.843f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.761f green:0.949f blue:0.741f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.596f green:0.898f blue:0.557f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.459f green:0.867f blue:0.400f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.349f green:0.796f blue:0.349f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.169f green:0.714f blue:0.337f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.047f green:0.655f blue:0.314f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.000f green:0.545f blue:0.275f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.000f green:0.420f blue:0.251f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.031f green:0.259f blue:0.184f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.000f green:0.169f blue:0.125f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreGreen1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"green\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ },
+ @\\"teal\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.898f green:0.976f blue:0.961f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.804f green:0.969f blue:0.937f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.702f green:0.949f blue:0.902f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.490f green:0.918f blue:0.835f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.141f green:0.878f blue:0.773f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.031f green:0.769f blue:0.698f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.000f green:0.663f blue:0.612f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.043f green:0.588f blue:0.561f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.024f green:0.486f blue:0.486f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.008f green:0.400f blue:0.380f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.031f green:0.247f blue:0.247f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.000f green:0.145f blue:0.157f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreTeal1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"teal\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ },
+ @\\"aqua\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.851f green:0.988f blue:0.984f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.773f green:0.976f blue:0.976f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.647f green:0.949f blue:0.949f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.463f green:0.898f blue:0.886f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.200f green:0.839f blue:0.886f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.090f green:0.722f blue:0.808f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.027f green:0.592f blue:0.682f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.059f green:0.431f blue:0.518f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.012f green:0.369f blue:0.451f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.031f green:0.239f blue:0.310f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.000f green:0.157f blue:0.220f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreAqua1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"aqua\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ },
+ @\\"blue\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.914f green:0.973f blue:1.000f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.863f green:0.949f blue:1.000f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.780f green:0.894f blue:0.976f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.631f green:0.824f blue:0.973f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.337f green:0.678f blue:0.961f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.220f green:0.588f blue:0.890f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.169f green:0.529f blue:0.827f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.125f green:0.475f blue:0.765f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.067f green:0.427f blue:0.667f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.047f green:0.337f blue:0.537f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.039f green:0.224f blue:0.376f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.000f green:0.129f blue:0.220f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreBlue1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"blue\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ },
+ @\\"purple\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.949f green:0.949f blue:0.976f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.918f green:0.918f blue:0.976f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.847f green:0.843f blue:0.976f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.757f green:0.757f blue:0.969f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.631f green:0.576f blue:0.949f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.569f green:0.502f blue:0.957f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.506f green:0.435f blue:0.918f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.435f green:0.369f blue:0.827f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.369f green:0.306f blue:0.729f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.282f green:0.227f blue:0.612f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.176f green:0.141f blue:0.420f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.114f green:0.114f blue:0.220f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePurple1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"purple\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ },
+ @\\"magenta\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.996f green:0.941f blue:1.000f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.976f green:0.890f blue:0.988f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.957f green:0.769f blue:0.969f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.929f green:0.678f blue:0.949f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.949f green:0.510f blue:0.961f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.859f green:0.380f blue:0.859f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.769f green:0.306f blue:0.725f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.675f green:0.267f blue:0.659f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.561f green:0.220f blue:0.588f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.424f green:0.133f blue:0.467f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.271f green:0.082f blue:0.318f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.161f green:0.098f blue:0.176f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreMagenta1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"magenta\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ },
+ @\\"pink\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.914f blue:0.953f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.988f green:0.859f blue:0.922f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.710f blue:0.835f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.584f blue:0.757f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.463f blue:0.682f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.937f green:0.345f blue:0.545f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.878f green:0.267f blue:0.486f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.808f green:0.212f blue:0.396f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.698f green:0.184f blue:0.357f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.576f green:0.094f blue:0.278f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.337f green:0.071f blue:0.192f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.169f green:0.090f blue:0.129f alpha:1.000f],
+ @\\"name\\": @\\"ColorCorePink1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"pink\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ },
+ @\\"red\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.918f blue:0.914f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.835f blue:0.824f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.722f blue:0.694f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.612f blue:0.561f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.498f blue:0.431f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.969f green:0.376f blue:0.329f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.929f green:0.298f blue:0.259f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.859f green:0.243f blue:0.243f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.776f green:0.204f blue:0.204f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.600f green:0.133f blue:0.133f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.427f green:0.075f blue:0.075f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.169f green:0.067f blue:0.067f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreRed1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"red\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ },
+ @\\"orange\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.929f blue:0.890f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.988f green:0.863f blue:0.800f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.776f blue:0.643f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.694f blue:0.502f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.612f blue:0.365f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.988f green:0.537f blue:0.263f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.961f green:0.490f blue:0.200f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.929f green:0.439f blue:0.141f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.808f green:0.333f blue:0.067f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.588f green:0.173f blue:0.043f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.376f green:0.090f blue:0.000f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.176f green:0.075f blue:0.055f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreOrange1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"orange\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ },
+ @\\"neutral\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:1.000f blue:1.000f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.953f green:0.957f blue:0.957f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.871f green:0.882f blue:0.882f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.784f green:0.800f blue:0.800f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.690f green:0.714f blue:0.718f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.573f green:0.604f blue:0.608f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.431f green:0.475f blue:0.478f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.318f green:0.369f blue:0.373f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.212f green:0.255f blue:0.255f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.153f green:0.200f blue:0.200f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.086f green:0.125f blue:0.125f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.016f green:0.016f blue:0.016f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreNeutral1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"neutral\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ },
+ @\\"yellow\\": @{
+ @\\"0\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.973f blue:0.886f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow0\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"0\\"
+ },
+ @\\"100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.992f green:0.937f blue:0.804f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"100\\"
+ },
+ @\\"200\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.914f blue:0.604f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow200\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"200\\"
+ },
+ @\\"300\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.882f blue:0.431f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow300\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"300\\"
+ },
+ @\\"400\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.851f blue:0.263f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow400\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"400\\"
+ },
+ @\\"500\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.804f blue:0.110f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow500\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"500\\"
+ },
+ @\\"600\\": @{
+ @\\"value\\": [UIColor colorWithRed:1.000f green:0.737f blue:0.000f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow600\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"600\\"
+ },
+ @\\"700\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.867f green:0.600f blue:0.012f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow700\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"700\\"
+ },
+ @\\"800\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.729f green:0.459f blue:0.024f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow800\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"800\\"
+ },
+ @\\"900\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.580f green:0.298f blue:0.047f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow900\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"900\\"
+ },
+ @\\"1000\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.329f green:0.165f blue:0.000f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow1000\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"1000\\"
+ },
+ @\\"1100\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.176f green:0.102f blue:0.020f alpha:1.000f],
+ @\\"name\\": @\\"ColorCoreYellow1100\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"core\\",
+ @\\"item\\": @\\"yellow\\",
+ @\\"subitem\\": @\\"1100\\"
+ }
+ }
+ },
+ @\\"font\\": @{
+ @\\"primary\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.016f green:0.016f blue:0.016f alpha:1.000f],
+ @\\"name\\": @\\"ColorFontPrimary\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"primary\\"
+ },
+ @\\"secondary\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.153f green:0.200f blue:0.200f alpha:1.000f],
+ @\\"name\\": @\\"ColorFontSecondary\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"secondary\\"
+ },
+ @\\"tertiary\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.212f green:0.255f blue:0.255f alpha:1.000f],
+ @\\"name\\": @\\"ColorFontTertiary\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"tertiary\\"
+ },
+ @\\"interactive\\": @{
+ @\\"_\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f],
+ @\\"name\\": @\\"ColorFontInteractive\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"interactive\\",
+ @\\"subitem\\": @\\"_\\"
+ },
+ @\\"hover\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.043f green:0.522f blue:0.600f alpha:1.000f],
+ @\\"name\\": @\\"ColorFontInteractiveHover\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"interactive\\",
+ @\\"subitem\\": @\\"hover\\"
+ },
+ @\\"active\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.435f green:0.369f blue:0.827f alpha:1.000f],
+ @\\"name\\": @\\"ColorFontInteractiveActive\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"interactive\\",
+ @\\"subitem\\": @\\"active\\"
+ },
+ @\\"disabled\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.212f green:0.255f blue:0.255f alpha:1.000f],
+ @\\"name\\": @\\"ColorFontInteractiveDisabled\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"interactive\\",
+ @\\"subitem\\": @\\"disabled\\"
+ }
+ },
+ @\\"danger\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.427f green:0.075f blue:0.075f alpha:1.000f],
+ @\\"name\\": @\\"ColorFontDanger\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"danger\\"
+ },
+ @\\"warning\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.376f green:0.090f blue:0.000f alpha:1.000f],
+ @\\"name\\": @\\"ColorFontWarning\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"warning\\"
+ },
+ @\\"success\\": @{
+ @\\"value\\": [UIColor colorWithRed:0.031f green:0.259f blue:0.184f alpha:1.000f],
+ @\\"name\\": @\\"ColorFontSuccess\\",
+ @\\"category\\": @\\"color\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"success\\"
+ }
+ }
+ },
+ @\\"size\\": @{
+ @\\"border\\": @{
+ @\\"radius\\": @{
+ @\\"large\\": @{
+ @\\"value\\": @480.00f,
+ @\\"name\\": @\\"SizeBorderRadiusLarge\\",
+ @\\"category\\": @\\"size\\",
+ @\\"type\\": @\\"border\\",
+ @\\"item\\": @\\"radius\\",
+ @\\"subitem\\": @\\"large\\"
+ }
+ }
+ },
+ @\\"font\\": @{
+ @\\"small\\": @{
+ @\\"value\\": @12.00f,
+ @\\"name\\": @\\"SizeFontSmall\\",
+ @\\"category\\": @\\"size\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"small\\"
+ },
+ @\\"medium\\": @{
+ @\\"value\\": @16.00f,
+ @\\"name\\": @\\"SizeFontMedium\\",
+ @\\"category\\": @\\"size\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"medium\\"
+ },
+ @\\"large\\": @{
+ @\\"value\\": @24.00f,
+ @\\"name\\": @\\"SizeFontLarge\\",
+ @\\"category\\": @\\"size\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"large\\"
+ },
+ @\\"xl\\": @{
+ @\\"value\\": @36.00f,
+ @\\"name\\": @\\"SizeFontXl\\",
+ @\\"category\\": @\\"size\\",
+ @\\"type\\": @\\"font\\",
+ @\\"item\\": @\\"xl\\"
+ }
+ },
+ @\\"padding\\": @{
+ @\\"small\\": @{
+ @\\"value\\": @8.00f,
+ @\\"name\\": @\\"SizePaddingSmall\\",
+ @\\"category\\": @\\"size\\",
+ @\\"type\\": @\\"padding\\",
+ @\\"item\\": @\\"small\\"
+ },
+ @\\"medium\\": @{
+ @\\"value\\": @16.00f,
+ @\\"name\\": @\\"SizePaddingMedium\\",
+ @\\"category\\": @\\"size\\",
+ @\\"type\\": @\\"padding\\",
+ @\\"item\\": @\\"medium\\"
+ },
+ @\\"large\\": @{
+ @\\"value\\": @16.00f,
+ @\\"name\\": @\\"SizePaddingLarge\\",
+ @\\"category\\": @\\"size\\",
+ @\\"type\\": @\\"padding\\",
+ @\\"item\\": @\\"large\\"
+ },
+ @\\"xl\\": @{
+ @\\"value\\": @16.00f,
+ @\\"name\\": @\\"SizePaddingXl\\",
+ @\\"category\\": @\\"size\\",
+ @\\"type\\": @\\"padding\\",
+ @\\"item\\": @\\"xl\\"
+ }
+ }
+ }
+ };
+ });
+
+ return dictionary;
+}
+
+@end
+
+
+"
+`;
+
+exports[`integration ios objective-c ios/static.h should match snapshot 1`] = `
+"
+// static.h
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+#import
+
+
+extern CGFloat const SizeBorderRadiusLarge;
+extern CGFloat const SizeFontSmall;
+extern CGFloat const SizeFontMedium;
+extern CGFloat const SizeFontLarge;
+extern CGFloat const SizeFontXl;
+extern CGFloat const SizePaddingSmall;
+extern CGFloat const SizePaddingMedium;
+extern CGFloat const SizePaddingLarge;
+extern CGFloat const SizePaddingXl;
+"
+`;
+
+exports[`integration ios objective-c ios/static.m should match snapshot 1`] = `
+"
+//
+// static.m
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+#import \\"StyleDictionaryStatic.h\\"
+
+
+CGFloat const SizeBorderRadiusLarge = 480.00f;
+CGFloat const SizeFontSmall = 12.00f;
+CGFloat const SizeFontMedium = 16.00f;
+CGFloat const SizeFontLarge = 24.00f;
+CGFloat const SizeFontXl = 36.00f;
+CGFloat const SizePaddingSmall = 8.00f;
+CGFloat const SizePaddingMedium = 16.00f;
+CGFloat const SizePaddingLarge = 16.00f;
+CGFloat const SizePaddingXl = 16.00f;
+"
+`;
diff --git a/__integration__/__snapshots__/objectValues.test.js.snap b/__integration__/__snapshots__/objectValues.test.js.snap
new file mode 100644
index 000000000..7fc7c7478
--- /dev/null
+++ b/__integration__/__snapshots__/objectValues.test.js.snap
@@ -0,0 +1,93 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration object values css/variables border should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --border-primary: 0.125rem solid #ff0000;
+}
+"
+`;
+
+exports[`integration object values css/variables border with references should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --border-primary: var(--size-border) solid var(--color-red);
+}
+"
+`;
+
+exports[`integration object values css/variables hex syntax should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --color-red: #ff0000;
+ --color-green: #40bf40;
+}
+"
+`;
+
+exports[`integration object values css/variables hex syntax with references should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --color-red: #ff0000;
+ --color-green: #40bf40;
+}
+"
+`;
+
+exports[`integration object values css/variables hsl syntax should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --color-red: #ff0000;
+ --color-green: hsl(120, 50%, 50%);
+}
+"
+`;
+
+exports[`integration object values css/variables hsl syntax with references should match snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --color-red: #ff0000;
+ --color-green: hsl(120, 50%, 50%);
+}
+"
+`;
+
+exports[`integration object values scss/variables should match snapshot 1`] = `
+"
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+$border-primary: 0.125rem solid #ff0000;"
+`;
+
+exports[`integration object values scss/variables with references should match snapshot 1`] = `
+"
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+$border-primary: $size-border solid $color-red;"
+`;
diff --git a/__integration__/__snapshots__/scss.test.js.snap b/__integration__/__snapshots__/scss.test.js.snap
new file mode 100644
index 000000000..ee431b3cf
--- /dev/null
+++ b/__integration__/__snapshots__/scss.test.js.snap
@@ -0,0 +1,917 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration scss scss/map-deep should match snapshot 1`] = `
+"
+/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+$color-background-primary: #ffffff !default;
+$color-background-secondary: #f3f4f4 !default;
+$color-background-tertiary: #dee1e1 !default;
+$color-background-danger: #ffeae9 !default;
+$color-background-warning: #ffede3 !default;
+$color-background-success: #ebf9eb !default;
+$color-background-info: #e9f8ff !default;
+$color-background-disabled: #dee1e1 !default;
+$color-border-primary: #c8cccc !default;
+$color-brand-primary: #0b8599 !default;
+$color-brand-secondary: #6f5ed3 !default;
+$color-core-green-0: #ebf9eb !default;
+$color-core-green-100: #d7f4d7 !default;
+$color-core-green-200: #c2f2bd !default;
+$color-core-green-300: #98e58e !default;
+$color-core-green-400: #75dd66 !default;
+$color-core-green-500: #59cb59 !default;
+$color-core-green-600: #2bb656 !default;
+$color-core-green-700: #0ca750 !default;
+$color-core-green-800: #008b46 !default;
+$color-core-green-900: #006b40 !default;
+$color-core-green-1000: #08422f !default;
+$color-core-green-1100: #002b20 !default;
+$color-core-teal-0: #e5f9f5 !default;
+$color-core-teal-100: #cdf7ef !default;
+$color-core-teal-200: #b3f2e6 !default;
+$color-core-teal-300: #7dead5 !default;
+$color-core-teal-400: #24e0c5 !default;
+$color-core-teal-500: #08c4b2 !default;
+$color-core-teal-600: #00a99c !default;
+$color-core-teal-700: #0b968f !default;
+$color-core-teal-800: #067c7c !default;
+$color-core-teal-900: #026661 !default;
+$color-core-teal-1000: #083f3f !default;
+$color-core-teal-1100: #002528 !default;
+$color-core-aqua-0: #d9fcfb !default;
+$color-core-aqua-100: #c5f9f9 !default;
+$color-core-aqua-200: #a5f2f2 !default;
+$color-core-aqua-300: #76e5e2 !default;
+$color-core-aqua-400: #33d6e2 !default;
+$color-core-aqua-500: #17b8ce !default;
+$color-core-aqua-600: #0797ae !default;
+$color-core-aqua-700: #0b8599 !default;
+$color-core-aqua-800: #0f6e84 !default;
+$color-core-aqua-900: #035e73 !default;
+$color-core-aqua-1000: #083d4f !default;
+$color-core-aqua-1100: #002838 !default;
+$color-core-blue-0: #e9f8ff !default;
+$color-core-blue-100: #dcf2ff !default;
+$color-core-blue-200: #c7e4f9 !default;
+$color-core-blue-300: #a1d2f8 !default;
+$color-core-blue-400: #56adf5 !default;
+$color-core-blue-500: #3896e3 !default;
+$color-core-blue-600: #2b87d3 !default;
+$color-core-blue-700: #2079c3 !default;
+$color-core-blue-800: #116daa !default;
+$color-core-blue-900: #0c5689 !default;
+$color-core-blue-1000: #0a3960 !default;
+$color-core-blue-1100: #002138 !default;
+$color-core-purple-0: #f2f2f9 !default;
+$color-core-purple-100: #eaeaf9 !default;
+$color-core-purple-200: #d8d7f9 !default;
+$color-core-purple-300: #c1c1f7 !default;
+$color-core-purple-400: #a193f2 !default;
+$color-core-purple-500: #9180f4 !default;
+$color-core-purple-600: #816fea !default;
+$color-core-purple-700: #6f5ed3 !default;
+$color-core-purple-800: #5e4eba !default;
+$color-core-purple-900: #483a9c !default;
+$color-core-purple-1000: #2d246b !default;
+$color-core-purple-1100: #1d1d38 !default;
+$color-core-magenta-0: #fef0ff !default;
+$color-core-magenta-100: #f9e3fc !default;
+$color-core-magenta-200: #f4c4f7 !default;
+$color-core-magenta-300: #edadf2 !default;
+$color-core-magenta-400: #f282f5 !default;
+$color-core-magenta-500: #db61db !default;
+$color-core-magenta-600: #c44eb9 !default;
+$color-core-magenta-700: #ac44a8 !default;
+$color-core-magenta-800: #8f3896 !default;
+$color-core-magenta-900: #6c2277 !default;
+$color-core-magenta-1000: #451551 !default;
+$color-core-magenta-1100: #29192d !default;
+$color-core-pink-0: #ffe9f3 !default;
+$color-core-pink-100: #fcdbeb !default;
+$color-core-pink-200: #ffb5d5 !default;
+$color-core-pink-300: #ff95c1 !default;
+$color-core-pink-400: #ff76ae !default;
+$color-core-pink-500: #ef588b !default;
+$color-core-pink-600: #e0447c !default;
+$color-core-pink-700: #ce3665 !default;
+$color-core-pink-800: #b22f5b !default;
+$color-core-pink-900: #931847 !default;
+$color-core-pink-1000: #561231 !default;
+$color-core-pink-1100: #2b1721 !default;
+$color-core-red-0: #ffeae9 !default;
+$color-core-red-100: #ffd5d2 !default;
+$color-core-red-200: #ffb8b1 !default;
+$color-core-red-300: #ff9c8f !default;
+$color-core-red-400: #ff7f6e !default;
+$color-core-red-500: #f76054 !default;
+$color-core-red-600: #ed4c42 !default;
+$color-core-red-700: #db3e3e !default;
+$color-core-red-800: #c63434 !default;
+$color-core-red-900: #992222 !default;
+$color-core-red-1000: #6d1313 !default;
+$color-core-red-1100: #2b1111 !default;
+$color-core-orange-0: #ffede3 !default;
+$color-core-orange-100: #fcdccc !default;
+$color-core-orange-200: #ffc6a4 !default;
+$color-core-orange-300: #ffb180 !default;
+$color-core-orange-400: #ff9c5d !default;
+$color-core-orange-500: #fc8943 !default;
+$color-core-orange-600: #f57d33 !default;
+$color-core-orange-700: #ed7024 !default;
+$color-core-orange-800: #ce5511 !default;
+$color-core-orange-900: #962c0b !default;
+$color-core-orange-1000: #601700 !default;
+$color-core-orange-1100: #2d130e !default;
+$color-core-neutral-0: #ffffff !default;
+$color-core-neutral-100: #f3f4f4 !default;
+$color-core-neutral-200: #dee1e1 !default;
+$color-core-neutral-300: #c8cccc !default;
+$color-core-neutral-400: #b0b6b7 !default;
+$color-core-neutral-500: #929a9b !default;
+$color-core-neutral-600: #6e797a !default;
+$color-core-neutral-700: #515e5f !default;
+$color-core-neutral-800: #364141 !default;
+$color-core-neutral-900: #273333 !default;
+$color-core-neutral-1000: #162020 !default;
+$color-core-neutral-1100: #040404 !default;
+$color-core-yellow-0: #fff8e2 !default;
+$color-core-yellow-100: #fdefcd !default;
+$color-core-yellow-200: #ffe99a !default;
+$color-core-yellow-300: #ffe16e !default;
+$color-core-yellow-400: #ffd943 !default;
+$color-core-yellow-500: #ffcd1c !default;
+$color-core-yellow-600: #ffbc00 !default;
+$color-core-yellow-700: #dd9903 !default;
+$color-core-yellow-800: #ba7506 !default;
+$color-core-yellow-900: #944c0c !default;
+$color-core-yellow-1000: #542a00 !default;
+$color-core-yellow-1100: #2d1a05 !default;
+$color-font-primary: #040404 !default;
+$color-font-secondary: #273333 !default;
+$color-font-tertiary: #364141 !default;
+$color-font-interactive: #0b8599 !default;
+$color-font-interactive-hover: #0b8599 !default;
+$color-font-interactive-active: #6f5ed3 !default;
+$color-font-interactive-disabled: #364141 !default;
+$color-font-danger: #6d1313 !default;
+$color-font-warning: #601700 !default;
+$color-font-success: #08422f !default;
+$size-border-radius-large: 30rem !default;
+$size-font-small: 0.75rem !default;
+$size-font-medium: 1rem !default;
+$size-font-large: 1.5rem !default;
+$size-font-xl: 2.25rem !default;
+$size-padding-small: 0.5rem !default;
+$size-padding-medium: 1rem !default;
+$size-padding-large: 1rem !default;
+$size-padding-xl: 1rem !default;
+
+$design-system-tokens: (
+ 'color': (
+ 'background': (
+ 'primary': $color-background-primary,
+ 'secondary': $color-background-secondary,
+ 'tertiary': $color-background-tertiary,
+ 'danger': $color-background-danger,
+ 'warning': $color-background-warning,
+ 'success': $color-background-success,
+ 'info': $color-background-info,
+ 'disabled': $color-background-disabled
+ ),
+ 'border': (
+ 'primary': $color-border-primary,
+ 'secondary': (
+
+ ),
+ 'tertiary': (
+
+ )
+ ),
+ 'brand': (
+ 'primary': $color-brand-primary,
+ 'secondary': $color-brand-secondary
+ ),
+ 'core': (
+ 'green': (
+ '0': $color-core-green-0,
+ '100': $color-core-green-100,
+ '200': $color-core-green-200,
+ '300': $color-core-green-300,
+ '400': $color-core-green-400,
+ '500': $color-core-green-500,
+ '600': $color-core-green-600,
+ '700': $color-core-green-700,
+ '800': $color-core-green-800,
+ '900': $color-core-green-900,
+ '1000': $color-core-green-1000,
+ '1100': $color-core-green-1100
+ ),
+ 'teal': (
+ '0': $color-core-teal-0,
+ '100': $color-core-teal-100,
+ '200': $color-core-teal-200,
+ '300': $color-core-teal-300,
+ '400': $color-core-teal-400,
+ '500': $color-core-teal-500,
+ '600': $color-core-teal-600,
+ '700': $color-core-teal-700,
+ '800': $color-core-teal-800,
+ '900': $color-core-teal-900,
+ '1000': $color-core-teal-1000,
+ '1100': $color-core-teal-1100
+ ),
+ 'aqua': (
+ '0': $color-core-aqua-0,
+ '100': $color-core-aqua-100,
+ '200': $color-core-aqua-200,
+ '300': $color-core-aqua-300,
+ '400': $color-core-aqua-400,
+ '500': $color-core-aqua-500,
+ '600': $color-core-aqua-600,
+ '700': $color-core-aqua-700,
+ '800': $color-core-aqua-800,
+ '900': $color-core-aqua-900,
+ '1000': $color-core-aqua-1000,
+ '1100': $color-core-aqua-1100
+ ),
+ 'blue': (
+ '0': $color-core-blue-0,
+ '100': $color-core-blue-100,
+ '200': $color-core-blue-200,
+ '300': $color-core-blue-300,
+ '400': $color-core-blue-400,
+ '500': $color-core-blue-500,
+ '600': $color-core-blue-600,
+ '700': $color-core-blue-700,
+ '800': $color-core-blue-800,
+ '900': $color-core-blue-900,
+ '1000': $color-core-blue-1000,
+ '1100': $color-core-blue-1100
+ ),
+ 'purple': (
+ '0': $color-core-purple-0,
+ '100': $color-core-purple-100,
+ '200': $color-core-purple-200,
+ '300': $color-core-purple-300,
+ '400': $color-core-purple-400,
+ '500': $color-core-purple-500,
+ '600': $color-core-purple-600,
+ '700': $color-core-purple-700,
+ '800': $color-core-purple-800,
+ '900': $color-core-purple-900,
+ '1000': $color-core-purple-1000,
+ '1100': $color-core-purple-1100
+ ),
+ 'magenta': (
+ '0': $color-core-magenta-0,
+ '100': $color-core-magenta-100,
+ '200': $color-core-magenta-200,
+ '300': $color-core-magenta-300,
+ '400': $color-core-magenta-400,
+ '500': $color-core-magenta-500,
+ '600': $color-core-magenta-600,
+ '700': $color-core-magenta-700,
+ '800': $color-core-magenta-800,
+ '900': $color-core-magenta-900,
+ '1000': $color-core-magenta-1000,
+ '1100': $color-core-magenta-1100
+ ),
+ 'pink': (
+ '0': $color-core-pink-0,
+ '100': $color-core-pink-100,
+ '200': $color-core-pink-200,
+ '300': $color-core-pink-300,
+ '400': $color-core-pink-400,
+ '500': $color-core-pink-500,
+ '600': $color-core-pink-600,
+ '700': $color-core-pink-700,
+ '800': $color-core-pink-800,
+ '900': $color-core-pink-900,
+ '1000': $color-core-pink-1000,
+ '1100': $color-core-pink-1100
+ ),
+ 'red': (
+ '0': $color-core-red-0,
+ '100': $color-core-red-100,
+ '200': $color-core-red-200,
+ '300': $color-core-red-300,
+ '400': $color-core-red-400,
+ '500': $color-core-red-500,
+ '600': $color-core-red-600,
+ '700': $color-core-red-700,
+ '800': $color-core-red-800,
+ '900': $color-core-red-900,
+ '1000': $color-core-red-1000,
+ '1100': $color-core-red-1100
+ ),
+ 'orange': (
+ '0': $color-core-orange-0,
+ '100': $color-core-orange-100,
+ '200': $color-core-orange-200,
+ '300': $color-core-orange-300,
+ '400': $color-core-orange-400,
+ '500': $color-core-orange-500,
+ '600': $color-core-orange-600,
+ '700': $color-core-orange-700,
+ '800': $color-core-orange-800,
+ '900': $color-core-orange-900,
+ '1000': $color-core-orange-1000,
+ '1100': $color-core-orange-1100
+ ),
+ 'neutral': (
+ '0': $color-core-neutral-0,
+ '100': $color-core-neutral-100,
+ '200': $color-core-neutral-200,
+ '300': $color-core-neutral-300,
+ '400': $color-core-neutral-400,
+ '500': $color-core-neutral-500,
+ '600': $color-core-neutral-600,
+ '700': $color-core-neutral-700,
+ '800': $color-core-neutral-800,
+ '900': $color-core-neutral-900,
+ '1000': $color-core-neutral-1000,
+ '1100': $color-core-neutral-1100
+ ),
+ 'yellow': (
+ '0': $color-core-yellow-0,
+ '100': $color-core-yellow-100,
+ '200': $color-core-yellow-200,
+ '300': $color-core-yellow-300,
+ '400': $color-core-yellow-400,
+ '500': $color-core-yellow-500,
+ '600': $color-core-yellow-600,
+ '700': $color-core-yellow-700,
+ '800': $color-core-yellow-800,
+ '900': $color-core-yellow-900,
+ '1000': $color-core-yellow-1000,
+ '1100': $color-core-yellow-1100
+ )
+ ),
+ 'font': (
+ 'primary': $color-font-primary,
+ 'secondary': $color-font-secondary,
+ 'tertiary': $color-font-tertiary,
+ 'interactive': (
+ '_': $color-font-interactive,
+ 'hover': $color-font-interactive-hover,
+ 'active': $color-font-interactive-active,
+ 'disabled': $color-font-interactive-disabled
+ ),
+ 'danger': $color-font-danger,
+ 'warning': $color-font-warning,
+ 'success': $color-font-success
+ )
+ ),
+ 'size': (
+ 'border': (
+ 'radius': (
+ 'large': $size-border-radius-large
+ )
+ ),
+ 'font': (
+ 'small': $size-font-small,
+ 'medium': $size-font-medium,
+ 'large': $size-font-large,
+ 'xl': $size-font-xl
+ ),
+ 'padding': (
+ 'small': $size-padding-small,
+ 'medium': $size-padding-medium,
+ 'large': $size-padding-large,
+ 'xl': $size-padding-xl
+ )
+ )
+);
+"
+`;
+
+exports[`integration scss scss/map-flat should match snapshot 1`] = `
+"
+/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+$design-system-tokens: (
+ 'color-background-primary': #ffffff,
+ 'color-background-secondary': #f3f4f4,
+ 'color-background-tertiary': #dee1e1,
+ 'color-background-danger': #ffeae9,
+ 'color-background-warning': #ffede3,
+ 'color-background-success': #ebf9eb,
+ 'color-background-info': #e9f8ff,
+ 'color-background-disabled': #dee1e1,
+ 'color-border-primary': #c8cccc,
+ 'color-brand-primary': #0b8599,
+ 'color-brand-secondary': #6f5ed3,
+ 'color-core-green-0': #ebf9eb,
+ 'color-core-green-100': #d7f4d7,
+ 'color-core-green-200': #c2f2bd,
+ 'color-core-green-300': #98e58e,
+ 'color-core-green-400': #75dd66,
+ 'color-core-green-500': #59cb59,
+ 'color-core-green-600': #2bb656,
+ 'color-core-green-700': #0ca750,
+ 'color-core-green-800': #008b46,
+ 'color-core-green-900': #006b40,
+ 'color-core-green-1000': #08422f,
+ 'color-core-green-1100': #002b20,
+ 'color-core-teal-0': #e5f9f5,
+ 'color-core-teal-100': #cdf7ef,
+ 'color-core-teal-200': #b3f2e6,
+ 'color-core-teal-300': #7dead5,
+ 'color-core-teal-400': #24e0c5,
+ 'color-core-teal-500': #08c4b2,
+ 'color-core-teal-600': #00a99c,
+ 'color-core-teal-700': #0b968f,
+ 'color-core-teal-800': #067c7c,
+ 'color-core-teal-900': #026661,
+ 'color-core-teal-1000': #083f3f,
+ 'color-core-teal-1100': #002528,
+ 'color-core-aqua-0': #d9fcfb,
+ 'color-core-aqua-100': #c5f9f9,
+ 'color-core-aqua-200': #a5f2f2,
+ 'color-core-aqua-300': #76e5e2,
+ 'color-core-aqua-400': #33d6e2,
+ 'color-core-aqua-500': #17b8ce,
+ 'color-core-aqua-600': #0797ae,
+ 'color-core-aqua-700': #0b8599,
+ 'color-core-aqua-800': #0f6e84,
+ 'color-core-aqua-900': #035e73,
+ 'color-core-aqua-1000': #083d4f,
+ 'color-core-aqua-1100': #002838,
+ 'color-core-blue-0': #e9f8ff,
+ 'color-core-blue-100': #dcf2ff,
+ 'color-core-blue-200': #c7e4f9,
+ 'color-core-blue-300': #a1d2f8,
+ 'color-core-blue-400': #56adf5,
+ 'color-core-blue-500': #3896e3,
+ 'color-core-blue-600': #2b87d3,
+ 'color-core-blue-700': #2079c3,
+ 'color-core-blue-800': #116daa,
+ 'color-core-blue-900': #0c5689,
+ 'color-core-blue-1000': #0a3960,
+ 'color-core-blue-1100': #002138,
+ 'color-core-purple-0': #f2f2f9,
+ 'color-core-purple-100': #eaeaf9,
+ 'color-core-purple-200': #d8d7f9,
+ 'color-core-purple-300': #c1c1f7,
+ 'color-core-purple-400': #a193f2,
+ 'color-core-purple-500': #9180f4,
+ 'color-core-purple-600': #816fea,
+ 'color-core-purple-700': #6f5ed3,
+ 'color-core-purple-800': #5e4eba,
+ 'color-core-purple-900': #483a9c,
+ 'color-core-purple-1000': #2d246b,
+ 'color-core-purple-1100': #1d1d38,
+ 'color-core-magenta-0': #fef0ff,
+ 'color-core-magenta-100': #f9e3fc,
+ 'color-core-magenta-200': #f4c4f7,
+ 'color-core-magenta-300': #edadf2,
+ 'color-core-magenta-400': #f282f5,
+ 'color-core-magenta-500': #db61db,
+ 'color-core-magenta-600': #c44eb9,
+ 'color-core-magenta-700': #ac44a8,
+ 'color-core-magenta-800': #8f3896,
+ 'color-core-magenta-900': #6c2277,
+ 'color-core-magenta-1000': #451551,
+ 'color-core-magenta-1100': #29192d,
+ 'color-core-pink-0': #ffe9f3,
+ 'color-core-pink-100': #fcdbeb,
+ 'color-core-pink-200': #ffb5d5,
+ 'color-core-pink-300': #ff95c1,
+ 'color-core-pink-400': #ff76ae,
+ 'color-core-pink-500': #ef588b,
+ 'color-core-pink-600': #e0447c,
+ 'color-core-pink-700': #ce3665,
+ 'color-core-pink-800': #b22f5b,
+ 'color-core-pink-900': #931847,
+ 'color-core-pink-1000': #561231,
+ 'color-core-pink-1100': #2b1721,
+ 'color-core-red-0': #ffeae9,
+ 'color-core-red-100': #ffd5d2,
+ 'color-core-red-200': #ffb8b1,
+ 'color-core-red-300': #ff9c8f,
+ 'color-core-red-400': #ff7f6e,
+ 'color-core-red-500': #f76054,
+ 'color-core-red-600': #ed4c42,
+ 'color-core-red-700': #db3e3e,
+ 'color-core-red-800': #c63434,
+ 'color-core-red-900': #992222,
+ 'color-core-red-1000': #6d1313,
+ 'color-core-red-1100': #2b1111,
+ 'color-core-orange-0': #ffede3,
+ 'color-core-orange-100': #fcdccc,
+ 'color-core-orange-200': #ffc6a4,
+ 'color-core-orange-300': #ffb180,
+ 'color-core-orange-400': #ff9c5d,
+ 'color-core-orange-500': #fc8943,
+ 'color-core-orange-600': #f57d33,
+ 'color-core-orange-700': #ed7024,
+ 'color-core-orange-800': #ce5511,
+ 'color-core-orange-900': #962c0b,
+ 'color-core-orange-1000': #601700,
+ 'color-core-orange-1100': #2d130e,
+ 'color-core-neutral-0': #ffffff,
+ 'color-core-neutral-100': #f3f4f4,
+ 'color-core-neutral-200': #dee1e1,
+ 'color-core-neutral-300': #c8cccc,
+ 'color-core-neutral-400': #b0b6b7,
+ 'color-core-neutral-500': #929a9b,
+ 'color-core-neutral-600': #6e797a,
+ 'color-core-neutral-700': #515e5f,
+ 'color-core-neutral-800': #364141,
+ 'color-core-neutral-900': #273333,
+ 'color-core-neutral-1000': #162020,
+ 'color-core-neutral-1100': #040404,
+ 'color-core-yellow-0': #fff8e2,
+ 'color-core-yellow-100': #fdefcd,
+ 'color-core-yellow-200': #ffe99a,
+ 'color-core-yellow-300': #ffe16e,
+ 'color-core-yellow-400': #ffd943,
+ 'color-core-yellow-500': #ffcd1c,
+ 'color-core-yellow-600': #ffbc00,
+ 'color-core-yellow-700': #dd9903,
+ 'color-core-yellow-800': #ba7506,
+ 'color-core-yellow-900': #944c0c,
+ 'color-core-yellow-1000': #542a00,
+ 'color-core-yellow-1100': #2d1a05,
+ 'color-font-primary': #040404,
+ 'color-font-secondary': #273333,
+ 'color-font-tertiary': #364141,
+ 'color-font-interactive': #0b8599,
+ 'color-font-interactive-hover': #0b8599,
+ 'color-font-interactive-active': #6f5ed3,
+ 'color-font-interactive-disabled': #364141,
+ 'color-font-danger': #6d1313,
+ 'color-font-warning': #601700,
+ 'color-font-success': #08422f,
+ 'size-border-radius-large': 30rem,
+ 'size-font-small': 0.75rem,
+ 'size-font-medium': 1rem,
+ 'size-font-large': 1.5rem,
+ 'size-font-xl': 2.25rem,
+ 'size-padding-small': 0.5rem,
+ 'size-padding-medium': 1rem,
+ 'size-padding-large': 1rem,
+ 'size-padding-xl': 1rem
+);
+"
+`;
+
+exports[`integration scss scss/variables should match snapshot 1`] = `
+"
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+$color-background-primary: #ffffff !default;
+$color-background-secondary: #f3f4f4;
+$color-background-tertiary: #dee1e1;
+$color-background-danger: #ffeae9;
+$color-background-warning: #ffede3;
+$color-background-success: #ebf9eb;
+$color-background-info: #e9f8ff;
+$color-background-disabled: #dee1e1;
+$color-border-primary: #c8cccc;
+$color-brand-primary: #0b8599;
+$color-brand-secondary: #6f5ed3;
+$color-core-green-0: #ebf9eb;
+$color-core-green-100: #d7f4d7;
+$color-core-green-200: #c2f2bd;
+$color-core-green-300: #98e58e;
+$color-core-green-400: #75dd66;
+$color-core-green-500: #59cb59;
+$color-core-green-600: #2bb656;
+$color-core-green-700: #0ca750;
+$color-core-green-800: #008b46;
+$color-core-green-900: #006b40;
+$color-core-green-1000: #08422f;
+$color-core-green-1100: #002b20;
+$color-core-teal-0: #e5f9f5;
+$color-core-teal-100: #cdf7ef;
+$color-core-teal-200: #b3f2e6;
+$color-core-teal-300: #7dead5;
+$color-core-teal-400: #24e0c5;
+$color-core-teal-500: #08c4b2;
+$color-core-teal-600: #00a99c;
+$color-core-teal-700: #0b968f;
+$color-core-teal-800: #067c7c;
+$color-core-teal-900: #026661;
+$color-core-teal-1000: #083f3f;
+$color-core-teal-1100: #002528;
+$color-core-aqua-0: #d9fcfb;
+$color-core-aqua-100: #c5f9f9;
+$color-core-aqua-200: #a5f2f2;
+$color-core-aqua-300: #76e5e2;
+$color-core-aqua-400: #33d6e2;
+$color-core-aqua-500: #17b8ce;
+$color-core-aqua-600: #0797ae;
+$color-core-aqua-700: #0b8599;
+$color-core-aqua-800: #0f6e84;
+$color-core-aqua-900: #035e73;
+$color-core-aqua-1000: #083d4f;
+$color-core-aqua-1100: #002838;
+$color-core-blue-0: #e9f8ff;
+$color-core-blue-100: #dcf2ff;
+$color-core-blue-200: #c7e4f9;
+$color-core-blue-300: #a1d2f8;
+$color-core-blue-400: #56adf5;
+$color-core-blue-500: #3896e3;
+$color-core-blue-600: #2b87d3;
+$color-core-blue-700: #2079c3;
+$color-core-blue-800: #116daa;
+$color-core-blue-900: #0c5689;
+$color-core-blue-1000: #0a3960;
+$color-core-blue-1100: #002138;
+$color-core-purple-0: #f2f2f9;
+$color-core-purple-100: #eaeaf9;
+$color-core-purple-200: #d8d7f9;
+$color-core-purple-300: #c1c1f7;
+$color-core-purple-400: #a193f2;
+$color-core-purple-500: #9180f4;
+$color-core-purple-600: #816fea;
+$color-core-purple-700: #6f5ed3;
+$color-core-purple-800: #5e4eba;
+$color-core-purple-900: #483a9c;
+$color-core-purple-1000: #2d246b;
+$color-core-purple-1100: #1d1d38;
+$color-core-magenta-0: #fef0ff;
+$color-core-magenta-100: #f9e3fc;
+$color-core-magenta-200: #f4c4f7;
+$color-core-magenta-300: #edadf2;
+$color-core-magenta-400: #f282f5;
+$color-core-magenta-500: #db61db;
+$color-core-magenta-600: #c44eb9;
+$color-core-magenta-700: #ac44a8;
+$color-core-magenta-800: #8f3896;
+$color-core-magenta-900: #6c2277;
+$color-core-magenta-1000: #451551;
+$color-core-magenta-1100: #29192d;
+$color-core-pink-0: #ffe9f3;
+$color-core-pink-100: #fcdbeb;
+$color-core-pink-200: #ffb5d5;
+$color-core-pink-300: #ff95c1;
+$color-core-pink-400: #ff76ae;
+$color-core-pink-500: #ef588b;
+$color-core-pink-600: #e0447c;
+$color-core-pink-700: #ce3665;
+$color-core-pink-800: #b22f5b;
+$color-core-pink-900: #931847;
+$color-core-pink-1000: #561231;
+$color-core-pink-1100: #2b1721;
+$color-core-red-0: #ffeae9;
+$color-core-red-100: #ffd5d2;
+$color-core-red-200: #ffb8b1;
+$color-core-red-300: #ff9c8f;
+$color-core-red-400: #ff7f6e;
+$color-core-red-500: #f76054;
+$color-core-red-600: #ed4c42;
+$color-core-red-700: #db3e3e;
+$color-core-red-800: #c63434;
+$color-core-red-900: #992222;
+$color-core-red-1000: #6d1313;
+$color-core-red-1100: #2b1111;
+$color-core-orange-0: #ffede3;
+$color-core-orange-100: #fcdccc;
+$color-core-orange-200: #ffc6a4;
+$color-core-orange-300: #ffb180;
+$color-core-orange-400: #ff9c5d;
+$color-core-orange-500: #fc8943;
+$color-core-orange-600: #f57d33;
+$color-core-orange-700: #ed7024;
+$color-core-orange-800: #ce5511;
+$color-core-orange-900: #962c0b;
+$color-core-orange-1000: #601700;
+$color-core-orange-1100: #2d130e;
+$color-core-neutral-0: #ffffff;
+$color-core-neutral-100: #f3f4f4;
+$color-core-neutral-200: #dee1e1;
+$color-core-neutral-300: #c8cccc;
+$color-core-neutral-400: #b0b6b7;
+$color-core-neutral-500: #929a9b;
+$color-core-neutral-600: #6e797a;
+$color-core-neutral-700: #515e5f;
+$color-core-neutral-800: #364141;
+$color-core-neutral-900: #273333;
+$color-core-neutral-1000: #162020;
+$color-core-neutral-1100: #040404;
+$color-core-yellow-0: #fff8e2;
+$color-core-yellow-100: #fdefcd;
+$color-core-yellow-200: #ffe99a;
+$color-core-yellow-300: #ffe16e;
+$color-core-yellow-400: #ffd943;
+$color-core-yellow-500: #ffcd1c;
+$color-core-yellow-600: #ffbc00;
+$color-core-yellow-700: #dd9903;
+$color-core-yellow-800: #ba7506;
+$color-core-yellow-900: #944c0c;
+$color-core-yellow-1000: #542a00;
+$color-core-yellow-1100: #2d1a05;
+$color-font-primary: #040404;
+$color-font-secondary: #273333;
+$color-font-tertiary: #364141;
+$color-font-interactive: #0b8599;
+$color-font-interactive-hover: #0b8599;
+$color-font-interactive-active: #6f5ed3;
+$color-font-interactive-disabled: #364141;
+$color-font-danger: #6d1313;
+$color-font-warning: #601700;
+$color-font-success: #08422f;
+$size-border-radius-large: 30rem;
+$size-font-small: 0.75rem;
+$size-font-medium: 1rem;
+$size-font-large: 1.5rem;
+$size-font-xl: 2.25rem;
+$size-padding-small: 0.5rem;
+$size-padding-medium: 1rem;
+$size-padding-large: 1rem;
+$size-padding-xl: 1rem;"
+`;
+
+exports[`integration scss scss/variables with filter and output references should match snapshot 1`] = `
+"
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+$color-background-info: $color-core-blue-0;
+$color-background-success: $color-core-green-0;
+$color-background-warning: $color-core-orange-0;
+$color-background-danger: $color-core-red-0;
+$color-background-tertiary: $color-core-neutral-200;
+$color-background-secondary: $color-core-neutral-100;
+$color-background-primary: $color-core-neutral-0 !default;
+$color-background-disabled: $color-background-tertiary;"
+`;
+
+exports[`integration scss scss/variables with outputReferences should match snapshot 1`] = `
+"
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+$size-padding-xl: 1rem;
+$size-padding-large: 1rem;
+$size-padding-medium: 1rem;
+$size-padding-small: 0.5rem;
+$size-font-xl: 2.25rem;
+$size-font-large: 1.5rem;
+$size-font-medium: 1rem;
+$size-font-small: 0.75rem;
+$size-border-radius-large: 30rem;
+$color-core-yellow-1100: #2d1a05;
+$color-core-yellow-1000: #542a00;
+$color-core-yellow-900: #944c0c;
+$color-core-yellow-800: #ba7506;
+$color-core-yellow-700: #dd9903;
+$color-core-yellow-600: #ffbc00;
+$color-core-yellow-500: #ffcd1c;
+$color-core-yellow-400: #ffd943;
+$color-core-yellow-300: #ffe16e;
+$color-core-yellow-200: #ffe99a;
+$color-core-yellow-100: #fdefcd;
+$color-core-yellow-0: #fff8e2;
+$color-core-neutral-1100: #040404;
+$color-core-neutral-1000: #162020;
+$color-core-neutral-900: #273333;
+$color-core-neutral-800: #364141;
+$color-core-neutral-700: #515e5f;
+$color-core-neutral-600: #6e797a;
+$color-core-neutral-500: #929a9b;
+$color-core-neutral-400: #b0b6b7;
+$color-core-neutral-300: #c8cccc;
+$color-core-neutral-200: #dee1e1;
+$color-core-neutral-100: #f3f4f4;
+$color-core-neutral-0: #ffffff;
+$color-core-orange-1100: #2d130e;
+$color-core-orange-1000: #601700;
+$color-core-orange-900: #962c0b;
+$color-core-orange-800: #ce5511;
+$color-core-orange-700: #ed7024;
+$color-core-orange-600: #f57d33;
+$color-core-orange-500: #fc8943;
+$color-core-orange-400: #ff9c5d;
+$color-core-orange-300: #ffb180;
+$color-core-orange-200: #ffc6a4;
+$color-core-orange-100: #fcdccc;
+$color-core-orange-0: #ffede3;
+$color-core-red-1100: #2b1111;
+$color-core-red-1000: #6d1313;
+$color-core-red-900: #992222;
+$color-core-red-800: #c63434;
+$color-core-red-700: #db3e3e;
+$color-core-red-600: #ed4c42;
+$color-core-red-500: #f76054;
+$color-core-red-400: #ff7f6e;
+$color-core-red-300: #ff9c8f;
+$color-core-red-200: #ffb8b1;
+$color-core-red-100: #ffd5d2;
+$color-core-red-0: #ffeae9;
+$color-core-pink-1100: #2b1721;
+$color-core-pink-1000: #561231;
+$color-core-pink-900: #931847;
+$color-core-pink-800: #b22f5b;
+$color-core-pink-700: #ce3665;
+$color-core-pink-600: #e0447c;
+$color-core-pink-500: #ef588b;
+$color-core-pink-400: #ff76ae;
+$color-core-pink-300: #ff95c1;
+$color-core-pink-200: #ffb5d5;
+$color-core-pink-100: #fcdbeb;
+$color-core-pink-0: #ffe9f3;
+$color-core-magenta-1100: #29192d;
+$color-core-magenta-1000: #451551;
+$color-core-magenta-900: #6c2277;
+$color-core-magenta-800: #8f3896;
+$color-core-magenta-700: #ac44a8;
+$color-core-magenta-600: #c44eb9;
+$color-core-magenta-500: #db61db;
+$color-core-magenta-400: #f282f5;
+$color-core-magenta-300: #edadf2;
+$color-core-magenta-200: #f4c4f7;
+$color-core-magenta-100: #f9e3fc;
+$color-core-magenta-0: #fef0ff;
+$color-core-purple-1100: #1d1d38;
+$color-core-purple-1000: #2d246b;
+$color-core-purple-900: #483a9c;
+$color-core-purple-800: #5e4eba;
+$color-core-purple-700: #6f5ed3;
+$color-core-purple-600: #816fea;
+$color-core-purple-500: #9180f4;
+$color-core-purple-400: #a193f2;
+$color-core-purple-300: #c1c1f7;
+$color-core-purple-200: #d8d7f9;
+$color-core-purple-100: #eaeaf9;
+$color-core-purple-0: #f2f2f9;
+$color-core-blue-1100: #002138;
+$color-core-blue-1000: #0a3960;
+$color-core-blue-900: #0c5689;
+$color-core-blue-800: #116daa;
+$color-core-blue-700: #2079c3;
+$color-core-blue-600: #2b87d3;
+$color-core-blue-500: #3896e3;
+$color-core-blue-400: #56adf5;
+$color-core-blue-300: #a1d2f8;
+$color-core-blue-200: #c7e4f9;
+$color-core-blue-100: #dcf2ff;
+$color-core-blue-0: #e9f8ff;
+$color-core-aqua-1100: #002838;
+$color-core-aqua-1000: #083d4f;
+$color-core-aqua-900: #035e73;
+$color-core-aqua-800: #0f6e84;
+$color-core-aqua-700: #0b8599;
+$color-core-aqua-600: #0797ae;
+$color-core-aqua-500: #17b8ce;
+$color-core-aqua-400: #33d6e2;
+$color-core-aqua-300: #76e5e2;
+$color-core-aqua-200: #a5f2f2;
+$color-core-aqua-100: #c5f9f9;
+$color-core-aqua-0: #d9fcfb;
+$color-core-teal-1100: #002528;
+$color-core-teal-1000: #083f3f;
+$color-core-teal-900: #026661;
+$color-core-teal-800: #067c7c;
+$color-core-teal-700: #0b968f;
+$color-core-teal-600: #00a99c;
+$color-core-teal-500: #08c4b2;
+$color-core-teal-400: #24e0c5;
+$color-core-teal-300: #7dead5;
+$color-core-teal-200: #b3f2e6;
+$color-core-teal-100: #cdf7ef;
+$color-core-teal-0: #e5f9f5;
+$color-core-green-1100: #002b20;
+$color-core-green-1000: #08422f;
+$color-core-green-900: #006b40;
+$color-core-green-800: #008b46;
+$color-core-green-700: #0ca750;
+$color-core-green-600: #2bb656;
+$color-core-green-500: #59cb59;
+$color-core-green-400: #75dd66;
+$color-core-green-300: #98e58e;
+$color-core-green-200: #c2f2bd;
+$color-core-green-100: #d7f4d7;
+$color-core-green-0: #ebf9eb;
+$color-font-success: $color-core-green-1000;
+$color-font-warning: $color-core-orange-1000;
+$color-font-danger: $color-core-red-1000;
+$color-font-tertiary: $color-core-neutral-800;
+$color-font-secondary: $color-core-neutral-900;
+$color-font-primary: $color-core-neutral-1100;
+$color-brand-secondary: $color-core-purple-700;
+$color-brand-primary: $color-core-aqua-700;
+$color-border-primary: $color-core-neutral-300;
+$color-background-info: $color-core-blue-0;
+$color-background-success: $color-core-green-0;
+$color-background-warning: $color-core-orange-0;
+$color-background-danger: $color-core-red-0;
+$color-background-tertiary: $color-core-neutral-200;
+$color-background-secondary: $color-core-neutral-100;
+$color-background-primary: $color-core-neutral-0 !default;
+$color-font-interactive-disabled: $color-font-tertiary;
+$color-font-interactive-active: $color-brand-secondary;
+$color-font-interactive-hover: $color-brand-primary;
+$color-font-interactive: $color-brand-primary;
+$color-background-disabled: $color-background-tertiary;"
+`;
diff --git a/__integration__/__snapshots__/showFileHeader.test.js.snap b/__integration__/__snapshots__/showFileHeader.test.js.snap
new file mode 100644
index 000000000..9a1173c45
--- /dev/null
+++ b/__integration__/__snapshots__/showFileHeader.test.js.snap
@@ -0,0 +1,51 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration showFileHeader with platform options set to false should not show file header if no file options set 1`] = `
+":root {
+ --size-padding-small: 0.5rem;
+ --size-padding-medium: 1rem;
+ --size-padding-large: 1rem;
+ --size-padding-xl: 1rem;
+}
+"
+`;
+
+exports[`integration showFileHeader with platform options set to false should show file header if file options set to true 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --size-padding-small: 0.5rem;
+ --size-padding-medium: 1rem;
+ --size-padding-large: 1rem;
+ --size-padding-xl: 1rem;
+}
+"
+`;
+
+exports[`integration showFileHeader without platform options should not show file header if file options set to false 1`] = `
+":root {
+ --size-padding-small: 0.5rem;
+ --size-padding-medium: 1rem;
+ --size-padding-large: 1rem;
+ --size-padding-xl: 1rem;
+}
+"
+`;
+
+exports[`integration showFileHeader without platform options should show file header if no file options set 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+:root {
+ --size-padding-small: 0.5rem;
+ --size-padding-medium: 1rem;
+ --size-padding-large: 1rem;
+ --size-padding-xl: 1rem;
+}
+"
+`;
diff --git a/__integration__/__snapshots__/swift.test.js.snap b/__integration__/__snapshots__/swift.test.js.snap
new file mode 100644
index 000000000..6751f8fb6
--- /dev/null
+++ b/__integration__/__snapshots__/swift.test.js.snap
@@ -0,0 +1,359 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration swift ios-swift/class.swift should match snapshot 1`] = `
+"
+//
+// style_dictionary.swift
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+import UIKit
+
+public class StyleDictionary {
+ public static let colorBackgroundDanger = UIColor(red: 1.000, green: 0.918, blue: 0.914, alpha:1)
+ public static let colorBackgroundDisabled = UIColor(red: 0.871, green: 0.882, blue: 0.882, alpha:1)
+ public static let colorBackgroundInfo = UIColor(red: 0.914, green: 0.973, blue: 1.000, alpha:1)
+ public static let colorBackgroundPrimary = UIColor(red: 1.000, green: 1.000, blue: 1.000, alpha:1)
+ public static let colorBackgroundSecondary = UIColor(red: 0.953, green: 0.957, blue: 0.957, alpha:1)
+ public static let colorBackgroundSuccess = UIColor(red: 0.922, green: 0.976, blue: 0.922, alpha:1)
+ public static let colorBackgroundTertiary = UIColor(red: 0.871, green: 0.882, blue: 0.882, alpha:1)
+ public static let colorBackgroundWarning = UIColor(red: 1.000, green: 0.929, blue: 0.890, alpha:1)
+ public static let colorBorderPrimary = UIColor(red: 0.784, green: 0.800, blue: 0.800, alpha:1)
+ public static let colorBrandPrimary = UIColor(red: 0.043, green: 0.522, blue: 0.600, alpha:1)
+ public static let colorBrandSecondary = UIColor(red: 0.435, green: 0.369, blue: 0.827, alpha:1)
+ public static let colorCoreAqua0 = UIColor(red: 0.851, green: 0.988, blue: 0.984, alpha:1)
+ public static let colorCoreAqua100 = UIColor(red: 0.773, green: 0.976, blue: 0.976, alpha:1)
+ public static let colorCoreAqua1000 = UIColor(red: 0.031, green: 0.239, blue: 0.310, alpha:1)
+ public static let colorCoreAqua1100 = UIColor(red: 0.000, green: 0.157, blue: 0.220, alpha:1)
+ public static let colorCoreAqua200 = UIColor(red: 0.647, green: 0.949, blue: 0.949, alpha:1)
+ public static let colorCoreAqua300 = UIColor(red: 0.463, green: 0.898, blue: 0.886, alpha:1)
+ public static let colorCoreAqua400 = UIColor(red: 0.200, green: 0.839, blue: 0.886, alpha:1)
+ public static let colorCoreAqua500 = UIColor(red: 0.090, green: 0.722, blue: 0.808, alpha:1)
+ public static let colorCoreAqua600 = UIColor(red: 0.027, green: 0.592, blue: 0.682, alpha:1)
+ public static let colorCoreAqua700 = UIColor(red: 0.043, green: 0.522, blue: 0.600, alpha:1)
+ public static let colorCoreAqua800 = UIColor(red: 0.059, green: 0.431, blue: 0.518, alpha:1)
+ public static let colorCoreAqua900 = UIColor(red: 0.012, green: 0.369, blue: 0.451, alpha:1)
+ public static let colorCoreBlue0 = UIColor(red: 0.914, green: 0.973, blue: 1.000, alpha:1)
+ public static let colorCoreBlue100 = UIColor(red: 0.863, green: 0.949, blue: 1.000, alpha:1)
+ public static let colorCoreBlue1000 = UIColor(red: 0.039, green: 0.224, blue: 0.376, alpha:1)
+ public static let colorCoreBlue1100 = UIColor(red: 0.000, green: 0.129, blue: 0.220, alpha:1)
+ public static let colorCoreBlue200 = UIColor(red: 0.780, green: 0.894, blue: 0.976, alpha:1)
+ public static let colorCoreBlue300 = UIColor(red: 0.631, green: 0.824, blue: 0.973, alpha:1)
+ public static let colorCoreBlue400 = UIColor(red: 0.337, green: 0.678, blue: 0.961, alpha:1)
+ public static let colorCoreBlue500 = UIColor(red: 0.220, green: 0.588, blue: 0.890, alpha:1)
+ public static let colorCoreBlue600 = UIColor(red: 0.169, green: 0.529, blue: 0.827, alpha:1)
+ public static let colorCoreBlue700 = UIColor(red: 0.125, green: 0.475, blue: 0.765, alpha:1)
+ public static let colorCoreBlue800 = UIColor(red: 0.067, green: 0.427, blue: 0.667, alpha:1)
+ public static let colorCoreBlue900 = UIColor(red: 0.047, green: 0.337, blue: 0.537, alpha:1)
+ public static let colorCoreGreen0 = UIColor(red: 0.922, green: 0.976, blue: 0.922, alpha:1)
+ public static let colorCoreGreen100 = UIColor(red: 0.843, green: 0.957, blue: 0.843, alpha:1)
+ public static let colorCoreGreen1000 = UIColor(red: 0.031, green: 0.259, blue: 0.184, alpha:1)
+ public static let colorCoreGreen1100 = UIColor(red: 0.000, green: 0.169, blue: 0.125, alpha:1)
+ public static let colorCoreGreen200 = UIColor(red: 0.761, green: 0.949, blue: 0.741, alpha:1)
+ public static let colorCoreGreen300 = UIColor(red: 0.596, green: 0.898, blue: 0.557, alpha:1)
+ public static let colorCoreGreen400 = UIColor(red: 0.459, green: 0.867, blue: 0.400, alpha:1)
+ public static let colorCoreGreen500 = UIColor(red: 0.349, green: 0.796, blue: 0.349, alpha:1)
+ public static let colorCoreGreen600 = UIColor(red: 0.169, green: 0.714, blue: 0.337, alpha:1)
+ public static let colorCoreGreen700 = UIColor(red: 0.047, green: 0.655, blue: 0.314, alpha:1)
+ public static let colorCoreGreen800 = UIColor(red: 0.000, green: 0.545, blue: 0.275, alpha:1)
+ public static let colorCoreGreen900 = UIColor(red: 0.000, green: 0.420, blue: 0.251, alpha:1)
+ public static let colorCoreMagenta0 = UIColor(red: 0.996, green: 0.941, blue: 1.000, alpha:1)
+ public static let colorCoreMagenta100 = UIColor(red: 0.976, green: 0.890, blue: 0.988, alpha:1)
+ public static let colorCoreMagenta1000 = UIColor(red: 0.271, green: 0.082, blue: 0.318, alpha:1)
+ public static let colorCoreMagenta1100 = UIColor(red: 0.161, green: 0.098, blue: 0.176, alpha:1)
+ public static let colorCoreMagenta200 = UIColor(red: 0.957, green: 0.769, blue: 0.969, alpha:1)
+ public static let colorCoreMagenta300 = UIColor(red: 0.929, green: 0.678, blue: 0.949, alpha:1)
+ public static let colorCoreMagenta400 = UIColor(red: 0.949, green: 0.510, blue: 0.961, alpha:1)
+ public static let colorCoreMagenta500 = UIColor(red: 0.859, green: 0.380, blue: 0.859, alpha:1)
+ public static let colorCoreMagenta600 = UIColor(red: 0.769, green: 0.306, blue: 0.725, alpha:1)
+ public static let colorCoreMagenta700 = UIColor(red: 0.675, green: 0.267, blue: 0.659, alpha:1)
+ public static let colorCoreMagenta800 = UIColor(red: 0.561, green: 0.220, blue: 0.588, alpha:1)
+ public static let colorCoreMagenta900 = UIColor(red: 0.424, green: 0.133, blue: 0.467, alpha:1)
+ public static let colorCoreNeutral0 = UIColor(red: 1.000, green: 1.000, blue: 1.000, alpha:1)
+ public static let colorCoreNeutral100 = UIColor(red: 0.953, green: 0.957, blue: 0.957, alpha:1)
+ public static let colorCoreNeutral1000 = UIColor(red: 0.086, green: 0.125, blue: 0.125, alpha:1)
+ public static let colorCoreNeutral1100 = UIColor(red: 0.016, green: 0.016, blue: 0.016, alpha:1)
+ public static let colorCoreNeutral200 = UIColor(red: 0.871, green: 0.882, blue: 0.882, alpha:1)
+ public static let colorCoreNeutral300 = UIColor(red: 0.784, green: 0.800, blue: 0.800, alpha:1)
+ public static let colorCoreNeutral400 = UIColor(red: 0.690, green: 0.714, blue: 0.718, alpha:1)
+ public static let colorCoreNeutral500 = UIColor(red: 0.573, green: 0.604, blue: 0.608, alpha:1)
+ public static let colorCoreNeutral600 = UIColor(red: 0.431, green: 0.475, blue: 0.478, alpha:1)
+ public static let colorCoreNeutral700 = UIColor(red: 0.318, green: 0.369, blue: 0.373, alpha:1)
+ public static let colorCoreNeutral800 = UIColor(red: 0.212, green: 0.255, blue: 0.255, alpha:1)
+ public static let colorCoreNeutral900 = UIColor(red: 0.153, green: 0.200, blue: 0.200, alpha:1)
+ public static let colorCoreOrange0 = UIColor(red: 1.000, green: 0.929, blue: 0.890, alpha:1)
+ public static let colorCoreOrange100 = UIColor(red: 0.988, green: 0.863, blue: 0.800, alpha:1)
+ public static let colorCoreOrange1000 = UIColor(red: 0.376, green: 0.090, blue: 0.000, alpha:1)
+ public static let colorCoreOrange1100 = UIColor(red: 0.176, green: 0.075, blue: 0.055, alpha:1)
+ public static let colorCoreOrange200 = UIColor(red: 1.000, green: 0.776, blue: 0.643, alpha:1)
+ public static let colorCoreOrange300 = UIColor(red: 1.000, green: 0.694, blue: 0.502, alpha:1)
+ public static let colorCoreOrange400 = UIColor(red: 1.000, green: 0.612, blue: 0.365, alpha:1)
+ public static let colorCoreOrange500 = UIColor(red: 0.988, green: 0.537, blue: 0.263, alpha:1)
+ public static let colorCoreOrange600 = UIColor(red: 0.961, green: 0.490, blue: 0.200, alpha:1)
+ public static let colorCoreOrange700 = UIColor(red: 0.929, green: 0.439, blue: 0.141, alpha:1)
+ public static let colorCoreOrange800 = UIColor(red: 0.808, green: 0.333, blue: 0.067, alpha:1)
+ public static let colorCoreOrange900 = UIColor(red: 0.588, green: 0.173, blue: 0.043, alpha:1)
+ public static let colorCorePink0 = UIColor(red: 1.000, green: 0.914, blue: 0.953, alpha:1)
+ public static let colorCorePink100 = UIColor(red: 0.988, green: 0.859, blue: 0.922, alpha:1)
+ public static let colorCorePink1000 = UIColor(red: 0.337, green: 0.071, blue: 0.192, alpha:1)
+ public static let colorCorePink1100 = UIColor(red: 0.169, green: 0.090, blue: 0.129, alpha:1)
+ public static let colorCorePink200 = UIColor(red: 1.000, green: 0.710, blue: 0.835, alpha:1)
+ public static let colorCorePink300 = UIColor(red: 1.000, green: 0.584, blue: 0.757, alpha:1)
+ public static let colorCorePink400 = UIColor(red: 1.000, green: 0.463, blue: 0.682, alpha:1)
+ public static let colorCorePink500 = UIColor(red: 0.937, green: 0.345, blue: 0.545, alpha:1)
+ public static let colorCorePink600 = UIColor(red: 0.878, green: 0.267, blue: 0.486, alpha:1)
+ public static let colorCorePink700 = UIColor(red: 0.808, green: 0.212, blue: 0.396, alpha:1)
+ public static let colorCorePink800 = UIColor(red: 0.698, green: 0.184, blue: 0.357, alpha:1)
+ public static let colorCorePink900 = UIColor(red: 0.576, green: 0.094, blue: 0.278, alpha:1)
+ public static let colorCorePurple0 = UIColor(red: 0.949, green: 0.949, blue: 0.976, alpha:1)
+ public static let colorCorePurple100 = UIColor(red: 0.918, green: 0.918, blue: 0.976, alpha:1)
+ public static let colorCorePurple1000 = UIColor(red: 0.176, green: 0.141, blue: 0.420, alpha:1)
+ public static let colorCorePurple1100 = UIColor(red: 0.114, green: 0.114, blue: 0.220, alpha:1)
+ public static let colorCorePurple200 = UIColor(red: 0.847, green: 0.843, blue: 0.976, alpha:1)
+ public static let colorCorePurple300 = UIColor(red: 0.757, green: 0.757, blue: 0.969, alpha:1)
+ public static let colorCorePurple400 = UIColor(red: 0.631, green: 0.576, blue: 0.949, alpha:1)
+ public static let colorCorePurple500 = UIColor(red: 0.569, green: 0.502, blue: 0.957, alpha:1)
+ public static let colorCorePurple600 = UIColor(red: 0.506, green: 0.435, blue: 0.918, alpha:1)
+ public static let colorCorePurple700 = UIColor(red: 0.435, green: 0.369, blue: 0.827, alpha:1)
+ public static let colorCorePurple800 = UIColor(red: 0.369, green: 0.306, blue: 0.729, alpha:1)
+ public static let colorCorePurple900 = UIColor(red: 0.282, green: 0.227, blue: 0.612, alpha:1)
+ public static let colorCoreRed0 = UIColor(red: 1.000, green: 0.918, blue: 0.914, alpha:1)
+ public static let colorCoreRed100 = UIColor(red: 1.000, green: 0.835, blue: 0.824, alpha:1)
+ public static let colorCoreRed1000 = UIColor(red: 0.427, green: 0.075, blue: 0.075, alpha:1)
+ public static let colorCoreRed1100 = UIColor(red: 0.169, green: 0.067, blue: 0.067, alpha:1)
+ public static let colorCoreRed200 = UIColor(red: 1.000, green: 0.722, blue: 0.694, alpha:1)
+ public static let colorCoreRed300 = UIColor(red: 1.000, green: 0.612, blue: 0.561, alpha:1)
+ public static let colorCoreRed400 = UIColor(red: 1.000, green: 0.498, blue: 0.431, alpha:1)
+ public static let colorCoreRed500 = UIColor(red: 0.969, green: 0.376, blue: 0.329, alpha:1)
+ public static let colorCoreRed600 = UIColor(red: 0.929, green: 0.298, blue: 0.259, alpha:1)
+ public static let colorCoreRed700 = UIColor(red: 0.859, green: 0.243, blue: 0.243, alpha:1)
+ public static let colorCoreRed800 = UIColor(red: 0.776, green: 0.204, blue: 0.204, alpha:1)
+ public static let colorCoreRed900 = UIColor(red: 0.600, green: 0.133, blue: 0.133, alpha:1)
+ public static let colorCoreTeal0 = UIColor(red: 0.898, green: 0.976, blue: 0.961, alpha:1)
+ public static let colorCoreTeal100 = UIColor(red: 0.804, green: 0.969, blue: 0.937, alpha:1)
+ public static let colorCoreTeal1000 = UIColor(red: 0.031, green: 0.247, blue: 0.247, alpha:1)
+ public static let colorCoreTeal1100 = UIColor(red: 0.000, green: 0.145, blue: 0.157, alpha:1)
+ public static let colorCoreTeal200 = UIColor(red: 0.702, green: 0.949, blue: 0.902, alpha:1)
+ public static let colorCoreTeal300 = UIColor(red: 0.490, green: 0.918, blue: 0.835, alpha:1)
+ public static let colorCoreTeal400 = UIColor(red: 0.141, green: 0.878, blue: 0.773, alpha:1)
+ public static let colorCoreTeal500 = UIColor(red: 0.031, green: 0.769, blue: 0.698, alpha:1)
+ public static let colorCoreTeal600 = UIColor(red: 0.000, green: 0.663, blue: 0.612, alpha:1)
+ public static let colorCoreTeal700 = UIColor(red: 0.043, green: 0.588, blue: 0.561, alpha:1)
+ public static let colorCoreTeal800 = UIColor(red: 0.024, green: 0.486, blue: 0.486, alpha:1)
+ public static let colorCoreTeal900 = UIColor(red: 0.008, green: 0.400, blue: 0.380, alpha:1)
+ public static let colorCoreYellow0 = UIColor(red: 1.000, green: 0.973, blue: 0.886, alpha:1)
+ public static let colorCoreYellow100 = UIColor(red: 0.992, green: 0.937, blue: 0.804, alpha:1)
+ public static let colorCoreYellow1000 = UIColor(red: 0.329, green: 0.165, blue: 0.000, alpha:1)
+ public static let colorCoreYellow1100 = UIColor(red: 0.176, green: 0.102, blue: 0.020, alpha:1)
+ public static let colorCoreYellow200 = UIColor(red: 1.000, green: 0.914, blue: 0.604, alpha:1)
+ public static let colorCoreYellow300 = UIColor(red: 1.000, green: 0.882, blue: 0.431, alpha:1)
+ public static let colorCoreYellow400 = UIColor(red: 1.000, green: 0.851, blue: 0.263, alpha:1)
+ public static let colorCoreYellow500 = UIColor(red: 1.000, green: 0.804, blue: 0.110, alpha:1)
+ public static let colorCoreYellow600 = UIColor(red: 1.000, green: 0.737, blue: 0.000, alpha:1)
+ public static let colorCoreYellow700 = UIColor(red: 0.867, green: 0.600, blue: 0.012, alpha:1)
+ public static let colorCoreYellow800 = UIColor(red: 0.729, green: 0.459, blue: 0.024, alpha:1)
+ public static let colorCoreYellow900 = UIColor(red: 0.580, green: 0.298, blue: 0.047, alpha:1)
+ public static let colorFontDanger = UIColor(red: 0.427, green: 0.075, blue: 0.075, alpha:1)
+ public static let colorFontInteractive = UIColor(red: 0.043, green: 0.522, blue: 0.600, alpha:1)
+ public static let colorFontInteractiveActive = UIColor(red: 0.435, green: 0.369, blue: 0.827, alpha:1)
+ public static let colorFontInteractiveDisabled = UIColor(red: 0.212, green: 0.255, blue: 0.255, alpha:1)
+ public static let colorFontInteractiveHover = UIColor(red: 0.043, green: 0.522, blue: 0.600, alpha:1)
+ public static let colorFontPrimary = UIColor(red: 0.016, green: 0.016, blue: 0.016, alpha:1)
+ public static let colorFontSecondary = UIColor(red: 0.153, green: 0.200, blue: 0.200, alpha:1)
+ public static let colorFontSuccess = UIColor(red: 0.031, green: 0.259, blue: 0.184, alpha:1)
+ public static let colorFontTertiary = UIColor(red: 0.212, green: 0.255, blue: 0.255, alpha:1)
+ public static let colorFontWarning = UIColor(red: 0.376, green: 0.090, blue: 0.000, alpha:1)
+ public static let sizeBorderRadiusLarge = CGFloat(480.00)
+ public static let sizeFontLarge = CGFloat(24.00)
+ public static let sizeFontMedium = CGFloat(16.00)
+ public static let sizeFontSmall = CGFloat(12.00)
+ public static let sizeFontXl = CGFloat(36.00)
+ public static let sizePaddingLarge = CGFloat(16.00)
+ public static let sizePaddingMedium = CGFloat(16.00)
+ public static let sizePaddingSmall = CGFloat(8.00)
+ public static let sizePaddingXl = CGFloat(16.00)
+}
+"
+`;
+
+exports[`integration swift ios-swift/class.swift with references should match snapshot 1`] = `
+"
+//
+// style_dictionary_with_references.swift
+//
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+import UIKit
+
+public class StyleDictionary {
+ public static let sizePaddingXl = CGFloat(16.00)
+ public static let sizePaddingLarge = CGFloat(16.00)
+ public static let sizePaddingMedium = CGFloat(16.00)
+ public static let sizePaddingSmall = CGFloat(8.00)
+ public static let sizeFontXl = CGFloat(36.00)
+ public static let sizeFontLarge = CGFloat(24.00)
+ public static let sizeFontMedium = CGFloat(16.00)
+ public static let sizeFontSmall = CGFloat(12.00)
+ public static let sizeBorderRadiusLarge = CGFloat(480.00)
+ public static let colorCoreYellow1100 = UIColor(red: 0.176, green: 0.102, blue: 0.020, alpha:1)
+ public static let colorCoreYellow1000 = UIColor(red: 0.329, green: 0.165, blue: 0.000, alpha:1)
+ public static let colorCoreYellow900 = UIColor(red: 0.580, green: 0.298, blue: 0.047, alpha:1)
+ public static let colorCoreYellow800 = UIColor(red: 0.729, green: 0.459, blue: 0.024, alpha:1)
+ public static let colorCoreYellow700 = UIColor(red: 0.867, green: 0.600, blue: 0.012, alpha:1)
+ public static let colorCoreYellow600 = UIColor(red: 1.000, green: 0.737, blue: 0.000, alpha:1)
+ public static let colorCoreYellow500 = UIColor(red: 1.000, green: 0.804, blue: 0.110, alpha:1)
+ public static let colorCoreYellow400 = UIColor(red: 1.000, green: 0.851, blue: 0.263, alpha:1)
+ public static let colorCoreYellow300 = UIColor(red: 1.000, green: 0.882, blue: 0.431, alpha:1)
+ public static let colorCoreYellow200 = UIColor(red: 1.000, green: 0.914, blue: 0.604, alpha:1)
+ public static let colorCoreYellow100 = UIColor(red: 0.992, green: 0.937, blue: 0.804, alpha:1)
+ public static let colorCoreYellow0 = UIColor(red: 1.000, green: 0.973, blue: 0.886, alpha:1)
+ public static let colorCoreNeutral1100 = UIColor(red: 0.016, green: 0.016, blue: 0.016, alpha:1)
+ public static let colorCoreNeutral1000 = UIColor(red: 0.086, green: 0.125, blue: 0.125, alpha:1)
+ public static let colorCoreNeutral900 = UIColor(red: 0.153, green: 0.200, blue: 0.200, alpha:1)
+ public static let colorCoreNeutral800 = UIColor(red: 0.212, green: 0.255, blue: 0.255, alpha:1)
+ public static let colorCoreNeutral700 = UIColor(red: 0.318, green: 0.369, blue: 0.373, alpha:1)
+ public static let colorCoreNeutral600 = UIColor(red: 0.431, green: 0.475, blue: 0.478, alpha:1)
+ public static let colorCoreNeutral500 = UIColor(red: 0.573, green: 0.604, blue: 0.608, alpha:1)
+ public static let colorCoreNeutral400 = UIColor(red: 0.690, green: 0.714, blue: 0.718, alpha:1)
+ public static let colorCoreNeutral300 = UIColor(red: 0.784, green: 0.800, blue: 0.800, alpha:1)
+ public static let colorCoreNeutral200 = UIColor(red: 0.871, green: 0.882, blue: 0.882, alpha:1)
+ public static let colorCoreNeutral100 = UIColor(red: 0.953, green: 0.957, blue: 0.957, alpha:1)
+ public static let colorCoreNeutral0 = UIColor(red: 1.000, green: 1.000, blue: 1.000, alpha:1)
+ public static let colorCoreOrange1100 = UIColor(red: 0.176, green: 0.075, blue: 0.055, alpha:1)
+ public static let colorCoreOrange1000 = UIColor(red: 0.376, green: 0.090, blue: 0.000, alpha:1)
+ public static let colorCoreOrange900 = UIColor(red: 0.588, green: 0.173, blue: 0.043, alpha:1)
+ public static let colorCoreOrange800 = UIColor(red: 0.808, green: 0.333, blue: 0.067, alpha:1)
+ public static let colorCoreOrange700 = UIColor(red: 0.929, green: 0.439, blue: 0.141, alpha:1)
+ public static let colorCoreOrange600 = UIColor(red: 0.961, green: 0.490, blue: 0.200, alpha:1)
+ public static let colorCoreOrange500 = UIColor(red: 0.988, green: 0.537, blue: 0.263, alpha:1)
+ public static let colorCoreOrange400 = UIColor(red: 1.000, green: 0.612, blue: 0.365, alpha:1)
+ public static let colorCoreOrange300 = UIColor(red: 1.000, green: 0.694, blue: 0.502, alpha:1)
+ public static let colorCoreOrange200 = UIColor(red: 1.000, green: 0.776, blue: 0.643, alpha:1)
+ public static let colorCoreOrange100 = UIColor(red: 0.988, green: 0.863, blue: 0.800, alpha:1)
+ public static let colorCoreOrange0 = UIColor(red: 1.000, green: 0.929, blue: 0.890, alpha:1)
+ public static let colorCoreRed1100 = UIColor(red: 0.169, green: 0.067, blue: 0.067, alpha:1)
+ public static let colorCoreRed1000 = UIColor(red: 0.427, green: 0.075, blue: 0.075, alpha:1)
+ public static let colorCoreRed900 = UIColor(red: 0.600, green: 0.133, blue: 0.133, alpha:1)
+ public static let colorCoreRed800 = UIColor(red: 0.776, green: 0.204, blue: 0.204, alpha:1)
+ public static let colorCoreRed700 = UIColor(red: 0.859, green: 0.243, blue: 0.243, alpha:1)
+ public static let colorCoreRed600 = UIColor(red: 0.929, green: 0.298, blue: 0.259, alpha:1)
+ public static let colorCoreRed500 = UIColor(red: 0.969, green: 0.376, blue: 0.329, alpha:1)
+ public static let colorCoreRed400 = UIColor(red: 1.000, green: 0.498, blue: 0.431, alpha:1)
+ public static let colorCoreRed300 = UIColor(red: 1.000, green: 0.612, blue: 0.561, alpha:1)
+ public static let colorCoreRed200 = UIColor(red: 1.000, green: 0.722, blue: 0.694, alpha:1)
+ public static let colorCoreRed100 = UIColor(red: 1.000, green: 0.835, blue: 0.824, alpha:1)
+ public static let colorCoreRed0 = UIColor(red: 1.000, green: 0.918, blue: 0.914, alpha:1)
+ public static let colorCorePink1100 = UIColor(red: 0.169, green: 0.090, blue: 0.129, alpha:1)
+ public static let colorCorePink1000 = UIColor(red: 0.337, green: 0.071, blue: 0.192, alpha:1)
+ public static let colorCorePink900 = UIColor(red: 0.576, green: 0.094, blue: 0.278, alpha:1)
+ public static let colorCorePink800 = UIColor(red: 0.698, green: 0.184, blue: 0.357, alpha:1)
+ public static let colorCorePink700 = UIColor(red: 0.808, green: 0.212, blue: 0.396, alpha:1)
+ public static let colorCorePink600 = UIColor(red: 0.878, green: 0.267, blue: 0.486, alpha:1)
+ public static let colorCorePink500 = UIColor(red: 0.937, green: 0.345, blue: 0.545, alpha:1)
+ public static let colorCorePink400 = UIColor(red: 1.000, green: 0.463, blue: 0.682, alpha:1)
+ public static let colorCorePink300 = UIColor(red: 1.000, green: 0.584, blue: 0.757, alpha:1)
+ public static let colorCorePink200 = UIColor(red: 1.000, green: 0.710, blue: 0.835, alpha:1)
+ public static let colorCorePink100 = UIColor(red: 0.988, green: 0.859, blue: 0.922, alpha:1)
+ public static let colorCorePink0 = UIColor(red: 1.000, green: 0.914, blue: 0.953, alpha:1)
+ public static let colorCoreMagenta1100 = UIColor(red: 0.161, green: 0.098, blue: 0.176, alpha:1)
+ public static let colorCoreMagenta1000 = UIColor(red: 0.271, green: 0.082, blue: 0.318, alpha:1)
+ public static let colorCoreMagenta900 = UIColor(red: 0.424, green: 0.133, blue: 0.467, alpha:1)
+ public static let colorCoreMagenta800 = UIColor(red: 0.561, green: 0.220, blue: 0.588, alpha:1)
+ public static let colorCoreMagenta700 = UIColor(red: 0.675, green: 0.267, blue: 0.659, alpha:1)
+ public static let colorCoreMagenta600 = UIColor(red: 0.769, green: 0.306, blue: 0.725, alpha:1)
+ public static let colorCoreMagenta500 = UIColor(red: 0.859, green: 0.380, blue: 0.859, alpha:1)
+ public static let colorCoreMagenta400 = UIColor(red: 0.949, green: 0.510, blue: 0.961, alpha:1)
+ public static let colorCoreMagenta300 = UIColor(red: 0.929, green: 0.678, blue: 0.949, alpha:1)
+ public static let colorCoreMagenta200 = UIColor(red: 0.957, green: 0.769, blue: 0.969, alpha:1)
+ public static let colorCoreMagenta100 = UIColor(red: 0.976, green: 0.890, blue: 0.988, alpha:1)
+ public static let colorCoreMagenta0 = UIColor(red: 0.996, green: 0.941, blue: 1.000, alpha:1)
+ public static let colorCorePurple1100 = UIColor(red: 0.114, green: 0.114, blue: 0.220, alpha:1)
+ public static let colorCorePurple1000 = UIColor(red: 0.176, green: 0.141, blue: 0.420, alpha:1)
+ public static let colorCorePurple900 = UIColor(red: 0.282, green: 0.227, blue: 0.612, alpha:1)
+ public static let colorCorePurple800 = UIColor(red: 0.369, green: 0.306, blue: 0.729, alpha:1)
+ public static let colorCorePurple700 = UIColor(red: 0.435, green: 0.369, blue: 0.827, alpha:1)
+ public static let colorCorePurple600 = UIColor(red: 0.506, green: 0.435, blue: 0.918, alpha:1)
+ public static let colorCorePurple500 = UIColor(red: 0.569, green: 0.502, blue: 0.957, alpha:1)
+ public static let colorCorePurple400 = UIColor(red: 0.631, green: 0.576, blue: 0.949, alpha:1)
+ public static let colorCorePurple300 = UIColor(red: 0.757, green: 0.757, blue: 0.969, alpha:1)
+ public static let colorCorePurple200 = UIColor(red: 0.847, green: 0.843, blue: 0.976, alpha:1)
+ public static let colorCorePurple100 = UIColor(red: 0.918, green: 0.918, blue: 0.976, alpha:1)
+ public static let colorCorePurple0 = UIColor(red: 0.949, green: 0.949, blue: 0.976, alpha:1)
+ public static let colorCoreBlue1100 = UIColor(red: 0.000, green: 0.129, blue: 0.220, alpha:1)
+ public static let colorCoreBlue1000 = UIColor(red: 0.039, green: 0.224, blue: 0.376, alpha:1)
+ public static let colorCoreBlue900 = UIColor(red: 0.047, green: 0.337, blue: 0.537, alpha:1)
+ public static let colorCoreBlue800 = UIColor(red: 0.067, green: 0.427, blue: 0.667, alpha:1)
+ public static let colorCoreBlue700 = UIColor(red: 0.125, green: 0.475, blue: 0.765, alpha:1)
+ public static let colorCoreBlue600 = UIColor(red: 0.169, green: 0.529, blue: 0.827, alpha:1)
+ public static let colorCoreBlue500 = UIColor(red: 0.220, green: 0.588, blue: 0.890, alpha:1)
+ public static let colorCoreBlue400 = UIColor(red: 0.337, green: 0.678, blue: 0.961, alpha:1)
+ public static let colorCoreBlue300 = UIColor(red: 0.631, green: 0.824, blue: 0.973, alpha:1)
+ public static let colorCoreBlue200 = UIColor(red: 0.780, green: 0.894, blue: 0.976, alpha:1)
+ public static let colorCoreBlue100 = UIColor(red: 0.863, green: 0.949, blue: 1.000, alpha:1)
+ public static let colorCoreBlue0 = UIColor(red: 0.914, green: 0.973, blue: 1.000, alpha:1)
+ public static let colorCoreAqua1100 = UIColor(red: 0.000, green: 0.157, blue: 0.220, alpha:1)
+ public static let colorCoreAqua1000 = UIColor(red: 0.031, green: 0.239, blue: 0.310, alpha:1)
+ public static let colorCoreAqua900 = UIColor(red: 0.012, green: 0.369, blue: 0.451, alpha:1)
+ public static let colorCoreAqua800 = UIColor(red: 0.059, green: 0.431, blue: 0.518, alpha:1)
+ public static let colorCoreAqua700 = UIColor(red: 0.043, green: 0.522, blue: 0.600, alpha:1)
+ public static let colorCoreAqua600 = UIColor(red: 0.027, green: 0.592, blue: 0.682, alpha:1)
+ public static let colorCoreAqua500 = UIColor(red: 0.090, green: 0.722, blue: 0.808, alpha:1)
+ public static let colorCoreAqua400 = UIColor(red: 0.200, green: 0.839, blue: 0.886, alpha:1)
+ public static let colorCoreAqua300 = UIColor(red: 0.463, green: 0.898, blue: 0.886, alpha:1)
+ public static let colorCoreAqua200 = UIColor(red: 0.647, green: 0.949, blue: 0.949, alpha:1)
+ public static let colorCoreAqua100 = UIColor(red: 0.773, green: 0.976, blue: 0.976, alpha:1)
+ public static let colorCoreAqua0 = UIColor(red: 0.851, green: 0.988, blue: 0.984, alpha:1)
+ public static let colorCoreTeal1100 = UIColor(red: 0.000, green: 0.145, blue: 0.157, alpha:1)
+ public static let colorCoreTeal1000 = UIColor(red: 0.031, green: 0.247, blue: 0.247, alpha:1)
+ public static let colorCoreTeal900 = UIColor(red: 0.008, green: 0.400, blue: 0.380, alpha:1)
+ public static let colorCoreTeal800 = UIColor(red: 0.024, green: 0.486, blue: 0.486, alpha:1)
+ public static let colorCoreTeal700 = UIColor(red: 0.043, green: 0.588, blue: 0.561, alpha:1)
+ public static let colorCoreTeal600 = UIColor(red: 0.000, green: 0.663, blue: 0.612, alpha:1)
+ public static let colorCoreTeal500 = UIColor(red: 0.031, green: 0.769, blue: 0.698, alpha:1)
+ public static let colorCoreTeal400 = UIColor(red: 0.141, green: 0.878, blue: 0.773, alpha:1)
+ public static let colorCoreTeal300 = UIColor(red: 0.490, green: 0.918, blue: 0.835, alpha:1)
+ public static let colorCoreTeal200 = UIColor(red: 0.702, green: 0.949, blue: 0.902, alpha:1)
+ public static let colorCoreTeal100 = UIColor(red: 0.804, green: 0.969, blue: 0.937, alpha:1)
+ public static let colorCoreTeal0 = UIColor(red: 0.898, green: 0.976, blue: 0.961, alpha:1)
+ public static let colorCoreGreen1100 = UIColor(red: 0.000, green: 0.169, blue: 0.125, alpha:1)
+ public static let colorCoreGreen1000 = UIColor(red: 0.031, green: 0.259, blue: 0.184, alpha:1)
+ public static let colorCoreGreen900 = UIColor(red: 0.000, green: 0.420, blue: 0.251, alpha:1)
+ public static let colorCoreGreen800 = UIColor(red: 0.000, green: 0.545, blue: 0.275, alpha:1)
+ public static let colorCoreGreen700 = UIColor(red: 0.047, green: 0.655, blue: 0.314, alpha:1)
+ public static let colorCoreGreen600 = UIColor(red: 0.169, green: 0.714, blue: 0.337, alpha:1)
+ public static let colorCoreGreen500 = UIColor(red: 0.349, green: 0.796, blue: 0.349, alpha:1)
+ public static let colorCoreGreen400 = UIColor(red: 0.459, green: 0.867, blue: 0.400, alpha:1)
+ public static let colorCoreGreen300 = UIColor(red: 0.596, green: 0.898, blue: 0.557, alpha:1)
+ public static let colorCoreGreen200 = UIColor(red: 0.761, green: 0.949, blue: 0.741, alpha:1)
+ public static let colorCoreGreen100 = UIColor(red: 0.843, green: 0.957, blue: 0.843, alpha:1)
+ public static let colorCoreGreen0 = UIColor(red: 0.922, green: 0.976, blue: 0.922, alpha:1)
+ public static let colorFontSuccess = colorCoreGreen1000
+ public static let colorFontWarning = colorCoreOrange1000
+ public static let colorFontDanger = colorCoreRed1000
+ public static let colorFontTertiary = colorCoreNeutral800
+ public static let colorFontSecondary = colorCoreNeutral900
+ public static let colorFontPrimary = colorCoreNeutral1100
+ public static let colorBrandSecondary = colorCorePurple700
+ public static let colorBrandPrimary = colorCoreAqua700
+ public static let colorBorderPrimary = colorCoreNeutral300
+ public static let colorBackgroundInfo = colorCoreBlue0
+ public static let colorBackgroundSuccess = colorCoreGreen0
+ public static let colorBackgroundWarning = colorCoreOrange0
+ public static let colorBackgroundDanger = colorCoreRed0
+ public static let colorBackgroundTertiary = colorCoreNeutral200
+ public static let colorBackgroundSecondary = colorCoreNeutral100
+ public static let colorBackgroundPrimary = colorCoreNeutral0
+ public static let colorFontInteractiveDisabled = colorFontTertiary
+ public static let colorFontInteractiveActive = colorBrandSecondary
+ public static let colorFontInteractiveHover = colorBrandPrimary
+ public static let colorFontInteractive = colorBrandPrimary
+ public static let colorBackgroundDisabled = colorBackgroundTertiary
+}
+"
+`;
diff --git a/__integration__/_constants.js b/__integration__/_constants.js
new file mode 100644
index 000000000..6bdb7c823
--- /dev/null
+++ b/__integration__/_constants.js
@@ -0,0 +1,10 @@
+module.exports = {
+ buildPath: `__integration__/build/`,
+ cleanConsoleOutput: (str) => {
+ const arr = str.split(`\n`)
+ // Remove ANSI stuff from the console output so we get human-readable strings
+ // https://github.com/chalk/ansi-regex/blob/main/index.js#L3
+ .map(s => s.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,'').trim());
+ return arr.join(`\n`)
+ }
+}
\ No newline at end of file
diff --git a/__integration__/android.test.js b/__integration__/android.test.js
new file mode 100644
index 000000000..83f0d2c8b
--- /dev/null
+++ b/__integration__/android.test.js
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe('integration', () => {
+ describe('android', () => {
+ StyleDictionary.extend({
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ android: {
+ transformGroup: `android`,
+ buildPath,
+ files: [{
+ destination: `resources.xml`,
+ format: `android/resources`
+ },{
+ destination: `resourcesWithReferences.xml`,
+ format: `android/resources`,
+ options: {
+ outputReferences: true
+ }
+ },{
+ destination: `colors.xml`,
+ format: `android/resources`,
+ filter: {
+ attributes: { category: `color` }
+ }
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+
+ describe(`android/resources`, () => {
+ const output = fs.readFileSync(`${buildPath}resources.xml`, {encoding:'UTF-8'});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ describe(`with references`, () => {
+ const output = fs.readFileSync(`${buildPath}resourcesWithReferences.xml`, {encoding:'UTF-8'});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ });
+
+ describe(`with filter`, () => {
+ const output = fs.readFileSync(`${buildPath}colors.xml`, {encoding:'UTF-8'});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/compose.test.js b/__integration__/compose.test.js
new file mode 100644
index 000000000..6a6b88979
--- /dev/null
+++ b/__integration__/compose.test.js
@@ -0,0 +1,65 @@
+/*
+ * Copyright Target Corporation. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe('integration', () => {
+ describe('compose', () => {
+ StyleDictionary.extend({
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ compose: {
+ transformGroup: `compose`,
+ buildPath,
+ files: [{
+ destination: "StyleDictionary.kt",
+ format: "compose/object",
+ className: "StyleDictionary",
+ packageName: "com.example.tokens"
+ },{
+ destination: "StyleDictionaryWithReferences.kt",
+ format: "compose/object",
+ className: "StyleDictionary",
+ packageName: "com.example.tokens",
+ options: {
+ outputReferences: true
+ }
+ }]
+ },
+ }
+ }).buildAllPlatforms();
+
+ describe(`compose/object`, () => {
+ const output = fs.readFileSync(`${buildPath}StyleDictionary.kt`, {encoding:`UTF-8`});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ describe(`with references`, () => {
+ const output = fs.readFileSync(`${buildPath}StyleDictionaryWithReferences.kt`, {encoding:`UTF-8`});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ });
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/css.test.js b/__integration__/css.test.js
new file mode 100644
index 000000000..cfc4dd50f
--- /dev/null
+++ b/__integration__/css.test.js
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe('integration', () => {
+ describe('css', () => {
+ StyleDictionary.extend({
+ source: [`__integration__/tokens/**/*.json`],
+ // Testing proper string interpolation with multiple references here.
+ // This is a CSS/web-specific thing so only including them in this
+ // integration test.
+ properties: {
+ breakpoint: {
+ xs: { value: "304px" },
+ sm: { value: "768px" },
+ md: { value: "calc({breakpoint.xs.value} / {breakpoint.sm.value})"}
+ }
+ },
+ platforms: {
+ css: {
+ transformGroup: 'css',
+ buildPath,
+ files: [{
+ destination: 'variables.css',
+ format: 'css/variables'
+ },{
+ destination: 'variablesWithReferences.css',
+ format: 'css/variables',
+ options: {
+ outputReferences: true
+ }
+ },{
+ destination: 'variablesWithSelector.css',
+ format: 'css/variables',
+ options: {
+ selector: '.test'
+ }
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+
+ describe('css/variables', () => {
+ const output = fs.readFileSync(`${buildPath}variables.css`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ describe(`with references`, () => {
+ const output = fs.readFileSync(`${buildPath}variablesWithReferences.css`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+
+ describe(`with selector`, () => {
+ const output = fs.readFileSync(`${buildPath}variablesWithSelector.css`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+
+ // TODO: add css validator
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/customFileHeader.test.js b/__integration__/customFileHeader.test.js
new file mode 100644
index 000000000..733e0a311
--- /dev/null
+++ b/__integration__/customFileHeader.test.js
@@ -0,0 +1,156 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe(`integration`, () => {
+ describe(`valid custom file headers`, () => {
+ // Adding a custom file header with the `.registerFileHeader`
+ StyleDictionary.registerFileHeader({
+ name: `registeredFileHeader`,
+ fileHeader: (defaultMessage) => {
+ return [
+ `hello`,
+ ...defaultMessage
+ ]
+ }
+ });
+
+ StyleDictionary.extend({
+ fileHeader: {
+ configFileHeader: (defaultMessage) => {
+ return [
+ ...defaultMessage,
+ 'hello, world!'
+ ];
+ }
+ },
+
+ // only testing the file header in these tests so we are
+ // using a small properties object with a single token
+ properties: {
+ color: {
+ red: { value: '#ff0000' }
+ }
+ },
+
+ platforms: {
+ css: {
+ transformGroup: `css`,
+ buildPath,
+ files: [{
+ destination: `registeredFileHeader.css`,
+ format: `css/variables`,
+ options: {
+ fileHeader: `registeredFileHeader`
+ }
+ },{
+ destination: `configFileHeader.css`,
+ format: `css/variables`,
+ options: {
+ fileHeader: `configFileHeader`
+ }
+ },{
+ destination: `inlineFileHeader.css`,
+ format: `css/variables`,
+ options: {
+ fileHeader: () => {
+ return [
+ `build version 1.0.0`
+ ]
+ }
+ }
+ }]
+ },
+ js: {
+ transformGroup: `js`,
+ buildPath,
+ options: {
+ fileHeader: `configFileHeader`
+ },
+ files: [{
+ destination: `noOptions.js`,
+ format: `javascript/module`
+ },{
+ destination: `showFileHeader.js`,
+ format: `javascript/module`,
+ options: {
+ showFileHeader: false
+ }
+ },{
+ destination: `fileHeaderOverride.js`,
+ format: `javascript/module`,
+ options: {
+ fileHeader: () => [`Header overridden`]
+ }
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+
+ describe('file options', () => {
+ it(`registered file header should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}registeredFileHeader.css`, {encoding:'UTF-8'});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`config file header should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}configFileHeader.css`, {encoding:'UTF-8'});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`inline file header should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}inlineFileHeader.css`, {encoding:'UTF-8'});
+ expect(output).toMatchSnapshot();
+ });
+ });
+
+ describe('platform options', () => {
+ it(`no file options should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}noOptions.js`, {encoding:'UTF-8'});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`showFileHeader should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}showFileHeader.js`, {encoding:'UTF-8'});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`file header override should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}fileHeaderOverride.js`, {encoding:'UTF-8'});
+ expect(output).toMatchSnapshot();
+ });
+ });
+ });
+ describe(`invalid custom file headers`, () => {
+ it(`should throw if trying to use an undefined file header`, () => {
+ expect(() => {
+ StyleDictionary.extend({
+ platforms: {
+ css: {
+ buildPath,
+ files: [{
+ destination: `variables.css`,
+ options: {
+ fileHeader: `nonexistentFileHeader`
+ }
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+ }).toThrow(`Can't find fileHeader: nonexistentFileHeader`);
+ });
+ });
+});
diff --git a/__integration__/customFormats.test.js b/__integration__/customFormats.test.js
new file mode 100644
index 000000000..c63493b54
--- /dev/null
+++ b/__integration__/customFormats.test.js
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe('integration', () => {
+ describe('custom formats', () => {
+ const styleDictionary = StyleDictionary.extend({
+ source: [`__integration__/tokens/size/padding.json`],
+ // Adding formats directly to SD
+ format: {
+ inlineCustomFormatWithOldArgs: (dictionary, platform, file) => {
+ return JSON.stringify({dictionary, platform, file}, null, 2);
+ },
+ inlineCustomFormatWithNewArgs: (opts) => {
+ return JSON.stringify(opts, null, 2);
+ },
+ },
+ platforms: {
+ inlineCustomFormats: {
+ transformGroup: 'js',
+ buildPath,
+ options: {
+ otherOption: `platform option`
+ },
+ files: [{
+ destination: 'inlineCustomFormatWithOldArgs.json',
+ format: 'inlineCustomFormatWithOldArgs',
+ options: {
+ showFileHeader: true,
+ otherOption: 'Test'
+ }
+ },{
+ destination: 'inlineCustomFormatWithNewArgs.json',
+ format: 'inlineCustomFormatWithNewArgs',
+ options: {
+ showFileHeader: true,
+ otherOption: 'Test'
+ }
+ }]
+ },
+ customFormats: {
+ transformGroup: 'js',
+ buildPath,
+ options: {
+ otherOption: `platform option`
+ },
+ files: [{
+ destination: 'registerCustomFormatWithOldArgs.json',
+ format: 'registerCustomFormatWithOldArgs',
+ options: {
+ showFileHeader: true,
+ otherOption: 'Test'
+ }
+ },{
+ destination: 'registerCustomFormatWithNewArgs.json',
+ format: 'registerCustomFormatWithNewArgs',
+ options: {
+ showFileHeader: true,
+ otherOption: 'Test'
+ }
+ }]
+ }
+ }
+ });
+
+ styleDictionary.registerFormat({
+ name: 'registerCustomFormatWithOldArgs',
+ formatter: (dictionary, platform, file) => {
+ return JSON.stringify({dictionary, platform, file}, null, 2);
+ }
+ });
+
+ styleDictionary.registerFormat({
+ name: 'registerCustomFormatWithNewArgs',
+ formatter: (opts) => {
+ return JSON.stringify(opts, null, 2);
+ }
+ });
+
+ styleDictionary.buildAllPlatforms();
+
+ describe(`inline custom with old args`, () => {
+ const output = fs.readFileSync(`${buildPath}inlineCustomFormatWithOldArgs.json`, {encoding:'UTF-8'});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`should receive proper arguments`, () => {
+ const { dictionary, platform, file } = JSON.parse(output);
+ expect(dictionary).toHaveProperty(`properties`);
+ expect(dictionary).toHaveProperty(`allProperties`);
+ expect(platform).toHaveProperty(`options.otherOption`, `platform option`);
+ expect(file).toHaveProperty(`options.otherOption`, `Test`);
+ });
+ });
+
+ describe(`inline custom with new args`, () => {
+ const output = fs.readFileSync(`${buildPath}inlineCustomFormatWithNewArgs.json`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`should receive proper arguments`, () => {
+ const { dictionary, platform, file, options } = JSON.parse(output);
+ expect(dictionary).toHaveProperty(`properties`);
+ expect(dictionary).toHaveProperty(`allProperties`);
+ expect(platform).toHaveProperty(`options.otherOption`, `platform option`);
+ expect(file).toHaveProperty(`options.otherOption`, `Test`);
+ expect(options).toHaveProperty(`otherOption`, `Test`);
+ });
+ });
+
+
+ describe(`register custom format with old args`, () => {
+ const output = fs.readFileSync(`${buildPath}registerCustomFormatWithOldArgs.json`, {encoding:'UTF-8'});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`should receive proper arguments`, () => {
+ const { dictionary, platform, file } = JSON.parse(output);
+ expect(dictionary).toHaveProperty(`properties`);
+ expect(dictionary).toHaveProperty(`allProperties`);
+ expect(platform).toHaveProperty(`options.otherOption`, `platform option`);
+ expect(file).toHaveProperty(`options.otherOption`, `Test`);
+ });
+ });
+
+ describe(`register custom format with new args`, () => {
+ const output = fs.readFileSync(`${buildPath}registerCustomFormatWithNewArgs.json`, {encoding:'UTF-8'});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`should receive proper arguments`, () => {
+ const { dictionary, platform, file, options } = JSON.parse(output);
+ expect(dictionary).toHaveProperty(`properties`);
+ expect(dictionary).toHaveProperty(`allProperties`);
+ expect(platform).toHaveProperty(`options.otherOption`, `platform option`);
+ expect(file).toHaveProperty(`options.otherOption`, `Test`);
+ expect(options).toHaveProperty(`otherOption`, `Test`);
+ });
+ });
+
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/flutter.test.js b/__integration__/flutter.test.js
new file mode 100644
index 000000000..f06f5994f
--- /dev/null
+++ b/__integration__/flutter.test.js
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe('integration', () => {
+ describe('flutter', () => {
+ StyleDictionary.extend({
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ flutter: {
+ transformGroup: `flutter`,
+ buildPath,
+ files: [{
+ destination: "style_dictionary.dart",
+ format: "flutter/class.dart",
+ className: "StyleDictionary"
+ },{
+ destination: "style_dictionary_with_references.dart",
+ format: "flutter/class.dart",
+ className: "StyleDictionary",
+ options: {
+ outputReferences: true
+ }
+ }]
+ },
+ flutter_separate: {
+ transformGroup: `flutter-separate`,
+ buildPath,
+ files: [{
+ destination: "style_dictionary_color.dart",
+ format: "flutter/class.dart",
+ className: "StyleDictionaryColor",
+ type: "color",
+ filter: {
+ attributes: {
+ category: "color"
+ }
+ }
+ },{
+ destination: "style_dictionary_sizes.dart",
+ format: "flutter/class.dart",
+ className: "StyleDictionarySize",
+ type: "float",
+ filter: {
+ attributes: {
+ category: "size"
+ }
+ }
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+
+ describe(`flutter/class.dart`, () => {
+ const output = fs.readFileSync(`${buildPath}style_dictionary.dart`, {encoding:`UTF-8`});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ describe(`with references`, () => {
+ const output = fs.readFileSync(`${buildPath}style_dictionary_with_references.dart`, {encoding:`UTF-8`});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ });
+
+ describe(`separate`, () => {
+ const output = fs.readFileSync(`${buildPath}style_dictionary_color.dart`,{encoding:`UTF-8`});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ })
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/iOSObjectiveC.test.js b/__integration__/iOSObjectiveC.test.js
new file mode 100644
index 000000000..3da74aedd
--- /dev/null
+++ b/__integration__/iOSObjectiveC.test.js
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe('integration', () => {
+ describe('ios objective-c', () => {
+ StyleDictionary.extend({
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ flutter: {
+ transformGroup: `ios`,
+ buildPath,
+ files: [{
+ destination: "singleton.m",
+ format: "ios/singleton.m",
+ className: "StyleDictionary"
+ },{
+ destination: "singleton.h",
+ format: "ios/singleton.h",
+ className: "StyleDictionary"
+ },{
+ destination: "color.h",
+ format: "ios/colors.h",
+ className: "StyleDictionaryColor",
+ type: "StyleDictionaryColorName",
+ filter: (token) => token.attributes.category === 'color'
+ },{
+ destination: "color.m",
+ format: "ios/colors.m",
+ className: "StyleDictionaryColor",
+ type: "StyleDictionaryColorName",
+ filter: (token) => token.attributes.category === 'color'
+ },{
+ destination: "macros.h",
+ format: "ios/macros",
+ },{
+ destination: "static.h",
+ format: "ios/static.h",
+ className: "StyleDictionaryStatic",
+ type: "CGFloat",
+ filter: (token) => token.attributes.category === 'size'
+ },{
+ destination: "static.m",
+ format: "ios/static.m",
+ className: "StyleDictionaryStatic",
+ type: "CGFloat",
+ filter: (token) => token.attributes.category === 'size'
+ }]
+ },
+ }
+ }).buildAllPlatforms();
+
+ it(`ios/singleton.m should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}singleton.m`, {encoding:`UTF-8`});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`ios/singleton.h should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}singleton.h`, {encoding:`UTF-8`});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`ios/color.m should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}color.m`, {encoding:`UTF-8`});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`ios/color.h should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}color.h`, {encoding:`UTF-8`});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`ios/macros.h should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}macros.h`, {encoding:`UTF-8`});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`ios/static.h should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}static.h`, {encoding:`UTF-8`});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`ios/static.m should match snapshot`, () => {
+ const output = fs.readFileSync(`${buildPath}static.m`, {encoding:`UTF-8`});
+ expect(output).toMatchSnapshot();
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/logging/__snapshots__/config.test.js.snap b/__integration__/logging/__snapshots__/config.test.js.snap
new file mode 100644
index 000000000..f4a2e2791
--- /dev/null
+++ b/__integration__/logging/__snapshots__/config.test.js.snap
@@ -0,0 +1,39 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration > logging > config > property value collisions should not show warnings if given higher log level 1`] = `
+"
+Property Value Collisions:
+Collision detected at: size.padding.small! Original value: 0.5, New value: 0.5
+Collision detected at: size.padding.small! Original value: __integration__/tokens/size/padding.json, New value: __integration__/tokens/size/padding.json
+Collision detected at: size.padding.small! Original value: true, New value: true
+Collision detected at: size.padding.medium! Original value: 1, New value: 1
+Collision detected at: size.padding.medium! Original value: __integration__/tokens/size/padding.json, New value: __integration__/tokens/size/padding.json
+Collision detected at: size.padding.medium! Original value: true, New value: true
+Collision detected at: size.padding.large! Original value: 1, New value: 1
+Collision detected at: size.padding.large! Original value: __integration__/tokens/size/padding.json, New value: __integration__/tokens/size/padding.json
+Collision detected at: size.padding.large! Original value: true, New value: true
+Collision detected at: size.padding.xl! Original value: 1, New value: 1
+Collision detected at: size.padding.xl! Original value: __integration__/tokens/size/padding.json, New value: __integration__/tokens/size/padding.json
+Collision detected at: size.padding.xl! Original value: true, New value: true
+
+"
+`;
+
+exports[`integration > logging > config > property value collisions should not throw, but notify users by default 1`] = `
+"
+Property Value Collisions:
+Collision detected at: size.padding.small! Original value: 0.5, New value: 0.5
+Collision detected at: size.padding.small! Original value: __integration__/tokens/size/padding.json, New value: __integration__/tokens/size/padding.json
+Collision detected at: size.padding.small! Original value: true, New value: true
+Collision detected at: size.padding.medium! Original value: 1, New value: 1
+Collision detected at: size.padding.medium! Original value: __integration__/tokens/size/padding.json, New value: __integration__/tokens/size/padding.json
+Collision detected at: size.padding.medium! Original value: true, New value: true
+Collision detected at: size.padding.large! Original value: 1, New value: 1
+Collision detected at: size.padding.large! Original value: __integration__/tokens/size/padding.json, New value: __integration__/tokens/size/padding.json
+Collision detected at: size.padding.large! Original value: true, New value: true
+Collision detected at: size.padding.xl! Original value: 1, New value: 1
+Collision detected at: size.padding.xl! Original value: __integration__/tokens/size/padding.json, New value: __integration__/tokens/size/padding.json
+Collision detected at: size.padding.xl! Original value: true, New value: true
+
+"
+`;
diff --git a/__integration__/logging/__snapshots__/file.test.js.snap b/__integration__/logging/__snapshots__/file.test.js.snap
new file mode 100644
index 000000000..9691896ce
--- /dev/null
+++ b/__integration__/logging/__snapshots__/file.test.js.snap
@@ -0,0 +1,401 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration logging file should not warn user of empty properties with log level set to error 1`] = `
+"
+css
+No properties for empty.css. File not created."
+`;
+
+exports[`integration logging file should not warn user of filtered references with log level set to error 1`] = `
+"
+css
+⚠️ __integration__/build/filteredReferences.css
+While building filteredReferences.css, filtered out token references were found; output may be unexpected. Here are the references that are used but not defined in the file
+color.core.neutral.100
+color.core.neutral.0
+color.core.neutral.200
+color.core.red.0
+color.core.orange.0
+color.core.green.0
+color.core.blue.0
+This is caused when combining a filter and \`outputReferences\`."
+`;
+
+exports[`integration logging file should not warn user of name collisions with log level set to error 1`] = `
+"
+css
+⚠️ __integration__/build/nameCollisions.css
+While building nameCollisions.css, token collisions were found; output may be unexpected.
+Output name 0 was generated by:
+color.core.green.0 #ebf9eb
+color.core.teal.0 #e5f9f5
+color.core.aqua.0 #d9fcfb
+color.core.blue.0 #e9f8ff
+color.core.purple.0 #f2f2f9
+color.core.magenta.0 #fef0ff
+color.core.pink.0 #ffe9f3
+color.core.red.0 #ffeae9
+color.core.orange.0 #ffede3
+color.core.neutral.0 #FFFFFF
+color.core.yellow.0 #fff8e2
+Output name 100 was generated by:
+color.core.green.100 #d7f4d7
+color.core.teal.100 #cdf7ef
+color.core.aqua.100 #c5f9f9
+color.core.blue.100 #dcf2ff
+color.core.purple.100 #eaeaf9
+color.core.magenta.100 #f9e3fc
+color.core.pink.100 #fcdbeb
+color.core.red.100 #ffd5d2
+color.core.orange.100 #fcdccc
+color.core.neutral.100 #f3f4f4
+color.core.yellow.100 #fdefcd
+Output name 200 was generated by:
+color.core.green.200 #c2f2bd
+color.core.teal.200 #b3f2e6
+color.core.aqua.200 #a5f2f2
+color.core.blue.200 #c7e4f9
+color.core.purple.200 #d8d7f9
+color.core.magenta.200 #f4c4f7
+color.core.pink.200 #ffb5d5
+color.core.red.200 #ffb8b1
+color.core.orange.200 #ffc6a4
+color.core.neutral.200 #dee1e1
+color.core.yellow.200 #ffe99a
+Output name 300 was generated by:
+color.core.green.300 #98e58e
+color.core.teal.300 #7dead5
+color.core.aqua.300 #76e5e2
+color.core.blue.300 #a1d2f8
+color.core.purple.300 #c1c1f7
+color.core.magenta.300 #edadf2
+color.core.pink.300 #ff95c1
+color.core.red.300 #ff9c8f
+color.core.orange.300 #ffb180
+color.core.neutral.300 #c8cccc
+color.core.yellow.300 #ffe16e
+Output name 400 was generated by:
+color.core.green.400 #75dd66
+color.core.teal.400 #24e0c5
+color.core.aqua.400 #33d6e2
+color.core.blue.400 #56adf5
+color.core.purple.400 #a193f2
+color.core.magenta.400 #f282f5
+color.core.pink.400 #ff76ae
+color.core.red.400 #ff7f6e
+color.core.orange.400 #ff9c5d
+color.core.neutral.400 #b0b6b7
+color.core.yellow.400 #ffd943
+Output name 500 was generated by:
+color.core.green.500 #59cb59
+color.core.teal.500 #08c4b2
+color.core.aqua.500 #17b8ce
+color.core.blue.500 #3896e3
+color.core.purple.500 #9180f4
+color.core.magenta.500 #db61db
+color.core.pink.500 #ef588b
+color.core.red.500 #f76054
+color.core.orange.500 #fc8943
+color.core.neutral.500 #929a9b
+color.core.yellow.500 #ffcd1c
+Output name 600 was generated by:
+color.core.green.600 #2bb656
+color.core.teal.600 #00a99c
+color.core.aqua.600 #0797ae
+color.core.blue.600 #2b87d3
+color.core.purple.600 #816fea
+color.core.magenta.600 #c44eb9
+color.core.pink.600 #e0447c
+color.core.red.600 #ed4c42
+color.core.orange.600 #f57d33
+color.core.neutral.600 #6e797a
+color.core.yellow.600 #ffbc00
+Output name 700 was generated by:
+color.core.green.700 #0ca750
+color.core.teal.700 #0b968f
+color.core.aqua.700 #0b8599
+color.core.blue.700 #2079c3
+color.core.purple.700 #6f5ed3
+color.core.magenta.700 #ac44a8
+color.core.pink.700 #ce3665
+color.core.red.700 #db3e3e
+color.core.orange.700 #ed7024
+color.core.neutral.700 #515e5f
+color.core.yellow.700 #dd9903
+Output name 800 was generated by:
+color.core.green.800 #008b46
+color.core.teal.800 #067c7c
+color.core.aqua.800 #0f6e84
+color.core.blue.800 #116daa
+color.core.purple.800 #5e4eba
+color.core.magenta.800 #8f3896
+color.core.pink.800 #b22f5b
+color.core.red.800 #c63434
+color.core.orange.800 #ce5511
+color.core.neutral.800 #364141
+color.core.yellow.800 #ba7506
+Output name 900 was generated by:
+color.core.green.900 #006b40
+color.core.teal.900 #026661
+color.core.aqua.900 #035e73
+color.core.blue.900 #0c5689
+color.core.purple.900 #483a9c
+color.core.magenta.900 #6c2277
+color.core.pink.900 #931847
+color.core.red.900 #992222
+color.core.orange.900 #962c0b
+color.core.neutral.900 #273333
+color.core.yellow.900 #944c0c
+Output name 1000 was generated by:
+color.core.green.1000 #08422f
+color.core.teal.1000 #083f3f
+color.core.aqua.1000 #083d4f
+color.core.blue.1000 #0a3960
+color.core.purple.1000 #2d246b
+color.core.magenta.1000 #451551
+color.core.pink.1000 #561231
+color.core.red.1000 #6d1313
+color.core.orange.1000 #601700
+color.core.neutral.1000 #162020
+color.core.yellow.1000 #542a00
+Output name 1100 was generated by:
+color.core.green.1100 #002b20
+color.core.teal.1100 #002528
+color.core.aqua.1100 #002838
+color.core.blue.1100 #002138
+color.core.purple.1100 #1d1d38
+color.core.magenta.1100 #29192d
+color.core.pink.1100 #2b1721
+color.core.red.1100 #2b1111
+color.core.orange.1100 #2d130e
+color.core.neutral.1100 #040404
+color.core.yellow.1100 #2d1a05
+Output name primary was generated by:
+color.background.primary #FFFFFF
+color.border.primary #c8cccc
+color.brand.primary #0b8599
+color.font.primary #040404
+Output name secondary was generated by:
+color.background.secondary #f3f4f4
+color.brand.secondary #6f5ed3
+color.font.secondary #273333
+Output name tertiary was generated by:
+color.background.tertiary #dee1e1
+color.font.tertiary #364141
+Output name danger was generated by:
+color.background.danger #ffeae9
+color.font.danger #6d1313
+Output name warning was generated by:
+color.background.warning #ffede3
+color.font.warning #601700
+Output name success was generated by:
+color.background.success #ebf9eb
+color.font.success #08422f
+Output name disabled was generated by:
+color.background.disabled #dee1e1
+color.font.interactive.disabled #364141
+This many-to-one issue is usually caused by some combination of:
+* conflicting or similar paths/names in property definitions
+* platform transforms/transformGroups affecting names, especially when removing specificity
+* overly inclusive file filters"
+`;
+
+exports[`integration logging file should warn user empty properties 1`] = `
+"
+css
+No properties for empty.css. File not created."
+`;
+
+exports[`integration logging file should warn user of filtered references 1`] = `
+"
+css
+⚠️ __integration__/build/filteredReferences.css
+While building filteredReferences.css, filtered out token references were found; output may be unexpected. Here are the references that are used but not defined in the file
+color.core.neutral.100
+color.core.neutral.0
+color.core.neutral.200
+color.core.red.0
+color.core.orange.0
+color.core.green.0
+color.core.blue.0
+This is caused when combining a filter and \`outputReferences\`."
+`;
+
+exports[`integration logging file should warn user of name collisions 1`] = `
+"
+css
+⚠️ __integration__/build/nameCollisions.css
+While building nameCollisions.css, token collisions were found; output may be unexpected.
+Output name 0 was generated by:
+color.core.green.0 #ebf9eb
+color.core.teal.0 #e5f9f5
+color.core.aqua.0 #d9fcfb
+color.core.blue.0 #e9f8ff
+color.core.purple.0 #f2f2f9
+color.core.magenta.0 #fef0ff
+color.core.pink.0 #ffe9f3
+color.core.red.0 #ffeae9
+color.core.orange.0 #ffede3
+color.core.neutral.0 #FFFFFF
+color.core.yellow.0 #fff8e2
+Output name 100 was generated by:
+color.core.green.100 #d7f4d7
+color.core.teal.100 #cdf7ef
+color.core.aqua.100 #c5f9f9
+color.core.blue.100 #dcf2ff
+color.core.purple.100 #eaeaf9
+color.core.magenta.100 #f9e3fc
+color.core.pink.100 #fcdbeb
+color.core.red.100 #ffd5d2
+color.core.orange.100 #fcdccc
+color.core.neutral.100 #f3f4f4
+color.core.yellow.100 #fdefcd
+Output name 200 was generated by:
+color.core.green.200 #c2f2bd
+color.core.teal.200 #b3f2e6
+color.core.aqua.200 #a5f2f2
+color.core.blue.200 #c7e4f9
+color.core.purple.200 #d8d7f9
+color.core.magenta.200 #f4c4f7
+color.core.pink.200 #ffb5d5
+color.core.red.200 #ffb8b1
+color.core.orange.200 #ffc6a4
+color.core.neutral.200 #dee1e1
+color.core.yellow.200 #ffe99a
+Output name 300 was generated by:
+color.core.green.300 #98e58e
+color.core.teal.300 #7dead5
+color.core.aqua.300 #76e5e2
+color.core.blue.300 #a1d2f8
+color.core.purple.300 #c1c1f7
+color.core.magenta.300 #edadf2
+color.core.pink.300 #ff95c1
+color.core.red.300 #ff9c8f
+color.core.orange.300 #ffb180
+color.core.neutral.300 #c8cccc
+color.core.yellow.300 #ffe16e
+Output name 400 was generated by:
+color.core.green.400 #75dd66
+color.core.teal.400 #24e0c5
+color.core.aqua.400 #33d6e2
+color.core.blue.400 #56adf5
+color.core.purple.400 #a193f2
+color.core.magenta.400 #f282f5
+color.core.pink.400 #ff76ae
+color.core.red.400 #ff7f6e
+color.core.orange.400 #ff9c5d
+color.core.neutral.400 #b0b6b7
+color.core.yellow.400 #ffd943
+Output name 500 was generated by:
+color.core.green.500 #59cb59
+color.core.teal.500 #08c4b2
+color.core.aqua.500 #17b8ce
+color.core.blue.500 #3896e3
+color.core.purple.500 #9180f4
+color.core.magenta.500 #db61db
+color.core.pink.500 #ef588b
+color.core.red.500 #f76054
+color.core.orange.500 #fc8943
+color.core.neutral.500 #929a9b
+color.core.yellow.500 #ffcd1c
+Output name 600 was generated by:
+color.core.green.600 #2bb656
+color.core.teal.600 #00a99c
+color.core.aqua.600 #0797ae
+color.core.blue.600 #2b87d3
+color.core.purple.600 #816fea
+color.core.magenta.600 #c44eb9
+color.core.pink.600 #e0447c
+color.core.red.600 #ed4c42
+color.core.orange.600 #f57d33
+color.core.neutral.600 #6e797a
+color.core.yellow.600 #ffbc00
+Output name 700 was generated by:
+color.core.green.700 #0ca750
+color.core.teal.700 #0b968f
+color.core.aqua.700 #0b8599
+color.core.blue.700 #2079c3
+color.core.purple.700 #6f5ed3
+color.core.magenta.700 #ac44a8
+color.core.pink.700 #ce3665
+color.core.red.700 #db3e3e
+color.core.orange.700 #ed7024
+color.core.neutral.700 #515e5f
+color.core.yellow.700 #dd9903
+Output name 800 was generated by:
+color.core.green.800 #008b46
+color.core.teal.800 #067c7c
+color.core.aqua.800 #0f6e84
+color.core.blue.800 #116daa
+color.core.purple.800 #5e4eba
+color.core.magenta.800 #8f3896
+color.core.pink.800 #b22f5b
+color.core.red.800 #c63434
+color.core.orange.800 #ce5511
+color.core.neutral.800 #364141
+color.core.yellow.800 #ba7506
+Output name 900 was generated by:
+color.core.green.900 #006b40
+color.core.teal.900 #026661
+color.core.aqua.900 #035e73
+color.core.blue.900 #0c5689
+color.core.purple.900 #483a9c
+color.core.magenta.900 #6c2277
+color.core.pink.900 #931847
+color.core.red.900 #992222
+color.core.orange.900 #962c0b
+color.core.neutral.900 #273333
+color.core.yellow.900 #944c0c
+Output name 1000 was generated by:
+color.core.green.1000 #08422f
+color.core.teal.1000 #083f3f
+color.core.aqua.1000 #083d4f
+color.core.blue.1000 #0a3960
+color.core.purple.1000 #2d246b
+color.core.magenta.1000 #451551
+color.core.pink.1000 #561231
+color.core.red.1000 #6d1313
+color.core.orange.1000 #601700
+color.core.neutral.1000 #162020
+color.core.yellow.1000 #542a00
+Output name 1100 was generated by:
+color.core.green.1100 #002b20
+color.core.teal.1100 #002528
+color.core.aqua.1100 #002838
+color.core.blue.1100 #002138
+color.core.purple.1100 #1d1d38
+color.core.magenta.1100 #29192d
+color.core.pink.1100 #2b1721
+color.core.red.1100 #2b1111
+color.core.orange.1100 #2d130e
+color.core.neutral.1100 #040404
+color.core.yellow.1100 #2d1a05
+Output name primary was generated by:
+color.background.primary #FFFFFF
+color.border.primary #c8cccc
+color.brand.primary #0b8599
+color.font.primary #040404
+Output name secondary was generated by:
+color.background.secondary #f3f4f4
+color.brand.secondary #6f5ed3
+color.font.secondary #273333
+Output name tertiary was generated by:
+color.background.tertiary #dee1e1
+color.font.tertiary #364141
+Output name danger was generated by:
+color.background.danger #ffeae9
+color.font.danger #6d1313
+Output name warning was generated by:
+color.background.warning #ffede3
+color.font.warning #601700
+Output name success was generated by:
+color.background.success #ebf9eb
+color.font.success #08422f
+Output name disabled was generated by:
+color.background.disabled #dee1e1
+color.font.interactive.disabled #364141
+This many-to-one issue is usually caused by some combination of:
+* conflicting or similar paths/names in property definitions
+* platform transforms/transformGroups affecting names, especially when removing specificity
+* overly inclusive file filters"
+`;
diff --git a/__integration__/logging/__snapshots__/platform.test.js.snap b/__integration__/logging/__snapshots__/platform.test.js.snap
new file mode 100644
index 000000000..282070757
--- /dev/null
+++ b/__integration__/logging/__snapshots__/platform.test.js.snap
@@ -0,0 +1,37 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`integration logging platform property reference errors circular references should throw notify users 1`] = `
+"
+css
+
+Property Reference Errors:
+Circular definition cycle: color.foo.value, color.foo.value, color.foo.value
+Circular definition cycle: color.teal.value, color.blue.value, color.green.value, color.teal.value
+
+"
+`;
+
+exports[`integration logging platform property reference errors should throw and notify users of unknown references 1`] = `
+"
+css
+
+Property Reference Errors:
+Reference doesn't exist: color.danger.value tries to reference color.red.value, which is not defined
+
+"
+`;
+
+exports[`integration logging platform should throw and notify users of unknown actions 1`] = `
+"
+css"
+`;
+
+exports[`integration logging platform should throw and notify users of unknown transformGroups 1`] = `
+"
+css"
+`;
+
+exports[`integration logging platform should throw and notify users of unknown transforms 1`] = `
+"
+css"
+`;
diff --git a/__integration__/logging/config.test.js b/__integration__/logging/config.test.js
new file mode 100644
index 000000000..7cb3bad61
--- /dev/null
+++ b/__integration__/logging/config.test.js
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../../index');
+const {buildPath, cleanConsoleOutput} = require('../_constants');
+
+// Spy on console.log and add all messages to an array
+let consoleOutput = [];
+const log = jest.spyOn(console, "log")
+ .mockImplementation(message => consoleOutput.push(message))
+
+/**
+ * These integration tests will verify the behavior and logging at the *config*
+ * level. These messages happen when `.extend()` is called to verify
+ * proper configuration such as source being an array. This will also check
+ * for collisions in source files and any errors that happen when parsing
+ * and merging properties. This is the first of 3 phases of logging, the
+ * next two are: platform and file.
+ */
+describe(`integration >`, () => {
+ // before each test clear the mocked console.log and the output array
+ beforeEach(() => {
+ log.mockClear();
+ consoleOutput = [];
+ });
+
+ describe(`logging >`, () => {
+ describe(`config >`, () => {
+ describe(`property value collisions`, () => {
+ it(`should not throw, but notify users by default`, () => {
+ StyleDictionary.extend({
+ source: [
+ // including a specific file twice will throw value collision warnings
+ `__integration__/tokens/size/padding.json`,
+ `__integration__/tokens/size/padding.json`
+ ],
+ platforms: {
+ }
+ });
+ expect(consoleOutput.map(cleanConsoleOutput).join(`\n`)).toMatchSnapshot();
+ });
+
+ it(`should not show warnings if given higher log level`, () => {
+ StyleDictionary.extend({
+ logLevel: `error`,
+ source: [
+ // including a specific file twice will throw value collision warnings
+ `__integration__/tokens/size/padding.json`,
+ `__integration__/tokens/size/padding.json`
+ ],
+ platforms: {
+ }
+ });
+ expect(consoleOutput.map(cleanConsoleOutput).join(`\n`)).toMatchSnapshot();
+ });
+ });
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/logging/file.test.js b/__integration__/logging/file.test.js
new file mode 100644
index 000000000..5663a41b8
--- /dev/null
+++ b/__integration__/logging/file.test.js
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../../index');
+const {buildPath, cleanConsoleOutput} = require('../_constants');
+
+// Spy on console.log and add all messages to an array
+let consoleOutput = [];
+const log = jest.spyOn(console, "log")
+ .mockImplementation(message => consoleOutput.push(message))
+
+
+/**
+ * The last and final level of logging: file.
+ * These logs happen when a file is being built and will notify the user
+ * if there are issues generating a file. These issues might include
+ * skipping building an empty file, property name collisions, or filtered
+ * out references.
+ */
+describe(`integration`, () => {
+ // before each test clear the mocked console.log and the output array
+ beforeEach(() => {
+ log.mockClear();
+ consoleOutput = [];
+ });
+
+ describe(`logging`, () => {
+ describe(`file`, () => {
+ it(`should warn user empty properties`, () => {
+ StyleDictionary.extend({
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ css: {
+ transformGroup: `css`,
+ files: [{
+ destination: `empty.css`,
+ format: `css/variables`,
+ filter: (token) => token.attributes.category === `foo`
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+
+ expect(consoleOutput.map(cleanConsoleOutput).join('\n')).toMatchSnapshot();
+ });
+
+ it(`should not warn user of empty properties with log level set to error`, () => {
+ StyleDictionary.extend({
+ logLevel: `error`,
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ css: {
+ transformGroup: `css`,
+ files: [{
+ destination: `empty.css`,
+ format: `css/variables`,
+ filter: (token) => token.attributes.category === `foo`
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+ expect(consoleOutput.map(cleanConsoleOutput).join('\n')).toMatchSnapshot();
+ });
+
+ it(`should warn user of name collisions`, () => {
+ StyleDictionary.extend({
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ css: {
+ // no name transform means there will be name collisions
+ transforms: [`attribute/cti`],
+ buildPath,
+ files: [{
+ destination: `nameCollisions.css`,
+ format: `css/variables`,
+ filter: (token) => token.attributes.category === `color`
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+ expect(consoleOutput.map(cleanConsoleOutput).join('\n')).toMatchSnapshot();
+ });
+
+ it(`should not warn user of name collisions with log level set to error`, () => {
+ StyleDictionary.extend({
+ logLevel: `error`,
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ css: {
+ // no name transform means there will be name collisions
+ transforms: [`attribute/cti`],
+ buildPath,
+ files: [{
+ destination: `nameCollisions.css`,
+ format: `css/variables`,
+ filter: (token) => token.attributes.category === `color`
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+ expect(consoleOutput.map(cleanConsoleOutput).join('\n')).toMatchSnapshot();
+ });
+
+ it(`should warn user of filtered references`, () => {
+ StyleDictionary.extend({
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ css: {
+ transformGroup: `css`,
+ buildPath,
+ files: [{
+ destination: `filteredReferences.css`,
+ format: `css/variables`,
+ options: {
+ outputReferences: true
+ },
+ // background colors have references, only including them
+ // should warn the user
+ filter: (token) => token.attributes.type === `background`
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+ expect(consoleOutput.map(cleanConsoleOutput).join('\n')).toMatchSnapshot();
+ });
+
+ it(`should not warn user of filtered references with log level set to error`, () => {
+ StyleDictionary.extend({
+ logLevel: `error`,
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ css: {
+ transformGroup: `css`,
+ buildPath,
+ files: [{
+ destination: `filteredReferences.css`,
+ format: `css/variables`,
+ options: {
+ outputReferences: true
+ },
+ // background colors have references, only including them
+ // should warn the user
+ filter: (token) => token.attributes.type === `background`
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+ expect(consoleOutput.map(cleanConsoleOutput).join('\n')).toMatchSnapshot();
+ });
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/logging/platform.test.js b/__integration__/logging/platform.test.js
new file mode 100644
index 000000000..6178b9af8
--- /dev/null
+++ b/__integration__/logging/platform.test.js
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../../index');
+const {buildPath, cleanConsoleOutput} = require('../_constants');
+
+// Spy on console.log and add all messages to an array
+let consoleOutput = [];
+const log = jest.spyOn(console, "log")
+ .mockImplementation(message => consoleOutput.push(message))
+
+/**
+ * This is the 2nd phase of logging: the platform configuration. This happens
+ * after the Style Dictionary configuration is verified and property files are
+ * parsed and merged. The platform configuration phase will verify the configuration
+ * of the platform and turn references to transforms, transformGroups, formats,
+ * and actions into their actual implementation. This phase may warn or throw
+ * an error if a user tries to use an unknown transform.
+ *
+ */
+describe(`integration`, () => {
+ // before each test clear the mocked console.log and the output array
+ beforeEach(() => {
+ log.mockClear();
+ consoleOutput = [];
+ });
+
+ describe(`logging`, () => {
+ describe(`platform`, () => {
+ it(`should throw and notify users of unknown actions`, () => {
+ // unknown actions should throw
+ expect(() => {
+ StyleDictionary.extend({
+ properties: {},
+ platforms: {
+ css: {
+ actions: [`foo`]
+ }
+ }
+ }).buildAllPlatforms();
+ }).toThrow();
+ expect(consoleOutput.map(cleanConsoleOutput).join('\n')).toMatchSnapshot();
+ });
+
+ it(`should throw and notify users of unknown transforms`, () => {
+ expect(() => {
+ StyleDictionary.extend({
+ platforms: {
+ css: {
+ transforms: [`foo`,`bar`]
+ }
+ }
+ }).buildAllPlatforms();
+ }).toThrow();
+ expect(consoleOutput.map(cleanConsoleOutput).join(`\n`)).toMatchSnapshot();
+ });
+
+ it(`should throw and notify users of unknown transformGroups`, () => {
+ expect(() => {
+ StyleDictionary.extend({
+ platforms: {
+ css: {
+ transformGroup: `foo`
+ }
+ }
+ }).buildAllPlatforms();
+ }).toThrow();
+ expect(consoleOutput.map(cleanConsoleOutput).join(`\n`)).toMatchSnapshot();
+ });
+
+ describe(`property reference errors`, () => {
+ it(`should throw and notify users of unknown references`, () => {
+ expect(() => {
+ StyleDictionary.extend({
+ properties: {
+ color: {
+ danger: { value: "{color.red.value}" },
+ }
+ },
+ platforms: {
+ css: {}
+ }
+ }).buildAllPlatforms();
+ }).toThrow();
+ expect(consoleOutput.map(cleanConsoleOutput).join('\n')).toMatchSnapshot();
+ });
+
+ it(`circular references should throw notify users`, () => {
+ expect(() => {
+ StyleDictionary.extend({
+ properties: {
+ color: {
+ foo: { value: "{color.foo.value}" },
+ teal: { value: "{color.blue.value}" },
+ blue: { value: "{color.green.value}" },
+ green: { value: "{color.teal.value}" },
+ purple: { value: "{color.teal.value}" }
+ }
+ },
+ platforms: {
+ css: {}
+ }
+ }).buildAllPlatforms();
+ }).toThrow();
+ expect(consoleOutput.map(cleanConsoleOutput).join('\n')).toMatchSnapshot();
+ });
+ });
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/nameCollisions.test.js b/__integration__/nameCollisions.test.js
new file mode 100644
index 000000000..7cdf0fb0e
--- /dev/null
+++ b/__integration__/nameCollisions.test.js
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const chalk = require('chalk');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+const properties = {
+ color: {
+ red: { value: '#f00' },
+ background: {
+ red: { value: '{color.red.value}' }
+ }
+ }
+}
+
+describe('integration', () => {
+ describe('name collisions', () => {
+ it(`should warn users of name collisions for flat files`, () => {
+ console.log = jest.fn();
+ StyleDictionary.extend({
+ // we are only testing name collision warnings options so we don't need
+ // the full source.
+ properties,
+ platforms: {
+ web: {
+ buildPath,
+ files: [{
+ destination: 'variables.css',
+ format: 'css/variables',
+ }]
+ },
+ }
+ }).buildAllPlatforms();
+ expect(console.log).toHaveBeenCalledWith(`⚠️ ${buildPath}variables.css`);
+ });
+
+ it(`should not warn users of name collisions for nested files`, () => {
+ console.log = jest.fn();
+ StyleDictionary.extend({
+ // we are only testing name collision warnings options so we don't need
+ // the full source.
+ properties,
+ platforms: {
+ web: {
+ buildPath,
+ files: [{
+ destination: 'tokens.json',
+ format: 'json/nested'
+ }]
+ },
+ }
+ }).buildAllPlatforms();
+ expect(console.log).toHaveBeenCalledWith(chalk.bold.green(`✔︎ ${buildPath}tokens.json`));
+ });
+
+
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/objectValues.test.js b/__integration__/objectValues.test.js
new file mode 100644
index 000000000..addad4e3d
--- /dev/null
+++ b/__integration__/objectValues.test.js
@@ -0,0 +1,211 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const Color = require('tinycolor2');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+const options = {
+ outputReferences: true
+}
+
+describe('integration', () => {
+ describe('object values', () => {
+ StyleDictionary.extend({
+ properties: {
+ hue: `120`,
+ saturation: `50%`,
+ lightness: `50%`,
+ color: {
+ red: { value: "#f00" },
+ green: {
+ value: {
+ h: "{hue}",
+ s: "{saturation}",
+ l: "{lightness}"
+ }
+ }
+ },
+ size: {
+ border: { value: 0.125 }
+ },
+ border: {
+ primary: {
+ // getReferences should work on objects like this:
+ value: {
+ color: "{color.red.value}",
+ width: "{size.border.value}",
+ style: "solid"
+ }
+ },
+ }
+ },
+ transform: {
+ hsl: {
+ type: 'value',
+ transitive: true,
+ matcher: (token) => token.original.value.h,
+ transformer: (token) => {
+ return `hsl(${token.value.h}, ${token.value.s}, ${token.value.l})`
+ }
+ },
+ hslToHex: {
+ type: 'value',
+ transitive: true,
+ matcher: (token) => token.original.value.h,
+ transformer: (token) => {
+ return Color(`hsl(${token.value.h}, ${token.value.s}, ${token.value.l})`).toHexString();
+ }
+ },
+ cssBorder: {
+ type: 'value',
+ transitive: true,
+ matcher: (token) => token.path[0] === `border`,
+ transformer: (token) => {
+ return `${token.value.width} ${token.value.style} ${token.value.color}`
+ }
+ }
+ },
+ platforms: {
+ // This will test to see if a value object for an hsl color works
+ // with and without `outputReferences`
+ cssHsl: {
+ buildPath,
+ transforms: StyleDictionary.transformGroup.css.concat([`hsl`]),
+ files: [{
+ destination: `hsl.css`,
+ format: `css/variables`,
+ filter: (token) => token.attributes.category === `color`
+ },{
+ destination: `hslWithReferences.css`,
+ format: `css/variables`,
+ filter: (token) => token.attributes.category === `color`,
+ options
+ }]
+ },
+
+ // This will test to see if a value object for an hsl that has been
+ // transformed to a hex color works with and without `outputReferences`
+ cssHex: {
+ buildPath,
+ transforms: StyleDictionary.transformGroup.css.concat([`cssBorder`,`hslToHex`]),
+ files: [{
+ destination: 'hex.css',
+ format: 'css/variables',
+ filter: (token) => token.attributes.category === `color`,
+ },{
+ destination: 'hexWithReferences.css',
+ format: 'css/variables',
+ filter: (token) => token.attributes.category === `color`,
+ options
+ }]
+ },
+
+ // This will test to see if a value object for a border
+ // works with and without `outputReferences`
+ cssBorder: {
+ buildPath,
+ transforms: StyleDictionary.transformGroup.css.concat([`cssBorder`]),
+ files: [{
+ destination: 'border.css',
+ format: 'css/variables',
+ filter: (token) => token.attributes.category === `border`,
+ },{
+ destination: 'borderWithReferences.css',
+ format: 'css/variables',
+ filter: (token) => token.attributes.category === `border`,
+ options
+ }]
+ },
+
+ scss: {
+ buildPath,
+ transforms: StyleDictionary.transformGroup.css.concat([`cssBorder`,`hslToHex`]),
+ files: [{
+ destination: 'border.scss',
+ format: 'scss/variables',
+ filter: (token) => token.attributes.category === `border`,
+ },{
+ destination: 'borderWithReferences.scss',
+ format: 'scss/variables',
+ filter: (token) => token.attributes.category === `border`,
+ options
+ }]
+ },
+ }
+ }).buildAllPlatforms();
+
+ describe('css/variables', () => {
+ describe(`hsl syntax`, () => {
+ const output = fs.readFileSync(`${buildPath}hsl.css`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ describe(`with references`, () => {
+ const output = fs.readFileSync(`${buildPath}hslWithReferences.css`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+ });
+
+ describe(`hex syntax`, () => {
+ const output = fs.readFileSync(`${buildPath}hex.css`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ describe(`with references`, () => {
+ const output = fs.readFileSync(`${buildPath}hexWithReferences.css`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+ });
+
+ describe(`border`, () => {
+ const output = fs.readFileSync(`${buildPath}border.css`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ describe(`with references`, () => {
+ const output = fs.readFileSync(`${buildPath}borderWithReferences.css`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+ });
+ });
+
+ describe('scss/variables', () => {
+ const output = fs.readFileSync(`${buildPath}border.scss`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ describe(`with references`, () => {
+ const output = fs.readFileSync(`${buildPath}borderWithReferences.scss`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/outputReferences.test.js b/__integration__/outputReferences.test.js
new file mode 100644
index 000000000..afa172b64
--- /dev/null
+++ b/__integration__/outputReferences.test.js
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe('integration', () => {
+ describe('output references', () => {
+ it('should warn the user if filters out references', () => {
+ console.log = jest.fn();
+ StyleDictionary.extend({
+ // we are only testing showFileHeader options so we don't need
+ // the full source.
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ css: {
+ transformGroup: 'css',
+ buildPath,
+ files: [{
+ destination: 'filteredVariables.css',
+ format: 'css/variables',
+ // filter tokens and use outputReferences
+ // Style Dictionary should build this file ok
+ // but warn the user
+ filter: (token) => token.attributes.type === 'background',
+ options: {
+ outputReferences: true
+ }
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+
+ expect(console.log).toHaveBeenCalledWith(`⚠️ ${buildPath}filteredVariables.css`);
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/scss.test.js b/__integration__/scss.test.js
new file mode 100644
index 000000000..f6e442ae9
--- /dev/null
+++ b/__integration__/scss.test.js
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const scss = require('node-sass');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe(`integration`, () => {
+ describe(`scss`, () => {
+ StyleDictionary.extend({
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ css: {
+ transformGroup: `scss`,
+ buildPath,
+ files: [{
+ destination: `variables.scss`,
+ format: `scss/variables`
+ },{
+ destination: `variablesWithReferences.scss`,
+ format: `scss/variables`,
+ options: {
+ outputReferences: true
+ }
+ },{
+ destination: `filteredVariablesWithReferences.scss`,
+ format: `scss/variables`,
+ filter: (token) => token.path[1] === 'background',
+ options: {
+ outputReferences: true
+ }
+ },{
+ destination: `map-flat.scss`,
+ format: `scss/map-flat`,
+ mapName: 'design-system-tokens'
+ },{
+ destination: `map-deep.scss`,
+ format: `scss/map-deep`,
+ mapName: 'design-system-tokens'
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+
+ describe(`scss/variables`, () => {
+ const output = fs.readFileSync(`${buildPath}variables.scss`, {encoding:'UTF-8'});
+
+ it(`should have a valid scss syntax`, () => {
+ const result = scss.renderSync({
+ data: output,
+ });
+ expect(result.css).toBeDefined();
+ });
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ describe(`with outputReferences`, () => {
+ const output = fs.readFileSync(`${buildPath}variablesWithReferences.scss`, {encoding:'UTF-8'});
+ it(`should have a valid scss syntax`, () => {
+ const result = scss.renderSync({
+ data: output,
+ });
+ expect(result.css).toBeDefined();
+ });
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+
+ describe(`with filter and output references`, () => {
+ const output = fs.readFileSync(`${buildPath}filteredVariablesWithReferences.scss`, {encoding:'UTF-8'});
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+ });
+
+ describe(`scss/map-flat`, () => {
+ const output = fs.readFileSync(`${buildPath}map-flat.scss`, {encoding:'UTF-8'});
+
+ it(`should have a valid scss syntax`, () => {
+ const result = scss.renderSync({
+ data: output,
+ });
+ expect(result.css).toBeDefined();
+ });
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+
+ describe(`scss/map-deep`, () => {
+ const output = fs.readFileSync(`${buildPath}map-deep.scss`, {encoding:'UTF-8'});
+
+ it(`should have a valid scss syntax`, () => {
+ const result = scss.renderSync({
+ data: output,
+ });
+ expect(result.css).toBeDefined();
+ });
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/showFileHeader.test.js b/__integration__/showFileHeader.test.js
new file mode 100644
index 000000000..8459bef30
--- /dev/null
+++ b/__integration__/showFileHeader.test.js
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe('integration', () => {
+ describe('showFileHeader', () => {
+ StyleDictionary.extend({
+ // we are only testing showFileHeader options so we don't need
+ // the full source.
+ source: [`__integration__/tokens/size/padding.json`],
+ platforms: {
+ css: {
+ transformGroup: 'css',
+ buildPath,
+ files: [{
+ destination: 'platform-none-file-none.css',
+ format: 'css/variables'
+ },{
+ destination: 'platform-none-file-false.css',
+ format: 'css/variables',
+ options: {
+ showFileHeader: false
+ }
+ }]
+ },
+ fileHeader: {
+ transformGroup: 'css',
+ buildPath,
+ options: {
+ showFileHeader: false
+ },
+ files: [{
+ destination: 'platform-false-file-none.css',
+ format: 'css/variables'
+ },{
+ destination: 'platform-false-file-true.css',
+ format: 'css/variables',
+ options: {
+ showFileHeader: true
+ }
+ }]
+ }
+ }
+ }).buildAllPlatforms();
+
+ describe(`without platform options`, () => {
+ it(`should show file header if no file options set`, () => {
+ const output = fs.readFileSync(`${buildPath}platform-none-file-none.css`, {encoding:'UTF-8'});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`should not show file header if file options set to false`, () => {
+ const output = fs.readFileSync(`${buildPath}platform-none-file-false.css`, {encoding:'UTF-8'});
+ expect(output).toMatchSnapshot();
+ });
+ });
+
+ describe(`with platform options set to false`, () => {
+ it(`should not show file header if no file options set`, () => {
+ const output = fs.readFileSync(`${buildPath}platform-false-file-none.css`, {encoding:'UTF-8'});
+ expect(output).toMatchSnapshot();
+ });
+
+ it(`should show file header if file options set to true`, () => {
+ const output = fs.readFileSync(`${buildPath}platform-false-file-true.css`, {encoding:'UTF-8'});
+ expect(output).toMatchSnapshot();
+ });
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/swift.test.js b/__integration__/swift.test.js
new file mode 100644
index 000000000..44bd170fd
--- /dev/null
+++ b/__integration__/swift.test.js
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const StyleDictionary = require('../index');
+const {buildPath} = require('./_constants');
+
+describe('integration', () => {
+ describe('swift', () => {
+ StyleDictionary.extend({
+ source: [`__integration__/tokens/**/*.json`],
+ platforms: {
+ flutter: {
+ transformGroup: `ios-swift`,
+ buildPath,
+ files: [{
+ destination: "style_dictionary.swift",
+ format: "ios-swift/class.swift",
+ className: "StyleDictionary"
+ },{
+ destination: "style_dictionary_with_references.swift",
+ format: "ios-swift/class.swift",
+ className: "StyleDictionary",
+ options: {
+ outputReferences: true
+ }
+ }]
+ },
+ }
+ }).buildAllPlatforms();
+
+ describe(`ios-swift/class.swift`, () => {
+ const output = fs.readFileSync(`${buildPath}style_dictionary.swift`, {encoding:`UTF-8`});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ describe(`with references`, () => {
+ const output = fs.readFileSync(`${buildPath}style_dictionary_with_references.swift`, {encoding:`UTF-8`});
+
+ it(`should match snapshot`, () => {
+ expect(output).toMatchSnapshot();
+ });
+
+ });
+
+ // describe(`separate`, () => {
+ // const output = fs.readFileSync(`${buildPath}style_dictionary_color.dart`);
+ // it(`should match snapshot`, () => {
+ // expect(output).toMatchSnapshot();
+ // });
+ // });
+ });
+ });
+});
+
+afterAll(() => {
+ fs.emptyDirSync(buildPath);
+});
\ No newline at end of file
diff --git a/__integration__/tokens/color/background.json b/__integration__/tokens/color/background.json
new file mode 100644
index 000000000..066b22fbb
--- /dev/null
+++ b/__integration__/tokens/color/background.json
@@ -0,0 +1,14 @@
+{
+ "color": {
+ "background": {
+ "primary": { "value": "{color.core.neutral.0.value}", "themeable": true },
+ "secondary": { "value": "{color.core.neutral.100.value}" },
+ "tertiary": { "value": "{color.core.neutral.200.value}" },
+ "danger": { "value": "{color.core.red.0.value}" },
+ "warning": { "value": "{color.core.orange.0.value}" },
+ "success": { "value": "{color.core.green.0.value}" },
+ "info": { "value": "{color.core.blue.0.value}" },
+ "disabled": { "value": "{color.background.tertiary.value}" }
+ }
+ }
+}
\ No newline at end of file
diff --git a/__integration__/tokens/color/border.json b/__integration__/tokens/color/border.json
new file mode 100644
index 000000000..c344aae51
--- /dev/null
+++ b/__integration__/tokens/color/border.json
@@ -0,0 +1,9 @@
+{
+ "color": {
+ "border": {
+ "primary": { "value": "{color.core.neutral.300.value}" },
+ "secondary": {},
+ "tertiary": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/__integration__/tokens/color/brand.json b/__integration__/tokens/color/brand.json
new file mode 100644
index 000000000..66cde45ce
--- /dev/null
+++ b/__integration__/tokens/color/brand.json
@@ -0,0 +1,13 @@
+{
+ "color": {
+ "brand": {
+ "primary": {
+ "value": "{color.core.aqua.700.value}"
+ },
+
+ "secondary": {
+ "value": "{color.core.purple.700.value}"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/__integration__/tokens/color/core.json b/__integration__/tokens/color/core.json
new file mode 100644
index 000000000..e3294792a
--- /dev/null
+++ b/__integration__/tokens/color/core.json
@@ -0,0 +1,170 @@
+{
+ "color": {
+ "core": {
+ "green": {
+ "0": { "value": "#ebf9eb" },
+ "100" : { "value": "#d7f4d7" },
+ "200" : { "value": "#c2f2bd" },
+ "300" : { "value": "#98e58e" },
+ "400" : { "value": "#75dd66" },
+ "500" : { "value": "#59cb59" },
+ "600" : { "value": "#2bb656" },
+ "700" : { "value": "#0ca750" },
+ "800" : { "value": "#008b46" },
+ "900" : { "value": "#006b40" },
+ "1000" : { "value": "#08422f" },
+ "1100" : { "value": "#002b20" }
+ },
+
+ "teal": {
+ "0": { "value": "#e5f9f5" },
+ "100" : { "value": "#cdf7ef" },
+ "200" : { "value": "#b3f2e6" },
+ "300" : { "value": "#7dead5" },
+ "400" : { "value": "#24e0c5" },
+ "500" : { "value": "#08c4b2" },
+ "600" : { "value": "#00a99c" },
+ "700" : { "value": "#0b968f" },
+ "800" : { "value": "#067c7c" },
+ "900" : { "value": "#026661" },
+ "1000" : { "value": "#083f3f" },
+ "1100" : { "value": "#002528" }
+ },
+
+ "aqua": {
+ "0": { "value": "#d9fcfb" },
+ "100" : { "value": "#c5f9f9" },
+ "200" : { "value": "#a5f2f2" },
+ "300" : { "value": "#76e5e2" },
+ "400" : { "value": "#33d6e2" },
+ "500" : { "value": "#17b8ce" },
+ "600" : { "value": "#0797ae" },
+ "700" : { "value": "#0b8599" },
+ "800" : { "value": "#0f6e84" },
+ "900" : { "value": "#035e73" },
+ "1000" : { "value": "#083d4f" },
+ "1100" : { "value": "#002838" }
+ },
+
+ "blue": {
+ "0": { "value": "#e9f8ff" },
+ "100" : { "value": "#dcf2ff" },
+ "200" : { "value": "#c7e4f9" },
+ "300" : { "value": "#a1d2f8" },
+ "400" : { "value": "#56adf5" },
+ "500" : { "value": "#3896e3" },
+ "600" : { "value": "#2b87d3" },
+ "700" : { "value": "#2079c3" },
+ "800" : { "value": "#116daa" },
+ "900" : { "value": "#0c5689" },
+ "1000" : { "value": "#0a3960" },
+ "1100" : { "value": "#002138" }
+ },
+
+ "purple": {
+ "0": { "value": "#f2f2f9" },
+ "100" : { "value": "#eaeaf9" },
+ "200" : { "value": "#d8d7f9" },
+ "300" : { "value": "#c1c1f7" },
+ "400" : { "value": "#a193f2" },
+ "500" : { "value": "#9180f4" },
+ "600" : { "value": "#816fea" },
+ "700" : { "value": "#6f5ed3" },
+ "800" : { "value": "#5e4eba" },
+ "900" : { "value": "#483a9c" },
+ "1000" : { "value": "#2d246b" },
+ "1100" : { "value": "#1d1d38" }
+ },
+
+ "magenta": {
+ "0": { "value": "#fef0ff" },
+ "100" : { "value": "#f9e3fc" },
+ "200" : { "value": "#f4c4f7" },
+ "300" : { "value": "#edadf2" },
+ "400" : { "value": "#f282f5" },
+ "500" : { "value": "#db61db" },
+ "600" : { "value": "#c44eb9" },
+ "700" : { "value": "#ac44a8" },
+ "800" : { "value": "#8f3896" },
+ "900" : { "value": "#6c2277" },
+ "1000" : { "value": "#451551" },
+ "1100" : { "value": "#29192d" }
+ },
+
+ "pink": {
+ "0": { "value": "#ffe9f3" },
+ "100" : { "value": "#fcdbeb" },
+ "200" : { "value": "#ffb5d5" },
+ "300" : { "value": "#ff95c1" },
+ "400" : { "value": "#ff76ae" },
+ "500" : { "value": "#ef588b" },
+ "600" : { "value": "#e0447c" },
+ "700" : { "value": "#ce3665" },
+ "800" : { "value": "#b22f5b" },
+ "900" : { "value": "#931847" },
+ "1000" : { "value": "#561231" },
+ "1100" : { "value": "#2b1721" }
+ },
+
+ "red": {
+ "0": { "value": "#ffeae9" },
+ "100" : { "value": "#ffd5d2" },
+ "200" : { "value": "#ffb8b1" },
+ "300" : { "value": "#ff9c8f" },
+ "400" : { "value": "#ff7f6e" },
+ "500" : { "value": "#f76054" },
+ "600" : { "value": "#ed4c42" },
+ "700" : { "value": "#db3e3e" },
+ "800" : { "value": "#c63434" },
+ "900" : { "value": "#992222" },
+ "1000" : { "value": "#6d1313" },
+ "1100" : { "value": "#2b1111" }
+ },
+
+ "orange": {
+ "0": { "value": "#ffede3" },
+ "100" : { "value": "#fcdccc" },
+ "200" : { "value": "#ffc6a4" },
+ "300" : { "value": "#ffb180" },
+ "400" : { "value": "#ff9c5d" },
+ "500" : { "value": "#fc8943" },
+ "600" : { "value": "#f57d33" },
+ "700" : { "value": "#ed7024" },
+ "800" : { "value": "#ce5511" },
+ "900" : { "value": "#962c0b" },
+ "1000" : { "value": "#601700" },
+ "1100" : { "value": "#2d130e" }
+ },
+
+ "neutral": {
+ "0" : { "value": "#FFFFFF" },
+ "100" : { "value": "#f3f4f4" },
+ "200" : { "value": "#dee1e1" },
+ "300" : { "value": "#c8cccc" },
+ "400" : { "value": "#b0b6b7" },
+ "500" : { "value": "#929a9b" },
+ "600" : { "value": "#6e797a" },
+ "700" : { "value": "#515e5f" },
+ "800" : { "value": "#364141" },
+ "900" : { "value": "#273333" },
+ "1000" : { "value": "#162020" },
+ "1100" : { "value": "#040404" }
+ },
+
+ "yellow": {
+ "0": { "value": "#fff8e2" },
+ "100" : { "value": "#fdefcd" },
+ "200" : { "value": "#ffe99a" },
+ "300" : { "value": "#ffe16e" },
+ "400" : { "value": "#ffd943" },
+ "500" : { "value": "#ffcd1c" },
+ "600" : { "value": "#ffbc00" },
+ "700" : { "value": "#dd9903" },
+ "800" : { "value": "#ba7506" },
+ "900" : { "value": "#944c0c" },
+ "1000" : { "value": "#542a00" },
+ "1100" : { "value": "#2d1a05" }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/__integration__/tokens/color/font.json b/__integration__/tokens/color/font.json
new file mode 100644
index 000000000..d15b7cc29
--- /dev/null
+++ b/__integration__/tokens/color/font.json
@@ -0,0 +1,20 @@
+{
+ "color": {
+ "font": {
+ "primary": { "value": "{color.core.neutral.1100.value}" },
+ "secondary": { "value": "{color.core.neutral.900.value}" },
+ "tertiary": { "value": "{color.core.neutral.800.value}" },
+
+ "interactive": {
+ "_": { "value": "{color.brand.primary.value}" },
+ "hover": { "value": "{color.brand.primary.value}" },
+ "active": { "value": "{color.brand.secondary.value}" },
+ "disabled": { "value": "{color.font.tertiary.value}" }
+ },
+
+ "danger": { "value": "{color.core.red.1000.value}" },
+ "warning": { "value": "{color.core.orange.1000.value}" },
+ "success": { "value": "{color.core.green.1000.value}" }
+ }
+ }
+}
\ No newline at end of file
diff --git a/__integration__/tokens/size/border.json b/__integration__/tokens/size/border.json
new file mode 100644
index 000000000..d70a7cd0c
--- /dev/null
+++ b/__integration__/tokens/size/border.json
@@ -0,0 +1,9 @@
+{
+ "size": {
+ "border": {
+ "radius": {
+ "large": { "value": 30 }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/__integration__/tokens/size/font.json b/__integration__/tokens/size/font.json
new file mode 100644
index 000000000..3056392aa
--- /dev/null
+++ b/__integration__/tokens/size/font.json
@@ -0,0 +1,10 @@
+{
+ "size": {
+ "font": {
+ "small": { "value": 0.75 },
+ "medium": { "value": 1 },
+ "large": { "value": 1.5 },
+ "xl": { "value": 2.25 }
+ }
+ }
+}
\ No newline at end of file
diff --git a/__integration__/tokens/size/padding.json b/__integration__/tokens/size/padding.json
new file mode 100644
index 000000000..6d2358d71
--- /dev/null
+++ b/__integration__/tokens/size/padding.json
@@ -0,0 +1,10 @@
+{
+ "size": {
+ "padding": {
+ "small": { "value": 0.5 },
+ "medium": { "value": 1 },
+ "large": { "value": 1 },
+ "xl": { "value": 1 }
+ }
+ }
+}
\ No newline at end of file
diff --git a/__tests__/__configs/test.json b/__tests__/__configs/test.json
index feab04c97..b5240d53c 100644
--- a/__tests__/__configs/test.json
+++ b/__tests__/__configs/test.json
@@ -77,6 +77,16 @@
"format": "ios/macros"
}
]
+ },
+ "react-native": {
+ "transformGroup": "react-native",
+ "buildPath": "__tests__/__output/react-native/",
+ "files": [
+ {
+ "destination": "style_dictionary.js",
+ "format": "javascript/es6"
+ }
+ ]
}
}
}
diff --git a/__tests__/__configs/test.json5 b/__tests__/__configs/test.json5
index 9c3a206d2..062efc323 100644
--- a/__tests__/__configs/test.json5
+++ b/__tests__/__configs/test.json5
@@ -84,5 +84,15 @@
},
],
},
+ 'react-native': {
+ transformGroup: 'react-native',
+ buildPath: '__tests__/__output/react-native/',
+ files: [
+ {
+ destination: 'style_dictionary.js',
+ format: 'javascript/es6'
+ }
+ ]
+ }
},
}
diff --git a/__tests__/__json_files/yaml.yaml b/__tests__/__json_files/yaml.yaml
new file mode 100644
index 000000000..71a193daa
--- /dev/null
+++ b/__tests__/__json_files/yaml.yaml
@@ -0,0 +1,2 @@
+foo: "bar"
+bar: "{foo}"
diff --git a/__tests__/__properties/colors.json b/__tests__/__properties/colors.json
index 3be148829..733922b05 100644
--- a/__tests__/__properties/colors.json
+++ b/__tests__/__properties/colors.json
@@ -85,6 +85,16 @@
"font": {
"link": { "value": "{color.base.blue.100.value}" }
+ },
+
+ "button": {
+ "base": { "value": "{color.base.blue.100.value}" },
+ "active": { "value": "{color.button.base.value}", "transformColor": {
+ "darken": 0.5
+ } },
+ "hover": { "value": "{color.button.active.value}", "transformColor": {
+ "darken": 0.2
+ } }
}
}
}
diff --git a/__tests__/__properties/paddings.1.json b/__tests__/__properties/paddings.1.json
new file mode 100644
index 000000000..4ca03cfcc
--- /dev/null
+++ b/__tests__/__properties/paddings.1.json
@@ -0,0 +1,24 @@
+{
+ "size": {
+ "padding": {
+ "tiny": {
+ "value": "3"
+ },
+ "small": {
+ "value": "5"
+ },
+ "base": {
+ "value": "10"
+ },
+ "large": {
+ "value": "15"
+ },
+ "xl": {
+ "value": "20"
+ },
+ "xxl": {
+ "value": "30"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/__tests__/__properties/paddings.json b/__tests__/__properties/paddings.json
index 4ca03cfcc..0ba5cc545 100644
--- a/__tests__/__properties/paddings.json
+++ b/__tests__/__properties/paddings.json
@@ -1,6 +1,9 @@
{
"size": {
"padding": {
+ "zero": {
+ "value": 0
+ },
"tiny": {
"value": "3"
},
diff --git a/__tests__/__setup.js b/__tests__/__setup.js
new file mode 100644
index 000000000..0d5db7dc2
--- /dev/null
+++ b/__tests__/__setup.js
@@ -0,0 +1,3 @@
+const constantDate = new Date('2000-01-01');
+global.Date = function() { return constantDate };
+global.Date.now = function() { return constantDate };
\ No newline at end of file
diff --git a/__tests__/buildFile.test.js b/__tests__/buildFile.test.js
index 225aa9774..fb770ac31 100644
--- a/__tests__/buildFile.test.js
+++ b/__tests__/buildFile.test.js
@@ -20,6 +20,12 @@ function format() {
return "hi";
}
+function nestedFormat() {
+ return "hi";
+}
+
+nestedFormat.nested = true;
+
describe('buildFile', () => {
beforeEach(() => {
@@ -32,31 +38,31 @@ describe('buildFile', () => {
it('should error if format doesnt exist or isnt a function', () => {
expect(
- buildFile.bind(null, '__tests__/__output/test.txt', {}, {}, {})
+ buildFile.bind(null, {destination: '__tests__/__output/test.txt'}, {}, {})
).toThrow('Please enter a valid file format');
expect(
- buildFile.bind(null, '__tests__/__output/test.txt', [], {}, {})
+ buildFile.bind(null, {destination: '__tests__/__output/test.txt', format: {}}, {}, {})
).toThrow('Please enter a valid file format');
expect(
- buildFile.bind(null, '__tests__/__output/test.txt', null, {}, {})
+ buildFile.bind(null, {destination: '__tests__/__output/test.txt', format: []}, {}, {})
).toThrow('Please enter a valid file format');
});
it('should error if destination doesnt exist or isnt a string', () => {
expect(
- buildFile.bind(null, {}, format, {}, {})
+ buildFile.bind(null, {format}, {}, {})
).toThrow('Please enter a valid destination');
expect(
- buildFile.bind(null, [], format, {}, {})
+ buildFile.bind(null, {format, destination: []}, {}, {})
).toThrow('Please enter a valid destination');
expect(
- buildFile.bind(null, null, format, {}, {})
+ buildFile.bind(null, {format, destination: {}}, {}, {})
).toThrow('Please enter a valid destination');
});
- let dest = './__tests__/__output/test.collisions';
- var PROPERTY_NAME_COLLISION_WARNINGS = GroupMessages.GROUP.PropertyNameCollisionWarnings + ":" + dest;
- it('should generate warning messages for output name collisions', () => {
+ describe('name collisions', () => {
+ let destination = './__tests__/__output/test.collisions';
+ let PROPERTY_NAME_COLLISION_WARNINGS = GroupMessages.GROUP.PropertyNameCollisionWarnings + ":" + destination;
let name = 'someName';
let properties = {
allProperties: [{
@@ -69,24 +75,61 @@ describe('buildFile', () => {
value: 'value2'
}]
};
+ it('should generate warning messages for output name collisions', () => {
+ GroupMessages.clear(PROPERTY_NAME_COLLISION_WARNINGS);
+ buildFile({destination, format}, {}, properties);
+
+ let collisions = properties.allProperties.map((properties) => {
+ let propertyPathText = chalk.keyword('orangered')(properties.path.join('.'));
+ let valueText = chalk.keyword('darkorange')(properties.value);
+ return propertyPathText + ' ' + valueText;
+ }).join('\n ');
+ let output = `Output name ${chalk.keyword('orangered').bold(name)} was generated by:\n ${collisions}`;
+ let expectJSON = JSON.stringify([output]);
+
+ expect(GroupMessages.count(PROPERTY_NAME_COLLISION_WARNINGS)).toBe(1);
+ expect(JSON.stringify(GroupMessages.fetchMessages(PROPERTY_NAME_COLLISION_WARNINGS))).toBe(expectJSON);
+ });
+
+ it('should not warn users if the format is a nested format', () => {
+ console.log = jest.fn();
+ buildFile({destination, format: nestedFormat}, {}, properties);
+ expect(console.log).toHaveBeenCalledWith(chalk.bold.green(`✔︎ ${destination}`));
+ });
+ });
+
- GroupMessages.clear(PROPERTY_NAME_COLLISION_WARNINGS);
- buildFile(dest, format, {}, properties);
+ let destEmptyProperties = './__tests__/__output/test.emptyProperties';
+ it('should warn when a file is not created because of empty properties', () => {
+ let dictionary = {
+ allProperties: [{
+ name: 'someName',
+ attributes: { category: 'category1' },
+ path: ['some', 'name', 'path1'],
+ value: 'value1'
+ }]
+ };
- let collisions = properties.allProperties.map((properties) => {
- let propertyPathText = chalk.keyword('orangered')(properties.path.join('.'));
- let valueText = chalk.keyword('darkorange')(properties.value);
- return propertyPathText + ' ' + valueText;
- }).join('\n ');
- let output = `Output name ${chalk.keyword('orangered').bold(name)} was generated by:\n ${collisions}`;
- let expectJSON = JSON.stringify([output]);
+ let filter = function(prop) {
+ return prop.attributes.category === 'category2';
+ }
- expect(GroupMessages.count(PROPERTY_NAME_COLLISION_WARNINGS)).toBe(1);
- expect(JSON.stringify(GroupMessages.fetchMessages(PROPERTY_NAME_COLLISION_WARNINGS))).toBe(expectJSON);
+ buildFile({
+ destination: destEmptyProperties,
+ format,
+ filter
+ }, {}, dictionary);
+ expect(helpers.fileExists('./__tests__/__output/test.emptyProperties')).toBeFalsy();
});
it('should write to a file properly', () => {
- buildFile('test.txt', format, {buildPath: '__tests__/__output/'}, {});
+ buildFile({
+ destination: 'test.txt',
+ format
+ },{
+ buildPath: '__tests__/__output/'
+ },{}
+ );
expect(helpers.fileExists('./__tests__/__output/test.txt')).toBeTruthy();
});
});
diff --git a/__tests__/buildFiles.test.js b/__tests__/buildFiles.test.js
index 7897a9f2c..fdd7b4e9e 100644
--- a/__tests__/buildFiles.test.js
+++ b/__tests__/buildFiles.test.js
@@ -13,7 +13,7 @@
var buildFiles = require('../lib/buildFiles');
var helpers = require('./__helpers');
-var _ = require('lodash');
+var _ = require('../lib/utils/es6_');
var dictionary = {
properties: {
@@ -93,13 +93,13 @@ describe('buildFiles', () => {
it('should throw if build path doesn\'t have a trailing slash', () => {
expect(
- buildFiles.bind(null, dictionary, platformWithBadBuildPath),
+ buildFiles.bind(null, dictionary, platformWithBadBuildPath)
).toThrow('Build path must end in a trailing slash or you will get weird file names.');
});
it('should throw if missing a format', () => {
expect(
- buildFiles.bind(null, dictionary, platformWithoutFormatter),
+ buildFiles.bind(null, dictionary, platformWithoutFormatter)
).toThrow('Please supply a format');
});
diff --git a/__tests__/buildPlatform.test.js b/__tests__/buildPlatform.test.js
index fc90b70c0..065665df4 100644
--- a/__tests__/buildPlatform.test.js
+++ b/__tests__/buildPlatform.test.js
@@ -24,7 +24,7 @@ describe('buildPlatform', () => {
it('should throw if passed a platform that doesn\'t exist', () => {
expect(
- StyleDictionaryExtended.buildPlatform.bind(test, 'foobar'),
+ StyleDictionaryExtended.buildPlatform.bind(test, 'foobar')
).toThrow('Platform "foobar" does not exist');
expect(
@@ -171,7 +171,7 @@ Unknown transformGroup "bar" found in platform "foo":
`;
expect(
- StyleDictionaryExtended.buildPlatform.bind(StyleDictionaryExtended, 'foo'),
+ StyleDictionaryExtended.buildPlatform.bind(StyleDictionaryExtended, 'foo')
).toThrow(err);
});
diff --git a/__tests__/cleanDir.test.js b/__tests__/cleanDir.test.js
index 57508e165..180c6a95a 100644
--- a/__tests__/cleanDir.test.js
+++ b/__tests__/cleanDir.test.js
@@ -31,9 +31,9 @@ describe('cleanDir', () => {
});
it('should delete a dir properly', () => {
- buildFile('test.txt', format, {buildPath: '__tests__/__output/extradir1/extradir2/'}, {});
- cleanFile('test.txt', format, {buildPath: '__tests__/__output/extradir1/extradir2/'}, {});
- cleanDir('test.txt', format, {buildPath: '__tests__/__output/extradir1/extradir2/'}, {});
+ buildFile({destination:'test.txt', format}, {buildPath: '__tests__/__output/extradir1/extradir2/'}, {});
+ cleanFile({destination:'test.txt', format}, {buildPath: '__tests__/__output/extradir1/extradir2/'}, {});
+ cleanDir({destination:'test.txt', format}, {buildPath: '__tests__/__output/extradir1/extradir2/'}, {});
expect(helpers.dirDoesNotExist('./__tests__/__output/extradir1/extradir2')).toBeTruthy();
expect(helpers.dirDoesNotExist('./__tests__/__output/extradir1')).toBeTruthy();
});
diff --git a/__tests__/cleanDirs.test.js b/__tests__/cleanDirs.test.js
index eb547fd0b..3726410f9 100644
--- a/__tests__/cleanDirs.test.js
+++ b/__tests__/cleanDirs.test.js
@@ -70,4 +70,14 @@ describe('cleanDirs', () => {
expect(helpers.dirDoesNotExist('./__tests__/__output/extradir1/extradir2')).toBeTruthy();
expect(helpers.dirDoesNotExist('./__tests__/__output/extradir1')).toBeTruthy();
});
+
+ it('should throw if buildPath does not end in a trailing slash', () => {
+ expect(
+ function() {
+ cleanDirs( {}, {
+ buildPath: "foo"
+ })
+ }
+ ).toThrow('Build path must end in a trailing slash or you will get weird file names.')
+ })
});
diff --git a/__tests__/cleanFile.test.js b/__tests__/cleanFile.test.js
index 87052d2c9..8f806c79a 100644
--- a/__tests__/cleanFile.test.js
+++ b/__tests__/cleanFile.test.js
@@ -30,14 +30,14 @@ describe('cleanFile', () => {
});
it('should delete a file properly', () => {
- buildFile('test.txt', format, {buildPath: '__tests__/__output/'}, {});
- cleanFile('test.txt', format, {buildPath: '__tests__/__output/'}, {});
+ buildFile({destination:'test.txt', format}, {buildPath: '__tests__/__output/'}, {});
+ cleanFile({destination:'test.txt', format}, {buildPath: '__tests__/__output/'}, {});
expect(helpers.fileDoesNotExist('./__tests__/__output/test.txt')).toBeTruthy();
});
describe('if a file does not exist', () => {
it('should not throw', () => {
- expect(() => cleanFile('non-existent.txt', format, { buildPath: '__tests__/__output/' }, {})).not.toThrow();
+ expect(() => cleanFile({destination: 'non-existent.txt', format}, { buildPath: '__tests__/__output/' }, {})).not.toThrow();
})
})
diff --git a/__tests__/common/formatHelpers/fileHeader.test.js b/__tests__/common/formatHelpers/fileHeader.test.js
new file mode 100644
index 000000000..6474241b8
--- /dev/null
+++ b/__tests__/common/formatHelpers/fileHeader.test.js
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fileHeader = require('../../../lib/common/formatHelpers/fileHeader');
+
+const defaultLine1 = `Do not edit directly`;
+const defaultLine2 = `Generated on Sat, 01 Jan 2000 00:00:00 GMT`;
+
+describe('common', () => {
+ describe('formatHelpers', () => {
+
+ describe('fileHeader', () => {
+ it(`should default to /**/ comment style`, () => {
+ const comment = fileHeader({});
+ expect(comment).toEqual(
+`/**
+ * ${defaultLine1}
+ * ${defaultLine2}
+ */
+
+`);
+ });
+
+ it(`should handle commentStyle short`, () => {
+ const comment = fileHeader({commentStyle: 'short'});
+ expect(comment).toEqual(
+`
+// ${defaultLine1}
+// ${defaultLine2}
+
+`);
+ });
+
+ it(`should handle commentStyle xml`, () => {
+ const comment = fileHeader({commentStyle: 'xml'});
+ expect(comment).toEqual(
+``);
+ });
+
+ it(`should handle showFileHeader option`, () => {
+ const comment = fileHeader({
+ file: {
+ options: {
+ showFileHeader: false
+ }
+ }
+ });
+ expect(comment).toEqual('');
+ });
+
+ it(`should handle custom fileHeader function`, () => {
+ const comment = fileHeader({
+ file: {
+ options: {
+ fileHeader: () => {
+ return [
+ `Never gonna give you up`,
+ `Never gonna let you down`
+ ]
+ }
+ }
+ }
+ });
+ expect(comment).toEqual(
+`/**
+ * Never gonna give you up
+ * Never gonna let you down
+ */
+
+`);
+ });
+
+ it(`should handle custom fileHeader function with default`, () => {
+ const comment = fileHeader({
+ file: {
+ options: {
+ fileHeader: (defaultMessage) => {
+ return [
+ ...defaultMessage,
+ `Never gonna give you up`,
+ `Never gonna let you down`
+ ]
+ }
+ }
+ }
+ });
+ expect(comment).toEqual(
+`/**
+ * ${defaultLine1}
+ * ${defaultLine2}
+ * Never gonna give you up
+ * Never gonna let you down
+ */
+
+`);
+ });
+
+ it('should handle custom formatting', () => {
+ const comment = fileHeader({formatting: {
+ prefix: ` `,
+ header: `{#\n`,
+ footer: `\n#}`
+ }});
+ expect(comment).toEqual(
+`{#
+ ${defaultLine1}
+ ${defaultLine2}
+#}`);
+ });
+ });
+ });
+});
\ No newline at end of file
diff --git a/__tests__/common/transforms.test.js b/__tests__/common/transforms.test.js
index 691e2ef2f..3aa097ebe 100644
--- a/__tests__/common/transforms.test.js
+++ b/__tests__/common/transforms.test.js
@@ -281,15 +281,11 @@ describe('common', () => {
expect(value).toBe("#aaaaaaff");
});
- it('should handle rgb colors', () => {
+ it('should handle rgba colors', () => {
var value = transforms["color/hex8"].transformer({
- value: "rgb(170,170,170)"
- });
- var value2 = transforms["color/hex8"].transformer({
value: "rgba(170,170,170,0.6)"
});
- expect(value).toBe("#aaaaaaff");
- expect(value2).toBe("#aaaaaa99");
+ expect(value).toBe("#aaaaaa99");
});
});
@@ -357,6 +353,23 @@ describe('common', () => {
});
});
+ describe('color/composeColor', () => {
+ it('should handle color without alpha', () => {
+ var value = transforms["color/composeColor"].transformer({
+ value: "#aaaaaa"
+ });
+ expect(value).toBe("Color(0xffaaaaaa)");
+ });
+
+ it('should handle color with alpha', () => {
+ var value = transforms["color/composeColor"].transformer({
+ value: "#aaaaaaff"
+ });
+ expect(value).toBe("Color(0xffaaaaaa)");
+ });
+
+ });
+
describe('color/UIColor', () => {
it('should handle normal colors', () => {
var value = transforms["color/UIColor"].transformer({
@@ -484,6 +497,28 @@ describe('common', () => {
});
});
+ describe("size/object", () => {
+ it("should work", () => {
+ var value = transforms["size/object"].transformer({
+ value: "1px"
+ });
+ expect(value.original).toBe("1px");
+ expect(value.number).toBe(1);
+ expect(value.decimal).toEqual(0.01);
+ expect(value.scale).toBe(16);
+ });
+ it('should work with custom base font', () => {
+ var value = transforms["size/object"].transformer({value: "1"}, {basePxFontSize: 14});
+ expect(value.original).toBe("1");
+ expect(value.number).toBe(1);
+ expect(value.decimal).toEqual(0.01);
+ expect(value.scale).toBe(14);
+ })
+ it('should throw an error if prop value is NaN', () => {
+ expect( () => transforms["size/object"].transformer({value: "a"})).toThrow();
+ })
+ });
+
describe('size/remToSp', () => {
it('should work', () => {
var value = transforms["size/remToSp"].transformer({
@@ -491,6 +526,10 @@ describe('common', () => {
});
expect(value).toBe("16.00sp");
});
+ it('converts rem to sp using custom base font', () => {
+ var value = transforms["size/remToSp"].transformer({value: "1"}, {basePxFontSize: 14});
+ expect(value).toBe("14.00sp");
+ });
it('should throw an error if prop value is Nan', () => {
expect( () => transforms["size/dp"].transformer({value: "a"})).toThrow();
});
@@ -503,6 +542,10 @@ describe('common', () => {
});
expect(value).toBe("16.00dp");
});
+ it('converts rem to dp using custom base font', () => {
+ var value = transforms["size/remToDp"].transformer({value: "1"}, {basePxFontSize: 14});
+ expect(value).toBe("14.00dp");
+ });
it('should throw an error if prop value is Nan', () => {
expect( () => transforms["size/dp"].transformer({value: "a"})).toThrow();
});
@@ -527,11 +570,75 @@ describe('common', () => {
});
expect(value).toBe("16.00f");
});
+ it('converts rem to pt using custom base font', () => {
+ var value = transforms["size/remToPt"].transformer({value: "1"}, {basePxFontSize: 14});
+ expect(value).toBe("14.00f");
+ });
it('should throw an error if prop value is Nan', () => {
expect( () => transforms["size/dp"].transformer({value: "a"})).toThrow();
});
});
+ describe('size/compose/remToSp', () => {
+ it('should work', () => {
+ var value = transforms["size/compose/remToSp"].transformer({
+ value: "1"
+ });
+ expect(value).toBe("16.00.sp");
+ });
+ it('converts rem to sp using custom base font', () => {
+ var value = transforms["size/compose/remToSp"].transformer({value: "1"}, {basePxFontSize: 14});
+ expect(value).toBe("14.00.sp");
+ });
+ it('should throw an error if prop value is Nan', () => {
+ expect( () => transforms["size/compose/remToSp"].transformer({value: "a"})).toThrow();
+ });
+ });
+
+ describe('size/compose/em', () => {
+ it('should work', () => {
+ var value = transforms["size/compose/em"].transformer({
+ value: "10"
+ });
+ expect(value).toBe("10.em");
+ });
+ it('should throw an error if prop value is Nan', () => {
+ expect( () => transforms["size/compose/em"].transformer({value: "a"})).toThrow();
+ });
+ });
+
+ describe('size/compose/remToDp', () => {
+ it('should work', () => {
+ var value = transforms["size/compose/remToDp"].transformer({
+ value: "1"
+ });
+ expect(value).toBe("16.00.dp");
+ });
+ it('converts rem to dp using custom base font', () => {
+ var value = transforms["size/compose/remToDp"].transformer({value: "1"}, {basePxFontSize: 14});
+ expect(value).toBe("14.00.dp");
+ });
+ it('should throw an error if prop value is Nan', () => {
+ expect( () => transforms["size/compose/remToDp"].transformer({value: "a"})).toThrow();
+ });
+ });
+
+ describe('size/swift/remToCGFloat', () => {
+ it('should work', () => {
+ var value = transforms["size/swift/remToCGFloat"].transformer({
+ value: "1"
+ });
+ expect(value).toBe("CGFloat(16.00)");
+ });
+ it('converts rem to CGFloat using custom base font', () => {
+ var value = transforms["size/swift/remToCGFloat"].transformer({value: "1"}, {basePxFontSize: 14});
+ expect(value).toBe("CGFloat(14.00)");
+ });
+ it('should throw an error if prop value is Nan', () => {
+ expect( () => transforms["size/rem/remToCGFloat"].transformer({value: "a"})).toThrow();
+ });
+ });
+
describe('size/remToPx', () => {
it('should work', () => {
var value = transforms["size/remToPx"].transformer({
@@ -539,11 +646,36 @@ describe('common', () => {
});
expect(value).toBe("16px");
});
+ it('converts rem to px using custom base font', () => {
+ var value = transforms["size/remToPx"].transformer({value: "1"}, {basePxFontSize: 14});
+ expect(value).toBe("14px");
+ });
it('should throw an error if prop value is Nan', () => {
expect( () => transforms["size/dp"].transformer({value: "a"})).toThrow();
});
});
+ describe('size/pxToRem', () => {
+ const pxToRemTransformer = transforms["size/pxToRem"].transformer;
+
+ ['12', '12px', '12rem'].forEach((value) => {
+ it(`ignoring unit, scales "${value}" to rem`, () => {
+ expect(pxToRemTransformer({value})).toBe('0.75rem');
+ });
+ });
+ it('converts pixel to rem using custom base font', () => {
+ expect(pxToRemTransformer({value: '14px'}, {basePxFontSize: 14})).toBe('1rem');
+ });
+ ['0', '0px', '0rem'].forEach((value) => {
+ it(`zero value "${value}" is returned without a unit`, () => {
+ expect(pxToRemTransformer({value})).toBe('0');
+ });
+ });
+ it('should throw an error if prop value is Nan', () => {
+ expect( () => pxToRemTransformer({value: "a"})).toThrow();
+ });
+ });
+
describe('size/rem', () => {
it('should work', () => {
var value = transforms["size/rem"].transformer({
@@ -563,6 +695,10 @@ describe('common', () => {
});
expect(value).toBe("16.00");
});
+ it('converts rem to double using custom base font', () => {
+ var value = transforms["size/flutter/remToDouble"].transformer({value: "1"}, {basePxFontSize: 14});
+ expect(value).toBe("14.00");
+ });
});
describe('content/quote', () => {
diff --git a/__tests__/exportPlatform.test.js b/__tests__/exportPlatform.test.js
index 62f961805..6602f6472 100644
--- a/__tests__/exportPlatform.test.js
+++ b/__tests__/exportPlatform.test.js
@@ -11,17 +11,17 @@
* and limitations under the License.
*/
-var helpers = require('./__helpers');
-var keys = require('lodash/keys');
-var config = helpers.fileToJSON(__dirname + '/__configs/test.json');
-var StyleDictionary = require('../index').extend(config);
+const helpers = require('./__helpers');
+const config = helpers.fileToJSON(__dirname + '/__configs/test.json');
+const StyleDictionary = require('../index');
+const styleDictionary = StyleDictionary.extend(config);
describe('exportPlatform', () => {
it('should throw if not given a platform', () => {
expect(
function(){
- StyleDictionary.exportPlatform()
+ styleDictionary.exportPlatform()
}
).toThrow();
});
@@ -29,7 +29,7 @@ describe('exportPlatform', () => {
it('should throw if not given a proper platform', () => {
expect(
function(){
- StyleDictionary.exportPlatform('foo');
+ styleDictionary.exportPlatform('foo');
}
).toThrow();
});
@@ -37,43 +37,154 @@ describe('exportPlatform', () => {
it('should not throw if given a proper platform', () => {
expect(
function(){
- StyleDictionary.exportPlatform('web');
+ styleDictionary.exportPlatform('web');
}
).not.toThrow();
});
it('should return an object', () => {
- var dictionary = StyleDictionary.exportPlatform('web');
+ var dictionary = styleDictionary.exportPlatform('web');
expect(typeof dictionary).toBe('object');
});
it('should have the same structure as the original properties', () => {
- var dictionary = StyleDictionary.exportPlatform('web');
- expect(keys(dictionary)).toEqual(keys(StyleDictionary.properties));
+ var dictionary = styleDictionary.exportPlatform('web');
+ expect(Object.keys(dictionary)).toEqual(Object.keys(styleDictionary.properties));
});
it('should have resolved references', () => {
- var dictionary = StyleDictionary.exportPlatform('web');
+ var dictionary = styleDictionary.exportPlatform('web');
expect(dictionary.color.font.link.value).toEqual(dictionary.color.base.blue['100'].value);
});
it('should have applied transforms', () => {
- var dictionary = StyleDictionary.exportPlatform('web');
+ var dictionary = styleDictionary.exportPlatform('web');
expect(dictionary.size.padding.base.value.indexOf('px')).toBeGreaterThan(0);
});
+ it('should have applied transforms for props with refs in it', () => {
+ const StyleDictionaryExtended = styleDictionary.extend({
+ platforms: {
+ test: {
+ transforms: ['color/css','color/darken']
+ }
+ }
+ });
+
+ StyleDictionaryExtended.registerTransform({
+ type: 'value',
+ name: 'color/darken',
+ transitive: true,
+ matcher: function(prop) { return !!prop.original.transformColor; },
+ transformer: function(prop) { return prop.value + '-darker'; }
+ });
+
+ const dictionary = StyleDictionaryExtended.exportPlatform('test');
+
+ expect(dictionary.color.button.active.value).toEqual('#0077CC-darker');
+ expect(dictionary.color.button.hover.value).toEqual('#0077CC-darker-darker');
+ });
+
it('should not have mutated the original properties', () => {
- var dictionary = StyleDictionary.exportPlatform('web');
- expect(dictionary.color.font.link.value).not.toEqual(StyleDictionary.properties.color.font.link.value);
- expect(StyleDictionary.properties.size.padding.base.value.indexOf('px')).toBe(-1);
+ var dictionary = styleDictionary.exportPlatform('web');
+ expect(dictionary.color.font.link.value).not.toEqual(styleDictionary.properties.color.font.link.value);
+ expect(styleDictionary.properties.size.padding.base.value.indexOf('px')).toBe(-1);
});
// Make sure when we perform transforms and resolve references
// we don't mutate the original object added to the property.
it('properties should have original value untouched', () => {
- var dictionary = StyleDictionary.exportPlatform('web');
+ var dictionary = styleDictionary.exportPlatform('web');
var properties = helpers.fileToJSON(__dirname + '/__properties/colors.json');
expect(dictionary.color.font.link.original.value).toEqual(properties.color.font.link.value);
});
+ it('should not mutate original value if value is an object', () => {
+ const dictionary = StyleDictionary.extend({
+ properties: {
+ color: {
+ red: {
+ value: {
+ h: "{hue.red}",
+ s: 50,
+ l: 50
+ }
+ }
+ },
+ hue: {
+ red: 20
+ }
+ },
+ platforms: {
+ web: {
+ transformGroup: 'web'
+ }
+ }
+ }).exportPlatform('web');
+ expect(dictionary.color.red.original.value.h).toEqual("{hue.red}");
+ expect(dictionary.color.red.value.h).toEqual(20);
+ });
+
+ describe('reference warnings', () => {
+ const errorMessage = `Problems were found when trying to resolve property references`;
+ const platforms = {
+ css: {
+ transformGroup: `css`
+ }
+ }
+
+ it('should throw if there are simple property reference errors', () => {
+ const properties = {
+ a: "#ff0000",
+ b: "{c}"
+ }
+ expect(
+ function() {
+ StyleDictionary.extend({
+ properties,
+ platforms
+ }).exportPlatform('css')
+ }
+ ).toThrow(errorMessage);
+ });
+
+ it('should throw if there are circular reference errors', () => {
+ const properties = {
+ a: "{b}",
+ b: "{a}"
+ }
+ expect(
+ function() {
+ StyleDictionary.extend({
+ properties,
+ platforms
+ }).exportPlatform('css')
+ }
+ ).toThrow(errorMessage);
+ });
+
+ it('should throw if there are complex property reference errors', () => {
+ const properties = {
+ color: {
+ core: {
+ red: { valuer: "#ff0000" }, // notice misspelling
+ blue: { "value:": "#0000ff" }
+ },
+ danger: { value: "{color.core.red.value}" },
+ warning: { value: "{color.base.red.valuer}" },
+ info: { value: "{color.core.blue.value}" },
+ error: { value: "{color.danger.value}" }
+ }
+ }
+ expect(
+ function() {
+ StyleDictionary.extend({
+ properties,
+ platforms
+ }).exportPlatform('css')
+ }
+ ).toThrow(errorMessage);
+ });
+ });
+
});
diff --git a/__tests__/extend.test.js b/__tests__/extend.test.js
index 0bce2ad76..fda698d13 100644
--- a/__tests__/extend.test.js
+++ b/__tests__/extend.test.js
@@ -13,7 +13,16 @@
var helpers = require('./__helpers');
var StyleDictionary = require('../index');
-var _ = require('lodash');
+var _ = require('../lib/utils/es6_');
+
+function traverseObj(obj, fn) {
+ for (let key in obj) {
+ fn.apply(this, [obj, key, obj[key]]);
+ if (obj[key] && typeof obj[key] === 'object') {
+ traverseObj(obj[key], fn);
+ }
+ }
+}
var test_props = {
size: {
@@ -24,7 +33,6 @@ var test_props = {
};
describe('extend', () => {
-
describe('method signature', () => {
it('should accept a string as a path to a JSON file', () => {
var StyleDictionaryExtended = StyleDictionary.extend(__dirname + '/__configs/test.json');
@@ -77,17 +85,31 @@ describe('extend', () => {
it('should build the properties object if an include is given', () => {
var StyleDictionaryExtended = StyleDictionary.extend({
- "include": [__dirname + "/__properties/paddings.json"]
+ include: [__dirname + "/__properties/paddings.json"]
});
- expect(StyleDictionaryExtended.properties).toEqual(helpers.fileToJSON(__dirname + "/__properties/paddings.json"));
+ var output = helpers.fileToJSON(__dirname + "/__properties/paddings.json");
+ traverseObj(output, (obj) => {
+ if (obj.hasOwnProperty('value') && !obj.filePath) {
+ obj.filePath = __dirname + "/__properties/paddings.json";
+ obj.isSource = false;
+ }
+ });
+ expect(StyleDictionaryExtended.properties).toEqual(output);
});
it('should override existing properties if include is given', () => {
var StyleDictionaryExtended = StyleDictionary.extend({
properties: test_props,
- include: [__dirname + "/__properties/paddings.json"]
+ "include": [__dirname + "/__properties/paddings.json"]
});
- expect(StyleDictionaryExtended.properties).toEqual(helpers.fileToJSON(__dirname + "/__properties/paddings.json"));
+ var output = helpers.fileToJSON(__dirname + "/__properties/paddings.json");
+ traverseObj(output, (obj) => {
+ if (obj.hasOwnProperty('value') && !obj.filePath) {
+ obj.filePath = __dirname + "/__properties/paddings.json";
+ obj.isSource = false;
+ }
+ });
+ expect(StyleDictionaryExtended.properties).toEqual(output);
});
it('should update properties if there are includes', () => {
@@ -106,7 +128,6 @@ describe('extend', () => {
});
});
-
describe('source', () => {
it('should throw if source isnt an array', () => {
expect(
@@ -125,7 +146,29 @@ describe('extend', () => {
var StyleDictionaryExtended = StyleDictionary.extend({
"source": [__dirname + "/__properties/paddings.json"]
});
- expect(StyleDictionaryExtended.properties).toEqual(helpers.fileToJSON(__dirname + "/__properties/paddings.json"));
+ var output = helpers.fileToJSON(__dirname + "/__properties/paddings.json");
+ traverseObj(output, (obj) => {
+ if (obj.hasOwnProperty('value') && !obj.filePath) {
+ obj.filePath = __dirname + "/__properties/paddings.json";
+ obj.isSource = true;
+ }
+ });
+ expect(StyleDictionaryExtended.properties).toEqual(output);
+ });
+
+ it('should use relative filePaths for the filePath property', () => {
+ var filePath = "__tests__/__properties/paddings.json";
+ var StyleDictionaryExtended = StyleDictionary.extend({
+ "source": [filePath]
+ });
+ var output = helpers.fileToJSON(__dirname + "/__properties/paddings.json");
+ traverseObj(output, (obj) => {
+ if (obj.hasOwnProperty('value') && !obj.filePath) {
+ obj.filePath = filePath;
+ obj.isSource = true;
+ }
+ });
+ expect(StyleDictionaryExtended.properties).toEqual(output);
});
it('should override existing properties source is given', () => {
@@ -133,26 +176,39 @@ describe('extend', () => {
properties: test_props,
source: [__dirname + "/__properties/paddings.json"]
});
- expect(StyleDictionaryExtended.properties).toEqual(helpers.fileToJSON(__dirname + "/__properties/paddings.json"));
+ var output = helpers.fileToJSON(__dirname + "/__properties/paddings.json");
+ traverseObj(output, (obj) => {
+ if (obj.hasOwnProperty('value') && !obj.filePath) {
+ obj.filePath = __dirname + "/__properties/paddings.json";
+ obj.isSource = true;
+ }
+ });
+ expect(StyleDictionaryExtended.properties).toEqual(output);
});
});
-
// This is to allow style dictionaries to depend on other style dictionaries and
// override properties. Useful for skinning
it('should not throw a collision error if a source file collides with an include', () => {
var StyleDictionaryExtended = StyleDictionary.extend({
- include: [__dirname + "/__properties/paddings.json"],
+ include: [__dirname + "/__properties/paddings.1.json"],
source: [__dirname + "/__properties/paddings.json"],
log: 'error'
});
- expect(StyleDictionaryExtended.properties).toEqual(helpers.fileToJSON(__dirname + "/__properties/paddings.json"));
+ var output = helpers.fileToJSON(__dirname + "/__properties/paddings.json");
+ traverseObj(output, (obj) => {
+ if (obj.hasOwnProperty('value') && !obj.filePath) {
+ obj.filePath = __dirname + "/__properties/paddings.json";
+ obj.isSource = true;
+ }
+ });
+ expect(StyleDictionaryExtended.properties).toEqual(output);
});
it('should throw a error if the collision is in source files and log is set to error', () => {
expect(
StyleDictionary.extend.bind(null, {
- source: [__dirname + "/__properties/paddings.json", __dirname + "/__properties/paddings.json"],
+ source: [__dirname + "/__properties/paddings.1.json", __dirname + "/__properties/paddings.json"],
log: 'error'
})
).toThrow('Collisions detected');
diff --git a/__tests__/filterProperties.test.js b/__tests__/filterProperties.test.js
index 157629d8f..c435bbf29 100644
--- a/__tests__/filterProperties.test.js
+++ b/__tests__/filterProperties.test.js
@@ -14,7 +14,7 @@
var filterProperties = require('../lib/filterProperties');
var helpers = require('./__helpers');
var flattenProperties = require("../lib/utils/flattenProperties");
-var _ = require('lodash');
+var _ = require('../lib/utils/es6_');
var colorRed = {
"value": "#FF0000",
diff --git a/__tests__/formats/__constants.js b/__tests__/formats/__constants.js
new file mode 100644
index 000000000..de6c91b27
--- /dev/null
+++ b/__tests__/formats/__constants.js
@@ -0,0 +1,64 @@
+const createDictionary = require("../../lib/utils/createDictionary");
+
+const colorPropertyName = "color-base-red-400";
+const colorPropertyValue = "#EF5350";
+
+const colorProperties = {
+ color: {
+ base: {
+ red: {
+ 400: {
+ "name": colorPropertyName,
+ "value": colorPropertyValue,
+ "original": {
+ "value": colorPropertyValue
+ },
+ "attributes": {
+ "category": "color",
+ "type": "base",
+ "item": "red",
+ "subitem": "400"
+ },
+ "path": [
+ "color",
+ "base",
+ "red",
+ "400"
+ ]
+ }
+ }
+ }
+ }
+};
+
+const iconPropertyName = "content-icon-email";
+const iconPropertyValue = "'\\E001'";
+const itemClass = "3d_rotation";
+
+const iconProperties = {
+ content: {
+ icon: {
+ email: {
+ "name": iconPropertyName,
+ "value": iconPropertyValue,
+ "original": {
+ "value": iconPropertyValue
+ },
+ "attributes": {
+ "category": "content",
+ "type": "icon",
+ "item": itemClass
+ },
+ path: ['content','icon','email']
+ }
+ }
+ }
+};
+
+const colorDictionary = createDictionary({ properties: colorProperties });
+const iconDictionary = createDictionary({ properties: iconProperties });
+
+module.exports = {
+ colorDictionary,
+ iconDictionary
+}
\ No newline at end of file
diff --git a/__tests__/formats/__snapshots__/all.test.js.snap b/__tests__/formats/__snapshots__/all.test.js.snap
index 86f5b33de..42cc329bd 100644
--- a/__tests__/formats/__snapshots__/all.test.js.snap
+++ b/__tests__/formats/__snapshots__/all.test.js.snap
@@ -53,6 +53,20 @@ exports[`formats all should match android/integers snapshot 1`] = `
"
`;
+exports[`formats all should match android/resources snapshot 1`] = `
+"
+
+
+
+ #FF0000
+
+
+"
+`;
+
exports[`formats all should match android/strings snapshot 1`] = `
"
@@ -66,6 +80,27 @@ exports[`formats all should match android/strings snapshot 1`] = `
"
`;
+exports[`formats all should match compose/object snapshot 1`] = `
+"
+
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+
+
+package ;
+
+
+import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.unit.*
+
+object {
+ /** comment */
+ val color_red = #FF0000
+}
+"
+`;
+
exports[`formats all should match css/fonts.css snapshot 1`] = `
"
"
@@ -88,17 +123,18 @@ exports[`formats all should match flutter/class.dart snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
+
import 'dart:ui';
class {
._();
-
- static const color_red = #FF0000;
+
+ static const color_red = #FF0000; /* comment */
}"
`;
@@ -107,12 +143,12 @@ exports[`formats all should match ios/colors.h snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
-#import
+#import
typedef NS_ENUM(NSInteger, ) {
color_red
@@ -130,12 +166,12 @@ exports[`formats all should match ios/colors.m snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
-#import \\".h\\"
+#import \\".h\\"
@implementation
@@ -165,15 +201,14 @@ exports[`formats all should match ios/macros snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
+
#import
#import
-
-
#define color_red #FF0000
"
@@ -211,9 +246,10 @@ exports[`formats all should match ios/singleton.h snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
+
#import
#import
@@ -233,9 +269,10 @@ exports[`formats all should match ios/singleton.m snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
+
#import \\".h\\"
@@ -279,12 +316,12 @@ exports[`formats all should match ios/static.h snapshot 1`] = `
"
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
-#import
+#import
extern const color_red;
@@ -296,12 +333,12 @@ exports[`formats all should match ios/static.m snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
-#import \\".h\\"
+#import \\".h\\"
const color_red = #FF0000;
@@ -313,12 +350,12 @@ exports[`formats all should match ios/strings.h snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
-#import
+#import
extern NSString * const color_red;
@@ -334,12 +371,12 @@ exports[`formats all should match ios/strings.m snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
-#import \\".h\\"
+#import \\".h\\"
NSString * const color_red = #FF0000;
@@ -375,15 +412,15 @@ exports[`formats all should match ios-swift/class.swift snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
import UIKit
public class {
- public static let color_red = #FF0000
+ public static let color_red = #FF0000 /* comment */
}
"
`;
@@ -393,14 +430,15 @@ exports[`formats all should match ios-swift/enum.swift snapshot 1`] = `
//
// __output/
//
+
// Do not edit directly
// Generated on Sat, 01 Jan 2000 00:00:00 GMT
-//
+
import UIKit
public enum {
- public static let color_red = #FF0000
+ public static let color_red = #FF0000 /* comment */
}
"
`;
@@ -442,6 +480,17 @@ module.exports = {
};"
`;
+exports[`formats all should match javascript/module-flat snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+module.exports = {
+ \\"color_red\\": \\"#FF0000\\"
+};"
+`;
+
exports[`formats all should match javascript/object snapshot 1`] = `
"/**
* Do not edit directly
@@ -568,10 +617,10 @@ exports[`formats all should match less/variables snapshot 1`] = `
exports[`formats all should match sass/map-deep snapshot 1`] = `
"
-/*
- Do not edit directly
- Generated on Sat, 01 Jan 2000 00:00:00 GMT
-*/
+/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
$color_red: #FF0000 !default; // comment
@@ -585,10 +634,10 @@ $tokens: (
exports[`formats all should match sass/map-flat snapshot 1`] = `
"
-/*
- Do not edit directly
- Generated on Sat, 01 Jan 2000 00:00:00 GMT
-*/
+/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
$tokens: (
// comment
@@ -607,10 +656,10 @@ exports[`formats all should match scss/icons snapshot 1`] = `
exports[`formats all should match scss/map-deep snapshot 1`] = `
"
-/*
- Do not edit directly
- Generated on Sat, 01 Jan 2000 00:00:00 GMT
-*/
+/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
$color_red: #FF0000 !default; // comment
@@ -624,10 +673,10 @@ $tokens: (
exports[`formats all should match scss/map-flat snapshot 1`] = `
"
-/*
- Do not edit directly
- Generated on Sat, 01 Jan 2000 00:00:00 GMT
-*/
+/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
$tokens: (
// comment
@@ -670,3 +719,51 @@ exports[`formats all should match sketch/palette/v2 snapshot 1`] = `
]
}"
`;
+
+exports[`formats all should match stylus/variables snapshot 1`] = `
+"
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+
+$color_red= #FF0000; // comment"
+`;
+
+exports[`formats all should match typescript/es6-declarations snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+export const color_red : string; // comment"
+`;
+
+exports[`formats all should match typescript/module-declarations snapshot 1`] = `
+"/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
+
+export default tokens;
+
+declare interface DesignToken {
+ value: any;
+ name?: string;
+ comment?: string;
+ themeable?: boolean;
+ attributes?: {
+ category?: string;
+ type?: string;
+ item?: string;
+ subitem?: string;
+ state?: string;
+ [key: string]: any;
+ };
+ [key: string]: any;
+}
+
+declare const tokens: {
+ \\"color\\": {
+ \\"red\\": DesignToken
+ }
+}"
+`;
diff --git a/__tests__/formats/__snapshots__/androidResources.test.js.snap b/__tests__/formats/__snapshots__/androidResources.test.js.snap
new file mode 100644
index 000000000..b172aa532
--- /dev/null
+++ b/__tests__/formats/__snapshots__/androidResources.test.js.snap
@@ -0,0 +1,50 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`formats android/resources should match default snapshot 1`] = `
+"
+
+
+
+ 12rem
+ 18rem
+ #ff0000
+ #ffffff
+
+
+"
+`;
+
+exports[`formats android/resources with resourceMap override should match snapshot 1`] = `
+"
+
+
+
+ #F2F3F4
+ #000000
+
+
+"
+`;
+
+exports[`formats android/resources with resourceType override should match snapshot 1`] = `
+"
+
+
+
+ 12rem
+ 18rem
+ #ff0000
+ #ffffff
+
+
+"
+`;
diff --git a/__tests__/formats/__snapshots__/scssMaps.test.js.snap b/__tests__/formats/__snapshots__/scssMaps.test.js.snap
index 2c19142cf..8a24215f5 100644
--- a/__tests__/formats/__snapshots__/scssMaps.test.js.snap
+++ b/__tests__/formats/__snapshots__/scssMaps.test.js.snap
@@ -2,10 +2,10 @@
exports[`formats scss/map-deep scss/map-deep snapshot 1`] = `
"
-/*
- Do not edit directly
- Generated on Sat, 01 Jan 2000 00:00:00 GMT
-*/
+/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
$size-font-small: 12rem !default;
$size-font-large: 18rem !default;
@@ -37,10 +37,10 @@ $tokens: (
exports[`formats scss/map-flat scss/map-flat snapshot 1`] = `
"
-/*
- Do not edit directly
- Generated on Sat, 01 Jan 2000 00:00:00 GMT
-*/
+/**
+ * Do not edit directly
+ * Generated on Sat, 01 Jan 2000 00:00:00 GMT
+ */
$tokens: (
'size-font-small': 12rem,
diff --git a/__tests__/formats/all.test.js b/__tests__/formats/all.test.js
index 417033b56..d24c16520 100644
--- a/__tests__/formats/all.test.js
+++ b/__tests__/formats/all.test.js
@@ -12,7 +12,9 @@
*/
var formats = require('../../lib/common/formats');
-var _ = require('lodash');
+var createDictionary = require('../../lib/utils/createDictionary');
+var createFormatArgs = require('../../lib/utils/createFormatArgs');
+var _ = require('../../lib/utils/es6_');
var file = {
"destination": "__output/",
@@ -24,37 +26,21 @@ var file = {
}
};
-var dictionary = {
- "allProperties": [{
+var properties = {
+ "color": {
+ "red": {
value: '#FF0000',
original: { value: '#FF0000' },
name: 'color_red',
comment: 'comment',
attributes: {
- category: 'color',
- type: 'red',
- item: undefined,
- subitem: undefined,
- state: undefined
+ category: 'color',
+ type: 'red',
+ item: undefined,
+ subitem: undefined,
+ state: undefined
},
path: ['color','red']
- }],
- "properties": {
- "color": {
- "red": {
- value: '#FF0000',
- original: { value: '#FF0000' },
- name: 'color_red',
- comment: 'comment',
- attributes: {
- category: 'color',
- type: 'red',
- item: undefined,
- subitem: undefined,
- state: undefined
- },
- path: ['color','red']
- }
}
}
};
@@ -62,15 +48,13 @@ var dictionary = {
describe('formats', () => {
_.each(_.keys(formats), function(key) {
- const constantDate = new Date('2000-01-01');
- const globalDate = global.Date;
- global.Date = function() { return constantDate };
-
var formatter = formats[key].bind(file);
- var output = formatter(dictionary, file);
-
- // reset the global Date object
- global.Date = globalDate;
+ const dictionary = createDictionary({ properties });
+ var output = formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {},
+ }), {}, file);
describe('all', () => {
diff --git a/__tests__/formats/androidResources.test.js b/__tests__/formats/androidResources.test.js
new file mode 100644
index 000000000..49d4780ba
--- /dev/null
+++ b/__tests__/formats/androidResources.test.js
@@ -0,0 +1,167 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const formats = require('../../lib/common/formats');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
+
+const properties = {
+ "size": {
+ "font": {
+ "small": {
+ "value": "12rem",
+ "original": {
+ "value": "12px"
+ },
+ "name": "size-font-small",
+ "attributes": {
+ "category": "size",
+ "type": "font",
+ "item": "small"
+ },
+ "path": [
+ "size",
+ "font",
+ "small"
+ ]
+ },
+ "large": {
+ "value": "18rem",
+ "original": {
+ "value": "18px"
+ },
+ "name": "size-font-large",
+ "attributes": {
+ "category": "size",
+ "type": "font",
+ "item": "large"
+ },
+ "path": [
+ "size",
+ "font",
+ "large"
+ ]
+ }
+ }
+ },
+ "color": {
+ "base": {
+ "red": {
+ "value": "#ff0000",
+ "comment": "comment",
+ "original": {
+ "value": "#FF0000",
+ "comment": "comment"
+ },
+ "name": "color-base-red",
+ "attributes": {
+ "category": "color",
+ "type": "base",
+ "item": "red"
+ },
+ "path": [
+ "color",
+ "base",
+ "red"
+ ]
+ }
+ },
+ "white": {
+ "value": "#ffffff",
+ "original": {
+ "value": "#ffffff"
+ },
+ "name": "color-white",
+ "attributes": {
+ "category": "color",
+ "type": "white"
+ },
+ "path": [
+ "color",
+ "white"
+ ]
+ }
+ },
+};
+
+const customProperties = {
+ backgroundColor: {
+ secondary: {
+ name: "backgroundColorSecondary",
+ value: "#F2F3F4",
+ attributes: {
+ category: "backgroundColor"
+ }
+ }
+ },
+ fontColor: {
+ primary: {
+ name: "fontColorPrimary",
+ value: "#000000",
+ attributes: {
+ category: "fontColor"
+ }
+ }
+ },
+};
+
+const format = formats['android/resources'];
+const file = {
+ "destination": "__output/",
+ "format": 'android/resources'
+};
+
+const dictionary = createDictionary({ properties });
+const customDictionary = createDictionary({ properties: customProperties });
+
+describe('formats', () => {
+
+ describe(`android/resources`, () => {
+
+ it('should match default snapshot', () => {
+ expect(format(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file)).toMatchSnapshot();
+ });
+
+ it('with resourceType override should match snapshot', () => {
+ const file = {resourceType: "dimen"}
+ expect(format(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file)).toMatchSnapshot();
+ });
+
+ it('with resourceMap override should match snapshot', () => {
+ const file = {
+ resourceMap: {
+ color: 'color',
+ fontColor: 'color',
+ backgroundColor: 'color'
+ }
+ };
+ expect(
+ format(createFormatArgs({
+ dictionary: customDictionary,
+ file,
+ platform: {}
+ }), {}, file)
+ ).toMatchSnapshot();
+ });
+
+ });
+
+});
diff --git a/__tests__/formats/es6Constants.test.js b/__tests__/formats/es6Constants.test.js
index c0728424d..c2db78ac0 100644
--- a/__tests__/formats/es6Constants.test.js
+++ b/__tests__/formats/es6Constants.test.js
@@ -10,11 +10,13 @@
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
-var fs = require('fs-extra');
-var helpers = require('../__helpers');
-var formats = require('../../lib/common/formats');
+const fs = require('fs-extra');
+const helpers = require('../__helpers');
+const formats = require('../../lib/common/formats');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
-var file = {
+const file = {
"destination": "__output/",
"format": "javascript/es6",
"filter": {
@@ -24,29 +26,32 @@ var file = {
}
};
-var dictionary = {
- "allProperties": [{
- "name": "red",
- "value": "#EF5350",
- "original": {
- "value": "#EF5350"
- },
- "attributes": {
- "category": "color",
- "type": "base",
- "item": "red",
- "subitem": "400"
- },
- "path": [
- "color",
- "base",
- "red",
- "400"
- ]
- }]
+const properties = {
+ color: {
+ red: {
+ "name": "red",
+ "value": "#EF5350",
+ "original": {
+ "value": "#EF5350"
+ },
+ "attributes": {
+ "category": "color",
+ "type": "base",
+ "item": "red",
+ "subitem": "400"
+ },
+ "path": [
+ "color",
+ "base",
+ "red",
+ "400"
+ ]
+ }
+ }
};
-var formatter = formats['javascript/es6'].bind(file);
+const formatter = formats['javascript/es6'].bind(file);
+const dictionary = createDictionary({ properties });
describe('formats', () => {
describe('javascript/es6', () => {
@@ -59,8 +64,12 @@ describe('formats', () => {
});
it('should be a valid JS file', () => {
- fs.writeFileSync('./__tests__/__output/output.js', formatter(dictionary) );
- var test = require('../__output/output.js');
+ fs.writeFileSync('./__tests__/__output/output.js', formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file) );
+ const test = require('../__output/output.js');
expect(test.red).toEqual(dictionary.allProperties[0].value);
});
});
diff --git a/__tests__/formats/javascriptModule.test.js b/__tests__/formats/javascriptModule.test.js
index 6d561ff12..8f24f4b59 100644
--- a/__tests__/formats/javascriptModule.test.js
+++ b/__tests__/formats/javascriptModule.test.js
@@ -11,11 +11,13 @@
* and limitations under the License.
*/
-var fs = require('fs-extra');
-var helpers = require('../__helpers');
-var formats = require('../../lib/common/formats');
+const fs = require('fs-extra');
+const helpers = require('../__helpers');
+const formats = require('../../lib/common/formats');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
-var file = {
+const file = {
"destination": "__output/",
"format": "javascript/module",
"filter": {
@@ -25,15 +27,14 @@ var file = {
}
};
-var dictionary = {
- "properties": {
- "color": {
- "red": {"value": "#FF0000"}
- }
+const properties = {
+ "color": {
+ "red": {"value": "#FF0000"}
}
};
-var formatter = formats['javascript/module'].bind(file);
+const formatter = formats['javascript/module'].bind(file);
+const dictionary = createDictionary({ properties });
describe('formats', () => {
describe('javascript/module', () => {
@@ -47,8 +48,12 @@ describe('formats', () => {
});
it('should be a valid JS file', () => {
- fs.writeFileSync('./__tests__/__output/output.js', formatter(dictionary) );
- var test = require('../__output/output.js');
+ fs.writeFileSync('./__tests__/__output/output.js', formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file) );
+ const test = require('../__output/output.js');
expect(test.color.red.value).toEqual(dictionary.properties.color.red.value);
});
diff --git a/__tests__/formats/javascriptModuleFlat.test.js b/__tests__/formats/javascriptModuleFlat.test.js
new file mode 100644
index 000000000..47378aeac
--- /dev/null
+++ b/__tests__/formats/javascriptModuleFlat.test.js
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const fs = require('fs-extra');
+const helpers = require('../__helpers');
+const formats = require('../../lib/common/formats');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
+
+const file = {
+ "destination": "__output/",
+ "format": "javascript/module-flat",
+};
+const properties = {
+ color: {
+ red: {
+ value: "#EF5350",
+ name: "ColorRed",
+ original: {
+ value: "#EF5350"
+ },
+ attributes: {
+ category: "color",
+ type: "red"
+ },
+ path: [
+ "color",
+ "red"
+ ]
+ }
+ }
+};
+
+const formatter = formats['javascript/module-flat'].bind(file);
+const dictionary = createDictionary({ properties });
+
+describe('formats', () => {
+ describe('javascript/module-flat', () => {
+
+ beforeEach(() => {
+ helpers.clearOutput();
+ });
+
+ afterEach(() => {
+ helpers.clearOutput();
+ });
+
+ it('should be a valid JS file', () => {
+ fs.writeFileSync('./__tests__/__output/output.js', formatter(createFormatArgs({
+ dictionary,
+ file: {},
+ platform: {}
+ }), {}, {}) );
+ const test = require('../__output/output.js');
+ expect(test.ColorRed).toEqual(dictionary.allProperties[0].value);
+ });
+
+ });
+});
diff --git a/__tests__/formats/javascriptObject.test.js b/__tests__/formats/javascriptObject.test.js
index 94ad8500f..50276a2d6 100644
--- a/__tests__/formats/javascriptObject.test.js
+++ b/__tests__/formats/javascriptObject.test.js
@@ -11,35 +11,38 @@
* and limitations under the License.
*/
-var formats = require('../../lib/common/formats');
-var vm = require('vm');
+const formats = require('../../lib/common/formats');
+const vm = require('vm');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
-var file = {
+const file = {
"destination": "__output/",
"format": "javascript/object",
"name": "foo"
};
-var dictionary = {
- "properties": {
- "color": {
- "red": {"value": "#FF0000"}
- }
+const properties = {
+ "color": {
+ "red": {"value": "#FF0000"}
}
};
-var formatter = formats['javascript/object'].bind(file);
+const formatter = formats['javascript/object'].bind(file);
+const dictionary = createDictionary({ properties });
describe('formats', () => {
describe('javascript/object', () => {
- it('should be valid JS syntax', done => {
- try {
- vm.runInNewContext(formatter(dictionary))
- return done();
- } catch (err) {
- return done(new Error(err));
- }
+ it('should be valid JS syntax', () => {
+ const script = new vm.Script(formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file));
+ const context = {};
+ script.runInNewContext(context);
+ expect(context.foo.color.red.value).toEqual(dictionary.properties.color.red.value);
});
});
diff --git a/__tests__/formats/javascriptUmd.test.js b/__tests__/formats/javascriptUmd.test.js
index 91752177e..59ff5c7c5 100644
--- a/__tests__/formats/javascriptUmd.test.js
+++ b/__tests__/formats/javascriptUmd.test.js
@@ -11,11 +11,13 @@
* and limitations under the License.
*/
-var formats = require('../../lib/common/formats');
-var fs = require('fs-extra');
-var helpers = require('../__helpers');
+const formats = require('../../lib/common/formats');
+const fs = require('fs-extra');
+const helpers = require('../__helpers');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
-var file = {
+const file = {
"destination": "__output/",
"format": "javascript/umd",
"filter": {
@@ -25,15 +27,14 @@ var file = {
}
};
-var dictionary = {
- "properties": {
- "color": {
- "red": {"value": "#FF0000"}
- }
+const properties = {
+ "color": {
+ "red": {"value": "#FF0000"}
}
};
-var formatter = formats['javascript/umd'].bind(file);
+const formatter = formats['javascript/umd'].bind(file);
+const dictionary = createDictionary({ properties });
describe('formats', () => {
describe('javascript/umd', () => {
@@ -47,8 +48,12 @@ describe('formats', () => {
});
it('should be a valid JS file', () => {
- fs.writeFileSync('./__tests__/__output/umd.js', formatter(dictionary) );
- var test = require('../__output/umd.js');
+ fs.writeFileSync('./__tests__/__output/umd.js', formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file) );
+ const test = require('../__output/umd.js');
expect(test.color.red.value).toEqual(dictionary.properties.color.red.value);
});
diff --git a/__tests__/formats/json.test.js b/__tests__/formats/json.test.js
index b59991b88..422ad6bb6 100644
--- a/__tests__/formats/json.test.js
+++ b/__tests__/formats/json.test.js
@@ -11,24 +11,25 @@
* and limitations under the License.
*/
-var formats = require('../../lib/common/formats');
-var fs = require('fs-extra');
-var helpers = require('../__helpers');
+const formats = require('../../lib/common/formats');
+const fs = require('fs-extra');
+const helpers = require('../__helpers');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
-var file = {
+const file = {
"destination": "__output/",
"format": "json"
};
-var dictionary = {
- "properties": {
- "color": {
- "red": {"value": "#FF0000"}
- }
+const properties = {
+ "color": {
+ "red": {"value": "#FF0000"}
}
};
-var formatter = formats['json'].bind(file);
+const formatter = formats['json'].bind(file);
+const dictionary = createDictionary({ properties });
describe('formats', () => {
describe('json', () => {
@@ -42,8 +43,12 @@ describe('formats', () => {
});
it('should be a valid JSON file', () => {
- fs.writeFileSync('./__tests__/__output/output.json', formatter(dictionary) );
- var test = require('../__output/output.json');
+ fs.writeFileSync('./__tests__/__output/output.json', formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file) );
+ const test = require('../__output/output.json');
expect(test.color.red.value).toEqual(dictionary.properties.color.red.value);
});
});
diff --git a/__tests__/formats/jsonFlat.test.js b/__tests__/formats/jsonFlat.test.js
index 2bf19a0e6..565b68348 100644
--- a/__tests__/formats/jsonFlat.test.js
+++ b/__tests__/formats/jsonFlat.test.js
@@ -11,36 +11,18 @@
* and limitations under the License.
*/
-var formats = require('../../lib/common/formats');
-var fs = require('fs-extra');
-var helpers = require('../__helpers');
+const formats = require('../../lib/common/formats');
+const fs = require('fs-extra');
+const helpers = require('../__helpers');
+const { colorDictionary } = require('./__constants');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
-var file = {
+const file = {
"destination": "__output/",
"format": "json/flat"
};
-var dictionary = {
- "allProperties": [{
- "name": "color-base-red",
- "value": "#EF5350",
- "original": {
- "value": "#EF5350"
- },
- "attributes": {
- "category": "color",
- "type": "base",
- "item": "red"
- },
- "path": [
- "color",
- "base",
- "red"
- ]
- }]
-};
-
-var formatter = formats['json/flat'].bind(file);
+const formatter = formats['json/flat'].bind(file);
describe('formats', () => {
describe('json/flat', () => {
@@ -54,9 +36,13 @@ describe('formats', () => {
});
it('should be a valid JSON file', () => {
- fs.writeFileSync('./__tests__/__output/output.flat.json', formatter(dictionary) );
- var test = require('../__output/output.flat.json');
- expect(test['color-base-red']).toEqual(dictionary.allProperties[0].value);
+ fs.writeFileSync('./__tests__/__output/output.flat.json', formatter(createFormatArgs({
+ dictionary: colorDictionary,
+ file,
+ platform: {}
+ }), {}, file) );
+ const test = require('../__output/output.flat.json');
+ expect(test['color-base-red-400']).toEqual(colorDictionary.allProperties[0].value);
});
});
diff --git a/__tests__/formats/jsonNested.test.js b/__tests__/formats/jsonNested.test.js
index 7449f0aed..32ba7709a 100644
--- a/__tests__/formats/jsonNested.test.js
+++ b/__tests__/formats/jsonNested.test.js
@@ -11,33 +11,34 @@
* and limitations under the License.
*/
-var formats = require('../../lib/common/formats');
-var fs = require('fs-extra');
-var helpers = require('../__helpers');
+const formats = require('../../lib/common/formats');
+const fs = require('fs-extra');
+const helpers = require('../__helpers');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
-var file = {
+const file = {
destination: 'output/',
format: 'json/nested',
};
-var dictionary = {
- properties: {
- color: {
- base: {
- comment: 'This is a comment',
- metadata: [1,2,3],
- red: {
- primary: { value: '#611D1C' },
- secondary: {
- inverse: { value: '#000000' },
- },
+const properties = {
+ color: {
+ base: {
+ comment: 'This is a comment',
+ metadata: [1,2,3],
+ red: {
+ primary: { value: '#611D1C' },
+ secondary: {
+ inverse: { value: '#000000' },
},
},
},
},
};
-var formatter = formats['json/nested'].bind(file);
+const formatter = formats['json/nested'].bind(file);
+const dictionary = createDictionary({ properties });
describe('formats', function() {
describe('json/nested', function() {
@@ -50,8 +51,12 @@ describe('formats', function() {
});
it('should be a valid JSON file', function() {
- fs.writeFileSync('./__tests__/__output/json-nested.json', formatter(dictionary));
- var test = require('../__output/json-nested.json');
+ fs.writeFileSync('./__tests__/__output/json-nested.json', formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file));
+ const test = require('../__output/json-nested.json');
expect(test.color.base.red.primary)
.toEqual(dictionary.properties.color.base.red.primary.value);
expect(test.color.base.red.secondary.inverse)
@@ -62,8 +67,12 @@ describe('formats', function() {
// non-token data is anything in the dictionary object that is not a token object
// i.e. anything in the rest of the object that doesn't have a 'value'
- fs.writeFileSync('./__tests__/__output/json-nested.json', formatter(dictionary));
- var test = require('../__output/json-nested.json');
+ fs.writeFileSync('./__tests__/__output/json-nested.json', formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file));
+ const test = require('../__output/json-nested.json');
expect(test.color.base.comment)
.toEqual(dictionary.properties.color.base.comment);
expect(test.color.base.metadata)
diff --git a/__tests__/formats/lessIcons.test.js b/__tests__/formats/lessIcons.test.js
index 545b008b9..ab920b830 100644
--- a/__tests__/formats/lessIcons.test.js
+++ b/__tests__/formats/lessIcons.test.js
@@ -11,52 +11,58 @@
* and limitations under the License.
*/
-var formats = require('../../lib/common/formats');
-var less = require('less');
+const formats = require('../../lib/common/formats');
+const less = require('less');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
-var file = {
+const file = {
"destination": "__output/",
"format": "less/icons",
"name": "foo"
};
-var propertyName = "content-icon-email";
-var propertyValue = "'\\E001'";
-var itemClass = "3d_rotation";
-
-var dictionary = {
- "allProperties": [{
- "name": propertyName,
- "value": propertyValue,
- "original": {
- "value": propertyValue
- },
- "attributes": {
- "category": "content",
- "type": "icon",
- "item": itemClass
+const propertyName = "content-icon-email";
+const propertyValue = "'\\E001'";
+const itemClass = "3d_rotation";
+
+const properties = {
+ content: {
+ icon: {
+ email: {
+ "name": propertyName,
+ "value": propertyValue,
+ "original": {
+ "value": propertyValue
+ },
+ "attributes": {
+ "category": "content",
+ "type": "icon",
+ "item": itemClass
+ },
+ path: ['content','icon','email']
+ }
}
- }]
+ }
};
-var config = {
+const platform = {
prefix: 'sd' // Style-Dictionary Prefix
};
-var formatter = formats['less/icons'].bind(file);
+const formatter = formats['less/icons'].bind(file);
+const dictionary = createDictionary({ properties });
describe('formats', () => {
describe('less/icons', () => {
- it('should have a valid less syntax', done => {
- less.render(formatter(dictionary, config))
- .then(function(output) {
- expect(output).toBeDefined();
- done();
- })
- .catch(function(err) {
- done(new Error(err))
- });
+ it('should have a valid less syntax', () => {
+ expect.assertions(1);
+ return expect(less.render(formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform
+ }), platform, file))).resolves.toBeDefined();
});
});
diff --git a/__tests__/formats/lessVariables.test.js b/__tests__/formats/lessVariables.test.js
index 4b229b033..ab652672d 100644
--- a/__tests__/formats/lessVariables.test.js
+++ b/__tests__/formats/lessVariables.test.js
@@ -13,6 +13,8 @@
var formats = require('../../lib/common/formats');
var less = require('less');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
var file = {
"destination": "__output/",
@@ -20,45 +22,50 @@ var file = {
"name": "foo"
};
-var propertyName = "color-base-red-400";
-var propertyValue = "#EF5350";
+const propertyName = "color-base-red-400";
+const propertyValue = "#EF5350";
-var dictionary = {
- "allProperties": [{
- "name": propertyName,
- "value": propertyValue,
- "original": {
- "value": propertyValue
- },
- "attributes": {
- "category": "color",
- "type": "base",
- "item": "red",
- "subitem": "400"
- },
- "path": [
- "color",
- "base",
- "red",
- "400"
- ]
- }]
+const properties = {
+ color: {
+ base: {
+ red: {
+ 400: {
+ "name": propertyName,
+ "value": propertyValue,
+ "original": {
+ "value": propertyValue
+ },
+ "attributes": {
+ "category": "color",
+ "type": "base",
+ "item": "red",
+ "subitem": "400"
+ },
+ "path": [
+ "color",
+ "base",
+ "red",
+ "400"
+ ]
+ }
+ }
+ }
+ }
};
-var formatter = formats['less/variables'].bind(file);
+const formatter = formats['less/variables'].bind(file);
+const dictionary = createDictionary({ properties });
describe('formats', () => {
describe('less/variables', () => {
- it('should have a valid less syntax', done => {
- less.render(formatter(dictionary))
- .then(function(output) {
- expect(output).toBeDefined();
- done();
- })
- .catch(function(err) {
- done(new Error(err))
- });
+ it('should have a valid less syntax', () => {
+ expect.assertions(1);
+ return expect(less.render(formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file))).resolves.toBeDefined();
});
});
diff --git a/__tests__/formats/scssIcons.test.js b/__tests__/formats/scssIcons.test.js
index ec95d3dc3..84a87b92c 100644
--- a/__tests__/formats/scssIcons.test.js
+++ b/__tests__/formats/scssIcons.test.js
@@ -11,53 +11,60 @@
* and limitations under the License.
*/
-var formats = require('../../lib/common/formats');
-var scss = require('node-sass');
+const formats = require('../../lib/common/formats');
+const scss = require('node-sass');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
-var file = {
+const file = {
"destination": "__output/",
"format": "scss/icons",
"name": "foo"
};
-var propertyName = "content-icon-email";
-var propertyValue = "'\\E001'";
-var itemClass = "3d_rotation";
+const propertyName = "content-icon-email";
+const propertyValue = "'\\E001'";
+const itemClass = "3d_rotation";
-var dictionary = {
- "allProperties": [{
- "name": propertyName,
- "value": propertyValue,
- "original": {
- "value": propertyValue
- },
- "attributes": {
- "category": "content",
- "type": "icon",
- "item": itemClass
+const properties = {
+ content: {
+ icon: {
+ email: {
+ "name": propertyName,
+ "value": propertyValue,
+ "original": {
+ "value": propertyValue
+ },
+ "attributes": {
+ "category": "content",
+ "type": "icon",
+ "item": itemClass
+ },
+ path: ['content','icon','email']
+ }
}
- }]
+ }
};
-var config = {
+const platform = {
prefix: 'sd' // Style-Dictionary Prefix
};
-var formatter = formats['scss/icons'].bind(file);
+const formatter = formats['scss/icons'].bind(file);
+const dictionary = createDictionary({ properties });
describe('formats', () => {
describe('scss/icons', () => {
- it('should have a valid scss syntax', done => {
- scss.render({
- data: formatter(dictionary, config),
- }, function(err, result) {
- if(err) {
- return done(new Error(err));
- }
- expect(result.css).toBeDefined();
- return done();
+ it('should have a valid scss syntax', () => {
+ const result = scss.renderSync({
+ data: formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform
+ }), platform, file),
});
+ expect(result.css).toBeDefined();
});
});
diff --git a/__tests__/formats/scssMaps.test.js b/__tests__/formats/scssMaps.test.js
index a7f2e9e64..c4d9c2d1f 100644
--- a/__tests__/formats/scssMaps.test.js
+++ b/__tests__/formats/scssMaps.test.js
@@ -13,163 +13,72 @@
var formats = require('../../lib/common/formats');
var scss = require('node-sass');
-var _ = require('lodash');
+var _ = require('../../lib/utils/es6_');
+var createDictionary = require('../../lib/utils/createDictionary');
+var createFormatArgs = require('../../lib/utils/createFormatArgs');
-var dictionary = {
- "properties": {
- "size": {
- "font": {
- "small": {
- "value": "12rem",
- "original": {
- "value": "12px"
- },
- "name": "size-font-small",
- "attributes": {
- "category": "size",
- "type": "font",
- "item": "small"
- },
- "path": [
- "size",
- "font",
- "small"
- ]
+var properties = {
+ "size": {
+ "font": {
+ "small": {
+ "value": "12rem",
+ "original": {
+ "value": "12px"
},
- "large": {
- "value": "18rem",
- "original": {
- "value": "18px"
- },
- "name": "size-font-large",
- "attributes": {
- "category": "size",
- "type": "font",
- "item": "large"
- },
- "path": [
- "size",
- "font",
- "large"
- ]
- }
- }
- },
- "color": {
- "base": {
- "red": {
- "value": "#ff0000",
- "comment": "comment",
- "original": {
- "value": "#FF0000",
- "comment": "comment"
- },
- "name": "color-base-red",
- "attributes": {
- "category": "color",
- "type": "base",
- "item": "red"
- },
- "path": [
- "color",
- "base",
- "red"
- ]
- }
+ "name": "size-font-small",
+ "attributes": {
+ "category": "size",
+ "type": "font",
+ "item": "small"
+ },
+ "path": [
+ "size",
+ "font",
+ "small"
+ ]
},
- "white": {
- "value": "#ffffff",
+ "large": {
+ "value": "18rem",
"original": {
- "value": "#ffffff"
+ "value": "18px"
},
- "name": "color-white",
+ "name": "size-font-large",
"attributes": {
- "category": "color",
- "type": "white"
+ "category": "size",
+ "type": "font",
+ "item": "large"
},
"path": [
- "color",
- "white"
+ "size",
+ "font",
+ "large"
]
}
- },
- "asset": {
- "icon": {
- "book": {
- "value": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYm9vayI+PHBhdGggZD0iTTQgMTkuNUEyLjUgMi41IDAgMCAxIDYuNSAxN0gyMCI+PC9wYXRoPjxwYXRoIGQ9Ik02LjUgMkgyMHYyMEg2LjVBMi41IDIuNSAwIDAgMSA0IDE5LjV2LTE1QTIuNSAyLjUgMCAwIDEgNi41IDJ6Ij48L3BhdGg+PC9zdmc+",
- "original": {
- "value": "./test/__assets/icons/book.svg"
- },
- "name": "asset-icon-book",
- "attributes": {
- "category": "asset",
- "type": "icon",
- "item": "book"
- },
- "path": [
- "asset",
- "icon",
- "book"
- ]
- }
- }
}
},
- "allProperties": [
- {
- "value": "12rem",
- "original": {
- "value": "12px"
- },
- "name": "size-font-small",
- "attributes": {
- "category": "size",
- "type": "font",
- "item": "small"
- },
- "path": [
- "size",
- "font",
- "small"
- ]
- },
- {
- "value": "18rem",
- "original": {
- "value": "18px"
- },
- "name": "size-font-large",
- "attributes": {
- "category": "size",
- "type": "font",
- "item": "large"
- },
- "path": [
- "size",
- "font",
- "large"
- ]
- },
- {
- "value": "#ff0000",
- "comment": "comment",
- "original": {
- "value": "#FF0000",
- "comment": "comment"
- },
- "name": "color-base-red",
- "attributes": {
- "category": "color",
- "type": "base",
- "item": "red"
- },
- "path": [
- "color",
- "base",
- "red"
- ]
+ "color": {
+ "base": {
+ "red": {
+ "value": "#ff0000",
+ "comment": "comment",
+ "original": {
+ "value": "#FF0000",
+ "comment": "comment"
+ },
+ "name": "color-base-red",
+ "attributes": {
+ "category": "color",
+ "type": "base",
+ "item": "red"
+ },
+ "path": [
+ "color",
+ "base",
+ "red"
+ ]
+ }
},
- {
+ "white": {
"value": "#ffffff",
"original": {
"value": "#ffffff"
@@ -183,25 +92,29 @@ var dictionary = {
"color",
"white"
]
- },
- {
- "value": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYm9vayI+PHBhdGggZD0iTTQgMTkuNUEyLjUgMi41IDAgMCAxIDYuNSAxN0gyMCI+PC9wYXRoPjxwYXRoIGQ9Ik02LjUgMkgyMHYyMEg2LjVBMi41IDIuNSAwIDAgMSA0IDE5LjV2LTE1QTIuNSAyLjUgMCAwIDEgNi41IDJ6Ij48L3BhdGg+PC9zdmc+",
- "original": {
- "value": "./test/__assets/icons/book.svg"
- },
- "name": "asset-icon-book",
- "attributes": {
- "category": "asset",
- "type": "icon",
- "item": "book"
- },
- "path": [
- "asset",
- "icon",
- "book"
- ]
}
- ]
+ },
+ "asset": {
+ "icon": {
+ "book": {
+ "value": "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItYm9vayI+PHBhdGggZD0iTTQgMTkuNUEyLjUgMi41IDAgMCAxIDYuNSAxN0gyMCI+PC9wYXRoPjxwYXRoIGQ9Ik02LjUgMkgyMHYyMEg2LjVBMi41IDIuNSAwIDAgMSA0IDE5LjV2LTE1QTIuNSAyLjUgMCAwIDEgNi41IDJ6Ij48L3BhdGg+PC9zdmc+",
+ "original": {
+ "value": "./test/__assets/icons/book.svg"
+ },
+ "name": "asset-icon-book",
+ "attributes": {
+ "category": "asset",
+ "type": "icon",
+ "item": "book"
+ },
+ "path": [
+ "asset",
+ "icon",
+ "book"
+ ]
+ }
+ }
+ }
};
describe('formats', () => {
@@ -214,31 +127,23 @@ describe('formats', () => {
"format": key
};
- // mock the Date.now() call to a fixed value
- const constantDate = new Date('2000-01-01');
- const globalDate = global.Date;
- global.Date = function() { return constantDate };
-
var formatter = formats[key].bind(file);
- var output = formatter(dictionary, file);
-
- // reset the global Date object (or node-sass will complain!)
- global.Date = globalDate;
+ const dictionary = createDictionary({ properties });
+ var output = formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {},
+ }), {}, file);
it('should return ' + key + ' as a string', () => {
expect(typeof output).toBe('string');
});
- it('should have a valid scss syntax', done => {
- scss.render({
+ it('should have a valid scss syntax', () => {
+ const result = scss.renderSync({
data: output,
- }, function(err, result) {
- if(err) {
- return done(new Error(err));
- }
- expect(result.css).toBeDefined();
- return done();
});
+ expect(result.css).toBeDefined();
});
it(key + ' snapshot', () => {
diff --git a/__tests__/formats/scssVariables.test.js b/__tests__/formats/scssVariables.test.js
index 3cf3dd7ec..3e501b680 100644
--- a/__tests__/formats/scssVariables.test.js
+++ b/__tests__/formats/scssVariables.test.js
@@ -13,6 +13,9 @@
var formats = require('../../lib/common/formats');
var scss = require('node-sass');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
+var _ = require('../../lib/utils/es6_');
var file = {
"destination": "__output/",
@@ -20,47 +23,73 @@ var file = {
"name": "foo"
};
-var propertyName = "color-base-red-400";
-var propertyValue = "#EF5350";
+const propertyName = "color-base-red-400";
+const propertyValue = "#EF5350";
-var dictionary = {
- "allProperties": [{
- "name": propertyName,
- "value": propertyValue,
- "original": {
- "value": propertyValue
- },
- "attributes": {
- "category": "color",
- "type": "base",
- "item": "red",
- "subitem": "400"
- },
- "path": [
- "color",
- "base",
- "red",
- "400"
- ]
- }]
+const properties = {
+ color: {
+ base: {
+ red: {
+ 400: {
+ "name": propertyName,
+ "value": propertyValue,
+ "original": {
+ "value": propertyValue
+ },
+ "attributes": {
+ "category": "color",
+ "type": "base",
+ "item": "red",
+ "subitem": "400"
+ },
+ "path": [
+ "color",
+ "base",
+ "red",
+ "400"
+ ]
+ }
+ }
+ }
+ }
};
var formatter = formats['scss/variables'].bind(file);
+const dictionary = createDictionary({properties});
describe('formats', () => {
describe('scss/variables', () => {
- it('should have a valid scss syntax', done => {
- scss.render({
- data: formatter(dictionary),
- }, function(err, result) {
- if(err) {
- return done(new Error(err));
- }
- expect(result.css).toBeDefined();
- return done();
+ it('should have a valid scss syntax', () => {
+ const result = scss.renderSync({
+ data: formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file),
});
+ expect(result.css).toBeDefined();
});
+ it('should optionally use !default', () => {
+ var themeableDictionary = _.cloneDeep(dictionary),
+ formattedScss = formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ }), {}, file),
+ themeableScss = "";
+
+ expect(formattedScss).not.toMatch("!default");
+
+ themeableDictionary.allTokens[0].themeable = true;
+ themeableScss = formatter(createFormatArgs({
+ dictionary: themeableDictionary,
+ file,
+ platform: {}
+ }), {}, file);
+
+ expect(themeableScss).toMatch("#EF5350 !default;");
+ });
});
});
diff --git a/__tests__/formats/stylusVariable.test.js b/__tests__/formats/stylusVariable.test.js
new file mode 100644
index 000000000..8d8295e6e
--- /dev/null
+++ b/__tests__/formats/stylusVariable.test.js
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+var formats = require('../../lib/common/formats');
+var stylus = require('stylus');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
+
+var file = {
+ "destination": "__output/",
+ "format": "stylus/variables",
+ "name": "foo"
+};
+
+const propertyName = "color-base-red-400";
+const propertyValue = "#EF5350";
+
+const properties = {
+ color: {
+ base: {
+ red: {
+ 400: {
+ "name": propertyName,
+ "value": propertyValue,
+ "original": {
+ "value": propertyValue
+ },
+ "attributes": {
+ "category": "color",
+ "type": "base",
+ "item": "red",
+ "subitem": "400"
+ },
+ "path": [
+ "color",
+ "base",
+ "red",
+ "400"
+ ]
+ }
+ }
+ }
+ }
+};
+
+const formatter = formats['stylus/variables'].bind(file);
+const dictionary = createDictionary({ properties });
+
+describe('formats', () => {
+ describe('stylus/variables', () => {
+
+ it('should have a valid stylus syntax', () => {
+ const stylusArguments = createFormatArgs({
+ dictionary,
+ file,
+ platform: {}
+ });
+ stylus.render(formatter(stylusArguments, {}, file),
+ function (err, css) {
+ if (err) {
+ throw new Error(err);
+ }
+ expect(css).toBeDefined();
+ });
+ });
+
+ });
+});
diff --git a/__tests__/formats/typeScriptEs6Declarations.test.js b/__tests__/formats/typeScriptEs6Declarations.test.js
new file mode 100644
index 000000000..62affb73e
--- /dev/null
+++ b/__tests__/formats/typeScriptEs6Declarations.test.js
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+const formats = require('../../lib/common/formats');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
+
+const file = {
+ "destination": "__output/",
+ "format": "typescript/es6-declarations",
+ "filter": {
+ "attributes": {
+ "category": "color"
+ }
+ }
+};
+
+const properties = {
+ "color": {
+ "red": {"value": "#FF0000"}
+ }
+};
+
+const formatter = formats['typescript/es6-declarations'].bind(file);
+
+describe('formats', () => {
+ describe('typescript/es6-declarations', () => {
+ it('should be a valid TS file', () => {
+ const dictionary = createDictionary({ properties });
+ const output = formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {},
+ }), {}, file);
+
+ // get all lines that begin with export
+ const lines = output
+ .split('\n')
+ .filter(l => l.indexOf('export') >= 0);
+
+ // assert that any lines have a string type definition
+ lines.forEach(l => {
+ expect(l.match(/^export.* : string;$/g).length).toEqual(1);
+ });
+ });
+ });
+
+});
diff --git a/__tests__/formats/typeScriptModuleDeclarations.test.js b/__tests__/formats/typeScriptModuleDeclarations.test.js
new file mode 100644
index 000000000..73ac8fb25
--- /dev/null
+++ b/__tests__/formats/typeScriptModuleDeclarations.test.js
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+const formats = require('../../lib/common/formats');
+const createDictionary = require('../../lib/utils/createDictionary');
+const createFormatArgs = require('../../lib/utils/createFormatArgs');
+
+const file = {
+ "destination": "__output/",
+ "format": "typescript/module-declarations",
+ "filter": {
+ "attributes": {
+ "category": "color"
+ }
+ }
+};
+
+const properties = {
+ "color": {
+ "red": {"value": "#FF0000"}
+ }
+};
+
+
+var formatter = formats['typescript/module-declarations'].bind(file);
+
+describe('formats', () => {
+ describe('typescript/module-declarations', () => {
+ it('should be a valid TS file', () => {
+ const dictionary = createDictionary({ properties });
+ const output = formatter(createFormatArgs({
+ dictionary,
+ file,
+ platform: {},
+ }), {}, file);
+
+ // get all lines that have DesignToken
+ const lines = output
+ .split('\n')
+ .filter(l => l.indexOf(': DesignToken') >= 0);
+
+ // assert that any lines have a DesignToken type definition
+ lines.forEach(l => {
+ expect(l.match(/^.*: DesignToken$/g).length).toEqual(1);
+ });
+ });
+ });
+});
diff --git a/__tests__/register/fileHeader.test.js b/__tests__/register/fileHeader.test.js
new file mode 100644
index 000000000..219359879
--- /dev/null
+++ b/__tests__/register/fileHeader.test.js
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+var StyleDictionary = require('../../index');
+var StyleDictionaryExtended = StyleDictionary.extend({});
+
+describe('register', () => {
+ describe('fileHeader', () => {
+
+ it('should error if name is not a string', () => {
+ expect(
+ StyleDictionaryExtended.registerFileHeader.bind(null, {
+ fileHeader: function () {}
+ })
+ ).toThrow('name must be a string');
+
+ expect(
+ StyleDictionaryExtended.registerFileHeader.bind(null, {
+ name: 1,
+ fileHeader: function () {}
+ })
+ ).toThrow('name must be a string');
+
+ expect(
+ StyleDictionaryExtended.registerFileHeader.bind(null, {
+ name: [],
+ fileHeader: function () {}
+ })
+ ).toThrow('name must be a string');
+
+ expect(
+ StyleDictionaryExtended.registerFilter.bind(null, {
+ name: {},
+ matcher: function () {}
+ })
+ ).toThrow('name must be a string');
+ });
+
+ it('should error if fileHeader is not a function', () => {
+ expect(
+ StyleDictionaryExtended.registerFileHeader.bind(null, {
+ name: 'myCustomHeader'
+ })
+ ).toThrow('fileHeader must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerFileHeader.bind(null, {
+ name: 'myCustomHeader',
+ fileHeader: 1
+ })
+ ).toThrow('fileHeader must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerFileHeader.bind(null, {
+ name: 'myCustomHeader',
+ fileHeader: 'name'
+ })
+ ).toThrow('fileHeader must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerFileHeader.bind(null, {
+ name: 'myCustomHeader',
+ fileHeader: []
+ })
+ ).toThrow('fileHeader must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerFileHeader.bind(null, {
+ name: 'myCustomHeader',
+ fileHeader: {}
+ })
+ ).toThrow('fileHeader must be a function');
+ });
+
+ it('should work if name and matcher are good', () => {
+ StyleDictionaryExtended.registerFileHeader({
+ name: 'myCustomHeader',
+ fileHeader: function() {}
+ });
+ expect(typeof StyleDictionaryExtended.fileHeader['myCustomHeader']).toBe('function');
+ });
+
+ it('should properly pass the registered fileHeader to instances', () => {
+ var SDE2 = StyleDictionaryExtended.extend({});
+ expect(typeof SDE2.fileHeader['myCustomHeader']).toBe('function');
+ });
+
+ });
+});
diff --git a/__tests__/register/filter.test.js b/__tests__/register/filter.test.js
new file mode 100644
index 000000000..49487aa61
--- /dev/null
+++ b/__tests__/register/filter.test.js
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+var StyleDictionary = require('../../index');
+var StyleDictionaryExtended = StyleDictionary.extend({});
+
+describe('register', () => {
+ describe('filter', () => {
+
+ it('should error if name is not a string', () => {
+ expect(
+ StyleDictionaryExtended.registerFilter.bind(null, {
+ matcher: function () {}
+ })
+ ).toThrow('name must be a string');
+
+ expect(
+ StyleDictionaryExtended.registerFilter.bind(null, {
+ name: 1,
+ matcher: function () {}
+ })
+ ).toThrow('name must be a string');
+
+ expect(
+ StyleDictionaryExtended.registerFilter.bind(null, {
+ name: [],
+ matcher: function () {}
+ })
+ ).toThrow('name must be a string');
+
+ expect(
+ StyleDictionaryExtended.registerFilter.bind(null, {
+ name: {},
+ matcher: function () {}
+ })
+ ).toThrow('name must be a string');
+ });
+
+ it('should error if matcher is not a function', () => {
+ expect(
+ StyleDictionaryExtended.registerFilter.bind(null, {
+ name: 'test'
+ })
+ ).toThrow('matcher must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerFilter.bind(null, {
+ name: 'test',
+ matcher: 1
+ })
+ ).toThrow('matcher must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerFilter.bind(null, {
+ name: 'test',
+ matcher: 'name'
+ })
+ ).toThrow('matcher must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerFilter.bind(null, {
+ name: 'test',
+ matcher: []
+ })
+ ).toThrow('matcher must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerFilter.bind(null, {
+ name: 'test',
+ matcher: {}
+ })
+ ).toThrow('matcher must be a function');
+ });
+
+ it('should work if name and matcher are good', () => {
+ StyleDictionaryExtended.registerFilter({
+ name: 'scss',
+ matcher: function() {}
+ });
+ expect(typeof StyleDictionaryExtended.filter['scss']).toBe('function');
+ });
+
+ it('should properly pass the registered filter to instances', () => {
+ var SDE2 = StyleDictionaryExtended.extend({});
+ expect(typeof SDE2.filter['scss']).toBe('function');
+ });
+
+ });
+});
diff --git a/__tests__/register/format.test.js b/__tests__/register/format.test.js
index 97acf8197..a6cebdbaf 100644
--- a/__tests__/register/format.test.js
+++ b/__tests__/register/format.test.js
@@ -18,68 +18,70 @@ describe('register', () => {
describe('format', () => {
it('should error if name is not a string', () => {
+ const errorMessage = `Can't register format; format.name must be a string`
expect(
StyleDictionaryExtended.registerFormat.bind(null, {
formatter: function() {}
})
- ).toThrow('Can\'t register format; format.name must be a string');
+ ).toThrow(errorMessage);
expect(
StyleDictionaryExtended.registerFormat.bind(null, {
name: 1,
formatter: function() {}
})
- ).toThrow('Can\'t register format; format.name must be a string');
+ ).toThrow(errorMessage);
expect(
StyleDictionaryExtended.registerFormat.bind(null, {
name: [],
formatter: function() {}
})
- );
+ ).toThrow(errorMessage);
expect(
StyleDictionaryExtended.registerFormat.bind(null, {
name: {},
formatter: function() {}
})
- ).toThrow('Can\'t register format; format.name must be a string');
+ ).toThrow(errorMessage);
});
it('should error if format is not a function', () => {
+ const errorMessage = `Can't register format; format.formatter must be a function`
expect(
StyleDictionaryExtended.registerFormat.bind(null, {
name: 'test'
})
- ).toThrow('Can\'t register format; format.formatter must be a function');
+ ).toThrow(errorMessage);
expect(
StyleDictionaryExtended.registerFormat.bind(null, {
name: 'test',
formatter: 1
})
- ).toThrow('Can\'t register format; format.formatter must be a function');
+ ).toThrow(errorMessage);
expect(
StyleDictionaryExtended.registerFormat.bind(null, {
name: 'test',
formatter: 'name'
})
- ).toThrow('Can\'t register format; format.formatter must be a function');
+ ).toThrow(errorMessage);
expect(
StyleDictionaryExtended.registerFormat.bind(null, {
name: 'test',
formatter: []
})
- ).toThrow('Can\'t register format; format.formatter must be a function');
+ ).toThrow(errorMessage);
expect(
StyleDictionaryExtended.registerFormat.bind(null, {
name: 'test',
formatter: {}
})
- ).toThrow('Can\'t register format; format.formatter must be a function');
+ ).toThrow(errorMessage);
});
it('should work if name and format are good', () => {
diff --git a/__tests__/register/parser.test.js b/__tests__/register/parser.test.js
new file mode 100644
index 000000000..b38475a9d
--- /dev/null
+++ b/__tests__/register/parser.test.js
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+var StyleDictionary = require('../../index');
+var StyleDictionaryExtended = StyleDictionary.extend({});
+
+describe('register', () => {
+ describe('parser', () => {
+
+ it('should error if pattern is not a regex', () => {
+ expect(
+ StyleDictionaryExtended.registerParser.bind(null, {
+ parse: function () {}
+ })
+ ).toThrow('pattern must be a regular expression');
+
+ expect(
+ StyleDictionaryExtended.registerParser.bind(null, {
+ pattern: 1,
+ parse: function () {}
+ })
+ ).toThrow('pattern must be a regular expression');
+
+ expect(
+ StyleDictionaryExtended.registerParser.bind(null, {
+ pattern: [],
+ parse: function () {}
+ })
+ ).toThrow('pattern must be a regular expression');
+
+ expect(
+ StyleDictionaryExtended.registerParser.bind(null, {
+ pattern: {},
+ parse: function () {}
+ })
+ ).toThrow('pattern must be a regular expression');
+ });
+
+ it('should error if parser is not a function', () => {
+ expect(
+ StyleDictionaryExtended.registerParser.bind(null, {
+ pattern: /$.json/
+ })
+ ).toThrow('parse must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerParser.bind(null, {
+ pattern: /$.json/,
+ parse: 1
+ })
+ ).toThrow('parse must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerParser.bind(null, {
+ pattern: /$.json/,
+ parse: 'name'
+ })
+ ).toThrow('parse must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerParser.bind(null, {
+ pattern: /$.json/,
+ parse: []
+ })
+ ).toThrow('parse must be a function');
+
+ expect(
+ StyleDictionaryExtended.registerParser.bind(null, {
+ pattern: /$.json/,
+ parse: {}
+ })
+ ).toThrow('parse must be a function');
+ });
+
+ it('should work if pattern and parser are good', () => {
+ StyleDictionaryExtended.registerParser({
+ pattern: /$.json/,
+ parse: function() {}
+ });
+ expect(typeof StyleDictionaryExtended.parsers[0].parse).toBe('function');
+ });
+
+ it('should properly pass the registered filter to instances', () => {
+ var SDE2 = StyleDictionaryExtended.extend({});
+ expect(typeof SDE2.parsers[0].parse).toBe('function');
+ });
+
+ });
+});
diff --git a/__tests__/transform/object.test.js b/__tests__/transform/object.test.js
index af70b60b5..8618cd429 100644
--- a/__tests__/transform/object.test.js
+++ b/__tests__/transform/object.test.js
@@ -33,6 +33,14 @@ const options = {
transformer: function() {
return "transformer result";
}
+ }, {
+ type: 'value',
+ matcher: function(prop) {
+ return prop.path[0] === 'spacing';
+ },
+ transformer: function(val) {
+ return val + 'px';
+ }
}
]
};
@@ -85,7 +93,31 @@ describe('transform', () => {
const actual = transformObject(objectToTransform, options);
expect(actual).toEqual(expected);
- })
+ });
+
+ it('fills the transformationContext with transformed and deferred transforms', () => {
+ const transformedPropRefs = [];
+ const deferredPropValueTransforms = [];
+ const transformationContext = {
+ transformedPropRefs,
+ deferredPropValueTransforms
+ };
+
+ const objectToTransform = {
+ "spacing": {
+ "base": {
+ "value": "16"
+ },
+ "medium": {
+ "value": "{spacing.base.value}"
+ }
+ }
+ };
+ transformObject(objectToTransform, options, transformationContext);
+
+ expect(transformedPropRefs).toEqual(['spacing.base']);
+ expect(deferredPropValueTransforms).toEqual(['spacing.medium']);
+ })
});
});
diff --git a/__tests__/transform/propertySetup.test.js b/__tests__/transform/propertySetup.test.js
index aabc43abe..837af06b0 100644
--- a/__tests__/transform/propertySetup.test.js
+++ b/__tests__/transform/propertySetup.test.js
@@ -42,7 +42,6 @@ describe('transform', () => {
["color","base"]
);
expect(typeof test).toBe('object');
- expect(test);
expect(test).toHaveProperty('value');
expect(test).toHaveProperty('original');
expect(test).toHaveProperty('attributes');
@@ -89,5 +88,15 @@ describe('transform', () => {
expect(test).toHaveProperty('name', 'white');
});
+ it('should handle objects', () => {
+ const test = propertySetup({
+ value: {
+ h: 20, s: 50, l: 50
+ }
+ }, 'red', ['color','red']);
+ expect(test).toHaveProperty('value.h', 20);
+ expect(test).toHaveProperty('original.value.h', 20);
+ })
+
});
});
diff --git a/__tests__/utils/combineJSON.test.js b/__tests__/utils/combineJSON.test.js
index f143e2f22..44532b259 100644
--- a/__tests__/utils/combineJSON.test.js
+++ b/__tests__/utils/combineJSON.test.js
@@ -13,6 +13,7 @@
var combineJSON = require('../../lib/utils/combineJSON');
var path = require('path');
+var yaml = require('yaml');
describe('utils', () => {
describe('combineJSON', () => {
@@ -64,7 +65,7 @@ describe('utils', () => {
expect(opts.target[opts.key]).toBe(1);
expect(opts.copy[opts.key]).toBe(2);
throw new Error('test');
- })
+ }, true)
).toThrow(/test/);
});
@@ -73,5 +74,35 @@ describe('utils', () => {
expect(test).toHaveProperty('json5A', 5);
expect(test.d).toHaveProperty('json5e', 1);
});
+
+ describe('custom parsers', () => {
+ it('should support yaml.parse', () => {
+ const parsers = [{
+ pattern: /\.yaml$/,
+ // yaml.parse function matches the intended function signature
+ parse: ({contents}) => yaml.parse(contents)
+ }];
+ const output = combineJSON([`__tests__/__json_files/yaml.yaml`], false, null, false, parsers);
+ expect(output).toHaveProperty('foo', 'bar');
+ expect(output).toHaveProperty('bar', '{foo}');
+ });
+
+ it('should multiple parsers on the same file', () => {
+ const testOutput = { test: 'test' };
+ const parsers = [{
+ pattern: /.json$/,
+ parse: () => {
+ return { test: 'foo' }
+ }
+ },{
+ pattern: /.json$/,
+ parse: () => {
+ return testOutput
+ }
+ }];
+ const output = combineJSON([`__tests__/__json_files/simple.json`], false, null, false, parsers);
+ expect(output).toHaveProperty('test', 'test');
+ });
+ });
});
});
diff --git a/__tests__/utils/convertToBase64.test.js b/__tests__/utils/convertToBase64.test.js
index 13d5ad122..c79005f64 100644
--- a/__tests__/utils/convertToBase64.test.js
+++ b/__tests__/utils/convertToBase64.test.js
@@ -36,5 +36,10 @@ describe('utils', () => {
it('should return a string', () => {
expect(typeof convertToBase64('__tests__/__configs/test.json')).toBe('string');
});
+
+ it('should be a valid base64 string', () => {
+ expect(convertToBase64('__tests__/__json_files/simple.json'))
+ .toEqual('ewogICJmb28iOiAiYmFyIiwKICAiYmFyIjogIntmb299Igp9');
+ });
});
});
diff --git a/__tests__/utils/deepExtend.test.js b/__tests__/utils/deepExtend.test.js
index d2bde878e..16eb847d7 100644
--- a/__tests__/utils/deepExtend.test.js
+++ b/__tests__/utils/deepExtend.test.js
@@ -29,7 +29,7 @@ describe('utils', () => {
expect(test2).toHaveProperty('foo', 'blah');
});
- it('should override nested properties', () => {
+ it('overrides nested properties', () => {
var test = deepExtend([{foo: {foo:'bar'}}, {foo: {foo:'baz'}}]);
expect(test).toHaveProperty('foo.foo', 'baz');
@@ -37,7 +37,7 @@ describe('utils', () => {
expect(test2).toHaveProperty('foo.foo', 'blah');
});
- it('should override nested properties', () => {
+ it('properly merges nested properties', () => {
var test = deepExtend([{foo: {bar:'bar'}}, {foo: {baz:'baz'}}]);
expect(test).toHaveProperty('foo.baz', 'baz');
expect(test).toHaveProperty('foo.bar', 'bar');
diff --git a/__tests__/utils/flattenProperties.test.js b/__tests__/utils/flattenProperties.test.js
index a81ce0af6..cd42bf23a 100644
--- a/__tests__/utils/flattenProperties.test.js
+++ b/__tests__/utils/flattenProperties.test.js
@@ -12,7 +12,9 @@
*/
var flattenProperties = require('../../lib/utils/flattenProperties');
-var _ = require('lodash');
+const sortBy = (key) => {
+ return (a, b) => (a[key] > b[key]) ? 1 : ((b[key] > a[key]) ? -1 : 0);
+};
describe('utils', () => {
describe('flattenProperties', () => {
@@ -43,9 +45,9 @@ describe('utils', () => {
properties.white
];
- var sortedExpectedRet = _.sortBy(expected_ret, ['value']);
+ var sortedExpectedRet = expected_ret.sort(sortBy('value'));
var ret = flattenProperties(properties);
- var sortedRet = _.sortBy(ret, ['value']);
+ var sortedRet = ret.sort(sortBy('value'));
expect(sortedRet).toEqual(sortedExpectedRet);
});
@@ -66,9 +68,9 @@ describe('utils', () => {
properties.color.white
];
- var sortedExpectedRet = _.sortBy(expected_ret, ['value']);
+ var sortedExpectedRet = expected_ret.sort(sortBy('value'));
var ret = flattenProperties(properties);
- var sortedRet = _.sortBy(ret, ['value']);
+ var sortedRet = ret.sort(sortBy('value'));
expect(sortedRet).toEqual(sortedExpectedRet);
});
});
diff --git a/__tests__/utils/reference/getReferences.test.js b/__tests__/utils/reference/getReferences.test.js
new file mode 100644
index 000000000..900f11063
--- /dev/null
+++ b/__tests__/utils/reference/getReferences.test.js
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+// `.getReferences` is bound to a dictionary object, so to test it we will
+// create a dictionary object and then call `.getReferences` on it.
+const createDictionary = require('../../../lib/utils/createDictionary');
+
+const properties = {
+ color: {
+ red: { value: "#f00" },
+ danger: { value: "{color.red.value}" }
+ },
+ size: {
+ border: { value: "2px" }
+ },
+ border: {
+ primary: {
+ // getReferences should work on objects like this:
+ value: {
+ color: "{color.red.value}",
+ width: "{size.border.value}",
+ style: "solid"
+ }
+ },
+ secondary: {
+ // getReferences should work on interpolated values like this:
+ value: "{size.border.value} solid {color.red.value}"
+ }
+ }
+}
+
+const dictionary = createDictionary({ properties });
+
+describe('utils', () => {
+ describe('reference', () => {
+ describe('getReferences()', () => {
+ it(`should return an empty array if the value has no references`, () => {
+ expect(dictionary.getReferences(properties.color.red.value)).toEqual([]);
+ });
+
+ it(`should work with a single reference`, () => {
+ expect(dictionary.getReferences(properties.color.danger.value)).toEqual(
+ expect.arrayContaining([
+ {value: "#f00"}
+ ])
+ );
+ });
+
+ it(`should work with object values`, () => {
+ expect(dictionary.getReferences(properties.border.primary.value)).toEqual(
+ expect.arrayContaining([
+ {value: "2px"},
+ {value: "#f00"}
+ ])
+ );
+ });
+
+ it(`should work with interpolated values`, () => {
+ expect(dictionary.getReferences(properties.border.secondary.value)).toEqual(
+ expect.arrayContaining([
+ {value: "2px"},
+ {value: "#f00"}
+ ])
+ );
+ });
+ });
+ });
+});
diff --git a/__tests__/utils/reference/resolveReference.test.js b/__tests__/utils/reference/resolveReference.test.js
new file mode 100644
index 000000000..f3b2e4290
--- /dev/null
+++ b/__tests__/utils/reference/resolveReference.test.js
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const resolveReference = require('../../../lib/utils/references/resolveReference');
+
+const dictionary = {
+ color: {
+ palette: {
+ neutral: {
+ 0: { value: "#ffffff" },
+ 5: { value: "#f2f3f4" }
+ }
+ },
+ background: {
+ primary: { value: "{color.palette.neutral.0.value}" }
+ }
+ },
+ arr: [
+ 'one',
+ 'two'
+ ]
+}
+
+describe('resolveReference()', () => {
+ it(`returns undefined for non-strings`, () => {
+ expect(resolveReference(42, dictionary)).toBe(undefined);
+ });
+
+ it(`returns undefined if it does not find the path in the object`, () => {
+ expect(resolveReference(['color','foo'], dictionary)).toBe(undefined);
+ expect(resolveReference(['color','foo','bar'], dictionary)).toBe(undefined);
+ });
+
+ it(`returns the part of the object if referenced path exists`, () => {
+ expect(
+ resolveReference(['color','palette','neutral','0','value'], dictionary)
+ ).toEqual(dictionary.color.palette.neutral['0'].value);
+ expect(
+ resolveReference(['color'], dictionary)
+ ).toEqual(dictionary.color);
+ });
+
+ it(`works with arrays`, () => {
+ expect(
+ resolveReference(['arr'], dictionary)
+ ).toEqual(dictionary.arr);
+ });
+
+ it(`works with array indices`, () => {
+ expect(
+ resolveReference(['arr','0'], dictionary)
+ ).toEqual(dictionary.arr[0]);
+ });
+});
diff --git a/__tests__/utils/reference/usesReference.test.js b/__tests__/utils/reference/usesReference.test.js
new file mode 100644
index 000000000..d64af1af0
--- /dev/null
+++ b/__tests__/utils/reference/usesReference.test.js
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
+ * the License. A copy of the License is located at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+ * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
+ * and limitations under the License.
+ */
+
+const usesReference = require('../../../lib/utils/references/usesReference');
+
+describe('usesReference()', () => {
+ it(`returns false for non-strings`, () => {
+ expect(usesReference(42)).toBe(false);
+ });
+
+ it(`returns false if value uses no reference`, () => {
+ expect(usesReference('foo.bar')).toBe(false);
+ });
+
+ it(`returns true if value is a reference`, () => {
+ expect(usesReference('{foo.bar}')).toBe(true);
+ });
+
+ it(`should return true if value uses a reference`, () => {
+ expect(usesReference('baz {foo.bar}')).toBe(true);
+ });
+
+ it(`returns true if an object uses a reference`, () => {
+ expect(usesReference({foo: '{bar}'})).toBe(true);
+ });
+
+ it(`returns false if an object doesn't have a reference`, () => {
+ expect(usesReference({foo: 'bar'})).toBe(false);
+ });
+
+ it(`returns true if a nested object has a reference`, () => {
+ expect(usesReference({foo: {bar: '{bar}'}})).toBe(true);
+ });
+
+ it(`returns true if an array uses a reference`, () => {
+ expect(usesReference(["foo", "{bar}"])).toBe(true);
+ });
+
+ it(`returns false if an array doesn't use a reference`, () => {
+ expect(usesReference(["foo", "bar"])).toBe(false);
+ });
+
+ describe(`with custom options`, () => {
+ test(`returns true if value is reference`, () => {
+ const customOpts = {
+ opening_character: '(',
+ closing_character: ')',
+ separator: '|'
+ };
+
+ expect(usesReference('(foo|bar)', customOpts)).toBe(true);
+ });
+ });
+});
diff --git a/__tests__/utils/resolveObject.test.js b/__tests__/utils/resolveObject.test.js
index 701c40767..76cc15871 100644
--- a/__tests__/utils/resolveObject.test.js
+++ b/__tests__/utils/resolveObject.test.js
@@ -181,6 +181,19 @@ describe('utils', () => {
}));
});
+ describe('ignorePaths', () => {
+ it('should not resolve values containing variables in ignored paths', () => {
+ const test = resolveObject({
+ foo: { value: 'bar' },
+ bar: {
+ value: '{foo.value}'
+ }
+ }, {ignorePaths: ['foo.value']});
+
+ expect(test).toHaveProperty ('bar.value', '{foo.value}');
+ });
+ });
+
describe('ignoreKeys', () => {
it('should handle default value of original', () => {
var test = resolveObject({
diff --git a/docs/README.md b/docs/README.md
index 8ec130d96..eaa8467b6 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -2,9 +2,8 @@
[![npm version](https://img.shields.io/npm/v/style-dictionary.svg?style=flat-square)](https://badge.fury.io/js/style-dictionary)
![license](https://img.shields.io/npm/l/style-dictionary.svg?style=flat-square)
-[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/amzn/style-dictionary/blob/master/CONTRIBUTING.md#submitting-pull-requests)
-
-[![Build Status](https://img.shields.io/travis/amzn/style-dictionary.svg?style=flat-square)](https://travis-ci.org/amzn/style-dictionary)
+[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/amzn/style-dictionary/blob/main/CONTRIBUTING.md#submitting-pull-requests)
+[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/amzn/style-dictionary/Test?style=flat-square)](https://github.com/amzn/style-dictionary/actions/workflows/test.yml)
[![downloads](https://img.shields.io/npm/dm/style-dictionary.svg?style=flat-square)](https://www.npmjs.com/package/style-dictionary)
# Style Dictionary
@@ -12,7 +11,7 @@
A Style Dictionary is a system that allows you to define styles once, in a way for any platform or language to consume. A single place to create and edit your styles, and a single command exports these rules to all the places you need them - iOS, Android, CSS, JS, HTML, sketch files, style documentation, etc. It is available as a [CLI](using_the_cli.md) through npm, but can also be used like any normal [npm module](using_the_npm_module.md) if you want to [extend](extending.md) its functionality.
-When you are managing user experiences, it can be quite challenging to keep styles consistent and synchronized across multiple development platforms and devices. At the same time, designers, developers, PMs and others must be able to have consistent and up-to-date style documentation to enable effective work and communication. Even then, mistakes inevitably happen and the design may not be implemented accurately. StyleDictionary solves this by automatically generating style definitions across all platforms from a single source - removing roadblocks, errors, and inefficiencies across your workflow.
+When you are managing user experiences, it can be quite challenging to keep styles consistent and synchronized across multiple development platforms and devices. At the same time, designers, developers, PMs and others must be able to have consistent and up-to-date style documentation to enable effective work and communication. Even then, mistakes inevitably happen and the design may not be implemented accurately. Style Dictionary solves this by automatically generating style definitions across all platforms from a single source - removing roadblocks, errors, and inefficiencies across your workflow.
## Watch the Demo on Youtube
[![Watch the video](assets/fake_player.png)](http://youtu.be/1HREvonfqhY)
@@ -22,12 +21,12 @@ When you are managing user experiences, it can be quite challenging to keep styl
## The Basics
__A style dictionary consists of:__
-1. [Style properties](properties.md), organized in JSON files
+1. [Design tokens](tokens.md), organized in JSON, JSON5, or JS files
1. Static assets (e.g. fonts, icons, images, sounds, etc.), organized into folders
-1. [Configuration](config.md), defining the transformation of the properties and assets for each output platform
+1. [Configuration](config.md), defining the [transformation](transforms.md) and [formatting](formats.md) of the tokens and assets for each output platform
__What a style dictionary does:__
-1. Transforms style properties and assets into platform specific deliverables
+1. Transforms design tokens and assets into platform specific deliverables
1. Creates human readable artifacts (e.g. documentation, design libraries, etc)
__Things you can build with a style dictionary:__
@@ -39,15 +38,14 @@ __Things you can build with a style dictionary:__
**The value of using Style Dictionary to build all of these is that they are all consistent and up to date.**
-The Style Dictionary framework is fully extensible and modular. You can create any type of file from a style dictionary.
-If there is a new language, platform, or file type you need, you can easily [extend](extending.md) the style dictionary framework to create the necessary files.
+The Style Dictionary framework is fully extensible and modular. You can create any type of file from a style dictionary. If there is a new language, platform, or file type you need, you can easily [extend](extending.md) the style dictionary framework to create the necessary files.
## Contributing
-Please help make this framework better. For more information take a look at [CONTRIBUTING.md](https://github.com/amzn/style-dictionary/blob/master/CONTRIBUTING.md)
+Please help make this framework better. For more information take a look at [CONTRIBUTING.md](https://github.com/amzn/style-dictionary/blob/main/CONTRIBUTING.md)
## License
-[Apache 2.0](https://github.com/amzn/style-dictionary/blob/master/LICENSE)
+[Apache 2.0](https://github.com/amzn/style-dictionary/blob/main/LICENSE)
diff --git a/docs/_coverpage.md b/docs/_coverpage.md
index c226e7218..00aae4947 100644
--- a/docs/_coverpage.md
+++ b/docs/_coverpage.md
@@ -9,6 +9,6 @@
[GitHub](https://github.com/amzn/style-dictionary)
[Get Started](README.md)
-[Get ready for the next version of Style Dictionary!](version_3.md)
+[See what's new in 3.0!](version_3.md)
![color](#D9F8F5)
diff --git a/docs/_sidebar.md b/docs/_sidebar.md
index 0cac1f3b6..2da7a968a 100644
--- a/docs/_sidebar.md
+++ b/docs/_sidebar.md
@@ -3,16 +3,16 @@
- [Quick Start](quick_start.md)
- [Examples](examples.md)
- [Config](config.md)
- - [Properties](properties.md)
+ - [Tokens](tokens.md)
- [Package structure](package_structure.md)
- [Extending](extending.md)
- Reference
- [Architecture](architecture.md)
- - [Build Process](build_process.md)
- [Using the CLI](using_the_cli.md)
- [Using the NPM Module](using_the_npm_module.md)
- [API](api.md)
+ - [Parsers](parsers.md)
- [Transforms](transforms.md)
- [Transform groups](transform_groups.md)
- [Formats](formats.md)
diff --git a/docs/actions.md b/docs/actions.md
index 8234cce60..62b279d37 100644
--- a/docs/actions.md
+++ b/docs/actions.md
@@ -6,13 +6,13 @@ EDIT scripts/handlebars/templates/api.hbs OR JSDOC COMMENT INSTEAD!
Actions provide a way to run custom build code such as generating binary assets like images.
-Here are all the actions that come with the Style Dictionary build system. We try to include what most people might need. If you think we are missing some things, take a look at our [contributing docs](https://github.com/amzn/style-dictionary/blob/master/CONTRIBUTING.md) and send us a pull request! If you have a specific need for your project, you can always create your own custom action with [`registerAction`](api.md?id=registeraction).
+Here are all the actions that come with the Style Dictionary build system. We try to include what most people might need. If you think we are missing some things, take a look at our [contributing docs](https://github.com/amzn/style-dictionary/blob/main/CONTRIBUTING.md) and send us a pull request! If you have a specific need for your project, you can always create your own custom action with [`registerAction`](api.md?id=registeraction).
You use actions in your config file under platforms > [platform] > actions
```json
{
- "source": ["properties/**/*.json"],
+ "source": ["tokens/**/*.json"],
"platforms": {
"android": {
"transformGroup": "android",
@@ -28,7 +28,7 @@ You use actions in your config file under platforms > [platform] > actions
## Pre-defined Actions
-[lib/common/actions.js](https://github.com/amzn/style-dictionary/blob/master/lib/common/actions.js)
+[lib/common/actions.js](https://github.com/amzn/style-dictionary/blob/main/lib/common/actions.js)
### android/copyImages
diff --git a/docs/api.md b/docs/api.md
index 61c1800a2..709032849 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -28,7 +28,7 @@ StyleDictionary.buildAllPlatforms();
Takes a platform and performs all transforms to
-the properties object (non-mutative) then
+the tokens object (non-mutative) then
builds all the files and performs any actions. This is useful if you only want to
build the artifacts of one platform to speed up the build process.
@@ -70,8 +70,8 @@ defined in the platform and calls the undo method on any actions.
Takes a platform and performs all transforms to
-the properties object (non-mutative) then
-cleans all the files and perfoms the undo method of any [actions](actions.md).
+the tokens object (non-mutative) then
+cleans all the files and performs the undo method of any [actions](actions.md).
| Param | Type |
@@ -87,7 +87,7 @@ cleans all the files and perfoms the undo method of any [actions](actions.md).
-Exports a properties object with applied
+Exports a tokens object with applied
platform transforms.
This is useful if you want to use a style
@@ -119,7 +119,7 @@ Create a Style Dictionary
const StyleDictionary = require('style-dictionary').extend('config.json');
const StyleDictionary = require('style-dictionary').extend({
- source: ['properties/*.json'],
+ source: ['tokens/*.json'],
platforms: {
scss: {
transformGroup: 'scss',
@@ -142,7 +142,7 @@ const StyleDictionary = require('style-dictionary').extend({
-Adds a custom action to the style property builder. Custom
+Adds a custom action to Style Dictionary. Custom
actions can do whatever you need, such as: copying files,
base64'ing files, running other build scripts, etc.
After you register a custom action, you then use that
@@ -179,6 +179,37 @@ StyleDictionary.registerAction({
* * *
+### registerFileHeader
+> StyleDictionary.registerFileHeader(options) ⇒ [style-dictionary
](#module_style-dictionary)
+
+
+
+
+Add a custom file header to the style dictionary. File headers are used in
+formats to display some information about how the file was built in a comment.
+
+
+| Param | Type | Description |
+| --- | --- | --- |
+| options | Object
| |
+| options.name | String
| Name of the format to be referenced in your config.json |
+| options.fileHeader | function
| Function that returns an array of strings, which will be mapped to comment lines. It takes a single argument which is the default message array. See [file headers](formats.md#file-headers) for more information. |
+
+**Example**
+```js
+StyleDictionary.registerFileHeader({
+ name: 'myCustomHeader',
+ fileHeader: function(defaultMessage) {
+ return [
+ ...defaultMessage,
+ `hello, world!`
+ ];
+ }
+})
+```
+
+* * *
+
### registerFilter
> StyleDictionary.registerFilter(filter) ⇒ [style-dictionary
](#module_style-dictionary)
@@ -192,14 +223,14 @@ Add a custom filter to the style dictionary
| --- | --- | --- |
| filter | Object
| |
| filter.name | String
| Name of the filter to be referenced in your config.json |
-| filter.matcher | function
| Matcher function, return boolean if the property should be included. |
+| filter.matcher | function
| Matcher function, return boolean if the token should be included. |
**Example**
```js
StyleDictionary.registerFilter({
name: 'isColor',
- matcher: function(prop) {
- return prop.attributes.category === 'color';
+ matcher: function(token) {
+ return token.attributes.category === 'color';
}
})
```
@@ -219,14 +250,40 @@ Add a custom format to the style dictionary
| --- | --- | --- |
| format | Object
| |
| format.name | String
| Name of the format to be referenced in your config.json |
-| format.formatter | function
| Function to perform the format. Takes 2 arguments, `dictionary` and `config` Must return a string. Function is bound to its file object in the `platform.files` array. |
+| format.formatter | function
| Function to perform the format. Takes a single argument. See [creating custom formats](formats.md#creating-formats) Must return a string, which is then written to a file. |
**Example**
```js
StyleDictionary.registerFormat({
name: 'json',
- formatter: function(dictionary, config) {
- return JSON.stringify(dictionary.properties, null, 2);
+ formatter: function({dictionary, platform, options, file}) {
+ return JSON.stringify(dictionary.tokens, null, 2);
+ }
+})
+```
+
+* * *
+
+### registerParser
+> StyleDictionary.registerParser(pattern, parse) ⇒ [style-dictionary
](#module_style-dictionary)
+
+
+
+
+Adds a custom parser to parse style dictionary files
+
+
+| Param | Type | Description |
+| --- | --- | --- |
+| pattern | Regex
| A file path regular expression to match which files this parser should be be used on. This is similar to how webpack loaders work. `/\.json$/` will match any file ending in '.json', for example. |
+| parse | function
| Function to parse the file contents. Takes 1 argument, which is an object with 2 attributes: contents wich is the string of the file contents and filePath. The function should return a plain Javascript object. |
+
+**Example**
+```js
+StyleDictionary.registerParser({
+ pattern: /\.json$/,
+ parse: ({contents, filePath}) => {
+ return JSON.parse(contents);
}
})
```
@@ -267,7 +324,7 @@ StyleDictionary.registerTemplate({
Add a custom transform to the Style Dictionary
-Transforms can manipulate a property's name, value, or attributes
+Transforms can manipulate a token's name, value, or attributes
| Param | Type | Description |
@@ -275,22 +332,23 @@ Transforms can manipulate a property's name, value, or attributes
| transform | Object
| Transform object |
| transform.type | String
| Type of transform, can be: name, attribute, or value |
| transform.name | String
| Name of the transformer (used by transformGroup to call a list of transforms). |
-| [transform.matcher] | function
| Matcher function, return boolean if transform should be applied. If you omit the matcher function, it will match all properties. |
-| transform.transformer | function
| Performs a transform on a property object, should return a string or object depending on the type. Will only update certain properties by which you can't mess up property objects on accident. |
+| transform.transitive | Boolean
| If the value transform should be applied transitively, i.e. should be applied to referenced values as well as absolute values. |
+| [transform.matcher] | function
| Matcher function, return boolean if transform should be applied. If you omit the matcher function, it will match all tokens. |
+| transform.transformer | function
| Modifies a design token object. The transformer function will receive the token and the platform configuration as its arguments. The transformer function should return a string for name transforms, an object for attribute transforms, and same type of value for a value transform. |
**Example**
```js
StyleDictionary.registerTransform({
name: 'time/seconds',
type: 'value',
- matcher: function(prop) {
- return prop.attributes.category === 'time';
+ matcher: function(token) {
+ return token.attributes.category === 'time';
},
- transformer: function(prop) {
+ transformer: function(token) {
// Note the use of prop.original.value,
// before any transforms are performed, the build system
- // clones the original property to the 'original' attribute.
- return (parseInt(prop.original.value) / 1000).toString() + 's';
+ // clones the original token to the 'original' attribute.
+ return (parseInt(token.original.value) / 1000).toString() + 's';
}
});
```
diff --git a/docs/architecture.md b/docs/architecture.md
index fbd6e94c8..28bad20e6 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -1,4 +1,4 @@
-# Architecture Overview
+# Architecture
This is how Style Dictionary works under the hood.
@@ -8,11 +8,13 @@ Let's take a closer look into each of these steps.
## 1. Parse the config
-Style Dictionary is a configuration based framework, you tell it what to do in a configuration file. Style Dictionary first parses this configuration to know what to do.
+Style Dictionary is a configuration based framework, you tell it what to do in a configuration file. Style Dictionary first parses this [configuration](config.md) to know what to do.
## 2. Find all token files
-In your [config](config.md) file you define a `source`, which is an array of file paths. This tells Style Dictionary where to find your token files. You can have them anywhere and in any folder structure as long as you tell Style Dictionary where to find them.
+In your [config](config.md) file can define `include` and `source`, which are arrays of file path globs. These tell Style Dictionary where to find your token files. You can have them anywhere and in any folder structure as long as you tell Style Dictionary where to find them.
+
+If there are [custom parsers](parsers.md) defined, Style Dictionary will run those on files the parsers match.
## 3. Deep merge token files
@@ -20,18 +22,24 @@ Style Dictionary takes all the files it found and performs a deep merge. This al
## 4. Iterate over the platforms
-For each platform defined in your [config](config.md), Style Dictionary will do a few steps to get it ready to be consumed on that platform. You don't need to worry about one platform affecting another because everything that happens in a platform is non-destructive
+For each platform defined in your [config](config.md), Style Dictionary will do a few steps to get it ready to be consumed on that platform. You don't need to worry about one platform affecting another because everything that happens in a platform is non-destructive.
## 4a. Transform the tokens
Style Dictionary now traverses over the whole token object and looks for design tokens. It does this by looking for anything with a `value` key. When it comes across a design token, it then performs all the [transforms](transforms.md) defined in your [config](config.md) in order.
+Value transforms, transforms that modify a token's value, are skipped if the token references another token. Starting in 3.0, you can define a [transitive transform](transforms.md#transitive-transforms) that will transform a value that references another token after that reference has been resolved.
+
## 4b. Resolve aliases / references to other values
-After all the tokens have been transformed, it then does another pass over the token object looking for aliases, which look like `"{size.font.base.value}"`. When it finds these, it then replaces the reference with the transformed value. As we have a single complete token object, aliases can be in any token file and still work.
+After all the tokens have been transformed, it then does another pass over the token object looking for aliases, which look like `"{size.font.base.value}"`. When it finds these, it then replaces the reference with the transformed value. Because Style Dictionary merges all token files into a single object, aliases can be in any token file and still work.
## 4c. Format the tokens into files
Now all the design tokens are ready to be written to a file. Style Dictionary takes the whole transformed and resolved token object and for each file defined in the platform it [formats](formats.md) the token object and write the output to a file. Internally, Style Dictionary creates a flat array of all the design tokens it finds in addition to the token object. This is how you can output a flat SCSS variables file.
-After Style Dictionary does steps 4-6 for each platform, now you have all your output files that are ready to consume in each platform and codebase.
+## 4d. Run actions
+
+[Actions](actions.md) are custom code that run in a platform after the files are generated. They are useful for things like copying assets to specific build directories or generating images.
+
+After Style Dictionary does steps 4a-4d for each platform, you will have all your output files that are ready to consume in each platform and codebase.
diff --git a/docs/assets/styles.css b/docs/assets/styles.css
index 35a24813c..fa97f2d2c 100644
--- a/docs/assets/styles.css
+++ b/docs/assets/styles.css
@@ -284,7 +284,8 @@ section.cover .cover-main {
}
.markdown-section hr {
- border-bottom: 5px solid transparent;
+ width: 25%;
+ border-bottom: 5px solid #F1F1F2;
}
.token.punctuation {
@@ -363,6 +364,11 @@ section.cover .cover-main {
color: var(--theme-color-dark);
}
+.alert {
+ padding: 2rem;
+ border: 0.1rem solid var(--theme-color-secondary-light);
+}
+
/* Badges */
.markdown-section > p:first-child > a {
diff --git a/docs/build_process.md b/docs/build_process.md
deleted file mode 100644
index 95936a01d..000000000
--- a/docs/build_process.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# Build Process
-
-Here is what the build system is doing under the hood.
-
-![build structure](assets/build-diagram.png)
-
-1. The build system reads in a configuration
-1. If there is an `includes` attribute in the config, it will take those files and deep merge them into the `properties` object
-1. It takes all the JSON files in the `source` attribute in the config and performs a deep merge onto the `properties` object
-1. Then it iterates over the platforms in the config and:
- 1. Performs all transforms, in order, defined in the transforms attribute or transformGroup
- 1. Builds all files defined in the files array
- 1. Performs any actions defined in the actions attribute
-
-# How to Build
-You can build a style dictionary [using the cli](using_the_cli.md) or [using the npm module](using_the_npm_module.md).
diff --git a/docs/config.md b/docs/config.md
index 7523a8443..ab185e647 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -1,17 +1,15 @@
# Configuration
-Style dictionaries are configuration driven. Your config file defines what executes and what to output when the style dictionary builds.
+Style dictionaries are configuration driven. Your configuration lets Style Dictionary know:
-By default, Style Dictionary looks for a `config.json` file in the root of your package. If not found, it looks for a `config.js` file in the root of your package. You can also specify a custom location when you use the [CLI](using_the_cli.md). If you want a custom build system using the [npm module](using_the_npm_module.md), you can specify a custom location for a configuration file or use a plain Javascript object.
+1. Where to find your [design tokens](tokens.md)
+1. How to transform and format them to generate output files
-## config.js
-You can find out more about creating configurations in JS in our documentation about using the [npm module](using_the_npm_module.md).
+Here is an example configuration:
-## config.json
- Here is a quick example:
```json
{
- "source": ["properties/**/*.json"],
+ "source": ["tokens/**/*.json"],
"platforms": {
"scss": {
"transformGroup": "scss",
@@ -35,20 +33,145 @@ You can find out more about creating configurations in JS in our documentation a
}
```
+## Configuration file formats
+
+Style Dictionary supports configuration files in these file formats:
+
+* JSON
+* JSON5
+* Javascript (CommonJS)
+
+Here is an example using a CommonJS module for configuration:
+
+```javascript
+// config.js
+module.exports = {
+ source: [`tokens/**/*.json`],
+ // If you don't want to call the registerTransform method a bunch of times
+ // you can override the whole transform object directly. This works because
+ // the .extend method copies everything in the config
+ // to itself, allowing you to override things. It's also doing a deep merge
+ // to protect from accidentally overriding nested attributes.
+ transform: {
+ // Now we can use the transform 'myTransform' below
+ myTransform: {
+ type: 'name',
+ transformer: (token) => token.path.join('_').toUpperCase()
+ }
+ },
+ // Same with formats, you can now write them directly to this config
+ // object. The name of the format is the key.
+ format: {
+ myFormat: ({dictionary, platform}) => {
+ return dictionary.allTokens.map(token => `${token.name}: ${token.value}`).join('\n');
+ }
+ },
+ platforms: {
+ // ...
+ }
+}
+```
+
+Some interesting things you can do in a CommonJS file that you cannot do in a JSON file:
+
+* Add custom transforms, formats, filters, actions, and parsers
+* Programmatically generate your configuration
+
+
+----
+
+
+## Using configuration files
+
+By default, the Style Dictionary [CLI](using_the_cli.md) looks for a `config.json` or `config.js` file in the root of your package.
+
+```json5
+// package.json
+"scripts": {
+ "build": "style-dictionary build"
+}
+```
+
+You can also specify a custom location when you use the [CLI](using_the_cli.md) with the `--config` parameter.
+
+```json5
+// package.json
+"scripts": {
+ "build": "style-dictionary build --config ./sd.config.js"
+}
+```
+
+## Using in Node
+
+You can also use Style Dictionary as an [npm module](using_the_npm_module.md) and further customize how Style Dictionary is run, for example running Style Dictionary multiple times with different configurations. To do this you would create a Javascript file that imports the Style Dictionary npm module and calls the [`.extend`](api.md#extend) and [`.buildAllPlatforms`](api.md#buildallplatforms) functions.
+
+```javascript
+// build.js
+const StyleDictionary = require('style-dictionary');
+
+const myStyleDictionary = StyleDictionary.extend({
+ // configuration
+});
+
+myStyleDictionary.buildAllPlatforms();
+
+// You can also extend Style Dictionary multiple times:
+const myOtherStyleDictionary = myStyleDictionary.extend({
+ // new configuration
+});
+
+myOtherStyleDictionary.buildAllPlatforms();
+```
+
+You would then change your npm script or CLI command to run that file with Node:
+
+```json5
+// package.json
+"scripts": {
+ "build": "node build.js"
+}
+```
+
+----
+
+
+## Attributes
+
| Attribute | Type | Description |
| :--- | :--- | :--- |
-| include | Array[String] (optional) | An array of path [globs](https://github.com/isaacs/node-glob) to Style Dictionary property files that contain default styles. The Style Dictionary uses this as a base collection of properties. The properties found using the "source" attribute will overwrite properties found using include. |
-| source | Array[String] | An array of path [globs](https://github.com/isaacs/node-glob) to JSON files that contain style properties. The Style Dictionary will do a deep merge of all of the JSON files, allowing you to separate your properties into multiple files. |
-| platforms | Object | An object containing platform config objects that describe how the Style Dictionary should build for that platform. You can add any arbitrary attributes on this object that will get passed to formats and actions (more on these in a bit). This is useful for things like build paths, name prefixes, variable names, etc. |
-| platform.transforms | Array[String] (optional) | An array of [transforms](transforms.md) to be performed on the style properties object. These will transform the properties in a non-destructive way, allowing each platform to transform the properties. Transforms to apply sequentially to all properties. Can be a built-in one or you can create your own. |
-| platform.transformGroup | String (optional) | A string that maps to an array of transforms. This makes it easier to reference transforms by grouping them together. You must either define this or [transforms](transforms.md). |
-| platform.buildPath | String (optional) | Base path to build the files, must end with a trailing slash. |
-| platform.files | Array (optional) | Files to be generated for this platform. |
-| platform.file.destination | String (optional) | Location to build the file, will be appended to the buildPath. |
-| platform.file.format | String (optional) | [Format](formats.md) used to generate the file. Can be a built-in one or you can create your own via [registerFormat](api.md#registerformat). |
-| platform.file.filter | String/Function/Object (optional) | A function, string or object used to filter the properties that will be included in the file. If a function is provided, each property will be passed to the function and the result (true or false) will determine whether the property is included. If an object is provided, each property will be matched against the object using a partial deep comparison. If a match is found, the property is included. If a string is passed, is considered a custom filter registered via [registerFilter](api.md#registerfilter) |
-| platform.file.options | Object (optional) | A set of extra options associated with the file. Only includes 'showFileHeader' at this time. |
-| platform.file.options.showFileHeader | Boolean | If the generated file should have a "Do not edit + Timestamp" header (where the format supports it). By default is "true". |
-| platform.actions | Array[String] (optional) | [Actions](actions.md) to be performed after the files are built for that platform. Actions can be any arbitrary code you want to run like copying files, generating assets, etc. You can use pre-defined actions or create custom actions. |
+| transform | Object (optional) | Custom [transforms](transforms.md) you can include inline rather than using `.registerTransform`. The keys in this object will be the transform's name, the value should be an object with `type`
+| format | Object (optional) | Custom [formats](formats.md) you can include inline in the configuration rather than using `.registerFormat`. The keys in this object will be for format's name and value should be the formatter function.
+| action | Object (optional) | Custom inline [actions](actions.md). The keys in this object will be the action's name and the value should be an object containing `do` and `undo` methods.
+| parsers | Array[Parser] (optional) | Custom [file parsers](parsers.md) to run on input files |
+| include | Array[String] (optional) | An array of file path [globs](https://github.com/isaacs/node-glob) to design token files that contain default styles. Style Dictionary uses this as a base collection of design tokens. The tokens found using the "source" attribute will overwrite tokens found using include. |
+| source | Array[String] | An array of file path [globs](https://github.com/isaacs/node-glob) to design token files. Style Dictionary will do a deep merge of all of the token files, allowing you to organize your files files however you want. |
+| tokens | Object | The tokens object is a way to include inline design tokens as opposed to using the `source` and `include` arrays.
+| properties | Object | **DEPRECATED** The properties object has been renamed to `tokens`. Using the `properties` object will still work for backwards compatibility.
+| platforms | Object[Platform] | An object containing [platform](#platform) config objects that describe how the Style Dictionary should build for that platform. You can add any arbitrary attributes on this object that will get passed to formats and actions (more on these in a bit). This is useful for things like build paths, name prefixes, variable names, etc.
-----
+### Platform
+
+A platform is a build target that tells Style Dictionary how to properly transform and format your design tokens for output to a specific platform. You can have as many platforms as you need and you can name them anything, there are no restrictions.
+
+| Attribute | Type | Description |
+| :--- | :--- | :--- |
+| transforms | Array[String] (optional) | An array of [transforms](transforms.md) to be performed on the design tokens. These will transform the tokens in a non-destructive way, allowing each platform to transform the tokens. Transforms to apply sequentially to all tokens. Can be a built-in one or you can create your own.
+| transformGroup | String (optional) | A string that maps to an array of transforms. This makes it easier to reference transforms by grouping them together. You must either define this or [transforms](transforms.md).
+| buildPath | String (optional) | Base path to build the files, must end with a trailing slash.
+| options | Object (optional) | Options that apply to all files in the platform, for example `outputReferences` and `showFileHeader`
+| files | Array[File] (optional) | [Files](#file) to be generated for this platform.
+| actions | Array[String] (optional) | [Actions](actions.md) to be performed after the files are built for that platform. Actions can be any arbitrary code you want to run like copying files, generating assets, etc. You can use pre-defined actions or create custom actions.
+
+### File
+
+A File configuration object represents a single output file. The `options` object on the file configuration will take precedence over the `options` object defined at the platform level.
+
+| Attribute | Type | Description |
+| :--- | :--- | :--- |
+| destination | String (optional) | Location to build the file, will be appended to the buildPath. |
+| format | String (optional) | [Format](formats.md) used to generate the file. Can be a built-in one or you can create your own via [registerFormat](api.md#registerformat). |
+| filter | String/Function/Object (optional) | A function, string or object used to filter the tokens that will be included in the file. If a function is provided, each design token will be passed to the function and the result (true or false) will determine whether the design token is included. If an object is provided, each design token will be matched against the object using a partial deep comparison. If a match is found, the design token is included. If a string is passed, is considered a custom filter registered via [registerFilter](api.md#registerfilter) |
+| options | Object (optional) | A set of extra options associated with the file. Includes `showFileHeader` and `outputReferences`. |
+| options.showFileHeader | Boolean | If the generated file should have a comment at the top about being generated. The default fileHeader comment has "Do not edit + Timestamp". By default is "true". |
+| options.fileHeader | String/Function (optional) | A custom fileHeader that can be either a name of a registered file header (string) or an inline [fileHeader](formats.md#customfileheader) function.
+| options.outputReferences | Boolean | If the file should keep token [references](formats.md#references-in-output-files). By default this is "false".
diff --git a/docs/examples.md b/docs/examples.md
index 5245e9523..f37209cc5 100644
--- a/docs/examples.md
+++ b/docs/examples.md
@@ -24,18 +24,29 @@ This is a more complete package and should have everything you need to get start
## Advanced
[View the folder](https://github.com/amzn/style-dictionary/tree/main/examples/advanced)
-If you want to look at more advanced examples of possible applications and customizations of Style Dictionary, the `examples/advanced` folder on GitHub contains these extra folders:
+If you want to look at more advanced examples of possible applications and customizations of Style Dictionary, the [`examples/advanced`](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/) folder on GitHub contains these extra folders:
* [**assets-base64-embed**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/assets-base64-embed) shows how it's possible to embed and distribute assets – like images, icons and fonts – directly as design tokens.
-* [**auto-rebuild-watcher**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/auto-rebuild-watcher) shows how to setup a "watcher" that auto-rebuilds the tokens every time there is a change in the properties.
+* [**auto-rebuild-watcher**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/auto-rebuild-watcher) shows how to setup a "watcher" that auto-rebuilds the tokens every time there is a change in the tokens.
+* [**component-cti**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/component-cti) shows how to write component tokens and still use the CTI structure.
+* [**create-react-app**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/create-react-app) shows how to integrate Style Dictionary into a React application.
+* [**create-react-native-app**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/create-react-native-app) shows how to integrate Style Dictionary into a React Native application.
+* [**custom-file-header**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/custom-file-header) shows how to define custom file headers and use them in output files.
* [**custom-formats-with-templates**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/custom-formats-with-templates) shows how to generate custom output formats using templates, useful when you need to distribute your design tokens into your own pipelines or scripts.
-* [**custom-transforms**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/custom-transforms) shows how to use custom transforms (and transformGroups) to apply custom "transformations" to the properties when converted to design tokens.
-* [**multi-brand-multi-platform**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/multi-brand-multi-platform) shows how to set up Style Dictionary to support a multi-brand (for brand theming) and multi-platform (web, iOS, Android) solution, with property values depending on brand and platforms.
+* [**custom-parser**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/custom-parser) shows how to use custom parsers for token files.
+* [**custom-transforms**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/custom-transforms) shows how to use custom transforms (and transformGroups) to apply custom "transformations" to the design tokens.
+* [**flutter**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/flutter) shows how to integrate with Flutter applications.
+* [**matching-build-files**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/matching-build-files) shows how to output files 1-to-1 with source files.
+* [**multi-brand-multi-platform**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/multi-brand-multi-platform) shows how to set up Style Dictionary to support a multi-brand (for brand theming) and multi-platform (web, iOS, Android) solution, with token values depending on brand and platforms.
+* [**node-modules-as-config-and-properties**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/node-modules-as-config-and-properties) shows how to use Javascript rather than JSON for configuration and token files.
* [**npm-module**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/npm-module) shows how to set up a style dictionary as an npm module, either to publish to a local npm service or to publish externally.
+* [**referencing_aliasing**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/referencing_aliasing) shows how to use referencing (or "aliasing") to reference a value -or an attribute– of a token and assign it to the value –or attribute– of another token.
* [**s3**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/s3) shows how to set up a style dictionary to build files for different platforms (web, iOS, Android) and upload those build artifacts, together with a group of assets, to an S3 bucket.
-* [**referencing_aliasing**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/referencing_aliasing) shows how to use referencing (or "aliasing") to reference a value -or an attribute– of a property and assign it to the value –or attribute– of another property.
* [**tokens-deprecation**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/tokens-deprecation) shows one way to deprecate tokens by adding metadata to tokens and using custom formats to output comments in the generated files.
-* [**component-cti**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/component-cti) shows how to write component tokens and still use the CTI structure.
+* [**transitive-transforms**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/transitive-transforms) shows how to use transitive transforms to transform references
+* [**variables-in-outputs**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/variables-in-outputs) shows you how to use the `outputReferences` option to generate files variable references in them.
+* [**yaml-tokens**](https://github.com/amzn/style-dictionary/tree/main/examples/advanced/yaml-tokens) shows how to use a custom parser to define your source files in YAML rather than JSON.
+
---
diff --git a/docs/extending.md b/docs/extending.md
index 83a8c76a5..3222e47f8 100644
--- a/docs/extending.md
+++ b/docs/extending.md
@@ -9,6 +9,7 @@ There is a straightforward way to extend Style Dictionary to meet your needs - s
* [registerFormat](api.md#registerformat)
* [registerTemplate](api.md#registertemplate) (deprecated)
* [registerAction](api.md#registeraction)
+* [registerParser](api.md#registerparser)
## Extension Examples
Importing a configuration, defining a new `time/seconds` transform, and building the style dictionary.
diff --git a/docs/formats.md b/docs/formats.md
index 0fa1aba81..7e49f936b 100644
--- a/docs/formats.md
+++ b/docs/formats.md
@@ -8,13 +8,13 @@ Formats define the output of your created files. For example, to use your styles
you use the `css/variables` format. This will create a CSS file containing the variables from
your style dictionary.
-### Using formats
+## Using formats
You use formats in your config file under platforms > [platform] > files > [file] > format
```json
{
- "source": ["properties/**/*.json"],
+ "source": ["tokens/**/*.json"],
"platforms": {
"css": {
"transformGroup": "css",
@@ -31,13 +31,13 @@ You use formats in your config file under platforms > [platform] > files > [file
There is an extensive (but not exhaustive) list of [included formats](#pre-defined-formats) available in Style Dictionary.
-### Format configuration
+## Format configuration
Formats can take configuration to make them more flexible. This allows you to re-use the same format multiple times with different configurations or to allow the format to use data not defined in the tokens themselves. To configure a format, add extra attributes on the file object in your configuration like the following:
```json
{
- "source": ["properties/**/*.json"],
+ "source": ["tokens/**/*.json"],
"platforms": {
"scss": {
"transformGroup": "scss",
@@ -53,13 +53,13 @@ Formats can take configuration to make them more flexible. This allows you to re
In this example we are adding the `mapName` configuration to the `scss/map-deep` format. This will change the name of the SCSS map in the output. Not all formats have the configuration options; format configuration is defined by the format itself. To see the configurtion options of a format, take a look at the documentation of the [specific format](#pre-defined-formats)
-### Filtering tokens
+## Filtering tokens
A special file configuration is `filter`, which will filter the tokens before they get to the format. This allows you to re-use the same format to generate multiple files with different sets of tokens. Filtering tokens works by adding a `filter` attribute on the file object, where `filter` is:
* An object which gets passed to [Lodash's filter method](https://lodash.com/docs/4.17.14#filter).
* A string that references the name of a registered filter, using the [`registerFilter`](api.md#registerfilter) method
-* A function if you are defining your configuration in Javascript rather than JSON. The filter function takes a token as the property and should return a boolean if the token should be included (true) or excluded (false).
+* A function that takes a token and returns a boolean if the token should be included (true) or excluded (false). **This is only available if you are defining your configuration in Javascript.**
```javascript
{
@@ -71,24 +71,554 @@ A special file configuration is `filter`, which will filter the tokens before th
}
```
-### Creating formats
+The design token that is passed to the filter function has already been [transformed](transforms.md) and has [default metadata](tokens.md?id=default-design-token-metadata) added by Style Dictionary.
-You can create custom formats using the [`registerFormat`](api.md#registerformat) function. If you want to add configuration to your custom format, `this` is bound to the file object. Using this, you can access attributes on the file object with `this.myCustomAttribute` if the file object looks like:
+## References in output files
+
+Starting with version 3.0, some formats can keep the references in the output. This is a bit hard to explain, so let's look at an example. Say you have this very basic set of design tokens:
+
+```json5
+// tokens.json
+{
+ "color": {
+ "red": { "value": "#ff0000" },
+ "danger": { "value": "{color.red.value}" },
+ "error": { "value": "{color.danger.value}" }
+ }
+}
+```
+
+With this configuration:
+
+```json5
+// config.json
+{
+ "source": ["tokens.json"]
+ "platforms": {
+ "css": {
+ "transformGroup": "css",
+ "files": [{
+ "destination": "variables.css",
+ "format": "css/variables",
+ "options": {
+ // Look here 👇
+ "outputReferences": true
+ }
+ }]
+ }
+ }
+}
+```
+
+This would be the output:
+
+```css
+:root {
+ --color-red: #ff0000;
+ --color-danger: var(--color-red);
+ --color-error: var(--color-danger);
+}
+```
+
+The css variables file now keeps the references you have in your Style Dictionary! This is useful for outputting themeable and dynamic code.
+
+Without `outputReferences: true` Style Dictionary would resolve all references and the output would be:
+
+```css
+:root {
+ --color-red: #ff0000;
+ --color-danger: #ff0000;
+ --color-error: #ff0000;
+}
+```
+
+Not all formats use the `outputReferences` option because that file format might not support it (like JSON for example). The current list of formats that handle `outputReferences`:
+
+* [css/variables](#cssvariables)
+* [scss/variables](#scssvariables)
+* [less/variables](#lessvariables)
+* [android/resources](#androidresources)
+* [compose/object](#composeobject)
+* [ios-swift/class.swift](#ios-swiftclassswift)
+* [flutter/class.dart](#flutterclassdart)
+
+You can create custom formats that output references as well. See the [Custom format with output references](#custom-format-with-output-references) section.
+
+## File headers
+
+By default Style Dictionary adds a file header comment in the top of files built using built-in formats like this:
+
+```js
+// Do not edit directly
+// Generated on Sat, 01 Jan 2000 00:00:00 GMT
+```
+
+You can remove these comments with the option: `showFileHeader: false` if you do not want them in your generated files. You can also create your own file header or extend the default one. This could be useful if you want to put a version number or hash of the source files rather than a timestamp.
+
+Custom file headers can be added the same way you would add a custom format, either by using the [`registerFileHeader`](api.md#registerfileheader) function or adding the fileHeader object directly in the Style Dictionary [configuration](config.md). Your custom file header can be used in built-in formats as well as custom formats. To use a custom file header in a custom format see the [`fileHeader`](formats.md#fileheader) format helper method.
+
+```js
+const StyleDictionary = require('style-dictionary');
+StyleDictionary.registerFileHeader({
+ name: 'myCustomHeader',
+ fileHeader: (defaultMessage) => {
+ // defaultMessage are the 2 lines above that appear in the default file header
+ // you can use this to add a message before or after the default message 👇
+
+ // the fileHeader function should return an array of strings
+ // which will be formatted in the proper comment style for a given format
+ return [
+ ...defaultMessage,
+ `hello?`,
+ `is it me you're looking for?`,
+ ]
+ }
+});
+```
+
+Then you can use your custom file header in a file similar to a custom format:
+
+```json5
+{
+ source: ['tokens/**/*.json'],
+ platforms: {
+ css: {
+ transformGroup: 'css',
+ files: [{
+ destination: 'variables.css',
+ format: 'css/variables',
+ options: {
+ fileHeader: 'myCustomHeader'
+ }
+ }]
+ }
+ }
+}
+```
+
+Which should output a file that will start like this:
+
+```css
+/**
+ * Do not edit directly
+ * Generated on Thu, 18 Mar 2021 21:30:47 GMT
+ * hello?
+ * is it me you're looking for?
+ */
+```
+
+For an in-depth example see the [custom-file-header](https://github.com/amzn/style-dictionary/examples/advanced/custom-file-header) example.
+
+## Custom formats
+
+You can create custom formats using the [`registerFormat`](api.md#registerformat) function or by directly including them in your [configuration](config.md). A format has a name and a formatter function, which takes an object as the argument and should return a string which is then written to a file.
+
+### formatter
+> format.formatter(args) ⇒ String
+
+The formatter function that is called when Style Dictionary builds files.
+
+
+
+
+ Param | Type | Description |
+
+
+
+
+ args | Object | A single argument to support named parameters and destructuring.
+ |
+
+ args.dictionary | Object | The transformed and resolved dictionary object
+ |
+
+ args.dictionary.tokens | Object | Object structure of the tokens that has been transformed and references resolved.
+ |
+
+ args.dictionary.allTokens | Array | Flattened array of all the tokens. This makes it easy to output a list, like a list of SCSS variables.
+ |
+
+ args.dictionary.usesReference | function | Use this function to see if a token's value uses a reference. This is the same function style dictionary uses internally to detect a reference.
+ |
+
+ args.dictionary.getReferences | function | Use this function to get the tokens that it references. You can use this to output a reference in your custom format. For example: dictionary.getReferences(token.original.value) // returns an array of the referenced token objects
+ |
+
+ args.platform | Object | The platform configuration this format is being called in.
+ |
+
+ args.file | Object | The file configuration this format is being called in.
+ |
+
+ args.options | Object | Merged options object that combines platform level configuration and file level configuration. File options take precedence.
+ |
+
+
+
+**Example**
+```js
+StyleDictionary.registerFormat({
+ name: 'myCustomFormat',
+ formatter: function({dictionary, platform, options, file}) {
+ return JSON.stringify(dictionary.tokens, null, 2);
+ }
+})
+```
+
+* * *
+
+
+To use your custom format, you call it by name in the file configuration object:
```json
{
- "destination": "destination",
- "format": "myCustomFormat",
- "myCustomAttribute": "Hello world"
+ "source": ["tokens/**/*.json"],
+ "platforms": {
+ "css": {
+ "options": {
+ "showFileHeader": true
+ },
+ "transformGroup": "css",
+ "files": [{
+ "destination": "destination",
+ "format": "myCustomFormat",
+ "options": {
+ "showFileHeader": false
+ }
+ }]
+ }
+ }
}
```
+It is recommended for any configuration needed for your custom format to use the `options` object. Style Dictionary will merge platform and file options so that in your Style Dictionary configuration you can specify options at a platform or file level. In the configuration above, the `options` object passed to the formatter would have `showFileHeader: false`.
+
+
+Note: to support legacy ways of defining custom formats, this
in the formatter function is bound to the file object and when Style Dictionary calls the formatter function it passes 3 arguments: dictionary, platform, and file. Starting in 3.0 all data the formatter needs is in the first argument as shown above to make it easier to grab the arguments by name rather than by position. We recommend not using this
or the positional arguments in your custom format.
+
+
+## Custom format with output references
+
+To take advantage of outputting references in your custom formats there are 2 helper methods in the `dictionary` argument passed to your formatter function: `usesReference(value)` and `getReferences(value)`. Here is an example using those:
+
+```javascript
+StyleDictionary.registerFormat({
+ name: `es6WithReferences`,
+ formatter: function({dictionary}) {
+ return dictionary.allTokens.map(token => {
+ let value = JSON.stringify(token.value);
+ // the `dictionary` object now has `usesReference()` and
+ // `getReferences()` methods. `usesReference()` will return true if
+ // the value has a reference in it. `getReferences()` will return
+ // an array of references to the whole tokens so that you can access its
+ // name or any other attributes.
+ if (dictionary.usesReference(token.original.value)) {
+ // Note: make sure to use `token.original.value` because
+ // `token.value` is already resolved at this point.
+ const reference = dictionary.getReferences(token.original.value);
+ value = reference.name;
+ }
+ return `export const ${token.name} = ${value};`
+ }).join(`\n`)
+ }
+});
+```
+
+## Custom format helpers
+
+We provide some helper methods we use internally in some of the built-in formats to make building custom formats a bit easier. They are accessible at `StyleDictionary.formatHelpers`.
+
+```javascript
+const StyleDictionary = require('style-dictionary');
+
+const { fileHeader, formattedVariables } = StyleDictionary.formatHelpers;
+
+StyleDictionary.registerFormat({
+ name: 'myCustomFormat',
+ formatter: function({dictionary, file, options}) {
+ const { outputReferences } = options;
+ return fileHeader({file}) +
+ ':root {\n' +
+ formattedVariables({format: 'css', dictionary, outputReferences}) +
+ '\n}\n';
+ }
+});
+```
+
+Here are the available format helper methods:
+
+### createPropertyFormatter
+> formatHelpers.createPropertyFormatter(options) ⇒ function
+
+Creates a function that can be used to format a property. This can be useful
+to use as the function on `dictionary.allTokens.map`. The formatting
+is configurable either by supplying a `format` option or a `formatting` object
+which uses: prefix, indentation, separator, suffix, and commentStyle.
+
+
+
+
+ Param | Type | Description |
+
+
+
+
+ options | Object | |
+
+ options.outputReferences | Boolean | Whether or not to output references. You will want to pass this from the options object sent to the formatter function.
+ |
+
+ options.dictionary | Dictionary | The dictionary object sent to the formatter function
+ |
+
+ options.format | String | Available formats are: 'css', 'sass', 'less', and 'stylus'. If you want to customize the format and can't use one of those predefined formats, use the formatting option
+ |
+
+ options.formatting | Object | Custom formatting properties that define parts of a declaration line in code. The configurable strings are: prefix, indentation, separator, suffix, and commentStyle. Those are used to generate a line like this: ${indentation}${prefix}${prop.name}${separator} ${prop.value}${suffix}
+ |
+
+
+
+**Example**
+```javascript
+StyleDictionary.registerFormat({
+ name: 'myCustomFormat',
+ formatter: function({ dictionary, options }) {
+ const { outputReferences } = options;
+ const formatProperty = createPropertyFormatter({
+ outputReferences,
+ dictionary,
+ format: 'css'
+ });
+ return dictionary.allTokens.map(formatProperty).join('\n');
+ }
+});
+```
+
+* * *
+
+### fileHeader
+> formatHelpers.fileHeader(options) ⇒ String
+
+This is for creating the comment at the top of generated files with the generated at date.
+It will use the custom file header if defined on the configuration, or use the
+default file header.
+
+
+
+
+ Param | Type | Description |
+
+
+
+
+ options | Object | |
+
+ options.file | File | The file object that is passed to the formatter.
+ |
+
+ options.commentStyle | String | The only options are 'short' and 'xml', which will use the // or <!-- --> style comments respectively. Anything else will use /* style comments.
+ |
+
+ options.formatting | Object | Custom formatting properties that define parts of a comment in code. The configurable strings are: prefix, lineSeparator, header, and footer.
+ |
+
+
+
+**Example**
+```js
+StyleDictionary.registerFormat({
+ name: 'myCustomFormat',
+ formatter: function({ dictionary, file }) {
+ return fileHeader({file, 'short') +
+ dictionary.allTokens.map(token => `${token.name} = ${token.value}`)
+ .join('\n');
+ }
+});
+```
+
+* * *
+
+### formattedVariables
+> formatHelpers.formattedVariables(options) ⇒ String
+
+This is used to create lists of variables like Sass variables or CSS custom properties
+
+
+
+
+ Param | Type | Description |
+
+
+
+
+ options | Object | |
+
+ options.format | String | What type of variables to output. Options are: css, sass, less, and stylus
+ |
+
+ options.dictionary | Object | The dictionary object that gets passed to the formatter method.
+ |
+
+ options.outputReferences | Boolean | Whether or not to output references
+ |
+
+ options.formatting | Object | Custom formatting properties that define parts of a declaration line in code. This will get passed to formatHelpers.createPropertyFormatter and used for the lineSeparator between lines of code.
+ |
+
+
+
+**Example**
+```js
+StyleDictionary.registerFormat({
+ name: 'myCustomFormat',
+ formatter: function({ dictionary, options }) {
+ return formattedVariables('less', dictionary, options.outputReferences);
+ }
+});
+```
+
+* * *
+
+### iconsWithPrefix
+> formatHelpers.iconsWithPrefix(prefix, allTokens, options) ⇒ String
+
+This is used to create CSS (and CSS pre-processor) lists of icons. It assumes you are
+using an icon font and creates helper classes with the :before pseudo-selector to add
+a unicode character.
+__You probably don't need this.__
+
+
+
+
+ Param | Type | Description |
+
+
+
+
+ prefix | String | Character to prefix variable names, like '$' for Sass
+ |
+
+ allTokens | Array.<Token> | allTokens array on the dictionary object passed to the formatter function.
+ |
+
+ options | Object | options object passed to the formatter function.
+ |
+
+
+
+**Example**
+```js
+StyleDictionary.registerFormat({
+ name: 'myCustomFormat',
+ formatter: function({ dictionary, options }) {
+ return iconsWithPrefix('$', dictionary.allTokens, options);
+ }
+});
+```
+
+* * *
+
+### minifyDictionary
+> formatHelpers.minifyDictionary(obj) ⇒ Object
+
+Outputs an object stripping out everything except values
+
+
+
+
+ Param | Type | Description |
+
+
+
+
+ obj | Object | The object to minify. You will most likely pass dictionary.tokens to it.
+ |
+
+
+
+**Example**
+```js
+StyleDictionary.registerFormat({
+ name: 'myCustomFormat',
+ formatter: function({ dictionary }) {
+ return JSON.stringify(minifyDictionary(dictionary.tokens));
+ }
+});
+```
+
+* * *
+
+### sortByName
+> formatHelpers.sortByName(a, b) ⇒ Integer
+
+A sorting function to be used when iterating over `dictionary.allTokens` in
+a format.
+
+**Returns**: Integer
- -1 or 1 depending on which element should come first based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
+
+
+
+ Param | Type | Description |
+
+
+
+
+ a | * | first element for comparison
+ |
+
+ b | * | second element for comparison
+ |
+
+
+
+**Example**
+```javascript
+StyleDictionary.registerFormat({
+ name: 'myCustomFormat',
+ formatter: function({ dictionary, options }) {
+ return dictionary.allTokens.sort(sortByName)
+ .map(token => `${token.name} = ${token.value}`)
+ .join('\n');
+ }
+});
+```
+
+* * *
+
+### sortByReference
+> formatHelpers.sortByReference(dictionary) ⇒ function
+
+A function that returns a sorting function to be used with Array.sort that
+will sort the allTokens array based on references. This is to make sure
+if you use output references that you never use a reference before it is
+defined.
+
+
+
+
+ Param | Type |
+
+
+
+
+ dictionary | Dictionary |
+
+
+
+**Example**
+```javascript
+dictionary.allTokens.sort(sortByReference(dictionary))
+```
+
+* * *
+
-### Using a template / templating engine to create a format
+## Using a template / templating engine to create a format
Formatters are functions and created easily with most templating engines. Formats can be built using templates if there is a lot of boilerplate code to insert (e.g. ObjectiveC files). If the output consists of only the values (e.g. a flat SCSS variables file), writing a formatter function directly may be easier.
-Any templating language can work as there is a node module for it. All you need to do is register a format that calls your template and returns a string.
+Any templating language can work as long as there is a node module for it. All you need to do is register a format that calls your template and returns a string.
Here is a quick example for Lodash.
@@ -116,9 +646,9 @@ const template = Handlebars.compile( fs.readFileSync('templates/MyTemplate.hbs')
styleDictionary.registerFormat({
name: 'my/format',
- formatter: function(dictionary, platform) {
+ formatter: function({dictionary, platform}) {
return template({
- properties: dictionary.properties,
+ tokens: dictionary.tokens,
options: platform
});
}
@@ -131,7 +661,7 @@ styleDictionary.registerFormat({
## Pre-defined Formats
-These are the formats included in Style Dictionary by default, pulled from [lib/common/formats.js](https://github.com/amzn/style-dictionary/blob/master/lib/common/formats.js)
+These are the formats included in Style Dictionary by default, pulled from [lib/common/formats.js](https://github.com/amzn/style-dictionary/blob/main/lib/common/formats.js)
Want a format? [You can request it here](https://github.com/amzn/style-dictionary/issues).
@@ -143,6 +673,24 @@ You created a format and think it should be included? [Send us a PR](https://git
Creates a CSS file with variable definitions based on the style dictionary
+
+
+
+ Param | Type | Default | Description |
+
+
+
+
+ options | Object | | |
+
+ [options.showFileHeader] | Boolean | true | Whether or not to include a comment that has the build date
+ |
+
+ [options.outputReferences] | Boolean | false | Whether or not to keep references (a -> b -> c) in the output.
+ |
+
+
+
**Example**
```css
:root {
@@ -197,12 +745,32 @@ $tokens: {
### scss/variables
-Creates a SCSS file with variable definitions based on the style dictionary
+Creates a SCSS file with variable definitions based on the style dictionary.
+
+Add `!default` to any variable by setting a `themeable: true` attribute in the token's definition.
+
+
+
+
+ Param | Type | Default | Description |
+
+
+
+
+ options | Object | | |
+
+ [options.showFileHeader] | Boolean | true | Whether or not to include a comment that has the build date
+ |
+
+ [options.outputReferences] | Boolean | false | Whether or not to keep references (a -> b -> c) in the output.
+ |
+
+
**Example**
```scss
$color-background-base: #f0f0f0;
-$color-background-alt: #eeeeee;
+$color-background-alt: #eeeeee !default;
```
* * *
@@ -225,6 +793,24 @@ $content-icon-email: '\E001';
Creates a LESS file with variable definitions based on the style dictionary
+
+
+
+ Param | Type | Default | Description |
+
+
+
+
+ options | Object | | |
+
+ [options.showFileHeader] | Boolean | true | Whether or not to include a comment that has the build date
+ |
+
+ [options.outputReferences] | Boolean | false | Whether or not to keep references (a -> b -> c) in the output.
+ |
+
+
+
**Example**
```less
@color-background-base: #f0f0f0;
@@ -246,6 +832,19 @@ Creates a LESS file with variable definitions and helper classes for icons
* * *
+### stylus/variables
+
+
+Creates a Stylus file with variable definitions based on the style dictionary
+
+**Example**
+```stylus
+$color-background-base= #f0f0f0;
+$color-background-alt= #eeeeee;
+```
+
+* * *
+
### javascript/module
@@ -257,7 +856,7 @@ module.exports = {
color: {
base: {
red: {
- value: '#ff000'
+ value: '#ff0000'
}
}
}
@@ -266,6 +865,20 @@ module.exports = {
* * *
+### javascript/module-flat
+
+
+Creates a CommonJS module with the whole style dictionary flattened to a single level.
+
+**Example**
+```js
+module.exports = {
+ "ColorBaseRed": "#ff0000"
+}
+```
+
+* * *
+
### javascript/object
@@ -278,7 +891,7 @@ var StyleDictionary = {
color: {
base: {
red: {
- value: '#ff000'
+ value: '#ff0000'
}
}
}
@@ -353,11 +966,152 @@ export const ColorBackgroundAlt = '#fcfcfcfc';
* * *
+### typescript/es6-declarations
+
+
+Creates TypeScript declarations for ES6 modules
+
+```json
+{
+ "platforms": {
+ "ts": {
+ "transformGroup": "js",
+ "files": [
+ {
+ "format": "javascript/es6",
+ "destination": "colors.js"
+ },
+ {
+ "format": "typescript/es6-declarations",
+ "destination": "colors.d.ts"
+ }
+ ]
+ }
+ }
+}
+```
+
+**Example**
+```typescript
+export const ColorBackgroundBase : string;
+export const ColorBackgroundAlt : string;
+```
+
+* * *
+
+### typescript/module-declarations
+
+
+Creates TypeScript declarations for CommonJS module
+
+```json
+{
+ "platforms": {
+ "ts": {
+ "transformGroup": "js",
+ "files": [
+ {
+ "format": "javascript/module",
+ "destination": "colors.js"
+ },
+ {
+ "format": "typescript/module-declarations",
+ "destination": "colors.d.ts"
+ }
+ ]
+ }
+ }
+}
+```
+
+**Example**
+```typescript
+export default tokens;
+declare interface DesignToken { value: string; name?: string; path?: string[]; comment?: string; attributes?: any; original?: any; }
+declare const tokens: {
+ "color": {
+ "red": DesignToken
+ }
+}
+```
+
+As you can see above example output this does not generate 100% accurate d.ts.
+This is a compromise between of what style-dictionary can do to help and not bloating the library with rarely used dependencies.
+
+Thankfully you can extend style-dictionary very easily:
+
+```js
+const JsonToTS = require('json-to-ts');
+StyleDictionaryPackage.registerFormat({
+ name: 'typescript/accurate-module-declarations',
+ formatter: function(dictionary) {
+ return 'declare const root: RootObject\n' +
+ 'export default root\n' +
+ JsonToTS(dictionary.properties).join('\n');
+ },
+});
+```
+
+* * *
+
+### android/resources
+
+
+Creates a [resource](https://developer.android.com/guide/topics/resources/providing-resources) xml file. It is recommended to use a filter with this format
+as it is generally best practice in Android development to have resource files
+organized by type (color, dimension, string, etc.). However, a resource file
+with mixed resources will still work.
+
+This format will try to use the proper resource type for each token based on
+the category (color => color, size => dimen, etc.). However if you want to
+force a particular resource type you can provide a 'resourceType' attribute
+on the file configuration. You can also provide a 'resourceMap' if you
+don't use Style Dictionary's built-in CTI structure.
+
+
+
+
+ Param | Type | Default | Description |
+
+
+
+
+ options | Object | | |
+
+ [options.showFileHeader] | Boolean | true | Whether or not to include a comment that has the build date
+ |
+
+ [options.outputReferences] | Boolean | false | Whether or not to keep references (a -> b -> c) in the output.
+ |
+
+
+
+**Example**
+```xml
+
+
+ #fffaf3f2
+ #fff0cccc
+ 14sp
+```
+
+* * *
+
### android/colors
Creates a color resource xml file with all the colors in your style dictionary.
+It is recommended to use the 'android/resources' format with a custom filter
+instead of this format:
+
+```javascript
+format: 'android/resources',
+filter: {
+ attributes: { category: 'color' }
+}
+```
+
**Example**
```xml
@@ -374,6 +1128,16 @@ Creates a color resource xml file with all the colors in your style dictionary.
Creates a dimen resource xml file with all the sizes in your style dictionary.
+It is recommended to use the 'android/resources' format with a custom filter
+instead of this format:
+
+```javascript
+format: 'android/resources',
+filter: {
+ attributes: { category: 'size' }
+}
+```
+
**Example**
```xml
@@ -390,6 +1154,16 @@ Creates a dimen resource xml file with all the sizes in your style dictionary.
Creates a dimen resource xml file with all the font sizes in your style dictionary.
+It is recommended to use the 'android/resources' format with a custom filter
+instead of this format:
+
+```javascript
+format: 'android/resources',
+filter: {
+ attributes: { category: 'size' }
+}
+```
+
**Example**
```xml
@@ -405,7 +1179,17 @@ Creates a dimen resource xml file with all the font sizes in your style dictiona
Creates a resource xml file with all the integers in your style dictionary. It filters your
-style properties by `prop.attributes.category === 'time'`
+design tokens by `token.attributes.category === 'time'`
+
+It is recommended to use the 'android/resources' format with a custom filter
+instead of this format:
+
+```javascript
+format: 'android/resources',
+filter: {
+ attributes: { category: 'time' }
+}
+```
**Todo**
@@ -426,7 +1210,17 @@ style properties by `prop.attributes.category === 'time'`
Creates a resource xml file with all the strings in your style dictionary. Filters your
-style properties by `prop.attributes.category === 'content'`
+design tokens by `token.attributes.category === 'content'`
+
+It is recommended to use the 'android/resources' format with a custom filter
+instead of this format:
+
+```javascript
+format: 'android/resources',
+filter: {
+ attributes: { category: 'content' }
+}
+```
**Example**
```xml
@@ -439,10 +1233,52 @@ style properties by `prop.attributes.category === 'content'`
* * *
+### compose/object
+
+
+Creates a Kotlin file for Compose containing an object with a `val` for each property.
+
+
+
+
+ Param | Type | Default | Description |
+
+
+
+
+ className | String | | The name of the generated Kotlin object
+ |
+
+ packageName | String | | The package for the generated Kotlin object
+ |
+
+ options | Object | | |
+
+ [options.showFileHeader] | Boolean | true | Whether or not to include a comment that has the build date
+ |
+
+ [options.outputReferences] | Boolean | false | Whether or not to keep references (a -> b -> c) in the output.
+ |
+
+
+
+**Example**
+```kotlin
+package com.example.tokens;
+
+import androidx.compose.ui.graphics.Color
+
+object StyleDictionary {
+ val colorBaseRed5 = Color(0xFFFAF3F2)
+}
+```
+
+* * *
+
### ios/macros
-Creates an Objective-C header file with macros for style properties
+Creates an Objective-C header file with macros for design tokens
**Example**
```objectivec
@@ -568,10 +1404,30 @@ Creates an Objective-C implementation file of strings
Creates a Swift implementation file of a class with values
-**Todo**
-
-- Add example and usage
+
+
+
+ Param | Type | Default | Description |
+
+
+
+
+ options | Object | | |
+
+ [options.showFileHeader] | Boolean | true | Whether or not to include a comment that has the build date
+ |
+
+ [options.outputReferences] | Boolean | false | Whether or not to keep references (a -> b -> c) in the output.
+ |
+
+
+**Example**
+```swift
+public class StyleDictionary {
+ public static let colorBackgroundDanger = UIColor(red: 1.000, green: 0.918, blue: 0.914, alpha:1)
+}
+```
* * *
@@ -610,7 +1466,7 @@ Creates a JSON file of the style dictionary.
"color": {
"base": {
"red": {
- "value": "#ff000"
+ "value": "#ff0000"
}
}
}
@@ -649,7 +1505,7 @@ Creates a JSON nested file of the style dictionary.
{
"color": {
"base": {
- "red": "#ff000"
+ "red": "#ff0000"
}
}
}
@@ -665,7 +1521,7 @@ Creates a JSON flat file of the style dictionary.
**Example**
```json
{
- "color-base-red": "#ff000"
+ "color-base-red": "#ff0000"
}
```
@@ -718,6 +1574,24 @@ the sketchpalette plugin. To use this you should use the
Creates a Dart implementation file of a class with values
+
+
+
+ Param | Type | Default | Description |
+
+
+
+
+ options | Object | | |
+
+ [options.showFileHeader] | Boolean | true | Whether or not to include a comment that has the build date
+ |
+
+ [options.outputReferences] | Boolean | false | Whether or not to keep references (a -> b -> c) in the output.
+ |
+
+
+
**Example**
```dart
import 'package:flutter/material.dart';
diff --git a/docs/index.html b/docs/index.html
index c78a4a0eb..b8b4e17c1 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -38,6 +38,7 @@
+