@ionic/react 8.4.5 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/core.css.map +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/dist/index.js +172 -150
- package/dist/index.js.map +1 -1
- package/dist/types/components/CreateAnimation.d.ts +1 -1
- package/dist/types/components/IonApp.d.ts +11 -35
- package/dist/types/components/IonRedirect.d.ts +1 -1
- package/dist/types/components/IonRoute.d.ts +1 -1
- package/dist/types/components/navigation/IonBackButton.d.ts +11 -63
- package/dist/types/components/navigation/IonTabButton.d.ts +8 -30
- package/dist/types/components/navigation/IonTabs.d.ts +37 -44
- package/dist/types/lifecycle/IonLifeCycleHOC.d.ts +1 -1
- package/dist/types/routing/NavManager.d.ts +1 -1
- package/dist/types/routing/OutletPageManager.d.ts +1 -1
- package/dist/types/routing/PageManager.d.ts +1 -1
- package/dist/types/routing/ViewLifeCycleManager.d.ts +1 -1
- package/package.json +2 -2
|
@@ -66,6 +66,6 @@ export declare class CreateAnimation extends React.PureComponent<PropsWithChildr
|
|
|
66
66
|
setupAnimation(props: any): void;
|
|
67
67
|
componentDidMount(): void;
|
|
68
68
|
componentDidUpdate(prevProps: any): void;
|
|
69
|
-
render():
|
|
69
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
70
70
|
}
|
|
71
71
|
export {};
|
|
@@ -1,41 +1,17 @@
|
|
|
1
1
|
import type { JSX as LocalJSX } from '@ionic/core/components';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { type PropsWithChildren } from 'react';
|
|
3
3
|
import type { IonContextInterface } from '../contexts/IonContext';
|
|
4
4
|
import type { ReactComponentOrElement } from '../models';
|
|
5
5
|
import type { IonicReactProps } from './IonicReactProps';
|
|
6
|
-
type Props = LocalJSX.IonApp & IonicReactProps & {
|
|
6
|
+
type Props = PropsWithChildren<LocalJSX.IonApp & IonicReactProps & {
|
|
7
7
|
ref?: React.Ref<HTMLIonAppElement>;
|
|
8
|
-
}
|
|
9
|
-
export declare
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
18
|
-
readonly props: Readonly<Props> & Readonly<{
|
|
19
|
-
children?: React.ReactNode | undefined;
|
|
20
|
-
}>;
|
|
21
|
-
state: Readonly<{}>;
|
|
22
|
-
refs: {
|
|
23
|
-
[key: string]: React.ReactInstance;
|
|
24
|
-
};
|
|
25
|
-
componentDidMount?(): void;
|
|
26
|
-
shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
27
|
-
componentWillUnmount?(): void;
|
|
28
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
29
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<{}>): any;
|
|
30
|
-
componentDidUpdate?(prevProps: Readonly<Props>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
31
|
-
componentWillMount?(): void;
|
|
32
|
-
UNSAFE_componentWillMount?(): void;
|
|
33
|
-
componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
34
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
35
|
-
componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): void;
|
|
36
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): void;
|
|
37
|
-
};
|
|
38
|
-
readonly displayName: string;
|
|
39
|
-
contextType?: React.Context<any> | undefined;
|
|
40
|
-
};
|
|
8
|
+
}>;
|
|
9
|
+
export declare class IonApp extends React.Component<Props> {
|
|
10
|
+
addOverlayCallback?: (id: string, overlay: ReactComponentOrElement, containerElement: HTMLDivElement) => void;
|
|
11
|
+
removeOverlayCallback?: (id: string) => void;
|
|
12
|
+
constructor(props: Props);
|
|
13
|
+
ionContext: IonContextInterface;
|
|
14
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
static displayName: string;
|
|
16
|
+
}
|
|
41
17
|
export {};
|
|
@@ -10,7 +10,7 @@ interface IonRedirectState {
|
|
|
10
10
|
}
|
|
11
11
|
export declare class IonRedirect extends React.PureComponent<IonRedirectProps, IonRedirectState> {
|
|
12
12
|
context: React.ContextType<typeof NavContext>;
|
|
13
|
-
render():
|
|
13
|
+
render(): import("react/jsx-runtime").JSX.Element | null;
|
|
14
14
|
static get contextType(): React.Context<import("../contexts/NavContext").NavContextState>;
|
|
15
15
|
}
|
|
16
16
|
export {};
|
|
@@ -11,7 +11,7 @@ interface IonRouteState {
|
|
|
11
11
|
}
|
|
12
12
|
export declare class IonRoute extends React.PureComponent<IonRouteProps, IonRouteState> {
|
|
13
13
|
context: React.ContextType<typeof NavContext>;
|
|
14
|
-
render():
|
|
14
|
+
render(): import("react/jsx-runtime").JSX.Element | null;
|
|
15
15
|
static get contextType(): React.Context<import("../contexts/NavContext").NavContextState>;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -1,68 +1,16 @@
|
|
|
1
1
|
import type { JSX as LocalJSX } from '@ionic/core/components';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { type PropsWithChildren } from 'react';
|
|
3
3
|
import { NavContext } from '../../contexts/NavContext';
|
|
4
4
|
import type { IonicReactProps } from '../IonicReactProps';
|
|
5
|
-
type Props =
|
|
6
|
-
icon?: {
|
|
7
|
-
ios: string;
|
|
8
|
-
md: string;
|
|
9
|
-
} | string;
|
|
5
|
+
type Props = PropsWithChildren<LocalJSX.IonBackButton & IonicReactProps & {
|
|
10
6
|
ref?: React.Ref<HTMLIonBackButtonElement>;
|
|
11
|
-
}
|
|
12
|
-
export declare
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
children?: React.ReactNode | undefined;
|
|
21
|
-
}>;
|
|
22
|
-
state: Readonly<{}>;
|
|
23
|
-
refs: {
|
|
24
|
-
[key: string]: React.ReactInstance;
|
|
25
|
-
};
|
|
26
|
-
componentDidMount?(): void;
|
|
27
|
-
shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
28
|
-
componentWillUnmount?(): void;
|
|
29
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
30
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<{}>): any;
|
|
31
|
-
componentDidUpdate?(prevProps: Readonly<Props>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
32
|
-
componentWillMount?(): void;
|
|
33
|
-
UNSAFE_componentWillMount?(): void;
|
|
34
|
-
componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
35
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
36
|
-
componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): void;
|
|
37
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): void;
|
|
38
|
-
};
|
|
39
|
-
new (props: Props, context: any): {
|
|
40
|
-
context: React.ContextType<typeof NavContext>;
|
|
41
|
-
clickButton: (e: React.MouseEvent) => void;
|
|
42
|
-
render(): React.JSX.Element;
|
|
43
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Props>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
44
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
45
|
-
readonly props: Readonly<Props> & Readonly<{
|
|
46
|
-
children?: React.ReactNode | undefined;
|
|
47
|
-
}>;
|
|
48
|
-
state: Readonly<{}>;
|
|
49
|
-
refs: {
|
|
50
|
-
[key: string]: React.ReactInstance;
|
|
51
|
-
};
|
|
52
|
-
componentDidMount?(): void;
|
|
53
|
-
shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
54
|
-
componentWillUnmount?(): void;
|
|
55
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
56
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<{}>): any;
|
|
57
|
-
componentDidUpdate?(prevProps: Readonly<Props>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
58
|
-
componentWillMount?(): void;
|
|
59
|
-
UNSAFE_componentWillMount?(): void;
|
|
60
|
-
componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
61
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
62
|
-
componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): void;
|
|
63
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): void;
|
|
64
|
-
};
|
|
65
|
-
readonly displayName: string;
|
|
66
|
-
readonly contextType: React.Context<import("../../contexts/NavContext").NavContextState>;
|
|
67
|
-
};
|
|
7
|
+
}>;
|
|
8
|
+
export declare class IonBackButton extends React.Component<Props> {
|
|
9
|
+
context: React.ContextType<typeof NavContext>;
|
|
10
|
+
clickButton: (e: React.MouseEvent) => void;
|
|
11
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
static get displayName(): string;
|
|
13
|
+
static get contextType(): React.Context<import("../../contexts/NavContext").NavContextState>;
|
|
14
|
+
shouldComponentUpdate(): boolean;
|
|
15
|
+
}
|
|
68
16
|
export {};
|
|
@@ -9,35 +9,13 @@ type Props = LocalJSX.IonTabButton & IonicReactProps & {
|
|
|
9
9
|
onPointerDown?: React.PointerEventHandler<HTMLIonTabButtonElement>;
|
|
10
10
|
onTouchEnd?: React.TouchEventHandler<HTMLIonTabButtonElement>;
|
|
11
11
|
onTouchMove?: React.TouchEventHandler<HTMLIonTabButtonElement>;
|
|
12
|
+
children?: React.ReactNode;
|
|
12
13
|
};
|
|
13
|
-
export declare
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
readonly props: Readonly<Props> & Readonly<{
|
|
21
|
-
children?: React.ReactNode | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
state: Readonly<{}>;
|
|
24
|
-
refs: {
|
|
25
|
-
[key: string]: React.ReactInstance;
|
|
26
|
-
};
|
|
27
|
-
componentDidMount?(): void;
|
|
28
|
-
shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
29
|
-
componentWillUnmount?(): void;
|
|
30
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
31
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<{}>): any;
|
|
32
|
-
componentDidUpdate?(prevProps: Readonly<Props>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
33
|
-
componentWillMount?(): void;
|
|
34
|
-
UNSAFE_componentWillMount?(): void;
|
|
35
|
-
componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
36
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
37
|
-
componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): void;
|
|
38
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): void;
|
|
39
|
-
};
|
|
40
|
-
readonly displayName: string;
|
|
41
|
-
contextType?: React.Context<any> | undefined;
|
|
42
|
-
};
|
|
14
|
+
export declare class IonTabButton extends React.Component<Props> {
|
|
15
|
+
shouldComponentUpdate(): boolean;
|
|
16
|
+
constructor(props: Props);
|
|
17
|
+
handleIonTabButtonClick(): void;
|
|
18
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
static get displayName(): string;
|
|
20
|
+
}
|
|
43
21
|
export {};
|
|
@@ -1,56 +1,49 @@
|
|
|
1
|
+
import type { Components } from '@ionic/core';
|
|
1
2
|
import type { JSX as LocalJSX } from '@ionic/core/components';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { NavContext } from '../../contexts/NavContext';
|
|
4
5
|
import type { IonTabsContextState } from './IonTabsContext';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export interface IonTabsProps extends React.HTMLAttributes<Components.IonTabs> {
|
|
7
|
+
onIonTabsWillChange?: (event: CustomEvent<{
|
|
8
|
+
tab: string;
|
|
9
|
+
}>) => void;
|
|
10
|
+
onIonTabsDidChange?: (event: CustomEvent<{
|
|
11
|
+
tab: string;
|
|
12
|
+
}>) => void;
|
|
13
|
+
}
|
|
14
|
+
declare module 'react' {
|
|
15
|
+
interface HTMLElements {
|
|
16
|
+
'ion-tabs': IonTabsProps;
|
|
10
17
|
}
|
|
11
18
|
}
|
|
12
19
|
type ChildFunction = (ionTabContext: IonTabsContextState) => React.ReactNode;
|
|
13
20
|
interface Props extends LocalJSX.IonTabs {
|
|
14
21
|
className?: string;
|
|
15
22
|
children: ChildFunction | React.ReactNode;
|
|
23
|
+
onIonTabsWillChange?: (event: CustomEvent<{
|
|
24
|
+
tab: string;
|
|
25
|
+
}>) => void;
|
|
26
|
+
onIonTabsDidChange?: (event: CustomEvent<{
|
|
27
|
+
tab: string;
|
|
28
|
+
}>) => void;
|
|
29
|
+
}
|
|
30
|
+
export declare class IonTabs extends React.Component<Props> {
|
|
31
|
+
shouldComponentUpdate(): boolean;
|
|
32
|
+
context: React.ContextType<typeof NavContext>;
|
|
33
|
+
/**
|
|
34
|
+
* `routerOutletRef` allows users to add a `ref` to `IonRouterOutlet`.
|
|
35
|
+
* Without this, `ref.current` will be `undefined` in the user's app,
|
|
36
|
+
* breaking their ability to access the `IonRouterOutlet` instance.
|
|
37
|
+
* Do not remove this ref.
|
|
38
|
+
*/
|
|
39
|
+
routerOutletRef: React.Ref<Components.IonRouterOutlet>;
|
|
40
|
+
selectTabHandler?: (tag: string) => boolean;
|
|
41
|
+
tabBarRef: React.RefObject<any>;
|
|
42
|
+
ionTabContextState: IonTabsContextState;
|
|
43
|
+
constructor(props: Props);
|
|
44
|
+
componentDidMount(): void;
|
|
45
|
+
renderTabsInner(children: React.ReactNode, outlet: React.ReactElement<{}> | undefined): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
static get contextType(): React.Context<import("../../contexts/NavContext").NavContextState>;
|
|
16
48
|
}
|
|
17
|
-
export declare const IonTabs: {
|
|
18
|
-
new (props: Props): {
|
|
19
|
-
context: React.ContextType<typeof NavContext>;
|
|
20
|
-
/**
|
|
21
|
-
* `routerOutletRef` allows users to add a `ref` to `IonRouterOutlet`.
|
|
22
|
-
* Without this, `ref.current` will be `undefined` in the user's app,
|
|
23
|
-
* breaking their ability to access the `IonRouterOutlet` instance.
|
|
24
|
-
* Do not remove this ref.
|
|
25
|
-
*/
|
|
26
|
-
routerOutletRef: React.Ref<HTMLIonRouterOutletElement>;
|
|
27
|
-
selectTabHandler?: (tag: string) => boolean;
|
|
28
|
-
tabBarRef: React.RefObject<any>;
|
|
29
|
-
ionTabContextState: IonTabsContextState;
|
|
30
|
-
componentDidMount(): void;
|
|
31
|
-
renderTabsInner(children: React.ReactNode, outlet: React.ReactElement<{}> | undefined): React.JSX.Element;
|
|
32
|
-
render(): React.JSX.Element;
|
|
33
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Props>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
34
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
35
|
-
readonly props: Readonly<Props> & Readonly<{
|
|
36
|
-
children?: React.ReactNode | undefined;
|
|
37
|
-
}>;
|
|
38
|
-
state: Readonly<{}>;
|
|
39
|
-
refs: {
|
|
40
|
-
[key: string]: React.ReactInstance;
|
|
41
|
-
};
|
|
42
|
-
shouldComponentUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
43
|
-
componentWillUnmount?(): void;
|
|
44
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
45
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<Props>, prevState: Readonly<{}>): any;
|
|
46
|
-
componentDidUpdate?(prevProps: Readonly<Props>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
47
|
-
componentWillMount?(): void;
|
|
48
|
-
UNSAFE_componentWillMount?(): void;
|
|
49
|
-
componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
50
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Props>, nextContext: any): void;
|
|
51
|
-
componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): void;
|
|
52
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<Props>, nextState: Readonly<{}>, nextContext: any): void;
|
|
53
|
-
};
|
|
54
|
-
readonly contextType: React.Context<import("../../contexts/NavContext").NavContextState>;
|
|
55
|
-
};
|
|
56
49
|
export {};
|
|
@@ -5,7 +5,7 @@ export declare const withIonLifeCycle: (WrappedComponent: React.ComponentType<an
|
|
|
5
5
|
context: React.ContextType<typeof IonLifeCycleContext>;
|
|
6
6
|
componentRef: React.RefObject<any>;
|
|
7
7
|
componentDidMount(): void;
|
|
8
|
-
render():
|
|
8
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
setState<K extends string | number | symbol>(state: any, callback?: (() => void) | undefined): void;
|
|
10
10
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
11
11
|
readonly props: Readonly<any> & Readonly<{
|
|
@@ -20,7 +20,7 @@ export declare class OutletPageManager extends React.Component<OutletPageManager
|
|
|
20
20
|
ionViewDidEnterHandler(): void;
|
|
21
21
|
ionViewWillLeaveHandler(): void;
|
|
22
22
|
ionViewDidLeaveHandler(): void;
|
|
23
|
-
render():
|
|
23
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
static get contextType(): React.Context<import("./StackContext").StackContextState>;
|
|
25
25
|
}
|
|
26
26
|
export default OutletPageManager;
|
|
@@ -19,7 +19,7 @@ export declare class PageManager extends React.PureComponent<PageManagerProps> {
|
|
|
19
19
|
ionViewDidEnterHandler(): void;
|
|
20
20
|
ionViewWillLeaveHandler(): void;
|
|
21
21
|
ionViewDidLeaveHandler(): void;
|
|
22
|
-
render():
|
|
22
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
static get contextType(): React.Context<import("./StackContext").StackContextState>;
|
|
24
24
|
}
|
|
25
25
|
export default PageManager;
|
|
@@ -37,6 +37,6 @@ export declare class ViewLifeCycleManager extends React.Component<ViewTransition
|
|
|
37
37
|
constructor(props: ViewTransitionManagerProps);
|
|
38
38
|
componentDidMount(): void;
|
|
39
39
|
componentWillUnmount(): void;
|
|
40
|
-
render():
|
|
40
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
}
|
|
42
42
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ionic/react",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"description": "React specific wrapper for @ionic/core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ionic",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"css/"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@ionic/core": "8.
|
|
42
|
+
"@ionic/core": "8.5.0",
|
|
43
43
|
"ionicons": "^7.0.0",
|
|
44
44
|
"tslib": "*"
|
|
45
45
|
},
|