@tidbcloud/uikit 2.0.11 → 2.1.1
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 +12 -0
- package/dist/biz/Table/ProTable/helpers.cjs +3 -9
- package/dist/biz/Table/ProTable/helpers.mjs +3 -9
- package/dist/primitive/AnimatedNumber/index.cjs +13 -0
- package/dist/primitive/AnimatedNumber/index.d.cts +14 -0
- package/dist/primitive/AnimatedNumber/index.d.mts +14 -0
- package/dist/primitive/AnimatedNumber/index.mjs +13 -0
- package/dist/primitive/index.cjs +4 -2
- package/dist/primitive/index.d.cts +1 -0
- package/dist/primitive/index.d.mts +1 -0
- package/dist/primitive/index.mjs +2 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tidbcloud/uikit
|
|
2
2
|
|
|
3
|
+
## 2.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(ProTable): enable highlightOnHover ([#468](https://github.com/tidbcloud/tidbcloud-uikit/pull/468))
|
|
8
|
+
|
|
9
|
+
## 2.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- feat: add AnimatedNumber component ([#465](https://github.com/tidbcloud/tidbcloud-uikit/pull/465))
|
|
14
|
+
|
|
3
15
|
## 2.0.11
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -74,7 +74,9 @@ function mergeProTableProps(props) {
|
|
|
74
74
|
borderRadius: withBorder ? theme2.defaultRadius : 0,
|
|
75
75
|
borderColor: withBorder ? theme2.colors.carbon[4] : "transparent",
|
|
76
76
|
overflow: "hidden",
|
|
77
|
-
transition: "none"
|
|
77
|
+
transition: "none",
|
|
78
|
+
// see https://v2.mantine-react-table.com/docs/guides/customize-component-styles#how-to-set-mrt-css-variables
|
|
79
|
+
"--mrt-row-hover-background-color": theme2.colors.carbon[3]
|
|
78
80
|
})
|
|
79
81
|
},
|
|
80
82
|
mantinePaperProps
|
|
@@ -105,9 +107,6 @@ function mergeProTableProps(props) {
|
|
|
105
107
|
transition: "none",
|
|
106
108
|
backgroundColor: theme.colors.carbon[0],
|
|
107
109
|
color: theme.colors.carbon[8],
|
|
108
|
-
"&:hover": {
|
|
109
|
-
backgroundColor: `${theme.colors.carbon[3]} !important`
|
|
110
|
-
},
|
|
111
110
|
td: {
|
|
112
111
|
borderColor: theme.colors.carbon[3]
|
|
113
112
|
},
|
|
@@ -173,11 +172,6 @@ function mergeProTableProps(props) {
|
|
|
173
172
|
borderBottom: enableRowVirtualization || layoutMode && layoutMode !== "semantic" ? "none !important" : void 0
|
|
174
173
|
}
|
|
175
174
|
},
|
|
176
|
-
"&[data-hover]": {
|
|
177
|
-
"&:hover": {
|
|
178
|
-
"--mrt-row-hover-background-color": theme.colors.carbon[3]
|
|
179
|
-
}
|
|
180
|
-
},
|
|
181
175
|
"&:not([data-striped], [data-striped='false'])": {
|
|
182
176
|
backgroundColor: theme.colors.carbon[0]
|
|
183
177
|
},
|
|
@@ -72,7 +72,9 @@ function mergeProTableProps(props) {
|
|
|
72
72
|
borderRadius: withBorder ? theme2.defaultRadius : 0,
|
|
73
73
|
borderColor: withBorder ? theme2.colors.carbon[4] : "transparent",
|
|
74
74
|
overflow: "hidden",
|
|
75
|
-
transition: "none"
|
|
75
|
+
transition: "none",
|
|
76
|
+
// see https://v2.mantine-react-table.com/docs/guides/customize-component-styles#how-to-set-mrt-css-variables
|
|
77
|
+
"--mrt-row-hover-background-color": theme2.colors.carbon[3]
|
|
76
78
|
})
|
|
77
79
|
},
|
|
78
80
|
mantinePaperProps
|
|
@@ -103,9 +105,6 @@ function mergeProTableProps(props) {
|
|
|
103
105
|
transition: "none",
|
|
104
106
|
backgroundColor: theme.colors.carbon[0],
|
|
105
107
|
color: theme.colors.carbon[8],
|
|
106
|
-
"&:hover": {
|
|
107
|
-
backgroundColor: `${theme.colors.carbon[3]} !important`
|
|
108
|
-
},
|
|
109
108
|
td: {
|
|
110
109
|
borderColor: theme.colors.carbon[3]
|
|
111
110
|
},
|
|
@@ -171,11 +170,6 @@ function mergeProTableProps(props) {
|
|
|
171
170
|
borderBottom: enableRowVirtualization || layoutMode && layoutMode !== "semantic" ? "none !important" : void 0
|
|
172
171
|
}
|
|
173
172
|
},
|
|
174
|
-
"&[data-hover]": {
|
|
175
|
-
"&:hover": {
|
|
176
|
-
"--mrt-row-hover-background-color": theme.colors.carbon[3]
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
173
|
"&:not([data-striped], [data-striped='false'])": {
|
|
180
174
|
backgroundColor: theme.colors.carbon[0]
|
|
181
175
|
},
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const NumberFlow = require("@number-flow/react");
|
|
5
|
+
const Box = require("../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/Box/Box.cjs");
|
|
6
|
+
function AnimatedNumber({ value, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { component: NumberFlow, value, ...props });
|
|
8
|
+
}
|
|
9
|
+
function AnimatedNumberGroup({ children, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { component: NumberFlow.NumberFlowGroup, ...props, children });
|
|
11
|
+
}
|
|
12
|
+
AnimatedNumber.Group = AnimatedNumberGroup;
|
|
13
|
+
exports.AnimatedNumber = AnimatedNumber;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BoxProps } from '../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_sx7emryda53tomnuogmu74guza/node_modules/@mantine/core/lib';
|
|
2
|
+
import { NumberFlowProps } from '@number-flow/react';
|
|
3
|
+
export type AnimatedNumberProps = BoxProps & NumberFlowProps;
|
|
4
|
+
/**
|
|
5
|
+
* Animated number component, see https://number-flow.barvian.me/ for more examples.
|
|
6
|
+
*/
|
|
7
|
+
export declare function AnimatedNumber({ value, ...props }: AnimatedNumberProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace AnimatedNumber {
|
|
9
|
+
var Group: typeof AnimatedNumberGroup;
|
|
10
|
+
}
|
|
11
|
+
declare function AnimatedNumberGroup({ children, ...props }: BoxProps & {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BoxProps } from '../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_sx7emryda53tomnuogmu74guza/node_modules/@mantine/core/lib';
|
|
2
|
+
import { NumberFlowProps } from '@number-flow/react';
|
|
3
|
+
export type AnimatedNumberProps = BoxProps & NumberFlowProps;
|
|
4
|
+
/**
|
|
5
|
+
* Animated number component, see https://number-flow.barvian.me/ for more examples.
|
|
6
|
+
*/
|
|
7
|
+
export declare function AnimatedNumber({ value, ...props }: AnimatedNumberProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace AnimatedNumber {
|
|
9
|
+
var Group: typeof AnimatedNumberGroup;
|
|
10
|
+
}
|
|
11
|
+
declare function AnimatedNumberGroup({ children, ...props }: BoxProps & {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import NumberFlow, { NumberFlowGroup } from "@number-flow/react";
|
|
3
|
+
import { Box } from "../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/Box/Box.mjs";
|
|
4
|
+
function AnimatedNumber({ value, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(Box, { component: NumberFlow, value, ...props });
|
|
6
|
+
}
|
|
7
|
+
function AnimatedNumberGroup({ children, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Box, { component: NumberFlowGroup, ...props, children });
|
|
9
|
+
}
|
|
10
|
+
AnimatedNumber.Group = AnimatedNumberGroup;
|
|
11
|
+
export {
|
|
12
|
+
AnimatedNumber
|
|
13
|
+
};
|
package/dist/primitive/index.cjs
CHANGED
|
@@ -11,7 +11,8 @@ const index$1 = require("./Typography/index.cjs");
|
|
|
11
11
|
const index$2 = require("./MediaQuery/index.cjs");
|
|
12
12
|
const index$3 = require("./Select/index.cjs");
|
|
13
13
|
const index$4 = require("./Button/index.cjs");
|
|
14
|
-
const index$5 = require("
|
|
14
|
+
const index$5 = require("./AnimatedNumber/index.cjs");
|
|
15
|
+
const index$6 = require("../node_modules/.pnpm/@mantine_dropzone@7.15.2_@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine__hww35qmvzgxt6vzp3w3turt5w4/node_modules/@mantine/dropzone/esm/index.cjs");
|
|
15
16
|
const AppShell = require("../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/AppShell/AppShell.cjs");
|
|
16
17
|
const AspectRatio = require("../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/AspectRatio/AspectRatio.cjs");
|
|
17
18
|
const Center = require("../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/Center/Center.cjs");
|
|
@@ -139,7 +140,8 @@ exports.MediaQuery = index$2.MediaQuery;
|
|
|
139
140
|
exports.MultiSelect = index$3.MultiSelect;
|
|
140
141
|
exports.Select = index$3.Select;
|
|
141
142
|
exports.Button = index$4.Button;
|
|
142
|
-
exports.
|
|
143
|
+
exports.AnimatedNumber = index$5.AnimatedNumber;
|
|
144
|
+
exports.Dropzone = index$6.Dropzone;
|
|
143
145
|
exports.AppShell = AppShell.AppShell;
|
|
144
146
|
exports.AspectRatio = AspectRatio.AspectRatio;
|
|
145
147
|
exports.Center = Center.Center;
|
|
@@ -39,6 +39,7 @@ export { MediaQuery, type MediaQueryProps } from './MediaQuery/index.cjs';
|
|
|
39
39
|
export { Select, type SelectProps, MultiSelect, type MultiSelectProps } from './Select/index.cjs';
|
|
40
40
|
export { Button } from './Button/index.cjs';
|
|
41
41
|
export * from './Prism/index.cjs';
|
|
42
|
+
export { AnimatedNumber, type AnimatedNumberProps } from './AnimatedNumber/index.cjs';
|
|
42
43
|
export { Dropzone, MIME_TYPES, MS_EXCEL_MIME_TYPE, MS_POWERPOINT_MIME_TYPE, MS_WORD_MIME_TYPE, EXE_MIME_TYPE, PDF_MIME_TYPE, IMAGE_MIME_TYPE } from '@mantine/dropzone';
|
|
43
44
|
export type { DropzoneAcceptProps, DropzoneFullScreenProps, DropzoneFullScreenStylesNames, DropzoneIdleProps, DropzoneProps, DropzoneRejectProps, DropzoneStylesNames } from '@mantine/dropzone';
|
|
44
45
|
export { Carousel, useAnimationOffsetEffect } from '@mantine/carousel';
|
|
@@ -39,6 +39,7 @@ export { MediaQuery, type MediaQueryProps } from './MediaQuery/index.mjs';
|
|
|
39
39
|
export { Select, type SelectProps, MultiSelect, type MultiSelectProps } from './Select/index.mjs';
|
|
40
40
|
export { Button } from './Button/index.mjs';
|
|
41
41
|
export * from './Prism/index.mjs';
|
|
42
|
+
export { AnimatedNumber, type AnimatedNumberProps } from './AnimatedNumber/index.mjs';
|
|
42
43
|
export { Dropzone, MIME_TYPES, MS_EXCEL_MIME_TYPE, MS_POWERPOINT_MIME_TYPE, MS_WORD_MIME_TYPE, EXE_MIME_TYPE, PDF_MIME_TYPE, IMAGE_MIME_TYPE } from '@mantine/dropzone';
|
|
43
44
|
export type { DropzoneAcceptProps, DropzoneFullScreenProps, DropzoneFullScreenStylesNames, DropzoneIdleProps, DropzoneProps, DropzoneRejectProps, DropzoneStylesNames } from '@mantine/dropzone';
|
|
44
45
|
export { Carousel, useAnimationOffsetEffect } from '@mantine/carousel';
|
package/dist/primitive/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { TYPOGRAPHY_STYLES_MAP, Typography } from "./Typography/index.mjs";
|
|
|
9
9
|
import { MediaQuery } from "./MediaQuery/index.mjs";
|
|
10
10
|
import { MultiSelect, Select } from "./Select/index.mjs";
|
|
11
11
|
import { Button } from "./Button/index.mjs";
|
|
12
|
+
import { AnimatedNumber } from "./AnimatedNumber/index.mjs";
|
|
12
13
|
import { Dropzone } from "../node_modules/.pnpm/@mantine_dropzone@7.15.2_@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine__hww35qmvzgxt6vzp3w3turt5w4/node_modules/@mantine/dropzone/esm/index.mjs";
|
|
13
14
|
import { AppShell } from "../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/AppShell/AppShell.mjs";
|
|
14
15
|
import { AspectRatio } from "../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/components/AspectRatio/AspectRatio.mjs";
|
|
@@ -136,6 +137,7 @@ export {
|
|
|
136
137
|
Alert,
|
|
137
138
|
AlphaSlider,
|
|
138
139
|
Anchor,
|
|
140
|
+
AnimatedNumber,
|
|
139
141
|
AppShell,
|
|
140
142
|
AspectRatio,
|
|
141
143
|
Autocomplete,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tidbcloud/uikit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "tidbcloud uikit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/primitive/index.cjs",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"@mantine/hooks": "7.15.2",
|
|
66
66
|
"@mantine/modals": "7.15.2",
|
|
67
67
|
"@mantine/notifications": "7.15.2",
|
|
68
|
+
"@number-flow/react": "0.5.5",
|
|
68
69
|
"@tabler/icons-react": "^3.26.0",
|
|
69
70
|
"ahooks": "^3.7.8",
|
|
70
71
|
"clsx": "^2.1.1",
|