@hashicorp/design-system-components
Version:
Helios Design System Components
37 lines (36 loc) • 1.54 kB
TypeScript
/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Component from '@glimmer/component';
import type { HdsFormCheckboxBaseSignature } from '../form/checkbox/base';
import type { HdsTableScope, HdsTableThSortOrder, HdsTableThSortOrderLabels } from './types';
import type { HdsTableThSignature } from './th';
import type Owner from '@ember/owner';
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> {
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;
}