@akinon/ui-card 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,76 @@
1
+ import type { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE } from '@akinon/ui-theme';
2
+
3
+ export interface CardProps
4
+ extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
5
+ /**
6
+ * The title of the card.
7
+ */
8
+ title?: React.ReactNode;
9
+ /**
10
+ * The extra content of the card.
11
+ */
12
+ extra?: React.ReactNode;
13
+ /**
14
+ * Whether the card has a border.
15
+ */
16
+ bordered?: boolean;
17
+ /**
18
+ * Whether the card is loading.
19
+ */
20
+ loading?: boolean;
21
+ /**
22
+ * Whether the card is hoverable.
23
+ */
24
+ hoverable?: boolean;
25
+ /**
26
+ * The children of the card.
27
+ */
28
+ children?: React.ReactNode;
29
+ /**
30
+ * The class name of the card.
31
+ */
32
+ className?: string;
33
+ /**
34
+ * The root class name of the card.
35
+ */
36
+ rootClassName?: string;
37
+ /**
38
+ * The size of the card.
39
+ */
40
+ size?: 'default' | 'small';
41
+ /**
42
+ * Whether the card is an inner card.
43
+ */
44
+ inner?: boolean;
45
+ /**
46
+ * The cover node of the card.
47
+ */
48
+ cover?: React.ReactNode;
49
+ /**
50
+ * The actions node of the card.
51
+ */
52
+ actions?: React.ReactNode[];
53
+ /**
54
+ * The class names of specific parts of the card.
55
+ */
56
+ classNames?: {
57
+ header?: string;
58
+ body?: string;
59
+ extra?: string;
60
+ title?: string;
61
+ actions?: string;
62
+ cover?: string;
63
+ };
64
+ /**
65
+ * The width of the card with px or percentage. `number` is in px.
66
+ */
67
+ width?: number | string;
68
+ /**
69
+ * The custom padding of the card.
70
+ */
71
+ padding?: number;
72
+ /**
73
+ * @ignore
74
+ */
75
+ style?: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE;
76
+ }
@@ -0,0 +1,76 @@
1
+ import type { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE } from '@akinon/ui-theme';
2
+
3
+ export interface CardProps
4
+ extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
5
+ /**
6
+ * The title of the card.
7
+ */
8
+ title?: React.ReactNode;
9
+ /**
10
+ * The extra content of the card.
11
+ */
12
+ extra?: React.ReactNode;
13
+ /**
14
+ * Whether the card has a border.
15
+ */
16
+ bordered?: boolean;
17
+ /**
18
+ * Whether the card is loading.
19
+ */
20
+ loading?: boolean;
21
+ /**
22
+ * Whether the card is hoverable.
23
+ */
24
+ hoverable?: boolean;
25
+ /**
26
+ * The children of the card.
27
+ */
28
+ children?: React.ReactNode;
29
+ /**
30
+ * The class name of the card.
31
+ */
32
+ className?: string;
33
+ /**
34
+ * The root class name of the card.
35
+ */
36
+ rootClassName?: string;
37
+ /**
38
+ * The size of the card.
39
+ */
40
+ size?: 'default' | 'small';
41
+ /**
42
+ * Whether the card is an inner card.
43
+ */
44
+ inner?: boolean;
45
+ /**
46
+ * The cover node of the card.
47
+ */
48
+ cover?: React.ReactNode;
49
+ /**
50
+ * The actions node of the card.
51
+ */
52
+ actions?: React.ReactNode[];
53
+ /**
54
+ * The class names of specific parts of the card.
55
+ */
56
+ classNames?: {
57
+ header?: string;
58
+ body?: string;
59
+ extra?: string;
60
+ title?: string;
61
+ actions?: string;
62
+ cover?: string;
63
+ };
64
+ /**
65
+ * The width of the card with px or percentage. `number` is in px.
66
+ */
67
+ width?: number | string;
68
+ /**
69
+ * The custom padding of the card.
70
+ */
71
+ padding?: number;
72
+ /**
73
+ * @ignore
74
+ */
75
+ style?: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE;
76
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/ui-card",
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,16 +10,16 @@
10
10
  ],
11
11
  "dependencies": {
12
12
  "antd": "5.17.0",
13
- "@akinon/ui-theme": "0.6.0",
14
- "@akinon/ui-typography": "0.4.0",
15
- "@akinon/icons": "0.5.0"
13
+ "@akinon/icons": "0.6.0",
14
+ "@akinon/ui-theme": "0.7.0",
15
+ "@akinon/ui-typography": "0.5.0"
16
16
  },
17
17
  "devDependencies": {
18
18
  "clean-package": "2.2.0",
19
19
  "copyfiles": "^2.4.1",
20
20
  "rimraf": "^5.0.5",
21
21
  "typescript": "^5.2.2",
22
- "@akinon/typescript-config": "0.3.0"
22
+ "@akinon/typescript-config": "0.4.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "react": ">=18",
@@ -39,7 +39,7 @@
39
39
  "build": "pnpm run build:esm && pnpm run build:commonjs && pnpm run copy:files",
40
40
  "build:esm": "tsc --outDir dist/esm",
41
41
  "build:commonjs": "tsc --module commonjs --outDir dist/cjs",
42
- "copy:files": "copyfiles -u 1 src/**/*.css dist/esm && copyfiles -u 1 src/**/*.css dist/cjs",
42
+ "copy:files": "copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/esm && copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/cjs",
43
43
  "clean": "rimraf dist/",
44
44
  "typecheck": "tsc --noEmit"
45
45
  }