@kanso-labs/kanso-ui-core 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-theme-CUG5I7M_.js","names":[],"sources":["../src/contrast.ts","../src/tokens/defaults.ts","../src/product-theme.ts"],"sourcesContent":["// Kanso's contrast targets and the pairs they hold, for the base's tests and\n// for defineProductTheme, which holds a product's colours to the same pairs\n// the base clears. WCAG 2's ratio, with a translucent colour painted over its\n// ground first, at 8 bits a channel as the screen draws it. Also the\n// spotlight's tonal fill a scheme leaves unset, which is worked out from the\n// same ratio.\n\n/** WCAG 2's bar for text and the glyphs that carry meaning. */\nconst TEXT = 4.5\n/** WCAG 2's bar for everything else that has to be seen, such as a boundary. */\nconst NON_TEXT = 3\n\n/** A pair as [foreground, ground, target]. */\ntype ContrastPair = readonly [\n foreground: string,\n ground: string,\n target: number,\n]\n\ntype Rgba = readonly [red: number, green: number, blue: number, alpha: number]\n\n/** One scheme's colours, keyed by property, as `light` and `dark` are. */\ntype SchemeColors = Readonly<Partial<Record<string, string>>>\n\n// The pairs Kanso's usage notes name. A ground written as `a over b` is the\n// translucent `a` painted on `b`, and `a at hover` is `a` painted at the\n// strength of Kanso's hover state layer, `--kui-state-layer-opacity-kanso-hover`.\n// A control's hover and pressed layers are its content colour, so the tonal\n// action's label is held under both as well as at rest. Status text, in\n// positive, caution, negative or critical, sits on paper or kanso-surface\n// only, as Kanso's notes say: on surface-sunken or container a component uses\n// the -soft pair or ink, so the status colours are held on those two grounds.\nconst GROUNDS = ['paper', 'kanso-surface', 'surface-sunken', 'container']\nconst kansoPairs: readonly ContrastPair[] = [\n ...GROUNDS.flatMap((ground) => [\n ['ink', ground, TEXT] as const,\n ['ink-muted', ground, TEXT] as const,\n ]),\n ['on-ink', 'ink', TEXT],\n ['accent', 'paper', TEXT],\n ['accent', 'kanso-surface', TEXT],\n ['on-accent', 'accent', TEXT],\n ['on-accent-soft', 'accent-soft', TEXT],\n ['accent-on-ink', 'ink', TEXT],\n ['on-spotlight', 'spotlight', TEXT],\n ['on-spotlight-muted', 'spotlight', TEXT],\n ['on-spotlight', 'spotlight-tonal over spotlight', TEXT],\n [\n 'on-spotlight',\n 'on-spotlight at hover over spotlight-tonal over spotlight',\n TEXT,\n ],\n [\n 'on-spotlight',\n 'on-spotlight at pressed over spotlight-tonal over spotlight',\n TEXT,\n ],\n ['on-spotlight-button', 'spotlight-button', TEXT],\n ['spotlight-line', 'spotlight', NON_TEXT],\n ['positive', 'paper', TEXT],\n ['positive', 'kanso-surface', TEXT],\n ['on-positive-soft', 'positive-soft', TEXT],\n ['caution', 'paper', TEXT],\n ['caution', 'kanso-surface', TEXT],\n ['caution', 'caution-soft', NON_TEXT],\n ['on-caution-soft', 'caution-soft', TEXT],\n ['negative', 'paper', TEXT],\n ['negative', 'kanso-surface', TEXT],\n ['on-negative-soft', 'negative-soft', TEXT],\n ['critical', 'paper', TEXT],\n ['critical', 'kanso-surface', TEXT],\n ['on-critical', 'critical', TEXT],\n ['on-critical-soft', 'critical-soft', TEXT],\n ['outline', 'paper', NON_TEXT],\n ['outline', 'kanso-surface', NON_TEXT],\n ['focus-ring', 'paper', NON_TEXT],\n]\n\n// The Material Design pairs today's components draw, read off kanso-ui's and\n// react-native-kanso-ui's stylesheets: text and icons on the grounds and fills\n// they sit on, and the boundaries and indicators that have to be seen. The\n// roles take Kanso's values, so these are what a component renders in until\n// it moves to Kanso's own tokens.\nconst ROLE_GROUNDS = [\n 'surface',\n 'surface-container-lowest',\n 'surface-container-low',\n 'surface-container',\n 'surface-container-high',\n 'surface-container-highest',\n 'surface-variant',\n]\nconst FILLS = [\n 'primary',\n 'primary-container',\n 'secondary',\n 'secondary-container',\n 'tertiary',\n 'tertiary-container',\n 'error',\n 'error-container',\n 'positive',\n 'positive-container',\n 'negative',\n 'negative-container',\n]\nconst rolePairs: readonly ContrastPair[] = [\n ...ROLE_GROUNDS.flatMap((ground) => [\n ['on-surface', ground, TEXT] as const,\n ['on-surface-variant', ground, TEXT] as const,\n // A field's resting boundary, a switch's off handle, a checkbox's box.\n ['outline', ground, NON_TEXT] as const,\n ]),\n ...FILLS.map((fill) => [`on-${fill}`, fill, TEXT] as const),\n ['inverse-on-surface', 'inverse-surface', TEXT],\n ['inverse-primary', 'inverse-surface', TEXT],\n ['inverse-error', 'inverse-surface', TEXT],\n // Text buttons, links and a selected item's label.\n ['primary', 'surface', TEXT],\n ['primary', 'surface-container-low', TEXT],\n ['primary', 'surface-container-highest', TEXT],\n ['primary', 'primary-container', TEXT],\n ['secondary', 'secondary-container', TEXT],\n // Supporting text under an invalid field, filled or outlined.\n ['error', 'surface', TEXT],\n ['error', 'surface-container-highest', TEXT],\n ['positive', 'surface', TEXT],\n ['negative', 'surface', TEXT],\n // The focus ring kanso-ui draws in secondary.\n ['secondary', 'surface', NON_TEXT],\n]\n\n/** WCAG 2's contrast ratio between two opaque colours, 1 to 21. */\nfunction contrast(first: Rgba, second: Rgba): number {\n const [lighter = 0, darker = 0] = [\n luminance(first),\n luminance(second),\n ].toSorted((a, b) => b - a)\n return (lighter + 0.05) / (darker + 0.05)\n}\n\n/** Whether a value is a colour the contrast check can read. */\nfunction isColor(value: unknown): value is string {\n if (typeof value !== 'string') return false\n try {\n parseColor(value)\n return true\n } catch {\n return false\n }\n}\n\n// WCAG 2's relative luminance.\nfunction luminance([red, green, blue]: Rgba): number {\n const [r = 0, g = 0, b = 0] = [red, green, blue].map((channel) => {\n const value = channel / 255\n return value <= 0.040_45 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4\n })\n return 0.2126 * r + 0.7152 * g + 0.0722 * b\n}\n\n/**\n * A colour painted over an opaque ground, as the screen draws it, at\n * `opacity` of its own alpha: a state layer is its colour at the layer's\n * strength. A browser composites each layer into 8 bits a channel, so each\n * channel is rounded, and a stack of layers is rounded at every step: a ratio\n * worked out in floating point can clear 4.5:1 while the colour drawn misses.\n */\nfunction over(color: string, ground: Rgba, opacity = 1): Rgba {\n const [red, green, blue, colorAlpha] = parseColor(color)\n const alpha = colorAlpha * opacity\n const mix = (top: number, bottom: number) =>\n Math.round(top * alpha + bottom * (1 - alpha))\n return [mix(red, ground[0]), mix(green, ground[1]), mix(blue, ground[2]), 1]\n}\n\n/**\n * A `#rrggbb` or `rgba(r, g, b, a)` colour, as the token file writes them, as\n * its channels, 0 to 255, and its alpha. Throws for anything else.\n */\nfunction parseColor(color: string): Rgba {\n const hex = /^#([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})$/iu.exec(color)\n if (hex) {\n const [, red = '', green = '', blue = ''] = hex\n return [\n Number.parseInt(red, 16),\n Number.parseInt(green, 16),\n Number.parseInt(blue, 16),\n 1,\n ]\n }\n const rgba =\n /^rgba\\((\\d{1,3}), (\\d{1,3}), (\\d{1,3}), (0|1|0?\\.\\d+|1\\.0+)\\)$/u.exec(\n color,\n )\n if (rgba) {\n const [, red = '', green = '', blue = '', alpha = ''] = rgba\n const channels = [Number(red), Number(green), Number(blue)]\n if (channels.every((channel) => channel <= 255)) {\n const [r = 0, g = 0, b = 0] = channels\n return [r, g, b, Number(alpha)]\n }\n }\n throw new TypeError(`not a #rrggbb or rgba() colour: ${color}`)\n}\n\n/**\n * A pair's ratio in a scheme, its ground resolved first: each layer of\n * `a over b over c` painted from the bottom up, and `a at hover` painted at\n * the strength of Kanso's hover state layer.\n */\nfunction ratioOf(\n scheme: SchemeColors,\n foreground: string,\n ground: string,\n): number {\n const valueOf = (property: string): string => {\n const value = scheme[property]\n if (value === undefined) throw new Error(`no ${property}`)\n return value\n }\n const colorOf = (name: string): string => valueOf(`--kui-color-${name}`)\n const layers = ground.split(' over ').toReversed()\n const [bottom = ground, ...above] = layers\n const grounded = above.reduce(\n (under, layer) => {\n const [name = layer, ...state] = layer.split(' at ')\n const opacity = state.reduce(\n (strength, step) =>\n strength * Number(valueOf(`--kui-state-layer-opacity-kanso-${step}`)),\n 1,\n )\n return over(colorOf(name), under, opacity)\n },\n parseColor(colorOf(bottom)),\n )\n return contrast(over(colorOf(foreground), grounded), grounded)\n}\n\n// Kanso draws the tonal fill as a little of the spotlight's content colour\n// laid over the spotlight: 16%, in thousandths.\nconst TONAL_STRENGTH = 160\n\n// The ratio a search for a colour aims for, above WCAG 2's bar: tonalFill's\n// under the pressed layer, and statusShade's on each ground. Browsers differ\n// by a step of rounding when they composite a translucent layer, so a colour\n// that clears 4.5:1 by a hair here can miss with one channel a step off on\n// screen. The pairs still hold every scheme to TEXT.\nconst AIM = 4.55\n\n// A colour's channels as `#rrggbb`.\nfunction hexOf([red, green, blue]: Rgba): string {\n return `#${[red, green, blue]\n .map((channel) => channel.toString(16).padStart(2, '0'))\n .join('')}`\n}\n\n/**\n * A status colour a scheme inherits, as text on the scheme's own grounds: the\n * colour itself where it clears 4.55:1 on every ground, and otherwise the\n * least shade of it that does, mixed toward black on a ground lighter than\n * the colour and toward white on a darker one, in thousandths, so the hue\n * stays. Where even black or white misses, it is that, and the pairs name\n * the miss.\n */\nfunction statusShade(color: string, grounds: readonly string[]): string {\n const base = parseColor(color)\n const under = grounds.map((ground) => parseColor(ground))\n const toward: Rgba = under.every(\n (ground) => luminance(ground) >= luminance(base),\n )\n ? [0, 0, 0, 1]\n : [255, 255, 255, 1]\n const shadeAt = (thousandths: number): Rgba => {\n const strength = thousandths / 1000\n const mix = (top: number, bottom: number): number =>\n Math.round(top * strength + bottom * (1 - strength))\n return [\n mix(toward[0], base[0]),\n mix(toward[1], base[1]),\n mix(toward[2], base[2]),\n 1,\n ]\n }\n const clears = (shade: Rgba): boolean =>\n under.every((ground) => contrast(shade, ground) >= AIM)\n let thousandths = 0\n while (thousandths < 1000 && !clears(shadeAt(thousandths))) thousandths += 1\n return thousandths === 0 ? color : hexOf(shadeAt(thousandths))\n}\n\n/**\n * The spotlight's tonal fill for a scheme that sets no fill of its own: as\n * much of `onSpotlight` mixed into `spotlight` as keeps `onSpotlight` at\n * 4.55:1 on it with the pressed state layer, `pressed`, painted over it, up\n * to Kanso's 16%: a margin over 4.5:1 for a browser that rounds a channel a\n * step the other way. The hover layer is lighter than the pressed one, so\n * the label clears it too. Where even the bare spotlight falls short of the\n * aim under the pressed layer, the fill is the spotlight itself, and the\n * pressed pair names a miss of 4.5:1.\n */\nfunction tonalFill(\n spotlight: string,\n onSpotlight: string,\n pressed: number,\n): string {\n const ground = parseColor(spotlight)\n const content = over(onSpotlight, ground)\n const fillAt = (thousandths: number): Rgba => {\n const strength = thousandths / 1000\n const mix = (top: number, bottom: number): number =>\n Math.round(top * strength + bottom * (1 - strength))\n return [\n mix(content[0], ground[0]),\n mix(content[1], ground[1]),\n mix(content[2], ground[2]),\n 1,\n ]\n }\n const clears = (fill: Rgba): boolean => {\n const layer = over(onSpotlight, fill, pressed)\n return contrast(over(onSpotlight, layer), layer) >= AIM\n }\n let thousandths = TONAL_STRENGTH\n while (thousandths > 0 && !clears(fillAt(thousandths))) thousandths -= 1\n return hexOf(fillAt(thousandths))\n}\n\nexport type { ContrastPair, Rgba, SchemeColors }\nexport {\n contrast,\n isColor,\n kansoPairs,\n NON_TEXT,\n over,\n parseColor,\n ratioOf,\n rolePairs,\n statusShade,\n TEXT,\n tonalFill,\n}\n","// AUTO-GENERATED by scripts/build-tokens.mjs from the sibling design.tokens.json.\n// Not committed and not to be edited: `npm run tokens:build` writes it.\n\n/**\n * A theme: any of the `--kui-*` custom properties `tokens.css` lists, each set\n * to a value in CSS syntax. Hand one to `ThemeScope`'s `theme` prop, and every\n * component inside reads it.\n *\n * The values hold for both schemes. A theme with a value of its own for light\n * and for dark is two of these, with the scope handed the one for the scheme\n * in use.\n */\ntype KuiTheme = {\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-accent'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-accent-on-ink'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-accent-soft'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-background'?: string\n /** Defaults to `#b25b00` in the light scheme and `#ffb870` in the dark. */\n readonly '--kui-color-caution'?: string\n /** Defaults to `#ffe7cc` in the light scheme and `#4a2a00` in the dark. */\n readonly '--kui-color-caution-soft'?: string\n /** Defaults to `#ffc27a` in the light scheme and `#7a4600` in the dark. */\n readonly '--kui-color-caution-stripe'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-container'?: string\n /** Defaults to `#b3261e` in the light scheme and `#f2b8b5` in the dark. */\n readonly '--kui-color-critical'?: string\n /** Defaults to `#fcdedc` in the light scheme and `#4d1512` in the dark. */\n readonly '--kui-color-critical-soft'?: string\n /** Defaults to `#e3e3e3` in the light scheme and `#333333` in the dark. */\n readonly '--kui-color-divider'?: string\n /** Defaults to `#b3261e` in the light scheme and `#f2b8b5` in the dark. */\n readonly '--kui-color-error'?: string\n /** Defaults to `#fcdedc` in the light scheme and `#4d1512` in the dark. */\n readonly '--kui-color-error-container'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-focus-ring'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-ink'?: string\n /** Defaults to `#5c5c5c` in the light scheme and `#b3b3b3` in the dark. */\n readonly '--kui-color-ink-muted'?: string\n /** Defaults to `#f2b8b5` in the light scheme and `#b3261e` in the dark. */\n readonly '--kui-color-inverse-error'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-inverse-on-surface'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-inverse-primary'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-inverse-surface'?: string\n /** Defaults to `#ffffff` in the light scheme and `#1c1c1c` in the dark. */\n readonly '--kui-color-kanso-surface'?: string\n /** Defaults to `#a63a1f` in the light scheme and `#ffb4a1` in the dark. */\n readonly '--kui-color-negative'?: string\n /** Defaults to `#fce3dc` in the light scheme and `#4a1a10` in the dark. */\n readonly '--kui-color-negative-container'?: string\n /** Defaults to `#fce3dc` in the light scheme and `#4a1a10` in the dark. */\n readonly '--kui-color-negative-soft'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-on-accent'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-accent-soft'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-background'?: string\n /** Defaults to `#5c2e00` in the light scheme and `#ffddb3` in the dark. */\n readonly '--kui-color-on-caution-soft'?: string\n /** Defaults to `#ffffff` in the light scheme and `#601410` in the dark. */\n readonly '--kui-color-on-critical'?: string\n /** Defaults to `#5f0e0a` in the light scheme and `#ffdad6` in the dark. */\n readonly '--kui-color-on-critical-soft'?: string\n /** Defaults to `#ffffff` in the light scheme and `#601410` in the dark. */\n readonly '--kui-color-on-error'?: string\n /** Defaults to `#5f0e0a` in the light scheme and `#ffdad6` in the dark. */\n readonly '--kui-color-on-error-container'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-on-ink'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-on-negative'?: string\n /** Defaults to `#5a1a0a` in the light scheme and `#ffdad0` in the dark. */\n readonly '--kui-color-on-negative-container'?: string\n /** Defaults to `#5a1a0a` in the light scheme and `#ffdad0` in the dark. */\n readonly '--kui-color-on-negative-soft'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-on-positive'?: string\n /** Defaults to `#0b3a1b` in the light scheme and `#c6f2d2` in the dark. */\n readonly '--kui-color-on-positive-container'?: string\n /** Defaults to `#0b3a1b` in the light scheme and `#c6f2d2` in the dark. */\n readonly '--kui-color-on-positive-soft'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-on-primary'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-primary-container'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-primary-fixed'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-primary-fixed-variant'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-on-secondary'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-secondary-container'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-secondary-fixed'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-secondary-fixed-variant'?: string\n /** Defaults to `#ffffff`. */\n readonly '--kui-color-on-spotlight'?: string\n /** Defaults to `#1a1a1a`. */\n readonly '--kui-color-on-spotlight-button'?: string\n /** Defaults to `rgba(255, 255, 255, 0.8)`. */\n readonly '--kui-color-on-spotlight-muted'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-surface'?: string\n /** Defaults to `#5c5c5c` in the light scheme and `#b3b3b3` in the dark. */\n readonly '--kui-color-on-surface-variant'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-tertiary'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-tertiary-container'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-tertiary-fixed'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-on-tertiary-fixed-variant'?: string\n /** Defaults to `#8a8a8a` in the light scheme and `#8c8c8c` in the dark. */\n readonly '--kui-color-outline'?: string\n /** Defaults to `#e3e3e3` in the light scheme and `#333333` in the dark. */\n readonly '--kui-color-outline-variant'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-paper'?: string\n /** Defaults to `#1e6b35` in the light scheme and `#7bd99a` in the dark. */\n readonly '--kui-color-positive'?: string\n /** Defaults to `#ddf2e2` in the light scheme and `#123a20` in the dark. */\n readonly '--kui-color-positive-container'?: string\n /** Defaults to `#ddf2e2` in the light scheme and `#123a20` in the dark. */\n readonly '--kui-color-positive-soft'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-primary'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-primary-container'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-primary-fixed'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-primary-fixed-dim'?: string\n /** Defaults to `rgba(0, 0, 0, 0.4)` in the light scheme and `rgba(0, 0, 0, 0.6)` in the dark. */\n readonly '--kui-color-scrim'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-secondary'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-secondary-container'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-secondary-fixed'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-secondary-fixed-dim'?: string\n /** Defaults to `#000000`. */\n readonly '--kui-color-shadow'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-spotlight'?: string\n /** Defaults to `#fafafa` in the light scheme and `#ffffff` in the dark. */\n readonly '--kui-color-spotlight-button'?: string\n /** Defaults to `rgba(255, 255, 255, 0.6)`. */\n readonly '--kui-color-spotlight-line'?: string\n /** Defaults to `rgba(255, 255, 255, 0.16)` in the light scheme and `rgba(255, 255, 255, 0.14)` in the dark. */\n readonly '--kui-color-spotlight-tonal'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-surface'?: string\n /** Defaults to `#ffffff` in the light scheme and `#1c1c1c` in the dark. */\n readonly '--kui-color-surface-bright'?: string\n /** Defaults to `#ffffff` in the light scheme and `#1c1c1c` in the dark. */\n readonly '--kui-color-surface-container'?: string\n /** Defaults to `#ffffff` in the light scheme and `#1c1c1c` in the dark. */\n readonly '--kui-color-surface-container-high'?: string\n /** Defaults to `#f0f0f0` in the light scheme and `#262626` in the dark. */\n readonly '--kui-color-surface-container-highest'?: string\n /** Defaults to `#ffffff` in the light scheme and `#1c1c1c` in the dark. */\n readonly '--kui-color-surface-container-low'?: string\n /** Defaults to `#ffffff` in the light scheme and `#1c1c1c` in the dark. */\n readonly '--kui-color-surface-container-lowest'?: string\n /** Defaults to `#fafafa` in the light scheme and `#121212` in the dark. */\n readonly '--kui-color-surface-dim'?: string\n /** Defaults to `#f0f0f0` in the light scheme and `#262626` in the dark. */\n readonly '--kui-color-surface-sunken'?: string\n /** Defaults to `#1a1a1a` in the light scheme and `#ececec` in the dark. */\n readonly '--kui-color-surface-tint'?: string\n /** Defaults to `#f0f0f0` in the light scheme and `#262626` in the dark. */\n readonly '--kui-color-surface-variant'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-tertiary'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-tertiary-container'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-tertiary-fixed'?: string\n /** Defaults to `#e9e9e9` in the light scheme and `#2b2b2b` in the dark. */\n readonly '--kui-color-tertiary-fixed-dim'?: string\n /** Defaults to `450ms`. */\n readonly '--kui-motion-duration-long1'?: string\n /** Defaults to `500ms`. */\n readonly '--kui-motion-duration-long2'?: string\n /** Defaults to `600ms`. */\n readonly '--kui-motion-duration-long3'?: string\n /** Defaults to `250ms`. */\n readonly '--kui-motion-duration-medium1'?: string\n /** Defaults to `300ms`. */\n readonly '--kui-motion-duration-medium2'?: string\n /** Defaults to `350ms`. */\n readonly '--kui-motion-duration-medium3'?: string\n /** Defaults to `100ms`. */\n readonly '--kui-motion-duration-short1'?: string\n /** Defaults to `150ms`. */\n readonly '--kui-motion-duration-short2'?: string\n /** Defaults to `200ms`. */\n readonly '--kui-motion-duration-short3'?: string\n /** Defaults to `cubic-bezier(0.2, 0, 0, 1)`. */\n readonly '--kui-motion-easing-emphasized'?: string\n /** Defaults to `cubic-bezier(0.3, 0, 0.8, 0.15)`. */\n readonly '--kui-motion-easing-emphasized-accelerate'?: string\n /** Defaults to `cubic-bezier(0.05, 0.7, 0.1, 1)`. */\n readonly '--kui-motion-easing-emphasized-decelerate'?: string\n /** Defaults to `cubic-bezier(0.34, 1.56, 0.64, 1)`. */\n readonly '--kui-motion-easing-spring-fast'?: string\n /** Defaults to `cubic-bezier(0.16, 1, 0.3, 1)`. */\n readonly '--kui-motion-easing-spring-slow'?: string\n /** Defaults to `cubic-bezier(0.2, 0, 0, 1)`. */\n readonly '--kui-motion-easing-standard'?: string\n /** Defaults to `9999px`. */\n readonly '--kui-radius-circle'?: string\n /** Defaults to `24px`. */\n readonly '--kui-radius-kanso-2xl'?: string\n /** Defaults to `28px`. */\n readonly '--kui-radius-kanso-3xl'?: string\n /** Defaults to `16px`. */\n readonly '--kui-radius-kanso-lg'?: string\n /** Defaults to `12px`. */\n readonly '--kui-radius-kanso-md'?: string\n /** Defaults to `999px`. */\n readonly '--kui-radius-kanso-pill'?: string\n /** Defaults to `8px`. */\n readonly '--kui-radius-kanso-sm'?: string\n /** Defaults to `20px`. */\n readonly '--kui-radius-kanso-xl'?: string\n /** Defaults to `4px`. */\n readonly '--kui-radius-kanso-xs'?: string\n /** Defaults to `16px`. */\n readonly '--kui-radius-lg'?: string\n /** Defaults to `12px`. */\n readonly '--kui-radius-md'?: string\n /** Defaults to `0px`. */\n readonly '--kui-radius-none'?: string\n /** Defaults to `9999px`. */\n readonly '--kui-radius-pill'?: string\n /** Defaults to `8px`. */\n readonly '--kui-radius-sm'?: string\n /** Defaults to `28px`. */\n readonly '--kui-radius-xl'?: string\n /** Defaults to `4px`. */\n readonly '--kui-radius-xs'?: string\n /** Defaults to `0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 2px 8px 0px rgba(0, 0, 0, 0.04)` in the light scheme and `0px 1px 2px 0px rgba(0, 0, 0, 0.5)` in the dark. */\n readonly '--kui-shadow-elevation1'?: string\n /** Defaults to `0px 2px 6px 0px rgba(0, 0, 0, 0.08), 0px 8px 20px 0px rgba(0, 0, 0, 0.1)` in the light scheme and `0px 4px 16px 0px rgba(0, 0, 0, 0.6)` in the dark. */\n readonly '--kui-shadow-elevation2'?: string\n /** Defaults to `0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14)` in the light scheme and `0px 12px 40px 0px rgba(0, 0, 0, 0.7)` in the dark. */\n readonly '--kui-shadow-elevation3'?: string\n /** Defaults to `0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14)` in the light scheme and `0px 12px 40px 0px rgba(0, 0, 0, 0.7)` in the dark. */\n readonly '--kui-shadow-elevation4'?: string\n /** Defaults to `0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14)` in the light scheme and `0px 12px 40px 0px rgba(0, 0, 0, 0.7)` in the dark. */\n readonly '--kui-shadow-elevation5'?: string\n /** Defaults to `0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 2px 8px 0px rgba(0, 0, 0, 0.04)` in the light scheme and `0px 1px 2px 0px rgba(0, 0, 0, 0.5)` in the dark. */\n readonly '--kui-shadow-kanso-1'?: string\n /** Defaults to `0px 2px 6px 0px rgba(0, 0, 0, 0.08), 0px 8px 20px 0px rgba(0, 0, 0, 0.1)` in the light scheme and `0px 4px 16px 0px rgba(0, 0, 0, 0.6)` in the dark. */\n readonly '--kui-shadow-kanso-2'?: string\n /** Defaults to `0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14)` in the light scheme and `0px 12px 40px 0px rgba(0, 0, 0, 0.7)` in the dark. */\n readonly '--kui-shadow-kanso-3'?: string\n /** Defaults to `56px`. */\n readonly '--kui-sizing-control-lg'?: string\n /** Defaults to `48px`. */\n readonly '--kui-sizing-control-md'?: string\n /** Defaults to `40px`. */\n readonly '--kui-sizing-control-sm'?: string\n /** Defaults to `96px`. */\n readonly '--kui-sizing-control-xl'?: string\n /** Defaults to `32px`. */\n readonly '--kui-sizing-control-xs'?: string\n /** Defaults to `136px`. */\n readonly '--kui-sizing-control-xxl'?: string\n /** Defaults to `24px`. */\n readonly '--kui-sizing-icon-lg'?: string\n /** Defaults to `20px`. */\n readonly '--kui-sizing-icon-md'?: string\n /** Defaults to `18px`. */\n readonly '--kui-sizing-icon-sm'?: string\n /** Defaults to `40px`. */\n readonly '--kui-sizing-icon-xl'?: string\n /** Defaults to `16px`. */\n readonly '--kui-sizing-icon-xs'?: string\n /** Defaults to `56px`. */\n readonly '--kui-sizing-kanso-avatar-lg'?: string\n /** Defaults to `36px`. */\n readonly '--kui-sizing-kanso-avatar-md'?: string\n /** Defaults to `28px`. */\n readonly '--kui-sizing-kanso-avatar-sm'?: string\n /** Defaults to `48px`. */\n readonly '--kui-sizing-kanso-control-lg'?: string\n /** Defaults to `40px`. */\n readonly '--kui-sizing-kanso-control-md'?: string\n /** Defaults to `32px`. */\n readonly '--kui-sizing-kanso-control-sm'?: string\n /** Defaults to `56px`. */\n readonly '--kui-sizing-kanso-control-xl'?: string\n /** Defaults to `24px`. */\n readonly '--kui-sizing-kanso-icon-lg'?: string\n /** Defaults to `20px`. */\n readonly '--kui-sizing-kanso-icon-md'?: string\n /** Defaults to `16px`. */\n readonly '--kui-sizing-kanso-icon-sm'?: string\n /** Defaults to `40px`. */\n readonly '--kui-sizing-kanso-icon-xl'?: string\n /** Defaults to `60px`. */\n readonly '--kui-sizing-kanso-row'?: string\n /** Defaults to `44px`. */\n readonly '--kui-sizing-kanso-row-compact'?: string\n /** Defaults to `88px`. */\n readonly '--kui-sizing-row-lg'?: string\n /** Defaults to `72px`. */\n readonly '--kui-sizing-row-md'?: string\n /** Defaults to `56px`. */\n readonly '--kui-sizing-row-sm'?: string\n /** Defaults to `48px`. */\n readonly '--kui-sizing-row-xs'?: string\n /** Defaults to `24px`. */\n readonly '--kui-spacing-kanso-2xl'?: string\n /** Defaults to `2px`. */\n readonly '--kui-spacing-kanso-2xs'?: string\n /** Defaults to `32px`. */\n readonly '--kui-spacing-kanso-3xl'?: string\n /** Defaults to `40px`. */\n readonly '--kui-spacing-kanso-4xl'?: string\n /** Defaults to `56px`. */\n readonly '--kui-spacing-kanso-5xl'?: string\n /** Defaults to `16px`. */\n readonly '--kui-spacing-kanso-lg'?: string\n /** Defaults to `12px`. */\n readonly '--kui-spacing-kanso-md'?: string\n /** Defaults to `8px`. */\n readonly '--kui-spacing-kanso-sm'?: string\n /** Defaults to `20px`. */\n readonly '--kui-spacing-kanso-xl'?: string\n /** Defaults to `4px`. */\n readonly '--kui-spacing-kanso-xs'?: string\n /** Defaults to `16px`. */\n readonly '--kui-spacing-lg'?: string\n /** Defaults to `20px`. */\n readonly '--kui-spacing-lg-plus'?: string\n /** Defaults to `12px`. */\n readonly '--kui-spacing-md'?: string\n /** Defaults to `8px`. */\n readonly '--kui-spacing-sm'?: string\n /** Defaults to `24px`. */\n readonly '--kui-spacing-xl'?: string\n /** Defaults to `4px`. */\n readonly '--kui-spacing-xs'?: string\n /** Defaults to `6px`. */\n readonly '--kui-spacing-xs-plus'?: string\n /** Defaults to `32px`. */\n readonly '--kui-spacing-xxl'?: string\n /** Defaults to `2px`. */\n readonly '--kui-spacing-xxs'?: string\n /** Defaults to `40px`. */\n readonly '--kui-spacing-xxxl'?: string\n /** Defaults to `0.12`. */\n readonly '--kui-state-layer-opacity-disabled-container'?: string\n /** Defaults to `0.38`. */\n readonly '--kui-state-layer-opacity-disabled-content'?: string\n /** Defaults to `0.16`. */\n readonly '--kui-state-layer-opacity-dragged'?: string\n /** Defaults to `0.1`. */\n readonly '--kui-state-layer-opacity-focus'?: string\n /** Defaults to `0.08`. */\n readonly '--kui-state-layer-opacity-hover'?: string\n /** Defaults to `0.12`. */\n readonly '--kui-state-layer-opacity-kanso-disabled-container'?: string\n /** Defaults to `0.38`. */\n readonly '--kui-state-layer-opacity-kanso-disabled-content'?: string\n /** Defaults to `0.1`. */\n readonly '--kui-state-layer-opacity-kanso-focus'?: string\n /** Defaults to `0.08`. */\n readonly '--kui-state-layer-opacity-kanso-hover'?: string\n /** Defaults to `0.12`. */\n readonly '--kui-state-layer-opacity-kanso-pressed'?: string\n /** Defaults to `0.1`. */\n readonly '--kui-state-layer-opacity-pressed'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-body-large-font'?: string\n /** Defaults to `24px`. */\n readonly '--kui-typography-body-large-line-height'?: string\n /** Defaults to `16px`. */\n readonly '--kui-typography-body-large-size'?: string\n /** Defaults to `0.5px`. */\n readonly '--kui-typography-body-large-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-regular, 400)`. */\n readonly '--kui-typography-body-large-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-body-medium-font'?: string\n /** Defaults to `20px`. */\n readonly '--kui-typography-body-medium-line-height'?: string\n /** Defaults to `14px`. */\n readonly '--kui-typography-body-medium-size'?: string\n /** Defaults to `0.25px`. */\n readonly '--kui-typography-body-medium-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-regular, 400)`. */\n readonly '--kui-typography-body-medium-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-body-small-font'?: string\n /** Defaults to `16px`. */\n readonly '--kui-typography-body-small-line-height'?: string\n /** Defaults to `12px`. */\n readonly '--kui-typography-body-small-size'?: string\n /** Defaults to `0.4px`. */\n readonly '--kui-typography-body-small-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-regular, 400)`. */\n readonly '--kui-typography-body-small-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-display-large-font'?: string\n /** Defaults to `64px`. */\n readonly '--kui-typography-display-large-line-height'?: string\n /** Defaults to `57px`. */\n readonly '--kui-typography-display-large-size'?: string\n /** Defaults to `-0.25px`. */\n readonly '--kui-typography-display-large-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-display-large-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-display-medium-font'?: string\n /** Defaults to `52px`. */\n readonly '--kui-typography-display-medium-line-height'?: string\n /** Defaults to `45px`. */\n readonly '--kui-typography-display-medium-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-display-medium-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-display-medium-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-display-small-font'?: string\n /** Defaults to `44px`. */\n readonly '--kui-typography-display-small-line-height'?: string\n /** Defaults to `36px`. */\n readonly '--kui-typography-display-small-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-display-small-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-display-small-weight'?: string\n /** Defaults to `'Roboto Serif', 'Iowan Old Style', Georgia, serif`. */\n readonly '--kui-typography-font-family-brand'?: string\n /** Defaults to `'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace`. */\n readonly '--kui-typography-font-family-mono'?: string\n /** Defaults to `'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif`. */\n readonly '--kui-typography-font-family-plain'?: string\n /** Defaults to `'Roboto Serif', 'Iowan Old Style', Georgia, serif`. */\n readonly '--kui-typography-font-family-voice'?: string\n /** Defaults to `var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-headline-large-font'?: string\n /** Defaults to `40px`. */\n readonly '--kui-typography-headline-large-line-height'?: string\n /** Defaults to `32px`. */\n readonly '--kui-typography-headline-large-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-headline-large-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-headline-large-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-headline-medium-font'?: string\n /** Defaults to `36px`. */\n readonly '--kui-typography-headline-medium-line-height'?: string\n /** Defaults to `28px`. */\n readonly '--kui-typography-headline-medium-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-headline-medium-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-headline-medium-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-headline-small-font'?: string\n /** Defaults to `32px`. */\n readonly '--kui-typography-headline-small-line-height'?: string\n /** Defaults to `24px`. */\n readonly '--kui-typography-headline-small-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-headline-small-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-headline-small-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-label-large-font'?: string\n /** Defaults to `20px`. */\n readonly '--kui-typography-label-large-line-height'?: string\n /** Defaults to `14px`. */\n readonly '--kui-typography-label-large-size'?: string\n /** Defaults to `0.1px`. */\n readonly '--kui-typography-label-large-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-label-large-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-label-medium-font'?: string\n /** Defaults to `16px`. */\n readonly '--kui-typography-label-medium-line-height'?: string\n /** Defaults to `12px`. */\n readonly '--kui-typography-label-medium-size'?: string\n /** Defaults to `0.5px`. */\n readonly '--kui-typography-label-medium-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-label-medium-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-label-small-font'?: string\n /** Defaults to `16px`. */\n readonly '--kui-typography-label-small-line-height'?: string\n /** Defaults to `11px`. */\n readonly '--kui-typography-label-small-size'?: string\n /** Defaults to `0.5px`. */\n readonly '--kui-typography-label-small-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-label-small-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-t-body-font'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-t-body-large-font'?: string\n /** Defaults to `26px`. */\n readonly '--kui-typography-t-body-large-line-height'?: string\n /** Defaults to `17px`. */\n readonly '--kui-typography-t-body-large-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-body-large-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-regular, 400)`. */\n readonly '--kui-typography-t-body-large-weight'?: string\n /** Defaults to `20px`. */\n readonly '--kui-typography-t-body-line-height'?: string\n /** Defaults to `15px`. */\n readonly '--kui-typography-t-body-size'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-t-body-small-font'?: string\n /** Defaults to `20px`. */\n readonly '--kui-typography-t-body-small-line-height'?: string\n /** Defaults to `14px`. */\n readonly '--kui-typography-t-body-small-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-body-small-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-regular, 400)`. */\n readonly '--kui-typography-t-body-small-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-t-body-strong-font'?: string\n /** Defaults to `22px`. */\n readonly '--kui-typography-t-body-strong-line-height'?: string\n /** Defaults to `16px`. */\n readonly '--kui-typography-t-body-strong-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-body-strong-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-t-body-strong-weight'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-body-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-regular, 400)`. */\n readonly '--kui-typography-t-body-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-t-caption-font'?: string\n /** Defaults to `16px`. */\n readonly '--kui-typography-t-caption-line-height'?: string\n /** Defaults to `12px`. */\n readonly '--kui-typography-t-caption-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-caption-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-t-caption-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-t-display-font'?: string\n /** Defaults to `52px`. */\n readonly '--kui-typography-t-display-line-height'?: string\n /** Defaults to `44px`. */\n readonly '--kui-typography-t-display-size'?: string\n /** Defaults to `-0.66px`. */\n readonly '--kui-typography-t-display-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-t-display-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-mono, 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace)`. */\n readonly '--kui-typography-t-figure-font'?: string\n /** Defaults to `var(--kui-typography-font-family-mono, 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace)`. */\n readonly '--kui-typography-t-figure-large-font'?: string\n /** Defaults to `30px`. */\n readonly '--kui-typography-t-figure-large-line-height'?: string\n /** Defaults to `24px`. */\n readonly '--kui-typography-t-figure-large-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-figure-large-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-t-figure-large-weight'?: string\n /** Defaults to `20px`. */\n readonly '--kui-typography-t-figure-line-height'?: string\n /** Defaults to `15px`. */\n readonly '--kui-typography-t-figure-size'?: string\n /** Defaults to `var(--kui-typography-font-family-mono, 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace)`. */\n readonly '--kui-typography-t-figure-small-font'?: string\n /** Defaults to `18px`. */\n readonly '--kui-typography-t-figure-small-line-height'?: string\n /** Defaults to `13px`. */\n readonly '--kui-typography-t-figure-small-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-figure-small-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-t-figure-small-weight'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-figure-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-t-figure-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-t-headline-font'?: string\n /** Defaults to `40px`. */\n readonly '--kui-typography-t-headline-line-height'?: string\n /** Defaults to `34px`. */\n readonly '--kui-typography-t-headline-size'?: string\n /** Defaults to `-0.34px`. */\n readonly '--kui-typography-t-headline-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-t-headline-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-t-hero-font'?: string\n /** Defaults to `58px`. */\n readonly '--kui-typography-t-hero-line-height'?: string\n /** Defaults to `52px`. */\n readonly '--kui-typography-t-hero-size'?: string\n /** Defaults to `-0.78px`. */\n readonly '--kui-typography-t-hero-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-t-hero-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-t-label-font'?: string\n /** Defaults to `18px`. */\n readonly '--kui-typography-t-label-line-height'?: string\n /** Defaults to `13px`. */\n readonly '--kui-typography-t-label-size'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-t-label-strong-font'?: string\n /** Defaults to `20px`. */\n readonly '--kui-typography-t-label-strong-line-height'?: string\n /** Defaults to `15px`. */\n readonly '--kui-typography-t-label-strong-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-label-strong-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-semibold, 600)`. */\n readonly '--kui-typography-t-label-strong-weight'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-label-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-t-label-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-t-section-font'?: string\n /** Defaults to `28px`. */\n readonly '--kui-typography-t-section-line-height'?: string\n /** Defaults to `22px`. */\n readonly '--kui-typography-t-section-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-section-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-t-section-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-t-title-font'?: string\n /** Defaults to `38px`. */\n readonly '--kui-typography-t-title-line-height'?: string\n /** Defaults to `32px`. */\n readonly '--kui-typography-t-title-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-t-title-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-t-title-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)`. */\n readonly '--kui-typography-title-large-font'?: string\n /** Defaults to `28px`. */\n readonly '--kui-typography-title-large-line-height'?: string\n /** Defaults to `22px`. */\n readonly '--kui-typography-title-large-size'?: string\n /** Defaults to `0px`. */\n readonly '--kui-typography-title-large-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-light, 300)`. */\n readonly '--kui-typography-title-large-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-title-medium-font'?: string\n /** Defaults to `24px`. */\n readonly '--kui-typography-title-medium-line-height'?: string\n /** Defaults to `16px`. */\n readonly '--kui-typography-title-medium-size'?: string\n /** Defaults to `0.15px`. */\n readonly '--kui-typography-title-medium-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-title-medium-weight'?: string\n /** Defaults to `var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)`. */\n readonly '--kui-typography-title-small-font'?: string\n /** Defaults to `20px`. */\n readonly '--kui-typography-title-small-line-height'?: string\n /** Defaults to `14px`. */\n readonly '--kui-typography-title-small-size'?: string\n /** Defaults to `0.1px`. */\n readonly '--kui-typography-title-small-tracking'?: string\n /** Defaults to `var(--kui-typography-weight-medium, 500)`. */\n readonly '--kui-typography-title-small-weight'?: string\n /** Defaults to `700`. */\n readonly '--kui-typography-weight-bold'?: string\n /** Defaults to `300`. */\n readonly '--kui-typography-weight-light'?: string\n /** Defaults to `500`. */\n readonly '--kui-typography-weight-medium'?: string\n /** Defaults to `400`. */\n readonly '--kui-typography-weight-regular'?: string\n /** Defaults to `600`. */\n readonly '--kui-typography-weight-semibold'?: string\n}\n\n/** Every property at its value in the light scheme, as `tokens.css` declares it. */\nconst light: Required<KuiTheme> = {\n '--kui-color-accent': '#1a1a1a',\n '--kui-color-accent-on-ink': '#fafafa',\n '--kui-color-accent-soft': '#e9e9e9',\n '--kui-color-background': '#fafafa',\n '--kui-color-caution': '#b25b00',\n '--kui-color-caution-soft': '#ffe7cc',\n '--kui-color-caution-stripe': '#ffc27a',\n '--kui-color-container': '#e9e9e9',\n '--kui-color-critical': '#b3261e',\n '--kui-color-critical-soft': '#fcdedc',\n '--kui-color-divider': '#e3e3e3',\n '--kui-color-error': '#b3261e',\n '--kui-color-error-container': '#fcdedc',\n '--kui-color-focus-ring': '#1a1a1a',\n '--kui-color-ink': '#1a1a1a',\n '--kui-color-ink-muted': '#5c5c5c',\n '--kui-color-inverse-error': '#f2b8b5',\n '--kui-color-inverse-on-surface': '#fafafa',\n '--kui-color-inverse-primary': '#fafafa',\n '--kui-color-inverse-surface': '#1a1a1a',\n '--kui-color-kanso-surface': '#ffffff',\n '--kui-color-negative': '#a63a1f',\n '--kui-color-negative-container': '#fce3dc',\n '--kui-color-negative-soft': '#fce3dc',\n '--kui-color-on-accent': '#fafafa',\n '--kui-color-on-accent-soft': '#1a1a1a',\n '--kui-color-on-background': '#1a1a1a',\n '--kui-color-on-caution-soft': '#5c2e00',\n '--kui-color-on-critical': '#ffffff',\n '--kui-color-on-critical-soft': '#5f0e0a',\n '--kui-color-on-error': '#ffffff',\n '--kui-color-on-error-container': '#5f0e0a',\n '--kui-color-on-ink': '#fafafa',\n '--kui-color-on-negative': '#fafafa',\n '--kui-color-on-negative-container': '#5a1a0a',\n '--kui-color-on-negative-soft': '#5a1a0a',\n '--kui-color-on-positive': '#fafafa',\n '--kui-color-on-positive-container': '#0b3a1b',\n '--kui-color-on-positive-soft': '#0b3a1b',\n '--kui-color-on-primary': '#fafafa',\n '--kui-color-on-primary-container': '#1a1a1a',\n '--kui-color-on-primary-fixed': '#1a1a1a',\n '--kui-color-on-primary-fixed-variant': '#1a1a1a',\n '--kui-color-on-secondary': '#fafafa',\n '--kui-color-on-secondary-container': '#1a1a1a',\n '--kui-color-on-secondary-fixed': '#1a1a1a',\n '--kui-color-on-secondary-fixed-variant': '#1a1a1a',\n '--kui-color-on-spotlight': '#ffffff',\n '--kui-color-on-spotlight-button': '#1a1a1a',\n '--kui-color-on-spotlight-muted': 'rgba(255, 255, 255, 0.8)',\n '--kui-color-on-surface': '#1a1a1a',\n '--kui-color-on-surface-variant': '#5c5c5c',\n '--kui-color-on-tertiary': '#1a1a1a',\n '--kui-color-on-tertiary-container': '#1a1a1a',\n '--kui-color-on-tertiary-fixed': '#1a1a1a',\n '--kui-color-on-tertiary-fixed-variant': '#1a1a1a',\n '--kui-color-outline': '#8a8a8a',\n '--kui-color-outline-variant': '#e3e3e3',\n '--kui-color-paper': '#fafafa',\n '--kui-color-positive': '#1e6b35',\n '--kui-color-positive-container': '#ddf2e2',\n '--kui-color-positive-soft': '#ddf2e2',\n '--kui-color-primary': '#1a1a1a',\n '--kui-color-primary-container': '#e9e9e9',\n '--kui-color-primary-fixed': '#e9e9e9',\n '--kui-color-primary-fixed-dim': '#e9e9e9',\n '--kui-color-scrim': 'rgba(0, 0, 0, 0.4)',\n '--kui-color-secondary': '#1a1a1a',\n '--kui-color-secondary-container': '#e9e9e9',\n '--kui-color-secondary-fixed': '#e9e9e9',\n '--kui-color-secondary-fixed-dim': '#e9e9e9',\n '--kui-color-shadow': '#000000',\n '--kui-color-spotlight': '#1a1a1a',\n '--kui-color-spotlight-button': '#fafafa',\n '--kui-color-spotlight-line': 'rgba(255, 255, 255, 0.6)',\n '--kui-color-spotlight-tonal': 'rgba(255, 255, 255, 0.16)',\n '--kui-color-surface': '#fafafa',\n '--kui-color-surface-bright': '#ffffff',\n '--kui-color-surface-container': '#ffffff',\n '--kui-color-surface-container-high': '#ffffff',\n '--kui-color-surface-container-highest': '#f0f0f0',\n '--kui-color-surface-container-low': '#ffffff',\n '--kui-color-surface-container-lowest': '#ffffff',\n '--kui-color-surface-dim': '#fafafa',\n '--kui-color-surface-sunken': '#f0f0f0',\n '--kui-color-surface-tint': '#1a1a1a',\n '--kui-color-surface-variant': '#f0f0f0',\n '--kui-color-tertiary': '#e9e9e9',\n '--kui-color-tertiary-container': '#e9e9e9',\n '--kui-color-tertiary-fixed': '#e9e9e9',\n '--kui-color-tertiary-fixed-dim': '#e9e9e9',\n '--kui-motion-duration-long1': '450ms',\n '--kui-motion-duration-long2': '500ms',\n '--kui-motion-duration-long3': '600ms',\n '--kui-motion-duration-medium1': '250ms',\n '--kui-motion-duration-medium2': '300ms',\n '--kui-motion-duration-medium3': '350ms',\n '--kui-motion-duration-short1': '100ms',\n '--kui-motion-duration-short2': '150ms',\n '--kui-motion-duration-short3': '200ms',\n '--kui-motion-easing-emphasized': 'cubic-bezier(0.2, 0, 0, 1)',\n '--kui-motion-easing-emphasized-accelerate':\n 'cubic-bezier(0.3, 0, 0.8, 0.15)',\n '--kui-motion-easing-emphasized-decelerate':\n 'cubic-bezier(0.05, 0.7, 0.1, 1)',\n '--kui-motion-easing-spring-fast': 'cubic-bezier(0.34, 1.56, 0.64, 1)',\n '--kui-motion-easing-spring-slow': 'cubic-bezier(0.16, 1, 0.3, 1)',\n '--kui-motion-easing-standard': 'cubic-bezier(0.2, 0, 0, 1)',\n '--kui-radius-circle': '9999px',\n '--kui-radius-kanso-2xl': '24px',\n '--kui-radius-kanso-3xl': '28px',\n '--kui-radius-kanso-lg': '16px',\n '--kui-radius-kanso-md': '12px',\n '--kui-radius-kanso-pill': '999px',\n '--kui-radius-kanso-sm': '8px',\n '--kui-radius-kanso-xl': '20px',\n '--kui-radius-kanso-xs': '4px',\n '--kui-radius-lg': '16px',\n '--kui-radius-md': '12px',\n '--kui-radius-none': '0px',\n '--kui-radius-pill': '9999px',\n '--kui-radius-sm': '8px',\n '--kui-radius-xl': '28px',\n '--kui-radius-xs': '4px',\n '--kui-shadow-elevation1':\n '0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 2px 8px 0px rgba(0, 0, 0, 0.04)',\n '--kui-shadow-elevation2':\n '0px 2px 6px 0px rgba(0, 0, 0, 0.08), 0px 8px 20px 0px rgba(0, 0, 0, 0.1)',\n '--kui-shadow-elevation3':\n '0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14)',\n '--kui-shadow-elevation4':\n '0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14)',\n '--kui-shadow-elevation5':\n '0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14)',\n '--kui-shadow-kanso-1':\n '0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 2px 8px 0px rgba(0, 0, 0, 0.04)',\n '--kui-shadow-kanso-2':\n '0px 2px 6px 0px rgba(0, 0, 0, 0.08), 0px 8px 20px 0px rgba(0, 0, 0, 0.1)',\n '--kui-shadow-kanso-3':\n '0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 24px 56px 0px rgba(0, 0, 0, 0.14)',\n '--kui-sizing-control-lg': '56px',\n '--kui-sizing-control-md': '48px',\n '--kui-sizing-control-sm': '40px',\n '--kui-sizing-control-xl': '96px',\n '--kui-sizing-control-xs': '32px',\n '--kui-sizing-control-xxl': '136px',\n '--kui-sizing-icon-lg': '24px',\n '--kui-sizing-icon-md': '20px',\n '--kui-sizing-icon-sm': '18px',\n '--kui-sizing-icon-xl': '40px',\n '--kui-sizing-icon-xs': '16px',\n '--kui-sizing-kanso-avatar-lg': '56px',\n '--kui-sizing-kanso-avatar-md': '36px',\n '--kui-sizing-kanso-avatar-sm': '28px',\n '--kui-sizing-kanso-control-lg': '48px',\n '--kui-sizing-kanso-control-md': '40px',\n '--kui-sizing-kanso-control-sm': '32px',\n '--kui-sizing-kanso-control-xl': '56px',\n '--kui-sizing-kanso-icon-lg': '24px',\n '--kui-sizing-kanso-icon-md': '20px',\n '--kui-sizing-kanso-icon-sm': '16px',\n '--kui-sizing-kanso-icon-xl': '40px',\n '--kui-sizing-kanso-row': '60px',\n '--kui-sizing-kanso-row-compact': '44px',\n '--kui-sizing-row-lg': '88px',\n '--kui-sizing-row-md': '72px',\n '--kui-sizing-row-sm': '56px',\n '--kui-sizing-row-xs': '48px',\n '--kui-spacing-kanso-2xl': '24px',\n '--kui-spacing-kanso-2xs': '2px',\n '--kui-spacing-kanso-3xl': '32px',\n '--kui-spacing-kanso-4xl': '40px',\n '--kui-spacing-kanso-5xl': '56px',\n '--kui-spacing-kanso-lg': '16px',\n '--kui-spacing-kanso-md': '12px',\n '--kui-spacing-kanso-sm': '8px',\n '--kui-spacing-kanso-xl': '20px',\n '--kui-spacing-kanso-xs': '4px',\n '--kui-spacing-lg': '16px',\n '--kui-spacing-lg-plus': '20px',\n '--kui-spacing-md': '12px',\n '--kui-spacing-sm': '8px',\n '--kui-spacing-xl': '24px',\n '--kui-spacing-xs': '4px',\n '--kui-spacing-xs-plus': '6px',\n '--kui-spacing-xxl': '32px',\n '--kui-spacing-xxs': '2px',\n '--kui-spacing-xxxl': '40px',\n '--kui-state-layer-opacity-disabled-container': '0.12',\n '--kui-state-layer-opacity-disabled-content': '0.38',\n '--kui-state-layer-opacity-dragged': '0.16',\n '--kui-state-layer-opacity-focus': '0.1',\n '--kui-state-layer-opacity-hover': '0.08',\n '--kui-state-layer-opacity-kanso-disabled-container': '0.12',\n '--kui-state-layer-opacity-kanso-disabled-content': '0.38',\n '--kui-state-layer-opacity-kanso-focus': '0.1',\n '--kui-state-layer-opacity-kanso-hover': '0.08',\n '--kui-state-layer-opacity-kanso-pressed': '0.12',\n '--kui-state-layer-opacity-pressed': '0.1',\n '--kui-typography-body-large-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-body-large-line-height': '24px',\n '--kui-typography-body-large-size': '16px',\n '--kui-typography-body-large-tracking': '0.5px',\n '--kui-typography-body-large-weight':\n 'var(--kui-typography-weight-regular, 400)',\n '--kui-typography-body-medium-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-body-medium-line-height': '20px',\n '--kui-typography-body-medium-size': '14px',\n '--kui-typography-body-medium-tracking': '0.25px',\n '--kui-typography-body-medium-weight':\n 'var(--kui-typography-weight-regular, 400)',\n '--kui-typography-body-small-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-body-small-line-height': '16px',\n '--kui-typography-body-small-size': '12px',\n '--kui-typography-body-small-tracking': '0.4px',\n '--kui-typography-body-small-weight':\n 'var(--kui-typography-weight-regular, 400)',\n '--kui-typography-display-large-font':\n \"var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-display-large-line-height': '64px',\n '--kui-typography-display-large-size': '57px',\n '--kui-typography-display-large-tracking': '-0.25px',\n '--kui-typography-display-large-weight':\n 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-display-medium-font':\n \"var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-display-medium-line-height': '52px',\n '--kui-typography-display-medium-size': '45px',\n '--kui-typography-display-medium-tracking': '0px',\n '--kui-typography-display-medium-weight':\n 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-display-small-font':\n \"var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-display-small-line-height': '44px',\n '--kui-typography-display-small-size': '36px',\n '--kui-typography-display-small-tracking': '0px',\n '--kui-typography-display-small-weight':\n 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-font-family-brand':\n \"'Roboto Serif', 'Iowan Old Style', Georgia, serif\",\n '--kui-typography-font-family-mono':\n \"'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace\",\n '--kui-typography-font-family-plain':\n \"'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif\",\n '--kui-typography-font-family-voice':\n \"'Roboto Serif', 'Iowan Old Style', Georgia, serif\",\n '--kui-typography-headline-large-font':\n \"var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-headline-large-line-height': '40px',\n '--kui-typography-headline-large-size': '32px',\n '--kui-typography-headline-large-tracking': '0px',\n '--kui-typography-headline-large-weight':\n 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-headline-medium-font':\n \"var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-headline-medium-line-height': '36px',\n '--kui-typography-headline-medium-size': '28px',\n '--kui-typography-headline-medium-tracking': '0px',\n '--kui-typography-headline-medium-weight':\n 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-headline-small-font':\n \"var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-headline-small-line-height': '32px',\n '--kui-typography-headline-small-size': '24px',\n '--kui-typography-headline-small-tracking': '0px',\n '--kui-typography-headline-small-weight':\n 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-label-large-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-label-large-line-height': '20px',\n '--kui-typography-label-large-size': '14px',\n '--kui-typography-label-large-tracking': '0.1px',\n '--kui-typography-label-large-weight':\n 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-label-medium-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-label-medium-line-height': '16px',\n '--kui-typography-label-medium-size': '12px',\n '--kui-typography-label-medium-tracking': '0.5px',\n '--kui-typography-label-medium-weight':\n 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-label-small-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-label-small-line-height': '16px',\n '--kui-typography-label-small-size': '11px',\n '--kui-typography-label-small-tracking': '0.5px',\n '--kui-typography-label-small-weight':\n 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-t-body-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-t-body-large-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-t-body-large-line-height': '26px',\n '--kui-typography-t-body-large-size': '17px',\n '--kui-typography-t-body-large-tracking': '0px',\n '--kui-typography-t-body-large-weight':\n 'var(--kui-typography-weight-regular, 400)',\n '--kui-typography-t-body-line-height': '20px',\n '--kui-typography-t-body-size': '15px',\n '--kui-typography-t-body-small-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-t-body-small-line-height': '20px',\n '--kui-typography-t-body-small-size': '14px',\n '--kui-typography-t-body-small-tracking': '0px',\n '--kui-typography-t-body-small-weight':\n 'var(--kui-typography-weight-regular, 400)',\n '--kui-typography-t-body-strong-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-t-body-strong-line-height': '22px',\n '--kui-typography-t-body-strong-size': '16px',\n '--kui-typography-t-body-strong-tracking': '0px',\n '--kui-typography-t-body-strong-weight':\n 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-t-body-tracking': '0px',\n '--kui-typography-t-body-weight': 'var(--kui-typography-weight-regular, 400)',\n '--kui-typography-t-caption-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-t-caption-line-height': '16px',\n '--kui-typography-t-caption-size': '12px',\n '--kui-typography-t-caption-tracking': '0px',\n '--kui-typography-t-caption-weight':\n 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-t-display-font':\n \"var(--kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-t-display-line-height': '52px',\n '--kui-typography-t-display-size': '44px',\n '--kui-typography-t-display-tracking': '-0.66px',\n '--kui-typography-t-display-weight':\n 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-t-figure-font':\n \"var(--kui-typography-font-family-mono, 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace)\",\n '--kui-typography-t-figure-large-font':\n \"var(--kui-typography-font-family-mono, 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace)\",\n '--kui-typography-t-figure-large-line-height': '30px',\n '--kui-typography-t-figure-large-size': '24px',\n '--kui-typography-t-figure-large-tracking': '0px',\n '--kui-typography-t-figure-large-weight':\n 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-t-figure-line-height': '20px',\n '--kui-typography-t-figure-size': '15px',\n '--kui-typography-t-figure-small-font':\n \"var(--kui-typography-font-family-mono, 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace)\",\n '--kui-typography-t-figure-small-line-height': '18px',\n '--kui-typography-t-figure-small-size': '13px',\n '--kui-typography-t-figure-small-tracking': '0px',\n '--kui-typography-t-figure-small-weight':\n 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-t-figure-tracking': '0px',\n '--kui-typography-t-figure-weight':\n 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-t-headline-font':\n \"var(--kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-t-headline-line-height': '40px',\n '--kui-typography-t-headline-size': '34px',\n '--kui-typography-t-headline-tracking': '-0.34px',\n '--kui-typography-t-headline-weight':\n 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-t-hero-font':\n \"var(--kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-t-hero-line-height': '58px',\n '--kui-typography-t-hero-size': '52px',\n '--kui-typography-t-hero-tracking': '-0.78px',\n '--kui-typography-t-hero-weight': 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-t-label-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-t-label-line-height': '18px',\n '--kui-typography-t-label-size': '13px',\n '--kui-typography-t-label-strong-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-t-label-strong-line-height': '20px',\n '--kui-typography-t-label-strong-size': '15px',\n '--kui-typography-t-label-strong-tracking': '0px',\n '--kui-typography-t-label-strong-weight':\n 'var(--kui-typography-weight-semibold, 600)',\n '--kui-typography-t-label-tracking': '0px',\n '--kui-typography-t-label-weight': 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-t-section-font':\n \"var(--kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-t-section-line-height': '28px',\n '--kui-typography-t-section-size': '22px',\n '--kui-typography-t-section-tracking': '0px',\n '--kui-typography-t-section-weight':\n 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-t-title-font':\n \"var(--kui-typography-font-family-voice, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-t-title-line-height': '38px',\n '--kui-typography-t-title-size': '32px',\n '--kui-typography-t-title-tracking': '0px',\n '--kui-typography-t-title-weight': 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-title-large-font':\n \"var(--kui-typography-font-family-brand, 'Roboto Serif', 'Iowan Old Style', Georgia, serif)\",\n '--kui-typography-title-large-line-height': '28px',\n '--kui-typography-title-large-size': '22px',\n '--kui-typography-title-large-tracking': '0px',\n '--kui-typography-title-large-weight':\n 'var(--kui-typography-weight-light, 300)',\n '--kui-typography-title-medium-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-title-medium-line-height': '24px',\n '--kui-typography-title-medium-size': '16px',\n '--kui-typography-title-medium-tracking': '0.15px',\n '--kui-typography-title-medium-weight':\n 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-title-small-font':\n \"var(--kui-typography-font-family-plain, 'Roboto Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif)\",\n '--kui-typography-title-small-line-height': '20px',\n '--kui-typography-title-small-size': '14px',\n '--kui-typography-title-small-tracking': '0.1px',\n '--kui-typography-title-small-weight':\n 'var(--kui-typography-weight-medium, 500)',\n '--kui-typography-weight-bold': '700',\n '--kui-typography-weight-light': '300',\n '--kui-typography-weight-medium': '500',\n '--kui-typography-weight-regular': '400',\n '--kui-typography-weight-semibold': '600',\n}\n\n/**\n * Every property at its value in the dark scheme: the colours and shadows\n * `tokens.css` declares under `prefers-color-scheme: dark`, over every other\n * property at the one value it has in both.\n */\nconst dark: Required<KuiTheme> = {\n ...light,\n '--kui-color-accent': '#ececec',\n '--kui-color-accent-on-ink': '#121212',\n '--kui-color-accent-soft': '#2b2b2b',\n '--kui-color-background': '#121212',\n '--kui-color-caution': '#ffb870',\n '--kui-color-caution-soft': '#4a2a00',\n '--kui-color-caution-stripe': '#7a4600',\n '--kui-color-container': '#2b2b2b',\n '--kui-color-critical': '#f2b8b5',\n '--kui-color-critical-soft': '#4d1512',\n '--kui-color-divider': '#333333',\n '--kui-color-error': '#f2b8b5',\n '--kui-color-error-container': '#4d1512',\n '--kui-color-focus-ring': '#ececec',\n '--kui-color-ink': '#ececec',\n '--kui-color-ink-muted': '#b3b3b3',\n '--kui-color-inverse-error': '#b3261e',\n '--kui-color-inverse-on-surface': '#121212',\n '--kui-color-inverse-primary': '#121212',\n '--kui-color-inverse-surface': '#ececec',\n '--kui-color-kanso-surface': '#1c1c1c',\n '--kui-color-negative': '#ffb4a1',\n '--kui-color-negative-container': '#4a1a10',\n '--kui-color-negative-soft': '#4a1a10',\n '--kui-color-on-accent': '#121212',\n '--kui-color-on-accent-soft': '#ececec',\n '--kui-color-on-background': '#ececec',\n '--kui-color-on-caution-soft': '#ffddb3',\n '--kui-color-on-critical': '#601410',\n '--kui-color-on-critical-soft': '#ffdad6',\n '--kui-color-on-error': '#601410',\n '--kui-color-on-error-container': '#ffdad6',\n '--kui-color-on-ink': '#121212',\n '--kui-color-on-negative': '#121212',\n '--kui-color-on-negative-container': '#ffdad0',\n '--kui-color-on-negative-soft': '#ffdad0',\n '--kui-color-on-positive': '#121212',\n '--kui-color-on-positive-container': '#c6f2d2',\n '--kui-color-on-positive-soft': '#c6f2d2',\n '--kui-color-on-primary': '#121212',\n '--kui-color-on-primary-container': '#ececec',\n '--kui-color-on-primary-fixed': '#ececec',\n '--kui-color-on-primary-fixed-variant': '#ececec',\n '--kui-color-on-secondary': '#121212',\n '--kui-color-on-secondary-container': '#ececec',\n '--kui-color-on-secondary-fixed': '#ececec',\n '--kui-color-on-secondary-fixed-variant': '#ececec',\n '--kui-color-on-surface': '#ececec',\n '--kui-color-on-surface-variant': '#b3b3b3',\n '--kui-color-on-tertiary': '#ececec',\n '--kui-color-on-tertiary-container': '#ececec',\n '--kui-color-on-tertiary-fixed': '#ececec',\n '--kui-color-on-tertiary-fixed-variant': '#ececec',\n '--kui-color-outline': '#8c8c8c',\n '--kui-color-outline-variant': '#333333',\n '--kui-color-paper': '#121212',\n '--kui-color-positive': '#7bd99a',\n '--kui-color-positive-container': '#123a20',\n '--kui-color-positive-soft': '#123a20',\n '--kui-color-primary': '#ececec',\n '--kui-color-primary-container': '#2b2b2b',\n '--kui-color-primary-fixed': '#2b2b2b',\n '--kui-color-primary-fixed-dim': '#2b2b2b',\n '--kui-color-scrim': 'rgba(0, 0, 0, 0.6)',\n '--kui-color-secondary': '#ececec',\n '--kui-color-secondary-container': '#2b2b2b',\n '--kui-color-secondary-fixed': '#2b2b2b',\n '--kui-color-secondary-fixed-dim': '#2b2b2b',\n '--kui-color-spotlight': '#2b2b2b',\n '--kui-color-spotlight-button': '#ffffff',\n '--kui-color-spotlight-tonal': 'rgba(255, 255, 255, 0.14)',\n '--kui-color-surface': '#121212',\n '--kui-color-surface-bright': '#1c1c1c',\n '--kui-color-surface-container': '#1c1c1c',\n '--kui-color-surface-container-high': '#1c1c1c',\n '--kui-color-surface-container-highest': '#262626',\n '--kui-color-surface-container-low': '#1c1c1c',\n '--kui-color-surface-container-lowest': '#1c1c1c',\n '--kui-color-surface-dim': '#121212',\n '--kui-color-surface-sunken': '#262626',\n '--kui-color-surface-tint': '#ececec',\n '--kui-color-surface-variant': '#262626',\n '--kui-color-tertiary': '#2b2b2b',\n '--kui-color-tertiary-container': '#2b2b2b',\n '--kui-color-tertiary-fixed': '#2b2b2b',\n '--kui-color-tertiary-fixed-dim': '#2b2b2b',\n '--kui-shadow-elevation1': '0px 1px 2px 0px rgba(0, 0, 0, 0.5)',\n '--kui-shadow-elevation2': '0px 4px 16px 0px rgba(0, 0, 0, 0.6)',\n '--kui-shadow-elevation3': '0px 12px 40px 0px rgba(0, 0, 0, 0.7)',\n '--kui-shadow-elevation4': '0px 12px 40px 0px rgba(0, 0, 0, 0.7)',\n '--kui-shadow-elevation5': '0px 12px 40px 0px rgba(0, 0, 0, 0.7)',\n '--kui-shadow-kanso-1': '0px 1px 2px 0px rgba(0, 0, 0, 0.5)',\n '--kui-shadow-kanso-2': '0px 4px 16px 0px rgba(0, 0, 0, 0.6)',\n '--kui-shadow-kanso-3': '0px 12px 40px 0px rgba(0, 0, 0, 0.7)',\n}\n\n/**\n * The lower bound of each window size class, in px on the web and dp on\n * native, smallest first. A media query cannot read a custom property, so\n * neither library offers these as one to override, and `tokens.css` leaves\n * them out.\n */\nconst breakpoints = {\n compact: 0,\n medium: 600,\n expanded: 840,\n large: 1200,\n extraLarge: 1600,\n} as const\n\n/**\n * The roles a product brings its own colour for, in light and in dark: the\n * accent and the spotlight, each with what is drawn on it. The base fills them\n * from the neutrals, since Kanso's brand is ink and paper.\n */\nconst productRoles = [\n 'accent',\n 'onAccent',\n 'accentSoft',\n 'onAccentSoft',\n 'accentOnInk',\n 'spotlight',\n 'onSpotlight',\n 'onSpotlightMuted',\n 'spotlightButton',\n 'onSpotlightButton',\n 'spotlightTonal',\n 'spotlightLine',\n] as const\n\n/** A role a product sets: one of {@link productRoles}. */\ntype ProductRole = (typeof productRoles)[number]\n\n/**\n * Every colour that follows a product role, in each scheme, and the role it\n * follows, in the scheme it reads it from: `primary` and `focus-ring`\n * follow the accent, `on-primary` the on-accent, and so on. A product role\n * follows itself.\n */\nconst productFollowers: {\n readonly [Scheme in 'dark' | 'light']: Readonly<\n Partial<Record<keyof KuiTheme, readonly ['dark' | 'light', ProductRole]>>\n >\n} = {\n dark: {\n '--kui-color-accent': ['dark', 'accent'],\n '--kui-color-accent-on-ink': ['dark', 'accentOnInk'],\n '--kui-color-accent-soft': ['dark', 'accentSoft'],\n '--kui-color-focus-ring': ['dark', 'accent'],\n '--kui-color-inverse-primary': ['dark', 'accentOnInk'],\n '--kui-color-on-accent': ['dark', 'onAccent'],\n '--kui-color-on-accent-soft': ['dark', 'onAccentSoft'],\n '--kui-color-on-primary': ['dark', 'onAccent'],\n '--kui-color-on-primary-container': ['dark', 'onAccentSoft'],\n '--kui-color-on-primary-fixed': ['dark', 'onAccentSoft'],\n '--kui-color-on-primary-fixed-variant': ['dark', 'onAccentSoft'],\n '--kui-color-on-secondary-fixed': ['dark', 'onAccentSoft'],\n '--kui-color-on-secondary-fixed-variant': ['dark', 'onAccentSoft'],\n '--kui-color-on-spotlight': ['dark', 'onSpotlight'],\n '--kui-color-on-spotlight-button': ['dark', 'onSpotlightButton'],\n '--kui-color-on-spotlight-muted': ['dark', 'onSpotlightMuted'],\n '--kui-color-on-tertiary': ['dark', 'onAccentSoft'],\n '--kui-color-on-tertiary-container': ['dark', 'onAccentSoft'],\n '--kui-color-on-tertiary-fixed': ['dark', 'onAccentSoft'],\n '--kui-color-on-tertiary-fixed-variant': ['dark', 'onAccentSoft'],\n '--kui-color-primary': ['dark', 'accent'],\n '--kui-color-primary-container': ['dark', 'accentSoft'],\n '--kui-color-primary-fixed': ['dark', 'accentSoft'],\n '--kui-color-primary-fixed-dim': ['dark', 'accentSoft'],\n '--kui-color-secondary-fixed': ['dark', 'accentSoft'],\n '--kui-color-secondary-fixed-dim': ['dark', 'accentSoft'],\n '--kui-color-spotlight': ['dark', 'spotlight'],\n '--kui-color-spotlight-button': ['dark', 'spotlightButton'],\n '--kui-color-spotlight-line': ['dark', 'spotlightLine'],\n '--kui-color-spotlight-tonal': ['dark', 'spotlightTonal'],\n '--kui-color-surface-tint': ['dark', 'accent'],\n '--kui-color-tertiary': ['dark', 'accentSoft'],\n '--kui-color-tertiary-container': ['dark', 'accentSoft'],\n '--kui-color-tertiary-fixed': ['dark', 'accentSoft'],\n '--kui-color-tertiary-fixed-dim': ['dark', 'accentSoft'],\n },\n light: {\n '--kui-color-accent': ['light', 'accent'],\n '--kui-color-accent-on-ink': ['light', 'accentOnInk'],\n '--kui-color-accent-soft': ['light', 'accentSoft'],\n '--kui-color-focus-ring': ['light', 'accent'],\n '--kui-color-inverse-primary': ['light', 'accentOnInk'],\n '--kui-color-on-accent': ['light', 'onAccent'],\n '--kui-color-on-accent-soft': ['light', 'onAccentSoft'],\n '--kui-color-on-primary': ['light', 'onAccent'],\n '--kui-color-on-primary-container': ['light', 'onAccentSoft'],\n '--kui-color-on-primary-fixed': ['light', 'onAccentSoft'],\n '--kui-color-on-primary-fixed-variant': ['light', 'onAccentSoft'],\n '--kui-color-on-secondary-fixed': ['light', 'onAccentSoft'],\n '--kui-color-on-secondary-fixed-variant': ['light', 'onAccentSoft'],\n '--kui-color-on-spotlight': ['light', 'onSpotlight'],\n '--kui-color-on-spotlight-button': ['light', 'onSpotlightButton'],\n '--kui-color-on-spotlight-muted': ['light', 'onSpotlightMuted'],\n '--kui-color-on-tertiary': ['light', 'onAccentSoft'],\n '--kui-color-on-tertiary-container': ['light', 'onAccentSoft'],\n '--kui-color-on-tertiary-fixed': ['light', 'onAccentSoft'],\n '--kui-color-on-tertiary-fixed-variant': ['light', 'onAccentSoft'],\n '--kui-color-primary': ['light', 'accent'],\n '--kui-color-primary-container': ['light', 'accentSoft'],\n '--kui-color-primary-fixed': ['light', 'accentSoft'],\n '--kui-color-primary-fixed-dim': ['light', 'accentSoft'],\n '--kui-color-secondary-fixed': ['light', 'accentSoft'],\n '--kui-color-secondary-fixed-dim': ['light', 'accentSoft'],\n '--kui-color-spotlight': ['light', 'spotlight'],\n '--kui-color-spotlight-button': ['light', 'spotlightButton'],\n '--kui-color-spotlight-line': ['light', 'spotlightLine'],\n '--kui-color-spotlight-tonal': ['light', 'spotlightTonal'],\n '--kui-color-surface-tint': ['light', 'accent'],\n '--kui-color-tertiary': ['light', 'accentSoft'],\n '--kui-color-tertiary-container': ['light', 'accentSoft'],\n '--kui-color-tertiary-fixed': ['light', 'accentSoft'],\n '--kui-color-tertiary-fixed-dim': ['light', 'accentSoft'],\n },\n}\n\nexport { breakpoints, dark, light, productFollowers, productRoles }\nexport type { KuiTheme, ProductRole }\n","import type { KuiTheme, ProductRole } from './tokens/defaults.ts'\n\nimport {\n isColor,\n kansoPairs,\n ratioOf,\n rolePairs,\n tonalFill,\n} from './contrast.ts'\nimport {\n dark,\n light,\n productFollowers,\n productRoles,\n} from './tokens/defaults.ts'\n\n// A product's own colour. Kanso's brand is ink and paper with no colour of its\n// own, so the base fills the product roles from the neutrals, and a product\n// brings its own for them: the accent and the spotlight, each with what is\n// drawn on it, in light and in dark. The palette stays in the product's own\n// package as data; defineProductTheme turns it into the maps both libraries'\n// `ThemeScope` is to take, and refuses one that misses Kanso's contrast targets.\n// The spotlight's tonal fill may be left out: it is then worked out from the\n// spotlight and its content colour, as the demo schemes' is.\n\n/** A pair a product's colours draw below its target. */\ntype ContrastFailure = {\n /** The colour drawn, by its name without `--kui-color-`, such as `on-accent`. */\n readonly foreground: string\n /**\n * The colour the foreground is drawn on: `a over b` for a translucent `a`\n * painted on `b`, and `a at pressed` for `a` at the strength of Kanso's\n * pressed state layer, as a control's hover and pressed states are drawn.\n */\n readonly ground: string\n /** The ratio it is drawn at. */\n readonly ratio: number\n /** The scheme the pair is drawn in. */\n readonly scheme: Scheme\n /** WCAG 2's bar: 4.5 for text, 3 for everything else. */\n readonly target: number\n}\n\n/** The product role a palette may leave for defineProductTheme to work out. */\ntype OptionalRole = 'spotlightTonal'\n\n/**\n * One scheme's product colours: a `#rrggbb` or `rgba()` value for every role.\n * `spotlightTonal` may be left out, and is then as much of `onSpotlight` mixed\n * into `spotlight`, up to Kanso's 16%, as keeps `onSpotlight` at 4.5:1 on it\n * under the pressed state layer.\n */\ntype ProductColors = {\n readonly [Role in Exclude<ProductRole, OptionalRole>]: string\n} & { readonly [Role in OptionalRole]?: string }\n\n/** A product's colours in each scheme: what a product keeps as data. */\ntype ProductPalette = {\n readonly dark: ProductColors\n readonly light: ProductColors\n}\n\n/** A product's theme, as {@link defineProductTheme} builds it. */\ntype ProductTheme = {\n /**\n * Every colour that follows a product role, with the same properties in both\n * schemes, each at its value in that scheme. It lists a colour the product\n * leaves at its default too, so a scope declaring it replaces whatever\n * product is set around it rather than only the colours this one moves.\n */\n readonly changes: { readonly dark: KuiTheme; readonly light: KuiTheme }\n /** Every property at its value in the dark scheme, the product's colours in. */\n readonly dark: Required<KuiTheme>\n /** Every property at its value in the light scheme, the product's colours in. */\n readonly light: Required<KuiTheme>\n /** The palette the theme was built from. */\n readonly palette: ProductPalette\n}\n\n/** A colour scheme, as a product's palette and theme are keyed by it. */\ntype Scheme = 'dark' | 'light'\n\n/** Thrown by {@link defineProductTheme} for a palette below a contrast target. */\nclass ProductThemeError extends Error {\n /** Every pair below its target, in light and then in dark. */\n readonly failures: readonly ContrastFailure[]\n\n constructor(failures: readonly ContrastFailure[]) {\n super(\n [\n 'The product colours miss these contrast targets:',\n ...failures.map(\n ({ foreground, ground, ratio, scheme, target }) =>\n ` ${scheme}: ${foreground} on ${ground} at ${ratio.toFixed(2)}:1, below ${target}:1`,\n ),\n ].join('\\n'),\n )\n this.name = 'ProductThemeError'\n this.failures = failures\n }\n}\n\nconst DEFAULTS: Readonly<Record<Scheme, Required<KuiTheme>>> = { dark, light }\n\n/** A theme read by any property name, as the contrast pairs name them. */\nfunction read(map: KuiTheme): Readonly<Partial<Record<string, string>>> {\n return map\n}\nconst SCHEMES: readonly Scheme[] = ['light', 'dark']\n\n/**\n * Builds a product's theme from its colours: every colour that follows a\n * product role takes the product's value of it, `primary`, `focus-ring` and\n * the other Material Design roles that alias the accent included, and\n * everything else keeps its default.\n *\n * A palette that leaves out `spotlightTonal` has it worked out: as much of\n * `onSpotlight` mixed into `spotlight`, up to Kanso's 16%, as keeps\n * `onSpotlight` at 4.5:1 on it under the pressed state layer.\n *\n * The colours are held to Kanso's contrast targets, WCAG 2's 4.5:1 for text\n * and 3:1 for the rest, in both schemes, over the same pairs the base clears:\n * those Kanso's usage notes name and those both libraries draw. A palette\n * below one throws a {@link ProductThemeError} naming every pair; one missing\n * a scheme or a role, naming one it does not have, or holding a value that is not a\n * `#rrggbb` or `rgba()` colour throws a `TypeError`.\n *\n * Build it once, as a constant: both libraries' `ThemeScope` is to keep what\n * it resolves for each theme object it is handed.\n *\n * ```ts\n * const productTheme = defineProductTheme({ dark: { accent: '#cdb0f5', … }, light: { accent: '#6b3fa0', … } })\n *\n * <ThemeScope productTheme={productTheme}>…</ThemeScope>\n * ```\n */\nfunction defineProductTheme(palette: ProductPalette): ProductTheme {\n for (const scheme of SCHEMES) {\n const given: unknown = palette[scheme]\n if (typeof given !== 'object' || given === null) {\n throw new TypeError(`the palette has no ${scheme} colours`)\n }\n const colors: ReadonlyMap<string, unknown> = new Map(Object.entries(given))\n const roles: readonly string[] = productRoles\n const unknown = [...colors.keys()].filter((role) => !roles.includes(role))\n if (unknown.length > 0) {\n throw new TypeError(\n `${scheme} has no product role ${unknown.join(', ')}; the roles are ${roles.join(', ')}`,\n )\n }\n for (const role of productRoles) {\n if (role === 'spotlightTonal' && colors.get(role) === undefined) continue\n if (!isColor(colors.get(role))) {\n throw new TypeError(\n `${scheme}.${role} takes a #rrggbb or rgba() colour, not ${String(colors.get(role))}`,\n )\n }\n }\n }\n const filled = (scheme: Scheme): Required<ProductColors> => {\n const colors = palette[scheme]\n return {\n ...colors,\n spotlightTonal:\n colors.spotlightTonal ??\n tonalFill(\n colors.spotlight,\n colors.onSpotlight,\n Number(DEFAULTS[scheme]['--kui-state-layer-opacity-kanso-pressed']),\n ),\n }\n }\n const resolved = { dark: filled('dark'), light: filled('light') }\n const followed = (scheme: Scheme): Required<KuiTheme> => ({\n ...DEFAULTS[scheme],\n ...Object.fromEntries(\n Object.entries(productFollowers[scheme]).map(([property, from]) => [\n property,\n resolved[from[0]][from[1]],\n ]),\n ),\n })\n const maps = { dark: followed('dark'), light: followed('light') }\n const failures = SCHEMES.flatMap((scheme) =>\n [...kansoPairs, ...rolePairs].flatMap(([foreground, ground, target]) => {\n const ratio = ratioOf(maps[scheme], foreground, ground)\n return ratio < target\n ? [{ foreground, ground, ratio, scheme, target }]\n : []\n }),\n )\n if (failures.length > 0) throw new ProductThemeError(failures)\n // Every follower, not only those this palette moves: a product scope inside\n // another has to set each colour the outer one may have moved, or it keeps\n // the outer product's value wherever its own equals the default.\n const following = Object.keys(maps.light).filter((property) =>\n SCHEMES.some((scheme) => Object.hasOwn(productFollowers[scheme], property)),\n )\n const changesIn = (scheme: Scheme): KuiTheme =>\n Object.freeze(\n Object.fromEntries(\n following.map((property) => [property, read(maps[scheme])[property]]),\n ),\n )\n return Object.freeze({\n changes: Object.freeze({\n dark: changesIn('dark'),\n light: changesIn('light'),\n }),\n dark: Object.freeze(maps.dark),\n light: Object.freeze(maps.light),\n palette: Object.freeze({\n dark: Object.freeze({ ...palette.dark }),\n light: Object.freeze({ ...palette.light }),\n }),\n })\n}\n\nexport type {\n ContrastFailure,\n ProductColors,\n ProductPalette,\n ProductRole,\n Pro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rC,oCACE;CACF,2CAA2C;CAC3C,oCAAoC;CACpC,wCAAwC;CACxC,sCACE;CACF,qCACE;CACF,4CAA4C;CAC5C,qCAAqC;CACrC,yCAAyC;CACzC,uCACE;CACF,oCACE;CACF,2CAA2C;CAC3C,oCAAoC;CACpC,wCAAwC;CACxC,sCACE;CACF,uCACE;CACF,8CAA8C;CAC9C,uCAAuC;CACvC,2CAA2C;CAC3C,yCACE;CACF,wCACE;CACF,+CAA+C;CAC/C,wCAAwC;CACxC,4CAA4C;CAC5C,0CACE;CACF,uCACE;CACF,8CAA8C;CAC9C,uCAAuC;CACvC,2CAA2C;CAC3C,yCACE;CACF,sCACE;CACF,qCACE;CACF,sCACE;CACF,sCACE;CACF,wCACE;CACF,+CAA+C;CAC/C,wCAAwC;CACxC,4CAA4C;CAC5C,0CACE;CACF,yCACE;CACF,gDAAgD;CAChD,yCAAyC;CACzC,6CAA6C;CAC7C,2CACE;CACF,wCACE;CACF,+CAA+C;CAC/C,wCAAwC;CACxC,4CAA4C;CAC5C,0CACE;CACF,qCACE;CACF,4CAA4C;CAC5C,qCAAqC;CACrC,yCAAyC;CACzC,uCACE;CACF,sCACE;CACF,6CAA6C;CAC7C,sCAAsC;CACtC,0CAA0C;CAC1C,wCACE;CACF,qCACE;CACF,4CAA4C;CAC5C,qCAAqC;CACrC,yCAAyC;CACzC,uCACE;CACF,gCACE;CACF,sCACE;CACF,6CAA6C;CAC7C,sCAAsC;CACtC,0CAA0C;CAC1C,wCACE;CACF,uCAAuC;CACvC,gCAAgC;CAChC,sCACE;CACF,6CAA6C;CAC7C,sCAAsC;CACtC,0CAA0C;CAC1C,wCACE;CACF,uCACE;CACF,8CAA8C;CAC9C,uCAAuC;CACvC,2CAA2C;CAC3C,yCACE;CACF,oCAAoC;CACpC,kCAAkC;CAClC,mCACE;CACF,0CAA0C;CAC1C,mCAAmC;CACnC,uCAAuC;CACvC,qCACE;CACF,mCACE;CACF,0CAA0C;CAC1C,mCAAmC;CACnC,uCAAu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OAAO,KAAK,KAAK;EAC/B,SAAS,OAAO,OAAO;GACrB,MAAM,OAAO,OAAO,EAAE,GAAG,QAAQ,KAAK,CAAC;GACvC,OAAO,OAAO,OAAO,EAAE,GAAG,QAAQ,MAAM,CAAC;EAC3C,CAAC;CACH,CAAC;AACH"}
package/dist/themes.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { c as KuiTheme, i as ProductTheme } from "./product-theme-B_5X3tl7.js";
1
+ import { c as KuiTheme, i as ProductTheme } from "./product-theme-3Lr4V69h.js";
2
2
  type DemoTheme = {
3
3
  /** What the scheme is going for, in a sentence. */
4
4
  readonly description: string;
package/dist/themes.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as light, i as dark, n as defineProductTheme } from "./product-theme-BpaQ7tJd.js";
1
+ import { a as light, c as tonalFill, i as dark, n as defineProductTheme, s as statusShade } from "./product-theme-CUG5I7M_.js";
2
2
  // src/kanso-roles.ts
3
3
  /** Kanso colour → the Material Design role the base aliases to it. */
4
4
  const kansoFromRole = {
@@ -39,9 +39,19 @@ const kansoFromDefault = [
39
39
  "caution",
40
40
  "caution-soft",
41
41
  "caution-stripe",
42
- "on-caution-soft",
43
- "spotlight-tonal"
42
+ "on-caution-soft"
44
43
  ];
44
+ /**
45
+ * Kanso's status colours → the property a scheme states each as. One a scheme
46
+ * leaves out is the default's, shaded by statusShade in src/contrast.ts until
47
+ * it clears 4.55:1 as text on the scheme's paper and kanso-surface.
48
+ */
49
+ const statusFrom = {
50
+ caution: "caution",
51
+ critical: "error",
52
+ negative: "negative",
53
+ positive: "positive"
54
+ };
45
55
  // src/themes.ts
46
56
  const editorial = {
47
57
  description: "Ink on warm paper, set in a serif at a reading size, with tight radii and shadows that barely lift.",
@@ -206,7 +216,7 @@ const graphite = {
206
216
  "--kui-color-positive": "#5fc794",
207
217
  "--kui-color-positive-container": "#155138",
208
218
  "--kui-color-primary": "#9a9fff",
209
- "--kui-color-primary-container": "#33339b",
219
+ "--kui-color-primary-container": "#2f2f8f",
210
220
  "--kui-color-primary-fixed": "#e4e3ff",
211
221
  "--kui-color-primary-fixed-dim": "#c3c1ff",
212
222
  "--kui-color-scrim": "#000000",
@@ -378,7 +388,7 @@ const marquee = {
378
388
  "--kui-color-positive": "#7cc984",
379
389
  "--kui-color-positive-container": "#2c5a31",
380
390
  "--kui-color-primary": "#e5a00d",
381
- "--kui-color-primary-container": "#6b4a00",
391
+ "--kui-color-primary-container": "#573c00",
382
392
  "--kui-color-primary-fixed": "#ffdda0",
383
393
  "--kui-color-primary-fixed-dim": "#f0b63f",
384
394
  "--kui-color-scrim": "#000000",
@@ -765,12 +775,12 @@ const poster = {
765
775
  "--kui-color-outline-variant": "#c7b05a",
766
776
  "--kui-color-positive": "#026719",
767
777
  "--kui-color-positive-container": "#75e07c",
768
- "--kui-color-primary": "#b4002d",
778
+ "--kui-color-primary": "#a00028",
769
779
  "--kui-color-primary-container": "#feaaa9",
770
780
  "--kui-color-primary-fixed": "#fed2d0",
771
781
  "--kui-color-primary-fixed-dim": "#ff9f9f",
772
782
  "--kui-color-scrim": "#000000",
773
- "--kui-color-secondary": "#2850be",
783
+ "--kui-color-secondary": "#2549ad",
774
784
  "--kui-color-secondary-container": "#a8c4fe",
775
785
  "--kui-color-secondary-fixed": "#cfdeff",
776
786
  "--kui-color-secondary-fixed-dim": "#9ebdff",
@@ -783,7 +793,7 @@ const poster = {
783
793
  "--kui-color-surface-container-low": "#ffe687",
784
794
  "--kui-color-surface-container-lowest": "#fffae8",
785
795
  "--kui-color-surface-dim": "#f5d240",
786
- "--kui-color-surface-tint": "#b4002d",
796
+ "--kui-color-surface-tint": "#a00028",
787
797
  "--kui-color-surface-variant": "#f0d982",
788
798
  "--kui-color-tertiary": "#026719",
789
799
  "--kui-color-tertiary-container": "#75e07c",
@@ -1017,6 +1027,12 @@ function withKanso(scheme, theme) {
1017
1027
  ...kansoAsRole
1018
1028
  }).map(([kanso, from]) => [`--kui-color-${kanso}`, role(from)])),
1019
1029
  ...Object.fromEntries(kansoFromDefault.map((kanso) => [`--kui-color-${kanso}`, at(`--kui-color-${kanso}`)])),
1030
+ ...Object.fromEntries(Object.entries(statusFrom).flatMap(([kanso, from]) => {
1031
+ const property = `--kui-color-${from}`;
1032
+ if (stated[property] !== void 0) return [];
1033
+ return [[`--kui-color-${kanso}`, statusShade(at(property), [role(kansoFromRole.paper), role(kansoFromRole["kanso-surface"])])]];
1034
+ })),
1035
+ "--kui-color-spotlight-tonal": tonalFill(role(kansoAsRole.spotlight), role(kansoAsRole["on-spotlight"]), Number(at("--kui-state-layer-opacity-kanso-pressed"))),
1020
1036
  "--kui-shadow-kanso-1": shadow(1),
1021
1037
  "--kui-shadow-kanso-2": shadow(2),
1022
1038
  "--kui-shadow-kanso-3": shadow(3),
@@ -1047,8 +1063,7 @@ const demoProductThemes = { violet: {
1047
1063
  onSpotlightMuted: "rgba(255, 255, 255, 0.8)",
1048
1064
  spotlight: "#553186",
1049
1065
  spotlightButton: "#ffffff",
1050
- spotlightLine: "rgba(255, 255, 255, 0.6)",
1051
- spotlightTonal: "rgba(255, 255, 255, 0.14)"
1066
+ spotlightLine: "rgba(255, 255, 255, 0.6)"
1052
1067
  },
1053
1068
  light: {
1054
1069
  accent: "#6b3fa0",
@@ -1061,8 +1076,7 @@ const demoProductThemes = { violet: {
1061
1076
  onSpotlightMuted: "rgba(255, 255, 255, 0.8)",
1062
1077
  spotlight: "#6b3fa0",
1063
1078
  spotlightButton: "#fafafa",
1064
- spotlightLine: "rgba(255, 255, 255, 0.6)",
1065
- spotlightTonal: "rgba(255, 255, 255, 0.16)"
1079
+ spotlightLine: "rgba(255, 255, 255, 0.6)"
1066
1080
  }
1067
1081
  })
1068
1082
  } };