@akinon/ui-space 0.3.0 → 0.4.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/index.d.ts +15 -4
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +20 -3
- package/dist/esm/index.d.ts +15 -4
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +17 -1
- package/package.json +3 -8
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import type { SpaceProps as AntSpaceProps } from 'antd';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
type SpaceProps
|
|
4
|
-
export declare const Space: ({ children, ...restSpaceProps }: SpaceProps) => React.JSX.Element;
|
|
5
|
-
|
|
2
|
+
import type { CompactSpaceProps, SpaceProps } from './types';
|
|
3
|
+
export declare const Space: ({ children, block, ...restSpaceProps }: SpaceProps) => React.JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
* Supported child components:
|
|
6
|
+
* - Button
|
|
7
|
+
* - AutoComplete
|
|
8
|
+
* - DatePicker
|
|
9
|
+
* - Input
|
|
10
|
+
* - InputSearch
|
|
11
|
+
* - InputNumber
|
|
12
|
+
* - Select
|
|
13
|
+
* - TimePicker
|
|
14
|
+
*/
|
|
15
|
+
export declare const CompactSpace: React.FC<CompactSpaceProps>;
|
|
16
|
+
export type { CompactSpaceProps };
|
|
6
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI7D,eAAO,MAAM,KAAK,2CAA4C,UAAU,sBASvE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAKpD,CAAC;AAEF,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -11,11 +11,28 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.Space = void 0;
|
|
14
|
+
exports.CompactSpace = exports.Space = void 0;
|
|
15
15
|
const antd_1 = require("antd");
|
|
16
16
|
const React = require("react");
|
|
17
|
+
const AntdCompact = antd_1.Space.Compact;
|
|
17
18
|
const Space = (_a) => {
|
|
18
|
-
var { children } = _a, restSpaceProps = __rest(_a, ["children"]);
|
|
19
|
-
return React.createElement(antd_1.Space, Object.assign({}, restSpaceProps), children);
|
|
19
|
+
var { children, block } = _a, restSpaceProps = __rest(_a, ["children", "block"]);
|
|
20
|
+
return (React.createElement(antd_1.Space, Object.assign({}, restSpaceProps, (block && { style: { width: '100%' } })), children));
|
|
20
21
|
};
|
|
21
22
|
exports.Space = Space;
|
|
23
|
+
/**
|
|
24
|
+
* Supported child components:
|
|
25
|
+
* - Button
|
|
26
|
+
* - AutoComplete
|
|
27
|
+
* - DatePicker
|
|
28
|
+
* - Input
|
|
29
|
+
* - InputSearch
|
|
30
|
+
* - InputNumber
|
|
31
|
+
* - Select
|
|
32
|
+
* - TimePicker
|
|
33
|
+
*/
|
|
34
|
+
const CompactSpace = (_a) => {
|
|
35
|
+
var { children } = _a, restSpaceProps = __rest(_a, ["children"]);
|
|
36
|
+
return React.createElement(AntdCompact, Object.assign({}, restSpaceProps), children);
|
|
37
|
+
};
|
|
38
|
+
exports.CompactSpace = CompactSpace;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import type { SpaceProps as AntSpaceProps } from 'antd';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
type SpaceProps
|
|
4
|
-
export declare const Space: ({ children, ...restSpaceProps }: SpaceProps) => React.JSX.Element;
|
|
5
|
-
|
|
2
|
+
import type { CompactSpaceProps, SpaceProps } from './types';
|
|
3
|
+
export declare const Space: ({ children, block, ...restSpaceProps }: SpaceProps) => React.JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
* Supported child components:
|
|
6
|
+
* - Button
|
|
7
|
+
* - AutoComplete
|
|
8
|
+
* - DatePicker
|
|
9
|
+
* - Input
|
|
10
|
+
* - InputSearch
|
|
11
|
+
* - InputNumber
|
|
12
|
+
* - Select
|
|
13
|
+
* - TimePicker
|
|
14
|
+
*/
|
|
15
|
+
export declare const CompactSpace: React.FC<CompactSpaceProps>;
|
|
16
|
+
export type { CompactSpaceProps };
|
|
6
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI7D,eAAO,MAAM,KAAK,2CAA4C,UAAU,sBASvE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAKpD,CAAC;AAEF,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -11,7 +11,23 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import { Space as AntSpace } from 'antd';
|
|
13
13
|
import * as React from 'react';
|
|
14
|
+
const AntdCompact = AntSpace.Compact;
|
|
14
15
|
export const Space = (_a) => {
|
|
16
|
+
var { children, block } = _a, restSpaceProps = __rest(_a, ["children", "block"]);
|
|
17
|
+
return (React.createElement(AntSpace, Object.assign({}, restSpaceProps, (block && { style: { width: '100%' } })), children));
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Supported child components:
|
|
21
|
+
* - Button
|
|
22
|
+
* - AutoComplete
|
|
23
|
+
* - DatePicker
|
|
24
|
+
* - Input
|
|
25
|
+
* - InputSearch
|
|
26
|
+
* - InputNumber
|
|
27
|
+
* - Select
|
|
28
|
+
* - TimePicker
|
|
29
|
+
*/
|
|
30
|
+
export const CompactSpace = (_a) => {
|
|
15
31
|
var { children } = _a, restSpaceProps = __rest(_a, ["children"]);
|
|
16
|
-
return React.createElement(
|
|
32
|
+
return React.createElement(AntdCompact, Object.assign({}, restSpaceProps), children);
|
|
17
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-space",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -16,9 +16,8 @@
|
|
|
16
16
|
"copyfiles": "^2.4.1",
|
|
17
17
|
"rimraf": "^5.0.5",
|
|
18
18
|
"typescript": "^5.2.2",
|
|
19
|
-
"@akinon/
|
|
20
|
-
"@akinon/
|
|
21
|
-
"@akinon/typescript-config": "0.2.0"
|
|
19
|
+
"@akinon/typescript-config": "0.3.0",
|
|
20
|
+
"@akinon/ui-theme": "0.6.0"
|
|
22
21
|
},
|
|
23
22
|
"peerDependencies": {
|
|
24
23
|
"react": ">=18",
|
|
@@ -40,10 +39,6 @@
|
|
|
40
39
|
"build:commonjs": "tsc --module commonjs --outDir dist/cjs",
|
|
41
40
|
"copy:files": "copyfiles -u 1 src/**/*.css dist/esm && copyfiles -u 1 src/**/*.css dist/cjs",
|
|
42
41
|
"clean": "rimraf dist/",
|
|
43
|
-
"lint": "eslint *.ts*",
|
|
44
|
-
"test": "vitest run",
|
|
45
|
-
"test:ui": "vitest --ui",
|
|
46
|
-
"test:watch": "vitest watch",
|
|
47
42
|
"typecheck": "tsc --noEmit"
|
|
48
43
|
}
|
|
49
44
|
}
|