@oc-digital/react-component-library 7.2.3-beta.0 → 7.2.3-beta.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/build/Alert/Alert.d.ts +5 -0
- package/build/Alert/Alert.types.d.ts +14 -0
- package/build/AlphabeticalList/AlphabeticalList.d.ts +5 -0
- package/build/AlphabeticalList/AlphabeticalList.types.d.ts +22 -0
- package/build/AutoSave/Select/AutoSave.types.d.ts +11 -0
- package/build/AutoSave/Select/index.d.ts +4 -0
- package/build/AutoSave/Text/AutoSave.types.d.ts +17 -0
- package/build/AutoSave/Text/index.d.ts +4 -0
- package/build/Breadcrumbs/Breadcrumbs.d.ts +5 -0
- package/build/Breadcrumbs/Breadcrumbs.types.d.ts +24 -0
- package/build/Button/Button.d.ts +4 -0
- package/build/Button/Button.types.d.ts +10 -0
- package/build/ButtonWithConfirm/ButtonWithConfirm.d.ts +5 -0
- package/build/ButtonWithConfirm/ButtonWithConfirm.types.d.ts +9 -0
- package/build/ContentBox/ContentBox.d.ts +5 -0
- package/build/ContentBox/ContentBox.types.d.ts +7 -0
- package/build/ContentLabel/ContentLabel.d.ts +5 -0
- package/build/ContentLabel/ContentLabel.types.d.ts +5 -0
- package/build/DatePicker/DatePicker.d.ts +5 -0
- package/build/DatePicker/DatePicker.types.d.ts +6 -0
- package/build/EditableTable/EditableTable.d.ts +5 -0
- package/build/EditableTable/EditableTable.types.d.ts +107 -0
- package/build/EditableTable/components/TableCheckbox.d.ts +8 -0
- package/build/EditableTable/components/TableDateInput.d.ts +8 -0
- package/build/EditableTable/components/TableTextInput.d.ts +21 -0
- package/build/EditableTable/components/utils/getTextWidth.d.ts +13 -0
- package/build/EditableTable/defaultCells.d.ts +31 -0
- package/build/EntityList/EntityList.d.ts +5 -0
- package/build/EntityList/EntityList.types.d.ts +15 -0
- package/build/ErrorIndicator/ErrorIndicator.d.ts +5 -0
- package/build/ErrorIndicator/ErrorIndicator.types.d.ts +5 -0
- package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.d.ts +5 -0
- package/build/ImageDisplayAndUpload/ImageDisplayAndUpload.types.d.ts +9 -0
- package/build/KeyboardDatePicker/KeyboardDatePicker.d.ts +5 -0
- package/build/KeyboardDatePicker/KeyboardDatePicker.types.d.ts +6 -0
- package/build/LeftNavigation/LeftNavigation.d.ts +5 -0
- package/build/LeftNavigation/LeftNavigation.types.d.ts +97 -0
- package/build/LeftNavigation/NavListItem.d.ts +5 -0
- package/build/LeftNavigation/PrimaryLeftNavigation.d.ts +5 -0
- package/build/LeftNavigation/SecondaryLeftNavigation.d.ts +5 -0
- package/build/LoadingSpinner/LoadingSpinner.d.ts +5 -0
- package/build/LoadingSpinner/LoadingSpinner.types.d.ts +6 -0
- package/build/MainLayout/MainLayout.d.ts +5 -0
- package/build/MainLayout/MainLayout.types.d.ts +11 -0
- package/build/MobileDatePicker/MobileDatePicker.d.ts +5 -0
- package/build/MobileDatePicker/MobileDatePicker.types.d.ts +6 -0
- package/build/NavbarLayout/Navbar.d.ts +13 -0
- package/build/NavbarLayout/NavbarLayout.d.ts +17 -0
- package/build/NavbarLayout/index.d.ts +2 -0
- package/build/SearchBar/SearchBar.d.ts +5 -0
- package/build/SearchBar/SearchBar.types.d.ts +33 -0
- package/build/Select/Select.d.ts +5 -0
- package/build/Select/Select.types.d.ts +16 -0
- package/build/StaticTable/StaticTable.d.ts +5 -0
- package/build/StaticTable/StaticTable.types.d.ts +21 -0
- package/build/SvgComponents/ContainedPartnersLogo.d.ts +5 -0
- package/build/SvgComponents/HomeSvg.d.ts +5 -0
- package/build/SvgComponents/NovelLogoSvg.d.ts +5 -0
- package/build/SvgComponents/OrganisationList.d.ts +5 -0
- package/build/SvgComponents/ProjectsSvg.d.ts +5 -0
- package/build/SvgComponents/index.d.ts +5 -0
- package/build/SvgComponents/types.d.ts +6 -0
- package/build/TextField/TextField.d.ts +16 -0
- package/build/TextField/TextField.types.d.ts +8 -0
- package/build/Tooltip/OptionalTooltip.d.ts +9 -0
- package/build/Tooltip/index.d.ts +1 -0
- package/build/globals/index.d.ts +26 -0
- package/build/hooks/index.d.ts +3 -0
- package/build/hooks/useDebounceEffect.d.ts +2 -0
- package/build/hooks/useInterval.d.ts +2 -0
- package/build/hooks/useWhyDidYouUpdate.d.ts +1 -0
- package/build/index.d.ts +38 -0
- package/build/stories/Button.d.ts +28 -0
- package/build/stories/Button.stories.d.ts +10 -0
- package/build/stories/Header.d.ts +12 -0
- package/build/stories/Header.stories.d.ts +8 -0
- package/build/stories/Page.d.ts +3 -0
- package/build/stories/Page.stories.d.ts +8 -0
- package/build/styles/colours.d.ts +3 -0
- package/build/styles/font.d.ts +1 -0
- package/build/styles/index.d.ts +3 -0
- package/build/styles/layout.d.ts +1 -0
- package/build/styles/spacing.d.ts +1 -0
- package/build/styles/themes.d.ts +2 -0
- package/build/utils/index.d.ts +6 -0
- package/package.json +6 -7
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactChild } from 'react';
|
|
2
|
+
import { FormStatuses } from '../globals';
|
|
3
|
+
|
|
4
|
+
export interface IAlertProps {
|
|
5
|
+
alertActionHandler?: () => void;
|
|
6
|
+
formStatus: FormStatuses;
|
|
7
|
+
actionButton?: {
|
|
8
|
+
handler: () => void;
|
|
9
|
+
text: string;
|
|
10
|
+
};
|
|
11
|
+
alertMessage: ReactChild;
|
|
12
|
+
addBreak?: boolean;
|
|
13
|
+
styling?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface IAlphabeticalListProps {
|
|
3
|
+
array: any[] | undefined | null;
|
|
4
|
+
sortFn?: (arg1: any, arg2: any) => number;
|
|
5
|
+
sortKey?: string;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
buttonClick?: (item?: any) => void;
|
|
8
|
+
linkTo?: (item?: any) => string;
|
|
9
|
+
ItemTemplate: React.FC<{
|
|
10
|
+
item: any;
|
|
11
|
+
}>;
|
|
12
|
+
arrayKey?: string;
|
|
13
|
+
loadingMessage?: string;
|
|
14
|
+
emptyMessage?: string | JSX.Element;
|
|
15
|
+
alphabetisedHeader?: boolean;
|
|
16
|
+
isItemDisabled?: (item: any) => {
|
|
17
|
+
disabled: true;
|
|
18
|
+
reason: string;
|
|
19
|
+
} | {
|
|
20
|
+
disabled: false;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FocusEvent } from 'react';
|
|
2
|
+
import { AccessLevels } from '../../globals';
|
|
3
|
+
|
|
4
|
+
export interface AutoSaveTextFieldProps {
|
|
5
|
+
autoSave: (value: string) => void;
|
|
6
|
+
value: string;
|
|
7
|
+
className: string;
|
|
8
|
+
label: string;
|
|
9
|
+
onBlur?: {
|
|
10
|
+
(e: FocusEvent<any, Element>): void;
|
|
11
|
+
<T = any>(fieldOrEvent: T): T extends string ? (e: any) => void : void;
|
|
12
|
+
};
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
accessLevel: AccessLevels | undefined;
|
|
15
|
+
error: boolean;
|
|
16
|
+
helperText: string | false | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type BreadcrumbSlot = {
|
|
4
|
+
name: string;
|
|
5
|
+
link: string;
|
|
6
|
+
};
|
|
7
|
+
type BreadCrumbKeys = "first" | "second" | "third";
|
|
8
|
+
type IBreadcrumbs = {
|
|
9
|
+
[K in BreadCrumbKeys]?: BreadcrumbSlot;
|
|
10
|
+
};
|
|
11
|
+
type colorOptions = {
|
|
12
|
+
background?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
};
|
|
15
|
+
type ColorKeys = "primary" | "secondary" | "tertiary";
|
|
16
|
+
export type IBreadcrumbColors = {
|
|
17
|
+
[K in ColorKeys]?: colorOptions;
|
|
18
|
+
};
|
|
19
|
+
export interface IBreadcrumbsProps {
|
|
20
|
+
logo: ReactNode;
|
|
21
|
+
content: IBreadcrumbs;
|
|
22
|
+
colors?: IBreadcrumbColors;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAuthoriserProp } from '../globals';
|
|
2
|
+
import { ButtonProps } from '@mui/material/Button';
|
|
3
|
+
|
|
4
|
+
export type IButtonProps<C extends React.ElementType = React.ElementType> = ButtonProps<C, {
|
|
5
|
+
component?: C;
|
|
6
|
+
}> & IAuthoriserProp & {
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
errors?: boolean;
|
|
9
|
+
styling?: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAuthoriserProp } from '../globals';
|
|
2
|
+
import { ButtonProps } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
export interface IButtonWithConfirmProps extends ButtonProps, IAuthoriserProp {
|
|
5
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
styling?: string;
|
|
8
|
+
confirmButtonLabel?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { CellProps, HeaderGroup, Row, TableBodyPropGetter, TableBodyProps, TablePropGetter, TableProps } from 'react-table';
|
|
2
|
+
import { SchemaOf } from 'yup';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
|
|
5
|
+
export type IAlignment = "left" | "right" | "inherit" | "center" | "justify";
|
|
6
|
+
export type RowData = {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
export type ITableHeader = {
|
|
10
|
+
Header: string | JSX.Element;
|
|
11
|
+
accessor: string;
|
|
12
|
+
textAlign?: IAlignment;
|
|
13
|
+
};
|
|
14
|
+
export type TableCellValues = null | undefined | string | number | Date | boolean | string[];
|
|
15
|
+
export type SynchCellWithStateFn = (rowIndex: number, columnId: string, value: TableCellValues, errorStatus: boolean, forceUpdate?: boolean) => void;
|
|
16
|
+
export type FieldConfig = {
|
|
17
|
+
[key: string]: {
|
|
18
|
+
validationRule?: SchemaOf<any>;
|
|
19
|
+
dependentValidationRule?: (values: {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}) => SchemaOf<any>;
|
|
22
|
+
customRenderFn?: (args: ICustomRenderFnProps) => JSX.Element;
|
|
23
|
+
prefix?: React.ReactNode | React.JSXElementConstructor<any>;
|
|
24
|
+
suffix?: React.ReactNode | React.JSXElementConstructor<any>;
|
|
25
|
+
textAlign?: IAlignment;
|
|
26
|
+
onBlur?: (args: {
|
|
27
|
+
rowIndex: number;
|
|
28
|
+
value: string;
|
|
29
|
+
setRows: React.Dispatch<React.SetStateAction<RowData[] | null>>;
|
|
30
|
+
values: RowData;
|
|
31
|
+
}) => Promise<void>;
|
|
32
|
+
isCheckbox?: boolean;
|
|
33
|
+
isDateField?: boolean;
|
|
34
|
+
onChangeValueModifier?: (value: string) => TableCellValues;
|
|
35
|
+
getCalculatedValue?: (values: RowData) => TableCellValues;
|
|
36
|
+
total?: boolean;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export interface IEditableTableProps {
|
|
40
|
+
tableRows: RowData[] | null;
|
|
41
|
+
tableHeaders: ITableHeader[];
|
|
42
|
+
syncCellWithState: SynchCellWithStateFn;
|
|
43
|
+
setRows?: React.Dispatch<React.SetStateAction<RowData[] | null>> | undefined;
|
|
44
|
+
skipPageReset?: boolean;
|
|
45
|
+
fieldConfig: FieldConfig;
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
setSelectedRows?: React.Dispatch<React.SetStateAction<number[]>>;
|
|
48
|
+
includeRowSelect?: boolean;
|
|
49
|
+
filterTypes?: {
|
|
50
|
+
[key: string]: (rows: any, id: any, filterValue: any) => any;
|
|
51
|
+
};
|
|
52
|
+
filterData?: {
|
|
53
|
+
filterRow: string;
|
|
54
|
+
filterValues: RowData[];
|
|
55
|
+
};
|
|
56
|
+
emptyTableText?: string;
|
|
57
|
+
paginate?: boolean;
|
|
58
|
+
defaultPageSize?: number;
|
|
59
|
+
virtContainerStyling?: string;
|
|
60
|
+
overscan?: number;
|
|
61
|
+
rowHeight?: number;
|
|
62
|
+
includeGlobalSearch?: boolean;
|
|
63
|
+
disableHeaderSelect?: boolean;
|
|
64
|
+
}
|
|
65
|
+
type AdditionalCellProps = Pick<IEditableTableProps, "fieldConfig" | "syncCellWithState" | "setRows">;
|
|
66
|
+
export interface ExtendedCellProps extends AdditionalCellProps, CellProps<RowData> {
|
|
67
|
+
disabled: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface IEssentialRenderFnProps {
|
|
70
|
+
error: string | false;
|
|
71
|
+
disabled: boolean;
|
|
72
|
+
value: TableCellValues;
|
|
73
|
+
onChange: (e: any) => void;
|
|
74
|
+
onBlur: any;
|
|
75
|
+
prefix?: React.ReactNode | React.JSXElementConstructor<any> | Element;
|
|
76
|
+
suffix?: React.ReactNode | React.JSXElementConstructor<any> | Element;
|
|
77
|
+
numberField?: boolean;
|
|
78
|
+
textAlign?: IAlignment;
|
|
79
|
+
fixedDecimalScale?: boolean;
|
|
80
|
+
}
|
|
81
|
+
export interface ICustomRenderFnProps extends IEssentialRenderFnProps {
|
|
82
|
+
values: {
|
|
83
|
+
[key: string]: any;
|
|
84
|
+
};
|
|
85
|
+
originalValues: {
|
|
86
|
+
[key: string]: any;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export interface ITableContentProps extends Pick<IEditableTableProps, "disabled" | "includeRowSelect"> {
|
|
90
|
+
getTableProps: (propGetter?: TablePropGetter<RowData> | undefined) => TableProps;
|
|
91
|
+
headerGroups: HeaderGroup<RowData>[];
|
|
92
|
+
getTableBodyProps: (propGetter?: TableBodyPropGetter<RowData> | undefined) => TableBodyProps;
|
|
93
|
+
prepareRow: (row: Row<RowData>) => void;
|
|
94
|
+
rowsToRender: Row<RowData>[];
|
|
95
|
+
disabled: boolean;
|
|
96
|
+
includeRowSelect: boolean;
|
|
97
|
+
isAllRowsSelected: boolean;
|
|
98
|
+
selectedFlatRows: Row<RowData>[];
|
|
99
|
+
fieldConfig: FieldConfig;
|
|
100
|
+
tableHeaders: ITableHeader[];
|
|
101
|
+
}
|
|
102
|
+
export interface IGlobalFilterProps {
|
|
103
|
+
preGlobalFilteredRows: RowData[];
|
|
104
|
+
globalFilter: string | undefined;
|
|
105
|
+
setGlobalFilter: (val: string | undefined) => void;
|
|
106
|
+
}
|
|
107
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ITableCheckboxProps {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
value: boolean | null | undefined;
|
|
5
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const TableCheckbox: ({ disabled, value, onChange }: ITableCheckboxProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ITableDateInputProps {
|
|
2
|
+
disabled: boolean;
|
|
3
|
+
value: Date | string | null | undefined;
|
|
4
|
+
error: string | false;
|
|
5
|
+
onChange: (value: Date | string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const TableDateInput: ({ disabled, value, error, onChange, }: ITableDateInputProps) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PureComponent } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ITableTextInputProps {
|
|
4
|
+
name?: string;
|
|
5
|
+
value: string | number | null | undefined;
|
|
6
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
8
|
+
prefix?: string | React.ReactElement | JSX.Element | null;
|
|
9
|
+
suffix?: string | React.ReactElement | JSX.Element | null;
|
|
10
|
+
textAlign?: "start" | "end" | "left" | "right" | "center" | "justify" | "match-parent" | "inherit";
|
|
11
|
+
numberField?: boolean;
|
|
12
|
+
fixedDecimalScale?: boolean;
|
|
13
|
+
error?: string | false;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
wrapperStyling?: string;
|
|
17
|
+
styling?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class TableTextInput extends PureComponent<ITableTextInputProps> {
|
|
20
|
+
render(): JSX.Element;
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optimised for TableTextField.
|
|
3
|
+
*
|
|
4
|
+
* Instead of accepting a HTMLElement, which would require a re-render to get the correct width,
|
|
5
|
+
* this function is oprimised to accept only the text and max width.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getTableTextInputTextWidth(text: string, minWidth?: number, maxWidth?: number): string;
|
|
8
|
+
/**
|
|
9
|
+
* Calculates the width of a given string in pixels (perfect result)
|
|
10
|
+
*
|
|
11
|
+
* When using this to size inputs, the input must have CSS box-sizing: content-box
|
|
12
|
+
*/
|
|
13
|
+
export declare function getTextWidth(text: string, element: HTMLElement, minWidth?: number, maxWidth?: number): string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React, ReactChild, ReactNode } from 'react';
|
|
2
|
+
import { ICustomRenderFnProps, IEssentialRenderFnProps } from './EditableTable.types';
|
|
3
|
+
|
|
4
|
+
export declare const tableTextField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
5
|
+
export declare const tableNumericStringField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
6
|
+
export declare const tableNumericStringFixedDecimalField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
7
|
+
export declare const tableDateField: ({ value, onChange, disabled, error, }: ICustomRenderFnProps) => JSX.Element;
|
|
8
|
+
export declare const tableCheckbox: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
9
|
+
interface INonEditableField extends Pick<IEssentialRenderFnProps, "numberField" | "prefix" | "suffix" | "textAlign" | "fixedDecimalScale"> {
|
|
10
|
+
text: React.ReactText;
|
|
11
|
+
styling?: string;
|
|
12
|
+
inputStyling?: string;
|
|
13
|
+
widthOverride?: string | undefined;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const NonEditableField: React.FC<INonEditableField>;
|
|
17
|
+
interface ITableSelect extends IEssentialRenderFnProps {
|
|
18
|
+
selectOptions: {
|
|
19
|
+
[key: string]: ReactChild;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export declare const TableSelect: React.FC<ITableSelect>;
|
|
23
|
+
interface IMultipleTableSelect extends Omit<IEssentialRenderFnProps, "value"> {
|
|
24
|
+
selectOptions: {
|
|
25
|
+
[key: string]: ReactChild;
|
|
26
|
+
};
|
|
27
|
+
value: string[];
|
|
28
|
+
renderValue?: (value: any) => ReactNode;
|
|
29
|
+
}
|
|
30
|
+
export declare const TableMultipleSelect: React.FC<IMultipleTableSelect>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface IEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
link: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
export interface IEntityListProps {
|
|
10
|
+
entities: IEntity[] | undefined;
|
|
11
|
+
icon: (entity?: IEntity) => ReactNode;
|
|
12
|
+
loadingMessage?: string;
|
|
13
|
+
emptyMessage?: string;
|
|
14
|
+
onClick?: (org: IEntity) => void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAuthoriserProp } from '../globals';
|
|
2
|
+
|
|
3
|
+
export interface IImageDisplayAndUploadProps extends IAuthoriserProp {
|
|
4
|
+
id?: string;
|
|
5
|
+
url: string | null;
|
|
6
|
+
handleSaveImage: (format: string, buffer: ArrayBuffer, file: File) => Promise<void>;
|
|
7
|
+
roundedAvatar?: boolean;
|
|
8
|
+
alt?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { default as React, ReactNode, ReactChild } from 'react';
|
|
2
|
+
import { ISvgComponentProps } from '../SvgComponents/types';
|
|
3
|
+
|
|
4
|
+
export interface INavigationLink {
|
|
5
|
+
field: string;
|
|
6
|
+
path: string;
|
|
7
|
+
Icon: React.FC<ISvgComponentProps>;
|
|
8
|
+
hasSecondary?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type IExpandedOptions = {
|
|
11
|
+
view: string;
|
|
12
|
+
expanded: boolean;
|
|
13
|
+
};
|
|
14
|
+
export interface IMainNavigationItem {
|
|
15
|
+
id: string;
|
|
16
|
+
name: ReactChild;
|
|
17
|
+
route: string;
|
|
18
|
+
archived?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface ISecondaryNavigationSubItem {
|
|
21
|
+
id: string;
|
|
22
|
+
name: ReactChild;
|
|
23
|
+
route: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ISecondaryNavigationItem {
|
|
26
|
+
mainItem: IMainNavigationItem;
|
|
27
|
+
subItems?: ISecondaryNavigationSubItem[];
|
|
28
|
+
startDate: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ISecondaryNavigationElement {
|
|
31
|
+
items: ISecondaryNavigationItem[];
|
|
32
|
+
archivedItems?: ISecondaryNavigationItem[];
|
|
33
|
+
button?: {
|
|
34
|
+
url: string;
|
|
35
|
+
text: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface ISecondaryNavigationElements {
|
|
39
|
+
[key: string]: ISecondaryNavigationElement;
|
|
40
|
+
}
|
|
41
|
+
export interface IPrimaryConfig {
|
|
42
|
+
background?: string;
|
|
43
|
+
text?: string;
|
|
44
|
+
activeText?: string;
|
|
45
|
+
moveLastItemToBottom?: boolean;
|
|
46
|
+
activeBorderColor?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ISecondaryMainConfig {
|
|
49
|
+
mainBackground?: string;
|
|
50
|
+
mainText?: string;
|
|
51
|
+
mainHover?: string;
|
|
52
|
+
mainIcon?: string;
|
|
53
|
+
mainActiveText?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface ISecondarySubConfig {
|
|
56
|
+
subItemBackground?: string;
|
|
57
|
+
subItemText?: string;
|
|
58
|
+
subItemHover?: string;
|
|
59
|
+
subItemActiveBackground?: string;
|
|
60
|
+
subItemActiveHover?: string;
|
|
61
|
+
subItemActiveText?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ISideNavConfig {
|
|
64
|
+
rootRouteName: string;
|
|
65
|
+
primary?: IPrimaryConfig;
|
|
66
|
+
secondary?: {
|
|
67
|
+
mainItemColors?: ISecondaryMainConfig;
|
|
68
|
+
subItemColors?: ISecondarySubConfig;
|
|
69
|
+
closeButtonSvg?: ReactNode;
|
|
70
|
+
titleColor?: string;
|
|
71
|
+
titleIconColor?: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export interface ILeftNavigationProps {
|
|
75
|
+
primaryNavItems: INavigationLink[];
|
|
76
|
+
secondaryNavItems: ISecondaryNavigationElements;
|
|
77
|
+
config: ISideNavConfig;
|
|
78
|
+
}
|
|
79
|
+
export interface IListItemProps extends ISecondaryNavigationItem {
|
|
80
|
+
config: ISideNavConfig;
|
|
81
|
+
Icon: React.FC<ISvgComponentProps>;
|
|
82
|
+
}
|
|
83
|
+
export interface INavListItemStyleProps extends ISecondaryMainConfig, ISecondarySubConfig {
|
|
84
|
+
}
|
|
85
|
+
export interface IPrimaryLeftNavContainerProps {
|
|
86
|
+
expandedOptions: IExpandedOptions;
|
|
87
|
+
navigationLinks: INavigationLink[];
|
|
88
|
+
setExpandedOptions: React.Dispatch<React.SetStateAction<IExpandedOptions>>;
|
|
89
|
+
config: ISideNavConfig;
|
|
90
|
+
}
|
|
91
|
+
export interface ISecondaryLeftNavContainerProps {
|
|
92
|
+
secondaryNavItems: ISecondaryNavigationElements;
|
|
93
|
+
primaryNavItems: INavigationLink[];
|
|
94
|
+
expandedOptions: IExpandedOptions;
|
|
95
|
+
setExpandedOptions: React.Dispatch<React.SetStateAction<IExpandedOptions>>;
|
|
96
|
+
config: ISideNavConfig;
|
|
97
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface IMainLayoutProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
sideNavigation?: ReactElement;
|
|
6
|
+
desktopWidth?: boolean | string;
|
|
7
|
+
children: ReactElement;
|
|
8
|
+
topOffset?: number | string;
|
|
9
|
+
}
|
|
10
|
+
export interface IMainLayoutStyleProps extends Pick<IMainLayoutProps, "topOffset"> {
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ISvgComponentProps } from '../SvgComponents/types';
|
|
3
|
+
|
|
4
|
+
export type NavbarProps = {
|
|
5
|
+
tabs: Array<{
|
|
6
|
+
Icon: FC<ISvgComponentProps>;
|
|
7
|
+
field: string;
|
|
8
|
+
path: string;
|
|
9
|
+
separate?: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
declare const Navbar: ({ tabs }: NavbarProps) => JSX.Element;
|
|
13
|
+
export default Navbar;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React, FC } from 'react';
|
|
2
|
+
import { ISvgComponentProps } from '../SvgComponents/types';
|
|
3
|
+
|
|
4
|
+
export type NavbarLayoutTabs = Array<{
|
|
5
|
+
Icon: FC<ISvgComponentProps>;
|
|
6
|
+
field: string;
|
|
7
|
+
path: string;
|
|
8
|
+
separate?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
export type NavbarLayoutProps = {
|
|
11
|
+
tabs: NavbarLayoutTabs;
|
|
12
|
+
hideTabs?: boolean;
|
|
13
|
+
leaveHeightForMenu?: boolean;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
};
|
|
16
|
+
declare const NavbarLayout: ({ tabs, hideTabs, leaveHeightForMenu, children, }: NavbarLayoutProps) => JSX.Element;
|
|
17
|
+
export default NavbarLayout;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ISearchBarProps {
|
|
3
|
+
array: any[] | undefined | null;
|
|
4
|
+
sortFn?: (arg1: any, arg2: any) => number;
|
|
5
|
+
sortKey?: string;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
buttonClick?: (item?: any) => void;
|
|
8
|
+
linkTo?: (item?: any) => string;
|
|
9
|
+
ItemTemplate: React.FC<{
|
|
10
|
+
item: any;
|
|
11
|
+
}>;
|
|
12
|
+
arrayKey?: string;
|
|
13
|
+
loadingMessage?: string;
|
|
14
|
+
emptyMessage?: string;
|
|
15
|
+
inputBackgroundColor?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
disabledSearch?: boolean;
|
|
18
|
+
delay?: number;
|
|
19
|
+
minQueryLength?: number;
|
|
20
|
+
handleOnChange?: (query: string) => void;
|
|
21
|
+
searchKeys?: string[];
|
|
22
|
+
alphabetisedHeader?: boolean;
|
|
23
|
+
/** setting this will initialise the search query to a value */
|
|
24
|
+
initialSearchQuery?: string;
|
|
25
|
+
/** dynamically generate an empty list message based on what was searched for */
|
|
26
|
+
dynamicEmptyMessage?: (query: string) => string | JSX.Element;
|
|
27
|
+
isResultDisabled?: (result: any) => {
|
|
28
|
+
disabled: true;
|
|
29
|
+
reason: string;
|
|
30
|
+
} | {
|
|
31
|
+
disabled: false;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OutlinedTextFieldProps } from '@mui/material';
|
|
2
|
+
import { IAuthoriserProp } from '../globals';
|
|
3
|
+
|
|
4
|
+
export interface ISelectProps extends IAuthoriserProp, Omit<OutlinedTextFieldProps, "variant"> {
|
|
5
|
+
selectOptions: {
|
|
6
|
+
value: string | number;
|
|
7
|
+
description: React.ReactNode;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}[];
|
|
10
|
+
maxListHeight?: number;
|
|
11
|
+
styling?: string;
|
|
12
|
+
variant?: "outlined" | "standard";
|
|
13
|
+
onOpen?: () => unknown;
|
|
14
|
+
onClose?: () => unknown;
|
|
15
|
+
itemClassName?: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type cellAlignmentOptions = "centerJustify" | "leftJustify" | "rightJustify";
|
|
3
|
+
export type headerColours = {
|
|
4
|
+
background?: string;
|
|
5
|
+
border?: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
};
|
|
8
|
+
export interface IStaticTableProps {
|
|
9
|
+
headers?: React.ReactNode[];
|
|
10
|
+
headerCellAlignment?: cellAlignmentOptions[];
|
|
11
|
+
rows: {
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
row: React.ReactNode[];
|
|
14
|
+
}[] | null | undefined;
|
|
15
|
+
rowCellAlignment?: cellAlignmentOptions[];
|
|
16
|
+
rowBorderSeparation?: boolean;
|
|
17
|
+
styling?: string;
|
|
18
|
+
headerColours?: headerColours;
|
|
19
|
+
paginate?: boolean;
|
|
20
|
+
itemsPerPage?: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as NovelLogoSvg } from './NovelLogoSvg';
|
|
2
|
+
export { default as ContainedPartnersLogo } from './ContainedPartnersLogo';
|
|
3
|
+
export { default as OrganisationList } from './OrganisationList';
|
|
4
|
+
export { default as HomeSvg } from './HomeSvg';
|
|
5
|
+
export { default as ProjectsSvg } from './ProjectsSvg';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { NumericFormatProps } from 'react-number-format';
|
|
3
|
+
import { ITextFieldProps } from './TextField.types';
|
|
4
|
+
|
|
5
|
+
declare const TextField: React.FC<ITextFieldProps>;
|
|
6
|
+
export default TextField;
|
|
7
|
+
interface INumberFormatProps extends Omit<NumericFormatProps, "onChange"> {
|
|
8
|
+
onChange: (event: {
|
|
9
|
+
target: {
|
|
10
|
+
name: string;
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
}) => void;
|
|
14
|
+
fixedDecimalScale: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const NumberFormatField: (props: INumberFormatProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OutlinedTextFieldProps } from '@mui/material';
|
|
2
|
+
import { IAuthoriserProp } from '../globals';
|
|
3
|
+
|
|
4
|
+
export interface ITextFieldProps extends IAuthoriserProp, Omit<OutlinedTextFieldProps, "variant"> {
|
|
5
|
+
styling?: string;
|
|
6
|
+
numberField?: boolean;
|
|
7
|
+
fixedDecimalScale?: boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OptionalTooltip';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const HALF_REM = "0.5rem";
|
|
2
|
+
export declare const ONE_REM = "1rem";
|
|
3
|
+
export declare const ONE_AND_HALF_REM = "1.5rem";
|
|
4
|
+
export declare const TWO_REM = "3rem";
|
|
5
|
+
export declare const THREE_REM = "3rem";
|
|
6
|
+
export declare const EDITED_STATUS = "EDITED";
|
|
7
|
+
export declare const NEW_STATUS = "NEW";
|
|
8
|
+
export declare const VALIDATION_MESSAGE_REQUIRED = "Required";
|
|
9
|
+
export declare const REGEX_NUMBER_WITH_DECIMALS: RegExp;
|
|
10
|
+
export declare const YUP_REQUIRED_STRING_SHORT_MESSAGE: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
11
|
+
export declare const YUP_STRING_NUMBER_WITH_DECIMALS: import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
12
|
+
export declare const FORM_SUCCESS = "success";
|
|
13
|
+
export declare const FORM_ERROR = "error";
|
|
14
|
+
export declare const FORM_LOADING = "loading";
|
|
15
|
+
export declare const FORM_ENABLED = "enabled";
|
|
16
|
+
export declare const FORM_WARNING = "warning";
|
|
17
|
+
export declare const FORM_DELETING = "deleting";
|
|
18
|
+
export type FormStatuses = typeof FORM_SUCCESS | typeof FORM_ERROR | typeof FORM_LOADING | typeof FORM_ENABLED | typeof FORM_WARNING | typeof FORM_DELETING;
|
|
19
|
+
export declare const READ_LEVEL = "read";
|
|
20
|
+
export declare const WRITE_LEVEL = "write";
|
|
21
|
+
export declare const NO_ACCESS_LEVEL = "noAccess";
|
|
22
|
+
export type AccessLevels = typeof READ_LEVEL | typeof WRITE_LEVEL | typeof NO_ACCESS_LEVEL;
|
|
23
|
+
export interface IAuthoriserProp {
|
|
24
|
+
accessLevel?: AccessLevels;
|
|
25
|
+
}
|
|
26
|
+
export declare const BORDER_RADIUS = "14px";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useWhyDidYouUpdate(name: string, props: Record<string, any>): void;
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as Button } from './Button/Button';
|
|
2
|
+
import { default as ContentLabel } from './ContentLabel/ContentLabel';
|
|
3
|
+
import { default as ContentBox } from './ContentBox/ContentBox';
|
|
4
|
+
import { default as StaticTable } from './StaticTable/StaticTable';
|
|
5
|
+
import { default as LoadingSpinner } from './LoadingSpinner/LoadingSpinner';
|
|
6
|
+
import { default as Breadcrumbs } from './Breadcrumbs/Breadcrumbs';
|
|
7
|
+
import { default as EntityList } from './EntityList/EntityList';
|
|
8
|
+
import { IEntity } from './EntityList/EntityList.types';
|
|
9
|
+
import { default as ErrorIndicator } from './ErrorIndicator/ErrorIndicator';
|
|
10
|
+
import { default as LeftNavigation } from './LeftNavigation/LeftNavigation';
|
|
11
|
+
import { INavigationLink, ISecondaryNavigationItem, ISecondaryNavigationSubItem } from './LeftNavigation/LeftNavigation.types';
|
|
12
|
+
import { default as MainLayout } from './MainLayout/MainLayout';
|
|
13
|
+
import { default as SearchBar } from './SearchBar/SearchBar';
|
|
14
|
+
import { default as TextField, NumberFormatField } from './TextField/TextField';
|
|
15
|
+
import { default as Select } from './Select/Select';
|
|
16
|
+
import { default as DatePicker } from './DatePicker/DatePicker';
|
|
17
|
+
import { default as KeyboardDatePicker } from './KeyboardDatePicker/KeyboardDatePicker';
|
|
18
|
+
import { default as ButtonWithConfirm } from './ButtonWithConfirm/ButtonWithConfirm';
|
|
19
|
+
import { default as EditableTable } from './EditableTable/EditableTable';
|
|
20
|
+
import { FieldConfig, RowData, ITableHeader, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps } from './EditableTable/EditableTable.types';
|
|
21
|
+
import { tableNumericStringField, tableNumericStringFixedDecimalField, tableDateField, tableCheckbox, TableSelect, TableMultipleSelect, NonEditableField } from './EditableTable/defaultCells';
|
|
22
|
+
import { useDebounceEffect, useInterval, useWhyDidYouUpdate } from './hooks';
|
|
23
|
+
import { didCellValueChange } from './utils';
|
|
24
|
+
import { default as ImageDisplayAndUpload } from './ImageDisplayAndUpload/ImageDisplayAndUpload';
|
|
25
|
+
import { default as Alert } from './Alert/Alert';
|
|
26
|
+
import { default as AlphabeticalList } from './AlphabeticalList/AlphabeticalList';
|
|
27
|
+
import { ISelectProps } from './Select/Select.types';
|
|
28
|
+
import { NavbarLayout, NavbarLayoutTabs } from './NavbarLayout';
|
|
29
|
+
import { FORM_SUCCESS, FORM_ERROR, FORM_LOADING, FORM_ENABLED, FORM_WARNING, FORM_DELETING, FormStatuses } from './globals';
|
|
30
|
+
import { default as MobileDatePicker } from './MobileDatePicker/MobileDatePicker';
|
|
31
|
+
import { AutoSaveTextField } from './AutoSave/Text';
|
|
32
|
+
import { AutoSaveSelectField } from './AutoSave/Select';
|
|
33
|
+
import { OptionalTooltip } from './Tooltip';
|
|
34
|
+
import { TableDateInput } from './EditableTable/components/TableDateInput';
|
|
35
|
+
import { TableTextInput } from './EditableTable/components/TableTextInput';
|
|
36
|
+
|
|
37
|
+
export { ImageDisplayAndUpload, Alert, Button, ContentLabel, ContentBox, StaticTable, LoadingSpinner, Breadcrumbs, EntityList, ErrorIndicator, LeftNavigation, MainLayout, SearchBar, TextField, Select, DatePicker, AutoSaveTextField, AutoSaveSelectField, KeyboardDatePicker, MobileDatePicker, ButtonWithConfirm, EditableTable, TableSelect, TableMultipleSelect, NonEditableField, TableDateInput as TableDatePicker, TableTextInput as TableTextField, tableNumericStringField, tableNumericStringFixedDecimalField, tableDateField, tableCheckbox, didCellValueChange, useDebounceEffect, useInterval, useWhyDidYouUpdate, AlphabeticalList, NumberFormatField, NavbarLayout, OptionalTooltip, FORM_SUCCESS, FORM_ERROR, FORM_LOADING, FORM_ENABLED, FORM_WARNING, FORM_DELETING, };
|
|
38
|
+
export type { FieldConfig, RowData, ITableHeader, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps, ISelectProps, IEntity, INavigationLink, ISecondaryNavigationItem, ISecondaryNavigationSubItem, NavbarLayoutTabs, FormStatuses, };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
/**
|
|
4
|
+
* Is this the principal call to action on the page?
|
|
5
|
+
*/
|
|
6
|
+
primary?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* What background color to use
|
|
9
|
+
*/
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
/**
|
|
12
|
+
* How large should the button be?
|
|
13
|
+
*/
|
|
14
|
+
size?: 'small' | 'medium' | 'large';
|
|
15
|
+
/**
|
|
16
|
+
* Button contents
|
|
17
|
+
*/
|
|
18
|
+
label: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional click handler
|
|
21
|
+
*/
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Primary UI component for user interaction
|
|
26
|
+
*/
|
|
27
|
+
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Button } from './Button';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Button>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Button>;
|
|
7
|
+
export declare const Primary: Story;
|
|
8
|
+
export declare const Secondary: Story;
|
|
9
|
+
export declare const Large: Story;
|
|
10
|
+
export declare const Small: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
type User = {
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
interface HeaderProps {
|
|
6
|
+
user?: User;
|
|
7
|
+
onLogin: () => void;
|
|
8
|
+
onLogout: () => void;
|
|
9
|
+
onCreateAccount: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Header } from './Header';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Header>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Header>;
|
|
7
|
+
export declare const LoggedIn: Story;
|
|
8
|
+
export declare const LoggedOut: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Page } from './Page';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof Page>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof Page>;
|
|
7
|
+
export declare const LoggedOut: Story;
|
|
8
|
+
export declare const LoggedIn: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFontStyles: (props?: any) => import('@mui/styles/withStyles').ClassNameMap<"boldText" | "bolderText" | "smallText" | "warningColor" | "centerText">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useLayoutStyles: (props?: any) => import('@mui/styles/withStyles').ClassNameMap<"contentBox" | "limitWidth60rem" | "limitWidth50rem" | "limitWidth45rem" | "limitWidth40rem" | "limitWidth35rem" | "limitWidth30rem" | "limitWidth25rem" | "centeredText" | "startAlignedText" | "width20" | "width49" | "width50" | "width60" | "width100" | "flexCenter" | "centerJustify" | "leftJustify" | "rightJustify" | "adornmentGap">;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useSpacingStyles: (props?: any) => import('@mui/styles/withStyles').ClassNameMap<"labelBreak" | "contentBreak" | "sectionBreak" | "doubleSectionBreak" | "rightSpacer1" | "rightSpacer2" | "leftSpacer1" | "leftSpacer2" | "buttonSpacing" | "leftRightPadding1" | "leftRightPadding2" | "topBottomPadding1" | "topBottomPadding2">;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TableCellValues } from '../EditableTable/EditableTable.types';
|
|
2
|
+
|
|
3
|
+
export declare function sortDescendingStartDateString<T extends {
|
|
4
|
+
startDate: string;
|
|
5
|
+
}>(array: T[]): T[];
|
|
6
|
+
export declare const didCellValueChange: (oldVal: TableCellValues, newVal: TableCellValues, isDateValue?: boolean) => boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oc-digital/react-component-library",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.2.3-beta.
|
|
4
|
+
"version": "7.2.3-beta.1",
|
|
5
5
|
"description": "React component library for Optimal Compliance",
|
|
6
6
|
"main": "build/index.js",
|
|
7
7
|
"types": "build/index.d.ts",
|
|
@@ -43,6 +43,10 @@
|
|
|
43
43
|
"@storybook/react": "^8.0.10",
|
|
44
44
|
"@storybook/react-webpack5": "^8.0.10",
|
|
45
45
|
"@storybook/test": "^8.0.10",
|
|
46
|
+
"@chromatic-com/storybook": "^1.3.4",
|
|
47
|
+
"@storybook/react-dom-shim": "^8.0.10",
|
|
48
|
+
"@storybook/react-vite": "^8.0.10",
|
|
49
|
+
"vite": "^5.2.11",
|
|
46
50
|
"@types/react": "^17.0.21",
|
|
47
51
|
"@types/react-table": "^7.7.8",
|
|
48
52
|
"@typescript-eslint/eslint-plugin": "^4.31.1",
|
|
@@ -72,6 +76,7 @@
|
|
|
72
76
|
"storybook": "^8.0.10",
|
|
73
77
|
"tslib": "^2.3.1",
|
|
74
78
|
"typescript": "^4.4.3",
|
|
79
|
+
"vite-plugin-dts": "^3.9.1",
|
|
75
80
|
"yup": "^0.32.11"
|
|
76
81
|
},
|
|
77
82
|
"peerDependencies": {
|
|
@@ -134,11 +139,5 @@
|
|
|
134
139
|
"lint-staged": {
|
|
135
140
|
"*.+(js|ts|jsx|tsx)": "eslint --fix",
|
|
136
141
|
"*.+(json|css|md)": "prettier --write"
|
|
137
|
-
},
|
|
138
|
-
"dependencies": {
|
|
139
|
-
"@chromatic-com/storybook": "^1.3.4",
|
|
140
|
-
"@storybook/react-dom-shim": "^8.0.10",
|
|
141
|
-
"@storybook/react-vite": "^8.0.10",
|
|
142
|
-
"vite": "^5.2.11"
|
|
143
142
|
}
|
|
144
143
|
}
|