1 | "use strict";
|
2 |
|
3 | var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4 |
|
5 | exports.__esModule = true;
|
6 | exports["default"] = void 0;
|
7 |
|
8 | var _styled = _interopRequireDefault(require("@emotion/styled"));
|
9 |
|
10 | var _css2 = _interopRequireDefault(require("@styled-system/css"));
|
11 |
|
12 | var _Box = _interopRequireDefault(require("../Box"));
|
13 |
|
14 | var _config = require("../Box/config");
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | var hover = "&:hover";
|
22 | var active = "&:active, &[data-active=true]";
|
23 | var focus = "&:focus";
|
24 | var visited = "&:visited";
|
25 | var even = "&:nth-of-type(even)";
|
26 | var odd = "&:nth-of-type(odd)";
|
27 | var disabled = "&:disabled, &:disabled:focus, &:disabled:hover, &[aria-disabled=true], &[aria-disabled=true]:focus, &[aria-disabled=true]:hover";
|
28 | var checked = "&[aria-checked=true]";
|
29 | var mixed = "&[aria-checked=mixed]";
|
30 | var selected = "&[aria-selected=true]";
|
31 | var invalid = "&[aria-invalid=true]";
|
32 | var pressed = "&[aria-pressed=true]";
|
33 | var readOnly = "&[aria-readonly=true], &[readonly]";
|
34 | var first = "&:first-of-type";
|
35 | var last = "&:last-of-type";
|
36 | var expanded = "&[aria-expanded=true]";
|
37 | var grabbed = "&[aria-grabbed=true]";
|
38 | var notFirst = "&:not(:first-of-type)";
|
39 | var notLast = "&:not(:last-of-type)";
|
40 | var groupHover = "[role=group]:hover &";
|
41 | var PseudoBox = (0, _styled["default"])(_Box["default"])(function (_ref) {
|
42 | var _css;
|
43 |
|
44 | var _after = _ref._after,
|
45 | _focus = _ref._focus,
|
46 | _selected = _ref._selected,
|
47 | _focusWithin = _ref._focusWithin,
|
48 | _hover = _ref._hover,
|
49 | _invalid = _ref._invalid,
|
50 | _active = _ref._active,
|
51 | _disabled = _ref._disabled,
|
52 | _grabbed = _ref._grabbed,
|
53 | _pressed = _ref._pressed,
|
54 | _expanded = _ref._expanded,
|
55 | _visited = _ref._visited,
|
56 | _before = _ref._before,
|
57 | _readOnly = _ref._readOnly,
|
58 | _first = _ref._first,
|
59 | _notFirst = _ref._notFirst,
|
60 | _notLast = _ref._notLast,
|
61 | _last = _ref._last,
|
62 | _placeholder = _ref._placeholder,
|
63 | _checked = _ref._checked,
|
64 | _groupHover = _ref._groupHover,
|
65 | _mixed = _ref._mixed,
|
66 | _odd = _ref._odd,
|
67 | _even = _ref._even;
|
68 | return (0, _css2["default"])((_css = {}, _css[hover] = (0, _config.transformAliasProps)(_hover), _css[focus] = (0, _config.transformAliasProps)(_focus), _css[active] = (0, _config.transformAliasProps)(_active), _css[visited] = (0, _config.transformAliasProps)(_visited), _css[disabled] = (0, _config.transformAliasProps)(_disabled), _css[selected] = (0, _config.transformAliasProps)(_selected), _css[invalid] = (0, _config.transformAliasProps)(_invalid), _css[expanded] = (0, _config.transformAliasProps)(_expanded), _css[grabbed] = (0, _config.transformAliasProps)(_grabbed), _css[readOnly] = (0, _config.transformAliasProps)(_readOnly), _css[first] = (0, _config.transformAliasProps)(_first), _css[notFirst] = (0, _config.transformAliasProps)(_notFirst), _css[notLast] = (0, _config.transformAliasProps)(_notLast), _css[last] = (0, _config.transformAliasProps)(_last), _css[odd] = (0, _config.transformAliasProps)(_odd), _css[even] = (0, _config.transformAliasProps)(_even), _css[mixed] = (0, _config.transformAliasProps)(_mixed), _css[checked] = (0, _config.transformAliasProps)(_checked), _css[pressed] = (0, _config.transformAliasProps)(_pressed), _css[groupHover] = (0, _config.transformAliasProps)(_groupHover), _css["&:before"] = (0, _config.transformAliasProps)(_before), _css["&:after"] = (0, _config.transformAliasProps)(_after), _css["&:focus-within"] = (0, _config.transformAliasProps)(_focusWithin), _css["&::placeholder"] = _placeholder, _css));
|
69 | });
|
70 | PseudoBox.displayName = "PseudoBox";
|
71 | var _default = PseudoBox;
|
72 | exports["default"] = _default; |
\ | No newline at end of file |