@akinon/ui-layout 0.5.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/Flex/index.d.ts +12 -1
- package/dist/cjs/Flex/index.d.ts.map +1 -1
- package/dist/cjs/Flex/index.js +11 -0
- package/dist/cjs/Flex/types.d.ts +56 -0
- package/dist/cjs/Grid/index.d.ts +23 -0
- package/dist/cjs/Grid/index.d.ts.map +1 -1
- package/dist/cjs/Grid/index.js +23 -0
- package/dist/cjs/Grid/types.d.ts +135 -0
- package/dist/cjs/Layout/Content/index.d.ts +8 -0
- package/dist/cjs/Layout/Content/index.d.ts.map +1 -1
- package/dist/cjs/Layout/Content/index.js +8 -0
- package/dist/cjs/Layout/Content/types.d.ts +29 -0
- package/dist/cjs/Layout/Footer/index.css +3 -0
- package/dist/cjs/Layout/Footer/index.d.ts +5 -0
- package/dist/cjs/Layout/Footer/index.d.ts.map +1 -1
- package/dist/cjs/Layout/Footer/index.js +5 -0
- package/dist/cjs/Layout/Footer/types.d.ts +43 -0
- package/dist/cjs/Layout/Header/index.css +12 -0
- package/dist/cjs/Layout/Header/index.d.ts +7 -0
- package/dist/cjs/Layout/Header/index.d.ts.map +1 -1
- package/dist/cjs/Layout/Header/index.js +7 -0
- package/dist/cjs/Layout/Header/types.d.ts +38 -0
- package/dist/cjs/Layout/Sider/index.css +34 -0
- package/dist/cjs/Layout/Sider/index.d.ts +24 -1
- package/dist/cjs/Layout/Sider/index.d.ts.map +1 -1
- package/dist/cjs/Layout/Sider/index.js +36 -6
- package/dist/cjs/Layout/Sider/types.d.ts +134 -0
- package/dist/cjs/Layout/index.d.ts +6 -0
- package/dist/cjs/Layout/index.d.ts.map +1 -1
- package/dist/cjs/Layout/index.js +6 -0
- package/dist/cjs/Layout/types.d.ts +32 -0
- package/dist/cjs/NavCard/index.css +30 -30
- package/dist/cjs/NavCard/index.d.ts +24 -0
- package/dist/cjs/NavCard/index.d.ts.map +1 -1
- package/dist/cjs/NavCard/index.js +24 -0
- package/dist/cjs/NavCard/types.d.ts +36 -0
- package/dist/cjs/PageContent/index.d.ts +4 -2
- package/dist/cjs/PageContent/index.d.ts.map +1 -1
- package/dist/cjs/PageContent/index.js +5 -4
- package/dist/cjs/PageContent/types.d.ts +11 -0
- package/dist/cjs/PageHeading/index.d.ts +5 -2
- package/dist/cjs/PageHeading/index.d.ts.map +1 -1
- package/dist/cjs/PageHeading/index.js +13 -7
- package/dist/cjs/PageHeading/types.d.ts +21 -0
- package/dist/cjs/types.d.ts +12 -0
- package/dist/esm/Flex/index.d.ts +12 -1
- package/dist/esm/Flex/index.d.ts.map +1 -1
- package/dist/esm/Flex/index.js +11 -0
- package/dist/esm/Flex/types.d.ts +56 -0
- package/dist/esm/Grid/index.d.ts +23 -0
- package/dist/esm/Grid/index.d.ts.map +1 -1
- package/dist/esm/Grid/index.js +23 -0
- package/dist/esm/Grid/types.d.ts +135 -0
- package/dist/esm/Layout/Content/index.d.ts +8 -0
- package/dist/esm/Layout/Content/index.d.ts.map +1 -1
- package/dist/esm/Layout/Content/index.js +8 -0
- package/dist/esm/Layout/Content/types.d.ts +29 -0
- package/dist/esm/Layout/Footer/index.css +3 -0
- package/dist/esm/Layout/Footer/index.d.ts +5 -0
- package/dist/esm/Layout/Footer/index.d.ts.map +1 -1
- package/dist/esm/Layout/Footer/index.js +5 -0
- package/dist/esm/Layout/Footer/types.d.ts +43 -0
- package/dist/esm/Layout/Header/index.css +12 -0
- package/dist/esm/Layout/Header/index.d.ts +7 -0
- package/dist/esm/Layout/Header/index.d.ts.map +1 -1
- package/dist/esm/Layout/Header/index.js +7 -0
- package/dist/esm/Layout/Header/types.d.ts +38 -0
- package/dist/esm/Layout/Sider/index.css +34 -0
- package/dist/esm/Layout/Sider/index.d.ts +24 -1
- package/dist/esm/Layout/Sider/index.d.ts.map +1 -1
- package/dist/esm/Layout/Sider/index.js +36 -6
- package/dist/esm/Layout/Sider/types.d.ts +134 -0
- package/dist/esm/Layout/index.d.ts +6 -0
- package/dist/esm/Layout/index.d.ts.map +1 -1
- package/dist/esm/Layout/index.js +6 -0
- package/dist/esm/Layout/types.d.ts +32 -0
- package/dist/esm/NavCard/index.css +30 -30
- package/dist/esm/NavCard/index.d.ts +24 -0
- package/dist/esm/NavCard/index.d.ts.map +1 -1
- package/dist/esm/NavCard/index.js +24 -0
- package/dist/esm/NavCard/types.d.ts +36 -0
- package/dist/esm/PageContent/index.d.ts +4 -2
- package/dist/esm/PageContent/index.d.ts.map +1 -1
- package/dist/esm/PageContent/index.js +5 -4
- package/dist/esm/PageContent/types.d.ts +11 -0
- package/dist/esm/PageHeading/index.d.ts +5 -2
- package/dist/esm/PageHeading/index.d.ts.map +1 -1
- package/dist/esm/PageHeading/index.js +13 -7
- package/dist/esm/PageHeading/types.d.ts +21 -0
- package/dist/esm/types.d.ts +12 -0
- package/package.json +6 -6
package/dist/cjs/Flex/index.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { FlexProps } from './types';
|
|
3
|
-
export type
|
|
3
|
+
export type * from './types';
|
|
4
|
+
/**
|
|
5
|
+
* The `Flex` component is a wrapper for creating flexible layouts using the flexbox model.
|
|
6
|
+
* It provides a clean and simple API to manage alignment, spacing, and direction
|
|
7
|
+
* of child elements, ensuring responsive and adaptable designs.
|
|
8
|
+
*
|
|
9
|
+
* Features include:
|
|
10
|
+
* - Vertical and horizontal layouts with optional wrapping.
|
|
11
|
+
* - Customizable alignment for both main and cross axes.
|
|
12
|
+
* - Support for predefined or custom gap sizes between child elements.
|
|
13
|
+
* - Flexibility to use any custom HTML element or React component as the container.
|
|
14
|
+
*/
|
|
4
15
|
export declare const Flex: ({ children, ...restFlexProps }: FlexProps) => React.JSX.Element;
|
|
5
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Flex/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Flex/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,mBAAmB,SAAS,CAAC;AAE7B;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,IAAI,mCAAoC,SAAS,sBA4B7D,CAAC"}
|
package/dist/cjs/Flex/index.js
CHANGED
|
@@ -16,6 +16,17 @@ 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 `Flex` component is a wrapper for creating flexible layouts using the flexbox model.
|
|
21
|
+
* It provides a clean and simple API to manage alignment, spacing, and direction
|
|
22
|
+
* of child elements, ensuring responsive and adaptable designs.
|
|
23
|
+
*
|
|
24
|
+
* Features include:
|
|
25
|
+
* - Vertical and horizontal layouts with optional wrapping.
|
|
26
|
+
* - Customizable alignment for both main and cross axes.
|
|
27
|
+
* - Support for predefined or custom gap sizes between child elements.
|
|
28
|
+
* - Flexibility to use any custom HTML element or React component as the container.
|
|
29
|
+
*/
|
|
19
30
|
const Flex = (_a) => {
|
|
20
31
|
var { children } = _a, restFlexProps = __rest(_a, ["children"]);
|
|
21
32
|
const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
export type FlexProps = Omit<AntFlexProps, 'prefixCls' | 'style' | 'styles'>;
|
|
3
|
+
|
|
4
|
+
export interface AntFlexProps<P = Record<PropertyKey, any>>
|
|
5
|
+
extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
/**
|
|
7
|
+
* ClassName on the root element
|
|
8
|
+
*/
|
|
9
|
+
rootClassName?: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Is direction of the flex vertical, use <code>flex-direction: column</code>
|
|
13
|
+
*/
|
|
14
|
+
vertical?: boolean;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Set whether the element is displayed in a single line or in multiple lines
|
|
18
|
+
*/
|
|
19
|
+
wrap?: boolean | React.CSSProperties['flexWrap'];
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Sets the alignment of elements in the direction of the main axis
|
|
23
|
+
*/
|
|
24
|
+
justify?: React.CSSProperties['justifyContent'];
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Sets the alignment of elements in the direction of the cross axis
|
|
28
|
+
*/
|
|
29
|
+
align?: React.CSSProperties['alignItems'];
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Flex CSS shorthand properties
|
|
33
|
+
*/
|
|
34
|
+
flex?: React.CSSProperties['flex'];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Sets the gap between grids
|
|
38
|
+
*/
|
|
39
|
+
gap?: React.CSSProperties['gap'] | SizeType;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The content inside the flex container.
|
|
43
|
+
*/
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Custom element type
|
|
48
|
+
*/
|
|
49
|
+
component?: CustomComponent<P>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type SizeType = 'small' | 'middle' | 'large' | undefined;
|
|
53
|
+
|
|
54
|
+
type CustomComponent<P = Record<PropertyKey, any>> =
|
|
55
|
+
| React.ComponentType<P>
|
|
56
|
+
| string;
|
package/dist/cjs/Grid/index.d.ts
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ColProps, RowProps } from './types';
|
|
3
3
|
export type { ColProps, RowProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* `Row` and `Col` are layout components used in a grid system to create responsive and flexible designs.
|
|
6
|
+
* They work together to divide the available space into rows and columns, aligning content
|
|
7
|
+
* based on the specified layout rules and breakpoints.
|
|
8
|
+
*
|
|
9
|
+
* Together, `Row` and `Col` provide a complete solution for responsive grid-based layouts.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* The `Row` component is used to create horizontal groups of columns. It manages spacing, alignment, and wrapping behavior.
|
|
14
|
+
* - Supports custom spacing (`gutter`) for horizontal and vertical space between columns.
|
|
15
|
+
* - Allows vertical alignment (`align`) and horizontal justification (`justify`) of content.
|
|
16
|
+
* - Automatically wraps columns into the next line when necessary (`wrap`).
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
4
19
|
export declare const Row: ({ children, ...restRowProps }: RowProps) => React.JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* The `Col` component represents individual columns within a row. It determines the width and position of the column.
|
|
23
|
+
* - Flexible width management using `span`, `offset`, `push`, and `pull`.
|
|
24
|
+
* - Supports responsive breakpoints (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`) for defining behavior across screen sizes.
|
|
25
|
+
* - Can define flex-specific properties like `flex` for advanced layouts.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
5
28
|
export declare const Col: ({ children, ...restColProps }: ColProps) => React.JSX.Element;
|
|
6
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Grid/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAElD,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAElD,eAAO,MAAM,GAAG,kCAAmC,QAAQ,sBAkC1D,CAAC;AAEF,eAAO,MAAM,GAAG,kCAAmC,QAAQ,sBA4B1D,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Grid/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAElD,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;;GAMG;AAEH;;;;;;;GAOG;AAEH,eAAO,MAAM,GAAG,kCAAmC,QAAQ,sBAkC1D,CAAC;AAEF;;;;;;;GAOG;AAEH,eAAO,MAAM,GAAG,kCAAmC,QAAQ,sBA4B1D,CAAC"}
|
package/dist/cjs/Grid/index.js
CHANGED
|
@@ -16,6 +16,21 @@ 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
|
+
* `Row` and `Col` are layout components used in a grid system to create responsive and flexible designs.
|
|
21
|
+
* They work together to divide the available space into rows and columns, aligning content
|
|
22
|
+
* based on the specified layout rules and breakpoints.
|
|
23
|
+
*
|
|
24
|
+
* Together, `Row` and `Col` provide a complete solution for responsive grid-based layouts.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* The `Row` component is used to create horizontal groups of columns. It manages spacing, alignment, and wrapping behavior.
|
|
29
|
+
* - Supports custom spacing (`gutter`) for horizontal and vertical space between columns.
|
|
30
|
+
* - Allows vertical alignment (`align`) and horizontal justification (`justify`) of content.
|
|
31
|
+
* - Automatically wraps columns into the next line when necessary (`wrap`).
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
19
34
|
const Row = (_a) => {
|
|
20
35
|
var { children } = _a, restRowProps = __rest(_a, ["children"]);
|
|
21
36
|
const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
|
|
@@ -39,6 +54,14 @@ const Row = (_a) => {
|
|
|
39
54
|
return useStyle(React.createElement(antd_1.Row, Object.assign({ gutter: [gridToken === null || gridToken === void 0 ? void 0 : gridToken.gutter, gridToken === null || gridToken === void 0 ? void 0 : gridToken.gutter] }, restRowProps), children));
|
|
40
55
|
};
|
|
41
56
|
exports.Row = Row;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* The `Col` component represents individual columns within a row. It determines the width and position of the column.
|
|
60
|
+
* - Flexible width management using `span`, `offset`, `push`, and `pull`.
|
|
61
|
+
* - Supports responsive breakpoints (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`) for defining behavior across screen sizes.
|
|
62
|
+
* - Can define flex-specific properties like `flex` for advanced layouts.
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
42
65
|
const Col = (_a) => {
|
|
43
66
|
var { children } = _a, restColProps = __rest(_a, ["children"]);
|
|
44
67
|
const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export type RowProps = Omit<AntRowProps, 'prefixCls' | 'style' | 'styles'>;
|
|
2
|
+
|
|
3
|
+
export type ColProps = Omit<AntColProps, 'prefixCls' | 'style' | 'styles'>;
|
|
4
|
+
|
|
5
|
+
type ColSpanType = number | string;
|
|
6
|
+
|
|
7
|
+
type FlexType = number | LiteralUnion<'none' | 'auto'>;
|
|
8
|
+
|
|
9
|
+
type LiteralUnion<T extends string> = T | (string & {});
|
|
10
|
+
|
|
11
|
+
export interface ColSize {
|
|
12
|
+
flex?: FlexType;
|
|
13
|
+
span?: number | string;
|
|
14
|
+
order?: number | string;
|
|
15
|
+
offset?: number | string;
|
|
16
|
+
push?: number | string;
|
|
17
|
+
pull?: number | string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface AntColProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
/**
|
|
22
|
+
* Flex layout style
|
|
23
|
+
*/
|
|
24
|
+
flex?: FlexType;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Raster number of cells to occupy, 0 corresponds to display: none
|
|
28
|
+
*/
|
|
29
|
+
span?: number | string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Raster order
|
|
33
|
+
*/
|
|
34
|
+
order?: number | string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The number of cells to offset Col from the left
|
|
38
|
+
*/
|
|
39
|
+
offset?: number | string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The number of cells that raster is moved to the right
|
|
43
|
+
*/
|
|
44
|
+
push?: number | string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The number of cells that raster is moved to the left
|
|
48
|
+
*/
|
|
49
|
+
pull?: number | string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* screen < 576px and also default setting, could be a span value or an object containing above props
|
|
53
|
+
*/
|
|
54
|
+
xs?: number | string | ColSize;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* screen ≥ 576px, could be a span value or an object containing above props
|
|
58
|
+
*/
|
|
59
|
+
sm?: number | string | ColSize;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* screen ≥ 768px, could be a span value or an object containing above props
|
|
63
|
+
*/
|
|
64
|
+
md?: number | string | ColSize;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* screen ≥ 992px, could be a span value or an object containing above props
|
|
68
|
+
*/
|
|
69
|
+
lg?: number | string | ColSize;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* screen ≥ 1200px, could be a span value or an object containing above props
|
|
73
|
+
*/
|
|
74
|
+
xl?: number | string | ColSize;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* screen ≥ 1600px, could be a span value or an object containing above props
|
|
78
|
+
*/
|
|
79
|
+
xxl?: number | string | ColSize;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export declare const Col: React.ForwardRefExoticComponent<
|
|
83
|
+
ColProps & React.RefAttributes<HTMLDivElement>
|
|
84
|
+
>;
|
|
85
|
+
|
|
86
|
+
type Breakpoint = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
87
|
+
|
|
88
|
+
declare const RowAligns: readonly ['top', 'middle', 'bottom', 'stretch'];
|
|
89
|
+
|
|
90
|
+
declare const RowJustify: readonly [
|
|
91
|
+
'start',
|
|
92
|
+
'end',
|
|
93
|
+
'center',
|
|
94
|
+
'space-around',
|
|
95
|
+
'space-between',
|
|
96
|
+
'space-evenly'
|
|
97
|
+
];
|
|
98
|
+
|
|
99
|
+
type Responsive = 'xxl' | 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
100
|
+
|
|
101
|
+
type ResponsiveLike<T> = {
|
|
102
|
+
[key in Responsive]?: T;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export type Gutter = number | undefined | Partial<Record<Breakpoint, number>>;
|
|
106
|
+
|
|
107
|
+
type ResponsiveAligns = ResponsiveLike<(typeof RowAligns)[number]>;
|
|
108
|
+
|
|
109
|
+
type ResponsiveJustify = ResponsiveLike<(typeof RowJustify)[number]>;
|
|
110
|
+
|
|
111
|
+
export interface AntRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
112
|
+
/**
|
|
113
|
+
* Spacing between grids, could be a number or a object like { xs: 8, sm: 16, md: 24}. Or you can use array to make horizontal and vertical spacing work at the same time <code>[horizontal, vertical]</code>
|
|
114
|
+
*/
|
|
115
|
+
gutter?: Gutter | [Gutter, Gutter];
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Vertical alignment
|
|
119
|
+
*/
|
|
120
|
+
align?: 'top' | 'middle' | 'bottom' | 'stretch' | ResponsiveAligns;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Horizontal arrangement
|
|
124
|
+
*/
|
|
125
|
+
justify?: (typeof RowJustify)[number] | ResponsiveJustify;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Auto wrap line
|
|
129
|
+
*/
|
|
130
|
+
wrap?: boolean;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export declare const Row: React.ForwardRefExoticComponent<
|
|
134
|
+
RowProps & React.RefAttributes<HTMLDivElement>
|
|
135
|
+
>;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ContentProps } from './types';
|
|
3
3
|
export type { ContentProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* `Content` is a layout component designed for the main content area of an application or page.
|
|
6
|
+
*
|
|
7
|
+
* ### Features:
|
|
8
|
+
* - **Custom Styling:** Easily apply custom styles using `prefixCls`, `suffixCls`, or `rootClassName`.
|
|
9
|
+
* - **Responsive Design:** Automatically adjusts based on the presence of a `Sider`.
|
|
10
|
+
* - **Structure:** Works seamlessly with other layout components such as `Header`, `Footer`, and `Sider`.
|
|
11
|
+
*/
|
|
4
12
|
export declare const Content: ({ children, ...restContentProps }: ContentProps) => React.JSX.Element;
|
|
5
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Layout/Content/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,eAAO,MAAM,OAAO,sCAAuC,YAAY,sBA4BtE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Layout/Content/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C;;;;;;;GAOG;AAEH,eAAO,MAAM,OAAO,sCAAuC,YAAY,sBA4BtE,CAAC"}
|
|
@@ -17,6 +17,14 @@ const cssinjs_1 = require("@ant-design/cssinjs");
|
|
|
17
17
|
const antd_1 = require("antd");
|
|
18
18
|
const React = require("react");
|
|
19
19
|
const { Content: AntContent } = antd_1.Layout;
|
|
20
|
+
/**
|
|
21
|
+
* `Content` is a layout component designed for the main content area of an application or page.
|
|
22
|
+
*
|
|
23
|
+
* ### Features:
|
|
24
|
+
* - **Custom Styling:** Easily apply custom styles using `prefixCls`, `suffixCls`, or `rootClassName`.
|
|
25
|
+
* - **Responsive Design:** Automatically adjusts based on the presence of a `Sider`.
|
|
26
|
+
* - **Structure:** Works seamlessly with other layout components such as `Header`, `Footer`, and `Sider`.
|
|
27
|
+
*/
|
|
20
28
|
const Content = (_a) => {
|
|
21
29
|
var { children } = _a, restContentProps = __rest(_a, ["children"]);
|
|
22
30
|
const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type ContentProps = Omit<
|
|
2
|
+
AntContentProps,
|
|
3
|
+
'prefixCls' | 'suffixCls' | 'style' | 'styles'
|
|
4
|
+
>;
|
|
5
|
+
|
|
6
|
+
export type AntContentProps = AntContentBasicProps &
|
|
7
|
+
React.RefAttributes<HTMLElement>;
|
|
8
|
+
|
|
9
|
+
interface AntContentBasicProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
/**
|
|
11
|
+
* Prefix class for custom styling.
|
|
12
|
+
*/
|
|
13
|
+
prefixCls?: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Suffix class for custom styling.
|
|
17
|
+
*/
|
|
18
|
+
suffixCls?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Class name for the root element.
|
|
22
|
+
*/
|
|
23
|
+
rootClassName?: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Indicates if the layout contains a sider.
|
|
27
|
+
*/
|
|
28
|
+
hasSider?: boolean;
|
|
29
|
+
}
|
|
@@ -2,5 +2,10 @@ import './index.css';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { FooterProps } from './types';
|
|
4
4
|
export type { FooterProps } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Footer component, which serves as the bottom section of a layout.
|
|
7
|
+
* It provides a consistent structure for displaying additional
|
|
8
|
+
* information, links, or branding at the end of the page.
|
|
9
|
+
*/
|
|
5
10
|
export declare const Footer: ({ children, ...restFooterProps }: FooterProps) => React.JSX.Element;
|
|
6
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Layout/Footer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,eAAO,MAAM,MAAM,qCAAsC,WAAW,sBA4BnE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Layout/Footer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C;;;;GAIG;AAEH,eAAO,MAAM,MAAM,qCAAsC,WAAW,sBA4BnE,CAAC"}
|
|
@@ -18,6 +18,11 @@ const cssinjs_1 = require("@ant-design/cssinjs");
|
|
|
18
18
|
const antd_1 = require("antd");
|
|
19
19
|
const React = require("react");
|
|
20
20
|
const { Footer: AntFooter } = antd_1.Layout;
|
|
21
|
+
/**
|
|
22
|
+
* Footer component, which serves as the bottom section of a layout.
|
|
23
|
+
* It provides a consistent structure for displaying additional
|
|
24
|
+
* information, links, or branding at the end of the page.
|
|
25
|
+
*/
|
|
21
26
|
const Footer = (_a) => {
|
|
22
27
|
var { children } = _a, restFooterProps = __rest(_a, ["children"]);
|
|
23
28
|
const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the Footer component, excluding specific attributes from AntFooterProps.
|
|
3
|
+
*/
|
|
4
|
+
export type FooterProps = Omit<
|
|
5
|
+
AntFooterProps,
|
|
6
|
+
'prefixCls' | 'suffixCls' | 'style' | 'styles'
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Combined type for Footer props with React reference attributes.
|
|
11
|
+
*/
|
|
12
|
+
export type AntFooterProps = AntFooterBasicProps &
|
|
13
|
+
React.RefAttributes<HTMLElement>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Basic props for the Footer component.
|
|
17
|
+
*/
|
|
18
|
+
interface AntFooterBasicProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
/**
|
|
20
|
+
* Prefix class for custom styling.
|
|
21
|
+
*/
|
|
22
|
+
prefixCls?: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Suffix class for additional customization.
|
|
26
|
+
*/
|
|
27
|
+
suffixCls?: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Root class name for the Footer component.
|
|
31
|
+
*/
|
|
32
|
+
rootClassName?: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Indicates whether the layout contains a Sider component.
|
|
36
|
+
*/
|
|
37
|
+
hasSider?: boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Content to be displayed inside the Footer.
|
|
41
|
+
*/
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.akinon-layout-header {
|
|
2
|
+
padding-inline: 1rem;
|
|
3
|
+
height: 3.5rem;
|
|
4
|
+
border-bottom: 1px solid var(--color-gray-900);
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
line-height: unset;
|
|
9
|
+
position: sticky;
|
|
10
|
+
top: 0;
|
|
11
|
+
z-index: 999;
|
|
12
|
+
}
|
|
@@ -2,5 +2,12 @@ import './index.css';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { HeaderProps } from './types';
|
|
4
4
|
export type { HeaderProps } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Header component, which serves as the top section of a layout.
|
|
7
|
+
* It provides a consistent structure for navigation, branding, or additional controls at the top of the page.
|
|
8
|
+
*
|
|
9
|
+
* This component is part of the Layout system and is typically used alongside other Layout components
|
|
10
|
+
* such as Footer, Sider, and Content to build a structured page layout.
|
|
11
|
+
*/
|
|
5
12
|
export declare const Header: ({ children, ...restHeaderProps }: HeaderProps) => React.JSX.Element;
|
|
6
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Layout/Header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,eAAO,MAAM,MAAM,qCAAsC,WAAW,sBA4BnE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Layout/Header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C;;;;;;GAMG;AAEH,eAAO,MAAM,MAAM,qCAAsC,WAAW,sBA4BnE,CAAC"}
|
|
@@ -18,6 +18,13 @@ const cssinjs_1 = require("@ant-design/cssinjs");
|
|
|
18
18
|
const antd_1 = require("antd");
|
|
19
19
|
const React = require("react");
|
|
20
20
|
const { Header: AntHeader } = antd_1.Layout;
|
|
21
|
+
/**
|
|
22
|
+
* Header component, which serves as the top section of a layout.
|
|
23
|
+
* It provides a consistent structure for navigation, branding, or additional controls at the top of the page.
|
|
24
|
+
*
|
|
25
|
+
* This component is part of the Layout system and is typically used alongside other Layout components
|
|
26
|
+
* such as Footer, Sider, and Content to build a structured page layout.
|
|
27
|
+
*/
|
|
21
28
|
const Header = (_a) => {
|
|
22
29
|
var { children } = _a, restHeaderProps = __rest(_a, ["children"]);
|
|
23
30
|
const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header component, which serves as the top section of a layout.
|
|
3
|
+
* It provides a consistent structure for navigation, branding, or additional controls at the top of the page.
|
|
4
|
+
*/
|
|
5
|
+
export type HeaderProps = Omit<
|
|
6
|
+
AntHeaderProps,
|
|
7
|
+
'prefixCls' | 'suffixCls' | 'style' | 'styles'
|
|
8
|
+
>;
|
|
9
|
+
|
|
10
|
+
export type AntHeaderProps = AntHeaderBasicProps &
|
|
11
|
+
React.RefAttributes<HTMLElement>;
|
|
12
|
+
|
|
13
|
+
interface AntHeaderBasicProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
/**
|
|
15
|
+
* Prefix class for custom styling.
|
|
16
|
+
*/
|
|
17
|
+
prefixCls?: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Suffix class for custom styling.
|
|
21
|
+
*/
|
|
22
|
+
suffixCls?: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Root class name for the component.
|
|
26
|
+
*/
|
|
27
|
+
rootClassName?: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Indicates if the layout has a sider.
|
|
31
|
+
*/
|
|
32
|
+
hasSider?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The children elements to render within the header.
|
|
36
|
+
*/
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.akinon-layout-sider {
|
|
2
|
+
position: sticky;
|
|
3
|
+
top: 0;
|
|
4
|
+
height: 100svh;
|
|
5
|
+
overflow-y: auto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.akinon-layout-sider.left {
|
|
9
|
+
inset-inline-start: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.akinon-layout-sider.right {
|
|
13
|
+
inset-inline-end: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.akinon-layout-sider .logo-container {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
align-items: center;
|
|
20
|
+
height: 3.5rem;
|
|
21
|
+
gap: 0.8rem;
|
|
22
|
+
background-color: var(--color-ebonyClay-600);
|
|
23
|
+
padding-inline: 1.5rem;
|
|
24
|
+
/* border-bottom: 1px solid var(--color-gray-900); */
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.akinon-layout-sider .logo-container.collapsed {
|
|
28
|
+
justify-content: center;
|
|
29
|
+
padding-inline: 1rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.akinon-layout-sider .logo-container.collapsed .brand-image {
|
|
33
|
+
display: none;
|
|
34
|
+
}
|
|
@@ -2,5 +2,28 @@ import './index.css';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { SiderProps } from './types';
|
|
4
4
|
export type { LeftSiderItem, SiderProps } from './types';
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Sider component for building collapsible sidebars in user interfaces.
|
|
7
|
+
*
|
|
8
|
+
* The Sider component is designed to provide a flexible and customizable sidebar
|
|
9
|
+
* that integrates seamlessly with layouts, menus, and responsive designs.
|
|
10
|
+
*
|
|
11
|
+
* Features:
|
|
12
|
+
* - **Collapsible**: Option to collapse the sidebar manually or automatically.
|
|
13
|
+
* - **Custom Triggers**: Supports custom triggers or hiding the trigger altogether.
|
|
14
|
+
* - **Width Options**: Configure both default and collapsed widths.
|
|
15
|
+
* - **Responsive Breakpoints**: Adjusts behavior based on predefined screen sizes.
|
|
16
|
+
* - **Theming**: Offers `light` and `dark` themes to match application aesthetics.
|
|
17
|
+
* - **Callbacks**:
|
|
18
|
+
* - `onCollapse`: Triggered when the sidebar is collapsed or expanded.
|
|
19
|
+
* - `onBreakpoint`: Triggered when responsive breakpoints are reached.
|
|
20
|
+
* - **Custom Styling**:
|
|
21
|
+
* - `className` for additional styling.
|
|
22
|
+
* - `zeroWidthTriggerStyle` for styling triggers when the collapsed width is zero.
|
|
23
|
+
* - `brandImageUrl` and `iconUrl` for branding and visual customization.
|
|
24
|
+
*
|
|
25
|
+
* Ideal for dashboards, navigation menus, and applications requiring collapsible or responsive side navigation.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare const Sider: ({ children, collapsed, iconUrl, brandImageUrl, position, ...restSiderProps }: SiderProps) => React.JSX.Element;
|
|
6
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Layout/Sider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIzD,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Layout/Sider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIzD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,eAAO,MAAM,KAAK,iFAOf,UAAU,sBAgEZ,CAAC"}
|