creactive 0.0.35 → 0.0.37
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/components/text/constants/color.d.ts +17 -0
- package/build/{default/components → components}/text/constants/font.d.ts +6 -7
- package/build/{web/components → components}/text/constants/index.d.ts +2 -0
- package/build/components/text/constants/text.d.ts +21 -0
- package/build/{web/components → components}/text/constants/type.d.ts +1 -2
- package/build/components/text/text.types.d.ts +53 -0
- package/build/constants/index.d.ts +1 -0
- package/build/constants/theme/color.d.ts +13 -0
- package/build/{web/constants → constants}/theme/font.d.ts +1 -0
- package/build/constants/theme/index.d.ts +3 -0
- package/build/constants/theme/text.d.ts +12 -0
- package/build/contexts/index.d.ts +2 -0
- package/build/contexts/theme/index.d.ts +2 -0
- package/build/contexts/theme/theme.types.d.ts +219 -0
- package/build/hooks/index.d.ts +1 -0
- package/build/hooks/use-theme-style-sheet.d.ts +89 -0
- package/build/{web/index.d.ts → index.d.ts} +2 -1
- package/build/index.js +2 -0
- package/package.json +4 -6
- package/build/default/components/text/constants/index.d.ts +0 -3
- package/build/default/components/text/constants/type.d.ts +0 -20
- package/build/default/components/text/text.types.d.ts +0 -49
- package/build/default/constants/index.d.ts +0 -1
- package/build/default/constants/theme/font.d.ts +0 -36
- package/build/default/constants/theme/index.d.ts +0 -1
- package/build/default/contexts/index.d.ts +0 -2
- package/build/default/contexts/theme/index.d.ts +0 -2
- package/build/default/contexts/theme/theme.types.d.ts +0 -35
- package/build/default/index.d.ts +0 -11
- package/build/default/index.js +0 -2
- package/build/web/components/text/constants/font.d.ts +0 -32
- package/build/web/components/text/constants/role.d.ts +0 -12
- package/build/web/components/text/index.d.ts +0 -2
- package/build/web/components/text/text.d.ts +0 -2
- package/build/web/components/text/text.types.d.ts +0 -49
- package/build/web/constants/index.d.ts +0 -1
- package/build/web/constants/theme/index.d.ts +0 -1
- package/build/web/contexts/index.d.ts +0 -2
- package/build/web/contexts/theme/index.d.ts +0 -2
- package/build/web/contexts/theme/theme.d.ts +0 -3
- package/build/web/contexts/theme/theme.types.d.ts +0 -35
- package/build/web/helpers/style/index.d.ts +0 -2
- package/build/web/helpers/style/style.d.ts +0 -2
- package/build/web/helpers/style/style.types.d.ts +0 -10
- package/build/web/index.js +0 -2
- package/build/web/index.js.LICENSE.txt +0 -9
- /package/build/{default/components → components}/text/constants/role.d.ts +0 -0
- /package/build/{default/components → components}/text/index.d.ts +0 -0
- /package/build/{default/components → components}/text/text.d.ts +0 -0
- /package/build/{default/contexts → contexts}/theme/theme.d.ts +0 -0
- /package/build/{default/helpers → helpers}/style/index.d.ts +0 -0
- /package/build/{default/helpers → helpers}/style/style.d.ts +0 -0
- /package/build/{default/helpers → helpers}/style/style.types.d.ts +0 -0
- /package/build/{default/index.js.LICENSE.txt → index.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported text color constants.
|
|
3
|
+
* Part of theme colors, suitable for text coloring.
|
|
4
|
+
* Some extra constants like transparent for example are also included.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum TextColor {
|
|
7
|
+
TRANSPARENT = 0,
|
|
8
|
+
FOREGROUND_100 = 1,
|
|
9
|
+
FOREGROUND_200 = 2,
|
|
10
|
+
FOREGROUND_300 = 3,
|
|
11
|
+
FOREGROUND_400 = 4,
|
|
12
|
+
FOREGROUND_500 = 5,
|
|
13
|
+
FOREGROUND_600 = 6,
|
|
14
|
+
FOREGROUND_700 = 7,
|
|
15
|
+
FOREGROUND_800 = 8,
|
|
16
|
+
FOREGROUND_900 = 9
|
|
17
|
+
}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Supported text font weights enum.
|
|
2
|
+
* Supported by text component font weights enum.
|
|
3
3
|
* Should be used to control the weight of the text.
|
|
4
|
-
* This enum is not exported, use Text.FontWeight to access available types.
|
|
5
4
|
*/
|
|
6
5
|
export declare enum TextFontWeight {
|
|
7
6
|
THIN = 0,
|
|
8
7
|
EXTRA_LIGHT = 1,
|
|
9
8
|
LIGHT = 2,
|
|
10
9
|
REGULAR = 3,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
MEDIUM = 4,
|
|
11
|
+
SEMIBOLD = 5,
|
|
12
|
+
BOLD = 6,
|
|
13
|
+
EXTRA_BOLD = 7,
|
|
14
|
+
BLACK = 8
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* Supported text font sizes enum.
|
|
18
18
|
* Should be used to control the size of the text.
|
|
19
|
-
* This enum is not exported, use Text.FontSize to access available types.
|
|
20
19
|
*/
|
|
21
20
|
export declare enum TextFontSize {
|
|
22
21
|
X2S = 0,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text align enum supported by compoent.
|
|
3
|
+
* Allows to control text alignment if required.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum TextAlign {
|
|
6
|
+
LEFT = 0,
|
|
7
|
+
CENTER = 1,
|
|
8
|
+
RIGHT = 2
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Available text line height enum.
|
|
12
|
+
* Should be used to control the line height of the text.
|
|
13
|
+
*/
|
|
14
|
+
export declare enum TextLineHeight {
|
|
15
|
+
NONE = 0,
|
|
16
|
+
TIGHT = 1,
|
|
17
|
+
SNUG = 2,
|
|
18
|
+
NORMAL = 3,
|
|
19
|
+
RELAXED = 4,
|
|
20
|
+
LOOSE = 5
|
|
21
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Supported specific text types enum.
|
|
3
3
|
* Responsible for text appearance, accessibility and semantics.
|
|
4
|
-
* This enum is not exported, use Text.Type to access available types.
|
|
5
4
|
*/
|
|
6
5
|
export declare enum TextType {
|
|
7
6
|
H1 = 0,
|
|
@@ -15,6 +14,6 @@ export declare enum TextType {
|
|
|
15
14
|
/**
|
|
16
15
|
* Types, that are considered as heading types.
|
|
17
16
|
* We convert them into heading text role.
|
|
18
|
-
*
|
|
17
|
+
* This types comes with aria-level attribute.
|
|
19
18
|
*/
|
|
20
19
|
export declare const TEXT_TYPE_HEADING: TextType[];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
+
import type { TextAlign, TextColor, TextFontSize, TextFontWeight, TextLineHeight, TextType } from './constants';
|
|
3
|
+
export interface TextProps extends PropsWithChildren {
|
|
4
|
+
/**
|
|
5
|
+
* Specific text type if required.
|
|
6
|
+
* Affects appearance, accessibility and semantics.
|
|
7
|
+
* Allows to control HTML element, that will be to rendered.
|
|
8
|
+
* @default undefined - renders into DIV element
|
|
9
|
+
*/
|
|
10
|
+
type?: TextType;
|
|
11
|
+
/**
|
|
12
|
+
* Text component align control property.
|
|
13
|
+
* Inner text will be aligned according to this value.
|
|
14
|
+
* @default Text.Align.LEFT
|
|
15
|
+
*/
|
|
16
|
+
align?: TextAlign;
|
|
17
|
+
/**
|
|
18
|
+
* Font weight property.
|
|
19
|
+
* Changes font weight, depending on theme.
|
|
20
|
+
* Uses base font weight tokens for mapping.
|
|
21
|
+
* @default Text.FontWeight.REGULAR
|
|
22
|
+
*/
|
|
23
|
+
fontWeight?: TextFontWeight;
|
|
24
|
+
/**
|
|
25
|
+
* Specific text size if required.
|
|
26
|
+
* Will change text size, depending on theme.
|
|
27
|
+
* Uses base font size tokens for mapping.
|
|
28
|
+
* @default Text.FontSize.MD
|
|
29
|
+
*/
|
|
30
|
+
fontSize?: TextFontSize;
|
|
31
|
+
/**
|
|
32
|
+
* Text line height property.
|
|
33
|
+
* Depends on configured theme token.
|
|
34
|
+
* Calculates using base font size and base line height ratio.
|
|
35
|
+
* @default Text.LineHeight.NONE
|
|
36
|
+
*/
|
|
37
|
+
lineHeight?: TextLineHeight;
|
|
38
|
+
/**
|
|
39
|
+
* Specifying text color property.
|
|
40
|
+
* Allows to change color, depending on theme.
|
|
41
|
+
* Theme independent colors and values may be also available.
|
|
42
|
+
* @default Text.Color.FOREGROUND_800
|
|
43
|
+
*/
|
|
44
|
+
color?: TextColor;
|
|
45
|
+
}
|
|
46
|
+
export type TextComponent = FunctionComponent<TextProps> & {
|
|
47
|
+
Type: Record<keyof typeof TextType, TextType>;
|
|
48
|
+
Align: Record<keyof typeof TextAlign, TextAlign>;
|
|
49
|
+
FontWeight: Record<keyof typeof TextFontWeight, TextFontWeight>;
|
|
50
|
+
FontSize: Record<keyof typeof TextFontSize, TextFontSize>;
|
|
51
|
+
LineHeight: Record<keyof typeof TextLineHeight, TextLineHeight>;
|
|
52
|
+
Color: Record<keyof typeof TextColor, TextColor>;
|
|
53
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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, 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, } from '../constants/theme';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base foreground color constants.
|
|
3
|
+
* Use it for coloring text, icons and etc.
|
|
4
|
+
*/
|
|
5
|
+
export declare const COLOR_FOREGROUND_BASE_100 = "rgb(244,244,245)";
|
|
6
|
+
export declare const COLOR_FOREGROUND_BASE_200 = "rgb(228,228,231)";
|
|
7
|
+
export declare const COLOR_FOREGROUND_BASE_300 = "rgb(212,212,216)";
|
|
8
|
+
export declare const COLOR_FOREGROUND_BASE_400 = "rgb(159,159,169)";
|
|
9
|
+
export declare const COLOR_FOREGROUND_BASE_500 = "rgb(113,113,123)";
|
|
10
|
+
export declare const COLOR_FOREGROUND_BASE_600 = "rgb(82,82,92)";
|
|
11
|
+
export declare const COLOR_FOREGROUND_BASE_700 = "rgb(63,63,70)";
|
|
12
|
+
export declare const COLOR_FOREGROUND_BASE_800 = "rgb(39,39,42)";
|
|
13
|
+
export declare const COLOR_FOREGROUND_BASE_900 = "rgb(24,24,27)";
|
|
@@ -14,6 +14,7 @@ export declare const FONT_WEIGHT_BASE_THIN = 100;
|
|
|
14
14
|
export declare const FONT_WEIGHT_BASE_EXTRALIGHT = 200;
|
|
15
15
|
export declare const FONT_WEIGHT_BASE_LIGHT = 300;
|
|
16
16
|
export declare const FONT_WEIGHT_BASE_REGULAR = 400;
|
|
17
|
+
export declare const FONT_WEIGHT_BASE_MEDIUM = 500;
|
|
17
18
|
export declare const FONT_WEIGHT_BASE_SEMIBOLD = 600;
|
|
18
19
|
export declare const FONT_WEIGHT_BASE_BOLD = 700;
|
|
19
20
|
export declare const FONT_WEIGHT_BASE_EXTRABOLD = 800;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
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, } from './color';
|
|
2
|
+
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';
|
|
3
|
+
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';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base text line height constants.
|
|
3
|
+
* Supposed to be used for styling text.
|
|
4
|
+
* It seems like we wont need an extra set of line heights.
|
|
5
|
+
* But we named them as base just in case also..
|
|
6
|
+
*/
|
|
7
|
+
export declare const LINE_HEIGHT_BASE_NONE = 1;
|
|
8
|
+
export declare const LINE_HEIGHT_BASE_TIGHT = 1.25;
|
|
9
|
+
export declare const LINE_HEIGHT_BASE_SNUG = 1.375;
|
|
10
|
+
export declare const LINE_HEIGHT_BASE_NORMAL = 1.5;
|
|
11
|
+
export declare const LINE_HEIGHT_BASE_RELAXED = 1.625;
|
|
12
|
+
export declare const LINE_HEIGHT_BASE_LOOSE = 2;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
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
|
+
/**
|
|
9
|
+
* Theme font weight type.
|
|
10
|
+
* Should be used to specify theme font weight.
|
|
11
|
+
*/
|
|
12
|
+
export type ThemeFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
13
|
+
/**
|
|
14
|
+
* Theme context value interface.
|
|
15
|
+
* Contains all theme tokens you may need.
|
|
16
|
+
* This tokens are used inside components for styling.
|
|
17
|
+
* This tokens can be also accesed via theme context outside.
|
|
18
|
+
*/
|
|
19
|
+
export interface ThemeContextValue {
|
|
20
|
+
/**
|
|
21
|
+
* Base foreground 100 color token.
|
|
22
|
+
* The least contrast color in the foreground palette.
|
|
23
|
+
* You are supposed to use it for almost invisible elements.
|
|
24
|
+
*/
|
|
25
|
+
colorForegroundBase100: ThemeColorRGB;
|
|
26
|
+
/**
|
|
27
|
+
* Base foreground 200 color token.
|
|
28
|
+
* Still supposed to be almost invisible.
|
|
29
|
+
* Can be used to create som ierarchy illusion maybe.
|
|
30
|
+
*/
|
|
31
|
+
colorForegroundBase200: ThemeColorRGB;
|
|
32
|
+
/**
|
|
33
|
+
* Base foreground 300 color token.
|
|
34
|
+
* For slightly readable text or elements.
|
|
35
|
+
*/
|
|
36
|
+
colorForegroundBase300: ThemeColorRGB;
|
|
37
|
+
/**
|
|
38
|
+
* Base foreground 400 color token.
|
|
39
|
+
* A kind of secondary color for secondary elements.
|
|
40
|
+
* If your secondary element has two levels this color is for the second one.
|
|
41
|
+
*/
|
|
42
|
+
colorForegroundBase400: ThemeColorRGB;
|
|
43
|
+
/**
|
|
44
|
+
* Base foreground 500 color token.
|
|
45
|
+
* Also good for secondary elements on less contrast background.
|
|
46
|
+
*/
|
|
47
|
+
colorForegroundBase500: ThemeColorRGB;
|
|
48
|
+
/**
|
|
49
|
+
* Base foreground 600 color token.
|
|
50
|
+
* Ideal for secondary elements and less important text.
|
|
51
|
+
*/
|
|
52
|
+
colorForegroundBase600: ThemeColorRGB;
|
|
53
|
+
/**
|
|
54
|
+
* Base foreground 700 color token.
|
|
55
|
+
* For default elements, placed on more contrast background.
|
|
56
|
+
* Is also suitable for just a little bit less contrast elements.
|
|
57
|
+
*/
|
|
58
|
+
colorForegroundBase700: ThemeColorRGB;
|
|
59
|
+
/**
|
|
60
|
+
* Base foreground 800 color token.
|
|
61
|
+
* Used as default value for text component.
|
|
62
|
+
* Ideal for high-contrast text and key elements.
|
|
63
|
+
*/
|
|
64
|
+
colorForegroundBase800: ThemeColorRGB;
|
|
65
|
+
/**
|
|
66
|
+
* Base foreground 900 color token.
|
|
67
|
+
* Almost the same sense as 800, but for less contrast backgrounds.
|
|
68
|
+
*/
|
|
69
|
+
colorForegroundBase900: ThemeColorRGB;
|
|
70
|
+
/**
|
|
71
|
+
* Base font family token.
|
|
72
|
+
* Supposed to be used by most components.
|
|
73
|
+
* If you don't known what font family to use - use this one.
|
|
74
|
+
*/
|
|
75
|
+
fontFamilyBase: string;
|
|
76
|
+
/**
|
|
77
|
+
* Base thin font weight token.
|
|
78
|
+
* Ideal for very delicate and decorative, large, elegant hero text.
|
|
79
|
+
*/
|
|
80
|
+
fontWeightBaseThin: ThemeFontWeight;
|
|
81
|
+
/**
|
|
82
|
+
* Base extra-light font weight token.
|
|
83
|
+
* Use for large, airy headings or subtle interface elements.
|
|
84
|
+
* Slightly more readable than extra-thin, but still decorative.
|
|
85
|
+
*/
|
|
86
|
+
fontWeightBaseExtraLight: ThemeFontWeight;
|
|
87
|
+
/**
|
|
88
|
+
* Base light font weight token.
|
|
89
|
+
* Suitable for subheadings, muted captions, and soft labels.
|
|
90
|
+
*/
|
|
91
|
+
fontWeightBaseLight: ThemeFontWeight;
|
|
92
|
+
/**
|
|
93
|
+
* Base regular font weight token.
|
|
94
|
+
* For the most common text elements in your interface.
|
|
95
|
+
* When unsure about font weight, this is the default option.
|
|
96
|
+
*/
|
|
97
|
+
fontWeightBaseRegular: ThemeFontWeight;
|
|
98
|
+
/**
|
|
99
|
+
* Base medium font weight token.
|
|
100
|
+
* Suitable for labels, buttons, and small subheadings.
|
|
101
|
+
* Slightly emphasized, providing better readability.
|
|
102
|
+
*/
|
|
103
|
+
fontWeightBaseMedium: ThemeFontWeight;
|
|
104
|
+
/**
|
|
105
|
+
* Base semi-bold font weight token.
|
|
106
|
+
* Provides stronger emphasis without being overwhelming.
|
|
107
|
+
* Ideal for section headers, emphasized text, and card titles.
|
|
108
|
+
*/
|
|
109
|
+
fontWeightBaseSemibold: ThemeFontWeight;
|
|
110
|
+
/**
|
|
111
|
+
* Base bold font weight token.
|
|
112
|
+
* For high emphasis on important elements.
|
|
113
|
+
* Use for main headings and strong call-to-action buttons.
|
|
114
|
+
*/
|
|
115
|
+
fontWeightBaseBold: ThemeFontWeight;
|
|
116
|
+
/**
|
|
117
|
+
* Extra-bold font weight token.
|
|
118
|
+
* Perfect for promo banners and large impactful headings.
|
|
119
|
+
*/
|
|
120
|
+
fontWeightBaseExtraBold: ThemeFontWeight;
|
|
121
|
+
/**
|
|
122
|
+
* Base black font weight token.
|
|
123
|
+
* Extreme emphasis for rare, dramatic cases.
|
|
124
|
+
* Great for headlines in posters and highly attention-grabbing elements.
|
|
125
|
+
*/
|
|
126
|
+
fontWeightBaseBlack: ThemeFontWeight;
|
|
127
|
+
/**
|
|
128
|
+
* Base 2 times extra-small font size token.
|
|
129
|
+
* Use this size for tiny text elements like captions.
|
|
130
|
+
* It represents the smallest readable text in your interface.
|
|
131
|
+
*/
|
|
132
|
+
fontSizeBaseX2S: number;
|
|
133
|
+
/**
|
|
134
|
+
* Base extra-small font size token.
|
|
135
|
+
* Suitable for subtitles or the smallest readable text, for example.
|
|
136
|
+
*/
|
|
137
|
+
fontSizeBaseXS: number;
|
|
138
|
+
/**
|
|
139
|
+
* Base small font size token.
|
|
140
|
+
* Can be used for smaller labels or captions among medium text.
|
|
141
|
+
* Also suitable for titles in smaller 2x small text.
|
|
142
|
+
*/
|
|
143
|
+
fontSizeBaseSM: number;
|
|
144
|
+
/**
|
|
145
|
+
* Base medium font size token.
|
|
146
|
+
* Intended for most text elements.
|
|
147
|
+
* If unsure about which font size to use, this is the default option.
|
|
148
|
+
*/
|
|
149
|
+
fontSizeBaseMD: number;
|
|
150
|
+
/**
|
|
151
|
+
* Base large font size token.
|
|
152
|
+
* Suitable for fourth-level page titles.
|
|
153
|
+
* Can also be used for larger labels or captions among medium text.
|
|
154
|
+
*/
|
|
155
|
+
fontSizeBaseLG: number;
|
|
156
|
+
/**
|
|
157
|
+
* Base extra-large font size token.
|
|
158
|
+
* Ideal for third-level page titles.
|
|
159
|
+
* Can also be used for larger labels or captions within medium text.
|
|
160
|
+
*/
|
|
161
|
+
fontSizeBaseXL: number;
|
|
162
|
+
/**
|
|
163
|
+
* Base 2 times extra-large font size token.
|
|
164
|
+
* Typically used for second-level page titles.
|
|
165
|
+
*/
|
|
166
|
+
fontSizeBaseX2L: number;
|
|
167
|
+
/**
|
|
168
|
+
* Base 3 times extra-large font size token.
|
|
169
|
+
* Designed for first-level page titles.
|
|
170
|
+
* Can also be used for labels or captions within huge text.
|
|
171
|
+
*/
|
|
172
|
+
fontSizeBaseX3L: number;
|
|
173
|
+
/**
|
|
174
|
+
* Base 4 times extra-large font size token.
|
|
175
|
+
* Ideal for huge text labels and captions.
|
|
176
|
+
*/
|
|
177
|
+
fontSizeBaseX4L: number;
|
|
178
|
+
/**
|
|
179
|
+
* Base 5 times extra-large font size token.
|
|
180
|
+
* Use this size for enormous text elements like hero titles.
|
|
181
|
+
* It should be the largest font size in your interface.
|
|
182
|
+
*/
|
|
183
|
+
fontSizeBaseX5L: number;
|
|
184
|
+
/**
|
|
185
|
+
* Base none line height token.
|
|
186
|
+
* Use for elements with no line height, like buttons, badges, and tags.
|
|
187
|
+
*/
|
|
188
|
+
lineHeightBaseNone: number;
|
|
189
|
+
/**
|
|
190
|
+
* Base tight line height token.
|
|
191
|
+
* For compact text elements with closely packed lines.
|
|
192
|
+
*/
|
|
193
|
+
lineHeightBaseTight: number;
|
|
194
|
+
/**
|
|
195
|
+
* Base snug line height token.
|
|
196
|
+
* Ideal for compact text that still needs some breathing room.
|
|
197
|
+
*/
|
|
198
|
+
lineHeightBaseSnug: number;
|
|
199
|
+
/**
|
|
200
|
+
* Base normal line height token.
|
|
201
|
+
* Standard line height for most text elements.
|
|
202
|
+
* Use for general content in your interface.
|
|
203
|
+
*/
|
|
204
|
+
lineHeightBaseNormal: number;
|
|
205
|
+
/**
|
|
206
|
+
* Base relaxed line height token.
|
|
207
|
+
* Provides more space between lines.
|
|
208
|
+
* Ideal for body text or large blocks of content.
|
|
209
|
+
*/
|
|
210
|
+
lineHeightBaseRelaxed: number;
|
|
211
|
+
/**
|
|
212
|
+
* Base loose line height token.
|
|
213
|
+
* Very spacious and airy, great for large headings.
|
|
214
|
+
* Suitable for text elements that need a lot of breathing room.
|
|
215
|
+
*/
|
|
216
|
+
lineHeightBaseLoose: number;
|
|
217
|
+
}
|
|
218
|
+
export type ThemeContextProviderProps = PropsWithChildren<Partial<ThemeContextValue>>;
|
|
219
|
+
export type ThemeContextProviderComponent = FunctionComponent<ThemeContextProviderProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useThemeStyleSheet } from './use-theme-style-sheet';
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export declare const useThemeStyleSheet: () => {
|
|
2
|
+
colorForegroundBase100: {
|
|
3
|
+
color: `rgb(${number},${number},${number})`;
|
|
4
|
+
};
|
|
5
|
+
colorForegroundBase200: {
|
|
6
|
+
color: `rgb(${number},${number},${number})`;
|
|
7
|
+
};
|
|
8
|
+
colorForegroundBase300: {
|
|
9
|
+
color: `rgb(${number},${number},${number})`;
|
|
10
|
+
};
|
|
11
|
+
colorForegroundBase400: {
|
|
12
|
+
color: `rgb(${number},${number},${number})`;
|
|
13
|
+
};
|
|
14
|
+
colorForegroundBase500: {
|
|
15
|
+
color: `rgb(${number},${number},${number})`;
|
|
16
|
+
};
|
|
17
|
+
colorForegroundBase600: {
|
|
18
|
+
color: `rgb(${number},${number},${number})`;
|
|
19
|
+
};
|
|
20
|
+
colorForegroundBase700: {
|
|
21
|
+
color: `rgb(${number},${number},${number})`;
|
|
22
|
+
};
|
|
23
|
+
colorForegroundBase800: {
|
|
24
|
+
color: `rgb(${number},${number},${number})`;
|
|
25
|
+
};
|
|
26
|
+
colorForegroundBase900: {
|
|
27
|
+
color: `rgb(${number},${number},${number})`;
|
|
28
|
+
};
|
|
29
|
+
fontFamilyBase: {
|
|
30
|
+
fontFamily: string;
|
|
31
|
+
};
|
|
32
|
+
fontWeightBaseThin: {
|
|
33
|
+
fontWeight: import("../contexts/theme").ThemeFontWeight;
|
|
34
|
+
};
|
|
35
|
+
fontWeightBaseExtraLight: {
|
|
36
|
+
fontWeight: import("../contexts/theme").ThemeFontWeight;
|
|
37
|
+
};
|
|
38
|
+
fontWeightBaseLight: {
|
|
39
|
+
fontWeight: import("../contexts/theme").ThemeFontWeight;
|
|
40
|
+
};
|
|
41
|
+
fontWeightBaseRegular: {
|
|
42
|
+
fontWeight: import("../contexts/theme").ThemeFontWeight;
|
|
43
|
+
};
|
|
44
|
+
fontWeightBaseMedium: {
|
|
45
|
+
fontWeight: import("../contexts/theme").ThemeFontWeight;
|
|
46
|
+
};
|
|
47
|
+
fontWeightBaseSemibold: {
|
|
48
|
+
fontWeight: import("../contexts/theme").ThemeFontWeight;
|
|
49
|
+
};
|
|
50
|
+
fontWeightBaseBold: {
|
|
51
|
+
fontWeight: import("../contexts/theme").ThemeFontWeight;
|
|
52
|
+
};
|
|
53
|
+
fontWeightBaseExtraBold: {
|
|
54
|
+
fontWeight: import("../contexts/theme").ThemeFontWeight;
|
|
55
|
+
};
|
|
56
|
+
fontWeightBaseBlack: {
|
|
57
|
+
fontWeight: import("../contexts/theme").ThemeFontWeight;
|
|
58
|
+
};
|
|
59
|
+
fontSizeBaseX2S: {
|
|
60
|
+
fontSize: number;
|
|
61
|
+
};
|
|
62
|
+
fontSizeBaseXS: {
|
|
63
|
+
fontSize: number;
|
|
64
|
+
};
|
|
65
|
+
fontSizeBaseSM: {
|
|
66
|
+
fontSize: number;
|
|
67
|
+
};
|
|
68
|
+
fontSizeBaseMD: {
|
|
69
|
+
fontSize: number;
|
|
70
|
+
};
|
|
71
|
+
fontSizeBaseLG: {
|
|
72
|
+
fontSize: number;
|
|
73
|
+
};
|
|
74
|
+
fontSizeBaseXL: {
|
|
75
|
+
fontSize: number;
|
|
76
|
+
};
|
|
77
|
+
fontSizeBaseX2L: {
|
|
78
|
+
fontSize: number;
|
|
79
|
+
};
|
|
80
|
+
fontSizeBaseX3L: {
|
|
81
|
+
fontSize: number;
|
|
82
|
+
};
|
|
83
|
+
fontSizeBaseX4L: {
|
|
84
|
+
fontSize: number;
|
|
85
|
+
};
|
|
86
|
+
fontSizeBaseX5L: {
|
|
87
|
+
fontSize: number;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
@@ -6,6 +6,7 @@ export { Text } from './components/text';
|
|
|
6
6
|
export type { TextComponent, TextProps } from './components/text';
|
|
7
7
|
export { FONT_FAMILY_BASE } from './constants/theme';
|
|
8
8
|
export { ThemeContextProvider, useThemeContext } from './contexts/theme';
|
|
9
|
-
export type { ThemeContextProviderComponent, ThemeContextProviderProps, ThemeContextValue, ThemeFontWeight, } from './contexts/theme';
|
|
9
|
+
export type { ThemeColorRGB, ThemeContextProviderComponent, ThemeContextProviderProps, ThemeContextValue, ThemeFontWeight, } from './contexts/theme';
|
|
10
10
|
export { renderStyle } from './helpers/style';
|
|
11
11
|
export type { RenderStyleHelper } from './helpers/style';
|
|
12
|
+
export { useThemeStyleSheet } from './hooks/use-theme-style-sheet';
|