feat!: add BorderedTextField; migrate fields to ControlPresentation#1039
Draft
pawelgrimm wants to merge 6 commits into
Draft
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove variant, BaseFieldVariantProps, supportsStartAndEndSlots, endSlot, endSlotPosition, and bordered chrome from BaseField; strip .bordered.* CSS rules; update all callers (password-field, bordered-text-field, select-field, text-field). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description
Follows up on #1037. Migrates the existing field components to compose
ControlPresentationand introduces a new public sibling,BorderedTextField, that replaces the outlined-label-inside layout previously offered by<TextField variant="bordered">.New public component
BorderedTextField— outlined text-field layout: the label sits inside a rounded chrome above the input; optionalendSlotrendered as a full-height side column. ComposesBaseField+OutlinedControlContainer(the private chrome primitive added in feat: add ControlPresentation primitive #1037). Sibling toTextField, not a variant of it.Field migrations
TextFielddropsvariantandendSlotPosition. Inline wrapper JSX is replaced with<ControlPresentation>. LocalhandleClickanduseMergeRefsare removed (CP/OCC handle click-to-focus).SelectFielddropsvariant. The absolutely-positioned chevron moves into CP'sendSlot.selectWrapperchrome CSS goes away — CP owns it.TextAreadropsvariant. Wraps the<textarea>inOutlinedControlContainerdirectly (not CP — multi-line layout doesn't fit CP's fixed 32px single-row chrome). Auto-expand grid trick stays scoped to TextArea.PasswordFieldunchanged in source but inherits theTextFieldrefactor automatically (no morevariant).BaseFieldscoped downvariant,BaseFieldVariantProps, thesupportsStartAndEndSlotsdiscriminated union,endSlot,endSlotPosition, and the bordered outer container rendering.aria-describedby/aria-invalid), optional label, character count state machine, message rendering, Stack layout,maxWidth/hidden.Breaking changes
feat!:— major version bump. Migration is mechanical:<TextField variant="bordered" .../>→<BorderedTextField .../>. DropstartSlot,endSlotPosition, andcharacterCountPosition="inline"if used — none of these are supported in the outlined layout. If you need a leading icon, useTextField(default). If you need a side action, useBorderedTextField'sendSlot(full-height).<TextField variant="default" .../>→ drop thevariantprop (no-op rename — default was always the default).<SelectField variant="bordered" .../>→ drop thevariant. NoBorderedSelectFieldis shipped (no demand surfaced).<TextArea variant="bordered" .../>→ drop thevariant. NoBorderedTextAreais shipped.BaseFielddirectly: dropvariant,supportsStartAndEndSlots,endSlot,endSlotPositionif used. Render slot rows viaControlPresentationinstead.What's not here
CheckboxField/SwitchFieldare unrelated chrome and are not touched.PR Checklist
endSlotPosition)