4273 Commits

Author SHA1 Message Date
8f063acefa Merge remote-tracking branch 'origin/feature-8.0' into sp/next 2024-03-26 20:12:00 -04:00
8eae461076 fix(core): fallback detection for themes and modes 2024-03-26 18:29:33 -04:00
7eae6ec591 refactor(button): update focus ring to avoid additional API (#29223) 2024-03-26 13:40:11 -04:00
4cf1b9737d feat(button): add ionic theme implementation (#29187)
Issue number: **ROU-4815**

---------

## What is the new behavior?

- Adds an ionic theme style implementation for `ion-button`.
  - Adds a new `rectangular` shape to the button.
  - Adds two new button sizes: `xsmall` and `xlarge`.
  - Adds a new `focus-ring` CSS shadow part for the ionic theme.

## Does this introduce a breaking change?

- [ ] Yes
- [X] No


## Preview


![Screen-Recording-2024-03-20-at-1](https://github.com/ionic-team/ionic-framework/assets/5339917/0defd1b4-abd9-44bc-b0b9-cd29e0b1f24f)

---------

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandy@ionic.io>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-authored-by: Sean Perkins <sean@ionic.io>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: João Ferreira <60441552+JoaoFerreira-FrontEnd@users.noreply.github.com>
Co-authored-by: João Ferreira <joao.manuel.ferreira123@gmail.com>
2024-03-25 22:17:10 -04:00
6c500fd6b2 feat(input): add input-password-toggle component (#29175)
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. -->

When given a password input it is hard to know what users are typing as
the contents of the input are obscured. As a result, it is a common
pattern to have a button that lets users temporarily toggle the
visibility of the password so they can correct any mistakes. Ionic
currently has the infrastructure for developers to implement this on
their own, but this use case is so common that the team thinks it is
worth having this functionality built-in to Ionic.

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

- Introduces the `ion-input-password-toggle` component. This component
is a button that toggles the visibility of the text in the input it is
slotted into.

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


⚠️ Give co-author credit to
https://github.com/ionic-team/ionic-framework/pull/29141 on merge.

Docs PR: https://github.com/ionic-team/ionic-docs/pull/3541

Note: We did not do the approach listed in the other PR due to
https://github.com/ionic-team/ionic-framework/pull/29141#discussion_r1523631811.

---------

Co-authored-by: OS-giulianasilva <OS-giulianasilva@users.noreply.github.com>
2024-03-25 13:22:06 -04:00
6e477b743e refactor(searchbar): autocapitalize defaults to off (#29107)
BREAKING CHANGE: The `autocapitalize` property on Searchbar now defaults to `'off'`.
2024-03-22 09:13:15 -04:00
d73de9194d Merge remote-tracking branch 'origin/feature-8.0' into sp/sync-next-03-21 2024-03-21 16:28:35 -04:00
44529f0a62 feat(button): add circular shape as round (#29161)
Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-03-21 11:49:26 -07:00
500854d929 refactor(tap-click): use pointer events api (#29192)
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. -->

[Amanda pointed out that the ripple effect for the Button inside of
InputPasswordToggle was not
working](https://github.com/ionic-team/ionic-framework/pull/29175#discussion_r1532627841).
I found out that calling `ev.preventDefault` on `pointerdown` causes
`mouseup` to not get fired. On desktop, we rely on `mouseup` to know
when to add the ripple effect. (`touchend` is not impacted)

Interestingly, calling `ev.preventDefault` on `pointerdown` does **not**
prevent `pointerup` from being fired. The idea here is that if we
migrate the tap click utility to use the PointerEvents API instead of
separate mouse/touch listeners we can keep the existing tap click
behavior while also fixing the bug that Amanda noted.

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

- Tap click nows listens for the Pointer Events instead of separate
mouse/touch events

Impact to developers is fairly minimal. There should be no behavior
change (other than the bug I noted being fixed). There should be a very
small perf boost because this util now only adds 4 event listeners on
the document instead of 7 previously.

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


Reviewers: Please manually test this on desktop devices as well as iOS
and Android devices (not Chrome Dev Tools. iOS simulators are fine).
Test that components such as `ion-button` correctly add the activated
state (or ripple effect for MD). Also verify that the activated state is
not added when tapping the button and then scrolling. For desktop, check
that right clicking does not add the activated state.
2024-03-21 14:02:38 -04:00
e375508647 chore(): add updated snapshots 2024-03-21 04:45:01 +00:00
6965205824 chore: use theme for rendering datetime 2024-03-20 21:11:01 -04:00
245a5c6f23 Merge remote-tracking branch 'origin/feature-8.0' into sp/sync-next-with-v8 2024-03-20 21:05:35 -04:00
9efeb0ad31 refactor(haptics): remove cordova haptics support (#29186)
BREAKING CHANGE: Support for the Cordova Haptics plugin has been removed. Components that integrate with haptics, such as `ion-picker` and `ion-toggle`, will continue to function but will no longer play haptics in Cordova environments. Developers should migrate to Capacitor to continue to have haptics in these components.
2024-03-20 17:28:34 -04:00
63a2d4fb44 refactor(input, textarea) remove unused event (#29183) 2024-03-20 12:47:49 -04:00
892594de06 feat: remove css animations support for ionic animations (#29123)
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. -->

Ionic Framework provides a small utility wrapper around the Web
Animations API. Historically not all browsers that Ionic Framework
supported, had support for the Web Animations API. To offer backwards
compatibility, Ionic Framework provided fallback behaviors for the
different wrapped APIs.


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

- Removes the legacy CSS animations fallback behavior from the Web
Animations API animation utility. Maintaining a few no-op behaviors for
test environments.
- Resolved a few internal type usages that were casting to any
- Removed spec tests that were testing the fallback CSS animations
behavior and/or already had test coverage from other unit tests.

## Does this introduce a breaking change?

- [x] Yes
- [ ] 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.
-->

All modern browsers support the Web Animations API today. If a developer
needs to target an older browser that does not support Web Animations,
they should either use [a
polyfill](https://github.com/web-animations/web-animations-js), or
implement the fallback behavior themselves.

## 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: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2024-03-20 11:23:00 -04:00
90fcddea3d chore: clean up changelog 2024-03-20 10:43:06 -04:00
48abe43a85 v8.0.0-beta.3 2024-03-20 14:36:07 +00:00
8c56b0b94a chore: sync with main 2024-03-20 09:50:04 -04:00
4cd8fb15af v7.8.1 2024-03-20 13:18:53 +00:00
d9f97d0f52 chore(): add updated snapshots 2024-03-19 18:42:46 +00:00
9619ee30d9 test(item): update terminology to palettes 2024-03-19 14:26:59 -04:00
e8f63560eb chore: sync with main 2024-03-19 14:24:51 -04:00
acc1042124 fix(input, textarea, select): account for multiple start/end slot elements (#29172)
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. -->

We add margin on content in the start/end slots so they do not run up
against either the visible text label of the text in the input. However,
we did not account for when multiple elements are placed into the same
slot. As a result, this margin is added more times than it needs to be.

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

- Updated the selector so the margin is only applied to either the last
or first element in the slot.

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


Test Steps: 

1. Check out `feature-8.0`
2. Add multiple `ion-button` elements into either the start or end slot
on an input (you can reuse the template in
`src/components/input/test/slots`
3. Observe that margin is added to every `ion-button`.

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-03-19 13:36:06 -04:00
fc5d692a05 chore(deps): update dependency @capacitor/core to v5.7.3 (#29176)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@capacitor/core](https://capacitorjs.com)
([source](https://togithub.com/ionic-team/capacitor)) | [`5.7.2` ->
`5.7.3`](https://renovatebot.com/diffs/npm/@capacitor%2fcore/5.7.2/5.7.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@capacitor%2fcore/5.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@capacitor%2fcore/5.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@capacitor%2fcore/5.7.2/5.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@capacitor%2fcore/5.7.2/5.7.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ionic-team/capacitor (@&#8203;capacitor/core)</summary>

###
[`v5.7.3`](https://togithub.com/ionic-team/capacitor/releases/tag/5.7.3)

[Compare
Source](https://togithub.com/ionic-team/capacitor/compare/5.7.2...5.7.3)

##### Bug Fixes

- **cli:** apkName for multi-dimensional flavors
([#&#8203;7347](https://togithub.com/ionic-team/capacitor/issues/7347))
([771d678](771d67820e))
- **http:** keep original URL properties on proxy
([#&#8203;7338](https://togithub.com/ionic-team/capacitor/issues/7338))
([9ef8b1d](9ef8b1d5bc))
- **http:** Make proxy work with Request objects
([#&#8203;7348](https://togithub.com/ionic-team/capacitor/issues/7348))
([#&#8203;7351](https://togithub.com/ionic-team/capacitor/issues/7351))
([0139aa8](0139aa8cf3))
- **http:** set port for proxy url
([#&#8203;7346](https://togithub.com/ionic-team/capacitor/issues/7346))
([5bd33c4](5bd33c4080))
- **ios:** overwrite CORS headers on livereload
([#&#8203;7349](https://togithub.com/ionic-team/capacitor/issues/7349))
([1aad9c6](1aad9c6aa9))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-19 13:43:58 +00:00
e50d32a388 chore(deps): update dependency @stencil/core to v4.12.6 (#29165)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@stencil/core](https://stenciljs.com/)
([source](https://togithub.com/ionic-team/stencil)) | [`4.12.5` ->
`4.12.6`](https://renovatebot.com/diffs/npm/@stencil%2fcore/4.12.5/4.12.6)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@stencil%2fcore/4.12.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@stencil%2fcore/4.12.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@stencil%2fcore/4.12.5/4.12.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@stencil%2fcore/4.12.5/4.12.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>ionic-team/stencil (@&#8203;stencil/core)</summary>

###
[`v4.12.6`](https://togithub.com/ionic-team/stencil/blob/HEAD/CHANGELOG.md#-4126-2024-03-11)

[Compare
Source](https://togithub.com/ionic-team/stencil/compare/v4.12.5...v4.12.6)

##### Bug Fixes

- **cli:** move version logging earlier in CLI to allow `-v`,
`--version`
([#&#8203;5425](https://togithub.com/ionic-team/stencil/issues/5425))
([194b0fc](194b0fc0d9))
- **compiler:** fix generated import statement
([#&#8203;5419](https://togithub.com/ionic-team/stencil/issues/5419))
([502da1b](502da1bc3d))
- **test:** ensure screenshot dir is cleaned up
([#&#8203;5421](https://togithub.com/ionic-team/stencil/issues/5421))
([15e7a49](15e7a4960b))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNDUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-18 21:07:26 +00:00
284eb8ecaf feat: add ionic theme architecture (#29132)
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. -->

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

Adds the base architecture to add a new theme configuration to Ionic
Framework components.
- Components can now specify an additional stylesheet for the `ionic`
theme.
- Developers can specify the `theme` and `mode` independently to control
look and feel of a component.

Test infrastructure has been updated to add support for testing the
theme configuration with Playwright.
- Existing `themes` test configuration has been renamed to `palettes`

This PR is just the initial effort to decouple Ionic's architecture to
separate look and feel and allow our dev team to start introducing the
new component appearance to the UI. There will be additional changes
required to completely add support for the Ionic theme. These changes
are targeted against the `next` branch and are not expected to be used
in a production environment at this time.

## 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: Maria Hutt <thetaPC@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
2024-03-18 15:45:01 -04:00
761e1b47dd feat: rename dark/high-contrast themes to palettes (#29149)
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. -->

Ionic Framework currently plans to offer dark and high contrast "themes"
in v8. However this naming nomenclature conflicts with a significant new
feature that the team is working on towards v9+.

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

- Migrates previous dark and high contrast "themes" to "palettes"
- Updates test infrastructure to import from the new stylesheet
locations

## Does this introduce a breaking change?

- [x] Yes
- [ ] 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.
-->

Developers that have updated to the Ionic v8 beta and have implemented
the dark and high contrast themes, will need to update the import path:

```diff
-@import '@ionic/angular/css/themes/dark.always.css';
+@import '@ionic/angular/css/palettes/dark.always.css';
```


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

Blocked by: https://github.com/ionic-team/ionic-framework/pull/29148.
Review that first.

Documentation PR: https://github.com/ionic-team/ionic-docs/pull/3521

---------

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2024-03-18 14:45:47 -04:00
55464ddf84 docs(test): fix link for configuring docker for headed tests (#29173)
Creates a link to the correct section of the docs. The old verbiage
existed when the configuring step was in the section below.
2024-03-18 15:35:11 +00:00
e98620ee99 test(ci): run tests in docker container (#28893)
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 team currently faces two challenges:

1. Verifying visual changes locally is difficult because we cannot use
the existing ground truths as they were generated in Linux environments
and most of our team uses either macOS or Windows. While team members
can generate ground truths in the correct environment, they need to
remember to do that first before making changes.
2. Updating visual diffs is time consuming and can only be done by team
members. Our GitHub Action runs the entire test suite which can take ~10
even if only a handful of screenshots are generated. Additionally, this
job can only be run by team members meaning community contributors
cannot update/add screenshots. This limits them to non-visual tasks when
contributing. In the event that they do want to make visual changes, the
team needs to copy all their code into a branch and manually run
screenshot diffs for them.

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

- This PR introduces the ability to run all Playwright tests inside of a
Docker container using an image with Playwright dependencies. The
container will have access to the local project, so developers can make
changes and then run tests in the container after the changes are
compiled. This enables anyone to propose new screenshot changes.
However, the "update screenshot" job will still be available for folks
who do not want/are unable to use docker.
- There are some typeface differences between GH Actions and the Docker
image which is why there are a handful of screenshots that needed to be
updated.

One risk here is that the Playwright npm and Docker image versions must
be kept in sync. As a result, I also updatRenovate to allow us to auto
update the npm and Docker image versions at the same time.

## 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.
  3. Update the BREAKING.md file with the breaking change.
4. 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. -->


⚠️ There are still some issues I need to sort out with mounting the
local project on Windows. However, using Ubuntu with the linux subsystem
for windows can be used as a workaround. I'd like to merge this so we
can start testing it in our day-to-day workflow and ironing out any
bugs.

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-03-18 14:08:30 +00:00
f75977699d perf(datetime): calendar body shows immediately in modal on ios (#29163)
Issue number: resolves #24542

---------

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

WebKit has a quirk where IntersectionObserver callbacks are delayed
until after an accelerated animation finishes if the "root" specified in
the config is the browser viewport (the default behavior if "root" is
not specified) This means that when presenting a datetime in a modal on
iOS the calendar body appears blank until the modal animation finishes.

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

- We can work around this issue by observing an element inside of the
datetime component and using the datetime component itself as the root.
To do this, I added an `.intersection-tracker` element inside of
datetime. This element has a dimension of 0x0 so it should not affect
component layout or functionality.

I opted to add this element instead of re-using an existing element
because the existing elements are not guaranteed to always be in the DOM
due to different datetime presentation styles.

| `main` | branch |
| - | - |
| <video
src="https://github.com/ionic-team/ionic-framework/assets/2721089/e84d111d-b156-4f45-887a-d68a1097e5dd"></video>
| <video
src="https://github.com/ionic-team/ionic-framework/assets/2721089/3dccf1e5-cf79-46ab-b542-0537fd46fa76"></video>
|


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

Dev build: `7.8.1-dev.11710449785.14ebd5a0`

---------

Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
2024-03-15 16:17:35 +00:00
fdfecd32c3 fix(header): iOS headers in MD app are not hidden (#29164)
Issue number: resolves #28867

---------

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

I missed an edge case in
https://github.com/ionic-team/ionic-framework/pull/28277 that caused an
MD headers in an MD app to be hidden due to the presence of an iOS
header (via `mode="ios"`). This was happening because I forgot to scope
the selector in `header.ios.scss` to only iOS headers.

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

- The headers in the relevant selector are now scoped to the iOS headers
which avoids this bug while preserving the anti-flicker mechanism added
in the linked PR.

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

Dev build: `7.8.1-dev.11710452743.1ca99e5e`

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-03-15 16:03:42 +00:00
d67fdcc43a test(item): use themes options in config (#29168)
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. -->

In https://github.com/ionic-team/ionic-framework/pull/27134 we fixed a
bug for item button colors on dark mode. We added a test for this in
dark mode, but it was created before we had the infrastructure to test
dark mode within Playwright. As a result, the dark mode theme is hard
coded into the test.

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

- This test has been simplified to only test the things we need to test
- It also relies on the built-in dark theme testing instead of hard
coding the 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/.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>
2024-03-15 16:03:30 +00:00
56014cf64c fix(range, select): prefer labels passed by developer (#29145) 2024-03-14 11:14:21 -04:00
9ed692ce4f chore(deps): update dependency @playwright/test to v1.42.1 (#29162)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@playwright/test](https://playwright.dev)
([source](https://togithub.com/microsoft/playwright)) | [`1.42.0` ->
`1.42.1`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.42.0/1.42.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.42.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.42.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.42.0/1.42.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.42.0/1.42.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>microsoft/playwright (@&#8203;playwright/test)</summary>

###
[`v1.42.1`](https://togithub.com/microsoft/playwright/releases/tag/v1.42.1)

[Compare
Source](https://togithub.com/microsoft/playwright/compare/v1.42.0...v1.42.1)

##### Highlights


[https://github.com/microsoft/playwright/issues/29732](https://togithub.com/microsoft/playwright/issues/29732)
- \[Regression]: HEAD requests to webServer.url since
v1.42.0[https://github.com/microsoft/playwright/issues/29746](https://togithub.com/microsoft/playwright/issues/29746)6
- \[Regression]: Playwright CT CLI scripts fail due to broken
initializePlugin
impor[https://github.com/microsoft/playwright/issues/29739](https://togithub.com/microsoft/playwright/issues/29739)39
- \[Bug]: Component tests fails when imported a module with a dot in a
na[https://github.com/microsoft/playwright/issues/29731](https://togithub.com/microsoft/playwright/issues/29731)731
- \[Regression]: 1.42.0 breaks some import
stateme[https://github.com/microsoft/playwright/issues/29760](https://togithub.com/microsoft/playwright/issues/29760)9760
- \[Bug]: Possible regression with chained locators in v1.42

##### Browser Versions

-   Chromium 123.0.6312.4
-   Mozilla Firefox 123.0
-   WebKit 17.4

This version was also tested against the following stable channels:

-   Google Chrome 122
-   Microsoft Edge 123

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzguMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzOC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-14 14:59:12 +00:00
b148b3225b chore(playwright): migrate themes to palettes (#29148)
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. -->

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

- Migrates the test infrastructure to use `palettes` instead of `themes`

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

This **does not** change where the light/dark/high contrast styles live
or how they are consumed in the test infra. That work is done here:
https://github.com/ionic-team/ionic-framework/pull/29149

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2024-03-14 10:29:09 -04:00
5a42841d52 docs(toggle): remove extra backtick to fix formatting (#29160)
Removes the extra backtick in the `alignment` property description that
is causing formatting issues in the [Toggle
documentation](https://ionicframework.com/docs/api/toggle#properties):

<img width="754" alt="Screenshot 2024-03-13 at 4 45 58 PM"
src="https://github.com/ionic-team/ionic-framework/assets/6577830/d1430baf-c316-41b8-ba9c-c1b196c99d41">
2024-03-13 21:27:34 +00:00
19c1bc16cb fix(datetime): wheel picker shows consistently in overlays (#29147)
Issue number: resolves #26234

---------

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

We use an IntersectionObserver to know when each picker column is
visible so we can properly scroll the active option in each column into
view. The IO callback passes an array of entries. Up until this PR, we
have always grabbed the first entry in the array. The problem is that
browsers will sometimes group multiple events into a single array. This
means it's possible to have an event with `isIntersecting: false` and
then another event with `isIntersecting: true` in the same callback.
Since we always grabbed the first event we did not account for the
instances where events were coalesced.

This resulted in column options sometimes not scrolling into view when
presented via an overlay.

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

- Picker column now grabs the last event in the entries array. This
represents the most recent threshold change.

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

Dev build: `7.7.5-dev.11710347256.1954cae9`
2024-03-13 19:57:30 +00:00
459a023bac chore(deps): update dependency @playwright/test to v1.42.0 (#29110)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@playwright/test](https://playwright.dev)
([source](https://togithub.com/microsoft/playwright)) | [`1.41.2` ->
`1.42.0`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.41.2/1.42.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.41.2/1.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.41.2/1.42.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>microsoft/playwright (@&#8203;playwright/test)</summary>

###
[`v1.42.0`](https://togithub.com/microsoft/playwright/releases/tag/v1.42.0)

[Compare
Source](https://togithub.com/microsoft/playwright/compare/v1.41.2...v1.42.0)

#### New APIs

-   **Test tags**

[New tag syntax](https://playwright.dev/docs/test-annotations#tag-tests)
for adding tags to the tests (@&#8203;-tokens in the test title are
still supported).

    ```js
test('test customer login', { tag: ['@&#8203;fast', '@&#8203;login'] },
async ({ page }) => {
      // ...
    });
    ```

Use `--grep` command line option to run only tests with certain tags.

    ```sh
    npx playwright test --grep @&#8203;fast
    ```

-   **Annotating skipped tests**

[New annotation
syntax](https://playwright.dev/docs/test-annotations#annotate-tests) for
test annotations allows annotating the tests that do not run.

    ```js
    test('test full report', {
      annotation: [
{ type: 'issue', description:
'https://github.com/microsoft/playwright/issues/23180' },
{ type: 'docs', description:
'https://playwright.dev/docs/test-annotations#tag-tests' },
      ],
    }, async ({ page }) => {
      // ...
    });
    ```

-   **page.addLocatorHandler()**

New method
[page.addLocatorHandler()](https://playwright.dev/docs/api/class-page#page-add-locator-handler)
registers a callback that will be invoked when specified element becomes
visible and may block Playwright actions. The callback can get rid of
the overlay. Here is an example that closes a cookie dialog when it
appears.

    ```js
    // Setup the handler.
    await page.addLocatorHandler(
page.getByRole('heading', { name: 'Hej! You are in control of your
cookies.' }),
        async () => {
await page.getByRole('button', { name: 'Accept all' }).click();
        });
    // Write the test as usual.
    await page.goto('https://www.ikea.com/');
await page.getByRole('link', { name: 'Collection of blue and white'
}).click();
await expect(page.getByRole('heading', { name: 'Light and easy'
})).toBeVisible();
    ```

-   **Project wildcard filter**
Playwright command line
[flag](https://playwright.dev/docs/test-cli#reference) now supports '\*'
wildcard when filtering by project.

    ```sh
    npx playwright test --project='*mobile*'
    ```

-   **Other APIs**
    -   expect(callback).toPass({ timeout })
The timeout can now be configured by `expect.toPass.timeout` option
[globally](https://playwright.dev/docs/api/class-testconfig#test-config-expect)
or in [project
config](https://playwright.dev/docs/api/class-testproject#test-project-expect)

    -   electronApplication.on('console')

[electronApplication.on('console')](https://playwright.dev/docs/api/class-electronapplication#electron-application-event-console)
event is emitted when Electron main process calls console API methods.

        ```js
        electronApp.on('console', async msg => {
          const values = [];
          for (const arg of msg.args())
            values.push(await arg.jsonValue());
          console.log(...values);
        });
await electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar'
}));
        ```

- [page.pdf()](https://playwright.dev/docs/api/class-page#page-pdf)
accepts two new options
[`tagged`](https://playwright.dev/docs/api/class-page#page-pdf-option-tagged)
and
[`outline`](https://playwright.dev/docs/api/class-page#page-pdf-option-outline).

#### Breaking changes

Mixing the test instances in the same suite is no longer supported.
Allowing it was an oversight as it makes reasoning about the semantics
unnecessarily hard.

```js
const test = baseTest.extend({ item: async ({}, use) => {} });
baseTest.describe('Admin user', () => {
  test('1', async ({ page, item }) => {});
  test('2', async ({ page, item }) => {});
});
```

#### Announcements

-   ⚠️ Ubuntu 18 is not supported anymore.

#### Browser Versions

-   Chromium 123.0.6312.4
-   Mozilla Firefox 123.0
-   WebKit 17.4

This version was also tested against the following stable channels:

-   Google Chrome 122
-   Microsoft Edge 123

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjAuMiIsInVwZGF0ZWRJblZlciI6IjM3LjIyMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: ionitron <hi@ionicframework.com>
Co-authored-by: Maria Hutt <maria@ionic.io>
2024-03-13 18:49:19 +00:00
83dda44b7a chore: clean up changelog 2024-03-13 10:43:00 -04:00
f392ddd0d4 v8.0.0-beta.2 2024-03-13 14:38:17 +00:00
ff7fa0b2e2 chore: sync with main 2024-03-13 10:21:01 -04:00
400013d6cb v7.8.0 2024-03-13 13:47:29 +00:00
01ae835ad5 chore: sync with main 2024-03-13 09:29:12 -04:00
82e90f28b4 v7.7.5 2024-03-13 13:15:09 +00:00
487ffca11e chore: fix typo with close watcher const (#29146)
The variable was spelled incorrectly.
2024-03-12 21:52:38 +00:00
c0f5e5ebc0 fix(overlay): do not hide overlay if toast is presented (#29140)
Issue number: resolves #29139 

---------

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

When implementing
https://github.com/ionic-team/ionic-framework/pull/28997 we did not
consider the case where a Toast could be presented. When presenting a
Toast after presenting a Modal the linked change causes the Modal to be
hidden from screen readers.

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

- If the top-most overlay is a Toast then the closest non-Toast overlay
is also not hidden from screen readers.

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

Dev build: `7.7.5-dev.11710260658.1fc29a6c`

---------

Co-authored-by: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com>
2024-03-12 21:34:55 +00:00
5cf84eea59 refactor(config): enable stencil's experimental slot fixes (#28995)
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 stencil team has been working on fixing multiple issues with slots
elements in the stencil code base. to make these changes backwards
compatible and communicate that they were volatile, we added two
configuration flags for these fixes that were prefixed with the word
"experimental".

now that the effort to provide these fixes has largely solidified, the
features behind these flags are slightly less volatile. while the
"experimental" aspect still technically holds true, we've requested
the Framework team to enable these flags in a v8 beta. the stencil
team expects these flags to be set to `true` by default in stencil
v5, which ought to help prepare for future migrations the ionic
framework has to undergo.

Previously, Stencil would allow content to project through to a
component even when a slot was not present. However, with the changes in
`extras.experimentalScopedSlotChanges`, this behavior was changed to
hide elements without a destination slot - matching the behavior of a
shadow encapsulated component.

As such, elements projected through the `ion-label` or `ion-buttons`
components would no longer be visible in rendered output.

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

This commit adds an explicit `slot` tag to components in core leveraging
"scoped" encapsulation with no rendered content (i.e. elements with only
a `Host` tag and styles).

`subtree` was added to a mutation observer.
This fixes an issue with the `ion-input` component not re-rendering in
some cases when using the label slot functionality.

HTML element patches in Stencil that are enabled by the
`experimentalSlotFixes` flag result in DOM manipulations that won't
trigger the current mutation observer configuration and callback.

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

Would you like us to update the commit message to include the `BREAKING
CHANGE:` comment? Unsure of the actual impact on end users here.

Similarly, would you like us to update the commit message here from
`chore()` to something else?
<!-- 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: Tanner Reits <47483144+tanner-reits@users.noreply.github.com>
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Co-authored-by: Tanner Reits <tanner@ionic.io>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-03-12 16:08:14 -04:00
3c1d8ccd85 chore: sync with main 2024-03-12 13:12:16 -04:00
8f0ea0dd58 chore: sync with main 2024-03-12 13:11:23 -04:00
d53fb297e7 refactor(item): remove deprecated highlight variables used with legacy form controls (#29055)
Issue number: internal

---------

## What is the current behavior?

In Ionic Framework v7, we [simplified the form control
syntax](https://ionic.io/blog/ionic-7-is-here#simplified-form-control-syntax),
eliminating the requirement to place form controls inside of an
`ion-item`. We ensured backwards compatibility by introducing a `legacy`
property for the form controls and keeping, but deprecating, the
following CSS variables on item:

```css
--highlight-color-focused
--highlight-color-invalid
--highlight-color-valid
--highlight-height
```

While this was supported in v7, console warnings were logged to notify
developers that they needed to update to the modern syntax if they were
using form controls in an item for the best accessibility experience.

## What is the new behavior?

Removes the `--highlight-color-focused`, `--highlight-color-invalid`,
`--highlight-color-valid`, and `--highlight-height` variables from item.

## Does this introduce a breaking change?

- [x] Yes
- [ ] No

Steps taken to mitigate this breaking change: 
1. Developers have had console warnings when using the legacy syntax
since the v7 release and the variables were marked as `deprecated`.
2. The removal of these CSS variables has been documented in the
Breaking Changes document with a link to the migration guides for the
affected form controls.

BREAKING CHANGE:

The following CSS variables have been removed from item:
`--highlight-height`, `--highlight-color-focused`,
`--highlight-color-valid`, and `--highlight-color-invalid`. These
variables were used on the bottom border highlight of an item when the
form control inside of that item was focused. The form control syntax
was [simplified in
v7](https://ionic.io/blog/ionic-7-is-here#simplified-form-control-syntax)
so that inputs, selects, and textareas would no longer be required to be
used inside of an item.

If you have not yet migrated to the modern form control syntax,
migration guides for each of the form controls that added a highlight to
item can be found below:
- [Input migration
documentation](https://ionicframework.com/docs/api/input#migrating-from-legacy-input-syntax)
- [Select migration
documentation](https://ionicframework.com/docs/api/select#migrating-from-legacy-select-syntax)
- [Textarea migration
documentation](https://ionicframework.com/docs/api/textarea#migrating-from-legacy-textarea-syntax)

The highlight variables should then be moved from the item to the form
control:

```diff
- ion-item {
+ ion-input,
+ ion-textarea,
+ ion-select {
  --highlight-color-focused: purple;
  --highlight-color-valid: blue;
  --highlight-color-invalid: orange;
  --highlight-height: 6px;
}
```

> [!NOTE]
> The input and textarea components are scoped, which means they will
automatically scope their CSS by appending each of the styles with an
additional class at runtime. Overriding scoped selectors in CSS requires
a [higher
specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity)
selector. Targeting the `ion-input` or `ion-textarea` for customization
will not work; therefore we recommend adding a class and customizing it
that way.

---------

Co-authored-by: Sean Perkins <sean@ionic.io>
2024-03-11 17:29:47 -04:00