diff --git a/packages/panda-preset/src/theme/semantic-tokens/info.ts b/packages/panda-preset/src/theme/semantic-tokens/info.ts index 253c36fa..711f9a0e 100644 --- a/packages/panda-preset/src/theme/semantic-tokens/info.ts +++ b/packages/panda-preset/src/theme/semantic-tokens/info.ts @@ -19,6 +19,11 @@ export interface InfoTokens { readonly hover: SemanticToken readonly active: SemanticToken } + readonly ghost: { + readonly initial: SemanticToken + readonly hover: SemanticToken + readonly active: SemanticToken + } readonly surface: { readonly initial: SemanticToken readonly 100: SemanticToken @@ -122,6 +127,72 @@ export const infoTokens: InfoTokens = { }, }, + ghost: { + initial: { + description: + semanticColors.ghost[INFO].initial.$description || + 'The default ghost color of informational elements.', + value: { + _cerberusTheme: { + base: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.info.initial.$value, + ).$value, + _lightMode: deepGetByPaths( + colors, + rawTokens.semanticColors.light.ghost.info.initial.$value, + ).$value, + _darkMode: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.info.initial.$value, + ).$value, + }, + }, + }, + hover: { + description: + semanticColors.ghost[INFO].hover.$description || + 'The hover ghost color of informational elements.', + value: { + _cerberusTheme: { + base: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.info.hover.$value, + ).$value, + _lightMode: deepGetByPaths( + colors, + rawTokens.semanticColors.light.ghost.info.hover.$value, + ).$value, + _darkMode: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.info.hover.$value, + ).$value, + }, + }, + }, + active: { + description: + semanticColors.ghost[INFO].active.$description || + 'The active ghost color of informational elements.', + value: { + _cerberusTheme: { + base: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.info.active.$value, + ).$value, + _lightMode: deepGetByPaths( + colors, + rawTokens.semanticColors.light.ghost.info.active.$value, + ).$value, + _darkMode: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.info.active.$value, + ).$value, + }, + }, + }, + }, + surface: { initial: { description: diff --git a/packages/panda-preset/src/theme/semantic-tokens/warning.ts b/packages/panda-preset/src/theme/semantic-tokens/warning.ts index 2351d03c..b2fc633e 100644 --- a/packages/panda-preset/src/theme/semantic-tokens/warning.ts +++ b/packages/panda-preset/src/theme/semantic-tokens/warning.ts @@ -19,6 +19,11 @@ export interface WarningTokens { readonly hover: SemanticToken readonly active: SemanticToken } + readonly ghost: { + readonly initial: SemanticToken + readonly hover: SemanticToken + readonly active: SemanticToken + } readonly surface: { readonly initial: SemanticToken readonly 100: SemanticToken @@ -122,6 +127,72 @@ export const warningTokens: WarningTokens = { }, }, + ghost: { + initial: { + description: + semanticColors.ghost[WARNING].initial.$description || + 'The default ghost color of warning elements.', + value: { + _cerberusTheme: { + base: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.warning.initial.$value, + ).$value, + _lightMode: deepGetByPaths( + colors, + rawTokens.semanticColors.light.ghost.warning.initial.$value, + ).$value, + _darkMode: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.warning.initial.$value, + ).$value, + }, + }, + }, + hover: { + description: + semanticColors.ghost[WARNING].hover.$description || + 'The hover ghost color of warning elements.', + value: { + _cerberusTheme: { + base: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.warning.hover.$value, + ).$value, + _lightMode: deepGetByPaths( + colors, + rawTokens.semanticColors.light.ghost.warning.hover.$value, + ).$value, + _darkMode: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.warning.hover.$value, + ).$value, + }, + }, + }, + active: { + description: + semanticColors.ghost[WARNING].active.$description || + 'The active ghost color of warning elements.', + value: { + _cerberusTheme: { + base: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.warning.active.$value, + ).$value, + _lightMode: deepGetByPaths( + colors, + rawTokens.semanticColors.light.ghost.warning.active.$value, + ).$value, + _darkMode: deepGetByPaths( + colors, + rawTokens.semanticColors.dark.ghost.warning.active.$value, + ).$value, + }, + }, + }, + }, + surface: { initial: { description: diff --git a/packages/panda-preset/src/tokens/semantic-colors.dark-mode.json b/packages/panda-preset/src/tokens/semantic-colors.dark-mode.json index 68068542..607813a3 100644 --- a/packages/panda-preset/src/tokens/semantic-colors.dark-mode.json +++ b/packages/panda-preset/src/tokens/semantic-colors.dark-mode.json @@ -1220,6 +1220,44 @@ } } }, + "info": { + "initial": { + "$type": "color", + "$value": "colors.brand.100", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + }, + "hover": { + "$type": "color", + "$value": "colors.info.90", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + }, + "active": { + "$type": "color", + "$value": "colors.info.80", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + } + }, "success": { "initial": { "$type": "color", @@ -1295,6 +1333,44 @@ } } } + }, + "warning": { + "initial": { + "$type": "color", + "$value": "colors.brand.100", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + }, + "hover": { + "$type": "color", + "$value": "colors.warning.90", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + }, + "active": { + "$type": "color", + "$value": "colors.warning.80", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + } } }, "backdrop": { diff --git a/packages/panda-preset/src/tokens/semantic-colors.light-mode.json b/packages/panda-preset/src/tokens/semantic-colors.light-mode.json index 953a9644..174947a6 100644 --- a/packages/panda-preset/src/tokens/semantic-colors.light-mode.json +++ b/packages/panda-preset/src/tokens/semantic-colors.light-mode.json @@ -215,7 +215,7 @@ }, "200": { "$type": "color", - "$value": "colors.warning.70", + "$value": "colors.warning.80", "$description": "", "$extensions": { "com.figma": { @@ -1220,6 +1220,44 @@ } } }, + "info": { + "initial": { + "$type": "color", + "$value": "colors.neutral.white", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + }, + "hover": { + "$type": "color", + "$value": "colors.info.20", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + }, + "active": { + "$type": "color", + "$value": "colors.info.30", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + } + }, "success": { "initial": { "$type": "color", @@ -1295,6 +1333,44 @@ } } } + }, + "warning": { + "initial": { + "$type": "color", + "$value": "colors.neutral.white", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + }, + "hover": { + "$type": "color", + "$value": "colors.warning.20", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + }, + "active": { + "$type": "color", + "$value": "colors.warning.30", + "$description": "", + "$extensions": { + "com.figma": { + "hiddenFromPublishing": false, + "scopes": ["FRAME_FILL", "SHAPE_FILL"], + "codeSyntax": {} + } + } + } } }, "backdrop": { diff --git a/tests/panda-preset/theme/semantic-tokens/info.test.ts b/tests/panda-preset/theme/semantic-tokens/info.test.ts index e40464c8..c1e6b8ef 100644 --- a/tests/panda-preset/theme/semantic-tokens/info.test.ts +++ b/tests/panda-preset/theme/semantic-tokens/info.test.ts @@ -70,6 +70,48 @@ describe('infoTokens', () => { ).toEqual('#35A0DD') }) + test('should have a ghost property', () => { + expect(infoTokens.info.ghost).toBeDefined() + }) + + test('should have a ghost.initial property', () => { + expect( + formatToken(infoTokens.info.ghost.initial.value._cerberusTheme.base), + ).toEqual('#130024') + expect( + formatToken(infoTokens.info.ghost.initial.value._cerberusTheme._darkMode), + ).toEqual('#130024') + expect( + formatToken( + infoTokens.info.ghost.initial.value._cerberusTheme._lightMode, + ), + ).toEqual('#FFFFFF') + }) + + test('should have a ghost.hover property', () => { + expect( + formatToken(infoTokens.info.ghost.hover.value._cerberusTheme.base), + ).toEqual('#013655') + expect( + formatToken(infoTokens.info.ghost.hover.value._cerberusTheme._darkMode), + ).toEqual('#013655') + expect( + formatToken(infoTokens.info.ghost.hover.value._cerberusTheme._lightMode), + ).toEqual('#CCE7F7') + }) + + test('should have a ghost.active property', () => { + expect( + formatToken(infoTokens.info.ghost.active.value._cerberusTheme.base), + ).toEqual('#015280') + expect( + formatToken(infoTokens.info.ghost.active.value._cerberusTheme._darkMode), + ).toEqual('#015280') + expect( + formatToken(infoTokens.info.ghost.active.value._cerberusTheme._lightMode), + ).toEqual('#9ACFEE') + }) + test('should have a surface.initial property', () => { expect(infoTokens.info.surface).toBeDefined() }) diff --git a/tests/panda-preset/theme/semantic-tokens/warning.test.ts b/tests/panda-preset/theme/semantic-tokens/warning.test.ts index 7bb92941..ef98f6b8 100644 --- a/tests/panda-preset/theme/semantic-tokens/warning.test.ts +++ b/tests/panda-preset/theme/semantic-tokens/warning.test.ts @@ -76,6 +76,64 @@ describe('warning', () => { ).toEqual('#C1A716') }) + test('should have a ghost property', () => { + expect(warningTokens.warning.ghost).toBeDefined + }) + + test('should have a ghost.initial property', () => { + expect( + formatToken( + warningTokens.warning.ghost.initial.value._cerberusTheme.base, + ), + ).toEqual('#130024') + expect( + formatToken( + warningTokens.warning.ghost.initial.value._cerberusTheme._darkMode, + ), + ).toEqual('#130024') + expect( + formatToken( + warningTokens.warning.ghost.initial.value._cerberusTheme._lightMode, + ), + ).toEqual('#FFFFFF') + }) + + test('should have a ghost.hover property', () => { + expect( + formatToken(warningTokens.warning.ghost.hover.value._cerberusTheme.base), + ).toEqual('#60540B') + expect( + formatToken( + warningTokens.warning.ghost.hover.value._cerberusTheme._darkMode, + ), + ).toEqual('#60540B') + expect( + formatToken( + warningTokens.warning.ghost.hover.value._cerberusTheme._lightMode, + ), + ).toEqual('#FCF6D1') + }) + + test('should have a ghost.active property', () => { + expect( + formatToken(warningTokens.warning.ghost.active.value._cerberusTheme.base), + ).toEqual('#917D10') + expect( + formatToken( + warningTokens.warning.ghost.active.value._cerberusTheme._darkMode, + ), + ).toEqual('#917D10') + expect( + formatToken( + warningTokens.warning.ghost.active.value._cerberusTheme._lightMode, + ), + ).toEqual('#F9EDA4') + }) + + test('should have a surface property', () => { + expect(warningTokens.warning.surface).toBeDefined + }) + test('should have a surface.initial property', () => { expect( formatToken( @@ -175,7 +233,7 @@ describe('warning', () => { formatToken( warningTokens.warning.text[200].value._cerberusTheme._lightMode, ), - ).toEqual('#C1A716') + ).toEqual('#917D10') }) test('should have a text.inverse property', () => {