2021-01-27 18:54:25 +01:00
|
|
|
/**
|
|
|
|
* A note about the existence of both singular and plural variable names here:
|
2023-02-02 21:15:26 +01:00
|
|
|
* When dealing with a literal property name, e.g. AlignItems, the constant
|
2021-01-27 18:54:25 +01:00
|
|
|
* should match the property. When detailing a collection of things, it should
|
2023-05-18 00:44:51 +02:00
|
|
|
* match the plural form of the thing. e.g. Color, TextVariant, Size
|
2021-01-27 18:54:25 +01:00
|
|
|
*/
|
2022-08-11 21:22:06 +02:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum Color {
|
|
|
|
backgroundDefault = 'background-default',
|
|
|
|
backgroundAlternative = 'background-alternative',
|
|
|
|
textDefault = 'text-default',
|
|
|
|
textAlternative = 'text-alternative',
|
|
|
|
textMuted = 'text-muted',
|
|
|
|
iconDefault = 'icon-default',
|
|
|
|
iconAlternative = 'icon-alternative',
|
|
|
|
iconMuted = 'icon-muted',
|
|
|
|
borderDefault = 'border-default',
|
|
|
|
borderMuted = 'border-muted',
|
|
|
|
overlayDefault = 'overlay-default',
|
|
|
|
overlayInverse = 'overlay-inverse',
|
|
|
|
primaryDefault = 'primary-default',
|
|
|
|
primaryAlternative = 'primary-alternative',
|
|
|
|
primaryMuted = 'primary-muted',
|
|
|
|
primaryInverse = 'primary-inverse',
|
|
|
|
primaryDisabled = 'primary-disabled',
|
|
|
|
errorDefault = 'error-default',
|
|
|
|
errorAlternative = 'error-alternative',
|
|
|
|
errorMuted = 'error-muted',
|
|
|
|
errorInverse = 'error-inverse',
|
|
|
|
errorDisabled = 'error-disabled',
|
|
|
|
warningDefault = 'warning-default',
|
|
|
|
warningAlternative = 'warning-alternative',
|
|
|
|
warningMuted = 'warning-muted',
|
|
|
|
warningInverse = 'warning-inverse',
|
|
|
|
warningDisabled = 'warning-disabled',
|
|
|
|
successDefault = 'success-default',
|
|
|
|
successAlternative = 'success-alternative',
|
|
|
|
successMuted = 'success-muted',
|
|
|
|
successInverse = 'success-inverse',
|
|
|
|
successDisabled = 'success-disabled',
|
|
|
|
infoDefault = 'info-default',
|
|
|
|
infoAlternative = 'info-alternative',
|
|
|
|
infoMuted = 'info-muted',
|
|
|
|
infoInverse = 'info-inverse',
|
|
|
|
infoDisabled = 'info-disabled',
|
|
|
|
mainnet = 'mainnet',
|
|
|
|
goerli = 'goerli',
|
|
|
|
sepolia = 'sepolia',
|
2023-06-15 13:38:07 +02:00
|
|
|
lineaGoerli = 'linea-goerli',
|
|
|
|
lineaGoerliInverse = 'linea-goerli-inverse',
|
2023-06-16 18:35:33 +02:00
|
|
|
lineaMainnet = 'linea-mainnet',
|
|
|
|
lineaMainnetInverse = 'linea-mainnet-inverse',
|
2023-02-02 21:15:26 +01:00
|
|
|
transparent = 'transparent',
|
|
|
|
localhost = 'localhost',
|
|
|
|
inherit = 'inherit',
|
|
|
|
goerliInverse = 'goerli-inverse',
|
|
|
|
sepoliaInverse = 'sepolia-inverse',
|
|
|
|
}
|
2022-08-11 21:22:06 +02:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum BackgroundColor {
|
|
|
|
backgroundDefault = 'background-default',
|
|
|
|
backgroundAlternative = 'background-alternative',
|
|
|
|
overlayDefault = 'overlay-default',
|
|
|
|
primaryDefault = 'primary-default',
|
|
|
|
primaryAlternative = 'primary-alternative',
|
|
|
|
primaryMuted = 'primary-muted',
|
|
|
|
errorDefault = 'error-default',
|
2023-05-03 15:18:56 +02:00
|
|
|
errorAlternative = 'error-alternative',
|
2023-02-02 21:15:26 +01:00
|
|
|
errorMuted = 'error-muted',
|
|
|
|
warningDefault = 'warning-default',
|
|
|
|
warningAlternative = 'warning-alternative',
|
|
|
|
warningMuted = 'warning-muted',
|
|
|
|
successDefault = 'success-default',
|
|
|
|
successAlternative = 'success-alternative',
|
|
|
|
successMuted = 'success-muted',
|
|
|
|
infoDefault = 'info-default',
|
|
|
|
infoAlternative = 'info-alternative',
|
|
|
|
infoMuted = 'info-muted',
|
|
|
|
mainnet = 'mainnet',
|
|
|
|
goerli = 'goerli',
|
|
|
|
sepolia = 'sepolia',
|
2023-06-15 13:38:07 +02:00
|
|
|
lineaGoerli = 'linea-goerli',
|
2023-06-16 18:35:33 +02:00
|
|
|
lineaMainnet = 'linea-mainnet',
|
2023-02-02 21:15:26 +01:00
|
|
|
transparent = 'transparent',
|
|
|
|
localhost = 'localhost',
|
|
|
|
}
|
2023-01-27 19:28:03 +01:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum BorderColor {
|
|
|
|
borderDefault = 'border-default',
|
|
|
|
borderMuted = 'border-muted',
|
|
|
|
primaryDefault = 'primary-default',
|
|
|
|
primaryAlternative = 'primary-alternative',
|
|
|
|
primaryMuted = 'primary-muted',
|
|
|
|
errorDefault = 'error-default',
|
|
|
|
errorAlternative = 'error-alternative',
|
|
|
|
errorMuted = 'error-muted',
|
|
|
|
warningDefault = 'warning-default',
|
|
|
|
warningAlternative = 'warning-alternative',
|
|
|
|
warningMuted = 'warning-muted',
|
|
|
|
successDefault = 'success-default',
|
|
|
|
successAlternative = 'success-alternative',
|
|
|
|
successMuted = 'success-muted',
|
|
|
|
infoDefault = 'info-default',
|
|
|
|
infoAlternative = 'info-alternative',
|
|
|
|
infoMuted = 'info-muted',
|
|
|
|
mainnet = 'mainnet',
|
|
|
|
goerli = 'goerli',
|
|
|
|
sepolia = 'sepolia',
|
2023-06-15 13:38:07 +02:00
|
|
|
lineaGoerli = 'linea-goerli',
|
2023-06-16 18:35:33 +02:00
|
|
|
lineaMainnet = 'linea-mainnet',
|
2023-02-02 21:15:26 +01:00
|
|
|
transparent = 'transparent',
|
|
|
|
localhost = 'localhost',
|
2023-06-13 17:11:21 +02:00
|
|
|
backgroundDefault = 'background-default', // exception for border color when element is meant to look "cut out"
|
2023-02-02 21:15:26 +01:00
|
|
|
}
|
2022-08-11 21:22:06 +02:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum TextColor {
|
|
|
|
textDefault = 'text-default',
|
|
|
|
textAlternative = 'text-alternative',
|
|
|
|
textMuted = 'text-muted',
|
2023-03-16 21:18:00 +01:00
|
|
|
overlayInverse = 'overlay-inverse',
|
2023-02-02 21:15:26 +01:00
|
|
|
primaryDefault = 'primary-default',
|
|
|
|
primaryInverse = 'primary-inverse',
|
|
|
|
errorDefault = 'error-default',
|
|
|
|
errorInverse = 'error-inverse',
|
|
|
|
successDefault = 'success-default',
|
|
|
|
successInverse = 'success-inverse',
|
|
|
|
warningDefault = 'warning-default',
|
|
|
|
warningInverse = 'warning-inverse',
|
|
|
|
infoDefault = 'info-default',
|
|
|
|
infoInverse = 'info-inverse',
|
|
|
|
inherit = 'inherit',
|
|
|
|
goerli = 'goerli',
|
|
|
|
sepolia = 'sepolia',
|
2023-06-15 13:38:07 +02:00
|
|
|
lineaGoerli = 'linea-goerli',
|
|
|
|
lineaGoerliInverse = 'linea-goerli-inverse',
|
2023-06-16 18:35:33 +02:00
|
|
|
lineaMainnet = 'linea-mainnet',
|
|
|
|
lineaMainnetInverse = 'linea-mainnet-inverse',
|
2023-02-02 21:15:26 +01:00
|
|
|
goerliInverse = 'goerli-inverse',
|
|
|
|
sepoliaInverse = 'sepolia-inverse',
|
2023-03-22 03:19:49 +01:00
|
|
|
transparent = 'transparent',
|
2023-02-02 21:15:26 +01:00
|
|
|
}
|
2021-01-19 17:30:29 +01:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum IconColor {
|
|
|
|
iconDefault = 'icon-default',
|
|
|
|
iconAlternative = 'icon-alternative',
|
|
|
|
iconMuted = 'icon-muted',
|
|
|
|
overlayInverse = 'overlay-inverse',
|
|
|
|
primaryDefault = 'primary-default',
|
|
|
|
primaryInverse = 'primary-inverse',
|
|
|
|
errorDefault = 'error-default',
|
|
|
|
errorInverse = 'error-inverse',
|
|
|
|
successDefault = 'success-default',
|
|
|
|
successInverse = 'success-inverse',
|
|
|
|
warningDefault = 'warning-default',
|
|
|
|
warningInverse = 'warning-inverse',
|
|
|
|
infoDefault = 'info-default',
|
|
|
|
infoInverse = 'info-inverse',
|
|
|
|
inherit = 'inherit',
|
|
|
|
goerli = 'goerli',
|
|
|
|
sepolia = 'sepolia',
|
2023-06-15 13:38:07 +02:00
|
|
|
lineaGoerli = 'linea-goerli',
|
|
|
|
lineaGoerliInverse = 'linea-goerli-inverse',
|
2023-06-16 18:35:33 +02:00
|
|
|
lineaMainnet = 'linea-mainnet',
|
|
|
|
lineaMainnetInverse = 'linea-mainnet-inverse',
|
2023-02-02 21:15:26 +01:00
|
|
|
goerliInverse = 'goerli-inverse',
|
|
|
|
sepoliaInverse = 'sepolia-inverse',
|
2023-07-25 18:05:15 +02:00
|
|
|
transparent = 'transparent',
|
2023-02-02 21:15:26 +01:00
|
|
|
}
|
2022-08-18 16:53:01 +02:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum TypographyVariant {
|
|
|
|
H1 = 'h1',
|
|
|
|
H2 = 'h2',
|
|
|
|
H3 = 'h3',
|
|
|
|
H4 = 'h4',
|
|
|
|
H5 = 'h5',
|
|
|
|
H6 = 'h6',
|
|
|
|
H7 = 'h7',
|
|
|
|
H8 = 'h8',
|
|
|
|
H9 = 'h9',
|
|
|
|
paragraph = 'p',
|
|
|
|
span = 'span',
|
|
|
|
}
|
2022-08-18 16:53:01 +02:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum TextVariant {
|
|
|
|
displayMd = 'display-md',
|
|
|
|
headingLg = 'heading-lg',
|
|
|
|
headingMd = 'heading-md',
|
|
|
|
headingSm = 'heading-sm',
|
|
|
|
bodyLgMedium = 'body-lg-medium',
|
|
|
|
bodyMd = 'body-md',
|
2023-06-30 20:35:43 +02:00
|
|
|
bodyMdMedium = 'body-md-medium',
|
2023-02-02 21:15:26 +01:00
|
|
|
bodyMdBold = 'body-md-bold',
|
|
|
|
bodySm = 'body-sm',
|
2023-06-30 20:35:43 +02:00
|
|
|
bodySmMedium = 'body-sm-medium',
|
2023-02-02 21:15:26 +01:00
|
|
|
bodySmBold = 'body-sm-bold',
|
|
|
|
bodyXs = 'body-xs',
|
2023-06-30 20:35:43 +02:00
|
|
|
bodyXsMedium = 'body-xs-medium',
|
2023-02-02 21:15:26 +01:00
|
|
|
inherit = 'inherit',
|
|
|
|
}
|
2021-01-27 18:54:25 +01:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum Size {
|
|
|
|
XXS = 'xxs',
|
|
|
|
XS = 'xs',
|
|
|
|
SM = 'sm',
|
|
|
|
MD = 'md',
|
|
|
|
LG = 'lg',
|
|
|
|
XL = 'xl',
|
|
|
|
inherit = 'inherit', // Used for Text, Icon, and Button components to inherit the parent elements font-size
|
|
|
|
auto = 'auto',
|
|
|
|
}
|
2022-08-18 19:51:53 +02:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum BorderStyle {
|
|
|
|
dashed = 'dashed',
|
|
|
|
solid = 'solid',
|
|
|
|
dotted = 'dotted',
|
|
|
|
double = 'double',
|
|
|
|
none = 'none',
|
|
|
|
}
|
2021-01-27 18:54:25 +01:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum BorderRadius {
|
2023-06-26 19:29:02 +02:00
|
|
|
/**
|
|
|
|
* 2px
|
|
|
|
*/
|
2023-02-02 21:15:26 +01:00
|
|
|
XS = 'xs',
|
2023-06-26 19:29:02 +02:00
|
|
|
/**
|
|
|
|
* 4px
|
|
|
|
*/
|
2023-02-02 21:15:26 +01:00
|
|
|
SM = 'sm',
|
2023-06-26 19:29:02 +02:00
|
|
|
/**
|
|
|
|
* 6px
|
|
|
|
*/
|
2023-02-02 21:15:26 +01:00
|
|
|
MD = 'md',
|
2023-06-26 19:29:02 +02:00
|
|
|
/**
|
|
|
|
* 8px
|
|
|
|
*/
|
2023-02-02 21:15:26 +01:00
|
|
|
LG = 'lg',
|
2023-06-26 19:29:02 +02:00
|
|
|
/**
|
|
|
|
* 12px
|
|
|
|
*/
|
2023-02-02 21:15:26 +01:00
|
|
|
XL = 'xl',
|
2023-06-26 19:29:02 +02:00
|
|
|
/**
|
|
|
|
* 0
|
|
|
|
*/
|
2023-02-02 21:15:26 +01:00
|
|
|
none = 'none',
|
2023-06-26 19:29:02 +02:00
|
|
|
/**
|
|
|
|
* 9999px
|
|
|
|
*/
|
2023-02-02 21:15:26 +01:00
|
|
|
pill = 'pill',
|
2023-06-26 19:29:02 +02:00
|
|
|
/**
|
|
|
|
* 50%
|
|
|
|
*/
|
2023-02-02 21:15:26 +01:00
|
|
|
full = 'full',
|
|
|
|
}
|
2021-01-27 18:54:25 +01:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
// NOTE: The name of this enum is plural due to the name of property in css is `align-items`,
|
|
|
|
// which is for aligning all items not one
|
|
|
|
export enum AlignItems {
|
|
|
|
flexStart = 'flex-start',
|
|
|
|
flexEnd = 'flex-end',
|
|
|
|
center = 'center',
|
|
|
|
baseline = 'baseline',
|
|
|
|
stretch = 'stretch',
|
|
|
|
}
|
2021-01-27 18:54:25 +01:00
|
|
|
|
2023-02-02 21:15:26 +01:00
|
|
|
export enum JustifyContent {
|
|
|
|
flexStart = 'flex-start',
|
|
|
|
flexEnd = 'flex-end',
|
|
|
|
center = 'center',
|
|
|
|
spaceAround = 'space-around',
|
|
|
|
spaceBetween = 'space-between',
|
|
|
|
spaceEvenly = 'space-evenly',
|
|
|
|
}
|
2021-01-27 18:54:25 +01:00
|
|
|
|
2023-05-18 00:44:51 +02:00
|
|
|
export enum FlexDirection {
|
|
|
|
Row = 'row',
|
|
|
|
RowReverse = 'row-reverse',
|
|
|
|
Column = 'column',
|
|
|
|
ColumnReverse = 'column-reverse',
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `FLEX_DIRECTION` const has been deprecated in favor of the `FlexDirection` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-05-18 00:44:51 +02:00
|
|
|
*
|
|
|
|
* Help to replace `FLEX_DIRECTION` with `FlexDirection` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
|
|
|
|
2021-10-06 20:52:25 +02:00
|
|
|
export const FLEX_DIRECTION = {
|
|
|
|
ROW: 'row',
|
|
|
|
ROW_REVERSE: 'row-reverse',
|
|
|
|
COLUMN: 'column',
|
|
|
|
COLUMN_REVERSE: 'column-reverse',
|
|
|
|
};
|
|
|
|
|
2023-05-18 00:44:51 +02:00
|
|
|
export enum FlexWrap {
|
|
|
|
Wrap = 'wrap',
|
|
|
|
WrapReverse = 'wrap-reverse',
|
|
|
|
NoWrap = 'nowrap',
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `FLEX_WRAP` const has been deprecated in favor of the `FlexWrap` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-05-18 00:44:51 +02:00
|
|
|
*
|
|
|
|
* Help to replace `FLEX_WRAP` with `FlexWrap` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
|
|
|
|
2021-11-01 20:16:23 +01:00
|
|
|
export const FLEX_WRAP = {
|
|
|
|
WRAP: 'wrap',
|
|
|
|
WRAP_REVERSE: 'wrap-reverse',
|
|
|
|
NO_WRAP: 'nowrap',
|
|
|
|
};
|
|
|
|
|
2023-05-18 00:44:51 +02:00
|
|
|
export enum Display {
|
|
|
|
Block = 'block',
|
|
|
|
Flex = 'flex',
|
|
|
|
Grid = 'grid',
|
|
|
|
InlineBlock = 'inline-block',
|
|
|
|
Inline = 'inline',
|
|
|
|
InlineFlex = 'inline-flex',
|
|
|
|
InlineGrid = 'inline-grid',
|
|
|
|
ListItem = 'list-item',
|
|
|
|
None = 'none',
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `DISPLAY` const has been deprecated in favor of the `Display` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-05-18 00:44:51 +02:00
|
|
|
*
|
|
|
|
* Help to replace `DISPLAY` with `Display` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
|
|
|
|
2021-01-27 18:54:25 +01:00
|
|
|
export const DISPLAY = {
|
|
|
|
BLOCK: 'block',
|
|
|
|
FLEX: 'flex',
|
|
|
|
GRID: 'grid',
|
|
|
|
INLINE_BLOCK: 'inline-block',
|
2022-07-20 22:47:51 +02:00
|
|
|
INLINE: 'inline',
|
2021-01-27 18:54:25 +01:00
|
|
|
INLINE_FLEX: 'inline-flex',
|
|
|
|
INLINE_GRID: 'inline-grid',
|
|
|
|
LIST_ITEM: 'list-item',
|
2022-07-20 22:47:51 +02:00
|
|
|
NONE: 'none',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2021-01-27 18:54:25 +01:00
|
|
|
|
2023-05-18 00:44:51 +02:00
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `FRACTIONS` const has been deprecated in favor of the `BlockSize` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-05-18 00:44:51 +02:00
|
|
|
*
|
|
|
|
* Help to replace `FRACTIONS` with `BlockSize` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
|
|
|
|
2022-02-15 01:02:51 +01:00
|
|
|
export const FRACTIONS = {
|
2021-01-27 18:54:25 +01:00
|
|
|
HALF: '1/2',
|
|
|
|
ONE_THIRD: '1/3',
|
|
|
|
TWO_THIRDS: '2/3',
|
|
|
|
ONE_FOURTH: '1/4',
|
|
|
|
TWO_FOURTHS: '2/4',
|
|
|
|
THREE_FOURTHS: '3/4',
|
|
|
|
ONE_FIFTH: '1/5',
|
|
|
|
TWO_FIFTHS: '2/5',
|
|
|
|
THREE_FIFTHS: '3/5',
|
|
|
|
FOUR_FIFTHS: '4/5',
|
|
|
|
ONE_SIXTH: '1/6',
|
|
|
|
TWO_SIXTHS: '2/6',
|
|
|
|
THREE_SIXTHS: '3/6',
|
|
|
|
FOUR_SIXTHS: '4/6',
|
|
|
|
FIVE_SIXTHS: '5/6',
|
|
|
|
ONE_TWELFTH: '1/12',
|
|
|
|
TWO_TWELFTHS: '2/12',
|
|
|
|
THREE_TWELFTHS: '3/12',
|
|
|
|
FOUR_TWELFTHS: '4/12',
|
|
|
|
FIVE_TWELFTHS: '5/12',
|
|
|
|
SIX_TWELFTHS: '6/12',
|
|
|
|
SEVEN_TWELFTHS: '7/12',
|
|
|
|
EIGHT_TWELFTHS: '8/12',
|
|
|
|
NINE_TWELFTHS: '9/12',
|
|
|
|
TEN_TWELFTHS: '10/12',
|
|
|
|
ELEVEN_TWELFTHS: '11/12',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2021-01-27 18:54:25 +01:00
|
|
|
|
2023-05-18 00:44:51 +02:00
|
|
|
export enum BlockSize {
|
|
|
|
Half = '1/2',
|
|
|
|
OneThird = '1/3',
|
|
|
|
TwoThirds = '2/3',
|
|
|
|
OneFourth = '1/4',
|
|
|
|
TwoFourths = '2/4',
|
|
|
|
ThreeFourths = '3/4',
|
|
|
|
OneFifth = '1/5',
|
|
|
|
TwoFifths = '2/5',
|
|
|
|
ThreeFifths = '3/5',
|
|
|
|
FourFifths = '4/5',
|
|
|
|
OneSixth = '1/6',
|
|
|
|
TwoSixths = '2/6',
|
|
|
|
ThreeSixths = '3/6',
|
|
|
|
FourSixths = '4/6',
|
|
|
|
FiveSixths = '5/6',
|
|
|
|
OneTwelfth = '1/12',
|
|
|
|
TwoTwelfths = '2/12',
|
|
|
|
ThreeTwelfths = '3/12',
|
|
|
|
FourTwelfths = '4/12',
|
|
|
|
FiveTwelfths = '5/12',
|
|
|
|
SixTwelfths = '6/12',
|
|
|
|
SevenTwelfths = '7/12',
|
|
|
|
EightTwelfths = '8/12',
|
|
|
|
NineTwelfths = '9/12',
|
|
|
|
TenTwelfths = '10/12',
|
|
|
|
ElevenTwelfths = '11/12',
|
|
|
|
Screen = 'screen',
|
|
|
|
Max = 'max',
|
|
|
|
Min = 'min',
|
|
|
|
Full = 'full',
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `BLOCK_SIZES` const has been deprecated in favor of the `BlockSize` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-05-18 00:44:51 +02:00
|
|
|
*
|
|
|
|
* Help to replace `BLOCK_SIZES` with `BlockSize` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
|
|
|
|
2021-01-27 18:54:25 +01:00
|
|
|
export const BLOCK_SIZES = {
|
|
|
|
...FRACTIONS,
|
|
|
|
SCREEN: 'screen',
|
|
|
|
MAX: 'max',
|
|
|
|
MIN: 'min',
|
|
|
|
FULL: 'full',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2021-01-27 18:54:25 +01:00
|
|
|
|
2023-04-17 19:17:28 +02:00
|
|
|
export enum TextAlign {
|
|
|
|
Left = 'left',
|
|
|
|
Center = 'center',
|
|
|
|
Right = 'right',
|
|
|
|
Justify = 'justify',
|
|
|
|
End = 'end',
|
|
|
|
Start = 'start',
|
|
|
|
}
|
|
|
|
|
2023-04-28 01:28:39 +02:00
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `TEXT_ALIGN` const has been deprecated in favor of the `TextAlign` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-04-28 01:28:39 +02:00
|
|
|
*
|
|
|
|
* Help to replace `TEXT_ALIGN` with `TextAlign` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
2021-01-27 18:54:25 +01:00
|
|
|
export const TEXT_ALIGN = {
|
|
|
|
LEFT: 'left',
|
|
|
|
CENTER: 'center',
|
|
|
|
RIGHT: 'right',
|
|
|
|
JUSTIFY: 'justify',
|
2021-06-24 01:39:44 +02:00
|
|
|
END: 'end',
|
2023-03-22 11:00:08 +01:00
|
|
|
START: 'start',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2021-01-27 18:54:25 +01:00
|
|
|
|
2023-04-17 19:17:28 +02:00
|
|
|
export enum TextTransform {
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
|
|
Uppercase = 'uppercase',
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
|
|
Lowercase = 'lowercase',
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
|
|
Capitalize = 'capitalize',
|
|
|
|
}
|
|
|
|
|
2023-04-28 01:28:39 +02:00
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `TEXT_TRANSFORM` const has been deprecated in favor of the `TextTransform` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-04-28 01:28:39 +02:00
|
|
|
*
|
|
|
|
* Help to replace `TEXT_TRANSFORM` with `TextTransform` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
2022-08-18 19:51:53 +02:00
|
|
|
export const TEXT_TRANSFORM = {
|
|
|
|
UPPERCASE: 'uppercase',
|
|
|
|
LOWERCASE: 'lowercase',
|
|
|
|
CAPITALIZE: 'capitalize',
|
|
|
|
};
|
|
|
|
|
2023-04-17 19:17:28 +02:00
|
|
|
export enum FontWeight {
|
|
|
|
Bold = 'bold',
|
|
|
|
Medium = 'medium',
|
|
|
|
Normal = 'normal',
|
|
|
|
}
|
|
|
|
|
2023-04-28 01:28:39 +02:00
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `FONT_WEIGHT` const has been deprecated in favor of the `FontWeight` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-04-28 01:28:39 +02:00
|
|
|
*
|
|
|
|
* Help to replace `FONT_WEIGHT` with `FontWeight` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
2021-01-27 18:54:25 +01:00
|
|
|
export const FONT_WEIGHT = {
|
|
|
|
BOLD: 'bold',
|
2022-08-18 19:51:53 +02:00
|
|
|
MEDIUM: 'medium',
|
2021-01-27 18:54:25 +01:00
|
|
|
NORMAL: 'normal',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2021-02-01 19:10:19 +01:00
|
|
|
|
2023-04-17 19:17:28 +02:00
|
|
|
export enum OverflowWrap {
|
|
|
|
BreakWord = 'break-word',
|
|
|
|
Anywhere = 'anywhere',
|
|
|
|
Normal = 'normal',
|
|
|
|
}
|
|
|
|
|
2023-04-28 01:28:39 +02:00
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `OVERFLOW_WRAP` const has been deprecated in favor of the `OverflowWrap` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-04-28 01:28:39 +02:00
|
|
|
*
|
|
|
|
* Help to replace `OVERFLOW_WRAP` with `OverflowWrap` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
2021-12-14 00:41:10 +01:00
|
|
|
export const OVERFLOW_WRAP = {
|
|
|
|
BREAK_WORD: 'break-word',
|
2022-12-01 16:46:06 +01:00
|
|
|
ANYWHERE: 'anywhere',
|
2021-12-14 00:41:10 +01:00
|
|
|
NORMAL: 'normal',
|
|
|
|
};
|
|
|
|
|
2023-04-17 19:17:28 +02:00
|
|
|
export enum FontStyle {
|
|
|
|
Italic = 'italic',
|
|
|
|
Normal = 'normal',
|
|
|
|
}
|
|
|
|
|
2023-04-28 01:28:39 +02:00
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `FONT_STYLE` const has been deprecated in favor of the `FontStyle` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-04-28 01:28:39 +02:00
|
|
|
*
|
|
|
|
* Help to replace `FONT_STYLE` with `FontStyle` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
2021-09-01 20:02:01 +02:00
|
|
|
export const FONT_STYLE = {
|
|
|
|
ITALIC: 'italic',
|
|
|
|
NORMAL: 'normal',
|
|
|
|
};
|
|
|
|
|
2023-05-18 00:44:51 +02:00
|
|
|
export enum Severity {
|
|
|
|
Danger = 'danger',
|
|
|
|
Warning = 'warning',
|
|
|
|
Info = 'info',
|
|
|
|
Success = 'success',
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2023-06-08 22:37:09 +02:00
|
|
|
* @deprecated `SEVERITIES` const has been deprecated in favor of the `Severity` enum which can still be imported from `ui/helpers/constants/design-system.ts`
|
2023-05-18 00:44:51 +02:00
|
|
|
*
|
|
|
|
* Help to replace `SEVERITIES` with `FontStyle` by submitting PRs against https://github.com/MetaMask/metamask-extension/issues/18714
|
|
|
|
*/
|
|
|
|
|
2021-02-01 19:10:19 +01:00
|
|
|
export const SEVERITIES = {
|
|
|
|
DANGER: 'danger',
|
|
|
|
WARNING: 'warning',
|
|
|
|
INFO: 'info',
|
|
|
|
SUCCESS: 'success',
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2021-12-03 17:54:29 +01:00
|
|
|
|
2022-07-20 22:47:51 +02:00
|
|
|
export const BREAKPOINTS = ['base', 'sm', 'md', 'lg'];
|