Debian Codegraph @

node/@patternfly/react-core/dist/js/components/Toolbar/Toolbar.d.ts

raw
1 import { Component } from 'react';
2 import { OUIAProps } from '../../helpers';
3 export declare enum ToolbarColorVariant {
4 default = "default",
5 primary = "primary",
6 secondary = "secondary",
7 noBackground = "no-background"
8 }
9 export interface ToolbarProps extends React.HTMLProps<HTMLDivElement>, OUIAProps {
10 /** Optional callback for clearing all filters in the toolbar */
11 clearAllFilters?: () => void;
12 /** Text to display in the clear all filters button */
13 clearFiltersButtonText?: string;
14 /** Custom content appended to the filter generated label group. To maintain spacing and styling, each node should be wrapped in a ToolbarItem or ToolbarGroup. This property will remove the default "Clear all filters" button. */
15 customLabelGroupContent?: React.ReactNode;
16 /** The breakpoint at which the listed filters in label groups are collapsed down to a summary */
17 collapseListedFiltersBreakpoint?: 'all' | 'md' | 'lg' | 'xl' | '2xl';
18 /** Flag indicating if a data toolbar toggle group's expandable content is expanded */
19 isExpanded?: boolean;
20 /** A callback for setting the isExpanded flag */
21 toggleIsExpanded?: () => void;
22 /** Classes applied to root element of the data toolbar */
23 className?: string;
24 /** Content to be rendered as rows in the data toolbar */
25 children?: React.ReactNode;
26 /** Id of the data toolbar */
27 id?: string;
28 /** Flag indicating the toolbar height should expand to the full height of the container */
29 isFullHeight?: boolean;
30 /** Flag indicating the toolbar is static */
31 isStatic?: boolean;
32 /** Flag indicating the toolbar should stick to the top of its container. This property applies both the sticky position and styling. */
33 isSticky?: boolean;
34 /** @beta Flag indicating the toolbar should have sticky positioning to the top of its container */
35 isStickyBase?: boolean;
36 /** @beta Flag indicating the toolbar should have stuck styling, when the toolbar is not at the top of the scroll container */
37 isStickyStuck?: boolean;
38 /** @beta Flag indicating the toolbar has a vertical orientation */
39 isVertical?: boolean;
40 /** Insets at various breakpoints. */
41 inset?: {
42 default?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
43 sm?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
44 md?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
45 lg?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
46 xl?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
47 '2xl'?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
48 };
49 /** Text to display in the total number of applied filters ToolbarFilter */
50 numberOfFiltersText?: (numberOfFilters: number) => string;
51 /** Value to overwrite the randomly generated data-ouia-component-id.*/
52 ouiaId?: number | string;
53 /** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
54 ouiaSafe?: boolean;
55 /** Background color variant of the toolbar */
56 colorVariant?: ToolbarColorVariant | 'default' | 'no-background' | 'primary' | 'secondary';
57 /** Flag indicating the toolbar padding is removed */
58 hasNoPadding?: boolean;
59 }
60 export interface ToolbarState {
61 /** Flag used if the user has opted NOT to manage the 'isExpanded' state of the toggle group.
62 * Indicates whether or not the toggle group is expanded. */
63 isManagedToggleExpanded: boolean;
64 /** Object managing information about how many labels are in each label group */
65 filterInfo: FilterInfo;
66 /** Used to keep track of window width so we can collapse expanded content when window is resizing */
67 windowWidth: number;
68 }
69 interface FilterInfo {
70 [key: string]: number;
71 }
72 declare class Toolbar extends Component<ToolbarProps, ToolbarState> {
73 static displayName: string;
74 labelGroupContentRef: import("react").RefObject<HTMLDivElement>;
75 staticFilterInfo: {};
76 hasNoPadding: boolean;
77 state: {
78 isManagedToggleExpanded: boolean;
79 filterInfo: {};
80 windowWidth: number;
81 };
82 isToggleManaged: () => boolean;
83 toggleIsExpanded: () => void;
84 closeExpandableContent: (e: any) => void;
85 componentDidMount(): void;
86 componentWillUnmount(): void;
87 updateNumberFilters: (categoryName: string, numberOfFilters: number) => void;
88 getNumberOfFilters: () => number;
89 renderToolbar: (randomId: string, generatedOuiaId?: string) => import("react/jsx-runtime").JSX.Element;
90 render(): import("react/jsx-runtime").JSX.Element;
91 }
92 export { Toolbar };
93 //# sourceMappingURL=Toolbar.d.ts.map