@ionic/react 7.6.2-dev.11702926577.1a448647 → 7.6.2-dev.11702944131.11a0ee06

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2015-present Drifty Co.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -3,7 +3,7 @@ import React 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
+ declare type Props = LocalJSX.IonApp & IonicReactProps & {
7
7
  ref?: React.Ref<HTMLIonAppElement>;
8
8
  };
9
9
  export declare const IonApp: {
@@ -14,7 +14,7 @@ export declare const IonRouterContext: React.Context<IonRouterContextState>;
14
14
  * A hook for more direct control over routing in an Ionic React application. Allows you to pass additional meta-data to the router before the call to the native router.
15
15
  */
16
16
  export declare function useIonRouter(): UseIonRouterResult;
17
- export type UseIonRouterResult = {
17
+ export declare type UseIonRouterResult = {
18
18
  /**
19
19
  * @deprecated - Use goBack instead
20
20
  * @param animationBuilder - Optional - A custom transition animation to use
@@ -1 +1 @@
1
- import '@testing-library/jest-dom/extend-expect';
1
+ import '@testing-library/jest-dom';
@@ -1,7 +1,7 @@
1
1
  import type { AnimationBuilder } from '@ionic/core/components';
2
2
  import type { RouterOptions } from '../models';
3
3
  import type { RouterDirection } from '../models/RouterDirection';
4
- export type HrefProps<T> = Omit<T, 'routerDirection'> & {
4
+ export declare type HrefProps<T> = Omit<T, 'routerDirection'> & {
5
5
  routerLink?: string;
6
6
  routerDirection?: RouterDirection;
7
7
  routerOptions?: RouterOptions;
@@ -2,7 +2,7 @@ import type { JSX as LocalJSX } from '@ionic/core/components';
2
2
  import React from 'react';
3
3
  import { NavContext } from '../../contexts/NavContext';
4
4
  import type { IonicReactProps } from '../IonicReactProps';
5
- type Props = Omit<LocalJSX.IonBackButton, 'icon'> & IonicReactProps & {
5
+ declare type Props = Omit<LocalJSX.IonBackButton, 'icon'> & IonicReactProps & {
6
6
  icon?: {
7
7
  ios: string;
8
8
  md: string;
@@ -2,7 +2,7 @@ import type { JSX as LocalJSX } from '@ionic/core/components';
2
2
  import React from 'react';
3
3
  import type { RouterOptions } from '../../models';
4
4
  import type { IonicReactProps } from '../IonicReactProps';
5
- type Props = LocalJSX.IonTabButton & IonicReactProps & {
5
+ declare type Props = LocalJSX.IonTabButton & IonicReactProps & {
6
6
  routerOptions?: RouterOptions;
7
7
  ref?: React.Ref<HTMLIonTabButtonElement>;
8
8
  onClick?: (e: CustomEvent) => void;
@@ -9,7 +9,7 @@ declare global {
9
9
  }
10
10
  }
11
11
  }
12
- type ChildFunction = (ionTabContext: IonTabsContextState) => React.ReactNode;
12
+ declare type ChildFunction = (ionTabContext: IonTabsContextState) => React.ReactNode;
13
13
  interface Props extends LocalJSX.IonTabs {
14
14
  className?: string;
15
15
  children: ChildFunction | React.ReactNode;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { StyleReactProps } from '../interfaces';
3
- export type StencilReactExternalProps<PropType, ElementType> = PropType & Omit<React.HTMLAttributes<ElementType>, 'style'> & StyleReactProps;
4
- export type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
3
+ export declare type StencilReactExternalProps<PropType, ElementType> = PropType & Omit<React.HTMLAttributes<ElementType>, 'style'> & StyleReactProps;
4
+ export declare type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
5
5
  export declare const setRef: (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => void;
6
6
  export declare const mergeRefs: (...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]) => React.RefCallback<any>;
7
7
  export declare const createForwardRef: <PropType, ElementType>(ReactComponent: any, displayName: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<PropType & Omit<React.HTMLAttributes<ElementType>, "style"> & StyleReactProps> & React.RefAttributes<ElementType>>;
@@ -1,7 +1,7 @@
1
1
  import type { Config as CoreConfig, Platforms } from '@ionic/core/components';
2
2
  import React from 'react';
3
3
  import type { IonicReactProps } from '../IonicReactProps';
4
- export type IonicReactExternalProps<PropType, ElementType> = PropType &
4
+ export declare type IonicReactExternalProps<PropType, ElementType> = PropType &
5
5
  /**
6
6
  * TODO: FW-5753
7
7
  *
@@ -5,7 +5,7 @@ import type { HookOverlayOptions } from './HookOverlayOptions';
5
5
  * @returns Returns the present and dismiss methods in an array
6
6
  */
7
7
  export declare function useIonActionSheet(): UseIonActionSheetResult;
8
- export type UseIonActionSheetResult = [
8
+ export declare type UseIonActionSheetResult = [
9
9
  {
10
10
  /**
11
11
  * Presents the action sheet
@@ -5,7 +5,7 @@ import type { HookOverlayOptions } from './HookOverlayOptions';
5
5
  * @returns Returns the present and dismiss methods in an array
6
6
  */
7
7
  export declare function useIonAlert(): UseIonAlertResult;
8
- export type UseIonAlertResult = [
8
+ export declare type UseIonAlertResult = [
9
9
  {
10
10
  /**
11
11
  * Presents the alert
@@ -5,7 +5,7 @@ import type { HookOverlayOptions } from './HookOverlayOptions';
5
5
  * @returns Returns the present and dismiss methods in an array
6
6
  */
7
7
  export declare function useIonLoading(): UseIonLoadingResult;
8
- export type UseIonLoadingResult = [
8
+ export declare type UseIonLoadingResult = [
9
9
  {
10
10
  /**
11
11
  * Presents the loading indicator
@@ -8,7 +8,7 @@ import type { HookOverlayOptions } from './HookOverlayOptions';
8
8
  * @returns Returns the present and dismiss methods in an array
9
9
  */
10
10
  export declare function useIonModal(component: ReactComponentOrElement, componentProps?: any): UseIonModalResult;
11
- export type UseIonModalResult = [
11
+ export declare type UseIonModalResult = [
12
12
  (options?: Omit<ModalOptions, 'component' | 'componentProps'> & HookOverlayOptions) => void,
13
13
  /**
14
14
  * Dismisses the modal
@@ -5,7 +5,7 @@ import type { HookOverlayOptions } from './HookOverlayOptions';
5
5
  * @returns Returns the present and dismiss methods in an array
6
6
  */
7
7
  export declare function useIonPicker(): UseIonPickerResult;
8
- export type UseIonPickerResult = [
8
+ export declare type UseIonPickerResult = [
9
9
  {
10
10
  /**
11
11
  * Presents the picker
@@ -8,7 +8,7 @@ import type { HookOverlayOptions } from './HookOverlayOptions';
8
8
  * @returns Returns the present and dismiss methods in an array
9
9
  */
10
10
  export declare function useIonPopover(component: ReactComponentOrElement, componentProps?: any): UseIonPopoverResult;
11
- export type UseIonPopoverResult = [
11
+ export declare type UseIonPopoverResult = [
12
12
  (options?: Omit<PopoverOptions, 'component' | 'componentProps'> & HookOverlayOptions) => void,
13
13
  /**
14
14
  * Dismisses the popover
@@ -5,7 +5,7 @@ import type { HookOverlayOptions } from './HookOverlayOptions';
5
5
  * @returns Returns the present and dismiss methods in an array
6
6
  */
7
7
  export declare function useIonToast(): UseIonToastResult;
8
- export type UseIonToastResult = [
8
+ export declare type UseIonToastResult = [
9
9
  {
10
10
  /**
11
11
  * Presents the toast
@@ -1,2 +1,2 @@
1
1
  import type React from 'react';
2
- export type ReactComponentOrElement = React.ComponentClass<any, any> | React.FC<any> | JSX.Element;
2
+ export declare type ReactComponentOrElement = React.ComponentClass<any, any> | React.FC<any> | JSX.Element;
@@ -1 +1 @@
1
- export type RouteAction = 'push' | 'replace' | 'pop';
1
+ export declare type RouteAction = 'push' | 'replace' | 'pop';
@@ -1 +1 @@
1
- export type RouterDirection = 'forward' | 'back' | 'root' | 'none';
1
+ export declare type RouterDirection = 'forward' | 'back' | 'root' | 'none';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/react",
3
- "version": "7.6.2-dev.11702926577.1a448647",
3
+ "version": "7.6.2-dev.11702944131.11a0ee06",
4
4
  "description": "React specific wrapper for @ionic/core",
5
5
  "keywords": [
6
6
  "ionic",
@@ -19,19 +19,6 @@
19
19
  "type": "git",
20
20
  "url": "git+https://github.com/ionic-team/ionic-framework.git"
21
21
  },
22
- "scripts": {
23
- "build": "npm run clean && npm run copy && npm run compile",
24
- "build.watch": "npm run compile -- --watch",
25
- "clean": "rimraf dist && rimraf routing",
26
- "compile": "rollup -c",
27
- "eslint": "eslint src",
28
- "prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
29
- "lint": "npm run eslint && npm run prettier -- --write --cache",
30
- "lint.fix": "npm run eslint -- --fix && npm run prettier -- --write --cache",
31
- "copy": "node scripts/copy.js",
32
- "test.spec": "jest --ci",
33
- "sync": "sh ./scripts/sync.sh"
34
- },
35
22
  "main": "dist/index.js",
36
23
  "types": "dist/types/index.d.ts",
37
24
  "files": [
@@ -39,7 +26,7 @@
39
26
  "css/"
40
27
  ],
41
28
  "dependencies": {
42
- "@ionic/core": "7.6.2-dev.11702926577.1a448647",
29
+ "@ionic/core": "7.6.2-dev.11702944131.11a0ee06",
43
30
  "ionicons": "^7.0.0",
44
31
  "tslib": "*"
45
32
  },
@@ -51,7 +38,7 @@
51
38
  "@ionic/eslint-config": "^0.3.0",
52
39
  "@ionic/prettier-config": "^2.0.0",
53
40
  "@rollup/plugin-typescript": "^11.1.5",
54
- "@testing-library/jest-dom": "^5.11.6",
41
+ "@testing-library/jest-dom": "^6.1.5",
55
42
  "@testing-library/react": "^11.2.2",
56
43
  "@testing-library/react-hooks": "^7.0.1",
57
44
  "@types/jest": "^26.0.15",
@@ -63,6 +50,7 @@
63
50
  "eslint": "^7.32.0",
64
51
  "fs-extra": "^9.0.1",
65
52
  "jest": "^26.6.3",
53
+ "jest-environment-jsdom": "^26.6.0",
66
54
  "np": "^6.4.0",
67
55
  "prettier": "^2.8.3",
68
56
  "react": "^16.9.0",
@@ -89,5 +77,17 @@
89
77
  "<rootDir>"
90
78
  ]
91
79
  },
92
- "prettier": "@ionic/prettier-config"
93
- }
80
+ "prettier": "@ionic/prettier-config",
81
+ "scripts": {
82
+ "build": "pnpm run clean && pnpm run copy && pnpm run compile",
83
+ "build.watch": "pnpm run compile --watch",
84
+ "clean": "rimraf dist && rimraf routing",
85
+ "compile": "rollup -c",
86
+ "eslint": "eslint src",
87
+ "prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
88
+ "lint": "pnpm run eslint && pnpm run prettier --write --cache",
89
+ "lint.fix": "pnpm run eslint --fix && pnpm run prettier --write --cache",
90
+ "copy": "node scripts/copy.js",
91
+ "test.spec": "jest --ci"
92
+ }
93
+ }