Skip to content

Infra/ Update DesignTokens #1773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions generatedTypes/src/incubator/TextField/usePreset.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
violet80?: boolean | undefined;
backgroundDefault?: boolean | undefined;
backgroundNeutralHeavy?: boolean | undefined;
backgroundIdle?: boolean | undefined;
backgroundNeutralIdle?: boolean | undefined;
backgroundNeutralMedium?: boolean | undefined;
backgroundNeutral?: boolean | undefined;
backgroundNeutralLight?: boolean | undefined;
Expand All @@ -387,8 +387,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
textNeutralHeavy?: boolean | undefined;
textNeutral?: boolean | undefined;
textNeutralLight?: boolean | undefined;
textWhite?: boolean | undefined;
textWhiteDisabled?: boolean | undefined;
textDefaultLight?: boolean | undefined;
textPrimary?: boolean | undefined;
textGeneral?: boolean | undefined;
textSuccess?: boolean | undefined;
Expand All @@ -397,8 +396,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
textDangerLight?: boolean | undefined;
iconDefault?: boolean | undefined;
iconNeutral?: boolean | undefined;
iconWhite?: boolean | undefined;
iconWhiteDisabled?: boolean | undefined;
iconDefaultLight?: boolean | undefined;
iconPrimary?: boolean | undefined;
iconPrimaryLight?: boolean | undefined;
iconGeneral?: boolean | undefined;
Expand All @@ -409,15 +407,16 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
iconDanger?: boolean | undefined;
iconDangerLight?: boolean | undefined;
iconDisabled?: boolean | undefined;
outlineWhite?: boolean | undefined;
outlineLight?: boolean | undefined;
outlineNeutral?: boolean | undefined;
outlineNeutralMedium?: boolean | undefined;
outlineDisabled?: boolean | undefined;
outlineDisabledHeavy?: boolean | undefined;
outlinePrimary?: boolean | undefined;
outlineGeneral?: boolean | undefined;
outlineWarning?: boolean | undefined;
outlineDanger?: boolean | undefined;
dividerNeutral?: boolean | undefined;
divider?: boolean | undefined;
dividerDefault?: boolean | undefined;
hint?: string | undefined;
color?: import("./types").ColorType | undefined;
placeholderTextColor?: import("./types").ColorType | undefined;
Expand Down Expand Up @@ -765,7 +764,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
violet80?: boolean | undefined;
backgroundDefault?: boolean | undefined;
backgroundNeutralHeavy?: boolean | undefined;
backgroundIdle?: boolean | undefined;
backgroundNeutralIdle?: boolean | undefined;
backgroundNeutralMedium?: boolean | undefined;
backgroundNeutral?: boolean | undefined;
backgroundNeutralLight?: boolean | undefined;
Expand All @@ -789,8 +788,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
textNeutralHeavy?: boolean | undefined;
textNeutral?: boolean | undefined;
textNeutralLight?: boolean | undefined;
textWhite?: boolean | undefined;
textWhiteDisabled?: boolean | undefined;
textDefaultLight?: boolean | undefined;
textPrimary?: boolean | undefined;
textGeneral?: boolean | undefined;
textSuccess?: boolean | undefined;
Expand All @@ -799,8 +797,7 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
textDangerLight?: boolean | undefined;
iconDefault?: boolean | undefined;
iconNeutral?: boolean | undefined;
iconWhite?: boolean | undefined;
iconWhiteDisabled?: boolean | undefined;
iconDefaultLight?: boolean | undefined;
iconPrimary?: boolean | undefined;
iconPrimaryLight?: boolean | undefined;
iconGeneral?: boolean | undefined;
Expand All @@ -811,15 +808,16 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
iconDanger?: boolean | undefined;
iconDangerLight?: boolean | undefined;
iconDisabled?: boolean | undefined;
outlineWhite?: boolean | undefined;
outlineLight?: boolean | undefined;
outlineNeutral?: boolean | undefined;
outlineNeutralMedium?: boolean | undefined;
outlineDisabled?: boolean | undefined;
outlineDisabledHeavy?: boolean | undefined;
outlinePrimary?: boolean | undefined;
outlineGeneral?: boolean | undefined;
outlineWarning?: boolean | undefined;
outlineDanger?: boolean | undefined;
dividerNeutral?: boolean | undefined;
divider?: boolean | undefined;
dividerDefault?: boolean | undefined;
hint?: string | undefined;
color?: import("./types").ColorType | undefined;
placeholderTextColor?: import("./types").ColorType | undefined;
Expand Down
18 changes: 7 additions & 11 deletions generatedTypes/src/style/colors.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ declare const colorObject: Colors & {
} & {
backgroundDefault: string;
backgroundNeutralHeavy: string;
backgroundIdle: string;
backgroundNeutralIdle: string;
backgroundNeutralMedium: string;
backgroundNeutral: string;
backgroundNeutralLight: string;
Expand All @@ -171,14 +171,10 @@ declare const colorObject: Colors & {
backgroundDark: string;
textDisabled: string;
textDefault: string;
/**
* Get app's current color scheme
*/
textNeutralHeavy: string;
textNeutral: string;
textNeutralLight: string;
textWhite: string;
textWhiteDisabled: string;
textDefaultLight: string;
textPrimary: string;
textGeneral: string;
textSuccess: string;
Expand All @@ -187,8 +183,7 @@ declare const colorObject: Colors & {
textDangerLight: string;
iconDefault: string;
iconNeutral: string;
iconWhite: string;
iconWhiteDisabled: string;
iconDefaultLight: string;
iconPrimary: string;
iconPrimaryLight: string;
iconGeneral: string;
Expand All @@ -199,14 +194,15 @@ declare const colorObject: Colors & {
iconDanger: string;
iconDangerLight: string;
iconDisabled: string;
outlineWhite: string;
outlineLight: string;
outlineNeutral: string;
outlineNeutralMedium: string;
outlineDisabled: string;
outlineDisabledHeavy: string;
outlinePrimary: string;
outlineGeneral: string;
outlineWarning: string;
outlineDanger: string;
dividerNeutral: string;
divider: string;
dividerDefault: string;
};
export default colorObject;
15 changes: 7 additions & 8 deletions generatedTypes/src/style/designTokens.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export declare const designTokens: {
backgroundDefault: string;
backgroundNeutralHeavy: string;
backgroundIdle: string;
backgroundNeutralIdle: string;
backgroundNeutralMedium: string;
backgroundNeutral: string;
backgroundNeutralLight: string;
Expand All @@ -25,8 +25,7 @@ export declare const designTokens: {
textNeutralHeavy: string;
textNeutral: string;
textNeutralLight: string;
textWhite: string;
textWhiteDisabled: string;
textDefaultLight: string;
textPrimary: string;
textGeneral: string;
textSuccess: string;
Expand All @@ -35,8 +34,7 @@ export declare const designTokens: {
textDangerLight: string;
iconDefault: string;
iconNeutral: string;
iconWhite: string;
iconWhiteDisabled: string;
iconDefaultLight: string;
iconPrimary: string;
iconPrimaryLight: string;
iconGeneral: string;
Expand All @@ -47,13 +45,14 @@ export declare const designTokens: {
iconDanger: string;
iconDangerLight: string;
iconDisabled: string;
outlineWhite: string;
outlineLight: string;
outlineNeutral: string;
outlineNeutralMedium: string;
outlineDisabled: string;
outlineDisabledHeavy: string;
outlinePrimary: string;
outlineGeneral: string;
outlineWarning: string;
outlineDanger: string;
dividerNeutral: string;
divider: string;
dividerDefault: string;
};
2 changes: 1 addition & 1 deletion src/components/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Button extends PureComponent<Props, ButtonState> {
const {linkColor, outline, outlineColor, disabled, color: propsColor} = this.props;
const isLink = this.isLink;

let color: string | undefined = Colors.textWhite;
let color: string | undefined = Colors.textDefaultLight;
if (isLink) {
color = linkColor || Colors.textPrimary;
} else if (outline) {
Expand Down
16 changes: 7 additions & 9 deletions src/style/designTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const designTokens = {
// BACKGROUND
backgroundDefault: colorsPalette.white,
backgroundNeutralHeavy: colorsPalette.grey20,
backgroundIdle: colorsPalette.grey40,
backgroundNeutralIdle: colorsPalette.grey40,
backgroundNeutralMedium: colorsPalette.grey60,
backgroundNeutral: colorsPalette.grey70,
backgroundNeutralLight: colorsPalette.grey80,
Expand All @@ -30,8 +30,7 @@ export const designTokens = {
textNeutralHeavy: colorsPalette.grey20,
textNeutral: colorsPalette.grey30,
textNeutralLight: colorsPalette.grey40,
textWhite: colorsPalette.white,
textWhiteDisabled: colorsPalette.white,
textDefaultLight: colorsPalette.white,
textPrimary: colorsPalette.violet30,
textGeneral: colorsPalette.blue30,
textSuccess: colorsPalette.green10,
Expand All @@ -42,8 +41,7 @@ export const designTokens = {
// ICON
iconDefault: colorsPalette.grey10,
iconNeutral: colorsPalette.grey20,
iconWhite: colorsPalette.white,
iconWhiteDisabled: colorsPalette.white,
iconDefaultLight: colorsPalette.white,
iconPrimary: colorsPalette.violet30,
iconPrimaryLight: colorsPalette.violet50,
iconGeneral: colorsPalette.blue30,
Expand All @@ -56,16 +54,16 @@ export const designTokens = {
iconDisabled: colorsPalette.grey50,

// OUTLINE
outlineWhite: colorsPalette.white,
outlineLight: colorsPalette.white,
outlineNeutral: colorsPalette.grey60,
outlineNeutralMedium: colorsPalette.grey50,
outlineDisabled: colorsPalette.grey50,
outlineDisabledHeavy: colorsPalette.grey30,
outlinePrimary: colorsPalette.violet30,
outlineGeneral: colorsPalette.blue30,
outlineWarning: colorsPalette.yellow30,
outlineDanger: colorsPalette.red30,

// DIVIDER
// dividerDisabled: TBD
dividerNeutral: colorsPalette.grey50,
divider: colorsPalette.grey60
dividerDefault: colorsPalette.grey60
};