@ansible/ansible-ui-framework 2.4.534 → 2.4.538

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.
@@ -1,4 +1,5 @@
1
- import { ButtonVariant, DropdownPosition } from '@patternfly/react-core';
1
+ import { ButtonVariant } from '@patternfly/react-core';
2
+ import { DropdownPosition } from '@patternfly/react-core/deprecated';
2
3
  import { ComponentClass, FunctionComponent } from 'react';
3
4
  import { IPageAction } from './PageAction';
4
5
  interface PageActionDropdownProps<T extends object> {
@@ -1,4 +1,4 @@
1
- import { DropdownPosition } from '@patternfly/react-core';
1
+ import { DropdownPosition } from '@patternfly/react-core/deprecated';
2
2
  import { ComponentClass, FunctionComponent } from 'react';
3
3
  import { WindowSize } from '../components/useBreakPoint';
4
4
  import { IPageAction } from './PageAction';
@@ -1,16 +1,20 @@
1
- import { FormGroupProps, SelectOptionObject, SelectProps } from '@patternfly/react-core';
1
+ import { SelectOptionObject } from '@patternfly/react-core/deprecated';
2
2
  import React from 'react';
3
- export type FormGroupTypeAheadMultiSelectProps = Pick<FormGroupProps, 'helperTextInvalid' | 'children'> & Pick<SelectProps, 'footer' | 'isCreatable' | 'isGrouped' | 'placeholderText' | 'value' | 'isDisabled' | 'children' | 'onSelect'> & {
3
+ export type FormGroupTypeAheadMultiSelectProps = {
4
+ id?: string;
5
+ label: string;
6
+ labelHelp?: string | string[] | React.ReactNode;
7
+ labelHelpTitle?: string;
8
+ helperText?: string;
9
+ helperTextInvalid?: string;
4
10
  isReadOnly?: boolean;
5
11
  placeholderText?: string | React.ReactNode;
6
- name: string;
7
12
  options: {
8
13
  value: string | {
9
14
  name: string;
10
15
  };
11
16
  label: string;
12
17
  }[];
13
- id?: string;
14
18
  onSelect?: (event: React.MouseEvent | React.ChangeEvent, value: string | SelectOptionObject, isPlaceholder?: boolean) => void;
15
19
  onHandleSelection: (value: string | SelectOptionObject | {
16
20
  name: string;
@@ -5,8 +5,8 @@ export interface PageFormAsyncSelectProps<TFieldValues extends FieldValues = Fie
5
5
  name: TFieldName;
6
6
  variant?: 'single' | 'typeahead' | 'typeaheadMulti';
7
7
  label: string;
8
- labelHelp?: string | ReactNode;
9
8
  labelHelpTitle?: string;
9
+ labelHelp?: string | string[] | ReactNode;
10
10
  placeholder: string;
11
11
  loadingPlaceholder: string;
12
12
  loadingErrorText: string;
@@ -1,8 +1,13 @@
1
- import { ReactElement } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
2
  import { FieldPath, FieldPathValue, FieldValues, Validate } from 'react-hook-form';
3
3
  export type PageFormCreatableSelectProps<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
4
- name: TFieldName;
5
4
  id?: string;
5
+ name: TFieldName;
6
+ label: string;
7
+ labelHelp?: string | string[] | ReactNode;
8
+ labelHelpTitle?: string;
9
+ additionalControls?: ReactElement;
10
+ placeholderText?: string;
6
11
  options: {
7
12
  value: string | {
8
13
  name: string;
@@ -10,11 +15,6 @@ export type PageFormCreatableSelectProps<TFieldValues extends FieldValues = Fiel
10
15
  label: string;
11
16
  }[];
12
17
  isRequired?: boolean;
13
- label: string;
14
- additionalControls?: ReactElement;
15
- placeholderText?: string;
16
- labelHelp?: string;
17
- labelHelpTitle?: string;
18
18
  validate?: Validate<FieldPathValue<TFieldValues, TFieldName>, TFieldValues> | Record<string, Validate<FieldPathValue<TFieldValues, TFieldName>, TFieldValues>>;
19
19
  };
20
20
  export declare function PageFormCreatableSelect<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: PageFormCreatableSelectProps<TFieldValues, TFieldName>): import("react/jsx-runtime").JSX.Element;
@@ -14,7 +14,7 @@ export type PageFormDataEditorInputProps<TFieldValues extends FieldValues = Fiel
14
14
  isReadOnly?: boolean;
15
15
  isRequired?: boolean;
16
16
  additionalControls?: ReactNode;
17
- labelHelp?: ReactNode;
17
+ labelHelp?: string | string[] | ReactNode;
18
18
  labelHelpTitle?: string;
19
19
  };
20
20
  export declare function PageFormDataEditor<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPathByValue<TFieldValues, undefined | string> = FieldPathByValue<TFieldValues, undefined | string>>(props: PageFormDataEditorInputProps<TFieldValues, TFieldName>): import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,11 @@
1
+ import { ReactNode } from 'react';
1
2
  import { FieldPath, FieldValues } from 'react-hook-form';
2
3
  export type PageFormDateTimePickerProps<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
3
4
  name: TFieldName;
4
5
  datePlaceHolder?: string;
5
6
  timePlaceHolder?: string;
6
7
  label: string;
7
- labelHelp?: string;
8
+ labelHelp?: string | string[] | ReactNode;
8
9
  labelHelpTitle?: string;
9
10
  isDisabled?: boolean;
10
11
  };
@@ -1,10 +1,14 @@
1
- import { FormGroupProps } from '@patternfly/react-core';
2
1
  import { ReactNode } from 'react';
3
- export type PageFormGroupProps = Pick<FormGroupProps, 'children' | 'helperText' | 'helperTextInvalid' | 'isRequired' | 'label' | 'labelIcon'> & {
4
- id?: string;
5
- name?: string;
2
+ export interface PageFormGroupProps {
3
+ fieldId?: string;
4
+ icon?: ReactNode;
5
+ label?: string;
6
+ labelHelp?: string | string[] | ReactNode;
6
7
  labelHelpTitle?: string;
7
- labelHelp?: string | ReactNode;
8
+ isRequired?: boolean;
8
9
  additionalControls?: ReactNode;
9
- };
10
+ children?: ReactNode;
11
+ helperText?: string;
12
+ helperTextInvalid?: string | string[] | false;
13
+ }
10
14
  export declare function PageFormGroup(props: PageFormGroupProps): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@ export type PageFormMultiSelectProps<TFieldValues extends FieldValues = FieldVal
6
6
  name: TFieldName;
7
7
  label?: string;
8
8
  labelHelpTitle?: string;
9
- labelHelp?: ReactNode;
9
+ labelHelp?: string | string[] | ReactNode;
10
10
  placeholderText?: string;
11
11
  options: PageSelectOption<ValueT>[];
12
12
  helperText?: string;
@@ -6,7 +6,7 @@ export type PageFormSelectProps<TFieldValues extends FieldValues = FieldValues,
6
6
  name: TFieldName;
7
7
  label?: string;
8
8
  labelHelpTitle?: string;
9
- labelHelp?: ReactNode;
9
+ labelHelp?: string | string[] | ReactNode;
10
10
  additionalControls?: ReactNode;
11
11
  placeholderText?: string;
12
12
  options: PageSelectOption<TSelection>[];
@@ -2,8 +2,6 @@ export declare function PageFormSlider(props: {
2
2
  id?: string;
3
3
  label: string;
4
4
  name: string;
5
- helperText?: string;
6
- required?: boolean;
7
5
  autoFocus?: boolean;
8
6
  min?: number;
9
7
  max?: number;
@@ -1,16 +1,16 @@
1
+ import { ReactElement, ReactNode } from 'react';
1
2
  import { FieldPath, FieldValues, Validate, ValidationRule } from 'react-hook-form';
2
- import { SwitchProps } from '@patternfly/react-core';
3
- import { ReactElement } from 'react';
4
3
  export type PageFormSwitchProps<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {
4
+ id?: string;
5
5
  name: TFieldName;
6
- helperText?: string;
6
+ label?: string;
7
+ labelHelpTitle?: string;
8
+ labelHelp?: string | string[] | ReactNode;
7
9
  isRequired?: boolean;
10
+ additionalControls?: ReactElement;
11
+ helperText?: string;
8
12
  pattern?: ValidationRule<RegExp>;
9
13
  validate?: Validate<string, TFieldValues> | Record<string, Validate<string, TFieldValues>>;
10
14
  autoFocus?: boolean;
11
- additionalControls?: ReactElement;
12
- formLabel?: string;
13
- labelHelp?: string;
14
- labelHelpTitle?: string;
15
- } & Omit<SwitchProps, 'onChange' | 'ref' | 'instance'>;
15
+ };
16
16
  export declare function PageFormSwitch<TFieldValues extends FieldValues = FieldValues, TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: PageFormSwitchProps<TFieldValues, TFieldName>): import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@ export type PageFormTextInputProps<TFieldValues extends FieldValues = FieldValue
6
6
  type?: 'text' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'time' | 'url';
7
7
  label?: string;
8
8
  labelHelpTitle?: string;
9
- labelHelp?: ReactNode;
9
+ labelHelp?: string | string[] | ReactNode;
10
10
  additionalControls?: ReactNode;
11
11
  placeholder?: string;
12
12
  button?: ReactNode;
@@ -1,3 +1,4 @@
1
+ import { PerPageOptions } from '@patternfly/react-core';
1
2
  import { CSSProperties } from 'react';
2
3
  export type PagePaginationProps = {
3
4
  itemCount?: number;
@@ -7,5 +8,6 @@ export type PagePaginationProps = {
7
8
  setPerPage: (perPage: number) => void;
8
9
  style?: CSSProperties;
9
10
  topBorder?: boolean;
11
+ perPageOptions?: PerPageOptions[];
10
12
  };
11
13
  export declare function PagePagination(props: PagePaginationProps): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { PerPageOptions } from '@patternfly/react-core';
1
2
  import { Dispatch, ReactNode, SetStateAction } from 'react';
2
3
  import { IPageAction } from '../PageActions/PageAction';
3
4
  import { PageTableViewType } from '../PageToolbar/PageTableViewType';
@@ -20,6 +21,7 @@ export type PageTableProps<T extends object> = {
20
21
  perPage: number;
21
22
  setPage: (page: number) => void;
22
23
  setPerPage: (perPage: number) => void;
24
+ perPageOptions?: PerPageOptions[];
23
25
  sort?: string;
24
26
  setSort?: (sort: string) => void;
25
27
  sortDirection?: 'asc' | 'desc';
@@ -49,6 +51,7 @@ export type PageTableProps<T extends object> = {
49
51
  disableListView?: boolean;
50
52
  disableCardView?: boolean;
51
53
  defaultTableView?: PageTableViewType;
54
+ hideTable?: boolean;
52
55
  disableBodyPadding?: boolean;
53
56
  disablePagination?: boolean;
54
57
  defaultSubtitle?: ReactNode;
@@ -22,7 +22,7 @@ export interface IPageTableCard {
22
22
  badgeTooltipTitle?: string;
23
23
  alertTitle?: string;
24
24
  alertContent?: ReactNode;
25
- alertVariant?: 'success' | 'danger' | 'warning' | 'info' | 'default';
25
+ alertVariant?: 'success' | 'danger' | 'warning' | 'info' | 'custom';
26
26
  }
27
27
  export declare const PageDetailDiv: import("styled-components").StyledComponent<"div", any, {}, never>;
28
28
  export declare const ColumnsDiv: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,3 +1,4 @@
1
+ import { PerPageOptions } from '@patternfly/react-core';
1
2
  import React, { Dispatch, SetStateAction } from 'react';
2
3
  import { IPageAction } from '../PageActions/PageAction';
3
4
  import { PageTableViewType } from './PageTableViewType';
@@ -18,6 +19,7 @@ export type PageToolbarProps<T extends object> = {
18
19
  perPage?: number;
19
20
  setPage?: (page: number) => void;
20
21
  setPerPage?: (perPage: number) => void;
22
+ perPageOptions?: PerPageOptions[];
21
23
  isSelected?: (item: T) => boolean;
22
24
  selectedItems?: T[];
23
25
  selectItem?: (item: T) => void;
@@ -36,7 +38,6 @@ export type PageToolbarProps<T extends object> = {
36
38
  disableListView?: boolean;
37
39
  disableCardView?: boolean;
38
40
  disablePagination?: boolean;
39
- bottomBorder?: boolean;
40
41
  sortOptions?: PageTableSortOption[];
41
42
  maxSelections?: number;
42
43
  toolbarContent?: React.ReactNode;
@@ -6,6 +6,6 @@ export declare function EmptyStateCustom(props: {
6
6
  button?: ReactElement;
7
7
  footNote?: string;
8
8
  image?: ReactElement;
9
- variant?: 'xs' | 'xl' | 'small' | 'large' | 'full' | undefined;
9
+ variant?: 'xs' | 'sm' | 'lg' | 'xl' | 'full' | undefined;
10
10
  style?: React.CSSProperties;
11
11
  }): import("react/jsx-runtime").JSX.Element;
@@ -3,5 +3,5 @@ export declare function EmptyStateNoData(props: {
3
3
  button?: ReactElement;
4
4
  title: string;
5
5
  description: ReactNode;
6
- variant?: 'xs' | 'xl' | 'small' | 'large' | 'full' | undefined;
6
+ variant?: 'xs' | 'sm' | 'lg' | 'xl' | 'full' | undefined;
7
7
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  export declare function Help(props: {
3
- help?: ReactNode | string | string[];
4
3
  title?: string;
4
+ help?: string | string[] | ReactNode;
5
5
  docLink?: string;
6
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -13,13 +13,13 @@ export declare enum PFColorE {
13
13
  Disabled = "disabled"
14
14
  }
15
15
  export type PFColor = 'default' | 'green' | 'success' | 'blue' | 'info' | 'red' | 'danger' | 'yellow' | 'orange' | 'warning' | 'grey' | 'disabled';
16
- export declare function getPatternflyColor(color: PFColor): "var(--pf-global--danger-color--100)" | "var(--pf-global--success-color--100)" | "var(--pf-global--warning-color--100)" | "var(--pf-global--info-color--100)" | "var(--pf-global--disabled-color--100)" | undefined;
17
- export declare const pfSuccess = "var(--pf-global--success-color--100)";
18
- export declare const pfDanger = "var(--pf-global--danger-color--100)";
19
- export declare const pfWarning = "var(--pf-global--warning-color--100)";
20
- export declare const pfInfo = "var(--pf-global--info-color--100)";
21
- export declare const pfDisabled = "var(--pf-global--disabled-color--100)";
22
- export declare const pfLink = "var(--pf-global--link--Color)";
16
+ export declare function getPatternflyColor(color: PFColor): "var(--pf-v5-global--danger-color--100)" | "var(--pf-v5-global--success-color--100)" | "var(--pf-v5-global--warning-color--100)" | "var(--pf-v5-global--info-color--100)" | "var(--pf-v5-global--disabled-color--100)" | undefined;
17
+ export declare const pfSuccess = "var(--pf-v5-global--success-color--100)";
18
+ export declare const pfDanger = "var(--pf-v5-global--danger-color--100)";
19
+ export declare const pfWarning = "var(--pf-v5-global--warning-color--100)";
20
+ export declare const pfInfo = "var(--pf-v5-global--info-color--100)";
21
+ export declare const pfDisabled = "var(--pf-v5-global--disabled-color--100)";
22
+ export declare const pfLink = "var(--pf-v5-global--link--Color)";
23
23
  export declare enum LabelColorE {
24
24
  blue = "blue",
25
25
  cyan = "cyan",
@@ -2,7 +2,7 @@ export declare function useID(props: {
2
2
  id?: string;
3
3
  label?: string;
4
4
  name?: string;
5
- }): string | undefined;
5
+ }): string;
6
6
  export declare function getID(props: {
7
7
  id?: string;
8
8
  label?: string;