fix(input): support floating labels with slotted content - #31309
fix(input): support floating labels with slotted content#31309brandyscarney wants to merge 15 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
I renamed these screenshots from input-slots to input-slot to match the folder name.
|
|
||
| configs().forEach(({ title, screenshot, config }) => { | ||
| test.describe(title('input: start and end slots (visual checks)'), () => { | ||
| test.describe(title('input: slot'), () => { |
There was a problem hiding this comment.
This was updated to match the folder name, following how we title other tests.
| import type { SlotMutationController } from '@utils/slot-mutation-controller'; | ||
| import { createColorClasses, hostContext } from '@utils/theme'; | ||
| import { closeCircle, closeSharp } from 'ionicons/icons'; | ||
| import { closeCircle, closeCircleSharp } from 'ionicons/icons'; |
There was a problem hiding this comment.
I updated the icon for Material Design per the spec:
There was a problem hiding this comment.
This is the correct height and label position for Material Design filled inputs. See: https://m2.material.io/components/text-fields
There was a problem hiding this comment.
This 1px shift was caused by the removal of this rule:
ionic-framework/core/src/components/input/input.scss
Lines 562 to 569 in 048788f
However, this is actually more aligned than before:
There was a problem hiding this comment.
This 1px shift was caused by the removal of this rule:
ionic-framework/core/src/components/input/input.scss
Lines 562 to 569 in 048788f
There was a problem hiding this comment.
This 1px shift was caused by the removal of this rule:
ionic-framework/core/src/components/input/input.scss
Lines 562 to 569 in 048788f
There was a problem hiding this comment.
This 1px shift was caused by the removal of this rule:
ionic-framework/core/src/components/input/input.scss
Lines 562 to 569 in 048788f
There was a problem hiding this comment.
I updated the icon for Material Design per the spec:
Issue number: resolves #29449 resolves #28665
What is the current behavior?
Inputs with a floating label and a start or end slot always displayed the label in the floated state, regardless of whether the input contained a value:
What is the new behavior?
mdspecification.mdclear button icon has been updated fromcloseSharptocloseCircleSharp.mdspecification.Does this introduce a breaking change?
Due to the structural changes required to support the updated layout, and because Input is a scoped component, this change has the potential to introduce breaking changes for developers who rely on the component's internal DOM structure or apply custom styling to internal elements. While the public API has not changed, selectors or style overrides targeting the previous markup may need to be updated.
Additionally, the default clear button icon for
mdhas changed fromcloseSharptocloseCircleSharp. Developers who prefer the previous appearance can restore it by settingclearInputIcontocloseSharp.Other information
Preview