Skip to content

fix(inputs): add border-box sizing to input wrappers - #152

Closed
cixzhang wants to merge 1 commit into
mainfrom
navi/fix/input-styling
Closed

cixzhang wants to merge 1 commit into
mainfrom
navi/fix/input-styling

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Summary

Adds boxSizing: 'border-box' to the outer wrapper styles of all five input components. Without this, padding and borders cause the elements to overflow their expected size.

Changes

  • TextInput — added boxSizing: 'border-box' to wrapper
  • TextArea — added boxSizing: 'border-box' to wrapper
  • NumberInput — added boxSizing: 'border-box' to wrapper
  • DateInput — added boxSizing: 'border-box' to wrapper
  • TimeInput — added boxSizing: 'border-box' to wrapper

Notes

Inner <input> and <textarea> elements already had proper border/outline resets (border: 0, outline: 0, backgroundColor: 'transparent'). Audited other components with padding (Layout, Card, Section, Dialog) — they already handle box-sizing correctly via the container mixin or explicit declarations.

Fixes #150


Crafted with care by Navi

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

Modified Components

DateInput
Metric Before After Delta
Bundle Size (ESM) N/A 595B N/A
Lines of Code N/A 381 -
Complexity N/A Very High (40) -
NumberInput
Metric Before After Delta
Bundle Size (ESM) N/A 407B N/A
Lines of Code N/A 382 -
Complexity N/A Very High (50) -
TextArea
Metric Before After Delta
Bundle Size (ESM) N/A 401B N/A
Lines of Code N/A 243 -
Complexity N/A High (19) -
TextInput
Metric Before After Delta
Bundle Size (ESM) N/A 403B N/A
Lines of Code N/A 223 -
Complexity N/A High (17) -
TimeInput
Metric Before After Delta
Bundle Size (ESM) N/A 435B N/A
Lines of Code N/A 393 -
Complexity N/A Very High (47) -

Bundle Size Summary

Package Size (ESM) Size (CJS) Gzipped
@xds/core 6.0KB 9.9KB 1.6KB

Accessibility Audit

Status: 5 accessibility violation(s) found.

XDSDateInput - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSNumberInput - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSTextArea - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSTextInput - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name
XDSTimeInput - 1 issue(s)
  • serious: Links must have discernible text
    • Rule: link-name

Component Previews

Includes interactive hover previews as animated GIFs.

XDSDateInput

Default

Screenshot:

Default

Interaction Preview: (view video)

Default interaction

Run yarn storybook and navigate to: form-xdsdateinput--default

With Value

Screenshot:

With Value

Interaction Preview: (view video)

With Value interaction

Run yarn storybook and navigate to: form-xdsdateinput--with-value

With Description

Screenshot:

With Description

Interaction Preview: (view video)

With Description interaction

Run yarn storybook and navigate to: form-xdsdateinput--with-description

With Hidden Label

Screenshot:

With Hidden Label

Interaction Preview: (view video)

With Hidden Label interaction

Run yarn storybook and navigate to: form-xdsdateinput--with-hidden-label

Optional

Screenshot:

Optional

Interaction Preview: (view video)

Optional interaction

Run yarn storybook and navigate to: form-xdsdateinput--optional

Required

Screenshot:

Required

Interaction Preview: (view video)

Required interaction

Run yarn storybook and navigate to: form-xdsdateinput--required

Disabled

Screenshot:

Disabled

Interaction Preview: (view video)

Disabled interaction

Run yarn storybook and navigate to: form-xdsdateinput--disabled

Small Size

Screenshot:

Small Size

Interaction Preview: (view video)

Small Size interaction

Run yarn storybook and navigate to: form-xdsdateinput--small-size

With Min Max

Screenshot:

With Min Max

Interaction Preview: (view video)

With Min Max interaction

Run yarn storybook and navigate to: form-xdsdateinput--with-min-max

Two Month Calendar

Screenshot:

Two Month Calendar

Interaction Preview: (view video)

Two Month Calendar interaction

Run yarn storybook and navigate to: form-xdsdateinput--two-month-calendar

With Error Status

Screenshot:

With Error Status

Interaction Preview: (view video)

With Error Status interaction

Run yarn storybook and navigate to: form-xdsdateinput--with-error-status

With Warning Status

Screenshot:

With Warning Status

Interaction Preview: (view video)

With Warning Status interaction

Run yarn storybook and navigate to: form-xdsdateinput--with-warning-status

With Success Status

Screenshot:

With Success Status

Interaction Preview: (view video)

With Success Status interaction

Run yarn storybook and navigate to: form-xdsdateinput--with-success-status

All Variations

Screenshot:

All Variations

Interaction Preview: (view video)

All Variations interaction

Run yarn storybook and navigate to: form-xdsdateinput--all-variations

XDSNumberInput

Default

Screenshot:

Default

Interaction Preview: (view video)

Default interaction

Run yarn storybook and navigate to: form-xdsnumberinput--default

With Description

Screenshot:

With Description

Interaction Preview: (view video)

With Description interaction

Run yarn storybook and navigate to: form-xdsnumberinput--with-description

With Min Max

Screenshot:

With Min Max

Interaction Preview: (view video)

With Min Max interaction

Run yarn storybook and navigate to: form-xdsnumberinput--with-min-max

With Step

Screenshot:

With Step

Interaction Preview: (view video)

With Step interaction

Run yarn storybook and navigate to: form-xdsnumberinput--with-step

With Units

Screenshot:

With Units

Interaction Preview: (view video)

With Units interaction

Run yarn storybook and navigate to: form-xdsnumberinput--with-units

With Units GB

Screenshot:

With Units GB

Interaction Preview: (view video)

With Units GB interaction

Run yarn storybook and navigate to: form-xdsnumberinput--with-units-gb

Integer Only

Screenshot:

Integer Only

Interaction Preview: (view video)

Integer Only interaction

Run yarn storybook and navigate to: form-xdsnumberinput--integer-only

With Value

Screenshot:

With Value

Interaction Preview: (view video)

With Value interaction

Run yarn storybook and navigate to: form-xdsnumberinput--with-value

All Variations

Screenshot:

All Variations

Interaction Preview: (view video)

All Variations interaction

Run yarn storybook and navigate to: form-xdsnumberinput--all-variations

Optional Field

Screenshot:

Optional Field

Interaction Preview: (view video)

Optional Field interaction

Run yarn storybook and navigate to: form-xdsnumberinput--optional-field

Required Field

Screenshot:

Required Field

Interaction Preview: (view video)

Required Field interaction

Run yarn storybook and navigate to: form-xdsnumberinput--required-field

Disabled

Screenshot:

Disabled

Interaction Preview: (view video)

Disabled interaction

Run yarn storybook and navigate to: form-xdsnumberinput--disabled

With Start Icon

Screenshot:

With Start Icon

Interaction Preview: (view video)

With Start Icon interaction

Run yarn storybook and navigate to: form-xdsnumberinput--with-start-icon

Size Variants

Screenshot:

Size Variants

Interaction Preview: (view video)

Size Variants interaction

Run yarn storybook and navigate to: form-xdsnumberinput--size-variants

Error Status

Screenshot:

Error Status

Interaction Preview: (view video)

Error Status interaction

Run yarn storybook and navigate to: form-xdsnumberinput--error-status

Warning Status

Screenshot:

Warning Status

Interaction Preview: (view video)

Warning Status interaction

Run yarn storybook and navigate to: form-xdsnumberinput--warning-status

Success Status

Screenshot:

Success Status

Interaction Preview: (view video)

Success Status interaction

Run yarn storybook and navigate to: form-xdsnumberinput--success-status

Status Variations

Screenshot:

Status Variations

Interaction Preview: (view video)

Status Variations interaction

Run yarn storybook and navigate to: form-xdsnumberinput--status-variations

With Tooltip

Screenshot:

With Tooltip

Interaction Preview: (view video)

With Tooltip interaction

Run yarn storybook and navigate to: form-xdsnumberinput--with-tooltip

Decimal Input

Screenshot:

Decimal Input

Interaction Preview: (view video)

Decimal Input interaction

Run yarn storybook and navigate to: form-xdsnumberinput--decimal-input

With Event Handlers

Screenshot:

With Event Handlers

Interaction Preview: (view video)

With Event Handlers interaction

Run yarn storybook and navigate to: form-xdsnumberinput--with-event-handlers

XDSTextArea

Default

Screenshot:

Default

Interaction Preview: (view video)

Default interaction

Run yarn storybook and navigate to: form-xdstextarea--default

With Description

Screenshot:

With Description

Interaction Preview: (view video)

With Description interaction

Run yarn storybook and navigate to: form-xdstextarea--with-description

With Hidden Label

Screenshot:

With Hidden Label

Interaction Preview: (view video)

With Hidden Label interaction

Run yarn storybook and navigate to: form-xdstextarea--with-hidden-label

With Value

Screenshot:

With Value

Interaction Preview: (view video)

With Value interaction

Run yarn storybook and navigate to: form-xdstextarea--with-value

Custom Rows

Screenshot:

Custom Rows

Interaction Preview: (view video)

Custom Rows interaction

Run yarn storybook and navigate to: form-xdstextarea--custom-rows

All Variations

Screenshot:

All Variations

Interaction Preview: (view video)

All Variations interaction

Run yarn storybook and navigate to: form-xdstextarea--all-variations

Optional Field

Screenshot:

Optional Field

Interaction Preview: (view video)

Optional Field interaction

Run yarn storybook and navigate to: form-xdstextarea--optional-field

Required Field

Screenshot:

Required Field

Interaction Preview: (view video)

Required Field interaction

Run yarn storybook and navigate to: form-xdstextarea--required-field

Description With Optional

Screenshot:

Description With Optional

Interaction Preview: (view video)

Description With Optional interaction

Run yarn storybook and navigate to: form-xdstextarea--description-with-optional

Disabled

Screenshot:

Disabled

Interaction Preview: (view video)

Disabled interaction

Run yarn storybook and navigate to: form-xdstextarea--disabled

With Start Icon

Screenshot:

With Start Icon

Interaction Preview: (view video)

With Start Icon interaction

Run yarn storybook and navigate to: form-xdstextarea--with-start-icon

Start Icon Variations

Screenshot:

Start Icon Variations

Interaction Preview: (view video)

Start Icon Variations interaction

Run yarn storybook and navigate to: form-xdstextarea--start-icon-variations

Error Status

Screenshot:

Error Status

Interaction Preview: (view video)

Error Status interaction

Run yarn storybook and navigate to: form-xdstextarea--error-status

Warning Status

Screenshot:

Warning Status

Interaction Preview: (view video)

Warning Status interaction

Run yarn storybook and navigate to: form-xdstextarea--warning-status

Success Status

Screenshot:

Success Status

Interaction Preview: (view video)

Success Status interaction

Run yarn storybook and navigate to: form-xdstextarea--success-status

Status Without Message

Screenshot:

Status Without Message

Interaction Preview: (view video)

Status Without Message interaction

Run yarn storybook and navigate to: form-xdstextarea--status-without-message

Status Variations

Screenshot:

Status Variations

Interaction Preview: (view video)

Status Variations interaction

Run yarn storybook and navigate to: form-xdstextarea--status-variations

With Tooltip

Screenshot:

With Tooltip

Interaction Preview: (view video)

With Tooltip interaction

Run yarn storybook and navigate to: form-xdstextarea--with-tooltip

Tooltip With Optional

Screenshot:

Tooltip With Optional

Interaction Preview: (view video)

Tooltip With Optional interaction

Run yarn storybook and navigate to: form-xdstextarea--tooltip-with-optional

Combined Features

Screenshot:

Combined Features

Interaction Preview: (view video)

Combined Features interaction

Run yarn storybook and navigate to: form-xdstextarea--combined-features

With Max Length

Screenshot:

With Max Length

Interaction Preview: (view video)

With Max Length interaction

Run yarn storybook and navigate to: form-xdstextarea--with-max-length

Max Length With Value

Screenshot:

Max Length With Value

Interaction Preview: (view video)

Max Length With Value interaction

Run yarn storybook and navigate to: form-xdstextarea--max-length-with-value

Max Length Variations

Screenshot:

Max Length Variations

Interaction Preview: (view video)

Max Length Variations interaction

Run yarn storybook and navigate to: form-xdstextarea--max-length-variations

XDSTextInput

Default

Screenshot:

Default

Interaction Preview: (view video)

Default interaction

Run yarn storybook and navigate to: form-xdstextinput--default

With Description

Screenshot:

With Description

Interaction Preview: (view video)

With Description interaction

Run yarn storybook and navigate to: form-xdstextinput--with-description

With Hidden Label

Screenshot:

With Hidden Label

Interaction Preview: (view video)

With Hidden Label interaction

Run yarn storybook and navigate to: form-xdstextinput--with-hidden-label

With Value

Screenshot:

With Value

Interaction Preview: (view video)

With Value interaction

Run yarn storybook and navigate to: form-xdstextinput--with-value

All Variations

Screenshot:

All Variations

Interaction Preview: (view video)

All Variations interaction

Run yarn storybook and navigate to: form-xdstextinput--all-variations

Optional Field

Screenshot:

Optional Field

Interaction Preview: (view video)

Optional Field interaction

Run yarn storybook and navigate to: form-xdstextinput--optional-field

Required Field

Screenshot:

Required Field

Interaction Preview: (view video)

Required Field interaction

Run yarn storybook and navigate to: form-xdstextinput--required-field

Description With Optional

Screenshot:

Description With Optional

Interaction Preview: (view video)

Description With Optional interaction

Run yarn storybook and navigate to: form-xdstextinput--description-with-optional

Disabled

Screenshot:

Disabled

Interaction Preview: (view video)

Disabled interaction

Run yarn storybook and navigate to: form-xdstextinput--disabled

With Start Icon

Screenshot:

With Start Icon

Interaction Preview: (view video)

With Start Icon interaction

Run yarn storybook and navigate to: form-xdstextinput--with-start-icon

With Start Icon And Small Size

Screenshot:

With Start Icon And Small Size

Interaction Preview: (view video)

With Start Icon And Small Size interaction

Run yarn storybook and navigate to: form-xdstextinput--with-start-icon-and-small-size

Size Variants

Screenshot:

Size Variants

Interaction Preview: (view video)

Size Variants interaction

Run yarn storybook and navigate to: form-xdstextinput--size-variants

Start Icon Variations

Screenshot:

Start Icon Variations

Interaction Preview: (view video)

Start Icon Variations interaction

Run yarn storybook and navigate to: form-xdstextinput--start-icon-variations

Error Status

Screenshot:

Error Status

Interaction Preview: (view video)

Error Status interaction

Run yarn storybook and navigate to: form-xdstextinput--error-status

Warning Status

Screenshot:

Warning Status

Interaction Preview: (view video)

Warning Status interaction

Run yarn storybook and navigate to: form-xdstextinput--warning-status

Success Status

Screenshot:

Success Status

Interaction Preview: (view video)

Success Status interaction

Run yarn storybook and navigate to: form-xdstextinput--success-status

Status Without Message

Screenshot:

Status Without Message

Interaction Preview: (view video)

Status Without Message interaction

Run yarn storybook and navigate to: form-xdstextinput--status-without-message

Status Variations

Screenshot:

Status Variations

Interaction Preview: (view video)

Status Variations interaction

Run yarn storybook and navigate to: form-xdstextinput--status-variations

With Tooltip

Screenshot:

With Tooltip

Interaction Preview: (view video)

With Tooltip interaction

Run yarn storybook and navigate to: form-xdstextinput--with-tooltip

Tooltip With Optional

Screenshot:

Tooltip With Optional

Interaction Preview: (view video)

Tooltip With Optional interaction

Run yarn storybook and navigate to: form-xdstextinput--tooltip-with-optional

XDSTimeInput

Default

Screenshot:

Default

Interaction Preview: (view video)

Default interaction

Run yarn storybook and navigate to: form-xdstimeinput--default

With Value

Screenshot:

With Value

Interaction Preview: (view video)

With Value interaction

Run yarn storybook and navigate to: form-xdstimeinput--with-value

Twenty Four Hour Format

Screenshot:

Twenty Four Hour Format

Interaction Preview: (view video)

Twenty Four Hour Format interaction

Run yarn storybook and navigate to: form-xdstimeinput--twenty-four-hour-format

With Seconds

Screenshot:

With Seconds

Interaction Preview: (view video)

With Seconds interaction

Run yarn storybook and navigate to: form-xdstimeinput--with-seconds

With Clear Button

Screenshot:

With Clear Button

Interaction Preview: (view video)

With Clear Button interaction

Run yarn storybook and navigate to: form-xdstimeinput--with-clear-button

With Description

Screenshot:

With Description

Interaction Preview: (view video)

With Description interaction

Run yarn storybook and navigate to: form-xdstimeinput--with-description

With Min Max

Screenshot:

With Min Max

Interaction Preview: (view video)

With Min Max interaction

Run yarn storybook and navigate to: form-xdstimeinput--with-min-max

With Increment

Screenshot:

With Increment

Interaction Preview: (view video)

With Increment interaction

Run yarn storybook and navigate to: form-xdstimeinput--with-increment

Optional

Screenshot:

Optional

Interaction Preview: (view video)

Optional interaction

Run yarn storybook and navigate to: form-xdstimeinput--optional

Required

Screenshot:

Required

Interaction Preview: (view video)

Required interaction

Run yarn storybook and navigate to: form-xdstimeinput--required

Disabled

Screenshot:

Disabled

Interaction Preview: (view video)

Disabled interaction

Run yarn storybook and navigate to: form-xdstimeinput--disabled

Small Size

Screenshot:

Small Size

Interaction Preview: (view video)

Small Size interaction

Run yarn storybook and navigate to: form-xdstimeinput--small-size

With Error Status

Screenshot:

With Error Status

Interaction Preview: (view video)

With Error Status interaction

Run yarn storybook and navigate to: form-xdstimeinput--with-error-status

With Warning Status

Screenshot:

With Warning Status

Interaction Preview: (view video)

With Warning Status interaction

Run yarn storybook and navigate to: form-xdstimeinput--with-warning-status

With Success Status

Screenshot:

With Success Status

Interaction Preview: (view video)

With Success Status interaction

Run yarn storybook and navigate to: form-xdstimeinput--with-success-status

All Variations

Screenshot:

All Variations

Interaction Preview: (view video)

All Variations interaction

Run yarn storybook and navigate to: form-xdstimeinput--all-variations


Generated by PR Enrichment workflow | Storybook | View full report

@cixzhang
cixzhang deleted the navi/fix/input-styling branch February 20, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(TextInput): reset input styling — border-box and border: none

1 participant