creactive 0.0.138 → 0.0.140
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 -3
- package/build/components/atoms/gradient/constants/direction.d.ts +2 -2
- package/build/components/atoms/gradient/constants/index.d.ts +1 -1
- package/build/components/atoms/gradient/gradient.types.d.ts +8 -4
- package/build/components/atoms/text/constants/color.d.ts +16 -0
- package/build/components/atoms/text/constants/font.d.ts +2 -1
- package/build/components/atoms/text/constants/index.d.ts +1 -1
- package/build/components/atoms/text/text.types.d.ts +9 -1
- package/build/contexts/theme/constants/font.d.ts +11 -10
- package/build/contexts/theme/constants/index.d.ts +1 -1
- package/build/contexts/theme/hooks/use-theme-style-sheet.d.ts +3 -0
- package/build/contexts/theme/theme.types.d.ts +16 -10
- package/build/default.js +1 -1
- package/package.json +1 -1
- package/build/components/gradient/components/index.d.ts +0 -2
- package/build/components/gradient/components/linear.d.ts +0 -2
- package/build/components/gradient/components/stop.d.ts +0 -2
- package/build/components/gradient/constants/direction.d.ts +0 -4
- package/build/components/gradient/constants/index.d.ts +0 -1
- package/build/components/gradient/gradient.d.ts +0 -2
- package/build/components/gradient/gradient.types.d.ts +0 -67
- package/build/components/gradient/index.d.ts +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum GradientLinearDirection {
|
|
2
2
|
TOP = 0,
|
|
3
3
|
LEFT = 1,
|
|
4
4
|
RIGHT = 2,
|
|
5
5
|
BOTTOM = 3
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const GRADIENT_LINEAR_DIRECTION_COORDINATES: {
|
|
8
8
|
0: {
|
|
9
9
|
x1: number;
|
|
10
10
|
y1: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { GRADIENT_LINEAR_DIRECTION_COORDINATES, GradientLinearDirection, } from './direction';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Fraction } from '../../../helpers';
|
|
2
2
|
import type { Color } from '../../../types';
|
|
3
3
|
import type { FunctionComponent, ReactElement } from 'react';
|
|
4
|
-
import type {
|
|
4
|
+
import type { GradientLinearDirection } from './constants';
|
|
5
5
|
/**
|
|
6
6
|
* Gradient stop component properties.
|
|
7
7
|
* Describes possible gradient stop component customization.
|
|
@@ -33,12 +33,16 @@ export type GradientStopComponent = FunctionComponent<GradientStopProperties>;
|
|
|
33
33
|
* @see Gradient.Linear
|
|
34
34
|
*/
|
|
35
35
|
export interface GradientLinearProperties {
|
|
36
|
+
/**
|
|
37
|
+
* Allows to select linear gradient component in tests.
|
|
38
|
+
* @default undefined
|
|
39
|
+
*/
|
|
40
|
+
testId?: string;
|
|
36
41
|
/**
|
|
37
42
|
* One of supported gradient directions.
|
|
38
43
|
* @see Gradient.Direction
|
|
39
|
-
* @default Gradient.Direction.BOTTOM
|
|
40
44
|
*/
|
|
41
|
-
direction
|
|
45
|
+
direction: GradientLinearDirection;
|
|
42
46
|
/**
|
|
43
47
|
* Gradient children.
|
|
44
48
|
* @see Gradient.Stop
|
|
@@ -54,7 +58,7 @@ export interface GradientLinearProperties {
|
|
|
54
58
|
* @see Gradient.Direction
|
|
55
59
|
*/
|
|
56
60
|
export type GradientLinearComponent = FunctionComponent<GradientLinearProperties> & {
|
|
57
|
-
Direction: Record<keyof typeof
|
|
61
|
+
Direction: Record<keyof typeof GradientLinearDirection, GradientLinearDirection>;
|
|
58
62
|
};
|
|
59
63
|
/**
|
|
60
64
|
* Gradient object providing access to components and constants.
|
|
@@ -34,3 +34,19 @@ export declare enum TextColor {
|
|
|
34
34
|
FAILURE_900 = 26,
|
|
35
35
|
TRANSPARENT = 27
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Supported text background color constants.
|
|
39
|
+
* Part of theme colors, suitable for text background.
|
|
40
|
+
* @see Text.BackgroundColor
|
|
41
|
+
*/
|
|
42
|
+
export declare enum TextBackgroundColor {
|
|
43
|
+
BASE_100 = 0,
|
|
44
|
+
BASE_200 = 1,
|
|
45
|
+
BASE_300 = 2,
|
|
46
|
+
BASE_400 = 3,
|
|
47
|
+
BASE_500 = 4,
|
|
48
|
+
BASE_600 = 5,
|
|
49
|
+
BASE_700 = 6,
|
|
50
|
+
BASE_800 = 7,
|
|
51
|
+
BASE_900 = 8
|
|
52
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TextColor } from './color';
|
|
1
|
+
export { TextBackgroundColor, TextColor } from './color';
|
|
2
2
|
export { TextFontFamily, TextFontSize, TextFontWeight } from './font';
|
|
3
3
|
export { TextTag } from './tag';
|
|
4
4
|
export { TextAlign, TextDecoration, TextLineHeight } from './text';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Fraction } from '../../../helpers';
|
|
2
2
|
import type { Color, FontWeight } from '../../../types';
|
|
3
3
|
import type { ForwardRefExoticComponent, PropsWithChildren, PropsWithoutRef, RefAttributes } from 'react';
|
|
4
|
-
import type { TextAlign, TextColor, TextDecoration, TextFontFamily, TextFontSize, TextFontWeight, TextLineHeight, TextTag } from './constants';
|
|
4
|
+
import type { TextAlign, TextBackgroundColor, TextColor, TextDecoration, TextFontFamily, TextFontSize, TextFontWeight, TextLineHeight, TextTag } from './constants';
|
|
5
5
|
/**
|
|
6
6
|
* Provided by component reference object measure callback.
|
|
7
7
|
* Allows to access component layout element position and size.
|
|
@@ -75,6 +75,12 @@ export interface TextProperties extends PropsWithChildren {
|
|
|
75
75
|
* @default Text.Color.BASE_800
|
|
76
76
|
*/
|
|
77
77
|
color?: TextColor;
|
|
78
|
+
/**
|
|
79
|
+
* Themed background color.
|
|
80
|
+
* @see Text.BackgroundColor
|
|
81
|
+
* @default undefined
|
|
82
|
+
*/
|
|
83
|
+
backgroundColor?: TextBackgroundColor;
|
|
78
84
|
/**
|
|
79
85
|
* Text opacity.
|
|
80
86
|
* @see Fraction
|
|
@@ -91,6 +97,7 @@ export type TextComponent = ForwardRefExoticComponent<PropsWithoutRef<TextProper
|
|
|
91
97
|
FontSize: Record<keyof typeof TextFontSize, TextFontSize>;
|
|
92
98
|
LineHeight: Record<keyof typeof TextLineHeight, TextLineHeight>;
|
|
93
99
|
Color: Record<keyof typeof TextColor, TextColor>;
|
|
100
|
+
BackgroundColor: Record<keyof typeof TextBackgroundColor, TextBackgroundColor>;
|
|
94
101
|
};
|
|
95
102
|
/**
|
|
96
103
|
* Styled text properties type.
|
|
@@ -106,6 +113,7 @@ export type TextStyledProperties = {
|
|
|
106
113
|
lineHeight: number;
|
|
107
114
|
maxLines: number;
|
|
108
115
|
color: Color;
|
|
116
|
+
backgroundColor?: Color;
|
|
109
117
|
opacity?: number;
|
|
110
118
|
};
|
|
111
119
|
};
|
|
@@ -9,13 +9,14 @@ export declare const FONT_WEIGHT_BASE_SEMIBOLD = 600;
|
|
|
9
9
|
export declare const FONT_WEIGHT_BASE_BOLD = 700;
|
|
10
10
|
export declare const FONT_WEIGHT_BASE_EXTRABOLD = 800;
|
|
11
11
|
export declare const FONT_WEIGHT_BASE_BLACK = 900;
|
|
12
|
-
export declare const FONT_SIZE_BASE_X2S =
|
|
13
|
-
export declare const FONT_SIZE_BASE_XS =
|
|
14
|
-
export declare const FONT_SIZE_BASE_SM =
|
|
15
|
-
export declare const FONT_SIZE_BASE_MD =
|
|
16
|
-
export declare const FONT_SIZE_BASE_LG =
|
|
17
|
-
export declare const FONT_SIZE_BASE_XL =
|
|
18
|
-
export declare const FONT_SIZE_BASE_X2L =
|
|
19
|
-
export declare const FONT_SIZE_BASE_X3L =
|
|
20
|
-
export declare const FONT_SIZE_BASE_X4L =
|
|
21
|
-
export declare const FONT_SIZE_BASE_X5L =
|
|
12
|
+
export declare const FONT_SIZE_BASE_X2S = 10;
|
|
13
|
+
export declare const FONT_SIZE_BASE_XS = 12;
|
|
14
|
+
export declare const FONT_SIZE_BASE_SM = 14;
|
|
15
|
+
export declare const FONT_SIZE_BASE_MD = 16;
|
|
16
|
+
export declare const FONT_SIZE_BASE_LG = 18;
|
|
17
|
+
export declare const FONT_SIZE_BASE_XL = 20;
|
|
18
|
+
export declare const FONT_SIZE_BASE_X2L = 24;
|
|
19
|
+
export declare const FONT_SIZE_BASE_X3L = 30;
|
|
20
|
+
export declare const FONT_SIZE_BASE_X4L = 36;
|
|
21
|
+
export declare const FONT_SIZE_BASE_X5L = 48;
|
|
22
|
+
export declare const FONT_SIZE_BASE_X6L = 60;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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
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_BACKGROUND_PRIMARY_100, COLOR_BACKGROUND_PRIMARY_200, COLOR_BACKGROUND_PRIMARY_300, COLOR_BACKGROUND_PRIMARY_400, COLOR_BACKGROUND_PRIMARY_500, COLOR_BACKGROUND_PRIMARY_600, COLOR_BACKGROUND_PRIMARY_700, COLOR_BACKGROUND_PRIMARY_800, COLOR_BACKGROUND_PRIMARY_900, COLOR_BORDER_BASE_100, COLOR_BORDER_BASE_200, COLOR_BORDER_BASE_300, COLOR_BORDER_BASE_400, COLOR_BORDER_BASE_500, COLOR_BORDER_BASE_600, COLOR_BORDER_BASE_700, COLOR_BORDER_BASE_800, COLOR_BORDER_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_FAILURE_100, COLOR_FOREGROUND_FAILURE_200, COLOR_FOREGROUND_FAILURE_300, COLOR_FOREGROUND_FAILURE_400, COLOR_FOREGROUND_FAILURE_500, COLOR_FOREGROUND_FAILURE_600, COLOR_FOREGROUND_FAILURE_700, COLOR_FOREGROUND_FAILURE_800, COLOR_FOREGROUND_FAILURE_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
|
-
export { FONT_FAMILY_BASE, FONT_FAMILY_TYPOGRAPHIC, 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 { FONT_FAMILY_BASE, FONT_FAMILY_TYPOGRAPHIC, 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_SIZE_BASE_X6L, 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_X3S, SPACING_BASE_X4L, SPACING_BASE_X4S, SPACING_BASE_X5L, SPACING_BASE_X5S, SPACING_BASE_X6L, SPACING_BASE_X6S, 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';
|
|
@@ -344,63 +344,69 @@ export interface ThemeContextValue {
|
|
|
344
344
|
/**
|
|
345
345
|
* Base 2 times extra-small font size.
|
|
346
346
|
* @see FONT_SIZE_BASE_X2S
|
|
347
|
-
* @default
|
|
347
|
+
* @default 10
|
|
348
348
|
*/
|
|
349
349
|
fontSizeBaseX2S: number;
|
|
350
350
|
/**
|
|
351
351
|
* Base extra-small font size.
|
|
352
352
|
* @see FONT_SIZE_BASE_XS
|
|
353
|
-
* @default
|
|
353
|
+
* @default 12
|
|
354
354
|
*/
|
|
355
355
|
fontSizeBaseXS: number;
|
|
356
356
|
/**
|
|
357
357
|
* Base small font size.
|
|
358
358
|
* @see FONT_SIZE_BASE_SM
|
|
359
|
-
* @default
|
|
359
|
+
* @default 14
|
|
360
360
|
*/
|
|
361
361
|
fontSizeBaseSM: number;
|
|
362
362
|
/**
|
|
363
363
|
* Base medium font size.
|
|
364
364
|
* @see FONT_SIZE_BASE_MD
|
|
365
|
-
* @default
|
|
365
|
+
* @default 16
|
|
366
366
|
*/
|
|
367
367
|
fontSizeBaseMD: number;
|
|
368
368
|
/**
|
|
369
369
|
* Base large font size.
|
|
370
370
|
* @see FONT_SIZE_BASE_LG
|
|
371
|
-
* @default
|
|
371
|
+
* @default 18
|
|
372
372
|
*/
|
|
373
373
|
fontSizeBaseLG: number;
|
|
374
374
|
/**
|
|
375
375
|
* Base extra-large font size.
|
|
376
376
|
* @see FONT_SIZE_BASE_XL
|
|
377
|
-
* @default
|
|
377
|
+
* @default 20
|
|
378
378
|
*/
|
|
379
379
|
fontSizeBaseXL: number;
|
|
380
380
|
/**
|
|
381
381
|
* Base 2 times extra-large font size.
|
|
382
382
|
* @see FONT_SIZE_BASE_X2L
|
|
383
|
-
* @default
|
|
383
|
+
* @default 24
|
|
384
384
|
*/
|
|
385
385
|
fontSizeBaseX2L: number;
|
|
386
386
|
/**
|
|
387
387
|
* Base 3 times extra-large font size.
|
|
388
388
|
* @see FONT_SIZE_BASE_X3L
|
|
389
|
-
* @default
|
|
389
|
+
* @default 30
|
|
390
390
|
*/
|
|
391
391
|
fontSizeBaseX3L: number;
|
|
392
392
|
/**
|
|
393
393
|
* Base 4 times extra-large font size.
|
|
394
394
|
* @see FONT_SIZE_BASE_X4L
|
|
395
|
-
* @default
|
|
395
|
+
* @default 36
|
|
396
396
|
*/
|
|
397
397
|
fontSizeBaseX4L: number;
|
|
398
398
|
/**
|
|
399
399
|
* Base 5 times extra-large font size.
|
|
400
400
|
* @see FONT_SIZE_BASE_X5L
|
|
401
|
-
* @default
|
|
401
|
+
* @default 48
|
|
402
402
|
*/
|
|
403
403
|
fontSizeBaseX5L: number;
|
|
404
|
+
/**
|
|
405
|
+
* Base 6 times extra-large font size.
|
|
406
|
+
* @see FONT_SIZE_BASE_X6L
|
|
407
|
+
* @default 60
|
|
408
|
+
*/
|
|
409
|
+
fontSizeBaseX6L: number;
|
|
404
410
|
/**
|
|
405
411
|
* Base none line height.
|
|
406
412
|
* @see LINE_HEIGHT_BASE_NONE
|