From 4bd16bcc2a1f999162e851d5b8ed25c1794e111b Mon Sep 17 00:00:00 2001 From: Justin Bennett Date: Wed, 2 Nov 2022 10:24:13 -0500 Subject: [PATCH] elevation tokens -> utilities --- scripts/convert-tokens.ts | 20 ++++++++++---------- styles/dist/tailwind-tokens.js | 14 +++++++------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/convert-tokens.ts b/scripts/convert-tokens.ts index 418f51b..a944ed4 100644 --- a/scripts/convert-tokens.ts +++ b/scripts/convert-tokens.ts @@ -234,16 +234,7 @@ StyleDictionary.registerFormat({ ].map((make) => make(colors))} } - module.exports.borderRadiusTokens = { - ${borderRadius - .map( - ({ name }) => - `'${name.replace(/border-radius-?/, '') || 'DEFAULT'}': 'var(--${name})'`, - ) - .join(',')} - } - - module.exports.elevationTokens = { + module.exports.elevationUtilities = { ${boxShadow.map( ({ name, value }) => `'.${name}': { @@ -255,6 +246,15 @@ StyleDictionary.registerFormat({ .join(', ')}'}`, )} } + + module.exports.borderRadiusTokens = { + ${borderRadius + .map( + ({ name }) => + `'${name.replace(/border-radius-?/, '') || 'DEFAULT'}': 'var(--${name})'`, + ) + .join(',')} + } ` }, }) diff --git a/styles/dist/tailwind-tokens.js b/styles/dist/tailwind-tokens.js index 844d84d..b672e16 100644 --- a/styles/dist/tailwind-tokens.js +++ b/styles/dist/tailwind-tokens.js @@ -932,13 +932,7 @@ module.exports.colorUtilities = { }, } -module.exports.borderRadiusTokens = { - sm: 'var(--border-radius-sm)', - DEFAULT: 'var(--border-radius)', - full: 'var(--border-radius-full)', -} - -module.exports.elevationTokens = { +module.exports.elevationUtilities = { '.elevation-0': { 'box-shadow': 'none', }, @@ -955,3 +949,9 @@ module.exports.elevationTokens = { '0px 4.375px 4.625px #00000021, 0px 20px 13px #00000033, 0px 50.625px 34.875px #00000045, 0px 100px 80px #00000066', }, } + +module.exports.borderRadiusTokens = { + sm: 'var(--border-radius-sm)', + DEFAULT: 'var(--border-radius)', + full: 'var(--border-radius-full)', +}