UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

24 lines 2.02 kB
import { __rest } from "tslib"; // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import React from 'react'; import ScreenreaderOnly from '../../internal/components/screenreader-only'; import { TableTdElement } from '../body-cell/td-element'; import { TableThElement } from '../header-cell/th-element'; import { Divider } from '../resizer'; import { SelectionControl } from './selection-control'; import styles from '../styles.css.js'; export function TableHeaderSelectionCell(_a) { var { focusedComponent, singleSelectionHeaderAriaLabel, getSelectAllProps, onFocusMove } = _a, props = __rest(_a, ["focusedComponent", "singleSelectionHeaderAriaLabel", "getSelectAllProps", "onFocusMove"]); const selectAllProps = getSelectAllProps ? getSelectAllProps() : undefined; return (React.createElement(TableThElement, Object.assign({}, props, { isSelection: true, colIndex: 0, focusedComponent: focusedComponent, ariaLabel: selectAllProps === null || selectAllProps === void 0 ? void 0 : selectAllProps.selectionGroupLabel }), selectAllProps ? (React.createElement(SelectionControl, Object.assign({ onFocusDown: event => { onFocusMove(event.target, -1, +1); }, focusedComponent: focusedComponent }, selectAllProps, (props.sticky ? { tabIndex: -1 } : {})))) : (React.createElement(ScreenreaderOnly, null, singleSelectionHeaderAriaLabel)), React.createElement(Divider, { className: styles['resize-divider'] }))); } export function TableBodySelectionCell(_a) { var { selectionControlProps } = _a, props = __rest(_a, ["selectionControlProps"]); return (React.createElement(TableTdElement, Object.assign({}, props, { isSelection: true, wrapLines: false, isEditable: false, isEditing: false, colIndex: 0 }), selectionControlProps ? (React.createElement(SelectionControl, Object.assign({}, selectionControlProps, { verticalAlign: props.verticalAlign }))) : null)); } //# sourceMappingURL=selection-cell.js.map