22 Commits

Author SHA1 Message Date
bf8dfdb5b1 feat(input): add styles for counter text on ionic theme (#29516)
Issue number: internal

---------

## What is the current behavior?
The counter text for the ionic theme does not have added styles.

## What is the new behavior?
- Updates the `color` of the counter text to match the design
- Updates the screenshots that were changed with this update

## Does this introduce a breaking change?
- [ ] Yes
- [x] No
2024-05-17 14:40:39 -04:00
09935fd07b feat(input): add the readonly styles for the ionic theme (#29483)
Issue number: internal

---------

## What is the current behavior?
There are no custom styles when readonly is added to an input.

## What is the new behavior?
- Applies an `input-readonly` class when the `readonly` property is
`true`
- Styles the class in the `ionic` theme to match the design requirements
for readonly inputs
- Adds screenshot tests for the readonly style for an unset `fill` and
`"outline"` fill

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-05-10 11:38:18 -04:00
8515c4efff fix(input): only apply the shape to the outline fill in ionic theme (#29482)
Issue number: internal

---------

## What is the current behavior?
The shape styles are being applied when the `fill` is unset in the
`ionic` theme. This is incorrect per the input UX requirements as shape
should only apply when `fill` is set to `"outline"`. This is made
apparent when looking at the existing styles for `disabled`.

## What is the new behavior?
- Only apply the shape styles to the `"outline"` fill
- Move the use of the `--background` css variable to the native wrapper
since this is what we use to style both the disabled and readonly states

| Before | After |
| ---| ---|
|
![before](https://github.com/ionic-team/ionic-framework/assets/6577830/44b6e7e4-70f4-49d5-844f-a015b7284ed5)
|
![after](https://github.com/ionic-team/ionic-framework/assets/6577830/06ac9431-17f4-4741-8ceb-19b40d8ba7d9)
|

I am not sure why this wasn't caught with the shape additions, but it's
probably because the minimum pixel ratio was not met.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-05-10 10:27:43 -04:00
c1bba3b5f0 feat(input): add soft shape for ionic theme (#29477)
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?
<!-- Please describe the current behavior that you are modifying. -->

The input component does not support the `soft` shape.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- `soft` has been added to shape, but will only work for the `ionic`
theme.
- Added tests

## 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. -->


[Preview](https://ionic-framework-git-fw-6096-ionic1.vercel.app/src/components/input/test/shape?ionic:theme=ionic)
2024-05-09 11:54:00 -07:00
75333c0251 feat(input): add rectangular shape for the ionic theme (#29476)
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 supports an undefined and a `round` shape.

## What is the new behavior?
Adds support for the `rectangular` shape for the `ionic` theme &
screenshot tests for this shape with the outline fill.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-05-09 11:26:52 -04:00
fd14ddfec7 fix(input): match design for xlarge size (#29446) 2024-05-03 15:04:26 -07:00
2eb1dbd83c fix(input): add focus ring to the clear input button for ionic theme (#29409) 2024-05-03 12:28:37 -07:00
4a4d447e9d fix(input): match medium size for ionic theme (#29403) 2024-04-30 08:27:34 -07:00
e0dfb61157 feat(input): add item highlight for ionic theme (#29395)
Issue number: N/A

---------

<!-- 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?
<!-- Please describe the current behavior that you are modifying. -->

The current border implementation causes layout shift. 

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Matches MD highlight effect for the focus border
- Border implementation does not cause layout shift

## 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. -->
2024-04-29 10:41:10 -04:00
c6127e91f0 chore(input): lint styles and add TODO for future work 2024-04-23 16:01:12 -04:00
930f275b7e fix(input): add focused state for ionic theme (#29342)
Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
2024-04-17 08:27:15 -07:00
ac102cf52a feat(input): add styles for clear action to ionic theme (#29337)
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 new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

For the `ionic` theme: Adjusted the size of the clear button to match
design specs, and updated the behavior so the button additionally only
shows if the native input *or* any other actions within the `ion-input`
are focused. (See code comments for details.)

The actual icon used has not been modified. The ticket says to "use the
material design clear icon as the reference icon for this feature," and
we've already added a feature allowing the icon to be customized at the
app level. Let me know if the intention was to use a different default
icon with the `ionic` theme.

## 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. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-04-16 12:42:35 -05:00
cb71258474 feat(input): add styles for round shape to ionic theme (#29329)
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 new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

Added styles for `shape="round"`, including:
- Increased border radius
- Increased padding when additionally using outline fill and large size
- Horizontal padding also applied to label when using outline fill

I also changed the `$ionic-border-radius-rounded-full` design token from
100% to 999px. `border-radius: 100%` is pretty obviously incorrect for
most browsers (screenshot taken in Chrome):

![image](https://github.com/ionic-team/ionic-framework/assets/90629384/5dc47a65-0446-4e39-9ce3-1c749b6329e7)

## 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. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-04-16 09:52:27 -05:00
3b0f3af897 fix(input): add disabled state to the ionic theme (#29323)
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-04-15 12:49:50 -07:00
67ec7455a8 fix(input): match valid state to ionic design (#29277)
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
2024-04-11 12:22:03 -07:00
c30d685c32 feat(input): add hover state to the ionic theme (#29313)
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 ionic input does not have a hover state.

## What is the new behavior?
Adds a hover state. 

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information
We do not currently have a way to test hover states. See
https://github.com/microsoft/playwright/issues/12077 for more
information.

---------

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
2024-04-11 12:55:44 -04:00
96e5b2be57 fix(input) match invalid state to ionic design (#29291)
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
2024-04-11 09:51:42 -07:00
bb516f0da7 feat(input): add outline appearance for stacked label to ionic theme (#29268)
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 new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

All changes are specific to the `ionic` theme.
- Styles added for `fill="outline"` plus `labelPlacement="stacked"`.
- Markup rearranged slightly to ensure label sits above outline while
still being clickable to focus the input. See code comments for details.
- The default `labelPlacement` is now `"stacked"`.
- Values for `labelPlacement` besides `"stacked"` and `"floating"`
cannot be used.

Note that per the ticket, I did not account for any other scope,
including styles for helper text, `labelPlacement="floating"`,
`shape="round"`, etc. This means that some states will look broken for
now, and will be addressed in future tickets.

## 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/.github/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. -->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-04-09 10:44:13 -05:00
5b62a1eafc fix(input): update error text color for ionic theme (#29270) 2024-04-04 11:14:18 -07:00
3a1e70d6fd fix(input): update helper text color for ionic theme (#29269) 2024-04-04 08:48:21 -07:00
e9654436a6 feat(input): add the large size for the ionic theme (#29249)
Issue number: internal

---------

## What is the current behavior?
Input does not have a size property.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- Adds the `size` property with support for the `"large"` size on the
`"ionic"` theme only
- Adds tests for the size property
- Note: the screenshots will not look right until the fill styles are
added

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-04-03 11:19:09 -04:00
4fc3bbbe5f feat(input): add ionic theme (#29247)
Issue number: internal

---------

## What is the new behavior?
Adds the initial files for the Ionic input.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-04-01 15:34:49 -04:00