From faa645695ef98ab03f2f5e945db4c1acdbee12b4 Mon Sep 17 00:00:00 2001 From: Lukas Oppermann Date: Mon, 25 Nov 2024 16:12:40 +0100 Subject: [PATCH] adding a headerSearch into component file --- scripts/buildTokens.ts | 2 +- .../functional/color/components/header.json5 | 36 +++++++++++++++++++ .../functional/color/dark/app-dark.json5 | 26 -------------- .../functional/color/light/app-light.json5 | 26 -------------- 4 files changed, 37 insertions(+), 53 deletions(-) create mode 100644 src/tokens/functional/color/components/header.json5 diff --git a/scripts/buildTokens.ts b/scripts/buildTokens.ts index 1d5d7fbdb..2dd05a4ba 100644 --- a/scripts/buildTokens.ts +++ b/scripts/buildTokens.ts @@ -44,7 +44,7 @@ const getStyleDictionaryConfig: StyleDictionaryConfigGenerator = ( docJson: docJson(`docs/${filename}.json`, options.prefix, options.buildPath, { theme: options.theme, }), - styleLint: styleLint(`styleLint/${filename}.json`, options.prefix, options.buildPath{ + styleLint: styleLint(`styleLint/${filename}.json`, options.prefix, options.buildPath, { theme: options.theme, }), fallbacks: fallbacks(`fallbacks/${filename}.json`, options.prefix, options.buildPath), diff --git a/src/tokens/functional/color/components/header.json5 b/src/tokens/functional/color/components/header.json5 new file mode 100644 index 000000000..3c362b95b --- /dev/null +++ b/src/tokens/functional/color/components/header.json5 @@ -0,0 +1,36 @@ +{ + headerSearch: { + bgColor: { + $value: '{base.color.neutral.13}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + mode: 'light', + group: 'component', + scopes: ['bgColor'], + }, + 'org.primer.theme': { + light: '{base.color.neutral.13}', + dark: '{base.color.neutral.10}', + }, + }, + }, + borderColor: { + $value: '{base.color.neutral.10}', + $type: 'color', + $extensions: { + 'org.primer.figma': { + collection: 'mode', + mode: 'light', + group: 'component', + scopes: ['borderColor'], + }, + 'org.primer.theme': { + light: '{base.color.neutral.10}', + dark: '{base.color.neutral.7}', + }, + }, + }, + }, +} diff --git a/src/tokens/functional/color/dark/app-dark.json5 b/src/tokens/functional/color/dark/app-dark.json5 index 2e408c639..68f47b87b 100644 --- a/src/tokens/functional/color/dark/app-dark.json5 +++ b/src/tokens/functional/color/dark/app-dark.json5 @@ -626,30 +626,4 @@ }, }, }, - headerSearch: { - bgColor: { - $value: '{base.color.neutral.10}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - mode: 'dark', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - borderColor: { - $value: '{base.color.neutral.7}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - mode: 'dark', - group: 'component', - scopes: ['borderColor'], - }, - }, - }, - }, } diff --git a/src/tokens/functional/color/light/app-light.json5 b/src/tokens/functional/color/light/app-light.json5 index 661a37e17..6e3d94917 100644 --- a/src/tokens/functional/color/light/app-light.json5 +++ b/src/tokens/functional/color/light/app-light.json5 @@ -618,30 +618,4 @@ }, }, }, - headerSearch: { - bgColor: { - $value: '{base.color.neutral.13}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - mode: 'light', - group: 'component', - scopes: ['bgColor'], - }, - }, - }, - borderColor: { - $value: '{base.color.neutral.10}', - $type: 'color', - $extensions: { - 'org.primer.figma': { - collection: 'mode', - mode: 'light', - group: 'component', - scopes: ['borderColor'], - }, - }, - }, - }, }