@akinon/ui-tag 0.4.0 → 0.6.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/dist/cjs/types.d.ts +52 -0
- package/dist/esm/types.d.ts +52 -0
- package/package.json +4 -4
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TagStatus } from './';
|
|
2
|
+
|
|
3
|
+
export type TagProps = Omit<
|
|
4
|
+
AntTagProps,
|
|
5
|
+
'prefixCls' | 'style' | 'styles' | 'visible'
|
|
6
|
+
> & {
|
|
7
|
+
/**
|
|
8
|
+
* The status of the tag.
|
|
9
|
+
*/
|
|
10
|
+
status?: TagStatus;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export interface AntTagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
14
|
+
prefixCls?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The additional css class
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* ClassName on the root element
|
|
21
|
+
*/
|
|
22
|
+
rootClassName?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Color of the Tag
|
|
25
|
+
*/
|
|
26
|
+
color?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Closable Tag supports onClose event
|
|
29
|
+
*/
|
|
30
|
+
closable?:
|
|
31
|
+
| boolean
|
|
32
|
+
| ({
|
|
33
|
+
closeIcon?: React.ReactNode;
|
|
34
|
+
} & React.AriaAttributes);
|
|
35
|
+
/**
|
|
36
|
+
* Custom close icon
|
|
37
|
+
*/
|
|
38
|
+
closeIcon?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Callback executed when tag is closed
|
|
41
|
+
*/
|
|
42
|
+
onClose?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
43
|
+
style?: React.CSSProperties;
|
|
44
|
+
/**
|
|
45
|
+
* Set the icon of tag
|
|
46
|
+
*/
|
|
47
|
+
icon?: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Whether has border style
|
|
50
|
+
*/
|
|
51
|
+
bordered?: boolean;
|
|
52
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { TagStatus } from './';
|
|
2
|
+
|
|
3
|
+
export type TagProps = Omit<
|
|
4
|
+
AntTagProps,
|
|
5
|
+
'prefixCls' | 'style' | 'styles' | 'visible'
|
|
6
|
+
> & {
|
|
7
|
+
/**
|
|
8
|
+
* The status of the tag.
|
|
9
|
+
*/
|
|
10
|
+
status?: TagStatus;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export interface AntTagProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
14
|
+
prefixCls?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The additional css class
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* ClassName on the root element
|
|
21
|
+
*/
|
|
22
|
+
rootClassName?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Color of the Tag
|
|
25
|
+
*/
|
|
26
|
+
color?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Closable Tag supports onClose event
|
|
29
|
+
*/
|
|
30
|
+
closable?:
|
|
31
|
+
| boolean
|
|
32
|
+
| ({
|
|
33
|
+
closeIcon?: React.ReactNode;
|
|
34
|
+
} & React.AriaAttributes);
|
|
35
|
+
/**
|
|
36
|
+
* Custom close icon
|
|
37
|
+
*/
|
|
38
|
+
closeIcon?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Callback executed when tag is closed
|
|
41
|
+
*/
|
|
42
|
+
onClose?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
43
|
+
style?: React.CSSProperties;
|
|
44
|
+
/**
|
|
45
|
+
* Set the icon of tag
|
|
46
|
+
*/
|
|
47
|
+
icon?: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Whether has border style
|
|
50
|
+
*/
|
|
51
|
+
bordered?: boolean;
|
|
52
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-tag",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"copyfiles": "^2.4.1",
|
|
18
18
|
"rimraf": "^5.0.5",
|
|
19
19
|
"typescript": "^5.2.2",
|
|
20
|
-
"@akinon/typescript-config": "0.
|
|
21
|
-
"@akinon/ui-theme": "0.
|
|
20
|
+
"@akinon/typescript-config": "0.4.0",
|
|
21
|
+
"@akinon/ui-theme": "0.7.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"react": ">=18",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"build": "pnpm run build:esm && pnpm run build:commonjs && pnpm run copy:files",
|
|
39
39
|
"build:esm": "tsc --outDir dist/esm",
|
|
40
40
|
"build:commonjs": "tsc --module commonjs --outDir dist/cjs",
|
|
41
|
-
"copy:files": "copyfiles -u 1 src
|
|
41
|
+
"copy:files": "copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/esm && copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/cjs",
|
|
42
42
|
"clean": "rimraf dist/",
|
|
43
43
|
"typecheck": "tsc --noEmit"
|
|
44
44
|
}
|