@up42/up-components 2.13.0 → 3.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.
- package/README.md +6 -6
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/types/components/Alert/Alert.d.ts +5 -5
- package/dist/cjs/types/components/Avatar/Avatar.d.ts +3 -3
- package/dist/cjs/types/components/Badge/Badge.d.ts +3 -3
- package/dist/cjs/types/components/Banner/Banner.d.ts +3 -3
- package/dist/cjs/types/components/Button/Button.d.ts +3 -3
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/cjs/types/components/CodeInline/CodeInline.d.ts +2 -2
- package/dist/cjs/types/components/CodeSnippet/CodeSnippet.d.ts +3 -3
- package/dist/cjs/types/components/ContactBox/ContactBox.d.ts +2 -2
- package/dist/cjs/types/components/ControlButton/ControlButton.d.ts +3 -3
- package/dist/cjs/types/components/CopyButton/CopyButton.d.ts +2 -2
- package/dist/cjs/types/components/DataGrid/DataGrid.d.ts +5 -5
- package/dist/cjs/types/components/DateTime/DateTime.d.ts +1 -1
- package/dist/cjs/types/components/Divider/Divider.d.ts +3 -3
- package/dist/cjs/types/components/DocumentationPopover/DocumentationPopover.d.ts +2 -2
- package/dist/cjs/types/components/EmptyState/EmptyState.d.ts +3 -3
- package/dist/cjs/types/components/FormCheckbox/FormCheckbox.d.ts +4 -9
- package/dist/cjs/types/components/FormDatePicker/FormDatePicker.d.ts +4 -4
- package/dist/cjs/types/components/FormDateRangePicker/FormDateRangePicker.d.ts +5 -5
- package/dist/cjs/types/components/FormInput/FormInput.d.ts +3 -8
- package/dist/cjs/types/components/FormLabel/FormLabel.d.ts +3 -3
- package/dist/cjs/types/components/FormRadio/FormRadio.d.ts +4 -9
- package/dist/cjs/types/components/FormSelect/FormSelect.d.ts +5 -10
- package/dist/cjs/types/components/FormSwitch/FormSwitch.d.ts +5 -10
- package/dist/cjs/types/components/Grid/Grid.d.ts +5 -5
- package/dist/cjs/types/components/Icon/Icon.d.ts +3 -3
- package/dist/cjs/types/components/Illustration/Illustration.d.ts +3 -3
- package/dist/cjs/types/components/InfoCard/InfoCard.d.ts +4 -4
- package/dist/cjs/types/components/InfoModal/InfoModal.d.ts +3 -3
- package/dist/cjs/types/components/InfoPopover/InfoPopover.d.ts +2 -2
- package/dist/cjs/types/components/Input/Input.d.ts +3 -3
- package/dist/cjs/types/components/Link/Link.d.ts +2 -2
- package/dist/cjs/types/components/Loading/Loading.d.ts +3 -3
- package/dist/cjs/types/components/NotFound/NotFound.d.ts +3 -3
- package/dist/cjs/types/components/PageContainer/PageContainer.d.ts +3 -3
- package/dist/cjs/types/components/PageHeader/PageHeader.d.ts +2 -2
- package/dist/cjs/types/components/Radio/Radio.d.ts +3 -3
- package/dist/cjs/types/components/Select/Select.d.ts +3 -3
- package/dist/cjs/types/components/Slider/Slider.d.ts +3 -3
- package/dist/cjs/types/components/Switch/Switch.d.ts +3 -3
- package/dist/cjs/types/components/TabGroup/TabGroup.d.ts +4 -4
- package/dist/cjs/types/components/Table/Table.d.ts +19 -19
- package/dist/cjs/types/components/Tabs/Tabs.d.ts +5 -5
- package/dist/cjs/types/components/Tag/Tag.d.ts +3 -3
- package/dist/cjs/types/components/Typography/Typography.d.ts +6 -14
- package/dist/cjs/types/global/illustrations/index.d.ts +1 -0
- package/dist/cjs/types/global/providers/AlertProvider/AlertProvider.d.ts +8 -8
- package/dist/cjs/types/global/providers/AlertProvider/AlertStack.d.ts +2 -2
- package/dist/cjs/types/global/providers/AlertProvider/SnackbarWrapper.d.ts +2 -2
- package/dist/cjs/types/global/providers/UpComponentsProvider/UpComponentsProvider.d.ts +6 -2
- package/dist/cjs/types/global/utils/types.d.ts +2 -2
- package/dist/cjs/types/utils/helpers/formatDate.d.ts +3 -3
- package/dist/cjs/types/utils/helpers/formatNumber.d.ts +1 -1
- package/dist/cjs/types/utils/hooks/useRemotePagination.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/components/Alert/Alert.d.ts +5 -5
- package/dist/esm/types/components/Avatar/Avatar.d.ts +3 -3
- package/dist/esm/types/components/Badge/Badge.d.ts +3 -3
- package/dist/esm/types/components/Banner/Banner.d.ts +3 -3
- package/dist/esm/types/components/Button/Button.d.ts +3 -3
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/esm/types/components/CodeInline/CodeInline.d.ts +2 -2
- package/dist/esm/types/components/CodeSnippet/CodeSnippet.d.ts +3 -3
- package/dist/esm/types/components/ContactBox/ContactBox.d.ts +2 -2
- package/dist/esm/types/components/ControlButton/ControlButton.d.ts +3 -3
- package/dist/esm/types/components/CopyButton/CopyButton.d.ts +2 -2
- package/dist/esm/types/components/DataGrid/DataGrid.d.ts +5 -5
- package/dist/esm/types/components/DateTime/DateTime.d.ts +1 -1
- package/dist/esm/types/components/Divider/Divider.d.ts +3 -3
- package/dist/esm/types/components/DocumentationPopover/DocumentationPopover.d.ts +2 -2
- package/dist/esm/types/components/EmptyState/EmptyState.d.ts +3 -3
- package/dist/esm/types/components/FormCheckbox/FormCheckbox.d.ts +4 -9
- package/dist/esm/types/components/FormDatePicker/FormDatePicker.d.ts +4 -4
- package/dist/esm/types/components/FormDateRangePicker/FormDateRangePicker.d.ts +5 -5
- package/dist/esm/types/components/FormInput/FormInput.d.ts +3 -8
- package/dist/esm/types/components/FormLabel/FormLabel.d.ts +3 -3
- package/dist/esm/types/components/FormRadio/FormRadio.d.ts +4 -9
- package/dist/esm/types/components/FormSelect/FormSelect.d.ts +5 -10
- package/dist/esm/types/components/FormSwitch/FormSwitch.d.ts +5 -10
- package/dist/esm/types/components/Grid/Grid.d.ts +5 -5
- package/dist/esm/types/components/Icon/Icon.d.ts +3 -3
- package/dist/esm/types/components/Illustration/Illustration.d.ts +3 -3
- package/dist/esm/types/components/InfoCard/InfoCard.d.ts +4 -4
- package/dist/esm/types/components/InfoModal/InfoModal.d.ts +3 -3
- package/dist/esm/types/components/InfoPopover/InfoPopover.d.ts +2 -2
- package/dist/esm/types/components/Input/Input.d.ts +3 -3
- package/dist/esm/types/components/Link/Link.d.ts +2 -2
- package/dist/esm/types/components/Loading/Loading.d.ts +3 -3
- package/dist/esm/types/components/NotFound/NotFound.d.ts +3 -3
- package/dist/esm/types/components/PageContainer/PageContainer.d.ts +3 -3
- package/dist/esm/types/components/PageHeader/PageHeader.d.ts +2 -2
- package/dist/esm/types/components/Radio/Radio.d.ts +3 -3
- package/dist/esm/types/components/Select/Select.d.ts +3 -3
- package/dist/esm/types/components/Slider/Slider.d.ts +3 -3
- package/dist/esm/types/components/Switch/Switch.d.ts +3 -3
- package/dist/esm/types/components/TabGroup/TabGroup.d.ts +4 -4
- package/dist/esm/types/components/Table/Table.d.ts +19 -19
- package/dist/esm/types/components/Tabs/Tabs.d.ts +5 -5
- package/dist/esm/types/components/Tag/Tag.d.ts +3 -3
- package/dist/esm/types/components/Typography/Typography.d.ts +6 -14
- package/dist/esm/types/global/illustrations/index.d.ts +1 -0
- package/dist/esm/types/global/providers/AlertProvider/AlertProvider.d.ts +8 -8
- package/dist/esm/types/global/providers/AlertProvider/AlertStack.d.ts +2 -2
- package/dist/esm/types/global/providers/AlertProvider/SnackbarWrapper.d.ts +2 -2
- package/dist/esm/types/global/providers/UpComponentsProvider/UpComponentsProvider.d.ts +6 -2
- package/dist/esm/types/global/utils/types.d.ts +2 -2
- package/dist/esm/types/utils/helpers/formatDate.d.ts +3 -3
- package/dist/esm/types/utils/helpers/formatNumber.d.ts +1 -1
- package/dist/esm/types/utils/hooks/useRemotePagination.d.ts +2 -2
- package/dist/index.d.ts +887 -853
- package/package.json +14 -5
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TypographyProps as MUITypographyProps } from '@mui/material/Typography';
|
|
3
|
-
export
|
|
3
|
+
export type TypographyProps = MUITypographyProps & {
|
|
4
4
|
component?: React.ElementType;
|
|
5
5
|
variant?: MUITypographyProps['variant'] | 'heading' | 'headingSmall' | 'headingXSmall' | 'body' | 'label' | 'note';
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* Documentation: https://up-components.up42.com/?path=/docs/data-display-typography--docs
|
|
9
9
|
*/
|
|
10
|
-
export declare const Typography: React.ForwardRefExoticComponent<
|
|
11
|
-
align?: "inherit" | "left" | "center" | "right" | "justify" | undefined;
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
classes?: Partial<import("@mui/material/Typography").TypographyClasses> | undefined;
|
|
14
|
-
gutterBottom?: boolean | undefined;
|
|
15
|
-
noWrap?: boolean | undefined;
|
|
16
|
-
paragraph?: boolean | undefined;
|
|
17
|
-
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
18
|
-
variant?: "body" | "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "heading" | "note" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | "headingSmall" | "headingXSmall" | undefined;
|
|
19
|
-
variantMapping?: Partial<Record<"body" | "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "heading" | "note" | "inherit" | "overline" | "subtitle1" | "subtitle2" | "body1" | "body2" | "headingSmall" | "headingXSmall", string>> | undefined;
|
|
20
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
10
|
+
export declare const Typography: React.ForwardRefExoticComponent<Omit<import("@mui/material/Typography").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
21
11
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
22
|
-
},
|
|
12
|
+
}, "className" | "style" | "classes" | "children" | "color" | "fontSize" | "sx" | "p" | "height" | "width" | "display" | "fontFamily" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "align" | "border" | "boxShadow" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
|
|
13
|
+
component?: React.ElementType<any> | undefined;
|
|
14
|
+
} & {
|
|
23
15
|
component?: React.ElementType<any> | undefined;
|
|
24
16
|
variant?: MUITypographyProps['variant'] | 'heading' | 'headingSmall' | 'headingXSmall' | 'body' | 'label' | 'note';
|
|
25
|
-
},
|
|
17
|
+
}, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -2,3 +2,4 @@ export { default as FloppyDisk } from './floppy-disk.svg';
|
|
|
2
2
|
export { default as Satellite } from './satellite.svg';
|
|
3
3
|
export { default as RocketFixing } from './rocket-fixing.svg';
|
|
4
4
|
export { default as EmailCheck } from './email-check.svg';
|
|
5
|
+
export { default as ApproveDoc } from './approve-doc.svg';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElementType, ReactNode } from 'react';
|
|
1
|
+
import React, { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { Fade, GrowProps, SnackbarProps as MUISnackbarProps, SlideProps } from '@mui/material';
|
|
3
3
|
import { AlertColor } from '../../../components/Alert/Alert';
|
|
4
|
-
export
|
|
4
|
+
export type CreateAlertProps = {
|
|
5
5
|
title?: string;
|
|
6
6
|
message: string | ElementType;
|
|
7
7
|
type?: AlertColor;
|
|
@@ -13,7 +13,7 @@ export declare type CreateAlertProps = {
|
|
|
13
13
|
/**
|
|
14
14
|
* Props for creating a snackbar.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type CreateSnackbarProps = {
|
|
17
17
|
/**
|
|
18
18
|
* The message to be displayed in the snackbar.
|
|
19
19
|
*/
|
|
@@ -36,15 +36,15 @@ export declare type CreateSnackbarProps = {
|
|
|
36
36
|
transition?: 'slide' | 'grow' | 'fade';
|
|
37
37
|
} & MUISnackbarProps;
|
|
38
38
|
export declare const transitionComponents: {
|
|
39
|
-
slide: (props: SlideProps) => JSX.Element;
|
|
40
|
-
grow: (props: GrowProps) => JSX.Element;
|
|
39
|
+
slide: (props: SlideProps) => React.JSX.Element;
|
|
40
|
+
grow: (props: GrowProps) => React.JSX.Element;
|
|
41
41
|
fade: typeof Fade;
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export type DisplayAlertProps = CreateAlertProps & {
|
|
44
44
|
id: string;
|
|
45
45
|
onClose?: (id: string) => void;
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
type ContextState = {
|
|
48
48
|
createAlert: (props: CreateAlertProps) => void;
|
|
49
49
|
alertStack: DisplayAlertProps[];
|
|
50
50
|
removeFromStack: (id: string) => void;
|
|
@@ -56,7 +56,7 @@ declare type ContextState = {
|
|
|
56
56
|
export declare const defaultSnackbarState: CreateSnackbarProps;
|
|
57
57
|
export declare const AlertProvider: ({ children }: {
|
|
58
58
|
children: ReactNode;
|
|
59
|
-
}) => JSX.Element;
|
|
59
|
+
}) => React.JSX.Element;
|
|
60
60
|
/**
|
|
61
61
|
* Documentation: https://up-components.up42.com/?path=/docs/feedback-alert-usealert--docs
|
|
62
62
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const AlertStack: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const AlertStack: () => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const SnackbarWrapper: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const SnackbarWrapper: () => React.JSX.Element;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface UpComponentsProviderProps extends Omit<ThemeProviderProps, 'theme'> {
|
|
4
|
+
licenseKey: string;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Documentation: https://up-components.up42.com/?path=/docs/introduction--docs
|
|
5
8
|
*/
|
|
6
|
-
export declare const UpComponentsProvider: (props:
|
|
9
|
+
export declare const UpComponentsProvider: ({ licenseKey, ...props }: UpComponentsProviderProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BoxProps, TextFieldProps } from '@mui/material';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type MUIGlobalOmit<MuiProps, ComponentProps = unknown> = ComponentProps & Omit<MuiProps, 'classes' | 'disableElevation' | 'disableFocusRipple' | 'disableRipple' | 'focusRipple' | 'tabIndex' | 'action' | 'centerRipple' | 'disableTouchRipple' | 'focusVisibleClassName' | 'LinkComponent' | 'TouchRippleProps' | 'touchRippleRef'>;
|
|
3
|
+
export type FormBaseProps = BoxProps & Pick<TextFieldProps, 'id' | 'label' | 'required' | 'error' | 'disabled' | 'focused' | 'helperText'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
-
export
|
|
2
|
+
export type FormatDateOptions = {
|
|
3
3
|
/**
|
|
4
4
|
* For more formats see here: https://day.js.org/docs/en/display/format#docsNav
|
|
5
5
|
*/
|
|
@@ -7,10 +7,10 @@ export declare type FormatDateOptions = {
|
|
|
7
7
|
fromNow?: boolean;
|
|
8
8
|
utc?: boolean;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type DateType = dayjs.ConfigType;
|
|
11
11
|
/**
|
|
12
12
|
* Returns formatted date string. The format will depend on the option passed in the second argument.
|
|
13
13
|
*
|
|
14
14
|
* Documentation: https://up-components.up42.com/?path=/docs/utils--docs#formatnumber
|
|
15
15
|
*/
|
|
16
|
-
export declare const formatDate: (date: DateType, options?: FormatDateOptions
|
|
16
|
+
export declare const formatDate: (date: DateType, options?: FormatDateOptions) => string;
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Documentation: https://up-components.up42.com/?path=/docs/utils--docs#formatnumber
|
|
5
5
|
*/
|
|
6
|
-
export declare const formatNumber: (number: string | number, options?: Intl.NumberFormatOptions
|
|
6
|
+
export declare const formatNumber: (number: string | number, options?: Intl.NumberFormatOptions) => string;
|
|
@@ -2,8 +2,8 @@ export interface PaginatedResponse<T> {
|
|
|
2
2
|
totalElements: number;
|
|
3
3
|
content: T[];
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type OrderDirection = 'asc' | 'desc' | null;
|
|
6
|
+
type UseRemotePaginationResponse = {
|
|
7
7
|
pageSize: number;
|
|
8
8
|
page: number;
|
|
9
9
|
count: number;
|