Compare commits
39 Commits
v7.5.3
...
sp/stencil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
395b14317f | ||
|
|
9fad566175 | ||
|
|
6dcf9cadb3 | ||
|
|
9bb45b3772 | ||
|
|
78ce39f8c6 | ||
|
|
093c671e3e | ||
|
|
ed80b7f118 | ||
|
|
83f9ac0fac | ||
|
|
a000dd2c0b | ||
|
|
04d32b6d68 | ||
|
|
342511959a | ||
|
|
900267eb36 | ||
|
|
73b8bfde3f | ||
|
|
f0a5d2704c | ||
|
|
fbc9f53d35 | ||
|
|
d69ad43482 | ||
|
|
33200a9311 | ||
|
|
aeeb84b77d | ||
|
|
61b6bd0a0a | ||
|
|
8227b0ee6d | ||
|
|
c1304b7004 | ||
|
|
c5dd622bbe | ||
|
|
c053fd9c68 | ||
|
|
9e1e55a898 | ||
|
|
4513e0c6b0 | ||
|
|
95b52ac8ba | ||
|
|
5bd4af2c51 | ||
|
|
8b877f8fb9 | ||
|
|
c765dcbac4 | ||
|
|
dfaa006a7a | ||
|
|
dfafb27435 | ||
|
|
63a8b765bb | ||
|
|
cafafcc9d1 | ||
|
|
00c3a4431a | ||
|
|
ed040b09e9 | ||
|
|
b7d1a5c86b | ||
|
|
a4551470a9 | ||
|
|
70212d5ab2 | ||
|
|
a608a11ad0 |
@@ -8,7 +8,7 @@ runs:
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 18
|
||||
- uses: ./.github/workflows/actions/download-archive
|
||||
with:
|
||||
name: ionic-core
|
||||
|
||||
2
.github/workflows/build.yml
vendored
@@ -140,7 +140,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
apps: [ng14, ng15, ng16]
|
||||
apps: [ng14, ng15, ng16, ng17]
|
||||
needs: [build-angular, build-angular-server]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
29
CHANGELOG.md
@@ -3,6 +3,35 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [7.5.5](https://github.com/ionic-team/ionic-framework/compare/v7.5.4...v7.5.5) (2023-11-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **accordion-group:** correct accordion is open on load ([#28510](https://github.com/ionic-team/ionic-framework/issues/28510)) ([a000dd2](https://github.com/ionic-team/ionic-framework/commit/a000dd2c0b65be8ab5b2ad19f2748fbca13d5085)), closes [#28506](https://github.com/ionic-team/ionic-framework/issues/28506)
|
||||
* **action-sheet:** adjust height for safe area with scrollable options ([#28504](https://github.com/ionic-team/ionic-framework/issues/28504)) ([900267e](https://github.com/ionic-team/ionic-framework/commit/900267eb36c36f2af63435f6b46acca52b3bdab7)), closes [#27777](https://github.com/ionic-team/ionic-framework/issues/27777)
|
||||
* **header:** collapsible large title does not flicker when collapse prop not reflected ([#28472](https://github.com/ionic-team/ionic-framework/issues/28472)) ([8227b0e](https://github.com/ionic-team/ionic-framework/commit/8227b0ee6d5250e122a34a83c644f8a74fbbafd5)), closes [#28466](https://github.com/ionic-team/ionic-framework/issues/28466)
|
||||
* **item-divider:** apply safe area to proper side regardless of direction ([#28420](https://github.com/ionic-team/ionic-framework/issues/28420)) ([4513e0c](https://github.com/ionic-team/ionic-framework/commit/4513e0c6b066d4990800c707e1d97f69c8fcfb0c))
|
||||
* **radio-group:** emit value change on componentDidLoad ([#28488](https://github.com/ionic-team/ionic-framework/issues/28488)) ([73b8bfd](https://github.com/ionic-team/ionic-framework/commit/73b8bfde3f060490958c10f58d0f68de80cb957f)), closes [#28356](https://github.com/ionic-team/ionic-framework/issues/28356)
|
||||
* **searchbar:** cancel icon aligns with back button ([#28478](https://github.com/ionic-team/ionic-framework/issues/28478)) ([c053fd9](https://github.com/ionic-team/ionic-framework/commit/c053fd9c68d9b1add1335db80be962215946a0b1)), closes [#28468](https://github.com/ionic-team/ionic-framework/issues/28468)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [7.5.4](https://github.com/ionic-team/ionic-framework/compare/v7.5.3...v7.5.4) (2023-11-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **inputs:** remove invalid legacy warnings in input, textarea, and select ([#28484](https://github.com/ionic-team/ionic-framework/issues/28484)) ([c765dcb](https://github.com/ionic-team/ionic-framework/commit/c765dcbac4148762768d8c2bea9103e7d38c510b))
|
||||
* **item:** apply safe area to proper side regardless of direction ([#28403](https://github.com/ionic-team/ionic-framework/issues/28403)) ([ed040b0](https://github.com/ionic-team/ionic-framework/commit/ed040b09e9cbd4246864e690542132defc6a6578))
|
||||
* **list:** remove border from last item with item-sliding ([#28439](https://github.com/ionic-team/ionic-framework/issues/28439)) ([cafafcc](https://github.com/ionic-team/ionic-framework/commit/cafafcc9d166ef536dcb73edd522c8f2a0fb95b6)), closes [#28435](https://github.com/ionic-team/ionic-framework/issues/28435)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [7.5.3](https://github.com/ionic-team/ionic-framework/compare/v7.5.2...v7.5.3) (2023-11-01)
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,38 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [7.5.5](https://github.com/ionic-team/ionic-framework/compare/v7.5.4...v7.5.5) (2023-11-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **accordion-group:** correct accordion is open on load ([#28510](https://github.com/ionic-team/ionic-framework/issues/28510)) ([a000dd2](https://github.com/ionic-team/ionic-framework/commit/a000dd2c0b65be8ab5b2ad19f2748fbca13d5085)), closes [#28506](https://github.com/ionic-team/ionic-framework/issues/28506)
|
||||
* **action-sheet:** adjust height for safe area with scrollable options ([#28504](https://github.com/ionic-team/ionic-framework/issues/28504)) ([900267e](https://github.com/ionic-team/ionic-framework/commit/900267eb36c36f2af63435f6b46acca52b3bdab7)), closes [#27777](https://github.com/ionic-team/ionic-framework/issues/27777)
|
||||
* **header:** collapsible large title does not flicker when collapse prop not reflected ([#28472](https://github.com/ionic-team/ionic-framework/issues/28472)) ([8227b0e](https://github.com/ionic-team/ionic-framework/commit/8227b0ee6d5250e122a34a83c644f8a74fbbafd5)), closes [#28466](https://github.com/ionic-team/ionic-framework/issues/28466)
|
||||
* **item-divider:** apply safe area to proper side regardless of direction ([#28420](https://github.com/ionic-team/ionic-framework/issues/28420)) ([4513e0c](https://github.com/ionic-team/ionic-framework/commit/4513e0c6b066d4990800c707e1d97f69c8fcfb0c))
|
||||
* **radio-group:** emit value change on componentDidLoad ([#28488](https://github.com/ionic-team/ionic-framework/issues/28488)) ([73b8bfd](https://github.com/ionic-team/ionic-framework/commit/73b8bfde3f060490958c10f58d0f68de80cb957f)), closes [#28356](https://github.com/ionic-team/ionic-framework/issues/28356)
|
||||
* **searchbar:** cancel icon aligns with back button ([#28478](https://github.com/ionic-team/ionic-framework/issues/28478)) ([c053fd9](https://github.com/ionic-team/ionic-framework/commit/c053fd9c68d9b1add1335db80be962215946a0b1)), closes [#28468](https://github.com/ionic-team/ionic-framework/issues/28468)
|
||||
|
||||
> [!NOTE]
|
||||
> Ionic Vue developers utilizing the `v-ion-change` or `v-ion-input` workaround for https://github.com/ionic-team/ionic-framework/issues/27292 should remove this workaround when updating to Ionic v7.5.5.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [7.5.4](https://github.com/ionic-team/ionic-framework/compare/v7.5.3...v7.5.4) (2023-11-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **inputs:** remove invalid legacy warnings in input, textarea, and select ([#28484](https://github.com/ionic-team/ionic-framework/issues/28484)) ([c765dcb](https://github.com/ionic-team/ionic-framework/commit/c765dcbac4148762768d8c2bea9103e7d38c510b))
|
||||
* **item:** apply safe area to proper side regardless of direction ([#28403](https://github.com/ionic-team/ionic-framework/issues/28403)) ([ed040b0](https://github.com/ionic-team/ionic-framework/commit/ed040b09e9cbd4246864e690542132defc6a6578))
|
||||
* **list:** remove border from last item with item-sliding ([#28439](https://github.com/ionic-team/ionic-framework/issues/28439)) ([cafafcc](https://github.com/ionic-team/ionic-framework/commit/cafafcc9d166ef536dcb73edd522c8f2a0fb95b6)), closes [#28435](https://github.com/ionic-team/ionic-framework/issues/28435)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [7.5.3](https://github.com/ionic-team/ionic-framework/compare/v7.5.2...v7.5.3) (2023-11-01)
|
||||
|
||||
|
||||
|
||||
4130
core/package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ionic/core",
|
||||
"version": "7.5.3",
|
||||
"version": "7.5.5",
|
||||
"description": "Base components for Ionic",
|
||||
"keywords": [
|
||||
"ionic",
|
||||
@@ -31,7 +31,7 @@
|
||||
"loader/"
|
||||
],
|
||||
"dependencies": {
|
||||
"@stencil/core": "^4.6.0",
|
||||
"@stencil/core": "^4.6.0-dev.1698410852.c526078",
|
||||
"ionicons": "^7.2.1",
|
||||
"tslib": "^2.1.0"
|
||||
},
|
||||
@@ -43,15 +43,14 @@
|
||||
"@capacitor/status-bar": "^5.0.6",
|
||||
"@ionic/eslint-config": "^0.3.0",
|
||||
"@ionic/prettier-config": "^2.0.0",
|
||||
"@jest/core": "^27.5.1",
|
||||
"@playwright/test": "^1.39.0",
|
||||
"@rollup/plugin-node-resolve": "^8.4.0",
|
||||
"@rollup/plugin-virtual": "^2.0.3",
|
||||
"@stencil/angular-output-target": "^0.8.3",
|
||||
"@stencil/react-output-target": "^0.5.3",
|
||||
"@stencil/sass": "^3.0.7",
|
||||
"@stencil/vue-output-target": "^0.8.6",
|
||||
"@types/jest": "^27.5.2",
|
||||
"@stencil/vue-output-target": "^0.8.7",
|
||||
"@types/jest": "^29.5.6",
|
||||
"@types/node": "^14.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
||||
"@typescript-eslint/parser": "^6.7.2",
|
||||
@@ -62,8 +61,8 @@
|
||||
"eslint-plugin-custom-rules": "file:custom-rules",
|
||||
"execa": "^5.0.0",
|
||||
"fs-extra": "^9.0.1",
|
||||
"jest": "^27.5.1",
|
||||
"jest-cli": "^27.5.1",
|
||||
"jest": "^29.7.0",
|
||||
"jest-cli": "^29.7.0",
|
||||
"prettier": "^2.6.1",
|
||||
"rollup": "^2.26.4",
|
||||
"sass": "^1.33.0",
|
||||
@@ -86,13 +85,11 @@
|
||||
"lint.sass.fix": "npm run lint.sass -- --fix",
|
||||
"lint.ts": "npm run eslint",
|
||||
"lint.ts.fix": "npm run eslint -- --fix",
|
||||
"prerelease": "npm run validate && np prerelease --yolo --any-branch --tag next",
|
||||
"prerender.e2e": "node scripts/testing/prerender.js",
|
||||
"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",
|
||||
"test.spec.debug": "npx --node-arg=\"--inspect-brk\" stencil test --spec",
|
||||
"test.e2e": "npx playwright test",
|
||||
"test.e2e.update-snapshots": "npm run test.e2e -- --update-snapshots",
|
||||
"test.watch": "jest --watch --no-cache",
|
||||
|
||||
@@ -180,6 +180,16 @@ export class AccordionGroup implements ComponentInterface {
|
||||
if (this.readonly) {
|
||||
this.readonlyChanged();
|
||||
}
|
||||
/**
|
||||
* When binding values in frameworks such as Angular
|
||||
* it is possible for the value to be set after the Web Component
|
||||
* initializes but before the value watcher is set up in Stencil.
|
||||
* As a result, the watcher callback may not be fired.
|
||||
* We work around this by manually calling the watcher
|
||||
* callback when the component has loaded and the watcher
|
||||
* is configured.
|
||||
*/
|
||||
this.valueChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -128,8 +128,8 @@
|
||||
height: 100%;
|
||||
|
||||
/* Fallback for browsers that do not support dvh */
|
||||
max-height: 100vh;
|
||||
max-height: 100dvh;
|
||||
max-height: calc(100vh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));
|
||||
max-height: calc(100dvh - (var(--ion-safe-area-top, 0) + var(--ion-safe-area-bottom, 0)));
|
||||
}
|
||||
|
||||
.action-sheet-group {
|
||||
|
||||
@@ -100,3 +100,69 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ config, title }) =>
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* This behavior needs to be tested in both modes but does not vary
|
||||
* across directions due to the component only applying safe area
|
||||
* to the top and bottom
|
||||
*/
|
||||
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('action-sheet: basic'), () => {
|
||||
test.describe('safe area', () => {
|
||||
test('should have padding added by the safe area', async ({ page }, testInfo) => {
|
||||
testInfo.annotations.push({
|
||||
type: 'issue',
|
||||
description: 'https://github.com/ionic-team/ionic-framework/issues/27777',
|
||||
});
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
:root {
|
||||
--ion-safe-area-top: 60px;
|
||||
--ion-safe-area-bottom: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<ion-action-sheet></ion-action-sheet>
|
||||
|
||||
<script>
|
||||
const actionSheet = document.querySelector('ion-action-sheet');
|
||||
actionSheet.header = 'Header';
|
||||
actionSheet.subHeader = 'Sub Header';
|
||||
actionSheet.buttons = [
|
||||
'Add Reaction',
|
||||
'Copy Text',
|
||||
'Share Text',
|
||||
'Copy Link to Message',
|
||||
'Remind Me',
|
||||
'Pin File',
|
||||
'Star File',
|
||||
'Mark Unread',
|
||||
'Mark Read',
|
||||
'Edit Title',
|
||||
'Erase Title',
|
||||
'Save Image',
|
||||
'Copy Image',
|
||||
'Erase Image',
|
||||
'Delete File',
|
||||
{
|
||||
text: 'Cancel',
|
||||
role: 'cancel'
|
||||
},
|
||||
];
|
||||
</script>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const ionActionSheetDidPresent = await page.spyOnEvent('ionActionSheetDidPresent');
|
||||
const actionSheet = page.locator('ion-action-sheet');
|
||||
|
||||
await actionSheet.evaluate((el: HTMLIonActionSheetElement) => el.present());
|
||||
await ionActionSheetDidPresent.next();
|
||||
|
||||
await expect(actionSheet).toHaveScreenshot(screenshot(`action-sheet-safe-area`));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 15 KiB |
@@ -136,7 +136,3 @@
|
||||
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
:host .datetime-view-buttons ion-button {
|
||||
color: $text-color-step-200;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,10 @@
|
||||
* 2. This will only apply when that content has a collapse header (ion-header[collapse="condense"])
|
||||
*
|
||||
* We use opacity: 0 to avoid a layout shift.
|
||||
* We target both the attribute and the class in the event that the attribute
|
||||
* is not reflected on the host in some frameworks.
|
||||
*/
|
||||
ion-header:not(.header-collapse-main):has(~ ion-content ion-header[collapse="condense"]) {
|
||||
ion-header:not(.header-collapse-main):has(~ ion-content ion-header[collapse="condense"],
|
||||
~ ion-content ion-header.header-collapse-condense) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@@ -31,12 +31,19 @@
|
||||
|
||||
@include font-smoothing();
|
||||
@include margin(0);
|
||||
@include padding(
|
||||
var(--padding-top),
|
||||
var(--padding-end),
|
||||
var(--padding-bottom),
|
||||
calc(var(--padding-start) + var(--ion-safe-area-left, 0px))
|
||||
);
|
||||
@include padding(var(--padding-top), null, var(--padding-bottom), null);
|
||||
|
||||
/* stylelint-disable */
|
||||
@include ltr() {
|
||||
padding-right: var(--padding-end);
|
||||
padding-left: calc(var(--padding-start) + var(--ion-safe-area-left, 0px));
|
||||
}
|
||||
|
||||
@include rtl() {
|
||||
padding-right: calc(var(--padding-start) + var(--ion-safe-area-right, 0px));
|
||||
padding-left: var(--padding-end);
|
||||
}
|
||||
/* stylelint-enable */
|
||||
|
||||
display: flex;
|
||||
|
||||
@@ -67,12 +74,19 @@
|
||||
|
||||
.item-divider-inner {
|
||||
@include margin(0);
|
||||
@include padding(
|
||||
var(--inner-padding-top),
|
||||
calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end)),
|
||||
var(--inner-padding-bottom),
|
||||
var(--inner-padding-start)
|
||||
);
|
||||
@include padding(var(--inner-padding-top), null, var(--inner-padding-bottom), null);
|
||||
|
||||
/* stylelint-disable */
|
||||
@include ltr() {
|
||||
padding-right: calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end));
|
||||
padding-left: var(--inner-padding-start);
|
||||
}
|
||||
|
||||
@include rtl() {
|
||||
padding-right: var(--inner-padding-start);
|
||||
padding-left: calc(var(--ion-safe-area-left, 0px) + var(--inner-padding-end));
|
||||
}
|
||||
/* stylelint-enable */
|
||||
|
||||
display: flex;
|
||||
|
||||
|
||||
@@ -46,5 +46,33 @@ configs().forEach(({ title, screenshot, config }) => {
|
||||
const divider = page.locator('ion-item-divider');
|
||||
await expect(divider).toHaveScreenshot(screenshot(`item-divider-icon-start`));
|
||||
});
|
||||
|
||||
/**
|
||||
* This behavior needs to be tested for all modes & directions
|
||||
* Safe padding should stay on the same side when the direction changes
|
||||
*/
|
||||
test('should have safe area padding', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
:root {
|
||||
--ion-safe-area-left: 40px;
|
||||
--ion-safe-area-right: 20px;
|
||||
}
|
||||
</style>
|
||||
<ion-list>
|
||||
<ion-item-divider>
|
||||
<ion-label>Item Divider</ion-label>
|
||||
<ion-button slot="end">Button</ion-button>
|
||||
</ion-item-divider>
|
||||
</ion-list>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const list = page.locator('ion-list');
|
||||
|
||||
await expect(list).toHaveScreenshot(screenshot('item-divider-safe-area'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
@@ -203,14 +203,21 @@
|
||||
.item-native {
|
||||
@include border-radius(var(--border-radius));
|
||||
@include margin(0);
|
||||
@include padding(
|
||||
var(--padding-top),
|
||||
var(--padding-end),
|
||||
var(--padding-bottom),
|
||||
calc(var(--padding-start) + var(--ion-safe-area-left, 0px))
|
||||
);
|
||||
@include padding(var(--padding-top), null, var(--padding-bottom));
|
||||
@include text-inherit();
|
||||
|
||||
/* stylelint-disable */
|
||||
@include ltr() {
|
||||
padding-right: var(--padding-end);
|
||||
padding-left: calc(var(--padding-start) + var(--ion-safe-area-left, 0px));
|
||||
}
|
||||
|
||||
@include rtl() {
|
||||
padding-right: calc(var(--padding-start) + var(--ion-safe-area-right, 0px));
|
||||
padding-left: var(--padding-end);
|
||||
}
|
||||
/* stylelint-enable */
|
||||
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
@@ -261,12 +268,19 @@ button, a {
|
||||
|
||||
.item-inner {
|
||||
@include margin(0);
|
||||
@include padding(
|
||||
var(--inner-padding-top),
|
||||
calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end)),
|
||||
var(--inner-padding-bottom),
|
||||
var(--inner-padding-start)
|
||||
);
|
||||
@include padding(var(--inner-padding-top), null, var(--inner-padding-bottom));
|
||||
|
||||
/* stylelint-disable */
|
||||
@include ltr() {
|
||||
padding-right: calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end));
|
||||
padding-left: var(--inner-padding-start);
|
||||
}
|
||||
|
||||
@include rtl() {
|
||||
padding-right: var(--inner-padding-start);
|
||||
padding-left: calc(var(--ion-safe-area-left, 0px) + var(--inner-padding-end));
|
||||
}
|
||||
/* stylelint-enable */
|
||||
|
||||
display: flex;
|
||||
|
||||
@@ -295,12 +309,19 @@ button, a {
|
||||
|
||||
.item-bottom {
|
||||
@include margin(0);
|
||||
@include padding(
|
||||
0,
|
||||
var(--inner-padding-end),
|
||||
0,
|
||||
calc(var(--padding-start) + var(--ion-safe-area-left, 0px))
|
||||
);
|
||||
@include padding(0, null);
|
||||
|
||||
/* stylelint-disable */
|
||||
@include ltr() {
|
||||
padding-left: calc(var(--padding-start) + var(--ion-safe-area-left, 0px));
|
||||
padding-right: calc(var(--inner-padding-end) + var(--ion-safe-area-right, 0px));
|
||||
}
|
||||
|
||||
@include rtl() {
|
||||
padding-left: calc(var(--inner-padding-end) + var(--ion-safe-area-left, 0px));
|
||||
padding-right: calc(var(--padding-start) + var(--ion-safe-area-right, 0px));
|
||||
}
|
||||
/* stylelint-enable */
|
||||
|
||||
display: flex;
|
||||
|
||||
|
||||
@@ -10,5 +10,37 @@ configs().forEach(({ title, screenshot, config }) => {
|
||||
|
||||
await expect(page).toHaveScreenshot(screenshot(`item-diff`));
|
||||
});
|
||||
|
||||
/**
|
||||
* This behavior needs to be tested for all modes & directions
|
||||
* Safe padding should stay on the same side when the direction changes
|
||||
*/
|
||||
test('should have safe area padding', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
:root {
|
||||
--ion-safe-area-left: 40px;
|
||||
--ion-safe-area-right: 20px;
|
||||
}
|
||||
</style>
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-label>Item with helper</ion-label>
|
||||
<div slot="helper">Helper</div>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label> Single line text that should have ellipses when it doesn't all fit in the item</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const list = page.locator('ion-list');
|
||||
|
||||
await expect(list).toHaveScreenshot(screenshot('item-safe-area'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
@@ -19,12 +19,25 @@
|
||||
@include border-radius($list-inset-ios-border-radius);
|
||||
}
|
||||
|
||||
.list-ios.list-inset ion-item:last-child {
|
||||
/**
|
||||
* These selectors ensure the last item in the list
|
||||
* has the correct border.
|
||||
* We need to consider the following scenarios:
|
||||
1. The only item in a list.
|
||||
2. The last item in a list as long as it is not the only item.
|
||||
3. The item in the last item-sliding in a list.
|
||||
* Note that we do not select ion-item:last-of-type
|
||||
* because that will cause the borders to disappear on
|
||||
* items in an item-sliding when the item is the last
|
||||
* element in the item-sliding container.
|
||||
*/
|
||||
.list-ios.list-inset ion-item:only-child,
|
||||
.list-ios.list-inset ion-item:not(:only-of-type):last-of-type,
|
||||
.list-ios.list-inset ion-item-sliding:last-of-type ion-item {
|
||||
--border-width: 0;
|
||||
--inner-border-width: 0;
|
||||
}
|
||||
|
||||
|
||||
.list-ios.list-inset + ion-list.list-inset {
|
||||
@include margin(0, null, null, null);
|
||||
}
|
||||
|
||||
@@ -23,12 +23,50 @@
|
||||
@include border-radius($list-inset-md-border-radius);
|
||||
}
|
||||
|
||||
.list-md.list-inset ion-item:first-child {
|
||||
/**
|
||||
* These selectors ensure the first item in the list
|
||||
* has the correct radius.
|
||||
* We need to consider the following scenarios:
|
||||
1. The first item in a list as long as it is not the only item.
|
||||
2. The item in the first item-sliding in a list.
|
||||
* Note that we do not select "ion-item-sliding ion-item:first-of-type"
|
||||
* because that will cause the borders to disappear on
|
||||
* items in an item-sliding when the item is the first
|
||||
* element in the item-sliding container.
|
||||
*/
|
||||
.list-md.list-inset ion-item:not(:only-of-type):first-of-type,
|
||||
.list-md.list-inset ion-item-sliding:first-of-type ion-item {
|
||||
--border-radius: #{$list-inset-md-border-radius $list-inset-md-border-radius 0 0};
|
||||
}
|
||||
|
||||
.list-md.list-inset ion-item:last-child {
|
||||
--border-radius: #{0 0 $list-inset-md-border-radius, $list-inset-md-border-radius};
|
||||
/**
|
||||
* These selectors ensure the last item in the list
|
||||
* has the correct radius and border.
|
||||
* We need to consider the following scenarios:
|
||||
1. The last item in a list as long as it is not the only item.
|
||||
2. The item in the last item-sliding in a list.
|
||||
* Note that we do not select "ion-item-sliding ion-item:last-of-type"
|
||||
* because that will cause the borders to disappear on
|
||||
* items in an item-sliding when the item is the last
|
||||
* element in the item-sliding container.
|
||||
*/
|
||||
.list-md.list-inset ion-item:not(:only-of-type):last-of-type,
|
||||
.list-md.list-inset ion-item-sliding:last-of-type ion-item {
|
||||
--border-radius: #{0 0 $list-inset-md-border-radius $list-inset-md-border-radius};
|
||||
--border-width: 0;
|
||||
--inner-border-width: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* The only item in a list should have a border radius
|
||||
* on all corners.
|
||||
* We target :only-child instead of :only-of-type
|
||||
* otherwise borders will disappear on items inside of
|
||||
* ion-item-sliding because the item will be the only
|
||||
* one of its type inside of the ion-item-sliding group.
|
||||
*/
|
||||
.list-md.list-inset ion-item:only-child {
|
||||
--border-radius: #{$list-inset-md-border-radius};
|
||||
--border-width: 0;
|
||||
--inner-border-width: 0;
|
||||
}
|
||||
|
||||
@@ -26,3 +26,162 @@ configs().forEach(({ title, screenshot, config }) => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Padding and border color ensures the bottom border can be easily seen if it regresses.
|
||||
* The background color ensures that any border radius values can be seen.
|
||||
*/
|
||||
configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('list: lines with children'), () => {
|
||||
test('only item in inset list should not have line', async ({ page }) => {
|
||||
test.info().annotations.push({
|
||||
type: 'issue',
|
||||
description: 'https://github.com/ionic-team/ionic-framework/issues/28435',
|
||||
});
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
#container {
|
||||
padding: 10px;
|
||||
background: #0088cc;
|
||||
}
|
||||
|
||||
ion-item {
|
||||
--border-color: red;
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<ion-list inset="true">
|
||||
<ion-item>
|
||||
<ion-label>Item 0</ion-label>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const container = page.locator('#container');
|
||||
|
||||
await expect(container).toHaveScreenshot(screenshot('inset-list-only-item-no-lines'));
|
||||
});
|
||||
test('last item in inset list with end options should not have line', async ({ page }) => {
|
||||
test.info().annotations.push({
|
||||
type: 'issue',
|
||||
description: 'https://github.com/ionic-team/ionic-framework/issues/28435',
|
||||
});
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
#container {
|
||||
padding: 10px;
|
||||
background: #0088cc;
|
||||
}
|
||||
|
||||
ion-item {
|
||||
--border-color: red;
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<ion-list inset="true">
|
||||
<ion-item-sliding>
|
||||
<ion-item>
|
||||
<ion-label>Item 0</ion-label>
|
||||
</ion-item>
|
||||
<ion-item-options slot="end">
|
||||
<ion-item-option color="warning">
|
||||
<ion-icon slot="icon-only" name="pin"></ion-icon>
|
||||
</ion-item-option>
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
|
||||
<ion-item-sliding>
|
||||
<ion-item>
|
||||
<ion-label>Item 1</ion-label>
|
||||
</ion-item>
|
||||
<ion-item-options slot="end">
|
||||
<ion-item-option color="warning">
|
||||
<ion-icon slot="icon-only" name="pin"></ion-icon>
|
||||
</ion-item-option>
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
|
||||
<ion-item-sliding>
|
||||
<ion-item>
|
||||
<ion-label>Item 2</ion-label>
|
||||
</ion-item>
|
||||
<ion-item-options slot="end">
|
||||
<ion-item-option color="warning">
|
||||
<ion-icon slot="icon-only" name="pin"></ion-icon>
|
||||
</ion-item-option>
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
</ion-list>
|
||||
</div>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const container = page.locator('#container');
|
||||
|
||||
await expect(container).toHaveScreenshot(screenshot('inset-list-end-options-no-lines'));
|
||||
});
|
||||
test('last item in inset list with start options should not have line', async ({ page }) => {
|
||||
await page.setContent(
|
||||
`
|
||||
<style>
|
||||
#container {
|
||||
padding: 10px;
|
||||
background: #0088cc;
|
||||
}
|
||||
|
||||
ion-item {
|
||||
--border-color: red;
|
||||
}
|
||||
</style>
|
||||
<div id="container">
|
||||
<ion-list inset="true">
|
||||
<ion-item-sliding>
|
||||
<ion-item-options slot="start">
|
||||
<ion-item-option color="warning">
|
||||
<ion-icon slot="icon-only" name="pin"></ion-icon>
|
||||
</ion-item-option>
|
||||
</ion-item-options>
|
||||
<ion-item>
|
||||
<ion-label>Item 0</ion-label>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
|
||||
<ion-item-sliding>
|
||||
<ion-item-options slot="start">
|
||||
<ion-item-option color="warning">
|
||||
<ion-icon slot="icon-only" name="pin"></ion-icon>
|
||||
</ion-item-option>
|
||||
</ion-item-options>
|
||||
<ion-item>
|
||||
<ion-label>Item 1</ion-label>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
|
||||
<ion-item-sliding>
|
||||
<ion-item-options slot="start">
|
||||
<ion-item-option color="warning">
|
||||
<ion-icon slot="icon-only" name="pin"></ion-icon>
|
||||
</ion-item-option>
|
||||
</ion-item-options>
|
||||
<ion-item>
|
||||
<ion-label>Item 2</ion-label>
|
||||
</ion-item>
|
||||
</ion-item-sliding>
|
||||
</ion-list>
|
||||
</div>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const container = page.locator('#container');
|
||||
|
||||
await expect(container).toHaveScreenshot(screenshot('inset-list-start-options-no-lines'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
@@ -9,6 +9,14 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test('inline pickers should not have visual regression', async ({ page }) => {
|
||||
await page.goto(`/src/components/picker-internal/test/basic`, config);
|
||||
|
||||
const fullStack = page.locator('#inline button[data-value="full-stack"]');
|
||||
const onion = page.locator('#inline button[data-value="onion"]');
|
||||
|
||||
await expect(fullStack).toHaveClass(/picker-item-active/);
|
||||
await expect(onion).toHaveClass(/picker-item-active/);
|
||||
|
||||
await page.waitForChanges();
|
||||
|
||||
await expect(page.locator('#inline')).toHaveScreenshot(screenshot(`picker-internal-inline-diff`));
|
||||
});
|
||||
});
|
||||
|
||||
@@ -52,7 +52,16 @@ export class RadioGroup implements ComponentInterface {
|
||||
@Event() ionValueChange!: EventEmitter<RadioGroupChangeEventDetail>;
|
||||
|
||||
componentDidLoad() {
|
||||
this.setRadioTabindex(this.value);
|
||||
/**
|
||||
* There's an issue when assigning a value to the radio group
|
||||
* within the Angular primary content (rendering within the
|
||||
* app component template). When the template is isolated to a route,
|
||||
* the value is assigned correctly.
|
||||
* To address this issue, we need to ensure that the watcher is
|
||||
* called after the component has finished loading,
|
||||
* allowing the emit to be dispatched correctly.
|
||||
*/
|
||||
this.valueChanged(this.value);
|
||||
}
|
||||
|
||||
private setRadioTabindex = (value: any | undefined) => {
|
||||
|
||||
@@ -34,7 +34,13 @@
|
||||
// -----------------------------------------
|
||||
|
||||
.searchbar-cancel-button {
|
||||
@include position(0, null, null, 5px);
|
||||
/**
|
||||
* The left edge of the cancel button
|
||||
* should align with the left edge
|
||||
* of the back button if the searchbar
|
||||
* is used in a toolbar.
|
||||
*/
|
||||
@include position(0, null, null, 9px);
|
||||
|
||||
background-color: $searchbar-md-cancel-button-background-color;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ $searchbar-md-cancel-button-color: $text-color-step-100 !default;
|
||||
$searchbar-md-cancel-button-background-color: transparent !default;
|
||||
|
||||
/// @prop - Font size of the searchbar cancel button
|
||||
$searchbar-md-cancel-button-font-size: 1.6em !default;
|
||||
$searchbar-md-cancel-button-font-size: 1.5em !default;
|
||||
|
||||
/// @prop - Color of the searchbar input search icon
|
||||
$searchbar-md-input-search-icon-color: $text-color-step-400 !default;
|
||||
|
||||
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -198,3 +198,33 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, screenshot, c
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
||||
test.describe(title('searchbar: cancel button alignment'), () => {
|
||||
test('should align with the back button when used in a toolbar', async ({ page }, testInfo) => {
|
||||
testInfo.annotations.push({
|
||||
type: 'issue',
|
||||
description: 'https://github.com/ionic-team/ionic-framework/issues/28468',
|
||||
});
|
||||
await page.setContent(
|
||||
`
|
||||
<ion-header>
|
||||
<ion-toolbar>
|
||||
<ion-buttons slot="start">
|
||||
<ion-back-button default-href="#"></ion-back-button>
|
||||
</ion-buttons>
|
||||
<ion-title>Test</ion-title>
|
||||
</ion-toolbar>
|
||||
<ion-toolbar>
|
||||
<ion-searchbar show-cancel-button="always"></ion-searchbar>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
`,
|
||||
config
|
||||
);
|
||||
|
||||
const header = page.locator('ion-header');
|
||||
await expect(header).toHaveScreenshot(screenshot(`searchbar-back-button-align`));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.5 KiB |