@akinon/ui-layout 0.6.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.
Files changed (91) hide show
  1. package/dist/cjs/Flex/index.d.ts +12 -1
  2. package/dist/cjs/Flex/index.d.ts.map +1 -1
  3. package/dist/cjs/Flex/index.js +11 -0
  4. package/dist/cjs/Flex/types.d.ts +12 -3
  5. package/dist/cjs/Grid/index.d.ts +23 -0
  6. package/dist/cjs/Grid/index.d.ts.map +1 -1
  7. package/dist/cjs/Grid/index.js +23 -0
  8. package/dist/cjs/Grid/types.d.ts +14 -2
  9. package/dist/cjs/Layout/Content/index.d.ts +8 -0
  10. package/dist/cjs/Layout/Content/index.d.ts.map +1 -1
  11. package/dist/cjs/Layout/Content/index.js +8 -0
  12. package/dist/cjs/Layout/Content/types.d.ts +15 -0
  13. package/dist/cjs/Layout/Footer/index.d.ts +5 -0
  14. package/dist/cjs/Layout/Footer/index.d.ts.map +1 -1
  15. package/dist/cjs/Layout/Footer/index.js +5 -0
  16. package/dist/cjs/Layout/Footer/types.d.ts +28 -0
  17. package/dist/cjs/Layout/Header/index.d.ts +7 -0
  18. package/dist/cjs/Layout/Header/index.d.ts.map +1 -1
  19. package/dist/cjs/Layout/Header/index.js +7 -0
  20. package/dist/cjs/Layout/Header/types.d.ts +23 -0
  21. package/dist/cjs/Layout/Sider/index.css +8 -2
  22. package/dist/cjs/Layout/Sider/index.d.ts +24 -1
  23. package/dist/cjs/Layout/Sider/index.d.ts.map +1 -1
  24. package/dist/cjs/Layout/Sider/index.js +36 -6
  25. package/dist/cjs/Layout/Sider/types.d.ts +61 -1
  26. package/dist/cjs/Layout/index.d.ts +6 -0
  27. package/dist/cjs/Layout/index.d.ts.map +1 -1
  28. package/dist/cjs/Layout/index.js +6 -0
  29. package/dist/cjs/Layout/types.d.ts +14 -4
  30. package/dist/cjs/NavCard/__tests__/navcard.test.d.ts +2 -0
  31. package/dist/cjs/NavCard/__tests__/navcard.test.d.ts.map +1 -0
  32. package/dist/cjs/NavCard/__tests__/navcard.test.js +40 -0
  33. package/dist/cjs/NavCard/__tests__/navcard.test.tsx +92 -0
  34. package/dist/cjs/NavCard/index.d.ts +20 -3
  35. package/dist/cjs/NavCard/index.d.ts.map +1 -1
  36. package/dist/cjs/NavCard/index.js +79 -8
  37. package/dist/cjs/NavCard/types.d.ts +19 -11
  38. package/dist/cjs/PageContent/index.d.ts +4 -2
  39. package/dist/cjs/PageContent/index.d.ts.map +1 -1
  40. package/dist/cjs/PageContent/index.js +5 -4
  41. package/dist/cjs/PageContent/types.d.ts +9 -1
  42. package/dist/cjs/PageHeading/index.d.ts +5 -2
  43. package/dist/cjs/PageHeading/index.d.ts.map +1 -1
  44. package/dist/cjs/PageHeading/index.js +13 -7
  45. package/dist/cjs/PageHeading/types.d.ts +4 -1
  46. package/dist/esm/Flex/index.d.ts +12 -1
  47. package/dist/esm/Flex/index.d.ts.map +1 -1
  48. package/dist/esm/Flex/index.js +11 -0
  49. package/dist/esm/Flex/types.d.ts +12 -3
  50. package/dist/esm/Grid/index.d.ts +23 -0
  51. package/dist/esm/Grid/index.d.ts.map +1 -1
  52. package/dist/esm/Grid/index.js +23 -0
  53. package/dist/esm/Grid/types.d.ts +14 -2
  54. package/dist/esm/Layout/Content/index.d.ts +8 -0
  55. package/dist/esm/Layout/Content/index.d.ts.map +1 -1
  56. package/dist/esm/Layout/Content/index.js +8 -0
  57. package/dist/esm/Layout/Content/types.d.ts +15 -0
  58. package/dist/esm/Layout/Footer/index.d.ts +5 -0
  59. package/dist/esm/Layout/Footer/index.d.ts.map +1 -1
  60. package/dist/esm/Layout/Footer/index.js +5 -0
  61. package/dist/esm/Layout/Footer/types.d.ts +28 -0
  62. package/dist/esm/Layout/Header/index.d.ts +7 -0
  63. package/dist/esm/Layout/Header/index.d.ts.map +1 -1
  64. package/dist/esm/Layout/Header/index.js +7 -0
  65. package/dist/esm/Layout/Header/types.d.ts +23 -0
  66. package/dist/esm/Layout/Sider/index.css +8 -2
  67. package/dist/esm/Layout/Sider/index.d.ts +24 -1
  68. package/dist/esm/Layout/Sider/index.d.ts.map +1 -1
  69. package/dist/esm/Layout/Sider/index.js +36 -6
  70. package/dist/esm/Layout/Sider/types.d.ts +61 -1
  71. package/dist/esm/Layout/index.d.ts +6 -0
  72. package/dist/esm/Layout/index.d.ts.map +1 -1
  73. package/dist/esm/Layout/index.js +6 -0
  74. package/dist/esm/Layout/types.d.ts +14 -4
  75. package/dist/esm/NavCard/__tests__/navcard.test.d.ts +2 -0
  76. package/dist/esm/NavCard/__tests__/navcard.test.d.ts.map +1 -0
  77. package/dist/esm/NavCard/__tests__/navcard.test.js +38 -0
  78. package/dist/esm/NavCard/__tests__/navcard.test.tsx +92 -0
  79. package/dist/esm/NavCard/index.d.ts +20 -3
  80. package/dist/esm/NavCard/index.d.ts.map +1 -1
  81. package/dist/esm/NavCard/index.js +79 -8
  82. package/dist/esm/NavCard/types.d.ts +19 -11
  83. package/dist/esm/PageContent/index.d.ts +4 -2
  84. package/dist/esm/PageContent/index.d.ts.map +1 -1
  85. package/dist/esm/PageContent/index.js +5 -4
  86. package/dist/esm/PageContent/types.d.ts +9 -1
  87. package/dist/esm/PageHeading/index.d.ts +5 -2
  88. package/dist/esm/PageHeading/index.d.ts.map +1 -1
  89. package/dist/esm/PageHeading/index.js +13 -7
  90. package/dist/esm/PageHeading/types.d.ts +4 -1
  91. package/package.json +8 -5
@@ -1,5 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import type { FlexProps } from './types';
3
- export type { FlexProps } from './types';
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,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,IAAI,mCAAoC,SAAS,sBA4B7D,CAAC"}
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"}
@@ -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);
@@ -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;
@@ -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"}
@@ -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);
@@ -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
- prefixCls?: string;
126
+
115
127
  /**
116
128
  * Auto wrap line
117
129
  */
@@ -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);
@@ -7,8 +7,23 @@ export type AntContentProps = AntContentBasicProps &
7
7
  React.RefAttributes<HTMLElement>;
8
8
 
9
9
  interface AntContentBasicProps extends React.HTMLAttributes<HTMLDivElement> {
10
+ /**
11
+ * Prefix class for custom styling.
12
+ */
10
13
  prefixCls?: string;
14
+
15
+ /**
16
+ * Suffix class for custom styling.
17
+ */
11
18
  suffixCls?: string;
19
+
20
+ /**
21
+ * Class name for the root element.
22
+ */
12
23
  rootClassName?: string;
24
+
25
+ /**
26
+ * Indicates if the layout contains a sider.
27
+ */
13
28
  hasSider?: boolean;
14
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);
@@ -1,15 +1,43 @@
1
+ /**
2
+ * Props for the Footer component, excluding specific attributes from AntFooterProps.
3
+ */
1
4
  export type FooterProps = Omit<
2
5
  AntFooterProps,
3
6
  'prefixCls' | 'suffixCls' | 'style' | 'styles'
4
7
  >;
5
8
 
9
+ /**
10
+ * Combined type for Footer props with React reference attributes.
11
+ */
6
12
  export type AntFooterProps = AntFooterBasicProps &
7
13
  React.RefAttributes<HTMLElement>;
8
14
 
15
+ /**
16
+ * Basic props for the Footer component.
17
+ */
9
18
  interface AntFooterBasicProps extends React.HTMLAttributes<HTMLDivElement> {
19
+ /**
20
+ * Prefix class for custom styling.
21
+ */
10
22
  prefixCls?: string;
23
+
24
+ /**
25
+ * Suffix class for additional customization.
26
+ */
11
27
  suffixCls?: string;
28
+
29
+ /**
30
+ * Root class name for the Footer component.
31
+ */
12
32
  rootClassName?: string;
33
+
34
+ /**
35
+ * Indicates whether the layout contains a Sider component.
36
+ */
13
37
  hasSider?: boolean;
38
+
39
+ /**
40
+ * Content to be displayed inside the Footer.
41
+ */
14
42
  children: React.ReactNode;
15
43
  }
@@ -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);
@@ -1,3 +1,7 @@
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
+ */
1
5
  export type HeaderProps = Omit<
2
6
  AntHeaderProps,
3
7
  'prefixCls' | 'suffixCls' | 'style' | 'styles'
@@ -7,9 +11,28 @@ export type AntHeaderProps = AntHeaderBasicProps &
7
11
  React.RefAttributes<HTMLElement>;
8
12
 
9
13
  interface AntHeaderBasicProps extends React.HTMLAttributes<HTMLDivElement> {
14
+ /**
15
+ * Prefix class for custom styling.
16
+ */
10
17
  prefixCls?: string;
18
+
19
+ /**
20
+ * Suffix class for custom styling.
21
+ */
11
22
  suffixCls?: string;
23
+
24
+ /**
25
+ * Root class name for the component.
26
+ */
12
27
  rootClassName?: string;
28
+
29
+ /**
30
+ * Indicates if the layout has a sider.
31
+ */
13
32
  hasSider?: boolean;
33
+
34
+ /**
35
+ * The children elements to render within the header.
36
+ */
14
37
  children: React.ReactNode;
15
38
  }
@@ -1,7 +1,7 @@
1
1
  .akinon-layout-sider {
2
2
  position: sticky;
3
3
  top: 0;
4
- height: 100vh;
4
+ height: 100svh;
5
5
  overflow-y: auto;
6
6
  }
7
7
 
@@ -16,13 +16,19 @@
16
16
  .akinon-layout-sider .logo-container {
17
17
  display: flex;
18
18
  flex-direction: row;
19
- justify-content: center;
20
19
  align-items: center;
21
20
  height: 3.5rem;
22
21
  gap: 0.8rem;
22
+ background-color: var(--color-ebonyClay-600);
23
+ padding-inline: 1.5rem;
23
24
  /* border-bottom: 1px solid var(--color-gray-900); */
24
25
  }
25
26
 
27
+ .akinon-layout-sider .logo-container.collapsed {
28
+ justify-content: center;
29
+ padding-inline: 1rem;
30
+ }
31
+
26
32
  .akinon-layout-sider .logo-container.collapsed .brand-image {
27
33
  display: none;
28
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
- export declare const Sider: ({ children, collapsed, iconUrl, brandImageUrl, ...restSiderProps }: SiderProps) => React.JSX.Element;
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,uEAMf,UAAU,sBAuDZ,CAAC"}
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"}
@@ -18,21 +18,51 @@ const cssinjs_1 = require("@ant-design/cssinjs");
18
18
  const antd_1 = require("antd");
19
19
  const React = require("react");
20
20
  const { Sider: AntSider } = antd_1.Layout;
21
+ /**
22
+ * Sider component for building collapsible sidebars in user interfaces.
23
+ *
24
+ * The Sider component is designed to provide a flexible and customizable sidebar
25
+ * that integrates seamlessly with layouts, menus, and responsive designs.
26
+ *
27
+ * Features:
28
+ * - **Collapsible**: Option to collapse the sidebar manually or automatically.
29
+ * - **Custom Triggers**: Supports custom triggers or hiding the trigger altogether.
30
+ * - **Width Options**: Configure both default and collapsed widths.
31
+ * - **Responsive Breakpoints**: Adjusts behavior based on predefined screen sizes.
32
+ * - **Theming**: Offers `light` and `dark` themes to match application aesthetics.
33
+ * - **Callbacks**:
34
+ * - `onCollapse`: Triggered when the sidebar is collapsed or expanded.
35
+ * - `onBreakpoint`: Triggered when responsive breakpoints are reached.
36
+ * - **Custom Styling**:
37
+ * - `className` for additional styling.
38
+ * - `zeroWidthTriggerStyle` for styling triggers when the collapsed width is zero.
39
+ * - `brandImageUrl` and `iconUrl` for branding and visual customization.
40
+ *
41
+ * Ideal for dashboards, navigation menus, and applications requiring collapsible or responsive side navigation.
42
+ *
43
+ */
21
44
  const Sider = (_a) => {
22
- var { children, collapsed, iconUrl, brandImageUrl } = _a, restSiderProps = __rest(_a, ["children", "collapsed", "iconUrl", "brandImageUrl"]);
45
+ var { children, collapsed, iconUrl, brandImageUrl, position = 'left' } = _a, restSiderProps = __rest(_a, ["children", "collapsed", "iconUrl", "brandImageUrl", "position"]);
23
46
  const { getPrefixCls, theme } = React.useContext(antd_1.ConfigProvider.ConfigContext);
24
47
  const { token, hashId } = (0, ui_theme_1.useToken)();
25
- //const layoutToken = (token as GlobalToken).Layout;
48
+ const layoutToken = token.Layout;
26
49
  const useStyle = (0, cssinjs_1.useStyleRegister)({
27
50
  token: token,
28
51
  path: ['Sider'],
29
52
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
53
  theme: theme
31
54
  }, () => {
32
- const prefixCls = `:where(.${hashId}).${getPrefixCls()}-sider`;
33
- const prefixClsWithoutHash = `.${getPrefixCls()}-sider`;
55
+ const prefixCls = `:where(.${hashId}).${getPrefixCls()}-layout-sider`;
56
+ const prefixClsWithoutHash = `.${getPrefixCls()}-layout-sider`;
34
57
  return {
35
- [prefixCls]: {},
58
+ [prefixCls]: {
59
+ '&-left': {
60
+ borderInlineEnd: layoutToken.mainBorder
61
+ },
62
+ '&-right': {
63
+ borderInlineStart: layoutToken.mainBorder
64
+ }
65
+ },
36
66
  [prefixClsWithoutHash]: {}
37
67
  };
38
68
  });
@@ -42,7 +72,7 @@ const Sider = (_a) => {
42
72
  React.createElement("img", { className: "logo", src: iconUrl, alt: "icon", width: 20, height: 20 }),
43
73
  React.createElement("img", { className: "brand-image", src: brandImageUrl, alt: "brand-image", height: 20 })));
44
74
  }
45
- return useStyle(React.createElement(AntSider, Object.assign({ collapsible: true, collapsed: collapsed, trigger: null, width: 250 }, restSiderProps),
75
+ return useStyle(React.createElement(AntSider, Object.assign({ className: `${getPrefixCls()}-layout-sider-${position}`, collapsible: true, collapsed: collapsed, trigger: null, width: 250, collapsedWidth: 56 }, restSiderProps),
46
76
  LogoContainer,
47
77
  children));
48
78
  };