toolbar

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chip

type Chip struct {
	// Key - A unique key to identify this chip.
	Key string
	// Node - The ReactNode to display in the chip.
	Node any //  // React.ReactNode
}

type ChipGroup

type ChipGroup struct {
	// Key - A unique key to identify this chip group category.
	Key string
	// Name - The category name to display for the chip group.
	Name string
}

type ChipGroupContentProps

type ChipGroupContentProps struct {
	// ClassName - Classes applied to root element of the data toolbar content row. Optional.
	ClassName string
	// IsExpanded - Flag indicating if a data toolbar toggle group's expandable content is expanded. Optional.
	IsExpanded bool
	// ChipGroupContentRef - Chip group content reference for passing to data toolbar children. Optional.
	ChipGroupContentRef any //  // RefObject
	// ClearAllFilters - optional callback for clearing all filters in the toolbar. Optional.
	ClearAllFilters func()
	// ShowClearFiltersButton - Flag indicating that the clear all filters button should be visible.
	ShowClearFiltersButton bool
	// ClearFiltersButtonText - Text to display in the clear all filters button. Optional.
	ClearFiltersButtonText string
	// NumberOfFilters - Total number of filters currently being applied across all ToolbarFilter components.
	NumberOfFilters int
	// NumberOfFiltersText - Text to display in the total number of applied filters ToolbarFilter. Optional.
	NumberOfFiltersText func(numberOfFilters int) string
	// CollapseListedFiltersBreakpoint - The breakpoint at which the listed filters in chip groups are collapsed
	// down to a summary. Optional.
	CollapseListedFiltersBreakpoint any //  /* "all" | "md" | "lg" | "xl" | "2xl" */
	// CustomChipGroupContent - Custom additional content appended to the generated chips. To maintain spacing
	// and styling, each node should be a ToolbarItem or ToolbarGroup. This property will remove the built in
	// "Clear all filters" button. Optional.
	CustomChipGroupContent any //  // React.ReactNode
}

type ContentContextProps

type ContentContextProps struct {
	// ExpandableContentRef -
	ExpandableContentRef any //  // RefObject
	// ExpandableContentId -
	ExpandableContentId string
	// ChipContainerRef -
	ChipContainerRef any //  // RefObject
}

type ContentProps

type ContentProps struct {
	// ClassName - Classes applied to root element of the data toolbar content row. Optional.
	ClassName string
	// Visibility - Visibility at various breakpoints. Optional.
	Visibility map[string]string /* { default:{ hidden, visible }, md:{ hidden, visible }, lg:{ hidden, visible }, xl:{ hidden, visible }, 2xl:{ hidden, visible } } */
	// Visiblity - Optional.
	Visiblity map[string]string /* { default:{ hidden, visible }, md:{ hidden, visible }, lg:{ hidden, visible }, xl:{ hidden, visible }, 2xl:{ hidden, visible } } */
	// Alignment - Alignment at various breakpoints. Optional.
	Alignment map[string]string /* { default:{ alignRight, alignLeft }, md:{ alignRight, alignLeft }, lg:{ alignRight, alignLeft }, xl:{ alignRight, alignLeft }, 2xl:{ alignRight, alignLeft } } */
	// Children - Content to be rendered as children of the content row. Optional.
	Children any //  // React.ReactNode
	// IsExpanded - Flag indicating if a data toolbar toggle group's expandable content is expanded. Optional.
	IsExpanded bool
	// ClearAllFilters - Optional callback for clearing all filters in the toolbar. Optional.
	ClearAllFilters func()
	// ShowClearFiltersButton - Flag indicating that the clear all filters button should be visible. Optional.
	ShowClearFiltersButton bool
	// ClearFiltersButtonText - Text to display in the clear all filters button. Optional.
	ClearFiltersButtonText string
	// ToolbarId - Id of the parent Toolbar component. Optional.
	ToolbarId string
}

type ContextProps

type ContextProps struct {
	// IsExpanded -
	IsExpanded bool
	// ToggleIsExpanded -
	ToggleIsExpanded func()
	// ChipGroupContentRef -
	ChipGroupContentRef any //  // RefObject
	// UpdateNumberFilters -
	UpdateNumberFilters func(categoryName string, numberOfFilters int)
	// NumberOfFilters -
	NumberOfFilters int
	// ClearAllFilters - Optional.
	ClearAllFilters func()
	// ClearFiltersButtonText - Optional.
	ClearFiltersButtonText string
	// ShowClearFiltersButton - Optional.
	ShowClearFiltersButton bool
	// ToolbarId - Optional.
	ToolbarId string
	// CustomChipGroupContent - Optional.
	CustomChipGroupContent any //  // React.ReactNode
}

type ExpandIconWrapperProps

type ExpandIconWrapperProps struct {
	// Children - Icon content used for the expand all or collapse all indication. Optional.
	Children any //  // React.ReactNode
	// ClassName - Additional classes added to the span. Optional.
	ClassName string
}

type ExpandableContentProps

type ExpandableContentProps struct {
	// ClassName - Classes added to the root element of the data toolbar expandable content. Optional.
	ClassName string
	// IsExpanded - Flag indicating the expandable content is expanded. Optional.
	IsExpanded bool
	// ExpandableContentRef - Expandable content reference for passing to data toolbar children. Optional.
	ExpandableContentRef any //  // RefObject
	// ChipContainerRef - Chip container reference for passing to data toolbar children. Optional.
	ChipContainerRef any //  // RefObject
	// ClearAllFilters - optional callback for clearing all filters in the toolbar. Optional.
	ClearAllFilters func()
	// ClearFiltersButtonText - Text to display in the clear all filters button. Optional.
	ClearFiltersButtonText string
	// ShowClearFiltersButton - Flag indicating that the clear all filters button should be visible.
	ShowClearFiltersButton bool
}

type FilterInfo

type FilterInfo map[string]int

type FilterProps

type FilterProps struct {
	// Chips - An array of strings to be displayed as chips in the expandable content. Optional.
	Chips [](any)
	// DeleteChipGroup - Callback passed by consumer used to close the entire chip group. Optional.
	DeleteChipGroup func(category any)
	// DeleteChip - Callback passed by consumer used to delete a chip from the chips[]. Optional.
	DeleteChip func(category any, chip any)
	// ChipGroupExpandedText - Customizable "Show Less" text string for the chip group. Optional.
	ChipGroupExpandedText string
	// ChipGroupCollapsedText - Customizeable template string for the chip group. Use variable "${remaining}"
	// for the overflow chip count. Optional.
	ChipGroupCollapsedText string
	// Children - Content to be rendered inside the data toolbar item associated with the chip group.
	Children any //  // React.ReactNode
	// CategoryName - Unique category name to be used as a label for the chip group.
	CategoryName any //  /* string | any // ToolbarChipGroup  */
	// ShowToolbarItem - Flag to show the toolbar item. Optional.
	ShowToolbarItem bool
}

type FilterState

type FilterState struct {
	// IsMounted -
	IsMounted bool
}

type GroupProps

type GroupProps struct {
	// ClassName - Classes applied to root element of the data toolbar group. Optional.
	ClassName string
	// Variant - A type modifier which modifies spacing specifically depending on the type of group. Optional.
	Variant any //  /* any // ToolbarGroupVariant  | "filter-group" | "icon-button-group" | "button-group" */
	// Visibility - Visibility at various breakpoints. Optional.
	Visibility map[string]string /* { default:{ hidden, visible }, md:{ hidden, visible }, lg:{ hidden, visible }, xl:{ hidden, visible }, 2xl:{ hidden, visible } } */
	// Visiblity - Optional.
	Visiblity map[string]string /* { default:{ hidden, visible }, md:{ hidden, visible }, lg:{ hidden, visible }, xl:{ hidden, visible }, 2xl:{ hidden, visible } } */
	// Alignment - Alignment at various breakpoints. Optional.
	Alignment map[string]string /* { default:{ alignRight, alignLeft }, md:{ alignRight, alignLeft }, lg:{ alignRight, alignLeft }, xl:{ alignRight, alignLeft }, 2xl:{ alignRight, alignLeft } } */
	// Spacer - Spacers at various breakpoints. Optional.
	Spacer map[string]string /* { default:{ spacerNone, spacerSm, spacerMd, spacerLg }, md:{ spacerNone, spacerSm, spacerMd, spacerLg }, lg:{ spacerNone, spacerSm, spacerMd, spacerLg }, xl:{ spacerNone, spacerSm, spacerMd, spacerLg }, 2xl:{ spacerNone, spacerSm, spacerMd, spacerLg } } */
	// SpaceItems - Space items at various breakpoints. Optional.
	SpaceItems map[string]string /* { default:{ spaceItemsNone, spaceItemsSm, spaceItemsMd, spaceItemsLg }, md:{ spaceItemsNone, spaceItemsSm, spaceItemsMd, spaceItemsLg }, lg:{ spaceItemsNone, spaceItemsSm, spaceItemsMd, spaceItemsLg }, xl:{ spaceItemsNone, spaceItemsSm, spaceItemsMd, spaceItemsLg }, 2xl:{ spaceItemsNone, spaceItemsSm, spaceItemsMd, spaceItemsLg } } */
	// Children - Content to be rendered inside the data toolbar group. Optional.
	Children any //  // React.ReactNode
	// InnerRef - Reference to pass to this group if it has .pf-m-chip-container modifier. Optional.
	InnerRef any //  // React.RefObject
}

type ItemProps

type ItemProps struct {
	// ClassName - Classes applied to root element of the data toolbar item. Optional.
	ClassName string
	// Variant - A type modifier which modifies spacing specifically depending on the type of item. Optional.
	Variant any //  /* any // ToolbarItemVariant  | "bulk-select" | "overflow-menu" | "pagination" | "search-filter" | "label" | "chip-group" | "separator" | "expand-all" */
	// Visibility - Visibility at various breakpoints. Optional.
	Visibility map[string]string /* { default:{ hidden, visible }, md:{ hidden, visible }, lg:{ hidden, visible }, xl:{ hidden, visible }, 2xl:{ hidden, visible } } */
	// Visiblity - Optional.
	Visiblity map[string]string /* { default:{ hidden, visible }, md:{ hidden, visible }, lg:{ hidden, visible }, xl:{ hidden, visible }, 2xl:{ hidden, visible } } */
	// Alignment - Alignment at various breakpoints. Optional.
	Alignment map[string]string /* { default:{ alignRight, alignLeft }, md:{ alignRight, alignLeft }, lg:{ alignRight, alignLeft }, xl:{ alignRight, alignLeft }, 2xl:{ alignRight, alignLeft } } */
	// Spacer - Spacers at various breakpoints. Optional.
	Spacer map[string]string /* { default:{ spacerNone, spacerSm, spacerMd, spacerLg }, md:{ spacerNone, spacerSm, spacerMd, spacerLg }, lg:{ spacerNone, spacerSm, spacerMd, spacerLg }, xl:{ spacerNone, spacerSm, spacerMd, spacerLg }, 2xl:{ spacerNone, spacerSm, spacerMd, spacerLg } } */
	// Widths - Widths at various breakpoints. Optional.
	Widths map[string]string /* { default:string, sm:string, md:string, lg:string, xl:string, 2xl:string } */
	// Id - id for this data toolbar item. Optional.
	Id string
	// IsAllExpanded - Flag indicating if the expand-all variant is expanded or not. Optional.
	IsAllExpanded bool
	// Children - Content to be rendered inside the data toolbar item. Optional.
	Children any //  // React.ReactNode
}

type Props

type Props struct {
	// ClearAllFilters - Optional callback for clearing all filters in the toolbar. Optional.
	ClearAllFilters func()
	// ClearFiltersButtonText - Text to display in the clear all filters button. Optional.
	ClearFiltersButtonText string
	// CustomChipGroupContent - Custom content appended to the filter generated chip 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. Optional.
	CustomChipGroupContent any //  // React.ReactNode
	// CollapseListedFiltersBreakpoint - The breakpoint at which the listed filters in chip groups are collapsed
	// down to a summary. Optional.
	CollapseListedFiltersBreakpoint any //  /* "all" | "md" | "lg" | "xl" | "2xl" */
	// IsExpanded - Flag indicating if a data toolbar toggle group's expandable content is expanded. Optional.
	IsExpanded bool
	// ToggleIsExpanded - A callback for setting the isExpanded flag. Optional.
	ToggleIsExpanded func()
	// ClassName - Classes applied to root element of the data toolbar. Optional.
	ClassName string
	// Children - Content to be rendered as rows in the data toolbar. Optional.
	Children any //  // React.ReactNode
	// Id - Id of the data toolbar. Optional.
	Id string
	// IsFullHeight - Flag indicating the toolbar height should expand to the full height of the container. Optional.
	IsFullHeight bool
	// IsStatic - Flag indicating the toolbar is static. Optional.
	IsStatic bool
	// UsePageInsets - Flag indicating the toolbar should use the Page insets. Optional.
	UsePageInsets bool
	// IsSticky - Flag indicating the toolbar should stick to the top of its container. Optional.
	IsSticky bool
	// Inset - Insets at various breakpoints. Optional.
	Inset map[string]string /* { default:{ insetNone, insetSm, insetMd, insetLg, insetXl, inset2xl }, sm:{ insetNone, insetSm, insetMd, insetLg, insetXl, inset2xl }, md:{ insetNone, insetSm, insetMd, insetLg, insetXl, inset2xl }, lg:{ insetNone, insetSm, insetMd, insetLg, insetXl, inset2xl }, xl:{ insetNone, insetSm, insetMd, insetLg, insetXl, inset2xl }, 2xl:{ insetNone, insetSm, insetMd, insetLg, insetXl, inset2xl } } */
	// NumberOfFiltersText - Text to display in the total number of applied filters ToolbarFilter. Optional.
	NumberOfFiltersText func(numberOfFilters int) string
}

type State

type State struct {
	// IsManagedToggleExpanded - Flag used if the user has opted NOT to manage the 'isExpanded' state of the
	// toggle group. Indicates whether or not the toggle group is expanded.
	IsManagedToggleExpanded bool
	// FilterInfo - Object managing information about how many chips are in each chip group.
	FilterInfo any //  // FilterInfo
	// WindowWidth - Used to keep track of window width so we can collapse expanded content when window is resizing.
	WindowWidth int
	// OuiaStateId -
	OuiaStateId string
}

type ToggleGroupProps

type ToggleGroupProps struct {
	// ToggleIcon - An icon to be rendered when the toggle group has collapsed down.
	ToggleIcon any //  // React.ReactNode
	// Breakpoint - Controls when filters are shown and when the toggle button is hidden.
	Breakpoint any //  /* "md" | "lg" | "xl" | "2xl" */
	// Visibility - Visibility at various breakpoints. Optional.
	Visibility map[string]string /* { default:{ hidden, visible }, md:{ hidden, visible }, lg:{ hidden, visible }, xl:{ hidden, visible }, 2xl:{ hidden, visible } } */
	// Visiblity - Optional.
	Visiblity map[string]string /* { default:{ hidden, visible }, md:{ hidden, visible }, lg:{ hidden, visible }, xl:{ hidden, visible }, 2xl:{ hidden, visible } } */
	// Alignment - Alignment at various breakpoints. Optional.
	Alignment map[string]string /* { default:{ alignRight, alignLeft }, md:{ alignRight, alignLeft }, lg:{ alignRight, alignLeft }, xl:{ alignRight, alignLeft }, 2xl:{ alignRight, alignLeft } } */
	// Spacer - Spacers at various breakpoints. Optional.
	Spacer map[string]string /* { default:{ spacerNone, spacerSm, spacerMd, spacerLg }, md:{ spacerNone, spacerSm, spacerMd, spacerLg }, lg:{ spacerNone, spacerSm, spacerMd, spacerLg }, xl:{ spacerNone, spacerSm, spacerMd, spacerLg }, 2xl:{ spacerNone, spacerSm, spacerMd, spacerLg } } */
	// SpaceItems - Space items at various breakpoints. Optional.
	SpaceItems map[string]string /* { default:{ spaceItemsNone, spaceItemsSm, spaceItemsMd, spaceItemsLg }, md:{ spaceItemsNone, spaceItemsSm, spaceItemsMd, spaceItemsLg }, lg:{ spaceItemsNone, spaceItemsSm, spaceItemsMd, spaceItemsLg }, xl:{ spaceItemsNone, spaceItemsSm, spaceItemsMd, spaceItemsLg }, 2xl:{ spaceItemsNone, spaceItemsSm, spaceItemsMd, spaceItemsLg } } */
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL