UNPKG

@carbon/ibm-products

Version:
101 lines 2.96 kB
/** * Copyright IBM Corp. 2026 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React, { ReactNode } from 'react'; import { type CheckboxProps, type RadioButtonProps, type IconButtonProps } from '@carbon/react'; /** * ---------------- * AddSelectRow * ---------------- */ export interface AddSelectRowProps { /** * Unique identifier for the item */ itemId: string; /** * Item title */ title: string; /** * Item subtitle */ subtitle?: string; /** * Item value */ value: string; /** * Whether the item is selected */ selected?: boolean; /** * Whether the item is in an indeterminate state (for hierarchical selections) */ indeterminate?: boolean; /** * Whether the item is disabled */ disabled?: boolean; /** * Whether the item has children (for navigation) */ hasChildren?: boolean; /** * Parent ID for hierarchical navigation */ parentId?: string; /** * Optional icon slot */ icon?: ReactNode; /** * Custom content to render after the title/subtitle section. * Useful for adding badges, tags, or other metadata to the row. */ children?: ReactNode; /** * Custom row content (slot) - replaces the entire row content section * (title, subtitle, and children). * When provided, only the selection control and navigation indicators remain. */ rowContent?: ReactNode; /** * Whether to show the item panel view icon for this item */ hasItemPanel?: boolean; /** * Callback when item panel view icon is clicked */ onItemPanelClick?: (itemId: string) => void; /** * Description for the item panel icon button */ itemPanelIconDescription?: string; /** * Whether the item panel is currently open for this item */ itemPanelOpen?: boolean; /** * Optional class name */ className?: string; /** * Additional props to pass to the Checkbox component (when multi=true) */ checkboxProps?: Omit<CheckboxProps, 'id' | 'className' | 'checked' | 'disabled' | 'labelText' | 'hideLabel' | 'onChange'>; /** * Additional props to pass to the RadioButton component (when multi=false) */ radioButtonProps?: Omit<RadioButtonProps, 'id' | 'className' | 'checked' | 'disabled' | 'labelText' | 'hideLabel' | 'value' | 'onChange'>; /** * Additional props to pass to the IconButton component (info panel) */ itemPanelIconButtonProps?: Omit<IconButtonProps, 'label' | 'onClick' | 'kind' | 'size' | 'className' | 'children'>; } declare const AddSelectRow: React.ForwardRefExoticComponent<AddSelectRowProps & React.RefAttributes<HTMLDivElement>>; export default AddSelectRow; //# sourceMappingURL=AddSelectRow.d.ts.map