Skip to content

Commit

Permalink
export unexported and remove unused types
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Dec 5, 2024
1 parent 0853087 commit e9dbc09
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 1,028 deletions.
10 changes: 5 additions & 5 deletions components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
"@vanilla-extract/css": "^1.16.0",
"@vanilla-extract/dynamic": "^2.1.2",
"@vanilla-extract/recipes": "^0.5.5",
"@vanilla-extract/vite-plugin": "^4.0.17",
"@vitest/coverage-v8": "^2.1.4",
"@vanilla-extract/vite-plugin": "^4.0.18",
"@vitest/coverage-v8": "^2.1.8",
"jsdom": "^25.0.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vite": "^6.0.1",
"vite": "^5.4.11",
"vite-plugin-dts": "^4.3.0",
"vite-tsconfig-paths": "^5.1.0",
"vitest": "^2.1.4"
"vite-tsconfig-paths": "^5.1.3",
"vitest": "^2.1.8"
},
"peerDependencies": {
"react": "^18",
Expand Down
4 changes: 2 additions & 2 deletions components/src/components/atoms/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { Avatar, type AvatarProps } from './Avatar/Avatar'
export { BackdropSurface } from './BackdropSurface/BackdropSurface'
export { BackdropSurface, type BackdropSurfaceProps } 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'
export { DynamicPopover, type DynamicPopoverProps } from './DynamicPopover/DynamicPopover'
export * from './DynamicPopover/DynamicPopover'
export { Field, type FieldProps } from './Field/Field'
export { FileInput } from './FileInput/FileInput'
export { Heading, type HeadingProps } from './Heading/Heading'
Expand Down
5 changes: 3 additions & 2 deletions components/src/components/molecules/Profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import type { BoxProps } from '../../atoms/Box/Box'
import { Box } from '../../atoms/Box/Box'
import { Typography } from '../../atoms/Typography/Typography'
import * as styles from './styles.css'
import clsx from 'clsx'
import { clsx } from 'clsx'
import { assignInlineVars } from '@vanilla-extract/dynamic'
export type Size = 'small' | 'medium' | 'large'

type Size = 'small' | 'medium' | 'large'

type BaseProps = {
/** The url of the avatar icon, or the avatar props to passthrough */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import clsx from 'clsx'
import { assignInlineVars } from '@vanilla-extract/dynamic'
import type { Color } from '@/src/tokens/color'

export type Size = 'extraSmall' | 'small' | 'medium'
type Size = 'extraSmall' | 'small' | 'medium'

export type Mode = 'light' | 'dark'
type Mode = 'light' | 'dark'

export type ThemeToggleProps = {
size?: Size
Expand Down
2 changes: 1 addition & 1 deletion components/src/components/organisms/Dialog/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const StepContainer = ({ children }: React.PropsWithChildren) => (
</Box>
)

export type StepType = 'notStarted' | 'inProgress' | 'completed'
type StepType = 'notStarted' | 'inProgress' | 'completed'

const StepItem = ({ $type, ...props }: React.PropsWithChildren<{ $type: StepType }>) => (
<Box
Expand Down
3 changes: 2 additions & 1 deletion components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export * from './components/organisms'
export * from './icons'
export { tokens, baseTheme, lightTheme, darkTheme } from './tokens'
export type { DefaultTheme, EmptyObject, Accent, Mode, ReactNodeNoStrings } from './types'
export type { Hue, Colors, Space } from './tokens'
export type { Hue, Colors, Space, Radii } from './tokens'
export * from './css/theme.css'
export * from './tokens/color'
export type { LetterSpacing, LineHeight } from './tokens/typography'
7 changes: 0 additions & 7 deletions components/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import type * as React from 'react'

import type { Hue as TokenHue, Mode as TokenMode, Tokens } from '@/src/tokens'

export type AllOrNone<T> = T | { [K in keyof T]?: never }

/*
* Disallow string from React.ReactNode
*/
Expand All @@ -25,11 +23,6 @@ export type Mode = TokenMode

export type DefaultTheme = Tokens

export type OptionalTitle = AllOrNone<{
title: string
titleId: string
}>

export type Alert = 'error' | 'warning' | 'info'
export type WithAlert = {
alert?: Alert
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"@stylistic/eslint-plugin": "^2.11.0",
"@stylistic/stylelint-config": "^2.0.0",
"@types/dedent": "^0.7.2",
"@vitest/coverage-v8": "^2.1.7",
"dedent": "^1.5.3",
"eslint": "^9.16.0",
"globals": "^15.13.0",
Expand Down
Loading

0 comments on commit e9dbc09

Please sign in to comment.