Skip to content

Commit

Permalink
less barrels
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Aug 31, 2024
1 parent 21e9220 commit 1c16448
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { backdropSurface } from './styles.css'
import type { BoxProps } from '../Box/Box'
import { Box } from '../Box/Box'

type Props = { $state: TransitionState['status'], $empty: boolean } & BoxProps
export type BackdropSurfaceProps = { $state: TransitionState['status'], $empty: boolean } & BoxProps

export const BackdropSurface = React.forwardRef<HTMLElement, Props>(
export const BackdropSurface = React.forwardRef<HTMLElement, BackdropSurfaceProps>(
({ $empty, $state, ...props }, ref) => (
<Box
{...props}
Expand Down
1 change: 0 additions & 1 deletion components/src/components/atoms/BackdropSurface/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion components/src/components/atoms/Field/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { Space } from '@/src/tokens'

import type { ReactNodeNoStrings } from '../../../types'
import { useFieldIds } from '../../../hooks'
import { VisuallyHidden } from '../VisuallyHidden'
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden'
import { Typography } from '../Typography/Typography'
import type { BoxProps } from '../Box/Box'
import { Box } from '../Box/Box'
Expand Down
2 changes: 1 addition & 1 deletion components/src/components/atoms/FileInput/FileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react'

import type { ReactNodeNoStrings } from '../../../types'
import { useFieldIds } from '../../../hooks'
import { VisuallyHidden } from '../VisuallyHidden'
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden'
import { validateAccept } from './utils'

type Context = {
Expand Down
2 changes: 1 addition & 1 deletion components/src/components/atoms/Spinner/Spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'

import { VisuallyHidden } from '../VisuallyHidden'
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden'
import * as styles from './styles.css'
import type { BoxProps } from '../Box/Box'
import { Box } from '../Box/Box'
Expand Down
1 change: 0 additions & 1 deletion components/src/components/atoms/VisuallyHidden/index.ts

This file was deleted.

4 changes: 2 additions & 2 deletions components/src/components/atoms/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { Avatar, type AvatarProps } from './Avatar/Avatar'
export { BackdropSurface } from './BackdropSurface'
export { BackdropSurface } from './BackdropSurface/BackdropSurface'
export { Banner, type BannerProps } from './Banner/Banner'
export { Button, type ButtonProps } from './Button/Button'
export { Card, CardDivider, type CardProps } from './Card/Card'
Expand All @@ -14,6 +14,6 @@ export { Skeleton, type SkeletonProps } from './Skeleton/Skeleton'
export { Spinner, type SpinnerProps } from './Spinner/Spinner'
export { Tag, type TagProps } from './Tag/Tag'
export { Typography, type TypographyProps } from './Typography/Typography'
export { VisuallyHidden } from './VisuallyHidden'
export { VisuallyHidden } from './VisuallyHidden/VisuallyHidden'
export { Box, type BoxProps } from './Box/Box'
export { ThemeProvider, useTheme } from './ThemeProvider/ThemeProvider'
2 changes: 1 addition & 1 deletion components/src/components/molecules/Backdrop/Backdrop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useTransition } from 'react-transition-state'

import { Portal } from '../../atoms/Portal/Portal'

import { BackdropSurface } from '../../atoms/BackdropSurface'
import { BackdropSurface } from '../../atoms/BackdropSurface/BackdropSurface'

export type BackdropProps = {
/** A function that renders the children nodes */
Expand Down
8 changes: 4 additions & 4 deletions components/src/components/organisms/Toast/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const Draggable = () => (

type NativeDivProps = React.HTMLAttributes<HTMLDivElement>

type Props = {
export type ToastProps = {
onClose: () => void
open: boolean
msToShow?: number
Expand Down Expand Up @@ -137,7 +137,7 @@ const DesktopToast = ({
state,
children,
...props
}: Props & InternalProps) => {
}: ToastProps & InternalProps) => {
return (
<Container
{...{
Expand Down Expand Up @@ -176,7 +176,7 @@ export const TouchToast = ({
popped,
setPopped,
...props
}: Props &
}: ToastProps &
InternalProps & {
popped: boolean
setPopped: (popped: boolean) => void
Expand Down Expand Up @@ -311,7 +311,7 @@ InternalProps & {
)
}

export const Toast: React.FC<Props> = ({
export const Toast: React.FC<ToastProps> = ({
onClose,
open,
msToShow = 8000,
Expand Down
1 change: 0 additions & 1 deletion components/src/components/organisms/Toast/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion components/src/components/organisms/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { Dialog, type DialogProps } from './Dialog/Dialog'
export { Toast } from './Toast'
export { Toast, type ToastProps } from './Toast/Toast'

0 comments on commit 1c16448

Please sign in to comment.