UNPKG

@nurl/panda-preset

Version:

Official Panda-CSS preset for the Ganglion Design System.

1 lines 2.19 kB
{"version":3,"sources":["../../../../src/theme/semantic-tokens/types.ts"],"sourcesContent":["import type { Simplify } from '../../types'\n\n// [sentiment?]-[usage]-[prominence?]-[interaction?]\n\n/**\n * The categories of a theme.\n * @description **adjective**, how something is perceived.\n * @readonly **required**\n */\nexport type Sentiment =\n | 'neutral'\n | 'action'\n | 'info'\n | 'success'\n | 'warning'\n | 'danger'\n | 'brand'\n\n/**\n * How a color is presented (can be a CSS property or HTML element).\n * @description **noun**, how something is used within an interface.\n * @readonly **required**\n */\nexport type Usage = 'bg' | 'border' | 'navigation' | 'surface' | 'text' | Brand\nexport type Brand =\n | 'fourXBlue'\n | 'oneUpPink'\n | 'critHitGreen'\n | 'manaBlue'\n | 'n00bYellow'\n | 'rageQuitRed'\n | 'sandboxGold'\n\n/**\n * The use or level of emphasis of a color.\n * @description **noun**, how something stands out.\n * @readonly **optional**\n */\nexport type Prominence = 'initial' | 'inverse' | 100 | 200 | 300\n\n/**\n * The state of an color.\n * @description **noun**, action or influence.\n * @readonly **optional**\n */\nexport type Interaction =\n | 'initial'\n | 'hover'\n | 'active'\n | 'visited'\n | 'focus'\n | 'disabled'\n\n/**\n * The Pando theme of a color.\n */\nexport type Themes = 'nurlTheme'\n\n/**\n * The mode option of a Pando theme.\n */\nexport type Modes = 'lightMode' | 'darkMode'\n\nexport type PandaSelectors<T extends string, V> = {\n readonly [K in `_${T}`]: V\n}\n\nexport type ModeSelectors = PandaSelectors<Modes, string>\nexport type ThemeSelectors = PandaSelectors<Themes, Token>\n\nexport type Token = Simplify<\n {\n readonly base: string\n } & ModeSelectors\n>\n\n/**\n * The semantic token options of a color.\n */\nexport type SemanticToken = {\n value: ThemeSelectors\n}\n\nexport type SentimentConfig = {\n [key in Sentiment]?: {\n [key in Usage]?:\n | SemanticToken\n | {\n readonly [key in Prominence]?: SemanticToken\n }\n | {\n readonly [key in Interaction]?: SemanticToken\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}