/** * Do not edit directly, this file was auto-generated * from the design token sources in src/tokens. */ /** Color scheme the color token values are keyed by. */ export type KdsMode = "light" | "dark"; /** CSS representation of a token. */ export type KdsCss = { /** * The token's exact value from the emitted CSS custom properties * (`_variables.css`) — e.g. `light-dark(hsl(...), hsl(...))` for colors * or the complete font shorthand for typography tokens. */ readonly value: string; /** * The token's CSS custom property reference, e.g. * `var(--kds-color-surface-default)`. */ readonly variable: `var(--kds-${string})`; }; /** Every token carries its CSS representation in `css`. */ export type KdsCssValue = { readonly css: KdsCss; }; /** * Resolved color value for a single mode, as separate HSL components: * `h` in degrees (0-360), `s` and `l` in percent (0-100) and * `a` as fraction (0-1). Equivalent to the CSS color * `hsl( % % / )`. */ export type KdsColorValue = { readonly h: number; readonly s: number; readonly l: number; readonly a: number; }; /** * Light/dark pair of color values, as used inside composite tokens. Colors * are the only mode-dependent token values and are always emitted as a pair * (even if both modes share the same value). Pick the value for the active * mode via `token[mode]`. */ export type KdsColorValues = { readonly light: KdsColorValue; readonly dark: KdsColorValue; }; /** Color token. */ export type KdsColor = KdsColorValues & KdsCssValue; /** Dimensional value, e.g. `{ value: 16, unit: "px" }`. */ export type KdsDimensionValue = { readonly value: number; readonly unit: "px"; }; /** Dimensional token (sizes, spacings, radii, border widths, ...). */ export type KdsDimension = KdsDimensionValue & KdsCssValue; /** A single font family name (e.g. `"Roboto Mono"`), without CSS fallbacks. */ export type KdsFontFamily = string; export type KdsFontWeight = number; export type KdsFontStyle = "italic"; export type KdsLineHeight = number | "normal"; /** Typography token; `css` contains the complete CSS font shorthand. */ export type KdsTypography = { readonly fontFamily: KdsFontFamily; readonly fontWeight: KdsFontWeight; readonly fontSize: KdsDimensionValue; readonly lineHeight?: KdsLineHeight; readonly fontStyle?: KdsFontStyle; } & KdsCssValue; export type KdsBorderStyle = "solid" | "dashed"; /** Border token; `css` contains the complete CSS border shorthand. */ export type KdsBorder = { readonly color: KdsColorValues; readonly width: KdsDimensionValue; readonly style: KdsBorderStyle; } & KdsCssValue; /** A single layer of a shadow token. */ export type KdsShadowLayer = { readonly offsetX: KdsDimensionValue; readonly offsetY: KdsDimensionValue; readonly blur: KdsDimensionValue; readonly spread: KdsDimensionValue; readonly color: KdsColorValues; }; /** Shadow token; `css` contains the complete CSS box-shadow value. */ export type KdsShadow = { readonly layers: readonly KdsShadowLayer[]; } & KdsCssValue;