@cognitap/radiant 0.0.5 → 0.0.7
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.
- package/CHANGELOG.md +68 -368
- package/README.md +41 -1006
- package/RELEASE_POLICY.md +3 -3
- package/dist/library/Accordion.d.ts +3 -0
- package/dist/library/Accordion.d.ts.map +1 -1
- package/dist/library/Accordion.js +1 -1
- package/dist/library/Accordion.js.map +1 -1
- package/dist/library/Button.d.ts +8 -1
- package/dist/library/Button.d.ts.map +1 -1
- package/dist/library/Button.js +44 -2
- package/dist/library/Button.js.map +1 -1
- package/dist/library/Card.d.ts +2 -0
- package/dist/library/Card.d.ts.map +1 -1
- package/dist/library/Card.js +1 -1
- package/dist/library/Card.js.map +1 -1
- package/dist/library/Checkbox.d.ts +5 -0
- package/dist/library/Checkbox.d.ts.map +1 -1
- package/dist/library/Checkbox.js +3 -2
- package/dist/library/Checkbox.js.map +1 -1
- package/dist/library/Collapsible.d.ts +6 -1
- package/dist/library/Collapsible.d.ts.map +1 -1
- package/dist/library/Collapsible.js +24 -3
- package/dist/library/Collapsible.js.map +1 -1
- package/dist/library/Dialog.d.ts +5 -1
- package/dist/library/Dialog.d.ts.map +1 -1
- package/dist/library/Dialog.js +5 -2
- package/dist/library/Dialog.js.map +1 -1
- package/dist/library/Field.d.ts +8 -0
- package/dist/library/Field.d.ts.map +1 -1
- package/dist/library/Field.js +2 -0
- package/dist/library/Field.js.map +1 -1
- package/dist/library/Input.d.ts +3 -0
- package/dist/library/Input.d.ts.map +1 -1
- package/dist/library/Input.js +1 -0
- package/dist/library/Input.js.map +1 -1
- package/dist/library/Link.d.ts +5 -0
- package/dist/library/Link.d.ts.map +1 -1
- package/dist/library/Link.js.map +1 -1
- package/dist/library/RadioGroup.d.ts +8 -0
- package/dist/library/RadioGroup.d.ts.map +1 -1
- package/dist/library/RadioGroup.js +4 -2
- package/dist/library/RadioGroup.js.map +1 -1
- package/dist/library/ThemeScope.d.ts.map +1 -1
- package/dist/library/ThemeScope.js +10 -9
- package/dist/library/ThemeScope.js.map +1 -1
- package/dist/library/examples/expressive.d.ts +4 -0
- package/dist/library/examples/expressive.d.ts.map +1 -0
- package/dist/library/{themes → examples}/expressive.js +4 -3
- package/dist/library/examples/expressive.js.map +1 -0
- package/dist/library/examples/glass.d.ts +4 -0
- package/dist/library/examples/glass.d.ts.map +1 -0
- package/dist/library/{themes → examples}/glass.js +4 -3
- package/dist/library/examples/glass.js.map +1 -0
- package/dist/library/examples/index.d.ts +13 -0
- package/dist/library/examples/index.d.ts.map +1 -0
- package/dist/library/examples/index.js +32 -0
- package/dist/library/examples/index.js.map +1 -0
- package/dist/library/examples/jelly.d.ts +4 -0
- package/dist/library/examples/jelly.d.ts.map +1 -0
- package/dist/library/{themes → examples}/jelly.js +4 -3
- package/dist/library/examples/jelly.js.map +1 -0
- package/dist/library/examples/preset-values.d.ts.map +1 -0
- package/dist/library/examples/preset-values.js.map +1 -0
- package/dist/library/examples/radiant.d.ts +4 -0
- package/dist/library/examples/radiant.d.ts.map +1 -0
- package/dist/library/{themes → examples}/radiant.js +4 -3
- package/dist/library/examples/radiant.js.map +1 -0
- package/dist/library/examples/sharp-3d.d.ts +4 -0
- package/dist/library/examples/sharp-3d.d.ts.map +1 -0
- package/dist/library/{themes → examples}/sharp-3d.js +4 -3
- package/dist/library/examples/sharp-3d.js.map +1 -0
- package/dist/library/examples/soft-squircle.d.ts +4 -0
- package/dist/library/examples/soft-squircle.d.ts.map +1 -0
- package/dist/library/{themes → examples}/soft-squircle.js +4 -3
- package/dist/library/examples/soft-squircle.js.map +1 -0
- package/dist/library/examples/ticket.d.ts +4 -0
- package/dist/library/examples/ticket.d.ts.map +1 -0
- package/dist/library/{themes → examples}/ticket.js +4 -3
- package/dist/library/examples/ticket.js.map +1 -0
- package/dist/library/index.d.ts +4 -2
- package/dist/library/index.d.ts.map +1 -1
- package/dist/library/index.js +2 -1
- package/dist/library/index.js.map +1 -1
- package/dist/library/motion/MotionLink.d.ts +8 -0
- package/dist/library/motion/MotionLink.d.ts.map +1 -0
- package/dist/library/motion/MotionLink.js +44 -0
- package/dist/library/motion/MotionLink.js.map +1 -0
- package/dist/library/motion/browser.d.ts +5 -0
- package/dist/library/motion/browser.d.ts.map +1 -0
- package/dist/library/motion/browser.js +35 -0
- package/dist/library/motion/browser.js.map +1 -0
- package/dist/library/motion/config.d.ts +26 -0
- package/dist/library/motion/config.d.ts.map +1 -0
- package/dist/library/motion/config.js +58 -0
- package/dist/library/motion/config.js.map +1 -0
- package/dist/library/motion/context.d.ts +2 -0
- package/dist/library/motion/context.d.ts.map +1 -0
- package/dist/library/motion/context.js +5 -0
- package/dist/library/motion/context.js.map +1 -0
- package/dist/library/motion/drag.d.ts +20 -0
- package/dist/library/motion/drag.d.ts.map +1 -0
- package/dist/library/motion/drag.js +138 -0
- package/dist/library/motion/drag.js.map +1 -0
- package/dist/library/motion/dragBrowser.d.ts +4 -0
- package/dist/library/motion/dragBrowser.d.ts.map +1 -0
- package/dist/library/motion/dragBrowser.js +156 -0
- package/dist/library/motion/dragBrowser.js.map +1 -0
- package/dist/library/motion/follow.d.ts +9 -0
- package/dist/library/motion/follow.d.ts.map +1 -0
- package/dist/library/motion/follow.js +26 -0
- package/dist/library/motion/follow.js.map +1 -0
- package/dist/library/motion/host.d.ts +30 -0
- package/dist/library/motion/host.d.ts.map +1 -0
- package/dist/library/motion/host.js +70 -0
- package/dist/library/motion/host.js.map +1 -0
- package/dist/library/motion/index.d.ts +16 -0
- package/dist/library/motion/index.d.ts.map +1 -0
- package/dist/library/motion/index.js +9 -0
- package/dist/library/motion/index.js.map +1 -0
- package/dist/library/motion/layout.d.ts +20 -0
- package/dist/library/motion/layout.d.ts.map +1 -0
- package/dist/library/motion/layout.js +67 -0
- package/dist/library/motion/layout.js.map +1 -0
- package/dist/library/motion/layoutDom.d.ts +17 -0
- package/dist/library/motion/layoutDom.d.ts.map +1 -0
- package/dist/library/motion/layoutDom.js +272 -0
- package/dist/library/motion/layoutDom.js.map +1 -0
- package/dist/library/motion/press.d.ts +5 -0
- package/dist/library/motion/press.d.ts.map +1 -0
- package/dist/library/motion/press.js +99 -0
- package/dist/library/motion/press.js.map +1 -0
- package/dist/library/motion/pressPolicy.d.ts +5 -0
- package/dist/library/motion/pressPolicy.d.ts.map +1 -0
- package/dist/library/motion/pressPolicy.js +8 -0
- package/dist/library/motion/pressPolicy.js.map +1 -0
- package/dist/library/motion/react.d.ts +35 -0
- package/dist/library/motion/react.d.ts.map +1 -0
- package/dist/library/motion/react.js +224 -0
- package/dist/library/motion/react.js.map +1 -0
- package/dist/library/motion/runtime.d.ts +22 -0
- package/dist/library/motion/runtime.d.ts.map +1 -0
- package/dist/library/motion/runtime.js +117 -0
- package/dist/library/motion/runtime.js.map +1 -0
- package/dist/library/motion/transitions.d.ts +5 -0
- package/dist/library/motion/transitions.d.ts.map +1 -0
- package/dist/library/motion/transitions.js +244 -0
- package/dist/library/motion/transitions.js.map +1 -0
- package/dist/library/styles.css +1 -1
- package/dist/library/themes/defineTheme.d.ts +3 -0
- package/dist/library/themes/defineTheme.d.ts.map +1 -1
- package/dist/library/themes/defineTheme.js +4 -2
- package/dist/library/themes/defineTheme.js.map +1 -1
- package/dist/library/themes/index.d.ts +2 -12
- package/dist/library/themes/index.d.ts.map +1 -1
- package/dist/library/themes/index.js +1 -19
- package/dist/library/themes/index.js.map +1 -1
- package/dist/library/themes/themeDocument.d.ts.map +1 -1
- package/dist/library/themes/themeDocument.js +11 -5
- package/dist/library/themes/themeDocument.js.map +1 -1
- package/dist/library/themes/themeDocumentTypes.d.ts +5 -1
- package/dist/library/themes/themeDocumentTypes.d.ts.map +1 -1
- package/dist/library/themes/themeDocumentTypes.js.map +1 -1
- package/docs/accessibility.md +76 -142
- package/docs/architecture.md +197 -0
- package/docs/motion.md +153 -0
- package/docs/theming.md +275 -882
- package/package.json +22 -7
- package/src/Accordion.tsx +4 -1
- package/src/Button.tsx +55 -1
- package/src/Card.tsx +3 -1
- package/src/Checkbox.tsx +7 -2
- package/src/Collapsible.tsx +38 -2
- package/src/Dialog.tsx +13 -1
- package/src/Field.tsx +8 -0
- package/src/Input.tsx +3 -0
- package/src/Link.tsx +5 -0
- package/src/RadioGroup.tsx +10 -2
- package/src/ThemeScope.tsx +21 -17
- package/src/{themes → examples}/expressive.ts +5 -3
- package/src/{themes → examples}/glass.ts +5 -3
- package/src/examples/index.ts +35 -0
- package/src/{themes → examples}/jelly.ts +5 -3
- package/src/{themes → examples}/radiant.ts +5 -3
- package/src/{themes → examples}/sharp-3d.ts +5 -3
- package/src/{themes → examples}/soft-squircle.ts +5 -3
- package/src/{themes → examples}/ticket.ts +5 -3
- package/src/index.ts +10 -13
- package/src/motion/MotionLink.tsx +69 -0
- package/src/motion/browser.ts +45 -0
- package/src/motion/config.ts +79 -0
- package/src/motion/context.ts +4 -0
- package/src/motion/drag.ts +151 -0
- package/src/motion/dragBrowser.ts +159 -0
- package/src/motion/follow.ts +28 -0
- package/src/motion/host.ts +96 -0
- package/src/motion/index.ts +28 -0
- package/src/motion/layout.ts +78 -0
- package/src/motion/layoutDom.ts +293 -0
- package/src/motion/press.ts +97 -0
- package/src/motion/pressPolicy.ts +14 -0
- package/src/motion/react.ts +272 -0
- package/src/motion/runtime.ts +122 -0
- package/src/motion/transitions.ts +237 -0
- package/src/themes/defineTheme.ts +10 -2
- package/src/themes/index.ts +2 -22
- package/src/themes/themeDocument.ts +14 -6
- package/src/themes/themeDocumentTypes.ts +12 -5
- package/dist/library/themes/expressive.d.ts +0 -2
- package/dist/library/themes/expressive.d.ts.map +0 -1
- package/dist/library/themes/expressive.js.map +0 -1
- package/dist/library/themes/glass.d.ts +0 -2
- package/dist/library/themes/glass.d.ts.map +0 -1
- package/dist/library/themes/glass.js.map +0 -1
- package/dist/library/themes/jelly.d.ts +0 -2
- package/dist/library/themes/jelly.d.ts.map +0 -1
- package/dist/library/themes/jelly.js.map +0 -1
- package/dist/library/themes/preset-values.d.ts.map +0 -1
- package/dist/library/themes/preset-values.js.map +0 -1
- package/dist/library/themes/radiant.d.ts +0 -2
- package/dist/library/themes/radiant.d.ts.map +0 -1
- package/dist/library/themes/radiant.js.map +0 -1
- package/dist/library/themes/sharp-3d.d.ts +0 -2
- package/dist/library/themes/sharp-3d.d.ts.map +0 -1
- package/dist/library/themes/sharp-3d.js.map +0 -1
- package/dist/library/themes/soft-squircle.d.ts +0 -2
- package/dist/library/themes/soft-squircle.d.ts.map +0 -1
- package/dist/library/themes/soft-squircle.js.map +0 -1
- package/dist/library/themes/ticket.d.ts +0 -2
- package/dist/library/themes/ticket.d.ts.map +0 -1
- package/dist/library/themes/ticket.js.map +0 -1
- package/docs/system.md +0 -238
- /package/dist/library/{themes → examples}/preset-values.d.ts +0 -0
- /package/dist/library/{themes → examples}/preset-values.js +0 -0
- /package/src/{themes → examples}/preset-values.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,400 +1,100 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
See the [release policy](RELEASE_POLICY.md)
|
|
3
|
+
One line per user-visible change. See the [release policy](RELEASE_POLICY.md)
|
|
4
|
+
for versioning. Use the JavaScript and CSS from the same version.
|
|
4
5
|
|
|
5
6
|
## Unreleased
|
|
6
7
|
|
|
7
|
-
## 0.0.
|
|
8
|
-
|
|
9
|
-
- Add responsive typography: Body/Headings/UI/Code assignments, 16 reusable
|
|
10
|
-
styles, independent prose/UI rhythm, font-aware starting points, responsive
|
|
11
|
-
local-container sizes, deliberate style overrides and weight warnings. Export
|
|
12
|
-
the pure `@cognitap/radiant/typography` entry and compile the normalized
|
|
13
|
-
`typography.typesetting` recipe through portable theme documents (DEV-163).
|
|
14
|
-
- **Breaking layout adoption (DEV-167):** production component text consumes UI
|
|
15
|
-
Body/Title/Label/Supporting roles. Inline/subtle links inherit surrounding
|
|
16
|
-
text. UI leading is explicit and selection/disclosure labels use label weight;
|
|
17
|
-
review wrapping/layouts. Control-size metrics and component/caller overrides
|
|
18
|
-
retain precedence. Baseline role aliases preserve earlier theme and preset
|
|
19
|
-
settings; see [component mapping and migration](docs/theming.md#component-roles-and-earlier-themes).
|
|
20
|
-
- Preserve available font axis ranges as portable metadata in full/selective
|
|
21
|
-
theme documents (DEV-168). `ThemeFontAxis` records tag/min/default/max; the
|
|
22
|
-
parser rejects malformed, duplicate and unbounded ranges. Axes describe file
|
|
23
|
-
capabilities; trial-only adjustments and local binary files are not exported.
|
|
24
|
-
Metadata never loads a font or changes compiled paint.
|
|
8
|
+
## 0.0.7
|
|
25
9
|
|
|
26
|
-
|
|
27
|
-
reject new recipe/axis keys. Applications own font files, licensing, loading and
|
|
28
|
-
script/fallback verification. Automated installed Chromium evidence covers both
|
|
29
|
-
CSS routes, modes/scopes, caller overrides, responsive roles and canonical forms;
|
|
30
|
-
it is not manual browser/AT or broad font/script certification. The public
|
|
31
|
-
workshop is promoted by the coordinated DEV-169 docs PR after registry integrity
|
|
32
|
-
is verified.
|
|
10
|
+
- Breaking: the example themes moved out of the core entry. Before, `import { jelly, themes } from '@cognitap/radiant'`. After, `import { jelly, themes } from '@cognitap/radiant/examples'`. `defaultTheme` stays in core, and `themeDefinitions` exposes each example's definition.
|
|
33
11
|
|
|
34
|
-
|
|
12
|
+
- Reconcile native disclosure changes made before hydration: local Collapsible state adopts once, while controlled disclosures and Accordion items restore their owner's value without a change request.
|
|
35
13
|
|
|
36
|
-
-
|
|
37
|
-
with Balanced defaults, separate vividness controls and materialised replay.
|
|
38
|
-
Semantic action fills now choose the nearby readable brand shade at 4.5:1
|
|
39
|
-
text and 3:1 surface boundaries; explicit semantic overrides stay authored.
|
|
14
|
+
- Align Card root minimum-width styling with its compound parts in narrow layouts.
|
|
40
15
|
|
|
41
|
-
|
|
42
|
-
color walls, semantic palettes and bounded appearance controls. Existing 0.0.3
|
|
43
|
-
components and themes require no migration. See `docs/theming.md` for the
|
|
44
|
-
document format, merge/replace rules, supported controls and installed CSS routes.
|
|
45
|
-
Output is opaque sRGB; Display P3 generation and font loading are not included.
|
|
46
|
-
Automated Chromium and installed-consumer checks do not establish manual
|
|
47
|
-
screen-reader, Safari/Firefox or stable-library readiness. The public workshop
|
|
48
|
-
is delivered independently by radiant-docs after it pins this registry release.
|
|
16
|
+
- Let Accordion roots shrink inside narrow grid and flex layouts, matching their Collapsible items.
|
|
49
17
|
|
|
50
|
-
-
|
|
51
|
-
spacing, density, radius, border, elevation and backdrop controls (DEV-155).
|
|
52
|
-
Preserve independent modes, unrelated settings and component exceptions;
|
|
53
|
-
compile ordinary theme documents through the existing runtime and CSS routes.
|
|
54
|
-
Add canonical workspace and installed-package appearance verification.
|
|
18
|
+
- Keep disclosure resize observation and inert cleanup current, preserve the native pre-hydration fallback, and honor motion off for height and markers.
|
|
55
19
|
|
|
56
|
-
-
|
|
57
|
-
`recommendColorPalette` preserves the exact source and full wall, supports
|
|
58
|
-
deliberate family/role overrides and reports unrounded contrast for named
|
|
59
|
-
pairs, including explicit inactive-control exceptions. Return existing color
|
|
60
|
-
and canvas token layers; inspect real component states using the canonical form.
|
|
20
|
+
- Bound Dialog visual exits to two seconds and 500 descendants, and skip nested dialogs and customized built-in elements.
|
|
61
21
|
|
|
62
|
-
-
|
|
63
|
-
the package root and a React-free `@cognitap/radiant/color` entry. It emits 16
|
|
64
|
-
hue families plus Brand and Neutral ramps, defaults to exact source anchoring
|
|
65
|
-
with reshaped neighbors, exposes bounded calibration controls and returns
|
|
66
|
-
immutable replayable inputs and theme-document-compatible color data. Add
|
|
67
|
-
reference/extreme-case coverage and a Storybook wall inspection story.
|
|
22
|
+
- Wrap long Radio labels within narrow layouts without shrinking the native indicator.
|
|
68
23
|
|
|
69
|
-
-
|
|
70
|
-
source/palette and portable font metadata, full/selective JSON exports,
|
|
71
|
-
explicit merge/replace/reset updates and compilation through the existing
|
|
72
|
-
`defineTheme`/`ThemeScope` contract. Exact brand anchoring is the default policy;
|
|
73
|
-
palette generation and semantic role selection follow separately. Existing
|
|
74
|
-
themes, component exceptions and scope behavior are preserved.
|
|
75
|
-
|
|
76
|
-
## 0.0.3
|
|
24
|
+
- Wrap long Checkbox labels within narrow layouts without shrinking the native indicator.
|
|
77
25
|
|
|
78
|
-
|
|
79
|
-
to component props, composition and theme interfaces are detailed below, with
|
|
80
|
-
migration guidance in `docs/system.md` and `docs/theming.md`. Version 0.0.3 is
|
|
81
|
-
explicitly selected for this experimental release. Automated installed-consumer
|
|
82
|
-
checks cover native/TanStack flows; actual VoiceOver verification is deferred
|
|
83
|
-
and is not claimed by this release.
|
|
26
|
+
- Release MotionLink springs on lost pointer capture or removed destinations while preserving native anchor navigation.
|
|
84
27
|
|
|
85
|
-
-
|
|
86
|
-
through an installed production archive (DEV-57), including hydration, native
|
|
87
|
-
keyboard/form/reset behavior and modal cleanup. Add an opt-in Cognitap
|
|
88
|
-
production checkpoint that preserves its registry pins and distinguishes the
|
|
89
|
-
historical Button-only package from unreleased archive evidence. Actual AT
|
|
90
|
-
verification remains explicitly pending; these checks do not publish a release.
|
|
28
|
+
- Keep Button presses tied to their active input, cancel unavailable motion cleanly, and honor theme motion off for CSS lift and shift.
|
|
91
29
|
|
|
92
|
-
|
|
93
|
-
compiled CSS and Tailwind, with both reset choices, across all eight presets
|
|
94
|
-
in light/dark. The required gate now retains versioned results and captures.
|
|
95
|
-
- Preserve complete CSS layer order in both compiled exports so consumer
|
|
96
|
-
bundling cannot put Preflight above component utilities. Action-shaped Links
|
|
97
|
-
explicitly remove native underlining without depending on a global reset.
|
|
98
|
-
- Let caller `hover:`/`active:` color utilities replace the shared action defaults,
|
|
99
|
-
while explicit disabled/busy backgrounds preserve paint guards.
|
|
30
|
+
## 0.0.6
|
|
100
31
|
|
|
101
|
-
-
|
|
102
|
-
|
|
103
|
-
|
|
32
|
+
- Add opt-in spring motion in `@cognitap/radiant/motion` and `/motion/react`, with serializable motion profiles in themes. Root imports stay free of the engine.
|
|
33
|
+
- Add `MotionProvider` for spring press feedback on Button and Dialog actions, disclosure height and Dialog presentation. Dismissal and focus stay immediate.
|
|
34
|
+
- Add `MotionLink` for spring feedback on action-shaped links.
|
|
35
|
+
- Add one-axis drag with release, snapping, cancellation and keyboard alternatives.
|
|
36
|
+
- Add `useSpringFollow` for changing targets and `useSpringLayout` for grid and flex resize and reorder.
|
|
37
|
+
- Motion follows live reduced-motion settings, `motion="off"` and the theme's motion profile. See [motion](docs/motion.md).
|
|
104
38
|
|
|
105
|
-
|
|
106
|
-
(DEV-47), including manual scenarios, WCAG 2.2 A/AA mapping and explicit gaps.
|
|
107
|
-
Browser runs now capture exact environment versions with their existing
|
|
108
|
-
result artifacts. This does not declare untested browser/screen-reader support.
|
|
109
|
-
|
|
110
|
-
- Add the concise Radiant system guide (DEV-133), shipped with the package and
|
|
111
|
-
linked from introductory, theming, Storybook and agent documentation. It covers
|
|
112
|
-
the current ten-family contract and points to canonical live recipes; the
|
|
113
|
-
original harmonisation sketches remain labelled as historical design evidence.
|
|
39
|
+
## 0.0.5
|
|
114
40
|
|
|
115
|
-
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
`--rad-*` styles. The old Radio gap shortcut moves to `components.radioGroup.gap`.
|
|
121
|
-
- Remove unused unprefixed Tailwind color/radius aliases and ambient
|
|
122
|
-
`--ease-spring`, `--ease-snap`, `--ease-settle` variables. Use prefixed roles
|
|
123
|
-
directly and define literal motion curves or application-owned variables.
|
|
124
|
-
See the [migration steps and cleanup inventory](docs/theming.md#migration-from-button-centred-themes).
|
|
125
|
-
Preset mode values, native composition and shared action styling are preserved.
|
|
126
|
-
Button/Link local styles now accept typed CSS custom properties directly.
|
|
41
|
+
- Add typography recipes (`typography.typesetting`): Body, Headings, UI and Code fonts, 16 text styles and separate prose and UI rhythms.
|
|
42
|
+
- Add the React-free `@cognitap/radiant/typography` entry with `generateTypography`.
|
|
43
|
+
- Add `data-rad-prose`, `data-rad-text` and `data-rad-type-container` HTML hooks.
|
|
44
|
+
- Add font axis ranges (`ThemeFontAxis`) to theme document font metadata.
|
|
45
|
+
- **Breaking:** component text now uses the UI typography roles. UI line heights are explicit, and checkbox, radio and disclosure labels use the label weight. Check wrapping in your layouts.
|
|
127
46
|
|
|
128
|
-
|
|
129
|
-
compatibility-export and ambient-token availability notes.
|
|
47
|
+
Old typography leaves still apply. To move a theme to roles:
|
|
130
48
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
children/pending markup, native attributes/ref and protected Dialog semantics.
|
|
138
|
-
Set presentation props on DialogTrigger/Close and forward to one native/custom
|
|
139
|
-
button; replace render→Button adapters, which would style and wrap children
|
|
140
|
-
twice. Null, text, arrays, fragments and direct non-button hosts are rejected.
|
|
141
|
-
`DialogRenderProps` exposes required, typed resolved presentation attributes.
|
|
142
|
-
- Both Dialog paths compose Button; guards run before the consumer once and
|
|
143
|
-
then uncancelled Dialog requests. Pending busy state and computed presentation attributes are protected;
|
|
144
|
-
composed actions retain both Button and Dialog part identities.
|
|
49
|
+
| Before | After |
|
|
50
|
+
| ---------------------------------- | ----------------------------- |
|
|
51
|
+
| `family`, `bodySize`, `bodyWeight` | `roles['ui-body']` |
|
|
52
|
+
| `smallSize` | `roles['ui-supporting'].size` |
|
|
53
|
+
| `headingSize`, `headingWeight` | `roles['ui-title']` |
|
|
54
|
+
| `labelWeight` | `roles['ui-label'].weight` |
|
|
145
55
|
|
|
146
|
-
|
|
147
|
-
compatible `ReactElement`; null, text, arrays, fragments and direct native
|
|
148
|
-
hosts other than anchors are rejected. Return your router element directly
|
|
149
|
-
and forward its resolved native props to one anchor. `LinkRenderProps` now
|
|
150
|
-
exposes the real anchor ref and required, typed resolved presentation attributes.
|
|
151
|
-
- Link protects its computed identity and presentation attributes from caller
|
|
152
|
-
overrides. Native handlers/attributes/ref and merged presentation reach
|
|
153
|
-
default and router anchors unchanged, including React callback-ref cleanup.
|
|
154
|
-
- Real Chromium checks cover Link click/Enter/Space, form behaviour, consumer
|
|
155
|
-
cancellation, router interception, modified/middle-click tabs, external
|
|
156
|
-
targets and downloads in Light/Dark. Storybook's router example now performs
|
|
157
|
-
visible navigation and verifies it under every theme/mode.
|
|
56
|
+
The old `family` and `letterSpacing` applied to all four roles, so set them on each role.
|
|
158
57
|
|
|
159
|
-
|
|
160
|
-
Link use `variant="solid|soft|outline|ghost"`, `tone="accent|neutral|warning|danger"`
|
|
161
|
-
and `controlSize="small|medium|large"`. Button defaults to solid/accent/medium;
|
|
162
|
-
Link defaults to inline/accent/medium and also retains subtle decoration.
|
|
163
|
-
Dialog actions inherit these props. `size`, `radius`, Link's `button` variant,
|
|
164
|
-
and the old colour-named variants/tones are removed. Replace `ButtonSize` with
|
|
165
|
-
`ControlSize`; remove `ButtonRadius` and use theme/local CSS. `ButtonVariant`
|
|
166
|
-
and `LinkVariant` reflect the new vocabulary; `Tone` is a shared export.
|
|
167
|
-
Selectors migrate from `data-size` to `data-control-size`, with `data-tone`
|
|
168
|
-
recording palette independently. See the README's action migration table.
|
|
169
|
-
- Soft actions support all four tones; unfilled action/text-link ink derives
|
|
170
|
-
from the selected palette and scope foreground. Neutral soft/outline/ghost
|
|
171
|
-
preserve the previous neutral palette. The private shared recipe retains
|
|
172
|
-
theme shape, motion, focus and elevation for both native buttons and anchors.
|
|
173
|
-
- Storybook controls and examples use the new API. Button's treatment/tone and
|
|
174
|
-
size comparisons verify matching Link presentation across every theme/mode;
|
|
175
|
-
inline/subtle links have a corresponding tone comparison.
|
|
58
|
+
## 0.0.4
|
|
176
59
|
|
|
177
|
-
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
Composite defaults remain initial snapshots; prop synchronisation/restoration
|
|
182
|
-
no longer emit semantic change requests. Ownership/type switches and supplying
|
|
183
|
-
a controlled value together with its default now throw a descriptive error;
|
|
184
|
-
remount with a new key for a new owner/type.
|
|
185
|
-
- An open Dialog now responds to changes in `modal` and preserves cleanup when
|
|
186
|
-
rendered in another document. Interactive/context modules retain individual
|
|
187
|
-
client boundaries; the package entry and pure modules remain server-safe.
|
|
188
|
-
- Storybook plays and axe now run as a required part of `pnpm check` and CI,
|
|
189
|
-
across every preset in Light and Dark. Native Chromium scenarios cover modal
|
|
190
|
-
keyboard/focus, cancellation, refs, StrictMode cleanup and hydration. CI saves
|
|
191
|
-
JUnit results and failure screenshots; see the verification guide.
|
|
192
|
-
- Field groups no longer emit unsupported `aria-required` on fieldsets. Native
|
|
193
|
-
radio `required` behavior is preserved. Disabled Field help/error text remains
|
|
194
|
-
readable while its controls and labels dim once.
|
|
195
|
-
- Dialog ignores a queued native close notification when the same element has
|
|
196
|
-
already reopened, preventing StrictMode effect cleanup from dismissing it.
|
|
197
|
-
- Storybook paints the real Canvas page background once instead of using a
|
|
198
|
-
pseudo-element, so accessibility checks resolve the same backdrop as viewers.
|
|
199
|
-
- DialogTrigger and DialogClose now compose Button by default, inheriting its
|
|
200
|
-
presentation options, theme effects, interaction states, and pending behavior.
|
|
201
|
-
The separate Dialog action style recipe is removed. Action slots now include
|
|
202
|
-
both identities (`button dialog-trigger` / `button dialog-close`); migrate
|
|
203
|
-
equality selectors to `[data-slot~="dialog-trigger"]` / `[data-slot~="dialog-close"]`.
|
|
204
|
-
DEV-119 subsequently migrates native render callbacks to resolved presentation.
|
|
205
|
-
- Dialog's default Storybook play compares its actual rendered actions against
|
|
206
|
-
Button. The theme comparison uses default Dialog composition rather than
|
|
207
|
-
manually opting into Button, exposing future drift at the default call site.
|
|
208
|
-
- A complete Storybook audit covers all 58 stories and 11 Docs pages across
|
|
209
|
-
eight themes in light and dark. Form controls have clearer outlines, Checkbox
|
|
210
|
-
keeps a box shape, and disabled checked/mixed marks remain visible, including
|
|
211
|
-
forced colors. Nested disclosure arrows follow their own open state and focus
|
|
212
|
-
rings follow the themed shape. Glass dialogs frost underlying content, and
|
|
213
|
-
Sharp 3D links retain readable hover text. Responsive examples and Docs frames
|
|
214
|
-
avoid clipping; Docs controls follow the selected palette and open dialogs no
|
|
215
|
-
longer scroll the page on load. Demo actions and navigation show useful results.
|
|
216
|
-
- Browser play checks guard disabled selection visibility/alignment and the
|
|
217
|
-
custom native Field input. These complement the theme comparison and now run
|
|
218
|
-
in the required browser matrix.
|
|
219
|
-
- Ticket checkboxes use a compact solid outline instead of inheriting the
|
|
220
|
-
scooped, dashed shape intended for larger controls and surfaces.
|
|
221
|
-
- Button-styled links share Button hover and pressed feedback while retaining
|
|
222
|
-
native anchor navigation. Disabled and pending buttons keep suppressing it.
|
|
223
|
-
- Checkbox check and mixed marks stay aligned with the native control when
|
|
224
|
-
an unlabelled checkbox is placed in a stretched grid or Field.
|
|
225
|
-
- Storybook has global **Theme** and **Mode** controls, backed by the public
|
|
226
|
-
preset registry and `ThemeScope`. Canvas and Docs share the selection.
|
|
227
|
-
Ordinary stories inherit it; one system comparison replaces repeated family
|
|
228
|
-
theme galleries. Stories use a shared default/state/composition/customisation
|
|
229
|
-
structure and public imports.
|
|
230
|
-
- **Breaking: shared theme system (DEV-44).** `defineTheme` now authors typed
|
|
231
|
-
semantic tokens, optional component overrides, and light/dark layers.
|
|
232
|
-
`ThemeScope` applies a theme and independent light/dark/system mode to a
|
|
233
|
-
subtree. The stylesheet supplies a provider-free neutral baseline; nested
|
|
234
|
-
named themes reset omitted tokens and effects. Components consume shared
|
|
235
|
-
roles instead of Button's overrides, and Button focus overrides are local.
|
|
236
|
-
- All eight presets have stable IDs and deliberate light/dark palettes. The
|
|
237
|
-
`themes` registry is readonly; individual presets are exported. Font loading
|
|
238
|
-
remains the application's responsibility, with system fallbacks supplied.
|
|
239
|
-
- Storybook theme frames use `ThemeScope`, keeping canvases, ghost text and
|
|
240
|
-
shadows in the same mode. Sharp 3D retains its explicit hard borders. The
|
|
241
|
-
Button comparison story checks its rendered canvases, palettes and shadows.
|
|
242
|
-
- **Migration:** replace `{ name, style }` themes with `defineTheme` and
|
|
243
|
-
`theme.style` wrappers with `ThemeScope`. `Theme.style`, `Theme.surface`, and
|
|
244
|
-
`radiantTheme` remain deprecated compatibility exports. Family theme helpers
|
|
245
|
-
remain available but emit `--rad-<family>-*` variables; direct old CSS
|
|
246
|
-
overrides must migrate. Shared primary/secondary/destructive roles become
|
|
247
|
-
accent/neutral/danger. `radio.gap` moves to `radioGroup.gap`; inert
|
|
248
|
-
`glowHover` is rejected by the new theme API. See the
|
|
249
|
-
[theming guide](docs/theming.md) for defaults and the complete migration.
|
|
60
|
+
- Add `ThemeDocument`: a versioned, JSON-portable theme format with section merge, replace and reset.
|
|
61
|
+
- Add `generateColorWall` in `@cognitap/radiant/color`: 18 palettes from one brand color, with Classic, Balanced and Expressive presets.
|
|
62
|
+
- Add `recommendColorPalette`: a working palette, light and dark color roles, and contrast checks.
|
|
63
|
+
- Add `updateThemeAppearance`: apply a palette with spacing, density, radius, border, elevation and backdrop settings.
|
|
250
64
|
|
|
251
|
-
|
|
252
|
-
migration above supersedes their token names and baseline measurements.
|
|
65
|
+
## 0.0.3
|
|
253
66
|
|
|
254
|
-
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
Submitting a form while the section was closed included the hidden field.
|
|
281
|
-
Reduced motion set `transition-property` to `none` on the panel and marker.
|
|
282
|
-
The Radiant surface was 384px wide in a 24rem frame, with an 8px radius.
|
|
283
|
-
The summary focus ring was a 2px solid outline, offset 2px. The Ticket
|
|
284
|
-
surface used the scooped corner. Screen reader checks were not run.
|
|
285
|
-
- `Collapsible` is a native `<details>` element. The summary toggles it, and
|
|
286
|
-
`open` is the browser's open state. Uncontrolled disclosures use
|
|
287
|
-
`defaultOpen`. Controlled disclosures use `open` and `onOpenChange`; if
|
|
288
|
-
`open` stays unchanged, the disclosure restores that value. A shared `name`
|
|
289
|
-
is the native exclusive group. Closed content stays mounted, so a field
|
|
290
|
-
inside it still submits with an ancestor form. The panel height and marker
|
|
291
|
-
animate for 200ms, and `prefers-reduced-motion` sets `transition-property`
|
|
292
|
-
to `none`. In Storybook on Chrome 155, Space and Enter toggled the summary
|
|
293
|
-
and left focus there. Tab reached a button in the content only while open;
|
|
294
|
-
while closed, Tab moved to the document body. Clicking the summary while
|
|
295
|
-
focus was inside the content closed the disclosure and moved focus to the
|
|
296
|
-
summary. Enter on a second disclosure with the same `name` opened it and
|
|
297
|
-
closed the first. Enter on a nested summary left the parent open. A
|
|
298
|
-
controlled disclosure followed `onOpenChange`. Submitting a form while the
|
|
299
|
-
disclosure was closed included the hidden field. The Radiant surface was
|
|
300
|
-
384px wide in a 24rem frame, with an 8px radius. The Ticket surface used the
|
|
301
|
-
scooped corner. The summary focus ring was a 2px solid outline, offset 2px.
|
|
302
|
-
Screen reader checks were not run.
|
|
303
|
-
- `Dialog` is a native `<dialog>`. `showModal()` supplies the modal layer, so
|
|
304
|
-
the component does not add a portal, a focus trap, or a body scroll lock.
|
|
305
|
-
Uncontrolled dialogs use `defaultOpen`. Controlled dialogs use `open` and
|
|
306
|
-
`onOpenChange`; if `open` stays true after the browser closes, the dialog
|
|
307
|
-
opens again. `closeOnBackdrop` and `closeOnEscape` default to true. A form
|
|
308
|
-
with `method="dialog"` closes it. The panel stays in its document, so an
|
|
309
|
-
ancestor form still owns its fields. `dialogTheme` maps typed settings to
|
|
310
|
-
`--dialog-*` variables, and the panel inherits the button radius and corner
|
|
311
|
-
shape. In Storybook on Chrome 155, the first focusable control was focused,
|
|
312
|
-
and an `autoFocus` field took focus instead. Shift+Tab wrapped from the first
|
|
313
|
-
control to the last. Tab from the last control focused the document body, and
|
|
314
|
-
the next Tab returned to the first control without focusing the trigger.
|
|
315
|
-
Escape closed the top dialog and restored the opener, including a nested
|
|
316
|
-
dialog and a dialog opened without a trigger. A backdrop click closed and
|
|
317
|
-
restored the trigger. Turning backdrop or Escape dismissal off left the
|
|
318
|
-
dialog open. Submitting `method="dialog"` closed it. A field inside the
|
|
319
|
-
dialog submitted with its ancestor form. A wheel and `scrollTo` still moved
|
|
320
|
-
the page behind the open dialog. The Radiant panel was 512px wide with an
|
|
321
|
-
8px radius, and the Ticket panel used the scooped corner. Screen reader
|
|
322
|
-
checks were not run.
|
|
323
|
-
- `RadioGroup` is a fieldset of native radios. Uncontrolled groups use
|
|
324
|
-
`defaultValue` and `form.reset()`. Controlled groups use `value` and
|
|
325
|
-
`onValueChange` or `onChange`. Each `Radio` keeps its own label. A disabled
|
|
326
|
-
choice stays in the group and is not selected. `radioTheme` maps typed
|
|
327
|
-
settings to `--radio-*` variables. The disk stays a circle instead of
|
|
328
|
-
inheriting the button corner shape. Arrow keys, focus entry, and focus exit
|
|
329
|
-
were checked in Storybook: Tab entered on the selected radio, ArrowDown and
|
|
330
|
-
ArrowUp skipped a disabled choice, and Tab left the group. Screen reader
|
|
331
|
-
checks were not run.
|
|
332
|
-
- `Checkbox` is a native checkbox. Uncontrolled boxes use `defaultChecked` and
|
|
333
|
-
`form.reset()`. Controlled boxes use `checked` and `onChange`. `indeterminate`
|
|
334
|
-
is a visual mixed state on the DOM property, not a submitted value. A `label`
|
|
335
|
-
wraps the input so the text toggles it, and a single-control Field supplies
|
|
336
|
-
the accessible name. `checkboxTheme` maps typed settings to `--checkbox-*`
|
|
337
|
-
variables. Space activation was checked in Storybook. Screen reader checks
|
|
338
|
-
were not run.
|
|
339
|
-
- `Input` is a native text field. Uncontrolled inputs use `defaultValue` and
|
|
340
|
-
`form.reset()`. Controlled inputs use `value` and `onChange`; `onBlur` stays
|
|
341
|
-
the native event. Inside Field it takes the label, description, and error
|
|
342
|
-
relationships. `inputTheme` maps typed settings to `--input-*` variables, which
|
|
343
|
-
fall back to the button metrics. The native `size` attribute stays the
|
|
344
|
-
character width. A plain form and a TanStack Form 1.33.5 reference (value,
|
|
345
|
-
change, blur, reset) were verified. TanStack Form is not a package dependency.
|
|
346
|
-
Keyboard, focus, and screen reader checks were not run.
|
|
347
|
-
- `Field` is the form anatomy for one control or a group. A host control receives
|
|
348
|
-
its label, description, and error relationships; component controls read them
|
|
349
|
-
with `useField()`. The consumer owns the error message. `fieldTheme` maps typed
|
|
350
|
-
settings to `--field-*` variables. Keyboard, focus, and screen reader checks
|
|
351
|
-
were not run. A native form submit was verified.
|
|
352
|
-
- `Link` joins the library: a native anchor for navigation with `inline`,
|
|
353
|
-
`subtle`, and `button` variants (the button form reuses Button's variants via
|
|
354
|
-
`tone`, `size`, and `radius`). `external` adds a safe target and rel when the
|
|
355
|
-
consumer has not set them. A `render` prop hands the anchor props to a router
|
|
356
|
-
adapter, keeping routers outside the core. `linkTheme` maps typed settings to
|
|
357
|
-
`--link-*` variables, and links share the button focus variables and the shared
|
|
358
|
-
themes. Keyboard, focus, and screen reader checks were not run for Link either.
|
|
359
|
-
- Themes moved to a shared `themes` export (with a `Theme` type), so future
|
|
360
|
-
components wear the same design systems. Button stories consume the registry.
|
|
361
|
-
- Button ships with a neutral baseline (sizes, type, an ink-and-gray palette,
|
|
362
|
-
focus ring, quiet press). Every value is a CSS variable, and Storybook shows
|
|
363
|
-
the baseline next to fully themed variants, including the pine Radiant theme.
|
|
364
|
-
- Button's shape, size, type, elevation, state colors, and motion are CSS
|
|
365
|
-
variables. Press and release take separate durations and easings, and the
|
|
366
|
-
radius and `corner-shape` can change on press. `buttonTheme` maps typed settings
|
|
367
|
-
to those variables. Button sets `data-slot`, `data-variant`, and `data-size`.
|
|
368
|
-
- `--ease-spring`, `--ease-snap`, and `--ease-settle` are new easing tokens.
|
|
369
|
-
- Migration: `--color-primary-hover` and `--color-primary-active` are removed.
|
|
370
|
-
Hover and press colors are derived from `--color-primary`. Tune them with
|
|
371
|
-
`--button-hover-layer` and `--button-press-layer`. `--color-disabled` and
|
|
372
|
-
`--color-disabled-foreground` are removed. A disabled button fades to
|
|
373
|
-
`--button-disabled-opacity` when a theme sets it.
|
|
374
|
-
- Button adds `variant` (primary, secondary, warning, destructive, outline,
|
|
375
|
-
ghost), `size` (small, default, large), `radius` (none, small, default, large,
|
|
376
|
-
full), `iconOnly`, and `fullWidth`. New color tokens back each variant.
|
|
377
|
-
- `buttonTheme` adds `fontFamily`, `textTransform`, and `borderStyle`. Each DesignSystems theme
|
|
378
|
-
now sets a matching Google Font, loaded in Storybook. The
|
|
379
|
-
DesignSystems story replaces Midnight and Clay with Jelly (squircle pills,
|
|
380
|
-
deep squishy press, spring release) and Ticket (scooped corners, dashed border).
|
|
381
|
-
- `buttonTheme` adds `borderWidth`, `borderColor`, `pressShiftX`,
|
|
382
|
-
`ghostShadow`, and `ghostShadowPressed`. The
|
|
383
|
-
DesignSystems story adds a Sharp 3D theme with square corners, 2px borders,
|
|
384
|
-
and hard offset shadows.
|
|
385
|
-
- `class-variance-authority` 0.7.1 is a new runtime dependency.
|
|
386
|
-
- `pending` keeps the label's space, shows a spinner, and ignores activation.
|
|
387
|
-
It does not set `disabled`, so focus can stay on the button.
|
|
388
|
-
- Keyboard, focus, and screen reader checks were not run in this change.
|
|
389
|
-
Storybook has no interaction runner yet, and Button is not marked ready.
|
|
67
|
+
- Add Link, Field, Input, Checkbox, RadioGroup, Radio, Dialog, Collapsible, Accordion and Card, each built on the native element.
|
|
68
|
+
- Add `defineTheme` and `ThemeScope`: typed shared tokens, per-component overrides, and light, dark and system modes.
|
|
69
|
+
- Add eight presets in the readonly `themes` registry, each also a named export.
|
|
70
|
+
- Add Button `variant`, `tone`, `controlSize`, `pending`, `iconOnly`, `fullWidth` and `render`.
|
|
71
|
+
- Add `ThemeStyle` for typed `--rad-*` variables in `style`.
|
|
72
|
+
- `data-slot` holds a set of identities. Select with `~=`, as in `[data-slot~="button"]`.
|
|
73
|
+
- Passing a controlled value together with its default, or switching owner during a mount, throws.
|
|
74
|
+
- **Breaking:** CSS variables gain the `--rad-` prefix and semantic names.
|
|
75
|
+
|
|
76
|
+
```css
|
|
77
|
+
/* Before */
|
|
78
|
+
--color-primary: #166534;
|
|
79
|
+
/* After */
|
|
80
|
+
--rad-color-accent: #166534;
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
| Before | After |
|
|
84
|
+
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
85
|
+
| `--color-background` | `--rad-color-surface`; the page canvas is `--rad-surface-canvas` |
|
|
86
|
+
| `--color-foreground`, `--color-border`, `--color-focus` | `--rad-color-foreground`, `--rad-color-border`, `--rad-color-focus` |
|
|
87
|
+
| `--color-primary`, `--color-primary-foreground` | `--rad-color-accent`, `--rad-color-accent-foreground` |
|
|
88
|
+
| `--color-primary-hover`, `--color-primary-active` | Removed; hover and press colors derive from the accent |
|
|
89
|
+
| `--color-disabled`, `--color-disabled-foreground` | Removed; disabled controls use `--rad-color-disabled-*` and `--rad-state-disabled-opacity` |
|
|
90
|
+
| `--radius-control` | `--rad-control-radius` |
|
|
91
|
+
|
|
92
|
+
- **Breaking:** the Tailwind route no longer registers unprefixed aliases. Replace `bg-primary` with `bg-(--rad-color-accent)` and `rounded-control` with `rounded-(--rad-control-radius)`.
|
|
390
93
|
|
|
391
94
|
## 0.0.2
|
|
392
95
|
|
|
393
|
-
- Documentation and
|
|
394
|
-
dependency requirements are unchanged; no migration is needed.
|
|
395
|
-
- Still experimental, with a single native Button. Automated package checks do
|
|
396
|
-
not replace manual keyboard, focus and screen reader verification.
|
|
96
|
+
- Documentation and tooling cleanup. No API change.
|
|
397
97
|
|
|
398
98
|
## 0.0.1
|
|
399
99
|
|
|
400
|
-
-
|
|
100
|
+
- First public release.
|