Version: 3.9.0 — src/lib/form/number-field.tsx, src/lib/form/bignumber-field/index.tsx
Both fields always render the hover-revealed increment/decrement arrows inside .input-wrapper. They don't suit
every numeric input: an ID field, or an amount input joined to a button on its right (the arrows sit under the
button's edge). Consumers currently hide them with a DOM-shape selector that will break on any markup change:
& .input-wrapper > div:has(> button[aria-label="Increment"]) { display: none; }
(four call sites in kleros/kleros-v2#2281, now centralised in one helper but still fragile.)
Proposal: a hideStepper?: boolean prop on both fields (React Spectrum's name for the same option), which skips
rendering the arrows Group/div. Keyboard ArrowUp/Down and wheel stepping can stay as they are; the prop is about
the visual affordance. Optionally document that isWheelDisabled pairs with it for fields that should not step at all.
Version: 3.9.0 —
src/lib/form/number-field.tsx,src/lib/form/bignumber-field/index.tsxBoth fields always render the hover-revealed increment/decrement arrows inside
.input-wrapper. They don't suitevery numeric input: an ID field, or an amount input joined to a button on its right (the arrows sit under the
button's edge). Consumers currently hide them with a DOM-shape selector that will break on any markup change:
(four call sites in kleros/kleros-v2#2281, now centralised in one helper but still fragile.)
Proposal: a
hideStepper?: booleanprop on both fields (React Spectrum's name for the same option), which skipsrendering the arrows
Group/div. Keyboard ArrowUp/Down and wheel stepping can stay as they are; the prop is aboutthe visual affordance. Optionally document that
isWheelDisabledpairs with it for fields that should not step at all.