@keycloak/keycloak-ui-shared 26.2.4 → 26.3.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,11 @@
1
+ import { FileUploadProps } from '@patternfly/react-core';
2
+ import { ReactNode } from 'react';
3
+ import { FieldPath, FieldValues, UseControllerProps } from 'react-hook-form';
4
+ export type FileUploadControlProps<T extends FieldValues, P extends FieldPath<T> = FieldPath<T>> = UseControllerProps<T, P> & Omit<FileUploadProps, "name" | "isRequired" | "required"> & {
5
+ label: string;
6
+ labelIcon?: string | ReactNode;
7
+ isDisabled?: boolean;
8
+ "data-testid"?: string;
9
+ type?: string;
10
+ };
11
+ export declare const FileUploadControl: <T extends FieldValues, P extends FieldPath<T> = FieldPath<T>>(props: FileUploadControlProps<T, P>) => import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,7 @@ import { FormGroupProps } from '@patternfly/react-core';
2
2
  import { PropsWithChildren, ReactNode } from 'react';
3
3
  import { FieldError, FieldValues, Merge } from 'react-hook-form';
4
4
  export type FieldProps<T extends FieldValues = FieldValues> = {
5
+ id?: string | undefined;
5
6
  label?: string;
6
7
  name: string;
7
8
  labelIcon?: string | ReactNode;
@@ -9,5 +10,5 @@ export type FieldProps<T extends FieldValues = FieldValues> = {
9
10
  isRequired: boolean;
10
11
  };
11
12
  type FormLabelProps = FieldProps & Omit<FormGroupProps, "label" | "labelIcon">;
12
- export declare const FormLabel: ({ name, label, labelIcon, error, children, ...rest }: PropsWithChildren<FormLabelProps>) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const FormLabel: ({ id, name, label, labelIcon, error, children, ...rest }: PropsWithChildren<FormLabelProps>) => import("react/jsx-runtime").JSX.Element;
13
14
  export {};
@@ -1,6 +1,6 @@
1
1
  import { FieldValues, FieldPath, UseControllerProps } from 'react-hook-form';
2
2
  import { SwitchProps } from '@patternfly/react-core';
3
- export type SwitchControlProps<T extends FieldValues, P extends FieldPath<T> = FieldPath<T>> = Omit<SwitchProps, "name" | "defaultValue" | "ref"> & UseControllerProps<T, P> & {
3
+ export type SwitchControlProps<T extends FieldValues, P extends FieldPath<T> = FieldPath<T>> = Omit<SwitchProps, "name" | "defaultValue" | "ref"> & UseControllerProps<any, P> & {
4
4
  name: string;
5
5
  label?: string;
6
6
  labelIcon?: string;
@@ -15,7 +15,7 @@ export type SelectControlProps<T extends FieldValues, P extends FieldPath<T> = F
15
15
  name: string;
16
16
  label?: string;
17
17
  options: OptionType;
18
- selectedOptions?: SelectControlOption[];
18
+ selectedOptions?: OptionType;
19
19
  labelIcon?: string;
20
20
  controller: Omit<ControllerProps, "name" | "render">;
21
21
  onFilter?: (value: string) => void;
@@ -1,3 +1,3 @@
1
1
  import { FieldPath, FieldValues } from 'react-hook-form';
2
2
  import { SelectControlProps } from './SelectControl';
3
- export declare const SingleSelectControl: <T extends FieldValues, P extends FieldPath<T> = FieldPath<T>>({ id, name, label, options, controller, labelIcon, isDisabled, onSelect, ...rest }: SelectControlProps<T, P>) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const SingleSelectControl: <T extends FieldValues, P extends FieldPath<T> = FieldPath<T>>({ id, name, label, options, selectedOptions, controller, labelIcon, isDisabled, onSelect, ...rest }: SelectControlProps<T, P>) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { ComponentClass, MouseEventHandler, ReactNode } from 'react';
1
+ import { ComponentClass, MouseEventHandler, PropsWithChildren, ReactNode } from 'react';
2
2
  import { ButtonVariant } from '@patternfly/react-core';
3
3
  import { SVGIconProps } from '@patternfly/react-icons/dist/js/createIcon';
4
4
  export type Action = {
@@ -17,4 +17,4 @@ export type ListEmptyStateProps = {
17
17
  secondaryActions?: Action[];
18
18
  isDisabled?: boolean;
19
19
  };
20
- export declare const ListEmptyState: ({ message, instructions, onPrimaryAction, hasIcon, isSearchVariant, primaryActionText, secondaryActions, icon, isDisabled, }: ListEmptyStateProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const ListEmptyState: ({ message, instructions, onPrimaryAction, hasIcon, isSearchVariant, primaryActionText, secondaryActions, icon, isDisabled, children, }: PropsWithChildren<ListEmptyStateProps>) => import("react/jsx-runtime").JSX.Element;