beem-component 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,25 +15,40 @@ var _iconStyles = require("../iconStyles");
|
|
|
15
15
|
|
|
16
16
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
17
|
|
|
18
|
+
var _excluded = ["children", "trailingIcon", "size", "color"];
|
|
19
|
+
|
|
18
20
|
var _templateObject;
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
24
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
+
|
|
26
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
|
+
|
|
28
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
|
+
|
|
22
30
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
23
31
|
|
|
24
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0rem 1rem 1rem 1rem;\n border-bottom: 0.125rem solid
|
|
32
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0rem 1rem 1rem 1rem;\n border-bottom: 0.125rem solid\n ", ";\n"])), function (_ref) {
|
|
33
|
+
var color = _ref.color;
|
|
34
|
+
return color ? color : "".concat(_colors.BmPrimaryBlue);
|
|
35
|
+
});
|
|
25
36
|
|
|
26
37
|
exports.Container = Container;
|
|
27
38
|
|
|
28
|
-
var BmListHeader = function BmListHeader(
|
|
29
|
-
var children =
|
|
30
|
-
trailingIcon =
|
|
31
|
-
size =
|
|
32
|
-
color =
|
|
33
|
-
|
|
39
|
+
var BmListHeader = function BmListHeader(_ref2) {
|
|
40
|
+
var children = _ref2.children,
|
|
41
|
+
trailingIcon = _ref2.trailingIcon,
|
|
42
|
+
size = _ref2.size,
|
|
43
|
+
color = _ref2.color,
|
|
44
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
45
|
+
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement(Container, _extends({
|
|
47
|
+
color: color
|
|
48
|
+
}, rest), children, trailingIcon && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
|
|
34
49
|
icon: trailingIcon,
|
|
35
50
|
color: color || "".concat(_colors.BmPrimaryBlack),
|
|
36
|
-
size: size ||
|
|
51
|
+
size: size || "large"
|
|
37
52
|
}));
|
|
38
53
|
};
|
|
39
54
|
|
|
@@ -21,7 +21,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
21
21
|
|
|
22
22
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
//TODO: To be fixed for hover states
|
|
25
|
+
var BmRouteLink = (0, _styledComponents.default)(_reactRouterDom.Link)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n color: ", " !important;\n text-decoration: none;\n &:hover,\n &:focus,\n &:active {\n font-weight: 600;\n &:before {\n font-weight: normal;\n }\n color: ", " !important;\n }\n"])), _text.p, function (props) {
|
|
25
26
|
return props.color ? props.color : "".concat(_colors.BmPrimaryBlue, " ");
|
|
26
27
|
}, function (props) {
|
|
27
28
|
return (0, _polished.darken)(0.1, props.color ? props.color : "".concat(_colors.BmPrimaryBlue));
|
package/package.json
CHANGED
|
@@ -9,18 +9,27 @@ export const Container = styled.div`
|
|
|
9
9
|
flex-direction: row;
|
|
10
10
|
justify-content: space-between;
|
|
11
11
|
padding: 0rem 1rem 1rem 1rem;
|
|
12
|
-
border-bottom: 0.125rem solid
|
|
12
|
+
border-bottom: 0.125rem solid
|
|
13
|
+
${({ color }) => {
|
|
14
|
+
return color ? color : `${BmPrimaryBlue}`;
|
|
15
|
+
}};
|
|
13
16
|
`;
|
|
14
17
|
|
|
15
|
-
export const BmListHeader = ({
|
|
18
|
+
export const BmListHeader = ({
|
|
19
|
+
children,
|
|
20
|
+
trailingIcon,
|
|
21
|
+
size,
|
|
22
|
+
color,
|
|
23
|
+
...rest
|
|
24
|
+
}) => {
|
|
16
25
|
return (
|
|
17
|
-
<Container>
|
|
26
|
+
<Container color={color} {...rest}>
|
|
18
27
|
{children}
|
|
19
28
|
{trailingIcon && (
|
|
20
29
|
<BmIcons
|
|
21
30
|
icon={trailingIcon}
|
|
22
|
-
color={color || `${BmPrimaryBlack}`
|
|
23
|
-
size={size ||
|
|
31
|
+
color={color || `${BmPrimaryBlack}`}
|
|
32
|
+
size={size || "large"}
|
|
24
33
|
/>
|
|
25
34
|
)}
|
|
26
35
|
</Container>
|
|
@@ -4,9 +4,10 @@ import { BmPrimaryBlue } from "../colors";
|
|
|
4
4
|
import { p } from "../text";
|
|
5
5
|
import { darken } from "polished";
|
|
6
6
|
|
|
7
|
+
//TODO: To be fixed for hover states
|
|
7
8
|
export const BmRouteLink = styled(Link)`
|
|
8
9
|
${p}
|
|
9
|
-
color: ${(props) => (props.color ? props.color : `${BmPrimaryBlue} `)};
|
|
10
|
+
color: ${(props) => (props.color ? props.color : `${BmPrimaryBlue} `)} !important;
|
|
10
11
|
text-decoration: none;
|
|
11
12
|
&:hover,
|
|
12
13
|
&:focus,
|