@digdir/designsystemet 0.1.0-alpha.13 → 0.1.0-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/bin/designsystemet.js +32 -3439
  2. package/dist/src/colors/colorUtils.js +301 -343
  3. package/dist/src/colors/index.js +3 -607
  4. package/dist/src/colors/themeUtils.js +319 -348
  5. package/dist/src/colors/types.js +1 -1
  6. package/dist/src/init/createTokensPackage.js +230 -0
  7. package/dist/src/init/generateMetadataJson.js +16 -0
  8. package/dist/src/init/generateThemesJson.js +50 -0
  9. package/dist/src/init/index.js +7 -0
  10. package/dist/src/init/nextStepsMarkdown.js +90 -0
  11. package/dist/src/init/template/default-files/README.md +10 -0
  12. package/dist/src/init/template/default-files/design-tokens/README.md +3 -0
  13. package/dist/src/init/template/default-files/design-tokens/primitives/globals.json +197 -0
  14. package/dist/src/init/template/default-files/design-tokens/primitives/typography/default.json +86 -0
  15. package/dist/src/init/template/default-files/design-tokens/semantic/color.json +562 -0
  16. package/dist/src/init/template/default-files/design-tokens/semantic/style.json +543 -0
  17. package/dist/src/init/template/prettier.config.js +7 -0
  18. package/dist/src/init/template/template-files/design-tokens/primitives/colors/contrast/global.json +376 -0
  19. package/dist/src/init/template/template-files/design-tokens/primitives/colors/contrast/theme-template.json +314 -0
  20. package/dist/src/init/template/template-files/design-tokens/primitives/colors/dark/global.json +376 -0
  21. package/dist/src/init/template/template-files/design-tokens/primitives/colors/dark/theme-template.json +314 -0
  22. package/dist/src/init/template/template-files/design-tokens/primitives/colors/light/global.json +376 -0
  23. package/dist/src/init/template/template-files/design-tokens/primitives/colors/light/theme-template.json +314 -0
  24. package/dist/src/init/template/template-files/design-tokens/themes/theme-template.json +314 -0
  25. package/dist/src/init/template/template-files/package.json +23 -0
  26. package/dist/src/init/utils.js +11 -0
  27. package/dist/src/migrations/beta-to-v1.js +341 -407
  28. package/dist/src/migrations/codemods/css/plugins.js +36 -42
  29. package/dist/src/migrations/codemods/css/run.js +20 -17
  30. package/dist/src/migrations/codemods/jsx/classname-prefix.js +63 -59
  31. package/dist/src/migrations/codemods/jsx/run.js +20 -20
  32. package/dist/src/migrations/index.js +5 -436
  33. package/dist/src/migrations/react-beta-to-v1.js +4 -27
  34. package/dist/src/test/a.css +39 -0
  35. package/dist/src/test/jsx-test.js +12 -0
  36. package/dist/src/tokens/actions.js +23 -2176
  37. package/dist/src/tokens/build.js +54 -2974
  38. package/dist/src/tokens/configs.js +234 -2874
  39. package/dist/src/tokens/formats/css.js +153 -2632
  40. package/dist/src/tokens/formats/js-tokens.js +28 -42
  41. package/dist/src/tokens/transformers.js +44 -82
  42. package/dist/src/tokens/utils/noCase.js +26 -28
  43. package/dist/src/tokens/utils/permutateThemes.js +65 -217
  44. package/dist/src/tokens/utils/utils.js +25 -14
  45. package/package.json +16 -23
  46. package/LICENSE +0 -7
  47. package/dist/bin/designsystemet.js.map +0 -1
  48. package/dist/src/colors/colorUtils.js.map +0 -1
  49. package/dist/src/colors/index.js.map +0 -1
  50. package/dist/src/colors/themeUtils.js.map +0 -1
  51. package/dist/src/colors/types.js.map +0 -1
  52. package/dist/src/migrations/beta-to-v1.js.map +0 -1
  53. package/dist/src/migrations/codemods/css/plugins.js.map +0 -1
  54. package/dist/src/migrations/codemods/css/run.js.map +0 -1
  55. package/dist/src/migrations/codemods/jsx/classname-prefix.js.map +0 -1
  56. package/dist/src/migrations/codemods/jsx/run.js.map +0 -1
  57. package/dist/src/migrations/index.js.map +0 -1
  58. package/dist/src/migrations/react-beta-to-v1.js.map +0 -1
  59. package/dist/src/tokens/actions.js.map +0 -1
  60. package/dist/src/tokens/build.js.map +0 -1
  61. package/dist/src/tokens/configs.js.map +0 -1
  62. package/dist/src/tokens/formats/css.js.map +0 -1
  63. package/dist/src/tokens/formats/js-tokens.js.map +0 -1
  64. package/dist/src/tokens/transformers.js.map +0 -1
  65. package/dist/src/tokens/utils/noCase.js.map +0 -1
  66. package/dist/src/tokens/utils/permutateThemes.js.map +0 -1
  67. package/dist/src/tokens/utils/utils.js.map +0 -1
@@ -1 +1 @@
1
- //# sourceMappingURL=types.js.map
1
+ export { };
@@ -0,0 +1,230 @@
1
+ import path from "node:path";
2
+ import fs from "node:fs/promises";
3
+ import chalk from "chalk";
4
+ import prompts from "prompts";
5
+ import packageJsonTemplate from "./template/template-files/package.json" with {
6
+ type: 'json'
7
+ };
8
+ import generateMetadata from "./generateMetadataJson.js";
9
+ import generateThemes from "./generateThemesJson.js";
10
+ import { toGeneratedCssFileName, normalizeTokenSetName, toValidPackageName } from "./utils.js";
11
+ import { nextStepsMarkdown } from "./nextStepsMarkdown.js";
12
+ const MODES = [
13
+ 'Light',
14
+ 'Dark',
15
+ 'Contrast'
16
+ ];
17
+ const promptOptions = {
18
+ onCancel: ()=>{
19
+ console.log(`${chalk.red('✖')} Operation cancelled`);
20
+ process.exit();
21
+ }
22
+ };
23
+ export async function createTokensPackage(targetDir) {
24
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
25
+ const DIRNAME = import.meta.dirname || __dirname;
26
+ const DEFAULT_FILES_PATH = path.join(DIRNAME, './template/default-files');
27
+ const TOKEN_TEMPLATE_FILES_PATH = path.join(DIRNAME, './template/template-files/design-tokens');
28
+ const TARGET_DIR = path.resolve(process.cwd(), targetDir);
29
+ const initialPackageName = toValidPackageName(path.basename(TARGET_DIR));
30
+ // Check target directory contents
31
+ let isTargetDirEmpty = true;
32
+ try {
33
+ const files = await fs.readdir(TARGET_DIR);
34
+ isTargetDirEmpty = files.length === 0;
35
+ } catch (err) {
36
+ if (err.code === 'ENOENT') {
37
+ // Directory doesn't exist, so we're good
38
+ } else {
39
+ console.error(err);
40
+ console.log('Continuing...');
41
+ }
42
+ }
43
+ const { directoryAction } = await prompts({
44
+ name: 'directoryAction',
45
+ type: isTargetDirEmpty ? null : 'select',
46
+ message: 'Target directory is not empty. How should we proceed?',
47
+ choices: [
48
+ {
49
+ title: 'Clean',
50
+ value: 'clean',
51
+ description: 'Empty the directory and continue'
52
+ },
53
+ {
54
+ title: 'Ignore',
55
+ value: 'ignore',
56
+ description: 'Keep directory as is. Files may be overwritten with new output.'
57
+ },
58
+ {
59
+ title: 'Exit',
60
+ value: 'exit',
61
+ description: 'Exit without doing anything.'
62
+ }
63
+ ]
64
+ }, promptOptions);
65
+ if (directoryAction === 'exit') {
66
+ process.exit();
67
+ }
68
+ const { packageName } = await prompts([
69
+ {
70
+ name: 'packageName',
71
+ type: 'text',
72
+ message: 'Enter a package name (for package.json)',
73
+ initial: initialPackageName
74
+ }
75
+ ], promptOptions);
76
+ const { modes, themeCount, tokensDir } = await prompts([
77
+ {
78
+ name: 'themeCount',
79
+ type: 'number',
80
+ message: 'How many themes do you want?',
81
+ initial: 1,
82
+ min: 1
83
+ },
84
+ {
85
+ name: 'modes',
86
+ type: 'multiselect',
87
+ choices: MODES.filter((x)=>x !== 'Light').map((mode)=>({
88
+ title: mode,
89
+ value: mode
90
+ })),
91
+ message: 'Which color modes do you want?',
92
+ instructions: `
93
+ Instructions:
94
+ ↑/↓: Highlight option
95
+ ←/→/[space]: Toggle selection
96
+ a: Toggle all
97
+ enter/return: Complete answer
98
+ ${chalk.green('◉')} Light ${chalk.dim('- This is the default mode, and cannot be disabled')}`,
99
+ onState: (obj)=>{
100
+ obj.value.unshift({
101
+ title: 'Light',
102
+ value: 'Light',
103
+ selected: true
104
+ });
105
+ }
106
+ },
107
+ {
108
+ name: 'tokensDir',
109
+ type: 'text',
110
+ initial: 'design-tokens',
111
+ message: `Enter the desired path for the design tokens`
112
+ }
113
+ ], promptOptions);
114
+ const themes = [];
115
+ const TOKENS_TARGET_DIR = path.join(TARGET_DIR, tokensDir);
116
+ for(let n = 1; n <= themeCount; n++){
117
+ const theme = await prompts([
118
+ {
119
+ name: 'name',
120
+ type: 'text',
121
+ message: `Enter the name of the ${ordinal(n)} theme`,
122
+ validate: (value)=>isValidThemeName(themes, value)
123
+ }
124
+ ], promptOptions);
125
+ themes.push(theme.name);
126
+ }
127
+ const { defaultTheme = themes[0] } = await prompts({
128
+ name: 'defaultTheme',
129
+ type: themeCount === 1 ? null : 'select',
130
+ message: 'Select the default theme to export in package.json',
131
+ choices: themes.map((theme)=>({
132
+ title: theme,
133
+ value: theme
134
+ })),
135
+ initial: 0
136
+ }, promptOptions);
137
+ console.log(`
138
+ Will now create the following:
139
+ ${chalk.bold('Package name')}: ${packageName}
140
+ ${chalk.bold('Directory')}: ${TARGET_DIR}
141
+ ${chalk.bold('Tokens directory')}: ${TOKENS_TARGET_DIR}
142
+ ${chalk.bold('Themes')}: ${themes.join(', ')}
143
+ ${chalk.bold('Default theme')}: ${defaultTheme}
144
+ ${chalk.bold('Color modes')}: ${modes.join(', ')}
145
+ `);
146
+ if (directoryAction === 'clean') {
147
+ console.log(chalk.bold.red(`Warning: Contents of ${TARGET_DIR} will be deleted`));
148
+ }
149
+ if (directoryAction === 'ignore') {
150
+ console.log(chalk.bold.yellow(`Warning: Existing files in ${TARGET_DIR} may be overwritten`));
151
+ }
152
+ const res = await prompts({
153
+ name: 'proceed',
154
+ type: 'confirm',
155
+ message: 'Proceed?',
156
+ initial: directoryAction === undefined
157
+ }, promptOptions);
158
+ if (!res.proceed) {
159
+ process.exit();
160
+ }
161
+ if (directoryAction === 'clean') {
162
+ await fs.rm(TARGET_DIR, {
163
+ recursive: true
164
+ });
165
+ }
166
+ await fs.cp(DEFAULT_FILES_PATH, path.join(TARGET_DIR), {
167
+ recursive: true
168
+ });
169
+ if (tokensDir !== 'design-tokens') {
170
+ await fs.rename(path.join(TARGET_DIR, 'design-tokens'), path.join(TOKENS_TARGET_DIR));
171
+ }
172
+ try {
173
+ await fs.mkdir(path.join(TOKENS_TARGET_DIR, 'themes'));
174
+ } catch {
175
+ // Directory creation failed, probably because the directory already exists
176
+ }
177
+ for (const theme of themes.map(normalizeTokenSetName)){
178
+ for (const mode of modes.map(normalizeTokenSetName)){
179
+ // Copy the global file for the color mode
180
+ await fs.cp(path.join(TOKEN_TEMPLATE_FILES_PATH, `primitives/colors/${mode}/global.json`), path.join(TOKENS_TARGET_DIR, `primitives/colors/${mode}/global.json`), {
181
+ recursive: true
182
+ });
183
+ // Create theme primitives for the color mode
184
+ const template = await fs.readFile(path.join(TOKEN_TEMPLATE_FILES_PATH, `primitives/colors/${mode}/theme-template.json`));
185
+ await fs.writeFile(path.join(TOKENS_TARGET_DIR, `primitives/colors/${mode}/${theme}.json`), template.toString('utf-8').replaceAll('<theme>', theme));
186
+ }
187
+ // Create main theme token set
188
+ const template = await fs.readFile(path.join(TOKEN_TEMPLATE_FILES_PATH, `themes/theme-template.json`));
189
+ await fs.writeFile(path.join(TOKENS_TARGET_DIR, `themes/${theme}.json`), template.toString('utf-8').replaceAll('<theme>', theme));
190
+ await fs.writeFile(path.join(TOKENS_TARGET_DIR, '$metadata.json'), JSON.stringify(generateMetadata(modes, themes), undefined, 2));
191
+ await fs.writeFile(path.join(TOKENS_TARGET_DIR, '$themes.json'), JSON.stringify(generateThemes(modes, themes), undefined, 2));
192
+ }
193
+ // Configure package.json file
194
+ packageJsonTemplate.name = packageName;
195
+ packageJsonTemplate.main = packageJsonTemplate.main.replace('<default-theme>', toGeneratedCssFileName(defaultTheme));
196
+ await fs.writeFile(path.join(TARGET_DIR, 'package.json'), JSON.stringify(packageJsonTemplate, undefined, 2));
197
+ const readmePath = path.join(TARGET_DIR, 'README.md');
198
+ const currentReadme = await fs.readFile(readmePath);
199
+ await fs.writeFile(readmePath, [
200
+ currentReadme.toString('utf-8'),
201
+ nextStepsMarkdown(themes, modes, tokensDir, packageName)
202
+ ].join('\n'));
203
+ console.log('🎉 Files successfully generated!');
204
+ console.log(`Read about the next steps in the generated README at ${readmePath}`);
205
+ }
206
+ function isValidThemeName(themes, value) {
207
+ const s = value.trim();
208
+ if (s.length === 0) {
209
+ return 'Theme name cannot be empty.';
210
+ }
211
+ if (themes.includes(s)) {
212
+ return 'Theme names must be unique.';
213
+ }
214
+ if (/[^a-zæøå0-9 _-]/i.test(s)) {
215
+ return 'Theme name can only contain letters, numbers, dashes and underscores.';
216
+ }
217
+ return true;
218
+ }
219
+ function ordinal(n) {
220
+ switch(n){
221
+ case 1:
222
+ return '1st';
223
+ case 2:
224
+ return '2nd';
225
+ case 3:
226
+ return '3rd';
227
+ default:
228
+ return `${n}th`;
229
+ }
230
+ }
@@ -0,0 +1,16 @@
1
+ import { normalizeTokenSetName } from "./utils.js";
2
+ export default function generateMetadataJson(modes, themes) {
3
+ return {
4
+ tokenSetOrder: [
5
+ 'primitives/globals',
6
+ 'primitives/typography/default',
7
+ ...modes.flatMap((mode)=>[
8
+ `primitives/colors/${normalizeTokenSetName(mode)}/global`,
9
+ ...themes.map((theme)=>`primitives/colors/${normalizeTokenSetName(mode)}/${normalizeTokenSetName(theme)}`)
10
+ ]),
11
+ ...themes.map((theme)=>`themes/${normalizeTokenSetName(theme)}`),
12
+ 'semantic/color',
13
+ 'semantic/style'
14
+ ]
15
+ };
16
+ }
@@ -0,0 +1,50 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { TokenSetStatus } from "@tokens-studio/types";
3
+ import { normalizeTokenSetName } from "./utils.js";
4
+ export default function generateThemesJson(modes, themes) {
5
+ return [
6
+ ...generateModesGroup(modes, themes),
7
+ ...generateThemesGroup(themes),
8
+ generateSemanticGroup()
9
+ ];
10
+ }
11
+ function generateModesGroup(modes, themes) {
12
+ return modes.map((mode)=>({
13
+ id: randomUUID(),
14
+ name: mode,
15
+ selectedTokenSets: Object.fromEntries([
16
+ [
17
+ `primitives/colors/${normalizeTokenSetName(mode)}/global`,
18
+ TokenSetStatus.ENABLED
19
+ ],
20
+ ...themes.map((theme)=>[
21
+ `primitives/colors/${normalizeTokenSetName(mode)}/${normalizeTokenSetName(theme)}`,
22
+ TokenSetStatus.ENABLED
23
+ ])
24
+ ]),
25
+ group: 'Mode'
26
+ }));
27
+ }
28
+ function generateThemesGroup(themes) {
29
+ return themes.map((theme)=>({
30
+ id: randomUUID(),
31
+ name: theme,
32
+ selectedTokenSets: {
33
+ [`themes/${normalizeTokenSetName(theme)}`]: TokenSetStatus.ENABLED
34
+ },
35
+ group: 'Theme'
36
+ }));
37
+ }
38
+ function generateSemanticGroup() {
39
+ return {
40
+ id: randomUUID(),
41
+ name: 'Semantic',
42
+ selectedTokenSets: {
43
+ 'semantic/style': TokenSetStatus.ENABLED,
44
+ 'semantic/color': TokenSetStatus.ENABLED,
45
+ 'primitives/globals': TokenSetStatus.SOURCE,
46
+ 'primitives/typography/default': TokenSetStatus.SOURCE
47
+ },
48
+ group: 'Semantic'
49
+ };
50
+ }
@@ -0,0 +1,7 @@
1
+ import { Argument } from "@commander-js/extra-typings";
2
+ import { createTokensPackage } from "./createTokensPackage.js";
3
+ export function makeInitCommand(command) {
4
+ return command.showHelpAfterError().description('create an initial token structure for Designsystemet').addArgument(new Argument('<targetDir>', 'Target directory for the generated code')).action(async (targetDir)=>{
5
+ await createTokensPackage(targetDir);
6
+ });
7
+ }
@@ -0,0 +1,90 @@
1
+ import { normalizeTokenSetName, toGeneratedCssFileName } from "./utils.js";
2
+ export function nextStepsMarkdown(themes, modes, tokensTargetDir, packageName) {
3
+ const themeModeCombinations = themes.flatMap((theme)=>modes.map((mode)=>[
4
+ theme,
5
+ mode
6
+ ]));
7
+ const themeOrThemes = `theme${themes.length > 1 ? 's' : ''}`;
8
+ const isOrAre = themes.length > 1 ? 'are' : 'is';
9
+ return `
10
+ ## Next steps
11
+
12
+ ### Using the ${themeOrThemes} in Figma
13
+
14
+ 1. Initialise a git repository in the current directory
15
+ 2. Push the tokens to GitHub, GitLab or Azure DevOps
16
+ 3. [Open the Figma component library](https://www.figma.com/community/file/1322138390374166141/designsystemet-core-ui-kit) and save it to your project
17
+ 4. Install the [Tokens Studio plugin](https://www.figma.com/community/plugin/843461159747178978/Tokens-Studio-for-Figma-(Figma-Tokens)) in Figma
18
+ 5. [Set up sync](https://docs.tokens.studio/sync/sync) in Tokens Studio for Figma
19
+ 6. Use the ["Create variables" action](https://docs.tokens.studio/variables/creating-variables) in Tokens Studio
20
+ 7. Push the resulting variables from Tokens Studio to Git
21
+
22
+ ### Customizing the ${themeOrThemes}
23
+
24
+ 1. Go to https://theme.designsystemet.no and set up a color theme
25
+ 2. Press "Kopier tema"
26
+ 3. Under "Json til Figma", copy the contents under ${modes.join(' / ')} to
27
+ the corresponding file under \`${tokensTargetDir}\`:
28
+ ${themeModeCombinations.map(([theme, mode])=>` **${theme}, ${mode}**: \`primitives/colors/${normalizeTokenSetName(mode)}/${normalizeTokenSetName(theme)}.json\` `).join('\n')}
29
+ This can also be done in Tokens Studio for Figma.
30
+ 4. **IMPORTANT!** In the JSON data you copied, replace \`theme\` on line 2
31
+ with the correct theme identifier, depending on the theme you're customizing.
32
+ This is the same as the json filename without extension (e.g. ${themes.map((x)=>`\`${normalizeTokenSetName(x)}\``).join(', ')}).
33
+ ${themes.length > 1 ? '5. Repeat steps 1—4 for the remaining themes' : ''}
34
+
35
+ ### Using the correct ${themeOrThemes} in Figma components
36
+
37
+ The "Designsystemet - Core UI Kit" component library is set up with the themes
38
+ "Theme1" and "Theme2" by default. To ensure our custom ${themeOrThemes} ${isOrAre} used, follow these steps:
39
+
40
+ 1. Open your copy of "Designsystemet - Core UI Kit" in Figma
41
+ 2. Pull any changes from Git using Tokens Studio
42
+ 3. Update the Figma variables using the "Styles & Variables" > "Sync variables" action in Tokens Studio
43
+ 4. Access the [Variables modal](https://help.figma.com/hc/en-us/articles/15145852043927-Create-and-manage-variables)
44
+ 5. Select the "Theme" collection in the upper left dropdown
45
+ 6. Select "All variables"
46
+ 7. Right click the modes "Theme1" and click "Delete mode"
47
+ 8. Repeat for "Theme2"
48
+ 9. Publish the library
49
+
50
+ ### Updating the Figma components after theme changes
51
+
52
+ 1. Open your copy of "Designsystemet - Core UI Kit" in Figma
53
+ 2. Pull any changes from Git using Tokens Studio
54
+ 3. Update the Figma variables using the "Styles & Variables" > "Sync variables" action in Tokens Studio
55
+ 4. Publish the library
56
+
57
+ ### Using the ${themeOrThemes} in code
58
+
59
+ The current directory is set up to easily publish the ${themeOrThemes} as an npm package.
60
+
61
+ 1. Check that the package.json file is set up to your liking
62
+ 2. \`npm install\`
63
+ 3. \`npm run build\` - builds the css files for each theme and outputs them to \`./dist\`
64
+ 4. \`npm publish\` - publishes the package to npm as \`${packageName}\`, unless you manually changed \`package.json\`
65
+
66
+ In a different npm package (e.g. a frontend web app), follow the "Get started"
67
+ instructions at https://github.com/digdir/designsystemet but replace
68
+ \`@digdir/designsystemet-theme\` with \`${packageName}\`. In short:
69
+
70
+ #### Install packages
71
+
72
+ \`\`\`
73
+ npm i ${packageName} @digdir/designsystemet-css @digdir/designsystemet-react
74
+ \`\`\`
75
+
76
+ #### Import the default theme and use components
77
+
78
+ \`\`\`js
79
+ import '${packageName}';
80
+ import '@digdir/designsystemet-css';
81
+ import { Button } from '@digdir/designsystemet-react';
82
+ \`\`\`
83
+
84
+ ${themes.length > 1 ? `
85
+ #### Or import a specific theme
86
+ \`\`\`js
87
+ import '${packageName}/${toGeneratedCssFileName(themes[1])}';
88
+ \`\`\`
89
+ `.trim() : ''}`;
90
+ }
@@ -0,0 +1,10 @@
1
+ # Design tokens for @digdir/designsystemet
2
+
3
+ ## Getting started
4
+
5
+ ```
6
+ npm install
7
+ npm run build
8
+ ```
9
+
10
+ The package is set up for publishing as an NPM library with `npm publish`. Ensure `package.json` is satisfactory before you do this.
@@ -0,0 +1,3 @@
1
+ # Design tokens
2
+
3
+ Design tokens structure from [Designsystemet](https://github.com/digdir/designsystemet)
@@ -0,0 +1,197 @@
1
+ {
2
+ "border-width": {
3
+ "1": {
4
+ "type": "borderWidth",
5
+ "value": "1px"
6
+ },
7
+ "2": {
8
+ "type": "borderWidth",
9
+ "value": "2px"
10
+ }
11
+ },
12
+ "shadow": {
13
+ "100": {
14
+ "type": "boxShadow",
15
+ "value": [
16
+ {
17
+ "color": "rgba(0,0,0,0.16)",
18
+ "type": "dropShadow",
19
+ "x": "0",
20
+ "y": "0",
21
+ "blur": "1",
22
+ "spread": "0"
23
+ },
24
+ {
25
+ "x": "0",
26
+ "y": "1",
27
+ "blur": "2",
28
+ "spread": "0",
29
+ "color": "rgba(0,0,0,0.12)",
30
+ "type": "dropShadow"
31
+ }
32
+ ]
33
+ },
34
+ "200": {
35
+ "type": "boxShadow",
36
+ "value": [
37
+ {
38
+ "color": "rgba(0,0,0,0.15)",
39
+ "type": "dropShadow",
40
+ "x": "0",
41
+ "y": "0",
42
+ "blur": "1",
43
+ "spread": "0"
44
+ },
45
+ {
46
+ "color": "rgba(0,0,0,0.12)",
47
+ "type": "dropShadow",
48
+ "x": "0",
49
+ "y": "1",
50
+ "blur": "2",
51
+ "spread": "0"
52
+ },
53
+ {
54
+ "x": "0",
55
+ "y": "2",
56
+ "blur": "4",
57
+ "spread": "0",
58
+ "color": "rgba(0,0,0,0.1)",
59
+ "type": "dropShadow"
60
+ }
61
+ ]
62
+ },
63
+ "300": {
64
+ "type": "boxShadow",
65
+ "value": [
66
+ {
67
+ "color": "rgba(0,0,0,0.14)",
68
+ "type": "dropShadow",
69
+ "x": "0",
70
+ "y": "0",
71
+ "blur": "1",
72
+ "spread": "0"
73
+ },
74
+ {
75
+ "color": "rgba(0,0,0,0.12)",
76
+ "type": "dropShadow",
77
+ "x": "0",
78
+ "y": "2",
79
+ "blur": "4",
80
+ "spread": "0"
81
+ },
82
+ {
83
+ "x": "0",
84
+ "y": "4",
85
+ "blur": "8",
86
+ "spread": "0",
87
+ "color": "rgba(0,0,0,0.12)",
88
+ "type": "dropShadow"
89
+ }
90
+ ]
91
+ },
92
+ "400": {
93
+ "type": "boxShadow",
94
+ "value": [
95
+ {
96
+ "color": "rgba(0,0,0,0.13)",
97
+ "type": "dropShadow",
98
+ "x": "0",
99
+ "y": "0",
100
+ "blur": "1",
101
+ "spread": "0"
102
+ },
103
+ {
104
+ "color": "rgba(0,0,0,0.13)",
105
+ "type": "dropShadow",
106
+ "x": "0",
107
+ "y": "3",
108
+ "blur": "5",
109
+ "spread": "0"
110
+ },
111
+ {
112
+ "x": "0",
113
+ "y": "6",
114
+ "blur": "12",
115
+ "spread": "0",
116
+ "color": "rgba(0,0,0,0.14)",
117
+ "type": "dropShadow"
118
+ }
119
+ ]
120
+ },
121
+ "500": {
122
+ "type": "boxShadow",
123
+ "value": [
124
+ {
125
+ "color": "rgba(0,0,0,0.12)",
126
+ "type": "dropShadow",
127
+ "x": "0",
128
+ "y": "0",
129
+ "blur": "1",
130
+ "spread": "0"
131
+ },
132
+ {
133
+ "color": "rgba(0,0,0,0.16)",
134
+ "type": "dropShadow",
135
+ "x": "0",
136
+ "y": "4",
137
+ "blur": "8",
138
+ "spread": "0"
139
+ },
140
+ {
141
+ "x": "0",
142
+ "y": "12",
143
+ "blur": "24",
144
+ "spread": "0",
145
+ "color": "rgba(0,0,0,0.16)",
146
+ "type": "dropShadow"
147
+ }
148
+ ]
149
+ }
150
+ },
151
+ "border-radius": {
152
+ "2": {
153
+ "type": "borderRadius",
154
+ "value": "2"
155
+ },
156
+ "4": {
157
+ "type": "borderRadius",
158
+ "value": "4"
159
+ },
160
+ "8": {
161
+ "type": "borderRadius",
162
+ "value": "8"
163
+ },
164
+ "12": {
165
+ "type": "borderRadius",
166
+ "value": "12"
167
+ },
168
+ "16": {
169
+ "type": "borderRadius",
170
+ "value": "16"
171
+ },
172
+ "24": {
173
+ "type": "borderRadius",
174
+ "value": "24"
175
+ },
176
+ "32": {
177
+ "type": "borderRadius",
178
+ "value": "32"
179
+ },
180
+ "9999": {
181
+ "type": "borderRadius",
182
+ "value": "9999"
183
+ }
184
+ },
185
+ "opacity": {
186
+ "30": {
187
+ "type": "opacity",
188
+ "value": "30%"
189
+ }
190
+ },
191
+ "sizing": {
192
+ "base": {
193
+ "type": "sizing",
194
+ "value": "4"
195
+ }
196
+ }
197
+ }