From bafdd94a236ac0601be46801b2f601695be30c76 Mon Sep 17 00:00:00 2001 From: Junior Garcia Date: Fri, 8 Sep 2023 20:22:05 -0300 Subject: [PATCH] chore: react-aria packages upgraded --- .changeset/funny-dolls-type.md | 41 + package.json | 3 + packages/components/accordion/package.json | 14 +- packages/components/avatar/package.json | 6 +- packages/components/button/package.json | 12 +- packages/components/card/package.json | 10 +- packages/components/checkbox/package.json | 18 +- packages/components/chip/package.json | 8 +- packages/components/divider/package.json | 2 +- packages/components/dropdown/package.json | 10 +- packages/components/dropdown/tsconfig.json | 2 +- packages/components/input/package.json | 12 +- packages/components/kbd/package.json | 2 +- packages/components/link/package.json | 8 +- packages/components/listbox/package.json | 14 +- packages/components/menu/package.json | 16 +- packages/components/modal/package.json | 14 +- packages/components/navbar/package.json | 10 +- packages/components/pagination/package.json | 6 +- .../popover/__tests__/popover.test.tsx | 16 +- packages/components/popover/package.json | 16 +- .../popover/src/use-aria-popover.ts | 2 +- packages/components/progress/package.json | 8 +- packages/components/radio/package.json | 16 +- packages/components/select/package.json | 12 +- packages/components/snippet/package.json | 4 +- packages/components/switch/package.json | 14 +- packages/components/table/package.json | 20 +- packages/components/tabs/package.json | 14 +- packages/components/tooltip/package.json | 14 +- packages/components/user/package.json | 4 +- packages/core/react/package.json | 2 +- packages/core/system/package.json | 4 +- .../use-aria-accordion-item/package.json | 8 +- packages/hooks/use-aria-button/package.json | 10 +- packages/hooks/use-aria-link/package.json | 10 +- .../hooks/use-aria-modal-overlay/package.json | 8 +- .../hooks/use-aria-multiselect/package.json | 26 +- .../hooks/use-aria-toggle-button/package.json | 8 +- packages/hooks/use-disclosure/package.json | 2 +- packages/hooks/use-is-mobile/package.json | 2 +- packages/utilities/aria-utils/package.json | 8 +- pnpm-lock.yaml | 5590 ++++++++++------- scripts/check-rap-updates.ts | 39 + 44 files changed, 3704 insertions(+), 2361 deletions(-) create mode 100644 .changeset/funny-dolls-type.md create mode 100644 scripts/check-rap-updates.ts diff --git a/.changeset/funny-dolls-type.md b/.changeset/funny-dolls-type.md new file mode 100644 index 0000000000..83868f9c6c --- /dev/null +++ b/.changeset/funny-dolls-type.md @@ -0,0 +1,41 @@ +--- +"@nextui-org/use-aria-accordion-item": patch +"@nextui-org/use-aria-modal-overlay": patch +"@nextui-org/use-aria-toggle-button": patch +"@nextui-org/use-aria-multiselect": patch +"@nextui-org/pagination": patch +"@nextui-org/use-aria-button": patch +"@nextui-org/accordion": patch +"@nextui-org/use-disclosure": patch +"@nextui-org/aria-utils": patch +"@nextui-org/checkbox": patch +"@nextui-org/dropdown": patch +"@nextui-org/progress": patch +"@nextui-org/use-aria-link": patch +"@nextui-org/use-is-mobile": patch +"@nextui-org/divider": patch +"@nextui-org/listbox": patch +"@nextui-org/popover": patch +"@nextui-org/snippet": patch +"@nextui-org/tooltip": patch +"@nextui-org/avatar": patch +"@nextui-org/button": patch +"@nextui-org/navbar": patch +"@nextui-org/select": patch +"@nextui-org/switch": patch +"@nextui-org/input": patch +"@nextui-org/modal": patch +"@nextui-org/radio": patch +"@nextui-org/table": patch +"@nextui-org/card": patch +"@nextui-org/chip": patch +"@nextui-org/link": patch +"@nextui-org/menu": patch +"@nextui-org/tabs": patch +"@nextui-org/user": patch +"@nextui-org/kbd": patch +"@nextui-org/system": patch +"@nextui-org/react": patch +--- + +React aria packages upgraded diff --git a/package.json b/package.json index a566d68c88..e67c6a6d83 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "lint:docs": "eslint -c .eslintrc.json ./apps/docs/**/*.{ts,tsx}", "lint:fix": "eslint --fix -c .eslintrc.json ./packages/**/**/*.{ts,tsx}", "lint:docs-fix": "eslint --fix -c .eslintrc.json ./apps/docs/**/*.{ts,tsx}", + "check:rap": "tsx scripts/check-rap-updates.ts", "format:check": "prettier --check packages/**/**/src --cache", "format:write": "prettier --write packages/**/**/src --cache", "turbo:clean": "turbo clean && rimraf ./node_modules/.cache/turbo", @@ -52,6 +53,7 @@ "devDependencies": { "@babel/cli": "^7.14.5", "@babel/core": "^7.16.7", + "tsx": "^3.8.2", "@babel/plugin-proposal-object-rest-spread": "^7.15.6", "@babel/plugin-transform-runtime": "^7.14.5", "@babel/preset-env": "^7.14.5", @@ -103,6 +105,7 @@ "eslint-plugin-react": "^7.23.2", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-unused-imports": "^2.0.0", + "npm-check-updates": "^16.10.18", "intl-messageformat": "^10.1.0", "execa": "^5.1.1", "find-up": "^6.3.0", diff --git a/packages/components/accordion/package.json b/packages/components/accordion/package.json index 7854ccfe2f..0f9c2ac413 100644 --- a/packages/components/accordion/package.json +++ b/packages/components/accordion/package.json @@ -53,13 +53,13 @@ "@nextui-org/system": "workspace:*", "@nextui-org/theme": "workspace:*", "@nextui-org/divider": "workspace:*", - "@react-aria/accordion": "3.0.0-alpha.20", - "@react-aria/interactions": "^3.17.0", - "@react-aria/focus": "^3.14.0", - "@react-aria/utils": "^3.19.0", - "@react-stately/tree": "^3.7.1", - "@react-types/accordion": "3.0.0-alpha.15", - "@react-types/shared": "^3.19.0" + "@react-aria/accordion": "3.0.0-alpha.21", + "@react-aria/interactions": "^3.18.0", + "@react-aria/focus": "^3.14.1", + "@react-aria/utils": "^3.20.0", + "@react-stately/tree": "^3.7.2", + "@react-types/accordion": "3.0.0-alpha.16", + "@react-types/shared": "^3.20.0" }, "devDependencies": { "@nextui-org/avatar": "workspace:*", diff --git a/packages/components/avatar/package.json b/packages/components/avatar/package.json index 8f3dfd4df7..0428433043 100644 --- a/packages/components/avatar/package.json +++ b/packages/components/avatar/package.json @@ -42,9 +42,9 @@ "@nextui-org/shared-utils": "workspace:*", "@nextui-org/react-utils": "workspace:*", "@nextui-org/use-image": "workspace:*", - "@react-aria/interactions": "^3.17.0", - "@react-aria/focus": "^3.14.0", - "@react-aria/utils": "^3.19.0" + "@react-aria/interactions": "^3.18.0", + "@react-aria/focus": "^3.14.1", + "@react-aria/utils": "^3.20.0" }, "devDependencies": { "@nextui-org/shared-icons": "workspace:*", diff --git a/packages/components/button/package.json b/packages/components/button/package.json index 9e018ea8bb..57f5eaab60 100644 --- a/packages/components/button/package.json +++ b/packages/components/button/package.json @@ -44,12 +44,12 @@ "@nextui-org/theme": "workspace:*", "@nextui-org/ripple": "workspace:*", "@nextui-org/spinner": "workspace:*", - "@react-aria/button": "^3.8.1", - "@react-aria/interactions": "^3.17.0", - "@react-aria/utils": "^3.19.0", - "@react-aria/focus": "^3.14.0", - "@react-types/shared": "^3.19.0", - "@react-types/button": "^3.7.4" + "@react-aria/button": "^3.8.2", + "@react-aria/interactions": "^3.18.0", + "@react-aria/utils": "^3.20.0", + "@react-aria/focus": "^3.14.1", + "@react-types/shared": "^3.20.0", + "@react-types/button": "^3.8.0" }, "devDependencies": { "@nextui-org/shared-icons": "workspace:*", diff --git a/packages/components/card/package.json b/packages/components/card/package.json index 7a7e3618e4..0a1086c834 100644 --- a/packages/components/card/package.json +++ b/packages/components/card/package.json @@ -43,11 +43,11 @@ "@nextui-org/react-utils": "workspace:*", "@nextui-org/use-aria-button": "workspace:*", "@nextui-org/ripple": "workspace:*", - "@react-aria/focus": "^3.14.0", - "@react-aria/utils": "^3.19.0", - "@react-aria/interactions": "^3.17.0", - "@react-aria/button": "^3.8.1", - "@react-types/shared": "^3.19.0" + "@react-aria/focus": "^3.14.1", + "@react-aria/utils": "^3.20.0", + "@react-aria/interactions": "^3.18.0", + "@react-aria/button": "^3.8.2", + "@react-types/shared": "^3.20.0" }, "devDependencies": { "@nextui-org/code": "workspace:*", diff --git a/packages/components/checkbox/package.json b/packages/components/checkbox/package.json index d943de022a..7cddcae544 100644 --- a/packages/components/checkbox/package.json +++ b/packages/components/checkbox/package.json @@ -41,15 +41,15 @@ "@nextui-org/shared-utils": "workspace:*", "@nextui-org/react-utils": "workspace:*", "@nextui-org/theme": "workspace:*", - "@react-aria/checkbox": "^3.10.0", - "@react-aria/focus": "^3.14.0", - "@react-aria/interactions": "^3.17.0", - "@react-aria/visually-hidden": "^3.8.3", - "@react-stately/checkbox": "^3.4.4", - "@react-stately/toggle": "^3.6.1", - "@react-aria/utils": "^3.19.0", - "@react-types/checkbox": "^3.5.0", - "@react-types/shared": "^3.19.0" + "@react-aria/checkbox": "^3.11.0", + "@react-aria/focus": "^3.14.1", + "@react-aria/interactions": "^3.18.0", + "@react-aria/visually-hidden": "^3.8.4", + "@react-stately/checkbox": "^3.5.0", + "@react-stately/toggle": "^3.6.2", + "@react-aria/utils": "^3.20.0", + "@react-types/checkbox": "^3.5.1", + "@react-types/shared": "^3.20.0" }, "devDependencies": { "@nextui-org/shared-icons": "workspace:*", diff --git a/packages/components/chip/package.json b/packages/components/chip/package.json index a7c84fc8be..2c133ff283 100644 --- a/packages/components/chip/package.json +++ b/packages/components/chip/package.json @@ -42,10 +42,10 @@ "@nextui-org/react-utils": "workspace:*", "@nextui-org/system": "workspace:*", "@nextui-org/theme": "workspace:*", - "@react-aria/focus": "^3.14.0", - "@react-aria/interactions": "^3.17.0", - "@react-aria/utils": "^3.19.0", - "@react-types/checkbox": "^3.5.0" + "@react-aria/focus": "^3.14.1", + "@react-aria/interactions": "^3.18.0", + "@react-aria/utils": "^3.20.0", + "@react-types/checkbox": "^3.5.1" }, "devDependencies": { "@nextui-org/avatar": "workspace:*", diff --git a/packages/components/divider/package.json b/packages/components/divider/package.json index b6e3dce3cb..0eff9e6551 100644 --- a/packages/components/divider/package.json +++ b/packages/components/divider/package.json @@ -41,7 +41,7 @@ "@nextui-org/react-rsc-utils": "workspace:*", "@nextui-org/system-rsc": "workspace:*", "@nextui-org/theme": "workspace:*", - "@react-types/shared": "^3.19.0" + "@react-types/shared": "^3.20.0" }, "devDependencies": { "clean-package": "2.2.0", diff --git a/packages/components/dropdown/package.json b/packages/components/dropdown/package.json index 05d1c7347f..1b81ef325d 100644 --- a/packages/components/dropdown/package.json +++ b/packages/components/dropdown/package.json @@ -44,11 +44,11 @@ "@nextui-org/react-utils": "workspace:*", "@nextui-org/system": "workspace:*", "@nextui-org/theme": "workspace:*", - "@react-aria/menu": "^3.10.1", - "@react-aria/utils": "^3.19.0", - "@react-stately/menu": "^3.5.4", - "@react-aria/focus": "^3.14.0", - "@react-types/menu": "^3.9.3" + "@react-aria/menu": "^3.10.2", + "@react-aria/utils": "^3.20.0", + "@react-stately/menu": "^3.5.5", + "@react-aria/focus": "^3.14.1", + "@react-types/menu": "^3.9.4" }, "devDependencies": { "@nextui-org/button": "workspace:*", diff --git a/packages/components/dropdown/tsconfig.json b/packages/components/dropdown/tsconfig.json index 1f783ade25..5b4094a6ed 100644 --- a/packages/components/dropdown/tsconfig.json +++ b/packages/components/dropdown/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "baseUrl": ".", "paths": { - "tailwind-variants": ["../../../node_modules/tailwind-variants"] + "tailwind-variants": ["../../../node_modules/tailwind-variants"], } }, "include": ["src", "index.ts"] diff --git a/packages/components/input/package.json b/packages/components/input/package.json index 9826944021..b2505b763a 100644 --- a/packages/components/input/package.json +++ b/packages/components/input/package.json @@ -42,13 +42,13 @@ "@nextui-org/shared-utils": "workspace:*", "@nextui-org/system": "workspace:*", "@nextui-org/theme": "workspace:*", - "@react-aria/focus": "^3.14.0", - "@react-aria/interactions": "^3.17.0", - "@react-aria/textfield": "^3.11.0", - "@react-aria/utils": "^3.19.0", + "@react-aria/focus": "^3.14.1", + "@react-aria/interactions": "^3.18.0", + "@react-aria/textfield": "^3.12.0", + "@react-aria/utils": "^3.20.0", "@react-stately/utils": "^3.7.0", - "@react-types/shared": "^3.19.0", - "@react-types/textfield": "^3.7.3", + "@react-types/shared": "^3.20.0", + "@react-types/textfield": "^3.8.0", "react-textarea-autosize": "^8.5.2" }, "devDependencies": { diff --git a/packages/components/kbd/package.json b/packages/components/kbd/package.json index ab685ff0b0..aa3e048c2e 100644 --- a/packages/components/kbd/package.json +++ b/packages/components/kbd/package.json @@ -41,7 +41,7 @@ "@nextui-org/theme": "workspace:*", "@nextui-org/shared-utils": "workspace:*", "@nextui-org/react-utils": "workspace:*", - "@react-aria/utils": "^3.19.0" + "@react-aria/utils": "^3.20.0" }, "devDependencies": { "clean-package": "2.2.0", diff --git a/packages/components/link/package.json b/packages/components/link/package.json index c8e54b402e..816a9c1773 100644 --- a/packages/components/link/package.json +++ b/packages/components/link/package.json @@ -43,10 +43,10 @@ "@nextui-org/use-aria-link": "workspace:*", "@nextui-org/system": "workspace:*", "@nextui-org/theme": "workspace:*", - "@react-aria/link": "^3.5.3", - "@react-aria/utils": "^3.19.0", - "@react-aria/focus": "^3.14.0", - "@react-types/link": "^3.4.4" + "@react-aria/link": "^3.5.4", + "@react-aria/utils": "^3.20.0", + "@react-aria/focus": "^3.14.1", + "@react-types/link": "^3.4.5" }, "devDependencies": { "clean-package": "2.2.0", diff --git a/packages/components/listbox/package.json b/packages/components/listbox/package.json index e0d9221eeb..fdff1528bb 100644 --- a/packages/components/listbox/package.json +++ b/packages/components/listbox/package.json @@ -44,13 +44,13 @@ "@nextui-org/divider": "workspace:*", "@nextui-org/aria-utils": "workspace:*", "@nextui-org/use-is-mobile": "workspace:*", - "@react-aria/utils": "^3.19.0", - "@react-aria/listbox": "^3.10.0", - "@react-stately/list": "^3.9.0", - "@react-aria/focus": "^3.13.0", - "@react-aria/interactions": "^3.16.0", - "@react-types/menu": "^3.9.2", - "@react-types/shared": "^3.18.1" + "@react-aria/utils": "^3.20.0", + "@react-aria/listbox": "^3.10.2", + "@react-stately/list": "^3.9.2", + "@react-aria/focus": "^3.14.1", + "@react-aria/interactions": "^3.18.0", + "@react-types/menu": "^3.9.4", + "@react-types/shared": "^3.20.0" }, "devDependencies": { "clean-package": "2.2.0", diff --git a/packages/components/menu/package.json b/packages/components/menu/package.json index 34f80c6fb4..28e0bcba50 100644 --- a/packages/components/menu/package.json +++ b/packages/components/menu/package.json @@ -44,14 +44,14 @@ "@nextui-org/use-is-mobile": "workspace:*", "@nextui-org/shared-utils": "workspace:*", "@nextui-org/react-utils": "workspace:*", - "@react-aria/menu": "^3.10.1", - "@react-aria/utils": "^3.19.0", - "@react-stately/menu": "^3.5.3", - "@react-stately/tree": "^3.7.0", - "@react-aria/focus": "^3.13.0", - "@react-aria/interactions": "^3.16.0", - "@react-types/menu": "^3.9.2", - "@react-types/shared": "^3.18.1" + "@react-aria/menu": "^3.10.2", + "@react-aria/utils": "^3.20.0", + "@react-stately/menu": "^3.5.5", + "@react-stately/tree": "^3.7.2", + "@react-aria/focus": "^3.14.1", + "@react-aria/interactions": "^3.18.0", + "@react-types/menu": "^3.9.4", + "@react-types/shared": "^3.20.0" }, "devDependencies": { "clean-package": "2.2.0", diff --git a/packages/components/modal/package.json b/packages/components/modal/package.json index 7617cccd8c..05c881e1b2 100644 --- a/packages/components/modal/package.json +++ b/packages/components/modal/package.json @@ -47,13 +47,13 @@ "@nextui-org/react-utils": "workspace:*", "@nextui-org/shared-icons": "workspace:*", "@nextui-org/use-aria-modal-overlay": "workspace:*", - "@react-aria/dialog": "^3.5.4", - "@react-aria/interactions": "^3.17.0", - "@react-aria/overlays": "^3.16.0", - "@react-aria/utils": "^3.19.0", - "@react-stately/overlays": "^3.6.1", - "@react-aria/focus": "^3.14.0", - "@react-types/overlays": "^3.8.1", + "@react-aria/dialog": "^3.5.5", + "@react-aria/interactions": "^3.18.0", + "@react-aria/overlays": "^3.17.0", + "@react-aria/utils": "^3.20.0", + "@react-stately/overlays": "^3.6.2", + "@react-aria/focus": "^3.14.1", + "@react-types/overlays": "^3.8.2", "react-remove-scroll": "^2.5.6" }, "devDependencies": { diff --git a/packages/components/navbar/package.json b/packages/components/navbar/package.json index cecc320ad5..4c04d0aae5 100644 --- a/packages/components/navbar/package.json +++ b/packages/components/navbar/package.json @@ -45,12 +45,12 @@ "@nextui-org/framer-transitions": "workspace:*", "@nextui-org/use-aria-toggle-button": "workspace:*", "@nextui-org/use-scroll-position": "workspace:*", - "@react-aria/focus": "^3.14.0", - "@react-aria/interactions": "^3.17.0", - "@react-aria/utils": "^3.19.0", - "@react-stately/toggle": "^3.6.1", + "@react-aria/focus": "^3.14.1", + "@react-aria/interactions": "^3.18.0", + "@react-aria/utils": "^3.20.0", + "@react-stately/toggle": "^3.6.2", "@react-stately/utils": "^3.7.0", - "@react-aria/overlays": "^3.16.0", + "@react-aria/overlays": "^3.17.0", "react-remove-scroll": "^2.5.6" }, "devDependencies": { diff --git a/packages/components/pagination/package.json b/packages/components/pagination/package.json index b446f6924e..8ce596f5c7 100644 --- a/packages/components/pagination/package.json +++ b/packages/components/pagination/package.json @@ -43,9 +43,9 @@ "@nextui-org/theme": "workspace:*", "@nextui-org/shared-icons": "workspace:*", "@nextui-org/use-pagination": "workspace:*", - "@react-aria/focus": "^3.14.0", - "@react-aria/interactions": "^3.17.0", - "@react-aria/utils": "^3.19.0", + "@react-aria/focus": "^3.14.1", + "@react-aria/interactions": "^3.18.0", + "@react-aria/utils": "^3.20.0", "scroll-into-view-if-needed": "3.0.10" }, "devDependencies": { diff --git a/packages/components/popover/__tests__/popover.test.tsx b/packages/components/popover/__tests__/popover.test.tsx index c50c7f504f..783e967c93 100644 --- a/packages/components/popover/__tests__/popover.test.tsx +++ b/packages/components/popover/__tests__/popover.test.tsx @@ -60,7 +60,7 @@ describe("Popover", () => { const onClose = jest.fn(); const wrapper = render( - (!isOpen ? onClose() : undefined)}> + @@ -80,11 +80,7 @@ describe("Popover", () => { const onClose = jest.fn(); const wrapper = render( - (!isOpen ? onClose() : undefined)} - > + @@ -96,7 +92,10 @@ describe("Popover", () => { const content = wrapper.getByTestId("content-test"); - fireEvent.blur(content); + act(() => { + content.blur(); + }); + expect(onClose).toHaveBeenCalledTimes(1); }); @@ -104,7 +103,7 @@ describe("Popover", () => { const onClose = jest.fn(); const wrapper = render( - (!isOpen ? onClose() : undefined)}> +