creactive 0.0.133 → 0.0.134
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 +3 -3
- package/build/components/gradient/gradient.types.d.ts +1 -1
- package/build/contexts/media/components/wrapper/wrapper.types.d.ts +1 -2
- package/package.json +3 -2
- package/build/components/text/constants/color.d.ts +0 -64
- package/build/components/text/constants/font.d.ts +0 -58
- package/build/components/text/constants/index.d.ts +0 -4
- package/build/components/text/constants/tag.d.ts +0 -24
- package/build/components/text/constants/text.d.ts +0 -37
- package/build/components/text/index.d.ts +0 -3
- package/build/components/text/text.types.d.ts +0 -92
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "creactive",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.134",
|
|
4
4
|
"main": "build/default.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"build/**"
|
|
@@ -54,8 +54,9 @@
|
|
|
54
54
|
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
|
55
55
|
"@typescript-eslint/parser": "^8.15.0",
|
|
56
56
|
"babel-loader": "^8.4.1",
|
|
57
|
-
"eslint-config-
|
|
57
|
+
"eslint-config-expo": "^8.0.1",
|
|
58
58
|
"eslint-plugin-jest": "^28.9.0",
|
|
59
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
59
60
|
"expo": "^52.0.36",
|
|
60
61
|
"jest": "^29.2.1",
|
|
61
62
|
"jest-expo": "^52.0.5",
|
|
@@ -1,64 +0,0 @@
|
|
|
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
|
-
BASE_100 = 1,
|
|
9
|
-
BASE_200 = 2,
|
|
10
|
-
BASE_300 = 3,
|
|
11
|
-
BASE_400 = 4,
|
|
12
|
-
BASE_500 = 5,
|
|
13
|
-
BASE_600 = 6,
|
|
14
|
-
BASE_700 = 7,
|
|
15
|
-
BASE_800 = 8,
|
|
16
|
-
BASE_900 = 9,
|
|
17
|
-
INVERSE_100 = 10,
|
|
18
|
-
INVERSE_200 = 11,
|
|
19
|
-
INVERSE_300 = 12,
|
|
20
|
-
INVERSE_400 = 13,
|
|
21
|
-
INVERSE_500 = 14,
|
|
22
|
-
INVERSE_600 = 15,
|
|
23
|
-
INVERSE_700 = 16,
|
|
24
|
-
INVERSE_800 = 17,
|
|
25
|
-
INVERSE_900 = 18,
|
|
26
|
-
FAILURE_100 = 19,
|
|
27
|
-
FAILURE_200 = 20,
|
|
28
|
-
FAILURE_300 = 21,
|
|
29
|
-
FAILURE_400 = 22,
|
|
30
|
-
FAILURE_500 = 23,
|
|
31
|
-
FAILURE_600 = 24,
|
|
32
|
-
FAILURE_700 = 25,
|
|
33
|
-
FAILURE_800 = 26,
|
|
34
|
-
FAILURE_900 = 27
|
|
35
|
-
}
|
|
36
|
-
export declare const TEXT_COLOR_THEME_KEY: {
|
|
37
|
-
1: "colorForegroundBase100";
|
|
38
|
-
2: "colorForegroundBase200";
|
|
39
|
-
3: "colorForegroundBase300";
|
|
40
|
-
4: "colorForegroundBase400";
|
|
41
|
-
5: "colorForegroundBase500";
|
|
42
|
-
6: "colorForegroundBase600";
|
|
43
|
-
7: "colorForegroundBase700";
|
|
44
|
-
8: "colorForegroundBase800";
|
|
45
|
-
9: "colorForegroundBase900";
|
|
46
|
-
10: "colorForegroundInverse100";
|
|
47
|
-
11: "colorForegroundInverse200";
|
|
48
|
-
12: "colorForegroundInverse300";
|
|
49
|
-
13: "colorForegroundInverse400";
|
|
50
|
-
14: "colorForegroundInverse500";
|
|
51
|
-
15: "colorForegroundInverse600";
|
|
52
|
-
16: "colorForegroundInverse700";
|
|
53
|
-
17: "colorForegroundInverse800";
|
|
54
|
-
18: "colorForegroundInverse900";
|
|
55
|
-
19: "colorForegroundFailure100";
|
|
56
|
-
20: "colorForegroundFailure200";
|
|
57
|
-
21: "colorForegroundFailure300";
|
|
58
|
-
22: "colorForegroundFailure400";
|
|
59
|
-
23: "colorForegroundFailure500";
|
|
60
|
-
24: "colorForegroundFailure600";
|
|
61
|
-
25: "colorForegroundFailure700";
|
|
62
|
-
26: "colorForegroundFailure800";
|
|
63
|
-
27: "colorForegroundFailure900";
|
|
64
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export declare enum TextFontFamily {
|
|
2
|
-
BASE = 0,
|
|
3
|
-
TYPOGRAPHIC = 1
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Supported by text component font weights enum.
|
|
7
|
-
* Should be used to control the weight of the text.
|
|
8
|
-
*/
|
|
9
|
-
export declare enum TextFontWeight {
|
|
10
|
-
THIN = 0,
|
|
11
|
-
EXTRA_LIGHT = 1,
|
|
12
|
-
LIGHT = 2,
|
|
13
|
-
REGULAR = 3,
|
|
14
|
-
MEDIUM = 4,
|
|
15
|
-
SEMIBOLD = 5,
|
|
16
|
-
BOLD = 6,
|
|
17
|
-
EXTRA_BOLD = 7,
|
|
18
|
-
BLACK = 8
|
|
19
|
-
}
|
|
20
|
-
export declare const TEXT_THEME_FONT_WEIGHT_KEY: {
|
|
21
|
-
0: "fontWeightBaseThin";
|
|
22
|
-
1: "fontWeightBaseExtraLight";
|
|
23
|
-
2: "fontWeightBaseLight";
|
|
24
|
-
3: "fontWeightBaseRegular";
|
|
25
|
-
4: "fontWeightBaseMedium";
|
|
26
|
-
5: "fontWeightBaseSemiBold";
|
|
27
|
-
6: "fontWeightBaseBold";
|
|
28
|
-
7: "fontWeightBaseExtraBold";
|
|
29
|
-
8: "fontWeightBaseBlack";
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Supported text font sizes enum.
|
|
33
|
-
* Should be used to control the size of the text.
|
|
34
|
-
*/
|
|
35
|
-
export declare enum TextFontSize {
|
|
36
|
-
X2S = 0,
|
|
37
|
-
XS = 1,
|
|
38
|
-
SM = 2,
|
|
39
|
-
MD = 3,
|
|
40
|
-
LG = 4,
|
|
41
|
-
XL = 5,
|
|
42
|
-
X2L = 6,
|
|
43
|
-
X3L = 7,
|
|
44
|
-
X4L = 8,
|
|
45
|
-
X5L = 9
|
|
46
|
-
}
|
|
47
|
-
export declare const TEXT_THEME_FONT_SIZE_KEY: {
|
|
48
|
-
0: "fontSizeBaseX2S";
|
|
49
|
-
1: "fontSizeBaseXS";
|
|
50
|
-
2: "fontSizeBaseSM";
|
|
51
|
-
3: "fontSizeBaseMD";
|
|
52
|
-
4: "fontSizeBaseLG";
|
|
53
|
-
5: "fontSizeBaseXL";
|
|
54
|
-
6: "fontSizeBaseX2L";
|
|
55
|
-
7: "fontSizeBaseX3L";
|
|
56
|
-
8: "fontSizeBaseX4L";
|
|
57
|
-
9: "fontSizeBaseX5L";
|
|
58
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { TEXT_COLOR_THEME_KEY, TextColor } from './color';
|
|
2
|
-
export { TEXT_THEME_FONT_SIZE_KEY, TEXT_THEME_FONT_WEIGHT_KEY, TextFontFamily, TextFontSize, TextFontWeight, } from './font';
|
|
3
|
-
export { TEXT_HTML_TAG, TextTag } from './tag';
|
|
4
|
-
export { TEXT_THEME_LINE_HEIGHT_KEY, TextAlign, TextDecoration, TextLineHeight, } from './text';
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Supported by view component tags.
|
|
3
|
-
* All possible layout tags should be listed here.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum TextTag {
|
|
6
|
-
H1 = 0,
|
|
7
|
-
H2 = 1,
|
|
8
|
-
H3 = 2,
|
|
9
|
-
H4 = 3,
|
|
10
|
-
H5 = 4,
|
|
11
|
-
H6 = 5,
|
|
12
|
-
P = 6,
|
|
13
|
-
SPAN = 7
|
|
14
|
-
}
|
|
15
|
-
export declare const TEXT_HTML_TAG: {
|
|
16
|
-
0: "h1";
|
|
17
|
-
1: "h2";
|
|
18
|
-
2: "h3";
|
|
19
|
-
3: "h4";
|
|
20
|
-
4: "h5";
|
|
21
|
-
5: "h6";
|
|
22
|
-
6: "p";
|
|
23
|
-
7: "span";
|
|
24
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
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 color enum.
|
|
12
|
-
* Should be used to control the color of the text.
|
|
13
|
-
*/
|
|
14
|
-
export declare enum TextDecoration {
|
|
15
|
-
NONE = 0,
|
|
16
|
-
UNDERLINE = 1
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Available text line height enum.
|
|
20
|
-
* Should be used to control the line height of the text.
|
|
21
|
-
*/
|
|
22
|
-
export declare enum TextLineHeight {
|
|
23
|
-
NONE = 0,
|
|
24
|
-
TIGHT = 1,
|
|
25
|
-
SNUG = 2,
|
|
26
|
-
NORMAL = 3,
|
|
27
|
-
RELAXED = 4,
|
|
28
|
-
LOOSE = 5
|
|
29
|
-
}
|
|
30
|
-
export declare const TEXT_THEME_LINE_HEIGHT_KEY: {
|
|
31
|
-
0: "lineHeightBaseNone";
|
|
32
|
-
1: "lineHeightBaseTight";
|
|
33
|
-
2: "lineHeightBaseSnug";
|
|
34
|
-
3: "lineHeightBaseNormal";
|
|
35
|
-
4: "lineHeightBaseRelaxed";
|
|
36
|
-
5: "lineHeightBaseLoose";
|
|
37
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import type { Fraction } from '../../helpers';
|
|
2
|
-
import type { Color, FontWeight } from '../../types';
|
|
3
|
-
import type { ForwardRefExoticComponent, PropsWithChildren, PropsWithoutRef, RefAttributes } from 'react';
|
|
4
|
-
import type { TextAlign, TextColor, TextDecoration, TextFontFamily, TextFontSize, TextFontWeight, TextLineHeight, TextTag } from './constants';
|
|
5
|
-
export type TextMeasureCallback = (x: number, y: number, width: number, height: number) => void;
|
|
6
|
-
/**
|
|
7
|
-
* Text component reference object.
|
|
8
|
-
* Allows to access text measurement method.
|
|
9
|
-
*/
|
|
10
|
-
export interface TextRef {
|
|
11
|
-
measure(callback: TextMeasureCallback): void;
|
|
12
|
-
}
|
|
13
|
-
export interface TextProps extends PropsWithChildren {
|
|
14
|
-
/**
|
|
15
|
-
* Allows to control HTML tag to render.
|
|
16
|
-
* Makes no sense on native platforms.
|
|
17
|
-
* @see Text.Tag
|
|
18
|
-
* @default undefined - renders into DIV element
|
|
19
|
-
*/
|
|
20
|
-
tag?: TextTag;
|
|
21
|
-
/**
|
|
22
|
-
* Inner text will be aligned according to this value.
|
|
23
|
-
* @see Text.Align
|
|
24
|
-
* @default Text.Align.LEFT
|
|
25
|
-
*/
|
|
26
|
-
align?: TextAlign;
|
|
27
|
-
/**
|
|
28
|
-
* Text decoration.
|
|
29
|
-
* @see Text.Decoration
|
|
30
|
-
* @default Text.Decoration.NONE
|
|
31
|
-
*/
|
|
32
|
-
decoration?: TextDecoration;
|
|
33
|
-
/**
|
|
34
|
-
* Themed font family.
|
|
35
|
-
* @see Text.FontFamily
|
|
36
|
-
* @default Text.FontFamily.BASE
|
|
37
|
-
*/
|
|
38
|
-
fontFamily?: TextFontFamily;
|
|
39
|
-
/**
|
|
40
|
-
* Themed font weight.
|
|
41
|
-
* @see Text.FontWeight
|
|
42
|
-
* @default Text.FontWeight.REGULAR
|
|
43
|
-
*/
|
|
44
|
-
fontWeight?: TextFontWeight;
|
|
45
|
-
/**
|
|
46
|
-
* Themed font size.
|
|
47
|
-
* @see Text.FontSize
|
|
48
|
-
* @default Text.FontSize.MD
|
|
49
|
-
*/
|
|
50
|
-
fontSize?: TextFontSize;
|
|
51
|
-
/**
|
|
52
|
-
* Themed line heidht.
|
|
53
|
-
* @see Text.LineHeight
|
|
54
|
-
* @default Text.LineHeight.NORMAL
|
|
55
|
-
*/
|
|
56
|
-
lineHeight?: TextLineHeight;
|
|
57
|
-
/**
|
|
58
|
-
* Maximum number of lines to display.
|
|
59
|
-
* @default undefined
|
|
60
|
-
*/
|
|
61
|
-
maxLines?: number;
|
|
62
|
-
/**
|
|
63
|
-
* Themed or transparent color.
|
|
64
|
-
* @see Text.Color
|
|
65
|
-
* @default Text.Color.BASE_800
|
|
66
|
-
*/
|
|
67
|
-
color?: TextColor;
|
|
68
|
-
/**
|
|
69
|
-
* Text opacity.
|
|
70
|
-
* @see Fraction
|
|
71
|
-
* @default undefined
|
|
72
|
-
*/
|
|
73
|
-
opacity?: Fraction;
|
|
74
|
-
}
|
|
75
|
-
export type TextComponent = ForwardRefExoticComponent<PropsWithoutRef<TextProps> & RefAttributes<TextRef>> & {
|
|
76
|
-
Tag: Record<keyof typeof TextTag, TextTag>;
|
|
77
|
-
Align: Record<keyof typeof TextAlign, TextAlign>;
|
|
78
|
-
Decoration: Record<keyof typeof TextDecoration, TextDecoration>;
|
|
79
|
-
FontFamily: Record<keyof typeof TextFontFamily, TextFontFamily>;
|
|
80
|
-
FontWeight: Record<keyof typeof TextFontWeight, TextFontWeight>;
|
|
81
|
-
FontSize: Record<keyof typeof TextFontSize, TextFontSize>;
|
|
82
|
-
LineHeight: Record<keyof typeof TextLineHeight, TextLineHeight>;
|
|
83
|
-
Color: Record<keyof typeof TextColor, TextColor>;
|
|
84
|
-
};
|
|
85
|
-
export type StyledTextrops = Pick<TextProps, 'align' | 'decoration' | 'maxLines'> & {
|
|
86
|
-
fontFamily: string;
|
|
87
|
-
fontWeight: FontWeight;
|
|
88
|
-
fontSize: number;
|
|
89
|
-
lineHeight: number;
|
|
90
|
-
color: Color | 'transparent';
|
|
91
|
-
opacity?: number;
|
|
92
|
-
};
|