@attraccess/plugins-frontend-ui 1.8.0 → 1.9.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/index.js +1113 -849
- package/lib/components/ResourceSelector/ResourceSelector.d.ts +2 -2
- package/lib/components/attraccess-user/AttraccessUser.d.ts +4 -2
- package/lib/components/attraccess-user/AttraccessUserActionsContext.d.ts +2 -2
- package/lib/components/datetime-display/DateTimeDisplay.d.ts +1 -1
- package/lib/components/duration-display/DurationDisplay.d.ts +1 -1
- package/lib/components/user-search/UserSearch.d.ts +6 -5
- package/lib/components/user-search/UserSearch.utils.d.ts +6 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/useDebounce.d.ts +9 -0
- package/package.json +1 -1
|
@@ -5,6 +5,6 @@ interface Props {
|
|
|
5
5
|
multiple?: boolean;
|
|
6
6
|
listClassName?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const ListboxWrapper: ({ children }: PropsWithChildren) => import("react
|
|
9
|
-
export declare function ResourceSelector(props: Readonly<Props>): import("react
|
|
8
|
+
export declare const ListboxWrapper: ({ children }: PropsWithChildren) => import("react").JSX.Element;
|
|
9
|
+
export declare function ResourceSelector(props: Readonly<Props>): import("react").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User } from '
|
|
1
|
+
import { User } from '../../../../libs/react-query-client/src/index.ts';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
interface AttraccessUserProps {
|
|
4
4
|
user?: User;
|
|
@@ -6,6 +6,8 @@ interface AttraccessUserProps {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
onStartDirectMessage?: (user: User) => void;
|
|
8
8
|
variant?: 'full' | 'mini';
|
|
9
|
+
/** When false, render as plain display without the direct-message popover. Defaults to true. */
|
|
10
|
+
interactive?: boolean;
|
|
9
11
|
}
|
|
10
|
-
export declare function AttraccessUser({ user, description, className, onStartDirectMessage, variant, }: Readonly<AttraccessUserProps>): import("react
|
|
12
|
+
export declare function AttraccessUser({ user, description, className, onStartDirectMessage, variant, interactive, }: Readonly<AttraccessUserProps>): import("react").JSX.Element;
|
|
11
13
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User } from '
|
|
1
|
+
import { User } from '../../../../libs/react-query-client/src/index.ts';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
interface AttraccessUserActions {
|
|
4
4
|
onStartDirectMessage?: (user: User) => void;
|
|
@@ -6,6 +6,6 @@ interface AttraccessUserActions {
|
|
|
6
6
|
interface AttraccessUserActionsProviderProps extends AttraccessUserActions {
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export declare function AttraccessUserActionsProvider({ children, onStartDirectMessage, }: Readonly<AttraccessUserActionsProviderProps>): import("react
|
|
9
|
+
export declare function AttraccessUserActionsProvider({ children, onStartDirectMessage, }: Readonly<AttraccessUserActionsProviderProps>): import("react").JSX.Element;
|
|
10
10
|
export declare function useAttraccessUserActions(): AttraccessUserActions;
|
|
11
11
|
export {};
|
|
@@ -3,5 +3,5 @@ interface DateTimeDisplayProps {
|
|
|
3
3
|
date?: Date | string | number | null;
|
|
4
4
|
options?: DateTimeOptions;
|
|
5
5
|
}
|
|
6
|
-
export declare function DateTimeDisplay(props: DateTimeDisplayProps & React.HTMLAttributes<HTMLSpanElement>): import("react
|
|
6
|
+
export declare function DateTimeDisplay(props: DateTimeDisplayProps & React.HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -7,5 +7,5 @@ interface DurationDisplayProps {
|
|
|
7
7
|
* Component to display a duration in a localized format
|
|
8
8
|
* using the Intl.DurationFormat API
|
|
9
9
|
*/
|
|
10
|
-
export declare function DurationDisplay({ minutes, alternativeText, ...spanProps }: DurationDisplayProps & React.HTMLAttributes<HTMLSpanElement>):
|
|
10
|
+
export declare function DurationDisplay({ minutes, alternativeText, ...spanProps }: DurationDisplayProps & React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { User } from '
|
|
2
|
+
import { User } from '../../../../libs/react-query-client/src/index.ts';
|
|
3
3
|
interface UserSearchProps {
|
|
4
4
|
label?: string;
|
|
5
5
|
placeholder?: string;
|
|
6
|
+
size?: 'sm' | 'md' | 'lg';
|
|
7
|
+
/** Clears the current selection and search whenever this value changes identity
|
|
8
|
+
* (e.g. pass a drawer's isOpen so the picker resets on every open/close). */
|
|
9
|
+
resetSignal?: unknown;
|
|
6
10
|
onSelectionChange?: (user: User | null) => void;
|
|
7
|
-
autocompleteProps?: {
|
|
8
|
-
size?: 'sm' | 'md' | 'lg';
|
|
9
|
-
};
|
|
10
11
|
wrapperProps?: Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
|
|
11
12
|
afterAutocomplete?: React.ReactNode;
|
|
12
13
|
afterSelection?: React.ReactNode;
|
|
13
14
|
}
|
|
14
|
-
export declare function UserSearch(props: Readonly<UserSearchProps>): import("react
|
|
15
|
+
export declare function UserSearch(props: Readonly<UserSearchProps>): import("react").JSX.Element;
|
|
15
16
|
export {};
|
package/lib/hooks/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A hook that debounces a value by delaying updates.
|
|
3
|
+
* Useful for limiting how often a function is called (e.g., API requests on input change).
|
|
4
|
+
*
|
|
5
|
+
* @param value The value to debounce
|
|
6
|
+
* @param delay The delay in milliseconds
|
|
7
|
+
* @returns The debounced value
|
|
8
|
+
*/
|
|
9
|
+
export declare function useDebounce<T>(value: T, delay: number): T;
|