Skip to content

Commit

Permalink
chore(deps): sync with upstream RA versions (#4258)
Browse files Browse the repository at this point in the history
* chore(deps): sync with upstream RA versions

* chore(changeset): add changeset

* chore(form): remove caret

* chore(deps): pnpm-lock.yaml

* fix(tooltip): type 'null' is not assignable to type 'PlacementAxis'

* fix(deps): bump `@internationalized/date`

* chore(deps): sync `@react-types` versions

* fix(input): follow RAC typing in useTextField

* fix(popover): typecheck error

* fix: typecheck errors

* fix: typecheck errors

* fix(docs): bump RA versions

---------

Co-authored-by: Junior Garcia <[email protected]>
  • Loading branch information
wingkwong and jrgarciadev authored Dec 8, 2024
1 parent 455556e commit 1031e98
Show file tree
Hide file tree
Showing 90 changed files with 1,321 additions and 1,490 deletions.
55 changes: 55 additions & 0 deletions .changeset/fast-lamps-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
"@nextui-org/use-intersection-observer": patch
"@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/use-aria-accordion": patch
"@nextui-org/autocomplete": patch
"@nextui-org/breadcrumbs": patch
"@nextui-org/date-picker": patch
"@nextui-org/date-input": patch
"@nextui-org/pagination": patch
"@nextui-org/use-aria-button": patch
"@nextui-org/accordion": patch
"@nextui-org/input-otp": patch
"@nextui-org/use-disclosure": patch
"@nextui-org/use-pagination": patch
"@nextui-org/aria-utils": patch
"@nextui-org/calendar": patch
"@nextui-org/checkbox": patch
"@nextui-org/dropdown": patch
"@nextui-org/progress": patch
"@nextui-org/use-aria-link": patch
"@nextui-org/use-aria-menu": patch
"@nextui-org/use-draggable": 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/slider": patch
"@nextui-org/switch": patch
"@nextui-org/alert": 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/form": patch
"@nextui-org/link": patch
"@nextui-org/menu": patch
"@nextui-org/tabs": patch
"@nextui-org/user": patch
"@nextui-org/system-rsc": patch
"@nextui-org/system": patch
"@nextui-org/react": patch
---

sync with upstream RA versions
6 changes: 3 additions & 3 deletions apps/docs/app/examples/table/custom-styles/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ export default function Page() {
</Button>
</DropdownTrigger>
<DropdownMenu>
<DropdownItem>View</DropdownItem>
<DropdownItem>Edit</DropdownItem>
<DropdownItem>Delete</DropdownItem>
<DropdownItem key="view">View</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/app/examples/table/use-case/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@ export default function Page() {
</Button>
</DropdownTrigger>
<DropdownMenu>
<DropdownItem>View</DropdownItem>
<DropdownItem>Edit</DropdownItem>
<DropdownItem>Delete</DropdownItem>
<DropdownItem key="view">View</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {today, getLocalTimeZone} from "@internationalized/date";

export default function App() {
let defaultDate = today(getLocalTimeZone());
let [focusedDate, setFocusedDate] = React.useState<DateValue>(defaultDate);
let [focusedDate, setFocusedDate] = React.useState<DateValue | null>(defaultDate);

return (
<Calendar
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/components/calendar/controlled.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Calendar} from "@nextui-org/react";
import {parseDate} from "@internationalized/date";

export default function App() {
let [value, setValue] = React.useState<DateValue>(parseDate("2024-03-07"));
let [value, setValue] = React.useState<DateValue | null>(parseDate("2024-03-07"));

return <Calendar aria-label="Date (Controlled)" value={value} onChange={setValue} />;
}
4 changes: 2 additions & 2 deletions apps/docs/content/components/calendar/invalid-date.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {today, getLocalTimeZone, isWeekend} from "@internationalized/date";
import {useLocale} from "@react-aria/i18n";

export default function App() {
let [date, setDate] = React.useState<DateValue>(today(getLocalTimeZone()));
let [date, setDate] = React.useState<DateValue | null>(today(getLocalTimeZone()));
let {locale} = useLocale();
let isInvalid = isWeekend(date, locale);
let isInvalid = isWeekend(date!, locale);

return (
<Calendar
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/components/calendar/presets.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {useLocale} from "@react-aria/i18n";

export default function App() {
let defaultDate = today(getLocalTimeZone());
let [value, setValue] = React.useState<DateValue>(defaultDate);
let [value, setValue] = React.useState<DateValue | null>(defaultDate);
let {locale} = useLocale();

let now = today(getLocalTimeZone());
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/components/date-input/controlled.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {DateValue, parseDate, getLocalTimeZone} from "@internationalized/date";
import {useDateFormatter} from "@react-aria/i18n";

export default function App() {
const [value, setValue] = React.useState<DateValue>(parseDate("2024-04-04"));
const [value, setValue] = React.useState<DateValue | null>(parseDate("2024-04-04"));

let formatter = useDateFormatter({dateStyle: "full"});

Expand Down
4 changes: 3 additions & 1 deletion apps/docs/content/components/date-input/granularity.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import {DateInput} from "@nextui-org/react";
import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date";

export default function App() {
let [date, setDate] = React.useState<DateValue>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="w-full max-w-xl flex flex-col items-start gap-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import {DateValue, parseAbsoluteToLocal} from "@internationalized/date";
import {I18nProvider} from "@react-aria/i18n";

export default function App() {
const [date, setDate] = React.useState<DateValue>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
const [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="flex flex-col gap-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {DateValue, parseDate, getLocalTimeZone} from "@internationalized/date";
import {useDateFormatter} from "@react-aria/i18n";

export default function App() {
const [value, setValue] = React.useState<DateValue>(parseDate("2024-04-04"));
const [value, setValue] = React.useState<DateValue | null>(parseDate("2024-04-04"));

let formatter = useDateFormatter({dateStyle: "full"});

Expand Down
4 changes: 3 additions & 1 deletion apps/docs/content/components/date-picker/granularity.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import {DatePicker} from "@nextui-org/react";
import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date";

export default function App() {
let [date, setDate] = React.useState<DateValue>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="w-full max-w-xl flex flex-col items-start gap-4">
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/components/date-picker/granularity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const AppTs = `import {DatePicker} from "@nextui-org/react";
import {DateValue, now, parseAbsoluteToLocal} from "@internationalized/date";
export default function App() {
let [date, setDate] = React.useState<DateValue>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
return (
<div className="w-full max-w-xl flex flex-col items-start gap-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import {DateValue, parseAbsoluteToLocal} from "@internationalized/date";
import {I18nProvider} from "@react-aria/i18n";

export default function App() {
let [date, setDate] = React.useState<DateValue>(parseAbsoluteToLocal("2021-04-07T18:45:22Z"));
let [date, setDate] = React.useState<DateValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

return (
<div className="flex flex-col gap-4">
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/components/date-picker/preset.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {useLocale, useDateFormatter} from "@react-aria/i18n";
export default function App() {
let defaultDate = today(getLocalTimeZone());

const [value, setValue] = React.useState<DateValue>(defaultDate);
const [value, setValue] = React.useState<DateValue | null>(defaultDate);

let {locale} = useLocale();
let formatter = useDateFormatter({dateStyle: "full"});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {parseDate, getLocalTimeZone} from "@internationalized/date";
import {useDateFormatter} from "@react-aria/i18n";

export default function App() {
const [value, setValue] = React.useState<RangeValue<DateValue>>({
const [value, setValue] = React.useState<RangeValue<DateValue> | null>({
start: parseDate("2024-04-01"),
end: parseDate("2024-04-08"),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {DateRangePicker} from "@nextui-org/react";
import {parseAbsoluteToLocal} from "@internationalized/date";

export default function App() {
let [date, setDate] = React.useState<RangeValue<DateValue>>({
let [date, setDate] = React.useState<RangeValue<DateValue> | null>({
start: parseAbsoluteToLocal("2024-04-01T18:45:22Z"),
end: parseAbsoluteToLocal("2024-04-08T19:15:22Z"),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {parseAbsoluteToLocal} from "@internationalized/date";
import {I18nProvider} from "@react-aria/i18n";

export default function App() {
let [date, setDate] = React.useState<RangeValue<DateValue>>({
let [date, setDate] = React.useState<RangeValue<DateValue> | null>({
start: parseAbsoluteToLocal("2021-04-01T18:45:22Z"),
end: parseAbsoluteToLocal("2021-04-14T19:15:22Z"),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function App() {
end: today(getLocalTimeZone()).add({weeks: 1, days: 3}),
});

let [focusedValue, setFocusedValue] = React.useState<DateValue>(today(getLocalTimeZone()));
let [focusedValue, setFocusedValue] = React.useState<DateValue | null>(today(getLocalTimeZone()));

let {locale} = useLocale();

Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/components/table/custom-styles.raw.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ export default function App() {
</Button>
</DropdownTrigger>
<DropdownMenu>
<DropdownItem>View</DropdownItem>
<DropdownItem>Edit</DropdownItem>
<DropdownItem>Delete</DropdownItem>
<DropdownItem key="view">View</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/components/table/custom-styles.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@ export default function App() {
</Button>
</DropdownTrigger>
<DropdownMenu>
<DropdownItem>View</DropdownItem>
<DropdownItem>Edit</DropdownItem>
<DropdownItem>Delete</DropdownItem>
<DropdownItem key="view">View</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/components/table/use-case.raw.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@ export default function App() {
</Button>
</DropdownTrigger>
<DropdownMenu>
<DropdownItem>View</DropdownItem>
<DropdownItem>Edit</DropdownItem>
<DropdownItem>Delete</DropdownItem>
<DropdownItem key="view">View</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
Expand Down
6 changes: 3 additions & 3 deletions apps/docs/content/components/table/use-case.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@ export default function App() {
</Button>
</DropdownTrigger>
<DropdownMenu>
<DropdownItem>View</DropdownItem>
<DropdownItem>Edit</DropdownItem>
<DropdownItem>Delete</DropdownItem>
<DropdownItem key="view">View</DropdownItem>
<DropdownItem key="edit">Edit</DropdownItem>
<DropdownItem key="delete">Delete</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/components/time-input/controlled.raw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {parseAbsoluteToLocal, Time, ZonedDateTime} from "@internationalized/date
import {useDateFormatter} from "@react-aria/i18n";

export default function App() {
let [value, setValue] = React.useState<TimeInputValue>(
let [value, setValue] = React.useState<TimeInputValue | null>(
parseAbsoluteToLocal("2024-04-08T18:45:22Z"),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {TimeInput} from "@nextui-org/react";
import {parseAbsoluteToLocal} from "@internationalized/date";

export default function App() {
let [date, setDate] = React.useState<TimeInputValue>(
let [date, setDate] = React.useState<TimeInputValue | null>(
parseAbsoluteToLocal("2021-04-07T18:45:22Z"),
);

Expand Down
36 changes: 18 additions & 18 deletions apps/docs/content/docs/components/date-input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ in multiple formats into `ZonedDateTime` objects.

<PackageManagers
commands={{
npm: "npm install @internationalized/date@3.5.5",
yarn: "yarn add @internationalized/date@3.5.5",
pnpm: "pnpm add @internationalized/date@3.5.5",
npm: "npm install @internationalized/date@3.6.0",
yarn: "yarn add @internationalized/date@3.6.0",
pnpm: "pnpm add @internationalized/date@3.6.0",
}}
/>

Expand All @@ -129,9 +129,9 @@ in multiple formats into `ZonedDateTime` objects.

<PackageManagers
commands={{
npm: "npm install @internationalized/date@3.5.5 @react-aria/[email protected]",
yarn: "yarn add @internationalized/date@3.5.5 @react-aria/[email protected]",
pnpm: "pnpm add @internationalized/date@3.5.5 @react-aria/[email protected]",
npm: "npm install @internationalized/date@3.6.0 @react-aria/[email protected]",
yarn: "yarn add @internationalized/date@3.6.0 @react-aria/[email protected]",
pnpm: "pnpm add @internationalized/date@3.6.0 @react-aria/[email protected]",
}}
/>

Expand All @@ -153,9 +153,9 @@ in multiple formats into `ZonedDateTime` objects.

<PackageManagers
commands={{
npm: "npm install @internationalized/date@3.5.5",
yarn: "yarn add @internationalized/date@3.5.5",
pnpm: "pnpm add @internationalized/date@3.5.5",
npm: "npm install @internationalized/date@3.6.0",
yarn: "yarn add @internationalized/date@3.6.0",
pnpm: "pnpm add @internationalized/date@3.6.0",
}}
/>

Expand All @@ -177,9 +177,9 @@ in multiple formats into `ZonedDateTime` objects.

<PackageManagers
commands={{
npm: "npm install @internationalized/date@3.5.5 @react-aria/[email protected]",
yarn: "yarn add @internationalized/date@3.5.5 @react-aria/[email protected]",
pnpm: "pnpm add @internationalized/date@3.5.5 @react-aria/[email protected]",
npm: "npm install @internationalized/date@3.6.0 @react-aria/[email protected]",
yarn: "yarn add @internationalized/date@3.6.0 @react-aria/[email protected]",
pnpm: "pnpm add @internationalized/date@3.6.0 @react-aria/[email protected]",
}}
/>

Expand All @@ -200,9 +200,9 @@ in multiple formats into `ZonedDateTime` objects.

<PackageManagers
commands={{
npm: "npm install @internationalized/date@3.5.5",
yarn: "yarn add @internationalized/date@3.5.5",
pnpm: "pnpm add @internationalized/date@3.5.5",
npm: "npm install @internationalized/date@3.6.0",
yarn: "yarn add @internationalized/date@3.6.0",
pnpm: "pnpm add @internationalized/date@3.6.0",
}}
/>

Expand All @@ -223,9 +223,9 @@ in multiple formats into `ZonedDateTime` objects.

<PackageManagers
commands={{
npm: "npm install @internationalized/date@3.5.5",
yarn: "yarn add @internationalized/date@3.5.5",
pnpm: "pnpm add @internationalized/date@3.5.5",
npm: "npm install @internationalized/date@3.6.0",
yarn: "yarn add @internationalized/date@3.6.0",
pnpm: "pnpm add @internationalized/date@3.6.0",
}}
/>

Expand Down
Loading

0 comments on commit 1031e98

Please sign in to comment.