feat(OK-3293): CDS Input components Dropdown + Text#678
feat(OK-3293): CDS Input components Dropdown + Text#678luiz-camargo-cb wants to merge 12 commits into
Conversation
Unifies the input and dropdown design updates into a single signed commit so the history is easier to audit and verify. Co-authored-by: Cursor <cursoragent@cursor.com>
Add runtime guards for Alpha Select value shape based on selection mode so invalid single/multi value combinations fail fast with clear errors. Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent readonly and disabled TextInput from entering focused visual state so borders do not thicken or change color when interaction is blocked. Co-authored-by: Cursor <cursoragent@cursor.com>
🟡 Heimdall Review Status
🟡
|
| Code Owner | Status | Calculation | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| ui-systems-eng-team |
🟡
0/1
|
Denominator calculation
|
Unifies the input and dropdown design updates into a single signed commit so the history is easier to audit and verify. Co-authored-by: Cursor <cursoragent@cursor.com>
Add runtime guards for Alpha Select value shape based on selection mode so invalid single/multi value combinations fail fast with clear errors. Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent readonly and disabled TextInput from entering focused visual state so borders do not thicken or change color when interaction is blocked. Co-authored-by: Cursor <cursoragent@cursor.com>
| secondary: 'fg', | ||
| }; | ||
|
|
||
| const defaultTextInputBorderRadius: InputStackBaseProps['borderRadius'] = 400; |
There was a problem hiding this comment.
@luiz-camargo-cb we would need design to reflect borderRadius of 400 before we ship this in code https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=49527-136174&m=dev
If this was for your team you could use our theming to accomplish it for your team's purposes - playground example. This might not be possible for all your current style changes, we could look to expose additional props as needed.
| const readOnlyInputBackground = useMemo(() => { | ||
| if (!disabled && nativeInputRestProps.readOnly) { | ||
| return 'bgSecondary'; | ||
| return 'bgSecondaryWash'; |
There was a problem hiding this comment.
This also would need to be a decision that design is in agreement for.
| ...nativeInputRestProps | ||
| } = mergedProps; | ||
| const isReadOnly = !!nativeInputRestProps.readOnly; | ||
| const disableFocusedStyle = disabled || isReadOnly; |
There was a problem hiding this comment.
When I go to Mozilla and try out
<label for="name">Name (4 to 8 characters):</label>
<input
type="text"
id="regular"
name="regular"
value="regular"
required
minlength="4"
maxlength="8"
size="10" />
<input
type="text"
id="readonly"
name="readonly"
value="readonly"
required
minlength="4"
maxlength="8"
size="10"
readonly />
<input
type="text"
id="disabled"
name="disabled"
value="disabled"
required
minlength="4"
maxlength="8"
size="10"
disabled />
I am still able to focus on the read only input, not the disabled. It seems to me like we match this behavior - [see example playground](https://cds.coinbase.com/getting-started/playground?code=PTAEGECcFMEMBdqgJ4HsCulSoO4DtRoAPWAWwAcAbJAY1QtT2j3gGdRY8ATUAC1VQBrVgBpQ8Xs1A1YlSqBjdokABQBKcagXMuy8ZNIAoQ3Tyt4oAKIkK1UAF5Q6hwD5QAb0Oht8TARVe3qAAPABqAMrwsDSCoADmsOT27gAsAL4ugUEhACrE8ACSeOTo8FnZoJSwAEbQlPYARABK0HHoVZAN5dkAbrLo0I0wbR1dFaDAmePBeUSFxaXdQVW19c1wPADyeJTIY%2BOgfZQDQxvYO3tL3jCwXNu7S5NLM-lFJWUHlTV1jQAiAJasGrULj7cZHE4NLiA4HQUFXUDQoHVEGPKZBYLACJRGLotQAbkMaUJhhAoAAmhhQKR0OZpLJ5IpdKoNPAtEy9GhMNJULpDBzVMFrGQqEhJgSgA but let me know if you are able to focus on disabled).
| const toggleSelectTrayOff = useCallback(() => toggleSelectTray(false), [toggleSelectTray]); | ||
| const toggleSelectTrayOn = useCallback(() => toggleSelectTray(true), [toggleSelectTray]); | ||
| const focusedVariant = useInputVariant(!!isSelectTrayOpen, variant); | ||
| const defaultFocusedVariant = useInputVariant(!!isSelectTrayOpen, variant); |
There was a problem hiding this comment.
This component is deprecated. Is it possible to migrate to use the alpha Select instead.
| const selectTriggerMinHeight = 56; | ||
| const selectTriggerCompactMinHeight = 40; | ||
| const selectTriggerInsideLabelMinHeight = 62; | ||
| const selectTriggerBorderRadius = 400; |
There was a problem hiding this comment.
can we make sure its possible to set borderRadius via props?
There was a problem hiding this comment.
not just here specifically, but across the board on any of the components that needed to be updated
What changed? Why?
This PR aligns
TextInput,Select, andAlpha Selectfocus/border behavior with the latest design expectationsacross mobile/web.
Main changes:
TextInput(mobile + web):readOnlyanddisabledstates no longer enter focused visual styling (no thick/active focus border)Select+Alpha Select(mobile):Alpha Select(web):singlevsmultiusage and testsUI changes
Gravacao.de.Tela.2026-05-13.as.13.33.32.mp4
Gravacao.de.Tela.2026-05-13.as.13.38.05.mp4
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-05-13.at.13.37.35.mp4
Testing
How has it been tested?
Testing instructions
readOnlyanddisabled:NX_DAEMON=false yarn nx run mobile:test --testPathPattern=packages/mobile/src/controls/__tests__/TextInput.test.tsxNX_DAEMON=false yarn nx run mobile:test --testPathPattern=packages/mobile/src/controls/__tests__/Select.test.tsxNX_DAEMON=false yarn nx run-many --target=typecheck --projects=mobile,webyarn nx format:writeIllustrations/Icons Checklist
Required if this PR changes files under
packages/illustrations/**orpackages/icons/**Change management
type=routine
risk=low
impact=sev5
automerge=false