@attraccess/plugins-frontend-ui 1.1.0 → 1.6.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.
@@ -2,7 +2,9 @@ import { PropsWithChildren } from 'react';
2
2
  interface Props {
3
3
  selection: number[];
4
4
  onSelectionChange: (selection: number[]) => void;
5
+ multiple?: boolean;
6
+ listClassName?: string;
5
7
  }
6
8
  export declare const ListboxWrapper: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
7
- export declare function ResourceSelector(props: Props): import("react/jsx-runtime").JSX.Element;
9
+ export declare function ResourceSelector(props: Readonly<Props>): import("react/jsx-runtime").JSX.Element;
8
10
  export {};
@@ -1,8 +1,9 @@
1
1
  import { User } from '../../../../../react-query-client/src/index.ts';
2
- import { UserProps } from '@heroui/react';
2
+ import { ReactNode } from 'react';
3
3
  interface AttraccessUserProps {
4
4
  user?: User;
5
- description?: UserProps['description'];
5
+ description?: ReactNode;
6
+ className?: string;
6
7
  }
7
- export declare function AttraccessUser(props: AttraccessUserProps & Omit<UserProps, 'avatarProps' | 'description' | 'name'>): import("react/jsx-runtime").JSX.Element;
8
+ export declare function AttraccessUser({ user, description, className }: Readonly<AttraccessUserProps>): import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -1,12 +1,11 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { AutocompleteProps } from '@heroui/react';
3
2
  import { User } from '../../../../../react-query-client/src/index.ts';
4
3
  interface UserSearchProps {
5
4
  label?: string;
6
5
  placeholder?: string;
7
6
  onSelectionChange?: (user: User | null) => void;
8
7
  autocompleteProps?: {
9
- size?: AutocompleteProps['size'];
8
+ size?: 'sm' | 'md' | 'lg';
10
9
  };
11
10
  wrapperProps?: Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
12
11
  afterAutocomplete?: React.ReactNode;
@@ -3,5 +3,5 @@ export interface DateTimeOptions {
3
3
  showDate?: boolean;
4
4
  showSeconds?: boolean;
5
5
  }
6
- export declare function useDateTimeFormatter(options?: DateTimeOptions): (date?: Date | string | number | null, fallback?: string | React.ReactNode) => string | number | boolean | import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode>;
7
- export declare function useFormatDateTime(date?: Date | string | number | null, options?: DateTimeOptions): string | number | boolean | import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode>;
6
+ export declare function useDateTimeFormatter(options?: DateTimeOptions): (date?: Date | string | number | null, fallback?: string | React.ReactNode) => import('react').ReactNode;
7
+ export declare function useFormatDateTime(date?: Date | string | number | null, options?: DateTimeOptions): import('react').ReactNode;
package/lib/i18n.d.ts CHANGED
@@ -11,7 +11,10 @@ interface TranslationState {
11
11
  }
12
12
  export declare const useTranslationState: import('zustand').UseBoundStore<import('zustand').StoreApi<TranslationState>>;
13
13
  export type TFunction = (key: string, data?: Record<string, unknown>) => string;
14
- export type TExists = (key: string) => boolean;
14
+ interface TExistsOptions {
15
+ succeedIfKeyIsObject?: boolean;
16
+ }
17
+ export type TExists = (key: string, options?: TExistsOptions) => boolean;
15
18
  interface UseTranslationsResponse {
16
19
  t: TFunction;
17
20
  tExists: TExists;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@attraccess/plugins-frontend-ui",
3
- "version": "1.1.0",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -18,5 +18,8 @@
18
18
  "index*.js",
19
19
  "index.d.ts",
20
20
  "lib"
21
- ]
21
+ ],
22
+ "devDependencies": {
23
+ "babel-plugin-react-compiler": "^1.0.0"
24
+ }
22
25
  }