creactive 0.0.79 → 0.0.80
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 +24 -1634
- package/build/classic.js.LICENSE.txt +0 -15
- package/build/components/view/constants/index.d.ts +2 -1
- package/build/components/view/constants/spacing.d.ts +144 -0
- package/build/components/view/constants/tag.d.ts +1 -1
- package/build/components/view/view.types.d.ts +66 -2
- package/build/constants/index.d.ts +1 -1
- package/build/constants/theme/index.d.ts +1 -0
- package/build/constants/theme/spacing.d.ts +16 -0
- package/build/contexts/theme/theme.types.d.ts +60 -0
- package/build/default.js +2 -520
- package/build/default.js.LICENSE.txt +0 -15
- package/build/hooks/use-theme-style-sheet.d.ts +288 -0
- package/package.json +3 -3
- package/build/contexts/theme/wrapper.d.ts +0 -2
- package/build/helpers/index.d.ts +0 -3
- package/build/helpers/storybook/constants/control.d.ts +0 -22
- package/build/helpers/storybook/constants/index.d.ts +0 -1
- package/build/helpers/storybook/control.d.ts +0 -87
- package/build/helpers/storybook/index.d.ts +0 -1
- package/build/helpers/style/index.d.ts +0 -2
- package/build/helpers/style/style.d.ts +0 -2
- package/build/helpers/style/style.types.d.ts +0 -10
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/*!
|
|
8
|
-
* The buffer module from node.js, for the browser.
|
|
9
|
-
*
|
|
10
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
11
|
-
* @license MIT
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
15
|
-
|
|
16
1
|
/**
|
|
17
2
|
* @license React
|
|
18
3
|
* react-jsx-runtime.production.min.js
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { ViewAlignContent, ViewAlignItems, ViewAlignSelf, ViewFlexDirection, ViewJustifyContent, } from './flex';
|
|
2
|
-
export {
|
|
2
|
+
export { ViewMarginBottomThemeStyleSheetKey, ViewMarginLeftThemeStyleSheetKey, ViewMarginRightThemeStyleSheetKey, ViewMarginTopThemeStyleSheetKey, ViewPaddingBottomThemeStyleSheetKey, ViewPaddingLeftThemeStyleSheetKey, ViewPaddingRightThemeStyleSheetKey, ViewPaddingTopThemeStyleSheetKey, ViewSpacing, ViewSpacingThemeTokenKey, } from './spacing';
|
|
3
|
+
export { ViewHTMLTag, ViewTag } from './tag';
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View component spacing enumerated contstants.
|
|
3
|
+
* Allows to control view margin and padding with properties.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ViewSpacing {
|
|
6
|
+
X2S = 0,
|
|
7
|
+
XS = 1,
|
|
8
|
+
SM = 2,
|
|
9
|
+
MD = 3,
|
|
10
|
+
LG = 4,
|
|
11
|
+
XL = 5,
|
|
12
|
+
X2L = 6,
|
|
13
|
+
X3L = 7,
|
|
14
|
+
X4L = 8,
|
|
15
|
+
X5L = 9,
|
|
16
|
+
X6L = 10,
|
|
17
|
+
X7L = 11
|
|
18
|
+
}
|
|
19
|
+
export declare const ViewMarginTopThemeStyleSheetKey: {
|
|
20
|
+
0: "marginTopBaseX2S";
|
|
21
|
+
1: "marginTopBaseXS";
|
|
22
|
+
2: "marginTopBaseSM";
|
|
23
|
+
3: "marginTopBaseMD";
|
|
24
|
+
4: "marginTopBaseLG";
|
|
25
|
+
5: "marginTopBaseXL";
|
|
26
|
+
6: "marginTopBaseX2L";
|
|
27
|
+
7: "marginTopBaseX3L";
|
|
28
|
+
8: "marginTopBaseX4L";
|
|
29
|
+
9: "marginTopBaseX5L";
|
|
30
|
+
10: "marginTopBaseX6L";
|
|
31
|
+
11: "marginTopBaseX7L";
|
|
32
|
+
};
|
|
33
|
+
export declare const ViewPaddingTopThemeStyleSheetKey: {
|
|
34
|
+
0: "paddingTopBaseX2S";
|
|
35
|
+
1: "paddingTopBaseXS";
|
|
36
|
+
2: "paddingTopBaseSM";
|
|
37
|
+
3: "paddingTopBaseMD";
|
|
38
|
+
4: "paddingTopBaseLG";
|
|
39
|
+
5: "paddingTopBaseXL";
|
|
40
|
+
6: "paddingTopBaseX2L";
|
|
41
|
+
7: "paddingTopBaseX3L";
|
|
42
|
+
8: "paddingTopBaseX4L";
|
|
43
|
+
9: "paddingTopBaseX5L";
|
|
44
|
+
10: "paddingTopBaseX6L";
|
|
45
|
+
11: "paddingTopBaseX7L";
|
|
46
|
+
};
|
|
47
|
+
export declare const ViewMarginLeftThemeStyleSheetKey: {
|
|
48
|
+
0: "marginLeftBaseX2S";
|
|
49
|
+
1: "marginLeftBaseXS";
|
|
50
|
+
2: "marginLeftBaseSM";
|
|
51
|
+
3: "marginLeftBaseMD";
|
|
52
|
+
4: "marginLeftBaseLG";
|
|
53
|
+
5: "marginLeftBaseXL";
|
|
54
|
+
6: "marginLeftBaseX2L";
|
|
55
|
+
7: "marginLeftBaseX3L";
|
|
56
|
+
8: "marginLeftBaseX4L";
|
|
57
|
+
9: "marginLeftBaseX5L";
|
|
58
|
+
10: "marginLeftBaseX6L";
|
|
59
|
+
11: "marginLeftBaseX7L";
|
|
60
|
+
};
|
|
61
|
+
export declare const ViewPaddingLeftThemeStyleSheetKey: {
|
|
62
|
+
0: "paddingLeftBaseX2S";
|
|
63
|
+
1: "paddingLeftBaseXS";
|
|
64
|
+
2: "paddingLeftBaseSM";
|
|
65
|
+
3: "paddingLeftBaseMD";
|
|
66
|
+
4: "paddingLeftBaseLG";
|
|
67
|
+
5: "paddingLeftBaseXL";
|
|
68
|
+
6: "paddingLeftBaseX2L";
|
|
69
|
+
7: "paddingLeftBaseX3L";
|
|
70
|
+
8: "paddingLeftBaseX4L";
|
|
71
|
+
9: "paddingLeftBaseX5L";
|
|
72
|
+
10: "paddingLeftBaseX6L";
|
|
73
|
+
11: "paddingLeftBaseX7L";
|
|
74
|
+
};
|
|
75
|
+
export declare const ViewMarginRightThemeStyleSheetKey: {
|
|
76
|
+
0: "marginRightBaseX2S";
|
|
77
|
+
1: "marginRightBaseXS";
|
|
78
|
+
2: "marginRightBaseSM";
|
|
79
|
+
3: "marginRightBaseMD";
|
|
80
|
+
4: "marginRightBaseLG";
|
|
81
|
+
5: "marginRightBaseXL";
|
|
82
|
+
6: "marginRightBaseX2L";
|
|
83
|
+
7: "marginRightBaseX3L";
|
|
84
|
+
8: "marginRightBaseX4L";
|
|
85
|
+
9: "marginRightBaseX5L";
|
|
86
|
+
10: "marginRightBaseX6L";
|
|
87
|
+
11: "marginRightBaseX7L";
|
|
88
|
+
};
|
|
89
|
+
export declare const ViewPaddingRightThemeStyleSheetKey: {
|
|
90
|
+
0: "paddingRightBaseX2S";
|
|
91
|
+
1: "paddingRightBaseXS";
|
|
92
|
+
2: "paddingRightBaseSM";
|
|
93
|
+
3: "paddingRightBaseMD";
|
|
94
|
+
4: "paddingRightBaseLG";
|
|
95
|
+
5: "paddingRightBaseXL";
|
|
96
|
+
6: "paddingRightBaseX2L";
|
|
97
|
+
7: "paddingRightBaseX3L";
|
|
98
|
+
8: "paddingRightBaseX4L";
|
|
99
|
+
9: "paddingRightBaseX5L";
|
|
100
|
+
10: "paddingRightBaseX6L";
|
|
101
|
+
11: "paddingRightBaseX7L";
|
|
102
|
+
};
|
|
103
|
+
export declare const ViewMarginBottomThemeStyleSheetKey: {
|
|
104
|
+
0: "marginBottomBaseX2S";
|
|
105
|
+
1: "marginBottomBaseXS";
|
|
106
|
+
2: "marginBottomBaseSM";
|
|
107
|
+
3: "marginBottomBaseMD";
|
|
108
|
+
4: "marginBottomBaseLG";
|
|
109
|
+
5: "marginBottomBaseXL";
|
|
110
|
+
6: "marginBottomBaseX2L";
|
|
111
|
+
7: "marginBottomBaseX3L";
|
|
112
|
+
8: "marginBottomBaseX4L";
|
|
113
|
+
9: "marginBottomBaseX5L";
|
|
114
|
+
10: "marginBottomBaseX6L";
|
|
115
|
+
11: "marginBottomBaseX7L";
|
|
116
|
+
};
|
|
117
|
+
export declare const ViewPaddingBottomThemeStyleSheetKey: {
|
|
118
|
+
0: "paddingBottomBaseX2S";
|
|
119
|
+
1: "paddingBottomBaseXS";
|
|
120
|
+
2: "paddingBottomBaseSM";
|
|
121
|
+
3: "paddingBottomBaseMD";
|
|
122
|
+
4: "paddingBottomBaseLG";
|
|
123
|
+
5: "paddingBottomBaseXL";
|
|
124
|
+
6: "paddingBottomBaseX2L";
|
|
125
|
+
7: "paddingBottomBaseX3L";
|
|
126
|
+
8: "paddingBottomBaseX4L";
|
|
127
|
+
9: "paddingBottomBaseX5L";
|
|
128
|
+
10: "paddingBottomBaseX6L";
|
|
129
|
+
11: "paddingBottomBaseX7L";
|
|
130
|
+
};
|
|
131
|
+
export declare const ViewSpacingThemeTokenKey: {
|
|
132
|
+
0: "spacingBaseX2S";
|
|
133
|
+
1: "spacingBaseXS";
|
|
134
|
+
2: "spacingBaseSM";
|
|
135
|
+
3: "spacingBaseMD";
|
|
136
|
+
4: "spacingBaseLG";
|
|
137
|
+
5: "spacingBaseXL";
|
|
138
|
+
6: "spacingBaseX2L";
|
|
139
|
+
7: "spacingBaseX3L";
|
|
140
|
+
8: "spacingBaseX4L";
|
|
141
|
+
9: "spacingBaseX5L";
|
|
142
|
+
10: "spacingBaseX6L";
|
|
143
|
+
11: "spacingBaseX7L";
|
|
144
|
+
};
|
|
@@ -1,44 +1,97 @@
|
|
|
1
1
|
import type { FunctionComponent, PropsWithChildren } from 'react';
|
|
2
|
-
import type { ViewAlignContent, ViewAlignItems, ViewAlignSelf, ViewFlexDirection, ViewJustifyContent, ViewTag } from './constants';
|
|
2
|
+
import type { ViewAlignContent, ViewAlignItems, ViewAlignSelf, ViewFlexDirection, ViewJustifyContent, ViewSpacing, ViewTag } from './constants';
|
|
3
3
|
export interface ViewProps extends PropsWithChildren {
|
|
4
4
|
/**
|
|
5
5
|
* Allows to control HTML tag to render.
|
|
6
6
|
* Makes no sense on native platforms.
|
|
7
|
+
* @see View.Tag
|
|
7
8
|
* @default View.Tag.DIV
|
|
8
9
|
*/
|
|
9
10
|
tag?: ViewTag;
|
|
10
11
|
/**
|
|
11
12
|
* Flex direction of the component.
|
|
12
13
|
* Defines the main axis along which children are laid out.
|
|
14
|
+
* @see View.FlexDirection
|
|
13
15
|
* @default View.FlexDirection.COLUMN
|
|
14
16
|
*/
|
|
15
17
|
flexDirection?: ViewFlexDirection;
|
|
16
18
|
/**
|
|
17
19
|
* Controls spacing between and around items.
|
|
18
20
|
* Defines how children are distributed along the main axis.
|
|
21
|
+
* @see View.JustifyContent
|
|
19
22
|
* @default View.JustifyContent.FLEX_START
|
|
20
23
|
*/
|
|
21
24
|
justifyContent?: ViewJustifyContent;
|
|
22
25
|
/**
|
|
23
26
|
* Defines how children are aligned along the cross axis.
|
|
24
27
|
* Affects the alignment of items perpendicular to the main axis.
|
|
28
|
+
* @see View.AlignItems
|
|
25
29
|
* @default View.AlignItems.STRETCH
|
|
26
30
|
*/
|
|
27
31
|
alignItems?: ViewAlignItems;
|
|
28
32
|
/**
|
|
29
33
|
* Overrides the cross-axis alignment for a single child.
|
|
30
34
|
* Takes precedence over the container's align items property value.
|
|
35
|
+
* @see View.AlignItems
|
|
31
36
|
* @default undefined
|
|
32
37
|
*/
|
|
33
38
|
alignSelf?: ViewAlignSelf;
|
|
34
39
|
/**
|
|
35
40
|
* Only applies when there is wrapping in the container.
|
|
36
41
|
* Defines how multiple lines are spaced along the cross axis.
|
|
42
|
+
* @see View.AlignContent
|
|
37
43
|
* @default View.AlignContent.FLEX_START
|
|
38
44
|
*/
|
|
39
45
|
alignContent?: ViewAlignContent;
|
|
46
|
+
/**
|
|
47
|
+
* Top outer spacing.
|
|
48
|
+
* @see View.Spacing
|
|
49
|
+
* @default undefined
|
|
50
|
+
*/
|
|
51
|
+
marginTop?: ViewSpacing;
|
|
52
|
+
/**
|
|
53
|
+
* Top inner spacing.
|
|
54
|
+
* @see View.Spacing
|
|
55
|
+
* @default undefined
|
|
56
|
+
*/
|
|
57
|
+
paddingTop?: ViewSpacing;
|
|
58
|
+
/**
|
|
59
|
+
* Left outer spacing.
|
|
60
|
+
* @see View.Spacing
|
|
61
|
+
* @default undefined
|
|
62
|
+
*/
|
|
63
|
+
marginLeft?: ViewSpacing;
|
|
64
|
+
/**
|
|
65
|
+
* Left inner spacing.
|
|
66
|
+
* @see View.Spacing
|
|
67
|
+
* @default undefined
|
|
68
|
+
*/
|
|
69
|
+
paddingLeft?: ViewSpacing;
|
|
70
|
+
/**
|
|
71
|
+
* Right outer spacing.
|
|
72
|
+
* @see View.Spacing
|
|
73
|
+
* @default undefined
|
|
74
|
+
*/
|
|
75
|
+
marginRight?: ViewSpacing;
|
|
76
|
+
/**
|
|
77
|
+
* Right inner spacing.
|
|
78
|
+
* @see View.Spacing
|
|
79
|
+
* @default undefined
|
|
80
|
+
*/
|
|
81
|
+
paddingRight?: ViewSpacing;
|
|
82
|
+
/**
|
|
83
|
+
* Bottom outer spacing.
|
|
84
|
+
* @see View.Spacing
|
|
85
|
+
* @default undefined
|
|
86
|
+
*/
|
|
87
|
+
marginBottom?: ViewSpacing;
|
|
88
|
+
/**
|
|
89
|
+
* Bottom inner spacing.
|
|
90
|
+
* @see View.Spacing
|
|
91
|
+
* @default undefined
|
|
92
|
+
*/
|
|
93
|
+
paddingBottom?: ViewSpacing;
|
|
40
94
|
}
|
|
41
|
-
export type StyledViewProps = Pick<ViewProps, 'flexDirection' | 'justifyContent' | 'alignItems' | 'alignSelf' | 'alignContent'>;
|
|
42
95
|
export type ViewComponent = FunctionComponent<ViewProps> & {
|
|
43
96
|
Tag: Record<keyof typeof ViewTag, ViewTag>;
|
|
44
97
|
FlexDirection: Record<keyof typeof ViewFlexDirection, ViewFlexDirection>;
|
|
@@ -46,4 +99,15 @@ export type ViewComponent = FunctionComponent<ViewProps> & {
|
|
|
46
99
|
AlignItems: Record<keyof typeof ViewAlignItems, ViewAlignItems>;
|
|
47
100
|
AlignSelf: Record<keyof typeof ViewAlignSelf, ViewAlignSelf>;
|
|
48
101
|
AlignContent: Record<keyof typeof ViewAlignContent, ViewAlignContent>;
|
|
102
|
+
Spacing: Record<keyof typeof ViewSpacing, ViewSpacing>;
|
|
103
|
+
};
|
|
104
|
+
export type StyledViewProps = Pick<ViewProps, 'flexDirection' | 'justifyContent' | 'alignItems' | 'alignSelf' | 'alignContent'> & {
|
|
105
|
+
marginTop?: number;
|
|
106
|
+
paddingTop?: number;
|
|
107
|
+
marginLeft?: number;
|
|
108
|
+
paddingLeft?: number;
|
|
109
|
+
marginRight?: number;
|
|
110
|
+
paddingRight?: number;
|
|
111
|
+
marginBottom?: number;
|
|
112
|
+
paddingBottom?: number;
|
|
49
113
|
};
|
|
@@ -1 +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, 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, } from '../constants/theme';
|
|
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, 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,4 @@
|
|
|
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, 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';
|
|
2
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 { 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';
|
|
3
4
|
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,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base spacing theme constants.
|
|
3
|
+
* Supposed to be used for paddings, margins, gaps and etc.
|
|
4
|
+
*/
|
|
5
|
+
export declare const SPACING_BASE_X2S = 2;
|
|
6
|
+
export declare const SPACING_BASE_XS = 4;
|
|
7
|
+
export declare const SPACING_BASE_SM = 6;
|
|
8
|
+
export declare const SPACING_BASE_MD = 8;
|
|
9
|
+
export declare const SPACING_BASE_LG = 10;
|
|
10
|
+
export declare const SPACING_BASE_XL = 12;
|
|
11
|
+
export declare const SPACING_BASE_X2L = 14;
|
|
12
|
+
export declare const SPACING_BASE_X3L = 16;
|
|
13
|
+
export declare const SPACING_BASE_X4L = 20;
|
|
14
|
+
export declare const SPACING_BASE_X5L = 24;
|
|
15
|
+
export declare const SPACING_BASE_X6L = 28;
|
|
16
|
+
export declare const SPACING_BASE_X7L = 32;
|
|
@@ -264,6 +264,66 @@ export interface ThemeContextValue {
|
|
|
264
264
|
* Suitable for text elements that need a lot of breathing room.
|
|
265
265
|
*/
|
|
266
266
|
lineHeightBaseLoose: number;
|
|
267
|
+
/**
|
|
268
|
+
* Base 2 times extra-small spacing token.
|
|
269
|
+
* Rarely used – best for tight icon/text gaps or hairline adjustments.
|
|
270
|
+
*/
|
|
271
|
+
spacingBaseX2S: number;
|
|
272
|
+
/**
|
|
273
|
+
* Extra-small base spacing token.
|
|
274
|
+
* Ideal for compact elements like tag paddings or small icon separation.
|
|
275
|
+
*/
|
|
276
|
+
spacingBaseXS: number;
|
|
277
|
+
/**
|
|
278
|
+
* Small base spacing token.
|
|
279
|
+
* Great for dense layouts, or minor gaps.
|
|
280
|
+
*/
|
|
281
|
+
spacingBaseSM: number;
|
|
282
|
+
/**
|
|
283
|
+
* Base medium spacing token.
|
|
284
|
+
* Good default for most components like cards, inputs, or buttons.
|
|
285
|
+
*/
|
|
286
|
+
spacingBaseMD: number;
|
|
287
|
+
/**
|
|
288
|
+
* Large base spacing token.
|
|
289
|
+
* Nice for separating grouped elements or setting consistent gaps.
|
|
290
|
+
*/
|
|
291
|
+
spacingBaseLG: number;
|
|
292
|
+
/**
|
|
293
|
+
* Extra-large base spacing token.
|
|
294
|
+
* Useful between sections or to give components more breathing.
|
|
295
|
+
*/
|
|
296
|
+
spacingBaseXL: number;
|
|
297
|
+
/**
|
|
298
|
+
* Base 2 times extra-large spacing token.
|
|
299
|
+
* Fits well in modals or larger layout divisions.
|
|
300
|
+
*/
|
|
301
|
+
spacingBaseX2L: number;
|
|
302
|
+
/**
|
|
303
|
+
* Base 3 times extra-large spacing token.
|
|
304
|
+
* Helps emphasize hierarchy between layout blocks.
|
|
305
|
+
*/
|
|
306
|
+
spacingBaseX3L: number;
|
|
307
|
+
/**
|
|
308
|
+
* Base 4 times extra-large spacing token.
|
|
309
|
+
* Ideal for responsive paddings, section and outer margins.
|
|
310
|
+
*/
|
|
311
|
+
spacingBaseX4L: number;
|
|
312
|
+
/**
|
|
313
|
+
* Base 5 times extra-large spacing token.
|
|
314
|
+
* Great for container paddings, grid gaps, or large components.
|
|
315
|
+
*/
|
|
316
|
+
spacingBaseX5L: number;
|
|
317
|
+
/**
|
|
318
|
+
* Base 6 times extra-large spacing token.
|
|
319
|
+
* Works well in modal layouts or for generous top-level spacing.
|
|
320
|
+
*/
|
|
321
|
+
spacingBaseX6L: number;
|
|
322
|
+
/**
|
|
323
|
+
* Base 7 times extra-large spacing token.
|
|
324
|
+
* Used for large layout sections or when significant whitespace is needed.
|
|
325
|
+
*/
|
|
326
|
+
spacingBaseX7L: number;
|
|
267
327
|
}
|
|
268
328
|
export type ThemeContextProviderProps = PropsWithChildren<Partial<ThemeContextValue>>;
|
|
269
329
|
export type ThemeContextProviderComponent = FunctionComponent<ThemeContextProviderProps>;
|