feat(a11y): add accessibility settings and theme improvements

Add comprehensive accessibility support across shared packages:
- A11y store with contrast, colorblind mode, and reduce motion settings
- A11yQuickToggles and A11ySettings UI components
- PillNavigation and PillDropdown components in shared-ui
- Calendar app updates to integrate new theme/a11y features

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Till-JS 2025-12-02 22:56:09 +01:00
parent 6cc9f70a4a
commit 02c82c7547
33 changed files with 1474 additions and 143 deletions

View file

@ -1,5 +1,6 @@
import type { ThemeColors, ThemeVariant, EffectiveMode, HSLValue } from './types';
import type { ThemeColors, ThemeVariant, EffectiveMode, HSLValue, A11ySettings } from './types';
import { THEME_DEFINITIONS, CSS_VAR_PREFIX } from './constants';
import { applyA11yTransformations, applyA11yAttributes } from './a11y-utils';
/**
* Check if code is running in browser
@ -90,12 +91,20 @@ export function colorsToCssVars(colors: ThemeColors): Record<string, string> {
export function applyThemeToDocument(
variant: ThemeVariant,
effectiveMode: EffectiveMode,
primaryOverride?: { light: HSLValue; dark: HSLValue }
primaryOverride?: { light: HSLValue; dark: HSLValue },
a11ySettings?: A11ySettings
): void {
if (!isBrowser()) return;
const root = document.documentElement;
const colors = getThemeColors(variant, effectiveMode, primaryOverride);
let colors = getThemeColors(variant, effectiveMode, primaryOverride);
// Apply A11y transformations if provided
if (a11ySettings) {
colors = applyA11yTransformations(colors, effectiveMode, a11ySettings);
applyA11yAttributes(a11ySettings);
}
const cssVars = colorsToCssVars(colors);
// Set CSS variables