@tidbcloud/uikit 2.0.0-beta.37 → 2.0.0-beta.39
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 +13 -1
- package/dist/biz/PhoneInput/styles.cjs +32 -17
- package/dist/biz/PhoneInput/styles.js +32 -17
- package/dist/biz/Table/ProTable/ProTable.cjs +7 -0
- package/dist/biz/Table/ProTable/ProTable.d.cts +1 -1
- package/dist/biz/Table/ProTable/ProTable.d.ts +1 -1
- package/dist/biz/Table/ProTable/ProTable.js +7 -0
- package/dist/biz/TimeRangePicker/index.cjs +3 -3
- package/dist/biz/TimeRangePicker/index.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
# @tidbcloud/uikit
|
|
2
2
|
|
|
3
|
+
## 2.0.0-beta.39
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- update phone input style, update table height
|
|
8
|
+
|
|
9
|
+
## 2.0.0-beta.38
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- update timerangepicker style
|
|
14
|
+
|
|
3
15
|
## 2.0.0-beta.37
|
|
4
16
|
|
|
5
|
-
###
|
|
17
|
+
### Minor Changes
|
|
6
18
|
|
|
7
19
|
- add tableList,block icon
|
|
8
20
|
|
|
@@ -2,10 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const createStyles = require("../../node_modules/.pnpm/@mantine_styles@5.10.4_patch_hash_gj5o633amdkv7b52vinsxkrrr4_@emotion_react@11.13.0_react-dom@18.3.1_react@18.3.1/node_modules/@mantine/styles/esm/tss/create-styles.cjs");
|
|
4
4
|
const useStyles = createStyles.createStyles((theme, params) => {
|
|
5
|
-
const { hasError } = params;
|
|
6
|
-
const invalidColor = theme.
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const { hasError = true } = params;
|
|
6
|
+
const invalidColor = theme.fn.variant({
|
|
7
|
+
variant: "filled",
|
|
8
|
+
color: "red"
|
|
9
|
+
}).background;
|
|
10
|
+
const invalidStyles = {
|
|
11
|
+
borderColor: theme.colors.red[4],
|
|
12
|
+
"&:hover": {
|
|
13
|
+
borderColor: theme.colors.red[4]
|
|
14
|
+
},
|
|
15
|
+
"&:focus": {
|
|
16
|
+
borderColor: theme.colors.red[4]
|
|
17
|
+
},
|
|
18
|
+
"&::placeholder": {
|
|
19
|
+
...theme.fn.placeholderStyles(),
|
|
20
|
+
color: invalidColor
|
|
21
|
+
}
|
|
22
|
+
};
|
|
9
23
|
return {
|
|
10
24
|
dropdownButton: {
|
|
11
25
|
display: "none"
|
|
@@ -14,7 +28,10 @@ const useStyles = createStyles.createStyles((theme, params) => {
|
|
|
14
28
|
// marginTop: 8,
|
|
15
29
|
"&.react-tel-input": {
|
|
16
30
|
".form-control": {
|
|
17
|
-
|
|
31
|
+
...theme.fn.fontStyles(),
|
|
32
|
+
// see more https://github.com/mantinedev/mantine/blob/v6/src/mantine-core/src/Input/Input.styles.ts#L30-L187
|
|
33
|
+
backgroundColor: theme.colorScheme === "dark" ? theme.colors.carbon[0] : theme.white,
|
|
34
|
+
transition: "border-color 100ms ease",
|
|
18
35
|
fontSize: 14,
|
|
19
36
|
color: theme.colors.carbon[8],
|
|
20
37
|
width: "100%",
|
|
@@ -23,24 +40,22 @@ const useStyles = createStyles.createStyles((theme, params) => {
|
|
|
23
40
|
lineHeight: "38px",
|
|
24
41
|
borderRadius: theme.defaultRadius,
|
|
25
42
|
padding: "0 12px",
|
|
26
|
-
|
|
43
|
+
borderWidth: 1,
|
|
44
|
+
borderStyle: "solid",
|
|
45
|
+
borderColor: theme.colors.carbon[4],
|
|
27
46
|
marginBottom: hasError ? 5 : void 0,
|
|
28
47
|
outline: "none",
|
|
29
|
-
"::placeholder": {
|
|
30
|
-
color: theme.colors.carbon[6]
|
|
31
|
-
},
|
|
32
48
|
"&:hover": {
|
|
33
|
-
|
|
49
|
+
borderColor: theme.colors.carbon[5]
|
|
34
50
|
},
|
|
35
|
-
"&:focus": {
|
|
36
|
-
borderColor:
|
|
51
|
+
"&:focus, &:focus-within": {
|
|
52
|
+
borderColor: theme.colors.carbon[9]
|
|
37
53
|
},
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
color: theme.colors.carbon[8],
|
|
41
|
-
cursor: "not-allowed",
|
|
54
|
+
"&::placeholder": {
|
|
55
|
+
...theme.fn.placeholderStyles(),
|
|
42
56
|
opacity: 1
|
|
43
|
-
}
|
|
57
|
+
},
|
|
58
|
+
...hasError ? invalidStyles : void 0
|
|
44
59
|
}
|
|
45
60
|
}
|
|
46
61
|
}
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import { createStyles } from "../../node_modules/.pnpm/@mantine_styles@5.10.4_patch_hash_gj5o633amdkv7b52vinsxkrrr4_@emotion_react@11.13.0_react-dom@18.3.1_react@18.3.1/node_modules/@mantine/styles/esm/tss/create-styles.js";
|
|
2
2
|
const useStyles = createStyles((theme, params) => {
|
|
3
|
-
const { hasError } = params;
|
|
4
|
-
const invalidColor = theme.
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
const { hasError = true } = params;
|
|
4
|
+
const invalidColor = theme.fn.variant({
|
|
5
|
+
variant: "filled",
|
|
6
|
+
color: "red"
|
|
7
|
+
}).background;
|
|
8
|
+
const invalidStyles = {
|
|
9
|
+
borderColor: theme.colors.red[4],
|
|
10
|
+
"&:hover": {
|
|
11
|
+
borderColor: theme.colors.red[4]
|
|
12
|
+
},
|
|
13
|
+
"&:focus": {
|
|
14
|
+
borderColor: theme.colors.red[4]
|
|
15
|
+
},
|
|
16
|
+
"&::placeholder": {
|
|
17
|
+
...theme.fn.placeholderStyles(),
|
|
18
|
+
color: invalidColor
|
|
19
|
+
}
|
|
20
|
+
};
|
|
7
21
|
return {
|
|
8
22
|
dropdownButton: {
|
|
9
23
|
display: "none"
|
|
@@ -12,7 +26,10 @@ const useStyles = createStyles((theme, params) => {
|
|
|
12
26
|
// marginTop: 8,
|
|
13
27
|
"&.react-tel-input": {
|
|
14
28
|
".form-control": {
|
|
15
|
-
|
|
29
|
+
...theme.fn.fontStyles(),
|
|
30
|
+
// see more https://github.com/mantinedev/mantine/blob/v6/src/mantine-core/src/Input/Input.styles.ts#L30-L187
|
|
31
|
+
backgroundColor: theme.colorScheme === "dark" ? theme.colors.carbon[0] : theme.white,
|
|
32
|
+
transition: "border-color 100ms ease",
|
|
16
33
|
fontSize: 14,
|
|
17
34
|
color: theme.colors.carbon[8],
|
|
18
35
|
width: "100%",
|
|
@@ -21,24 +38,22 @@ const useStyles = createStyles((theme, params) => {
|
|
|
21
38
|
lineHeight: "38px",
|
|
22
39
|
borderRadius: theme.defaultRadius,
|
|
23
40
|
padding: "0 12px",
|
|
24
|
-
|
|
41
|
+
borderWidth: 1,
|
|
42
|
+
borderStyle: "solid",
|
|
43
|
+
borderColor: theme.colors.carbon[4],
|
|
25
44
|
marginBottom: hasError ? 5 : void 0,
|
|
26
45
|
outline: "none",
|
|
27
|
-
"::placeholder": {
|
|
28
|
-
color: theme.colors.carbon[6]
|
|
29
|
-
},
|
|
30
46
|
"&:hover": {
|
|
31
|
-
|
|
47
|
+
borderColor: theme.colors.carbon[5]
|
|
32
48
|
},
|
|
33
|
-
"&:focus": {
|
|
34
|
-
borderColor:
|
|
49
|
+
"&:focus, &:focus-within": {
|
|
50
|
+
borderColor: theme.colors.carbon[9]
|
|
35
51
|
},
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
color: theme.colors.carbon[8],
|
|
39
|
-
cursor: "not-allowed",
|
|
52
|
+
"&::placeholder": {
|
|
53
|
+
...theme.fn.placeholderStyles(),
|
|
40
54
|
opacity: 1
|
|
41
|
-
}
|
|
55
|
+
},
|
|
56
|
+
...hasError ? invalidStyles : void 0
|
|
42
57
|
}
|
|
43
58
|
}
|
|
44
59
|
}
|
|
@@ -12,6 +12,7 @@ const ProTable = ({
|
|
|
12
12
|
mantinePaperProps = {},
|
|
13
13
|
mantineTableContainerProps = {},
|
|
14
14
|
mantineTableBodyProps,
|
|
15
|
+
mantineTableBodyCellProps = {},
|
|
15
16
|
mantineBottomToolbarProps = {},
|
|
16
17
|
wrapperProps = {},
|
|
17
18
|
pagination,
|
|
@@ -108,6 +109,11 @@ const ProTable = ({
|
|
|
108
109
|
}
|
|
109
110
|
return {};
|
|
110
111
|
}, mantineTableBodyProps);
|
|
112
|
+
const mTableBodyCellProps = helpers.mergeMProps(() => {
|
|
113
|
+
return {
|
|
114
|
+
h: 48
|
|
115
|
+
};
|
|
116
|
+
}, mantineTableBodyCellProps);
|
|
111
117
|
const mBottomToolbarProps = helpers.mergeMProps(
|
|
112
118
|
{
|
|
113
119
|
sx: (theme2) => ({
|
|
@@ -135,6 +141,7 @@ const ProTable = ({
|
|
|
135
141
|
mantineTableBodyProps: mTableBodyProps,
|
|
136
142
|
mantineTableContainerProps: mTableContainerProps,
|
|
137
143
|
mantineBottomToolbarProps: mBottomToolbarProps,
|
|
144
|
+
mantineTableBodyCellProps: mTableBodyCellProps,
|
|
138
145
|
mantinePaginationProps: {},
|
|
139
146
|
data,
|
|
140
147
|
localization: {
|
|
@@ -10,4 +10,4 @@ export interface ProTableProps<TData extends Record<string, any> = {}> extends M
|
|
|
10
10
|
pagination?: TablePaginationProps;
|
|
11
11
|
wrapperProps?: BoxProps;
|
|
12
12
|
}
|
|
13
|
-
export declare const ProTable: <T extends Record<string, any> = {}>({ mantineTableProps, mantinePaperProps, mantineTableContainerProps, mantineTableBodyProps, mantineBottomToolbarProps, wrapperProps, pagination, withBorder, loading, enableStickyHeader, enablePagination, enableBottomToolbar, enableSorting, emptyMessage, errorMessage, data, localization, state, ...rest }: ProTableProps<T>) => import("react/jsx-runtime.js").JSX.Element;
|
|
13
|
+
export declare const ProTable: <T extends Record<string, any> = {}>({ mantineTableProps, mantinePaperProps, mantineTableContainerProps, mantineTableBodyProps, mantineTableBodyCellProps, mantineBottomToolbarProps, wrapperProps, pagination, withBorder, loading, enableStickyHeader, enablePagination, enableBottomToolbar, enableSorting, emptyMessage, errorMessage, data, localization, state, ...rest }: ProTableProps<T>) => import("react/jsx-runtime.js").JSX.Element;
|
|
@@ -10,4 +10,4 @@ export interface ProTableProps<TData extends Record<string, any> = {}> extends M
|
|
|
10
10
|
pagination?: TablePaginationProps;
|
|
11
11
|
wrapperProps?: BoxProps;
|
|
12
12
|
}
|
|
13
|
-
export declare const ProTable: <T extends Record<string, any> = {}>({ mantineTableProps, mantinePaperProps, mantineTableContainerProps, mantineTableBodyProps, mantineBottomToolbarProps, wrapperProps, pagination, withBorder, loading, enableStickyHeader, enablePagination, enableBottomToolbar, enableSorting, emptyMessage, errorMessage, data, localization, state, ...rest }: ProTableProps<T>) => import("react/jsx-runtime.js").JSX.Element;
|
|
13
|
+
export declare const ProTable: <T extends Record<string, any> = {}>({ mantineTableProps, mantinePaperProps, mantineTableContainerProps, mantineTableBodyProps, mantineTableBodyCellProps, mantineBottomToolbarProps, wrapperProps, pagination, withBorder, loading, enableStickyHeader, enablePagination, enableBottomToolbar, enableSorting, emptyMessage, errorMessage, data, localization, state, ...rest }: ProTableProps<T>) => import("react/jsx-runtime.js").JSX.Element;
|
|
@@ -10,6 +10,7 @@ const ProTable = ({
|
|
|
10
10
|
mantinePaperProps = {},
|
|
11
11
|
mantineTableContainerProps = {},
|
|
12
12
|
mantineTableBodyProps,
|
|
13
|
+
mantineTableBodyCellProps = {},
|
|
13
14
|
mantineBottomToolbarProps = {},
|
|
14
15
|
wrapperProps = {},
|
|
15
16
|
pagination,
|
|
@@ -106,6 +107,11 @@ const ProTable = ({
|
|
|
106
107
|
}
|
|
107
108
|
return {};
|
|
108
109
|
}, mantineTableBodyProps);
|
|
110
|
+
const mTableBodyCellProps = mergeMProps(() => {
|
|
111
|
+
return {
|
|
112
|
+
h: 48
|
|
113
|
+
};
|
|
114
|
+
}, mantineTableBodyCellProps);
|
|
109
115
|
const mBottomToolbarProps = mergeMProps(
|
|
110
116
|
{
|
|
111
117
|
sx: (theme2) => ({
|
|
@@ -133,6 +139,7 @@ const ProTable = ({
|
|
|
133
139
|
mantineTableBodyProps: mTableBodyProps,
|
|
134
140
|
mantineTableContainerProps: mTableContainerProps,
|
|
135
141
|
mantineBottomToolbarProps: mBottomToolbarProps,
|
|
142
|
+
mantineTableBodyCellProps: mTableBodyCellProps,
|
|
136
143
|
mantinePaginationProps: {},
|
|
137
144
|
data,
|
|
138
145
|
localization: {
|
|
@@ -65,7 +65,7 @@ const TimeRangePicker = ({
|
|
|
65
65
|
root: {
|
|
66
66
|
paddingLeft: "12px",
|
|
67
67
|
paddingRight: "12px",
|
|
68
|
-
borderColor: opened ? theme.colors.carbon[9] : theme.colors.carbon[
|
|
68
|
+
borderColor: opened ? theme.colors.carbon[9] : theme.colors.carbon[4],
|
|
69
69
|
"&:hover": {
|
|
70
70
|
backgroundColor: theme.colors.carbon[0],
|
|
71
71
|
borderColor: opened ? theme.colors.carbon[9] : theme.colors.carbon[5]
|
|
@@ -78,11 +78,11 @@ const TimeRangePicker = ({
|
|
|
78
78
|
label: {
|
|
79
79
|
display: "flex",
|
|
80
80
|
justifyContent: "space-between",
|
|
81
|
-
width: "100%"
|
|
81
|
+
width: "100%",
|
|
82
|
+
fontWeight: 400
|
|
82
83
|
}
|
|
83
84
|
}),
|
|
84
85
|
w: disableAbsoluteRanges ? 200 : 280,
|
|
85
|
-
fw: "normal",
|
|
86
86
|
sx,
|
|
87
87
|
...loading ? { "data-loading": true } : {},
|
|
88
88
|
children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs(Group.Group, { w: "100%", spacing: 0, children: [
|
|
@@ -64,7 +64,7 @@ const TimeRangePicker = ({
|
|
|
64
64
|
root: {
|
|
65
65
|
paddingLeft: "12px",
|
|
66
66
|
paddingRight: "12px",
|
|
67
|
-
borderColor: opened ? theme.colors.carbon[9] : theme.colors.carbon[
|
|
67
|
+
borderColor: opened ? theme.colors.carbon[9] : theme.colors.carbon[4],
|
|
68
68
|
"&:hover": {
|
|
69
69
|
backgroundColor: theme.colors.carbon[0],
|
|
70
70
|
borderColor: opened ? theme.colors.carbon[9] : theme.colors.carbon[5]
|
|
@@ -77,11 +77,11 @@ const TimeRangePicker = ({
|
|
|
77
77
|
label: {
|
|
78
78
|
display: "flex",
|
|
79
79
|
justifyContent: "space-between",
|
|
80
|
-
width: "100%"
|
|
80
|
+
width: "100%",
|
|
81
|
+
fontWeight: 400
|
|
81
82
|
}
|
|
82
83
|
}),
|
|
83
84
|
w: disableAbsoluteRanges ? 200 : 280,
|
|
84
|
-
fw: "normal",
|
|
85
85
|
sx,
|
|
86
86
|
...loading ? { "data-loading": true } : {},
|
|
87
87
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Group, { w: "100%", spacing: 0, children: [
|