feat!: warm dark is the only theme; add DatePicker
Summary
1. feat!: Polarize warm dark is the only theme (BREAKING). Operator request: “use the warm dark theme only - no other themes.”
tokens.jsoncolorkeeps onlypolarize.light,dark,instrument,instrument-dark,fieldguideandfieldguide-darkare removed.design.css: bare:rootis warm dark. There is no light palette and noprefers-color-schemeswitch.data-theme="polarize"still matches, and any other stamp falls through to warm dark.- shadcn bridge: one block for
:root, .dark, :root[data-theme="polarize"]. Insrc/theme.css,dark:variants now always apply. - Docs-site theme toggle: hidden and inert.
isDark()always returns true andDocsThemeTogglerenders nothing. Both are kept with@deprecatedso existing imports still compile. - Storybook: the theme toolbar is removed and the manager UI is warm dark.
- The design-system artifact copy is regenerated.
dev_check.pynow fails if a second theme,color-scheme: lightorprefers-color-schemecomes back. - The light steps inside
epistemic.families,seriesanddivergingare kept. They are validated palette data, not a theme.
2. feat: DatePicker and Calendar (src/components/ui/date-picker.tsx)
- It uses the Radix Popover that
radix-uialready ships, so there is no new dependency. - The value is an ISO date string
YYYY-MM-DD, not a JSDate, so a time zone can’t shift the day. - Features: min/max, an
isDisabledpredicate, Monday or Sunday week start, ISO week numbers, a month-jump view, Today and clear buttons, and a hidden form input. - Full keyboard navigation.
- Stories are under General UI/Components/Date picker.
Migration (also in the commit’s BREAKING CHANGE footer)
- Nothing is needed to get warm dark.
- To keep a removed theme, pin v0.7.0.
- For the old fieldguide landing card look, set
--landing-radius: var(--radius-base); --landing-fill: var(--card);. - Read colours from
tokens.color.polarize. - ⚠ polarize.tech’s homepage used the fieldguide theme, so it will change look once it picks this up.
Testing
python3 dev_check.py: 475/475 pass. The count is lower than before because six themes’ contrast checks went away.npx tsc -p .: clean.- Storybook dev server plus Playwright: the date picker is verified by mouse, keyboard (arrow, Enter), clear, min/max and blocked days. The Landing story with a light OS setting renders warm dark.
storybook buildcould not run in the sandbox because the dataset host is unreachable. That is the environment, not this change.
Generated by Claude Code