Repository navigation
Commit 4bda068
committed
feat(NumberInput): on iOS the steppers are one UIStepper-style control beside the field
In the iOS touch idiom (a coarse pointer in WebKit on iOS or iPadOS: the
resolver's two nested keys, `@media (pointer: coarse)` around `@supports
(-webkit-touch-callout: none)`, so it paints before hydration) the number
steppers leave the field and sit beside it as one control shaped like iOS
26's UIStepper, its shape measured on iOS 26.2 (motion/uikit/stepper.ts
`look`): a 94 x 32 capsule, 8px past the field's inline end, two 47px
halves with − on the left and + on the right in either writing direction, a
centred 1 x 24 divider, and 13pt glyphs with 1.67pt strokes drawn as vector
paths. The colours are the theme's: the neutral fill SegmentedControl uses
for its track, the track colour for the divider and a disabled glyph, the
primary icon colour for the glyphs, and the pressed overlay for the touched
half. The Field box gives up the control's width and a gap at its inline
end (the input box takes its own end padding back), so an attached status
still lines up with the input. A Field box narrower than 170 px (the
control, the gap and a box that still shows a few digits), whether a
numeric width says so or a measurement does, keeps the column inside it, as
an InputGroup and a horizontal-labels FormLayout (no Field box) do.
Material has no stepper, so Android and every other touch screen keep the
compact column, as do a mouse and an InputGroup. The column's chevrons sit
in a wrapper that adds no box, hidden in the iOS idiom, so nothing merges
into the icon and its own display survives. Every touch style's default is
a value, never null (a null default would erase the same property of a
style merged before it): the base's where it sets one, the CSS initial
value elsewhere; a desktop computed-style test holds that.
The half under a finger is now the one whose centre is nearer, so the same
tracking serves the column and the side-by-side halves. The specs run the
control in the iOS idiom (emulated, iosWebKit.ts) and check that Android, a
mouse and an InputGroup keep the column.1 parent a76cd60 commit 4bda068
10 files changed
Lines changed: 1398 additions & 47 deletions
File tree
- .changeset
- packages/core/src
- NumberInput
- __tests__
- motion
- uikit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
233 | 234 | | |
234 | | - | |
| 235 | + | |
| 236 | + | |
235 | 237 | | |
236 | 238 | | |
237 | 239 | | |
| |||
336 | 338 | | |
337 | 339 | | |
338 | 340 | | |
339 | | - | |
| 341 | + | |
340 | 342 | | |
341 | 343 | | |
342 | 344 | | |
| |||
641 | 643 | | |
642 | 644 | | |
643 | 645 | | |
644 | | - | |
| 646 | + | |
645 | 647 | | |
646 | 648 | | |
647 | 649 | | |
| |||
715 | 717 | | |
716 | 718 | | |
717 | 719 | | |
718 | | - | |
| 720 | + | |
719 | 721 | | |
720 | 722 | | |
721 | 723 | | |
722 | 724 | | |
723 | | - | |
| 725 | + | |
| 726 | + | |
724 | 727 | | |
725 | 728 | | |
726 | | - | |
| 729 | + | |
| 730 | + | |
727 | 731 | | |
728 | 732 | | |
729 | 733 | | |
| |||
0 commit comments