@akinon/ui-divider 0.4.0 → 1.0.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 +6 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +5 -0
- package/dist/cjs/types.d.ts +59 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/types.d.ts +59 -0
- package/package.json +6 -6
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { DividerProps } from './types';
|
|
3
|
+
export type * from './types';
|
|
4
|
+
/**
|
|
5
|
+
* The `Divider` component provides a way to visually separate content within a layout.
|
|
6
|
+
* It supports both horizontal and vertical orientations and can include optional text or content within the divider.
|
|
7
|
+
* Additional customization options like dashed lines and alignment make it versatile for various design needs.
|
|
8
|
+
*/
|
|
3
9
|
export declare const Divider: ({ children, plainOffset, ...antdProps }: DividerProps) => React.JSX.Element;
|
|
4
10
|
//# 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":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,mBAAmB,SAAS,CAAC;AAE7B;;;;GAIG;AAEH,eAAO,MAAM,OAAO,4CAIjB,YAAY,sBA6Cd,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -16,6 +16,11 @@ const ui_theme_1 = require("@akinon/ui-theme");
|
|
|
16
16
|
const cssinjs_1 = require("@ant-design/cssinjs");
|
|
17
17
|
const antd_1 = require("antd");
|
|
18
18
|
const React = require("react");
|
|
19
|
+
/**
|
|
20
|
+
* The `Divider` component provides a way to visually separate content within a layout.
|
|
21
|
+
* It supports both horizontal and vertical orientations and can include optional text or content within the divider.
|
|
22
|
+
* Additional customization options like dashed lines and alignment make it versatile for various design needs.
|
|
23
|
+
*/
|
|
19
24
|
const Divider = (_a) => {
|
|
20
25
|
var { children, plainOffset } = _a, antdProps = __rest(_a, ["children", "plainOffset"]);
|
|
21
26
|
const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE } from '@akinon/ui-theme';
|
|
2
|
+
|
|
3
|
+
export type DividerProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Select the type of divider.
|
|
6
|
+
* @default 'horizontal'
|
|
7
|
+
*/
|
|
8
|
+
type?: 'horizontal' | 'vertical';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Select the orientation of divider.
|
|
12
|
+
* @default 'left'
|
|
13
|
+
*/
|
|
14
|
+
orientation?: 'left' | 'right' | 'center';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The margin of divider relative to orientation.
|
|
18
|
+
*/
|
|
19
|
+
orientationMargin?: string | number;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Whether the divider is plain.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
plain?: boolean;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Whether the divider is dashed.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
dashed?: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The negative offset of plain divider.
|
|
35
|
+
* Use this prop to set the negative inline margin of plain divider.
|
|
36
|
+
*/
|
|
37
|
+
plainOffset?: number;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The class name of the divider.
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The root class name of the divider.
|
|
46
|
+
*/
|
|
47
|
+
rootClassName?: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The children of the divider.
|
|
51
|
+
*/
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Internal styling property restricted by the Akinon design system.
|
|
56
|
+
* @ignore
|
|
57
|
+
*/
|
|
58
|
+
style?: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE;
|
|
59
|
+
};
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { DividerProps } from './types';
|
|
3
|
+
export type * from './types';
|
|
4
|
+
/**
|
|
5
|
+
* The `Divider` component provides a way to visually separate content within a layout.
|
|
6
|
+
* It supports both horizontal and vertical orientations and can include optional text or content within the divider.
|
|
7
|
+
* Additional customization options like dashed lines and alignment make it versatile for various design needs.
|
|
8
|
+
*/
|
|
3
9
|
export declare const Divider: ({ children, plainOffset, ...antdProps }: DividerProps) => React.JSX.Element;
|
|
4
10
|
//# 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":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,mBAAmB,SAAS,CAAC;AAE7B;;;;GAIG;AAEH,eAAO,MAAM,OAAO,4CAIjB,YAAY,sBA6Cd,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -13,6 +13,11 @@ import { useToken } from '@akinon/ui-theme';
|
|
|
13
13
|
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
14
14
|
import { ConfigProvider, Divider as AntDivider } from 'antd';
|
|
15
15
|
import * as React from 'react';
|
|
16
|
+
/**
|
|
17
|
+
* The `Divider` component provides a way to visually separate content within a layout.
|
|
18
|
+
* It supports both horizontal and vertical orientations and can include optional text or content within the divider.
|
|
19
|
+
* Additional customization options like dashed lines and alignment make it versatile for various design needs.
|
|
20
|
+
*/
|
|
16
21
|
export const Divider = (_a) => {
|
|
17
22
|
var { children, plainOffset } = _a, antdProps = __rest(_a, ["children", "plainOffset"]);
|
|
18
23
|
const { getPrefixCls, theme } = React.useContext(ConfigProvider.ConfigContext);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE } from '@akinon/ui-theme';
|
|
2
|
+
|
|
3
|
+
export type DividerProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Select the type of divider.
|
|
6
|
+
* @default 'horizontal'
|
|
7
|
+
*/
|
|
8
|
+
type?: 'horizontal' | 'vertical';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Select the orientation of divider.
|
|
12
|
+
* @default 'left'
|
|
13
|
+
*/
|
|
14
|
+
orientation?: 'left' | 'right' | 'center';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The margin of divider relative to orientation.
|
|
18
|
+
*/
|
|
19
|
+
orientationMargin?: string | number;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Whether the divider is plain.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
plain?: boolean;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Whether the divider is dashed.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
dashed?: boolean;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The negative offset of plain divider.
|
|
35
|
+
* Use this prop to set the negative inline margin of plain divider.
|
|
36
|
+
*/
|
|
37
|
+
plainOffset?: number;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The class name of the divider.
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The root class name of the divider.
|
|
46
|
+
*/
|
|
47
|
+
rootClassName?: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The children of the divider.
|
|
51
|
+
*/
|
|
52
|
+
children?: React.ReactNode;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Internal styling property restricted by the Akinon design system.
|
|
56
|
+
* @ignore
|
|
57
|
+
*/
|
|
58
|
+
style?: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE;
|
|
59
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-divider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
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.
|
|
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": "
|
|
19
|
-
"@akinon/
|
|
20
|
-
"@akinon/
|
|
18
|
+
"typescript": "*",
|
|
19
|
+
"@akinon/typescript-config": "1.0.0",
|
|
20
|
+
"@akinon/ui-theme": "1.0.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
|
}
|