-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #648 from sungik-choi/enhance/types
- Loading branch information
Showing
88 changed files
with
885 additions
and
611 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
/* Internal dependencies */ | ||
import { ChildrenComponentProps } from 'Types/ComponentProps' | ||
import InjectedInterpolation from 'Types/InjectedInterpolation' | ||
import type { BezierComponentProps, ChildrenProps, SizeProps, AdditionalStylableProps } from 'Types/ComponentProps' | ||
import { AvatarSize } from 'Components/Avatars/Avatar' | ||
|
||
export enum AvatarGroupEllipsisType { | ||
Icon = 'Icon', | ||
Count = 'Count', | ||
} | ||
|
||
export default interface AvatarGroupProps extends ChildrenComponentProps { | ||
type MouseEventHandler = React.MouseEventHandler<HTMLDivElement> | ||
|
||
interface AvatarGroupOptions { | ||
max: number | ||
size?: AvatarSize | ||
spacing?: number | ||
ellipsisType?: AvatarGroupEllipsisType | ||
onMouseEnterEllipsis?: (event: React.MouseEvent<HTMLDivElement>) => void | ||
onMouseLeaveEllipsis?: (event: React.MouseEvent<HTMLDivElement>) => void | ||
ellipsisInterpolation?: InjectedInterpolation | ||
onMouseEnterEllipsis?: MouseEventHandler | ||
onMouseLeaveEllipsis?: MouseEventHandler | ||
} | ||
|
||
export default interface AvatarGroupProps extends | ||
BezierComponentProps, | ||
ChildrenProps, | ||
SizeProps<AvatarSize>, | ||
AdditionalStylableProps<'ellipsis'>, | ||
AvatarGroupOptions {} |
4 changes: 2 additions & 2 deletions
4
src/components/Avatars/CheckableAvatar/CheckableAvatar.styled.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletions
16
src/components/Avatars/CheckableAvatar/CheckableAvatar.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
/* Internal dependencies */ | ||
import { SemanticNames } from 'Foundation' | ||
import InjectedInterpolation from 'Types/InjectedInterpolation' | ||
import { AvatarProps } from 'Components/Avatars/Avatar' | ||
import type { AdditionalStylableProps, AdditionalColorProps } from 'Types/ComponentProps' | ||
import type { AvatarProps } from 'Components/Avatars/Avatar' | ||
|
||
export default interface CheckableAvatarProps extends AvatarProps { | ||
interface CheckableAvatarPropsOptions { | ||
isChecked?: boolean | ||
isCheckable?: boolean | ||
checkedBackgroundColor?: SemanticNames | ||
checkableWrapperClassName?: string | ||
checkableWrapperInterpolation?: InjectedInterpolation | ||
} | ||
|
||
export default interface CheckableAvatarProps extends | ||
AvatarProps, | ||
AdditionalStylableProps<'checkableWrapper'>, | ||
AdditionalColorProps<'checkedBackground'>, | ||
CheckableAvatarPropsOptions {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
/* Internal dependencies */ | ||
import { css, SemanticNames } from 'Foundation' | ||
import type { InjectedInterpolation } from 'Types/InjectedInterpolation' | ||
import { BannerColorVariant } from './Banner.types' | ||
import type { InjectedInterpolation } from 'Types/Foundation' | ||
import { BannerVariant } from './Banner.types' | ||
|
||
export const BACKGROUND_COLORS: Record<BannerColorVariant, SemanticNames> = { | ||
[BannerColorVariant.Default]: 'bg-black-lighter', | ||
[BannerColorVariant.Blue]: 'bgtxt-blue-lightest', | ||
[BannerColorVariant.Cobalt]: 'bgtxt-cobalt-lightest', | ||
[BannerColorVariant.Green]: 'bgtxt-green-lightest', | ||
[BannerColorVariant.Orange]: 'bgtxt-orange-lightest', | ||
[BannerColorVariant.Red]: 'bgtxt-red-lightest', | ||
[BannerColorVariant.Alt]: 'bg-grey-lighter', | ||
export const BACKGROUND_COLORS: Record<BannerVariant, SemanticNames> = { | ||
[BannerVariant.Default]: 'bg-black-lighter', | ||
[BannerVariant.Blue]: 'bgtxt-blue-lightest', | ||
[BannerVariant.Cobalt]: 'bgtxt-cobalt-lightest', | ||
[BannerVariant.Green]: 'bgtxt-green-lightest', | ||
[BannerVariant.Orange]: 'bgtxt-orange-lightest', | ||
[BannerVariant.Red]: 'bgtxt-red-lightest', | ||
[BannerVariant.Alt]: 'bg-grey-lighter', | ||
} | ||
|
||
export const DEFAULT_ICON_COLORS: Record<BannerColorVariant, SemanticNames> = { | ||
[BannerColorVariant.Default]: 'txt-black-darker', | ||
[BannerColorVariant.Blue]: 'bgtxt-blue-normal', | ||
[BannerColorVariant.Cobalt]: 'bgtxt-cobalt-normal', | ||
[BannerColorVariant.Green]: 'bgtxt-green-normal', | ||
[BannerColorVariant.Orange]: 'bgtxt-orange-normal', | ||
[BannerColorVariant.Red]: 'bgtxt-red-normal', | ||
[BannerColorVariant.Alt]: 'txt-black-darker', | ||
export const DEFAULT_ICON_COLORS: Record<BannerVariant, SemanticNames> = { | ||
[BannerVariant.Default]: 'txt-black-darker', | ||
[BannerVariant.Blue]: 'bgtxt-blue-normal', | ||
[BannerVariant.Cobalt]: 'bgtxt-cobalt-normal', | ||
[BannerVariant.Green]: 'bgtxt-green-normal', | ||
[BannerVariant.Orange]: 'bgtxt-orange-normal', | ||
[BannerVariant.Red]: 'bgtxt-red-normal', | ||
[BannerVariant.Alt]: 'txt-black-darker', | ||
} | ||
|
||
export const TEXT_COLORS: Record<BannerColorVariant, SemanticNames> = { | ||
[BannerColorVariant.Default]: 'txt-black-darker', | ||
[BannerColorVariant.Blue]: 'bgtxt-blue-normal', | ||
[BannerColorVariant.Cobalt]: 'bgtxt-cobalt-normal', | ||
[BannerColorVariant.Green]: 'bgtxt-green-normal', | ||
[BannerColorVariant.Orange]: 'bgtxt-orange-normal', | ||
[BannerColorVariant.Red]: 'bgtxt-red-normal', | ||
[BannerColorVariant.Alt]: 'txt-black-darker', | ||
export const TEXT_COLORS: Record<BannerVariant, SemanticNames> = { | ||
[BannerVariant.Default]: 'txt-black-darker', | ||
[BannerVariant.Blue]: 'bgtxt-blue-normal', | ||
[BannerVariant.Cobalt]: 'bgtxt-cobalt-normal', | ||
[BannerVariant.Green]: 'bgtxt-green-normal', | ||
[BannerVariant.Orange]: 'bgtxt-orange-normal', | ||
[BannerVariant.Red]: 'bgtxt-red-normal', | ||
[BannerVariant.Alt]: 'txt-black-darker', | ||
} | ||
|
||
export const ELEVATIONS: { [key in BannerColorVariant]?: InjectedInterpolation } = { | ||
[BannerColorVariant.Alt]: css` | ||
export const ELEVATIONS: { [key in BannerVariant]?: InjectedInterpolation } = { | ||
[BannerVariant.Alt]: css` | ||
${({ foundation }) => foundation?.elevation?.ev2()} | ||
`, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.