Skip to content

Commit

Permalink
Update absolute path to relative
Browse files Browse the repository at this point in the history
Signed-off-by: gpbl <[email protected]>
  • Loading branch information
gpbl committed Apr 20, 2024
1 parent df16325 commit 29bee12
Show file tree
Hide file tree
Showing 153 changed files with 444 additions and 438 deletions.
8 changes: 4 additions & 4 deletions src/DayPicker.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DayPickerDefaultProps } from "types/DayPickerDefault";
import { DayPickerMultipleProps } from "types/DayPickerMultiple";
import { DayPickerRangeProps } from "types/DayPickerRange";
import { DayPickerSingleProps } from "types/DayPickerSingle";
import { DayPickerDefaultProps } from "./types/DayPickerDefault";
import { DayPickerMultipleProps } from "./types/DayPickerMultiple";
import { DayPickerRangeProps } from "./types/DayPickerRange";
import { DayPickerSingleProps } from "./types/DayPickerSingle";

import { Root } from "./components/Root";
import { RootProvider } from "./contexts/RootProvider";
Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/Button.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { screen } from "@testing-library/react";

import { customRender } from "test/render";
import { customRender } from "../../../test/render";

import { Button } from "./Button";

Expand Down
2 changes: 1 addition & 1 deletion src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { forwardRef } from "react";

import { useDayPicker } from "contexts/DayPicker";
import { useDayPicker } from "../../contexts/DayPicker";

/** The props for the {@link Button} component. */
export type ButtonProps = JSX.IntrinsicElements["button"];
Expand Down
10 changes: 5 additions & 5 deletions src/components/Caption/Caption.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { screen } from "@testing-library/react";
import { DayPickerProps } from "DayPicker";
import { DayPickerProps } from "../../DayPicker";

import { customRender } from "test/render";
import { customRender } from "../../../test/render";
import {
getMonthCaption,
getMonthDropdown,
Expand All @@ -10,10 +10,10 @@ import {
getYearDropdown,
queryNextButton,
queryPrevButton
} from "test/selectors";
import { freezeBeforeAll } from "test/utils";
} from "../../../test/selectors";
import { freezeBeforeAll } from "../../../test/utils";

import { CustomComponents } from "types/DayPickerBase";
import { CustomComponents } from "../../types/DayPickerBase";

import { Caption, CaptionProps } from "./Caption";

Expand Down
8 changes: 4 additions & 4 deletions src/components/Caption/Caption.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CaptionDropdowns } from "components/CaptionDropdowns";
import { CaptionLabel } from "components/CaptionLabel";
import { CaptionNavigation } from "components/CaptionNavigation";
import { useDayPicker } from "contexts/DayPicker";
import { CaptionDropdowns } from "../../components/CaptionDropdowns";
import { CaptionLabel } from "../../components/CaptionLabel";
import { CaptionNavigation } from "../../components/CaptionNavigation";
import { useDayPicker } from "../../contexts/DayPicker";

/** Represent the props of the {@link Caption} component. */
export interface CaptionProps {
Expand Down
14 changes: 7 additions & 7 deletions src/components/CaptionDropdowns/CaptionDropdowns.test.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { screen } from "@testing-library/react";
import { setMonth, setYear } from "date-fns";
import { DayPickerProps } from "DayPicker";
import { DayPickerProps } from "../../DayPicker";

import { customRender } from "test/render";
import { customRender } from "../../../test/render";
import {
getMonthDropdown,
getYearDropdown,
queryMonthDropdown,
queryYearDropdown
} from "test/selectors";
import { user } from "test/user";
import { freezeBeforeAll } from "test/utils";
} from "../../../test/selectors";
import { user } from "../../../test/user";
import { freezeBeforeAll } from "../../../test/utils";

import { CaptionProps } from "components/Caption";
import { CustomComponents } from "types/DayPickerBase";
import { CaptionProps } from "../../components/Caption";
import { CustomComponents } from "../../types/DayPickerBase";

import { CaptionDropdowns } from "./CaptionDropdowns";

Expand Down
14 changes: 7 additions & 7 deletions src/components/CaptionDropdowns/CaptionDropdowns.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { addMonths } from "date-fns";

import { CaptionProps } from "components/Caption/Caption";
import { CaptionLabel } from "components/CaptionLabel";
import { MonthsDropdown } from "components/MonthsDropdown";
import { YearsDropdown } from "components/YearsDropdown";
import { useDayPicker } from "contexts/DayPicker";
import { useNavigation } from "contexts/Navigation";
import { MonthChangeEventHandler } from "types/EventHandlers";
import { CaptionProps } from "../../components/Caption/Caption";
import { CaptionLabel } from "../../components/CaptionLabel";
import { MonthsDropdown } from "../../components/MonthsDropdown";
import { YearsDropdown } from "../../components/YearsDropdown";
import { useDayPicker } from "../../contexts/DayPicker";
import { useNavigation } from "../../contexts/Navigation";
import { MonthChangeEventHandler } from "../../types/EventHandlers";

/** Render a caption with the dropdowns to navigate between months and years. */
export function CaptionDropdowns(props: CaptionProps): JSX.Element {
Expand Down
6 changes: 3 additions & 3 deletions src/components/CaptionLabel/CaptionLabel.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { customRender } from "test/render";
import { getMonthCaption } from "test/selectors";
import { freezeBeforeAll } from "test/utils";
import { customRender } from "../../../test/render";
import { getMonthCaption } from "../../../test/selectors";
import { freezeBeforeAll } from "../../../test/utils";

import { CaptionLabel } from "./CaptionLabel";

Expand Down
2 changes: 1 addition & 1 deletion src/components/CaptionLabel/CaptionLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useDayPicker } from "contexts/DayPicker";
import { useDayPicker } from "../../contexts/DayPicker";

/** The props for the {@link CaptionLabel} component. */
export interface CaptionLabelProps {
Expand Down
10 changes: 5 additions & 5 deletions src/components/CaptionNavigation/CaptionNavigation.test.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { addMonths } from "date-fns";
import { DayPickerProps } from "DayPicker";
import { DayPickerProps } from "../../DayPicker";

import { customRender } from "test/render";
import { customRender } from "../../../test/render";
import {
getNextButton,
getPrevButton,
queryNextButton,
queryPrevButton
} from "test/selectors";
import { user } from "test/user";
import { freezeBeforeAll } from "test/utils";
} from "../../../test/selectors";
import { user } from "../../../test/user";
import { freezeBeforeAll } from "../../../test/utils";

import { CaptionNavigation } from "./CaptionNavigation";

Expand Down
8 changes: 4 additions & 4 deletions src/components/CaptionNavigation/CaptionNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { MouseEventHandler } from "react";

import { isSameMonth } from "date-fns";

import { CaptionProps } from "components/Caption/Caption";
import { Navigation } from "components/Navigation";
import { useDayPicker } from "contexts/DayPicker";
import { useNavigation } from "contexts/Navigation";
import { CaptionProps } from "../../components/Caption/Caption";
import { Navigation } from "../../components/Navigation";
import { useDayPicker } from "../../contexts/DayPicker";
import { useNavigation } from "../../contexts/Navigation";

/** Render a caption with a button-based navigation. */
export function CaptionNavigation(props: CaptionProps): JSX.Element {
Expand Down
8 changes: 4 additions & 4 deletions src/components/Day/Day.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { screen } from "@testing-library/react";
import { DayPickerProps } from "DayPicker";
import { DayPickerProps } from "../../DayPicker";

import { customRender } from "test/render";
import { freezeBeforeAll } from "test/utils";
import { customRender } from "../../../test/render";
import { freezeBeforeAll } from "../../../test/utils";

import { CustomComponents } from "types/DayPickerBase";
import { CustomComponents } from "../../types/DayPickerBase";

import { Day, DayProps } from "./Day";

Expand Down
2 changes: 1 addition & 1 deletion src/components/Day/Day.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRef } from "react";

import { useDayRender } from "hooks/useDayRender";
import { useDayRender } from "../../hooks/useDayRender";

import { Button } from "../Button";

Expand Down
8 changes: 4 additions & 4 deletions src/components/DayContent/DayContent.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { es } from "date-fns/locale";
import { DayPickerProps } from "DayPicker";
import { DayPickerProps } from "../../DayPicker";

import { customRender } from "test/render";
import { freezeBeforeAll } from "test/utils";
import { customRender } from "../../../test/render";
import { freezeBeforeAll } from "../../../test/utils";

import { DayContent, DayContentProps } from "components/DayContent";
import { DayContent, DayContentProps } from "../../components/DayContent";

const today = new Date(2021, 8);

Expand Down
4 changes: 2 additions & 2 deletions src/components/DayContent/DayContent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useDayPicker } from "contexts/DayPicker";
import { ActiveModifiers } from "types/Modifiers";
import { useDayPicker } from "../../contexts/DayPicker";
import { ActiveModifiers } from "../../types/Modifiers";

/** Represent the props for the {@link DayContent} component. */
export interface DayContentProps {
Expand Down
12 changes: 6 additions & 6 deletions src/components/Dropdown/Dropdown.test.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { fireEvent, screen } from "@testing-library/react";
import { DayPickerProps } from "DayPicker";
import { DayPickerProps } from "../../DayPicker";

import { customRender } from "test/render";
import { freezeBeforeAll } from "test/utils";
import { customRender } from "../../../test/render";
import { freezeBeforeAll } from "../../../test/utils";

import { Dropdown, DropdownProps } from "components/Dropdown";
import { defaultClassNames } from "contexts/DayPicker/defaultClassNames";
import { CustomComponents } from "types/DayPickerBase";
import { Dropdown, DropdownProps } from "../../components/Dropdown";
import { defaultClassNames } from "../../contexts/DayPicker/defaultClassNames";
import { CustomComponents } from "../../types/DayPickerBase";

const today = new Date(2021, 8);

Expand Down
4 changes: 2 additions & 2 deletions src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
SelectHTMLAttributes
} from "react";

import { IconDropdown } from "components/IconDropdown";
import { useDayPicker } from "contexts/DayPicker";
import { IconDropdown } from "../../components/IconDropdown";
import { useDayPicker } from "../../contexts/DayPicker";

/** The props for the {@link Dropdown} component. */
export interface DropdownProps {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Footer/Footer.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { customRender } from "test/render";
import { getTableFooter, queryTableFooter } from "test/selectors";
import { customRender } from "../../../test/render";
import { getTableFooter, queryTableFooter } from "../../../test/selectors";

import { Footer } from "./Footer";

Expand Down
2 changes: 1 addition & 1 deletion src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useDayPicker } from "contexts/DayPicker";
import { useDayPicker } from "../../contexts/DayPicker";

export interface FooterProps {
/** The month where the footer is displayed. */
Expand Down
4 changes: 2 additions & 2 deletions src/components/Head/Head.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RenderResult, screen } from "@testing-library/react";
import { DayPickerProps } from "DayPicker";
import { DayPickerProps } from "../../DayPicker";

import { customRender } from "test/render";
import { customRender } from "../../../test/render";

import { Head } from "./Head";

Expand Down
4 changes: 2 additions & 2 deletions src/components/Head/Head.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HeadRow } from "components/HeadRow";
import { useDayPicker } from "contexts/DayPicker";
import { HeadRow } from "../../components/HeadRow";
import { useDayPicker } from "../../contexts/DayPicker";

/** Render the table head. */
export function Head(): JSX.Element {
Expand Down
4 changes: 2 additions & 2 deletions src/components/HeadRow/HeadRow.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RenderResult } from "@testing-library/react";
import { DayPickerProps } from "DayPicker";
import { DayPickerProps } from "../../DayPicker";

import { customRender } from "test/render";
import { customRender } from "../../../test/render";

import { HeadRow } from "./HeadRow";

Expand Down
2 changes: 1 addition & 1 deletion src/components/HeadRow/HeadRow.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useDayPicker } from "contexts/DayPicker";
import { useDayPicker } from "../../contexts/DayPicker";

import { getWeekdays } from "./utils";

Expand Down
2 changes: 1 addition & 1 deletion src/components/HeadRow/utils/getWeekdays.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { es } from "date-fns/locale";

import { freezeBeforeAll } from "test/utils";
import { freezeBeforeAll } from "../../../../test/utils";

import { getWeekdays } from "./getWeekdays";

Expand Down
2 changes: 1 addition & 1 deletion src/components/IconDropdown/IconDropdown.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { customRender } from "test/render";
import { customRender } from "../../../test/render";

import { IconDropdown } from "./IconDropdown";

Expand Down
2 changes: 1 addition & 1 deletion src/components/IconDropdown/IconDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StyledComponent } from "types/Styles";
import { StyledComponent } from "../../types/Styles";

/** Render the icon in the styled drop-down. */
export function IconDropdown(props: StyledComponent): JSX.Element {
Expand Down
2 changes: 1 addition & 1 deletion src/components/IconLeft/IconLeft.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { customRender } from "test/render";
import { customRender } from "../../../test/render";

import { IconLeft } from "./IconLeft";

Expand Down
2 changes: 1 addition & 1 deletion src/components/IconLeft/IconLeft.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StyledComponent } from "types/Styles";
import { StyledComponent } from "../../types/Styles";

/** Render the "previous month" button in the navigation. */
export function IconLeft(props: StyledComponent): JSX.Element {
Expand Down
2 changes: 1 addition & 1 deletion src/components/IconRight/IconRight.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { customRender } from "test/render";
import { customRender } from "../../../test/render";

import { IconRight } from "./IconRight";

Expand Down
2 changes: 1 addition & 1 deletion src/components/IconRight/IconRight.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StyledComponent } from "types/Styles";
import { StyledComponent } from "../../types/Styles";

/** Render the "next month" button in the navigation. */
export function IconRight(props: StyledComponent): JSX.Element {
Expand Down
8 changes: 4 additions & 4 deletions src/components/Month/Month.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { screen } from "@testing-library/react";
import { DayPickerProps } from "DayPicker";
import { DayPickerProps } from "../../DayPicker";

import { customRender } from "test/render";
import { getMonthCaption, getMonthGrid } from "test/selectors";
import { customRender } from "../../../test/render";
import { getMonthCaption, getMonthGrid } from "../../../test/selectors";

import { CustomComponents } from "types/DayPickerBase";
import { CustomComponents } from "../../types/DayPickerBase";

import { Month, MonthProps } from "./Month";

Expand Down
10 changes: 5 additions & 5 deletions src/components/Month/Month.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Caption } from "components/Caption";
import { Table } from "components/Table";
import { useDayPicker } from "contexts/DayPicker";
import { useNavigation } from "contexts/Navigation";
import { useId } from "hooks/useId";
import { Caption } from "../../components/Caption";
import { Table } from "../../components/Table";
import { useDayPicker } from "../../contexts/DayPicker";
import { useNavigation } from "../../contexts/Navigation";
import { useId } from "../../hooks/useId";

/** The props for the {@link Month} component. */
export interface MonthProps {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Months/Months.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { customRender } from "test/render";
import { customRender } from "../../../test/render";

import { Months } from "./Months";

Expand Down
2 changes: 1 addition & 1 deletion src/components/Months/Months.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from "react";

import { useDayPicker } from "contexts/DayPicker";
import { useDayPicker } from "../../contexts/DayPicker";

/** The props for the {@link Months} component. */
export type MonthsProps = { children: ReactNode };
Expand Down
8 changes: 4 additions & 4 deletions src/components/MonthsDropdown/MonthsDropdown.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { screen } from "@testing-library/react";
import { addMonths, differenceInMonths } from "date-fns";
import { DayPickerProps } from "DayPicker";
import { DayPickerProps } from "../../DayPicker";

import { customRender } from "test/render";
import { user } from "test/user";
import { freezeBeforeAll } from "test/utils";
import { customRender } from "../../../test/render";
import { user } from "../../../test/user";
import { freezeBeforeAll } from "../../../test/utils";

import { MonthsDropdown, MonthsDropdownProps } from "./MonthsDropdown";

Expand Down
Loading

0 comments on commit 29bee12

Please sign in to comment.