creactive 0.0.85 → 0.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/classic.js +4 -2
- package/build/components/view/constants/border.d.ts +20 -0
- package/build/components/view/constants/color.d.ts +34 -0
- package/build/components/view/constants/index.d.ts +2 -1
- package/build/components/view/view.types.d.ts +18 -1
- package/build/constants/index.d.ts +1 -1
- package/build/constants/theme/border.d.ts +3 -0
- package/build/constants/theme/color.d.ts +9 -8
- package/build/constants/theme/index.d.ts +2 -2
- package/build/contexts/index.d.ts +1 -1
- package/build/contexts/theme/index.d.ts +1 -1
- package/build/contexts/theme/theme.types.d.ts +80 -24
- package/build/default.js +1 -1
- package/build/hooks/use-theme-style-sheet.d.ts +54 -18
- package/build/index.d.ts +2 -1
- package/build/types/color.types.d.ts +4 -0
- package/build/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Border width enumerated constants.
|
|
3
|
+
* Should be used to control themed border width.
|
|
4
|
+
* Includes matches for all theme base border width tokens.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum ViewBorderWidth {
|
|
7
|
+
SM = 0,
|
|
8
|
+
MD = 1,
|
|
9
|
+
LG = 2
|
|
10
|
+
}
|
|
11
|
+
export declare const ViewBorderWidthThemeStyleSheetKey: {
|
|
12
|
+
0: "borderWidthBaseSM";
|
|
13
|
+
1: "borderWidthBaseMD";
|
|
14
|
+
2: "borderWidthBaseLG";
|
|
15
|
+
};
|
|
16
|
+
export declare const ViewBorderWidthThemeTokenKey: {
|
|
17
|
+
0: "borderWidthBaseSM";
|
|
18
|
+
1: "borderWidthBaseMD";
|
|
19
|
+
2: "borderWidthBaseLG";
|
|
20
|
+
};
|
|
1
21
|
/**
|
|
2
22
|
* View component supported border radius enumerated constants.
|
|
3
23
|
* Includes matches for all theme base border radius tokens and maximum one.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare enum ViewBackgroundColor {
|
|
2
|
+
TRANSPARENT = 0,
|
|
3
|
+
BASE_100 = 1,
|
|
4
|
+
BASE_200 = 2,
|
|
5
|
+
BASE_300 = 3,
|
|
6
|
+
BASE_400 = 4,
|
|
7
|
+
BASE_500 = 5,
|
|
8
|
+
BASE_600 = 6,
|
|
9
|
+
BASE_700 = 7,
|
|
10
|
+
BASE_800 = 8,
|
|
11
|
+
BASE_900 = 9
|
|
12
|
+
}
|
|
13
|
+
export declare const ViewBackgroundColorStyleSheetKey: {
|
|
14
|
+
1: "colorBackgroundBase100";
|
|
15
|
+
2: "colorBackgroundBase200";
|
|
16
|
+
3: "colorBackgroundBase300";
|
|
17
|
+
4: "colorBackgroundBase400";
|
|
18
|
+
5: "colorBackgroundBase500";
|
|
19
|
+
6: "colorBackgroundBase600";
|
|
20
|
+
7: "colorBackgroundBase700";
|
|
21
|
+
8: "colorBackgroundBase800";
|
|
22
|
+
9: "colorBackgroundBase900";
|
|
23
|
+
};
|
|
24
|
+
export declare const ViewBackgroundColorThemeTokenKey: {
|
|
25
|
+
1: "colorBackgroundBase100";
|
|
26
|
+
2: "colorBackgroundBase200";
|
|
27
|
+
3: "colorBackgroundBase300";
|
|
28
|
+
4: "colorBackgroundBase400";
|
|
29
|
+
5: "colorBackgroundBase500";
|
|
30
|
+
6: "colorBackgroundBase600";
|
|
31
|
+
7: "colorBackgroundBase700";
|
|
32
|
+
8: "colorBackgroundBase800";
|
|
33
|
+
9: "colorBackgroundBase900";
|
|
34
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { ViewBorderRadius, ViewBorderRadiusThemeStyleSheetKey, ViewBorderRadiusThemeTokenKey, } from './border';
|
|
1
|
+
export { ViewBorderRadius, ViewBorderRadiusThemeStyleSheetKey, ViewBorderRadiusThemeTokenKey, ViewBorderWidth, ViewBorderWidthThemeStyleSheetKey, ViewBorderWidthThemeTokenKey, } from './border';
|
|
2
|
+
export { ViewBackgroundColor, ViewBackgroundColorStyleSheetKey, ViewBackgroundColorThemeTokenKey, } from './color';
|
|
2
3
|
export { ViewAlignContent, ViewAlignItems, ViewAlignSelf, ViewFlexDirection, ViewJustifyContent, } from './flex';
|
|
3
4
|
export { ViewOverflow } from './overflow';
|
|
4
5
|
export { ViewPosition } from './position';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Position, PositionValue, Size, SizeValue } from '../../helpers';
|
|
2
|
+
import type { Color } from '../../types';
|
|
2
3
|
import type { FunctionComponent, PropsWithChildren } from 'react';
|
|
3
|
-
import type { ViewAlignContent, ViewAlignItems, ViewAlignSelf, ViewBorderRadius, ViewFlexDirection, ViewJustifyContent, ViewOverflow, ViewPosition, ViewSpacing, ViewTag } from './constants';
|
|
4
|
+
import type { ViewAlignContent, ViewAlignItems, ViewAlignSelf, ViewBackgroundColor, ViewBorderRadius, ViewBorderWidth, ViewFlexDirection, ViewJustifyContent, ViewOverflow, ViewPosition, ViewSpacing, ViewTag } from './constants';
|
|
4
5
|
export interface ViewProps extends PropsWithChildren {
|
|
5
6
|
/**
|
|
6
7
|
* Allows to control HTML tag to render.
|
|
@@ -166,12 +167,24 @@ export interface ViewProps extends PropsWithChildren {
|
|
|
166
167
|
* @default undefined
|
|
167
168
|
*/
|
|
168
169
|
maxHeight?: Size;
|
|
170
|
+
/**
|
|
171
|
+
* View border width.
|
|
172
|
+
* @see View.BorderWidth
|
|
173
|
+
* @default undefined
|
|
174
|
+
*/
|
|
175
|
+
borderWidth?: ViewBorderWidth;
|
|
169
176
|
/**
|
|
170
177
|
* View border radius.
|
|
171
178
|
* @see View.BorderRadius
|
|
172
179
|
* @default undefined
|
|
173
180
|
*/
|
|
174
181
|
borderRadius?: ViewBorderRadius;
|
|
182
|
+
/**
|
|
183
|
+
* View background color.
|
|
184
|
+
* @see View.BackgroundColor
|
|
185
|
+
* @default View.BackgroundColor.TRANSPARENT
|
|
186
|
+
*/
|
|
187
|
+
backgroundColor?: ViewBackgroundColor | Color;
|
|
175
188
|
}
|
|
176
189
|
export type ViewComponent = FunctionComponent<ViewProps> & {
|
|
177
190
|
Tag: Record<keyof typeof ViewTag, ViewTag>;
|
|
@@ -183,7 +196,9 @@ export type ViewComponent = FunctionComponent<ViewProps> & {
|
|
|
183
196
|
AlignSelf: Record<keyof typeof ViewAlignSelf, ViewAlignSelf>;
|
|
184
197
|
AlignContent: Record<keyof typeof ViewAlignContent, ViewAlignContent>;
|
|
185
198
|
Spacing: Record<keyof typeof ViewSpacing, ViewSpacing>;
|
|
199
|
+
BorderWidth: Record<keyof typeof ViewBorderWidth, ViewBorderWidth>;
|
|
186
200
|
BorderRadius: Record<keyof typeof ViewBorderRadius, ViewBorderRadius>;
|
|
201
|
+
BackgroundColor: Record<keyof typeof ViewBackgroundColor, ViewBackgroundColor>;
|
|
187
202
|
};
|
|
188
203
|
export type StyledViewProps = Pick<ViewProps, 'position' | 'overflow' | 'flexDirection' | 'justifyContent' | 'alignItems' | 'alignSelf' | 'alignContent'> & {
|
|
189
204
|
top?: PositionValue;
|
|
@@ -204,5 +219,7 @@ export type StyledViewProps = Pick<ViewProps, 'position' | 'overflow' | 'flexDir
|
|
|
204
219
|
minHeight?: SizeValue;
|
|
205
220
|
height?: SizeValue;
|
|
206
221
|
maxHeight?: SizeValue;
|
|
222
|
+
borderWidth?: number;
|
|
207
223
|
borderRadius?: `${number}px` | '50%';
|
|
224
|
+
backgroundColor: 'transparent' | Color;
|
|
208
225
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Dimension } from '../constants/dimension';
|
|
2
|
-
export { BORDER_RADIUS_BASE_LG, BORDER_RADIUS_BASE_MD, BORDER_RADIUS_BASE_SM, BORDER_RADIUS_BASE_XL, BORDER_RADIUS_BASE_XS, COLOR_FOREGROUND_BASE_100, COLOR_FOREGROUND_BASE_200, COLOR_FOREGROUND_BASE_300, COLOR_FOREGROUND_BASE_400, COLOR_FOREGROUND_BASE_500, COLOR_FOREGROUND_BASE_600, COLOR_FOREGROUND_BASE_700, COLOR_FOREGROUND_BASE_800, COLOR_FOREGROUND_BASE_900, COLOR_FOREGROUND_INVERSE_100, COLOR_FOREGROUND_INVERSE_200, COLOR_FOREGROUND_INVERSE_300, COLOR_FOREGROUND_INVERSE_400, COLOR_FOREGROUND_INVERSE_500, COLOR_FOREGROUND_INVERSE_600, COLOR_FOREGROUND_INVERSE_700, COLOR_FOREGROUND_INVERSE_800, COLOR_FOREGROUND_INVERSE_900, FONT_FAMILY_BASE, FONT_SIZE_BASE_LG, FONT_SIZE_BASE_MD, FONT_SIZE_BASE_SM, FONT_SIZE_BASE_X2L, FONT_SIZE_BASE_X2S, FONT_SIZE_BASE_X3L, FONT_SIZE_BASE_X4L, FONT_SIZE_BASE_X5L, FONT_SIZE_BASE_XL, FONT_SIZE_BASE_XS, FONT_WEIGHT_BASE_BLACK, FONT_WEIGHT_BASE_BOLD, FONT_WEIGHT_BASE_EXTRABOLD, FONT_WEIGHT_BASE_EXTRALIGHT, FONT_WEIGHT_BASE_LIGHT, FONT_WEIGHT_BASE_MEDIUM, FONT_WEIGHT_BASE_REGULAR, FONT_WEIGHT_BASE_SEMIBOLD, FONT_WEIGHT_BASE_THIN, LINE_HEIGHT_BASE_LOOSE, LINE_HEIGHT_BASE_NONE, LINE_HEIGHT_BASE_NORMAL, LINE_HEIGHT_BASE_RELAXED, LINE_HEIGHT_BASE_SNUG, LINE_HEIGHT_BASE_TIGHT, SPACING_BASE_LG, SPACING_BASE_MD, SPACING_BASE_SM, SPACING_BASE_X2L, SPACING_BASE_X2S, SPACING_BASE_X3L, SPACING_BASE_X4L, SPACING_BASE_X5L, SPACING_BASE_X6L, SPACING_BASE_X7L, SPACING_BASE_XL, SPACING_BASE_XS, } from '../constants/theme';
|
|
2
|
+
export { BORDER_RADIUS_BASE_LG, BORDER_RADIUS_BASE_MD, BORDER_RADIUS_BASE_SM, BORDER_RADIUS_BASE_XL, BORDER_RADIUS_BASE_XS, BORDER_WIDTH_BASE_LG, BORDER_WIDTH_BASE_MD, BORDER_WIDTH_BASE_SM, COLOR_BACKGROUND_BASE_100, COLOR_BACKGROUND_BASE_200, COLOR_BACKGROUND_BASE_300, COLOR_BACKGROUND_BASE_400, COLOR_BACKGROUND_BASE_500, COLOR_BACKGROUND_BASE_600, COLOR_BACKGROUND_BASE_700, COLOR_BACKGROUND_BASE_800, COLOR_BACKGROUND_BASE_900, COLOR_FOREGROUND_BASE_100, COLOR_FOREGROUND_BASE_200, COLOR_FOREGROUND_BASE_300, COLOR_FOREGROUND_BASE_400, COLOR_FOREGROUND_BASE_500, COLOR_FOREGROUND_BASE_600, COLOR_FOREGROUND_BASE_700, COLOR_FOREGROUND_BASE_800, COLOR_FOREGROUND_BASE_900, COLOR_FOREGROUND_INVERSE_100, COLOR_FOREGROUND_INVERSE_200, COLOR_FOREGROUND_INVERSE_300, COLOR_FOREGROUND_INVERSE_400, COLOR_FOREGROUND_INVERSE_500, COLOR_FOREGROUND_INVERSE_600, COLOR_FOREGROUND_INVERSE_700, COLOR_FOREGROUND_INVERSE_800, COLOR_FOREGROUND_INVERSE_900, FONT_FAMILY_BASE, FONT_SIZE_BASE_LG, FONT_SIZE_BASE_MD, FONT_SIZE_BASE_SM, FONT_SIZE_BASE_X2L, FONT_SIZE_BASE_X2S, FONT_SIZE_BASE_X3L, FONT_SIZE_BASE_X4L, FONT_SIZE_BASE_X5L, FONT_SIZE_BASE_XL, FONT_SIZE_BASE_XS, FONT_WEIGHT_BASE_BLACK, FONT_WEIGHT_BASE_BOLD, FONT_WEIGHT_BASE_EXTRABOLD, FONT_WEIGHT_BASE_EXTRALIGHT, FONT_WEIGHT_BASE_LIGHT, FONT_WEIGHT_BASE_MEDIUM, FONT_WEIGHT_BASE_REGULAR, FONT_WEIGHT_BASE_SEMIBOLD, FONT_WEIGHT_BASE_THIN, LINE_HEIGHT_BASE_LOOSE, LINE_HEIGHT_BASE_NONE, LINE_HEIGHT_BASE_NORMAL, LINE_HEIGHT_BASE_RELAXED, LINE_HEIGHT_BASE_SNUG, LINE_HEIGHT_BASE_TIGHT, SPACING_BASE_LG, SPACING_BASE_MD, SPACING_BASE_SM, SPACING_BASE_X2L, SPACING_BASE_X2S, SPACING_BASE_X3L, SPACING_BASE_X4L, SPACING_BASE_X5L, SPACING_BASE_X6L, SPACING_BASE_X7L, SPACING_BASE_XL, SPACING_BASE_XS, } from '../constants/theme';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export declare const BORDER_WIDTH_BASE_SM = 0.5;
|
|
2
|
+
export declare const BORDER_WIDTH_BASE_MD = 1;
|
|
3
|
+
export declare const BORDER_WIDTH_BASE_LG = 1.5;
|
|
1
4
|
export declare const BORDER_RADIUS_BASE_XS = 2;
|
|
2
5
|
export declare const BORDER_RADIUS_BASE_SM = 4;
|
|
3
6
|
export declare const BORDER_RADIUS_BASE_MD = 6;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare const COLOR_BACKGROUND_BASE_100 = "rgb(24,24,27)";
|
|
2
|
+
export declare const COLOR_BACKGROUND_BASE_200 = "rgb(39,39,42)";
|
|
3
|
+
export declare const COLOR_BACKGROUND_BASE_300 = "rgb(63,63,70)";
|
|
4
|
+
export declare const COLOR_BACKGROUND_BASE_400 = "rgb(82,82,92)";
|
|
5
|
+
export declare const COLOR_BACKGROUND_BASE_500 = "rgb(113,113,123)";
|
|
6
|
+
export declare const COLOR_BACKGROUND_BASE_600 = "rgb(159,159,169)";
|
|
7
|
+
export declare const COLOR_BACKGROUND_BASE_700 = "rgb(212,212,216)";
|
|
8
|
+
export declare const COLOR_BACKGROUND_BASE_800 = "rgb(228,228,231)";
|
|
9
|
+
export declare const COLOR_BACKGROUND_BASE_900 = "rgb(244,244,245)";
|
|
5
10
|
export declare const COLOR_FOREGROUND_BASE_100 = "rgb(244,244,245)";
|
|
6
11
|
export declare const COLOR_FOREGROUND_BASE_200 = "rgb(228,228,231)";
|
|
7
12
|
export declare const COLOR_FOREGROUND_BASE_300 = "rgb(212,212,216)";
|
|
@@ -11,10 +16,6 @@ export declare const COLOR_FOREGROUND_BASE_600 = "rgb(82,82,92)";
|
|
|
11
16
|
export declare const COLOR_FOREGROUND_BASE_700 = "rgb(63,63,70)";
|
|
12
17
|
export declare const COLOR_FOREGROUND_BASE_800 = "rgb(39,39,42)";
|
|
13
18
|
export declare const COLOR_FOREGROUND_BASE_900 = "rgb(24,24,27)";
|
|
14
|
-
/**
|
|
15
|
-
* Inverse foreground color constants.
|
|
16
|
-
* Use it for coloring inversed elements.
|
|
17
|
-
*/
|
|
18
19
|
export declare const COLOR_FOREGROUND_INVERSE_100 = "rgb(24,24,27)";
|
|
19
20
|
export declare const COLOR_FOREGROUND_INVERSE_200 = "rgb(39,39,42)";
|
|
20
21
|
export declare const COLOR_FOREGROUND_INVERSE_300 = "rgb(63,63,70)";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { BORDER_RADIUS_BASE_LG, BORDER_RADIUS_BASE_MD, BORDER_RADIUS_BASE_SM, BORDER_RADIUS_BASE_XL, BORDER_RADIUS_BASE_XS, } from './border';
|
|
2
|
-
export { COLOR_FOREGROUND_BASE_100, COLOR_FOREGROUND_BASE_200, COLOR_FOREGROUND_BASE_300, COLOR_FOREGROUND_BASE_400, COLOR_FOREGROUND_BASE_500, COLOR_FOREGROUND_BASE_600, COLOR_FOREGROUND_BASE_700, COLOR_FOREGROUND_BASE_800, COLOR_FOREGROUND_BASE_900, COLOR_FOREGROUND_INVERSE_100, COLOR_FOREGROUND_INVERSE_200, COLOR_FOREGROUND_INVERSE_300, COLOR_FOREGROUND_INVERSE_400, COLOR_FOREGROUND_INVERSE_500, COLOR_FOREGROUND_INVERSE_600, COLOR_FOREGROUND_INVERSE_700, COLOR_FOREGROUND_INVERSE_800, COLOR_FOREGROUND_INVERSE_900, } from './color';
|
|
1
|
+
export { BORDER_RADIUS_BASE_LG, BORDER_RADIUS_BASE_MD, BORDER_RADIUS_BASE_SM, BORDER_RADIUS_BASE_XL, BORDER_RADIUS_BASE_XS, BORDER_WIDTH_BASE_LG, BORDER_WIDTH_BASE_MD, BORDER_WIDTH_BASE_SM, } from './border';
|
|
2
|
+
export { COLOR_BACKGROUND_BASE_100, COLOR_BACKGROUND_BASE_200, COLOR_BACKGROUND_BASE_300, COLOR_BACKGROUND_BASE_400, COLOR_BACKGROUND_BASE_500, COLOR_BACKGROUND_BASE_600, COLOR_BACKGROUND_BASE_700, COLOR_BACKGROUND_BASE_800, COLOR_BACKGROUND_BASE_900, COLOR_FOREGROUND_BASE_100, COLOR_FOREGROUND_BASE_200, COLOR_FOREGROUND_BASE_300, COLOR_FOREGROUND_BASE_400, COLOR_FOREGROUND_BASE_500, COLOR_FOREGROUND_BASE_600, COLOR_FOREGROUND_BASE_700, COLOR_FOREGROUND_BASE_800, COLOR_FOREGROUND_BASE_900, COLOR_FOREGROUND_INVERSE_100, COLOR_FOREGROUND_INVERSE_200, COLOR_FOREGROUND_INVERSE_300, COLOR_FOREGROUND_INVERSE_400, COLOR_FOREGROUND_INVERSE_500, COLOR_FOREGROUND_INVERSE_600, COLOR_FOREGROUND_INVERSE_700, COLOR_FOREGROUND_INVERSE_800, COLOR_FOREGROUND_INVERSE_900, } from './color';
|
|
3
3
|
export { FONT_FAMILY_BASE, FONT_SIZE_BASE_LG, FONT_SIZE_BASE_MD, FONT_SIZE_BASE_SM, FONT_SIZE_BASE_X2L, FONT_SIZE_BASE_X2S, FONT_SIZE_BASE_X3L, FONT_SIZE_BASE_X4L, FONT_SIZE_BASE_X5L, FONT_SIZE_BASE_XL, FONT_SIZE_BASE_XS, FONT_WEIGHT_BASE_BLACK, FONT_WEIGHT_BASE_BOLD, FONT_WEIGHT_BASE_EXTRABOLD, FONT_WEIGHT_BASE_EXTRALIGHT, FONT_WEIGHT_BASE_LIGHT, FONT_WEIGHT_BASE_MEDIUM, FONT_WEIGHT_BASE_REGULAR, FONT_WEIGHT_BASE_SEMIBOLD, FONT_WEIGHT_BASE_THIN, } from './font';
|
|
4
4
|
export { SPACING_BASE_LG, SPACING_BASE_MD, SPACING_BASE_SM, SPACING_BASE_X2L, SPACING_BASE_X2S, SPACING_BASE_X3L, SPACING_BASE_X4L, SPACING_BASE_X5L, SPACING_BASE_X6L, SPACING_BASE_X7L, SPACING_BASE_XL, SPACING_BASE_XS, } from './spacing';
|
|
5
5
|
export { LINE_HEIGHT_BASE_LOOSE, LINE_HEIGHT_BASE_NONE, LINE_HEIGHT_BASE_NORMAL, LINE_HEIGHT_BASE_RELAXED, LINE_HEIGHT_BASE_SNUG, LINE_HEIGHT_BASE_TIGHT, } from './text';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Media, MediaContextProvider, useMediaContext } from '../contexts/media';
|
|
2
2
|
export type { MediaComponent, MediaContextProviderComponent, MediaContextValue, MediaProps, } from '../contexts/media';
|
|
3
3
|
export { ThemeContextProvider, useThemeContext } from '../contexts/theme';
|
|
4
|
-
export type {
|
|
4
|
+
export type { ThemeContextProviderComponent, ThemeContextProviderProps, ThemeContextValue, ThemeFontWeight, } from '../contexts/theme';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { ThemeContextProvider, useThemeContext } from './theme';
|
|
2
|
-
export type {
|
|
2
|
+
export type { ThemeContextProviderComponent, ThemeContextProviderProps, ThemeContextValue, ThemeFontWeight, } from './theme.types';
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
+
import type { Color } from '../../types';
|
|
1
2
|
import type { FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Theme RGB color type.
|
|
4
|
-
* Should be used to specify theme colors.
|
|
5
|
-
* Number instead of 0-255 union to avoid too complex union type.
|
|
6
|
-
*/
|
|
7
|
-
export type ThemeColorRGB = `rgb(${number},${number},${number})`;
|
|
8
3
|
/**
|
|
9
4
|
* Theme font weight type.
|
|
10
5
|
* Should be used to specify theme font weight.
|
|
@@ -17,106 +12,152 @@ export type ThemeFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 90
|
|
|
17
12
|
* This tokens can be also accesed via theme context outside.
|
|
18
13
|
*/
|
|
19
14
|
export interface ThemeContextValue {
|
|
15
|
+
/**
|
|
16
|
+
* Base background 100 color token.
|
|
17
|
+
* Least contrast color in the background palette.
|
|
18
|
+
*/
|
|
19
|
+
colorBackgroundBase100: Color;
|
|
20
|
+
/**
|
|
21
|
+
* Base background 200 color token.
|
|
22
|
+
* Almost non-contrasting base background color.
|
|
23
|
+
*/
|
|
24
|
+
colorBackgroundBase200: Color;
|
|
25
|
+
/**
|
|
26
|
+
* Base background 300 color token.
|
|
27
|
+
* Slightly more contrasting, useful for subtle depth or layering.
|
|
28
|
+
*/
|
|
29
|
+
colorBackgroundBase300: Color;
|
|
30
|
+
/**
|
|
31
|
+
* Base background 400 color token.
|
|
32
|
+
* Even less contrasting background color.
|
|
33
|
+
*/
|
|
34
|
+
colorBackgroundBase400: Color;
|
|
35
|
+
/**
|
|
36
|
+
* Base background 500 color token.
|
|
37
|
+
* When you need some layering between less contrast backgrounds.
|
|
38
|
+
*/
|
|
39
|
+
colorBackgroundBase500: Color;
|
|
40
|
+
/**
|
|
41
|
+
* Base background 600 color token.
|
|
42
|
+
* A kind of secondary base background color.
|
|
43
|
+
* It is also less contrast than default background.
|
|
44
|
+
*/
|
|
45
|
+
colorBackgroundBase600: Color;
|
|
46
|
+
/**
|
|
47
|
+
* Base background 700 color token.
|
|
48
|
+
* Less contrast than default background color shade.
|
|
49
|
+
*/
|
|
50
|
+
colorBackgroundBase700: Color;
|
|
51
|
+
/**
|
|
52
|
+
* Base background 800 color token.
|
|
53
|
+
* Supposed to be default interface background color.
|
|
54
|
+
*/
|
|
55
|
+
colorBackgroundBase800: Color;
|
|
56
|
+
/**
|
|
57
|
+
* Base background 900 color token.
|
|
58
|
+
* More contrast than default background color shade.
|
|
59
|
+
*/
|
|
60
|
+
colorBackgroundBase900: Color;
|
|
20
61
|
/**
|
|
21
62
|
* Base foreground 100 color token.
|
|
22
63
|
* The least contrasting color in the foreground palette.
|
|
23
64
|
* Intended for nearly invisible elements.
|
|
24
65
|
*/
|
|
25
|
-
colorForegroundBase100:
|
|
66
|
+
colorForegroundBase100: Color;
|
|
26
67
|
/**
|
|
27
68
|
* Base foreground 200 color token.
|
|
28
69
|
* Still meant to be barely visible.
|
|
29
70
|
* Can help create a subtle sense of hierarchy.
|
|
30
71
|
*/
|
|
31
|
-
colorForegroundBase200:
|
|
72
|
+
colorForegroundBase200: Color;
|
|
32
73
|
/**
|
|
33
74
|
* Base foreground 300 color token.
|
|
34
75
|
* Suitable for slightly readable text or elements.
|
|
35
76
|
*/
|
|
36
|
-
colorForegroundBase300:
|
|
77
|
+
colorForegroundBase300: Color;
|
|
37
78
|
/**
|
|
38
79
|
* Base foreground 400 color token.
|
|
39
80
|
* A secondary color for secondary elements.
|
|
40
81
|
* If a secondary element has multiple levels, this is for the lower one.
|
|
41
82
|
*/
|
|
42
|
-
colorForegroundBase400:
|
|
83
|
+
colorForegroundBase400: Color;
|
|
43
84
|
/**
|
|
44
85
|
* Base foreground 500 color token.
|
|
45
86
|
* Also useful for secondary elements on low-contrast backgrounds.
|
|
46
87
|
*/
|
|
47
|
-
colorForegroundBase500:
|
|
88
|
+
colorForegroundBase500: Color;
|
|
48
89
|
/**
|
|
49
90
|
* Base foreground 600 color token.
|
|
50
91
|
* Ideal for secondary elements and less prominent text.
|
|
51
92
|
*/
|
|
52
|
-
colorForegroundBase600:
|
|
93
|
+
colorForegroundBase600: Color;
|
|
53
94
|
/**
|
|
54
95
|
* Base foreground 700 color token.
|
|
55
96
|
* Used for default elements on higher contrast backgrounds.
|
|
56
97
|
* Also suitable for slightly subdued elements.
|
|
57
98
|
*/
|
|
58
|
-
colorForegroundBase700:
|
|
99
|
+
colorForegroundBase700: Color;
|
|
59
100
|
/**
|
|
60
101
|
* Base foreground 800 color token.
|
|
61
102
|
* The default value for the text component.
|
|
62
103
|
* Ideal for high-contrast text and key elements.
|
|
63
104
|
*/
|
|
64
|
-
colorForegroundBase800:
|
|
105
|
+
colorForegroundBase800: Color;
|
|
65
106
|
/**
|
|
66
107
|
* Base foreground 900 color token.
|
|
67
108
|
* Similar to 800 but better suited for lower-contrast backgrounds.
|
|
68
109
|
*/
|
|
69
|
-
colorForegroundBase900:
|
|
110
|
+
colorForegroundBase900: Color;
|
|
70
111
|
/**
|
|
71
112
|
* Inverse foreground 100 color token.
|
|
72
113
|
* The least contrasting color in the inverse foreground palette.
|
|
73
114
|
* Intended for nearly invisible elements on inverse backgrounds.
|
|
74
115
|
*/
|
|
75
|
-
colorForegroundInverse100:
|
|
116
|
+
colorForegroundInverse100: Color;
|
|
76
117
|
/**
|
|
77
118
|
* Inverse foreground 200 color token.
|
|
78
119
|
* Can help create a subtle sense of hierarchy on inverse backgrounds.
|
|
79
120
|
* Also almost invisible, but a bit more contrasting than 100.
|
|
80
121
|
*/
|
|
81
|
-
colorForegroundInverse200:
|
|
122
|
+
colorForegroundInverse200: Color;
|
|
82
123
|
/**
|
|
83
124
|
* Inverse foreground 300 color token.
|
|
84
125
|
* Suitable for slightly readable text or elements on inverse backgrounds.
|
|
85
126
|
*/
|
|
86
|
-
colorForegroundInverse300:
|
|
127
|
+
colorForegroundInverse300: Color;
|
|
87
128
|
/**
|
|
88
129
|
* Inverse foreground 400 color token.
|
|
89
130
|
* A secondary color for secondary elements on inverse backgrounds.
|
|
90
131
|
* If a secondary element has multiple levels, this is for the lower one.
|
|
91
132
|
*/
|
|
92
|
-
colorForegroundInverse400:
|
|
133
|
+
colorForegroundInverse400: Color;
|
|
93
134
|
/**
|
|
94
135
|
* Inverse foreground 500 color token.
|
|
95
136
|
* Also useful for secondary elements on low-contrast inverse backgrounds.
|
|
96
137
|
*/
|
|
97
|
-
colorForegroundInverse500:
|
|
138
|
+
colorForegroundInverse500: Color;
|
|
98
139
|
/**
|
|
99
140
|
* Inverse foreground 600 color token.
|
|
100
141
|
* Ideal for secondary elements on inverse backgrounds.
|
|
101
142
|
*/
|
|
102
|
-
colorForegroundInverse600:
|
|
143
|
+
colorForegroundInverse600: Color;
|
|
103
144
|
/**
|
|
104
145
|
* Inverse foreground 700 color token.
|
|
105
146
|
* Used for default elements on higher contrast inverse backgrounds.
|
|
106
147
|
* Also suitable for slightly subdued elements.
|
|
107
148
|
*/
|
|
108
|
-
colorForegroundInverse700:
|
|
149
|
+
colorForegroundInverse700: Color;
|
|
109
150
|
/**
|
|
110
151
|
* Inverse foreground 800 color token.
|
|
111
152
|
* Ideal for high-contrast text on inverse background.
|
|
112
153
|
*/
|
|
113
|
-
colorForegroundInverse800:
|
|
154
|
+
colorForegroundInverse800: Color;
|
|
114
155
|
/**
|
|
115
156
|
* Inverse foreground 900 color token.
|
|
116
157
|
* Similar to 800 but can be a bit more contrasting.
|
|
117
158
|
* Suitable when you need even more contrast on inverse background.
|
|
118
159
|
*/
|
|
119
|
-
colorForegroundInverse900:
|
|
160
|
+
colorForegroundInverse900: Color;
|
|
120
161
|
/**
|
|
121
162
|
* Base font family token.
|
|
122
163
|
* Supposed to be used by most components.
|
|
@@ -324,6 +365,21 @@ export interface ThemeContextValue {
|
|
|
324
365
|
* Used for large layout sections or when significant whitespace is needed.
|
|
325
366
|
*/
|
|
326
367
|
spacingBaseX7L: number;
|
|
368
|
+
/**
|
|
369
|
+
* Small base border width token.
|
|
370
|
+
* @default 0.5
|
|
371
|
+
*/
|
|
372
|
+
borderWidthBaseSM: number;
|
|
373
|
+
/**
|
|
374
|
+
* Medium base border width token.
|
|
375
|
+
* @default 1
|
|
376
|
+
*/
|
|
377
|
+
borderWidthBaseMD: number;
|
|
378
|
+
/**
|
|
379
|
+
* Large base border width token.
|
|
380
|
+
* @default 1.5
|
|
381
|
+
*/
|
|
382
|
+
borderWidthBaseLG: number;
|
|
327
383
|
/**
|
|
328
384
|
* Extra small border radius token.
|
|
329
385
|
* @default 2
|