Skip to content

Commit

Permalink
Merge branch 'canary' into feat/eng-1633-virtualization-for-table
Browse files Browse the repository at this point in the history
  • Loading branch information
vinroger committed Dec 9, 2024
1 parent 72b4f88 commit 6346107
Show file tree
Hide file tree
Showing 158 changed files with 2,064 additions and 1,743 deletions.
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
2 changes: 1 addition & 1 deletion apps/docs/content/blog/v2.6.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Built on [React Aria's Form](https://react-spectrum.adobe.com/react-aria/forms.h

<Spacer y={4} />

<CodeDemo title="Usage" showEditor={false} files={formContent.demo} />
<CodeDemo title="Usage" files={formContent.demo} />

### Built-in Validation

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 6346107

Please sign in to comment.