| 1 |
import { __rest } from "tslib"; |
| 2 |
import { jsx as _jsx } from "react/jsx-runtime"; |
| 3 |
import { Component } from 'react'; |
| 4 |
import { LabelGroup } from '../../../components/Label'; |
| 5 |
import { getOUIAProps } from '../../../helpers'; |
| 6 |
class ChipGroup extends Component { |
| 7 |
constructor(props) { |
| 8 |
super(props); |
| 9 |
} |
| 10 |
render() { |
| 11 |
const _a = this.props, { categoryName, children, className, isClosable, closeBtnAriaLabel, 'aria-label': ariaLabel, onClick, |
| 12 |
// eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 13 |
onOverflowChipClick, numChips, expandedText, collapsedText, ouiaId, defaultIsOpen, tooltipPosition } = _a, props = __rest(_a, ["categoryName", "children", "className", "isClosable", "closeBtnAriaLabel", 'aria-label', "onClick", "onOverflowChipClick", "numChips", "expandedText", "collapsedText", "ouiaId", "defaultIsOpen", "tooltipPosition"]); |
| 14 |
return (_jsx(LabelGroup, Object.assign({ className: className, categoryName: categoryName, numLabels: numChips, isClosable: isClosable, closeBtnAriaLabel: closeBtnAriaLabel, "aria-label": ariaLabel, onClick: onClick, expandedText: expandedText, collapsedText: collapsedText, defaultIsOpen: defaultIsOpen, tooltipPosition: tooltipPosition }, getOUIAProps(ChipGroup.displayName, ouiaId), props, { children: children }))); |
| 15 |
} |
| 16 |
} |
| 17 |
ChipGroup.displayName = 'ChipGroup'; |
| 18 |
ChipGroup.defaultProps = { |
| 19 |
expandedText: 'Show Less', |
| 20 |
collapsedText: '${remaining} more', |
| 21 |
categoryName: '', |
| 22 |
defaultIsOpen: false, |
| 23 |
numChips: 3, |
| 24 |
isClosable: false, |
| 25 |
closeBtnAriaLabel: 'Close chip group', |
| 26 |
tooltipPosition: 'top', |
| 27 |
'aria-label': 'Chip group category' |
| 28 |
}; |
| 29 |
export { ChipGroup }; |
| 30 |
//# sourceMappingURL=ChipGroup.js.map |