Repository navigation
fix(Field): export FieldStatusPlacement from the package entry - #9368
Conversation
FieldStatusPlacement is the type of statusVariant on every field control and on useInputStatusIcon, but callers could not name it, so a wrapper could not type a statusVariant prop it forwards (public-component-api INV1). The Field barrel now exports it, which the package entry re-exports. The API report gains the one row; a type-level test imports it from the entry.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Field | 46.4 kB (0) · 8.3 kB CSS (0) | — | ✗ · ✓ · — |
| FieldLabel | 40.1 kB (0) · 5.9 kB CSS (0) | — | ✗ · ✓ · — |
| ComplexSelector | 59.6 kB (0) · 11.0 kB CSS (0) | — | — · — · — |
28 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| DateInput | 103.8 kB (0) · 15.1 kB CSS (0) | — | — · — · — |
| DateRangeInput | 73.1 kB (0) · 11.5 kB CSS (0) | — | — · — · — |
| DateTimeInput | 115.6 kB (0) · 15.6 kB CSS (0) | — | — · — · — |
| FileInput | 57.6 kB (0) · 10.7 kB CSS (0) | — | — · — · — |
| InputGroup | 47.0 kB (0) · 8.3 kB CSS (0) | — | — · — · — |
| MultiSelector | 76.6 kB (0) · 15.0 kB CSS (0) | — | — · — · — |
| NumberInput | 59.1 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| Pagination | 89.3 kB (0) · 15.8 kB CSS (0) | — | — · — · — |
| PowerSearch | 175.3 kB (0) · 20.3 kB CSS (0) | — | — · — · — |
| Selector | 80.7 kB (0) · 15.4 kB CSS (0) | — | — · — · — |
| TextArea | 51.7 kB (0) · 9.7 kB CSS (0) | — | — · — · — |
| TextInput | 56.8 kB (0) · 10.8 kB CSS (0) | — | — · — · — |
| TimeInput | 92.3 kB (0) · 14.1 kB CSS (0) | — | — · — · — |
| Tokenizer | 73.4 kB (0) · 16.9 kB CSS (0) | — | — · — · — |
| Typeahead | 66.3 kB (0) · 11.7 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 68.7 kB (0) · 773 B CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 69.2 kB (0) · 1.1 kB CSS (0) | — | — · — · — |
| lab/CommentComposer | 98.0 kB (0) · 1.9 kB CSS (0) | — | — · — · — |
| lab/Comments | 226.6 kB (0) · 2.5 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 221.9 kB (0) · 2.4 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 66.5 kB (0) · 722 B CSS (0) | — | — · — · — |
| lab/ListInput | 78.5 kB (0) · 1.6 kB CSS (0) | — | — · — · — |
| lab/MobilePowerSearch | 160.8 kB (0) · 1.2 kB CSS (0) | — | — · — · — |
| lab/MobileTokenizer | 96.4 kB (0) · 880 B CSS (0) | — | — · — · — |
| lab/TransferList | 70.6 kB (0) · 1.7 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 76.2 kB (0) · 1.9 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 273.2 kB (0) · 2.6 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 217.3 kB (0) · 454 B CSS (0) | — | — · — · — |
Visual changes: 2 snapshots in 1 component
A change is a question for the reviewer, not a failure.
| Component · story | Before | After | Diff |
|---|---|---|---|
| Field · Default (neutral, light) | ![]() |
![]() |
![]() |
| Field · Default (neutral, dark) | ![]() |
![]() |
![]() |
Package size: @astryxdesign/core 5.68 MB packed (+24 B); no new dependencies.
API changes: core +2 · ~0 · −0
2 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| + | core |
. · Types · type FieldStatusPlacement |
type FieldStatusPlacement = keyof FieldStatusVariantMap | 'tooltip' |
import type {FieldStatusPlacement} from '@astryxdesign/core' |
| + | core |
./Field · Also exported from an earlier entry point · FieldStatusPlacement |
FieldStatusPlacement (.) |
import {FieldStatusPlacement} from '@astryxdesign/core/Field' |
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
This looks ready to approve. FieldStatusPlacement can now be imported from @astryxdesign/core and @astryxdesign/core/Field, which the public API rule requires for a public prop's type. The new type test fails without the export and passes with it, and the committed API report rows match the build. Nothing else is needed from you.
[Automated review]






User impact
Teams that wrap a field control couldn't type the
statusVariantprop they forward.FieldStatusPlacement('attached' | 'detached' | 'tooltip') is the type ofstatusVarianton every field control and onuseInputStatusIcon, but no entry exported it. Now@astryxdesign/coreand@astryxdesign/core/Fieldexport it:Change
Field/index.tsexports the type, and the package entry re-exports the Field barrel.packages/core/api-report.mdgains the one expected row.[fix]Changeset.Current specification
architecture:public-component-apiINV1: a type a public component's props use is nameable from its entry. Specs & Decisions ruled this decided by INV1, so no record changes.Evidence
Field/fieldStatusPlacement.public.test.tsimports the type from the package entry and from the Field barrel, and checks it equals both'attached' | 'detached' | 'tooltip'andTextInputProps['statusVariant']. Without the export,tscfails with TS2305 on both imports.pnpm api:report --check --package coreandcheck:changesetsare clean.Scope