@hashicorp/design-system-components
Version:
Helios Design System Components
39 lines (38 loc) • 1.65 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 Owner from '@ember/owner';
import type { HdsFormCheckboxBaseSignature } from '../form/checkbox/base';
import type { HdsTableScope, HdsTableThSortOrder, HdsTableThSortOrderLabels } from './types';
import type { HdsTableThSignature } from './th';
export interface HdsTableThSelectableSignature {
Args: {
didInsert?: (checkbox: HdsFormCheckboxBaseSignature['Element'], selectionKey?: string) => void;
isSelected?: boolean;
onClickSortBySelected?: () => void;
onSelectionChange?: (target: HdsFormCheckboxBaseSignature['Element'], selectionKey: string | undefined) => void;
selectionAriaLabelSuffix?: string;
selectionKey?: string;
selectionScope?: HdsTableScope;
sortBySelectedOrder?: HdsTableThSortOrder;
willDestroy?: (selectionKey?: string) => void;
};
Element: HdsTableThSignature['Element'];
}
export default class HdsTableThSelectable extends Component<HdsTableThSelectableSignature> {
readonly hdsIntl: HdsIntlService;
isSelected: boolean;
private _guid;
private _checkboxId;
private _labelId;
constructor(owner: Owner, args: HdsTableThSelectableSignature['Args']);
get isSortable(): boolean;
get ariaLabel(): string;
get ariaSort(): HdsTableThSortOrderLabels | undefined;
didInsert: (checkbox: HdsFormCheckboxBaseSignature["Element"]) => void;
willDestroyNode: () => void;
onSelectionChange: (event: Event) => void;
}