From a32f9947c469bc1c3e1a08e0f3384542463a82bf Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 17 Jun 2025 09:16:48 -0400 Subject: [PATCH] restructure theme data --- packages/webawesome/docs/.eleventy.js | 136 ++++++++++++++++---------- 1 file changed, 86 insertions(+), 50 deletions(-) diff --git a/packages/webawesome/docs/.eleventy.js b/packages/webawesome/docs/.eleventy.js index ff8d349ae..a687848b7 100644 --- a/packages/webawesome/docs/.eleventy.js +++ b/packages/webawesome/docs/.eleventy.js @@ -67,85 +67,121 @@ export default async function (eleventyConfig) { { name: 'Nunito', css: `'Nunito', sans-serif` }, { name: 'DM Sans', css: `'DM Sans', sans-serif` }, ], - elementPacks: [ - { name: 'Default', rounding: '1', spacing: '1', borderWidth: '1' }, - { name: 'Awesome', rounding: '1.5', spacing: '1', borderWidth: '2' }, - { name: 'Shoelace', rounding: '0.7', spacing: '1', borderWidth: '1' }, - { name: 'Active', rounding: '1.75', spacing: '1', borderWidth: '1' }, - { name: 'Brutalist', rounding: '0', spacing: '1.125', borderWidth: '2' }, - { name: 'Glossy', rounding: '1.33', spacing: '1.125', borderWidth: '1' }, - { name: 'Matter', rounding: '1.33', spacing: '1', borderWidth: '1' }, - { name: 'Mellow', rounding: '1', spacing: '1.125', borderWidth: '1.5' }, - { name: 'Playful', rounding: '2', spacing: '1', borderWidth: '3' }, - { name: 'Premium', rounding: '0.5', spacing: '1', borderWidth: '1.5' }, - { name: 'Tailspin', rounding: '1', spacing: '0.875', borderWidth: '1' }, + elementPresets: [ + { name: 'Default', borderRadiusScale: 1, spaceScale: 1, borderWidthScale: 1 }, + { name: 'Awesome', borderRadiusScale: 1.5, spaceScale: 1, borderWidthScale: 2 }, + { name: 'Shoelace', borderRadiusScale: 0.7, spaceScale: 1, borderWidthScale: 1 }, + { name: 'Active', borderRadiusScale: 1.75, spaceScale: 1, borderWidthScale: 1 }, + { name: 'Brutalist', borderRadiusScale: 0, spaceScale: 1.125, borderWidthScale: 2 }, + { name: 'Glossy', borderRadiusScale: 1.33, spaceScale: 1.125, borderWidthScale: 1 }, + { name: 'Matter', borderRadiusScale: 1.33, spaceScale: 1, borderWidthScale: 1 }, + { name: 'Mellow', borderRadiusScale: 1, spaceScale: 1.125, borderWidthScale: 1.5 }, + { name: 'Playful', borderRadiusScale: 2, spaceScale: 1, borderWidthScale: 3 }, + { name: 'Premium', borderRadiusScale: 0.5, spaceScale: 1, borderWidthScale: 1.5 }, + { name: 'Tailspin', borderRadiusScale: 1, spaceScale: 0.875, borderWidthScale: 1 }, ], - fontPacks: [ + fontPresets: [ { name: 'OS Default', - body: 'ui-sans-serif, system-ui, sans-serif', - heading: 'ui-sans-serif, system-ui, sans-serif', - code: 'ui-monospace, monospace', - longform: 'ui-serif, serif', + fontFamilyBody: 'ui-sans-serif, system-ui, sans-serif', + fontFamilyHeading: 'ui-sans-serif, system-ui, sans-serif', + fontFamilyCode: 'ui-monospace, monospace', + fontFamilyLongform: 'ui-serif, serif', + fontWeightBody: 400, + fontWeightHeading: 600, + fontWeightCode: 400, + fontWeightLongform: 400, }, { name: 'Quicksand', - body: 'Quicksand, sans-serif', - heading: 'Quicksand, sans-serif', - code: 'ui-monospace, monospace', - longform: 'ui-serif, serif', + fontFamilyBody: 'Quicksand, sans-serif', + fontFamilyHeading: 'Quicksand, sans-serif', + fontFamilyCode: 'ui-monospace, monospace', + fontFamilyLongform: 'ui-serif, serif', + fontWeightBody: 500, + fontWeightHeading: 700, + fontWeightCode: 500, + fontWeightLongform: 500, }, { name: 'Inter', - body: `'Inter', sans-serif`, - heading: `'Inter', sans-serif`, - code: 'ui-monospace, monospace', - longform: 'ui-serif, serif', + fontFamilyBody: `'Inter', sans-serif`, + fontFamilyHeading: `'Inter', sans-serif`, + fontFamilyCode: 'ui-monospace, monospace', + fontFamilyLongform: 'ui-serif, serif', + fontWeightBody: 400, + fontWeightHeading: 650, + fontWeightCode: 400, + fontWeightLongform: 400, }, { name: 'Space Grotesk', - body: `'Space Grotesk', sans-serif`, - heading: `'IBM Plex Sans Condensed', sans-serif`, - code: `'Space Mono', monospace`, - longform: 'ui-serif, serif', + fontFamilyBody: `'Space Grotesk', sans-serif`, + fontFamilyHeading: `'IBM Plex Sans Condensed', sans-serif`, + fontFamilyCode: `'Space Mono', monospace`, + fontFamilyLongform: 'ui-serif, serif', + fontWeightBody: 400, + fontWeightHeading: 500, + fontWeightCode: 400, + fontWeightLongform: 400, }, { name: 'Figtree', - body: `'Figtree', sans-serif`, - heading: `'Figtree', sans-serif`, - code: 'ui-monospace, monospace', - longform: 'ui-serif, serif', + fontFamilyBody: `'Figtree', sans-serif`, + fontFamilyHeading: `'Figtree', sans-serif`, + fontFamilyCode: 'ui-monospace, monospace', + fontFamilyLongform: 'ui-serif, serif', + fontWeightBody: 400, + fontWeightHeading: 800, + fontWeightCode: 400, + fontWeightLongform: 400, }, { name: 'Wix Madefor Text', - body: `'Wix Madefor Text', sans-serif`, - heading: `'Wix Madefor Text', sans-serif`, - code: `'Roboto Mono', monospace`, - longform: `'Roboto Serif', serif`, + fontFamilyBody: `'Wix Madefor Text', sans-serif`, + fontFamilyHeading: `'Wix Madefor Text', sans-serif`, + fontFamilyCode: `'Roboto Mono', monospace`, + fontFamilyLongform: `'Roboto Serif', serif`, + fontWeightBody: 400, + fontWeightHeading: 500, + fontWeightCode: 400, + fontWeightLongform: 400, }, { name: 'Mulish', - body: `'Mulish', sans-serif`, - heading: `'Lora', serif`, - code: 'ui-monospace, monospace', - longform: `'Lora', serif`, + fontFamilyBody: `'Mulish', sans-serif`, + fontFamilyHeading: `'Lora', serif`, + fontFamilyCode: 'ui-monospace, monospace', + fontFamilyLongform: `'Lora', serif`, + fontWeightBody: 400, + fontWeightHeading: 700, + fontWeightCode: 400, + fontWeightLongform: 400, }, { name: 'Nunito', - body: `'Nunito', sans-serif`, - heading: `'Fredoka', sans-serif`, - code: `'Azeret Mono', monospace`, - longform: 'ui-serif, serif', + fontFamilyBody: `'Nunito', sans-serif`, + fontFamilyHeading: `'Fredoka', sans-serif`, + fontFamilyCode: `'Azeret Mono', monospace`, + fontFamilyLongform: 'ui-serif, serif', + fontWeightBody: 500, + fontWeightHeading: 600, + fontWeightCode: 500, + fontWeightLongform: 500, }, { name: 'DM Sans', - body: `'DM Sans', sans-serif`, - heading: `'Playfair Display', serif`, - code: 'ui-monospace, monospace', - longform: `'Playfair', serif`, + fontFamilyBody: `'DM Sans', sans-serif`, + fontFamilyHeading: `'Playfair Display', serif`, + fontFamilyCode: 'ui-monospace, monospace', + fontFamilyLongform: `'Playfair', serif`, + fontWeightBody: 400, + fontWeightHeading: 500, + fontWeightCode: 400, + fontWeightLongform: 400, }, ], - iconPacks: [ + icons: [ { name: 'Classic', libraryName: 'classic' }, { name: 'Sharp', libraryName: 'sharp' }, { name: 'Duotone', libraryName: 'duotone' },