@up42/up-components 2.0.0-beta.1 → 2.1.0
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/cjs/index.js +2 -2
- package/dist/cjs/types/components/Illustration/Illustration.d.ts +12 -0
- package/dist/cjs/types/global/illustrations/index.d.ts +3 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/cjs/types/utils/hooks/useDebounce.d.ts +8 -0
- package/dist/cjs/types/utils/hooks/useDebounce.test.d.ts +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/components/Illustration/Illustration.d.ts +12 -0
- package/dist/esm/types/global/illustrations/index.d.ts +3 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/esm/types/utils/hooks/useDebounce.d.ts +8 -0
- package/dist/esm/types/utils/hooks/useDebounce.test.d.ts +1 -0
- package/dist/index.d.ts +565 -309
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
import * as illustrations from '@global/illustrations';
|
|
4
|
+
export declare type IllustrationProps = {
|
|
5
|
+
name: keyof typeof illustrations;
|
|
6
|
+
size?: SvgIconProps['width'];
|
|
7
|
+
} & Omit<SvgIconProps, 'children' | 'inheritViewBox' | 'shapeRendering' | 'viewBox' | 'fontSize'>;
|
|
8
|
+
/**
|
|
9
|
+
* Documentation: https://up-components.up42.com/?path=/docs/data-display-illustrations--docs
|
|
10
|
+
* Illustrations: https://up-components.up42.com/?path=/docs/illustrations--docs
|
|
11
|
+
*/
|
|
12
|
+
export declare function Illustration({ name, size, sx, ...props }: IllustrationProps): JSX.Element;
|
|
@@ -42,6 +42,7 @@ export { PageHeader, type PageHeaderProps } from './components/PageHeader/PageHe
|
|
|
42
42
|
export { NotFound, type NotFoundProps } from './components/NotFound/NotFound';
|
|
43
43
|
export { Loading, type LoadingProps } from './components/Loading/Loading';
|
|
44
44
|
export { Icon, type IconProps } from './components/Icon/Icon';
|
|
45
|
+
export { Illustration, type IllustrationProps } from './components/Illustration/Illustration';
|
|
45
46
|
export { Badge, type BadgeProps } from './components/Badge/Badge';
|
|
46
47
|
export { Tag, type TagProps } from './components/Tag/Tag';
|
|
47
48
|
export { DateTime, type DateTimeProps } from './components/DateTime/DateTime';
|
|
@@ -58,4 +59,5 @@ export { formatDate } from './utils/helpers/formatDate';
|
|
|
58
59
|
export { formatFileSize } from './utils/helpers/formatFileSize';
|
|
59
60
|
export { useQueryParams } from './utils/hooks/useQueryParams';
|
|
60
61
|
export { useRemotePagination, type PaginatedResponse } from './utils/hooks/useRemotePagination';
|
|
62
|
+
export { useDebounce } from './utils/hooks/useDebounce';
|
|
61
63
|
export { useAlert, type CreateAlertProps } from './global/providers/AlertProvider/AlertProvider';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useDebounce is a generic React Hook that returns a debounced version of a given value.
|
|
3
|
+
* @param {T} value - The value to debounce.
|
|
4
|
+
* @param {number} [delay=500] - The debouncing delay in milliseconds.
|
|
5
|
+
* @returns {T} The debounced value.
|
|
6
|
+
* Documentation: https://up-components.up42.com/?path=/docs/utils--docs#usedebounce
|
|
7
|
+
*/
|
|
8
|
+
export declare const useDebounce: <T>(value: T, delay?: number) => T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|