creactive 0.0.101 → 0.0.103

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.
@@ -24,3 +24,23 @@ export declare enum TextColor {
24
24
  INVERSE_800 = 17,
25
25
  INVERSE_900 = 18
26
26
  }
27
+ export declare const TEXT_COLOR_THEME_KEY: {
28
+ 1: "colorForegroundBase100";
29
+ 2: "colorForegroundBase200";
30
+ 3: "colorForegroundBase300";
31
+ 4: "colorForegroundBase400";
32
+ 5: "colorForegroundBase500";
33
+ 6: "colorForegroundBase600";
34
+ 7: "colorForegroundBase700";
35
+ 8: "colorForegroundBase800";
36
+ 9: "colorForegroundBase900";
37
+ 10: "colorForegroundInverse100";
38
+ 11: "colorForegroundInverse200";
39
+ 12: "colorForegroundInverse300";
40
+ 13: "colorForegroundInverse400";
41
+ 14: "colorForegroundInverse500";
42
+ 15: "colorForegroundInverse600";
43
+ 16: "colorForegroundInverse700";
44
+ 17: "colorForegroundInverse800";
45
+ 18: "colorForegroundInverse900";
46
+ };
@@ -13,6 +13,17 @@ export declare enum TextFontWeight {
13
13
  EXTRA_BOLD = 7,
14
14
  BLACK = 8
15
15
  }
16
+ export declare const TEXT_THEME_FONT_WEIGHT_KEY: {
17
+ 0: "fontWeightBaseThin";
18
+ 1: "fontWeightBaseExtraLight";
19
+ 2: "fontWeightBaseLight";
20
+ 3: "fontWeightBaseRegular";
21
+ 4: "fontWeightBaseMedium";
22
+ 5: "fontWeightBaseSemiBold";
23
+ 6: "fontWeightBaseBold";
24
+ 7: "fontWeightBaseExtraBold";
25
+ 8: "fontWeightBaseBlack";
26
+ };
16
27
  /**
17
28
  * Supported text font sizes enum.
18
29
  * Should be used to control the size of the text.
@@ -29,3 +40,15 @@ export declare enum TextFontSize {
29
40
  X4L = 8,
30
41
  X5L = 9
31
42
  }
43
+ export declare const TEXT_THEME_FONT_SIZE_KEY: {
44
+ 0: "fontSizeBaseX2S";
45
+ 1: "fontSizeBaseXS";
46
+ 2: "fontSizeBaseSM";
47
+ 3: "fontSizeBaseMD";
48
+ 4: "fontSizeBaseLG";
49
+ 5: "fontSizeBaseXL";
50
+ 6: "fontSizeBaseX2L";
51
+ 7: "fontSizeBaseX3L";
52
+ 8: "fontSizeBaseX4L";
53
+ 9: "fontSizeBaseX5L";
54
+ };
@@ -1,5 +1,4 @@
1
- export { TextColor } from './color';
2
- export { TextFontSize, TextFontWeight } from './font';
3
- export { TextRole } from './role';
4
- export { TextAlign, TextLineHeight } from './text';
5
- export { TEXT_TYPE_HEADING, TextType } from './type';
1
+ export { TEXT_COLOR_THEME_KEY, TextColor } from './color';
2
+ export { TEXT_THEME_FONT_SIZE_KEY, TEXT_THEME_FONT_WEIGHT_KEY, TextFontSize, TextFontWeight, } from './font';
3
+ export { TEXT_HTML_TAG, TextTag } from './tag';
4
+ export { TEXT_THEME_LINE_HEIGHT_KEY, TextAlign, TextLineHeight } from './text';
@@ -0,0 +1,24 @@
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
+ };
@@ -19,3 +19,11 @@ export declare enum TextLineHeight {
19
19
  RELAXED = 4,
20
20
  LOOSE = 5
21
21
  }
22
+ export declare const TEXT_THEME_LINE_HEIGHT_KEY: {
23
+ 0: "lineHeightBaseNone";
24
+ 1: "lineHeightBaseTight";
25
+ 2: "lineHeightBaseSnug";
26
+ 3: "lineHeightBaseNormal";
27
+ 4: "lineHeightBaseRelaxed";
28
+ 5: "lineHeightBaseLoose";
29
+ };
@@ -1,2 +1,3 @@
1
- export { Text } from './text';
2
- export type { TextComponent, TextProps } from './text.types';
1
+ import type { TextComponent, TextProps } from './text.types';
2
+ export declare const Text: TextComponent;
3
+ export type { TextComponent, TextProps };
@@ -1,59 +1,62 @@
1
+ import type { Color, FontWeight } from '../../types';
1
2
  import type { FunctionComponent, PropsWithChildren } from 'react';
2
- import type { TextAlign, TextColor, TextFontSize, TextFontWeight, TextLineHeight, TextType } from './constants';
3
+ import type { TextAlign, TextColor, TextFontSize, TextFontWeight, TextLineHeight, TextTag } from './constants';
3
4
  export interface TextProps extends PropsWithChildren {
4
5
  /**
5
- * Specific text type if required.
6
- * Affects appearance, accessibility and semantics.
7
- * Allows to control HTML element, that will be to rendered.
6
+ * Allows to control HTML tag to render.
7
+ * Makes no sense on native platforms.
8
+ * @see Text.Tag
8
9
  * @default undefined - renders into DIV element
9
10
  */
10
- type?: TextType;
11
+ tag?: TextTag;
11
12
  /**
12
- * Text component align control property.
13
13
  * Inner text will be aligned according to this value.
14
+ * @see Text.Align
14
15
  * @default Text.Align.LEFT
15
16
  */
16
17
  align?: TextAlign;
17
18
  /**
18
- * Font weight property.
19
- * Changes font weight, depending on theme.
20
- * Uses base font weight tokens for mapping.
19
+ * Themed font weight.
20
+ * @see Text.FontWeight
21
21
  * @default Text.FontWeight.REGULAR
22
22
  */
23
23
  fontWeight?: TextFontWeight;
24
24
  /**
25
- * Specific text size if required.
26
- * Will change text size, depending on theme.
27
- * Uses base font size tokens for mapping.
25
+ * Themed font size.
26
+ * @see Text.FontSize
28
27
  * @default Text.FontSize.MD
29
28
  */
30
29
  fontSize?: TextFontSize;
31
30
  /**
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
31
+ * Themed line heidht.
32
+ * @see Text.LineHeight
33
+ * @default Text.LineHeight.NORMAL
36
34
  */
37
35
  lineHeight?: TextLineHeight;
38
36
  /**
39
- * Limiting text lines count.
40
- * Text will be truncated with an ellipsis after specified lines count.
37
+ * Maximum number of lines to display.
41
38
  * @default undefined
42
39
  */
43
40
  maxLines?: number;
44
41
  /**
45
- * Specifying text color property.
46
- * Allows to change color, depending on theme.
47
- * Theme independent colors and values may be also available.
42
+ * Themed or transparent color.
43
+ * @see Text.Color
48
44
  * @default Text.Color.BASE_800
49
45
  */
50
46
  color?: TextColor;
51
47
  }
52
48
  export type TextComponent = FunctionComponent<TextProps> & {
53
- Type: Record<keyof typeof TextType, TextType>;
49
+ Tag: Record<keyof typeof TextTag, TextTag>;
54
50
  Align: Record<keyof typeof TextAlign, TextAlign>;
55
51
  FontWeight: Record<keyof typeof TextFontWeight, TextFontWeight>;
56
52
  FontSize: Record<keyof typeof TextFontSize, TextFontSize>;
57
53
  LineHeight: Record<keyof typeof TextLineHeight, TextLineHeight>;
58
54
  Color: Record<keyof typeof TextColor, TextColor>;
59
55
  };
56
+ export type StyledTextrops = Pick<TextProps, 'align' | 'maxLines'> & {
57
+ fontFamily: string;
58
+ fontWeight: FontWeight;
59
+ fontSize: number;
60
+ lineHeight: number;
61
+ color: Color | 'transparent';
62
+ };
@@ -13,6 +13,26 @@ export declare const VIEW_THEME_BORDER_WIDTH_KEY: {
13
13
  1: "borderWidthBaseMD";
14
14
  2: "borderWidthBaseLG";
15
15
  };
16
+ export declare const VIEW_THEME_BORDER_WIDTH_TOP_STYLE_KEY: {
17
+ 0: "borderWidthTopBaseSM";
18
+ 1: "borderWidthTopBaseMD";
19
+ 2: "borderWidthTopBaseLG";
20
+ };
21
+ export declare const VIEW_THEME_BORDER_WIDTH_LEFT_STYLE_KEY: {
22
+ 0: "borderWidthLeftBaseSM";
23
+ 1: "borderWidthLeftBaseMD";
24
+ 2: "borderWidthLeftBaseLG";
25
+ };
26
+ export declare const VIEW_THEME_BORDER_WIDTH_RIGHT_STYLE_KEY: {
27
+ 0: "borderWidthRightBaseSM";
28
+ 1: "borderWidthRightBaseMD";
29
+ 2: "borderWidthRightBaseLG";
30
+ };
31
+ export declare const VIEW_THEME_BORDER_WIDTH_BOTTOM_STYLE_KEY: {
32
+ 0: "borderWidthBottomBaseSM";
33
+ 1: "borderWidthBottomBaseMD";
34
+ 2: "borderWidthBottomBaseLG";
35
+ };
16
36
  /**
17
37
  * View component supported border radius enumerated constants.
18
38
  * Includes matches for all theme base border radius tokens and maximum one.
@@ -1,4 +1,4 @@
1
- export { VIEW_THEME_BORDER_RADIUS_KEY, VIEW_THEME_BORDER_WIDTH_KEY, ViewBorderRadius, ViewBorderWidth, } from './border';
1
+ export { VIEW_THEME_BORDER_RADIUS_KEY, VIEW_THEME_BORDER_WIDTH_BOTTOM_STYLE_KEY, VIEW_THEME_BORDER_WIDTH_KEY, VIEW_THEME_BORDER_WIDTH_LEFT_STYLE_KEY, VIEW_THEME_BORDER_WIDTH_RIGHT_STYLE_KEY, VIEW_THEME_BORDER_WIDTH_TOP_STYLE_KEY, ViewBorderRadius, ViewBorderWidth, } from './border';
2
2
  export { VIEW_THEME_BACKGROUND_COLOR_KEY, VIEW_THEME_BORDER_COLOR_KEY, ViewBackgroundColor, ViewBorderColor, } from './color';
3
3
  export { ViewAlignContent, ViewAlignItems, ViewAlignSelf, ViewFlexDirection, ViewJustifyContent, } from './flex';
4
4
  export { ViewOverflow } from './overflow';
@@ -180,7 +180,10 @@ export interface ViewProps extends PropsWithChildren {
180
180
  */
181
181
  maxHeight?: Size;
182
182
  /**
183
- * View box shadow.
183
+ * View component box shadow.
184
+ * React Native's "New Architecture" is required on native.
185
+ * @see https://reactnative.dev/architecture/landing-page
186
+ * @see https://docs.expo.dev/guides/new-architecture/
184
187
  * @see View.BoxShadow
185
188
  * @default undefined
186
189
  */
@@ -197,6 +200,30 @@ export interface ViewProps extends PropsWithChildren {
197
200
  * @default undefined
198
201
  */
199
202
  borderWidth?: ViewBorderWidth;
203
+ /**
204
+ * View border top width.
205
+ * @see View.BorderWidth
206
+ * @default undefined
207
+ */
208
+ borderWidthTop?: ViewBorderWidth;
209
+ /**
210
+ * View border left width.
211
+ * @see View.BorderWidth
212
+ * @default undefined
213
+ */
214
+ borderWidthLeft?: ViewBorderWidth;
215
+ /**
216
+ * View border right width.
217
+ * @see View.BorderWidth
218
+ * @default undefined
219
+ */
220
+ borderWidthRight?: ViewBorderWidth;
221
+ /**
222
+ * View border bottom width.
223
+ * @see View.BorderWidth
224
+ * @default undefined
225
+ */
226
+ borderWidthBottom?: ViewBorderWidth;
200
227
  /**
201
228
  * View border radius.
202
229
  * @see View.BorderRadius
@@ -248,7 +275,11 @@ export type StyledViewProps = Pick<ViewProps, 'position' | 'overflow' | 'flexDir
248
275
  maxHeight?: SizeValue;
249
276
  boxShadow?: string;
250
277
  borderColor?: Color;
251
- borderWidth?: number;
278
+ borderWidth: string;
279
+ borderWidthTop?: string;
280
+ borderWidthLeft?: string;
281
+ borderWidthRight?: string;
282
+ borderWidthBottom?: string;
252
283
  borderRadius?: `${number}px` | '50%';
253
284
  backgroundColor?: Color;
254
285
  };
@@ -125,7 +125,7 @@ export declare const useThemeStyleSheet: () => {
125
125
  fontWeightBaseMedium: {
126
126
  fontWeight: import("../../..").FontWeight;
127
127
  };
128
- fontWeightBaseSemibold: {
128
+ fontWeightBaseSemiBold: {
129
129
  fontWeight: import("../../..").FontWeight;
130
130
  };
131
131
  fontWeightBaseBold: {
@@ -536,6 +536,42 @@ export declare const useThemeStyleSheet: () => {
536
536
  borderWidthBaseLG: {
537
537
  borderWidth: number;
538
538
  };
539
+ borderWidthTopBaseSM: {
540
+ borderTopWidth: number;
541
+ };
542
+ borderWidthTopBaseMD: {
543
+ borderTopWidth: number;
544
+ };
545
+ borderWidthTopBaseLG: {
546
+ borderTopWidth: number;
547
+ };
548
+ borderWidthLeftBaseSM: {
549
+ borderLeftWidth: number;
550
+ };
551
+ borderWidthLeftBaseMD: {
552
+ borderLeftWidth: number;
553
+ };
554
+ borderWidthLeftBaseLG: {
555
+ borderLeftWidth: number;
556
+ };
557
+ borderWidthRightBaseSM: {
558
+ borderRightWidth: number;
559
+ };
560
+ borderWidthRightBaseMD: {
561
+ borderRightWidth: number;
562
+ };
563
+ borderWidthRightBaseLG: {
564
+ borderRightWidth: number;
565
+ };
566
+ borderWidthBottomBaseSM: {
567
+ borderBottomWidth: number;
568
+ };
569
+ borderWidthBottomBaseMD: {
570
+ borderBottomWidth: number;
571
+ };
572
+ borderWidthBottomBaseLG: {
573
+ borderBottomWidth: number;
574
+ };
539
575
  borderRadiusBaseXS: {
540
576
  borderRadius: number;
541
577
  };
@@ -227,7 +227,7 @@ export interface ThemeContextValue {
227
227
  * @see FONT_WEIGHT_BASE_SEMIBOLD
228
228
  * @default 600
229
229
  */
230
- fontWeightBaseSemibold: FontWeight;
230
+ fontWeightBaseSemiBold: FontWeight;
231
231
  /**
232
232
  * Base bold font weight.
233
233
  * @see FONT_WEIGHT_BASE_BOLD
@@ -343,7 +343,7 @@ export interface ThemeContextValue {
343
343
  */
344
344
  lineHeightBaseLoose: number;
345
345
  /**
346
- * Base 6 times extra-small spacing.
346
+ * Base f spacing.
347
347
  * @see SPACING_BASE_X6S
348
348
  * @default 2
349
349
  */