@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.
@@ -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;
@@ -0,0 +1,3 @@
1
+ export { default as FloppyDisk } from './floppy-disk.svg';
2
+ export { default as Satellite } from './satellite.svg';
3
+ export { default as RocketFixing } from './rocket-fixing.svg';
@@ -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 {};