@akinon/ui-layout 0.6.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 +12 -3
- 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 +14 -2
- 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 +15 -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 +28 -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 +23 -0
- package/dist/cjs/Layout/Sider/index.css +8 -2
- 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 +61 -1
- 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 +14 -4
- 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 +4 -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 +9 -1
- 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 +4 -1
- 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 +12 -3
- 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 +14 -2
- 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 +15 -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 +28 -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 +23 -0
- package/dist/esm/Layout/Sider/index.css +8 -2
- 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 +61 -1
- 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 +14 -4
- 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 +4 -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 +9 -1
- 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 +4 -1
- package/package.json +5 -5
|
@@ -1,68 +1,128 @@
|
|
|
1
1
|
// TODO integrate with antd menu types
|
|
2
|
+
/**
|
|
3
|
+
* Interface for items within the left sider.
|
|
4
|
+
*/
|
|
2
5
|
export type LeftSiderItem = {
|
|
6
|
+
/**
|
|
7
|
+
* Unique key for the menu item.
|
|
8
|
+
*/
|
|
3
9
|
key: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Display label for the menu item.
|
|
13
|
+
*/
|
|
4
14
|
label: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Optional icon for the menu item.
|
|
18
|
+
*/
|
|
5
19
|
icon?: React.ReactNode;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Additional CSS class for the menu item.
|
|
23
|
+
*/
|
|
6
24
|
className?: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Callback function triggered when the menu item is clicked.
|
|
28
|
+
*/
|
|
7
29
|
onClick?: () => void;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Nested children items for creating submenus.
|
|
33
|
+
*/
|
|
8
34
|
children?: LeftSiderItem[];
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Whether the menu item is disabled.
|
|
38
|
+
*/
|
|
9
39
|
disabled?: boolean;
|
|
10
40
|
};
|
|
11
41
|
|
|
12
42
|
export type SiderProps = Omit<AntSiderProps, 'prefixCls' | 'style' | 'styles'>;
|
|
13
43
|
|
|
14
44
|
export interface AntSiderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
15
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Sider position for border position.
|
|
47
|
+
* If it is left, the border will be on the right side.
|
|
48
|
+
* Other is other side.
|
|
49
|
+
*
|
|
50
|
+
* @default left
|
|
51
|
+
*/
|
|
52
|
+
position?: 'left' | 'right';
|
|
53
|
+
|
|
16
54
|
/**
|
|
17
55
|
* Whether can be collapsed
|
|
18
56
|
*/
|
|
19
57
|
collapsible?: boolean;
|
|
58
|
+
|
|
20
59
|
/**
|
|
21
60
|
* To set the current status
|
|
22
61
|
*/
|
|
23
62
|
collapsed?: boolean;
|
|
63
|
+
|
|
24
64
|
/**
|
|
25
65
|
* To set the initial status
|
|
26
66
|
*/
|
|
27
67
|
defaultCollapsed?: boolean;
|
|
68
|
+
|
|
28
69
|
/**
|
|
29
70
|
* Reverse direction of arrow, for a sider that expands from the right
|
|
30
71
|
*/
|
|
31
72
|
reverseArrow?: boolean;
|
|
73
|
+
|
|
32
74
|
/**
|
|
33
75
|
* The callback function, executed by clicking the trigger or activating the responsive layout
|
|
34
76
|
*/
|
|
35
77
|
onCollapse?: (collapsed: boolean, type: CollapseType) => void;
|
|
78
|
+
|
|
36
79
|
/**
|
|
37
80
|
* To customize the styles of the special trigger that appears when <code>collapsedWidth</code> is 0
|
|
38
81
|
*/
|
|
39
82
|
zeroWidthTriggerStyle?: React.CSSProperties;
|
|
83
|
+
|
|
40
84
|
/**
|
|
41
85
|
* Specify the customized trigger, set to null to hide the trigger
|
|
42
86
|
*/
|
|
43
87
|
trigger?: React.ReactNode;
|
|
88
|
+
|
|
44
89
|
/**
|
|
45
90
|
* Width of the sidebar
|
|
46
91
|
*/
|
|
47
92
|
width?: number | string;
|
|
93
|
+
|
|
48
94
|
/**
|
|
49
95
|
* Width of the collapsed sidebar, by setting to 0 a special trigger will appear
|
|
50
96
|
*/
|
|
51
97
|
collapsedWidth?: number | string;
|
|
98
|
+
|
|
52
99
|
/**
|
|
53
100
|
* Breakpoints of the responsive layout
|
|
54
101
|
*/
|
|
55
102
|
breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
103
|
+
|
|
56
104
|
/**
|
|
57
105
|
* Color theme of the sidebar
|
|
58
106
|
*/
|
|
59
107
|
theme?: SiderTheme;
|
|
108
|
+
|
|
60
109
|
/**
|
|
61
110
|
* The callback function, executed when breakpoints changed
|
|
62
111
|
*/
|
|
63
112
|
onBreakpoint?: (broken: boolean) => void;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* URL for the sidebar's custom icon. This can be used for branding or visual enhancement.
|
|
116
|
+
* If provided, the icon will be displayed in the sidebar header or a designated area.
|
|
117
|
+
*/
|
|
64
118
|
iconUrl?: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* URL for the sidebar's brand image. Typically used to display a logo or branding element in the sidebar.
|
|
122
|
+
* This can enhance the sidebar's appearance and provide a visual identity for the application.
|
|
123
|
+
*/
|
|
65
124
|
brandImageUrl?: string;
|
|
125
|
+
|
|
66
126
|
/**
|
|
67
127
|
* The additional css class
|
|
68
128
|
*/
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { LayoutProps } from './types';
|
|
3
3
|
export type { LayoutProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Layout component, which acts as the container for building structured page layouts.
|
|
6
|
+
* It provides a framework to integrate Sider, Header, Footer, and Content components cohesively.
|
|
7
|
+
*
|
|
8
|
+
* This component is commonly used in applications to establish a consistent and flexible layout structure.
|
|
9
|
+
*/
|
|
4
10
|
export declare const Layout: ({ children, ...restLayoutProps }: LayoutProps) => React.JSX.Element;
|
|
5
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Layout/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,MAAM,qCAAsC,WAAW,sBA4BnE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Layout/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;GAKG;AAEH,eAAO,MAAM,MAAM,qCAAsC,WAAW,sBA4BnE,CAAC"}
|
package/dist/cjs/Layout/index.js
CHANGED
|
@@ -16,6 +16,12 @@ 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
|
+
* Layout component, which acts as the container for building structured page layouts.
|
|
21
|
+
* It provides a framework to integrate Sider, Header, Footer, and Content components cohesively.
|
|
22
|
+
*
|
|
23
|
+
* This component is commonly used in applications to establish a consistent and flexible layout structure.
|
|
24
|
+
*/
|
|
19
25
|
const Layout = (_a) => {
|
|
20
26
|
var { children } = _a, restLayoutProps = __rest(_a, ["children"]);
|
|
21
27
|
const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
|
|
@@ -4,19 +4,29 @@ export type LayoutProps = Omit<
|
|
|
4
4
|
>;
|
|
5
5
|
|
|
6
6
|
export interface AntLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Suffix class for custom styling.
|
|
9
|
+
*/
|
|
8
10
|
suffixCls?: string;
|
|
11
|
+
|
|
9
12
|
/**
|
|
10
|
-
* ClassName on the root element
|
|
13
|
+
* ClassName on the root element.
|
|
11
14
|
*/
|
|
12
15
|
rootClassName?: string;
|
|
16
|
+
|
|
13
17
|
/**
|
|
14
|
-
*
|
|
18
|
+
* Indicates whether the layout contains a Sider component.
|
|
19
|
+
* This property is usually inferred automatically but can be explicitly set to avoid style flickering in SSR scenarios.
|
|
15
20
|
*/
|
|
16
21
|
hasSider?: boolean;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The children elements to render within the layout.
|
|
25
|
+
*/
|
|
17
26
|
children: React.ReactNode;
|
|
27
|
+
|
|
18
28
|
/**
|
|
19
|
-
* The additional
|
|
29
|
+
* The additional CSS class for styling.
|
|
20
30
|
*/
|
|
21
31
|
className?: string;
|
|
22
32
|
}
|
|
@@ -2,5 +2,29 @@ import './index.css';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { NavCardProps } from './types';
|
|
4
4
|
export type { NavCardProps } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* NavCard component for navigation or highlighting sections in the interface.
|
|
7
|
+
*
|
|
8
|
+
* The NavCard component is designed to provide a visually engaging and functional card
|
|
9
|
+
* that serves as a navigation element or as a callout section in a user interface.
|
|
10
|
+
*
|
|
11
|
+
* Features:
|
|
12
|
+
* - **Title**: A required title to provide the primary context for the NavCard.
|
|
13
|
+
* - **Description**: A short description to elaborate on the title or purpose of the card.
|
|
14
|
+
* - **Icon**: Optionally display an icon to visually represent the NavCard's content or functionality.
|
|
15
|
+
* - **Color Variants**: Offers a range of predefined color options for theming, including:
|
|
16
|
+
* - `akinon`
|
|
17
|
+
* - `azure`
|
|
18
|
+
* - `blue`
|
|
19
|
+
* - `orange`
|
|
20
|
+
* - `red`
|
|
21
|
+
* - `green`
|
|
22
|
+
* - `pink`
|
|
23
|
+
* - `purple`
|
|
24
|
+
* - **Custom Styling**: Allows additional customizations via the `className` prop.
|
|
25
|
+
*
|
|
26
|
+
* Ideal for use in dashboards, navigation menus, or any scenario where visually distinct
|
|
27
|
+
* and thematically consistent navigation elements are required.
|
|
28
|
+
*/
|
|
5
29
|
export declare const NavCard: ({ title, description, icon, variant, className }: NavCardProps) => React.JSX.Element;
|
|
6
30
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NavCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,OAAO,qDAMjB,YAAY,sBAad,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NavCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,eAAO,MAAM,OAAO,qDAMjB,YAAY,sBAad,CAAC"}
|
|
@@ -4,6 +4,30 @@ exports.NavCard = void 0;
|
|
|
4
4
|
require("./index.css");
|
|
5
5
|
const clsx_1 = require("clsx");
|
|
6
6
|
const React = require("react");
|
|
7
|
+
/**
|
|
8
|
+
* NavCard component for navigation or highlighting sections in the interface.
|
|
9
|
+
*
|
|
10
|
+
* The NavCard component is designed to provide a visually engaging and functional card
|
|
11
|
+
* that serves as a navigation element or as a callout section in a user interface.
|
|
12
|
+
*
|
|
13
|
+
* Features:
|
|
14
|
+
* - **Title**: A required title to provide the primary context for the NavCard.
|
|
15
|
+
* - **Description**: A short description to elaborate on the title or purpose of the card.
|
|
16
|
+
* - **Icon**: Optionally display an icon to visually represent the NavCard's content or functionality.
|
|
17
|
+
* - **Color Variants**: Offers a range of predefined color options for theming, including:
|
|
18
|
+
* - `akinon`
|
|
19
|
+
* - `azure`
|
|
20
|
+
* - `blue`
|
|
21
|
+
* - `orange`
|
|
22
|
+
* - `red`
|
|
23
|
+
* - `green`
|
|
24
|
+
* - `pink`
|
|
25
|
+
* - `purple`
|
|
26
|
+
* - **Custom Styling**: Allows additional customizations via the `className` prop.
|
|
27
|
+
*
|
|
28
|
+
* Ideal for use in dashboards, navigation menus, or any scenario where visually distinct
|
|
29
|
+
* and thematically consistent navigation elements are required.
|
|
30
|
+
*/
|
|
7
31
|
const NavCard = ({ title, description, icon, variant, className }) => {
|
|
8
32
|
const variantClass = variant ? `nav-card-${variant}` : '';
|
|
9
33
|
return (React.createElement("div", { className: (0, clsx_1.default)('nav-card', variantClass, className) },
|
|
@@ -13,18 +13,22 @@ export interface NavCardProps {
|
|
|
13
13
|
* The title of the NavCard.
|
|
14
14
|
*/
|
|
15
15
|
title: string;
|
|
16
|
+
|
|
16
17
|
/**
|
|
17
18
|
* The description of the NavCard.
|
|
18
19
|
*/
|
|
19
20
|
description: string;
|
|
21
|
+
|
|
20
22
|
/**
|
|
21
23
|
* The icon of the NavCard.
|
|
22
24
|
*/
|
|
23
25
|
icon?: React.ReactNode;
|
|
26
|
+
|
|
24
27
|
/**
|
|
25
28
|
* The color variant of the NavCard.
|
|
26
29
|
*/
|
|
27
30
|
variant?: NavCardColorVariant;
|
|
31
|
+
|
|
28
32
|
/**
|
|
29
33
|
* The additional css class
|
|
30
34
|
*/
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import './index.css';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import type { PageContentProps } from './types';
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* It is used to generate content for a standard page.
|
|
5
|
+
*/
|
|
5
6
|
export declare const PageContent: ({ children, className, ...restProps }: PageContentProps) => React.JSX.Element;
|
|
7
|
+
export type * from './types';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/PageContent/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/PageContent/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;GAEG;AAEH,eAAO,MAAM,WAAW,0CAIrB,gBAAgB,sBAMlB,CAAC;AAEF,mBAAmB,SAAS,CAAC"}
|
|
@@ -12,11 +12,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.PageContent = void 0;
|
|
15
|
-
require("./index.css");
|
|
16
|
-
const clsx_1 = require("clsx");
|
|
17
15
|
const React = require("react");
|
|
16
|
+
/**
|
|
17
|
+
* It is used to generate content for a standard page.
|
|
18
|
+
*/
|
|
18
19
|
const PageContent = (_a) => {
|
|
19
|
-
var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
|
|
20
|
-
return (React.createElement("div", Object.assign({ className:
|
|
20
|
+
var { children, className = '' } = _a, restProps = __rest(_a, ["children", "className"]);
|
|
21
|
+
return (React.createElement("div", Object.assign({ className: className, style: { padding: '30px' } }, restProps), children));
|
|
21
22
|
};
|
|
22
23
|
exports.PageContent = PageContent;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import './index.css';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import type { PageHeadingProps } from './types';
|
|
4
|
-
|
|
3
|
+
/**
|
|
4
|
+
* It is used to generate title, description and actions for a standard page.
|
|
5
|
+
* See the [PageContent](/docs/layout-pagecontent--docs) component for more information.
|
|
6
|
+
*/
|
|
5
7
|
export declare const PageHeading: ({ title, description, actions, className }: PageHeadingProps) => React.JSX.Element;
|
|
8
|
+
export type * from './types';
|
|
6
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/PageHeading/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/PageHeading/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;GAGG;AAEH,eAAO,MAAM,WAAW,+CAKrB,gBAAgB,sBA4BlB,CAAC;AAEF,mBAAmB,SAAS,CAAC"}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PageHeading = void 0;
|
|
4
|
-
require("
|
|
5
|
-
const clsx_1 = require("clsx");
|
|
4
|
+
const antd_1 = require("antd");
|
|
6
5
|
const React = require("react");
|
|
6
|
+
/**
|
|
7
|
+
* It is used to generate title, description and actions for a standard page.
|
|
8
|
+
* See the [PageContent](/docs/layout-pagecontent--docs) component for more information.
|
|
9
|
+
*/
|
|
7
10
|
const PageHeading = ({ title, description, actions, className }) => {
|
|
8
|
-
return (React.createElement(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
return (React.createElement(antd_1.Flex, { justify: "space-between", align: "flex-start", className: className, style: {
|
|
12
|
+
padding: '18px 30px',
|
|
13
|
+
borderBlockEnd: 'solid 1px var(--color-gray-900)'
|
|
14
|
+
} },
|
|
15
|
+
React.createElement(antd_1.Space, { direction: "vertical", size: 4 },
|
|
16
|
+
React.createElement(antd_1.Typography.Title, { level: 4, style: { margin: 0 } }, title),
|
|
17
|
+
description && (React.createElement(antd_1.Typography.Paragraph, { type: "secondary", style: { margin: 0, fontSize: 10 } }, description))),
|
|
18
|
+
actions && React.createElement(antd_1.Space, null, actions)));
|
|
13
19
|
};
|
|
14
20
|
exports.PageHeading = PageHeading;
|
|
@@ -3,14 +3,17 @@ export interface PageHeadingProps {
|
|
|
3
3
|
* The title of the PageHeading.
|
|
4
4
|
*/
|
|
5
5
|
title: string;
|
|
6
|
+
|
|
6
7
|
/**
|
|
7
8
|
* The description of the PageHeading.
|
|
8
9
|
*/
|
|
9
10
|
description?: string;
|
|
11
|
+
|
|
10
12
|
/**
|
|
11
13
|
* The action items of the PageHeading.
|
|
12
14
|
*/
|
|
13
|
-
actions?: ReactNode;
|
|
15
|
+
actions?: React.ReactNode;
|
|
16
|
+
|
|
14
17
|
/**
|
|
15
18
|
* The additional css class
|
|
16
19
|
*/
|
package/dist/esm/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/esm/Flex/index.js
CHANGED
|
@@ -13,6 +13,17 @@ import { useToken } from '@akinon/ui-theme';
|
|
|
13
13
|
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
14
14
|
import { ConfigProvider, Flex as AntFlex } from 'antd';
|
|
15
15
|
import * as React from 'react';
|
|
16
|
+
/**
|
|
17
|
+
* The `Flex` component is a wrapper for creating flexible layouts using the flexbox model.
|
|
18
|
+
* It provides a clean and simple API to manage alignment, spacing, and direction
|
|
19
|
+
* of child elements, ensuring responsive and adaptable designs.
|
|
20
|
+
*
|
|
21
|
+
* Features include:
|
|
22
|
+
* - Vertical and horizontal layouts with optional wrapping.
|
|
23
|
+
* - Customizable alignment for both main and cross axes.
|
|
24
|
+
* - Support for predefined or custom gap sizes between child elements.
|
|
25
|
+
* - Flexibility to use any custom HTML element or React component as the container.
|
|
26
|
+
*/
|
|
16
27
|
export const Flex = (_a) => {
|
|
17
28
|
var { children } = _a, restFlexProps = __rest(_a, ["children"]);
|
|
18
29
|
const { getPrefixCls, theme } = React.useContext(ConfigProvider.ConfigContext);
|
package/dist/esm/Flex/types.d.ts
CHANGED
|
@@ -1,38 +1,48 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
export type FlexProps = Omit<AntFlexProps, 'prefixCls' | 'style' | 'styles'>;
|
|
2
3
|
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
4
|
export interface AntFlexProps<P = Record<PropertyKey, any>>
|
|
5
5
|
extends React.HTMLAttributes<HTMLElement> {
|
|
6
|
-
prefixCls?: string;
|
|
7
6
|
/**
|
|
8
7
|
* ClassName on the root element
|
|
9
8
|
*/
|
|
10
9
|
rootClassName?: string;
|
|
10
|
+
|
|
11
11
|
/**
|
|
12
12
|
* Is direction of the flex vertical, use <code>flex-direction: column</code>
|
|
13
13
|
*/
|
|
14
14
|
vertical?: boolean;
|
|
15
|
+
|
|
15
16
|
/**
|
|
16
17
|
* Set whether the element is displayed in a single line or in multiple lines
|
|
17
18
|
*/
|
|
18
19
|
wrap?: boolean | React.CSSProperties['flexWrap'];
|
|
20
|
+
|
|
19
21
|
/**
|
|
20
22
|
* Sets the alignment of elements in the direction of the main axis
|
|
21
23
|
*/
|
|
22
24
|
justify?: React.CSSProperties['justifyContent'];
|
|
25
|
+
|
|
23
26
|
/**
|
|
24
27
|
* Sets the alignment of elements in the direction of the cross axis
|
|
25
28
|
*/
|
|
26
29
|
align?: React.CSSProperties['alignItems'];
|
|
30
|
+
|
|
27
31
|
/**
|
|
28
32
|
* Flex CSS shorthand properties
|
|
29
33
|
*/
|
|
30
34
|
flex?: React.CSSProperties['flex'];
|
|
35
|
+
|
|
31
36
|
/**
|
|
32
37
|
* Sets the gap between grids
|
|
33
38
|
*/
|
|
34
39
|
gap?: React.CSSProperties['gap'] | SizeType;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The content inside the flex container.
|
|
43
|
+
*/
|
|
35
44
|
children: React.ReactNode;
|
|
45
|
+
|
|
36
46
|
/**
|
|
37
47
|
* Custom element type
|
|
38
48
|
*/
|
|
@@ -41,7 +51,6 @@ export interface AntFlexProps<P = Record<PropertyKey, any>>
|
|
|
41
51
|
|
|
42
52
|
type SizeType = 'small' | 'middle' | 'large' | undefined;
|
|
43
53
|
|
|
44
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
45
54
|
type CustomComponent<P = Record<PropertyKey, any>> =
|
|
46
55
|
| React.ComponentType<P>
|
|
47
56
|
| string;
|
package/dist/esm/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/esm/Grid/index.js
CHANGED
|
@@ -13,6 +13,21 @@ import { useToken } from '@akinon/ui-theme';
|
|
|
13
13
|
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
14
14
|
import { Col as AntCol, ConfigProvider, Row as AntRow } from 'antd';
|
|
15
15
|
import * as React from 'react';
|
|
16
|
+
/**
|
|
17
|
+
* `Row` and `Col` are layout components used in a grid system to create responsive and flexible designs.
|
|
18
|
+
* They work together to divide the available space into rows and columns, aligning content
|
|
19
|
+
* based on the specified layout rules and breakpoints.
|
|
20
|
+
*
|
|
21
|
+
* Together, `Row` and `Col` provide a complete solution for responsive grid-based layouts.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* The `Row` component is used to create horizontal groups of columns. It manages spacing, alignment, and wrapping behavior.
|
|
26
|
+
* - Supports custom spacing (`gutter`) for horizontal and vertical space between columns.
|
|
27
|
+
* - Allows vertical alignment (`align`) and horizontal justification (`justify`) of content.
|
|
28
|
+
* - Automatically wraps columns into the next line when necessary (`wrap`).
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
16
31
|
export const Row = (_a) => {
|
|
17
32
|
var { children } = _a, restRowProps = __rest(_a, ["children"]);
|
|
18
33
|
const { getPrefixCls, theme } = React.useContext(ConfigProvider.ConfigContext);
|
|
@@ -35,6 +50,14 @@ export const Row = (_a) => {
|
|
|
35
50
|
});
|
|
36
51
|
return useStyle(React.createElement(AntRow, Object.assign({ gutter: [gridToken === null || gridToken === void 0 ? void 0 : gridToken.gutter, gridToken === null || gridToken === void 0 ? void 0 : gridToken.gutter] }, restRowProps), children));
|
|
37
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* The `Col` component represents individual columns within a row. It determines the width and position of the column.
|
|
56
|
+
* - Flexible width management using `span`, `offset`, `push`, and `pull`.
|
|
57
|
+
* - Supports responsive breakpoints (`xs`, `sm`, `md`, `lg`, `xl`, `xxl`) for defining behavior across screen sizes.
|
|
58
|
+
* - Can define flex-specific properties like `flex` for advanced layouts.
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
38
61
|
export const Col = (_a) => {
|
|
39
62
|
var { children } = _a, restColProps = __rest(_a, ["children"]);
|
|
40
63
|
const { getPrefixCls, theme } = React.useContext(ConfigProvider.ConfigContext);
|
package/dist/esm/Grid/types.d.ts
CHANGED
|
@@ -22,51 +22,61 @@ export interface AntColProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
22
22
|
* Flex layout style
|
|
23
23
|
*/
|
|
24
24
|
flex?: FlexType;
|
|
25
|
+
|
|
25
26
|
/**
|
|
26
27
|
* Raster number of cells to occupy, 0 corresponds to display: none
|
|
27
28
|
*/
|
|
28
29
|
span?: number | string;
|
|
30
|
+
|
|
29
31
|
/**
|
|
30
32
|
* Raster order
|
|
31
33
|
*/
|
|
32
34
|
order?: number | string;
|
|
35
|
+
|
|
33
36
|
/**
|
|
34
37
|
* The number of cells to offset Col from the left
|
|
35
38
|
*/
|
|
36
39
|
offset?: number | string;
|
|
40
|
+
|
|
37
41
|
/**
|
|
38
42
|
* The number of cells that raster is moved to the right
|
|
39
43
|
*/
|
|
40
44
|
push?: number | string;
|
|
45
|
+
|
|
41
46
|
/**
|
|
42
47
|
* The number of cells that raster is moved to the left
|
|
43
48
|
*/
|
|
44
49
|
pull?: number | string;
|
|
50
|
+
|
|
45
51
|
/**
|
|
46
52
|
* screen < 576px and also default setting, could be a span value or an object containing above props
|
|
47
53
|
*/
|
|
48
54
|
xs?: number | string | ColSize;
|
|
55
|
+
|
|
49
56
|
/**
|
|
50
57
|
* screen ≥ 576px, could be a span value or an object containing above props
|
|
51
58
|
*/
|
|
52
59
|
sm?: number | string | ColSize;
|
|
60
|
+
|
|
53
61
|
/**
|
|
54
62
|
* screen ≥ 768px, could be a span value or an object containing above props
|
|
55
63
|
*/
|
|
56
64
|
md?: number | string | ColSize;
|
|
65
|
+
|
|
57
66
|
/**
|
|
58
67
|
* screen ≥ 992px, could be a span value or an object containing above props
|
|
59
68
|
*/
|
|
60
69
|
lg?: number | string | ColSize;
|
|
70
|
+
|
|
61
71
|
/**
|
|
62
72
|
* screen ≥ 1200px, could be a span value or an object containing above props
|
|
63
73
|
*/
|
|
64
74
|
xl?: number | string | ColSize;
|
|
75
|
+
|
|
65
76
|
/**
|
|
66
77
|
* screen ≥ 1600px, could be a span value or an object containing above props
|
|
67
78
|
*/
|
|
68
79
|
xxl?: number | string | ColSize;
|
|
69
|
-
prefixCls?: string;
|
|
70
80
|
}
|
|
71
81
|
|
|
72
82
|
export declare const Col: React.ForwardRefExoticComponent<
|
|
@@ -103,15 +113,17 @@ export interface AntRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
103
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>
|
|
104
114
|
*/
|
|
105
115
|
gutter?: Gutter | [Gutter, Gutter];
|
|
116
|
+
|
|
106
117
|
/**
|
|
107
118
|
* Vertical alignment
|
|
108
119
|
*/
|
|
109
120
|
align?: 'top' | 'middle' | 'bottom' | 'stretch' | ResponsiveAligns;
|
|
121
|
+
|
|
110
122
|
/**
|
|
111
123
|
* Horizontal arrangement
|
|
112
124
|
*/
|
|
113
125
|
justify?: (typeof RowJustify)[number] | ResponsiveJustify;
|
|
114
|
-
|
|
126
|
+
|
|
115
127
|
/**
|
|
116
128
|
* Auto wrap line
|
|
117
129
|
*/
|