Skip to content

Commit 300f0a8

Browse files
authored
merge feature-8.1 (#29437)
2 parents d81c884 + 59e1be3 commit 300f0a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1360
-114
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [8.1.0](https://github.com/ionic-team/ionic-framework/compare/v8.0.2...v8.1.0) (2024-05-01)
7+
8+
9+
### Features
10+
11+
* add experimental transition focus manager ([#29400](https://github.com/ionic-team/ionic-framework/issues/29400)) ([5b686ef](https://github.com/ionic-team/ionic-framework/commit/5b686efc1025cd4088c89ef29154311a3d7504ba)), closes [#23650](https://github.com/ionic-team/ionic-framework/issues/23650)
12+
* **content:** add fixedSlotPlacement prop ([#29233](https://github.com/ionic-team/ionic-framework/issues/29233)) ([90a7e70](https://github.com/ionic-team/ionic-framework/commit/90a7e70a1c827835c18fd5f39d53ab17d286b4a7))
13+
* **datetime:** pass roles to overlay when dismissing ([#29221](https://github.com/ionic-team/ionic-framework/issues/29221)) ([6945adc](https://github.com/ionic-team/ionic-framework/commit/6945adc3cccabf59a2e640462ab4fd09ade59f6f)), closes [#28298](https://github.com/ionic-team/ionic-framework/issues/28298)
14+
* **input:** add clearInputIcon property ([#29246](https://github.com/ionic-team/ionic-framework/issues/29246)) ([0f5d1c0](https://github.com/ionic-team/ionic-framework/commit/0f5d1c02d20483d47b6907fec696633cc7634554)), closes [#26974](https://github.com/ionic-team/ionic-framework/issues/26974)
15+
* **modal, popover:** add ability to temporarily disable focus trapping ([#29379](https://github.com/ionic-team/ionic-framework/issues/29379)) ([7c00351](https://github.com/ionic-team/ionic-framework/commit/7c00351680a955130fa10d25d4439d3cc18db805)), closes [#24646](https://github.com/ionic-team/ionic-framework/issues/24646)
16+
* **picker:** picker column is easier to select with assistive technology ([#29371](https://github.com/ionic-team/ionic-framework/issues/29371)) ([e38e2e4](https://github.com/ionic-team/ionic-framework/commit/e38e2e4d35076fa42241158568fb0ed50094fcbf)), closes [#25221](https://github.com/ionic-team/ionic-framework/issues/25221)
17+
18+
19+
20+
21+
622
## [8.0.2](https://github.com/ionic-team/ionic-framework/compare/v8.0.1...v8.0.2) (2024-05-01)
723

824

core/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [8.1.0](https://github.com/ionic-team/ionic-framework/compare/v8.0.2...v8.1.0) (2024-05-01)
7+
8+
9+
### Features
10+
11+
* add experimental transition focus manager ([#29400](https://github.com/ionic-team/ionic-framework/issues/29400)) ([5b686ef](https://github.com/ionic-team/ionic-framework/commit/5b686efc1025cd4088c89ef29154311a3d7504ba)), closes [#23650](https://github.com/ionic-team/ionic-framework/issues/23650)
12+
* **content:** add fixedSlotPlacement prop ([#29233](https://github.com/ionic-team/ionic-framework/issues/29233)) ([90a7e70](https://github.com/ionic-team/ionic-framework/commit/90a7e70a1c827835c18fd5f39d53ab17d286b4a7))
13+
* **datetime:** pass roles to overlay when dismissing ([#29221](https://github.com/ionic-team/ionic-framework/issues/29221)) ([6945adc](https://github.com/ionic-team/ionic-framework/commit/6945adc3cccabf59a2e640462ab4fd09ade59f6f)), closes [#28298](https://github.com/ionic-team/ionic-framework/issues/28298)
14+
* **input:** add clearInputIcon property ([#29246](https://github.com/ionic-team/ionic-framework/issues/29246)) ([0f5d1c0](https://github.com/ionic-team/ionic-framework/commit/0f5d1c02d20483d47b6907fec696633cc7634554)), closes [#26974](https://github.com/ionic-team/ionic-framework/issues/26974)
15+
* **modal, popover:** add ability to temporarily disable focus trapping ([#29379](https://github.com/ionic-team/ionic-framework/issues/29379)) ([7c00351](https://github.com/ionic-team/ionic-framework/commit/7c00351680a955130fa10d25d4439d3cc18db805)), closes [#24646](https://github.com/ionic-team/ionic-framework/issues/24646)
16+
* **picker:** picker column is easier to select with assistive technology ([#29371](https://github.com/ionic-team/ionic-framework/issues/29371)) ([e38e2e4](https://github.com/ionic-team/ionic-framework/commit/e38e2e4d35076fa42241158568fb0ed50094fcbf)), closes [#25221](https://github.com/ionic-team/ionic-framework/issues/25221)
17+
18+
19+
20+
21+
622
## [8.0.2](https://github.com/ionic-team/ionic-framework/compare/v8.0.1...v8.0.2) (2024-05-01)
723

824

core/api.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ ion-col,css-prop,--ion-grid-columns
361361

362362
ion-content,shadow
363363
ion-content,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
364+
ion-content,prop,fixedSlotPlacement,"after" | "before",'after',false,false
364365
ion-content,prop,forceOverscroll,boolean | undefined,undefined,false,false
365366
ion-content,prop,fullscreen,boolean,false,false,false
366367
ion-content,prop,scrollEvents,boolean,false,false,false
@@ -553,6 +554,7 @@ ion-input,prop,autocomplete,"name" | "email" | "tel" | "url" | "on" | "off" | "h
553554
ion-input,prop,autocorrect,"off" | "on",'off',false,false
554555
ion-input,prop,autofocus,boolean,false,false,false
555556
ion-input,prop,clearInput,boolean,false,false,false
557+
ion-input,prop,clearInputIcon,string | undefined,undefined,false,false
556558
ion-input,prop,clearOnEdit,boolean | undefined,undefined,false,false
557559
ion-input,prop,color,"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string & Record<never, never> | undefined,undefined,false,true
558560
ion-input,prop,counter,boolean,false,false,false
@@ -829,6 +831,7 @@ ion-modal,prop,backdropDismiss,boolean,true,false,false
829831
ion-modal,prop,breakpoints,number[] | undefined,undefined,false,false
830832
ion-modal,prop,canDismiss,((data?: any, role?: string | undefined) => Promise<boolean>) | boolean,true,false,false
831833
ion-modal,prop,enterAnimation,((baseEl: any, opts?: any) => Animation) | undefined,undefined,false,false
834+
ion-modal,prop,focusTrap,boolean,true,false,false
832835
ion-modal,prop,handle,boolean | undefined,undefined,false,false
833836
ion-modal,prop,handleBehavior,"cycle" | "none" | undefined,'none',false,false
834837
ion-modal,prop,htmlAttributes,undefined | { [key: string]: any; },undefined,false,false
@@ -977,6 +980,7 @@ ion-popover,prop,componentProps,undefined | { [key: string]: any; },undefined,fa
977980
ion-popover,prop,dismissOnSelect,boolean,false,false,false
978981
ion-popover,prop,enterAnimation,((baseEl: any, opts?: any) => Animation) | undefined,undefined,false,false
979982
ion-popover,prop,event,any,undefined,false,false
983+
ion-popover,prop,focusTrap,boolean,true,false,false
980984
ion-popover,prop,htmlAttributes,undefined | { [key: string]: any; },undefined,false,false
981985
ion-popover,prop,isOpen,boolean,false,false,false
982986
ion-popover,prop,keepContentsMounted,boolean,false,false,false

core/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ionic/core",
3-
"version": "8.0.2",
3+
"version": "8.1.0",
44
"description": "Base components for Ionic",
55
"keywords": [
66
"ionic",

core/src/components.d.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,10 @@ export namespace Components {
762762
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
763763
*/
764764
"color"?: Color;
765+
/**
766+
* Controls where the fixed content is placed relative to the main content in the DOM. This can be used to control the order in which fixed elements receive keyboard focus. For example, if a FAB in the fixed slot should receive keyboard focus before the main page content, set this property to `'before'`.
767+
*/
768+
"fixedSlotPlacement": 'after' | 'before';
765769
/**
766770
* If `true` and the content does not cause an overflow scroll, the scroll interaction will cause a bounce. If the content exceeds the bounds of ionContent, nothing will change. Note, this does not disable the system bounce on iOS. That is an OS level setting.
767771
*/
@@ -1162,6 +1166,10 @@ export namespace Components {
11621166
* If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.
11631167
*/
11641168
"clearInput": boolean;
1169+
/**
1170+
* The icon to use for the clear button. Only applies when `clearInput` is set to `true`.
1171+
*/
1172+
"clearInputIcon"?: string;
11651173
/**
11661174
* If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
11671175
*/
@@ -1715,6 +1723,10 @@ export namespace Components {
17151723
* Animation to use when the modal is presented.
17161724
*/
17171725
"enterAnimation"?: AnimationBuilder;
1726+
/**
1727+
* If `true`, focus will not be allowed to move outside of this overlay. If `false`, focus will be allowed to move outside of the overlay. In most scenarios this property should remain set to `true`. Setting this property to `false` can cause severe accessibility issues as users relying on assistive technologies may be able to move focus into a confusing state. We recommend only setting this to `false` when absolutely necessary. Developers may want to consider disabling focus trapping if this overlay presents a non-Ionic overlay from a 3rd party library. Developers would disable focus trapping on the Ionic overlay when presenting the 3rd party overlay and then re-enable focus trapping when dismissing the 3rd party overlay and moving focus back to the Ionic overlay.
1728+
*/
1729+
"focusTrap": boolean;
17181730
/**
17191731
* Returns the current breakpoint of a sheet style modal
17201732
*/
@@ -2131,6 +2143,10 @@ export namespace Components {
21312143
* The event to pass to the popover animation.
21322144
*/
21332145
"event": any;
2146+
/**
2147+
* If `true`, focus will not be allowed to move outside of this overlay. If `false`, focus will be allowed to move outside of the overlay. In most scenarios this property should remain set to `true`. Setting this property to `false` can cause severe accessibility issues as users relying on assistive technologies may be able to move focus into a confusing state. We recommend only setting this to `false` when absolutely necessary. Developers may want to consider disabling focus trapping if this overlay presents a non-Ionic overlay from a 3rd party library. Developers would disable focus trapping on the Ionic overlay when presenting the 3rd party overlay and then re-enable focus trapping when dismissing the 3rd party overlay and moving focus back to the Ionic overlay.
2148+
*/
2149+
"focusTrap": boolean;
21342150
"getParentPopover": () => Promise<HTMLIonPopoverElement | null>;
21352151
"hasController": boolean;
21362152
/**
@@ -5478,6 +5494,10 @@ declare namespace LocalJSX {
54785494
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
54795495
*/
54805496
"color"?: Color;
5497+
/**
5498+
* Controls where the fixed content is placed relative to the main content in the DOM. This can be used to control the order in which fixed elements receive keyboard focus. For example, if a FAB in the fixed slot should receive keyboard focus before the main page content, set this property to `'before'`.
5499+
*/
5500+
"fixedSlotPlacement"?: 'after' | 'before';
54815501
/**
54825502
* If `true` and the content does not cause an overflow scroll, the scroll interaction will cause a bounce. If the content exceeds the bounds of ionContent, nothing will change. Note, this does not disable the system bounce on iOS. That is an OS level setting.
54835503
*/
@@ -5886,6 +5906,10 @@ declare namespace LocalJSX {
58865906
* If `true`, a clear icon will appear in the input when there is a value. Clicking it clears the input.
58875907
*/
58885908
"clearInput"?: boolean;
5909+
/**
5910+
* The icon to use for the clear button. Only applies when `clearInput` is set to `true`.
5911+
*/
5912+
"clearInputIcon"?: string;
58895913
/**
58905914
* If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
58915915
*/
@@ -6441,6 +6465,10 @@ declare namespace LocalJSX {
64416465
* Animation to use when the modal is presented.
64426466
*/
64436467
"enterAnimation"?: AnimationBuilder;
6468+
/**
6469+
* If `true`, focus will not be allowed to move outside of this overlay. If `false`, focus will be allowed to move outside of the overlay. In most scenarios this property should remain set to `true`. Setting this property to `false` can cause severe accessibility issues as users relying on assistive technologies may be able to move focus into a confusing state. We recommend only setting this to `false` when absolutely necessary. Developers may want to consider disabling focus trapping if this overlay presents a non-Ionic overlay from a 3rd party library. Developers would disable focus trapping on the Ionic overlay when presenting the 3rd party overlay and then re-enable focus trapping when dismissing the 3rd party overlay and moving focus back to the Ionic overlay.
6470+
*/
6471+
"focusTrap"?: boolean;
64446472
/**
64456473
* The horizontal line that displays at the top of a sheet modal. It is `true` by default when setting the `breakpoints` and `initialBreakpoint` properties.
64466474
*/
@@ -6787,6 +6815,10 @@ declare namespace LocalJSX {
67876815
* The event to pass to the popover animation.
67886816
*/
67896817
"event"?: any;
6818+
/**
6819+
* If `true`, focus will not be allowed to move outside of this overlay. If `false`, focus will be allowed to move outside of the overlay. In most scenarios this property should remain set to `true`. Setting this property to `false` can cause severe accessibility issues as users relying on assistive technologies may be able to move focus into a confusing state. We recommend only setting this to `false` when absolutely necessary. Developers may want to consider disabling focus trapping if this overlay presents a non-Ionic overlay from a 3rd party library. Developers would disable focus trapping on the Ionic overlay when presenting the 3rd party overlay and then re-enable focus trapping when dismissing the 3rd party overlay and moving focus back to the Ionic overlay.
6820+
*/
6821+
"focusTrap"?: boolean;
67906822
"hasController"?: boolean;
67916823
/**
67926824
* Additional attributes to pass to the popover.

core/src/components/content/content.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ export class Content implements ComponentInterface {
7575
*/
7676
@Prop() fullscreen = false;
7777

78+
/**
79+
* Controls where the fixed content is placed relative to the main content
80+
* in the DOM. This can be used to control the order in which fixed elements
81+
* receive keyboard focus.
82+
* For example, if a FAB in the fixed slot should receive keyboard focus before
83+
* the main page content, set this property to `'before'`.
84+
*/
85+
@Prop() fixedSlotPlacement: 'after' | 'before' = 'after';
86+
7887
/**
7988
* If `true` and the content does not cause an overflow scroll, the scroll interaction will cause a bounce.
8089
* If the content exceeds the bounds of ionContent, nothing will change.
@@ -423,7 +432,7 @@ export class Content implements ComponentInterface {
423432
}
424433

425434
render() {
426-
const { isMainContent, scrollX, scrollY, el } = this;
435+
const { fixedSlotPlacement, isMainContent, scrollX, scrollY, el } = this;
427436
const rtl = isRTL(el) ? 'rtl' : 'ltr';
428437
const mode = getIonMode(this);
429438
const forceOverscroll = this.shouldForceOverscroll();
@@ -446,6 +455,9 @@ export class Content implements ComponentInterface {
446455
}}
447456
>
448457
<div ref={(el) => (this.backgroundContentEl = el)} id="background-content" part="background"></div>
458+
459+
{fixedSlotPlacement === 'before' ? <slot name="fixed"></slot> : null}
460+
449461
<div
450462
class={{
451463
'inner-scroll': true,
@@ -467,7 +479,7 @@ export class Content implements ComponentInterface {
467479
</div>
468480
) : null}
469481

470-
<slot name="fixed"></slot>
482+
{fixedSlotPlacement === 'after' ? <slot name="fixed"></slot> : null}
471483
</Host>
472484
);
473485
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { newSpecPage } from '@stencil/core/testing';
2+
3+
import { Content } from '../content';
4+
5+
describe('content: fixed slot placement', () => {
6+
it('should should fixed slot after content', async () => {
7+
const page = await newSpecPage({
8+
components: [Content],
9+
html: '<ion-content></ion-content>',
10+
});
11+
12+
const content = page.body.querySelector('ion-content')!;
13+
const fixedSlot = content.shadowRoot!.querySelector('slot[name="fixed"]')!;
14+
const scrollEl = content.shadowRoot!.querySelector('[part="scroll"]')!;
15+
16+
expect(fixedSlot.nextElementSibling).not.toBe(scrollEl);
17+
});
18+
19+
it('should should fixed slot before content', async () => {
20+
const page = await newSpecPage({
21+
components: [Content],
22+
html: `<ion-content fixed-slot-placement="before"></ion-content>`,
23+
});
24+
25+
const content = page.body.querySelector('ion-content')!;
26+
const fixedSlot = content.shadowRoot!.querySelector('slot[name="fixed"]')!;
27+
const scrollEl = content.shadowRoot!.querySelector('[part="scroll"]')!;
28+
29+
expect(fixedSlot.nextElementSibling).toBe(scrollEl);
30+
});
31+
});

0 commit comments

Comments
 (0)