UNPKG

pouncejs

Version:

A collection of UI components from Panther labs

81 lines (72 loc) 2.57 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); exports.__esModule = true; exports.default = void 0; var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); var _react = _interopRequireDefault(require("react")); var _Box = _interopRequireDefault(require("../Box")); var _useTheme = _interopRequireDefault(require("../../utils/useTheme")); var _helpers = require("../../utils/helpers"); var Cell = function Cell(props) { var theme = (0, _useTheme.default)(); return /*#__PURE__*/_react.default.createElement(_Box.default, (0, _extends2.default)({ sx: { '[aria-relevant]:hover': { backgroundColor: 'blue-300' }, '[aria-placeholder]': { position: 'absolute', zIndex: 1, width: '50%', height: '100%', top: 0 }, "&[aria-busy='true'] + [aria-selected='true'], &[aria-selected='true'] + [aria-busy='true'], &[aria-selected='true'] + &[aria-selected='true']": { '[aria-placeholder]': { backgroundColor: (0, _helpers.addOpacity)(theme.colors['navyblue-100'], 0.2) } }, "&[aria-selected='true'] + &[aria-selected='true'] [aria-placeholder]": { width: '100%', left: '-50%' }, "&[aria-busy='true'] + &[aria-selected='true'] [aria-placeholder]": { left: 0 }, "&[aria-selected='true'] + &[aria-busy='true'] [aria-placeholder]": { left: '-50%' }, "&[aria-selected='true'] [aria-relevant]": { backgroundColor: 'blue-400' }, "&[aria-busy='true'] [aria-relevant]": { borderRadius: 'none', backgroundColor: (0, _helpers.addOpacity)(theme.colors['navyblue-100'], 0.2) }, "&[aria-disabled='true'] + &[aria-busy='true']": { '[aria-relevant]': { // borderRadius: '4px 0 0 4px', borderTopLeftRadius: 'medium', borderBottomLeftRadius: 'medium' } }, "&[aria-busy='true']": { '&:last-of-type [aria-relevant]': { // borderRadius: '0 4px 4px 0', borderTopRightRadius: 'medium', borderBottomRightRadius: 'medium' }, '&:first-of-type [aria-relevant]': { // borderRadius: '4px 0 0 4px', borderTopLeftRadius: 'medium', borderBottomLeftRadius: 'medium' }, '&:only-of-type [aria-relevant]': { borderRadius: 'medium' } } } }, props)); }; var _default = Cell; exports.default = _default;