Compare commits

...

14 Commits

Author SHA1 Message Date
ionitron
43ff02c100 v8.2.7 2024-08-13 18:36:38 +00:00
renovate[bot]
9c4ba2e304 chore(deps): update capacitor to v6.1.2 (#29764)
[![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)) | [`6.1.1` ->
`6.1.2`](https://renovatebot.com/diffs/npm/@capacitor%2fcore/6.1.1/6.1.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@capacitor%2fcore/6.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@capacitor%2fcore/6.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@capacitor%2fcore/6.1.1/6.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@capacitor%2fcore/6.1.1/6.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@capacitor/haptics](https://togithub.com/ionic-team/capacitor-plugins)
| [`6.0.0` ->
`6.0.1`](https://renovatebot.com/diffs/npm/@capacitor%2fhaptics/6.0.0/6.0.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@capacitor%2fhaptics/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@capacitor%2fhaptics/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@capacitor%2fhaptics/6.0.0/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@capacitor%2fhaptics/6.0.0/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@capacitor/keyboard](https://togithub.com/ionic-team/capacitor-plugins)
| [`6.0.1` ->
`6.0.2`](https://renovatebot.com/diffs/npm/@capacitor%2fkeyboard/6.0.1/6.0.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@capacitor%2fkeyboard/6.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@capacitor%2fkeyboard/6.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@capacitor%2fkeyboard/6.0.1/6.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@capacitor%2fkeyboard/6.0.1/6.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@capacitor/status-bar](https://togithub.com/ionic-team/capacitor-plugins)
| [`6.0.0` ->
`6.0.1`](https://renovatebot.com/diffs/npm/@capacitor%2fstatus-bar/6.0.0/6.0.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@capacitor%2fstatus-bar/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@capacitor%2fstatus-bar/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@capacitor%2fstatus-bar/6.0.0/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@capacitor%2fstatus-bar/6.0.0/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v6.1.2`](https://togithub.com/ionic-team/capacitor/blob/HEAD/CHANGELOG.md#612-2024-08-07)

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

##### Bug Fixes

- **android:** better cleaning of allowedOrigin url
([#&#8203;7607](https://togithub.com/ionic-team/capacitor/issues/7607))
([d123260](d123260c70))
- **http:** pass original url as query param on the proxy url
([#&#8203;7527](https://togithub.com/ionic-team/capacitor/issues/7527))
([1da06e6](1da06e66cb))
- support dependencies with ".swift" at the end of name
([#&#8203;7583](https://togithub.com/ionic-team/capacitor/issues/7583))
([ceee68a](ceee68a2db))

</details>

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

###
[`v6.0.1`](https://togithub.com/ionic-team/capacitor-plugins/releases/tag/%40capacitor/status-bar%406.0.1)

[Compare
Source](https://togithub.com/ionic-team/capacitor-plugins/compare/@capacitor/haptics@6.0.0...@capacitor/haptics@6.0.1)

**Note:** Version bump only for package
[@&#8203;capacitor/status-bar](https://togithub.com/capacitor/status-bar)

</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 these
updates again.

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yMC4xIiwidXBkYXRlZEluVmVyIjoiMzguMjAuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-12 19:29:52 +00:00
renovate[bot]
43ad81e0c3 chore(deps): update dependency @stencil/core to v4.20.0 (#29749)
[![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.19.2` ->
`4.20.0`](https://renovatebot.com/diffs/npm/@stencil%2fcore/4.19.2/4.20.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@stencil%2fcore/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@stencil%2fcore/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@stencil%2fcore/4.19.2/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@stencil%2fcore/4.19.2/4.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v4.20.0`](https://togithub.com/ionic-team/stencil/blob/HEAD/CHANGELOG.md#-4200-2024-08-02)

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

##### Bug Fixes

- **core:** add @&#8203;stencil/core/testing/jest-preset to export map
([#&#8203;5900](https://togithub.com/ionic-team/stencil/issues/5900))
([3def2b7](3def2b7e16)),
fixes
[#&#8203;5896](https://togithub.com/ionic-team/stencil/issues/5896)
- **compiler:** don't allow shadowRoot getter to avoid hydration issues
([#&#8203;5912](https://togithub.com/ionic-team/stencil/issues/5912))
([5dd4f7f](5dd4f7fb05))
- **compiler:** no need for commenting selectors anymore
([#&#8203;5892](https://togithub.com/ionic-team/stencil/issues/5892))
([d571bbb](d571bbbb68)),
fixes
[#&#8203;5880](https://togithub.com/ionic-team/stencil/issues/5880)
- **compiler:** respect project tsconfig watch options
([#&#8203;5916](https://togithub.com/ionic-team/stencil/issues/5916))
([74adeee](74adeee75a)),
closes
[#&#8203;5709](https://togithub.com/ionic-team/stencil/issues/5709),
fixes
[#&#8203;5709](https://togithub.com/ionic-team/stencil/issues/5709),
fixes
[#&#8203;5592](https://togithub.com/ionic-team/stencil/issues/5592)
- **compiler:** run copy task after other output targets
([#&#8203;5902](https://togithub.com/ionic-team/stencil/issues/5902))
([c3d4e8b](c3d4e8b170)),
fixes
[#&#8203;5592](https://togithub.com/ionic-team/stencil/issues/5592)
- **core:** add missing screenshot export
([#&#8203;5909](https://togithub.com/ionic-team/stencil/issues/5909))
([764a8ba](764a8bafde)),
fixes
[#&#8203;5906](https://togithub.com/ionic-team/stencil/issues/5906)
- **hydrate:** ensure beforeHydrateFn and afterHydrateFn always return a
function
([#&#8203;5890](https://togithub.com/ionic-team/stencil/issues/5890))
([a7c212c](a7c212c2a9)),
fixes
[#&#8203;5884](https://togithub.com/ionic-team/stencil/issues/5884)
- **runtime:** hydrate shadow dom first
([#&#8203;5911](https://togithub.com/ionic-team/stencil/issues/5911))
([ccf1a89](ccf1a8941f))
- **runtime:** make isSameVnode return false on initial render in a
hydration case
([#&#8203;5891](https://togithub.com/ionic-team/stencil/issues/5891))
([82a7bb9](82a7bb9ead))
- **testing:** update Jest types
([#&#8203;5910](https://togithub.com/ionic-team/stencil/issues/5910))
([5f8c969](5f8c9692d4)),
fixes
[#&#8203;5908](https://togithub.com/ionic-team/stencil/issues/5908)
- **core:** update TypeScript to v5.5
([#&#8203;5898](https://togithub.com/ionic-team/stencil/issues/5898))
([5e74837](5e748378fd))

</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 was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-12 19:18:37 +00:00
Brandy Carney
20073e10c9 fix(angular): remove the tabindex set by routerLink from Ionic components (#29744)
Issue number: resolves #20632

---------

## What is the current behavior?
When using the `routerLink` directive in Angular, it automatically adds
`tabindex="0"` to the element. This creates issues with Ionic components
that render native button or anchor elements, as they have their own
focus management. As a result, when navigating between list items with
`routerLink` using the `Tab` key, you need to press the `Tab` key twice
to move to the next item. This problem is illustrated in the following
demo:

[![Open in
StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/angular-blfa7h?file=src%2Fapp%2Fexample.component.html)

Related Angular issue: https://github.com/angular/angular/issues/28345

## What is the new behavior?
Updated our `RouterLinkDelegateDirective` to check if the element using
`routerLink` is one of the following Ionic components:
`ion-back-button`, `ion-breadcrumb`, `ion-button`, `ion-card`,
`ion-fab-button`, `ion-item`, `ion-item-option`, `ion-menu-button`,
`ion-segment-button`, or `ion-tab-button`. If so, it removes the
`tabindex` attribute from the element. This allows these Ionic
components to let the native button or anchor element handle the focus.

This solution is demonstrated in the following demo:

[![Open in
StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/angular-blfa7h-svmguh?file=src%2Fapp%2Fexample.component.html)

> [!NOTE]
> I did not include the `ion-router-link` component in the list to
remove `tabindex` because [the router link
documentation](https://ionicframework.com/docs/api/router-link) does not
recommend using it with Angular:
>> Note: this component should only be used with vanilla and Stencil
JavaScript projects. For Angular projects, use an `<a>` and `routerLink`
with the Angular router.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

Dev build: `8.2.7-dev.11722448707.1e8c66e6`
2024-08-08 15:02:35 +00:00
Brandy Carney
7b16397714 fix(content): allow custom roles and aria attributes to be set on content (#29753)
Issue number: N/A

---------

## What is the current behavior?
Setting a custom `role` on the `ion-content` element does not work.

## What is the new behavior?
- Inherit attributes for the content element which allows a custom
`role` property to be set
- Adds e2e tests for content, header, and footer verifying that the
proper roles are assigned

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information
To test this PR:

1. Switch to the branch and navigate to the `core/` directory
1. Make sure to run `npx playwright install` if it has not been updated
recenly
1. Run `npm run test.e2e src/components/content/test/a11y/`
1. Verify that the tests pass
1. Remove my fix in `core/src/components/content/content.tsx` and run
the test again
1. Verify that the `should allow for custom role` tests fail
2024-08-07 14:57:29 +00:00
Brandy Carney
ab4f2791c1 fix(vue): pass router-link value to href to properly render clickable elements (#29745)
Issue number: N/A

---------

## What is the current behavior?
Ionic Framework Vue components using `router-link` do not apply an
`href` property which causes components to render `div` or `button`
elements when they should render an `a`. This is inconsistent with the
way Angular and Vue handle router link.

## What is the new behavior?
Updates `@stencil/vue-output-target` to latest which adds the code from
the following PR:
https://github.com/ionic-team/stencil-ds-output-targets/pull/446

The update in vue output target checks if `router-link` and `navManager`
are defined so this fix only applies to Ionic Framework components. If
both are defined then it adds the `href` property to the element with
the value of `router-link`.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

Dev build: `8.2.7-dev.11722629362.1ac136c4`
2024-08-05 21:35:26 +00:00
Brandy Carney
a9f278ad67 fix(item): router-link remains clickable with item cover (#29743)
Issue number: N/A

---------

## What is the current behavior?
Item includes `ion-anchor` in the list of clickable components it
queries. This component was renamed to `ion-router-link` in
[v5](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING_ARCHIVE/v5.md#anchor).

## What is the new behavior?
Updates the reference to `ion-anchor` to `ion-router-link` in
`ion-item`.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No
2024-08-05 14:49:51 +00:00
Steven Ribeiro
bfee3cd064 fix(react): add onPointerDown, onTouchEnd, add onTouchMove (#29736)
Issue number: resolves #29174

---------

## What is the current behavior?

React throws tab errors with `IonTabButton` when binding to
`onPointerDown`, `onTouchEnd` and `onTouchMove`

## What is the new behavior?

- Adds missing type definitions for `onPointerDown`, `onTouchEnd` and
`onTouchMove` to `IonTaButton`
- React does not throw type errors when binding callback functions to
these events

---------

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

---------

Co-authored-by: steven <sribeiro@gio.lu>
2024-08-02 21:53:13 +00:00
renovate[bot]
133995af79 chore(deps): update playwright (#29719)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type |
Update |
|---|---|---|---|---|---|---|---|
| [@playwright/test](https://playwright.dev)
([source](https://togithub.com/microsoft/playwright)) | [`^1.45.0` ->
`^1.45.3`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.45.0/1.45.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.45.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.45.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.45.0/1.45.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.45.0/1.45.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| mcr.microsoft.com/playwright | `v1.45.0` -> `v1.45.3` |
[![age](https://developer.mend.io/api/mc/badges/age/docker/mcr.microsoft.com%2fplaywright/v1.45.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/mcr.microsoft.com%2fplaywright/v1.45.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/mcr.microsoft.com%2fplaywright/v1.45.0/v1.45.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/mcr.microsoft.com%2fplaywright/v1.45.0/v1.45.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| final | patch |

---

### Release Notes

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

###
[`v1.45.3`](https://togithub.com/microsoft/playwright/compare/v1.45.2...0e130fa8edaf85765c4a5a86bded0e6d33bfd7c2)

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

###
[`v1.45.2`](https://togithub.com/microsoft/playwright/compare/v1.45.1...d8a5f3b33193e413b404ff4aa1f71e859d8f1b6b)

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

###
[`v1.45.1`](https://togithub.com/microsoft/playwright/compare/v1.45.0...e8989f83d9801cdaadc3803b5341c601c9593947)

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

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

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-02 20:55:34 +00:00
Sean Perkins
bf60712aaf chore(playwright): add click method to promise assertion lint checks (#29740)
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. -->

Ionic Framework has a set of custom lint assertions to avoid creating
flaky Playwright tests by forgetting to await a promise. However the
`click` method was not included in the original list of methods to
check.

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

- Developers will receive a lint error when forgetting to await click
methods from Playwright
- Resolves existing tests where this lint issue was present

## 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-07-31 15:35:09 +00:00
Brandy Carney
454e509cea merge release-8.2.6 (#29730)
v8.2.6

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2024-07-24 16:23:11 -04:00
Mikel Hamer
92ce563c40 fix(overlays): do not overwrite id set in htmlAttributes (#29722)
Issue number: resolves #29712

---------

<!-- 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?
In every type of overlay, the auto incremented overlay id is overwriting
any id set in htmlAttributes.

## What is the new behavior?
The id in htmlAttributes now takes precedence. 

## 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: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
2024-07-24 14:17:56 +00:00
Sean Perkins
05913c3cc3 fix(angular): add focusTrap prop to modal and popover (#29729)
Issue number: resolves #29728

---------

<!-- 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 `focusTrap` property was missed when adding focus trapping
configuration to the modal and popover. This results in a type error
when developers attempt to assign to the property.

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

- Adds `focusTrap` property to `ion-modal` and `ion-popover` for the
angular component wrappers
- Resolves type warnings when using the property in angular

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

Dev-build: `8.2.6-dev.11721672792.195afb09`
2024-07-24 14:14:58 +00:00
renovate[bot]
e344f7d709 chore(deps): update dependency @capacitor/core to v6.1.1 (#29727)
[![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)) | [`6.1.0` ->
`6.1.1`](https://renovatebot.com/diffs/npm/@capacitor%2fcore/6.1.0/6.1.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@capacitor%2fcore/6.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@capacitor%2fcore/6.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@capacitor%2fcore/6.1.0/6.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@capacitor%2fcore/6.1.0/6.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v6.1.1`](https://togithub.com/ionic-team/capacitor/blob/HEAD/CHANGELOG.md#611-2024-07-17)

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

##### Bug Fixes

- **android:** Allow WebView to load blob urls
([#&#8203;7551](https://togithub.com/ionic-team/capacitor/issues/7551))
([0dca917](0dca917da5))
- **android:** javascript injection not working on urls with query
([#&#8203;7545](https://togithub.com/ionic-team/capacitor/issues/7545))
([57ce5c6](57ce5c6556))
- **android:** send FormData on older devices
([#&#8203;7519](https://togithub.com/ionic-team/capacitor/issues/7519))
([de8b50d](de8b50dc1d))
- **android:** UTF-8 encode form data value
([#&#8203;7525](https://togithub.com/ionic-team/capacitor/issues/7525))
([a73ed31](a73ed318cd))
- **cli:** enable cleartext for live reload
([#&#8203;7563](https://togithub.com/ionic-team/capacitor/issues/7563))
([e06648f](e06648f456))
- **http:** handle UInt8Array on body
([#&#8203;7546](https://togithub.com/ionic-team/capacitor/issues/7546))
([cfb9ce1](cfb9ce1756))
- **ios:** make removeAllListeners accessible from javascript
([#&#8203;7566](https://togithub.com/ionic-team/capacitor/issues/7566))
([388a822](388a8223c6))
- **ios:** Match CapApp-SPM iOS version with project version
([#&#8203;7556](https://togithub.com/ionic-team/capacitor/issues/7556))
([df4dc9a](df4dc9a17f))

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-23 18:15:37 +00:00
76 changed files with 1058 additions and 518 deletions

View File

@@ -3,6 +3,37 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.2.7](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.7) (2024-08-13)
### Bug Fixes
* **alert:** do not overwrite id set in htmlAttributes ([#29708](https://github.com/ionic-team/ionic-framework/issues/29708)) ([1295ced](https://github.com/ionic-team/ionic-framework/commit/1295cedae9ffbcc40389c19499e58e7e21fb424e)), closes [#29704](https://github.com/ionic-team/ionic-framework/issues/29704)
* **angular:** add focusTrap prop to modal and popover ([#29729](https://github.com/ionic-team/ionic-framework/issues/29729)) ([05913c3](https://github.com/ionic-team/ionic-framework/commit/05913c3cc3f2e8cb91f9a0944cd55e78392b0ba3)), closes [#29728](https://github.com/ionic-team/ionic-framework/issues/29728)
* **angular:** remove the tabindex set by routerLink from Ionic components ([#29744](https://github.com/ionic-team/ionic-framework/issues/29744)) ([20073e1](https://github.com/ionic-team/ionic-framework/commit/20073e10c934d3704734195c72f4281c9b9658e3)), closes [#20632](https://github.com/ionic-team/ionic-framework/issues/20632)
* **content:** allow custom roles and aria attributes to be set on content ([#29753](https://github.com/ionic-team/ionic-framework/issues/29753)) ([7b16397](https://github.com/ionic-team/ionic-framework/commit/7b16397714be773fda28658ab4009755f545b735))
* **item:** router-link remains clickable with item cover ([#29743](https://github.com/ionic-team/ionic-framework/issues/29743)) ([a9f278a](https://github.com/ionic-team/ionic-framework/commit/a9f278ad67758a19e0e12ce7ed6d13eb573b0765))
* **overlays:** do not overwrite id set in htmlAttributes ([#29722](https://github.com/ionic-team/ionic-framework/issues/29722)) ([92ce563](https://github.com/ionic-team/ionic-framework/commit/92ce563c402e557b08a622bd20f78459782312e2)), closes [#29712](https://github.com/ionic-team/ionic-framework/issues/29712)
* **react:** add onPointerDown, onTouchEnd, add onTouchMove ([#29736](https://github.com/ionic-team/ionic-framework/issues/29736)) ([bfee3cd](https://github.com/ionic-team/ionic-framework/commit/bfee3cd064a9b495489c2679ccfb762e622dbf09)), closes [#29174](https://github.com/ionic-team/ionic-framework/issues/29174)
* **vue:** pass router-link value to href to properly render clickable elements ([#29745](https://github.com/ionic-team/ionic-framework/issues/29745)) ([ab4f279](https://github.com/ionic-team/ionic-framework/commit/ab4f2791c1968adbb1d858c5f009fa251bb9101b))
## [8.2.6](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.6) (2024-07-24)
### Bug Fixes
* **alert:** do not overwrite id set in htmlAttributes ([#29708](https://github.com/ionic-team/ionic-framework/issues/29708)) ([1295ced](https://github.com/ionic-team/ionic-framework/commit/1295cedae9ffbcc40389c19499e58e7e21fb424e)), closes [#29704](https://github.com/ionic-team/ionic-framework/issues/29704)
* **angular:** add focusTrap prop to modal and popover ([#29729](https://github.com/ionic-team/ionic-framework/issues/29729)) ([05913c3](https://github.com/ionic-team/ionic-framework/commit/05913c3cc3f2e8cb91f9a0944cd55e78392b0ba3)), closes [#29728](https://github.com/ionic-team/ionic-framework/issues/29728)
* **overlays:** do not overwrite id set in htmlAttributes ([#29722](https://github.com/ionic-team/ionic-framework/issues/29722)) ([92ce563](https://github.com/ionic-team/ionic-framework/commit/92ce563c402e557b08a622bd20f78459782312e2)), closes [#29712](https://github.com/ionic-team/ionic-framework/issues/29712)
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)

View File

@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.2.7](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.7) (2024-08-13)
### Bug Fixes
* **alert:** do not overwrite id set in htmlAttributes ([#29708](https://github.com/ionic-team/ionic-framework/issues/29708)) ([1295ced](https://github.com/ionic-team/ionic-framework/commit/1295cedae9ffbcc40389c19499e58e7e21fb424e)), closes [#29704](https://github.com/ionic-team/ionic-framework/issues/29704)
* **content:** allow custom roles and aria attributes to be set on content ([#29753](https://github.com/ionic-team/ionic-framework/issues/29753)) ([7b16397](https://github.com/ionic-team/ionic-framework/commit/7b16397714be773fda28658ab4009755f545b735))
* **item:** router-link remains clickable with item cover ([#29743](https://github.com/ionic-team/ionic-framework/issues/29743)) ([a9f278a](https://github.com/ionic-team/ionic-framework/commit/a9f278ad67758a19e0e12ce7ed6d13eb573b0765))
* **overlays:** do not overwrite id set in htmlAttributes ([#29722](https://github.com/ionic-team/ionic-framework/issues/29722)) ([92ce563](https://github.com/ionic-team/ionic-framework/commit/92ce563c402e557b08a622bd20f78459782312e2)), closes [#29712](https://github.com/ionic-team/ionic-framework/issues/29712)
* **vue:** pass router-link value to href to properly render clickable elements ([#29745](https://github.com/ionic-team/ionic-framework/issues/29745)) ([ab4f279](https://github.com/ionic-team/ionic-framework/commit/ab4f2791c1968adbb1d858c5f009fa251bb9101b))
## [8.2.6](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.6) (2024-07-24)
### Bug Fixes
* **alert:** do not overwrite id set in htmlAttributes ([#29708](https://github.com/ionic-team/ionic-framework/issues/29708)) ([1295ced](https://github.com/ionic-team/ionic-framework/commit/1295cedae9ffbcc40389c19499e58e7e21fb424e)), closes [#29704](https://github.com/ionic-team/ionic-framework/issues/29704)
* **overlays:** do not overwrite id set in htmlAttributes ([#29722](https://github.com/ionic-team/ionic-framework/issues/29722)) ([92ce563](https://github.com/ionic-team/ionic-framework/commit/92ce563c402e557b08a622bd20f78459782312e2)), closes [#29712](https://github.com/ionic-team/ionic-framework/issues/29712)
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)
**Note:** Version bump only for package @ionic/core

View File

@@ -1,5 +1,5 @@
# Get Playwright
FROM mcr.microsoft.com/playwright:v1.45.0
FROM mcr.microsoft.com/playwright:v1.45.3
# Set the working directory
WORKDIR /ionic

View File

@@ -67,4 +67,5 @@ const ASYNC_PLAYWRIGHT_ASSERTS = [
'toHaveTitle',
'toHaveURL',
'toBeOK',
'click'
];

130
core/package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@ionic/core",
"version": "8.2.5",
"version": "8.2.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/core",
"version": "8.2.5",
"version": "8.2.7",
"license": "MIT",
"dependencies": {
"@stencil/core": "^4.19.2",
@@ -22,13 +22,13 @@
"@clack/prompts": "^0.7.0",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^2.0.0",
"@playwright/test": "^1.45.0",
"@playwright/test": "^1.45.3",
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-virtual": "^2.0.3",
"@stencil/angular-output-target": "^0.8.4",
"@stencil/react-output-target": "^0.5.3",
"@stencil/sass": "^3.0.9",
"@stencil/vue-output-target": "^0.8.7",
"@stencil/vue-output-target": "^0.8.9",
"@types/jest": "^29.5.6",
"@types/node": "^14.6.0",
"@typescript-eslint/eslint-plugin": "^6.7.2",
@@ -661,36 +661,36 @@
"dev": true
},
"node_modules/@capacitor/core": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-6.1.0.tgz",
"integrity": "sha512-Kt4ONm0X9xxJXn9Q73oBaKdzep5B/VJw3VjXa2eGul4cD2k37mJwgjpXSMRnLH0Aju5bCiRL8J/hMAfTlokO6A==",
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-6.1.2.tgz",
"integrity": "sha512-xFy1/4qLFLp5WCIzIhtwUuVNNoz36+V7/BzHmLqgVJcvotc4MMjswW/TshnPQaLLujEOaLkA4h8ZJ0uoK3ImGg==",
"dev": true,
"dependencies": {
"tslib": "^2.1.0"
}
},
"node_modules/@capacitor/haptics": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@capacitor/haptics/-/haptics-6.0.0.tgz",
"integrity": "sha512-z2TmB+pTbd98Il2I1xpZGClCFwORxxP2m9f1a0rh70c2ubj2atVyZctgxrx1fuoExZTNGSxHaylWfrmjmtelVg==",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@capacitor/haptics/-/haptics-6.0.1.tgz",
"integrity": "sha512-Q8hedLwfwTSWEYc3eoATzkdKHBaIceYe5bd7FjxQCENNH0is5Ft0EjSRPz/xpTn39ebK0ooZBDBCwsyl6tjiTA==",
"dev": true,
"peerDependencies": {
"@capacitor/core": "^6.0.0"
}
},
"node_modules/@capacitor/keyboard": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@capacitor/keyboard/-/keyboard-6.0.1.tgz",
"integrity": "sha512-fBjqQaMc5uhFj6ycLnLa2hzQsR77pj/iuLLATkWihMUze3dD+IkwqFnEyOLsyk+52uoOYM7WkziSpNTquU1sZA==",
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@capacitor/keyboard/-/keyboard-6.0.2.tgz",
"integrity": "sha512-fOfO3rQ0ZXuTHpK03INVTwmBnpqMiH8EHPpNaHjwjKwdrVRWBvtgIFhuyHNXh53rdcXw+uHB+1RIiNabnCrITw==",
"dev": true,
"peerDependencies": {
"@capacitor/core": "^6.0.0"
}
},
"node_modules/@capacitor/status-bar": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@capacitor/status-bar/-/status-bar-6.0.0.tgz",
"integrity": "sha512-Wo0ILugYlmENegKDgTzVCPjbvP8h1ObgHslLdgeVG643ViMS/diausHIq8e104WIKCXtKIELmQeYVp9mX7932g==",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@capacitor/status-bar/-/status-bar-6.0.1.tgz",
"integrity": "sha512-Usd9hZZQVAqy+jJfL7jRcYI7dcsxN09Na1yttwdl+F1bk3Ztoukk7CGPDm5VgKUSs53ihQBOy1+sczCACxhNiw==",
"dev": true,
"peerDependencies": {
"@capacitor/core": "^6.0.0"
@@ -723,6 +723,7 @@
},
"node_modules/@clack/prompts/node_modules/is-unicode-supported": {
"version": "1.3.0",
"dev": true,
"inBundle": true,
"license": "MIT",
"engines": {
@@ -1728,12 +1729,12 @@
}
},
"node_modules/@playwright/test": {
"version": "1.45.0",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.45.0.tgz",
"integrity": "sha512-TVYsfMlGAaxeUllNkywbwek67Ncf8FRGn8ZlRdO291OL3NjG9oMbfVhyP82HQF0CZLMrYsvesqoUekxdWuF9Qw==",
"version": "1.45.3",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.45.3.tgz",
"integrity": "sha512-UKF4XsBfy+u3MFWEH44hva1Q8Da28G6RFtR2+5saw+jgAFQV5yYnB1fu68Mz7fO+5GJF3wgwAIs0UelU8TxFrA==",
"dev": true,
"dependencies": {
"playwright": "1.45.0"
"playwright": "1.45.3"
},
"bin": {
"playwright": "cli.js"
@@ -1823,9 +1824,9 @@
}
},
"node_modules/@stencil/core": {
"version": "4.19.2",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.19.2.tgz",
"integrity": "sha512-ZdnbHmHEl8E5vN0GWDtONe5w6j3CrSqqxZM4hNLBPkV/aouWKug7D5/Mi6RazfYO5U4fmHQYLwMz60rHcx0G4g==",
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.20.0.tgz",
"integrity": "sha512-WPrTHFngvN081RY+dJPneKQLwnOFD60OMCOQGmmSHfCW0f4ujPMzzhwWU1gcSwXPWXz5O+8cBiiCaxAbJU7kAg==",
"bin": {
"stencil": "bin/stencil"
},
@@ -1857,9 +1858,9 @@
}
},
"node_modules/@stencil/vue-output-target": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@stencil/vue-output-target/-/vue-output-target-0.8.8.tgz",
"integrity": "sha512-xrpz92lmTuLgwY9CLgl2Q14+zBXfBuXiRS6uXFPfeaFo0pe+do8cZitOOQ8i8tcoCa/tAqgD9B9CD+yQehSIGg==",
"version": "0.8.9",
"resolved": "https://registry.npmjs.org/@stencil/vue-output-target/-/vue-output-target-0.8.9.tgz",
"integrity": "sha512-1yuapCWYViLlxGlEaeta2wryq4M5zZxxBa+4rEBp54VwW2W/trlzPv0IJyw6I3Il51rHYm2WmWlBLOGmoMyW9Q==",
"dev": true,
"peerDependencies": {
"@stencil/core": ">=2.0.0 || >=3 || >= 4.0.0-beta.0 || >= 4.0.0"
@@ -8259,12 +8260,12 @@
}
},
"node_modules/playwright": {
"version": "1.45.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.45.0.tgz",
"integrity": "sha512-4z3ac3plDfYzGB6r0Q3LF8POPR20Z8D0aXcxbJvmfMgSSq1hkcgvFRXJk9rUq5H/MJ0Ktal869hhOdI/zUTeLA==",
"version": "1.45.3",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.45.3.tgz",
"integrity": "sha512-QhVaS+lpluxCaioejDZ95l4Y4jSFCsBvl2UZkpeXlzxmqS+aABr5c82YmfMHrL6x27nvrvykJAFpkzT2eWdJww==",
"dev": true,
"dependencies": {
"playwright-core": "1.45.0"
"playwright-core": "1.45.3"
},
"bin": {
"playwright": "cli.js"
@@ -8277,9 +8278,9 @@
}
},
"node_modules/playwright-core": {
"version": "1.45.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.45.0.tgz",
"integrity": "sha512-lZmHlFQ0VYSpAs43dRq1/nJ9G/6SiTI7VPqidld9TDefL9tX87bTKExWZZUF5PeRyqtXqd8fQi2qmfIedkwsNQ==",
"version": "1.45.3",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.45.3.tgz",
"integrity": "sha512-+ym0jNbcjikaOwwSZycFbwkWgfruWvYlJfThKYAlImbxUgdWFO2oW70ojPm4OpE4t6TAo2FY/smM+hpVTtkhDA==",
"dev": true,
"bin": {
"playwright-core": "cli.js"
@@ -10740,32 +10741,32 @@
"dev": true
},
"@capacitor/core": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-6.1.0.tgz",
"integrity": "sha512-Kt4ONm0X9xxJXn9Q73oBaKdzep5B/VJw3VjXa2eGul4cD2k37mJwgjpXSMRnLH0Aju5bCiRL8J/hMAfTlokO6A==",
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/@capacitor/core/-/core-6.1.2.tgz",
"integrity": "sha512-xFy1/4qLFLp5WCIzIhtwUuVNNoz36+V7/BzHmLqgVJcvotc4MMjswW/TshnPQaLLujEOaLkA4h8ZJ0uoK3ImGg==",
"dev": true,
"requires": {
"tslib": "^2.1.0"
}
},
"@capacitor/haptics": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@capacitor/haptics/-/haptics-6.0.0.tgz",
"integrity": "sha512-z2TmB+pTbd98Il2I1xpZGClCFwORxxP2m9f1a0rh70c2ubj2atVyZctgxrx1fuoExZTNGSxHaylWfrmjmtelVg==",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@capacitor/haptics/-/haptics-6.0.1.tgz",
"integrity": "sha512-Q8hedLwfwTSWEYc3eoATzkdKHBaIceYe5bd7FjxQCENNH0is5Ft0EjSRPz/xpTn39ebK0ooZBDBCwsyl6tjiTA==",
"dev": true,
"requires": {}
},
"@capacitor/keyboard": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@capacitor/keyboard/-/keyboard-6.0.1.tgz",
"integrity": "sha512-fBjqQaMc5uhFj6ycLnLa2hzQsR77pj/iuLLATkWihMUze3dD+IkwqFnEyOLsyk+52uoOYM7WkziSpNTquU1sZA==",
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@capacitor/keyboard/-/keyboard-6.0.2.tgz",
"integrity": "sha512-fOfO3rQ0ZXuTHpK03INVTwmBnpqMiH8EHPpNaHjwjKwdrVRWBvtgIFhuyHNXh53rdcXw+uHB+1RIiNabnCrITw==",
"dev": true,
"requires": {}
},
"@capacitor/status-bar": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@capacitor/status-bar/-/status-bar-6.0.0.tgz",
"integrity": "sha512-Wo0ILugYlmENegKDgTzVCPjbvP8h1ObgHslLdgeVG643ViMS/diausHIq8e104WIKCXtKIELmQeYVp9mX7932g==",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@capacitor/status-bar/-/status-bar-6.0.1.tgz",
"integrity": "sha512-Usd9hZZQVAqy+jJfL7jRcYI7dcsxN09Na1yttwdl+F1bk3Ztoukk7CGPDm5VgKUSs53ihQBOy1+sczCACxhNiw==",
"dev": true,
"requires": {}
},
@@ -10793,7 +10794,8 @@
"dependencies": {
"is-unicode-supported": {
"version": "1.3.0",
"bundled": true
"bundled": true,
"dev": true
}
}
},
@@ -11508,12 +11510,12 @@
}
},
"@playwright/test": {
"version": "1.45.0",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.45.0.tgz",
"integrity": "sha512-TVYsfMlGAaxeUllNkywbwek67Ncf8FRGn8ZlRdO291OL3NjG9oMbfVhyP82HQF0CZLMrYsvesqoUekxdWuF9Qw==",
"version": "1.45.3",
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.45.3.tgz",
"integrity": "sha512-UKF4XsBfy+u3MFWEH44hva1Q8Da28G6RFtR2+5saw+jgAFQV5yYnB1fu68Mz7fO+5GJF3wgwAIs0UelU8TxFrA==",
"dev": true,
"requires": {
"playwright": "1.45.0"
"playwright": "1.45.3"
}
},
"@rollup/plugin-node-resolve": {
@@ -11581,9 +11583,9 @@
"requires": {}
},
"@stencil/core": {
"version": "4.19.2",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.19.2.tgz",
"integrity": "sha512-ZdnbHmHEl8E5vN0GWDtONe5w6j3CrSqqxZM4hNLBPkV/aouWKug7D5/Mi6RazfYO5U4fmHQYLwMz60rHcx0G4g=="
"version": "4.20.0",
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.20.0.tgz",
"integrity": "sha512-WPrTHFngvN081RY+dJPneKQLwnOFD60OMCOQGmmSHfCW0f4ujPMzzhwWU1gcSwXPWXz5O+8cBiiCaxAbJU7kAg=="
},
"@stencil/react-output-target": {
"version": "0.5.3",
@@ -11600,9 +11602,9 @@
"requires": {}
},
"@stencil/vue-output-target": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@stencil/vue-output-target/-/vue-output-target-0.8.8.tgz",
"integrity": "sha512-xrpz92lmTuLgwY9CLgl2Q14+zBXfBuXiRS6uXFPfeaFo0pe+do8cZitOOQ8i8tcoCa/tAqgD9B9CD+yQehSIGg==",
"version": "0.8.9",
"resolved": "https://registry.npmjs.org/@stencil/vue-output-target/-/vue-output-target-0.8.9.tgz",
"integrity": "sha512-1yuapCWYViLlxGlEaeta2wryq4M5zZxxBa+4rEBp54VwW2W/trlzPv0IJyw6I3Il51rHYm2WmWlBLOGmoMyW9Q==",
"dev": true,
"requires": {}
},
@@ -16232,19 +16234,19 @@
}
},
"playwright": {
"version": "1.45.0",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.45.0.tgz",
"integrity": "sha512-4z3ac3plDfYzGB6r0Q3LF8POPR20Z8D0aXcxbJvmfMgSSq1hkcgvFRXJk9rUq5H/MJ0Ktal869hhOdI/zUTeLA==",
"version": "1.45.3",
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.45.3.tgz",
"integrity": "sha512-QhVaS+lpluxCaioejDZ95l4Y4jSFCsBvl2UZkpeXlzxmqS+aABr5c82YmfMHrL6x27nvrvykJAFpkzT2eWdJww==",
"dev": true,
"requires": {
"fsevents": "2.3.2",
"playwright-core": "1.45.0"
"playwright-core": "1.45.3"
}
},
"playwright-core": {
"version": "1.45.0",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.45.0.tgz",
"integrity": "sha512-lZmHlFQ0VYSpAs43dRq1/nJ9G/6SiTI7VPqidld9TDefL9tX87bTKExWZZUF5PeRyqtXqd8fQi2qmfIedkwsNQ==",
"version": "1.45.3",
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.45.3.tgz",
"integrity": "sha512-+ym0jNbcjikaOwwSZycFbwkWgfruWvYlJfThKYAlImbxUgdWFO2oW70ojPm4OpE4t6TAo2FY/smM+hpVTtkhDA==",
"dev": true
},
"postcss": {
@@ -17743,4 +17745,4 @@
"dev": true
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "8.2.5",
"version": "8.2.7",
"description": "Base components for Ionic",
"keywords": [
"ionic",
@@ -44,13 +44,13 @@
"@clack/prompts": "^0.7.0",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^2.0.0",
"@playwright/test": "^1.45.0",
"@playwright/test": "^1.45.3",
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-virtual": "^2.0.3",
"@stencil/angular-output-target": "^0.8.4",
"@stencil/react-output-target": "^0.5.3",
"@stencil/sass": "^3.0.9",
"@stencil/vue-output-target": "^0.8.7",
"@stencil/vue-output-target": "^0.8.9",
"@types/jest": "^29.5.6",
"@types/node": "^14.6.0",
"@typescript-eslint/eslint-plugin": "^6.7.2",

View File

@@ -48,7 +48,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ config, title }) => {
await expect(accordion).toHaveClass(/accordion-collapsed/);
accordion.click();
await accordion.click();
await page.waitForChanges();
await expect(accordion).toHaveClass(/accordion-collapsed/);
@@ -71,7 +71,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ config, title }) => {
await expect(accordion).toHaveClass(/accordion-collapsed/);
accordion.click();
await accordion.click();
await page.waitForChanges();
await expect(accordion).toHaveClass(/accordion-collapsed/);

View File

@@ -48,7 +48,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ config, title }) => {
await expect(accordion).toHaveClass(/accordion-collapsed/);
accordion.click();
await accordion.click();
await page.waitForChanges();
await expect(accordion).toHaveClass(/accordion-collapsed/);
@@ -71,7 +71,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ config, title }) => {
await expect(accordion).toHaveClass(/accordion-collapsed/);
accordion.click();
await accordion.click();
await page.waitForChanges();
await expect(accordion).toHaveClass(/accordion-collapsed/);

View File

@@ -310,7 +310,9 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
}
componentWillLoad() {
setOverlayId(this.el);
if (!this.htmlAttributes?.id) {
setOverlayId(this.el);
}
}
componentDidLoad() {

View File

@@ -1,41 +0,0 @@
import { newSpecPage } from '@stencil/core/testing';
import { ActionSheet } from '../action-sheet';
it('action sheet should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [ActionSheet],
html: `<ion-action-sheet is-open="true"></ion-action-sheet>`,
});
let actionSheet: HTMLIonActionSheetElement;
actionSheet = page.body.querySelector('ion-action-sheet')!;
expect(actionSheet).not.toBe(null);
expect(actionSheet.getAttribute('id')).toBe('ion-overlay-1');
// Remove the action sheet from the DOM
actionSheet.remove();
await page.waitForChanges();
// Create a new action sheet to verify the id is incremented
actionSheet = document.createElement('ion-action-sheet');
actionSheet.isOpen = true;
page.body.appendChild(actionSheet);
await page.waitForChanges();
actionSheet = page.body.querySelector('ion-action-sheet')!;
expect(actionSheet.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same action sheet again should reuse the existing id
actionSheet.isOpen = false;
await page.waitForChanges();
actionSheet.isOpen = true;
await page.waitForChanges();
actionSheet = page.body.querySelector('ion-action-sheet')!;
expect(actionSheet.getAttribute('id')).toBe('ion-overlay-2');
});

View File

@@ -0,0 +1,55 @@
import { newSpecPage } from '@stencil/core/testing';
import { ActionSheet } from '../action-sheet';
import { h } from '@stencil/core';
describe('action-sheet: id', () => {
it('action sheet should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [ActionSheet],
html: `<ion-action-sheet is-open="true"></ion-action-sheet>`,
});
let actionSheet: HTMLIonActionSheetElement;
actionSheet = page.body.querySelector('ion-action-sheet')!;
expect(actionSheet).not.toBe(null);
expect(actionSheet.getAttribute('id')).toBe('ion-overlay-1');
// Remove the action sheet from the DOM
actionSheet.remove();
await page.waitForChanges();
// Create a new action sheet to verify the id is incremented
actionSheet = document.createElement('ion-action-sheet');
actionSheet.isOpen = true;
page.body.appendChild(actionSheet);
await page.waitForChanges();
actionSheet = page.body.querySelector('ion-action-sheet')!;
expect(actionSheet.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same action sheet again should reuse the existing id
actionSheet.isOpen = false;
await page.waitForChanges();
actionSheet.isOpen = true;
await page.waitForChanges();
actionSheet = page.body.querySelector('ion-action-sheet')!;
expect(actionSheet.getAttribute('id')).toBe('ion-overlay-2');
});
it('should not overwrite the id set in htmlAttributes', async () => {
const id = 'custom-id';
const page = await newSpecPage({
components: [ActionSheet],
template: () => <ion-action-sheet htmlAttributes={{ id }} overlayIndex={-1}></ion-action-sheet>,
});
const alert = page.body.querySelector('ion-action-sheet')!;
expect(alert.id).toBe(id);
});
});

View File

@@ -1,41 +0,0 @@
import { newSpecPage } from '@stencil/core/testing';
import { Alert } from '../alert';
it('alert should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Alert],
html: `<ion-alert is-open="true"></ion-alert>`,
});
let alert: HTMLIonAlertElement;
alert = page.body.querySelector('ion-alert')!;
expect(alert).not.toBe(null);
expect(alert.getAttribute('id')).toBe('ion-overlay-1');
// Remove the alert from the DOM
alert.remove();
await page.waitForChanges();
// Create a new alert to verify the id is incremented
alert = document.createElement('ion-alert');
alert.isOpen = true;
page.body.appendChild(alert);
await page.waitForChanges();
alert = page.body.querySelector('ion-alert')!;
expect(alert.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same alert again should reuse the existing id
alert.isOpen = false;
await page.waitForChanges();
alert.isOpen = true;
await page.waitForChanges();
alert = page.body.querySelector('ion-alert')!;
expect(alert.getAttribute('id')).toBe('ion-overlay-2');
});

View File

@@ -0,0 +1,55 @@
import { newSpecPage } from '@stencil/core/testing';
import { Alert } from '../alert';
import { h } from '@stencil/core';
describe('alert: id', () => {
it('alert should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Alert],
html: `<ion-alert is-open="true"></ion-alert>`,
});
let alert: HTMLIonAlertElement;
alert = page.body.querySelector('ion-alert')!;
expect(alert).not.toBe(null);
expect(alert.getAttribute('id')).toBe('ion-overlay-1');
// Remove the alert from the DOM
alert.remove();
await page.waitForChanges();
// Create a new alert to verify the id is incremented
alert = document.createElement('ion-alert');
alert.isOpen = true;
page.body.appendChild(alert);
await page.waitForChanges();
alert = page.body.querySelector('ion-alert')!;
expect(alert.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same alert again should reuse the existing id
alert.isOpen = false;
await page.waitForChanges();
alert.isOpen = true;
await page.waitForChanges();
alert = page.body.querySelector('ion-alert')!;
expect(alert.getAttribute('id')).toBe('ion-overlay-2');
});
it('should not overwrite the id set in htmlAttributes', async () => {
const id = 'custom-id';
const page = await newSpecPage({
components: [Alert],
template: () => <ion-alert htmlAttributes={{ id }} overlayIndex={-1}></ion-alert>,
});
const alert = page.body.querySelector('ion-alert')!;
expect(alert.id).toBe(id);
});
});

View File

@@ -2,7 +2,6 @@ import { newSpecPage } from '@stencil/core/testing';
import { config } from '../../../global/config';
import { Alert } from '../alert';
import { h } from '@stencil/core';
describe('alert: custom html', () => {
it('should not allow for custom html by default', async () => {
@@ -39,15 +38,4 @@ describe('alert: custom html', () => {
expect(content.textContent).toContain('Custom Text');
expect(content.querySelector('button.custom-html')).toBe(null);
});
it('should not overwrite the id set in htmlAttributes', async () => {
const id = 'custom-id';
const page = await newSpecPage({
components: [Alert],
template: () => <ion-alert htmlAttributes={{ id }} overlayIndex={-1}></ion-alert>,
});
const alert = page.body.querySelector('ion-alert')!;
expect(alert.id).toBe(id);
});
});

View File

@@ -1,6 +1,7 @@
import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Build, Component, Element, Event, Host, Listen, Method, Prop, forceUpdate, h, readTask } from '@stencil/core';
import { componentOnReady, hasLazyBuild } from '@utils/helpers';
import { componentOnReady, hasLazyBuild, inheritAriaAttributes } from '@utils/helpers';
import type { Attributes } from '@utils/helpers';
import { isPlatform } from '@utils/platform';
import { isRTL } from '@utils/rtl';
import { createColorClasses, hostContext } from '@utils/theme';
@@ -33,6 +34,7 @@ export class Content implements ComponentInterface {
private backgroundContentEl?: HTMLElement;
private isMainContent = true;
private resizeTimeout: ReturnType<typeof setTimeout> | null = null;
private inheritedAttributes: Attributes = {};
private tabsElement: HTMLElement | null = null;
private tabsLoadCallback?: () => void;
@@ -125,6 +127,10 @@ export class Content implements ComponentInterface {
*/
@Event() ionScrollEnd!: EventEmitter<ScrollBaseDetail>;
componentWillLoad() {
this.inheritedAttributes = inheritAriaAttributes(this.el);
}
connectedCallback() {
this.isMainContent = this.el.closest('ion-menu, ion-popover, ion-modal') === null;
@@ -432,7 +438,7 @@ export class Content implements ComponentInterface {
}
render() {
const { fixedSlotPlacement, isMainContent, scrollX, scrollY, el } = this;
const { fixedSlotPlacement, inheritedAttributes, isMainContent, scrollX, scrollY, el } = this;
const rtl = isRTL(el) ? 'rtl' : 'ltr';
const mode = getIonMode(this);
const forceOverscroll = this.shouldForceOverscroll();
@@ -453,6 +459,7 @@ export class Content implements ComponentInterface {
'--offset-top': `${this.cTop}px`,
'--offset-bottom': `${this.cBottom}px`,
}}
{...inheritedAttributes}
>
<div ref={(el) => (this.backgroundContentEl = el)} id="background-content" part="background"></div>

View File

@@ -0,0 +1,67 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
/**
* Content does not have mode-specific styling
*/
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
test.describe(title('content: a11y'), () => {
test('should have the main role', async ({ page }) => {
await page.setContent(
`
<ion-content></ion-content>
`,
config
);
const content = page.locator('ion-content');
await expect(content).toHaveAttribute('role', 'main');
});
test('should have no role in popover', async ({ page }) => {
await page.setContent(
`
<ion-popover>
<ion-content></ion-content>
</ion-popover>
`,
config
);
const content = page.locator('ion-content');
/**
* Playwright can't do .not.toHaveAttribute() because a value is expected,
* and toHaveAttribute can't accept a value of type null.
*/
const role = await content.getAttribute('role');
expect(role).toBeNull();
});
test('should allow for custom role', async ({ page }) => {
await page.setContent(
`
<ion-content role="complementary"></ion-content>
`,
config
);
const content = page.locator('ion-content');
await expect(content).toHaveAttribute('role', 'complementary');
});
test('should allow for custom role in popover', async ({ page }) => {
await page.setContent(
`
<ion-popover>
<ion-content role="complementary"></ion-content>
</ion-popover>
`,
config
);
const content = page.locator('ion-content');
await expect(content).toHaveAttribute('role', 'complementary');
});
});
});

View File

@@ -0,0 +1,33 @@
import { expect } from '@playwright/test';
import { configs, test } from '@utils/test/playwright';
/**
* Footer does not have mode-specific styling
*/
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
test.describe(title('footer: a11y'), () => {
test('should have the contentinfo role', async ({ page }) => {
await page.setContent(
`
<ion-footer></ion-footer>
`,
config
);
const footer = page.locator('ion-footer');
await expect(footer).toHaveAttribute('role', 'contentinfo');
});
test('should allow for custom role', async ({ page }) => {
await page.setContent(
`
<ion-footer role="complementary"></ion-footer>
`,
config
);
const footer = page.locator('ion-footer');
await expect(footer).toHaveAttribute('role', 'complementary');
});
});
});

View File

@@ -15,20 +15,56 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
expect(results.violations).toEqual([]);
});
test('should allow for custom role', async ({ page }) => {
/**
* Note: This example should not be used in production.
* This only serves to check that `role` can be customized.
*/
test('should have the banner role', async ({ page }) => {
await page.setContent(
`
<ion-header role="heading"></ion-header>
<ion-header></ion-header>
`,
config
);
const header = page.locator('ion-header');
await expect(header).toHaveAttribute('role', 'heading');
await expect(header).toHaveAttribute('role', 'banner');
});
test('should have no role in menu', async ({ page }) => {
await page.setContent(
`
<ion-menu>
<ion-header></ion-header>
</ion-menu>
`,
config
);
const header = page.locator('ion-header');
await expect(header).toHaveAttribute('role', 'none');
});
test('should allow for custom role', async ({ page }) => {
await page.setContent(
`
<ion-header role="complementary"></ion-header>
`,
config
);
const header = page.locator('ion-header');
await expect(header).toHaveAttribute('role', 'complementary');
});
test('should allow for custom role in menu', async ({ page }) => {
await page.setContent(
`
<ion-menu>
<ion-header role="complementary"></ion-header>
</ion-menu>
`,
config
);
const header = page.locator('ion-header');
await expect(header).toHaveAttribute('role', 'complementary');
});
});
});

View File

@@ -191,7 +191,7 @@ export class Item implements ComponentInterface, AnchorInterface, ButtonInterfac
);
// The following elements should also stay clickable when an input with cover is present
const clickables = this.el.querySelectorAll('ion-anchor, ion-button, a, button');
const clickables = this.el.querySelectorAll('ion-router-link, ion-button, a, button');
// Check for multiple inputs to change the position of the input cover to relative
// for all of the covered inputs above

View File

@@ -214,7 +214,9 @@ export class Loading implements ComponentInterface, OverlayInterface {
const mode = getIonMode(this);
this.spinner = config.get('loadingSpinner', config.get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
}
setOverlayId(this.el);
if (!this.htmlAttributes?.id) {
setOverlayId(this.el);
}
}
componentDidLoad() {

View File

@@ -1,41 +0,0 @@
import { newSpecPage } from '@stencil/core/testing';
import { Loading } from '../loading';
it('loading should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Loading],
html: `<ion-loading is-open="true"></ion-loading>`,
});
let loading: HTMLIonLoadingElement;
loading = page.body.querySelector('ion-loading')!;
expect(loading).not.toBe(null);
expect(loading.getAttribute('id')).toBe('ion-overlay-1');
// Remove the loading from the DOM
loading.remove();
await page.waitForChanges();
// Create a new loading to verify the id is incremented
loading = document.createElement('ion-loading');
loading.isOpen = true;
page.body.appendChild(loading);
await page.waitForChanges();
loading = page.body.querySelector('ion-loading')!;
expect(loading.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same loading again should reuse the existing id
loading.isOpen = false;
await page.waitForChanges();
loading.isOpen = true;
await page.waitForChanges();
loading = page.body.querySelector('ion-loading')!;
expect(loading.getAttribute('id')).toBe('ion-overlay-2');
});

View File

@@ -0,0 +1,55 @@
import { newSpecPage } from '@stencil/core/testing';
import { Loading } from '../loading';
import { h } from '@stencil/core';
describe('loading: id', () => {
it('loading should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Loading],
html: `<ion-loading is-open="true"></ion-loading>`,
});
let loading: HTMLIonLoadingElement;
loading = page.body.querySelector('ion-loading')!;
expect(loading).not.toBe(null);
expect(loading.getAttribute('id')).toBe('ion-overlay-1');
// Remove the loading from the DOM
loading.remove();
await page.waitForChanges();
// Create a new loading to verify the id is incremented
loading = document.createElement('ion-loading');
loading.isOpen = true;
page.body.appendChild(loading);
await page.waitForChanges();
loading = page.body.querySelector('ion-loading')!;
expect(loading.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same loading again should reuse the existing id
loading.isOpen = false;
await page.waitForChanges();
loading.isOpen = true;
await page.waitForChanges();
loading = page.body.querySelector('ion-loading')!;
expect(loading.getAttribute('id')).toBe('ion-overlay-2');
});
it('should not overwrite the id set in htmlAttributes', async () => {
const id = 'custom-id';
const page = await newSpecPage({
components: [Loading],
template: () => <ion-loading htmlAttributes={{ id }} overlayIndex={-1}></ion-loading>,
});
const alert = page.body.querySelector('ion-loading')!;
expect(alert.id).toBe(id);
});
});

View File

@@ -415,7 +415,9 @@ export class Modal implements ComponentInterface, OverlayInterface {
printIonWarning('Your breakpoints array must include the initialBreakpoint value.');
}
setOverlayId(el);
if (!this.htmlAttributes?.id) {
setOverlayId(this.el);
}
}
componentDidLoad() {

View File

@@ -1,41 +0,0 @@
import { newSpecPage } from '@stencil/core/testing';
import { Modal } from '../modal';
it('modal should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Modal],
html: `<ion-modal is-open="true"></ion-modal>`,
});
let modal: HTMLIonModalElement;
modal = page.body.querySelector('ion-modal')!;
expect(modal).not.toBe(null);
expect(modal.getAttribute('id')).toBe('ion-overlay-1');
// Remove the modal from the DOM
modal.remove();
await page.waitForChanges();
// Create a new modal to verify the id is incremented
modal = document.createElement('ion-modal');
modal.isOpen = true;
page.body.appendChild(modal);
await page.waitForChanges();
modal = page.body.querySelector('ion-modal')!;
expect(modal.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same modal again should reuse the existing id
modal.isOpen = false;
await page.waitForChanges();
modal.isOpen = true;
await page.waitForChanges();
modal = page.body.querySelector('ion-modal')!;
expect(modal.getAttribute('id')).toBe('ion-overlay-2');
});

View File

@@ -0,0 +1,55 @@
import { newSpecPage } from '@stencil/core/testing';
import { Modal } from '../modal';
import { h } from '@stencil/core';
describe('modal: id', () => {
it('modal should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Modal],
html: `<ion-modal is-open="true"></ion-modal>`,
});
let modal: HTMLIonModalElement;
modal = page.body.querySelector('ion-modal')!;
expect(modal).not.toBe(null);
expect(modal.getAttribute('id')).toBe('ion-overlay-1');
// Remove the modal from the DOM
modal.remove();
await page.waitForChanges();
// Create a new modal to verify the id is incremented
modal = document.createElement('ion-modal');
modal.isOpen = true;
page.body.appendChild(modal);
await page.waitForChanges();
modal = page.body.querySelector('ion-modal')!;
expect(modal.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same modal again should reuse the existing id
modal.isOpen = false;
await page.waitForChanges();
modal.isOpen = true;
await page.waitForChanges();
modal = page.body.querySelector('ion-modal')!;
expect(modal.getAttribute('id')).toBe('ion-overlay-2');
});
it('should not overwrite the id set in htmlAttributes', async () => {
const id = 'custom-id';
const page = await newSpecPage({
components: [Modal],
template: () => <ion-modal htmlAttributes={{ id }} overlayIndex={-1}></ion-modal>,
});
const alert = page.body.querySelector('ion-modal')!;
expect(alert.id).toBe(id);
});
});

View File

@@ -265,7 +265,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
const backdrop = page.locator('ion-modal ion-backdrop');
await handle.click();
backdrop.click();
await backdrop.click();
await ionBreakpointDidChange.next();

View File

@@ -199,7 +199,9 @@ export class Picker implements ComponentInterface, OverlayInterface {
}
componentWillLoad() {
setOverlayId(this.el);
if (!this.htmlAttributes?.id) {
setOverlayId(this.el);
}
}
componentDidLoad() {

View File

@@ -1,41 +0,0 @@
import { newSpecPage } from '@stencil/core/testing';
import { Picker } from '../picker';
it('picker should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Picker],
html: `<ion-picker-legacy is-open="true"></ion-picker-legacy>`,
});
let picker: HTMLIonPickerLegacyElement;
picker = page.body.querySelector('ion-picker-legacy')!;
expect(picker).not.toBe(null);
expect(picker.getAttribute('id')).toBe('ion-overlay-1');
// Remove the picker from the DOM
picker.remove();
await page.waitForChanges();
// Create a new picker to verify the id is incremented
picker = document.createElement('ion-picker-legacy');
picker.isOpen = true;
page.body.appendChild(picker);
await page.waitForChanges();
picker = page.body.querySelector('ion-picker-legacy')!;
expect(picker.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same picker again should reuse the existing id
picker.isOpen = false;
await page.waitForChanges();
picker.isOpen = true;
await page.waitForChanges();
picker = page.body.querySelector('ion-picker-legacy')!;
expect(picker.getAttribute('id')).toBe('ion-overlay-2');
});

View File

@@ -0,0 +1,55 @@
import { newSpecPage } from '@stencil/core/testing';
import { Picker } from '../picker';
import { h } from '@stencil/core';
describe('picker: id', () => {
it('picker should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Picker],
html: `<ion-picker-legacy is-open="true"></ion-picker-legacy>`,
});
let picker: HTMLIonPickerLegacyElement;
picker = page.body.querySelector('ion-picker-legacy')!;
expect(picker).not.toBe(null);
expect(picker.getAttribute('id')).toBe('ion-overlay-1');
// Remove the picker from the DOM
picker.remove();
await page.waitForChanges();
// Create a new picker to verify the id is incremented
picker = document.createElement('ion-picker-legacy');
picker.isOpen = true;
page.body.appendChild(picker);
await page.waitForChanges();
picker = page.body.querySelector('ion-picker-legacy')!;
expect(picker.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same picker again should reuse the existing id
picker.isOpen = false;
await page.waitForChanges();
picker.isOpen = true;
await page.waitForChanges();
picker = page.body.querySelector('ion-picker-legacy')!;
expect(picker.getAttribute('id')).toBe('ion-overlay-2');
});
it('should not overwrite the id set in htmlAttributes', async () => {
const id = 'custom-id';
const page = await newSpecPage({
components: [Picker],
template: () => <ion-picker-legacy htmlAttributes={{ id }} overlayIndex={-1}></ion-picker-legacy>,
});
const alert = page.body.querySelector('ion-picker-legacy')!;
expect(alert.id).toBe(id);
});
});

View File

@@ -365,7 +365,7 @@ export class Popover implements ComponentInterface, PopoverInterface {
componentWillLoad() {
const { el } = this;
const popoverId = setOverlayId(el);
const popoverId = this.htmlAttributes?.id ?? setOverlayId(el);
this.parentPopover = el.closest(`ion-popover:not(#${popoverId})`) as HTMLIonPopoverElement | null;

View File

@@ -1,41 +0,0 @@
import { newSpecPage } from '@stencil/core/testing';
import { Popover } from '../popover';
it('popover should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Popover],
html: `<ion-popover is-open="true"></ion-popover>`,
});
let popover: HTMLIonPopoverElement;
popover = page.body.querySelector('ion-popover')!;
expect(popover).not.toBe(null);
expect(popover.getAttribute('id')).toBe('ion-overlay-1');
// Remove the popover from the DOM
popover.remove();
await page.waitForChanges();
// Create a new popover to verify the id is incremented
popover = document.createElement('ion-popover');
popover.isOpen = true;
page.body.appendChild(popover);
await page.waitForChanges();
popover = page.body.querySelector('ion-popover')!;
expect(popover.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same popover again should reuse the existing id
popover.isOpen = false;
await page.waitForChanges();
popover.isOpen = true;
await page.waitForChanges();
popover = page.body.querySelector('ion-popover')!;
expect(popover.getAttribute('id')).toBe('ion-overlay-2');
});

View File

@@ -0,0 +1,55 @@
import { newSpecPage } from '@stencil/core/testing';
import { Popover } from '../popover';
import { h } from '@stencil/core';
describe('popover: id', () => {
it('popover should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Popover],
html: `<ion-popover is-open="true"></ion-popover>`,
});
let popover: HTMLIonPopoverElement;
popover = page.body.querySelector('ion-popover')!;
expect(popover).not.toBe(null);
expect(popover.getAttribute('id')).toBe('ion-overlay-1');
// Remove the popover from the DOM
popover.remove();
await page.waitForChanges();
// Create a new popover to verify the id is incremented
popover = document.createElement('ion-popover');
popover.isOpen = true;
page.body.appendChild(popover);
await page.waitForChanges();
popover = page.body.querySelector('ion-popover')!;
expect(popover.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same popover again should reuse the existing id
popover.isOpen = false;
await page.waitForChanges();
popover.isOpen = true;
await page.waitForChanges();
popover = page.body.querySelector('ion-popover')!;
expect(popover.getAttribute('id')).toBe('ion-overlay-2');
});
it('should not overwrite the id set in htmlAttributes', async () => {
const id = 'custom-id';
const page = await newSpecPage({
components: [Popover],
template: () => <ion-popover htmlAttributes={{ id }} overlayIndex={-1}></ion-popover>,
});
const alert = page.body.querySelector('ion-popover')!;
expect(alert.id).toBe(id);
});
});

View File

@@ -80,9 +80,11 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
* is already visible. We manually click() the element instead
* to avoid flaky tests.
*/
/* eslint-disable custom-rules/await-playwright-promise-assertion */
el.click();
el.click();
el.click();
/* eslint-enable custom-rules/await-playwright-promise-assertion */
});
const alerts = await page.$$('ion-alert');

View File

@@ -1,41 +0,0 @@
import { newSpecPage } from '@stencil/core/testing';
import { Toast } from '../toast';
it('toast should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Toast],
html: `<ion-toast is-open="true"></ion-toast>`,
});
let toast: HTMLIonToastElement;
toast = page.body.querySelector('ion-toast')!;
expect(toast).not.toBe(null);
expect(toast.getAttribute('id')).toBe('ion-overlay-1');
// Remove the toast from the DOM
toast.remove();
await page.waitForChanges();
// Create a new toast to verify the id is incremented
toast = document.createElement('ion-toast');
toast.isOpen = true;
page.body.appendChild(toast);
await page.waitForChanges();
toast = page.body.querySelector('ion-toast')!;
expect(toast.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same toast again should reuse the existing id
toast.isOpen = false;
await page.waitForChanges();
toast.isOpen = true;
await page.waitForChanges();
toast = page.body.querySelector('ion-toast')!;
expect(toast.getAttribute('id')).toBe('ion-overlay-2');
});

View File

@@ -0,0 +1,55 @@
import { newSpecPage } from '@stencil/core/testing';
import { Toast } from '../toast';
import { h } from '@stencil/core';
describe('toast: id', () => {
it('toast should be assigned an incrementing id', async () => {
const page = await newSpecPage({
components: [Toast],
html: `<ion-toast is-open="true"></ion-toast>`,
});
let toast: HTMLIonToastElement;
toast = page.body.querySelector('ion-toast')!;
expect(toast).not.toBe(null);
expect(toast.getAttribute('id')).toBe('ion-overlay-1');
// Remove the toast from the DOM
toast.remove();
await page.waitForChanges();
// Create a new toast to verify the id is incremented
toast = document.createElement('ion-toast');
toast.isOpen = true;
page.body.appendChild(toast);
await page.waitForChanges();
toast = page.body.querySelector('ion-toast')!;
expect(toast.getAttribute('id')).toBe('ion-overlay-2');
// Presenting the same toast again should reuse the existing id
toast.isOpen = false;
await page.waitForChanges();
toast.isOpen = true;
await page.waitForChanges();
toast = page.body.querySelector('ion-toast')!;
expect(toast.getAttribute('id')).toBe('ion-overlay-2');
});
it('should not overwrite the id set in htmlAttributes', async () => {
const id = 'custom-id';
const page = await newSpecPage({
components: [Toast],
template: () => <ion-toast htmlAttributes={{ id }} overlayIndex={-1}></ion-toast>,
});
const alert = page.body.querySelector('ion-toast')!;
expect(alert.id).toBe(id);
});
});

View File

@@ -321,7 +321,9 @@ export class Toast implements ComponentInterface, OverlayInterface {
}
componentWillLoad() {
setOverlayId(this.el);
if (!this.htmlAttributes?.id) {
setOverlayId(this.el);
}
}
componentDidLoad() {

View File

@@ -20,14 +20,14 @@ const testNavigation = async (page: E2EPage) => {
await page.click('page-root ion-button.next');
await ionRouteDidChange.next();
page.click('page-one ion-button.next');
await page.click('page-one ion-button.next');
await ionRouteDidChange.next();
page.click('page-two ion-button.next');
await page.click('page-two ion-button.next');
await ionRouteDidChange.next();
page.click('page-three ion-back-button');
await page.click('page-three ion-back-button');
await ionRouteDidChange.next();
page.click('page-two ion-back-button');
await page.click('page-two ion-back-button');
await ionRouteDidChange.next();
page.click('page-one ion-back-button');
await page.click('page-one ion-back-button');
await ionRouteDidChange.next();
};

View File

@@ -3,5 +3,5 @@
"core",
"packages/*"
],
"version": "8.2.5"
"version": "8.2.7"
}

3
package-lock.json generated
View File

@@ -9288,7 +9288,8 @@
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
"integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
"dev": true
"dev": true,
"requires": {}
},
"@octokit/plugin-rest-endpoint-methods": {
"version": "6.6.2",

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.2.7](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.7) (2024-08-13)
**Note:** Version bump only for package @ionic/angular-server
## [8.2.6](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.6) (2024-07-24)
**Note:** Version bump only for package @ionic/angular-server
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)
**Note:** Version bump only for package @ionic/angular-server

View File

@@ -1,15 +1,15 @@
{
"name": "@ionic/angular-server",
"version": "8.2.5",
"version": "8.2.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/angular-server",
"version": "8.2.5",
"version": "8.2.7",
"license": "MIT",
"dependencies": {
"@ionic/core": "^8.2.5"
"@ionic/core": "^8.2.7"
},
"devDependencies": {
"@angular-eslint/eslint-plugin": "^16.0.0",
@@ -1031,9 +1031,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"dependencies": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -7188,9 +7188,9 @@
"dev": true
},
"@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"requires": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -11110,4 +11110,4 @@
}
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/angular-server",
"version": "8.2.5",
"version": "8.2.7",
"description": "Angular SSR Module for Ionic",
"keywords": [
"ionic",
@@ -62,6 +62,6 @@
},
"prettier": "@ionic/prettier-config",
"dependencies": {
"@ionic/core": "^8.2.5"
"@ionic/core": "^8.2.7"
}
}

View File

@@ -3,6 +3,29 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.2.7](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.7) (2024-08-13)
### Bug Fixes
* **angular:** add focusTrap prop to modal and popover ([#29729](https://github.com/ionic-team/ionic-framework/issues/29729)) ([05913c3](https://github.com/ionic-team/ionic-framework/commit/05913c3cc3f2e8cb91f9a0944cd55e78392b0ba3)), closes [#29728](https://github.com/ionic-team/ionic-framework/issues/29728)
* **angular:** remove the tabindex set by routerLink from Ionic components ([#29744](https://github.com/ionic-team/ionic-framework/issues/29744)) ([20073e1](https://github.com/ionic-team/ionic-framework/commit/20073e10c934d3704734195c72f4281c9b9658e3)), closes [#20632](https://github.com/ionic-team/ionic-framework/issues/20632)
## [8.2.6](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.6) (2024-07-24)
### Bug Fixes
* **angular:** add focusTrap prop to modal and popover ([#29729](https://github.com/ionic-team/ionic-framework/issues/29729)) ([05913c3](https://github.com/ionic-team/ionic-framework/commit/05913c3cc3f2e8cb91f9a0944cd55e78392b0ba3)), closes [#29728](https://github.com/ionic-team/ionic-framework/issues/29728)
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)
**Note:** Version bump only for package @ionic/angular

View File

@@ -31,12 +31,45 @@ export class RouterLinkDelegateDirective implements OnInit, OnChanges {
ngOnInit(): void {
this.updateTargetUrlAndHref();
this.updateTabindex();
}
ngOnChanges(): void {
this.updateTargetUrlAndHref();
}
/**
* The `tabindex` is set to `0` by default on the host element when
* the `routerLink` directive is used. This causes issues with Ionic
* components that wrap an `a` or `button` element, such as `ion-item`.
* See issue https://github.com/angular/angular/issues/28345
*
* This method removes the `tabindex` attribute from the host element
* to allow the Ionic component to manage the focus state correctly.
*/
private updateTabindex() {
// Ionic components that render a native anchor or button element
const ionicComponents = [
'ION-BACK-BUTTON',
'ION-BREADCRUMB',
'ION-BUTTON',
'ION-CARD',
'ION-FAB-BUTTON',
'ION-ITEM',
'ION-ITEM-OPTION',
'ION-MENU-BUTTON',
'ION-SEGMENT-BUTTON',
'ION-TAB-BUTTON',
];
const hostElement = this.elementRef.nativeElement;
if (ionicComponents.includes(hostElement.tagName)) {
if (hostElement.getAttribute('tabindex') === '0') {
hostElement.removeAttribute('tabindex');
}
}
}
private updateTargetUrlAndHref() {
if (this.routerLink?.urlTree) {
const href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));

View File

@@ -60,6 +60,7 @@ const MODAL_INPUTS = [
'cssClass',
'enterAnimation',
'event',
'focusTrap',
'handle',
'handleBehavior',
'initialBreakpoint',

View File

@@ -56,6 +56,7 @@ const POPOVER_INPUTS = [
'dismissOnSelect',
'enterAnimation',
'event',
'focusTrap',
'isOpen',
'keyboardClose',
'leaveAnimation',

View File

@@ -1,15 +1,15 @@
{
"name": "@ionic/angular",
"version": "8.2.5",
"version": "8.2.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/angular",
"version": "8.2.5",
"version": "8.2.7",
"license": "MIT",
"dependencies": {
"@ionic/core": "^8.2.5",
"@ionic/core": "^8.2.7",
"ionicons": "^7.0.0",
"jsonc-parser": "^3.0.0",
"tslib": "^2.3.0"
@@ -1398,9 +1398,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"dependencies": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -9820,9 +9820,9 @@
"dev": true
},
"@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"requires": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -15020,4 +15020,4 @@
}
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/angular",
"version": "8.2.5",
"version": "8.2.7",
"description": "Angular specific wrappers for @ionic/core",
"keywords": [
"ionic",
@@ -47,7 +47,7 @@
}
},
"dependencies": {
"@ionic/core": "^8.2.5",
"@ionic/core": "^8.2.7",
"ionicons": "^7.0.0",
"jsonc-parser": "^3.0.0",
"tslib": "^2.3.0"

View File

@@ -123,6 +123,21 @@ describe('Router Link', () => {
testBack();
});
});
// Angular sets the `tabindex` to `"0"` on any element that uses
// the `routerLink` directive. Ionic removes the `tabindex` from
// components that wrap an `a` or `button` element, so we are
// checking here that it is only removed from Ionic components.
// https://github.com/ionic-team/ionic-framework/issues/20632
describe('tabindex', () => {
it('should have tabindex="0" with a native span', () => {
cy.get('#span').should('have.attr', 'tabindex', '0');
});
it('should not have tabindex set with an ionic button', () => {
cy.get('#routerLink').should('not.have.attr', 'tabindex');
});
});
});
function testForward() {

View File

@@ -2,7 +2,7 @@ describe('RouterLink', () => {
beforeEach(() => {
cy.visit('/standalone/router-link');
});
it('should mount the root component', () => {
cy.ionPageVisible('app-router-link');
@@ -21,4 +21,17 @@ describe('RouterLink', () => {
cy.url().should('include', '/standalone/popover');
});
// Angular sets the `tabindex` to `"0"` on any element that uses
// the `routerLink` directive. Ionic removes the `tabindex` from
// components that wrap an `a` or `button` element, so we are
// checking here that it is only removed from Ionic components.
// https://github.com/ionic-team/ionic-framework/issues/20632
it('should have tabindex="0" with a native span', () => {
cy.get('span').should('have.attr', 'tabindex', '0');
});
it('should not have tabindex set with an ionic button', () => {
cy.get('ion-button').should('not.have.attr', 'tabindex');
});
});

View File

@@ -36,4 +36,5 @@
<p><button id="queryParamsFragment" routerLink="/lazy/router-link-page2/MyPageID==" [queryParams]="{ token: 'A&=#Y' }"
fragment="myDiv1">Query Params and Fragment</button></p>
<p><span routerLink="/lazy/router-link-page" id="span">span[routerLink]</span></p>
</ion-content>

View File

@@ -4,3 +4,9 @@
<button routerLink="/standalone/popover" routerDirection="root">
I'm a button
</button>
<span routerLink="/standalone/popover" routerDirection="root">
I'm a span
</span>
<ion-button routerLink="/standalone/popover" routerDirection="root">
I'm an ion-button
</ion-button>

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.2.7](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.7) (2024-08-13)
**Note:** Version bump only for package @ionic/docs
## [8.2.6](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.6) (2024-07-24)
**Note:** Version bump only for package @ionic/docs
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)
**Note:** Version bump only for package @ionic/docs

View File

@@ -1,13 +1,13 @@
{
"name": "@ionic/docs",
"version": "8.2.5",
"version": "8.2.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/docs",
"version": "8.2.5",
"version": "8.2.7",
"license": "MIT"
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/docs",
"version": "8.2.5",
"version": "8.2.7",
"description": "Pre-packaged API documentation for the Ionic docs.",
"main": "core.json",
"types": "core.d.ts",

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.2.7](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.7) (2024-08-13)
**Note:** Version bump only for package @ionic/react-router
## [8.2.6](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.6) (2024-07-24)
**Note:** Version bump only for package @ionic/react-router
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)
**Note:** Version bump only for package @ionic/react-router

View File

@@ -1,15 +1,15 @@
{
"name": "@ionic/react-router",
"version": "8.2.5",
"version": "8.2.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/react-router",
"version": "8.2.5",
"version": "8.2.7",
"license": "MIT",
"dependencies": {
"@ionic/react": "^8.2.5",
"@ionic/react": "^8.2.7",
"tslib": "*"
},
"devDependencies": {
@@ -238,9 +238,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"dependencies": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -414,11 +414,11 @@
}
},
"node_modules/@ionic/react": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.2.5.tgz",
"integrity": "sha512-Iy5zM3R2InksH6Fh9AcBlgUGhz3YOV/2TDRvIdhT0wQIsDbCreAcGt8ST5x8YeKQPuChoDhmD2HQG9g7Fc9DhQ==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.2.6.tgz",
"integrity": "sha512-qcdd04P3vZzeyQvjF/7RIK9JJPxQgpBm3VxUh6a/NUPuLsq4d66UcD2pr4vGaejD3Vf15wyZeHDAVQGjqq+X2A==",
"dependencies": {
"@ionic/core": "8.2.5",
"@ionic/core": "8.2.6",
"ionicons": "^7.0.0",
"tslib": "*"
},
@@ -4057,9 +4057,9 @@
"dev": true
},
"@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"requires": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -4163,11 +4163,11 @@
"requires": {}
},
"@ionic/react": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.2.5.tgz",
"integrity": "sha512-Iy5zM3R2InksH6Fh9AcBlgUGhz3YOV/2TDRvIdhT0wQIsDbCreAcGt8ST5x8YeKQPuChoDhmD2HQG9g7Fc9DhQ==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-8.2.6.tgz",
"integrity": "sha512-qcdd04P3vZzeyQvjF/7RIK9JJPxQgpBm3VxUh6a/NUPuLsq4d66UcD2pr4vGaejD3Vf15wyZeHDAVQGjqq+X2A==",
"requires": {
"@ionic/core": "8.2.5",
"@ionic/core": "8.2.6",
"ionicons": "^7.0.0",
"tslib": "*"
}
@@ -6666,4 +6666,4 @@
"dev": true
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/react-router",
"version": "8.2.5",
"version": "8.2.7",
"description": "React Router wrapper for @ionic/react",
"keywords": [
"ionic",
@@ -36,7 +36,7 @@
"dist/"
],
"dependencies": {
"@ionic/react": "^8.2.5",
"@ionic/react": "^8.2.7",
"tslib": "*"
},
"peerDependencies": {

View File

@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.2.7](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.7) (2024-08-13)
### Bug Fixes
* **react:** add onPointerDown, onTouchEnd, add onTouchMove ([#29736](https://github.com/ionic-team/ionic-framework/issues/29736)) ([bfee3cd](https://github.com/ionic-team/ionic-framework/commit/bfee3cd064a9b495489c2679ccfb762e622dbf09)), closes [#29174](https://github.com/ionic-team/ionic-framework/issues/29174)
## [8.2.6](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.6) (2024-07-24)
**Note:** Version bump only for package @ionic/react
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)
**Note:** Version bump only for package @ionic/react

View File

@@ -1,15 +1,15 @@
{
"name": "@ionic/react",
"version": "8.2.5",
"version": "8.2.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/react",
"version": "8.2.5",
"version": "8.2.7",
"license": "MIT",
"dependencies": {
"@ionic/core": "^8.2.5",
"@ionic/core": "^8.2.7",
"ionicons": "^7.0.0",
"tslib": "*"
},
@@ -798,9 +798,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"dependencies": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -13035,9 +13035,9 @@
"dev": true
},
"@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"requires": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -21825,4 +21825,4 @@
}
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/react",
"version": "8.2.5",
"version": "8.2.7",
"description": "React specific wrapper for @ionic/core",
"keywords": [
"ionic",
@@ -39,7 +39,7 @@
"css/"
],
"dependencies": {
"@ionic/core": "^8.2.5",
"@ionic/core": "^8.2.7",
"ionicons": "^7.0.0",
"tslib": "*"
},

View File

@@ -10,6 +10,9 @@ type Props = LocalJSX.IonTabButton &
routerOptions?: RouterOptions;
ref?: React.Ref<HTMLIonTabButtonElement>;
onClick?: (e: CustomEvent) => void;
onPointerDown?: React.PointerEventHandler<HTMLIonTabButtonElement>;
onTouchEnd?: React.TouchEventHandler<HTMLIonTabButtonElement>;
onTouchMove?: React.TouchEventHandler<HTMLIonTabButtonElement>;
};
export const IonTabButton = /*@__PURE__*/ (() =>

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.2.7](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.7) (2024-08-13)
**Note:** Version bump only for package @ionic/vue-router
## [8.2.6](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.6) (2024-07-24)
**Note:** Version bump only for package @ionic/vue-router
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)
**Note:** Version bump only for package @ionic/vue-router

View File

@@ -1,15 +1,15 @@
{
"name": "@ionic/vue-router",
"version": "8.2.5",
"version": "8.2.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/vue-router",
"version": "8.2.5",
"version": "8.2.7",
"license": "MIT",
"dependencies": {
"@ionic/vue": "^8.2.5"
"@ionic/vue": "^8.2.7"
},
"devDependencies": {
"@ionic/eslint-config": "^0.3.0",
@@ -661,9 +661,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"dependencies": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -852,11 +852,11 @@
}
},
"node_modules/@ionic/vue": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.2.5.tgz",
"integrity": "sha512-Is6ZwHlLltR0YF54cgd/Fc/eVTW2VDIOExm3paGkczcaka6Jut3UY9m0ukbILeuRG+phjet31QKKbcGSaooWyg==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.2.6.tgz",
"integrity": "sha512-/Rqx5ZUqbbDIHow9ZzRsVCnkt6aZwxMZo00/FE4/EzL95aa7z3A4y6yZ9p98KVkHIIIpcFzyI3SUkEIabLC/QQ==",
"dependencies": {
"@ionic/core": "8.2.5",
"@ionic/core": "8.2.6",
"ionicons": "^7.0.0"
}
},
@@ -7878,9 +7878,9 @@
"dev": true
},
"@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"requires": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -7993,11 +7993,11 @@
"requires": {}
},
"@ionic/vue": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.2.5.tgz",
"integrity": "sha512-Is6ZwHlLltR0YF54cgd/Fc/eVTW2VDIOExm3paGkczcaka6Jut3UY9m0ukbILeuRG+phjet31QKKbcGSaooWyg==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-8.2.6.tgz",
"integrity": "sha512-/Rqx5ZUqbbDIHow9ZzRsVCnkt6aZwxMZo00/FE4/EzL95aa7z3A4y6yZ9p98KVkHIIIpcFzyI3SUkEIabLC/QQ==",
"requires": {
"@ionic/core": "8.2.5",
"@ionic/core": "8.2.6",
"ionicons": "^7.0.0"
}
},
@@ -12798,4 +12798,4 @@
"dev": true
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/vue-router",
"version": "8.2.5",
"version": "8.2.7",
"description": "Vue Router integration for @ionic/vue",
"scripts": {
"test.spec": "jest",
@@ -44,7 +44,7 @@
},
"homepage": "https://github.com/ionic-team/ionic-framework#readme",
"dependencies": {
"@ionic/vue": "^8.2.5"
"@ionic/vue": "^8.2.7"
},
"devDependencies": {
"@ionic/eslint-config": "^0.3.0",

View File

@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.2.7](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.7) (2024-08-13)
### Bug Fixes
* **vue:** pass router-link value to href to properly render clickable elements ([#29745](https://github.com/ionic-team/ionic-framework/issues/29745)) ([ab4f279](https://github.com/ionic-team/ionic-framework/commit/ab4f2791c1968adbb1d858c5f009fa251bb9101b))
## [8.2.6](https://github.com/ionic-team/ionic-framework/compare/v8.2.5...v8.2.6) (2024-07-24)
**Note:** Version bump only for package @ionic/vue
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)

View File

@@ -1,15 +1,15 @@
{
"name": "@ionic/vue",
"version": "8.2.5",
"version": "8.2.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/vue",
"version": "8.2.5",
"version": "8.2.7",
"license": "MIT",
"dependencies": {
"@ionic/core": "^8.2.5",
"@ionic/core": "^8.2.7",
"ionicons": "^7.0.0"
},
"devDependencies": {
@@ -208,9 +208,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"dependencies": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -3970,9 +3970,9 @@
"dev": true
},
"@ionic/core": {
"version": "8.2.5",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.5.tgz",
"integrity": "sha512-NhK5KfP5NL5NITibj8sOUlfI/ARNCF5rBu5HdIEfFe25MJkd0IYBQWjVaESFhSk7aB8pXEP8DIx1AHbT9e3Sog==",
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.2.6.tgz",
"integrity": "sha512-9vLxIR+QFzeim/C6LV62vOm5e6EIoVZsLb5RjlnQICDbDf14iqcBjA+MZpW628HbADX7p9/ulaq8WFgx5085ZA==",
"requires": {
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
@@ -6562,4 +6562,4 @@
"dev": true
}
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/vue",
"version": "8.2.5",
"version": "8.2.7",
"description": "Vue specific wrapper for @ionic/core",
"scripts": {
"eslint": "eslint src",
@@ -66,7 +66,7 @@
"vue-router": "^4.0.16"
},
"dependencies": {
"@ionic/core": "^8.2.5",
"@ionic/core": "^8.2.7",
"ionicons": "^7.0.0"
},
"vetur": {

View File

@@ -5,6 +5,9 @@ set -e
# Delete old packages
rm -f *.tgz
# Delete vite cache
rm -rf node_modules/.vite
# Pack @ionic/core
npm pack ../../core

View File

@@ -91,8 +91,17 @@ export const defineContainer = <Props, VModelType = string | number | boolean>(
const eventsNames = Array.isArray(modelUpdateEvent) ? modelUpdateEvent : [modelUpdateEvent];
eventsNames.forEach((eventName: string) => {
el.addEventListener(eventName.toLowerCase(), (e: Event) => {
modelPropValue = (e?.target as any)[modelProp];
emit(UPDATE_VALUE_EVENT, modelPropValue);
/**
* Only update the v-model binding if the event's target is the element we are
* listening on. For example, Component A could emit ionChange, but it could also
* have a descendant Component B that also emits ionChange. We only want to update
* the v-model for Component A when ionChange originates from that element and not
* when ionChange bubbles up from Component B.
*/
if (e.target.tagName === el.tagName) {
modelPropValue = (e?.target as any)[modelProp];
emit(UPDATE_VALUE_EVENT, modelPropValue);
}
});
});
},
@@ -106,6 +115,16 @@ export const defineContainer = <Props, VModelType = string | number | boolean>(
if (routerLink === EMPTY_PROP) return;
if (navManager !== undefined) {
/**
* This prevents the browser from
* performing a page reload when pressing
* an Ionic component with routerLink.
* The page reload interferes with routing
* and causes ion-back-button to disappear
* since the local history is wiped on reload.
*/
ev.preventDefault();
let navigationPayload: any = { event: ev };
for (const key in props) {
const value = props[key];
@@ -176,6 +195,17 @@ export const defineContainer = <Props, VModelType = string | number | boolean>(
}
}
// If router link is defined, add href to props
// in order to properly render an anchor tag inside
// of components that should become activatable and
// focusable with router link.
if (props[ROUTER_LINK_VALUE] !== EMPTY_PROP) {
propsToAdd = {
...propsToAdd,
href: props[ROUTER_LINK_VALUE],
};
}
/**
* vModelDirective is only needed on components that support v-model.
* As a result, we conditionally call withDirectives with v-model components.

View File

@@ -2,13 +2,13 @@
<ion-page>
<ion-content>
<ion-list>
<ion-item button router-link="/components/breadcrumbs">
<ion-item router-link="/components/breadcrumbs">
<ion-label>Breadcrumbs</ion-label>
</ion-item>
<ion-item button router-link="/components/select">
<ion-item router-link="/components/select">
<ion-label>Select</ion-label>
</ion-item>
<ion-item button router-link="/components/range">
<ion-item router-link="/components/range">
<ion-label>Range</ion-label>
</ion-item>
</ion-list>

View File

@@ -17,43 +17,43 @@
</ion-header>
<ion-list>
<ion-item button router-link="/overlays">
<ion-item router-link="/overlays">
<ion-label>Overlays</ion-label>
</ion-item>
<ion-item button router-link="/icons">
<ion-item router-link="/icons">
<ion-label>Icons</ion-label>
</ion-item>
<ion-item button router-link="/inputs">
<ion-item router-link="/inputs">
<ion-label>Inputs</ion-label>
</ion-item>
<ion-item button router-link="/navigation" id="navigation">
<ion-item router-link="/navigation" id="navigation">
<ion-label>Navigation</ion-label>
</ion-item>
<ion-item button router-link="/routing" id="routing">
<ion-item router-link="/routing" id="routing">
<ion-label>Routing</ion-label>
</ion-item>
<ion-item button router-link="/default-href" id="default-href">
<ion-item router-link="/default-href" id="default-href">
<ion-label>Default Href</ion-label>
</ion-item>
<ion-item button router-link="/nested" id="nested">
<ion-item router-link="/nested" id="nested">
<ion-label>Nested Router Outlet</ion-label>
</ion-item>
<ion-item button router-link="/tabs" id="tabs">
<ion-item router-link="/tabs" id="tabs">
<ion-label>Tabs</ion-label>
</ion-item>
<ion-item button router-link="/tabs-secondary" id="tab-secondary">
<ion-item router-link="/tabs-secondary" id="tab-secondary">
<ion-label>Tabs Secondary</ion-label>
</ion-item>
<ion-item button router-link="/lifecycle" id="lifecycle">
<ion-item router-link="/lifecycle" id="lifecycle">
<ion-label>Lifecycle</ion-label>
</ion-item>
<ion-item button router-link="/lifecycle-setup" id="lifecycle-setup">
<ion-item router-link="/lifecycle-setup" id="lifecycle-setup">
<ion-label>Lifecycle (Setup)</ion-label>
</ion-item>
<ion-item button router-link="/delayed-redirect" id="delayed-redirect">
<ion-item router-link="/delayed-redirect" id="delayed-redirect">
<ion-label>Delayed Redirect</ion-label>
</ion-item>
<ion-item button router-link="/components">
<ion-item router-link="/components">
<ion-label>Components</ion-label>
</ion-item>
</ion-list>

View File

@@ -16,31 +16,31 @@
</ion-toolbar>
</ion-header>
<ion-item button @click="setRouteParams" id="route-params">
<ion-item @click="setRouteParams" id="route-params">
<ion-label>Set Route Parameters</ion-label>
</ion-item>
<ion-item button router-link="/routing/child" id="child">
<ion-item router-link="/routing/child" id="child">
<ion-label>Go to Child Page</ion-label>
</ion-item>
<ion-item button router-link="/routing/abc" id="parameter-abc">
<ion-item router-link="/routing/abc" id="parameter-abc">
<ion-label>Go to Parameter Page ABC</ion-label>
</ion-item>
<ion-item button router-link="/routing/xyz" id="parameter-xyz">
<ion-item router-link="/routing/xyz" id="parameter-xyz">
<ion-label>Go to Parameter Page XYZ</ion-label>
</ion-item>
<ion-item button router-link="/routing/123/view" id="parameter-view-item">
<ion-item router-link="/routing/123/view" id="parameter-view-item">
<ion-label>Go to Parameterized Page View</ion-label>
</ion-item>
<ion-item button @click="replace" id="replace">
<ion-item @click="replace" id="replace">
<ion-label>Replace to Navigation page</ion-label>
</ion-item>
<ion-item button router-link="/tabs/tab1" id="tab1">
<ion-item router-link="/tabs/tab1" id="tab1">
<ion-label>Go to /tabs/tab1</ion-label>
</ion-item>
</ion-content>

View File

@@ -17,18 +17,18 @@
<ExploreContainer name="Tab 1 page" />
<ion-item button router-link="/tabs/tab1/childone" id="child-one">
<ion-item router-link="/tabs/tab1/childone" id="child-one">
<ion-label>Go to Tab 1 Child 1</ion-label>
</ion-item>
<ion-item button router-link="/nested" id="nested">
<ion-item router-link="/nested" id="nested">
<ion-label>Go to Nested Outlet</ion-label>
</ion-item>
<ion-item button router-link="/tabs-secondary" id="tabs-secondary">
<ion-item router-link="/tabs-secondary" id="tabs-secondary">
<ion-label>Go to Secondary Tabs</ion-label>
</ion-item>
<ion-item button router-link="/tabs" id="tabs-primary">
<ion-item router-link="/tabs" id="tabs-primary">
<ion-label>Go to Primary Tabs</ion-label>
</ion-item>

View File

@@ -15,7 +15,7 @@
</ion-toolbar>
</ion-header>
<ion-item button router-link="/routing" id="routing">
<ion-item router-link="/routing" id="routing">
<ion-label>Go to /routing</ion-label>
</ion-item>
</ion-content>

View File

@@ -584,4 +584,10 @@ describe('Routing - Swipe to Go Back', () => {
cy.ionPageDoesNotExist('routingparameter-abc');
cy.ionPageVisible('routing');
})
it('should be activatable when router-link is used on an item without the button property', () => {
cy.visit('/');
cy.get('ion-item[routerlink="/overlays"]').should('have.class', 'ion-activatable');
});
})