akku-kit 1.0.1-alpha.0 → 1.0.1-alpha.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.
- package/dist/components/Collapse/Collapse.d.ts +5 -0
- package/dist/components/Collapse/Collapse.types.d.ts +93 -0
- package/dist/components/Collapse/index.d.ts +2 -0
- package/dist/components/Form/TextArea/TextArea.types.d.ts +2 -0
- package/dist/components/Image/FallbackImage.d.ts +8 -0
- package/dist/components/Image/Image.d.ts +3 -0
- package/dist/components/Image/Image.type.d.ts +27 -0
- package/dist/components/Image/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +2 -7
- package/dist/components/Table/Table.types.d.ts +8 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Table/parts/TableBody.d.ts +8 -0
- package/dist/components/Table/parts/TableFooter.d.ts +8 -0
- package/dist/components/Table/parts/TableHeader.d.ts +12 -0
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
@@ -0,0 +1,93 @@
|
|
1
|
+
import { ReactNode } from "react";
|
2
|
+
/**
|
3
|
+
* Represents a single collapsible panel item
|
4
|
+
*/
|
5
|
+
export interface CollapseItem {
|
6
|
+
/**
|
7
|
+
* Unique key to identify the panel
|
8
|
+
*/
|
9
|
+
key: string;
|
10
|
+
/**
|
11
|
+
* Content to display in the panel header
|
12
|
+
*/
|
13
|
+
label: ReactNode;
|
14
|
+
/**
|
15
|
+
* Content to display when panel is expanded
|
16
|
+
*/
|
17
|
+
children: ReactNode;
|
18
|
+
/**
|
19
|
+
* Optional icon to display before the label
|
20
|
+
*/
|
21
|
+
prefixIcon?: ReactNode;
|
22
|
+
/**
|
23
|
+
* Optional custom icon to replace the default chevron
|
24
|
+
*/
|
25
|
+
suffixIcon?: ReactNode;
|
26
|
+
/**
|
27
|
+
* Whether the panel is disabled (non-interactive)
|
28
|
+
* @default false
|
29
|
+
*/
|
30
|
+
disabled?: boolean;
|
31
|
+
/**
|
32
|
+
* Optional custom className for the panel
|
33
|
+
*/
|
34
|
+
className?: string;
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* Props for the Collapse component
|
38
|
+
*/
|
39
|
+
export interface CollapseProps {
|
40
|
+
/**
|
41
|
+
* Array of panel items to render
|
42
|
+
*/
|
43
|
+
items: CollapseItem[];
|
44
|
+
/**
|
45
|
+
* Array of keys for initially expanded panels
|
46
|
+
* @default []
|
47
|
+
*/
|
48
|
+
defaultActiveKey?: string[];
|
49
|
+
/**
|
50
|
+
* Additional className for the root collapse element
|
51
|
+
*/
|
52
|
+
className?: string;
|
53
|
+
/**
|
54
|
+
* Whether only one panel can be expanded at a time (accordion mode)
|
55
|
+
* @default false
|
56
|
+
*/
|
57
|
+
accordion?: boolean;
|
58
|
+
/**
|
59
|
+
* Callback when panel expand/collapse state changes
|
60
|
+
* @param activeKeys - Array of currently expanded panel keys
|
61
|
+
*/
|
62
|
+
onChange?: (activeKeys: string[]) => void;
|
63
|
+
/**
|
64
|
+
* Custom icon to override default chevron for all panels
|
65
|
+
*/
|
66
|
+
expandIcon?: (isActive: boolean) => ReactNode;
|
67
|
+
}
|
68
|
+
/**
|
69
|
+
* Props for the internal CollapseContent component
|
70
|
+
*/
|
71
|
+
export interface CollapseContentProps {
|
72
|
+
/**
|
73
|
+
* Whether content should be visible
|
74
|
+
*/
|
75
|
+
isActive: boolean;
|
76
|
+
/**
|
77
|
+
* Content to render
|
78
|
+
*/
|
79
|
+
children: ReactNode;
|
80
|
+
/**
|
81
|
+
* Optional className for the content wrapper
|
82
|
+
*/
|
83
|
+
className?: string;
|
84
|
+
/**
|
85
|
+
* Transition duration in milliseconds
|
86
|
+
* @default 300
|
87
|
+
*/
|
88
|
+
duration?: number;
|
89
|
+
}
|
90
|
+
/**
|
91
|
+
* Type for the Collapse component
|
92
|
+
*/
|
93
|
+
export type CollapseComponent = React.FC<CollapseProps> & {};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { ImgHTMLAttributes, ReactElement } from 'react';
|
2
|
+
export interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt'> {
|
3
|
+
/** Primary image source URL */
|
4
|
+
src: string;
|
5
|
+
/** Alt text for accessibility */
|
6
|
+
alt: string;
|
7
|
+
/** Fallback image source if primary fails */
|
8
|
+
fallbackSrc?: string;
|
9
|
+
/** Custom fallback element to show on error */
|
10
|
+
fallbackElement?: ReactElement;
|
11
|
+
/** Additional CSS classes */
|
12
|
+
className?: string;
|
13
|
+
/** Enable lazy loading */
|
14
|
+
lazyLoad?: boolean;
|
15
|
+
/** Show loading indicator */
|
16
|
+
showLoader?: boolean;
|
17
|
+
/** Border radius for the image */
|
18
|
+
borderRadius?: string;
|
19
|
+
/** CSS object-fit property */
|
20
|
+
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
21
|
+
/** Show skeleton loader instead of spinner */
|
22
|
+
skeleton?: boolean;
|
23
|
+
/** Enable zoom effect on hover */
|
24
|
+
zoomOnHover?: boolean;
|
25
|
+
/** Low quality blur preview image */
|
26
|
+
blurPreviewSrc?: string;
|
27
|
+
}
|
@@ -1,8 +1,3 @@
|
|
1
|
-
import "./
|
2
|
-
|
3
|
-
[key: string]: any;
|
4
|
-
}> {
|
5
|
-
expandableRows?: boolean;
|
6
|
-
}
|
1
|
+
import "./Table.scss";
|
2
|
+
import { TableProps } from "./Table.types";
|
7
3
|
export default function Table({ columns, data, pagination, setPagination, pageCount, loader, expandableRows }: Readonly<TableProps>): import("react/jsx-runtime").JSX.Element;
|
8
|
-
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from "./Table";
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { Table as ReactTable } from "@tanstack/react-table";
|
3
|
+
interface TableBodyContentProps {
|
4
|
+
loader: boolean;
|
5
|
+
table: ReactTable<any>;
|
6
|
+
}
|
7
|
+
declare const TableBodyContent: React.FC<TableBodyContentProps>;
|
8
|
+
export default TableBodyContent;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { HeaderGroup, RowData } from "@tanstack/react-table";
|
3
|
+
declare module "@tanstack/react-table" {
|
4
|
+
interface ColumnMeta<TData extends RowData, TValue> {
|
5
|
+
thClassName?: string;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
interface TableHeaderProps {
|
9
|
+
headerGroups: HeaderGroup<any>[];
|
10
|
+
}
|
11
|
+
declare const TableHeader: React.FC<TableHeaderProps>;
|
12
|
+
export default TableHeader;
|