@akinon/ui-space 0.5.0 → 1.0.1

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.
@@ -1,5 +1,26 @@
1
1
  import * as React from 'react';
2
2
  import type { CompactSpaceProps, SpaceProps } from './types';
3
+ /**
4
+ * Space component for arranging elements with consistent spacing.
5
+ *
6
+ * The Space component is designed to provide uniform spacing between child elements
7
+ * in either a horizontal or vertical direction. It simplifies the creation of layouts
8
+ * with proper alignment and spacing, ensuring a clean and consistent design.
9
+ *
10
+ * Features:
11
+ * - **Customizable Size**: Supports predefined sizes (`small`, `middle`, `large`) or a custom numeric value.
12
+ * - **Direction**: Easily switch between horizontal or vertical stacking of child elements.
13
+ * - **Alignment**: Aligns items with options like `start`, `end`, `center`, or `baseline`.
14
+ * - **Wrap Support**: Automatically wraps items to the next line if they exceed the container width.
15
+ * - **Split Element**: Add a customizable separator between child elements.
16
+ * - **Block Mode**: Enables full-width layout for the space.
17
+ * - **Flexible Class Names**: Allows customization through `className` and `rootClassName` props.
18
+ *
19
+ * Additionally, the `CompactSpaceProps` interface extends functionality for compact layouts,
20
+ * providing tighter spacing and alignment options for more space-efficient designs.
21
+ *
22
+ * Ideal for consistent spacing between buttons, icons, or other grouped elements in a layout.
23
+ */
3
24
  export declare const Space: ({ children, block, ...restSpaceProps }: SpaceProps) => React.JSX.Element;
4
25
  /**
5
26
  * Supported child components:
@@ -1 +1 @@
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"}
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;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,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
@@ -15,6 +15,27 @@ exports.CompactSpace = exports.Space = void 0;
15
15
  const antd_1 = require("antd");
16
16
  const React = require("react");
17
17
  const AntdCompact = antd_1.Space.Compact;
18
+ /**
19
+ * Space component for arranging elements with consistent spacing.
20
+ *
21
+ * The Space component is designed to provide uniform spacing between child elements
22
+ * in either a horizontal or vertical direction. It simplifies the creation of layouts
23
+ * with proper alignment and spacing, ensuring a clean and consistent design.
24
+ *
25
+ * Features:
26
+ * - **Customizable Size**: Supports predefined sizes (`small`, `middle`, `large`) or a custom numeric value.
27
+ * - **Direction**: Easily switch between horizontal or vertical stacking of child elements.
28
+ * - **Alignment**: Aligns items with options like `start`, `end`, `center`, or `baseline`.
29
+ * - **Wrap Support**: Automatically wraps items to the next line if they exceed the container width.
30
+ * - **Split Element**: Add a customizable separator between child elements.
31
+ * - **Block Mode**: Enables full-width layout for the space.
32
+ * - **Flexible Class Names**: Allows customization through `className` and `rootClassName` props.
33
+ *
34
+ * Additionally, the `CompactSpaceProps` interface extends functionality for compact layouts,
35
+ * providing tighter spacing and alignment options for more space-efficient designs.
36
+ *
37
+ * Ideal for consistent spacing between buttons, icons, or other grouped elements in a layout.
38
+ */
18
39
  const Space = (_a) => {
19
40
  var { children, block } = _a, restSpaceProps = __rest(_a, ["children", "block"]);
20
41
  return (React.createElement(antd_1.Space, Object.assign({}, restSpaceProps, (block && { style: { width: '100%' } })), children));
@@ -2,6 +2,7 @@ import type { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE } from '@akinon/ui-
2
2
  import type React from 'react';
3
3
 
4
4
  export type SpaceSize = 'small' | 'middle' | 'large' | number;
5
+
5
6
  export type SpaceDirection = 'horizontal' | 'vertical';
6
7
 
7
8
  export interface SpaceProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -9,48 +10,53 @@ export interface SpaceProps extends React.HTMLAttributes<HTMLDivElement> {
9
10
  * Space's class name
10
11
  */
11
12
  className?: string;
13
+
12
14
  /**
13
15
  * Space's root class name
14
16
  */
15
17
  rootClassName?: string;
18
+
16
19
  /**
17
20
  * Space's size
18
21
  */
19
22
  size?: SpaceSize | [SpaceSize, SpaceSize];
23
+
20
24
  /**
21
25
  * Whether to make the space block (full width)
22
26
  */
23
27
  block?: boolean;
28
+
24
29
  /**
25
30
  * Space's direction
26
31
  */
27
32
  direction?: SpaceDirection;
33
+
28
34
  /**
29
35
  * Space's alignment
30
36
  */
31
37
  align?: 'start' | 'end' | 'center' | 'baseline';
38
+
32
39
  /**
33
40
  * Space's split element
34
41
  */
35
42
  split?: React.ReactNode;
43
+
36
44
  /**
37
45
  * Whether to wrap the space items
38
46
  */
39
47
  wrap?: boolean;
48
+
40
49
  /**
41
50
  * Space's item class names
42
51
  */
43
52
  classNames?: {
44
53
  item: string;
45
54
  };
55
+
46
56
  /**
47
57
  * @ignore
48
58
  */
49
59
  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
60
  }
55
61
 
56
62
  export interface CompactSpaceProps
@@ -59,14 +65,17 @@ export interface CompactSpaceProps
59
65
  * Compact space's size
60
66
  */
61
67
  size?: Exclude<SpaceSize, number>;
68
+
62
69
  /**
63
70
  * Compact space's direction
64
71
  */
65
72
  direction?: SpaceDirection;
73
+
66
74
  /**
67
75
  * Whether to make the compact space block
68
76
  */
69
77
  block?: boolean;
78
+
70
79
  /**
71
80
  * Compact space's root class name
72
81
  */
@@ -1,5 +1,26 @@
1
1
  import * as React from 'react';
2
2
  import type { CompactSpaceProps, SpaceProps } from './types';
3
+ /**
4
+ * Space component for arranging elements with consistent spacing.
5
+ *
6
+ * The Space component is designed to provide uniform spacing between child elements
7
+ * in either a horizontal or vertical direction. It simplifies the creation of layouts
8
+ * with proper alignment and spacing, ensuring a clean and consistent design.
9
+ *
10
+ * Features:
11
+ * - **Customizable Size**: Supports predefined sizes (`small`, `middle`, `large`) or a custom numeric value.
12
+ * - **Direction**: Easily switch between horizontal or vertical stacking of child elements.
13
+ * - **Alignment**: Aligns items with options like `start`, `end`, `center`, or `baseline`.
14
+ * - **Wrap Support**: Automatically wraps items to the next line if they exceed the container width.
15
+ * - **Split Element**: Add a customizable separator between child elements.
16
+ * - **Block Mode**: Enables full-width layout for the space.
17
+ * - **Flexible Class Names**: Allows customization through `className` and `rootClassName` props.
18
+ *
19
+ * Additionally, the `CompactSpaceProps` interface extends functionality for compact layouts,
20
+ * providing tighter spacing and alignment options for more space-efficient designs.
21
+ *
22
+ * Ideal for consistent spacing between buttons, icons, or other grouped elements in a layout.
23
+ */
3
24
  export declare const Space: ({ children, block, ...restSpaceProps }: SpaceProps) => React.JSX.Element;
4
25
  /**
5
26
  * Supported child components:
@@ -1 +1 @@
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"}
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;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,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
@@ -12,6 +12,27 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { Space as AntSpace } from 'antd';
13
13
  import * as React from 'react';
14
14
  const AntdCompact = AntSpace.Compact;
15
+ /**
16
+ * Space component for arranging elements with consistent spacing.
17
+ *
18
+ * The Space component is designed to provide uniform spacing between child elements
19
+ * in either a horizontal or vertical direction. It simplifies the creation of layouts
20
+ * with proper alignment and spacing, ensuring a clean and consistent design.
21
+ *
22
+ * Features:
23
+ * - **Customizable Size**: Supports predefined sizes (`small`, `middle`, `large`) or a custom numeric value.
24
+ * - **Direction**: Easily switch between horizontal or vertical stacking of child elements.
25
+ * - **Alignment**: Aligns items with options like `start`, `end`, `center`, or `baseline`.
26
+ * - **Wrap Support**: Automatically wraps items to the next line if they exceed the container width.
27
+ * - **Split Element**: Add a customizable separator between child elements.
28
+ * - **Block Mode**: Enables full-width layout for the space.
29
+ * - **Flexible Class Names**: Allows customization through `className` and `rootClassName` props.
30
+ *
31
+ * Additionally, the `CompactSpaceProps` interface extends functionality for compact layouts,
32
+ * providing tighter spacing and alignment options for more space-efficient designs.
33
+ *
34
+ * Ideal for consistent spacing between buttons, icons, or other grouped elements in a layout.
35
+ */
15
36
  export const Space = (_a) => {
16
37
  var { children, block } = _a, restSpaceProps = __rest(_a, ["children", "block"]);
17
38
  return (React.createElement(AntSpace, Object.assign({}, restSpaceProps, (block && { style: { width: '100%' } })), children));
@@ -2,6 +2,7 @@ import type { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE } from '@akinon/ui-
2
2
  import type React from 'react';
3
3
 
4
4
  export type SpaceSize = 'small' | 'middle' | 'large' | number;
5
+
5
6
  export type SpaceDirection = 'horizontal' | 'vertical';
6
7
 
7
8
  export interface SpaceProps extends React.HTMLAttributes<HTMLDivElement> {
@@ -9,48 +10,53 @@ export interface SpaceProps extends React.HTMLAttributes<HTMLDivElement> {
9
10
  * Space's class name
10
11
  */
11
12
  className?: string;
13
+
12
14
  /**
13
15
  * Space's root class name
14
16
  */
15
17
  rootClassName?: string;
18
+
16
19
  /**
17
20
  * Space's size
18
21
  */
19
22
  size?: SpaceSize | [SpaceSize, SpaceSize];
23
+
20
24
  /**
21
25
  * Whether to make the space block (full width)
22
26
  */
23
27
  block?: boolean;
28
+
24
29
  /**
25
30
  * Space's direction
26
31
  */
27
32
  direction?: SpaceDirection;
33
+
28
34
  /**
29
35
  * Space's alignment
30
36
  */
31
37
  align?: 'start' | 'end' | 'center' | 'baseline';
38
+
32
39
  /**
33
40
  * Space's split element
34
41
  */
35
42
  split?: React.ReactNode;
43
+
36
44
  /**
37
45
  * Whether to wrap the space items
38
46
  */
39
47
  wrap?: boolean;
48
+
40
49
  /**
41
50
  * Space's item class names
42
51
  */
43
52
  classNames?: {
44
53
  item: string;
45
54
  };
55
+
46
56
  /**
47
57
  * @ignore
48
58
  */
49
59
  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
60
  }
55
61
 
56
62
  export interface CompactSpaceProps
@@ -59,14 +65,17 @@ export interface CompactSpaceProps
59
65
  * Compact space's size
60
66
  */
61
67
  size?: Exclude<SpaceSize, number>;
68
+
62
69
  /**
63
70
  * Compact space's direction
64
71
  */
65
72
  direction?: SpaceDirection;
73
+
66
74
  /**
67
75
  * Whether to make the compact space block
68
76
  */
69
77
  block?: boolean;
78
+
70
79
  /**
71
80
  * Compact space's root class name
72
81
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/ui-space",
3
- "version": "0.5.0",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/esm/index.js",
@@ -9,15 +9,15 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "antd": "5.17.0"
12
+ "antd": "5.22.6"
13
13
  },
14
14
  "devDependencies": {
15
15
  "clean-package": "2.2.0",
16
16
  "copyfiles": "^2.4.1",
17
17
  "rimraf": "^5.0.5",
18
- "typescript": "^5.2.2",
19
- "@akinon/ui-theme": "0.7.0",
20
- "@akinon/typescript-config": "0.4.0"
18
+ "typescript": "*",
19
+ "@akinon/typescript-config": "1.0.1",
20
+ "@akinon/ui-theme": "1.0.1"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": ">=18",