@oc-digital/react-component-library 4.8.2-5 → 5.0.0-beta.3
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/Button/Button.d.ts +2 -2
- package/build/EditableTable/components/TableCheckbox.d.ts +8 -0
- package/build/EditableTable/components/TableDateInput.d.ts +9 -0
- package/build/EditableTable/components/TableTextInput.d.ts +15 -0
- package/build/EditableTable/components/styled/Checkbox.d.ts +5 -0
- package/build/EditableTable/components/styled/CheckboxLabel.d.ts +5 -0
- package/build/EditableTable/components/styled/Input.d.ts +5 -0
- package/build/EditableTable/components/styled/InputAdornmentWrapper.d.ts +5 -0
- package/build/EditableTable/components/styled/InputWrapper.d.ts +5 -0
- package/build/EditableTable/components/styled/SmallError.d.ts +5 -0
- package/build/EditableTable/defaultCells.d.ts +5 -16
- package/build/NavbarLayout/Navbar.d.ts +2 -2
- package/build/NavbarLayout/NavbarLayout.d.ts +1 -1
- package/build/TextField/TextField.d.ts +1 -1
- package/build/index.d.ts +4 -2
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/styles/colours.d.ts +3 -0
- package/package.json +1 -1
package/build/Button/Button.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { IButtonProps } from "./Button.types";
|
|
3
|
-
declare function Button({ loading, children, errors, type, onClick, disabled, variant, styling, color, accessLevel, ...rest }: IButtonProps):
|
|
3
|
+
declare function Button({ loading, children, errors, type, onClick, disabled, variant, styling, color, accessLevel, ...rest }: IButtonProps): JSX.Element | null;
|
|
4
4
|
export default Button;
|
|
@@ -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,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ITableDateInputProps {
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
value: Date | string | null | undefined;
|
|
5
|
+
error: string | false;
|
|
6
|
+
onChange: (value: Date | string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const TableDateInput: ({ disabled, value, error, onChange, }: ITableDateInputProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface ITableTextInputProps {
|
|
3
|
+
name?: string;
|
|
4
|
+
value: string | number | null | undefined;
|
|
5
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
7
|
+
prefix?: string | JSX.Element | null;
|
|
8
|
+
suffix?: string | JSX.Element | null;
|
|
9
|
+
textAlign?: "left" | "right" | "center";
|
|
10
|
+
numberField?: boolean;
|
|
11
|
+
fixedDecimalScale?: boolean;
|
|
12
|
+
error?: string | false;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const TableTextInput: ({ name, value, onChange, onBlur, prefix, suffix, textAlign, numberField, fixedDecimalScale, error, disabled, }: ITableTextInputProps) => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Checkbox: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const CheckboxLabel: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Input: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InputAdornmentWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InputWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SmallError: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
@@ -1,21 +1,10 @@
|
|
|
1
1
|
import React, { ReactChild, ReactNode } from "react";
|
|
2
2
|
import { ICustomRenderFnProps, IEssentialRenderFnProps } from "./EditableTable.types";
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}>;
|
|
9
|
-
export declare const tableTextField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
10
|
-
export declare const tableNumericStringField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
11
|
-
export declare const tableNumericStringFixedDecimalField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
12
|
-
export declare const SelectionCheckbox: React.JSXElementConstructor<Omit<import("@mui/material").CheckboxProps, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"root">>;
|
|
13
|
-
interface ITableDatePicker extends IEssentialRenderFnProps {
|
|
14
|
-
fullDate?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare const TableDatePicker: React.FC<ITableDatePicker>;
|
|
17
|
-
export declare const tableDateField: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
18
|
-
export declare const tableCheckbox: (tableProps: ICustomRenderFnProps) => React.JSX.Element;
|
|
3
|
+
export declare const tableTextField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
4
|
+
export declare const tableNumericStringField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
5
|
+
export declare const tableNumericStringFixedDecimalField: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
6
|
+
export declare const tableDateField: ({ value, onChange, disabled, error, }: ICustomRenderFnProps) => JSX.Element;
|
|
7
|
+
export declare const tableCheckbox: (tableProps: ICustomRenderFnProps) => JSX.Element;
|
|
19
8
|
interface INonEditableField extends Pick<IEssentialRenderFnProps, "numberField" | "prefix" | "suffix" | "textAlign" | "fixedDecimalScale"> {
|
|
20
9
|
text: React.ReactText;
|
|
21
10
|
styling?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC } from "react";
|
|
2
2
|
import { ISvgComponentProps } from "../SvgComponents/types";
|
|
3
3
|
export type NavbarProps = {
|
|
4
4
|
tabs: Array<{
|
|
@@ -8,5 +8,5 @@ export type NavbarProps = {
|
|
|
8
8
|
separate?: boolean;
|
|
9
9
|
}>;
|
|
10
10
|
};
|
|
11
|
-
declare const Navbar: ({ tabs }: NavbarProps) =>
|
|
11
|
+
declare const Navbar: ({ tabs }: NavbarProps) => JSX.Element;
|
|
12
12
|
export default Navbar;
|
|
@@ -12,5 +12,5 @@ export type NavbarLayoutProps = {
|
|
|
12
12
|
leaveHeightForMenu?: boolean;
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
};
|
|
15
|
-
declare const NavbarLayout: ({ tabs, hideTabs, leaveHeightForMenu, children, }: NavbarLayoutProps) =>
|
|
15
|
+
declare const NavbarLayout: ({ tabs, hideTabs, leaveHeightForMenu, children, }: NavbarLayoutProps) => JSX.Element;
|
|
16
16
|
export default NavbarLayout;
|
|
@@ -12,4 +12,4 @@ interface INumberFormatProps extends Omit<NumberFormatProps, "onChange"> {
|
|
|
12
12
|
}) => void;
|
|
13
13
|
fixedDecimalScale: boolean;
|
|
14
14
|
}
|
|
15
|
-
export declare const NumberFormatField: (props: INumberFormatProps) =>
|
|
15
|
+
export declare const NumberFormatField: (props: INumberFormatProps) => JSX.Element;
|
package/build/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ import KeyboardDatePicker from "./KeyboardDatePicker/KeyboardDatePicker";
|
|
|
18
18
|
import ButtonWithConfirm from "./ButtonWithConfirm/ButtonWithConfirm";
|
|
19
19
|
import EditableTable from "./EditableTable/EditableTable";
|
|
20
20
|
import { FieldConfig, RowData, ITableHeader, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps } from "./EditableTable/EditableTable.types";
|
|
21
|
-
import {
|
|
21
|
+
import { tableNumericStringField, tableNumericStringFixedDecimalField, tableDateField, tableCheckbox, TableSelect, TableMultipleSelect, NonEditableField } from "./EditableTable/defaultCells";
|
|
22
22
|
import { useDebounceEffect, useInterval, useWhyDidYouUpdate } from "./hooks";
|
|
23
23
|
import { didCellValueChange } from "./utils";
|
|
24
24
|
import ImageDisplayAndUpload from "./ImageDisplayAndUpload/ImageDisplayAndUpload";
|
|
@@ -31,5 +31,7 @@ import MobileDatePicker from "./MobileDatePicker/MobileDatePicker";
|
|
|
31
31
|
import { AutoSaveTextField } from "./AutoSave/Text";
|
|
32
32
|
import { AutoSaveSelectField } from "./AutoSave/Select";
|
|
33
33
|
import { OptionalTooltip } from "./Tooltip";
|
|
34
|
-
|
|
34
|
+
import { TableDateInput } from "./EditableTable/components/TableDateInput";
|
|
35
|
+
import { TableTextInput } from "./EditableTable/components/TableTextInput";
|
|
36
|
+
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, };
|
|
35
37
|
export type { FieldConfig, RowData, ITableHeader, TableCellValues, SynchCellWithStateFn, ICustomRenderFnProps, IEssentialRenderFnProps, ISelectProps, IEntity, INavigationLink, ISecondaryNavigationItem, ISecondaryNavigationSubItem, NavbarLayoutTabs, FormStatuses, };
|