@akinon/ui-space 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.
- package/dist/cjs/types.d.ts +74 -0
- package/dist/esm/types.d.ts +74 -0
- package/package.json +4 -4
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE } from '@akinon/ui-theme';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
|
|
4
|
+
export type SpaceSize = 'small' | 'middle' | 'large' | number;
|
|
5
|
+
export type SpaceDirection = 'horizontal' | 'vertical';
|
|
6
|
+
|
|
7
|
+
export interface SpaceProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/**
|
|
9
|
+
* Space's class name
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Space's root class name
|
|
14
|
+
*/
|
|
15
|
+
rootClassName?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Space's size
|
|
18
|
+
*/
|
|
19
|
+
size?: SpaceSize | [SpaceSize, SpaceSize];
|
|
20
|
+
/**
|
|
21
|
+
* Whether to make the space block (full width)
|
|
22
|
+
*/
|
|
23
|
+
block?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Space's direction
|
|
26
|
+
*/
|
|
27
|
+
direction?: SpaceDirection;
|
|
28
|
+
/**
|
|
29
|
+
* Space's alignment
|
|
30
|
+
*/
|
|
31
|
+
align?: 'start' | 'end' | 'center' | 'baseline';
|
|
32
|
+
/**
|
|
33
|
+
* Space's split element
|
|
34
|
+
*/
|
|
35
|
+
split?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Whether to wrap the space items
|
|
38
|
+
*/
|
|
39
|
+
wrap?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Space's item class names
|
|
42
|
+
*/
|
|
43
|
+
classNames?: {
|
|
44
|
+
item: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* @ignore
|
|
48
|
+
*/
|
|
49
|
+
styles?: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE;
|
|
50
|
+
/**
|
|
51
|
+
* @ignore
|
|
52
|
+
*/
|
|
53
|
+
style?: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface CompactSpaceProps
|
|
57
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
58
|
+
/**
|
|
59
|
+
* Compact space's size
|
|
60
|
+
*/
|
|
61
|
+
size?: Exclude<SpaceSize, number>;
|
|
62
|
+
/**
|
|
63
|
+
* Compact space's direction
|
|
64
|
+
*/
|
|
65
|
+
direction?: SpaceDirection;
|
|
66
|
+
/**
|
|
67
|
+
* Whether to make the compact space block
|
|
68
|
+
*/
|
|
69
|
+
block?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Compact space's root class name
|
|
72
|
+
*/
|
|
73
|
+
rootClassName?: string;
|
|
74
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE } from '@akinon/ui-theme';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
|
|
4
|
+
export type SpaceSize = 'small' | 'middle' | 'large' | number;
|
|
5
|
+
export type SpaceDirection = 'horizontal' | 'vertical';
|
|
6
|
+
|
|
7
|
+
export interface SpaceProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/**
|
|
9
|
+
* Space's class name
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Space's root class name
|
|
14
|
+
*/
|
|
15
|
+
rootClassName?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Space's size
|
|
18
|
+
*/
|
|
19
|
+
size?: SpaceSize | [SpaceSize, SpaceSize];
|
|
20
|
+
/**
|
|
21
|
+
* Whether to make the space block (full width)
|
|
22
|
+
*/
|
|
23
|
+
block?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Space's direction
|
|
26
|
+
*/
|
|
27
|
+
direction?: SpaceDirection;
|
|
28
|
+
/**
|
|
29
|
+
* Space's alignment
|
|
30
|
+
*/
|
|
31
|
+
align?: 'start' | 'end' | 'center' | 'baseline';
|
|
32
|
+
/**
|
|
33
|
+
* Space's split element
|
|
34
|
+
*/
|
|
35
|
+
split?: React.ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Whether to wrap the space items
|
|
38
|
+
*/
|
|
39
|
+
wrap?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Space's item class names
|
|
42
|
+
*/
|
|
43
|
+
classNames?: {
|
|
44
|
+
item: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* @ignore
|
|
48
|
+
*/
|
|
49
|
+
styles?: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE;
|
|
50
|
+
/**
|
|
51
|
+
* @ignore
|
|
52
|
+
*/
|
|
53
|
+
style?: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface CompactSpaceProps
|
|
57
|
+
extends React.HTMLAttributes<HTMLDivElement> {
|
|
58
|
+
/**
|
|
59
|
+
* Compact space's size
|
|
60
|
+
*/
|
|
61
|
+
size?: Exclude<SpaceSize, number>;
|
|
62
|
+
/**
|
|
63
|
+
* Compact space's direction
|
|
64
|
+
*/
|
|
65
|
+
direction?: SpaceDirection;
|
|
66
|
+
/**
|
|
67
|
+
* Whether to make the compact space block
|
|
68
|
+
*/
|
|
69
|
+
block?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Compact space's root class name
|
|
72
|
+
*/
|
|
73
|
+
rootClassName?: string;
|
|
74
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-space",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"copyfiles": "^2.4.1",
|
|
17
17
|
"rimraf": "^5.0.5",
|
|
18
18
|
"typescript": "^5.2.2",
|
|
19
|
-
"@akinon/
|
|
20
|
-
"@akinon/
|
|
19
|
+
"@akinon/ui-theme": "0.7.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
|
|
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
|
}
|