diff --git a/.eslintignore b/.eslintignore index ae69b43b..217980f5 100644 --- a/.eslintignore +++ b/.eslintignore @@ -35,6 +35,8 @@ pagination.js pagination.d.ts section.js section.d.ts +sectionFilter.js +sectionFilter.d.ts selectDialog.js selectDialog.d.ts submitButton.js diff --git a/.gitignore b/.gitignore index e3e7997f..509e6b7c 100644 --- a/.gitignore +++ b/.gitignore @@ -66,6 +66,8 @@ pagination.js pagination.d.ts section.js section.d.ts +sectionFilter.js +sectionFilter.d.ts selectDialog.js selectDialog.d.ts submitButton.js diff --git a/package.json b/package.json index f4d34c17..9654bbf0 100644 --- a/package.json +++ b/package.json @@ -119,6 +119,8 @@ "pagination.d.ts", "section.js", "section.d.ts", + "sectionFilter.js", + "sectionFilter.d.ts", "selectDialog.js", "selectDialog.d.ts", "submitButton.js", diff --git a/src/components/section/SectionFilter/FilterDialog.tsx b/src/components/sectionFilter/FilterDialog.tsx similarity index 86% rename from src/components/section/SectionFilter/FilterDialog.tsx rename to src/components/sectionFilter/FilterDialog.tsx index 30a940d5..7e770b1c 100644 --- a/src/components/section/SectionFilter/FilterDialog.tsx +++ b/src/components/sectionFilter/FilterDialog.tsx @@ -1,7 +1,7 @@ import classNames from 'classnames' import { Dialog, DialogProps } from '@reach/dialog' -import { useInternationalization, useTheme } from '../../../framework' -import { DialogHeader, DialogHeaderProps } from '../../dialog' +import { useInternationalization, useTheme } from '../../framework' +import { DialogHeader, DialogHeaderProps } from '../dialog' type Props = Partial> & Pick & diff --git a/src/components/section/SectionFilter/SectionFilter.tsx b/src/components/sectionFilter/SectionFilter.tsx similarity index 94% rename from src/components/section/SectionFilter/SectionFilter.tsx rename to src/components/sectionFilter/SectionFilter.tsx index 74c32e11..9eb97c1e 100644 --- a/src/components/section/SectionFilter/SectionFilter.tsx +++ b/src/components/sectionFilter/SectionFilter.tsx @@ -2,9 +2,9 @@ import classNames from 'classnames' import { Form, Formik, useFormikContext } from 'formik' import { ReactChildren, ReactElement, ReactNode, useEffect } from 'react' import { useMatchMediaQuery } from '@aboutbits/react-toolbox' -import { useTheme } from '../../../framework' -import { ClassNameProps } from '../../types' -import { SubmitButton } from '../../button/SubmitButton' +import { useTheme } from '../../framework' +import { ClassNameProps } from '../types' +import { SubmitButton } from '../button/SubmitButton' import { FilterDialog } from './FilterDialog' type Props = ClassNameProps & { diff --git a/src/components/section/SectionFilter/SectionFilterAction.tsx b/src/components/sectionFilter/SectionFilterAction.tsx similarity index 83% rename from src/components/section/SectionFilter/SectionFilterAction.tsx rename to src/components/sectionFilter/SectionFilterAction.tsx index c87fbca3..d6e03fb0 100644 --- a/src/components/section/SectionFilter/SectionFilterAction.tsx +++ b/src/components/sectionFilter/SectionFilterAction.tsx @@ -1,10 +1,7 @@ import IconFilterList from '@aboutbits/react-material-icons/dist/IconFilterList' import { ReactElement } from 'react' -import { - SectionAction, - SectionActionProps, -} from '../SectionHeader/SectionAction' -import { useInternationalization, useTheme } from '../../../framework' +import { SectionAction, SectionActionProps } from '../section' +import { useInternationalization, useTheme } from '../../framework' type Props = Pick & Partial> & { diff --git a/src/components/section/SectionFilter/index.ts b/src/components/sectionFilter/index.ts similarity index 100% rename from src/components/section/SectionFilter/index.ts rename to src/components/sectionFilter/index.ts diff --git a/src/examples/list.stories.mdx b/src/examples/list.stories.mdx index c9c131a4..576e57ea 100644 --- a/src/examples/list.stories.mdx +++ b/src/examples/list.stories.mdx @@ -11,10 +11,7 @@ import { SectionFooter, } from '../components/section' import { PaginationInMemory } from '../components/pagination' -import { - SectionFilter, - SectionFilterAction, -} from '../components/section/SectionFilter' +import { SectionFilter, SectionFilterAction } from '../components/sectionFilter' import { Select } from '../components/form' diff --git a/src/sectionFilter.ts b/src/sectionFilter.ts new file mode 100644 index 00000000..865f42ae --- /dev/null +++ b/src/sectionFilter.ts @@ -0,0 +1 @@ +export * from './components/sectionFilter'