Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
568 changes: 350 additions & 218 deletions packages/tokens/__tests__/__snapshots__/tokens.spec.ts.snap

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/tokens/__tests__/tokens.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
const config = css('default');
config.source = [
path.resolve(__dirname, '../tokens/color-primitives.default.json'),
path.resolve(__dirname, '../tokens/color-primitives-map.json'),
path.resolve(__dirname, '../tokens/*.default.json'),
];

Expand All @@ -53,12 +54,13 @@
const config = css('dark');
config.source = [
path.resolve(__dirname, '../tokens/color-primitives.default.json'),
path.resolve(__dirname, '../tokens/color-primitives-map.json'),
path.resolve(__dirname, '../tokens/*.dark.json'),
];

const sd = new StyleDictionary(config);
const [file] = await sd.formatPlatform('css');

expect(file.output).toMatchSnapshot();

Check failure on line 64 in packages/tokens/__tests__/tokens.spec.ts

View workflow job for this annotation

GitHub Actions / Test

__tests__/tokens.spec.ts > Tokens > builds dark tokens

Error: Snapshot `Tokens > builds dark tokens 1` mismatched - Expected + Received @@ -67,124 +67,29 @@ --lp-color-info-400: oklch(0.599 0.199 294.444); --lp-color-info-500: oklch(0.748 0.137 296.051); --lp-color-info-600: oklch(0.775 0.132 300.527); --lp-color-info-700: oklch(0.896 0.06 305.038); --lp-color-info-800: oklch(0.96 0.026 316.814); - --lp-color-white-0: rgba(255, 255, 255, 0.05); - --lp-color-white-50: rgba(255, 255, 255, 0.1); - --lp-color-white-100: rgba(255, 255, 255, 0.15); - --lp-color-white-200: rgba(255, 255, 255, 0.2); - --lp-color-white-300: rgba(255, 255, 255, 0.3); - --lp-color-white-400: rgba(255, 255, 255, 0.4); - --lp-color-white-500: rgba(255, 255, 255, 0.5); - --lp-color-white-600: rgba(255, 255, 255, 0.6); - --lp-color-white-700: rgba(255, 255, 255, 0.7); - --lp-color-white-800: rgba(255, 255, 255, 0.8); - --lp-color-white-900: rgba(255, 255, 255, 0.9); - --lp-color-white-950: rgb(255, 255, 255); - --lp-color-black-0: rgba(7, 8, 12, 0.05); - --lp-color-black-50: rgba(7, 8, 12, 0.1); - --lp-color-black-100: rgba(7, 8, 12, 0.15); - --lp-color-black-200: rgba(7, 8, 12, 0.2); - --lp-color-black-300: rgba(7, 8, 12, 0.3); - --lp-color-black-400: rgba(7, 8, 12, 0.4); - --lp-color-black-500: rgba(7, 8, 12, 0.5); - --lp-color-black-600: rgba(7, 8, 12, 0.6); - --lp-color-black-700: rgba(7, 8, 12, 0.7); - --lp-color-black-800: rgba(7, 8, 12, 0.8); - --lp-color-black-900: rgba(7, 8, 12, 0.9); - --lp-color-black-950: rgb(7, 8, 12); - --lp-color-brand-blue-light: rgb(112, 132, 255); - --lp-color-brand-blue-base: rgb(64, 91, 255); - --lp-color-brand-blue-dark: rgb(42, 59, 166); - --lp-color-brand-cyan-light: rgb(109, 224, 247); - --lp-color-brand-cyan-base: rgb(61, 214, 245); - --lp-color-brand-cyan-dark: rgb(35, 140, 163); - --lp-color-brand-purple-light: rgb(182, 117, 228); - --lp-color-brand-purple-base: rgb(163, 79, 222); - --lp-color-brand-purple-dark: rgb(106, 51, 144); - --lp-color-brand-pink-light: rgb(238, 93, 172); - --lp-color-brand-pink-base: rgb(255, 53, 162); - --lp-color-brand-pink-dark: rgb(129, 11, 75); - --lp-color-brand-orange-light: rgb(255, 208, 153); - --lp-color-brand-orange-base: rgb(255, 157, 41); - --lp-color-brand-orange-dark: rgb(163, 89, 1); - --lp-color-brand-yellow-light: rgb(247, 255, 175); - --lp-color-brand-yellow-base: rgb(235, 255, 56); - --lp-color-brand-yellow-dark: rgb(129, 140, 31); - --lp-color-brand-green-light: rgb(225, 255, 200); - --lp-color-brand-green-base: rgb(139, 239, 52); - --lp-color-brand-green-dark: rgb(67, 144, 0); - --lp-color-data-info: rgb(153, 109, 216); - --lp-color-data-comparison: rgb(96, 101, 106); - --lp-color-data-neutral: rgb(168, 173, 179); - --lp-color-data-positive: rgb(43, 149, 86); - --lp-color-data-negative: rgb(232, 72, 102); - --lp-color-data-series-1: rgb(35, 171, 197); - --lp-color-data-series-2: rgb(246, 182, 104); - --lp-color-data-series-3: rgb(153, 109, 216); - --lp-color-data-series-4: rgb(43, 149, 86); - --lp-color-gray-0: var(--lp-color-neutral-0); - --lp-color-gray-50: var(--lp-color-neutral-50); - --lp-color-gray-100: var(--lp-color-neutral-100); - --lp-color-gray-200: var(--lp-color-neutral-200); - --lp-color-gray-300: var(--lp-color-neutral-300); - --lp-color-gray-400: var(--lp-color-neutral-400); - --lp-color-gray-500: var(--lp-color-neutral-500); - --lp-color-gray-600: var(--lp-color-neutral-600); - --lp-color-gray-700: var(--lp-color-neutral-700); - --lp-color-gray-800: var(--lp-color-neutral-800); - --lp-color-gray-900: var(--lp-color-neutral-800); - --lp-color-gray-950: var(--lp-color-neutral-800); - --lp-color-blue-0: var(--lp-color-action-0); - --lp-color-blue-50: var(--lp-color-action-50); - --lp-color-blue-100: var(--lp-color-action-100); - --lp-color-blue-200: var(--lp-color-action-200); - --lp-color-blue-300: var(--lp-color-action-300); - --lp-color-blue-400: var(--lp-color-action-400); - --lp-color-blue-500: var(--lp-color-action-500); - --lp-c
});
});
282 changes: 282 additions & 0 deletions packages/tokens/old_tokens/color-aliases.dark.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
{
"color": {
"$type": "color",
"bg": {
"feedback": {
"error": {
"$value": "{color.red.900}"
},
"info": {
"$value": "{color.blue.900}"
},
"success": {
"$value": "{color.green.900}"
},
"warning": {
"$value": "{color.brand.orange.dark}"
}
},
"interactive": {
"primary": {
"base": {
"$value": "{color.blue.600}"
},
"active": {
"$value": "{color.blue.600}"
},
"focus": {
"$value": "{color.blue.500}"
},
"hover": {
"$value": "{color.blue.500}"
}
},
"secondary": {
"focus": {
"$value": "{color.gray.800}"
},
"hover": {
"$value": "{color.gray.800}"
}
},
"tertiary": {
"focus": {
"$value": "{color.gray.800}"
},
"hover": {
"$value": "{color.gray.800}"
}
},
"destructive": {
"base": {
"$value": "{color.red.600}"
},
"active": {
"$value": "{color.red.600}"
},
"focus": {
"$value": "{color.red.500}"
},
"hover": {
"$value": "{color.red.500}"
}
},
"disabled": {
"$value": "{color.gray.800}"
},
"link": {
"$value": "#4761FF33"
},
"selected": {
"$value": "{color.blue.950}"
}
},
"ui": {
"primary": {
"$value": "{color.gray.950}"
},
"secondary": {
"$value": "{color.gray.900}"
},
"tertiary": {
"$value": "{color.gray.800}"
}
},
"overlay": {
"secondary": {
"$value": "{color.bg.ui.secondary}"
}
},
"field": {
"base": {
"$value": "{color.bg.ui.secondary}"
}
},
"product": {
"beta": {
"$value": "{color.purple.900}"
},
"federal": {
"$value": "{color.brand.yellow.dark}"
}
}
},
"border": {
"feedback": {
"error": {
"$value": "{color.red.400}"
},
"info": {
"$value": "{color.blue.400}"
},
"success": {
"$value": "{color.green.400}"
}
},
"field": {
"active": {
"$value": "{color.blue.400}"
},
"focus": {
"$value": "{color.blue.400}"
}
},
"interactive": {
"focus": {
"$value": "{color.blue.400}"
},
"selected": {
"$value": "{color.blue.400}"
}
},
"ui": {
"primary": {
"$value": "{color.gray.700}"
},
"secondary": {
"$value": "{color.gray.800}"
}
}
},
"fill": {
"ui": {
"primary": {
"$value": "{color.gray.200}"
}
},
"field": {
"base": {
"$value": "{color.gray.400}"
}
}
},
"shadow": {
"interactive": {
"focus": {
"$value": "{color.blue.400}"
},
"primary": {
"$value": "{color.gray.950}"
}
},
"ui": {
"primary": {
"$value": "{color.black.200}"
},
"secondary": {
"$value": "{color.black.100}"
}
}
},
"text": {
"feedback": {
"error": {
"$value": "{color.red.400}"
},
"success": {
"$value": "{color.green.400}"
},
"info": {
"$value": "{color.blue.400}"
},
"warning": {
"$value": "{color.brand.orange.light}"
}
},
"interactive": {
"base": {
"$value": "{color.blue.400}"
},
"active": {
"$value": "{color.purple.400}"
},
"secondary": {
"$value": "{color.gray.400}"
},
"disabled": {
"$value": "{color.gray.600}"
},
"selected": {
"$value": "{color.blue.100}"
}
},
"ui": {
"primary": {
"base": {
"$value": "{color.gray.0}"
},
"inverted": {
"$value": "{color.gray.950}"
}
},
"secondary": {
"$value": "{color.gray.400}"
}
},
"field": {
"placeholder": {
"$value": "{color.gray.400}"
}
},
"product": {
"beta": {
"$value": "{color.purple.400}"
}
},
"code": {
"function": {
"$value": "{color.brand.purple.base}"
},
"tag": {
"$value": "{color.brand.orange.base}"
},
"string": {
"$value": "{color.brand.cyan.light}"
},
"base": {
"$value": "{color.gray.200}"
},
"keyword": {
"$value": "{color.brand.pink.light}"
},
"title": {
"$value": "{color.brand.orange.light}"
},
"number": {
"$value": "{color.brand.blue.light}"
}
}
},
"data": {
"info": {
"$value": "#996DD8"
},
"comparison": {
"$value": "#60656A"
},
"neutral": {
"$value": "#A8ADB3"
},
"positive": {
"$value": "#2B9556"
},
"negative": {
"$value": "#E84866"
},
"series": {
"1": {
"$value": "#23ABC5"
},
"2": {
"$value": "#F6B668"
},
"3": {
"$value": "#996DD8"
},
"4": {
"$value": "#2B9556"
}
}
}
}
}
Loading
Loading