@tidbcloud/uikit 2.0.0-beta.8 → 2.0.0-beta.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tidbcloud/uikit
2
2
 
3
+ ## 2.0.0-beta.9
4
+
5
+ ### Minor Changes
6
+
7
+ - Update button styles and typography colors
8
+
3
9
  ## 2.0.0-beta.8
4
10
 
5
11
  ### Minor Changes
@@ -9,7 +9,7 @@ const TYPOGRAPHY_STYLES_MAP = {
9
9
  weight: 700,
10
10
  size: 18,
11
11
  lh: "28px",
12
- color: "gray.8"
12
+ color: "carbon.8"
13
13
  },
14
14
  display: {
15
15
  weight: 700,
@@ -25,31 +25,31 @@ const TYPOGRAPHY_STYLES_MAP = {
25
25
  weight: 700,
26
26
  size: 16,
27
27
  lh: "24px",
28
- color: "gray.7"
28
+ color: "carbon.7"
29
29
  },
30
30
  body1: {
31
31
  weight: 400,
32
32
  size: 14,
33
33
  lh: "20px",
34
- color: "gray.7"
34
+ color: "carbon.7"
35
35
  },
36
36
  body2: {
37
37
  weight: 500,
38
38
  size: 14,
39
39
  lh: "20px",
40
- color: "gray.8"
40
+ color: "carbon.8"
41
41
  },
42
42
  body3: {
43
43
  weight: 600,
44
44
  size: 14,
45
45
  lh: "20px",
46
- color: "gray.9"
46
+ color: "carbon.9"
47
47
  },
48
48
  btn: {
49
49
  weight: 700,
50
50
  size: 14,
51
51
  lh: "20px",
52
- color: "gray.8"
52
+ color: "carbon.8"
53
53
  },
54
54
  comment3: {
55
55
  size: 12,
@@ -61,103 +61,103 @@ const TYPOGRAPHY_STYLES_MAP = {
61
61
  size: 24,
62
62
  lh: "32px",
63
63
  weight: 700,
64
- color: "gray.9"
64
+ color: "carbon.9"
65
65
  },
66
66
  "headline-md": {
67
67
  size: 20,
68
68
  lh: "30px",
69
69
  weight: 700,
70
- color: "gray.9"
70
+ color: "carbon.9"
71
71
  },
72
72
  "headline-sm": {
73
73
  size: 18,
74
74
  lh: "28px",
75
75
  weight: 700,
76
- color: "gray.9"
76
+ color: "carbon.9"
77
77
  },
78
78
  "title-lg": {
79
79
  size: 16,
80
80
  lh: "24px",
81
81
  weight: 700,
82
- color: "gray.9"
82
+ color: "carbon.9"
83
83
  },
84
84
  "title-md": {
85
85
  size: 14,
86
86
  lh: "20px",
87
87
  weight: 700,
88
- color: "gray.9"
88
+ color: "carbon.9"
89
89
  },
90
90
  "title-sm": {
91
91
  size: 12,
92
92
  lh: "18px",
93
93
  weight: 700,
94
- color: "gray.9"
94
+ color: "carbon.9"
95
95
  },
96
96
  "action-lg": {
97
97
  size: 16,
98
98
  lh: "24px",
99
99
  weight: 600,
100
- color: "cyan.7"
100
+ color: "peacock.7"
101
101
  },
102
102
  "action-md": {
103
103
  size: 14,
104
104
  lh: "20px",
105
105
  weight: 600,
106
- color: "cyan.7"
106
+ color: "peacock.7"
107
107
  },
108
108
  "action-sm": {
109
109
  size: 12,
110
110
  lh: "18px",
111
111
  weight: 600,
112
- color: "cyan.7"
112
+ color: "peacock.7"
113
113
  },
114
114
  "label-lg": {
115
115
  size: 14,
116
116
  lh: "20px",
117
117
  weight: 500,
118
- color: "gray.8"
118
+ color: "carbon.8"
119
119
  },
120
120
  "label-md": {
121
121
  size: 13,
122
122
  lh: "18px",
123
123
  weight: 500,
124
- color: "gray.8"
124
+ color: "carbon.8"
125
125
  },
126
126
  "label-sm": {
127
127
  size: 12,
128
128
  lh: "18px",
129
129
  weight: 500,
130
- color: "gray.8"
130
+ color: "carbon.8"
131
131
  },
132
132
  "label-xs": {
133
133
  size: 11,
134
134
  lh: "16px",
135
135
  weight: 500,
136
- color: "gray.8"
136
+ color: "carbon.8"
137
137
  },
138
138
  "body-lg": {
139
139
  size: 14,
140
140
  lh: "20px",
141
141
  weight: 400,
142
- color: "gray.7"
142
+ color: "carbon.8"
143
143
  },
144
144
  "body-md": {
145
145
  size: 13,
146
146
  lh: "18px",
147
147
  weight: 400,
148
- color: "gray.7"
148
+ color: "carbon.8"
149
149
  },
150
150
  "body-sm": {
151
151
  size: 12,
152
152
  lh: "18px",
153
153
  weight: 400,
154
- color: "gray.7"
154
+ color: "carbon.8"
155
155
  },
156
156
  "body-xs": {
157
157
  size: 11,
158
158
  lh: "16px",
159
159
  weight: 400,
160
- color: "gray.7"
160
+ color: "carbon.8"
161
161
  }
162
162
  };
163
163
  const _Typography = React.forwardRef(({ children, variant, ...rest }, ref) => {
@@ -7,7 +7,7 @@ const TYPOGRAPHY_STYLES_MAP = {
7
7
  weight: 700,
8
8
  size: 18,
9
9
  lh: "28px",
10
- color: "gray.8"
10
+ color: "carbon.8"
11
11
  },
12
12
  display: {
13
13
  weight: 700,
@@ -23,31 +23,31 @@ const TYPOGRAPHY_STYLES_MAP = {
23
23
  weight: 700,
24
24
  size: 16,
25
25
  lh: "24px",
26
- color: "gray.7"
26
+ color: "carbon.7"
27
27
  },
28
28
  body1: {
29
29
  weight: 400,
30
30
  size: 14,
31
31
  lh: "20px",
32
- color: "gray.7"
32
+ color: "carbon.7"
33
33
  },
34
34
  body2: {
35
35
  weight: 500,
36
36
  size: 14,
37
37
  lh: "20px",
38
- color: "gray.8"
38
+ color: "carbon.8"
39
39
  },
40
40
  body3: {
41
41
  weight: 600,
42
42
  size: 14,
43
43
  lh: "20px",
44
- color: "gray.9"
44
+ color: "carbon.9"
45
45
  },
46
46
  btn: {
47
47
  weight: 700,
48
48
  size: 14,
49
49
  lh: "20px",
50
- color: "gray.8"
50
+ color: "carbon.8"
51
51
  },
52
52
  comment3: {
53
53
  size: 12,
@@ -59,103 +59,103 @@ const TYPOGRAPHY_STYLES_MAP = {
59
59
  size: 24,
60
60
  lh: "32px",
61
61
  weight: 700,
62
- color: "gray.9"
62
+ color: "carbon.9"
63
63
  },
64
64
  "headline-md": {
65
65
  size: 20,
66
66
  lh: "30px",
67
67
  weight: 700,
68
- color: "gray.9"
68
+ color: "carbon.9"
69
69
  },
70
70
  "headline-sm": {
71
71
  size: 18,
72
72
  lh: "28px",
73
73
  weight: 700,
74
- color: "gray.9"
74
+ color: "carbon.9"
75
75
  },
76
76
  "title-lg": {
77
77
  size: 16,
78
78
  lh: "24px",
79
79
  weight: 700,
80
- color: "gray.9"
80
+ color: "carbon.9"
81
81
  },
82
82
  "title-md": {
83
83
  size: 14,
84
84
  lh: "20px",
85
85
  weight: 700,
86
- color: "gray.9"
86
+ color: "carbon.9"
87
87
  },
88
88
  "title-sm": {
89
89
  size: 12,
90
90
  lh: "18px",
91
91
  weight: 700,
92
- color: "gray.9"
92
+ color: "carbon.9"
93
93
  },
94
94
  "action-lg": {
95
95
  size: 16,
96
96
  lh: "24px",
97
97
  weight: 600,
98
- color: "cyan.7"
98
+ color: "peacock.7"
99
99
  },
100
100
  "action-md": {
101
101
  size: 14,
102
102
  lh: "20px",
103
103
  weight: 600,
104
- color: "cyan.7"
104
+ color: "peacock.7"
105
105
  },
106
106
  "action-sm": {
107
107
  size: 12,
108
108
  lh: "18px",
109
109
  weight: 600,
110
- color: "cyan.7"
110
+ color: "peacock.7"
111
111
  },
112
112
  "label-lg": {
113
113
  size: 14,
114
114
  lh: "20px",
115
115
  weight: 500,
116
- color: "gray.8"
116
+ color: "carbon.8"
117
117
  },
118
118
  "label-md": {
119
119
  size: 13,
120
120
  lh: "18px",
121
121
  weight: 500,
122
- color: "gray.8"
122
+ color: "carbon.8"
123
123
  },
124
124
  "label-sm": {
125
125
  size: 12,
126
126
  lh: "18px",
127
127
  weight: 500,
128
- color: "gray.8"
128
+ color: "carbon.8"
129
129
  },
130
130
  "label-xs": {
131
131
  size: 11,
132
132
  lh: "16px",
133
133
  weight: 500,
134
- color: "gray.8"
134
+ color: "carbon.8"
135
135
  },
136
136
  "body-lg": {
137
137
  size: 14,
138
138
  lh: "20px",
139
139
  weight: 400,
140
- color: "gray.7"
140
+ color: "carbon.8"
141
141
  },
142
142
  "body-md": {
143
143
  size: 13,
144
144
  lh: "18px",
145
145
  weight: 400,
146
- color: "gray.7"
146
+ color: "carbon.8"
147
147
  },
148
148
  "body-sm": {
149
149
  size: 12,
150
150
  lh: "18px",
151
151
  weight: 400,
152
- color: "gray.7"
152
+ color: "carbon.8"
153
153
  },
154
154
  "body-xs": {
155
155
  size: 11,
156
156
  lh: "16px",
157
157
  weight: 400,
158
- color: "gray.7"
158
+ color: "carbon.8"
159
159
  }
160
160
  };
161
161
  const _Typography = forwardRef(({ children, variant, ...rest }, ref) => {
@@ -5,6 +5,7 @@ const theme = require("./theme.cjs");
5
5
  const variant = require("./fns/variant.cjs");
6
6
  exports.FONT_FAMILY = font.FONT_FAMILY;
7
7
  exports.MONOSPANCED_FONT_FAMILY = font.MONOSPANCED_FONT_FAMILY;
8
+ exports.Colors = theme.Colors;
8
9
  exports.useTheme = theme.useTheme;
9
10
  exports.getColorIndexInfo = variant.getColorIndexInfo;
10
11
  exports.getVariant = variant.getVariant;
@@ -1,4 +1,4 @@
1
1
  export * from './fns/index.js';
2
2
  export { FONT_FAMILY, MONOSPANCED_FONT_FAMILY } from './font.js';
3
- export { useTheme } from './theme.js';
3
+ export { useTheme, Colors } from './theme.js';
4
4
  export type { Color, ColorMap } from './theme.js';
@@ -1,4 +1,4 @@
1
1
  export * from './fns/index.js';
2
2
  export { FONT_FAMILY, MONOSPANCED_FONT_FAMILY } from './font.js';
3
- export { useTheme } from './theme.js';
3
+ export { useTheme, Colors } from './theme.js';
4
4
  export type { Color, ColorMap } from './theme.js';
@@ -1,7 +1,8 @@
1
1
  import { FONT_FAMILY, MONOSPANCED_FONT_FAMILY } from "./font.js";
2
- import { useTheme } from "./theme.js";
2
+ import { Colors, useTheme } from "./theme.js";
3
3
  import { getColorIndexInfo, getVariant } from "./fns/variant.js";
4
4
  export {
5
+ Colors,
5
6
  FONT_FAMILY,
6
7
  MONOSPANCED_FONT_FAMILY,
7
8
  getColorIndexInfo,
@@ -4,27 +4,120 @@ const colors_dark = require("./colors.dark.cjs");
4
4
  const colors = require("./colors.cjs");
5
5
  const font = require("./font.cjs");
6
6
  const react = require("@emotion/react");
7
+ const Colors = Object.keys(colors);
7
8
  const getButtonStyles = (theme2, params) => {
8
- const hoverStyles = params.variant === "subtle" ? theme2.fn.hover({
9
- backgroundColor: "transparent"
10
- }) : {};
11
- const diffSizeStyles = {
9
+ const getFilledStyles = () => {
10
+ const color = params.color || theme2.primaryColor;
11
+ const bgColor = theme2.colors[params.color || theme2.primaryColor];
12
+ const bgColorShade = color === "carbon" ? 9 : theme2.fn.primaryShade();
13
+ const hoverBgColorShade = color === "carbon" ? bgColorShade - 1 : bgColorShade + 1;
14
+ return {
15
+ color: theme2.white,
16
+ backgroundColor: bgColor[bgColorShade],
17
+ ...theme2.fn.hover({
18
+ backgroundColor: bgColor[hoverBgColorShade]
19
+ }),
20
+ "&:disabled": {
21
+ color: theme2.white,
22
+ backgroundColor: bgColor[5]
23
+ }
24
+ };
25
+ };
26
+ const getLightStyles = () => {
27
+ const mainColor = theme2.colors[params.color || "peacock"];
28
+ const fontColorShade = 7;
29
+ const bgColorShade = 1;
30
+ const borderColorShade = 4;
31
+ return {
32
+ color: mainColor[fontColorShade],
33
+ backgroundColor: mainColor[bgColorShade],
34
+ borderWidth: 1,
35
+ borderStyle: "solid",
36
+ borderColor: mainColor[borderColorShade],
37
+ ...theme2.fn.hover({
38
+ color: mainColor[fontColorShade + 1],
39
+ borderColor: mainColor[borderColorShade + 1],
40
+ backgroundColor: mainColor[bgColorShade + 1]
41
+ }),
42
+ "&:disabled": {
43
+ color: theme2.colors[theme2.primaryColor][6],
44
+ borderColor: theme2.colors[theme2.primaryColor][borderColorShade + 1],
45
+ backgroundColor: theme2.colors[theme2.primaryColor][2]
46
+ }
47
+ };
48
+ };
49
+ const getDefaultStyles = () => {
50
+ const color = params.color || theme2.primaryColor;
51
+ const mainColor = theme2.colors[color];
52
+ const fontColorShade = color === "carbon" ? 8 : 7;
53
+ const bgColorShade = 1;
54
+ const borderColorShade = color === "carbon" ? 5 : 4;
55
+ return {
56
+ color: mainColor[fontColorShade],
57
+ backgroundColor: mainColor[bgColorShade],
58
+ borderColor: mainColor[borderColorShade],
59
+ ...theme2.fn.hover({
60
+ color: mainColor[fontColorShade + 1],
61
+ borderColor: mainColor[borderColorShade + 1],
62
+ backgroundColor: mainColor[bgColorShade + 1]
63
+ }),
64
+ "&:disabled": {
65
+ color: theme2.colors[theme2.primaryColor][6],
66
+ borderColor: theme2.colors[theme2.primaryColor][borderColorShade + 1],
67
+ backgroundColor: theme2.colors[theme2.primaryColor][2]
68
+ }
69
+ };
70
+ };
71
+ const getSubtleStyles = () => {
72
+ const color = params.color || "peacock";
73
+ const mainColor = theme2.colors[color];
74
+ const fontColorShade = 7;
75
+ const bgColorShade = 1;
76
+ return {
77
+ color: mainColor[fontColorShade],
78
+ backgroundColor: theme2.white,
79
+ ...theme2.fn.hover({
80
+ color: mainColor[fontColorShade + 1],
81
+ backgroundColor: mainColor[bgColorShade + 1]
82
+ }),
83
+ "&:disabled": {
84
+ color: theme2.colors[theme2.primaryColor][6],
85
+ backgroundColor: theme2.white
86
+ }
87
+ };
88
+ };
89
+ const variantStyles = {
90
+ filled: getFilledStyles(),
91
+ light: getLightStyles(),
92
+ default: getDefaultStyles(),
93
+ subtle: getSubtleStyles(),
94
+ outline: getDefaultStyles()
95
+ };
96
+ const sizeStyles = {
97
+ xs: {
98
+ height: 28
99
+ },
12
100
  sm: {
101
+ height: 32
102
+ },
103
+ md: {
13
104
  height: 40
105
+ },
106
+ lg: {
107
+ height: 48
108
+ },
109
+ xl: {
110
+ height: 56
14
111
  }
15
112
  };
16
- const matches = diffSizeStyles[params.size] || {};
17
- const withBorder = params.variant === "light" ? {
18
- border: `1px solid ${theme2.colors[params.color || "blue"][4]}`
19
- } : {};
20
- return {
113
+ const finalStyles = {
21
114
  root: {
22
115
  fontWeight: 700,
23
- ...matches,
24
- ...hoverStyles,
25
- ...withBorder
116
+ ...variantStyles[params.variant],
117
+ ...sizeStyles[params.size]
26
118
  }
27
119
  };
120
+ return finalStyles;
28
121
  };
29
122
  const getInputStyles = (theme2, params) => {
30
123
  const inputStyle = {
@@ -96,6 +189,13 @@ const theme = {
96
189
  lg: "0px 8px 64px rgba(0, 0, 0, 0.08)",
97
190
  xl: "0px 16px 64px rgba(0, 0, 0, 0.08)"
98
191
  },
192
+ fontSizes: {
193
+ xs: 12,
194
+ sm: 14,
195
+ md: 14,
196
+ lg: 18,
197
+ xl: 20
198
+ },
99
199
  globalStyles(theme2) {
100
200
  var _a, _b;
101
201
  return {
@@ -112,6 +212,11 @@ const theme = {
112
212
  },
113
213
  components: {
114
214
  Button: {
215
+ defaultProps() {
216
+ return {
217
+ size: "md"
218
+ };
219
+ },
115
220
  styles: getButtonStyles
116
221
  },
117
222
  Loader: {
@@ -546,4 +651,5 @@ const useTheme = (colorScheme) => {
546
651
  black: colors$1.carbon[8]
547
652
  };
548
653
  };
654
+ exports.Colors = Colors;
549
655
  exports.useTheme = useTheme;
@@ -3,6 +3,7 @@ import { MantineThemeOverride } from '@mantine/core';
3
3
  import * as light from './colors.js';
4
4
  export type ColorMap = typeof light;
5
5
  export type Color = keyof ColorMap;
6
+ export declare const Colors: Color[];
6
7
  export type Theme = MantineThemeOverride & {
7
8
  colors: ColorMap;
8
9
  };
@@ -3,6 +3,7 @@ import { MantineThemeOverride } from '@mantine/core';
3
3
  import * as light from './colors.js';
4
4
  export type ColorMap = typeof light;
5
5
  export type Color = keyof ColorMap;
6
+ export declare const Colors: Color[];
6
7
  export type Theme = MantineThemeOverride & {
7
8
  colors: ColorMap;
8
9
  };
@@ -2,27 +2,120 @@ import * as colors_dark from "./colors.dark.js";
2
2
  import * as colors from "./colors.js";
3
3
  import { FONT_FAMILY } from "./font.js";
4
4
  import { keyframes } from "@emotion/react";
5
+ const Colors = Object.keys(colors);
5
6
  const getButtonStyles = (theme2, params) => {
6
- const hoverStyles = params.variant === "subtle" ? theme2.fn.hover({
7
- backgroundColor: "transparent"
8
- }) : {};
9
- const diffSizeStyles = {
7
+ const getFilledStyles = () => {
8
+ const color = params.color || theme2.primaryColor;
9
+ const bgColor = theme2.colors[params.color || theme2.primaryColor];
10
+ const bgColorShade = color === "carbon" ? 9 : theme2.fn.primaryShade();
11
+ const hoverBgColorShade = color === "carbon" ? bgColorShade - 1 : bgColorShade + 1;
12
+ return {
13
+ color: theme2.white,
14
+ backgroundColor: bgColor[bgColorShade],
15
+ ...theme2.fn.hover({
16
+ backgroundColor: bgColor[hoverBgColorShade]
17
+ }),
18
+ "&:disabled": {
19
+ color: theme2.white,
20
+ backgroundColor: bgColor[5]
21
+ }
22
+ };
23
+ };
24
+ const getLightStyles = () => {
25
+ const mainColor = theme2.colors[params.color || "peacock"];
26
+ const fontColorShade = 7;
27
+ const bgColorShade = 1;
28
+ const borderColorShade = 4;
29
+ return {
30
+ color: mainColor[fontColorShade],
31
+ backgroundColor: mainColor[bgColorShade],
32
+ borderWidth: 1,
33
+ borderStyle: "solid",
34
+ borderColor: mainColor[borderColorShade],
35
+ ...theme2.fn.hover({
36
+ color: mainColor[fontColorShade + 1],
37
+ borderColor: mainColor[borderColorShade + 1],
38
+ backgroundColor: mainColor[bgColorShade + 1]
39
+ }),
40
+ "&:disabled": {
41
+ color: theme2.colors[theme2.primaryColor][6],
42
+ borderColor: theme2.colors[theme2.primaryColor][borderColorShade + 1],
43
+ backgroundColor: theme2.colors[theme2.primaryColor][2]
44
+ }
45
+ };
46
+ };
47
+ const getDefaultStyles = () => {
48
+ const color = params.color || theme2.primaryColor;
49
+ const mainColor = theme2.colors[color];
50
+ const fontColorShade = color === "carbon" ? 8 : 7;
51
+ const bgColorShade = 1;
52
+ const borderColorShade = color === "carbon" ? 5 : 4;
53
+ return {
54
+ color: mainColor[fontColorShade],
55
+ backgroundColor: mainColor[bgColorShade],
56
+ borderColor: mainColor[borderColorShade],
57
+ ...theme2.fn.hover({
58
+ color: mainColor[fontColorShade + 1],
59
+ borderColor: mainColor[borderColorShade + 1],
60
+ backgroundColor: mainColor[bgColorShade + 1]
61
+ }),
62
+ "&:disabled": {
63
+ color: theme2.colors[theme2.primaryColor][6],
64
+ borderColor: theme2.colors[theme2.primaryColor][borderColorShade + 1],
65
+ backgroundColor: theme2.colors[theme2.primaryColor][2]
66
+ }
67
+ };
68
+ };
69
+ const getSubtleStyles = () => {
70
+ const color = params.color || "peacock";
71
+ const mainColor = theme2.colors[color];
72
+ const fontColorShade = 7;
73
+ const bgColorShade = 1;
74
+ return {
75
+ color: mainColor[fontColorShade],
76
+ backgroundColor: theme2.white,
77
+ ...theme2.fn.hover({
78
+ color: mainColor[fontColorShade + 1],
79
+ backgroundColor: mainColor[bgColorShade + 1]
80
+ }),
81
+ "&:disabled": {
82
+ color: theme2.colors[theme2.primaryColor][6],
83
+ backgroundColor: theme2.white
84
+ }
85
+ };
86
+ };
87
+ const variantStyles = {
88
+ filled: getFilledStyles(),
89
+ light: getLightStyles(),
90
+ default: getDefaultStyles(),
91
+ subtle: getSubtleStyles(),
92
+ outline: getDefaultStyles()
93
+ };
94
+ const sizeStyles = {
95
+ xs: {
96
+ height: 28
97
+ },
10
98
  sm: {
99
+ height: 32
100
+ },
101
+ md: {
11
102
  height: 40
103
+ },
104
+ lg: {
105
+ height: 48
106
+ },
107
+ xl: {
108
+ height: 56
12
109
  }
13
110
  };
14
- const matches = diffSizeStyles[params.size] || {};
15
- const withBorder = params.variant === "light" ? {
16
- border: `1px solid ${theme2.colors[params.color || "blue"][4]}`
17
- } : {};
18
- return {
111
+ const finalStyles = {
19
112
  root: {
20
113
  fontWeight: 700,
21
- ...matches,
22
- ...hoverStyles,
23
- ...withBorder
114
+ ...variantStyles[params.variant],
115
+ ...sizeStyles[params.size]
24
116
  }
25
117
  };
118
+ return finalStyles;
26
119
  };
27
120
  const getInputStyles = (theme2, params) => {
28
121
  const inputStyle = {
@@ -94,6 +187,13 @@ const theme = {
94
187
  lg: "0px 8px 64px rgba(0, 0, 0, 0.08)",
95
188
  xl: "0px 16px 64px rgba(0, 0, 0, 0.08)"
96
189
  },
190
+ fontSizes: {
191
+ xs: 12,
192
+ sm: 14,
193
+ md: 14,
194
+ lg: 18,
195
+ xl: 20
196
+ },
97
197
  globalStyles(theme2) {
98
198
  var _a, _b;
99
199
  return {
@@ -110,6 +210,11 @@ const theme = {
110
210
  },
111
211
  components: {
112
212
  Button: {
213
+ defaultProps() {
214
+ return {
215
+ size: "md"
216
+ };
217
+ },
113
218
  styles: getButtonStyles
114
219
  },
115
220
  Loader: {
@@ -545,5 +650,6 @@ const useTheme = (colorScheme) => {
545
650
  };
546
651
  };
547
652
  export {
653
+ Colors,
548
654
  useTheme
549
655
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tidbcloud/uikit",
3
- "version": "2.0.0-beta.8",
3
+ "version": "2.0.0-beta.9",
4
4
  "description": "tidbcloud uikit",
5
5
  "type": "module",
6
6
  "main": "dist/primitive/index.cjs",