@paygreen/pgui 3.0.3 → 3.0.4

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.
@@ -12,6 +12,7 @@ export * from './loader/loader';
12
12
  export * from './logos/logoPaygreenByLemonway';
13
13
  export * from './modal/modal';
14
14
  export * from './pagination/pagination';
15
+ export * from './scroll-shadow/scroll-shadow';
15
16
  export * from './select/select';
16
17
  export * from './sidebar/sidebar';
17
18
  export * from './tooltip/tooltip';
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ interface ScrollShadowProps {
3
+ children: ReactNode;
4
+ [key: string]: any;
5
+ }
6
+ declare const ScrollShadow: ({ children, ...props }: ScrollShadowProps) => import("react/jsx-runtime").JSX.Element;
7
+ export { ScrollShadow };
@@ -28,6 +28,8 @@ export interface SingleSelectProps extends Omit<ReactSelectProps<SelectOptionTyp
28
28
  isCreatable?: boolean;
29
29
  /** Function to load options asynchronously */
30
30
  loadOptions?: (inputValue: string) => Promise<SelectOptionType[]>;
31
+ /** Debounce delay in milliseconds for async loading */
32
+ debounceDelay?: number;
31
33
  /** Name attribute for form integration */
32
34
  name?: string;
33
35
  /** Whether the select is in invalid state */
@@ -52,6 +54,8 @@ export interface MultiSelectProps extends Omit<ReactSelectProps<SelectOptionType
52
54
  isCreatable?: boolean;
53
55
  /** Function to load options asynchronously */
54
56
  loadOptions?: (inputValue: string) => Promise<SelectOptionType[]>;
57
+ /** Debounce delay in milliseconds for async loading (default: 300ms) */
58
+ debounceDelay?: number;
55
59
  /** Name attribute for form integration */
56
60
  name?: string;
57
61
  /** Whether the select is in invalid state */
@@ -0,0 +1,2 @@
1
+ export { useDataTable } from './use-data-table';
2
+ export { useDebouncedLoadOptions } from './use-debounced-load-options';
@@ -0,0 +1,9 @@
1
+ import { SelectOptionType } from '../components/select/select';
2
+ /**
3
+ * Create a debounced load options function for async Select components
4
+ *
5
+ * @param loadOptions - The async function to load options
6
+ * @param debounceDelay - The delay in milliseconds before calling loadOptions
7
+ * @returns A debounced function that can be used with react-select async components
8
+ */
9
+ export declare const useDebouncedLoadOptions: (loadOptions: ((inputValue: string) => Promise<SelectOptionType[]>) | undefined, debounceDelay: number) => (inputValue: string, callback: (options: SelectOptionType[]) => void) => void;