Compare commits

..

65 Commits

Author SHA1 Message Date
Christian Bromann
47b4a0c1a7 add more exports 2024-07-17 11:13:11 -07:00
Christian Bromann
7f31ece67e PR feedback 2024-07-17 11:13:11 -07:00
Christian Bromann
b8ca441cf7 fix(core): use bundler as moduleResolution 2024-07-17 11:13:11 -07:00
Sean Perkins
2bc3b1feae chore(vue): bump vue dev-deps to have generic type (#29718)
Issue number: Internal

---------

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

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

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

In v3.2.46 [vue was updated](https://github.com/vuejs/core/pull/3969) to
add support for a generic type argument to the `Plugin` type. In
https://github.com/ionic-team/ionic-framework/pull/29637 Ionic's Vue
plugin was updated to use the generic, but the`@ionic/vue` project is
currently installing v3.2.37.

This results in a local type checking error and build error:
```
(!) Plugin typescript: @rollup/plugin-typescript TS2315: Type 'Plugin_2' is not generic.
src/ionic-vue.ts: (24:24)

24 export const IonicVue: Plugin<[IonicConfig?]> = {
```

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

- Bumps and pins the dev dependency of `vue` to `3.2.46`. There are
other breaking changes that Vue has shipped in minor/patch cycles that
prevents from updating to the latest.
- Resolves the type checking error locally during build of
the`@ionic/vue` package

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

Validation steps:
1. Checkout the branch
2. Build `core/`
3. In `packages/vue`, install latest pinned dependencies with `npm ci`
4. Sync the changes to the `vue` package with `npm run sync`
5. Open `/packages/vue/src/ionic-vue.ts`
6. Observe: No type errors on L24
7. Run `npm run build`
8. Observe: No build errors
2024-07-16 20:11:49 +00:00
renovate[bot]
2ddc793e86 chore(deps): update playwright (#29658)
[![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.44.1` ->
`^1.45.0`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.44.1/1.45.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.44.1/1.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.44.1/1.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | minor |
| mcr.microsoft.com/playwright | `v1.44.1` -> `v1.45.0` |
[![age](https://developer.mend.io/api/mc/badges/age/docker/mcr.microsoft.com%2fplaywright/v1.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/mcr.microsoft.com%2fplaywright/v1.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/mcr.microsoft.com%2fplaywright/v1.44.1/v1.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/mcr.microsoft.com%2fplaywright/v1.44.1/v1.45.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| final | minor |

---

### Release Notes

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

###
[`v1.45.0`](https://togithub.com/microsoft/playwright/compare/v1.44.1...4f3f6eecae490af444dd9298c9eaeb0c596915b7)

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

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

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Maria Hutt <maria@ionic.io>
2024-07-16 18:49:24 +00:00
Mikel Hamer
1295cedae9 fix(alert): do not overwrite id set in htmlAttributes (#29708)
Issue number: resolves #29704

---------

<!-- 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?
Setting the id of an alert via htmlAttributes doesn't work due to it
being overwritten by the overlay id.

## What is the new behavior?
Setting the id of an alert via htmlAttributes works.

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

First time PR, long time fan. Please let me know if I missed any of the
contributing guidelines, happy to change anything!
2024-07-15 14:51:14 +00:00
jcesarmobile
d30afa5a44 chore(angular-server): update eslint to 8.x (#29671)
Updated `eslint` to latest 8.x and `@ionic/eslint-config` to latest
(0.4.0), which is required for eslint 8.x to work.

Removed `eslint-plugin-import` and `@typescript-eslint/eslint-plugin`
since they are part of `@ionic/eslint-config`
2024-07-03 16:44:32 +00:00
Brandy Carney
10615bfb30 merge release-8.2.5 (#29687)
v8.2.5
2024-07-03 10:47:21 -04:00
Brandy Carney
0196d45902 docs(changelog): correct v8.2.5 changelog 2024-07-03 10:33:14 -04:00
Brandy Carney
6a1b193ec4 chore(): update package lock files 2024-07-03 10:08:11 -04:00
ionitron
556a05807c chore(): update package lock files 2024-07-03 14:06:02 +00:00
ionitron
3f9ae8405b v8.2.5 2024-07-03 14:05:17 +00:00
Brandy Carney
d70ea400a4 chore(deps): update dependency @stencil/core to v4.19.2 (#29685)
Issue number: resolves #29681

---------

### Release Notes

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

###
[`v4.19.2`](https://togithub.com/ionic-team/stencil/blob/HEAD/CHANGELOG.md#-4192-2024-07-02)

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

### Bug Fixes

* **hydrate:** partially revert
[#5838](https://github.com/ionic-team/stencil/issues/5838)
([#5876](https://github.com/ionic-team/stencil/issues/5876))
([dfbc340](dfbc34007a))
* **hydrate:** support server side rendering of components with listener
([#5877](https://github.com/ionic-team/stencil/issues/5877))
([2c5b7f8](2c5b7f8ecb)),
fixes [#5869](https://github.com/ionic-team/stencil/issues/5869)
* **testing:** add testing sub module to export map
([#5873](https://github.com/ionic-team/stencil/issues/5873))
([bb2e04f](bb2e04f488)),
fixes [#5871](https://github.com/ionic-team/stencil/issues/5871) and
[#5868](https://github.com/ionic-team/stencil/issues/5868)

</details>
2024-07-02 21:02:33 +00:00
Sukaato
90893f46c9 feat(vue): add optional IonicConfig type parameter to IonicVue plugin (#29637)
Issue number: https://github.com/ionic-team/ionic-framework/issues/29659

---------

<!-- 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. -->
while using `.use(IonicVue, {})`, the config object has no autocomplete.

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- Add type autocomplete on plugin option in VueJS package.


## 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: Julien Vaumoron <julien.vaumoron@kanoma.fr>
2024-06-28 19:02:20 +00:00
Brandy Carney
4eb16298a3 merge release-8.2.4 (#29678)
v8.2.4
2024-06-28 11:46:45 -04:00
Brandy Carney
485a1b6892 docs(changelog): update changelogs for skipped version 2024-06-28 11:31:59 -04:00
Brandy Carney
ba1c1dd2be chore(): update package lock files 2024-06-28 11:23:08 -04:00
ionitron
9fec58680f chore(): update package lock files 2024-06-28 15:11:29 +00:00
ionitron
2ec47e3a93 v8.2.4 2024-06-28 15:10:48 +00:00
Brandy Carney
fda8397e1c merge release-8.2.3 (#29676)
v8.2.3
2024-06-28 11:03:39 -04:00
Brandy Carney
085c243942 v8.2.3 2024-06-28 10:50:41 -04:00
Brandy Carney
4c9083050b chore(angular-server): add sync github action and update @stencil/core to 4.19.1 in core (#29670)
Issue number: internal

---------

This does a couple things:

**1 - Adds a `sync` command to get the latest `core` build in
`angular-server`**

The release process for `angular-server` failed
[here](https://github.com/ionic-team/ionic-framework/actions/runs/9686982182/job/26730689874).
This failure was only made apparent because the Lerna command
[here](52ff0505e8/.github/workflows/actions/publish-npm/action.yml (L35))
runs prior to building each package.

This should have been caught by CI on the [update to @stencil/core to
v4.19.0](https://github.com/ionic-team/ionic-framework/pull/29666), but
the `angular-server` package is the only package that doesn't sync
`core` before it builds. This PR adds a `sync` command so that
`angular-server` will use the latest core build during the normal build
action.

**2 - Resolving types errors in `angular-server`**

After properly syncing `core` in `angular-server` using the command
added, running build fails with the following:

<img width="400px" alt="Screenshot 2024-06-27 at 1 16 15 PM"
src="https://github.com/ionic-team/ionic-framework/assets/6577830/68d74750-821b-4776-b563-124d8fa06a79">

This was a regression in Stencil. `@stencil/core` has been updated to
resolve these errors so the build passes.
2024-06-27 18:12:12 -04:00
Brandy Carney
52ff0505e8 chore(deps): update dependency @stencil/core to v4.19.0 (#29666)
### Release Notes

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

###
[`v4.19.0`](https://togithub.com/ionic-team/stencil/blob/HEAD/CHANGELOG.md#-4190-2024-06-26)

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

### Bug Fixes

* **compiler:** support rollup's external input option
([#3227](https://github.com/ionic-team/stencil/issues/3227))
([2c68849](2c6884970b)),
fixes [#3226](https://github.com/ionic-team/stencil/issues/3226)
* **emit:** don't emit test files
([#5789](https://github.com/ionic-team/stencil/issues/5789))
([50892f1](50892f153c)),
fixes [#5788](https://github.com/ionic-team/stencil/issues/5788)
* **hyrdate:** support vdom annotation in nested dsd structures
([#5856](https://github.com/ionic-team/stencil/issues/5856))
([61bb5e3](61bb5e3a08))
* label attribute not toggling input
([#3474](https://github.com/ionic-team/stencil/issues/3474))
([13db920](13db92075b)),
fixes [#3473](https://github.com/ionic-team/stencil/issues/3473)
* **mock-doc:** expose ShadowRoot and DocumentFragment globals
([#5827](https://github.com/ionic-team/stencil/issues/5827))
([98bbd7c](98bbd7c0d6)),
fixes [#3260](https://github.com/ionic-team/stencil/issues/3260)
* **runtime:** allow watchers to fire w/ no Stencil members
([#5855](https://github.com/ionic-team/stencil/issues/5855))
([850ad4f](850ad4f4dd)),
fixes [#5854](https://github.com/ionic-team/stencil/issues/5854)
* **runtime:** catch errors in async lifecycle methods
([#5826](https://github.com/ionic-team/stencil/issues/5826))
([87e5b33](87e5b33a3b)),
fixes [#5824](https://github.com/ionic-team/stencil/issues/5824)
* **runtime:** don't register listener before connected to DOM
([#5844](https://github.com/ionic-team/stencil/issues/5844))
([9d7021f](9d7021feab)),
fixes [#4067](https://github.com/ionic-team/stencil/issues/4067)
* **runtime:** properly assign style declarations
([#5838](https://github.com/ionic-team/stencil/issues/5838))
([5c10ebf](5c10ebfd09))
* **testing:** allow to re-use pages across it blocks
([#5830](https://github.com/ionic-team/stencil/issues/5830))
([561eab4](561eab4af6)),
fixes [#3720](https://github.com/ionic-team/stencil/issues/3720)
* **typescript:** remove unsupported label property
([#5840](https://github.com/ionic-team/stencil/issues/5840))
([d26ea2b](d26ea2b749)),
fixes [#3473](https://github.com/ionic-team/stencil/issues/3473)


### Features

* **cli:** support generation of sass and less files
([#5857](https://github.com/ionic-team/stencil/issues/5857))
([1883812](18838123f1)),
closes [#2155](https://github.com/ionic-team/stencil/issues/2155)
* **compiler:** generate export maps on build
([#5809](https://github.com/ionic-team/stencil/issues/5809))
([b6d2404](b6d24043bd))
* **complier:** support type import aliasing
([#5836](https://github.com/ionic-team/stencil/issues/5836))
([7ffb25d](7ffb25d259)),
closes [#2335](https://github.com/ionic-team/stencil/issues/2335)
* **runtime:** support declarative shadow DOM
([#5792](https://github.com/ionic-team/stencil/issues/5792))
([c837063](c837063628)),
closes [#4010](https://github.com/ionic-team/stencil/issues/4010)
* **testing:** add `toHaveLastReceivedEventDetail` event spy matcher
([#5829](https://github.com/ionic-team/stencil/issues/5829))
([63491de](63491de1e6)),
closes [#2488](https://github.com/ionic-team/stencil/issues/2488)
* **testing:** allow to disable network error logging via
'logFailingNetworkRequests' option
([#5839](https://github.com/ionic-team/stencil/issues/5839))
([dac3e33](dac3e33e14)),
closes [#2572](https://github.com/ionic-team/stencil/issues/2572)
* **testing:** expose captureBeyondViewport in pageCompareScreenshot
([#5828](https://github.com/ionic-team/stencil/issues/5828))
([cf6a450](cf6a4503b3)),
closes [#3188](https://github.com/ionic-team/stencil/issues/3188)

</details>
2024-06-26 21:09:28 +00:00
Maria Hutt
253465a8be test(refresher): update test page fullscreen title (#29614)
Issue number: N/A

---------

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

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

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

The test page has the wrong title text.

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

- Updated the text to reflect the purpose of the page.

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

N/A
2024-06-26 20:30:58 +00:00
Maria Hutt
8e3fcbb658 chore(vue): unpin version (#29657)
Issue number: internal

---------

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

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

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Vue input values cannot accept a string object without causing it's
behavior to fail. This is happening because a change that happened
through Vue.

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

- Vue released a fix, verified that fixes the issue, upgraded the
version

## 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-06-26 17:39:11 +00:00
Brandy Carney
caa88b34e1 style(many): fix comments with wrong component names (#29665) 2024-06-26 16:29:19 +00:00
Brandy Carney
ceb41f31f3 fix(angular): popover arrow navigation with disabled items (#29662)
Issue number: resolves #29640

---------

## What is the current behavior?
(Angular) If a list inside of a popover contains a disabled item and is
included in the following way:

```html
<ion-list>
  <ion-item [button]="true">Option 1</ion-item>
  <ion-item [button]="true" [disabled]="true">Option 2</ion-item>
  <ion-item [button]="true">Option 3</ion-item>
</ion-list>
```

when you try to navigate using the arrow down keys, it will stop at the
disabled item instead of continuing over it.

Note that changing the item to the following will work:

```html
<ion-item [button]="true" disabled="true">Option 2</ion-item>
```

## What is the new behavior?
Reflect the `disabled` property in the item so that when items are
queried in the popover, the arrow down key skips over the disabled item.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

This can be tested in the Angular test app by following the
documentation here:
https://github.com/ionic-team/ionic-framework/blob/main/docs/angular/testing.md

Removing my fix in `core`, then running `npm run build` and re-syncing
the test app should reproduce the problem.
2024-06-26 15:35:44 +00:00
renovate[bot]
3d6e2c4d2f chore(deps): update capacitor to v6.1.0 (#29627)
[![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.0.0` ->
`6.1.0`](https://renovatebot.com/diffs/npm/@capacitor%2fcore/6.0.0/6.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@capacitor%2fcore/6.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@capacitor%2fcore/6.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@capacitor%2fcore/6.0.0/6.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@capacitor%2fcore/6.0.0/6.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@capacitor/keyboard](https://togithub.com/ionic-team/capacitor-plugins)
| [`6.0.0` ->
`6.0.1`](https://renovatebot.com/diffs/npm/@capacitor%2fkeyboard/6.0.0/6.0.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@capacitor%2fkeyboard/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@capacitor%2fkeyboard/6.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@capacitor%2fkeyboard/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%2fkeyboard/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.0`](https://togithub.com/ionic-team/capacitor/blob/HEAD/CHANGELOG.md#610-2024-06-11)

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

##### Bug Fixes

- **android:** avoid crash if server url ends in /
([#&#8203;7426](https://togithub.com/ionic-team/capacitor/issues/7426))
([f8264cc](f8264ccae1))
- **cli:** Avoid duplicate entries in packageClassList
([#&#8203;7470](https://togithub.com/ionic-team/capacitor/issues/7470))
([cca0b80](cca0b80529))
- **cli:** Run sync before updating gradle
([#&#8203;7497](https://togithub.com/ionic-team/capacitor/issues/7497))
([f27786e](f27786ea13))
- **http:** don't override readyState for non POST requests
([#&#8203;7488](https://togithub.com/ionic-team/capacitor/issues/7488))
([30c13a8](30c13a865e))
- **ios:** check if urlSchemeTask is stopped before calling its methods
([#&#8203;7482](https://togithub.com/ionic-team/capacitor/issues/7482))
([b32b5b1](b32b5b17ed))

##### Features

- **cli:** run plugin hooks
([#&#8203;7499](https://togithub.com/ionic-team/capacitor/issues/7499))
([3b847ea](3b847eac42))
- **ios:** CAPPluginMethod selector-based initializer
([#&#8203;7412](https://togithub.com/ionic-team/capacitor/issues/7412))
([44c5b55](44c5b55e36))

</details>

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

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

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

##### Bug Fixes

- **ios:** iOS panorama photos selected through CameraPlugin are
corrupted
([#&#8203;2090](https://togithub.com/ionic-team/capacitor-plugins/issues/2090))
([998e495](998e4950d5))
- **ios:** Picking ProRAW pictures from Gallery
([#&#8203;2098](https://togithub.com/ionic-team/capacitor-plugins/issues/2098))
([20b9e26](20b9e26b1b))

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-24 18:50:54 +00:00
renovate[bot]
ff214bd5f3 chore(deps): update playwright (#29609)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

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

---

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-18 00:24:57 +00:00
Maria Hutt
2c208da239 chore(vue): pin version for test app (#29631)
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. -->

CI tests are failing because of a recent patch from Vue. They start to
fail on Vue v3.4.28.

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

- Pinned Vue v3.4.27 until we can determine a fix.

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

N/A
2024-06-17 20:52:46 +00:00
Brandy Carney
b848bac16f merge release-8.2.2 (#29615)
Release 8.2.2
2024-06-12 17:47:23 -04:00
Brandy Carney
0ce1d34c66 chore(): update package lock files 2024-06-12 17:36:41 -04:00
Brandy Carney
020278eaf0 docs(changelog): remove chore commit 2024-06-12 17:30:33 -04:00
ionitron
537e86d1e6 chore(): update package lock files 2024-06-12 21:21:37 +00:00
ionitron
3514bfe07b v8.2.2 2024-06-12 21:20:50 +00:00
Maria Hutt
ebefe1f428 chore(visual-regression): add script to update ground truths (#29204)
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. -->

Devs would have to manually generate the ground truths from their
desired base branch. This causes a dev to checkout the base branch and
pull the latest screenshots. They would then return to their working
branch and start the E2E tests.

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

A script has been created to automate this process using Docker as
mentioned in the design doc:

- It will ask the user a set a questions like if which component they
want to test


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

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

How to test:
1. Make a change to a desired component
2. Run `npm run test.e2e.script`
3. Answer the questions
4. Verify that the tests fail due to visual changes
5. Re-run the command as many times as necessary in order to try
different routes based on different answers
2024-06-12 18:25:25 +00:00
Maria Hutt
5cdfac89f5 fix(refresher): show when content is fullscreen (#29608)
Issue number: resolves #18714

---------

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

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

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

When the `ion-content` has the fullscreen attribute, the `ion-refresher`
will be hidden while refreshing. This can be seen by dragging far enough
to trigger it to snap back and refresh.

The refresher ends up being hidden behind the background content
element.


https://github.com/ionic-team/ionic-framework/assets/13530427/27b5393b-dd31-44a5-b872-97709e3a0980


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

- Set the `--offset-top` to `0px` for the background content element.
This reflects the same behavior of when the content is not fullscreen.
By setting this to `0px`, the refresher is visible while refreshing.
- Added a private prop within refresher to keep track of whether
`ion-content` is `fullscreen` or not.
- Added test.

Originally, I was going to update the `pullMin` and `pullMax` as agreed
on from the investigation ticket. However, it ended up adding too much
space between the refresher and the content. This is the reason why I
decided to modify the background background instead. Otherwise, it
wouldn't mimic the behavior when content doesn't have the `fullscreen`
attribute.

Example of what the spacing looked like:


https://github.com/ionic-team/ionic-framework/assets/13530427/389cea62-48c1-4464-be47-44bc3b6c0315


## Does this introduce a breaking change?

- [ ] Yes
- [x] No

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


## Other information

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


[Preview](https://ionic-framework-git-rou-4950-ionic1.vercel.app/src/components/refresher/test/fullscreen)

How to test:
1. Navigate to the preview page
2. Use the browser's simulator to chose an iOS device (might need to
refresh the page)
3. Drag the screen down
4. Verify that the refreshing text is shown
5. Use the browser's simulator to chose an Android device (might need to
refresh the page)
6. Drag the screen down
7. Verify that the refreshing text is shown
2024-06-12 17:48:11 +00:00
Maria Hutt
9cec8439f8 docs(screenshots): add step for specific component testing (#29594)
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. -->

There is no documentation on how to use the input field in the
screenshots GH actions.

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

- Added steps and examples on how to specify a component within
screenshots GH actions.

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

N/A
2024-06-12 15:04:12 +00:00
Maria Hutt
e1c0f45796 fix(playwright): bump packages upon new release (#29596)
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. -->

Renovate updates the Playwright packages. It's important that the
Playwright within Docker and within core are the same version. However,
the Playwright version within core does not update when Docker does.

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

- Added a `bump` to the Renovate config, this should allow Playwright
within core to update regardless if the new version satisfies the range.

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

I was unable to test it locally since it will only trigger when the code
is within `main`.
2024-06-11 17:40:46 +00:00
renovate[bot]
6a909f75ff chore(deps): update playwright (#29546)
[![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 |
|---|---|---|---|---|---|---|---|
| [@axe-core/playwright](https://togithub.com/dequelabs/axe-core-npm) |
[`4.9.0` ->
`4.9.1`](https://renovatebot.com/diffs/npm/@axe-core%2fplaywright/4.9.0/4.9.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@axe-core%2fplaywright/4.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@axe-core%2fplaywright/4.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@axe-core%2fplaywright/4.9.0/4.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@axe-core%2fplaywright/4.9.0/4.9.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| [@playwright/test](https://playwright.dev)
([source](https://togithub.com/microsoft/playwright)) | [`1.44.0` ->
`1.44.1`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.44.0/1.44.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.44.0/1.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.44.0/1.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| mcr.microsoft.com/playwright | `v1.44.0` -> `v1.44.1` |
[![age](https://developer.mend.io/api/mc/badges/age/docker/mcr.microsoft.com%2fplaywright/v1.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/mcr.microsoft.com%2fplaywright/v1.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/mcr.microsoft.com%2fplaywright/v1.44.0/v1.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/mcr.microsoft.com%2fplaywright/v1.44.0/v1.44.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| final | patch |

---

### Release Notes

<details>
<summary>dequelabs/axe-core-npm (@&#8203;axe-core/playwright)</summary>

###
[`v4.9.1`](https://togithub.com/dequelabs/axe-core-npm/blob/HEAD/CHANGELOG.md#491-2024-05-15)

[Compare
Source](https://togithub.com/dequelabs/axe-core-npm/compare/v4.9.0...v4.9.1)

##### Bug Fixes

- **playwright:** skip unloaded iframes
([#&#8203;1060](https://togithub.com/dequelabs/axe-core-npm/issues/1060))
([d30dae4](d30dae4a6f))

- Update axe-core to v4.9.1
([#&#8203;1055](https://togithub.com/dequelabs/axe-core-npm/issues/1055))
([8644fbd](8644fbd2d2))

</details>

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

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

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

##### Highlights


[https://github.com/microsoft/playwright/issues/30779](https://togithub.com/microsoft/playwright/issues/30779)
- \[REGRESSION]: When using `video: 'on'` with VSCode extension the
browser got closed

[https://github.com/microsoft/playwright/issues/30755](https://togithub.com/microsoft/playwright/issues/30755)
- \[REGRESSION]: Electron launch with spaces inside executablePath
didn't
work[https://github.com/microsoft/playwright/issues/30770](https://togithub.com/microsoft/playwright/issues/30770)0
- \[REGRESSION]: Mask elements outside of viewport when creating
fullscreen screenshots didn't
wor[https://github.com/microsoft/playwright/issues/30858](https://togithub.com/microsoft/playwright/issues/30858)58
- \[REGRESSION]: ipv6 got shown instead of localhost in
show-trace/show-report

#### Browser Versions

-   Chromium 125.0.6422.14
-   Mozilla Firefox 125.0.1
-   WebKit 17.4

This version was also tested against the following stable channels:

-   Google Chrome 124
-   Microsoft Edge 124

</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 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-11 17:21:24 +00:00
Ryan Waskiewicz
f48bf8b118 chore(repo): move .gitattributes to the root of the project (#29591)
Issue number: resolves N/A

---------

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

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

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

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

this was mistakenly put in the core directory in
https://github.com/ionic-team/ionic-framework/pull/29584

## 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-06-05 20:30:47 +00:00
Brandy Carney
af049c9fe0 merge release-8.2.1 (#29588)
Release 8.2.1
2024-06-05 13:34:49 -04:00
Brandy Carney
65cbe4e345 chore(): update package lock files 2024-06-05 13:22:08 -04:00
Brandy Carney
d75664e467 docs(changelog): add missing commit 2024-06-05 12:27:06 -04:00
ionitron
b7489989ed chore(): update package lock files 2024-06-05 16:17:34 +00:00
ionitron
868ebb7d26 v8.2.1 2024-06-05 16:16:50 +00:00
Ryan Waskiewicz
34d4055c6b chore(repo): add git attributes configuration (#29584)
Issue number: N/A

---------

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

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

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

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

add a .gitattributes configuration file to the repo. this will allow
users of unix and windows machines to be able to commit to the repo
without worrying about line endings.

previously, running the `lint` npm task in the core directory would
cause the line endings to change locally. with this change, line endings
should not change

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/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-06-04 20:02:01 +00:00
renovate[bot]
a7b1b43f41 chore(deps): update dependency @stencil/core to v4.18.3 (#29579)
[![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.18.2` ->
`4.18.3`](https://renovatebot.com/diffs/npm/@stencil%2fcore/4.18.2/4.18.3)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@stencil%2fcore/4.18.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@stencil%2fcore/4.18.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@stencil%2fcore/4.18.2/4.18.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@stencil%2fcore/4.18.2/4.18.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v4.18.3`](https://togithub.com/ionic-team/stencil/blob/HEAD/CHANGELOG.md#-4183-2024-05-28)

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

##### Bug Fixes

- **esbuild:** remove all `node:` imports from glob script to keep
support for Jest v26
([#&#8203;5784](https://togithub.com/ionic-team/stencil/issues/5784))
([5f4fcfa](5f4fcfa12e)),
fixes
[#&#8203;5766](https://togithub.com/ionic-team/stencil/issues/5766)
- **mock-doc:** support toDataURL method in canvas
([#&#8203;5773](https://togithub.com/ionic-team/stencil/issues/5773))
([3830dad](3830dad7c8)),
closes
[#&#8203;2923](https://togithub.com/ionic-team/stencil/issues/2923)
- **runtime:** add missing intermediate parents scope ids to the
elements
([#&#8203;5775](https://togithub.com/ionic-team/stencil/issues/5775))
([56c60d4](56c60d4af1)),
fixes
[#&#8203;5774](https://togithub.com/ionic-team/stencil/issues/5774)

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-04 19:47:09 +00:00
filifunk
624ceba2e1 refactor(react): export InputInputEventDetail type (#29512)
Issue number: resolves #29518 

---------

<!-- 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. -->
IonInput in React apps can't import the correct type for typescript.  
## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
Since it is in the file exported, people using IonInput can import the
correct type.
-
-
-

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

Liam DeBeasi told me it was a bug a couple days ago and pointed out to
where it needed to be added.
2024-05-31 22:30:50 +00:00
Maria Hutt
b13822975b chore(angular): upgrade to official 18 release (#29571)
Issue number: internal

---------

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

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

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

Angular 18 test app was using an RC.

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

- Updated to the official release.
- Removed the `--legacy-peer-deps` that is no longer needed

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

N/A
2024-05-31 17:28:38 +00:00
Gonçalo M
4bb19d09ed chore(github): add new team members to auto-assign issue action (#29558)
- Add UI Component team members to the Ionic Framework team:
    - joselrio,
    - rugoncalves,
    - BenOsodrac,
    - JoaoFerreira-FrontEnd,
    - OS-giulianasilva
2024-05-28 15:19:18 +00:00
renovate[bot]
75fd488dc1 chore(deps): update dependency @stencil/core to v4.18.2 (#29553)
[![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.18.1` ->
`4.18.2`](https://renovatebot.com/diffs/npm/@stencil%2fcore/4.18.1/4.18.2)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@stencil%2fcore/4.18.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@stencil%2fcore/4.18.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@stencil%2fcore/4.18.1/4.18.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@stencil%2fcore/4.18.1/4.18.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v4.18.2`](https://togithub.com/ionic-team/stencil/blob/HEAD/CHANGELOG.md#-4182-2024-05-20)

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

##### Bug Fixes

- **e2e:** allow to fetch CSS variables assigned to host elements
([#&#8203;5682](https://togithub.com/ionic-team/stencil/issues/5682))
([e420eb6](e420eb69ed)),
closes
[#&#8203;5681](https://togithub.com/ionic-team/stencil/issues/5681)
- **hydrate:** respect `HydratedFlag` configuration in hydrate script
([#&#8203;5741](https://togithub.com/ionic-team/stencil/issues/5741))
([3538d06](3538d06bdc)),
closes
[#&#8203;3606](https://togithub.com/ionic-team/stencil/issues/3606)
- **runtime:** always throw if component can not be loaded
([#&#8203;5762](https://togithub.com/ionic-team/stencil/issues/5762))
([1d52b95](1d52b9500e)),
closes
[#&#8203;5759](https://togithub.com/ionic-team/stencil/issues/5759)
- **runtime:** support watch for components with custom tag names
([#&#8203;5767](https://togithub.com/ionic-team/stencil/issues/5767))
([f561e0f](f561e0fdc3)),
closes
[#&#8203;3554](https://togithub.com/ionic-team/stencil/issues/3554)
- **runtime:** throw proper error if component is loaded with invalid
runtime
([#&#8203;5675](https://togithub.com/ionic-team/stencil/issues/5675))
([3cfbb8d](3cfbb8d7be)),
closes
[#&#8203;5596](https://togithub.com/ionic-team/stencil/issues/5596)
- **types:** move autofocus attr/prop definition to HTMLAttributes
([#&#8203;5727](https://togithub.com/ionic-team/stencil/issues/5727))
([3a33eff](3a33eff4c8)),
closes
[#&#8203;5726](https://togithub.com/ionic-team/stencil/issues/5726)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-28 14:20:06 +00:00
Brandy Carney
5cdfa1aaf4 merge release-8.2.0 (#29534)
Release 8.2.0
2024-05-22 13:25:24 -04:00
ionitron
9bfbd98ea0 chore(): update package lock files 2024-05-22 17:11:57 +00:00
ionitron
f238b4258c v8.2.0 2024-05-22 17:11:10 +00:00
Brandy Carney
eb5396fd56 Merge branch 'main' into feature-8.2 2024-05-22 12:46:45 -04:00
Brandy Carney
665a24d175 merge release-8.1.3 (#29531)
Release 8.1.3
2024-05-22 12:44:17 -04:00
Brandy Carney
829a57e7cf docs(changelog): remove already released commits 2024-05-22 12:21:53 -04:00
ionitron
0f4cca14dc chore(): update package lock files 2024-05-22 16:17:05 +00:00
ionitron
85728b7b35 v8.1.3 2024-05-22 16:16:15 +00:00
renovate[bot]
05f857a39c chore(deps): update pozil/auto-assign-issue action to v2 (#29522)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[pozil/auto-assign-issue](https://togithub.com/pozil/auto-assign-issue)
| action | major | `v1.14.0` -> `v2.0.0` |

---

### Release Notes

<details>
<summary>pozil/auto-assign-issue (pozil/auto-assign-issue)</summary>

###
[`v2.0.0`](https://togithub.com/pozil/auto-assign-issue/releases/tag/v2.0.0):
- Node 20 support

[Compare
Source](https://togithub.com/pozil/auto-assign-issue/compare/v1.14.0...v2.0.0)

-   feat: switch to node@20

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-20 17:35:15 +00:00
renovate[bot]
7c56eb72b0 chore(deps): update playwright to v1.44.0 (#29470)
[![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.43.1` ->
`1.44.0`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.43.1/1.44.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.43.1/1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.43.1/1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | minor |
| mcr.microsoft.com/playwright | `v1.43.1` -> `v1.44.0` |
[![age](https://developer.mend.io/api/mc/badges/age/docker/mcr.microsoft.com%2fplaywright/v1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/mcr.microsoft.com%2fplaywright/v1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/mcr.microsoft.com%2fplaywright/v1.43.1/v1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/mcr.microsoft.com%2fplaywright/v1.43.1/v1.44.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| final | minor |

---

### Release Notes

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

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

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

#### New APIs

**Accessibility assertions**

-
[expect(locator).toHaveAccessibleName()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-name)
checks if the element has the specified accessible name:

    ```js
    const locator = page.getByRole('button');
    await expect(locator).toHaveAccessibleName('Submit');
    ```

-
[expect(locator).toHaveAccessibleDescription()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-description)
checks if the element has the specified accessible description:

    ```js
    const locator = page.getByRole('button');
    await expect(locator).toHaveAccessibleDescription('Upload a photo');
    ```

-
[expect(locator).toHaveRole()](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-role)
checks if the element has the specified ARIA role:

    ```js
    const locator = page.getByTestId('save-button');
    await expect(locator).toHaveRole('button');
    ```

**Locator handler**

- After executing the handler added with
[page.addLocatorHandler()](https://playwright.dev/docs/api/class-page#page-add-locator-handler),
Playwright will now wait until the overlay that triggered the handler is
not visible anymore. You can opt-out of this behavior with the new
`noWaitAfter` option.
- You can use new `times` option in
[page.addLocatorHandler()](https://playwright.dev/docs/api/class-page#page-add-locator-handler)
to specify maximum number of times the handler should be run.
- The handler in
[page.addLocatorHandler()](https://playwright.dev/docs/api/class-page#page-add-locator-handler)
now accepts the locator as argument.
- New
[page.removeLocatorHandler()](https://playwright.dev/docs/api/class-page#page-remove-locator-handler)
method for removing previously added locator handlers.

```js
const locator = page.getByText('This interstitial covers the button');
await page.addLocatorHandler(locator, async overlay => {
  await overlay.locator('#close').click();
}, { times: 3, noWaitAfter: true });
// Run your tests that can be interrupted by the overlay.
// ...
await page.removeLocatorHandler(locator);
```

**Miscellaneous options**

-
[`multipart`](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-fetch-option-multipart)
option in `apiRequestContext.fetch()` now accepts
[`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
and supports repeating fields with the same name.

    ```js
    const formData = new FormData();
formData.append('file', new File(['let x = 2024;'], 'f1.js', { type:
'text/javascript' }));
formData.append('file', new File(['hello'], 'f2.txt', { type:
'text/plain' }));
    context.request.post('https://example.com/uploadFiles', {
      multipart: formData
    });
    ```

- `expect(callback).toPass({ intervals })` can now be configured by
`expect.toPass.inervals` option globally in
[testConfig.expect](https://playwright.dev/docs/api/class-testconfig#test-config-expect)
or per project in
[testProject.expect](https://playwright.dev/docs/api/class-testproject#test-project-expect).

- `expect(page).toHaveURL(url)` now supports `ignoreCase`
[option](https://playwright.dev/docs/api/class-pageassertions#page-assertions-to-have-url-option-ignore-case).

-
[testProject.ignoreSnapshots](https://playwright.dev/docs/api/class-testproject#test-project-ignore-snapshots)
allows to configure per project whether to skip screenshot expectations.

**Reporter API**

- New method
[suite.entries()](https://playwright.dev/docs/api/class-suite#suite-entries)
returns child test suites and test cases in their declaration order.
[suite.type](https://playwright.dev/docs/api/class-suite#suite-type) and
[testCase.type](https://playwright.dev/docs/api/class-testcase#test-case-type)
can be used to tell apart test cases and suites in the list.
- [Blob](https://playwright.dev/docs/test-reporters#blob-reporter)
reporter now allows overriding report file path with a single option
`outputFile`. The same option can also be specified as
`PLAYWRIGHT_BLOB_OUTPUT_FILE` environment variable that might be more
convenient on CI/CD.
- [JUnit](https://playwright.dev/docs/test-reporters#junit-reporter)
reporter now supports `includeProjectInTestName` option.

**Command line**

- `--last-failed` CLI option for running only tests that failed in the
previous run.

    First run all tests:

    ```sh
    $ npx playwright test

    Running 103 tests using 5 workers
    ...
    2 failed
[chromium] › my-test.spec.ts:8:5 › two
─────────────────────────────────────────────────────────
[chromium] › my-test.spec.ts:13:5 › three
──────────────────────────────────────────────────────
    101 passed (30.0s)
    ```

Now fix the failing tests and run Playwright again with `--last-failed`
option:

    ```sh
    $ npx playwright test --last-failed

    Running 2 tests using 2 workers
      2 passed (1.2s)
    ```

#### Browser Versions

-   Chromium 125.0.6422.14
-   Mozilla Firefox 125.0.1
-   WebKit 17.4

This version was also tested against the following stable channels:

-   Google Chrome 124
-   Microsoft Edge 124

</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 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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDAuMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Maria Hutt <thetaPC@users.noreply.github.com>
2024-05-17 21:09:50 +00:00
renovate[bot]
6beb0be4bd chore(deps): update dependency @stencil/core to v4.18.1 (#29519)
[![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.18.0` ->
`4.18.1`](https://renovatebot.com/diffs/npm/@stencil%2fcore/4.18.0/4.18.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@stencil%2fcore/4.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@stencil%2fcore/4.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@stencil%2fcore/4.18.0/4.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@stencil%2fcore/4.18.0/4.18.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v4.18.1`](https://togithub.com/ionic-team/stencil/blob/HEAD/CHANGELOG.md#-4181-2024-05-13)

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

##### Bug Fixes

- **build:** do not copy polyfills to the `dist` OT unless building es5
([#&#8203;5725](https://togithub.com/ionic-team/stencil/issues/5725))
([945df46](945df46b72)),
closes
[#&#8203;5416](https://togithub.com/ionic-team/stencil/issues/5416)
- **compiler:** Allow OutputTargetCustom to be called on devMode
([#&#8203;5541](https://togithub.com/ionic-team/stencil/issues/5541))
([b0a9f7b](b0a9f7b559)),
closes
[#&#8203;5514](https://togithub.com/ionic-team/stencil/issues/5514)
- **compiler:** deprecate `scriptDataOpts`
([#&#8203;5737](https://togithub.com/ionic-team/stencil/issues/5737))
([da25aaa](da25aaa4f3))
- **declarations:** Attribute ping is missing on AnchorHTMLAttributes
([#&#8203;5752](https://togithub.com/ionic-team/stencil/issues/5752))
([d345412](d345412302)),
closes
[#&#8203;5751](https://togithub.com/ionic-team/stencil/issues/5751)
- **runtime:** add root scope id to the user provided nested children as
classname
([#&#8203;5750](https://togithub.com/ionic-team/stencil/issues/5750))
([e864132](e8641322c3)),
closes
[#&#8203;5749](https://togithub.com/ionic-team/stencil/issues/5749)

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-17 16:53:40 +00:00
Brandy Carney
e826568c75 docs(readme): update broken links, repository name, clean up readme (#29508) 2024-05-15 21:26:27 +00:00
Sean Perkins
4640e046eb feat(angular): setting props on a signal works (#29453)
Issue number: resolves #28876

---------

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

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

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

When assigning `componentProps` as inputs to an Angular component, we do
`Object.assign`. When using the newer Angular Signals API for inputs the
value of an input is a function:

```js
myInput = input<string>('foo') // this is a function
```

The developer accesses the value of `myInput` in a template by doing
`myInput()` since `myInput` is a function.

If a developer passes `componentProps: { myInput: 'bar' }` then the
value of `myInput` is set to this string value, overriding the function.
As a result, calling `myInput()` results in an error because `myInput`
is a string not a function.

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

- Angular 14.1 introduced `setInput` which lets us hand off setting
inputs to Angular. This will set input values properly even when using a
Signals-based input.

## Does this introduce a breaking change?

- [x] Yes
- [ ] No

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


As part of this `NavParams` has been deprecated as it is incompatible
with the `setInput` API. The old `Object.assign` worked to allow devs to
get all of the `componentProp` key value pairs via `NavParams` even if
they are not defined as `Inputs`. Using `setInput` will now throw an
error, so developers need to create an `@Input` for each parameter. This
means that `NavParams` has no purpose and can safely be retired in favor
of Angular's Input API. Not removing NavParms would make it difficult
for us to support new Angular APIs such as this Signals-based input API.

## 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.1.1-dev.11715021973.16675b67`

You will need to update the Ionic config to opt-in to the new option:
```ts
useSetInputAPI: true,
```

---------

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2024-05-06 18:12:32 -04:00
1431 changed files with 12917 additions and 19707 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* text=auto eol=lf

View File

@@ -6,11 +6,19 @@ runs:
- uses: actions/setup-node@v4
with:
node-version: 18.x
- uses: ./.github/workflows/actions/download-archive
with:
name: ionic-core
path: ./core
filename: CoreBuild.zip
- name: Install Angular Server Dependencies
run: npm ci
shell: bash
working-directory: ./packages/angular-server
- name: Sync
run: npm run sync
shell: bash
working-directory: ./packages/angular-server
- name: Build
run: npm run build.prod
shell: bash

View File

@@ -29,4 +29,4 @@ runs:
with:
name: ionic-core
output: core/CoreBuild.zip
paths: core/dist core/components core/src/foundations core/css core/hydrate core/loader core/src/components.d.ts
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts

View File

@@ -31,4 +31,4 @@ runs:
with:
name: ionic-core
output: core/CoreBuild.zip
paths: core/dist core/components core/src/foundations core/css core/hydrate core/loader core/src/components.d.ts core/api.txt
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts core/api.txt

View File

@@ -29,7 +29,7 @@ runs:
shell: bash
working-directory: ./packages/angular/test
- name: Install Dependencies
run: npm install --legacy-peer-deps # TODO(FW-6227): Remove legacy-peer-deps flag
run: npm install
shell: bash
working-directory: ./packages/angular/test/build/${{ inputs.app }}
- name: Sync Built Changes

View File

@@ -11,8 +11,8 @@ jobs:
issues: write
steps:
- name: 'Auto-assign issue'
uses: pozil/auto-assign-issue@65947009a243e6b3993edeef4e64df3ca85d760c # v1.14.0
uses: pozil/auto-assign-issue@c5bca5027e680b9e8411b826d16947afd8c76b32 # v2.0.0
with:
assignees: brandyscarney, thetaPC
assignees: brandyscarney, thetaPC, joselrio, rugoncalves, BenOsodrac, JoaoFerreira-FrontEnd, OS-giulianasilva
numOfAssignee: 1
allowSelfAssign: false

View File

@@ -4,31 +4,290 @@ This is a comprehensive list of the breaking changes introduced in the major ver
## Versions
- [Version 9.x](#version-9x)
- [Version 8.x](./BREAKING_ARCHIVE/v8.md)
- [Version 8.x](#version-8x)
- [Version 7.x](./BREAKING_ARCHIVE/v7.md)
- [Version 6.x](./BREAKING_ARCHIVE/v6.md)
- [Version 5.x](./BREAKING_ARCHIVE/v5.md)
- [Version 4.x](./BREAKING_ARCHIVE/v4.md)
- [Legacy](https://github.com/ionic-team/ionic-v3/blob/master/CHANGELOG.md)
## Version 9.x
## Version 8.x
- [Components](#version-9x-components)
- [Button](#version-9x-button)
- [Card](#version-9x-card)
- [Chip](#version-9x-chip)
- [Browser and Platform Support](#version-8x-browser-platform-support)
- [Dark Mode](#version-8x-dark-mode)
- [Global Styles](#version-8x-global-styles)
- [Haptics](#version-8x-haptics)
- [Components](#version-8x-components)
- [Button](#version-8x-button)
- [Checkbox](#version-8x-checkbox)
- [Content](#version-8x-content)
- [Datetime](#version-8x-datetime)
- [Input](#version-8x-input)
- [Item](#version-8x-item)
- [Modal](#version-8x-modal)
- [Nav](#version-8x-nav)
- [Picker](#version-8x-picker)
- [Progress bar](#version-8x-progress-bar)
- [Radio](#version-8x-radio)
- [Range](#version-8x-range)
- [Searchbar](#version-8x-searchbar)
- [Select](#version-8x-select)
- [Textarea](#version-8x-textarea)
- [Toggle](#version-8x-toggle)
- [Framework Specific](#version-8x-framework-specific)
- [Angular](#version-8x-angular)
<h2 id="version-9x-components">Components</h2>
<h2 id="version-8x-browser-platform-support">Browser and Platform Support</h2>
<h4 id="version-9x-button">Button</h4>
This section details the desktop browser, JavaScript framework, and mobile platform versions that are supported by Ionic 8.
- The `border-radius` of the `ios` and `md` button now defaults to `6px` and `999px` instead of `14px` and `4px`, respectively, in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set the `shape` to `"soft"` for `md` and override the `--border-radius` CSS variable for `ios` to `14px`, or set it to a different value entirely.
**Minimum Browser Versions**
| Desktop Browser | Supported Versions |
| --------------- | ----------------- |
| Chrome | 89+ |
| Safari | 15+ |
| Firefox | 75+ |
| Edge | 89+ |
<h4 id="version-9x-card">Card</h4>
**Minimum JavaScript Framework Versions**
| Framework | Supported Version |
| --------- | --------------------- |
| Angular | 16+ |
| React | 17+ |
| Vue | 3.0.6+ |
- The `border-radius` of the `ios` and `md` card now defaults to `14px` and `12px` instead of `8px` and `4px`, respectively, in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set the `shape` to `"soft"`, or override the `--border-radius` CSS variable to specify a different value.
**Minimum Mobile Platform Versions**
| Platform | Supported Version |
| -------- | ---------------------- |
| iOS | 15+ |
| Android | 5.1+ with Chromium 89+ |
<h4 id="version-9x-chip">Chip</h4>
Ionic Framework v8 removes backwards support for CSS Animations in favor of the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API). All minimum browser versions listed above support the Web Animations API.
- The `border-radius` of the `ios` and `md` chip now defaults to `10px` and `8px`, respectively, instead of `16px` in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set the `shape` to `"round"`, or override the `--border-radius` CSS variable to specify a different value.
<h2 id="version-8x-dark-mode">Dark Mode</h2>
In previous versions, it was recommended to define the dark palette in the following way:
```css
@media (prefers-color-scheme: dark) {
body {
/* global app variables */
}
.ios body {
/* global ios app variables */
}
.md body {
/* global md app variables */
}
}
```
In Ionic Framework version 8, the dark palette is being distributed via css files that can be imported. Below is an example of importing a dark palette file in Angular:
```css
/* @import '@ionic/angular/css/palettes/dark.always.css'; */
/* @import "@ionic/angular/css/palettes/dark.class.css"; */
@import "@ionic/angular/css/palettes/dark.system.css";
```
By importing the `dark.system.css` file, the dark palette variables will be defined like the following:
```css
@media (prefers-color-scheme: dark) {
:root {
/* global app variables */
}
:root.ios {
/* global ios app variables */
}
:root.md {
/* global md app variables */
}
}
```
Notice that the dark palette is now applied to the `:root` selector instead of the `body` selector. The [`:root`](https://developer.mozilla.org/en-US/docs/Web/CSS/:root) selector represents the `<html>` element and is identical to the selector `html`, except that its specificity is higher.
While migrating to include the new dark palette files is unlikely to cause breaking changes, these new selectors can lead to unexpected overrides if custom CSS variables are being set on the `body` element. We recommend updating any instances where global application variables are set to target the `:root` selector instead.
For more information on the new dark palette files, refer to the [Dark Mode documentation](https://ionicframework.com/docs/theming/dark-mode).
<h2 id="version-8x-global-styles">Global Styles</h2>
<h4 id="version-8x-text-color">Text Color</h4>
The `core.css` file has been updated to set the text color on the `body` element:
```diff
body {
+ color: var(--ion-text-color);
}
```
This allows components to inherit the color properly when used outside of Ionic Framework and is required for custom themes to work properly. However, it may have unintentional side effects in apps if the color was not expected to inherit.
<h4 id="version-8x-dynamic-font">Dynamic Font</h4>
The `core.css` file has been updated to enable dynamic font scaling by default.
The `--ion-default-dynamic-font` variable has been removed and replaced with `--ion-dynamic-font`.
Developers who had previously chosen dynamic font scaling by activating it in their global stylesheets can revert to the default setting by removing their custom CSS. In doing so, their application will seamlessly continue utilizing dynamic font scaling as it did before. It's essential to note that altering the font-size of the html element should be avoided, as it may disrupt the proper functioning of dynamic font scaling.
Developers who want to disable dynamic font scaling can set `--ion-dynamic-font: initial;` in their global stylesheets. However, this is not recommended because it may introduce accessibility challenges for users who depend on enlarged font sizes.
For more information on the dynamic font, refer to the [Dynamic Font Scaling documentation](https://ionicframework.com/docs/layout/dynamic-font-scaling).
<h2 id="version-8x-haptics">Haptics</h2>
- Support for the Cordova Haptics plugin has been removed. Components that integrate with haptics, such as `ion-picker` and `ion-toggle`, will continue to function but will no longer play haptics in Cordova environments. Developers should migrate to Capacitor to continue to have haptics in these components.
<h2 id="version-8x-components">Components</h2>
<h4 id="version-8x-button">Button</h4>
- Button text now wraps by default. If this behavior is not desired, add the `ion-text-nowrap` class from the [CSS Utilities](https://ionicframework.com/docs/layout/css-utilities).
<h4 id="version-8x-checkbox">Checkbox</h4>
The `legacy` property and support for the legacy syntax, which involved placing an `ion-checkbox` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy checkbox syntax, refer to the [Checkbox documentation](https://ionicframework.com/docs/api/checkbox#migrating-from-legacy-checkbox-syntax).
<h4 id="version-8x-content">Content</h4>
- Content no longer sets the `--background` custom property when the `.outer-content` class is set on the host.
<h4 id="version-8x-datetime">Datetime</h4>
- The CSS shadow part for `month-year-button` has been changed to target a `button` element instead of `ion-item`. Developers should verify their UI renders as expected for the month/year toggle button inside of `ion-datetime`.
- Developers using the CSS variables available on `ion-item` will need to migrate their CSS to use CSS properties. For example:
```diff
ion-datetime::part(month-year-button) {
- --background: red;
+ background: red;
}
```
<h4 id="version-8x-input">Input</h4>
- `size` has been removed from the `ion-input` component. Developers should use CSS to specify the visible width of the input.
- `accept` has been removed from the `ion-input` component. This was previously used in conjunction with the `type="file"`. However, the `file` value for `type` is not a valid value in Ionic Framework.
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-input` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy input syntax, refer to the [Input documentation](https://ionicframework.com/docs/api/input#migrating-from-legacy-input-syntax).
<h4 id="version-8x-item">Item</h4>
- The `helper` slot has been removed. Developers should use the `helperText` property on `ion-input` and `ion-textarea`.
- The `error` slot has been removed. Developers should use the `errorText` property on `ion-input` and `ion-textarea`.
- Counter functionality has been removed including the `counter` and `counterFormatter` properties. Developers should use the properties of the same name on `ion-input` and `ion-textarea`.
- The `fill` property has been removed. Developers should use the property of the same name on `ion-input`, `ion-select`, and `ion-textarea`.
- The `shape` property has been removed. Developers should use the property of the same name on `ion-input`, `ion-select`, and `ion-textarea`.
- Item no longer automatically delegates focus to the first focusable element. While most developers should not need to make any changes to account for this update, usages of `ion-item` with interactive elements such as form controls (inputs, textareas, etc) should be evaluated to verify that interactions still work as expected.
<h5>CSS variables</h4>
The following deprecated CSS variables have been removed: `--highlight-height`, `--highlight-color-focused`, `--highlight-color-valid`, and `--highlight-color-invalid`. These variables were used on the bottom border highlight of an item when the form control inside of that item was focused. The form control syntax was [simplified in v7](https://ionic.io/blog/ionic-7-is-here#simplified-form-control-syntax) so that inputs, selects, and textareas would no longer be required to be used inside of an item.
If you have not yet migrated to the modern form control syntax, migration guides for each of the form controls that added a highlight to item can be found below:
- [Input migration documentation](https://ionicframework.com/docs/api/input#migrating-from-legacy-input-syntax)
- [Select migration documentation](https://ionicframework.com/docs/api/select#migrating-from-legacy-select-syntax)
- [Textarea migration documentation](https://ionicframework.com/docs/api/textarea#migrating-from-legacy-textarea-syntax)
Once all form controls are using the modern syntax, the same variables can be used to customize them from the form control itself:
| Name | Description |
| ----------------------------| ----------------------------------------|
| `--highlight-color-focused` | The color of the highlight when focused |
| `--highlight-color-invalid` | The color of the highlight when invalid |
| `--highlight-color-valid` | The color of the highlight when valid |
| `--highlight-height` | The height of the highlight indicator |
The following styles for item:
```css
ion-item {
--highlight-color-focused: purple;
--highlight-color-valid: blue;
--highlight-color-invalid: orange;
--highlight-height: 6px;
}
```
will instead be applied on the form controls:
```css
ion-input,
ion-textarea,
ion-select {
--highlight-color-focused: purple;
--highlight-color-valid: blue;
--highlight-color-invalid: orange;
--highlight-height: 6px;
}
```
> [!NOTE]
> The input and textarea components are scoped, which means they will automatically scope their CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector. Targeting the `ion-input` or `ion-textarea` for customization will not work; therefore we recommend adding a class and customizing it that way.
<h4 id="version-8x-modal">Modal</h4>
- Detection for Capacitor <= 2 with applying status bar styles has been removed. Developers should ensure they are using Capacitor 3 or later when using the card modal presentation.
<h4 id="version-8x-nav">Nav</h4>
- `getLength` returns `Promise<number>` instead of `<number>`. This method was not previously available in Nav's TypeScript interface, but developers could still access it by casting Nav as `any`. Developers should ensure they `await` their `getLength` call before accessing the returned value.
<h4 id="version-8x-picker">Picker</h4>
- `ion-picker` and `ion-picker-column` have been renamed to `ion-picker-legacy` and `ion-picker-legacy-column`, respectively. This change was made to accommodate the new inline picker component while allowing developers to continue to use the legacy picker during this migration period.
- Only the component names have been changed. Usages such as `ion-picker` or `IonPicker` should be changed to `ion-picker-legacy` and `IonPickerLegacy`, respectively.
- Non-component usages such as `pickerController` or `useIonPicker` remain unchanged. The new picker displays inline with your page content and does not have equivalents for these non-component usages.
<h4 id="version-8x-progress-bar">Progress bar</h4>
- The `--buffer-background` CSS variable has been removed. Use `--background` instead.
<h4 id="version-8x-toast">Toast</h4>
- `cssClass` has been removed from the `ToastButton` interface. This was previously used to apply a custom class to the toast buttons. Developers can use the "button" shadow part to style the buttons.
For more information on styling toast buttons, refer to the [Toast Theming documentation](https://ionicframework.com/docs/api/toast#theming).
<h4 id="version-8x-radio">Radio</h4>
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-radio` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy radio syntax, refer to the [Radio documentation](https://ionicframework.com/docs/api/radio#migrating-from-legacy-radio-syntax).
<h4 id="version-8x-range">Range</h4>
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-range` inside of an `ion-item` with an `ion-label`, have been removed. Ionic will also no longer attempt to automatically associate form controls with sibling `<label>` elements as these label elements are now used inside the form control. Developers should provide a label (either visible text or `aria-label`) directly to the form control. For more information on migrating from the legacy range syntax, refer to the [Range documentation](https://ionicframework.com/docs/api/range#migrating-from-legacy-range-syntax).
<h4 id="version-8x-searchbar">Searchbar</h4>
- The `autocapitalize` property now defaults to `'off'`.
<h4 id="version-8x-select">Select</h4>
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-select` inside of an `ion-item` with an `ion-label`, have been removed. Ionic will also no longer attempt to automatically associate form controls with sibling `<label>` elements as these label elements are now used inside the form control. Developers should provide a label (either visible text or `aria-label`) directly to the form control. For more information on migrating from the legacy select syntax, refer to the [Select documentation](https://ionicframework.com/docs/api/select#migrating-from-legacy-select-syntax).
<h4 id="version-8x-textarea">Textarea</h4>
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-textarea` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy textarea syntax, refer to the [Textarea documentation](https://ionicframework.com/docs/api/textarea#migrating-from-legacy-textarea-syntax).
<h4 id="version-8x-toggle">Toggle</h4>
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-toggle` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy toggle syntax, refer to the [Toggle documentation](https://ionicframework.com/docs/api/toggle#migrating-from-legacy-toggle-syntax).
<h2 id="version-8x-framework-specific">Framework Specific</h2>
<h4 id="version-8x-angular">Angular</h4>
- The `IonBackButtonDelegate` class has been removed in favor of `IonBackButton`.
```diff
- import { IonBackButtonDelegate } from '@ionic/angular';
+ import { IonBackButton } from '@ionic/angular';
```

View File

@@ -1,282 +0,0 @@
# Breaking Changes
## Version 8.x
- [Browser and Platform Support](#version-8x-browser-platform-support)
- [Dark Mode](#version-8x-dark-mode)
- [Global Styles](#version-8x-global-styles)
- [Haptics](#version-8x-haptics)
- [Components](#version-8x-components)
- [Button](#version-8x-button)
- [Checkbox](#version-8x-checkbox)
- [Content](#version-8x-content)
- [Datetime](#version-8x-datetime)
- [Input](#version-8x-input)
- [Item](#version-8x-item)
- [Modal](#version-8x-modal)
- [Nav](#version-8x-nav)
- [Picker](#version-8x-picker)
- [Progress bar](#version-8x-progress-bar)
- [Radio](#version-8x-radio)
- [Range](#version-8x-range)
- [Searchbar](#version-8x-searchbar)
- [Select](#version-8x-select)
- [Textarea](#version-8x-textarea)
- [Toggle](#version-8x-toggle)
- [Framework Specific](#version-8x-framework-specific)
- [Angular](#version-8x-angular)
<h2 id="version-8x-browser-platform-support">Browser and Platform Support</h2>
This section details the desktop browser, JavaScript framework, and mobile platform versions that are supported by Ionic 8.
**Minimum Browser Versions**
| Desktop Browser | Supported Versions |
| --------------- | ----------------- |
| Chrome | 89+ |
| Safari | 15+ |
| Firefox | 75+ |
| Edge | 89+ |
**Minimum JavaScript Framework Versions**
| Framework | Supported Version |
| --------- | --------------------- |
| Angular | 16+ |
| React | 17+ |
| Vue | 3.0.6+ |
**Minimum Mobile Platform Versions**
| Platform | Supported Version |
| -------- | ---------------------- |
| iOS | 15+ |
| Android | 5.1+ with Chromium 89+ |
Ionic Framework v8 removes backwards support for CSS Animations in favor of the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API). All minimum browser versions listed above support the Web Animations API.
<h2 id="version-8x-dark-mode">Dark Mode</h2>
In previous versions, it was recommended to define the dark palette in the following way:
```css
@media (prefers-color-scheme: dark) {
body {
/* global app variables */
}
.ios body {
/* global ios app variables */
}
.md body {
/* global md app variables */
}
}
```
In Ionic Framework version 8, the dark palette is being distributed via css files that can be imported. Below is an example of importing a dark palette file in Angular:
```css
/* @import '@ionic/angular/css/palettes/dark.always.css'; */
/* @import "@ionic/angular/css/palettes/dark.class.css"; */
@import "@ionic/angular/css/palettes/dark.system.css";
```
By importing the `dark.system.css` file, the dark palette variables will be defined like the following:
```css
@media (prefers-color-scheme: dark) {
:root {
/* global app variables */
}
:root.ios {
/* global ios app variables */
}
:root.md {
/* global md app variables */
}
}
```
Notice that the dark palette is now applied to the `:root` selector instead of the `body` selector. The [`:root`](https://developer.mozilla.org/en-US/docs/Web/CSS/:root) selector represents the `<html>` element and is identical to the selector `html`, except that its specificity is higher.
While migrating to include the new dark palette files is unlikely to cause breaking changes, these new selectors can lead to unexpected overrides if custom CSS variables are being set on the `body` element. We recommend updating any instances where global application variables are set to target the `:root` selector instead.
For more information on the new dark palette files, refer to the [Dark Mode documentation](https://ionicframework.com/docs/theming/dark-mode).
<h2 id="version-8x-global-styles">Global Styles</h2>
<h4 id="version-8x-text-color">Text Color</h4>
The `core.css` file has been updated to set the text color on the `body` element:
```diff
body {
+ color: var(--ion-text-color);
}
```
This allows components to inherit the color properly when used outside of Ionic Framework and is required for custom themes to work properly. However, it may have unintentional side effects in apps if the color was not expected to inherit.
<h4 id="version-8x-dynamic-font">Dynamic Font</h4>
The `core.css` file has been updated to enable dynamic font scaling by default.
The `--ion-default-dynamic-font` variable has been removed and replaced with `--ion-dynamic-font`.
Developers who had previously chosen dynamic font scaling by activating it in their global stylesheets can revert to the default setting by removing their custom CSS. In doing so, their application will seamlessly continue utilizing dynamic font scaling as it did before. It's essential to note that altering the font-size of the html element should be avoided, as it may disrupt the proper functioning of dynamic font scaling.
Developers who want to disable dynamic font scaling can set `--ion-dynamic-font: initial;` in their global stylesheets. However, this is not recommended because it may introduce accessibility challenges for users who depend on enlarged font sizes.
For more information on the dynamic font, refer to the [Dynamic Font Scaling documentation](https://ionicframework.com/docs/layout/dynamic-font-scaling).
<h2 id="version-8x-haptics">Haptics</h2>
- Support for the Cordova Haptics plugin has been removed. Components that integrate with haptics, such as `ion-picker` and `ion-toggle`, will continue to function but will no longer play haptics in Cordova environments. Developers should migrate to Capacitor to continue to have haptics in these components.
<h2 id="version-8x-components">Components</h2>
<h4 id="version-8x-button">Button</h4>
- Button text now wraps by default. If this behavior is not desired, add the `ion-text-nowrap` class from the [CSS Utilities](https://ionicframework.com/docs/layout/css-utilities).
<h4 id="version-8x-checkbox">Checkbox</h4>
The `legacy` property and support for the legacy syntax, which involved placing an `ion-checkbox` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy checkbox syntax, refer to the [Checkbox documentation](https://ionicframework.com/docs/api/checkbox#migrating-from-legacy-checkbox-syntax).
<h4 id="version-8x-content">Content</h4>
- Content no longer sets the `--background` custom property when the `.outer-content` class is set on the host.
<h4 id="version-8x-datetime">Datetime</h4>
- The CSS shadow part for `month-year-button` has been changed to target a `button` element instead of `ion-item`. Developers should verify their UI renders as expected for the month/year toggle button inside of `ion-datetime`.
- Developers using the CSS variables available on `ion-item` will need to migrate their CSS to use CSS properties. For example:
```diff
ion-datetime::part(month-year-button) {
- --background: red;
+ background: red;
}
```
<h4 id="version-8x-input">Input</h4>
- `size` has been removed from the `ion-input` component. Developers should use CSS to specify the visible width of the input.
- `accept` has been removed from the `ion-input` component. This was previously used in conjunction with the `type="file"`. However, the `file` value for `type` is not a valid value in Ionic Framework.
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-input` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy input syntax, refer to the [Input documentation](https://ionicframework.com/docs/api/input#migrating-from-legacy-input-syntax).
<h4 id="version-8x-item">Item</h4>
- The `helper` slot has been removed. Developers should use the `helperText` property on `ion-input` and `ion-textarea`.
- The `error` slot has been removed. Developers should use the `errorText` property on `ion-input` and `ion-textarea`.
- Counter functionality has been removed including the `counter` and `counterFormatter` properties. Developers should use the properties of the same name on `ion-input` and `ion-textarea`.
- The `fill` property has been removed. Developers should use the property of the same name on `ion-input`, `ion-select`, and `ion-textarea`.
- The `shape` property has been removed. Developers should use the property of the same name on `ion-input`, `ion-select`, and `ion-textarea`.
- Item no longer automatically delegates focus to the first focusable element. While most developers should not need to make any changes to account for this update, usages of `ion-item` with interactive elements such as form controls (inputs, textareas, etc) should be evaluated to verify that interactions still work as expected.
<h5>CSS variables</h4>
The following deprecated CSS variables have been removed: `--highlight-height`, `--highlight-color-focused`, `--highlight-color-valid`, and `--highlight-color-invalid`. These variables were used on the bottom border highlight of an item when the form control inside of that item was focused. The form control syntax was [simplified in v7](https://ionic.io/blog/ionic-7-is-here#simplified-form-control-syntax) so that inputs, selects, and textareas would no longer be required to be used inside of an item.
If you have not yet migrated to the modern form control syntax, migration guides for each of the form controls that added a highlight to item can be found below:
- [Input migration documentation](https://ionicframework.com/docs/api/input#migrating-from-legacy-input-syntax)
- [Select migration documentation](https://ionicframework.com/docs/api/select#migrating-from-legacy-select-syntax)
- [Textarea migration documentation](https://ionicframework.com/docs/api/textarea#migrating-from-legacy-textarea-syntax)
Once all form controls are using the modern syntax, the same variables can be used to customize them from the form control itself:
| Name | Description |
| ----------------------------| ----------------------------------------|
| `--highlight-color-focused` | The color of the highlight when focused |
| `--highlight-color-invalid` | The color of the highlight when invalid |
| `--highlight-color-valid` | The color of the highlight when valid |
| `--highlight-height` | The height of the highlight indicator |
The following styles for item:
```css
ion-item {
--highlight-color-focused: purple;
--highlight-color-valid: blue;
--highlight-color-invalid: orange;
--highlight-height: 6px;
}
```
will instead be applied on the form controls:
```css
ion-input,
ion-textarea,
ion-select {
--highlight-color-focused: purple;
--highlight-color-valid: blue;
--highlight-color-invalid: orange;
--highlight-height: 6px;
}
```
> [!NOTE]
> The input and textarea components are scoped, which means they will automatically scope their CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector. Targeting the `ion-input` or `ion-textarea` for customization will not work; therefore we recommend adding a class and customizing it that way.
<h4 id="version-8x-modal">Modal</h4>
- Detection for Capacitor <= 2 with applying status bar styles has been removed. Developers should ensure they are using Capacitor 3 or later when using the card modal presentation.
<h4 id="version-8x-nav">Nav</h4>
- `getLength` returns `Promise<number>` instead of `<number>`. This method was not previously available in Nav's TypeScript interface, but developers could still access it by casting Nav as `any`. Developers should ensure they `await` their `getLength` call before accessing the returned value.
<h4 id="version-8x-picker">Picker</h4>
- `ion-picker` and `ion-picker-column` have been renamed to `ion-picker-legacy` and `ion-picker-legacy-column`, respectively. This change was made to accommodate the new inline picker component while allowing developers to continue to use the legacy picker during this migration period.
- Only the component names have been changed. Usages such as `ion-picker` or `IonPicker` should be changed to `ion-picker-legacy` and `IonPickerLegacy`, respectively.
- Non-component usages such as `pickerController` or `useIonPicker` remain unchanged. The new picker displays inline with your page content and does not have equivalents for these non-component usages.
<h4 id="version-8x-progress-bar">Progress bar</h4>
- The `--buffer-background` CSS variable has been removed. Use `--background` instead.
<h4 id="version-8x-toast">Toast</h4>
- `cssClass` has been removed from the `ToastButton` interface. This was previously used to apply a custom class to the toast buttons. Developers can use the "button" shadow part to style the buttons.
For more information on styling toast buttons, refer to the [Toast Theming documentation](https://ionicframework.com/docs/api/toast#theming).
<h4 id="version-8x-radio">Radio</h4>
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-radio` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy radio syntax, refer to the [Radio documentation](https://ionicframework.com/docs/api/radio#migrating-from-legacy-radio-syntax).
<h4 id="version-8x-range">Range</h4>
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-range` inside of an `ion-item` with an `ion-label`, have been removed. Ionic will also no longer attempt to automatically associate form controls with sibling `<label>` elements as these label elements are now used inside the form control. Developers should provide a label (either visible text or `aria-label`) directly to the form control. For more information on migrating from the legacy range syntax, refer to the [Range documentation](https://ionicframework.com/docs/api/range#migrating-from-legacy-range-syntax).
<h4 id="version-8x-searchbar">Searchbar</h4>
- The `autocapitalize` property now defaults to `'off'`.
<h4 id="version-8x-select">Select</h4>
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-select` inside of an `ion-item` with an `ion-label`, have been removed. Ionic will also no longer attempt to automatically associate form controls with sibling `<label>` elements as these label elements are now used inside the form control. Developers should provide a label (either visible text or `aria-label`) directly to the form control. For more information on migrating from the legacy select syntax, refer to the [Select documentation](https://ionicframework.com/docs/api/select#migrating-from-legacy-select-syntax).
<h4 id="version-8x-textarea">Textarea</h4>
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-textarea` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy textarea syntax, refer to the [Textarea documentation](https://ionicframework.com/docs/api/textarea#migrating-from-legacy-textarea-syntax).
<h4 id="version-8x-toggle">Toggle</h4>
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-toggle` inside of an `ion-item` with an `ion-label`, have been removed. For more information on migrating from the legacy toggle syntax, refer to the [Toggle documentation](https://ionicframework.com/docs/api/toggle#migrating-from-legacy-toggle-syntax).
<h2 id="version-8x-framework-specific">Framework Specific</h2>
<h4 id="version-8x-angular">Angular</h4>
- The `IonBackButtonDelegate` class has been removed in favor of `IonBackButton`.
```diff
- import { IonBackButtonDelegate } from '@ionic/angular';
+ import { IonBackButton } from '@ionic/angular';
```

View File

@@ -3,6 +3,78 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [8.2.5](https://github.com/ionic-team/ionic-framework/compare/v8.2.4...v8.2.5) (2024-07-03)
### Bug Fixes
* **dependencies:** use latest @stencil/core to remove DOMException errors ([#29685](https://github.com/ionic-team/ionic-framework/issues/29685)) ([d70ea4](https://github.com/ionic-team/ionic/commit/d70ea400a4713bd091af1393e196e10844a190b6)), closes [#29681](https://github.com/ionic-team/ionic/issues/29681)
* **vue:** add optional IonicConfig type parameter to IonicVue plugin ([#29637](https://github.com/ionic-team/ionic-framework/issues/29637)) ([90893f4](https://github.com/ionic-team/ionic-framework/commit/90893f46c930dbccd4251fa2f56bdde30b669158)), closes [#29659](https://github.com/ionic-team/ionic-framework/issues/29659)
## [8.2.4](https://github.com/ionic-team/ionic-framework/compare/v8.2.2...v8.2.4) (2024-06-28)
### Bug Fixes
* **angular:** popover arrow navigation with disabled items ([#29662](https://github.com/ionic-team/ionic-framework/issues/29662)) ([ceb41f3](https://github.com/ionic-team/ionic-framework/commit/ceb41f31f382ff1bcf81de2b11680699d33d5077)), closes [#29640](https://github.com/ionic-team/ionic-framework/issues/29640)
## 8.2.3
This version should be skipped. Install 8.2.4 instead.
## [8.2.2](https://github.com/ionic-team/ionic-framework/compare/v8.2.1...v8.2.2) (2024-06-12)
### Bug Fixes
* **refresher:** show when content is fullscreen ([#29608](https://github.com/ionic-team/ionic-framework/issues/29608)) ([5cdfac8](https://github.com/ionic-team/ionic-framework/commit/5cdfac89f5389cb3009427183f7034ba05788bc2)), closes [#18714](https://github.com/ionic-team/ionic-framework/issues/18714)
## [8.2.1](https://github.com/ionic-team/ionic-framework/compare/v8.2.0...v8.2.1) (2024-06-05)
* **react:** export InputInputEventDetail type ([#29512](https://github.com/ionic-team/ionic-framework/issues/29512)) ([624ceba](https://github.com/ionic-team/ionic-framework/commit/624ceba2e128bb13a3afe4c35883f603f5488d0e)), closes [#29518](https://github.com/ionic-team/ionic-framework/issues/29518)
# [8.2.0](https://github.com/ionic-team/ionic-framework/compare/v8.1.3...v8.2.0) (2024-05-22)
### Features
* **angular:** setting props on a signal works ([#29453](https://github.com/ionic-team/ionic-framework/issues/29453)) ([4640e04](https://github.com/ionic-team/ionic-framework/commit/4640e046ebbd35bf92737368c6262f79a8803a59)), closes [#28876](https://github.com/ionic-team/ionic-framework/issues/28876)
## [8.1.3](https://github.com/ionic-team/ionic-framework/compare/v8.1.2...v8.1.3) (2024-05-22)
### Bug Fixes
* **core:** malformed URIs will not throw exception ([#29486](https://github.com/ionic-team/ionic-framework/issues/29486)) ([4a41983](https://github.com/ionic-team/ionic-framework/commit/4a41983098fe9bf83fdf05ce7ab28c79f414e11b)), closes [#29479](https://github.com/ionic-team/ionic-framework/issues/29479)
## [8.1.2](https://github.com/ionic-team/ionic-framework/compare/v8.1.1...v8.1.2) (2024-05-15)

View File

@@ -20,7 +20,7 @@
<a href="https://github.com/ionic-team/ionic-framework/blob/main/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="Ionic Framework is released under the MIT license." />
</a>
<a href="https://github.com/ionic-team/ionic/blob/main/docs/CONTRIBUTING.md">
<a href="https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome!" />
</a>
<a href="https://twitter.com/Ionicframework">
@@ -38,7 +38,7 @@
Documentation
</a>
<span> · </span>
<a href="https://github.com/ionic-team/ionic/blob/main/docs/CONTRIBUTING.md">Contribute</a>
<a href="https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md">Contribute</a>
<span> · </span>
<a href="https://blog.ionicframework.com/">Blog</a>
<br />
@@ -63,14 +63,15 @@ Looking for the `ionic-angular` package? Ionic 3 has been moved to the [`ionic-v
### Getting Started
Start a new project by following our quick [Getting Started guide](https://ionicframework.com/getting-started/).
Start a new project by following our [documentation](https://ionicframework.com/docs/).
We would love to hear from you! If you have any feedback or run into issues using our framework, please file
an [issue](https://github.com/ionic-team/ionic/issues/new) on this repository.
an [issue](https://github.com/ionic-team/ionic-framework/issues/new) on this repository.
### Migration Guides
Already have an Ionic app? These guides will help you migrate to the latest versions.
* [Migrate from v7 to v8](https://ionicframework.com/docs/updating/8-0)
* [Migrate from v6 to v7](https://ionicframework.com/docs/updating/7-0)
* [Migrate from v5 to v6](https://ionicframework.com/docs/updating/6-0)
* [Migrate from v4 to v5](https://ionicframework.com/docs/updating/5-0)
@@ -82,21 +83,16 @@ The Ionic Conference App is a full featured Ionic app. It is the perfect startin
- [Angular Ionic Conference App](https://github.com/ionic-team/ionic-conference-app)
- [React Ionic Conference App](https://github.com/ionic-team/ionic-react-conference-app)
<!-- TODO(FW-3811): add this when the vue conference app is updated -->
<!-- - [Vue Ionic Conference App](https://github.com/ionic-team/ionic-vue-conference-app) -->
- [Vue Ionic Conference App](https://github.com/ionic-team/ionic-vue-conference-app)
### Contributing
Thanks for your interest in contributing! Read up on our guidelines for
[contributing](https://github.com/ionic-team/ionic/blob/main/docs/CONTRIBUTING.md)
and then look through our issues with a [help wanted](https://github.com/ionic-team/ionic/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
[contributing](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md)
and then look through our issues with a [help wanted](https://github.com/ionic-team/ionic-framework/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
label.
Please note that this project is released with a [Contributor Code of Conduct](https://github.com/ionic-team/ionic/blob/main/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
### Future Goals
As Ionic Framework components migrate to the web component standard, a goal of ours is to have Ionic Framework easily work within all of the popular frameworks.
Please note that this project is released with a [Contributor Code of Conduct](https://github.com/ionic-team/ionic-framework/blob/main/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
### Earlier Versions

View File

@@ -3,17 +3,15 @@
# See documentation at https://stylelint.io/
ignoreFiles:
- src/foundations/*.scss
- src/css/ionic/*.scss
- src/css/core.scss
- src/css/flex-utils.scss
- src/css/normalize.scss
- src/css/text-alignment.scss
- src/css/display.scss
- src/themes/mixins.scss
- src/themes/functions.color.scss
- src/themes/functions.string.scss
- src/themes/native.theme.default.scss
- src/themes/ionic.mixins.scss
- src/themes/ionic.functions.color.scss
- src/themes/ionic.functions.string.scss
- src/themes/ionic.theme.default.scss
- src/css/themes/*.scss
indentation: 2
@@ -25,10 +23,10 @@ rules:
at-rule-empty-line-before:
- always
- except:
- blockless-after-blockless
- first-nested
- blockless-after-blockless
- first-nested
ignore:
- after-comment
- after-comment
block-closing-brace-newline-before:
- always
@@ -42,13 +40,14 @@ rules:
custom-property-empty-line-before:
- always
- except:
- after-comment
- after-custom-property
- first-nested
- after-comment
- after-custom-property
- first-nested
declaration-no-important:
- true
order/order:
- custom-properties
- dollar-variables
@@ -58,202 +57,203 @@ rules:
# https://github.com/sasstools/sass-lint/blob/develop/lib/config/property-sort-orders/smacss.yml
order/properties-order:
# Box
- emptyLineBefore: always
properties:
- display
- position
- top
- right
- bottom
- left
- display
- position
- top
- right
- bottom
- left
- emptyLineBefore: always
properties:
- flex
- flex-basis
- flex-direction
- flex-flow
- flex-grow
- flex-shrink
- flex-wrap
- align-content
- align-items
- align-self
- justify-content
- order
- flex
- flex-basis
- flex-direction
- flex-flow
- flex-grow
- flex-shrink
- flex-wrap
- align-content
- align-items
- align-self
- justify-content
- order
- emptyLineBefore: always
properties:
- width
- min-width
- max-width
- width
- min-width
- max-width
- height
- min-height
- max-height
- height
- min-height
- max-height
- emptyLineBefore: always
properties:
- margin
- margin-top
- margin-right
- margin-bottom
- margin-left
- margin
- margin-top
- margin-right
- margin-bottom
- margin-left
- emptyLineBefore: always
properties:
- padding
- padding-top
- padding-right
- padding-bottom
- padding-left
- padding
- padding-top
- padding-right
- padding-bottom
- padding-left
- emptyLineBefore: always
properties:
- float
- clear
- float
- clear
- emptyLineBefore: always
properties:
- columns
- column-gap
- column-fill
- column-rule
- column-span
- column-count
- column-width
- columns
- column-gap
- column-fill
- column-rule
- column-span
- column-count
- column-width
- emptyLineBefore: always
properties:
- transform
- transform-box
- transform-origin
- transform-style
- transform
- transform-box
- transform-origin
- transform-style
- emptyLineBefore: always
properties:
- transition
- transition-delay
- transition-duration
- transition-property
- transition-timing-function
- transition
- transition-delay
- transition-duration
- transition-property
- transition-timing-function
# Border
- emptyLineBefore: always
properties:
- border
- border-top
- border-right
- border-bottom
- border-left
- border-width
- border-top-width
- border-right-width
- border-bottom-width
- border-left-width
- border
- border-top
- border-right
- border-bottom
- border-left
- border-width
- border-top-width
- border-right-width
- border-bottom-width
- border-left-width
- border-style
- border-top-style
- border-right-style
- border-bottom-style
- border-left-style
- border-style
- border-top-style
- border-right-style
- border-bottom-style
- border-left-style
- border-radius
- border-top-left-radius
- border-top-right-radius
- border-bottom-left-radius
- border-bottom-right-radius
- border-radius
- border-top-left-radius
- border-top-right-radius
- border-bottom-left-radius
- border-bottom-right-radius
- border-color
- border-top-color
- border-right-color
- border-bottom-color
- border-left-color
- border-color
- border-top-color
- border-right-color
- border-bottom-color
- border-left-color
- emptyLineBefore: always
properties:
- outline
- outline-color
- outline-offset
- outline-style
- outline-width
- outline
- outline-color
- outline-offset
- outline-style
- outline-width
# Background
- emptyLineBefore: always
properties:
- background
- background-attachment
- background-clip
- background-color
- background-image
- background-repeat
- background-position
- background-size
- background
- background-attachment
- background-clip
- background-color
- background-image
- background-repeat
- background-position
- background-size
# Text
# Text
- color
- color
- emptyLineBefore: always
properties:
- font
- font-family
- font-size
- font-smoothing
- font-style
- font-variant
- font-weight
- font
- font-family
- font-size
- font-smoothing
- font-style
- font-variant
- font-weight
- emptyLineBefore: always
properties:
- letter-spacing
- line-height
- list-style
- letter-spacing
- line-height
- list-style
- emptyLineBefore: always
properties:
- text-align
- text-decoration
- text-indent
- text-overflow
- text-rendering
- text-shadow
- text-transform
- text-wrap
- text-align
- text-decoration
- text-indent
- text-overflow
- text-rendering
- text-shadow
- text-transform
- text-wrap
- emptyLineBefore: always
properties:
- white-space
- word-spacing
- white-space
- word-spacing
# Other
- emptyLineBefore: always
properties:
- border-collapse
- border-spacing
- box-shadow
- caption-side
- contain
- content
- cursor
- direction
- empty-cells
- object-fit
- opacity
- overflow
- quotes
- speak
- table-layout
- touch-action
- user-select
- vertical-align
- visibility
- z-index
- border-collapse
- border-spacing
- box-shadow
- caption-side
- contain
- content
- cursor
- direction
- empty-cells
- object-fit
- opacity
- overflow
- quotes
- speak
- table-layout
- touch-action
- user-select
- vertical-align
- visibility
- z-index
property-disallowed-list:
- background-position

View File

@@ -3,6 +3,71 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [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
## [8.2.4](https://github.com/ionic-team/ionic-framework/compare/v8.2.2...v8.2.4) (2024-06-28)
### Bug Fixes
* **angular:** popover arrow navigation with disabled items ([#29662](https://github.com/ionic-team/ionic-framework/issues/29662)) ([ceb41f3](https://github.com/ionic-team/ionic-framework/commit/ceb41f31f382ff1bcf81de2b11680699d33d5077)), closes [#29640](https://github.com/ionic-team/ionic-framework/issues/29640)
## 8.2.3
This version should be skipped. Install 8.2.4 instead.
## [8.2.2](https://github.com/ionic-team/ionic-framework/compare/v8.2.1...v8.2.2) (2024-06-12)
### Bug Fixes
* **refresher:** show when content is fullscreen ([#29608](https://github.com/ionic-team/ionic-framework/issues/29608)) ([5cdfac8](https://github.com/ionic-team/ionic-framework/commit/5cdfac89f5389cb3009427183f7034ba05788bc2)), closes [#18714](https://github.com/ionic-team/ionic-framework/issues/18714)
## [8.2.1](https://github.com/ionic-team/ionic-framework/compare/v8.2.0...v8.2.1) (2024-06-05)
**Note:** Version bump only for package @ionic/core
# [8.2.0](https://github.com/ionic-team/ionic-framework/compare/v8.1.3...v8.2.0) (2024-05-22)
**Note:** Version bump only for package @ionic/core
## [8.1.3](https://github.com/ionic-team/ionic-framework/compare/v8.1.2...v8.1.3) (2024-05-22)
### Bug Fixes
* **core:** malformed URIs will not throw exception ([#29486](https://github.com/ionic-team/ionic-framework/issues/29486)) ([4a41983](https://github.com/ionic-team/ionic-framework/commit/4a41983098fe9bf83fdf05ce7ab28c79f414e11b)), closes [#29479](https://github.com/ionic-team/ionic-framework/issues/29479)
## [8.1.2](https://github.com/ionic-team/ionic-framework/compare/v8.1.1...v8.1.2) (2024-05-15)

View File

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

View File

File diff suppressed because it is too large Load Diff

1910
core/package-lock.json generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "8.1.2",
"version": "8.2.5",
"description": "Base components for Ionic",
"keywords": [
"ionic",
@@ -23,6 +23,302 @@
"collection:main": "dist/collection/index.js",
"collection": "dist/collection/collection-manifest.json",
"types": "dist/types/interface.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs.js",
"types": "./dist/types/interface.d.ts"
},
"./components": {
"import": "./components/index.js",
"types": "./components/index.d.ts"
},
"./loader": {
"import": "./loader/index.js",
"require": "./loader/index.cjs.js",
"types": "./loader/index.d.ts"
},
"./components/*": {
"import": "./components/*",
"types": "./components/*"
},
"./docs.json": {
"import": "./dist/docs.json",
"require": "./dist/docs.json"
},
"./ion-accordion-group": {
"import": "./components/ion-accordion-group.js",
"types": "./components/ion-accordion-group.d.ts"
},
"./ion-accordion": {
"import": "./components/ion-accordion.js",
"types": "./components/ion-accordion.d.ts"
},
"./ion-avatar": {
"import": "./components/ion-avatar.js",
"types": "./components/ion-avatar.d.ts"
},
"./ion-backdrop": {
"import": "./components/ion-backdrop.js",
"types": "./components/ion-backdrop.d.ts"
},
"./ion-badge": {
"import": "./components/ion-badge.js",
"types": "./components/ion-badge.d.ts"
},
"./ion-breadcrumbs": {
"import": "./components/ion-breadcrumbs.js",
"types": "./components/ion-breadcrumbs.d.ts"
},
"./ion-buttons": {
"import": "./components/ion-buttons.js",
"types": "./components/ion-buttons.d.ts"
},
"./ion-card-content": {
"import": "./components/ion-card-content.js",
"types": "./components/ion-card-content.d.ts"
},
"./ion-card-header": {
"import": "./components/ion-card-header.js",
"types": "./components/ion-card-header.d.ts"
},
"./ion-card-subtitle": {
"import": "./components/ion-card-subtitle.js",
"types": "./components/ion-card-subtitle.d.ts"
},
"./ion-card-title": {
"import": "./components/ion-card-title.js",
"types": "./components/ion-card-title.d.ts"
},
"./ion-checkbox": {
"import": "./components/ion-checkbox.js",
"types": "./components/ion-checkbox.d.ts"
},
"./ion-chip": {
"import": "./components/ion-chip.js",
"types": "./components/ion-chip.d.ts"
},
"./ion-col": {
"import": "./components/ion-col.js",
"types": "./components/ion-col.d.ts"
},
"./ion-content": {
"import": "./components/ion-content.js",
"types": "./components/ion-content.d.ts"
},
"./ion-datetime-button": {
"import": "./components/ion-datetime-button.js",
"types": "./components/ion-datetime-button.d.ts"
},
"./ion-datetime": {
"import": "./components/ion-datetime.js",
"types": "./components/ion-datetime.d.ts"
},
"./ion-fab-list": {
"import": "./components/ion-fab-list.js",
"types": "./components/ion-fab-list.d.ts"
},
"./ion-fab": {
"import": "./components/ion-fab.js",
"types": "./components/ion-fab.d.ts"
},
"./ion-footer": {
"import": "./components/ion-footer.js",
"types": "./components/ion-footer.d.ts"
},
"./ion-grid": {
"import": "./components/ion-grid.js",
"types": "./components/ion-grid.d.ts"
},
"./ion-header": {
"import": "./components/ion-header.js",
"types": "./components/ion-header.d.ts"
},
"./ion-img": {
"import": "./components/ion-img.js",
"types": "./components/ion-img.d.ts"
},
"./ion-infinite-scroll-content": {
"import": "./components/ion-infinite-scroll-content.js",
"types": "./components/ion-infinite-scroll-content.d.ts"
},
"./ion-infinite-scroll": {
"import": "./components/ion-infinite-scroll.js",
"types": "./components/ion-infinite-scroll.d.ts"
},
"./ion-input-password-toggle": {
"import": "./components/ion-input-password-toggle.js",
"types": "./components/ion-input-password-toggle.d.ts"
},
"./ion-input": {
"import": "./components/ion-input.js",
"types": "./components/ion-input.d.ts"
},
"./ion-item-divider": {
"import": "./components/ion-item-divider.js",
"types": "./components/ion-item-divider.d.ts"
},
"./ion-item-group": {
"import": "./components/ion-item-group.js",
"types": "./components/ion-item-group.d.ts"
},
"./ion-item-options": {
"import": "./components/ion-item-options.js",
"types": "./components/ion-item-options.d.ts"
},
"./ion-item-sliding": {
"import": "./components/ion-item-sliding.js",
"types": "./components/ion-item-sliding.d.ts"
},
"./ion-label": {
"import": "./components/ion-label.js",
"types": "./components/ion-label.d.ts"
},
"./ion-list-header": {
"import": "./components/ion-list-header.js",
"types": "./components/ion-list-header.d.ts"
},
"./ion-list": {
"import": "./components/ion-list.js",
"types": "./components/ion-list.d.ts"
},
"./ion-menu-button": {
"import": "./components/ion-menu-button.js",
"types": "./components/ion-menu-button.d.ts"
},
"./ion-menu-toggle": {
"import": "./components/ion-menu-toggle.js",
"types": "./components/ion-menu-toggle.d.ts"
},
"./ion-menu": {
"import": "./components/ion-menu.js",
"types": "./components/ion-menu.d.ts"
},
"./ion-nav-link": {
"import": "./components/ion-nav-link.js",
"types": "./components/ion-nav-link.d.ts"
},
"./ion-nav": {
"import": "./components/ion-nav.js",
"types": "./components/ion-nav.d.ts"
},
"./ion-note": {
"import": "./components/ion-note.js",
"types": "./components/ion-note.d.ts"
},
"./ion-picker-column-option": {
"import": "./components/ion-picker-column-option.js",
"types": "./components/ion-picker-column-option.d.ts"
},
"./ion-picker-column": {
"import": "./components/ion-picker-column.js",
"types": "./components/ion-picker-column.d.ts"
},
"./ion-picker": {
"import": "./components/ion-picker.js",
"types": "./components/ion-picker.d.ts"
},
"./ion-progress-bar": {
"import": "./components/ion-progress-bar.js",
"types": "./components/ion-progress-bar.d.ts"
},
"./ion-radio-group": {
"import": "./components/ion-radio-group.js",
"types": "./components/ion-radio-group.d.ts"
},
"./ion-radio": {
"import": "./components/ion-radio.js",
"types": "./components/ion-radio.d.ts"
},
"./ion-range": {
"import": "./components/ion-range.js",
"types": "./components/ion-range.d.ts"
},
"./ion-refresher-content": {
"import": "./components/ion-refresher-content.js",
"types": "./components/ion-refresher-content.d.ts"
},
"./ion-refresher": {
"import": "./components/ion-refresher.js",
"types": "./components/ion-refresher.d.ts"
},
"./ion-reorder-group": {
"import": "./components/ion-reorder-group.js",
"types": "./components/ion-reorder-group.d.ts"
},
"./ion-reorder": {
"import": "./components/ion-reorder.js",
"types": "./components/ion-reorder.d.ts"
},
"./ion-ripple-effect": {
"import": "./components/ion-ripple-effect.js",
"types": "./components/ion-ripple-effect.d.ts"
},
"./ion-row": {
"import": "./components/ion-row.js",
"types": "./components/ion-row.d.ts"
},
"./ion-searchbar": {
"import": "./components/ion-searchbar.js",
"types": "./components/ion-searchbar.d.ts"
},
"./ion-segment-button": {
"import": "./components/ion-segment-button.js",
"types": "./components/ion-segment-button.d.ts"
},
"./ion-segment": {
"import": "./components/ion-segment.js",
"types": "./components/ion-segment.d.ts"
},
"./ion-select-option": {
"import": "./components/ion-select-option.js",
"types": "./components/ion-select-option.d.ts"
},
"./ion-select": {
"import": "./components/ion-select.js",
"types": "./components/ion-select.d.ts"
},
"./ion-skeleton-text": {
"import": "./components/ion-skeleton-text.js",
"types": "./components/ion-skeleton-text.d.ts"
},
"./ion-spinner": {
"import": "./components/ion-spinner.js",
"types": "./components/ion-spinner.d.ts"
},
"./ion-split-pane": {
"import": "./components/ion-split-pane.js",
"types": "./components/ion-split-pane.d.ts"
},
"./ion-tab": {
"import": "./components/ion-tab.js",
"types": "./components/ion-tab.d.ts"
},
"./ion-text": {
"import": "./components/ion-text.js",
"types": "./components/ion-text.d.ts"
},
"./ion-textarea": {
"import": "./components/ion-textarea.js",
"types": "./components/ion-textarea.d.ts"
},
"./ion-thumbnail": {
"import": "./components/ion-thumbnail.js",
"types": "./components/ion-thumbnail.d.ts"
},
"./ion-title": {
"import": "./components/ion-title.js",
"types": "./components/ion-title.d.ts"
},
"./ion-toggle": {
"import": "./components/ion-toggle.js",
"types": "./components/ion-toggle.d.ts"
},
"./ion-toolbar": {
"import": "./components/ion-toolbar.js",
"types": "./components/ion-toolbar.d.ts"
}
},
"files": [
"components/",
"css/",
@@ -31,19 +327,20 @@
"loader/"
],
"dependencies": {
"@stencil/core": "^4.17.2",
"@stencil/core": "^4.19.2",
"ionicons": "^7.2.2",
"tslib": "^2.1.0"
},
"devDependencies": {
"@axe-core/playwright": "^4.8.5",
"@axe-core/playwright": "^4.9.1",
"@capacitor/core": "^6.0.0",
"@capacitor/haptics": "^6.0.0",
"@capacitor/keyboard": "^6.0.0",
"@capacitor/status-bar": "^6.0.0",
"@clack/prompts": "^0.7.0",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^2.0.0",
"@playwright/test": "^1.39.0",
"@playwright/test": "^1.45.0",
"@rollup/plugin-node-resolve": "^8.4.0",
"@rollup/plugin-virtual": "^2.0.3",
"@stencil/angular-output-target": "^0.8.4",
@@ -64,20 +361,18 @@
"fs-extra": "^9.0.1",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
"prettier": "^2.8.8",
"prettier": "^2.6.1",
"rollup": "^2.26.4",
"sass": "^1.33.0",
"serve": "^14.0.1",
"style-dictionary": "^3.9.2",
"stylelint": "^13.13.1",
"stylelint-order": "^4.1.0"
},
"scripts": {
"build": "npm run clean && npm run build.tokens && npm run build.css && stencil build --es5 --docs-json dist/docs.json",
"build": "npm run clean && npm run build.css && stencil build --es5 --docs-json dist/docs.json",
"build.css": "npm run css.sass && npm run css.minify",
"build.debug": "npm run clean && stencil build --debug",
"build.docs.json": "stencil build --docs-json dist/docs.json",
"build.tokens": "node ./scripts/tokens.js && npm run lint.sass.fix && npm run prettier.tokens",
"clean": "node scripts/clean.js",
"css.minify": "cleancss -O2 -o ./css/ionic.bundle.css ./css/ionic.bundle.css",
"css.sass": "sass --embed-sources --style compressed src/css:./css",
@@ -89,8 +384,7 @@
"lint.ts": "npm run eslint",
"lint.ts.fix": "npm run eslint -- --fix",
"prerender.e2e": "node scripts/testing/prerender.js",
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx,scss}\"",
"prettier.tokens": "prettier \"./src/foundations/*.scss\" --write --cache",
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
"start": "npm run build.css && stencil build --dev --watch --serve",
"test": "npm run test.spec && npm run test.e2e",
"test.spec": "stencil test --spec --max-workers=2",
@@ -102,7 +396,8 @@
"docker.build": "docker build -t ionic-playwright .",
"test.e2e.docker": "npm run docker.build && node ./scripts/docker.mjs",
"test.e2e.docker.update-snapshots": "npm run test.e2e.docker -- --update-snapshots",
"test.e2e.docker.ci": "npm run docker.build && CI=true node ./scripts/docker.mjs"
"test.e2e.docker.ci": "npm run docker.build && CI=true node ./scripts/docker.mjs",
"test.e2e.script": "node scripts/testing/e2e-script.mjs"
},
"author": "Ionic Team",
"license": "MIT",
@@ -111,7 +406,7 @@
"url": "git+https://github.com/ionic-team/ionic-framework.git"
},
"bugs": {
"url": "https://github.com/ionic-team/ionic/issues"
"url": "https://github.com/ionic-team/ionic-framework/issues"
},
"homepage": "https://ionicframework.com/",
"jest": {

View File

@@ -0,0 +1,260 @@
// The purpose of this script is to provide a way run the E2E tests
// without having the developer to manually run multiple commands based
// on the desired end result.
// E.g. update the local ground truths for a specific component or
// open the Playwright report after running the E2E tests.
import {
intro,
outro,
confirm,
spinner,
isCancel,
cancel,
text,
log,
} from '@clack/prompts';
import { exec, spawn } from 'child_process';
import fs from 'node:fs';
import { setTimeout as sleep } from 'node:timers/promises';
import util from 'node:util';
import color from 'picocolors';
async function main() {
const execAsync = util.promisify(exec);
const cleanUpFiles = async () => {
// Clean up the local ground truths.
const cleanUp = spinner();
// Inform the user that the local ground truths are being cleaned up.
cleanUp.start('Restoring local ground truths');
// Reset the local ground truths.
await execAsync('git reset -- src/**/*-linux.png').catch((error) => {
cleanUp.stop('Failed to reset local ground truths');
console.error(error);
return process.exit(0);
});
// Restore the local ground truths.
await execAsync('git restore -- src/**/*-linux.png').catch((error) => {
cleanUp.stop('Failed to restore local ground truths');
console.error(error);
return process.exit(0);
});
// Inform the user that the local ground truths have been cleaned up.
cleanUp.stop('Local ground truths have been restored to their original state in order to avoid committing them.');
};
intro(color.inverse(' Update Local Ground Truths'));
// Ask user for the component name they want to test.
const componentValue = await text({
message: 'Enter the component or path you want to test (e.g. chip, src/components/chip)',
placeholder: 'Empty for all components',
});
// User cancelled the operation with `Ctrl+C` or `CMD+C`.
if (isCancel(componentValue)) {
cancel('Operation cancelled');
return process.exit(0);
}
// Ask user if they want to update their local ground truths.
const shouldUpdateTruths = await confirm({
message: 'Do you want to update your local ground truths?',
});
// User cancelled the operation with `Ctrl+C` or `CMD+C`.
if (isCancel(shouldUpdateTruths)) {
cancel('Operation cancelled');
return process.exit(0);
}
if (shouldUpdateTruths) {
const defaultBaseBranch = 'main';
// Ask user for the base branch.
let baseBranch = await text({
message: 'Enter the base branch name:',
placeholder: `default: ${defaultBaseBranch}`,
})
// User cancelled the operation with `Ctrl+C` or `CMD+C`.
if (isCancel(baseBranch)) {
cancel('Operation cancelled');
return process.exit(0);
}
// User didn't provide a base branch.
if (!baseBranch) {
baseBranch = defaultBaseBranch;
}
/**
* The provided base branch needs to be fetched.
* This ensures that the local base branch is up-to-date with the
* remote base branch. Otherwise, there might be errors stating that
* certain files don't exist in the local base branch.
*/
const fetchBaseBranch = spinner();
// Inform the user that the base branch is being fetched.
fetchBaseBranch.start(`Fetching "${baseBranch}" to have the latest changes`);
// Fetch the base branch.
await execAsync(`git fetch origin ${baseBranch}`).catch((error) => {
fetchBaseBranch.stop(`Failed to fetch "${baseBranch}"`);
console.error(error);
return process.exit(0);
});
// Inform the user that the base branch has been fetched.
fetchBaseBranch.stop(`Fetched "${baseBranch}"`);
const updateGroundTruth = spinner();
// Inform the user that the local ground truths are being updated.
updateGroundTruth.start('Updating local ground truths');
// Check if user provided an existing file or directory.
const isValidLocation = fs.existsSync(componentValue);
// User provided an existing file or directory.
if (isValidLocation) {
const stats = fs.statSync(componentValue);
// User provided a file as the component.
// ex: `componentValue` = `src/components/chip/test/basic/chip.e2e.ts`
if (stats.isFile()) {
// Update the local ground truths for the provided path.
await execAsync(`git checkout origin/${baseBranch} -- ${componentValue}-snapshots/*-linux.png`).catch((error) => {
updateGroundTruth.stop('Failed to update local ground truths');
console.error(error);
return process.exit(0);
});
}
// User provided a directory as the component.
// ex: `componentValue` = `src/components/chip`
if (stats.isDirectory()) {
// Update the local ground truths for the provided directory.
await execAsync(`git checkout origin/${baseBranch} -- ${componentValue}/test/*/*.e2e.ts-snapshots/*-linux.png`).catch((error) => {
updateGroundTruth.stop('Failed to update local ground truths');
console.error(error);
return process.exit(0);
});
}
}
// User provided a component name as the component.
// ex: `componentValue` = `chip`
else if (componentValue) {
// Update the local ground truths for the provided component.
await execAsync(`git checkout origin/${baseBranch} -- src/components/${componentValue}/test/*/${componentValue}.e2e.ts-snapshots/*-linux.png`).catch((error) => {
updateGroundTruth.stop('Failed to update local ground truths');
console.error(error);
return process.exit(0);
});
}
// User provided an empty string.
else {
// Update the local ground truths for all components.
await execAsync(`git checkout origin/${baseBranch} -- src/components/*/test/*/*.e2e.ts-snapshots/*-linux.png`).catch((error) => {
updateGroundTruth.stop('Failed to update local ground truths');
console.error(error);
return process.exit(0);
});
}
// Inform the user that the local ground truths have been updated.
updateGroundTruth.stop('Updated local ground truths');
}
const buildCore = spinner();
// Inform the user that the core is being built.
buildCore.start('Building core');
/**
* Build core
* Otherwise, the uncommitted changes will not be reflected in the tests because:
* - popping the stash doesn't trigger a re-render even if `npm start` is running
* - app is not running the `npm start` command
*/
await execAsync('npm run build').catch((error) => {
// Clean up the local ground truths.
cleanUpFiles();
buildCore.stop('Failed to build core');
console.error(error);
return process.exit(0);
});
buildCore.stop('Built core');
const runE2ETests = spinner();
// Inform the user that the E2E tests are being run.
runE2ETests.start('Running E2E tests');
// User provided a component value.
if (componentValue) {
await execAsync(`npm run test.e2e.docker.ci ${componentValue}`).catch((error) => {
// Clean up the local ground truths.
cleanUpFiles();
runE2ETests.stop('Failed to run E2E tests');
console.error(error);
return process.exit(0);
});
} else {
await execAsync('npm run test.e2e.docker.ci').catch((error) => {
// Clean up the local ground truths.
cleanUpFiles();
runE2ETests.stop('Failed to run E2E tests');
console.error(error);
return process.exit(0);
});
}
runE2ETests.stop('Ran E2E tests');
// Clean up the local ground truths.
await cleanUpFiles();
// Ask user if they want to open the Playwright report.
const shouldOpenReport = await confirm({
message: 'Do you want to open the Playwright report?',
});
// User cancelled the operation with `Ctrl+C` or `CMD+C`.
if (isCancel(shouldOpenReport)) {
cancel('Operation cancelled');
return process.exit(0);
}
// User chose to open the Playwright report.
if (shouldOpenReport) {
// Use spawn to display the server information and the key to quit the server.
spawn('npx', ['playwright', 'show-report'], {
stdio: 'inherit',
});
} else {
// Inform the user that the Playwright report can be opened by running the following command.
log.info('If you change your mind, you can open the Playwright report by running the following command:');
log.info(color.bold('npx playwright show-report'));
}
if (shouldOpenReport) {
outro("You're all set! Don't forget to quit serving the Playwright report when you're done.");
} else {
outro("You're all set!");
}
await sleep(1000);
}
main().catch(console.error);

View File

@@ -1,197 +0,0 @@
/* For generating Design Tokens, we use Style Dictionary for several reasons:
- It's prepared to easily generate tokens for multiple types of outputs (CSS, SCSS, iOS, Android, documentation, etc.).
- It also works very well out of the box with any kind of Design Tokens formats, like Figma Tokens, as well as APIs to adjust to more custom ones.
- It is probably the most well-known and widely used Design Tokens tool. It has also been regularly maintained for a long time.
- It can easily scale to different necessities we might have in the future.
*/
// eslint-disable-next-line @typescript-eslint/no-var-requires
const StyleDictionary = require('style-dictionary');
const { fileHeader } = StyleDictionary.formatHelpers;
// Empty for as an example of how we can add some extra variables, not from the tokens JSON
const customVariables = ``;
// Prefix for all generated variables
const variablesPrefix = 'ionic';
function hexToRgb(hex) {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result
? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16),
}
: null;
}
// CSS vanilla :root format
StyleDictionary.registerFormat({
name: 'rootFormat',
formatter({ dictionary, file }) {
// Add a prefix to all variable names
const prefixedVariables = dictionary.allProperties.map((prop) => {
const rgb = hexToRgb(prop.value);
return ` --${variablesPrefix}-${prop.name}: ${prop.value};${
rgb ? `\n --${variablesPrefix}-${prop.name}-rgb: ${rgb.r}, ${rgb.g}, ${rgb.b};` : ``
}`;
});
return (
fileHeader({ file }) +
':root {\n' +
prefixedVariables.join('\n') + // Join all prefixed variables with a newline
customVariables +
'\n}\n'
);
},
});
// scss variables format
StyleDictionary.registerFormat({
name: 'scssVariablesFormat',
formatter({ dictionary, file }) {
// Add a prefix to all variable names
const prefixedVariables = dictionary.allProperties.map((prop) => {
const rgb = hexToRgb(prop.value);
return `$${variablesPrefix}-${prop.name}: var(--${variablesPrefix}-${prop.name}, ${prop.value});${
rgb
? `\n$${variablesPrefix}-${prop.name}-rgb: var(--${variablesPrefix}-${prop.name}-rgb, ${rgb.r}, ${rgb.g}, ${rgb.b});`
: ``
}`;
});
return (
fileHeader({ file }) +
prefixedVariables.join('\n') + // Join all prefixed variables with a newline
customVariables +
'\n'
);
},
});
// Create utility-classes
StyleDictionary.registerFormat({
name: 'cssUtilityClassesFormat',
formatter({ dictionary, file }) {
const utilityClasses = dictionary.allProperties.map((prop) => {
let tokenType = prop.attributes.category;
const className = `${prop.name}`;
let utilityClass = '';
switch (tokenType) {
case 'color':
utilityClass = `.${variablesPrefix}-${className} {\n color: $ionic-${prop.name};\n}
.${variablesPrefix}-background-${className} {\n background-color: $ionic-${prop.name};\n}`;
break;
case 'border':
const borderAttribute = prop.attributes.type === 'radius' ? 'border-radius' : 'border-width';
utilityClass = `.${variablesPrefix}-${className} {\n ${borderAttribute}: $ionic-${prop.name};\n}`;
break;
case 'font':
let fontAttribute;
switch (prop.attributes.type) {
case 'size':
fontAttribute = 'font-size';
break;
case 'weight':
fontAttribute = 'font-weight';
break;
case 'line-height':
fontAttribute = 'line-height';
break;
case 'letter-spacing':
fontAttribute = 'letter-spacing';
break;
case 'family':
return;
}
utilityClass = `.${variablesPrefix}-${className} {\n ${fontAttribute}: $ionic-${prop.name};\n}`;
break;
case 'elevation':
utilityClass = `.${variablesPrefix}-${className} {\n box-shadow: $ionic-${prop.name};\n}`;
break;
case 'space':
utilityClass = `.${variablesPrefix}-margin-${className} {\n --margin-start: #{$ionic-${prop.name}};\n --margin-end: #{$ionic-${prop.name}};\n --margin-top: #{$ionic-${prop.name}};\n --margin-bottom: #{$ionic-${prop.name}};\n\n @include margin(${prop.value});\n};\n
.${variablesPrefix}-padding-${className} {\n --padding-start: #{$ionic-${prop.name}};\n --padding-end: #{$ionic-${prop.name}};\n --padding-top: #{$ionic-${prop.name}};\n --padding-bottom: #{$ionic-${prop.name}};\n\n @include padding(${prop.value});\n};\n`;
break;
default:
utilityClass = `.${variablesPrefix}-${className} {\n ${tokenType}: $ionic-${prop.name};\n}`;
}
return utilityClass;
});
return [
fileHeader({ file }),
'@import "./ionic.vars";\n@import "../themes/mixins";\n',
utilityClasses.join('\n'),
].join('\n');
},
});
// Make Style Dictionary comply with the $ format on properties from W3C Guidelines
const w3cTokenJsonParser = {
pattern: /\.json|\.tokens\.json|\.tokens$/,
parse({ contents }) {
// replace $value with value so that style dictionary recognizes it
var preparedContent = (contents || '{}')
.replace(/"\$?value":/g, '"value":')
// convert $description to comment
.replace(/"\$?description":/g, '"comment":');
//
return JSON.parse(preparedContent);
},
};
StyleDictionary.registerParser(w3cTokenJsonParser);
// Generate Tokens
StyleDictionary.extend({
source: ['./src/foundations/*.json'],
platforms: {
css: {
buildPath: './src/foundations/',
transformGroup: 'css',
files: [
{
destination: 'ionic.root.scss',
format: 'rootFormat',
options: {
outputReferences: true,
fileHeader: `myFileHeader`,
},
},
],
},
scss: {
buildPath: './src/foundations/',
transformGroup: 'scss',
files: [
{
destination: 'ionic.vars.scss',
format: 'scssVariablesFormat',
options: {
outputReferences: true,
fileHeader: `myFileHeader`,
},
},
{
destination: 'ionic.utility.scss',
format: 'cssUtilityClassesFormat',
options: {
outputReferences: true,
fileHeader: `myFileHeader`,
},
},
],
},
},
fileHeader: {
myFileHeader: () => {
return [`This is an auto-generated file, please do not change it directly.`, `Ionic Design System`];
},
},
}).buildAllPlatforms();

1398
core/src/components.d.ts vendored
View File

File diff suppressed because it is too large Load Diff

View File

@@ -11,12 +11,7 @@
:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanding),
:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-expanded) {
@include margin($accordion-md-expanded-margin, 0, $accordion-md-expanded-margin, 0);
@include border-radius(
$accordion-md-border-radius,
$accordion-md-border-radius,
$accordion-md-border-radius,
$accordion-md-border-radius
);
@include border-radius($accordion-md-border-radius, $accordion-md-border-radius, $accordion-md-border-radius, $accordion-md-border-radius);
}
:host(.accordion-group-expand-inset) ::slotted(ion-accordion.accordion-previous) {

View File

@@ -1,4 +1,4 @@
@import "../../themes/native/native.globals";
@import "../../themes/ionic.globals";
@import "../accordion/accordion.vars";
// Accordion Group

View File

@@ -2,20 +2,18 @@ import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Component, Element, Event, Host, Listen, Method, Prop, Watch, h } from '@stencil/core';
import { printIonWarning } from '@utils/logging';
import { getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
import type { AccordionGroupChangeEventDetail } from './accordion-group-interface';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*/
@Component({
tag: 'ion-accordion-group',
styleUrls: {
ios: 'accordion-group.ios.scss',
md: 'accordion-group.md.scss',
ionic: 'accordion-group.md.scss',
},
shadow: true,
})
@@ -280,12 +278,12 @@ export class AccordionGroup implements ComponentInterface {
render() {
const { disabled, readonly, expand } = this;
const theme = getIonTheme(this);
const mode = getIonMode(this);
return (
<Host
class={{
[theme]: true,
[mode]: true,
'accordion-group-disabled': disabled,
'accordion-group-readonly': readonly,
[`accordion-group-expand-${expand}`]: true,

View File

@@ -1,14 +1,13 @@
@import "../../themes/native/native.globals.md";
@import "../../themes/ionic.globals.md";
// Accordion
// --------------------------------------------------
/// @prop - Border radius applied to the accordion
$accordion-md-border-radius: 6px;
$accordion-md-border-radius: 6px;
/// @prop - Box shadow of the accordion
$accordion-md-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
0px 1px 5px 0px rgba(0, 0, 0, 0.12);
$accordion-md-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
/// @prop - Margin of the expanded accordion
$accordion-md-expanded-margin: 16px;
$accordion-md-expanded-margin: 16px;

View File

@@ -4,7 +4,7 @@ import { addEventListener, getElementRoot, raf, removeEventListener, transitionE
import { chevronDown } from 'ionicons/icons';
import { config } from '../../global/config';
import { getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
const enum AccordionState {
Collapsed = 1 << 0,
@@ -14,8 +14,7 @@ const enum AccordionState {
}
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*
* @slot header - Content is placed at the top and is used to
* expand or collapse the accordion item.
@@ -32,7 +31,6 @@ const enum AccordionState {
styleUrls: {
ios: 'accordion.ios.scss',
md: 'accordion.md.scss',
ionic: 'accordion.md.scss',
},
shadow: {
delegatesFocus: true,
@@ -79,7 +77,7 @@ export class Accordion implements ComponentInterface {
* rotated when the accordion is expanded
* or collapsed.
*/
@Prop() toggleIcon?: string;
@Prop() toggleIcon = chevronDown;
/**
* The slot inside of `ion-item` to
@@ -193,8 +191,7 @@ export class Accordion implements ComponentInterface {
return;
}
const { toggleIconSlot } = this;
const accordionToggleIcon = this.toggleIcon ?? config.get('accordionToggleIcon', chevronDown);
const { toggleIconSlot, toggleIcon } = this;
/**
* Check if there already is a toggle icon.
@@ -209,7 +206,7 @@ export class Accordion implements ComponentInterface {
iconEl.slot = toggleIconSlot;
iconEl.lazy = false;
iconEl.classList.add('ion-accordion-toggle-icon');
iconEl.icon = accordionToggleIcon;
iconEl.icon = toggleIcon;
iconEl.setAttribute('aria-hidden', 'true');
ionItem.appendChild(iconEl);
@@ -405,7 +402,7 @@ export class Accordion implements ComponentInterface {
render() {
const { disabled, readonly } = this;
const theme = getIonTheme(this);
const mode = getIonMode(this);
const expanded = this.state === AccordionState.Expanded || this.state === AccordionState.Expanding;
const headerPart = expanded ? 'header expanded' : 'header';
const contentPart = expanded ? 'content expanded' : 'content';
@@ -415,7 +412,7 @@ export class Accordion implements ComponentInterface {
return (
<Host
class={{
[theme]: true,
[mode]: true,
'accordion-expanding': this.state === AccordionState.Expanding,
'accordion-expanded': this.state === AccordionState.Expanded,
'accordion-collapsing': this.state === AccordionState.Collapsing,

View File

@@ -1,19 +1,19 @@
@import "../../themes/native/native.globals";
@import "../../themes/ionic.globals";
// Accordion
// --------------------------------------------------
/// @prop - Background color of the accordion
$accordion-background-color: var(--ion-background-color, #ffffff);
$accordion-background-color: var(--ion-background-color, #ffffff);
/// @prop - Duration of the accordion transition
$accordion-transition-duration: 300ms;
$accordion-transition-duration: 300ms;
/// @prop - Timing function of the accordion transition
$accordion-transition-easing: cubic-bezier(0.25, 0.8, 0.5, 1);
$accordion-transition-easing: cubic-bezier(0.25, 0.8, 0.5, 1);
/// @prop - Opacity of the disabled accordion
$accordion-disabled-opacity: 0.4;
$accordion-disabled-opacity: 0.4;
/// @prop - Margin of the inset accordion
$accordion-inset-margin: 16px;
$accordion-inset-margin: 16px;

View File

@@ -1,16 +1,20 @@
import type { OverlayOptions } from '@utils/overlays-interface';
import type { AnimationBuilder, LiteralUnion, Mode } from '../../interface';
import type { LiteralUnion } from '../../interface';
export interface ActionSheetOptions extends OverlayOptions {
export interface ActionSheetOptions {
header?: string;
subHeader?: string;
cssClass?: string | string[];
buttons: (ActionSheetButton | string)[];
backdropDismiss?: boolean;
translucent?: boolean;
animated?: boolean;
mode?: Mode;
keyboardClose?: boolean;
id?: string;
htmlAttributes?: { [key: string]: any };
enterAnimation?: AnimationBuilder;
leaveAnimation?: AnimationBuilder;
}
export interface ActionSheetButton<T = any> {

View File

@@ -9,11 +9,11 @@
--backdrop-opacity: var(--ion-backdrop-opacity, 0.4);
--button-background: #{$action-sheet-ios-button-background};
--button-background-activated: #{$action-sheet-ios-button-background-activated};
--button-background-activated-opacity: 0.08;
--button-background-activated-opacity: .08;
--button-background-hover: currentColor;
--button-background-hover-opacity: 0.04;
--button-background-hover-opacity: .04;
--button-background-focused: currentColor;
--button-background-focused-opacity: 0.12;
--button-background-focused-opacity: .12;
--button-background-selected: #{$action-sheet-ios-button-background-selected};
--button-background-selected-opacity: 1;
--button-color: #{$action-sheet-ios-button-text-color};
@@ -51,14 +51,10 @@
// ---------------------------------------------------
.action-sheet-container {
@include padding(
$action-sheet-ios-padding-top,
$action-sheet-ios-padding-end,
$action-sheet-ios-padding-bottom,
$action-sheet-ios-padding-start
);
@include padding($action-sheet-ios-padding-top, $action-sheet-ios-padding-end, $action-sheet-ios-padding-bottom, $action-sheet-ios-padding-start);
}
// iOS Action Sheet Group
// ---------------------------------------------------
@@ -75,6 +71,7 @@
@include margin(null, null, $action-sheet-ios-group-margin-bottom, null);
}
// iOS Translucent Action Sheet
// ---------------------------------------------------
@@ -87,17 +84,9 @@
:host(.action-sheet-translucent) .action-sheet-title,
:host(.action-sheet-translucent) .action-sheet-button {
background-color: transparent;
background-image: linear-gradient(
0deg,
$action-sheet-ios-translucent-background-color,
$action-sheet-ios-translucent-background-color 100%
),
linear-gradient(
0deg,
$action-sheet-ios-translucent-border-color,
$action-sheet-ios-translucent-border-color 50%,
$action-sheet-ios-translucent-background-color 50%
);
background-image:
linear-gradient(0deg, $action-sheet-ios-translucent-background-color, $action-sheet-ios-translucent-background-color 100%),
linear-gradient(0deg, $action-sheet-ios-translucent-border-color, $action-sheet-ios-translucent-border-color 50%, $action-sheet-ios-translucent-background-color 50%);
background-repeat: no-repeat;
/* stylelint-disable-next-line all */
@@ -126,16 +115,12 @@
background: $action-sheet-ios-button-background;
}
// iOS Action Sheet Title
// ---------------------------------------------------
.action-sheet-title {
@include padding(
$action-sheet-ios-title-padding-top,
$action-sheet-ios-title-padding-end,
$action-sheet-ios-title-padding-bottom,
$action-sheet-ios-title-padding-start
);
@include padding($action-sheet-ios-title-padding-top, $action-sheet-ios-title-padding-end, $action-sheet-ios-title-padding-bottom, $action-sheet-ios-title-padding-start);
color: var(--color, $action-sheet-ios-title-color);
@@ -150,18 +135,14 @@
}
.action-sheet-sub-title {
@include padding(
$action-sheet-ios-sub-title-padding-top,
$action-sheet-ios-sub-title-padding-end,
$action-sheet-ios-sub-title-padding-bottom,
$action-sheet-ios-sub-title-padding-start
);
@include padding($action-sheet-ios-sub-title-padding-top, $action-sheet-ios-sub-title-padding-end, $action-sheet-ios-sub-title-padding-bottom, $action-sheet-ios-sub-title-padding-start);
font-size: $action-sheet-ios-sub-title-font-size;
font-weight: $action-sheet-ios-title-font-weight;
}
// iOS Action Sheet Buttons
// ---------------------------------------------------

View File

@@ -1,163 +1,148 @@
@import "../../themes/native/native.globals.ios";
@import "../../themes/ionic.globals.ios";
// iOS Action Sheet
// --------------------------------------------------
/// @prop - Text align of the action sheet
$action-sheet-ios-text-align: center;
$action-sheet-ios-text-align: center;
/// @prop - Padding top of the action sheet
$action-sheet-ios-padding-top: 0;
$action-sheet-ios-padding-top: 0;
/// @prop - Padding end of the action sheet
$action-sheet-ios-padding-end: 8px;
$action-sheet-ios-padding-end: 8px;
/// @prop - Padding bottom of the action sheet
$action-sheet-ios-padding-bottom: $action-sheet-ios-padding-top;
$action-sheet-ios-padding-bottom: $action-sheet-ios-padding-top;
/// @prop - Padding start of the action sheet
$action-sheet-ios-padding-start: $action-sheet-ios-padding-end;
$action-sheet-ios-padding-start: $action-sheet-ios-padding-end;
/// @prop - Top margin of the action sheet button group
$action-sheet-ios-group-margin-top: 10px;
$action-sheet-ios-group-margin-top: 10px;
/// @prop - Bottom margin of the action sheet button group
$action-sheet-ios-group-margin-bottom: 10px;
$action-sheet-ios-group-margin-bottom: 10px;
/// @prop - Background color of the action sheet
$action-sheet-ios-background-color: $overlay-ios-background-color;
$action-sheet-ios-background-color: $overlay-ios-background-color;
/// @prop - Border radius of the action sheet
$action-sheet-ios-border-radius: 13px;
$action-sheet-ios-border-radius: 13px;
// Action Sheet Title
// --------------------------------------------------
/// @prop - Padding top of the action sheet title
$action-sheet-ios-title-padding-top: 14px;
$action-sheet-ios-title-padding-top: 14px;
/// @prop - Padding end of the action sheet title
$action-sheet-ios-title-padding-end: 10px;
$action-sheet-ios-title-padding-end: 10px;
/// @prop - Padding bottom of the action sheet title
$action-sheet-ios-title-padding-bottom: 13px;
$action-sheet-ios-title-padding-bottom: 13px;
/// @prop - Padding start of the action sheet title
$action-sheet-ios-title-padding-start: $action-sheet-ios-title-padding-end;
$action-sheet-ios-title-padding-start: $action-sheet-ios-title-padding-end;
/// @prop - Color of the action sheet title
$action-sheet-ios-title-color: $text-color-step-600;
$action-sheet-ios-title-color: $text-color-step-600;
/// @prop - Font size of the action sheet title
$action-sheet-ios-title-font-size: dynamic-font-min(1, 13px);
$action-sheet-ios-title-font-size: dynamic-font-min(1, 13px);
/// @prop - Font weight of the action sheet title
$action-sheet-ios-title-font-weight: 400;
$action-sheet-ios-title-font-weight: 400;
/// @prop - Font weight of the action sheet title when it has a sub title
$action-sheet-ios-title-with-sub-title-font-weight: 600;
$action-sheet-ios-title-with-sub-title-font-weight: 600;
// Action Sheet Subtitle
// --------------------------------------------------
/// @prop - Font size of the action sheet sub title
$action-sheet-ios-sub-title-font-size: dynamic-font-min(1, 13px);
$action-sheet-ios-sub-title-font-size: dynamic-font-min(1, 13px);
/// @prop - Padding top of the action sheet sub title
$action-sheet-ios-sub-title-padding-top: 6px;
$action-sheet-ios-sub-title-padding-top: 6px;
/// @prop - Padding end of the action sheet sub title
$action-sheet-ios-sub-title-padding-end: 0;
$action-sheet-ios-sub-title-padding-end: 0;
/// @prop - Padding bottom of the action sheet sub title
$action-sheet-ios-sub-title-padding-bottom: 0;
$action-sheet-ios-sub-title-padding-bottom: 0;
/// @prop - Padding start of the action sheet sub title
$action-sheet-ios-sub-title-padding-start: $action-sheet-ios-sub-title-padding-end;
$action-sheet-ios-sub-title-padding-start: $action-sheet-ios-sub-title-padding-end;
// Action Sheet Button
// --------------------------------------------------
/// @prop - Minimum height of the action sheet button
$action-sheet-ios-button-height: 56px;
$action-sheet-ios-button-height: 56px;
/// @prop - Padding of the action sheet button
$action-sheet-ios-button-padding: 14px;
$action-sheet-ios-button-padding: 14px;
/// @prop - Text color of the action sheet button
$action-sheet-ios-button-text-color: ion-color(primary, base);
$action-sheet-ios-button-text-color: ion-color(primary, base);
/// @prop - Font size of the action sheet button icon
$action-sheet-ios-button-icon-font-size: dynamic-font-min(1, 28px);
$action-sheet-ios-button-icon-font-size: dynamic-font-min(1, 28px);
/// @prop - Padding right of the action sheet button icon
$action-sheet-ios-button-icon-padding-right: 0.3em;
$action-sheet-ios-button-icon-padding-right: .3em;
/// @prop - Font size of the action sheet button
$action-sheet-ios-button-font-size: dynamic-font-min(1, 20px);
$action-sheet-ios-button-font-size: dynamic-font-min(1, 20px);
/// @prop - Border color alpha of the action sheet button
$action-sheet-ios-button-border-color-alpha: 0.08;
$action-sheet-ios-button-border-color-alpha: .08;
/// @prop - Border color of the action sheet button
$action-sheet-ios-button-border-color: rgba($text-color-rgb, $action-sheet-ios-button-border-color-alpha);
$action-sheet-ios-button-border-color: rgba($text-color-rgb, $action-sheet-ios-button-border-color-alpha);
/// @prop - Background color of the action sheet button
$action-sheet-ios-button-background: linear-gradient(
0deg,
$action-sheet-ios-button-border-color,
$action-sheet-ios-button-border-color 50%,
transparent 50%
)
bottom / 100% 1px no-repeat transparent;
$action-sheet-ios-button-background: linear-gradient(0deg, $action-sheet-ios-button-border-color, $action-sheet-ios-button-border-color 50%, transparent 50%) bottom / 100% 1px no-repeat transparent;
/// @prop - Background color of the activated action sheet button
$action-sheet-ios-button-background-activated: $text-color;
$action-sheet-ios-button-background-activated: $text-color;
/// @prop - Background color of the selected action sheet button
$action-sheet-ios-button-background-selected: var(
--ion-color-step-150,
var(--ion-background-color-step-150, $background-color)
);
$action-sheet-ios-button-background-selected: var(--ion-color-step-150, var(--ion-background-color-step-150, $background-color));
/// @prop - Destructive text color of the action sheet button
$action-sheet-ios-button-destructive-text-color: ion-color(danger, base);
$action-sheet-ios-button-destructive-text-color: ion-color(danger, base);
/// @prop - Font weight of the action sheet cancel button
$action-sheet-ios-button-cancel-font-weight: 600;
$action-sheet-ios-button-cancel-font-weight: 600;
// Action Sheet Translucent
// --------------------------------------------------
/// @prop - Background color alpha of the action sheet when translucent
$action-sheet-ios-translucent-background-color-alpha: 0.8;
$action-sheet-ios-translucent-background-color-alpha: .8;
/// @prop - Background color of the action sheet when translucent
$action-sheet-ios-translucent-background-color: rgba(
$background-color-rgb,
$action-sheet-ios-translucent-background-color-alpha
);
$action-sheet-ios-translucent-background-color: rgba($background-color-rgb, $action-sheet-ios-translucent-background-color-alpha);
/// @prop - Border color alpha of the action sheet when translucent
$action-sheet-ios-translucent-border-color-alpha: 0.4;
$action-sheet-ios-translucent-border-color-alpha: .4;
/// @prop - Border color of the action sheet when translucent
$action-sheet-ios-translucent-border-color: rgba(
$background-color-rgb,
$action-sheet-ios-translucent-border-color-alpha
);
$action-sheet-ios-translucent-border-color: rgba($background-color-rgb, $action-sheet-ios-translucent-border-color-alpha);
/// @prop - Background color alpha of the activated action sheet when translucent
$action-sheet-ios-translucent-background-color-activated-alpha: 0.7;
$action-sheet-ios-translucent-background-color-activated-alpha: .7;
/// @prop - Background color of the activated action sheet when translucent
$action-sheet-ios-translucent-background-color-activated: rgba(
$background-color-rgb,
$action-sheet-ios-translucent-background-color-activated-alpha
);
$action-sheet-ios-translucent-background-color-activated: rgba($background-color-rgb, $action-sheet-ios-translucent-background-color-activated-alpha);
/// @prop - Filter of the translucent action-sheet group
$action-sheet-ios-group-translucent-filter: saturate(280%) blur(20px);
$action-sheet-ios-group-translucent-filter: saturate(280%) blur(20px);
/// @prop - Filter of the translucent action-sheet button
$action-sheet-ios-button-translucent-filter: saturate(120%);
$action-sheet-ios-button-translucent-filter: saturate(120%);

View File

@@ -13,14 +13,15 @@
--button-background-activated: transparent;
--button-background-activated-opacity: 0;
--button-background-hover: currentColor;
--button-background-hover-opacity: 0.04;
--button-background-hover-opacity: .04;
--button-background-focused: currentColor;
--button-background-focused-opacity: 0.12;
--button-background-focused-opacity: .12;
--button-color: #{$action-sheet-md-button-text-color};
--button-color-disabled: var(--button-color);
--color: #{$action-sheet-md-title-color};
}
// Material Design Action Sheet Wrapper
// -----------------------------------------
@@ -29,12 +30,7 @@
}
.action-sheet-title {
@include padding(
$action-sheet-md-title-padding-top,
$action-sheet-md-title-padding-end,
$action-sheet-md-title-padding-bottom,
$action-sheet-md-title-padding-start
);
@include padding($action-sheet-md-title-padding-top, $action-sheet-md-title-padding-end, $action-sheet-md-title-padding-bottom, $action-sheet-md-title-padding-start);
min-height: $action-sheet-md-title-height;
@@ -46,16 +42,12 @@
}
.action-sheet-sub-title {
@include padding(
$action-sheet-md-sub-title-padding-top,
$action-sheet-md-sub-title-padding-end,
$action-sheet-md-sub-title-padding-bottom,
$action-sheet-md-sub-title-padding-start
);
@include padding($action-sheet-md-sub-title-padding-top, $action-sheet-md-sub-title-padding-end, $action-sheet-md-sub-title-padding-bottom, $action-sheet-md-sub-title-padding-start);
font-size: $action-sheet-md-sub-title-font-size;
}
// Material Design Action Sheet Group
// -----------------------------------------
@@ -67,16 +59,12 @@
@include padding(null, null, $action-sheet-md-padding-bottom, null);
}
// Material Design Action Sheet Buttons
// -----------------------------------------
.action-sheet-button {
@include padding(
$action-sheet-md-button-padding-top,
$action-sheet-md-button-padding-end,
$action-sheet-md-button-padding-bottom,
$action-sheet-md-button-padding-start
);
@include padding($action-sheet-md-button-padding-top, $action-sheet-md-button-padding-end, $action-sheet-md-button-padding-bottom, $action-sheet-md-button-padding-start);
position: relative;
@@ -91,12 +79,7 @@
}
.action-sheet-icon {
@include margin(
$action-sheet-md-icon-margin-top,
$action-sheet-md-icon-margin-end,
$action-sheet-md-icon-margin-bottom,
$action-sheet-md-icon-margin-start
);
@include margin($action-sheet-md-icon-margin-top, $action-sheet-md-icon-margin-end, $action-sheet-md-icon-margin-bottom, $action-sheet-md-icon-margin-start);
color: var(--color);

View File

@@ -1,100 +1,103 @@
@import "../../themes/native/native.globals.md";
@import "../../themes/ionic.globals.md";
// Material Design Action Sheet
// --------------------------------------------------
/// @prop - Text align of the action sheet
$action-sheet-md-text-align: start;
$action-sheet-md-text-align: start;
/// @prop - Background color of the action sheet
$action-sheet-md-background-color: $overlay-md-background-color;
$action-sheet-md-background-color: $overlay-md-background-color;
/// @prop - Padding top of the action sheet
$action-sheet-md-padding-top: 0;
$action-sheet-md-padding-top: 0;
/// @prop - Padding bottom of the action sheet
$action-sheet-md-padding-bottom: var(--ion-safe-area-bottom);
$action-sheet-md-padding-bottom: var(--ion-safe-area-bottom);
// Action Sheet Title
// --------------------------------------------------
/// @prop - Height of the action sheet title
$action-sheet-md-title-height: 60px;
$action-sheet-md-title-height: 60px;
/// @prop - Color of the action sheet title
$action-sheet-md-title-color: rgba($text-color-rgb, 0.54);
$action-sheet-md-title-color: rgba($text-color-rgb, 0.54);
/// @prop - Font size of the action sheet title
$action-sheet-md-title-font-size: dynamic-font(16px);
$action-sheet-md-title-font-size: dynamic-font(16px);
/// @prop - Padding top of the action sheet title
$action-sheet-md-title-padding-top: 20px;
$action-sheet-md-title-padding-top: 20px;
/// @prop - Padding end of the action sheet title
$action-sheet-md-title-padding-end: 16px;
$action-sheet-md-title-padding-end: 16px;
/// @prop - Padding bottom of the action sheet title
$action-sheet-md-title-padding-bottom: 17px;
$action-sheet-md-title-padding-bottom: 17px;
/// @prop - Padding start of the action sheet title
$action-sheet-md-title-padding-start: $action-sheet-md-title-padding-end;
$action-sheet-md-title-padding-start: $action-sheet-md-title-padding-end;
// Action Sheet Subtitle
// --------------------------------------------------
/// @prop - Font size of the action sheet sub title
$action-sheet-md-sub-title-font-size: dynamic-font(14px);
$action-sheet-md-sub-title-font-size: dynamic-font(14px);
/// @prop - Padding top of the action sheet sub title
$action-sheet-md-sub-title-padding-top: 16px;
$action-sheet-md-sub-title-padding-top: 16px;
/// @prop - Padding end of the action sheet sub title
$action-sheet-md-sub-title-padding-end: 0;
$action-sheet-md-sub-title-padding-end: 0;
/// @prop - Padding bottom of the action sheet sub title
$action-sheet-md-sub-title-padding-bottom: 0;
$action-sheet-md-sub-title-padding-bottom: 0;
/// @prop - Padding start of the action sheet sub title
$action-sheet-md-sub-title-padding-start: $action-sheet-md-sub-title-padding-end;
$action-sheet-md-sub-title-padding-start: $action-sheet-md-sub-title-padding-end;
// Action Sheet Button
// --------------------------------------------------
/// @prop - Minimum height of the action sheet button
$action-sheet-md-button-height: 52px;
$action-sheet-md-button-height: 52px;
/// @prop - Text color of the action sheet button
$action-sheet-md-button-text-color: $text-color-step-150;
$action-sheet-md-button-text-color: $text-color-step-150;
/// @prop - Font size of the action sheet button
$action-sheet-md-button-font-size: dynamic-font(16px);
$action-sheet-md-button-font-size: dynamic-font(16px);
/// @prop - Padding top of the action sheet button
$action-sheet-md-button-padding-top: 12px;
$action-sheet-md-button-padding-top: 12px;
/// @prop - Padding end of the action sheet button
$action-sheet-md-button-padding-end: 16px;
$action-sheet-md-button-padding-end: 16px;
/// @prop - Padding bottom of the action sheet button
$action-sheet-md-button-padding-bottom: $action-sheet-md-button-padding-top;
$action-sheet-md-button-padding-bottom: $action-sheet-md-button-padding-top;
/// @prop - Padding start of the action sheet button
$action-sheet-md-button-padding-start: $action-sheet-md-button-padding-end;
$action-sheet-md-button-padding-start: $action-sheet-md-button-padding-end;
// Action Sheet Icon
// --------------------------------------------------
/// @prop - Font size of the icon in the action sheet button
$action-sheet-md-icon-font-size: dynamic-font(24px);
$action-sheet-md-icon-font-size: dynamic-font(24px);
/// @prop - Margin top of the icon in the action sheet button
$action-sheet-md-icon-margin-top: 0;
$action-sheet-md-icon-margin-top: 0;
/// @prop - Margin end of the icon in the action sheet button
$action-sheet-md-icon-margin-end: 32px;
$action-sheet-md-icon-margin-end: 32px;
/// @prop - Margin bottom of the icon in the action sheet button
$action-sheet-md-icon-margin-bottom: 0;
$action-sheet-md-icon-margin-bottom: 0;
/// @prop - Margin start of the icon in the action sheet button
$action-sheet-md-icon-margin-start: 0;
$action-sheet-md-icon-margin-start: 0;

View File

@@ -173,6 +173,7 @@
overflow: hidden;
}
// Action Sheet: States
// --------------------------------------------------
@@ -180,6 +181,7 @@
@include button-state();
}
// Action Sheet: Selected
// --------------------------------------------------
@@ -193,6 +195,7 @@
}
}
// Action Sheet: Activated
// --------------------------------------------------
@@ -206,6 +209,7 @@
}
}
// Action Sheet: Focused
// --------------------------------------------------

View File

@@ -18,7 +18,7 @@ import {
} from '@utils/overlays';
import { getClassMap } from '@utils/theme';
import { getIonMode, getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
import type { AnimationBuilder, CssClassMap, FrameworkDelegate, OverlayInterface } from '../../interface';
import type { OverlayEventDetail } from '../../utils/overlays-interface';
@@ -29,15 +29,13 @@ import { mdEnterAnimation } from './animations/md.enter';
import { mdLeaveAnimation } from './animations/md.leave';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*/
@Component({
tag: 'ion-action-sheet',
styleUrls: {
ios: 'action-sheet.ios.scss',
md: 'action-sheet.md.scss',
ionic: 'action-sheet.md.scss',
},
scoped: true,
})
@@ -107,7 +105,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
/**
* If `true`, the action sheet will be translucent.
* Only applies when the theme is `"ios"` and the device supports
* Only applies when the mode is `"ios"` and the device supports
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
*/
@Prop() translucent = false;
@@ -316,7 +314,6 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
}
componentDidLoad() {
const mode = getIonMode(this);
/**
* Only create gesture if:
* 1. A gesture does not already exist
@@ -325,7 +322,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
* 4. A group ref exists
*/
const { groupEl, wrapperEl } = this;
if (!this.gesture && mode === 'ios' && wrapperEl && groupEl) {
if (!this.gesture && getIonMode(this) === 'ios' && wrapperEl && groupEl) {
readTask(() => {
const isScrollable = groupEl.scrollHeight > groupEl.clientHeight;
if (!isScrollable) {
@@ -359,7 +356,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
render() {
const { header, htmlAttributes, overlayIndex } = this;
const theme = getIonTheme(this);
const mode = getIonMode(this);
const allButtons = this.getButtons();
const cancelButton = allButtons.find((b) => b.role === 'cancel');
const buttons = allButtons.filter((b) => b.role !== 'cancel');
@@ -376,7 +373,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
zIndex: `${20000 + this.overlayIndex}`,
}}
class={{
[theme]: true,
[mode]: true,
...getClassMap(this.cssClass),
'overlay-hidden': true,
'action-sheet-translucent': this.translucent,
@@ -416,7 +413,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
{b.icon && <ion-icon icon={b.icon} aria-hidden="true" lazy={false} class="action-sheet-icon" />}
{b.text}
</span>
{theme === 'md' && <ion-ripple-effect></ion-ripple-effect>}
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
</button>
))}
</div>
@@ -440,7 +437,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
)}
{cancelButton.text}
</span>
{theme === 'md' && <ion-ripple-effect></ion-ripple-effect>}
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
</button>
</div>
)}

View File

@@ -1,10 +1,10 @@
@import "../../themes/native/native.globals";
@import "../../themes/ionic.globals";
// Action Sheet
// --------------------------------------------------
/// @prop - Width of the action sheet
$action-sheet-width: 100%;
$action-sheet-width: 100%;
/// @prop - Maximum width of the action sheet
$action-sheet-max-width: 500px;
$action-sheet-max-width: 500px;

View File

@@ -1,9 +1,7 @@
import type { OverlayOptions } from '@utils/overlays-interface';
import type { LiteralUnion, TextFieldTypes } from '../../interface';
import type { AnimationBuilder, LiteralUnion, Mode, TextFieldTypes } from '../../interface';
import type { IonicSafeString } from '../../utils/sanitization';
export interface AlertOptions extends OverlayOptions {
export interface AlertOptions {
header?: string;
subHeader?: string;
message?: string | IonicSafeString;
@@ -12,9 +10,15 @@ export interface AlertOptions extends OverlayOptions {
buttons?: (AlertButton | string)[];
backdropDismiss?: boolean;
translucent?: boolean;
animated?: boolean;
htmlAttributes?: { [key: string]: any };
mode?: Mode;
keyboardClose?: boolean;
id?: string;
enterAnimation?: AnimationBuilder;
leaveAnimation?: AnimationBuilder;
}
export interface AlertInput {

View File

@@ -23,6 +23,7 @@
pointer-events: none;
}
// iOS Translucent Alert
// -----------------------------------------
@@ -37,12 +38,7 @@
// --------------------------------------------------
.alert-head {
@include padding(
$alert-ios-head-padding-top,
$alert-ios-head-padding-end,
$alert-ios-head-padding-bottom,
$alert-ios-head-padding-start
);
@include padding($alert-ios-head-padding-top, $alert-ios-head-padding-end, $alert-ios-head-padding-bottom, $alert-ios-head-padding-start);
text-align: $alert-ios-head-text-align;
}
@@ -62,17 +58,13 @@
font-size: $alert-ios-sub-title-font-size;
}
// iOS Alert Message
// --------------------------------------------------
.alert-message,
.alert-input-group {
@include padding(
$alert-ios-message-padding-top,
$alert-ios-message-padding-end,
$alert-ios-message-padding-bottom,
$alert-ios-message-padding-start
);
@include padding($alert-ios-message-padding-top, $alert-ios-message-padding-end, $alert-ios-message-padding-bottom, $alert-ios-message-padding-start);
color: $alert-ios-message-text-color;
@@ -86,26 +78,17 @@
}
.alert-message:empty {
@include padding(
$alert-ios-message-empty-padding-top,
$alert-ios-message-empty-padding-end,
$alert-ios-message-empty-padding-bottom,
$alert-ios-message-empty-padding-start
);
@include padding($alert-ios-message-empty-padding-top, $alert-ios-message-empty-padding-end, $alert-ios-message-empty-padding-bottom, $alert-ios-message-empty-padding-start);
}
// iOS Alert Input
// --------------------------------------------------
.alert-input {
@include border-radius($alert-ios-input-border-radius);
@include margin($alert-ios-input-margin-top, null, null, null);
@include padding(
$alert-ios-input-padding-top,
$alert-ios-input-padding-end,
$alert-ios-input-padding-bottom,
$alert-ios-input-padding-start
);
@include padding($alert-ios-input-padding-top, $alert-ios-input-padding-end, $alert-ios-input-padding-bottom, $alert-ios-input-padding-start);
border: $alert-ios-input-border;
@@ -137,6 +120,7 @@
}
}
// iOS Alert Radio/Checkbox Group
// --------------------------------------------------
@@ -155,16 +139,12 @@
min-height: $alert-ios-tappable-height;
}
// iOS Alert Radio Label
// --------------------------------------------------
.alert-radio-label {
@include padding(
$alert-ios-radio-label-padding-top,
$alert-ios-radio-label-padding-end,
$alert-ios-radio-label-padding-bottom,
$alert-ios-radio-label-padding-start
);
@include padding($alert-ios-radio-label-padding-top, $alert-ios-radio-label-padding-end, $alert-ios-radio-label-padding-bottom, $alert-ios-radio-label-padding-start);
flex: 1;
order: 0;
@@ -172,13 +152,15 @@
color: $alert-ios-radio-label-text-color;
}
// iOS Alert Radio Label: Checked
// --------------------------------------------------
[aria-checked="true"] .alert-radio-label {
[aria-checked=true] .alert-radio-label {
color: $alert-ios-radio-label-text-color-checked;
}
// iOS Alert Radio Checkmark: Unchecked
// -----------------------------------------
@@ -190,10 +172,11 @@
min-width: $alert-ios-radio-min-width;
}
// iOS Alert Radio Checked
// -----------------------------------------
[aria-checked="true"] .alert-radio-inner {
[aria-checked=true] .alert-radio-inner {
@include position($alert-ios-radio-icon-top, null, null, $alert-ios-radio-icon-start);
position: absolute;
@@ -210,16 +193,12 @@
border-color: $alert-ios-radio-icon-border-color;
}
// iOS Alert Checkbox Label
// --------------------------------------------------
.alert-checkbox-label {
@include padding(
$alert-ios-checkbox-label-padding-top,
$alert-ios-checkbox-label-padding-end,
$alert-ios-checkbox-label-padding-bottom,
$alert-ios-checkbox-label-padding-start
);
@include padding($alert-ios-checkbox-label-padding-top, $alert-ios-checkbox-label-padding-end, $alert-ios-checkbox-label-padding-bottom, $alert-ios-checkbox-label-padding-start);
flex: 1;
@@ -231,12 +210,7 @@
.alert-checkbox-icon {
@include border-radius($alert-ios-checkbox-border-radius);
@include margin(
$alert-ios-checkbox-margin-top,
$alert-ios-checkbox-margin-end,
$alert-ios-checkbox-margin-bottom,
$alert-ios-checkbox-margin-start
);
@include margin($alert-ios-checkbox-margin-top, $alert-ios-checkbox-margin-end, $alert-ios-checkbox-margin-bottom, $alert-ios-checkbox-margin-start);
position: relative;
@@ -252,19 +226,21 @@
contain: strict;
}
// iOS Alert Checkbox Outer Circle: Checked
// -----------------------------------------
[aria-checked="true"] .alert-checkbox-icon {
[aria-checked=true] .alert-checkbox-icon {
border-color: $alert-ios-checkbox-border-color-on;
background-color: $alert-ios-checkbox-background-color-on;
}
// iOS Alert Checkbox Inner Checkmark: Checked
// -----------------------------------------
[aria-checked="true"] .alert-checkbox-inner {
[aria-checked=true] .alert-checkbox-inner {
@include position($alert-ios-checkbox-icon-top, null, null, $alert-ios-checkbox-icon-start);
position: absolute;
@@ -281,6 +257,7 @@
border-color: $alert-ios-checkbox-icon-border-color;
}
// iOS Alert Button
// --------------------------------------------------

View File

@@ -1,141 +1,141 @@
@use "sass:math";
@import "../../themes/native/native.globals.ios";
@import "../../themes/ionic.globals.ios";
@import "../item/item.ios.vars";
// iOS Alert
// --------------------------------------------------
/// @prop - Font size of the alert
$alert-ios-font-size: dynamic-font-min(1, 14px);
$alert-ios-font-size: dynamic-font-min(1, 14px);
/// @prop - Max width of the alert
$alert-ios-max-width: dynamic-font-clamp(1, 270px, 1.2);
$alert-ios-max-width: dynamic-font-clamp(1, 270px, 1.2);
/// @prop - Border radius of the alert
$alert-ios-border-radius: 13px;
$alert-ios-border-radius: 13px;
/// @prop - Background color of the alert
$alert-ios-background-color: $overlay-ios-background-color;
$alert-ios-background-color: $overlay-ios-background-color;
/// @prop - Background color alpha of the alert when translucent
$alert-ios-translucent-background-color-alpha: 0.9;
$alert-ios-translucent-background-color-alpha: .9;
/// @prop - Background color of the alert when translucent
$alert-ios-translucent-background-color: rgba($background-color-rgb, $alert-ios-translucent-background-color-alpha);
$alert-ios-translucent-background-color: rgba($background-color-rgb, $alert-ios-translucent-background-color-alpha);
/// @prop - Box shadow of the alert
$alert-ios-box-shadow: none;
$alert-ios-box-shadow: none;
/// @prop - Padding top of the alert head
$alert-ios-head-padding-top: 12px;
$alert-ios-head-padding-top: 12px;
/// @prop - Padding end of the alert head
$alert-ios-head-padding-end: 16px;
$alert-ios-head-padding-end: 16px;
/// @prop - Padding bottom of the alert head
$alert-ios-head-padding-bottom: 7px;
$alert-ios-head-padding-bottom: 7px;
/// @prop - Padding start of the alert head
$alert-ios-head-padding-start: $alert-ios-head-padding-end;
$alert-ios-head-padding-start: $alert-ios-head-padding-end;
/// @prop - Text align of the alert head
$alert-ios-head-text-align: center;
$alert-ios-head-text-align: center;
/// @prop - Color of the alert title
$alert-ios-title-color: $text-color;
$alert-ios-title-color: $text-color;
/// @prop - Margin top of the alert title
$alert-ios-title-margin-top: 8px;
$alert-ios-title-margin-top: 8px;
/// @prop - Font size of the alert title
$alert-ios-title-font-size: dynamic-font-min(1, 17px);
$alert-ios-title-font-size: dynamic-font-min(1, 17px);
/// @prop - Font weight of the alert title
$alert-ios-title-font-weight: 600;
$alert-ios-title-font-weight: 600;
/// @prop - Font size of the alert sub title
$alert-ios-sub-title-font-size: dynamic-font-min(1, 14px);
$alert-ios-sub-title-font-size: dynamic-font-min(1, 14px);
/// @prop - Text color of the alert sub title
$alert-ios-sub-title-text-color: $text-color-step-400;
$alert-ios-sub-title-text-color: $text-color-step-400;
/// @prop - Padding top of the alert message
$alert-ios-message-padding-top: 0;
$alert-ios-message-padding-top: 0;
/// @prop - Padding end of the alert message
$alert-ios-message-padding-end: 16px;
$alert-ios-message-padding-end: 16px;
/// @prop - Padding bottom of the alert message
$alert-ios-message-padding-bottom: 21px;
$alert-ios-message-padding-bottom: 21px;
/// @prop - Padding start of the alert message
$alert-ios-message-padding-start: $alert-ios-message-padding-end;
$alert-ios-message-padding-start: $alert-ios-message-padding-end;
/// @prop - Font size of the alert message
$alert-ios-message-font-size: dynamic-font-min(1, 13px);
$alert-ios-message-font-size: dynamic-font-min(1, 13px);
/// @prop - Text align of the alert message
$alert-ios-message-text-align: center;
$alert-ios-message-text-align: center;
/// @prop - Text color of the alert message
$alert-ios-message-text-color: $text-color;
$alert-ios-message-text-color: $text-color;
/// @prop - Padding top of the alert empty message
$alert-ios-message-empty-padding-top: 0;
$alert-ios-message-empty-padding-top: 0;
/// @prop - Padding end of the alert empty message
$alert-ios-message-empty-padding-end: 0;
$alert-ios-message-empty-padding-end: 0;
/// @prop - Padding bottom of the alert empty message
$alert-ios-message-empty-padding-bottom: 12px;
$alert-ios-message-empty-padding-bottom: 12px;
/// @prop - Padding start of the alert empty message
$alert-ios-message-empty-padding-start: 0;
$alert-ios-message-empty-padding-start: 0;
/// @prop - Maximum height of the alert content
$alert-ios-content-max-height: 240px;
$alert-ios-content-max-height: 240px;
/// @prop - Margin top of the alert input
$alert-ios-input-margin-top: 10px;
$alert-ios-input-margin-top: 10px;
/// @prop - Padding top on the alert input
$alert-ios-input-padding-top: 7px;
$alert-ios-input-padding-top: 7px;
/// @prop - Padding end on the alert input
$alert-ios-input-padding-end: $alert-ios-input-padding-top;
$alert-ios-input-padding-end: $alert-ios-input-padding-top;
/// @prop - Padding bottom on the alert input
$alert-ios-input-padding-bottom: $alert-ios-input-padding-top;
$alert-ios-input-padding-bottom: $alert-ios-input-padding-top;
/// @prop - Padding start on the alert input
$alert-ios-input-padding-start: $alert-ios-input-padding-end;
$alert-ios-input-padding-start: $alert-ios-input-padding-end;
/// @prop - Placeholder Color for input
$alert-ios-input-placeholder-color: $placeholder-text-color;
$alert-ios-input-placeholder-color: $placeholder-text-color;
/// @prop - Border color of the alert input
$alert-ios-input-border-color: $background-color-step-250;
$alert-ios-input-border-color: $background-color-step-250;
/// @prop - Border of the alert input
$alert-ios-input-border: $hairlines-width solid $alert-ios-input-border-color;
$alert-ios-input-border: $hairlines-width solid $alert-ios-input-border-color;
/// @prop - Border radius of the alert input
$alert-ios-input-border-radius: 7px;
$alert-ios-input-border-radius: 7px;
/// @prop - Background color of the alert input
$alert-ios-input-background-color: $background-color;
$alert-ios-input-background-color: $background-color;
/// @prop - Flex wrap of the alert button group
$alert-ios-button-group-flex-wrap: wrap;
$alert-ios-button-group-flex-wrap: wrap;
/// @prop - Flex of the alert button
$alert-ios-button-flex: 1 1 auto;
$alert-ios-button-flex: 1 1 auto;
/// @prop - Margin of the alert button
$alert-ios-button-margin: 0;
$alert-ios-button-margin: 0;
/// @prop - Min width of the alert button
$alert-ios-button-min-width: 50%;
$alert-ios-button-min-width: 50%;
/// @prop - Height of the alert button
/**
@@ -147,172 +147,172 @@ $alert-ios-button-min-width: 50%;
* a hairline (<1px) width, this will cause subpixel rendering
* differences across browsers.
*/
$alert-ios-button-height: dynamic-font-min(1, 44px);
$alert-ios-button-height: dynamic-font-min(1, 44px);
/// @prop - Padding of the alert button
$alert-ios-button-padding: 8px;
/// @prop - Font size of the alert button
$alert-ios-button-font-size: dynamic-font-min(1, 17px);
$alert-ios-button-font-size: dynamic-font-min(1, 17px);
/// @prop - Color of the text in the alert button
$alert-ios-button-text-color: ion-color(primary, base);
$alert-ios-button-text-color: ion-color(primary, base);
/// @prop - Destructive text color of the alert button
$alert-ios-button-destructive-text-color: ion-color(danger, base);
$alert-ios-button-destructive-text-color: ion-color(danger, base);
/// @prop - Background color of the alert button
$alert-ios-button-background-color: transparent;
$alert-ios-button-background-color: transparent;
/// @prop - Background color alpha of the alert activated button
$alert-ios-button-background-color-alpha-activated: 0.1;
$alert-ios-button-background-color-alpha-activated: .1;
/// @prop - Background color of the alert activated button
$alert-ios-button-background-color-activated: rgba($text-color-rgb, $alert-ios-button-background-color-alpha-activated);
$alert-ios-button-background-color-activated: rgba($text-color-rgb, $alert-ios-button-background-color-alpha-activated);
/// @prop - Border width of the alert button
$alert-ios-button-border-width: $hairlines-width;
$alert-ios-button-border-width: $hairlines-width;
/// @prop - Border style of the alert button
$alert-ios-button-border-style: solid;
$alert-ios-button-border-style: solid;
/// @prop - Border color alpha of the alert button
$alert-ios-button-border-color-alpha: 0.2;
$alert-ios-button-border-color-alpha: .2;
/// @prop - Border color of the alert button
$alert-ios-button-border-color: rgba($text-color-rgb, $alert-ios-button-border-color-alpha);
$alert-ios-button-border-color: rgba($text-color-rgb, $alert-ios-button-border-color-alpha);
/// @prop - Border radius of the alert button
$alert-ios-button-border-radius: 0;
$alert-ios-button-border-radius: 0;
/// @prop - Font weight of the main text on the alert button
$alert-ios-button-main-font-weight: bold;
$alert-ios-button-main-font-weight: bold;
/// @prop - Border top of the alert list
$alert-ios-list-border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
$alert-ios-list-border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
/// @prop - Padding top on the label for the radio alert
$alert-ios-radio-label-padding-top: 13px;
$alert-ios-radio-label-padding-top: 13px;
/// @prop - Padding end on the label for the radio alert
$alert-ios-radio-label-padding-end: $alert-ios-radio-label-padding-top;
$alert-ios-radio-label-padding-end: $alert-ios-radio-label-padding-top;
/// @prop - Padding bottom on the label for the radio alert
$alert-ios-radio-label-padding-bottom: $alert-ios-radio-label-padding-top;
$alert-ios-radio-label-padding-bottom: $alert-ios-radio-label-padding-top;
/// @prop - Padding start on the label for the radio alert
$alert-ios-radio-label-padding-start: $alert-ios-radio-label-padding-end;
$alert-ios-radio-label-padding-start: $alert-ios-radio-label-padding-end;
/// @prop - Text color of the label for the radio alert
$alert-ios-radio-label-text-color: $text-color;
$alert-ios-radio-label-text-color: $text-color;
/// @prop - Text color of the label for the checked radio alert
$alert-ios-radio-label-text-color-checked: $alert-ios-button-text-color;
$alert-ios-radio-label-text-color-checked: $alert-ios-button-text-color;
/// @prop - Min width of the radio alert
$alert-ios-radio-min-width: 30px;
$alert-ios-radio-min-width: 30px;
/// @prop - Top of the icon in the radio alert
$alert-ios-radio-icon-top: -7px;
$alert-ios-radio-icon-top: -7px;
/// @prop - Start of the icon in the radio alert
$alert-ios-radio-icon-start: 7px;
$alert-ios-radio-icon-start: 7px;
/// @prop - Width of the icon in the radio alert
$alert-ios-radio-icon-width: 6px;
$alert-ios-radio-icon-width: 6px;
/// @prop - Height of the icon in the radio alert
$alert-ios-radio-icon-height: 12px;
$alert-ios-radio-icon-height: 12px;
/// @prop - Border width of the icon in the radio alert
$alert-ios-radio-icon-border-width: 2px;
$alert-ios-radio-icon-border-width: 2px;
/// @prop - Border style of the icon in the radio alert
$alert-ios-radio-icon-border-style: solid;
$alert-ios-radio-icon-border-style: solid;
/// @prop - Border color of the icon in the radio alert
$alert-ios-radio-icon-border-color: $alert-ios-button-text-color;
$alert-ios-radio-icon-border-color: $alert-ios-button-text-color;
/// @prop - Transform of the icon in the radio alert
$alert-ios-radio-icon-transform: rotate(45deg);
$alert-ios-radio-icon-transform: rotate(45deg);
/// @prop - Padding top of the label for the checkbox in the alert
$alert-ios-checkbox-label-padding-top: 13px;
$alert-ios-checkbox-label-padding-top: 13px;
/// @prop - Padding end of the label for the checkbox in the alert
$alert-ios-checkbox-label-padding-end: $alert-ios-checkbox-label-padding-top;
$alert-ios-checkbox-label-padding-end: $alert-ios-checkbox-label-padding-top;
/// @prop - Padding bottom of the label for the checkbox in the alert
$alert-ios-checkbox-label-padding-bottom: $alert-ios-checkbox-label-padding-top;
$alert-ios-checkbox-label-padding-bottom: $alert-ios-checkbox-label-padding-top;
/// @prop - Padding start of the label for the checkbox in the alert
$alert-ios-checkbox-label-padding-start: $alert-ios-checkbox-label-padding-end;
$alert-ios-checkbox-label-padding-start: $alert-ios-checkbox-label-padding-end;
/// @prop - Text color of the label for the checkbox in the alert
$alert-ios-checkbox-label-text-color: $text-color;
$alert-ios-checkbox-label-text-color: $text-color;
/// @prop - Margin top of the checkbox in the alert
$alert-ios-checkbox-margin-top: 10px;
$alert-ios-checkbox-margin-top: 10px;
/// @prop - Margin end of the checkbox in the alert
$alert-ios-checkbox-margin-end: 6px;
$alert-ios-checkbox-margin-end: 6px;
/// @prop - Margin bottom of the checkbox in the alert
$alert-ios-checkbox-margin-bottom: 10px;
$alert-ios-checkbox-margin-bottom: 10px;
/// @prop - Margin start of the checkbox in the alert
$alert-ios-checkbox-margin-start: 16px;
$alert-ios-checkbox-margin-start: 16px;
/// @prop - Size of the checkbox in the alert
$alert-ios-checkbox-size: dynamic-font-max(22px, 2.538);
$alert-ios-checkbox-size: dynamic-font-max(22px, 2.538);
/// @prop - Border width of the checkbox in the alert
$alert-ios-checkbox-border-width: dynamic-font(2px);
$alert-ios-checkbox-border-width: dynamic-font(2px);
/// @prop - Border style of the checkbox in the alert
$alert-ios-checkbox-border-style: solid;
$alert-ios-checkbox-border-style: solid;
/// @prop - Border radius of the checkbox in the alert
$alert-ios-checkbox-border-radius: 50%;
$alert-ios-checkbox-border-radius: 50%;
/// @prop - Border color of the checkbox in the alert when off
$alert-ios-checkbox-border-color-off: $item-ios-border-color;
$alert-ios-checkbox-border-color-off: $item-ios-border-color;
/// @prop - Border color of the checkbox in the alert when on
$alert-ios-checkbox-border-color-on: ion-color(primary, base);
$alert-ios-checkbox-border-color-on: ion-color(primary, base);
/// @prop - Background color of the checkbox in the alert when off
$alert-ios-checkbox-background-color-off: $item-ios-background;
$alert-ios-checkbox-background-color-off: $item-ios-background;
/// @prop - Background color of the checkbox in the alert when on
$alert-ios-checkbox-background-color-on: ion-color(primary, base);
$alert-ios-checkbox-background-color-on: ion-color(primary, base);
/// @prop - Top of the icon in the checkbox alert
$alert-ios-checkbox-icon-top: calc($alert-ios-checkbox-size / 8);
$alert-ios-checkbox-icon-top: calc($alert-ios-checkbox-size / 8);
/// @prop - Start of the icon in the checkbox alert
$alert-ios-checkbox-icon-start: calc($alert-ios-checkbox-size / 3);
$alert-ios-checkbox-icon-start: calc($alert-ios-checkbox-size / 3);
/// @prop - Width of the icon in the checkbox alert
$alert-ios-checkbox-icon-width: calc($alert-ios-checkbox-size / 6 + 1px);
$alert-ios-checkbox-icon-width: calc($alert-ios-checkbox-size / 6 + 1px);
/// @prop - Height of the icon in the checkbox alert
$alert-ios-checkbox-icon-height: calc($alert-ios-checkbox-size * 0.5);
$alert-ios-checkbox-icon-height: calc($alert-ios-checkbox-size * 0.5);
/// @prop - Border width of the icon in the checkbox alert
$alert-ios-checkbox-icon-border-width: $alert-ios-checkbox-border-width;
$alert-ios-checkbox-icon-border-width: $alert-ios-checkbox-border-width;
/// @prop - Border style of the icon in the checkbox alert
$alert-ios-checkbox-icon-border-style: $alert-ios-checkbox-border-style;
$alert-ios-checkbox-icon-border-style: $alert-ios-checkbox-border-style;
/// @prop - Border color of the icon in the checkbox alert
$alert-ios-checkbox-icon-border-color: $background-color;
$alert-ios-checkbox-icon-border-color: $background-color;
/// @prop - Transform of the icon in the checkbox alert
$alert-ios-checkbox-icon-transform: rotate(45deg);
$alert-ios-checkbox-icon-transform: rotate(45deg);
/// @prop - Filter of the translucent alert
$alert-ios-translucent-filter: saturate(180%) blur(20px);
$alert-ios-translucent-filter: saturate(180%) blur(20px);
/// @prop - Height of the tappable inputs in the checkbox alert
$alert-ios-tappable-height: $item-ios-min-height;
$alert-ios-tappable-height: $item-ios-min-height;

View File

@@ -22,12 +22,7 @@
// --------------------------------------------------
.alert-head {
@include padding(
$alert-md-head-padding-top,
$alert-md-head-padding-end,
$alert-md-head-padding-bottom,
$alert-md-head-padding-start
);
@include padding($alert-md-head-padding-top, $alert-md-head-padding-end, $alert-md-head-padding-bottom, $alert-md-head-padding-start);
text-align: $alert-md-head-text-align;
}
@@ -45,17 +40,13 @@
font-size: $alert-md-sub-title-font-size;
}
// Material Design Alert Message
// --------------------------------------------------
.alert-message,
.alert-input-group {
@include padding(
$alert-md-message-padding-top,
$alert-md-message-padding-end,
$alert-md-message-padding-bottom,
$alert-md-message-padding-start
);
@include padding($alert-md-message-padding-top, $alert-md-message-padding-end, $alert-md-message-padding-bottom, $alert-md-message-padding-start);
color: $alert-md-message-text-color;
}
@@ -76,28 +67,19 @@
}
.alert-message:empty {
@include padding(
$alert-md-message-empty-padding-top,
$alert-md-message-empty-padding-end,
$alert-md-message-empty-padding-bottom,
$alert-md-message-empty-padding-start
);
@include padding($alert-md-message-empty-padding-top, $alert-md-message-empty-padding-end, $alert-md-message-empty-padding-bottom, $alert-md-message-empty-padding-start);
}
.alert-head + .alert-message {
padding-top: 0;
}
// Material Design Alert Input
// --------------------------------------------------
.alert-input {
@include margin(
$alert-md-input-margin-top,
$alert-md-input-margin-end,
$alert-md-input-margin-bottom,
$alert-md-input-margin-start
);
@include margin($alert-md-input-margin-top, $alert-md-input-margin-end, $alert-md-input-margin-bottom, $alert-md-input-margin-start);
border-bottom: $alert-md-input-border-width $alert-md-input-border-style $alert-md-input-border-color;
@@ -118,10 +100,10 @@
.alert-input:focus {
@include margin(null, null, $alert-md-input-margin-bottom - 1, null);
border-bottom: $alert-md-input-border-width-focused $alert-md-input-border-style-focused
$alert-md-input-border-color-focused;
border-bottom: $alert-md-input-border-width-focused $alert-md-input-border-style-focused $alert-md-input-border-color-focused;
}
// Material Design Alert Radio/Checkbox Group
// --------------------------------------------------
@@ -153,16 +135,12 @@
min-height: $alert-md-tappable-height;
}
// Material Design Alert Radio
// --------------------------------------------------
.alert-radio-label {
@include padding(
$alert-md-radio-label-padding-top,
$alert-md-radio-label-padding-end,
$alert-md-radio-label-padding-bottom,
$alert-md-radio-label-padding-start
);
@include padding($alert-md-radio-label-padding-top, $alert-md-radio-label-padding-end, $alert-md-radio-label-padding-bottom, $alert-md-radio-label-padding-start);
flex: 1;
@@ -208,31 +186,28 @@
background-color: $alert-md-radio-border-color-on;
}
// Material Design Alert Radio Checked
// ---------------------------------------------------
[aria-checked="true"] .alert-radio-label {
[aria-checked=true] .alert-radio-label {
color: $alert-md-radio-label-text-color-checked;
}
[aria-checked="true"] .alert-radio-icon {
[aria-checked=true] .alert-radio-icon {
border-color: $alert-md-radio-border-color-on;
}
[aria-checked="true"] .alert-radio-inner {
[aria-checked=true] .alert-radio-inner {
transform: $alert-md-radio-icon-transform-on;
}
// Material Design Alert Checkbox Label
// --------------------------------------------------
.alert-checkbox-label {
@include padding(
$alert-md-checkbox-label-padding-top,
$alert-md-checkbox-label-padding-end,
$alert-md-checkbox-label-padding-bottom,
$alert-md-checkbox-label-padding-start
);
@include padding($alert-md-checkbox-label-padding-top, $alert-md-checkbox-label-padding-end, $alert-md-checkbox-label-padding-bottom, $alert-md-checkbox-label-padding-start);
flex: 1;
@@ -245,6 +220,7 @@
font-size: $alert-md-checkbox-label-font-size;
}
// Material Design Alert Checkbox Outline: Unchecked
// --------------------------------------------------
@@ -267,13 +243,13 @@
// Material Design Alert Checkbox Checkmark: Checked
// --------------------------------------------------
[aria-checked="true"] .alert-checkbox-icon {
[aria-checked=true] .alert-checkbox-icon {
border-color: $alert-md-checkbox-border-color-on;
background-color: $alert-md-checkbox-border-color-on;
}
[aria-checked="true"] .alert-checkbox-inner {
[aria-checked=true] .alert-checkbox-inner {
@include position($alert-md-checkbox-icon-top, null, null, $alert-md-checkbox-icon-start);
position: absolute;
@@ -290,6 +266,7 @@
border-color: $alert-md-checkbox-icon-border-color;
}
// Material Design Alert Button
// --------------------------------------------------
@@ -304,18 +281,8 @@
.alert-button {
@include border-radius($alert-md-button-border-radius);
@include margin(
$alert-md-button-margin-top,
$alert-md-button-margin-end,
$alert-md-button-margin-bottom,
$alert-md-button-margin-start
);
@include padding(
$alert-md-button-padding-top,
$alert-md-button-padding-end,
$alert-md-button-padding-bottom,
$alert-md-button-padding-start
);
@include margin($alert-md-button-margin-top, $alert-md-button-margin-end, $alert-md-button-margin-bottom, $alert-md-button-margin-start);
@include padding($alert-md-button-padding-top, $alert-md-button-padding-end, $alert-md-button-padding-bottom, $alert-md-button-padding-start);
// necessary for ripple to work properly
position: relative;

View File

@@ -1,14 +1,14 @@
@import "../../themes/native/native.globals.md";
@import "../../themes/ionic.globals.md";
@import "../item/item.md.vars";
// Material Design Alert
// --------------------------------------------------
/// @prop - Font size of the alert
$alert-md-font-size: dynamic-font(14px);
$alert-md-font-size: dynamic-font(14px);
/// @prop - Max width of the alert
$alert-md-max-width: 280px;
$alert-md-max-width: 280px;
/// @prop - Max width of the alert on a tablet
/**
@@ -19,314 +19,313 @@ $alert-md-max-width: 280px;
* 3. The height can increase up to 560px.
* Source: https://m2.material.io/components/dialogs#behavior
*/
$alert-md-max-width-tablet: min(calc(100vw - 96px), 560px);
$alert-md-max-width-tablet: min(calc(100vw - 96px), 560px);
/// @prop - Max width of the alert on a tablet
$alert-md-max-height-tablet: min(calc(100vh - 96px), 560px);
$alert-md-max-height-tablet: min(calc(100vh - 96px), 560px);
/// @prop - Border radius of the alert
$alert-md-border-radius: 4px;
$alert-md-border-radius: 4px;
/// @prop - Background color of the alert
$alert-md-background-color: $overlay-md-background-color;
$alert-md-background-color: $overlay-md-background-color;
/// @prop - Box shadow color of the alert
$alert-md-box-shadow: 0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14),
0 9px 46px 8px rgba(0, 0, 0, 0.12);
$alert-md-box-shadow: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12);
/// @prop - Padding top of the alert head
$alert-md-head-padding-top: 20px;
$alert-md-head-padding-top: 20px;
/// @prop - Padding end of the alert head
$alert-md-head-padding-end: 23px;
$alert-md-head-padding-end: 23px;
/// @prop - Padding bottom of the alert head
$alert-md-head-padding-bottom: 15px;
$alert-md-head-padding-bottom: 15px;
/// @prop - Padding start of the alert head
$alert-md-head-padding-start: $alert-md-head-padding-end;
$alert-md-head-padding-start: $alert-md-head-padding-end;
/// @prop - Text align of the alert head
$alert-md-head-text-align: start;
$alert-md-head-text-align: start;
/// @prop - Color of the alert title
$alert-md-title-color: $text-color;
$alert-md-title-color: $text-color;
/// @prop - Font size of the alert title
$alert-md-title-font-size: dynamic-font(20px);
$alert-md-title-font-size: dynamic-font(20px);
/// @prop - Font weight of the alert title
$alert-md-title-font-weight: 500;
$alert-md-title-font-weight: 500;
/// @prop - Font size of the alert sub title
$alert-md-sub-title-font-size: dynamic-font(16px);
$alert-md-sub-title-font-size: dynamic-font(16px);
/// @prop - Text color of the alert sub title
$alert-md-sub-title-text-color: $text-color;
$alert-md-sub-title-text-color: $text-color;
/// @prop - Padding top of the alert message
$alert-md-message-padding-top: 20px;
$alert-md-message-padding-top: 20px;
/// @prop - Padding end of the alert message
$alert-md-message-padding-end: 24px;
$alert-md-message-padding-end: 24px;
/// @prop - Padding bottom of the alert message
$alert-md-message-padding-bottom: $alert-md-message-padding-top;
$alert-md-message-padding-bottom: $alert-md-message-padding-top;
/// @prop - Padding start of the alert message
$alert-md-message-padding-start: $alert-md-message-padding-end;
$alert-md-message-padding-start: $alert-md-message-padding-end;
/// @prop - Font size of the alert message
$alert-md-message-font-size: dynamic-font(16px);
$alert-md-message-font-size: dynamic-font(16px);
/// @prop - Text color of the alert message
$alert-md-message-text-color: $text-color-step-450;
$alert-md-message-text-color: $text-color-step-450;
/// @prop - Padding top of the alert empty message
$alert-md-message-empty-padding-top: 0;
$alert-md-message-empty-padding-top: 0;
/// @prop - Padding end of the alert empty message
$alert-md-message-empty-padding-end: $alert-md-message-empty-padding-top;
$alert-md-message-empty-padding-end: $alert-md-message-empty-padding-top;
/// @prop - Padding bottom of the alert empty message
$alert-md-message-empty-padding-bottom: $alert-md-message-empty-padding-top;
$alert-md-message-empty-padding-bottom: $alert-md-message-empty-padding-top;
/// @prop - Padding start of the alert empty message
$alert-md-message-empty-padding-start: $alert-md-message-empty-padding-end;
$alert-md-message-empty-padding-start: $alert-md-message-empty-padding-end;
/// @prop - Maximum height of the alert content
$alert-md-content-max-height: 266px;
$alert-md-content-max-height: 266px;
/// @prop - Border width of the alert input
$alert-md-input-border-width: 1px;
$alert-md-input-border-width: 1px;
/// @prop - Border style of the alert input
$alert-md-input-border-style: solid;
$alert-md-input-border-style: solid;
/// @prop - Border color of the alert input
$alert-md-input-border-color: $background-color-step-150;
$alert-md-input-border-color: $background-color-step-150;
/// @prop - Text color of the alert input
$alert-md-input-text-color: $text-color;
$alert-md-input-text-color: $text-color;
/// @prop - Border width of the alert input when focused
$alert-md-input-border-width-focused: 2px;
$alert-md-input-border-width-focused: 2px;
/// @prop - Border style of the alert input when focused
$alert-md-input-border-style-focused: $alert-md-input-border-style;
$alert-md-input-border-style-focused: $alert-md-input-border-style;
/// @prop - Border color of the alert input when focused
$alert-md-input-border-color-focused: ion-color(primary, base);
$alert-md-input-border-color-focused: ion-color(primary, base);
/// @prop - Margin top of the alert input
$alert-md-input-margin-top: 5px;
$alert-md-input-margin-top: 5px;
/// @prop - Margin end of the alert input
$alert-md-input-margin-end: 0;
$alert-md-input-margin-end: 0;
/// @prop - Margin bottom of the alert input
$alert-md-input-margin-bottom: 5px;
$alert-md-input-margin-bottom: 5px;
/// @prop - Margin start of the alert input
$alert-md-input-margin-start: 0;
$alert-md-input-margin-start: 0;
/// @prop - Placeholder Color for input
$alert-md-input-placeholder-color: $placeholder-text-color;
$alert-md-input-placeholder-color: $placeholder-text-color;
/// @prop - Flex wrap of the alert button group
$alert-md-button-group-flex-wrap: wrap-reverse;
$alert-md-button-group-flex-wrap: wrap-reverse;
/// @prop - Justify content of the alert button group
$alert-md-button-group-justify-content: flex-end;
$alert-md-button-group-justify-content: flex-end;
/// @prop - Padding top of the alert button
$alert-md-button-padding-top: 10px;
$alert-md-button-padding-top: 10px;
/// @prop - Padding end of the alert button
$alert-md-button-padding-end: $alert-md-button-padding-top;
$alert-md-button-padding-end: $alert-md-button-padding-top;
/// @prop - Padding bottom of the alert button
$alert-md-button-padding-bottom: $alert-md-button-padding-top;
$alert-md-button-padding-bottom: $alert-md-button-padding-top;
/// @prop - Padding start of the alert button
$alert-md-button-padding-start: $alert-md-button-padding-end;
$alert-md-button-padding-start: $alert-md-button-padding-end;
/// @prop - Margin top of the alert button
$alert-md-button-margin-top: 0;
$alert-md-button-margin-top: 0;
/// @prop - Margin end of the alert button
$alert-md-button-margin-end: 8px;
$alert-md-button-margin-end: 8px;
/// @prop - Margin bottom of the alert button
$alert-md-button-margin-bottom: 0;
$alert-md-button-margin-bottom: 0;
/// @prop - Margin start of the alert button
$alert-md-button-margin-start: 0;
$alert-md-button-margin-start: 0;
/// @prop - Font weight of the alert button
$alert-md-button-font-weight: 500;
$alert-md-button-font-weight: 500;
/// @prop - Text color of the alert button
$alert-md-button-text-color: ion-color(primary, base);
$alert-md-button-text-color: ion-color(primary, base);
/// @prop - Background color of the alert button
$alert-md-button-background-color: transparent;
$alert-md-button-background-color: transparent;
/// @prop - Border radius of the alert button
$alert-md-button-border-radius: 2px;
$alert-md-button-border-radius: 2px;
/// @prop - Text transform of the alert button
$alert-md-button-text-transform: uppercase;
$alert-md-button-text-transform: uppercase;
/// @prop - Text align of the alert button
$alert-md-button-text-align: end;
$alert-md-button-text-align: end;
/// @prop - Border top of the alert list
$alert-md-list-border-top: 1px solid $alert-md-input-border-color;
$alert-md-list-border-top: 1px solid $alert-md-input-border-color;
/// @prop - Border bottom of the alert list
$alert-md-list-border-bottom: $alert-md-list-border-top;
$alert-md-list-border-bottom: $alert-md-list-border-top;
/// @prop - Top of the alert radio
$alert-md-radio-top: 0;
$alert-md-radio-top: 0;
/// @prop - Left of the alert radio
$alert-md-radio-left: 26px;
$alert-md-radio-left: 26px;
/// @prop - Width of the alert radio
$alert-md-radio-width: 20px;
$alert-md-radio-width: 20px;
/// @prop - Height of the alert radio
$alert-md-radio-height: $alert-md-radio-width;
$alert-md-radio-height: $alert-md-radio-width;
/// @prop - Border width of the alert radio
$alert-md-radio-border-width: 2px;
$alert-md-radio-border-width: 2px;
/// @prop - Border style of the alert radio
$alert-md-radio-border-style: solid;
$alert-md-radio-border-style: solid;
/// @prop - Border radius of the alert radio
$alert-md-radio-border-radius: 50%;
$alert-md-radio-border-radius: 50%;
/// @prop - Border color of the alert radio when off
$alert-md-radio-border-color-off: $background-color-step-550;
$alert-md-radio-border-color-off: $background-color-step-550;
/// @prop - Border color of the alert radio when on
$alert-md-radio-border-color-on: $alert-md-button-text-color;
$alert-md-radio-border-color-on: $alert-md-button-text-color;
/// @prop - Width of the icon in the alert radio
$alert-md-radio-icon-width: $alert-md-radio-width * 0.5;
$alert-md-radio-icon-width: $alert-md-radio-width * 0.5;
/// @prop - Height of the icon in the alert radio
$alert-md-radio-icon-height: $alert-md-radio-icon-width;
$alert-md-radio-icon-height: $alert-md-radio-icon-width;
/// @prop - Top of the icon in the alert radio
$alert-md-radio-icon-top: ($alert-md-radio-width - $alert-md-radio-icon-width - $alert-md-radio-border-width * 2) * 0.5;
$alert-md-radio-icon-top: ($alert-md-radio-width - $alert-md-radio-icon-width - $alert-md-radio-border-width * 2) * 0.5;
/// @prop - Start of the icon in the radio alert
$alert-md-radio-icon-start: $alert-md-radio-icon-top;
$alert-md-radio-icon-start: $alert-md-radio-icon-top;
/// @prop - Border radius of the icon in the alert radio
$alert-md-radio-icon-border-radius: $alert-md-radio-border-radius;
$alert-md-radio-icon-border-radius: $alert-md-radio-border-radius;
/// @prop - Transform of the icon in the alert radio when off
$alert-md-radio-icon-transform-off: scale3d(0, 0, 0);
$alert-md-radio-icon-transform-off: scale3d(0, 0, 0);
/// @prop - Transform of the icon in the alert radio when on
$alert-md-radio-icon-transform-on: scale3d(1, 1, 1);
$alert-md-radio-icon-transform-on: scale3d(1, 1, 1);
/// @prop - Transition of the icon in the alert radio
$alert-md-radio-icon-transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
$alert-md-radio-icon-transition: transform 280ms cubic-bezier(.4, 0, .2, 1);
/// @prop - Padding top on the label for the radio alert
$alert-md-radio-label-padding-top: 13px;
$alert-md-radio-label-padding-top: 13px;
/// @prop - Padding end on the label for the radio alert
$alert-md-radio-label-padding-end: 26px;
$alert-md-radio-label-padding-end: 26px;
/// @prop - Padding bottom on the label for the radio alert
$alert-md-radio-label-padding-bottom: $alert-md-radio-label-padding-top;
$alert-md-radio-label-padding-bottom: $alert-md-radio-label-padding-top;
/// @prop - Padding start on the label for the radio alert
$alert-md-radio-label-padding-start: $alert-md-radio-label-padding-end + 26px;
$alert-md-radio-label-padding-start: $alert-md-radio-label-padding-end + 26px;
/// @prop - Font size of the label for the radio alert
$alert-md-radio-label-font-size: dynamic-font(16px);
$alert-md-radio-label-font-size: dynamic-font(16px);
/// @prop - Text color of the label for the radio alert
$alert-md-radio-label-text-color: $text-color-step-150;
$alert-md-radio-label-text-color: $text-color-step-150;
/// @prop - Text color of the label for the checked radio alert
$alert-md-radio-label-text-color-checked: $alert-md-radio-label-text-color;
$alert-md-radio-label-text-color-checked: $alert-md-radio-label-text-color;
/// @prop - Top of the checkbox in the alert
$alert-md-checkbox-top: 0;
$alert-md-checkbox-top: 0;
/// @prop - Left of the checkbox in the alert
$alert-md-checkbox-left: 26px;
$alert-md-checkbox-left: 26px;
/// @prop - Width of the checkbox in the alert
$alert-md-checkbox-width: 16px;
$alert-md-checkbox-width: 16px;
/// @prop - Height of the checkbox in the alert
$alert-md-checkbox-height: 16px;
$alert-md-checkbox-height: 16px;
/// @prop - Border width of the checkbox in the alert
$alert-md-checkbox-border-width: 2px;
$alert-md-checkbox-border-width: 2px;
/// @prop - Border style of the checkbox in the alert
$alert-md-checkbox-border-style: solid;
$alert-md-checkbox-border-style: solid;
/// @prop - Border radius of the checkbox in the alert
$alert-md-checkbox-border-radius: 2px;
$alert-md-checkbox-border-radius: 2px;
/// @prop - Border color of the checkbox in the alert when off
$alert-md-checkbox-border-color-off: $background-color-step-550;
$alert-md-checkbox-border-color-off: $background-color-step-550;
/// @prop - Border color of the checkbox in the alert when on
$alert-md-checkbox-border-color-on: $alert-md-button-text-color;
$alert-md-checkbox-border-color-on: $alert-md-button-text-color;
/// @prop - Top of the icon in the checkbox alert
$alert-md-checkbox-icon-top: 0;
$alert-md-checkbox-icon-top: 0;
/// @prop - Start of the icon in the checkbox alert
$alert-md-checkbox-icon-start: 3px;
$alert-md-checkbox-icon-start: 3px;
/// @prop - Width of the icon in the checkbox alert
$alert-md-checkbox-icon-width: 6px;
$alert-md-checkbox-icon-width: 6px;
/// @prop - Height of the icon in the checkbox alert
$alert-md-checkbox-icon-height: 10px;
$alert-md-checkbox-icon-height: 10px;
/// @prop - Border width of the icon in the checkbox alert
$alert-md-checkbox-icon-border-width: 2px;
$alert-md-checkbox-icon-border-width: 2px;
/// @prop - Border style of the icon in the checkbox alert
$alert-md-checkbox-icon-border-style: solid;
$alert-md-checkbox-icon-border-style: solid;
/// @prop - Border color of the icon in the checkbox alert
$alert-md-checkbox-icon-border-color: ion-color(primary, contrast);
$alert-md-checkbox-icon-border-color: ion-color(primary, contrast);
/// @prop - Transform of the icon in the checkbox alert
$alert-md-checkbox-icon-transform: rotate(45deg);
$alert-md-checkbox-icon-transform: rotate(45deg);
/// @prop - Padding top of the label for the checkbox in the alert
$alert-md-checkbox-label-padding-top: 13px;
$alert-md-checkbox-label-padding-top: 13px;
/// @prop - Padding end of the label for the checkbox in the alert
$alert-md-checkbox-label-padding-end: $alert-md-checkbox-left;
$alert-md-checkbox-label-padding-end: $alert-md-checkbox-left;
/// @prop - Padding bottom of the label for the checkbox in the alert
$alert-md-checkbox-label-padding-bottom: $alert-md-checkbox-label-padding-top;
$alert-md-checkbox-label-padding-bottom: $alert-md-checkbox-label-padding-top;
/// @prop - Padding start of the label for the checkbox in the alert
$alert-md-checkbox-label-padding-start: $alert-md-checkbox-label-padding-end + 27px;
$alert-md-checkbox-label-padding-start: $alert-md-checkbox-label-padding-end + 27px;
/// @prop - Text color of the label for the checkbox in the alert
$alert-md-checkbox-label-text-color: $text-color-step-150;
$alert-md-checkbox-label-text-color: $text-color-step-150;
/// @prop - Font size of the label for the checkbox in the alert
$alert-md-checkbox-label-font-size: dynamic-font(16px);
$alert-md-checkbox-label-font-size: dynamic-font(16px);
/// @prop - Height of the tappable inputs in the checkbox alert
$alert-md-tappable-height: $item-md-min-height;
$alert-md-tappable-height: $item-md-min-height;

View File

@@ -198,13 +198,14 @@
min-height: inherit;
}
// Alert Button: Disabled
// --------------------------------------------------
.alert-input-disabled,
.alert-checkbox-button-disabled .alert-button-inner,
.alert-radio-button-disabled .alert-button-inner {
cursor: default;
opacity: 0.5;
opacity: .5;
pointer-events: none;
}

View File

@@ -21,7 +21,7 @@ import { sanitizeDOMString } from '@utils/sanitization';
import { getClassMap } from '@utils/theme';
import { config } from '../../global/config';
import { getIonMode, getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
import type { AnimationBuilder, CssClassMap, OverlayInterface, FrameworkDelegate } from '../../interface';
import type { OverlayEventDetail } from '../../utils/overlays-interface';
import type { IonicSafeString } from '../../utils/sanitization';
@@ -35,15 +35,13 @@ import { mdLeaveAnimation } from './animations/md.leave';
// TODO(FW-2832): types
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*/
@Component({
tag: 'ion-alert',
styleUrls: {
ios: 'alert.ios.scss',
md: 'alert.md.scss',
ionic: 'alert.md.scss',
},
scoped: true,
})
@@ -137,7 +135,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
/**
* If `true`, the alert will be translucent.
* Only applies when the theme is `"ios"` and the device supports
* Only applies when the mode is `"ios"` and the device supports
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
*/
@Prop() translucent = false;
@@ -343,7 +341,9 @@ export class Alert implements ComponentInterface, OverlayInterface {
}
componentWillLoad() {
setOverlayId(this.el);
if (!this.htmlAttributes?.id) {
setOverlayId(this.el);
}
this.inputsChanged();
this.buttonsChanged();
}
@@ -535,7 +535,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
private renderCheckbox() {
const inputs = this.processedInputs;
const theme = getIonTheme(this);
const mode = getIonMode(this);
if (inputs.length === 0) {
return null;
@@ -567,7 +567,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
</div>
<div class="alert-checkbox-label">{i.label}</div>
</div>
{theme === 'md' && <ion-ripple-effect></ion-ripple-effect>}
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
</button>
))}
</div>
@@ -684,7 +684,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
private renderAlertButtons() {
const buttons = this.processedButtons;
const theme = getIonTheme(this);
const mode = getIonMode(this);
const alertButtonGroupClass = {
'alert-button-group': true,
'alert-button-group-vertical': buttons.length > 2,
@@ -701,7 +701,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
onClick={() => this.buttonClick(button)}
>
<span class="alert-button-inner">{button.text}</span>
{theme === 'md' && <ion-ripple-effect></ion-ripple-effect>}
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
</button>
))}
</div>
@@ -723,7 +723,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
render() {
const { overlayIndex, header, subHeader, message, htmlAttributes } = this;
const theme = getIonTheme(this);
const mode = getIonMode(this);
const hdrId = `alert-${overlayIndex}-hdr`;
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
const msgId = `alert-${overlayIndex}-msg`;
@@ -748,7 +748,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
}}
class={{
...getClassMap(this.cssClass),
[theme]: true,
[mode]: true,
'overlay-hidden': true,
'alert-translucent': this.translucent,
}}

View File

@@ -1,19 +1,19 @@
@import "../../themes/native/native.globals";
@import "../../themes/ionic.globals";
// Alert
// --------------------------------------------------
/// @prop - Minimum width of the alert
$alert-min-width: 250px;
$alert-min-width: 250px;
/// @prop - Maximum height of the alert
$alert-max-height: 90%;
$alert-max-height: 90%;
/// @prop - Line height of the alert button
$alert-button-line-height: dynamic-font(20px);
$alert-button-line-height: dynamic-font(20px);
/// @prop - Font size of the alert button
$alert-button-font-size: dynamic-font(14px);
$alert-button-font-size: dynamic-font(14px);
/// @prop - Minimum height of a textarea in the alert
$alert-input-min-height: 37px;
$alert-input-min-height: 37px;

View File

@@ -2,6 +2,7 @@ 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 () => {
@@ -38,4 +39,15 @@ 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,3 +1,4 @@
html.plt-mobile ion-app {
user-select: none;
}

View File

@@ -6,12 +6,8 @@ import { printIonWarning } from '@utils/logging';
import { isPlatform } from '@utils/platform';
import { config } from '../../global/config';
import { getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
*/
@Component({
tag: 'ion-app',
styleUrl: 'app.scss',
@@ -82,11 +78,11 @@ export class App implements ComponentInterface {
}
render() {
const theme = getIonTheme(this);
const mode = getIonMode(this);
return (
<Host
class={{
[theme]: true,
[mode]: true,
'ion-page': true,
'force-statusbar-padding': config.getBoolean('_forceStatusbarPadding'),
}}

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -1,6 +1,7 @@
@import "./avatar";
@import "./avatar.ios.vars";
// iOS Avatar
// --------------------------------------------------

View File

@@ -1,13 +1,14 @@
@import "../../themes/native/native.globals.ios";
@import "../../themes/ionic.globals.ios";
// iOS Avatar
// --------------------------------------------------
/// @prop - Width of the avatar
$avatar-ios-width: 48px;
$avatar-ios-width: 48px;
/// @prop - Height of the avatar
$avatar-ios-height: $avatar-ios-width;
$avatar-ios-height: $avatar-ios-width;
/// @prop - Border radius of the avatar
$avatar-ios-border-radius: 50%;
$avatar-ios-border-radius: 50%;

View File

@@ -1,6 +1,7 @@
@import "./avatar";
@import "./avatar.md.vars";
// Material Design Avatar
// --------------------------------------------------

View File

@@ -1,13 +1,14 @@
@import "../../themes/native/native.globals.md";
@import "../../themes/ionic.globals.md";
// Material Design Avatar
// --------------------------------------------------
/// @prop - Width of the avatar
$avatar-md-width: 64px;
$avatar-md-width: 64px;
/// @prop - Height of the avatar
$avatar-md-height: $avatar-md-width;
$avatar-md-height: $avatar-md-width;
/// @prop - Border radius of the avatar
$avatar-md-border-radius: 50%;
$avatar-md-border-radius: 50%;

View File

@@ -1,4 +1,5 @@
@import "../../themes/native/native.globals";
@import "../../themes/ionic.globals";
// Avatar
// --------------------------------------------------

View File

@@ -1,30 +1,20 @@
import type { ComponentInterface } from '@stencil/core';
import { Component, Host, h } from '@stencil/core';
import { getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
*/
@Component({
tag: 'ion-avatar',
styleUrls: {
ios: 'avatar.ios.scss',
md: 'avatar.md.scss',
ionic: 'avatar.md.scss',
},
shadow: true,
})
export class Avatar implements ComponentInterface {
render() {
const theme = getIonTheme(this);
return (
<Host
class={{
[theme]: true,
}}
>
<Host class={getIonMode(this)}>
<slot></slot>
</Host>
);

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -8,7 +8,7 @@
--background-hover: transparent;
--background-hover-opacity: 1;
--background-focused: currentColor;
--background-focused-opacity: 0.1;
--background-focused-opacity: .1;
--border-radius: 4px;
--color: #{$back-button-ios-color};
--icon-margin-end: 1px;
@@ -46,11 +46,11 @@
// --------------------------------------------------
:host(.ion-activated) .button-native {
opacity: 0.4;
opacity: .4;
}
@media (any-hover: hover) {
:host(:hover) {
opacity: 0.6;
opacity: .6;
}
}

View File

@@ -1,10 +1,10 @@
@import "../../themes/native/native.globals.ios";
@import "../../themes/ionic.globals.ios";
// iOS Back Button
// --------------------------------------------------
/// @prop - Z index of the back button
$back-button-ios-button-z-index: $z-index-toolbar-buttons;
$back-button-ios-button-z-index: $z-index-toolbar-buttons;
/// @prop - Text color of the back button
$back-button-ios-color: ion-color(primary, base);
$back-button-ios-color: ion-color(primary, base);

View File

@@ -7,7 +7,7 @@
:host {
--border-radius: 4px;
--background-focused: currentColor;
--background-focused-opacity: 0.12;
--background-focused-opacity: .12;
--background-hover: currentColor;
--background-hover-opacity: 0.04;
--color: #{$back-button-md-color};
@@ -49,11 +49,12 @@
}
ion-icon {
line-height: 0.67;
line-height: .67;
text-align: start;
}
// Back Button Color: Hover
// --------------------------------------------------
@@ -63,6 +64,7 @@ ion-icon {
}
}
// Back Button Color: Focused
// --------------------------------------------------

View File

@@ -1,7 +1,7 @@
@import "../../themes/native/native.globals.md";
@import "../../themes/ionic.globals.md";
// Material Design Back Button
// --------------------------------------------------
/// @prop - Text color of the back button
$back-button-md-color: currentColor;
$back-button-md-color: currentColor;

View File

@@ -1,10 +1,10 @@
@import "../../themes/native/native.globals";
@import "../../themes/ionic.globals";
// Back Button
// --------------------------------------------------
:host {
/**
/**
* @prop --background: Background of the button
* @prop --background-focused: Background of the button when focused with the tab key
* @prop --background-focused-opacity: Opacity of the button background when focused with the tab key
@@ -99,6 +99,7 @@ ion-ripple-effect {
color: var(--ripple-color);
}
// Back Button with Color
// --------------------------------------------------
@@ -106,6 +107,7 @@ ion-ripple-effect {
color: current-color(base);
}
// Back Button States
// --------------------------------------------------
@@ -115,7 +117,7 @@ ion-ripple-effect {
:host(.back-button-disabled) {
cursor: default;
opacity: 0.5;
opacity: .5;
pointer-events: none;
}
@@ -172,16 +174,12 @@ ion-ripple-effect {
z-index: 1;
}
// Back Button Icon
// --------------------------------------------------
ion-icon {
@include padding(
var(--icon-padding-top),
var(--icon-padding-end),
var(--icon-padding-bottom),
var(--icon-padding-start)
);
@include padding(var(--icon-padding-top), var(--icon-padding-end), var(--icon-padding-bottom), var(--icon-padding-start));
@include margin(var(--icon-margin-top), var(--icon-margin-end), var(--icon-margin-bottom), var(--icon-margin-start));
display: inherit;
@@ -192,6 +190,7 @@ ion-icon {
pointer-events: none;
}
// Back Button: Focused
// --------------------------------------------------
@@ -205,6 +204,7 @@ ion-icon {
}
}
// Back Button: Hover
// --------------------------------------------------
@@ -224,6 +224,7 @@ ion-icon {
}
}
// Back Button Color: Focused
// --------------------------------------------------
@@ -231,6 +232,7 @@ ion-icon {
color: #{current-color(base)};
}
// Back Button Color: Hover
// --------------------------------------------------
@@ -240,6 +242,7 @@ ion-icon {
}
}
// Back Button in Toolbar: Global Theming
// --------------------------------------------------

View File

@@ -7,12 +7,11 @@ import { createColorClasses, hostContext, openURL } from '@utils/theme';
import { arrowBackSharp, chevronBack } from 'ionicons/icons';
import { config } from '../../global/config';
import { getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
import type { AnimationBuilder, Color } from '../../interface';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*
* @part native - The native HTML button element that wraps all child elements.
* @part icon - The back button icon (uses ion-icon).
@@ -23,7 +22,6 @@ import type { AnimationBuilder, Color } from '../../interface';
styleUrls: {
ios: 'back-button.ios.scss',
md: 'back-button.md.scss',
ionic: 'back-button.md.scss',
},
shadow: true,
})
@@ -82,11 +80,11 @@ export class BackButton implements ComponentInterface, ButtonInterface {
get backButtonIcon() {
const icon = this.icon;
if (icon != null) {
// Icon is set on the component or by the config.
// icon is set on the component or by the config
return icon;
}
if (getIonTheme(this) === 'ios') {
if (getIonMode(this) === 'ios') {
// default ios back button icon
return config.get('backButtonIcon', chevronBack);
}
@@ -96,7 +94,7 @@ export class BackButton implements ComponentInterface, ButtonInterface {
}
get backButtonText() {
const defaultBackButtonText = getIonTheme(this) === 'ios' ? 'Back' : null;
const defaultBackButtonText = getIonMode(this) === 'ios' ? 'Back' : null;
return this.text != null ? this.text : config.get('backButtonText', defaultBackButtonText);
}
@@ -137,14 +135,14 @@ export class BackButton implements ComponentInterface, ButtonInterface {
inheritedAttributes,
} = this;
const showBackButton = defaultHref !== undefined;
const theme = getIonTheme(this);
const mode = getIonMode(this);
const ariaLabel = inheritedAttributes['aria-label'] || backButtonText || 'back';
return (
<Host
onClick={this.onClick}
class={createColorClasses(color, {
[theme]: true,
[mode]: true,
button: true, // ion-buttons target .button
'back-button-disabled': disabled,
'back-button-has-icon-only': hasIconOnly,
@@ -172,7 +170,7 @@ export class BackButton implements ComponentInterface, ButtonInterface {
</span>
)}
</span>
{theme === 'md' && <ion-ripple-effect type={this.rippleType}></ion-ripple-effect>}
{mode === 'md' && <ion-ripple-effect type={this.rippleType}></ion-ripple-effect>}
</button>
</Host>
);

View File

@@ -1 +1 @@
@import "../../themes/native/native.globals.ios";
@import "../../themes/ionic.globals.ios";

View File

@@ -1 +1 @@
@import "../../themes/native/native.globals.md";
@import "../../themes/ionic.globals.md";

View File

@@ -13,11 +13,12 @@
contain: strict;
cursor: pointer;
opacity: 0.01;
opacity: .01;
touch-action: none;
z-index: $z-index-backdrop;
}
:host(.backdrop-hide) {
background: transparent;
}
@@ -25,3 +26,4 @@
:host(.backdrop-no-tappable) {
cursor: auto;
}

View File

@@ -1,18 +1,13 @@
import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Component, Event, Host, Listen, Prop, h } from '@stencil/core';
import { getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
*/
@Component({
tag: 'ion-backdrop',
styleUrls: {
ios: 'backdrop.ios.scss',
md: 'backdrop.md.scss',
ionic: 'backdrop.md.scss',
},
shadow: true,
})
@@ -53,13 +48,13 @@ export class Backdrop implements ComponentInterface {
}
render() {
const theme = getIonTheme(this);
const mode = getIonMode(this);
return (
<Host
tabindex="-1"
aria-hidden="true"
class={{
[theme]: true,
[mode]: true,
'backdrop-hide': !this.visible,
'backdrop-no-tappable': !this.tappable,
}}

View File

@@ -1 +1 @@
@import "../../themes/native/native.globals";
@import "../../themes/ionic.globals";

View File

@@ -1,7 +1,7 @@
@import "../../themes/native/native.globals.ios";
@import "../../themes/ionic.globals.ios";
// iOS Badge
// --------------------------------------------------
/// @prop - Border radius of the badge
$badge-ios-border-radius: 10px;
$badge-ios-border-radius: 10px;

View File

@@ -1,7 +1,7 @@
@import "../../themes/native/native.globals.md";
@import "../../themes/ionic.globals.md";
// Material Design Badge
// --------------------------------------------------
/// @prop - Border radius of the badge
$badge-md-border-radius: 4px;
$badge-md-border-radius: 4px;

View File

@@ -2,19 +2,17 @@ import type { ComponentInterface } from '@stencil/core';
import { Component, Host, Prop, h } from '@stencil/core';
import { createColorClasses } from '@utils/theme';
import { getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
import type { Color } from '../../interface';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*/
@Component({
tag: 'ion-badge',
styleUrls: {
ios: 'badge.ios.scss',
md: 'badge.md.scss',
ionic: 'badge.md.scss',
},
shadow: true,
})
@@ -27,11 +25,11 @@ export class Badge implements ComponentInterface {
@Prop({ reflect: true }) color?: Color;
render() {
const theme = getIonTheme(this);
const mode = getIonMode(this);
return (
<Host
class={createColorClasses(this.color, {
[theme]: true,
[mode]: true,
})}
>
<slot></slot>

View File

@@ -1,28 +1,28 @@
@import "../../themes/native/native.globals";
@import "../../themes/ionic.globals";
// Badge
// --------------------------------------------------
/// @prop - Padding top of the badge
$badge-padding-top: 3px;
$badge-padding-top: 3px;
/// @prop - Padding end of the badge
$badge-padding-end: 8px;
$badge-padding-end: 8px;
/// @prop - Padding bottom of the badge
$badge-padding-bottom: $badge-padding-top;
$badge-padding-bottom: $badge-padding-top;
/// @prop - Padding start of the badge
$badge-padding-start: $badge-padding-end;
$badge-padding-start: $badge-padding-end;
/// @prop - Minimum width of the badge
$badge-min-width: 10px;
$badge-min-width: 10px;
/// @prop - Baseline font size of the badge
$badge-baseline-font-size: 13px;
/// @prop - Font size of the badge
$badge-font-size: dynamic-font($badge-baseline-font-size);
$badge-font-size: dynamic-font($badge-baseline-font-size);
/// @prop - Font weight of the badge
$badge-font-weight: bold;
$badge-font-weight: bold;

View File

@@ -31,6 +31,7 @@
border: 1px solid transparent;
}
// Breadcrumb: Focused
// ------------------------------------------
@@ -40,7 +41,7 @@
:host(.in-breadcrumbs-color.ion-focused) .breadcrumb-native,
:host(.ion-color.ion-focused) .breadcrumb-native {
background: #{current-color(base, 0.1)};
background: #{current-color(base, .1)};
color: #{current-color(base)};
}
@@ -50,6 +51,7 @@
color: $breadcrumb-ios-icon-color-focused;
}
// Breadcrumb Separator
// ------------------------------------------
@@ -57,6 +59,7 @@
color: $breadcrumb-ios-separator-color;
}
// Breadcrumb Slotted Icons
// ------------------------------------------
@@ -78,6 +81,7 @@
color: $breadcrumb-ios-icon-color-active;
}
// Breadcrumbs Collapsed Indicator
// --------------------------------------------------

View File

@@ -1,37 +1,34 @@
@import "../../themes/native/native.globals.ios";
@import "../../themes/ionic.globals.ios";
// iOS Breadcrumb
// --------------------------------------------------
/// @prop - Color of the breadcrumb
$breadcrumb-ios-color: var(--ion-color-step-850, var(--ion-text-color-step-150, #2d4665));
$breadcrumb-ios-color: var(--ion-color-step-850, var(--ion-text-color-step-150, #2d4665));
/// @prop - Color of the active breadcrumb
$breadcrumb-ios-color-active: var(--ion-text-color, #03060b);
$breadcrumb-ios-color-active: var(--ion-text-color, #03060b);
/// @prop - Background color of the focused breadcrumb
$breadcrumb-ios-background-focused: var(
--ion-color-step-50,
var(--ion-background-color-step-50, rgba(233, 237, 243, 0.7))
);
$breadcrumb-ios-background-focused: var(--ion-color-step-50, var(--ion-background-color-step-50, rgba(233, 237, 243, 0.7)));
/// @prop - Color of the breadcrumb icon
$breadcrumb-ios-icon-color: var(--ion-color-step-400, var(--ion-text-color-step-600, #92a0b3));
$breadcrumb-ios-icon-color: var(--ion-color-step-400, var(--ion-text-color-step-600, #92a0b3));
/// @prop - Color of the breadcrumb icon when active
$breadcrumb-ios-icon-color-active: var(--ion-color-step-850, var(--ion-text-color-step-150, #242d39));
$breadcrumb-ios-icon-color-active: var(--ion-color-step-850, var(--ion-text-color-step-150, #242d39));
/// @prop - Color of the breadcrumb icon when focused
$breadcrumb-ios-icon-color-focused: var(--ion-color-step-750, var(--ion-text-color-step-250, #445b78));
$breadcrumb-ios-icon-color-focused: var(--ion-color-step-750, var(--ion-text-color-step-250, #445b78));
/// @prop - Color of the breadcrumb separator
$breadcrumb-ios-separator-color: $breadcrumb-separator-color;
$breadcrumb-ios-separator-color: $breadcrumb-separator-color;
/// @prop - Color of the breadcrumb indicator
$breadcrumb-ios-indicator-color: $breadcrumb-ios-separator-color;
$breadcrumb-ios-indicator-color: $breadcrumb-ios-separator-color;
/// @prop - Background color of the breadcrumb indicator
$breadcrumb-ios-indicator-background: var(--ion-color-step-100, var(--ion-background-color-step-100, #e9edf3));
$breadcrumb-ios-indicator-background: var(--ion-color-step-100, var(--ion-background-color-step-100, #e9edf3));
/// @prop - Background color of the breadcrumb indicator when focused
$breadcrumb-ios-indicator-background-focused: var(--ion-color-step-150, var(--ion-background-color-step-150, #d9e0ea));
$breadcrumb-ios-indicator-background-focused: var(--ion-color-step-150, var(--ion-background-color-step-150, #d9e0ea));

View File

@@ -20,18 +20,15 @@
@include padding(6px, 12px, 6px, 12px);
}
// Breadcrumb Separator
// ------------------------------------------
.breadcrumb-separator {
@include margin(
$breadcrumb-md-separator-margin-top,
$breadcrumb-md-separator-margin-end,
$breadcrumb-md-separator-margin-bottom,
$breadcrumb-md-separator-margin-start
);
@include margin($breadcrumb-md-separator-margin-top, $breadcrumb-md-separator-margin-end, $breadcrumb-md-separator-margin-bottom, $breadcrumb-md-separator-margin-start);
}
// Breadcrumb: Focused
// ------------------------------------------
@@ -41,6 +38,7 @@
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2), 0px 2px 8px rgba(0, 0, 0, 0.12);
}
// Breadcrumb Separator
// ------------------------------------------
@@ -48,6 +46,7 @@
color: $breadcrumb-md-separator-color;
}
// Breadcrumb Slotted Icons
// ------------------------------------------
@@ -69,6 +68,7 @@
color: $breadcrumb-md-icon-color-active;
}
// Breadcrumbs Collapsed Indicator
// --------------------------------------------------

View File

@@ -1,46 +1,46 @@
@import "../../themes/native/native.globals.md";
@import "../../themes/ionic.globals.md";
// Material Design Breadcrumb
// --------------------------------------------------
/// @prop - Color of the breadcrumb
$breadcrumb-md-color: var(--ion-color-step-600, var(--ion-text-color-step-400, #677483));
$breadcrumb-md-color: var(--ion-color-step-600, var(--ion-text-color-step-400, #677483));
/// @prop - Color of the active breadcrumb
$breadcrumb-md-color-active: var(--ion-text-color, #03060b);
$breadcrumb-md-color-active: var(--ion-text-color, #03060b);
/// @prop - Color of the focused breadcrumb
$breadcrumb-md-color-focused: var(--ion-color-step-800, var(--ion-text-color-step-200, #35404e));
$breadcrumb-md-color-focused: var(--ion-color-step-800, var(--ion-text-color-step-200, #35404e));
/// @prop - Background color of the focused breadcrumb
$breadcrumb-md-background-focused: var(--ion-color-step-50, var(--ion-background-color-step-50, #fff));
$breadcrumb-md-background-focused: var(--ion-color-step-50, var(--ion-background-color-step-50, #fff));
/// @prop - Color of the breadcrumb icon
$breadcrumb-md-icon-color: var(--ion-color-step-550, var(--ion-text-color-step-450, #7d8894));
$breadcrumb-md-icon-color: var(--ion-color-step-550, var(--ion-text-color-step-450, #7d8894));
/// @prop - Color of the breadcrumb icon when active
$breadcrumb-md-icon-color-active: var(--ion-color-step-850, var(--ion-text-color-step-150, #222d3a));
$breadcrumb-md-icon-color-active: var(--ion-color-step-850, var(--ion-text-color-step-150, #222d3a));
/// @prop - Margin top of the breadcrumb separator
$breadcrumb-md-separator-margin-top: -1px;
$breadcrumb-md-separator-margin-top: -1px;
/// @prop - Margin end of the breadcrumb separator
$breadcrumb-md-separator-margin-end: 10px;
$breadcrumb-md-separator-margin-end: 10px;
/// @prop - Margin bottom of the breadcrumb separator
$breadcrumb-md-separator-margin-bottom: null;
$breadcrumb-md-separator-margin-bottom: null;
/// @prop - Margin start of the breadcrumb separator
$breadcrumb-md-separator-margin-start: 10px;
$breadcrumb-md-separator-margin-start: 10px;
/// @prop - Color of the breadcrumb separator
$breadcrumb-md-separator-color: $breadcrumb-separator-color;
$breadcrumb-md-separator-color: $breadcrumb-separator-color;
/// @prop - Color of the breadcrumb indicator
$breadcrumb-md-indicator-color: $breadcrumb-md-separator-color;
$breadcrumb-md-indicator-color: $breadcrumb-md-separator-color;
/// @prop - Background color of the breadcrumb indicator
$breadcrumb-md-indicator-background: var(--ion-color-step-100, var(--ion-background-color-step-100, #eef1f3));
$breadcrumb-md-indicator-background: var(--ion-color-step-100, var(--ion-background-color-step-100, #eef1f3));
/// @prop - Background color of the breadcrumb indicator when focused
$breadcrumb-md-indicator-background-focused: var(--ion-color-step-150, var(--ion-background-color-step-150, #dfe5e8));
$breadcrumb-md-indicator-background-focused: var(--ion-color-step-150, var(--ion-background-color-step-150, #dfe5e8));

View File

@@ -4,7 +4,7 @@
// --------------------------------------------------
:host {
/**
/**
* @prop --color: Text color of the breadcrumb
* @prop --color-active: Text color of the active breadcrumb
* @prop --color-hover: Text color of the breadcrumb on hover
@@ -43,10 +43,11 @@
:host(.breadcrumb-disabled) {
cursor: default;
opacity: 0.5;
opacity: .5;
pointer-events: none;
}
// Breadcrumb: Active
// ------------------------------------------
@@ -54,6 +55,7 @@
color: var(--color-active);
}
// Breadcrumb: Focused
// ------------------------------------------
@@ -65,6 +67,7 @@
background: var(--background-focused);
}
// Breadcrumb: Hover
// ------------------------------------------
@@ -79,6 +82,7 @@
}
}
// Breadcrumb Separator
// ------------------------------------------
@@ -86,6 +90,7 @@
display: inline-flex;
}
// Breadcrumb: Collapsed
// ------------------------------------------
@@ -93,6 +98,7 @@
display: none;
}
// Breadcrumbs: Color
// ------------------------------------------
@@ -114,13 +120,14 @@
:host(.in-toolbar-color),
:host(.in-toolbar-color) .breadcrumb-separator {
color: current-color(contrast, 0.8);
color: current-color(contrast, .8);
}
:host(.in-toolbar-color.breadcrumb-active) {
color: current-color(contrast);
}
// Breadcrumbs: Collapsed Indicator
// --------------------------------------------------

View File

@@ -5,16 +5,14 @@ import { inheritAriaAttributes } from '@utils/helpers';
import { createColorClasses, hostContext, openURL } from '@utils/theme';
import { chevronForwardOutline, ellipsisHorizontal } from 'ionicons/icons';
import { config } from '../../global/config';
import { getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
import type { AnimationBuilder, Color } from '../../interface';
import type { RouterDirection } from '../router/utils/interface';
import type { BreadcrumbCollapsedClickEventDetail } from './breadcrumb-interface';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*
* @part native - The native HTML anchor or div element that wraps all child elements.
* @part separator - The separator element between each breadcrumb.
@@ -25,7 +23,6 @@ import type { BreadcrumbCollapsedClickEventDetail } from './breadcrumb-interface
styleUrls: {
ios: 'breadcrumb.ios.scss',
md: 'breadcrumb.md.scss',
ionic: 'breadcrumb.md.scss',
},
shadow: true,
})
@@ -168,13 +165,10 @@ export class Breadcrumb implements ComponentInterface {
const clickable = this.isClickable();
const TagType = this.href === undefined ? 'span' : ('a' as any);
const breadcrumbSeparatorIcon = config.get('breadcrumbSeparatorIcon', chevronForwardOutline);
const breadcrumbCollapsedIcon = config.get('breadcrumbCollapsedIcon', ellipsisHorizontal);
// Links can still be tabbed to when set to disabled if they have an href
// in order to truly disable them we can keep it as an anchor but remove the href
const href = disabled ? undefined : this.href;
const theme = getIonTheme(this);
const mode = getIonMode(this);
const attrs =
TagType === 'span'
? {}
@@ -194,7 +188,7 @@ export class Breadcrumb implements ComponentInterface {
onClick={(ev: Event) => openURL(href, ev, routerDirection, routerAnimation)}
aria-disabled={disabled ? 'true' : null}
class={createColorClasses(color, {
[theme]: true,
[mode]: true,
'breadcrumb-active': active,
'breadcrumb-collapsed': collapsed,
'breadcrumb-disabled': disabled,
@@ -228,7 +222,7 @@ export class Breadcrumb implements ComponentInterface {
'breadcrumbs-collapsed-indicator': true,
}}
>
<ion-icon aria-hidden="true" icon={breadcrumbCollapsedIcon} lazy={false}></ion-icon>
<ion-icon aria-hidden="true" icon={ellipsisHorizontal} lazy={false}></ion-icon>
</button>
)}
{showSeparator && (
@@ -239,8 +233,8 @@ export class Breadcrumb implements ComponentInterface {
*/
<span class="breadcrumb-separator" part="separator" aria-hidden="true">
<slot name="separator">
{theme === 'ios' ? (
<ion-icon icon={breadcrumbSeparatorIcon} lazy={false} flip-rtl></ion-icon>
{mode === 'ios' ? (
<ion-icon icon={chevronForwardOutline} lazy={false} flip-rtl></ion-icon>
) : (
<span>/</span>
)}

View File

@@ -1,15 +1,15 @@
@import "../../themes/native/native.globals";
@import "../../themes/ionic.globals";
// Breadcrumb
// --------------------------------------------------
/// @prop - Font weight of the breadcrumb
$breadcrumb-font-weight: 400;
$breadcrumb-font-weight: 400;
$breadcrumb-baseline-font-size: 16px;
/// @prop - Font size of the breadcrumb
$breadcrumb-font-size: dynamic-font($breadcrumb-baseline-font-size);
$breadcrumb-font-size: dynamic-font($breadcrumb-baseline-font-size);
/// @prop - Color of the breadcrumb separator
$breadcrumb-separator-color: var(--ion-color-step-550, var(--ion-text-color-step-450, #73849a));
$breadcrumb-separator-color: var(--ion-color-step-550, var(--ion-text-color-step-450, #73849a));

View File

@@ -11,3 +11,4 @@
justify-content: center;
}

View File

@@ -13,6 +13,7 @@
align-items: center;
}
// Breadcrumbs: In Toolbar
// --------------------------------------------------

View File

@@ -2,20 +2,19 @@ import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Component, Element, Event, Host, Listen, Prop, State, Watch, h } from '@stencil/core';
import { createColorClasses, hostContext } from '@utils/theme';
import { getIonTheme } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
import type { Color } from '../../interface';
import type { BreadcrumbCollapsedClickEventDetail } from '../breadcrumb/breadcrumb-interface';
/**
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
* @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component.
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*
*/
@Component({
tag: 'ion-breadcrumbs',
styleUrls: {
ios: 'breadcrumbs.ios.scss',
md: 'breadcrumbs.md.scss',
ionic: 'breadcrumbs.md.scss',
},
shadow: true,
})
@@ -171,12 +170,12 @@ export class Breadcrumbs implements ComponentInterface {
render() {
const { color, collapsed } = this;
const theme = getIonTheme(this);
const mode = getIonMode(this);
return (
<Host
class={createColorClasses(color, {
[theme]: true,
[mode]: true,
'in-toolbar': hostContext('ion-toolbar', this.el),
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
'breadcrumbs-collapsed': collapsed,

View File

@@ -1,4 +1,5 @@
@import "../../themes/native/native.globals";
@import "../../themes/ionic.globals";
// Breadcrumbs
// --------------------------------------------------

View File

@@ -1,220 +0,0 @@
@use "../../themes/ionic/ionic.globals.scss" as globals;
@import "./button";
@import "./button.ionic.vars";
// Ionic Button
// -------------------------------------------------------------------------------
:host {
--padding-bottom: var(--padding-top);
--padding-end: #{$button-ionic-padding-end};
--padding-start: var(--padding-end);
--padding-top: #{$button-ionic-padding-top};
// TODO(FW-6187): set this to a design token when it is added
--focus-ring-color: #9ec4fd;
--focus-ring-width: 2px;
position: relative;
min-height: #{$button-ionic-min-height};
font-size: #{$button-ionic-font-size};
// Target area
&::after {
@include position(50%, 0, null, 0);
position: absolute;
height: 100%;
min-height: px-to-rem(48);
transform: translateY(-50%);
content: "";
cursor: pointer;
z-index: 1;
}
::slotted(ion-icon[slot="start"]) {
@include margin-horizontal(null, px-to-rem(8));
}
::slotted(ion-icon[slot="end"]) {
@include margin-horizontal(px-to-rem(8), null);
}
}
// Button Sizes
// -------------------------------------------------------------------------------
/* Extra Small and Small Button */
:host(.button-xsmall),
:host(.button-small) {
::slotted(ion-icon[slot="start"]) {
@include margin-horizontal(null, px-to-rem(4));
}
::slotted(ion-icon[slot="end"]) {
@include margin-horizontal(px-to-rem(4), null);
}
}
/* Extra Small Button */
:host(.button-xsmall) {
--padding-top: #{$button-ionic-xsmall-padding-top};
--padding-end: #{$button-ionic-xsmall-padding-end};
min-height: #{$button-ionic-xsmall-min-height};
font-size: #{$button-ionic-xsmall-font-size};
}
/* Small Button */
:host(.button-small) {
--padding-top: #{$button-ionic-small-padding-top};
--padding-end: #{$button-ionic-small-padding-end};
min-height: #{$button-ionic-small-min-height};
font-size: #{$button-ionic-small-font-size};
}
/* Large Button */
:host(.button-large) {
--padding-top: #{$button-ionic-large-padding-top};
--padding-end: #{$button-ionic-large-padding-end};
min-height: #{$button-ionic-large-min-height};
font-size: #{$button-ionic-large-font-size};
}
/* Extra Large Button */
:host(.button-xlarge) {
--padding-top: #{$button-ionic-xlarge-padding-top};
--padding-end: #{$button-ionic-xlarge-padding-end};
min-height: #{$button-ionic-xlarge-min-height};
font-size: #{$button-ionic-xlarge-font-size};
}
// Button with Icons
// -------------------------------------------------------------------------------
/* Button containing only an icon */
::slotted(ion-icon[slot="start"]),
::slotted(ion-icon[slot="end"]),
::slotted(ion-icon[slot="icon-only"]) {
font-size: px-to-rem(16);
}
:host(.button-xsmall),
:host(.button-small),
:host(.button-large),
:host(.button-xlarge) {
::slotted(ion-icon[slot="start"]),
::slotted(ion-icon[slot="end"]),
::slotted(ion-icon[slot="icon-only"]) {
font-size: 1em;
}
}
:host(.button-has-icon-only) {
--padding-end: var(--padding-top);
aspect-ratio: 1 / 1;
}
// Button Shapes
// -------------------------------------------------------------------------------
:host(.button-soft) {
--border-radius: #{globals.$ionic-border-radius-rounded-medium};
}
:host(.button-soft.button-xsmall),
:host(.button-soft.button-small) {
--border-radius: #{globals.$ionic-border-radius-rounded-small};
}
:host(.button-round) {
--border-radius: #{globals.$ionic-border-radius-rounded-full};
}
:host(.button-rectangular) {
--border-radius: #{globals.$ionic-border-radius-square};
}
// Button Focused
// -------------------------------------------------------------------------------
// Only show the focus ring when the button is focused
:host(.ion-focused) .button-native {
outline: var(--focus-ring-width) solid var(--focus-ring-color);
outline-offset: 2px;
}
// Fill Solid Button
// -------------------------------------------------------------------------------
:host(.button-solid) {
--background-activated: #{ion-color(primary, shade)};
}
:host(.button-solid.ion-color.ion-activated) .button-native::after {
background: #{current-color(shade)};
}
// Fill Outline Button
// --------------------------------------------------
:host(.button-outline) {
--border-width: #{$button-ionic-outline-border-width};
--border-style: #{$button-ionic-outline-border-style};
--background-activated: #e3e3e3;
--background-activated-opacity: 1;
--background-focused: transparent;
--background-hover: transparent;
--background-focused-opacity: 0.1;
--color-activated: #{ion-color(primary, base)};
}
:host(.button-outline.ion-focused) {
--border-color: transparent;
}
// Fill Clear Button
// --------------------------------------------------
:host(.button-clear) {
--background-activated: #e3e3e3;
--background-activated-opacity: 1;
--background-focused: transparent;
--background-hover: transparent;
}
// Button Hover
// --------------------------------------------------
:host(.button-outline),
:host(.button-clear) {
--background-hover: #121212;
--background-hover-opacity: 0.04;
}
// Button: Disabled
// --------------------------------------------------
:host(.button-disabled) {
--color: #c9c9c9;
--border-color: var(--color);
opacity: 1;
}
:host(.button-solid.button-disabled) {
--background: #f5f5f5;
}

View File

@@ -1,125 +0,0 @@
@import "../../themes/native/native.globals.ios";
// Ionic Button
// -------------------------------------------------------------------------------
/// @prop - Padding top of the button
$button-ionic-padding-top: px-to-rem(12);
/// @prop - Padding end of the button
$button-ionic-padding-end: px-to-rem(16);
/// @prop - Padding bottom of the button
$button-ionic-padding-bottom: $button-ionic-padding-top;
/// @prop - Padding start of the button
$button-ionic-padding-start: $button-ionic-padding-end;
/// @prop - Minimum height of the button
$button-ionic-min-height: px-to-rem(40);
/// @prop - Font size of the button text
/// The maximum font size is calculated by taking the default font size
/// and multiplying it by 3, since 310% of the default is the maximum
$button-ionic-font-size: dynamic-font-max(14px, 3);
// Ionic Extra Small Button
// -------------------------------------------------------------------------------
/// @prop - Padding top of the extra small button
$button-ionic-xsmall-padding-top: px-to-rem(4);
/// @prop - Padding end of the extra small button
$button-ionic-xsmall-padding-end: px-to-rem(12);
/// @prop - Padding bottom of the extra small button
$button-ionic-xsmall-padding-bottom: $button-ionic-xsmall-padding-top;
/// @prop - Padding start of the extra small button
$button-ionic-xsmall-padding-start: $button-ionic-xsmall-padding-end;
/// @prop - Minimum height of the extra small button
$button-ionic-xsmall-min-height: px-to-rem(24);
/// @prop - Font size of the extra small button text
/// The maximum font size is calculated by taking the default font size
/// and multiplying it by 3, since 310% of the default is the maximum
$button-ionic-xsmall-font-size: dynamic-font-max(12px, 3);
// Ionic Small Button
// -------------------------------------------------------------------------------
/// @prop - Padding top of the small button
$button-ionic-small-padding-top: px-to-rem(8);
/// @prop - Padding end of the small button
$button-ionic-small-padding-end: px-to-rem(16);
/// @prop - Padding bottom of the small button
$button-ionic-small-padding-bottom: $button-ionic-small-padding-top;
/// @prop - Padding start of the small button
$button-ionic-small-padding-start: $button-ionic-small-padding-end;
/// @prop - Minimum height of the small button
$button-ionic-small-min-height: px-to-rem(32);
/// @prop - Font size of the small button text
/// The maximum font size is calculated by taking the default font size
/// and multiplying it by 3, since 310% of the default is the maximum
$button-ionic-small-font-size: dynamic-font-max(12px, 3);
// Ionic Large Button
// -------------------------------------------------------------------------------
/// @prop - Padding top of the large button
$button-ionic-large-padding-top: px-to-rem(16);
/// @prop - Padding end of the large button
$button-ionic-large-padding-end: px-to-rem(24);
/// @prop - Padding bottom of the large button
$button-ionic-large-padding-bottom: $button-ionic-large-padding-top;
/// @prop - Padding start of the large button
$button-ionic-large-padding-start: $button-ionic-large-padding-end;
/// @prop - Minimum height of the large button
$button-ionic-large-min-height: px-to-rem(48);
/// @prop - Font size of the large button text
/// The maximum font size is calculated by taking the default font size
/// and multiplying it by 3, since 310% of the default is the maximum
$button-ionic-large-font-size: dynamic-font-max(16px, 3);
// Ionic Extra Large Button
// -------------------------------------------------------------------------------
/// @prop - Padding top of the extra large button
$button-ionic-xlarge-padding-top: px-to-rem(16);
/// @prop - Padding end of the extra large button
$button-ionic-xlarge-padding-end: px-to-rem(32);
/// @prop - Padding bottom of the extra large button
$button-ionic-xlarge-padding-bottom: $button-ionic-xlarge-padding-top;
/// @prop - Padding start of the extra large button
$button-ionic-xlarge-padding-start: $button-ionic-xlarge-padding-end;
/// @prop - Minimum height of the extra large button
$button-ionic-xlarge-min-height: px-to-rem(56);
/// @prop - Font size of the extra large button text
/// The maximum font size is calculated by taking the default font size
/// and multiplying it by 3, since 310% of the default is the maximum
$button-ionic-xlarge-font-size: dynamic-font-max(20px, 3);
// Ionic Outline Button
// -------------------------------------------------------------------------------
/// @prop - Border width of the outline button
$button-ionic-outline-border-width: 1px;
/// @prop - Border style of the outline button
$button-ionic-outline-border-style: solid;

View File

@@ -2,10 +2,12 @@
@import "./button.ios.vars";
@import "../toolbar/toolbar.ios.vars";
// iOS Button
// --------------------------------------------------
:host {
--border-radius: #{$button-ios-border-radius};
--padding-top: #{$button-ios-padding-top};
--padding-bottom: #{$button-ios-padding-bottom};
--padding-start: #{$button-ios-padding-start};
@@ -22,7 +24,8 @@
letter-spacing: #{$button-ios-letter-spacing};
}
// Solid Button
// iOS Solid Button
// --------------------------------------------------
:host(.button-solid) {
@@ -34,20 +37,23 @@
--background-hover-opacity: 1;
}
// Outline Button
// iOS Outline Button
// --------------------------------------------------
:host(.button-outline) {
--border-radius: #{$button-ios-outline-border-radius};
--border-width: #{$button-ios-outline-border-width};
--border-style: #{$button-ios-outline-border-style};
--background-activated: #{ion-color(primary, base)};
--background-focused: #{ion-color(primary, base)};
--background-hover: transparent;
--background-focused-opacity: 0.1;
--background-focused-opacity: .1;
--color-activated: #{ion-color(primary, contrast)};
}
// Clear Button
// iOS Clear Button
// --------------------------------------------------
:host(.button-clear) {
@@ -55,13 +61,14 @@
--background-activated-opacity: 0;
--background-focused: #{ion-color(primary, base)};
--background-hover: transparent;
--background-focused-opacity: 0.1;
--background-focused-opacity: .1;
font-size: #{$button-ios-clear-font-size};
font-weight: #{$button-ios-clear-font-weight};
}
// Toolbar Buttons
// iOS Toolbar Buttons
// --------------------------------------------------
/**
@@ -74,15 +81,17 @@
* can add the different font size/weight in a toolbar
* but still let "size"/"strong" override it.
*/
:host(.in-buttons) {
font-size: #{$toolbar-ios-button-font-size};
font-weight: 400;
}
:host(.in-buttons) {
font-size: #{$toolbar-ios-button-font-size};
font-weight: 400;
}
// Button Sizes
// iOS Button Sizes
// --------------------------------------------------
:host(.button-large) {
--border-radius: #{$button-ios-large-border-radius};
--padding-top: #{$button-ios-large-padding-top};
--padding-start: #{$button-ios-large-padding-start};
--padding-end: #{$button-ios-large-padding-end};
@@ -94,6 +103,7 @@
}
:host(.button-small) {
--border-radius: #{$button-ios-small-border-radius};
--padding-top: #{$button-ios-small-padding-top};
--padding-start: #{$button-ios-small-padding-start};
--padding-end: #{$button-ios-small-padding-end};
@@ -104,37 +114,26 @@
font-size: #{$button-ios-small-font-size};
}
// Button Shapes
// iOS Round Button
// --------------------------------------------------
:host(.button-soft) {
--border-radius: 6px;
}
:host(.button-soft.button-large) {
--border-radius: 8px;
}
:host(.button-soft.button-small) {
--border-radius: 4px;
}
:host(.button-round) {
--border-radius: 999px;
--border-radius: #{$button-ios-round-border-radius};
--padding-top: #{$button-ios-round-padding-top};
--padding-start: #{$button-ios-round-padding-start};
--padding-end: #{$button-ios-round-padding-end};
--padding-bottom: #{$button-ios-round-padding-bottom};
}
:host(.button-rectangular) {
--border-radius: 0px;
}
// Strong Button
// iOS Strong Button
// --------------------------------------------------
:host(.button-strong) {
font-weight: #{$button-ios-strong-font-weight};
}
// Icon Only Button
// iOS Icon Only Button
// --------------------------------------------------
:host(.button-has-icon-only) {
@@ -156,7 +155,7 @@
*
* Since the `ion-button` uses `rem` for the font size, we can't
* just pass the desired icon font size in `em` to the `
* dynamic-font-clamp`. Instead, we need to adjust the base size
* dynamic-font-clamp`. Instead, we need to adjust the base size
* to account for the ion-button` font size.
*
* For example, if the default font size of `ion-button` is 16px
@@ -180,7 +179,7 @@
*
* Since the `ion-button` uses `rem` for the font size, we can't
* just pass the desired icon font size in `em` to the `
* dynamic-font-clamp`. Instead, we need to adjust the base size
* dynamic-font-clamp`. Instead, we need to adjust the base size
* to account for the ion-button` font size.
*
* For example, if the default font size of `ion-button` is 13px
@@ -204,7 +203,7 @@
*
* Since the `ion-button` uses `rem` for the font size, we can't
* just pass the desired icon font size in `em` to the `
* dynamic-font-clamp`. Instead, we need to adjust the base size
* dynamic-font-clamp`. Instead, we need to adjust the base size
* to account for the ion-button` font size.
*
* For example, if the default font size of `ion-button` is 20px
@@ -230,6 +229,7 @@
background: #{current-color(shade)};
}
// iOS Button Hover
// --------------------------------------------------
@@ -259,14 +259,14 @@
// Solid buttons inside of a toolbar should use a tint of the current
// background so use white to tint it, but this should not apply
// when activated
:host(:hover.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color):not(.ion-activated))
.button-native::after {
:host(:hover.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color):not(.ion-activated)) .button-native::after {
background: #fff;
opacity: 0.1;
opacity: 0.10;
}
}
// iOS Button Activated
// --------------------------------------------------
@@ -286,6 +286,7 @@
background: #{current-color(shade)};
}
// Activated Button in Toolbar
// --------------------------------------------------

View File

@@ -1,97 +1,111 @@
@import "../../themes/native/native.globals.ios";
@import "../../themes/ionic.globals.ios";
// iOS Button
// --------------------------------------------------
/// @prop - Margin top of the button
$button-ios-margin-top: 4px;
$button-ios-margin-top: 4px;
/// @prop - Margin end of the button
$button-ios-margin-end: 2px;
$button-ios-margin-end: 2px;
/// @prop - Margin bottom of the button
$button-ios-margin-bottom: 4px;
$button-ios-margin-bottom: 4px;
/// @prop - Margin start of the button
$button-ios-margin-start: 2px;
$button-ios-margin-start: 2px;
/// @prop - Padding top of the button
$button-ios-padding-top: 13px;
$button-ios-padding-top: 13px;
/// @prop - Padding end of the button
$button-ios-padding-end: 1em;
$button-ios-padding-end: 1em;
/// @prop - Padding bottom of the button
$button-ios-padding-bottom: $button-ios-padding-top;
$button-ios-padding-bottom: $button-ios-padding-top;
/// @prop - Padding start of the button
$button-ios-padding-start: $button-ios-padding-end;
$button-ios-padding-start: $button-ios-padding-end;
/// @prop - Minimum height of the button
$button-ios-min-height: 3.1em;
$button-ios-min-height: 3.1em;
/// @prop - Border radius of the button
$button-ios-border-radius: 14px;
/// @prop - Font size of the button text
/// The maximum font size is calculated by taking the default font size
/// and multiplying it by 3, since 310% of the default is the maximum
$button-ios-font-size: dynamic-font-max(16px, 3);
$button-ios-font-size: dynamic-font-max(16px, 3);
/// @prop - Font weight of the button text
$button-ios-font-weight: 500;
$button-ios-font-weight: 500;
// iOS Large Button
// --------------------------------------------------
/// @prop - Padding top of the large button
$button-ios-large-padding-top: 17px;
$button-ios-large-padding-top: 17px;
/// @prop - Padding end of the large button
$button-ios-large-padding-end: 1em;
$button-ios-large-padding-end: 1em;
/// @prop - Padding bottom of the large button
$button-ios-large-padding-bottom: $button-ios-large-padding-top;
$button-ios-large-padding-bottom: $button-ios-large-padding-top;
/// @prop - Padding start of the large button
$button-ios-large-padding-start: $button-ios-large-padding-end;
$button-ios-large-padding-start: $button-ios-large-padding-end;
/// @prop - Minimum height of the large button
$button-ios-large-min-height: 3.1em;
$button-ios-large-min-height: 3.1em;
/// @prop - Border radius of the large button
$button-ios-large-border-radius: 16px;
/// @prop - Font size of the large button
/// The maximum font size is calculated by taking the default font size
/// and multiplying it by 3, since 310% of the default is the maximum
$button-ios-large-font-size: dynamic-font-max(20px, 3);
$button-ios-large-font-size: dynamic-font-max(20px, 3);
// iOS Small Button
// --------------------------------------------------
/// @prop - Padding top of the small button
$button-ios-small-padding-top: 4px;
$button-ios-small-padding-top: 4px;
/// @prop - Padding end of the small button
$button-ios-small-padding-end: 0.9em;
$button-ios-small-padding-end: .9em;
/// @prop - Padding bottom of the small button
$button-ios-small-padding-bottom: $button-ios-small-padding-top;
$button-ios-small-padding-bottom: $button-ios-small-padding-top;
/// @prop - Padding start of the small button
$button-ios-small-padding-start: $button-ios-small-padding-end;
$button-ios-small-padding-start: $button-ios-small-padding-end;
/// @prop - Minimum height of the small button
$button-ios-small-min-height: 2.1em;
$button-ios-small-min-height: 2.1em;
/// @prop - Border radius of the small button
$button-ios-small-border-radius: 6px;
/// @prop - Font size of the small button
/// The maximum font size is calculated by taking the default font size
/// and multiplying it by 3, since 310% of the default is the maximum
$button-ios-small-font-size: dynamic-font-max(13px, 3);
$button-ios-small-font-size: dynamic-font-max(13px, 3);
// iOS Outline Button
// --------------------------------------------------
/// @prop - Border width of the outline button
$button-ios-outline-border-width: 1px;
$button-ios-outline-border-width: 1px;
/// @prop - Border style of the outline button
$button-ios-outline-border-style: solid;
$button-ios-outline-border-style: solid;
/// @prop - Border radius of the outline button
$button-ios-outline-border-radius: $button-ios-border-radius;
// iOS Clear Button
// --------------------------------------------------
@@ -99,22 +113,41 @@ $button-ios-outline-border-style: solid;
/// @prop - Font size of the clear button
/// The maximum font size is calculated by taking the default font size
/// and multiplying it by 3, since 310% of the default is the maximum
$button-ios-clear-font-size: dynamic-font-max(17px, 3);
$button-ios-clear-font-size: dynamic-font-max(17px, 3);
/// @prop - Font weight of the clear button
$button-ios-clear-font-weight: normal;
$button-ios-clear-font-weight: normal;
/// @prop - Letter spacing of the button
$button-ios-letter-spacing: 0;
$button-ios-letter-spacing: 0;
/// @prop - Opacity of the activated clear button
$button-ios-clear-opacity-activated: 0.4;
$button-ios-clear-opacity-activated: .4;
/// @prop - Opacity of the clear button on hover
$button-ios-clear-opacity-hover: 0.6;
$button-ios-clear-opacity-hover: .6;
// iOS Round Button
// --------------------------------------------------
/// @prop - Padding top of the round button
$button-ios-round-padding-top: $button-round-padding-top;
/// @prop - Padding end of the round button
$button-ios-round-padding-end: $button-round-padding-end;
/// @prop - Padding bottom of the round button
$button-ios-round-padding-bottom: $button-round-padding-bottom;
/// @prop - Padding start of the round button
$button-ios-round-padding-start: $button-round-padding-start;
/// @prop - Border radius of the round button
$button-ios-round-border-radius: $button-round-border-radius;
// iOS Decorator Button
// --------------------------------------------------
/// @prop - Font weight of the strong button
$button-ios-strong-font-weight: 600;
$button-ios-strong-font-weight: 600;

View File

@@ -5,11 +5,14 @@
// --------------------------------------------------
:host {
--border-radius: #{$button-md-border-radius};
--padding-top: #{$button-md-padding-top};
--padding-bottom: #{$button-md-padding-bottom};
--padding-start: #{$button-md-padding-start};
--padding-end: #{$button-md-padding-end};
--transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1), background-color 15ms linear, color 15ms linear;
--transition: box-shadow 280ms cubic-bezier(.4, 0, .2, 1),
background-color 15ms linear,
color 15ms linear;
@include margin($button-md-margin-top, $button-md-margin-end, $button-md-margin-bottom, $button-md-margin-start);
@@ -23,7 +26,7 @@
text-transform: #{$button-md-text-transform};
}
// Solid Button
// Material Design Solid Button
// --------------------------------------------------
:host(.button-solid) {
@@ -31,8 +34,8 @@
--background-hover: #{ion-color(primary, contrast)};
--background-focused: #{ion-color(primary, contrast)};
--background-activated-opacity: 0;
--background-focused-opacity: 0.24;
--background-hover-opacity: 0.08;
--background-focused-opacity: .24;
--background-hover-opacity: .08;
--box-shadow: #{$button-md-box-shadow};
}
@@ -40,7 +43,7 @@
--box-shadow: #{$button-md-box-shadow-activated};
}
// Outline Button
// Material Design Outline Button
// --------------------------------------------------
:host(.button-outline) {
@@ -51,15 +54,16 @@
--background-focused: #{ion-color(primary, base)};
--background-hover: #{ion-color(primary, base)};
--background-activated-opacity: 0;
--background-focused-opacity: 0.12;
--background-hover-opacity: 0.04;
--background-focused-opacity: .12;
--background-hover-opacity: .04;
}
:host(.button-outline.ion-activated.ion-color) .button-native {
background: transparent;
}
// Clear Button
// Material Design Clear Button
// --------------------------------------------------
:host(.button-clear) {
@@ -67,26 +71,24 @@
--background-focused: #{ion-color(primary, base)};
--background-hover: #{ion-color(primary, base)};
--background-activated-opacity: 0;
--background-focused-opacity: 0.12;
--background-hover-opacity: 0.04;
--background-focused-opacity: .12;
--background-hover-opacity: .04;
}
// Button Shapes
// -------------------------------------------------------------------------------
:host(.button-soft) {
--border-radius: 4px;
}
// Material Design Round Button
// --------------------------------------------------
:host(.button-round) {
--border-radius: 999px;
--border-radius: #{$button-md-round-border-radius};
--padding-top: #{$button-md-round-padding-top};
--padding-start: #{$button-md-round-padding-start};
--padding-end: #{$button-md-round-padding-end};
--padding-bottom: #{$button-md-round-padding-bottom};
}
:host(.button-rectangular) {
--border-radius: 0px;
}
// Button Sizes
// Material Design Button Sizes
// --------------------------------------------------
:host(.button-large) {
@@ -111,14 +113,14 @@
font-size: #{$button-md-small-font-size};
}
// Strong Button
// MD strong Button
// --------------------------------------------------
:host(.button-strong) {
font-weight: #{$button-md-strong-font-weight};
}
// Icon Only Button
// MD Icon Only Button
//
// MD does not specify a small size, these
// styles are based on the iOS small size.
@@ -147,7 +149,7 @@
*
* Since the `ion-button` uses `rem` for the font size, we can't
* just pass the desired icon font size in `em` to the `
* dynamic-font-clamp`. Instead, we need to adjust the base size
* dynamic-font-clamp`. Instead, we need to adjust the base size
* to account for the ion-button` font size.
*
* For example, if the default font size of `ion-button` is 14px
@@ -172,7 +174,7 @@
*
* Since the `ion-button` uses `rem` for the font size, we can't
* just pass the desired icon font size in `em` to the `
* dynamic-font-clamp`. Instead, we need to adjust the base size
* dynamic-font-clamp`. Instead, we need to adjust the base size
* to account for the ion-button` font size.
*
* For example, if the default font size of `ion-button` is 13px
@@ -197,17 +199,17 @@
*
* Since the `ion-button` uses `rem` for the font size, we can't
* just pass the desired icon font size in `em` to the `
* dynamic-font-clamp`. Instead, we need to adjust the base size
* dynamic-font-clamp`. Instead, we need to adjust the base size
* to account for the ion-button` font size.
*
* For example, if the default font size of `ion-button` is 20px
* (derived from rem) and the default font size of the icon is
* 28px, then the base size would need to be increased.
*/
font-size: dynamic-font-clamp(0.67, 22.4px, 1.92, 1em);
font-size: dynamic-font-clamp(0.67, 22.4px, 1.92, 1em);
}
// Button: Hover
// Material Design Button: Hover
// --------------------------------------------------
/**
@@ -225,6 +227,7 @@
background: #{current-color(base)};
}
@media (any-hover: hover) {
:host(.button-solid.ion-color:hover) .button-native::after {
background: #{current-color(contrast)};
@@ -236,6 +239,7 @@
}
}
// Activated Button in Toolbar
// --------------------------------------------------

View File

@@ -1,98 +1,119 @@
@import "../../themes/native/native.globals.md";
@import "../../themes/ionic.globals.md";
// Material Design Button
// --------------------------------------------------
/// @prop - Margin top of the button
$button-md-margin-top: 4px;
$button-md-margin-top: 4px;
/// @prop - Margin end of the button
$button-md-margin-end: 2px;
$button-md-margin-end: 2px;
/// @prop - Margin bottom of the button
$button-md-margin-bottom: 4px;
$button-md-margin-bottom: 4px;
/// @prop - Margin start of the button
$button-md-margin-start: 2px;
$button-md-margin-start: 2px;
/// @prop - Padding top of the button
$button-md-padding-top: 8px;
$button-md-padding-top: 8px;
/// @prop - Padding end of the button
$button-md-padding-end: 1.1em;
$button-md-padding-end: 1.1em;
/// @prop - Padding bottom of the button
$button-md-padding-bottom: $button-md-padding-top;
$button-md-padding-bottom: $button-md-padding-top;
/// @prop - Padding start of the button
$button-md-padding-start: 1.1em;
$button-md-padding-start: 1.1em;
/// @prop - Minimum height of the button
$button-md-min-height: 36px;
$button-md-min-height: 36px;
/// @prop - Border radius of the button
$button-md-border-radius: 4px;
/// @prop - Font size of the button text
$button-md-font-size: dynamic-font(14px);
$button-md-font-size: dynamic-font(14px);
/// @prop - Font weight of the button text
$button-md-font-weight: 500;
$button-md-font-weight: 500;
/// @prop - Capitalization of the button text
$button-md-text-transform: uppercase;
$button-md-text-transform: uppercase;
$button-md-letter-spacing: 0.06em;
$button-md-letter-spacing: 0.06em;
/// @prop - Box shadow of the button
$button-md-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12);
$button-md-box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
/// @prop - Box shadow of the activated button
$button-md-box-shadow-activated: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12);
$button-md-box-shadow-activated: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
// Material Design Large Button
// --------------------------------------------------
/// @prop - Padding top of the large button
$button-md-large-padding-top: 14px;
$button-md-large-padding-top: 14px;
/// @prop - Padding end of the large button
$button-md-large-padding-end: 1em;
$button-md-large-padding-end: 1em;
/// @prop - Padding bottom of the large button
$button-md-large-padding-bottom: $button-md-large-padding-top;
$button-md-large-padding-bottom: $button-md-large-padding-top;
/// @prop - Padding start of the large button
$button-md-large-padding-start: $button-md-large-padding-end;
$button-md-large-padding-start: $button-md-large-padding-end;
/// @prop - Minimum height of the large button
$button-md-large-min-height: 2.8em;
$button-md-large-min-height: 2.8em;
/// @prop - Font size of the large button
$button-md-large-font-size: dynamic-font(20px);
$button-md-large-font-size: dynamic-font(20px);
// Material Design Small Button
// --------------------------------------------------
/// @prop - Padding top of the small button
$button-md-small-padding-top: 4px;
$button-md-small-padding-top: 4px;
/// @prop - Padding end of the small button
$button-md-small-padding-end: 0.9em;
$button-md-small-padding-end: .9em;
/// @prop - Padding bottom of the small button
$button-md-small-padding-bottom: $button-md-small-padding-top;
$button-md-small-padding-bottom: $button-md-small-padding-top;
/// @prop - Padding start of the small button
$button-md-small-padding-start: $button-md-small-padding-end;
$button-md-small-padding-start: $button-md-small-padding-end;
/// @prop - Minimum height of the small button
$button-md-small-min-height: 2.1em;
$button-md-small-min-height: 2.1em;
/// @prop - Font size of the small button
$button-md-small-font-size: dynamic-font(13px);
$button-md-small-font-size: dynamic-font(13px);
// Material Design Round Button
// --------------------------------------------------
/// @prop - Padding top of the round button
$button-md-round-padding-top: $button-round-padding-top;
/// @prop - Padding end of the round button
$button-md-round-padding-end: $button-round-padding-end;
/// @prop - Padding bottom of the round button
$button-md-round-padding-bottom: $button-round-padding-bottom;
/// @prop - Padding start of the round button
$button-md-round-padding-start: $button-round-padding-start;
/// @prop - Border radius of the round button
$button-md-round-border-radius: $button-round-border-radius;
// Material Design Decorator Button
// --------------------------------------------------
/// @prop - Font weight of the strong button
$button-md-strong-font-weight: bold;
$button-md-strong-font-weight: bold;

Some files were not shown because too many files have changed in this diff Show More