Compare commits
50 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e4e9b9ff8 | ||
|
|
9097a1d146 | ||
|
|
edc202db34 | ||
|
|
1d232c8202 | ||
|
|
7584e617f1 | ||
|
|
fdb24e4f5f | ||
|
|
bc5b3a3a84 | ||
|
|
b943db479e | ||
|
|
04c10985b1 | ||
|
|
ab7c863e36 | ||
|
|
1895f8fb20 | ||
|
|
d4f646104b | ||
|
|
82584aaf83 | ||
|
|
3f1e2c0644 | ||
|
|
fcc50d6d16 | ||
|
|
1f68ad48f2 | ||
|
|
3bbb0a78f3 | ||
|
|
4d81e2d820 | ||
|
|
e1388e646a | ||
|
|
56190b2c79 | ||
|
|
d8abf4ce35 | ||
|
|
8ee1069b93 | ||
|
|
3b7beca8d0 | ||
|
|
0174a3938c | ||
|
|
f9159e1e90 | ||
|
|
095b72ef30 | ||
|
|
e953f7b506 | ||
|
|
a63afa3db6 | ||
|
|
26b6b7bb02 | ||
|
|
553aa65376 | ||
|
|
a5bd1dd518 | ||
|
|
48e4bc4776 | ||
|
|
fc496043d8 | ||
|
|
4fe98a42ff | ||
|
|
7c197c2c99 | ||
|
|
4a165bc26c | ||
|
|
9c404a6839 | ||
|
|
39b15cb3b0 | ||
|
|
fa16c3a7bd | ||
|
|
d6eb8ce8e9 | ||
|
|
3fac5ccbf8 | ||
|
|
35579250d5 | ||
|
|
61b588c6b9 | ||
|
|
4b7f2fadef | ||
|
|
415245b9b4 | ||
|
|
61dc7eb4f0 | ||
|
|
b87cd07e91 | ||
|
|
fea0a3da0f | ||
|
|
f66c84a9b9 | ||
|
|
c54f257633 |
@@ -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 core/package.json
|
||||
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts core/package.json
|
||||
|
||||
@@ -33,4 +33,4 @@ runs:
|
||||
output: core/CoreBuild.zip
|
||||
# Include generated proxy files from Stencil output targets so
|
||||
# framework builds can detect when they need to be updated
|
||||
paths: core/dist core/components core/src/foundations core/css core/hydrate core/loader core/src/components.d.ts core/api.txt packages/angular/src/directives/proxies.ts packages/angular/src/directives/proxies-list.ts packages/angular/standalone/src/directives/proxies.ts packages/vue/src/proxies.ts packages/react/src/components/proxies.ts packages/react/src/components/inner-proxies.ts packages/react/src/components/routing-proxies.ts
|
||||
paths: core/dist core/components core/css core/hydrate core/loader core/src/components.d.ts core/api.txt packages/angular/src/directives/proxies.ts packages/angular/src/directives/proxies-list.ts packages/angular/standalone/src/directives/proxies.ts packages/vue/src/proxies.ts packages/react/src/components/proxies.ts packages/react/src/components/inner-proxies.ts packages/react/src/components/routing-proxies.ts
|
||||
|
||||
446
BREAKING.md
@@ -4,204 +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)
|
||||
- [Datetime](#version-9x-datetime)
|
||||
- [Grid](#version-9x-grid)
|
||||
- [Input Otp](#version-9x-input-otp)
|
||||
- [Radio Group](#version-9x-radio-group)
|
||||
- [Textarea](#version-9x-textarea)
|
||||
- [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+ |
|
||||
|
||||
- **ion-card**: 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+ |
|
||||
|
||||
- **ion-card-content**: The `ion-card-content` component has been updated to Shadow DOM. With this update, all card-related components now use Shadow DOM for style encapsulation. The default styles for heading elements inside `ion-card-content` have been removed. If you need custom styling for headings, you can add your own CSS targeting these elements. For example:
|
||||
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.
|
||||
|
||||
```css
|
||||
ion-card-content h1 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 2px;
|
||||
<h2 id="version-8x-dark-mode">Dark Mode</h2>
|
||||
|
||||
font-size: 1.5rem;
|
||||
|
||||
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 */
|
||||
}
|
||||
|
||||
ion-card-content h2 {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
|
||||
font-size: 1rem;
|
||||
.ios body {
|
||||
/* global ios app variables */
|
||||
}
|
||||
|
||||
ion-card-content h3,
|
||||
ion-card-content h4,
|
||||
ion-card-content h5,
|
||||
ion-card-content h6 {
|
||||
margin-top: 2px;
|
||||
margin-bottom: 2px;
|
||||
|
||||
font-size: 0.875rem;
|
||||
.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';
|
||||
```
|
||||
|
||||
<h4 id="version-9x-chip">Chip</h4>
|
||||
|
||||
- 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.
|
||||
|
||||
<h4 id="version-9x-datetime">Datetime</h4>
|
||||
|
||||
- The `ion-buttons` component has been removed from the internal implementation of `ion-datetime` and is no longer required when passing custom buttons to the `slot="buttons"`. When providing custom buttons, use a `div` element instead of `ion-buttons`. While existing code using `ion-buttons` may continue to work visually, future updates to the `ion-buttons` component may cause any styles you rely on to break.
|
||||
|
||||
<h4 id="version-9x-grid">Grid</h4>
|
||||
|
||||
- The properties `pull` and `push` have been deprecated and no longer work. A similar look can be achieved with the newly added property `order`.
|
||||
|
||||
<h5>Example 1: Swap two columns</h5>
|
||||
|
||||
**Version up to 8.x**
|
||||
|
||||
```html
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col push="4">1</ion-col>
|
||||
<ion-col pull="4">2</ion-col>
|
||||
<ion-col>3</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
```
|
||||
|
||||
**Version 9.x+**
|
||||
|
||||
```html
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col order="2">1</ion-col>
|
||||
<ion-col order="1">2</ion-col>
|
||||
<ion-col order="3">3</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
```
|
||||
|
||||
<h5>Example 2: Reorder columns with specific sizes</h5>
|
||||
|
||||
To reorder two columns where column 1 has `size="9" push="3"` and column 2 has `size="3" pull="9"`:
|
||||
|
||||
**Version up to 8.x**
|
||||
|
||||
```html
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col push="3">1</ion-col>
|
||||
<ion-col pull="9">2</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
```
|
||||
|
||||
**Version 9.x+**
|
||||
|
||||
```html
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col order="2">1</ion-col>
|
||||
<ion-col size="3" order="1">2</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
```
|
||||
|
||||
<h5>Example 3: Push</h5>
|
||||
|
||||
```html
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col size="auto" push="1">
|
||||
<div>ion-col push 1</div>
|
||||
</ion-col>
|
||||
<ion-col size="auto" push="1">
|
||||
<div>ion-col push 1</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
```
|
||||
|
||||
**Version 9.x+**
|
||||
|
||||
```html
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col size="auto" offset="1">
|
||||
<div>ion-col size="auto" offset="1"</div>
|
||||
</ion-col>
|
||||
<ion-col size="auto">
|
||||
<div>ion-col size="auto"</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
```
|
||||
|
||||
<h5>Example 4: Push and Pull</h5>
|
||||
|
||||
```html
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col size="3" size-md="6" push="9" push-md="6">
|
||||
<div>ion-col size="3" size-md="6" push="9" push-md="6"</div>
|
||||
</ion-col>
|
||||
<ion-col size="9" size-md="6" pull="3" pull-md="6">
|
||||
<div>ion-col size="9" size-md="6" pull="3" pull-md="6"</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
```
|
||||
|
||||
**Version 9.x+**
|
||||
|
||||
```html
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col size="auto" order="2" order-md="2">
|
||||
<div>ion-col size="auto" order="2" order-md="2"</div>
|
||||
</ion-col>
|
||||
<ion-col size="auto" order="1" order-md="1">
|
||||
<div>ion-col size="auto" order="1" order-md="1"</div>
|
||||
</ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
```
|
||||
|
||||
<h4 id="version-9x-input-otp">Input Otp</h4>
|
||||
|
||||
Converted `ion-input-otp` to use [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM).
|
||||
|
||||
If you were targeting the internals of `ion-input-otp` in your CSS, you will need to target the `group`, `container`, `native`, `separator` or `description` [Shadow Parts](https://ionicframework.com/docs/theming/css-shadow-parts) instead, or use the provided CSS Variables.
|
||||
|
||||
<h4 id="version-9x-radio-group">Radio Group</h4>
|
||||
|
||||
Converted `ion-radio-group` to use [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM).
|
||||
|
||||
If you were targeting the internals of `ion-radio-group` in your CSS, you will need to target the `supporting-text`, `helper-text` or `error-text` [Shadow Parts](https://ionicframework.com/docs/theming/css-shadow-parts) instead, or use the provided CSS Variables.
|
||||
|
||||
Additionally, the `radio-group-wrapper` div element has been removed, causing slotted elements to be direct children of the `ion-radio-group`.
|
||||
|
||||
<h4 id="version-9x-textarea">Textarea</h4>
|
||||
|
||||
Converted `ion-textarea` to use [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM).
|
||||
|
||||
If you were targeting the internals of `ion-textarea` in your CSS, you will need to target the `wrapper`, `container`, `label`, `native`, `supporting-text`, `helper-text`, `error-text`, `counter`, or `bottom` [Shadow Parts](https://ionicframework.com/docs/theming/css-shadow-parts) instead, or use the provided CSS Variables.
|
||||
|
||||
@@ -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';
|
||||
```
|
||||
42
CHANGELOG.md
@@ -3,48 +3,6 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [8.8.0](https://github.com/ionic-team/ionic-framework/compare/v8.7.18...v8.8.0) (2026-03-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **angular:** add custom injector support for modal and popover controllers ([#30899](https://github.com/ionic-team/ionic-framework/issues/30899)) ([822da42](https://github.com/ionic-team/ionic-framework/commit/822da428af86cd9b036b81515272321eb8fa586c)), closes [#30638](https://github.com/ionic-team/ionic-framework/issues/30638)
|
||||
* **content:** add content-fullscreen class when fullscreen is true ([#30926](https://github.com/ionic-team/ionic-framework/issues/30926)) ([d74b11b](https://github.com/ionic-team/ionic-framework/commit/d74b11bc19d6268b256daf23ba6f107483c00320))
|
||||
* **datetime:** add header parts ([#30945](https://github.com/ionic-team/ionic-framework/issues/30945)) ([6ea186d](https://github.com/ionic-team/ionic-framework/commit/6ea186d96d80a94b774d4d0a51d536e0e5599935))
|
||||
* **datetime:** add wheel part to ion-picker-column ([#30934](https://github.com/ionic-team/ionic-framework/issues/30934)) ([0cf4c03](https://github.com/ionic-team/ionic-framework/commit/0cf4c03e298bb4f7eea71c966a1473765ebd6d7a))
|
||||
* **item-divider:** add inner and container parts ([#30928](https://github.com/ionic-team/ionic-framework/issues/30928)) ([5cdeb7f](https://github.com/ionic-team/ionic-framework/commit/5cdeb7fd357298f15e7ae29b14412d97bdc7c656))
|
||||
* **item-option:** add inner and container parts ([#30929](https://github.com/ionic-team/ionic-framework/issues/30929)) ([f8f7ffd](https://github.com/ionic-team/ionic-framework/commit/f8f7ffda318c0143d9bb5c79fe55b4ecb88e6ce3))
|
||||
* **item:** add inner and container parts ([#30927](https://github.com/ionic-team/ionic-framework/issues/30927)) ([a2c6559](https://github.com/ionic-team/ionic-framework/commit/a2c655923bb1cff51864949575e19028623c695d))
|
||||
* **list-header:** add inner part ([#30930](https://github.com/ionic-team/ionic-framework/issues/30930)) ([ef73476](https://github.com/ionic-team/ionic-framework/commit/ef73476e08670630907e775a38f9ed30a84e3f1f))
|
||||
* **modal:** add drag events for sheet and card modals ([#30962](https://github.com/ionic-team/ionic-framework/issues/30962)) ([d29ac71](https://github.com/ionic-team/ionic-framework/commit/d29ac713fad604c256fb385eb0c26eb9717e1ff4))
|
||||
* **range:** add classes and expose parts to allow individual styling of dual knobs ([#30941](https://github.com/ionic-team/ionic-framework/issues/30941)) ([5bcf921](https://github.com/ionic-team/ionic-framework/commit/5bcf92184118055483bf306ab9e319b8e3e61870)), closes [#29862](https://github.com/ionic-team/ionic-framework/issues/29862)
|
||||
* **range:** add classes to the range when the value is at the min or max ([#30932](https://github.com/ionic-team/ionic-framework/issues/30932)) ([fac1a66](https://github.com/ionic-team/ionic-framework/commit/fac1a6673c88a531f1d79656be4eb544f235f819))
|
||||
* **refresher:** add ionPullStart and ionPullEnd events ([#30946](https://github.com/ionic-team/ionic-framework/issues/30946)) ([814c2e5](https://github.com/ionic-team/ionic-framework/commit/814c2e5ccd6d5bfda12bdf13a566cd66ff830d5b)), closes [#24524](https://github.com/ionic-team/ionic-framework/issues/24524)
|
||||
* **segment-view:** add swipeGesture property to disable swiping ([#30948](https://github.com/ionic-team/ionic-framework/issues/30948)) ([46806bd](https://github.com/ionic-team/ionic-framework/commit/46806bd6e2af90a0b31fca68f508c06d3d281ec0)), closes [#30290](https://github.com/ionic-team/ionic-framework/issues/30290)
|
||||
* **select:** add wrapper and bottom shadow parts ([#30951](https://github.com/ionic-team/ionic-framework/issues/30951)) ([5cea5ae](https://github.com/ionic-team/ionic-framework/commit/5cea5aeb44393edab7064e5980a1eb7e607d1b8d))
|
||||
* **select:** pass cancelText property to modal interface ([#30282](https://github.com/ionic-team/ionic-framework/issues/30282)) ([6e4f60a](https://github.com/ionic-team/ionic-framework/commit/6e4f60af4c188ae04028b444aa21118ae27c2ca7))
|
||||
* **textarea:** reflect disabled and readonly props ([#30910](https://github.com/ionic-team/ionic-framework/issues/30910)) ([55735df](https://github.com/ionic-team/ionic-framework/commit/55735df3fa62c8e259c56db3169f3d5459e71c0c))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.7.18](https://github.com/ionic-team/ionic-framework/compare/v8.7.17...v8.7.18) (2026-02-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **datetime:** stretch ion-buttons to fill space for ios ([#30963](https://github.com/ionic-team/ionic-framework/issues/30963)) ([d46b0b1](https://github.com/ionic-team/ionic-framework/commit/d46b0b15f6a652da6f863cf303e7ce06cfc820a8))
|
||||
* **many:** clear timeouts ([#30851](https://github.com/ionic-team/ionic-framework/issues/30851)) ([70b1237](https://github.com/ionic-team/ionic-framework/commit/70b1237823dd0cdab852486a6b2cbbfe0d0aaae9)), closes [#30860](https://github.com/ionic-team/ionic-framework/issues/30860)
|
||||
* **modal, popover:** respect safe area insets on popovers and modals ([#30949](https://github.com/ionic-team/ionic-framework/issues/30949)) ([6490797](https://github.com/ionic-team/ionic-framework/commit/6490797851cede3bfda893a19b10f165259ec988)), closes [#28411](https://github.com/ionic-team/ionic-framework/issues/28411)
|
||||
* **nav-controller:** reset direction state when navigation is canceled ([#30955](https://github.com/ionic-team/ionic-framework/issues/30955)) ([53172d1](https://github.com/ionic-team/ionic-framework/commit/53172d1a4035d5b510c230553aabd53dc1389e4b))
|
||||
* **radio-group:** prevent DOMException and NotFoundError when filtering radios ([#30958](https://github.com/ionic-team/ionic-framework/issues/30958)) ([682a17e](https://github.com/ionic-team/ionic-framework/commit/682a17ebb754da7714989623cf84b75e715e20e1)), closes [#30279](https://github.com/ionic-team/ionic-framework/issues/30279) [#30359](https://github.com/ionic-team/ionic-framework/issues/30359)
|
||||
* **toast:** keep icon on the same line as long message in stacked layout ([#30923](https://github.com/ionic-team/ionic-framework/issues/30923)) ([442e3e9](https://github.com/ionic-team/ionic-framework/commit/442e3e983107a69cea4fb5587fb33da718eee8a3)), closes [#30908](https://github.com/ionic-team/ionic-framework/issues/30908)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.7.17](https://github.com/ionic-team/ionic-framework/compare/v8.7.15...v8.7.17) (2026-01-14)
|
||||
|
||||
|
||||
|
||||
@@ -3,19 +3,16 @@
|
||||
# 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
|
||||
- scripts/tokens/*.css
|
||||
|
||||
indentation: 2
|
||||
|
||||
@@ -26,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
|
||||
@@ -43,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
|
||||
@@ -59,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
|
||||
|
||||
@@ -3,46 +3,6 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [8.8.0](https://github.com/ionic-team/ionic-framework/compare/v8.7.18...v8.8.0) (2026-03-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **content:** add content-fullscreen class when fullscreen is true ([#30926](https://github.com/ionic-team/ionic-framework/issues/30926)) ([d74b11b](https://github.com/ionic-team/ionic-framework/commit/d74b11bc19d6268b256daf23ba6f107483c00320))
|
||||
* **datetime:** add header parts ([#30945](https://github.com/ionic-team/ionic-framework/issues/30945)) ([6ea186d](https://github.com/ionic-team/ionic-framework/commit/6ea186d96d80a94b774d4d0a51d536e0e5599935))
|
||||
* **datetime:** add wheel part to ion-picker-column ([#30934](https://github.com/ionic-team/ionic-framework/issues/30934)) ([0cf4c03](https://github.com/ionic-team/ionic-framework/commit/0cf4c03e298bb4f7eea71c966a1473765ebd6d7a))
|
||||
* **item-divider:** add inner and container parts ([#30928](https://github.com/ionic-team/ionic-framework/issues/30928)) ([5cdeb7f](https://github.com/ionic-team/ionic-framework/commit/5cdeb7fd357298f15e7ae29b14412d97bdc7c656))
|
||||
* **item-option:** add inner and container parts ([#30929](https://github.com/ionic-team/ionic-framework/issues/30929)) ([f8f7ffd](https://github.com/ionic-team/ionic-framework/commit/f8f7ffda318c0143d9bb5c79fe55b4ecb88e6ce3))
|
||||
* **item:** add inner and container parts ([#30927](https://github.com/ionic-team/ionic-framework/issues/30927)) ([a2c6559](https://github.com/ionic-team/ionic-framework/commit/a2c655923bb1cff51864949575e19028623c695d))
|
||||
* **list-header:** add inner part ([#30930](https://github.com/ionic-team/ionic-framework/issues/30930)) ([ef73476](https://github.com/ionic-team/ionic-framework/commit/ef73476e08670630907e775a38f9ed30a84e3f1f))
|
||||
* **modal:** add drag events for sheet and card modals ([#30962](https://github.com/ionic-team/ionic-framework/issues/30962)) ([d29ac71](https://github.com/ionic-team/ionic-framework/commit/d29ac713fad604c256fb385eb0c26eb9717e1ff4))
|
||||
* **range:** add classes and expose parts to allow individual styling of dual knobs ([#30941](https://github.com/ionic-team/ionic-framework/issues/30941)) ([5bcf921](https://github.com/ionic-team/ionic-framework/commit/5bcf92184118055483bf306ab9e319b8e3e61870)), closes [#29862](https://github.com/ionic-team/ionic-framework/issues/29862)
|
||||
* **range:** add classes to the range when the value is at the min or max ([#30932](https://github.com/ionic-team/ionic-framework/issues/30932)) ([fac1a66](https://github.com/ionic-team/ionic-framework/commit/fac1a6673c88a531f1d79656be4eb544f235f819))
|
||||
* **refresher:** add ionPullStart and ionPullEnd events ([#30946](https://github.com/ionic-team/ionic-framework/issues/30946)) ([814c2e5](https://github.com/ionic-team/ionic-framework/commit/814c2e5ccd6d5bfda12bdf13a566cd66ff830d5b)), closes [#24524](https://github.com/ionic-team/ionic-framework/issues/24524)
|
||||
* **segment-view:** add swipeGesture property to disable swiping ([#30948](https://github.com/ionic-team/ionic-framework/issues/30948)) ([46806bd](https://github.com/ionic-team/ionic-framework/commit/46806bd6e2af90a0b31fca68f508c06d3d281ec0)), closes [#30290](https://github.com/ionic-team/ionic-framework/issues/30290)
|
||||
* **select:** add wrapper and bottom shadow parts ([#30951](https://github.com/ionic-team/ionic-framework/issues/30951)) ([5cea5ae](https://github.com/ionic-team/ionic-framework/commit/5cea5aeb44393edab7064e5980a1eb7e607d1b8d))
|
||||
* **select:** pass cancelText property to modal interface ([#30282](https://github.com/ionic-team/ionic-framework/issues/30282)) ([6e4f60a](https://github.com/ionic-team/ionic-framework/commit/6e4f60af4c188ae04028b444aa21118ae27c2ca7))
|
||||
* **textarea:** reflect disabled and readonly props ([#30910](https://github.com/ionic-team/ionic-framework/issues/30910)) ([55735df](https://github.com/ionic-team/ionic-framework/commit/55735df3fa62c8e259c56db3169f3d5459e71c0c))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.7.18](https://github.com/ionic-team/ionic-framework/compare/v8.7.17...v8.7.18) (2026-02-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **datetime:** stretch ion-buttons to fill space for ios ([#30963](https://github.com/ionic-team/ionic-framework/issues/30963)) ([d46b0b1](https://github.com/ionic-team/ionic-framework/commit/d46b0b15f6a652da6f863cf303e7ce06cfc820a8))
|
||||
* **many:** clear timeouts ([#30851](https://github.com/ionic-team/ionic-framework/issues/30851)) ([70b1237](https://github.com/ionic-team/ionic-framework/commit/70b1237823dd0cdab852486a6b2cbbfe0d0aaae9)), closes [#30860](https://github.com/ionic-team/ionic-framework/issues/30860)
|
||||
* **modal, popover:** respect safe area insets on popovers and modals ([#30949](https://github.com/ionic-team/ionic-framework/issues/30949)) ([6490797](https://github.com/ionic-team/ionic-framework/commit/6490797851cede3bfda893a19b10f165259ec988)), closes [#28411](https://github.com/ionic-team/ionic-framework/issues/28411)
|
||||
* **radio-group:** prevent DOMException and NotFoundError when filtering radios ([#30958](https://github.com/ionic-team/ionic-framework/issues/30958)) ([682a17e](https://github.com/ionic-team/ionic-framework/commit/682a17ebb754da7714989623cf84b75e715e20e1)), closes [#30279](https://github.com/ionic-team/ionic-framework/issues/30279) [#30359](https://github.com/ionic-team/ionic-framework/issues/30359)
|
||||
* **toast:** keep icon on the same line as long message in stacked layout ([#30923](https://github.com/ionic-team/ionic-framework/issues/30923)) ([442e3e9](https://github.com/ionic-team/ionic-framework/commit/442e3e983107a69cea4fb5587fb33da718eee8a3)), closes [#30908](https://github.com/ionic-team/ionic-framework/issues/30908)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [8.7.17](https://github.com/ionic-team/ionic-framework/compare/v8.7.15...v8.7.17) (2026-01-14)
|
||||
|
||||
|
||||
|
||||
742
core/api.txt
1525
core/package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ionic/core",
|
||||
"version": "8.8.0",
|
||||
"version": "8.7.17",
|
||||
"description": "Base components for Ionic",
|
||||
"engines": {
|
||||
"node": ">= 16"
|
||||
@@ -34,8 +34,7 @@
|
||||
"loader/"
|
||||
],
|
||||
"dependencies": {
|
||||
"@phosphor-icons/core": "^2.1.1",
|
||||
"@stencil/core": "4.43.0",
|
||||
"@stencil/core": "4.38.0",
|
||||
"ionicons": "^8.0.13",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
@@ -55,7 +54,7 @@
|
||||
"@stencil/sass": "^3.0.9",
|
||||
"@stencil/vue-output-target": "0.10.8",
|
||||
"@types/jest": "^29.5.6",
|
||||
"@types/node": "^18.19.47",
|
||||
"@types/node": "^16.18.126",
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
||||
"@typescript-eslint/parser": "^6.7.2",
|
||||
"chalk": "^5.3.0",
|
||||
@@ -68,9 +67,8 @@
|
||||
"fs-extra": "^9.0.1",
|
||||
"jest": "^29.7.0",
|
||||
"jest-cli": "^29.7.0",
|
||||
"outsystems-design-tokens": "^1.3.4",
|
||||
"playwright-core": "^1.56.1",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^2.6.1",
|
||||
"rollup": "^2.26.4",
|
||||
"sass": "^1.33.0",
|
||||
"serve": "^14.0.1",
|
||||
@@ -82,7 +80,6 @@
|
||||
"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": "npx build.tokens --dest src/foundations/ --root=false --scss=true --scss-file=ionic.vars.scss --scss-prefix=ion --utilities=false && 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",
|
||||
@@ -94,8 +91,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, html}\" --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",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* The following URL parameters are supported:
|
||||
* - `rtl`: Set to `true` to enable right-to-left directionality.
|
||||
* - `ionic:_testing`: Set to `true` to identify testing environments.
|
||||
* - `ionic:theme`: Set to `ios` or `md` to load a specific theme.
|
||||
* - `ionic:mode`: Set to `ios` or `md` to load a specific mode.
|
||||
* Defaults to `md`.
|
||||
* - `palette`: Set to `light`, `dark`, `high-contrast`, or
|
||||
* `high-contrast-dark` to load a specific palette. Defaults to `light`.
|
||||
@@ -79,41 +79,6 @@
|
||||
document.head.appendChild(linkTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* The `ionic` theme uses a different stylesheet than the `iOS` and `md` themes.
|
||||
* This is to ensure that the `ionic` theme is loaded when the `ionic:theme=ionic`
|
||||
* or when the HTML tag has the `theme="ionic"` attribute. This is useful for
|
||||
* the snapshot tests, where the `ionic` theme is not loaded by default.
|
||||
*/
|
||||
const themeQuery = window.location.search.match(/ionic:theme=([a-z]+)/);
|
||||
const themeAttr = document.documentElement.getAttribute('theme');
|
||||
|
||||
if ((themeQuery && themeQuery[1] === 'ionic') || themeAttr === 'ionic') {
|
||||
const ionicThemeLinkTag = document.querySelector('link[href*="css/ionic/bundle.ionic.css"]');
|
||||
|
||||
if (!ionicThemeLinkTag) {
|
||||
const linkTag = document.createElement('link');
|
||||
linkTag.setAttribute('rel', 'stylesheet');
|
||||
linkTag.setAttribute('type', 'text/css');
|
||||
linkTag.setAttribute('href', '/css/ionic/bundle.ionic.css');
|
||||
document.head.appendChild(linkTag);
|
||||
}
|
||||
|
||||
const utilsBundleLinkTag = document.querySelector('link[href*="css/utils.bundle.css"]');
|
||||
if (!utilsBundleLinkTag) {
|
||||
const linkTag = document.createElement('link');
|
||||
linkTag.setAttribute('rel', 'stylesheet');
|
||||
linkTag.setAttribute('type', 'text/css');
|
||||
linkTag.setAttribute('href', '/css/utils.bundle.css');
|
||||
document.head.appendChild(linkTag);
|
||||
}
|
||||
|
||||
const defaultThemeLinkTag = document.querySelector('link[href*="css/ionic.bundle.css"]');
|
||||
if (defaultThemeLinkTag) {
|
||||
defaultThemeLinkTag.remove();
|
||||
}
|
||||
}
|
||||
|
||||
window.Ionic = window.Ionic || {};
|
||||
window.Ionic.config = window.Ionic.config || {};
|
||||
|
||||
|
||||
@@ -49,17 +49,6 @@ html.ios.ios {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "iosTestingFont", sans-serif;
|
||||
}
|
||||
|
||||
/* Override above styles for testing scopes */
|
||||
:root.ionic,
|
||||
:root.ionic.ios,
|
||||
:root.ionic.md,
|
||||
html.ionic,
|
||||
html.ionic.ios,
|
||||
html.ionic.md {
|
||||
--ion-background-color: var(--background);
|
||||
--ion-font-family: initial;
|
||||
}
|
||||
|
||||
/**
|
||||
* Button styles should only be applied
|
||||
* to native buttons that are not part of the
|
||||
|
||||
@@ -8,9 +8,7 @@ expect.extend({
|
||||
throw new Error('expected toHaveShadowPart to be called on an element with a shadow root');
|
||||
}
|
||||
|
||||
// Use attribute selector with ~= to match space-separated part values
|
||||
// e.g., [part~="knob"] matches elements with part="knob" or part="knob knob-a"
|
||||
const shadowPart = received.shadowRoot.querySelector(`[part~="${part}"]`);
|
||||
const shadowPart = received.shadowRoot.querySelector(`[part="${part}"]`);
|
||||
const pass = shadowPart !== null;
|
||||
|
||||
const message = `expected ${received.tagName.toLowerCase()} to have shadow part "${part}"`;
|
||||
|
||||
3047
core/src/components.d.ts
vendored
@@ -1,6 +0,0 @@
|
||||
// Accordion Group: Common
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
@use "../../themes/ionic/ionic.globals.scss" as globals;
|
||||
@use "./accordion-group.common";
|
||||
|
||||
// Ionic Accordion Group
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
min-width: calc(#{globals.$ion-scale-6200} + #{globals.$ion-space-600});
|
||||
|
||||
background-color: globals.$ion-bg-neutral-subtlest-default;
|
||||
}
|
||||
|
||||
// Inset Accordion Group
|
||||
// --------------------------------------------------
|
||||
// Shape and padding only apply if the group is inset
|
||||
|
||||
:host(.accordion-group-expand-inset) {
|
||||
@include globals.padding(globals.$ion-space-100);
|
||||
}
|
||||
|
||||
:host(.accordion-group-expand-inset.accordion-group-shape-round) {
|
||||
--border-radius: #{globals.$ion-round-xl};
|
||||
|
||||
@include globals.border-radius(globals.$ion-round-xl);
|
||||
}
|
||||
|
||||
:host(.accordion-group-expand-inset.accordion-group-shape-soft) {
|
||||
--border-radius: #{globals.$ion-soft-xl};
|
||||
|
||||
@include globals.border-radius(globals.$ion-soft-xl);
|
||||
}
|
||||
|
||||
:host(.accordion-group-expand-inset.accordion-group-shape-rectangular) {
|
||||
--border-radius: #{globals.$ion-rectangular-xl};
|
||||
|
||||
@include globals.border-radius(globals.$ion-rectangular-xl);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@import "./accordion-group.native";
|
||||
@import "./accordion-group";
|
||||
|
||||
// iOS Accordion Group
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import "./accordion-group.native";
|
||||
@import "./accordion-group";
|
||||
@import "../accordion/accordion.md.vars";
|
||||
|
||||
// Material Design Accordion Group
|
||||
@@ -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) {
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
@import "./accordion-group.common";
|
||||
@import "../../themes/native/native.globals";
|
||||
@import "../../themes/ionic.globals";
|
||||
@import "../accordion/accordion.vars";
|
||||
|
||||
// Accordion Group: Native
|
||||
// Accordion Group
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:host(.accordion-group-expand-inset) {
|
||||
@include margin($accordion-inset-margin, $accordion-inset-margin, $accordion-inset-margin, $accordion-inset-margin);
|
||||
}
|
||||
@@ -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.ionic.scss',
|
||||
},
|
||||
shadow: true,
|
||||
})
|
||||
@@ -60,16 +58,6 @@ export class AccordionGroup implements ComponentInterface {
|
||||
*/
|
||||
@Prop() expand: 'compact' | 'inset' = 'compact';
|
||||
|
||||
/**
|
||||
* Set to `"soft"` for an accordion group with slightly rounded corners,
|
||||
* `"round"` for an accordion group with fully rounded corners, or
|
||||
* `"rectangular"` for an accordion group without rounded corners.
|
||||
*
|
||||
* Defaults to `"round"` for the `ionic` theme, undefined for all other themes.
|
||||
* Only applies when `expand` is set to `"inset"`.
|
||||
*/
|
||||
@Prop() shape?: 'soft' | 'round' | 'rectangular';
|
||||
|
||||
/**
|
||||
* Emitted when the value property has changed as a result of a user action such as a click.
|
||||
*
|
||||
@@ -288,35 +276,17 @@ export class AccordionGroup implements ComponentInterface {
|
||||
return Array.from(this.el.querySelectorAll(':scope > ion-accordion')) as HTMLIonAccordionElement[];
|
||||
}
|
||||
|
||||
private getShape(): string | undefined {
|
||||
const theme = getIonTheme(this);
|
||||
const { shape } = this;
|
||||
|
||||
// TODO(ROU-11328): Remove theme check when shapes are defined for all themes.
|
||||
if (theme !== 'ionic') {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (shape === undefined) {
|
||||
return 'round';
|
||||
}
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
||||
render() {
|
||||
const { disabled, readonly, expand } = this;
|
||||
const theme = getIonTheme(this);
|
||||
const shape = this.getShape();
|
||||
const mode = getIonMode(this);
|
||||
|
||||
return (
|
||||
<Host
|
||||
class={{
|
||||
[theme]: true,
|
||||
[mode]: true,
|
||||
'accordion-group-disabled': disabled,
|
||||
'accordion-group-readonly': readonly,
|
||||
[`accordion-group-expand-${expand}`]: true,
|
||||
[`accordion-group-shape-${shape}`]: shape !== undefined,
|
||||
}}
|
||||
role="presentation"
|
||||
>
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { configs, test } from '@utils/test/playwright';
|
||||
|
||||
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
|
||||
test.describe(title('accordion-group: expand'), () => {
|
||||
test.describe(title('compact'), () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
/* Background styles to show the border radius */
|
||||
:root {
|
||||
--background: #ccc7c7;
|
||||
}
|
||||
</style>
|
||||
<ion-accordion-group>
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-group-expand-compact'));
|
||||
});
|
||||
|
||||
test('should not have visual regressions when expanded', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
/* Background styles to show the border radius */
|
||||
:root {
|
||||
--background: #ccc7c7;
|
||||
}
|
||||
</style>
|
||||
<ion-accordion-group value="first">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-group-expand-compact-expanded'));
|
||||
});
|
||||
});
|
||||
|
||||
test.describe(title('inset'), () => {
|
||||
test('should not have visual regressions', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
/* Background styles to show the border radius */
|
||||
:root {
|
||||
--background: #ccc7c7;
|
||||
}
|
||||
</style>
|
||||
<ion-accordion-group expand="inset">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-group-expand-inset'));
|
||||
});
|
||||
|
||||
test('should not have visual regressions when expanded', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
/* Background styles to show the border radius */
|
||||
:root {
|
||||
--background: #ccc7c7;
|
||||
}
|
||||
</style>
|
||||
<ion-accordion-group value="first" expand="inset">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-group-expand-inset-expanded'));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.9 KiB |
@@ -1,135 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Accordion Group - Expand</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
|
||||
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
|
||||
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
|
||||
<script src="../../../../../scripts/testing/scripts.js"></script>
|
||||
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
|
||||
<style>
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-row-gap: 20px;
|
||||
grid-column-gap: 20px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
|
||||
color: #6f7378;
|
||||
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ion-app>
|
||||
<ion-header translucent="true">
|
||||
<ion-toolbar>
|
||||
<ion-title>Accordion Group - Expand</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content fullscreen="true" color="light">
|
||||
<div class="grid ion-padding">
|
||||
<div class="grid-item">
|
||||
<h2>Default</h2>
|
||||
<ion-accordion-group>
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Default: Expanded</h2>
|
||||
<ion-accordion-group value="first">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Inset</h2>
|
||||
<ion-accordion-group expand="inset">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Inset: Expanded</h2>
|
||||
<ion-accordion-group value="first" expand="inset">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-app>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,47 +0,0 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { configs, test } from '@utils/test/playwright';
|
||||
|
||||
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
|
||||
test.describe(title('accordion-group: shape'), () => {
|
||||
['round', 'soft', 'rectangular'].forEach((shape) => {
|
||||
test(`${shape} - should not have visual regressions`, async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
/* Background styles to show the border radius */
|
||||
:root {
|
||||
--background: #222;
|
||||
}
|
||||
</style>
|
||||
|
||||
<ion-accordion-group value="first" expand="inset" shape="${shape}">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot(`accordion-group-shape-${shape}`));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,135 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Accordion Group - Shape</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
|
||||
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
|
||||
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
|
||||
<script src="../../../../../scripts/testing/scripts.js"></script>
|
||||
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
|
||||
<style>
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-row-gap: 20px;
|
||||
grid-column-gap: 20px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
|
||||
color: #6f7378;
|
||||
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ion-app>
|
||||
<ion-header translucent="true">
|
||||
<ion-toolbar>
|
||||
<ion-title>Accordion Group - Shape</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content fullscreen="true" color="light">
|
||||
<div class="grid ion-padding">
|
||||
<div class="grid-item">
|
||||
<h2>Default</h2>
|
||||
<ion-accordion-group expand="inset" value="first">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Round</h2>
|
||||
<ion-accordion-group expand="inset" value="first" shape="round">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Soft</h2>
|
||||
<ion-accordion-group expand="inset" value="first" shape="soft">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Rectangular</h2>
|
||||
<ion-accordion-group expand="inset" value="first" shape="rectangular">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-app>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,38 +0,0 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { configs, test } from '@utils/test/playwright';
|
||||
|
||||
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
|
||||
test.describe(title('accordion-group: states'), () => {
|
||||
test('should render disabled state', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-accordion-group value="first" disabled="true">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-group-disabled'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 11 KiB |
@@ -1,89 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Accordion Group - States</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
|
||||
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
|
||||
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
|
||||
<script src="../../../../../scripts/testing/scripts.js"></script>
|
||||
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
|
||||
<style>
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-row-gap: 20px;
|
||||
grid-column-gap: 20px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
|
||||
color: #6f7378;
|
||||
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ion-app>
|
||||
<ion-header translucent="true">
|
||||
<ion-toolbar>
|
||||
<ion-title>Accordion Group - States</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content fullscreen="true" color="light">
|
||||
<div class="grid ion-padding">
|
||||
<div class="grid-item">
|
||||
<h2>Default</h2>
|
||||
<ion-accordion-group value="first">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Disabled</h2>
|
||||
<ion-accordion-group value="first" disabled="true">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-app>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,76 +0,0 @@
|
||||
@use "../../themes/ionic/ionic.globals.scss" as globals;
|
||||
@use "./accordion.common";
|
||||
|
||||
// Ionic Accordion
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
// The border is added to the ::after element
|
||||
// to properly inset the border relative to the entire
|
||||
// accordion, rather than just the header.
|
||||
:host::after {
|
||||
@include globals.margin(null, globals.$ion-space-400, null, globals.$ion-space-400);
|
||||
@include globals.position(null, 0, 0, 0);
|
||||
|
||||
display: block;
|
||||
|
||||
position: absolute;
|
||||
|
||||
height: globals.$ion-border-size-025;
|
||||
|
||||
background-color: globals.$ion-border-default;
|
||||
|
||||
content: "";
|
||||
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
:host(.accordion-animated) {
|
||||
transition: all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);
|
||||
}
|
||||
|
||||
:host(.accordion-animated) #content {
|
||||
transition: max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);
|
||||
}
|
||||
|
||||
// Accordion Header
|
||||
// --------------------------------------------------
|
||||
|
||||
// The border is removed from the item in the header because
|
||||
// we are adding a border to the ::after element of the accordion.
|
||||
::slotted(ion-item[slot="header"]) {
|
||||
--border-radius: inherit;
|
||||
--color: #{globals.$ion-text-default};
|
||||
--border-width: #{globals.$ion-border-size-0};
|
||||
--inner-border-width: #{globals.$ion-scale-0};
|
||||
--min-height: #{globals.$ion-scale-700};
|
||||
--padding-top: #{globals.$ion-space-300};
|
||||
--padding-end: #{globals.$ion-space-400};
|
||||
--padding-bottom: #{globals.$ion-space-300};
|
||||
--padding-start: #{globals.$ion-space-400};
|
||||
|
||||
@include globals.typography(globals.$ion-heading-h6-medium);
|
||||
}
|
||||
|
||||
// Accordion Content
|
||||
// --------------------------------------------------
|
||||
|
||||
#content-wrapper {
|
||||
@include globals.padding(globals.$ion-space-300, globals.$ion-space-400);
|
||||
@include globals.typography(globals.$ion-body-md-regular);
|
||||
|
||||
color: globals.$ion-text-default;
|
||||
}
|
||||
|
||||
// Disabled Accordion
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.accordion-disabled)::before {
|
||||
@include globals.border-radius(inherit);
|
||||
@include globals.disabled-state();
|
||||
|
||||
z-index: 2;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@import "./accordion.native";
|
||||
@import "./accordion.scss";
|
||||
@import "../item/item.ios.vars";
|
||||
|
||||
// iOS Accordion
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@import "./accordion.native";
|
||||
@import "./accordion.scss";
|
||||
|
||||
// Material Design Accordion
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
@import "./accordion.common";
|
||||
@import "./accordion.vars.scss";
|
||||
|
||||
// Accordion: Native
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
background-color: $accordion-background-color;
|
||||
}
|
||||
|
||||
:host(.accordion-animated) {
|
||||
transition: all $accordion-transition-duration $accordion-transition-easing;
|
||||
}
|
||||
|
||||
:host(.accordion-animated) #content {
|
||||
transition: max-height $accordion-transition-duration $accordion-transition-easing;
|
||||
}
|
||||
|
||||
/**
|
||||
* We do not set the opacity on the
|
||||
* host otherwise you would see the
|
||||
* box-shadow behind it.
|
||||
*/
|
||||
:host(.accordion-disabled) #header,
|
||||
:host(.accordion-disabled) #content {
|
||||
opacity: $accordion-disabled-opacity;
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
// Accordion: Common
|
||||
@import "./accordion.vars.scss";
|
||||
|
||||
// Accordion
|
||||
// --------------------------------------------------
|
||||
|
||||
:host {
|
||||
@@ -8,6 +10,8 @@
|
||||
|
||||
width: 100%;
|
||||
|
||||
background-color: $accordion-background-color;
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
/**
|
||||
@@ -26,6 +30,14 @@
|
||||
--border-width: 0px;
|
||||
}
|
||||
|
||||
:host(.accordion-animated) {
|
||||
transition: all $accordion-transition-duration $accordion-transition-easing;
|
||||
}
|
||||
|
||||
:host(.accordion-animated) #content {
|
||||
transition: max-height $accordion-transition-duration $accordion-transition-easing;
|
||||
}
|
||||
|
||||
#content {
|
||||
overflow: hidden;
|
||||
|
||||
@@ -60,6 +72,16 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* We do not set the opacity on the
|
||||
* host otherwise you would see the
|
||||
* box-shadow behind it.
|
||||
*/
|
||||
:host(.accordion-disabled) #header,
|
||||
:host(.accordion-disabled) #content {
|
||||
opacity: $accordion-disabled-opacity;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
:host,
|
||||
#content {
|
||||
@@ -1,12 +1,10 @@
|
||||
import caretDownRegular from '@phosphor-icons/core/assets/regular/caret-down.svg';
|
||||
import type { ComponentInterface } from '@stencil/core';
|
||||
import { Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';
|
||||
import { addEventListener, getElementRoot, raf, removeEventListener, transitionEndAsync } from '@utils/helpers';
|
||||
import { hostContext } from '@utils/theme';
|
||||
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,
|
||||
@@ -16,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.
|
||||
@@ -34,7 +31,6 @@ const enum AccordionState {
|
||||
styleUrls: {
|
||||
ios: 'accordion.ios.scss',
|
||||
md: 'accordion.md.scss',
|
||||
ionic: 'accordion.ionic.scss',
|
||||
},
|
||||
shadow: {
|
||||
delegatesFocus: true,
|
||||
@@ -82,7 +78,7 @@ export class Accordion implements ComponentInterface {
|
||||
|
||||
private currentRaf: number | undefined;
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
@Element() el?: HTMLElement;
|
||||
|
||||
@State() state: AccordionState = AccordionState.Collapsed;
|
||||
@State() isNext = false;
|
||||
@@ -133,7 +129,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
|
||||
@@ -241,34 +237,13 @@ export class Accordion implements ComponentInterface {
|
||||
button.setAttribute('aria-expanded', `${expanded}`);
|
||||
};
|
||||
|
||||
get accordionToggleIcon() {
|
||||
// Return the icon if it is explicitly set
|
||||
if (this.toggleIcon != null) {
|
||||
return this.toggleIcon;
|
||||
}
|
||||
|
||||
// Determine the theme and map to default icons
|
||||
const theme = getIonTheme(this);
|
||||
const defaultIcons = {
|
||||
ios: chevronDown,
|
||||
ionic: caretDownRegular,
|
||||
md: chevronDown,
|
||||
};
|
||||
|
||||
// Get the default icon based on the theme, falling back to 'md' icon if necessary
|
||||
const defaultIcon = defaultIcons[theme] || defaultIcons.md;
|
||||
|
||||
// Return the configured accordion toggle icon or the default icon
|
||||
return config.get('accordionToggleIcon', defaultIcon);
|
||||
}
|
||||
|
||||
private slotToggleIcon = () => {
|
||||
const ionItem = this.getSlottedHeaderIonItem();
|
||||
if (!ionItem) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { accordionToggleIcon, toggleIconSlot } = this;
|
||||
const { toggleIconSlot, toggleIcon } = this;
|
||||
|
||||
/**
|
||||
* Check if there already is a toggle icon.
|
||||
@@ -283,7 +258,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);
|
||||
@@ -461,6 +436,10 @@ export class Accordion implements ComponentInterface {
|
||||
};
|
||||
|
||||
private getNextSibling = () => {
|
||||
if (!this.el) {
|
||||
return;
|
||||
}
|
||||
|
||||
const nextSibling = this.el.nextElementSibling;
|
||||
|
||||
if (nextSibling?.tagName !== 'ION-ACCORDION') {
|
||||
@@ -471,6 +450,10 @@ export class Accordion implements ComponentInterface {
|
||||
};
|
||||
|
||||
private getPreviousSibling = () => {
|
||||
if (!this.el) {
|
||||
return;
|
||||
}
|
||||
|
||||
const previousSibling = this.el.previousElementSibling;
|
||||
|
||||
if (previousSibling?.tagName !== 'ION-ACCORDION') {
|
||||
@@ -507,7 +490,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';
|
||||
@@ -517,7 +500,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,
|
||||
@@ -530,10 +513,7 @@ export class Accordion implements ComponentInterface {
|
||||
'accordion-readonly': readonly,
|
||||
|
||||
'accordion-animated': this.shouldAnimate(),
|
||||
|
||||
'in-accordion-group-expand-inset': hostContext('.accordion-group-expand-inset', this.el),
|
||||
}}
|
||||
tabindex={disabled ? '-1' : undefined}
|
||||
>
|
||||
<div
|
||||
onClick={() => this.toggleExpanded()}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -12,7 +12,6 @@ configs().forEach(({ config, screenshot, title }) => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
configs({ directions: ['ltr'] }).forEach(({ config, title }) => {
|
||||
test.describe(title('accordion: ionChange'), () => {
|
||||
test.beforeEach(async ({ page }) => {
|
||||
@@ -59,39 +58,3 @@ configs({ directions: ['ltr'] }).forEach(({ config, title }) => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
configs({ modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
|
||||
test.describe(title('accordion: basic'), () => {
|
||||
test('should not have visual regressions with text content', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-accordion-group value="first">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordion = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordion).toHaveScreenshot(screenshot('accordion-basic-text'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,7 +1,7 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { configs, test } from '@utils/test/playwright';
|
||||
|
||||
configs({ directions: ['ltr'], modes: ['ionic-md', 'md', 'ios'] }).forEach(({ config, screenshot, title }) => {
|
||||
configs({ directions: ['ltr'] }).forEach(({ config, screenshot, title }) => {
|
||||
test.describe(title('accordion: multiple'), () => {
|
||||
test('should update value and visually expand items', async ({ page }) => {
|
||||
await page.goto(`/src/components/accordion/test/multiple`, config);
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,48 +0,0 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { configs, test } from '@utils/test/playwright';
|
||||
|
||||
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
|
||||
test.describe(title('accordion: shape'), () => {
|
||||
['round', 'soft', 'rectangular'].forEach((shape) => {
|
||||
test(`${shape} - should not have visual regressions`, async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
/* Background styles to show the border radius */
|
||||
:root {
|
||||
--background: #222;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Focused accordion to show the border radius -->
|
||||
<ion-accordion-group value="first" expand="inset" shape="${shape}">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header" class="ion-focused">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot(`accordion-shape-${shape}`));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,135 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Accordion - Shape</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
|
||||
<link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
|
||||
<link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
|
||||
<script src="../../../../../scripts/testing/scripts.js"></script>
|
||||
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
|
||||
<style>
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
grid-row-gap: 20px;
|
||||
grid-column-gap: 20px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
|
||||
color: #6f7378;
|
||||
|
||||
margin-top: 10px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ion-app>
|
||||
<ion-header translucent="true">
|
||||
<ion-toolbar>
|
||||
<ion-title>Accordion - Shape</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
<ion-content fullscreen="true" color="light">
|
||||
<div class="grid ion-padding">
|
||||
<div class="grid-item">
|
||||
<h2>Default</h2>
|
||||
<ion-accordion-group expand="inset" value="first">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header" class="ion-focused">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Round</h2>
|
||||
<ion-accordion-group expand="inset" value="first" shape="round">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header" class="ion-focused">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Soft</h2>
|
||||
<ion-accordion-group expand="inset" value="first" shape="soft">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header" class="ion-focused">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
<div class="grid-item">
|
||||
<h2>Rectangular</h2>
|
||||
<ion-accordion-group expand="inset" value="first" shape="rectangular">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header" class="ion-focused">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-app>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,198 +0,0 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { configs, test } from '@utils/test/playwright';
|
||||
|
||||
configs({ directions: ['ltr'], modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
|
||||
test.describe(title('accordion: states'), () => {
|
||||
test('should render disabled state', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-accordion-group value="first">
|
||||
<ion-accordion value="first" disabled="true">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-disabled'));
|
||||
});
|
||||
|
||||
test('should render activated state', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-accordion-group value="first">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header" class="ion-activated">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-activated'));
|
||||
});
|
||||
|
||||
test('should render focused state', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-accordion-group value="first">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header" class="ion-focused">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-focused'));
|
||||
});
|
||||
|
||||
test('should render disabled state when group is inset', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-accordion-group value="first" expand="inset">
|
||||
<ion-accordion value="first" disabled="true">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-inset-disabled'));
|
||||
});
|
||||
|
||||
test('should render activated state when group is inset', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-accordion-group value="first" expand="inset">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header" class="ion-activated">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-inset-activated'));
|
||||
});
|
||||
|
||||
test('should render focused state when group is inset', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-accordion-group value="first" expand="inset">
|
||||
<ion-accordion value="first">
|
||||
<ion-item slot="header" class="ion-focused">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="second">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
<ion-accordion value="third">
|
||||
<ion-item slot="header">
|
||||
<ion-label>Accordion title</ion-label>
|
||||
</ion-item>
|
||||
<div slot="content">This is the body of the accordion.</div>
|
||||
</ion-accordion>
|
||||
</ion-accordion-group>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const accordionGroup = page.locator('ion-accordion-group');
|
||||
|
||||
await expect(accordionGroup).toHaveScreenshot(screenshot('accordion-states-inset-focused'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |