diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-09-19 18:13:57 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-09-19 19:12:31 +0200 |
| commit | 2faf2e34331703b3bdea3eb487cb8799c8d65377 (patch) | |
| tree | dedc6557ddaa8fedd42d9bdf77950f8f9168ebcb /src/components/organisms | |
| parent | d1fe9e2164fc5c8fd767b456eecc2a4eb929a33f (diff) | |
refactor(build): replace paths aliases with relative paths
Using paths aliases starting with "@" can be confusing and can lead to
conflict with existings modules. I prefer to use relative paths to
avoid extra configuration in tools because of these aliases.
Diffstat (limited to 'src/components/organisms')
72 files changed, 172 insertions, 188 deletions
diff --git a/src/components/organisms/forms/comment-form.test.tsx b/src/components/organisms/forms/comment-form.test.tsx index cac9df7..10119ce 100644 --- a/src/components/organisms/forms/comment-form.test.tsx +++ b/src/components/organisms/forms/comment-form.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import CommentForm from './comment-form'; const saveComment = async () => { diff --git a/src/components/organisms/forms/comment-form.tsx b/src/components/organisms/forms/comment-form.tsx index b2c725f..a823977 100644 --- a/src/components/organisms/forms/comment-form.tsx +++ b/src/components/organisms/forms/comment-form.tsx @@ -1,13 +1,13 @@ -import Button from '@components/atoms/buttons/button'; -import Form, { type FormProps } from '@components/atoms/forms/form'; +import { FC, ReactNode, useState } from 'react'; +import { useIntl } from 'react-intl'; +import Button from '../../atoms/buttons/button'; +import Form, { type FormProps } from '../../atoms/forms/form'; import Heading, { type HeadingProps, type HeadingLevel, -} from '@components/atoms/headings/heading'; -import Spinner from '@components/atoms/loaders/spinner'; -import LabelledField from '@components/molecules/forms/labelled-field'; -import { FC, ReactNode, useState } from 'react'; -import { useIntl } from 'react-intl'; +} from '../../atoms/headings/heading'; +import Spinner from '../../atoms/loaders/spinner'; +import LabelledField from '../../molecules/forms/labelled-field'; import styles from './comment-form.module.scss'; export type CommentFormData = { diff --git a/src/components/organisms/forms/contact-form.test.tsx b/src/components/organisms/forms/contact-form.test.tsx index 521179a..def4346 100644 --- a/src/components/organisms/forms/contact-form.test.tsx +++ b/src/components/organisms/forms/contact-form.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import ContactForm from './contact-form'; const props = { diff --git a/src/components/organisms/forms/contact-form.tsx b/src/components/organisms/forms/contact-form.tsx index 912402c..b8dcb5e 100644 --- a/src/components/organisms/forms/contact-form.tsx +++ b/src/components/organisms/forms/contact-form.tsx @@ -1,9 +1,9 @@ -import Button from '@components/atoms/buttons/button'; -import Form from '@components/atoms/forms/form'; -import Spinner from '@components/atoms/loaders/spinner'; -import LabelledField from '@components/molecules/forms/labelled-field'; import { FC, ReactNode, useState } from 'react'; import { useIntl } from 'react-intl'; +import Button from '../../atoms/buttons/button'; +import Form from '../../atoms/forms/form'; +import Spinner from '../../atoms/loaders/spinner'; +import LabelledField from '../../molecules/forms/labelled-field'; import styles from './contact-form.module.scss'; export type ContactFormData = { diff --git a/src/components/organisms/forms/search-form.module.scss b/src/components/organisms/forms/search-form.module.scss index 1d388a4..773a79f 100644 --- a/src/components/organisms/forms/search-form.module.scss +++ b/src/components/organisms/forms/search-form.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/mixins" as mix; .wrapper { display: flex; diff --git a/src/components/organisms/forms/search-form.test.tsx b/src/components/organisms/forms/search-form.test.tsx index e35c46f..0f79caf 100644 --- a/src/components/organisms/forms/search-form.test.tsx +++ b/src/components/organisms/forms/search-form.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import SearchForm from './search-form'; describe('SearchForm', () => { diff --git a/src/components/organisms/forms/search-form.tsx b/src/components/organisms/forms/search-form.tsx index 1b5f662..a3cb6e4 100644 --- a/src/components/organisms/forms/search-form.tsx +++ b/src/components/organisms/forms/search-form.tsx @@ -1,12 +1,12 @@ -import Button from '@components/atoms/buttons/button'; -import Form from '@components/atoms/forms/form'; -import MagnifyingGlass from '@components/atoms/icons/magnifying-glass'; -import LabelledField, { - type LabelledFieldProps, -} from '@components/molecules/forms/labelled-field'; import { useRouter } from 'next/router'; import { forwardRef, ForwardRefRenderFunction, useId, useState } from 'react'; import { useIntl } from 'react-intl'; +import Button from '../../atoms/buttons/button'; +import Form from '../../atoms/forms/form'; +import MagnifyingGlass from '../../atoms/icons/magnifying-glass'; +import LabelledField, { + type LabelledFieldProps, +} from '../../molecules/forms/labelled-field'; import styles from './search-form.module.scss'; export type SearchFormProps = Pick<LabelledFieldProps, 'hideLabel'> & { diff --git a/src/components/organisms/images/gallery.module.scss b/src/components/organisms/images/gallery.module.scss index a057ed9..f4faa63 100644 --- a/src/components/organisms/images/gallery.module.scss +++ b/src/components/organisms/images/gallery.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/mixins" as mix; -@use "@styles/abstracts/placeholders"; +@use "../../../styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/placeholders"; .wrapper { @extend %reset-list; diff --git a/src/components/organisms/images/gallery.stories.tsx b/src/components/organisms/images/gallery.stories.tsx index 6fc278f..b1c308e 100644 --- a/src/components/organisms/images/gallery.stories.tsx +++ b/src/components/organisms/images/gallery.stories.tsx @@ -1,5 +1,5 @@ -import ResponsiveImage from '@components/molecules/images/responsive-image'; import { ComponentMeta, ComponentStory } from '@storybook/react'; +import ResponsiveImage from '../../molecules/images/responsive-image'; import Gallery from './gallery'; /** diff --git a/src/components/organisms/images/gallery.test.tsx b/src/components/organisms/images/gallery.test.tsx index 1db3733..611262e 100644 --- a/src/components/organisms/images/gallery.test.tsx +++ b/src/components/organisms/images/gallery.test.tsx @@ -1,5 +1,5 @@ -import ResponsiveImage from '@components/molecules/images/responsive-image'; -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; +import ResponsiveImage from '../../molecules/images/responsive-image'; import Gallery from './gallery'; const columns = 3; diff --git a/src/components/organisms/images/gallery.tsx b/src/components/organisms/images/gallery.tsx index 6c4a271..8b73ce1 100644 --- a/src/components/organisms/images/gallery.tsx +++ b/src/components/organisms/images/gallery.tsx @@ -1,5 +1,5 @@ -import { type ResponsiveImageProps } from '@components/molecules/images/responsive-image'; import { Children, FC, ReactElement } from 'react'; +import { type ResponsiveImageProps } from '../../molecules/images/responsive-image'; import styles from './gallery.module.scss'; export type GalleryColumn = 2 | 3 | 4; diff --git a/src/components/organisms/layout/cards-list.module.scss b/src/components/organisms/layout/cards-list.module.scss index 6274b93..ff79f33 100644 --- a/src/components/organisms/layout/cards-list.module.scss +++ b/src/components/organisms/layout/cards-list.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/mixins" as mix; -@use "@styles/abstracts/placeholders"; +@use "../../../styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/placeholders"; .wrapper { display: grid; diff --git a/src/components/organisms/layout/cards-list.test.tsx b/src/components/organisms/layout/cards-list.test.tsx index f77ee83..6a0ff7c 100644 --- a/src/components/organisms/layout/cards-list.test.tsx +++ b/src/components/organisms/layout/cards-list.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import CardsList, { type CardsListItem } from './cards-list'; const items: CardsListItem[] = [ diff --git a/src/components/organisms/layout/cards-list.tsx b/src/components/organisms/layout/cards-list.tsx index f6cb6ed..12ec7d9 100644 --- a/src/components/organisms/layout/cards-list.tsx +++ b/src/components/organisms/layout/cards-list.tsx @@ -1,9 +1,6 @@ -import List, { - type ListItem, - type ListProps, -} from '@components/atoms/lists/list'; -import Card, { type CardProps } from '@components/molecules/layout/card'; import { FC } from 'react'; +import List, { type ListItem, type ListProps } from '../../atoms/lists/list'; +import Card, { type CardProps } from '../../molecules/layout/card'; import styles from './cards-list.module.scss'; export type CardsListItem = Omit<CardProps, 'className' | 'titleLevel'> & { diff --git a/src/components/organisms/layout/comment.fixture.tsx b/src/components/organisms/layout/comment.fixture.tsx index 0118139..57a4389 100644 --- a/src/components/organisms/layout/comment.fixture.tsx +++ b/src/components/organisms/layout/comment.fixture.tsx @@ -1,4 +1,7 @@ -import { getFormattedDate, getFormattedTime } from '@utils/helpers/dates'; +import { + getFormattedDate, + getFormattedTime, +} from '../../../utils/helpers/dates'; import { CommentProps } from './comment'; export const author = { diff --git a/src/components/organisms/layout/comment.module.scss b/src/components/organisms/layout/comment.module.scss index d2b68e1..f645354 100644 --- a/src/components/organisms/layout/comment.module.scss +++ b/src/components/organisms/layout/comment.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/mixins" as mix; .wrapper { padding: var(--spacing-md); diff --git a/src/components/organisms/layout/comment.test.tsx b/src/components/organisms/layout/comment.test.tsx index 7290c6c..5ea8c6f 100644 --- a/src/components/organisms/layout/comment.test.tsx +++ b/src/components/organisms/layout/comment.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Comment from './comment'; import { author, diff --git a/src/components/organisms/layout/comment.tsx b/src/components/organisms/layout/comment.tsx index 3b58a79..23073ad 100644 --- a/src/components/organisms/layout/comment.tsx +++ b/src/components/organisms/layout/comment.tsx @@ -1,13 +1,13 @@ -import Button from '@components/atoms/buttons/button'; -import Link from '@components/atoms/links/link'; -import Meta from '@components/molecules/layout/meta'; -import { type SingleComment } from '@ts/types/app'; -import useSettings from '@utils/hooks/use-settings'; import Image from 'next/image'; import Script from 'next/script'; import { FC, useCallback, useState } from 'react'; import { useIntl } from 'react-intl'; import { type Comment as CommentSchema, type WithContext } from 'schema-dts'; +import { type SingleComment } from '../../../types/app'; +import useSettings from '../../../utils/hooks/use-settings'; +import Button from '../../atoms/buttons/button'; +import Link from '../../atoms/links/link'; +import Meta from '../../molecules/layout/meta'; import CommentForm, { type CommentFormProps } from '../forms/comment-form'; import styles from './comment.module.scss'; diff --git a/src/components/organisms/layout/comments-list.fixture.tsx b/src/components/organisms/layout/comments-list.fixture.tsx index f2a1d26..5842129 100644 --- a/src/components/organisms/layout/comments-list.fixture.tsx +++ b/src/components/organisms/layout/comments-list.fixture.tsx @@ -1,4 +1,4 @@ -import { SingleComment } from '@ts/types/app'; +import { SingleComment } from '../../../types/app'; export const comments: SingleComment[] = [ { diff --git a/src/components/organisms/layout/comments-list.module.scss b/src/components/organisms/layout/comments-list.module.scss index 803a418..f7a0cf0 100644 --- a/src/components/organisms/layout/comments-list.module.scss +++ b/src/components/organisms/layout/comments-list.module.scss @@ -1,4 +1,4 @@ -@use "@styles/abstracts/placeholders"; +@use "../../../styles/abstracts/placeholders"; .list { @extend %reset-ordered-list; diff --git a/src/components/organisms/layout/comments-list.test.tsx b/src/components/organisms/layout/comments-list.test.tsx index 72c7eb9..ef4b4af 100644 --- a/src/components/organisms/layout/comments-list.test.tsx +++ b/src/components/organisms/layout/comments-list.test.tsx @@ -1,4 +1,4 @@ -import { render } from '@tests/utils'; +import { render } from '../../../../tests/utils'; import { saveComment } from './comment.fixture'; import CommentsList from './comments-list'; import { comments } from './comments-list.fixture'; diff --git a/src/components/organisms/layout/comments-list.tsx b/src/components/organisms/layout/comments-list.tsx index deb0776..227f715 100644 --- a/src/components/organisms/layout/comments-list.tsx +++ b/src/components/organisms/layout/comments-list.tsx @@ -1,8 +1,6 @@ -import Comment, { - type CommentProps, -} from '@components/organisms/layout/comment'; -import { SingleComment } from '@ts/types/app'; import { FC } from 'react'; +import { SingleComment } from '../../../types/app'; +import Comment, { type CommentProps } from '../../organisms/layout/comment'; import styles from './comments-list.module.scss'; export type CommentsListProps = Pick<CommentProps, 'Notice' | 'saveComment'> & { diff --git a/src/components/organisms/layout/footer.module.scss b/src/components/organisms/layout/footer.module.scss index c180e86..a8bcd61 100644 --- a/src/components/organisms/layout/footer.module.scss +++ b/src/components/organisms/layout/footer.module.scss @@ -1,5 +1,4 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/mixins" as mix; .wrapper { display: flex; diff --git a/src/components/organisms/layout/footer.test.tsx b/src/components/organisms/layout/footer.test.tsx index 1d451c7..0ba1a57 100644 --- a/src/components/organisms/layout/footer.test.tsx +++ b/src/components/organisms/layout/footer.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Footer, { type FooterProps } from './footer'; const copyright: FooterProps['copyright'] = { diff --git a/src/components/organisms/layout/footer.tsx b/src/components/organisms/layout/footer.tsx index c60afec..f67ad7d 100644 --- a/src/components/organisms/layout/footer.tsx +++ b/src/components/organisms/layout/footer.tsx @@ -1,12 +1,10 @@ -import Copyright, { - type CopyrightProps, -} from '@components/atoms/layout/copyright'; -import BackToTop, { - type BackToTopProps, -} from '@components/molecules/buttons/back-to-top'; -import Nav, { type NavItem } from '@components/molecules/nav/nav'; import { FC } from 'react'; import { useIntl } from 'react-intl'; +import Copyright, { type CopyrightProps } from '../../atoms/layout/copyright'; +import BackToTop, { + type BackToTopProps, +} from '../../molecules/buttons/back-to-top'; +import Nav, { type NavItem } from '../../molecules/nav/nav'; import styles from './footer.module.scss'; export type FooterProps = { diff --git a/src/components/organisms/layout/header.module.scss b/src/components/organisms/layout/header.module.scss index a98cf45..573d455 100644 --- a/src/components/organisms/layout/header.module.scss +++ b/src/components/organisms/layout/header.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/mixins" as mix; .wrapper { display: grid; diff --git a/src/components/organisms/layout/header.test.tsx b/src/components/organisms/layout/header.test.tsx index 1ef79e0..c7819c0 100644 --- a/src/components/organisms/layout/header.test.tsx +++ b/src/components/organisms/layout/header.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Header from './header'; const nav = [ diff --git a/src/components/organisms/layout/header.tsx b/src/components/organisms/layout/header.tsx index f6212c3..4e5e0f2 100644 --- a/src/components/organisms/layout/header.tsx +++ b/src/components/organisms/layout/header.tsx @@ -1,7 +1,5 @@ -import Branding, { - type BrandingProps, -} from '@components/molecules/layout/branding'; import { FC } from 'react'; +import Branding, { type BrandingProps } from '../../molecules/layout/branding'; import Toolbar, { type ToolbarProps } from '../toolbar/toolbar'; import styles from './header.module.scss'; diff --git a/src/components/organisms/layout/no-results.test.tsx b/src/components/organisms/layout/no-results.test.tsx index 5576117..551b82f 100644 --- a/src/components/organisms/layout/no-results.test.tsx +++ b/src/components/organisms/layout/no-results.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import NoResults from './no-results'; describe('NoResults', () => { diff --git a/src/components/organisms/layout/no-results.tsx b/src/components/organisms/layout/no-results.tsx index 2245dbf..1b563da 100644 --- a/src/components/organisms/layout/no-results.tsx +++ b/src/components/organisms/layout/no-results.tsx @@ -1,8 +1,8 @@ -import SearchForm, { - type SearchFormProps, -} from '@components/organisms/forms/search-form'; import { FC } from 'react'; import { useIntl } from 'react-intl'; +import SearchForm, { + type SearchFormProps, +} from '../../organisms/forms/search-form'; export type NoResultsProps = Pick<SearchFormProps, 'searchPage'>; diff --git a/src/components/organisms/layout/overview.module.scss b/src/components/organisms/layout/overview.module.scss index 5620513..e4f6a6a 100644 --- a/src/components/organisms/layout/overview.module.scss +++ b/src/components/organisms/layout/overview.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/mixins" as mix; .wrapper { padding: var(--spacing-sm) var(--spacing-md); diff --git a/src/components/organisms/layout/overview.test.tsx b/src/components/organisms/layout/overview.test.tsx index c096bad..72e4cc0 100644 --- a/src/components/organisms/layout/overview.test.tsx +++ b/src/components/organisms/layout/overview.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Overview, { type OverviewMeta } from './overview'; const cover = { diff --git a/src/components/organisms/layout/overview.tsx b/src/components/organisms/layout/overview.tsx index 04ec79a..e539731 100644 --- a/src/components/organisms/layout/overview.tsx +++ b/src/components/organisms/layout/overview.tsx @@ -1,8 +1,8 @@ +import { FC } from 'react'; import ResponsiveImage, { type ResponsiveImageProps, -} from '@components/molecules/images/responsive-image'; -import Meta, { type MetaData } from '@components/molecules/layout/meta'; -import { FC } from 'react'; +} from '../../molecules/images/responsive-image'; +import Meta, { type MetaData } from '../../molecules/layout/meta'; import styles from './overview.module.scss'; export type OverviewMeta = Pick< diff --git a/src/components/organisms/layout/posts-list.module.scss b/src/components/organisms/layout/posts-list.module.scss index b09bb12..64ad33f 100644 --- a/src/components/organisms/layout/posts-list.module.scss +++ b/src/components/organisms/layout/posts-list.module.scss @@ -1,6 +1,6 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; -@use "@styles/abstracts/placeholders"; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/placeholders"; .section { &:not(:last-of-type) { diff --git a/src/components/organisms/layout/posts-list.test.tsx b/src/components/organisms/layout/posts-list.test.tsx index 571c421..1d6bbcb 100644 --- a/src/components/organisms/layout/posts-list.test.tsx +++ b/src/components/organisms/layout/posts-list.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import PostsList from './posts-list'; import { posts, searchPage } from './posts-list.fixture'; diff --git a/src/components/organisms/layout/posts-list.tsx b/src/components/organisms/layout/posts-list.tsx index e3788c7..dede7b6 100644 --- a/src/components/organisms/layout/posts-list.tsx +++ b/src/components/organisms/layout/posts-list.tsx @@ -1,14 +1,14 @@ -import Button from '@components/atoms/buttons/button'; -import Heading, { type HeadingLevel } from '@components/atoms/headings/heading'; -import ProgressBar from '@components/atoms/loaders/progress-bar'; -import Spinner from '@components/atoms/loaders/spinner'; -import Pagination, { - type PaginationProps, -} from '@components/molecules/nav/pagination'; -import useIsMounted from '@utils/hooks/use-is-mounted'; -import useSettings from '@utils/hooks/use-settings'; import { FC, Fragment, useRef } from 'react'; import { useIntl } from 'react-intl'; +import useIsMounted from '../../../utils/hooks/use-is-mounted'; +import useSettings from '../../../utils/hooks/use-settings'; +import Button from '../../atoms/buttons/button'; +import Heading, { type HeadingLevel } from '../../atoms/headings/heading'; +import ProgressBar from '../../atoms/loaders/progress-bar'; +import Spinner from '../../atoms/loaders/spinner'; +import Pagination, { + type PaginationProps, +} from '../../molecules/nav/pagination'; import NoResults, { NoResultsProps } from './no-results'; import styles from './posts-list.module.scss'; import Summary, { type SummaryProps } from './summary'; diff --git a/src/components/organisms/layout/summary.module.scss b/src/components/organisms/layout/summary.module.scss index 62dfc0e..9530312 100644 --- a/src/components/organisms/layout/summary.module.scss +++ b/src/components/organisms/layout/summary.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/mixins" as mix; .wrapper { display: grid; diff --git a/src/components/organisms/layout/summary.test.tsx b/src/components/organisms/layout/summary.test.tsx index bc69f3b..73f6df8 100644 --- a/src/components/organisms/layout/summary.test.tsx +++ b/src/components/organisms/layout/summary.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Summary from './summary'; import { cover, intro, meta, title, url } from './summary.fixture'; diff --git a/src/components/organisms/layout/summary.tsx b/src/components/organisms/layout/summary.tsx index 5d27862..f2031d5 100644 --- a/src/components/organisms/layout/summary.tsx +++ b/src/components/organisms/layout/summary.tsx @@ -1,15 +1,15 @@ -import ButtonLink from '@components/atoms/buttons/button-link'; -import Heading, { type HeadingLevel } from '@components/atoms/headings/heading'; -import Arrow from '@components/atoms/icons/arrow'; -import Link from '@components/atoms/links/link'; -import ResponsiveImage, { - type ResponsiveImageProps, -} from '@components/molecules/images/responsive-image'; -import Meta, { type MetaData } from '@components/molecules/layout/meta'; -import { type Article, type Meta as MetaType } from '@ts/types/app'; -import useReadingTime from '@utils/hooks/use-reading-time'; import { FC, ReactNode } from 'react'; import { useIntl } from 'react-intl'; +import { type Article, type Meta as MetaType } from '../../../types/app'; +import useReadingTime from '../../../utils/hooks/use-reading-time'; +import ButtonLink from '../../atoms/buttons/button-link'; +import Heading, { type HeadingLevel } from '../../atoms/headings/heading'; +import Arrow from '../../atoms/icons/arrow'; +import Link from '../../atoms/links/link'; +import ResponsiveImage, { + type ResponsiveImageProps, +} from '../../molecules/images/responsive-image'; +import Meta, { type MetaData } from '../../molecules/layout/meta'; import styles from './summary.module.scss'; export type Cover = Pick< diff --git a/src/components/organisms/modals/search-modal.module.scss b/src/components/organisms/modals/search-modal.module.scss index aba0593..449aa91 100644 --- a/src/components/organisms/modals/search-modal.module.scss +++ b/src/components/organisms/modals/search-modal.module.scss @@ -1,4 +1,4 @@ -@use "@styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/mixins" as mix; .wrapper { padding-bottom: var(--spacing-md); diff --git a/src/components/organisms/modals/search-modal.test.tsx b/src/components/organisms/modals/search-modal.test.tsx index 7043d54..397c36f 100644 --- a/src/components/organisms/modals/search-modal.test.tsx +++ b/src/components/organisms/modals/search-modal.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import SearchModal from './search-modal'; describe('SearchModal', () => { diff --git a/src/components/organisms/modals/search-modal.tsx b/src/components/organisms/modals/search-modal.tsx index ed6084a..08b28cb 100644 --- a/src/components/organisms/modals/search-modal.tsx +++ b/src/components/organisms/modals/search-modal.tsx @@ -1,6 +1,6 @@ -import Modal, { type ModalProps } from '@components/molecules/modals/modal'; import { forwardRef, ForwardRefRenderFunction } from 'react'; import { useIntl } from 'react-intl'; +import Modal, { type ModalProps } from '../../molecules/modals/modal'; import SearchForm, { type SearchFormProps } from '../forms/search-form'; import styles from './search-modal.module.scss'; diff --git a/src/components/organisms/modals/settings-modal.module.scss b/src/components/organisms/modals/settings-modal.module.scss index fef3492..e9b3b85 100644 --- a/src/components/organisms/modals/settings-modal.module.scss +++ b/src/components/organisms/modals/settings-modal.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/variables" as var; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/variables" as var; .wrapper { width: 100%; diff --git a/src/components/organisms/modals/settings-modal.stories.tsx b/src/components/organisms/modals/settings-modal.stories.tsx index 649d68b..4f0b79b 100644 --- a/src/components/organisms/modals/settings-modal.stories.tsx +++ b/src/components/organisms/modals/settings-modal.stories.tsx @@ -1,6 +1,6 @@ -import { storageKey as ackeeStorageKey } from '@components/molecules/forms/ackee-toggle.fixture'; -import { storageKey as motionStorageKey } from '@components/molecules/forms/motion-toggle.fixture'; import { ComponentMeta, ComponentStory } from '@storybook/react'; +import { storageKey as ackeeStorageKey } from '../../molecules/forms/ackee-toggle.fixture'; +import { storageKey as motionStorageKey } from '../../molecules/forms/motion-toggle.fixture'; import SettingsModal from './settings-modal'; /** diff --git a/src/components/organisms/modals/settings-modal.test.tsx b/src/components/organisms/modals/settings-modal.test.tsx index 9277067..9e07175 100644 --- a/src/components/organisms/modals/settings-modal.test.tsx +++ b/src/components/organisms/modals/settings-modal.test.tsx @@ -1,6 +1,6 @@ -import { storageKey as ackeeStorageKey } from '@components/molecules/forms/ackee-toggle.fixture'; -import { storageKey as motionStorageKey } from '@components/molecules/forms/motion-toggle.fixture'; -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; +import { storageKey as ackeeStorageKey } from '../../molecules/forms/ackee-toggle.fixture'; +import { storageKey as motionStorageKey } from '../../molecules/forms/motion-toggle.fixture'; import SettingsModal from './settings-modal'; describe('SettingsModal', () => { diff --git a/src/components/organisms/modals/settings-modal.tsx b/src/components/organisms/modals/settings-modal.tsx index d11dfe7..4e2b119 100644 --- a/src/components/organisms/modals/settings-modal.tsx +++ b/src/components/organisms/modals/settings-modal.tsx @@ -1,15 +1,15 @@ -import Form from '@components/atoms/forms/form'; +import { FC } from 'react'; +import { useIntl } from 'react-intl'; +import Form from '../../atoms/forms/form'; import AckeeToggle, { AckeeToggleProps, -} from '@components/molecules/forms/ackee-toggle'; +} from '../../molecules/forms/ackee-toggle'; import MotionToggle, { MotionToggleProps, -} from '@components/molecules/forms/motion-toggle'; -import PrismThemeToggle from '@components/molecules/forms/prism-theme-toggle'; -import ThemeToggle from '@components/molecules/forms/theme-toggle'; -import Modal, { type ModalProps } from '@components/molecules/modals/modal'; -import { FC } from 'react'; -import { useIntl } from 'react-intl'; +} from '../../molecules/forms/motion-toggle'; +import PrismThemeToggle from '../../molecules/forms/prism-theme-toggle'; +import ThemeToggle from '../../molecules/forms/theme-toggle'; +import Modal, { type ModalProps } from '../../molecules/modals/modal'; import styles from './settings-modal.module.scss'; export type SettingsModalProps = Pick<ModalProps, 'className'> & diff --git a/src/components/organisms/toolbar/main-nav.module.scss b/src/components/organisms/toolbar/main-nav.module.scss index 24abc43..1b6b110 100644 --- a/src/components/organisms/toolbar/main-nav.module.scss +++ b/src/components/organisms/toolbar/main-nav.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/mixins" as mix; .item { @include mix.media("screen") { diff --git a/src/components/organisms/toolbar/main-nav.test.tsx b/src/components/organisms/toolbar/main-nav.test.tsx index 43b8666..47e7c38 100644 --- a/src/components/organisms/toolbar/main-nav.test.tsx +++ b/src/components/organisms/toolbar/main-nav.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import MainNav from './main-nav'; const items = [ diff --git a/src/components/organisms/toolbar/main-nav.tsx b/src/components/organisms/toolbar/main-nav.tsx index 5dd32f7..3a2fbf5 100644 --- a/src/components/organisms/toolbar/main-nav.tsx +++ b/src/components/organisms/toolbar/main-nav.tsx @@ -1,14 +1,11 @@ -import BooleanField, { - type BooleanFieldProps, -} from '@components/atoms/forms/boolean-field'; -import Label from '@components/atoms/forms/label'; -import Hamburger from '@components/atoms/icons/hamburger'; -import Nav, { - type NavProps, - type NavItem, -} from '@components/molecules/nav/nav'; import { forwardRef, ForwardRefRenderFunction } from 'react'; import { useIntl } from 'react-intl'; +import BooleanField, { + type BooleanFieldProps, +} from '../../atoms/forms/boolean-field'; +import Label from '../../atoms/forms/label'; +import Hamburger from '../../atoms/icons/hamburger'; +import Nav, { type NavProps, type NavItem } from '../../molecules/nav/nav'; import mainNavStyles from './main-nav.module.scss'; import sharedStyles from './toolbar-items.module.scss'; diff --git a/src/components/organisms/toolbar/search.test.tsx b/src/components/organisms/toolbar/search.test.tsx index 23dbda9..bafb58d 100644 --- a/src/components/organisms/toolbar/search.test.tsx +++ b/src/components/organisms/toolbar/search.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Search from './search'; describe('Search', () => { diff --git a/src/components/organisms/toolbar/search.tsx b/src/components/organisms/toolbar/search.tsx index 0ac82d9..90ee1b4 100644 --- a/src/components/organisms/toolbar/search.tsx +++ b/src/components/organisms/toolbar/search.tsx @@ -1,11 +1,11 @@ -import BooleanField, { - type BooleanFieldProps, -} from '@components/atoms/forms/boolean-field'; -import MagnifyingGlass from '@components/atoms/icons/magnifying-glass'; -import FlippingLabel from '@components/molecules/forms/flipping-label'; -import useInputAutofocus from '@utils/hooks/use-input-autofocus'; import { forwardRef, ForwardRefRenderFunction, useRef } from 'react'; import { useIntl } from 'react-intl'; +import useInputAutofocus from '../../../utils/hooks/use-input-autofocus'; +import BooleanField, { + type BooleanFieldProps, +} from '../../atoms/forms/boolean-field'; +import MagnifyingGlass from '../../atoms/icons/magnifying-glass'; +import FlippingLabel from '../../molecules/forms/flipping-label'; import SearchModal, { type SearchModalProps } from '../modals/search-modal'; import searchStyles from './search.module.scss'; import sharedStyles from './toolbar-items.module.scss'; diff --git a/src/components/organisms/toolbar/settings.module.scss b/src/components/organisms/toolbar/settings.module.scss index a46f28c..59c44f8 100644 --- a/src/components/organisms/toolbar/settings.module.scss +++ b/src/components/organisms/toolbar/settings.module.scss @@ -1,6 +1,3 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; - .item .tooltip { top: unset; bottom: calc(100% + var(--spacing-2xs)); diff --git a/src/components/organisms/toolbar/settings.test.tsx b/src/components/organisms/toolbar/settings.test.tsx index 9e91b09..44bed56 100644 --- a/src/components/organisms/toolbar/settings.test.tsx +++ b/src/components/organisms/toolbar/settings.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Settings from './settings'; describe('Settings', () => { diff --git a/src/components/organisms/toolbar/settings.tsx b/src/components/organisms/toolbar/settings.tsx index 774de64..6dc73e4 100644 --- a/src/components/organisms/toolbar/settings.tsx +++ b/src/components/organisms/toolbar/settings.tsx @@ -1,10 +1,10 @@ -import BooleanField, { - type BooleanFieldProps, -} from '@components/atoms/forms/boolean-field'; -import Cog from '@components/atoms/icons/cog'; -import FlippingLabel from '@components/molecules/forms/flipping-label'; import { forwardRef, ForwardRefRenderFunction } from 'react'; import { useIntl } from 'react-intl'; +import BooleanField, { + type BooleanFieldProps, +} from '../../atoms/forms/boolean-field'; +import Cog from '../../atoms/icons/cog'; +import FlippingLabel from '../../molecules/forms/flipping-label'; import SettingsModal, { type SettingsModalProps, } from '../modals/settings-modal'; diff --git a/src/components/organisms/toolbar/toolbar-items.module.scss b/src/components/organisms/toolbar/toolbar-items.module.scss index 86b4924..540844b 100644 --- a/src/components/organisms/toolbar/toolbar-items.module.scss +++ b/src/components/organisms/toolbar/toolbar-items.module.scss @@ -1,6 +1,6 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/mixins" as mix; -@use "@styles/abstracts/placeholders"; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/mixins" as mix; +@use "../../../styles/abstracts/placeholders"; .item { --btn-size: #{fun.convert-px(65)}; diff --git a/src/components/organisms/toolbar/toolbar.module.scss b/src/components/organisms/toolbar/toolbar.module.scss index 60f41f1..1254f64 100644 --- a/src/components/organisms/toolbar/toolbar.module.scss +++ b/src/components/organisms/toolbar/toolbar.module.scss @@ -1,6 +1,6 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/variables" as var; -@use "@styles/abstracts/placeholders"; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/variables" as var; +@use "../../../styles/abstracts/placeholders"; .wrapper { --toolbar-size: #{fun.convert-px(75)}; diff --git a/src/components/organisms/toolbar/toolbar.test.tsx b/src/components/organisms/toolbar/toolbar.test.tsx index 20f782a..01cc5ba 100644 --- a/src/components/organisms/toolbar/toolbar.test.tsx +++ b/src/components/organisms/toolbar/toolbar.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Toolbar from './toolbar'; const nav = [ diff --git a/src/components/organisms/toolbar/toolbar.tsx b/src/components/organisms/toolbar/toolbar.tsx index 50fc7f2..339dec4 100644 --- a/src/components/organisms/toolbar/toolbar.tsx +++ b/src/components/organisms/toolbar/toolbar.tsx @@ -1,6 +1,6 @@ -import useOnClickOutside from '@utils/hooks/use-on-click-outside'; -import useRouteChange from '@utils/hooks/use-route-change'; import { FC, useState } from 'react'; +import useOnClickOutside from '../../../utils/hooks/use-on-click-outside'; +import useRouteChange from '../../../utils/hooks/use-route-change'; import MainNav, { type MainNavProps } from '../toolbar/main-nav'; import Search, { type SearchProps } from '../toolbar/search'; import Settings, { type SettingsProps } from '../toolbar/settings'; diff --git a/src/components/organisms/widgets/image-widget.module.scss b/src/components/organisms/widgets/image-widget.module.scss index 0d69441..2174d5b 100644 --- a/src/components/organisms/widgets/image-widget.module.scss +++ b/src/components/organisms/widgets/image-widget.module.scss @@ -1,4 +1,4 @@ -@use "@styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/functions" as fun; .figure { --scale-up: 1.02; diff --git a/src/components/organisms/widgets/image-widget.test.tsx b/src/components/organisms/widgets/image-widget.test.tsx index 6548584..b41e6a8 100644 --- a/src/components/organisms/widgets/image-widget.test.tsx +++ b/src/components/organisms/widgets/image-widget.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import ImageWidget from './image-widget'; const description = 'Ut vitae sit'; diff --git a/src/components/organisms/widgets/image-widget.tsx b/src/components/organisms/widgets/image-widget.tsx index 873337b..7ca5d90 100644 --- a/src/components/organisms/widgets/image-widget.tsx +++ b/src/components/organisms/widgets/image-widget.tsx @@ -1,8 +1,8 @@ +import { FC } from 'react'; import ResponsiveImage, { type ResponsiveImageProps, -} from '@components/molecules/images/responsive-image'; -import Widget, { type WidgetProps } from '@components/molecules/layout/widget'; -import { FC } from 'react'; +} from '../../molecules/images/responsive-image'; +import Widget, { type WidgetProps } from '../../molecules/layout/widget'; import styles from './image-widget.module.scss'; export type Alignment = 'left' | 'center' | 'right'; diff --git a/src/components/organisms/widgets/links-list-widget.module.scss b/src/components/organisms/widgets/links-list-widget.module.scss index 4444df4..26f1549 100644 --- a/src/components/organisms/widgets/links-list-widget.module.scss +++ b/src/components/organisms/widgets/links-list-widget.module.scss @@ -1,5 +1,5 @@ -@use "@styles/abstracts/functions" as fun; -@use "@styles/abstracts/placeholders"; +@use "../../../styles/abstracts/functions" as fun; +@use "../../../styles/abstracts/placeholders"; .widget { .list { diff --git a/src/components/organisms/widgets/links-list-widget.test.tsx b/src/components/organisms/widgets/links-list-widget.test.tsx index d695d68..8578040 100644 --- a/src/components/organisms/widgets/links-list-widget.test.tsx +++ b/src/components/organisms/widgets/links-list-widget.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import LinksListWidget from './links-list-widget'; const title = 'Voluptatem minus autem'; diff --git a/src/components/organisms/widgets/links-list-widget.tsx b/src/components/organisms/widgets/links-list-widget.tsx index a9c677b..23392b9 100644 --- a/src/components/organisms/widgets/links-list-widget.tsx +++ b/src/components/organisms/widgets/links-list-widget.tsx @@ -1,11 +1,8 @@ -import Link from '@components/atoms/links/link'; -import List, { - type ListProps, - type ListItem, -} from '@components/atoms/lists/list'; -import Widget, { type WidgetProps } from '@components/molecules/layout/widget'; -import { slugify } from '@utils/helpers/strings'; import { FC } from 'react'; +import { slugify } from '../../../utils/helpers/strings'; +import Link from '../../atoms/links/link'; +import List, { type ListProps, type ListItem } from '../../atoms/lists/list'; +import Widget, { type WidgetProps } from '../../molecules/layout/widget'; import styles from './links-list-widget.module.scss'; export type LinksListItems = { diff --git a/src/components/organisms/widgets/sharing.module.scss b/src/components/organisms/widgets/sharing.module.scss index e06d4e3..24f6fc9 100644 --- a/src/components/organisms/widgets/sharing.module.scss +++ b/src/components/organisms/widgets/sharing.module.scss @@ -1,5 +1,3 @@ -@use "@styles/abstracts/mixins" as mix; - .list { display: flex; flex-flow: row wrap; diff --git a/src/components/organisms/widgets/sharing.test.tsx b/src/components/organisms/widgets/sharing.test.tsx index 88f72fe..f05a73b 100644 --- a/src/components/organisms/widgets/sharing.test.tsx +++ b/src/components/organisms/widgets/sharing.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import Sharing, { type SharingData } from './sharing'; const postData: SharingData = { diff --git a/src/components/organisms/widgets/sharing.tsx b/src/components/organisms/widgets/sharing.tsx index c63f5db..57578cb 100644 --- a/src/components/organisms/widgets/sharing.tsx +++ b/src/components/organisms/widgets/sharing.tsx @@ -1,9 +1,9 @@ -import SharingLink, { - type SharingMedium, -} from '@components/atoms/links/sharing-link'; -import Widget, { type WidgetProps } from '@components/molecules/layout/widget'; import { FC } from 'react'; import { useIntl } from 'react-intl'; +import SharingLink, { + type SharingMedium, +} from '../../atoms/links/sharing-link'; +import Widget, { type WidgetProps } from '../../molecules/layout/widget'; import styles from './sharing.module.scss'; export type SharingData = { diff --git a/src/components/organisms/widgets/social-media.module.scss b/src/components/organisms/widgets/social-media.module.scss index 01b6c0e..b7191be 100644 --- a/src/components/organisms/widgets/social-media.module.scss +++ b/src/components/organisms/widgets/social-media.module.scss @@ -1,4 +1,4 @@ -@use "@styles/abstracts/placeholders"; +@use "../../../styles/abstracts/placeholders"; .list { @extend %reset-list; diff --git a/src/components/organisms/widgets/social-media.test.tsx b/src/components/organisms/widgets/social-media.test.tsx index ec6c536..a9056af 100644 --- a/src/components/organisms/widgets/social-media.test.tsx +++ b/src/components/organisms/widgets/social-media.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import SocialMedia, { Media } from './social-media'; const media: Media[] = [ diff --git a/src/components/organisms/widgets/social-media.tsx b/src/components/organisms/widgets/social-media.tsx index 58b2f73..1a261a9 100644 --- a/src/components/organisms/widgets/social-media.tsx +++ b/src/components/organisms/widgets/social-media.tsx @@ -1,8 +1,8 @@ +import { FC } from 'react'; import SocialLink, { type SocialLinkProps, -} from '@components/atoms/links/social-link'; -import Widget, { type WidgetProps } from '@components/molecules/layout/widget'; -import { FC } from 'react'; +} from '../../atoms/links/social-link'; +import Widget, { type WidgetProps } from '../../molecules/layout/widget'; import styles from './social-media.module.scss'; export type Media = SocialLinkProps; diff --git a/src/components/organisms/widgets/table-of-contents.test.tsx b/src/components/organisms/widgets/table-of-contents.test.tsx index 92ae895..dd0338a 100644 --- a/src/components/organisms/widgets/table-of-contents.test.tsx +++ b/src/components/organisms/widgets/table-of-contents.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@tests/utils'; +import { render, screen } from '../../../../tests/utils'; import TableOfContents from './table-of-contents'; describe('TableOfContents', () => { diff --git a/src/components/organisms/widgets/table-of-contents.tsx b/src/components/organisms/widgets/table-of-contents.tsx index 800ff58..0c18f03 100644 --- a/src/components/organisms/widgets/table-of-contents.tsx +++ b/src/components/organisms/widgets/table-of-contents.tsx @@ -1,6 +1,8 @@ -import useHeadingsTree, { type Heading } from '@utils/hooks/use-headings-tree'; import { FC } from 'react'; import { useIntl } from 'react-intl'; +import useHeadingsTree, { + type Heading, +} from '../../../utils/hooks/use-headings-tree'; import LinksListWidget, { type LinksListItems } from './links-list-widget'; import styles from './table-of-contents.module.scss'; |
