@hashicorp/design-system-components
Version:
Helios Design System Components
41 lines (40 loc) • 1.8 kB
TypeScript
/**
* Copyright IBM Corp. 2021, 2025
* SPDX-License-Identifier: MPL-2.0
*/
import Component from '@glimmer/component';
import type HdsIntlService from '../../../services/hds-intl';
import type { HdsFormCheckboxBaseSignature } from '../form/checkbox/base';
import type { HdsAdvancedTableScope, HdsAdvancedTableThSortOrder, HdsAdvancedTableThSortOrderLabels } from './types.ts';
import type { HdsAdvancedTableThSignature } from './th';
import type { HdsCompositeSignature } from '../composite/index';
export interface HdsAdvancedTableThSelectableSignature {
Args: {
compositeItem?: HdsCompositeSignature['Blocks']['default'][0]['item'];
isCompositeItemDisabled?: boolean;
didInsert?: (checkbox: HdsFormCheckboxBaseSignature['Element'], selectionKey?: string) => void;
isSelected?: boolean;
onClickSortBySelected?: () => void;
onSelectionChange?: (target: HdsFormCheckboxBaseSignature['Element'], selectionKey: string | undefined) => void;
selectionAriaLabelSuffix?: string;
selectionKey?: string;
selectionScope?: HdsAdvancedTableScope;
sortBySelectedOrder?: HdsAdvancedTableThSortOrder;
willDestroy?: (selectionKey?: string) => void;
isStickyColumn?: boolean;
isStickyColumnPinned?: boolean;
};
Element: HdsAdvancedTableThSignature['Element'];
}
export default class HdsAdvancedTableThSelectable extends Component<HdsAdvancedTableThSelectableSignature> {
readonly hdsIntl: HdsIntlService;
private _isSelected;
private _guid;
private _checkboxId;
private _labelId;
get isSortable(): boolean;
get ariaLabel(): string;
get ariaSort(): HdsAdvancedTableThSortOrderLabels | undefined;
private _manageCheckbox;
onSelectionChange(event: Event): void;
}