@up42/up-components 1.13.1 → 1.14.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/index.d.ts +1 -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/index.d.ts +1 -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 +10 -1
- package/package.json +2 -2
|
@@ -58,4 +58,5 @@ export { formatDate } from './utils/helpers/formatDate';
|
|
|
58
58
|
export { formatFileSize } from './utils/helpers/formatFileSize';
|
|
59
59
|
export { useQueryParams } from './utils/hooks/useQueryParams';
|
|
60
60
|
export { useRemotePagination, type PaginatedResponse } from './utils/hooks/useRemotePagination';
|
|
61
|
+
export { useDebounce } from './utils/hooks/useDebounce';
|
|
61
62
|
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 {};
|
package/dist/index.d.ts
CHANGED
|
@@ -2697,6 +2697,15 @@ declare const useRemotePagination: (fetchingHook: ({ params }: {
|
|
|
2697
2697
|
[paramName: string]: string;
|
|
2698
2698
|
} | undefined) => UseRemotePaginationResponse;
|
|
2699
2699
|
|
|
2700
|
+
/**
|
|
2701
|
+
* useDebounce is a generic React Hook that returns a debounced version of a given value.
|
|
2702
|
+
* @param {T} value - The value to debounce.
|
|
2703
|
+
* @param {number} [delay=500] - The debouncing delay in milliseconds.
|
|
2704
|
+
* @returns {T} The debounced value.
|
|
2705
|
+
* Documentation: https://up-components.up42.com/?path=/docs/utils--docs#usedebounce
|
|
2706
|
+
*/
|
|
2707
|
+
declare const useDebounce: <T>(value: T, delay?: number) => T;
|
|
2708
|
+
|
|
2700
2709
|
declare type CreateAlertProps = {
|
|
2701
2710
|
title?: string;
|
|
2702
2711
|
message: string | ElementType;
|
|
@@ -2721,4 +2730,4 @@ declare type ContextState = {
|
|
|
2721
2730
|
*/
|
|
2722
2731
|
declare const useAlert: () => ContextState;
|
|
2723
2732
|
|
|
2724
|
-
export { Alert, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Button, type ButtonProps, Checkbox, type CheckboxProps, CodeInline, type CodeInlineProps, CodeSnippet, type CodeSnippetItemProps, type CodeSnippetProps, ContactBox, type ContactBoxProps, ControlButton, type ControlButtonProps, CopyButton, type CopyButtonProps, type CreateAlertProps, DataGrid, type DataGridProps, type DatePickerDateType, DateTime, type DateTimeProps, Divider, type DividerProps, DocumentationPopover, type DocumentationPopoverProps, EmptyState, type EmptyStateProps, FormCheckbox, type FormCheckboxProps, FormDatePicker, type FormDatePickerProps, FormDateRangePicker, type FormDateRangePickerProps, FormInput, type FormInputProps, FormRadio, type FormRadioProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, GridContainer, type GridContainerProps, GridItem, type GridItemProps, Icon, type IconProps, InfoCard, type InfoCardProps, InfoModal, type InfoModalProps, InfoPopover, type InfoPopoverProps, Input, type InputProps, Link, type LinkProps, Loading, type LoadingProps, Menu, MenuItem, type MenuItemProps, type MenuProps, Modal, type ModalProps, NotFound, type NotFoundProps, PageContainer, type PageContainerProps, PageHeader, type PageHeaderProps, type PaginatedResponse, Popover, type PopoverProps, Radio, type RadioProps, Select, type SelectProps, Slider, type SliderProps, Switch, type SwitchProps, Tab, TabGroup, type TabGroupProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, TableSortLabel, type TableSortLabelProps, Tabs, type TabsProps, Tag, type TagProps, Tooltip, type TooltipProps, Typography, type TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useQueryParams, useRemotePagination };
|
|
2733
|
+
export { Alert, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Button, type ButtonProps, Checkbox, type CheckboxProps, CodeInline, type CodeInlineProps, CodeSnippet, type CodeSnippetItemProps, type CodeSnippetProps, ContactBox, type ContactBoxProps, ControlButton, type ControlButtonProps, CopyButton, type CopyButtonProps, type CreateAlertProps, DataGrid, type DataGridProps, type DatePickerDateType, DateTime, type DateTimeProps, Divider, type DividerProps, DocumentationPopover, type DocumentationPopoverProps, EmptyState, type EmptyStateProps, FormCheckbox, type FormCheckboxProps, FormDatePicker, type FormDatePickerProps, FormDateRangePicker, type FormDateRangePickerProps, FormInput, type FormInputProps, FormRadio, type FormRadioProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, GridContainer, type GridContainerProps, GridItem, type GridItemProps, Icon, type IconProps, InfoCard, type InfoCardProps, InfoModal, type InfoModalProps, InfoPopover, type InfoPopoverProps, Input, type InputProps, Link, type LinkProps, Loading, type LoadingProps, Menu, MenuItem, type MenuItemProps, type MenuProps, Modal, type ModalProps, NotFound, type NotFoundProps, PageContainer, type PageContainerProps, PageHeader, type PageHeaderProps, type PaginatedResponse, Popover, type PopoverProps, Radio, type RadioProps, Select, type SelectProps, Slider, type SliderProps, Switch, type SwitchProps, Tab, TabGroup, type TabGroupProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, TableSortLabel, type TableSortLabelProps, Tabs, type TabsProps, Tag, type TagProps, Tooltip, type TooltipProps, Typography, type TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useDebounce, useQueryParams, useRemotePagination };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@up42/up-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "UP42 Component Library",
|
|
5
5
|
"author": "Axel Fuhrmann axel.fuhrmann@up42.com",
|
|
6
6
|
"license": "ISC",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"format": "prettier --write ./**/*.mdx"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@up42/design-system-tokens": "^5.
|
|
31
|
+
"@up42/design-system-tokens": "^5.2.0",
|
|
32
32
|
"dayjs": "^1.11.7",
|
|
33
33
|
"prismjs": "^1.29.0"
|
|
34
34
|
},
|