dimension composites: rebuild on TUI primitives - #84
Open
juliacanzani wants to merge 3 commits into
Open
Conversation
Picks up MultiCombobox (searchable multi-select — needed for the combo-box field migration's multiple+async case), Chip onRemove, and the Combobox aria-describedby/invalid/required forwarding fix. Compat: TUI 0.2.0's Button dropped the `iconSize` prop (icons size intrinsically now) — removed it from the base Button wrapper + its story. tsc error count unchanged from 0.1.x (422 pre-existing); rebuilt bundle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rebuild the dimension-family fields as composites of TUI primitives (TextInput
type=number + Select + IconButton), in the Field idiom. The Field label becomes
a group label on a role=group wrapper; each control gets its own aria-label.
Value contracts preserved exactly — verified live:
- simple-dimension { value, unit }
- dimensions { top, left, right, bottom, unit, isLinked }
- border { dimensions, color }
simple-dimension / dimensions are fully TUI now (native number spinners replace
the react-aria stepper field; link toggle -> IconButton system/link|unlink,
linked mode syncs all sides). Border gets its dimensions half for free (imports
the migrated Dimensions) + a TUI Field wrapper.
Note: border's **color** half is still the react-aria Color field — TUI has no
ColorPicker yet (the ColorArea primitive gap). Border finishes migrating when
Color does.
tsc unchanged (422; the initJSON(value, {defaults}) loose-typing warnings are
pre-existing, carried from the original). Rebuilt bundle.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a `min` prop to Dimensions/SimpleDimension, applied to the number inputs
(native min + block the minus key so a negative can't be typed). Border passes
min={0} — border widths are non-negative. General dimensions/simple-dimension
stay unconstrained by default (negative margins are legit).
Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Rebuilds the dimension family as composites of TUI primitives —
TextInput(type=number) +Select+IconButton— in the Field idiom. Reclassified out of the "no equivalent" bucket: these are just compositions.Contracts preserved (verified live)
{ value, unit }{ top, left, right, bottom, unit, isLinked }{ dimensions, color }IconButton(system/link/system/unlink); linked mode syncs all four sides.role="group"wrapper (Field.Control injectsaria-labelledby); each input carries its ownaria-label.border= dimensions + color, and TUI has no ColorPicker yet (theColorAreaprimitive gap). Border gets its Dimensions half migrated for free + a TUI Field wrapper; the Color field is untouched and finishes migrating when we build the TUI ColorPicker.tscunchanged (theinitJSON(value, {defaults})loose-typing warnings are pre-existing). Rebuilt bundle.🤖 Generated with Claude Code