@akinon/ui-badge 0.4.0 → 0.5.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.
@@ -0,0 +1,65 @@
1
+ export type BadgeProps = Omit<
2
+ AntBadgeProps,
3
+ 'prefixCls' | 'style' | 'styles' | 'status'
4
+ >;
5
+
6
+ export interface AntBadgeProps {
7
+ /** Number to show in badge */
8
+ count?: React.ReactNode;
9
+ /**
10
+ * Whether to show badge when count is zero
11
+ */
12
+ showZero?: boolean;
13
+ /** Max count to show */
14
+ overflowCount?: number;
15
+ /** Whether to show red dot without number */
16
+ dot?: boolean;
17
+ style?: React.CSSProperties;
18
+ prefixCls?: string;
19
+ scrollNumberPrefixCls?: string;
20
+ className?: string;
21
+ /**
22
+ * Set Badge as a status dot
23
+ */
24
+ status?: PresetStatusColorType;
25
+ rootClassName?: string;
26
+ /**
27
+ * Customize Badge dot color
28
+ */
29
+ color?: string;
30
+ /**
31
+ * Text sets the display text of the status dot
32
+ */
33
+ text?: React.ReactNode;
34
+ /**
35
+ * If count is set, size sets the size of badge
36
+ */
37
+ size?: 'default' | 'small';
38
+ /**
39
+ * Set offset of the badge dot
40
+ */
41
+ offset?: [number | string, number | string];
42
+ /**
43
+ * Text to show when hovering over the badge
44
+ */
45
+ title?: string;
46
+ children?: React.ReactNode;
47
+ classNames?: {
48
+ root?: string;
49
+ indicator?: string;
50
+ };
51
+ styles?: {
52
+ root?: React.CSSProperties;
53
+ indicator?: React.CSSProperties;
54
+ };
55
+ }
56
+
57
+ type PresetStatusColorType = (typeof PresetStatusColorTypes)[number];
58
+
59
+ declare const PresetStatusColorTypes: readonly [
60
+ 'success',
61
+ 'processing',
62
+ 'error',
63
+ 'default',
64
+ 'warning'
65
+ ];
@@ -0,0 +1,65 @@
1
+ export type BadgeProps = Omit<
2
+ AntBadgeProps,
3
+ 'prefixCls' | 'style' | 'styles' | 'status'
4
+ >;
5
+
6
+ export interface AntBadgeProps {
7
+ /** Number to show in badge */
8
+ count?: React.ReactNode;
9
+ /**
10
+ * Whether to show badge when count is zero
11
+ */
12
+ showZero?: boolean;
13
+ /** Max count to show */
14
+ overflowCount?: number;
15
+ /** Whether to show red dot without number */
16
+ dot?: boolean;
17
+ style?: React.CSSProperties;
18
+ prefixCls?: string;
19
+ scrollNumberPrefixCls?: string;
20
+ className?: string;
21
+ /**
22
+ * Set Badge as a status dot
23
+ */
24
+ status?: PresetStatusColorType;
25
+ rootClassName?: string;
26
+ /**
27
+ * Customize Badge dot color
28
+ */
29
+ color?: string;
30
+ /**
31
+ * Text sets the display text of the status dot
32
+ */
33
+ text?: React.ReactNode;
34
+ /**
35
+ * If count is set, size sets the size of badge
36
+ */
37
+ size?: 'default' | 'small';
38
+ /**
39
+ * Set offset of the badge dot
40
+ */
41
+ offset?: [number | string, number | string];
42
+ /**
43
+ * Text to show when hovering over the badge
44
+ */
45
+ title?: string;
46
+ children?: React.ReactNode;
47
+ classNames?: {
48
+ root?: string;
49
+ indicator?: string;
50
+ };
51
+ styles?: {
52
+ root?: React.CSSProperties;
53
+ indicator?: React.CSSProperties;
54
+ };
55
+ }
56
+
57
+ type PresetStatusColorType = (typeof PresetStatusColorTypes)[number];
58
+
59
+ declare const PresetStatusColorTypes: readonly [
60
+ 'success',
61
+ 'processing',
62
+ 'error',
63
+ 'default',
64
+ 'warning'
65
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/ui-badge",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/esm/index.js",
@@ -10,14 +10,14 @@
10
10
  ],
11
11
  "dependencies": {
12
12
  "antd": "5.17.0",
13
- "@akinon/ui-theme": "0.6.0"
13
+ "@akinon/ui-theme": "0.7.0"
14
14
  },
15
15
  "devDependencies": {
16
16
  "clean-package": "2.2.0",
17
17
  "copyfiles": "^2.4.1",
18
18
  "rimraf": "^5.0.5",
19
19
  "typescript": "^5.2.2",
20
- "@akinon/typescript-config": "0.3.0"
20
+ "@akinon/typescript-config": "0.4.0"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=18",
@@ -37,7 +37,7 @@
37
37
  "build": "pnpm run build:esm && pnpm run build:commonjs && pnpm run copy:files",
38
38
  "build:esm": "tsc --outDir dist/esm",
39
39
  "build:commonjs": "tsc --module commonjs --outDir dist/cjs",
40
- "copy:files": "copyfiles -u 1 src/**/*.css dist/esm && copyfiles -u 1 src/**/*.css dist/cjs",
40
+ "copy:files": "copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/esm && copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/cjs",
41
41
  "clean": "rimraf dist/",
42
42
  "typecheck": "tsc --noEmit"
43
43
  }