@teamturing/react-kit 2.0.0 → 2.1.0
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/dist/core/GradientText/index.d.ts +1 -1
- package/dist/core/ThemeProvider/index.d.ts +9 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +140 -50
- package/dist/theme/index.d.ts +226 -0
- package/esm/core/Button/index.js +21 -20
- package/esm/core/Chip/index.js +3 -2
- package/esm/core/Grid/index.js +2 -0
- package/esm/core/IconButton/index.js +21 -19
- package/esm/core/IconToggleButton/index.js +4 -2
- package/esm/core/Spinner/index.js +2 -0
- package/esm/core/Stack/index.js +2 -0
- package/esm/core/Text/index.js +1 -0
- package/esm/core/ThemeProvider/index.js +16 -0
- package/esm/enigma/EnigmaUI/index.js +2 -0
- package/esm/index.js +2 -0
- package/esm/packages/token-studio/esm/foundation/gradient/colorStopList/index.js +8 -0
- package/esm/packages/token-studio/esm/foundation/gradient/direction/index.js +8 -0
- package/esm/packages/token-studio/esm/foundation/shadow/index.js +5 -0
- package/esm/packages/token-studio/esm/token/color/index.js +8 -7
- package/esm/packages/token-studio/esm/token/elevation/index.js +16 -0
- package/esm/packages/token-studio/esm/token/gradient/index.js +33 -0
- package/esm/theme/index.js +29 -0
- package/package.json +3 -3
|
@@ -17,7 +17,7 @@ const textColor = {
|
|
|
17
17
|
'text/success': palette.green500,
|
|
18
18
|
'text/warning': palette.yellow500,
|
|
19
19
|
'text/danger': palette.red500,
|
|
20
|
-
'text/selected
|
|
20
|
+
'text/selected': palette.gray900
|
|
21
21
|
};
|
|
22
22
|
const bgColor = {
|
|
23
23
|
'bg/secondary': palette.violet50,
|
|
@@ -44,16 +44,16 @@ const bgColor = {
|
|
|
44
44
|
'bg/disabled': palette.gray100,
|
|
45
45
|
'bg/disabled/subtlest': palette.transparent,
|
|
46
46
|
'bg/input': palette.white,
|
|
47
|
+
'bg/accent/blue/subtlest': palette.blue50,
|
|
47
48
|
'bg/accent/green/subtlest': palette.green50,
|
|
48
49
|
'bg/accent/yellow/subtlest': palette.yellow50,
|
|
49
50
|
'bg/accent/red/subtlest': palette.red50,
|
|
50
51
|
'bg/accent/red/subtle': palette.red400,
|
|
51
52
|
'bg/accent/red': palette.red500,
|
|
52
53
|
'bg/accent/gray/subtlest': palette.gray200,
|
|
53
|
-
'bg/accent/blue/subtlest': palette.blue50,
|
|
54
54
|
'bg/selected/violet': palette.violet500,
|
|
55
|
-
'bg/selected
|
|
56
|
-
'bg/selected/
|
|
55
|
+
'bg/selected': palette.gray900,
|
|
56
|
+
'bg/selected/subtle': palette.gray100,
|
|
57
57
|
'bg/inverse': palette.black,
|
|
58
58
|
'bg/inverse/subtlest': palette.white10A,
|
|
59
59
|
'bg/success': palette.green50,
|
|
@@ -71,6 +71,7 @@ const borderColor = {
|
|
|
71
71
|
'border/neutral/bolder': palette.gray300,
|
|
72
72
|
'border/input': palette.gray200,
|
|
73
73
|
'border/inverse': palette.white10A,
|
|
74
|
+
'border/selected': palette.gray900,
|
|
74
75
|
'border/disabled': palette.gray100,
|
|
75
76
|
'border/primary': palette.violet500,
|
|
76
77
|
'border/hovered': palette.blue300,
|
|
@@ -91,10 +92,10 @@ const iconColor = {
|
|
|
91
92
|
'icon/inverse': palette.white,
|
|
92
93
|
'icon/disabled': palette.gray300,
|
|
93
94
|
'icon/disabled/subtler': palette.gray200,
|
|
94
|
-
'icon/selected/
|
|
95
|
-
'icon/selected
|
|
96
|
-
'icon/primary': palette.violet500,
|
|
95
|
+
'icon/selected/violet': palette.violet500,
|
|
96
|
+
'icon/selected': palette.gray900,
|
|
97
97
|
'icon/primary/subtle': palette.violet300,
|
|
98
|
+
'icon/primary': palette.violet500,
|
|
98
99
|
'icon/primary/bold': palette.violet700,
|
|
99
100
|
'icon/success': palette.green500,
|
|
100
101
|
'icon/warning': palette.yellow500,
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import palette from '../../foundation/palette/index.js';
|
|
2
|
+
import shadow from '../../foundation/shadow/index.js';
|
|
3
|
+
|
|
4
|
+
const surfaceElevation = {
|
|
5
|
+
'surface': palette.white,
|
|
6
|
+
'surface/overlay': palette.white
|
|
7
|
+
};
|
|
8
|
+
const shadowElevation = {
|
|
9
|
+
'shadow/overlay': shadow.shadowMedium
|
|
10
|
+
};
|
|
11
|
+
({
|
|
12
|
+
...surfaceElevation,
|
|
13
|
+
...shadowElevation
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export { shadowElevation, surfaceElevation };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import colorStopList from '../../foundation/gradient/colorStopList/index.js';
|
|
2
|
+
import direction from '../../foundation/gradient/direction/index.js';
|
|
3
|
+
|
|
4
|
+
const generateGradientTokenValue = (direction$1, colorStopList$1) => `${direction[direction$1]}, ${colorStopList[colorStopList$1]}`;
|
|
5
|
+
const textGradient = {
|
|
6
|
+
'text/accent': generateGradientTokenValue('directionToRightBottom', 'colorStopListVioletPink')
|
|
7
|
+
};
|
|
8
|
+
const bgGradient = {
|
|
9
|
+
'bg/accent/violet': generateGradientTokenValue('directionToRightBottom', 'colorStopListVioletPink'),
|
|
10
|
+
'bg/accent/neutral': generateGradientTokenValue('directionToRightBottom', 'colorStopListBlackGray')
|
|
11
|
+
};
|
|
12
|
+
const borderGradient = {
|
|
13
|
+
'border/accent/violet': generateGradientTokenValue('directionToRightBottom', 'colorStopListVioletPink')
|
|
14
|
+
};
|
|
15
|
+
const overlayGradient = {
|
|
16
|
+
'overlay/subtlest/toright': generateGradientTokenValue('directionToRight', 'colorStopListWhite'),
|
|
17
|
+
'overlay/subtlest/toleft': generateGradientTokenValue('directionToLeft', 'colorStopListWhite'),
|
|
18
|
+
'overlay/subtlest/totop': generateGradientTokenValue('directionToTop', 'colorStopListWhite'),
|
|
19
|
+
'overlay/floating/toright': generateGradientTokenValue('directionToRight', 'colorStopListWhite'),
|
|
20
|
+
'overlay/floating/toleft': generateGradientTokenValue('directionToLeft', 'colorStopListWhite'),
|
|
21
|
+
'overlay/floating/totop': generateGradientTokenValue('directionToTop', 'colorStopListWhite'),
|
|
22
|
+
'overlay/bold/toright': generateGradientTokenValue('directionToRight', 'colorStopListBlack'),
|
|
23
|
+
'overlay/bold/toleft': generateGradientTokenValue('directionToLeft', 'colorStopListBlack'),
|
|
24
|
+
'overlay/bold/totop': generateGradientTokenValue('directionToTop', 'colorStopListBlack')
|
|
25
|
+
};
|
|
26
|
+
const gradient = {
|
|
27
|
+
...textGradient,
|
|
28
|
+
...bgGradient,
|
|
29
|
+
...borderGradient,
|
|
30
|
+
...overlayGradient
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { bgGradient, borderGradient, gradient as default, overlayGradient, textGradient };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import breakpoints from '../packages/token-studio/esm/token/breakpoints/index.js';
|
|
2
|
+
import color from '../packages/token-studio/esm/token/color/index.js';
|
|
3
|
+
import { surfaceElevation, shadowElevation } from '../packages/token-studio/esm/token/elevation/index.js';
|
|
4
|
+
import gradient from '../packages/token-studio/esm/token/gradient/index.js';
|
|
5
|
+
import radii from '../packages/token-studio/esm/token/radii/index.js';
|
|
6
|
+
import space from '../packages/token-studio/esm/token/space/index.js';
|
|
7
|
+
import '../packages/token-studio/esm/token/typography/index.js';
|
|
8
|
+
import fontSizes from '../packages/token-studio/esm/token/typography/fontSizes.js';
|
|
9
|
+
import fontWeights from '../packages/token-studio/esm/token/typography/fontWeights.js';
|
|
10
|
+
import lineHeights from '../packages/token-studio/esm/token/typography/lineHeights.js';
|
|
11
|
+
|
|
12
|
+
const theme = {
|
|
13
|
+
breakpoints,
|
|
14
|
+
space,
|
|
15
|
+
fontWeights,
|
|
16
|
+
fontSizes,
|
|
17
|
+
lineHeights,
|
|
18
|
+
radii,
|
|
19
|
+
colors: {
|
|
20
|
+
...color,
|
|
21
|
+
surfaceElevation
|
|
22
|
+
},
|
|
23
|
+
gradients: gradient,
|
|
24
|
+
shadows: {
|
|
25
|
+
...shadowElevation
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { theme as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@teamturing/icons": "^1.19.0",
|
|
53
|
-
"@teamturing/token-studio": "^1.1.
|
|
53
|
+
"@teamturing/token-studio": "^1.1.7",
|
|
54
54
|
"lodash.debounce": "^4.0.8",
|
|
55
55
|
"lodash.throttle": "^4.1.1",
|
|
56
56
|
"styled-system": "^5.1.5"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "ff56ac7dc09f3aa5318b939a50aae9d0fdbc522c"
|
|
59
59
|
}
|