@tidbcloud/uikit 2.0.11 → 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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tidbcloud/uikit
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - feat: add AnimatedNumber component ([#465](https://github.com/tidbcloud/tidbcloud-uikit/pull/465))
8
+
3
9
  ## 2.0.11
4
10
 
5
11
  ### Patch Changes
@@ -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
+ };
@@ -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("../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");
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.Dropzone = index$5.Dropzone;
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';
@@ -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.0.11",
3
+ "version": "2.1.0",
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",