@fastnd/components 1.0.12 → 1.0.14
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/BaseList/BaseList.d.ts +6 -0
- package/dist/components/BaseTable/BaseTable.d.ts +31 -0
- package/dist/components/DataCard/DataCard.d.ts +6 -0
- package/dist/components/FavoriteButton/FavoriteButton.d.ts +2 -0
- package/dist/components/ListItem/ListItem.d.ts +9 -0
- package/dist/components/WidgetCard/WidgetCard.d.ts +11 -0
- package/dist/components/index.d.ts +11 -1
- package/dist/components.js +1005 -754
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BaseListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
scrollable?: boolean;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const BaseList: React.ForwardRefExoticComponent<BaseListProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface BaseTableColumn {
|
|
3
|
+
key: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
width?: string | number;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
hideTablet?: boolean;
|
|
8
|
+
hideMobile?: boolean;
|
|
9
|
+
headerContent?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface BaseTableProps<T> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
12
|
+
columns: BaseTableColumn[];
|
|
13
|
+
rows: T[];
|
|
14
|
+
rowKey: (row: T, index: number) => string;
|
|
15
|
+
renderCell: (row: T, column: BaseTableColumn, rowIndex: number) => React.ReactNode;
|
|
16
|
+
sortColumn?: string | null;
|
|
17
|
+
sortDirection?: 'asc' | 'desc';
|
|
18
|
+
onSort?: (columnKey: string) => void;
|
|
19
|
+
resizable?: boolean;
|
|
20
|
+
columnWidths?: Record<string, number>;
|
|
21
|
+
onColumnResize?: (columnKey: string, width: number) => void;
|
|
22
|
+
renderExpandedRow?: (row: T, rowIndex: number) => React.ReactNode | null;
|
|
23
|
+
rowAnimation?: boolean;
|
|
24
|
+
rowClassName?: (row: T, rowIndex: number) => string | undefined;
|
|
25
|
+
rowDataAttributes?: (row: T) => Record<string, string>;
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const BaseTable: <T>(props: BaseTableProps<T> & {
|
|
30
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
31
|
+
}) => React.ReactElement | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface DataCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const DataCard: React.ForwardRefExoticComponent<DataCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export type FavoriteButtonSize = 'sm' | 'md';
|
|
2
3
|
export interface FavoriteButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onToggle'> {
|
|
3
4
|
pressed: boolean;
|
|
4
5
|
projectName: string;
|
|
5
6
|
onToggle?: (nextPressed: boolean) => void;
|
|
7
|
+
size?: FavoriteButtonSize;
|
|
6
8
|
color?: string;
|
|
7
9
|
activeColor?: string;
|
|
8
10
|
className?: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ListItemProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onClick'> {
|
|
3
|
+
leading?: React.ReactNode;
|
|
4
|
+
trailing?: React.ReactNode;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
as?: 'div' | 'article' | 'a';
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ListItem: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface WidgetCardProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
3
|
+
title?: React.ReactNode;
|
|
4
|
+
headerAction?: React.ReactNode;
|
|
5
|
+
variant?: 'half' | 'full';
|
|
6
|
+
scrollable?: boolean;
|
|
7
|
+
padded?: boolean;
|
|
8
|
+
as?: 'section' | 'main' | 'div';
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const WidgetCard: React.ForwardRefExoticComponent<WidgetCardProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
export { BaseTable } from './BaseTable/BaseTable';
|
|
2
|
+
export type { BaseTableProps, BaseTableColumn } from './BaseTable/BaseTable';
|
|
3
|
+
export { WidgetCard } from './WidgetCard/WidgetCard';
|
|
4
|
+
export type { WidgetCardProps } from './WidgetCard/WidgetCard';
|
|
5
|
+
export { DataCard } from './DataCard/DataCard';
|
|
6
|
+
export type { DataCardProps } from './DataCard/DataCard';
|
|
7
|
+
export { BaseList } from './BaseList/BaseList';
|
|
8
|
+
export type { BaseListProps } from './BaseList/BaseList';
|
|
9
|
+
export { ListItem } from './ListItem/ListItem';
|
|
10
|
+
export type { ListItemProps } from './ListItem/ListItem';
|
|
1
11
|
export { StatusBadge } from './StatusBadge/StatusBadge';
|
|
2
12
|
export type { StatusBadgeProps, StatusBadgeStatus } from './StatusBadge/StatusBadge';
|
|
3
13
|
export { FavoriteButton } from './FavoriteButton/FavoriteButton';
|
|
4
|
-
export type { FavoriteButtonProps } from './FavoriteButton/FavoriteButton';
|
|
14
|
+
export type { FavoriteButtonProps, FavoriteButtonSize } from './FavoriteButton/FavoriteButton';
|
|
5
15
|
export { StatusLegendItem } from './StatusLegendItem/StatusLegendItem';
|
|
6
16
|
export type { StatusLegendItemProps, LegendStatus } from './StatusLegendItem/StatusLegendItem';
|
|
7
17
|
export { StatusChart } from './StatusChart/StatusChart';
|