refactor(input-otp): update according to design (#30765)

Issue number: internal

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
The input-otp component does not currently match our UX designs for the
ionic theme.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- Changed shape design tokens;
- Changed background to use correct design token.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
This commit is contained in:
Pedro Lourenço
2025-11-04 09:46:43 +00:00
committed by GitHub
parent d685d09193
commit 0361bf0376
3 changed files with 7 additions and 10 deletions

View File

@ -129,13 +129,6 @@
background: var(--separator-color); background: var(--separator-color);
} }
// Fills
// --------------------------------------------------
:host(.input-otp-fill-outline) {
--background: none;
}
// States // States
// -------------------------------------------------- // --------------------------------------------------

View File

@ -68,20 +68,24 @@
// -------------------------------------------------- // --------------------------------------------------
:host(.input-otp-shape-round) { :host(.input-otp-shape-round) {
--border-radius: #{globals.$ion-border-radius-400}; --border-radius: #{globals.$ion-round-xl};
} }
:host(.input-otp-shape-soft) { :host(.input-otp-shape-soft) {
--border-radius: #{globals.$ion-border-radius-200}; --border-radius: #{globals.$ion-soft-xl};
} }
:host(.input-otp-shape-rectangular) { :host(.input-otp-shape-rectangular) {
--border-radius: #{globals.$ion-border-radius-0}; --border-radius: #{globals.$ion-rectangular-xl};
} }
// Fills // Fills
// -------------------------------------------------- // --------------------------------------------------
:host(.input-otp-fill-outline) {
--background: #{globals.$ion-bg-input-default};
}
:host(.input-otp-fill-solid) { :host(.input-otp-fill-solid) {
--border-color: #{globals.$ion-bg-input-bold-default}; --border-color: #{globals.$ion-bg-input-bold-default};
--background: #{globals.$ion-bg-input-bold-default}; --background: #{globals.$ion-bg-input-bold-default};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB