SIGN IN SIGN UP

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

0 0 7 TypeScript
{
"name": "@ionic/react",
2026-04-01 19:53:17 +00:00
"version": "8.8.3",
"description": "React specific wrapper for @ionic/core",
"keywords": [
"ionic",
"framework",
"react",
"mobile",
"app",
"hybrid",
"webapp",
"cordova",
"progressive web app",
"pwa"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ionic-team/ionic-framework.git"
},
"scripts": {
"build": "npm run clean && npm run copy && npm run compile",
"build.watch": "npm run compile -- --watch",
chore: packages do not explicitly run tsc (#28450) Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Rollup has a plugin to handle TypeScript compilation that we are not using. As a result, we are maintaining unnecessary infrastructure such as compiling to `dist-transpiled`(TS to JS) and then compiling the results to `dist` (JS files to bundled code). ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Vue, Vue Router, React, and React Router now make use of the Rollup Typescript plugin to handle TypeScript compilation for us. This lets us remove the `dist-transpiled` directory altogether and the manual `tsc` invocation. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Developers should not see any changes in how they consume Ionic. This just hands the TypeScript compilation step off to the Rollup plugin. Dev build: `7.5.3-dev.11698859252.15ac163e`
2023-11-06 14:23:48 -05:00
"clean": "rimraf dist && rimraf routing",
"compile": "rollup -c",
"eslint": "eslint src",
"prettier": "prettier \"./src/**/*.{html,ts,tsx,js,jsx}\"",
"lint": "npm run eslint && npm run prettier -- --write --cache",
"lint.fix": "npm run eslint -- --fix && npm run prettier -- --write --cache",
"copy": "node scripts/copy.js",
2019-10-07 10:37:20 -06:00
"test.spec": "jest --ci",
fix(overlays,picker): remove invalid aria-hidden attribute (#30563) Issue number: resolves #30040 --------- ## What is the current behavior? - The usage of `aria-hidden="true"` attributes both on overlay and picker components was causing some console error/warnings messages. - This was being caused due the fact of the activeElement (focused element) was inside those elements with this attribute that's equal to true in all cases. ![d13215a4-a610-4b1f-81d8-ce3ae05df790](https://github.com/user-attachments/assets/1b79c8bf-b23a-4165-8fb4-894be27bbad4) ## What is the new behavior? - There is no need of making usage of this attribute due the facts: - 1. Once overlay is closed the focus will be redirect to the element that triggers the overlay, this way screen readers will be also redirected to the same context of focused element. - 2. After overlay is closed, it will be set as a `display: none;` through the selector `:host(.overlay-hidden)`, which by itself will disable overlay content for the screen readers. - Removed overlay tests since they were basically checking about `aria-hidden` attribute. - Updated PickerColumn and PickerColumnOption structure in order to fit the a11y needs. - Added a focus management system to better drive users when making usage of keyboard navigation inside picker. - Skip A11Y test validation when reported violation is color contrast related. ### ⚠️ NOTE: - Reported devTools issue/warning when selecting picker is **from now on** expected due to focus an input that's set with `tabIndex="-1"` and `aria-hidden="true"` - Which turns into an A11Y violation when it gets focused. It happens that it gets focused dynamically in order to open the native numeric keyboard **once user selects highlighted picker values zone**, in order to allow users to insert numeric values through the keyboard. If this `aria-hidden` and `tabindex` are removed/updated, the existing functionality will be lost since ScreenReaders will start to ignore the updated value through the PickerChange and will be focused onto the focused input. This mentioned input has an onChange event that's used to update the `aria-valuetext` on each `picker-column` which is being capture by the ScreenReader. That said, this new devTools reported issue/warning is a false positive since A11Y behaviour is being covered through a different perspective. ## Does this introduce a breaking change? - [ ] Yes - [X] No ## Testing: - ✅ [ActionSheet Preview](https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/action-sheet/test/a11y) - ✅ [Alert Preview](https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/alert/test/a11y) - ✅ [DateTime Preview](https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/datetime/test/basic) - ✅ [DateTime Button Preview](https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/datetime-button/test/basic) - ✅ [Modal Preview](https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/modal/test/a11y) - ✅ [Popover Preview](https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/popover/test/basic) - ✅ [Select Preview](https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/select/test/basic) - ✅ [Picker, PickerColumn and PickerColumnOption Preview](https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/picker/test/basic) - ✅ [Toast Preview](https://ionic-framework-git-rou-11368-to-main-ionic1.vercel.app/src/components/toast/test/a11y) ## Other Information Dev build: `8.7.4-dev.11756388042.1a103a79` --------- Co-authored-by: ionitron <hi@ionicframework.com> Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com> Co-authored-by: Brandy Smith <brandyscarney@users.noreply.github.com>
2025-09-03 23:54:11 +01:00
"sync": "sh ./scripts/sync.sh",
"local.sync.and.pack": "./scripts/sync-and-pack.sh"
},
2019-06-19 21:33:50 +02:00
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
"files": [
"dist/",
"css/"
],
2019-06-19 21:33:50 +02:00
"dependencies": {
2026-04-01 19:53:17 +00:00
"@ionic/core": "^8.8.3",
"ionicons": "^8.0.13",
"tslib": "*"
2019-06-19 21:33:50 +02:00
},
"peerDependencies": {
"react": ">=16.8.6",
"react-dom": ">=16.8.6"
2019-06-19 21:33:50 +02:00
},
"devDependencies": {
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^2.0.0",
chore: packages do not explicitly run tsc (#28450) Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Rollup has a plugin to handle TypeScript compilation that we are not using. As a result, we are maintaining unnecessary infrastructure such as compiling to `dist-transpiled`(TS to JS) and then compiling the results to `dist` (JS files to bundled code). ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Vue, Vue Router, React, and React Router now make use of the Rollup Typescript plugin to handle TypeScript compilation for us. This lets us remove the `dist-transpiled` directory altogether and the manual `tsc` invocation. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Developers should not see any changes in how they consume Ionic. This just hands the TypeScript compilation step off to the Rollup plugin. Dev build: `7.5.3-dev.11698859252.15ac163e`
2023-11-06 14:23:48 -05:00
"@rollup/plugin-typescript": "^11.1.5",
"@testing-library/jest-dom": "^5.11.6",
fix(react): avoid definitely typed errors with @types/react@18 (#29182) Issue number: resolves #29178 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> [DefinitelyTyped removed the `onPointerEnterCaptured` and `onPointerLeaveCaptured` types for `@types/react`](https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/69006). This caused issues when multiple versions of `@types/react` are installed where an older version inlined these types, but they did not exist in newer versions. For Ionic React, we build with React 16 which did inline the types. In an Ionic React starter app we build with React 18 which does not want these types. As a result, there is a type mismatch. Note that this type change is being [reverted in React 16-17](https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/69006#discussioncomment-8826095) so presumably this issue will go away in its own for those versions. However, developers are building with React 18 too, so this issue will persist for those developers. However, React 17 should still have this problem (at least until the change is reverted), yet the build here passes. The main difference is that the `onPointer{Enter,Leave}Captured` event is no longer inlined. After talking with the Stencil team this is the current understanding of why the issue no longer reproduces. **Building with React 17** ```ts import type { JSX as LocalJSX } from '@ionic/core/components'; import React from 'react'; import type { IonicReactProps } from './IonicReactProps'; export declare const IonRouterOutlet: React.ForwardRefExoticComponent<Pick<LocalJSX.IonRouterOutlet & { basePath?: string | undefined; ref?: React.Ref<any> | undefined; ionPage?: boolean | undefined; } & IonicReactProps & Omit<React.HTMLAttributes<HTMLIonRouterOutletElement>, "style" | "placeholder">, "children" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof IonicReactProps | keyof LocalJSX.IonRouterOutlet | "basePath" | "ionPage"> & React.RefAttributes<HTMLIonRouterOutletElement>>; ``` **Building with React 18** ```ts export declare const IonRouterOutlet: React.ForwardRefExoticComponent<Omit<LocalJSX.IonRouterOutlet & { basePath?: string | undefined; ref?: React.Ref<any> | undefined; ionPage?: boolean | undefined; } & IonicReactProps & Omit<React.HTMLAttributes<HTMLIonRouterOutletElement>, "style" | "placeholder">, "ref"> & React.RefAttributes<HTMLIonRouterOutletElement>>; ``` ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Updated types in our React test apps and verified that the [issue reproduces there without this fix](https://github.com/ionic-team/ionic-framework/actions/runs/8345186602). - Updated Ionic React and Ionic React Router to build with React 17. ## Does this introduce a breaking change? - [ ] Yes - [x] No Ionic v7 expects React 17 or newer, so building with React 17 instead of React 16 is not a breaking change. <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: `7.8.1-dev.11710859149.114e57ae` Verified with sample repro
2024-03-19 13:36:29 -04:00
"@testing-library/react": "^12.1.5",
"@testing-library/react-hooks": "^7.0.1",
"@types/jest": "^26.0.15",
2020-06-29 10:21:06 -05:00
"@types/node": "^14.0.14",
fix(react): avoid definitely typed errors with @types/react@18 (#29182) Issue number: resolves #29178 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> [DefinitelyTyped removed the `onPointerEnterCaptured` and `onPointerLeaveCaptured` types for `@types/react`](https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/69006). This caused issues when multiple versions of `@types/react` are installed where an older version inlined these types, but they did not exist in newer versions. For Ionic React, we build with React 16 which did inline the types. In an Ionic React starter app we build with React 18 which does not want these types. As a result, there is a type mismatch. Note that this type change is being [reverted in React 16-17](https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/69006#discussioncomment-8826095) so presumably this issue will go away in its own for those versions. However, developers are building with React 18 too, so this issue will persist for those developers. However, React 17 should still have this problem (at least until the change is reverted), yet the build here passes. The main difference is that the `onPointer{Enter,Leave}Captured` event is no longer inlined. After talking with the Stencil team this is the current understanding of why the issue no longer reproduces. **Building with React 17** ```ts import type { JSX as LocalJSX } from '@ionic/core/components'; import React from 'react'; import type { IonicReactProps } from './IonicReactProps'; export declare const IonRouterOutlet: React.ForwardRefExoticComponent<Pick<LocalJSX.IonRouterOutlet & { basePath?: string | undefined; ref?: React.Ref<any> | undefined; ionPage?: boolean | undefined; } & IonicReactProps & Omit<React.HTMLAttributes<HTMLIonRouterOutletElement>, "style" | "placeholder">, "children" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof IonicReactProps | keyof LocalJSX.IonRouterOutlet | "basePath" | "ionPage"> & React.RefAttributes<HTMLIonRouterOutletElement>>; ``` **Building with React 18** ```ts export declare const IonRouterOutlet: React.ForwardRefExoticComponent<Omit<LocalJSX.IonRouterOutlet & { basePath?: string | undefined; ref?: React.Ref<any> | undefined; ionPage?: boolean | undefined; } & IonicReactProps & Omit<React.HTMLAttributes<HTMLIonRouterOutletElement>, "style" | "placeholder">, "ref"> & React.RefAttributes<HTMLIonRouterOutletElement>>; ``` ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Updated types in our React test apps and verified that the [issue reproduces there without this fix](https://github.com/ionic-team/ionic-framework/actions/runs/8345186602). - Updated Ionic React and Ionic React Router to build with React 17. ## Does this introduce a breaking change? - [ ] Yes - [x] No Ionic v7 expects React 17 or newer, so building with React 17 instead of React 16 is not a breaking change. <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: `7.8.1-dev.11710859149.114e57ae` Verified with sample repro
2024-03-19 13:36:29 -04:00
"@types/react": "^17.0.79",
"@types/react-dom": "^17.0.25",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"@typescript-eslint/parser": "^5.48.2",
"eslint": "^7.32.0",
2020-06-29 10:21:06 -05:00
"fs-extra": "^9.0.1",
fix(react): intellisense works with IntelliJ (#29782) Issue number: resolves #29755 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Types do not generate when a React app is opened in IntelliJ IDE. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Updated `stencil/react-output-target` to the latest - Updated the stencil config file - Updated `jest`, `ts-jest`, and `typescript` because of the changes in `packages/react/tsconfig.json` - Installed `jest-environment-jsdom` because Jest 26 no longer ships it by default since the test environment is now node by default. The test environment needs to be changed to `jsdom` when [building a web app](https://jestjs.io/docs/configuration#testenvironment-string). ![Screenshot 2024-08-19 at 3 44 56 PM](https://github.com/user-attachments/assets/7a5ab4e7-4641-4fa7-978d-8f68a0b334ea) ![Screenshot 2024-08-19 at 3 45 11 PM](https://github.com/user-attachments/assets/66f5a522-776b-488d-932f-4fa59cf5dd49) ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> No visual changes are introduced and there will be no changes needed by developers. Their apps will continue to work as is. ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: 8.2.8-dev.11724100788.103018f2
2024-08-20 12:10:12 -07:00
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"np": "^6.4.0",
"prettier": "^2.8.3",
fix(react): avoid definitely typed errors with @types/react@18 (#29182) Issue number: resolves #29178 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> [DefinitelyTyped removed the `onPointerEnterCaptured` and `onPointerLeaveCaptured` types for `@types/react`](https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/69006). This caused issues when multiple versions of `@types/react` are installed where an older version inlined these types, but they did not exist in newer versions. For Ionic React, we build with React 16 which did inline the types. In an Ionic React starter app we build with React 18 which does not want these types. As a result, there is a type mismatch. Note that this type change is being [reverted in React 16-17](https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/69006#discussioncomment-8826095) so presumably this issue will go away in its own for those versions. However, developers are building with React 18 too, so this issue will persist for those developers. However, React 17 should still have this problem (at least until the change is reverted), yet the build here passes. The main difference is that the `onPointer{Enter,Leave}Captured` event is no longer inlined. After talking with the Stencil team this is the current understanding of why the issue no longer reproduces. **Building with React 17** ```ts import type { JSX as LocalJSX } from '@ionic/core/components'; import React from 'react'; import type { IonicReactProps } from './IonicReactProps'; export declare const IonRouterOutlet: React.ForwardRefExoticComponent<Pick<LocalJSX.IonRouterOutlet & { basePath?: string | undefined; ref?: React.Ref<any> | undefined; ionPage?: boolean | undefined; } & IonicReactProps & Omit<React.HTMLAttributes<HTMLIonRouterOutletElement>, "style" | "placeholder">, "children" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | keyof IonicReactProps | keyof LocalJSX.IonRouterOutlet | "basePath" | "ionPage"> & React.RefAttributes<HTMLIonRouterOutletElement>>; ``` **Building with React 18** ```ts export declare const IonRouterOutlet: React.ForwardRefExoticComponent<Omit<LocalJSX.IonRouterOutlet & { basePath?: string | undefined; ref?: React.Ref<any> | undefined; ionPage?: boolean | undefined; } & IonicReactProps & Omit<React.HTMLAttributes<HTMLIonRouterOutletElement>, "style" | "placeholder">, "ref"> & React.RefAttributes<HTMLIonRouterOutletElement>>; ``` ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Updated types in our React test apps and verified that the [issue reproduces there without this fix](https://github.com/ionic-team/ionic-framework/actions/runs/8345186602). - Updated Ionic React and Ionic React Router to build with React 17. ## Does this introduce a breaking change? - [ ] Yes - [x] No Ionic v7 expects React 17 or newer, so building with React 17 instead of React 16 is not a breaking change. <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: `7.8.1-dev.11710859149.114e57ae` Verified with sample repro
2024-03-19 13:36:29 -04:00
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
refactor: update to rollup 4 (#28459) Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> The vue, vue-router, react, and react-router packages are bundled with a version of rollup that are 2 major versions out of date. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Update deps to rollup 4 and made any necessary changes as a result of breaking changes - Removed the react projects old treeshaking script. The rollup dep used was incompatible with Rollup 4, and the script didn't work to begin with. - Removed the source maps and resolve plugins. These did not make any difference in the final result, and source maps are still included in the final build. - Removed a PURE annotation from an import. Rollup 4 warns about this, and this PURE annotation does not seem to be needed since every import in this file uses "createReactComponent" to begin with. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
2023-11-07 10:21:46 -05:00
"rollup": "^4.2.0",
fix(react): intellisense works with IntelliJ (#29782) Issue number: resolves #29755 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Types do not generate when a React app is opened in IntelliJ IDE. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Updated `stencil/react-output-target` to the latest - Updated the stencil config file - Updated `jest`, `ts-jest`, and `typescript` because of the changes in `packages/react/tsconfig.json` - Installed `jest-environment-jsdom` because Jest 26 no longer ships it by default since the test environment is now node by default. The test environment needs to be changed to `jsdom` when [building a web app](https://jestjs.io/docs/configuration#testenvironment-string). ![Screenshot 2024-08-19 at 3 44 56 PM](https://github.com/user-attachments/assets/7a5ab4e7-4641-4fa7-978d-8f68a0b334ea) ![Screenshot 2024-08-19 at 3 45 11 PM](https://github.com/user-attachments/assets/66f5a522-776b-488d-932f-4fa59cf5dd49) ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> No visual changes are introduced and there will be no changes needed by developers. Their apps will continue to work as is. ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: 8.2.8-dev.11724100788.103018f2
2024-08-20 12:10:12 -07:00
"ts-jest": "^29.1.3",
"typescript": "^5.0.0"
},
"jest": {
fix(react): intellisense works with IntelliJ (#29782) Issue number: resolves #29755 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Types do not generate when a React app is opened in IntelliJ IDE. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Updated `stencil/react-output-target` to the latest - Updated the stencil config file - Updated `jest`, `ts-jest`, and `typescript` because of the changes in `packages/react/tsconfig.json` - Installed `jest-environment-jsdom` because Jest 26 no longer ships it by default since the test environment is now node by default. The test environment needs to be changed to `jsdom` when [building a web app](https://jestjs.io/docs/configuration#testenvironment-string). ![Screenshot 2024-08-19 at 3 44 56 PM](https://github.com/user-attachments/assets/7a5ab4e7-4641-4fa7-978d-8f68a0b334ea) ![Screenshot 2024-08-19 at 3 45 11 PM](https://github.com/user-attachments/assets/66f5a522-776b-488d-932f-4fa59cf5dd49) ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> No visual changes are introduced and there will be no changes needed by developers. Their apps will continue to work as is. ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev build: 8.2.8-dev.11724100788.103018f2
2024-08-20 12:10:12 -07:00
"testEnvironment": "jsdom",
"preset": "ts-jest",
2019-06-19 21:33:50 +02:00
"setupFilesAfterEnv": [
"<rootDir>/jest.setup.js"
],
"testPathIgnorePatterns": [
2021-10-12 15:10:03 -06:00
"cypress",
"node_modules",
"dist",
"test/base/*",
"test/apps/*",
"test/build/*"
2019-06-19 21:33:50 +02:00
],
"modulePaths": [
"<rootDir>"
]
},
"prettier": "@ionic/prettier-config"
}