Skip to content

Commit

Permalink
fix(system): listbox href issue (experimental) (#3119)
Browse files Browse the repository at this point in the history
* fix(system): @react-aria/utils

* feat(hooks): include routerLinkProps

* feat(changeset): add changeset

* chore(deps): bump @react-aria/utils to 3.24.1

* fix(hooks): missing arguments

* chore(deps): bump @react-types/link

* chore(link): bump @react-aria/link to 3.7.1

* chore(link): use @react-aria/link instead

* chore(changeset): revise changeset

* chore(hooks): undo use-aria-link changes

* chore(deps): undo use-aria-link changes

* chore(deps): bump `@react-aria/utils` to `3.24.1`

* chore(deps): bump `@react-types/shared`

* feat: add missing router.open parameters due to router change

* chore(changeset): add new line

* chore(deps): bump `@react-types/shared` to `3.23.1`
  • Loading branch information
wingkwong authored May 29, 2024
1 parent 43bef07 commit 685995a
Show file tree
Hide file tree
Showing 50 changed files with 455 additions and 314 deletions.
40 changes: 40 additions & 0 deletions .changeset/eighty-dolls-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
"@nextui-org/accordion": patch
"@nextui-org/autocomplete": patch
"@nextui-org/breadcrumbs": patch
"@nextui-org/button": patch
"@nextui-org/calendar": patch
"@nextui-org/card": patch
"@nextui-org/checkbox": patch
"@nextui-org/chip": patch
"@nextui-org/dropdown": patch
"@nextui-org/input": patch
"@nextui-org/link": patch
"@nextui-org/listbox": patch
"@nextui-org/menu": patch
"@nextui-org/modal": patch
"@nextui-org/navbar": patch
"@nextui-org/pagination": patch
"@nextui-org/popover": patch
"@nextui-org/progress": patch
"@nextui-org/radio": patch
"@nextui-org/select": patch
"@nextui-org/slider": patch
"@nextui-org/switch": patch
"@nextui-org/table": patch
"@nextui-org/tabs": patch
"@nextui-org/tooltip": patch
"@nextui-org/system": patch
"@nextui-org/use-aria-accordion": patch
"@nextui-org/use-aria-button": patch
"@nextui-org/use-aria-link": patch
"@nextui-org/use-aria-menu": patch
"@nextui-org/use-aria-modal-overlay": patch
"@nextui-org/use-aria-multiselect": patch
"@nextui-org/use-aria-toggle-button": patch
"@nextui-org/use-disclosure": patch
"@nextui-org/use-intersection-observer": patch
"@nextui-org/aria-utils": patch
---

bump `@react-aria/utils` version to `3.24.1` and bump `@react-types/shared` to `3.23.1`
6 changes: 6 additions & 0 deletions .changeset/fast-ladybugs-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@nextui-org/system": patch
"@nextui-org/link": patch
---

Fixed listbox href issue (#3105)
7 changes: 7 additions & 0 deletions .changeset/friendly-months-tease.md.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@nextui-org/pagination": patch
"@nextui-org/use-aria-link": patch
"@nextui-org/use-aria-menu": patch
---

Add missing router.open parameters due to router change
4 changes: 2 additions & 2 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@react-aria/interactions": "^3.21.1",
"@react-aria/selection": "^3.17.5",
"@react-aria/ssr": "^3.9.2",
"@react-aria/utils": "^3.23.2",
"@react-aria/utils": "3.24.1",
"@react-aria/virtualizer": "^3.9.10",
"@react-aria/visually-hidden": "^3.8.10",
"@react-stately/data": "^3.11.2",
Expand Down Expand Up @@ -101,7 +101,7 @@
"@docusaurus/utils": "2.0.0-beta.3",
"@next/bundle-analyzer": "^13.4.6",
"@next/env": "^13.4.12",
"@react-types/shared": "^3.22.1",
"@react-types/shared": "3.23.1",
"@tailwindcss/typography": "^0.5.9",
"@types/canvas-confetti": "^1.4.2",
"@types/lodash": "^4.14.194",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@commitlint/config-conventional": "^17.2.0",
"@react-bootstrap/babel-preset": "^2.1.0",
"@react-types/link": "^3.4.4",
"@react-types/shared": "^3.22.1",
"@react-types/shared": "3.23.1",
"@swc-node/jest": "^1.5.2",
"@swc/core": "^1.3.35",
"@swc/jest": "^0.2.24",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
"@nextui-org/use-aria-accordion": "workspace:*",
"@react-aria/interactions": "3.21.1",
"@react-aria/focus": "3.16.2",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-stately/tree": "3.7.6",
"@react-aria/button": "3.9.3",
"@react-types/accordion": "3.0.0-alpha.19",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/autocomplete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
"@react-aria/focus": "3.16.2",
"@react-aria/i18n": "3.10.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-aria/visually-hidden": "3.8.10",
"@react-stately/combobox": "3.8.2",
"@react-types/combobox": "3.10.1",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/breadcrumbs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"@nextui-org/shared-icons": "workspace:*",
"@react-aria/focus": "3.16.2",
"@react-aria/breadcrumbs": "3.5.11",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-types/breadcrumbs": "3.7.3",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
"@nextui-org/spinner": "workspace:*",
"@react-aria/button": "3.9.3",
"@react-aria/interactions": "3.21.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-aria/focus": "3.16.2",
"@react-types/shared": "3.22.1",
"@react-types/shared": "3.23.1",
"@react-types/button": "3.9.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@
"@react-stately/calendar": "3.4.4",
"@react-types/button": "3.9.2",
"@react-aria/visually-hidden": "3.8.10",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-stately/utils": "3.9.1",
"@react-types/calendar": "3.4.4",
"@react-aria/interactions": "3.21.1",
"@react-types/shared": "3.22.1",
"@react-types/shared": "3.23.1",
"scroll-into-view-if-needed": "3.0.10",
"@types/lodash.debounce": "^4.0.7"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/components/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
"@nextui-org/use-aria-button": "workspace:*",
"@nextui-org/ripple": "workspace:*",
"@react-aria/focus": "3.16.2",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-aria/interactions": "3.21.1",
"@react-aria/button": "3.9.3",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
"@react-aria/checkbox": "3.14.1",
"@react-aria/focus": "3.16.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-aria/visually-hidden": "3.8.10",
"@react-stately/checkbox": "3.6.3",
"@react-stately/toggle": "3.7.2",
"@react-types/checkbox": "3.7.1",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/chip": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/chip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@nextui-org/react-utils": "workspace:*",
"@react-aria/focus": "3.16.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-types/checkbox": "3.7.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/date-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@react-aria/i18n": "3.10.2",
"@react-stately/datepicker": "3.9.2",
"@react-types/datepicker": "3.7.2",
"@react-types/shared": "3.22.1",
"@react-types/shared": "3.23.1",
"@react-aria/utils": "3.23.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/date-picker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@react-aria/i18n": "3.10.2",
"@react-stately/datepicker": "3.9.2",
"@react-types/datepicker": "3.7.2",
"@react-types/shared": "3.22.1",
"@react-types/shared": "3.23.1",
"@react-aria/utils": "3.23.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/divider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@nextui-org/shared-utils": "workspace:*",
"@nextui-org/react-rsc-utils": "workspace:*",
"@nextui-org/system-rsc": "workspace:*",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@nextui-org/react-utils": "workspace:*",
"@nextui-org/aria-utils": "workspace:*",
"@react-aria/menu": "3.13.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-stately/menu": "3.6.1",
"@react-aria/focus": "3.16.2",
"@react-types/menu": "3.9.7"
Expand Down
4 changes: 2 additions & 2 deletions packages/components/input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"@react-aria/focus": "3.16.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/textfield": "3.14.3",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-stately/utils": "3.9.1",
"@react-types/shared": "3.22.1",
"@react-types/shared": "3.23.1",
"@react-types/textfield": "3.9.1",
"react-textarea-autosize": "^8.5.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/components/link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"@nextui-org/shared-icons": "workspace:*",
"@nextui-org/react-utils": "workspace:*",
"@nextui-org/use-aria-link": "workspace:*",
"@react-aria/link": "3.6.5",
"@react-aria/utils": "3.23.2",
"@react-aria/link": "3.7.1",
"@react-aria/utils": "3.24.1",
"@react-aria/focus": "3.16.2",
"@react-types/link": "3.5.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/components/link/src/use-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {AriaLinkProps} from "@react-types/link";
import type {LinkVariantProps} from "@nextui-org/theme";

import {link} from "@nextui-org/theme";
import {useAriaLink} from "@nextui-org/use-aria-link";
import {useLink as useAriaLink} from "@react-aria/link";
import {
HTMLNextUIProps,
mapPropsVariants,
Expand Down
4 changes: 2 additions & 2 deletions packages/components/listbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
"@nextui-org/divider": "workspace:*",
"@nextui-org/aria-utils": "workspace:*",
"@nextui-org/use-is-mobile": "workspace:*",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-aria/listbox": "3.11.5",
"@react-stately/list": "3.10.3",
"@react-aria/focus": "3.16.2",
"@react-aria/interactions": "3.21.1",
"@react-types/menu": "3.9.7",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/menu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
"@react-aria/focus": "3.16.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/menu": "3.13.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-stately/menu": "3.6.1",
"@react-stately/tree": "3.7.6",
"@react-types/menu": "3.9.7",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@react-aria/focus": "3.16.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/overlays": "3.21.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-stately/overlays": "3.6.5",
"@react-types/overlays": "3.8.5"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/components/navbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@react-aria/focus": "3.16.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/overlays": "3.21.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-stately/toggle": "3.7.2",
"@react-stately/utils": "3.9.1",
"react-remove-scroll": "^2.5.6"
Expand Down
2 changes: 1 addition & 1 deletion packages/components/pagination/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@react-aria/focus": "3.16.2",
"@react-aria/i18n": "3.10.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"scroll-into-view-if-needed": "3.0.10"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions packages/components/pagination/src/use-pagination-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,11 @@ export function usePaginationItem(props: UsePaginationItemProps) {
e.currentTarget.href &&
// If props are applied to a router Link component, it may have already prevented default.
!e.isDefaultPrevented() &&
shouldClientNavigate(e.currentTarget, e)
shouldClientNavigate(e.currentTarget, e) &&
props.href
) {
e.preventDefault();
router.open(e.currentTarget, e);
router.open(e.currentTarget, e, props.href, props.routerOptions);
}
},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/components/popover/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@react-aria/focus": "3.16.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/overlays": "3.21.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-stately/overlays": "3.6.5",
"@react-types/button": "3.9.2",
"@react-types/overlays": "3.8.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/progress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@nextui-org/use-is-mounted": "workspace:*",
"@react-aria/i18n": "3.10.2",
"@react-aria/progress": "3.4.11",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-types/progress": "3.5.2"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/radio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"@react-aria/focus": "3.16.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/radio": "3.10.2",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-aria/visually-hidden": "3.8.10",
"@react-stately/radio": "3.10.2",
"@react-types/radio": "3.7.1",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/components/select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"@react-aria/focus": "3.16.2",
"@react-aria/form": "3.0.3",
"@react-aria/interactions": "3.21.1",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-aria/visually-hidden": "3.8.10",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/slider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@react-aria/i18n": "3.10.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/slider": "3.7.6",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-aria/visually-hidden": "3.8.10",
"@react-stately/slider": "3.5.2"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/components/switch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@
"@react-aria/focus": "3.16.2",
"@react-aria/interactions": "3.21.1",
"@react-aria/switch": "3.6.2",
"@react-aria/utils": "3.23.2",
"@react-aria/utils": "3.24.1",
"@react-aria/visually-hidden": "3.8.10",
"@react-stately/toggle": "3.7.2",
"@react-types/shared": "3.22.1"
"@react-types/shared": "3.23.1"
},
"devDependencies": {
"@nextui-org/theme": "workspace:*",
Expand Down
Loading

0 comments on commit 685995a

Please sign in to comment.