beem-component 1.3.5 → 1.3.8
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.
- package/dist/components/BannerCard/bannerCards.js +12 -9
- package/dist/components/Buttons/Stories/basicbutton.stories.js +14 -1
- package/dist/components/Buttons/buttonIconsOnly.js +10 -7
- package/dist/components/Buttons/buttons.js +34 -27
- package/dist/components/Lists/listHeader.stories.js +1 -1
- package/dist/components/Lists/listheader.js +23 -8
- package/dist/components/RouteLink/link.js +2 -1
- package/dist/components/dropdownButton.js +13 -19
- package/dist/components/iconStyles.js +5 -6
- package/dist/components/text.js +4 -2
- package/package.json +1 -1
- package/src/App.js +24 -2
- package/src/lib/components/BannerCard/bannerCards.js +3 -1
- package/src/lib/components/Buttons/Stories/basicbutton.stories.js +13 -0
- package/src/lib/components/Buttons/buttonIconsOnly.js +8 -8
- package/src/lib/components/Buttons/buttons.js +32 -28
- package/src/lib/components/Lists/listHeader.stories.js +1 -1
- package/src/lib/components/Lists/listheader.js +14 -5
- package/src/lib/components/RouteLink/link.js +2 -1
- package/src/lib/components/dropdownButton.js +9 -18
- package/src/lib/components/iconStyles.js +5 -6
- package/src/lib/components/text.js +7 -1
|
@@ -61,9 +61,12 @@ var BannerCardWrapper = _styledComponents.default.div(_templateObject || (_templ
|
|
|
61
61
|
if (border === "dashed") return "dashed";
|
|
62
62
|
if (border === "solid") return "solid";
|
|
63
63
|
return "none";
|
|
64
|
-
},
|
|
65
|
-
var
|
|
66
|
-
|
|
64
|
+
}, function (_ref3) {
|
|
65
|
+
var color = _ref3.color;
|
|
66
|
+
return color ? color : _colors.BmPrimaryBlue;
|
|
67
|
+
}, function (_ref4) {
|
|
68
|
+
var content = _ref4.content,
|
|
69
|
+
closeButton = _ref4.closeButton;
|
|
67
70
|
|
|
68
71
|
if (!closeButton) {
|
|
69
72
|
if (content === "center") return "center";
|
|
@@ -71,8 +74,8 @@ var BannerCardWrapper = _styledComponents.default.div(_templateObject || (_templ
|
|
|
71
74
|
if (content === "right") return "flex-end";
|
|
72
75
|
return "center";
|
|
73
76
|
}
|
|
74
|
-
}, function (
|
|
75
|
-
var bannerBg =
|
|
77
|
+
}, function (_ref5) {
|
|
78
|
+
var bannerBg = _ref5.bannerBg;
|
|
76
79
|
if (bannerBg === "default") return "".concat(_colors.BmGrey50);
|
|
77
80
|
if (!bannerBg) return "none";
|
|
78
81
|
return bannerBg;
|
|
@@ -80,10 +83,10 @@ var BannerCardWrapper = _styledComponents.default.div(_templateObject || (_templ
|
|
|
80
83
|
|
|
81
84
|
var BannerComponent = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n"])));
|
|
82
85
|
|
|
83
|
-
var BmBanner = function BmBanner(
|
|
84
|
-
var closeButton =
|
|
85
|
-
children =
|
|
86
|
-
rest = _objectWithoutProperties(
|
|
86
|
+
var BmBanner = function BmBanner(_ref6) {
|
|
87
|
+
var closeButton = _ref6.closeButton,
|
|
88
|
+
children = _ref6.children,
|
|
89
|
+
rest = _objectWithoutProperties(_ref6, _excluded);
|
|
87
90
|
|
|
88
91
|
var _useState = (0, _react.useState)(true),
|
|
89
92
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.BasicButton = void 0;
|
|
6
|
+
exports.default = exports.ColoredButton = exports.BasicButton = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -44,6 +44,9 @@ var _default = {
|
|
|
44
44
|
trailingIcon: {
|
|
45
45
|
description: "Material UI Icons"
|
|
46
46
|
},
|
|
47
|
+
color: {
|
|
48
|
+
description: "Color of the Button"
|
|
49
|
+
},
|
|
47
50
|
children: {
|
|
48
51
|
description: "Text of the button",
|
|
49
52
|
default: "Button"
|
|
@@ -64,4 +67,14 @@ BasicButton.args = {
|
|
|
64
67
|
children: "Button",
|
|
65
68
|
leadingIcon: /*#__PURE__*/_react.default.createElement(_icons.Home, null),
|
|
66
69
|
trailingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null)
|
|
70
|
+
};
|
|
71
|
+
var ColoredButton = MainButton.bind({});
|
|
72
|
+
exports.ColoredButton = ColoredButton;
|
|
73
|
+
ColoredButton.args = {
|
|
74
|
+
variant: "primary",
|
|
75
|
+
size: "large",
|
|
76
|
+
children: "Button",
|
|
77
|
+
leadingIcon: /*#__PURE__*/_react.default.createElement(_icons.Home, null),
|
|
78
|
+
trailingIcon: /*#__PURE__*/_react.default.createElement(_icons.Favorite, null),
|
|
79
|
+
color: "pink"
|
|
67
80
|
};
|
|
@@ -31,7 +31,8 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
31
31
|
|
|
32
32
|
var BeemButtonIcon = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n background: ", ";\n border: 0.071rem solid\n ", ";\n box-sizing: border-box;\n border-radius: 0.25rem;\n padding: 0rem;\n"])), function (_ref) {
|
|
33
33
|
var variant = _ref.variant,
|
|
34
|
-
disabled = _ref.disabled
|
|
34
|
+
disabled = _ref.disabled,
|
|
35
|
+
color = _ref.color;
|
|
35
36
|
|
|
36
37
|
if (!disabled) {
|
|
37
38
|
if (variant === "active") return "".concat(_colors.BmPrimaryBlue);
|
|
@@ -39,16 +40,17 @@ var BeemButtonIcon = _styledComponents.default.button(_templateObject || (_templ
|
|
|
39
40
|
if (variant === "destructive") return "".concat(_colors.BmSecondaryRed);
|
|
40
41
|
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
41
42
|
if (variant === "neutral") return "".concat(_colors.BmPrimaryWhite);
|
|
42
|
-
if (variant === "primary") return "".concat(_colors.BmPrimaryBlue);
|
|
43
|
+
if (variant === "primary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
43
44
|
if (variant === "secondary") return "".concat(_colors.BmPrimaryWhite);
|
|
44
45
|
if (variant === "tertiary") return "".concat(_colors.BmPrimaryWhite);
|
|
45
|
-
return "".concat(_colors.BmPrimaryBlue);
|
|
46
|
+
return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
46
47
|
} else {
|
|
47
48
|
return "".concat(_colors.BmGrey100);
|
|
48
49
|
}
|
|
49
50
|
}, function (_ref2) {
|
|
50
51
|
var variant = _ref2.variant,
|
|
51
|
-
disabled = _ref2.disabled
|
|
52
|
+
disabled = _ref2.disabled,
|
|
53
|
+
color = _ref2.color;
|
|
52
54
|
|
|
53
55
|
if (!disabled) {
|
|
54
56
|
if (variant === "active") return "".concat(_colors.BmPrimaryBlue);
|
|
@@ -56,10 +58,10 @@ var BeemButtonIcon = _styledComponents.default.button(_templateObject || (_templ
|
|
|
56
58
|
if (variant === "destructive") return "".concat(_colors.BmSecondaryRed);
|
|
57
59
|
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
58
60
|
if (variant === "neutral") return "".concat(_colors.BmGrey400);
|
|
59
|
-
if (variant === "primary") return "".concat(_colors.BmPrimaryBlue);
|
|
60
|
-
if (variant === "secondary") return "".concat(_colors.BmPrimaryBlue);
|
|
61
|
+
if (variant === "primary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
62
|
+
if (variant === "secondary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
61
63
|
if (variant === "tertiary") return "".concat(_colors.BmPrimaryWhite);
|
|
62
|
-
return "".concat(_colors.BmPrimaryBlue);
|
|
64
|
+
return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
63
65
|
} else {
|
|
64
66
|
return "".concat(_colors.BmGrey100);
|
|
65
67
|
}
|
|
@@ -79,6 +81,7 @@ var BmBtnIcon = function BmBtnIcon(props) {
|
|
|
79
81
|
rest = _objectWithoutProperties(props, _excluded);
|
|
80
82
|
|
|
81
83
|
return /*#__PURE__*/_react.default.createElement(BeemButtonIcon, _extends({
|
|
84
|
+
color: color,
|
|
82
85
|
size: size,
|
|
83
86
|
variant: variant,
|
|
84
87
|
disabled: disabled
|
|
@@ -11,6 +11,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
11
11
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
|
|
14
|
+
var _polished = require("polished");
|
|
15
|
+
|
|
14
16
|
var _colors = require("../colors");
|
|
15
17
|
|
|
16
18
|
var _iconStyles = require("../iconStyles");
|
|
@@ -41,15 +43,14 @@ var ButtonText = _styledComponents.default.div(_templateObject || (_templateObje
|
|
|
41
43
|
var variant = _ref2.variant,
|
|
42
44
|
disabled = _ref2.disabled,
|
|
43
45
|
color = _ref2.color;
|
|
44
|
-
if (color) return color;
|
|
45
46
|
|
|
46
47
|
if (!disabled) {
|
|
47
48
|
if (variant === "primary") return "".concat(_colors.BmPrimaryWhite);
|
|
48
|
-
if (variant === "secondary") return "".concat(_colors.BmPrimaryBlue);
|
|
49
|
-
if (variant === "tertiary") return "".concat(_colors.BmPrimaryBlue);
|
|
49
|
+
if (variant === "secondary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
50
|
+
if (variant === "tertiary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
50
51
|
if (variant === "destructive") return "".concat(_colors.BmPrimaryWhite);
|
|
51
52
|
if (variant === "success") return "".concat(_colors.BmPrimaryWhite);
|
|
52
|
-
if (variant === "neutral") return "".concat(_colors.BmPrimaryBlue);
|
|
53
|
+
if (variant === "neutral") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
53
54
|
return "".concat(_colors.BmPrimaryWhite);
|
|
54
55
|
} else {
|
|
55
56
|
return "".concat(_colors.BmGrey400);
|
|
@@ -64,16 +65,17 @@ var BeemButton = _styledComponents.default.button(_templateObject2 || (_template
|
|
|
64
65
|
return "0.625rem 1.5rem";
|
|
65
66
|
}, function (_ref4) {
|
|
66
67
|
var variant = _ref4.variant,
|
|
67
|
-
disabled = _ref4.disabled
|
|
68
|
+
disabled = _ref4.disabled,
|
|
69
|
+
color = _ref4.color;
|
|
68
70
|
|
|
69
71
|
if (!disabled) {
|
|
70
|
-
if (variant === "primary") return "".concat(_colors.BmPrimaryBlue);
|
|
72
|
+
if (variant === "primary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
71
73
|
if (variant === "secondary") return "none";
|
|
72
74
|
if (variant === "tertiary") return "none";
|
|
73
75
|
if (variant === "destructive") return "".concat(_colors.BmSecondaryRed);
|
|
74
76
|
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
75
77
|
if (variant === "neutral") return "".concat(_colors.BmPrimaryWhite);
|
|
76
|
-
return "".concat(_colors.BmPrimaryBlue);
|
|
78
|
+
return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
77
79
|
} else {
|
|
78
80
|
if (variant === "primary") return "".concat(_colors.BmGrey100);
|
|
79
81
|
if (variant === "secondary") return "none";
|
|
@@ -82,16 +84,17 @@ var BeemButton = _styledComponents.default.button(_templateObject2 || (_template
|
|
|
82
84
|
}
|
|
83
85
|
}, function (_ref5) {
|
|
84
86
|
var variant = _ref5.variant,
|
|
85
|
-
disabled = _ref5.disabled
|
|
87
|
+
disabled = _ref5.disabled,
|
|
88
|
+
color = _ref5.color;
|
|
86
89
|
|
|
87
90
|
if (!disabled) {
|
|
88
|
-
if (variant === "primary") return "".concat(_colors.BmPrimaryBlue);
|
|
89
|
-
if (variant === "secondary") return "".concat(_colors.BmPrimaryBlue);
|
|
91
|
+
if (variant === "primary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
92
|
+
if (variant === "secondary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
90
93
|
if (variant === "tertiary") return "transparent";
|
|
91
94
|
if (variant === "destructive") return "".concat(_colors.BmSecondaryRed);
|
|
92
95
|
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
93
96
|
if (variant === "neutral") return "".concat(_colors.BmGrey400);
|
|
94
|
-
return "".concat(_colors.BmPrimaryBlue);
|
|
97
|
+
return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
95
98
|
} else {
|
|
96
99
|
if (variant === "primary") return "".concat(_colors.BmGrey100);
|
|
97
100
|
if (variant === "secondary") return "".concat(_colors.BmGrey400);
|
|
@@ -99,39 +102,42 @@ var BeemButton = _styledComponents.default.button(_templateObject2 || (_template
|
|
|
99
102
|
}
|
|
100
103
|
}, function (_ref6) {
|
|
101
104
|
var variant = _ref6.variant,
|
|
102
|
-
disabled = _ref6.disabled
|
|
105
|
+
disabled = _ref6.disabled,
|
|
106
|
+
color = _ref6.color;
|
|
103
107
|
|
|
104
108
|
if (!disabled) {
|
|
105
|
-
if (variant === "primary") return "".concat(_colors.
|
|
109
|
+
if (variant === "primary") return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
|
|
106
110
|
if (variant === "neutral") return "".concat(_colors.BmGrey50);
|
|
107
111
|
if (variant === "success") return "".concat(_colors.BmSecondaryGreen8);
|
|
108
112
|
if (variant === "destructive") return "".concat(_colors.BmSecondaryRed8);
|
|
109
113
|
|
|
110
114
|
if (!variant) {
|
|
111
|
-
return "".concat(_colors.
|
|
115
|
+
return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
|
|
112
116
|
}
|
|
113
117
|
}
|
|
114
118
|
}, function (_ref7) {
|
|
115
119
|
var variant = _ref7.variant,
|
|
116
|
-
disabled = _ref7.disabled
|
|
120
|
+
disabled = _ref7.disabled,
|
|
121
|
+
color = _ref7.color;
|
|
117
122
|
|
|
118
123
|
if (!disabled) {
|
|
119
|
-
if (variant === "secondary") return "".concat(_colors.
|
|
124
|
+
if (variant === "secondary") return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
return "none";
|
|
123
128
|
}, function (_ref8) {
|
|
124
129
|
var variant = _ref8.variant,
|
|
125
|
-
disabled = _ref8.disabled
|
|
130
|
+
disabled = _ref8.disabled,
|
|
131
|
+
color = _ref8.color;
|
|
126
132
|
|
|
127
133
|
if (!disabled) {
|
|
128
|
-
if (variant === "primary") return "".concat(_colors.BmPrimaryBlue);
|
|
134
|
+
if (variant === "primary") return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
|
|
129
135
|
if (variant === "neutral") return "".concat(_colors.BmGrey100);
|
|
130
136
|
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
131
137
|
if (variant === "destructive") return "".concat(_colors.BmSecondaryRed);
|
|
132
138
|
|
|
133
139
|
if (!variant) {
|
|
134
|
-
return "".concat(_colors.BmPrimaryBlue);
|
|
140
|
+
return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
|
|
135
141
|
}
|
|
136
142
|
}
|
|
137
143
|
}, function (_ref9) {
|
|
@@ -147,28 +153,29 @@ var BeemButton = _styledComponents.default.button(_templateObject2 || (_template
|
|
|
147
153
|
}
|
|
148
154
|
}, function (_ref10) {
|
|
149
155
|
var variant = _ref10.variant,
|
|
150
|
-
disabled = _ref10.disabled
|
|
156
|
+
disabled = _ref10.disabled,
|
|
157
|
+
color = _ref10.color;
|
|
151
158
|
|
|
152
159
|
if (!disabled) {
|
|
153
|
-
if (variant === "secondary") return "".concat(_colors.BmPrimaryBlue);
|
|
160
|
+
if (variant === "secondary") return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
|
|
154
161
|
}
|
|
155
162
|
|
|
156
163
|
return "none";
|
|
157
164
|
}, ButtonText, function (_ref11) {
|
|
158
165
|
var variant = _ref11.variant,
|
|
159
|
-
disabled = _ref11.disabled
|
|
166
|
+
disabled = _ref11.disabled,
|
|
167
|
+
color = _ref11.color;
|
|
160
168
|
|
|
161
169
|
if (!disabled) {
|
|
162
|
-
if (variant === "secondary") return "".concat(_colors.
|
|
163
|
-
if (variant === "tertiary") return "".concat(_colors.BmSecondaryCyan);
|
|
170
|
+
if (variant === "secondary" || variant === "tertiary") return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
|
|
164
171
|
}
|
|
165
172
|
}, ButtonText, function (_ref12) {
|
|
166
173
|
var variant = _ref12.variant,
|
|
167
|
-
disabled = _ref12.disabled
|
|
174
|
+
disabled = _ref12.disabled,
|
|
175
|
+
color = _ref12.color;
|
|
168
176
|
|
|
169
177
|
if (!disabled) {
|
|
170
|
-
if (variant === "secondary") return "".concat(_colors.BmPrimaryBlue);
|
|
171
|
-
if (variant === "tertiary") return "".concat(_colors.BmPrimaryBlue);
|
|
178
|
+
if (variant === "secondary" || variant === "tertiary") return "".concat((0, _polished.darken)(0.1, color ? color : _colors.BmPrimaryBlue));
|
|
172
179
|
}
|
|
173
180
|
});
|
|
174
181
|
|
|
@@ -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));
|
|
@@ -35,16 +35,17 @@ var Wrapper = _styledComponents.default.div(_templateObject || (_templateObject
|
|
|
35
35
|
|
|
36
36
|
var Drop = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border: 0.071rem solid\n ", ";\n border-left: 0.071rem solid\n ", ";\n border-top-left-radius: 0.071rem; */}\n border-bottom-left-radius: 0.071rem; */}\n padding: 0rem */}\n"])), function (_ref) {
|
|
37
37
|
var variant = _ref.variant,
|
|
38
|
-
disabled = _ref.disabled
|
|
38
|
+
disabled = _ref.disabled,
|
|
39
|
+
color = _ref.color;
|
|
39
40
|
|
|
40
41
|
if (!disabled) {
|
|
41
|
-
if (variant === "primary") return "".concat(_colors.BmPrimaryBlue);
|
|
42
|
+
if (variant === "primary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
42
43
|
if (variant === "secondary") return "none";
|
|
43
44
|
if (variant === "tertiary") return "none";
|
|
44
45
|
if (variant === "destructive") return "".concat(_colors.BmSecondaryRed);
|
|
45
46
|
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
46
47
|
if (variant === "neutral") return "".concat(_colors.BmPrimaryWhite);
|
|
47
|
-
return "".concat(_colors.BmPrimaryBlue);
|
|
48
|
+
return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
48
49
|
} else {
|
|
49
50
|
if (variant === "primary") return "".concat(_colors.BmGrey100);
|
|
50
51
|
if (variant === "secondary") return "none";
|
|
@@ -53,16 +54,17 @@ var Drop = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon)(_templateO
|
|
|
53
54
|
}
|
|
54
55
|
}, function (_ref2) {
|
|
55
56
|
var variant = _ref2.variant,
|
|
56
|
-
disabled = _ref2.disabled
|
|
57
|
+
disabled = _ref2.disabled,
|
|
58
|
+
color = _ref2.color;
|
|
57
59
|
|
|
58
60
|
if (!disabled) {
|
|
59
|
-
if (variant === "primary") return "".concat(_colors.BmPrimaryBlue);
|
|
60
|
-
if (variant === "secondary") return "".concat(_colors.BmPrimaryBlue);
|
|
61
|
+
if (variant === "primary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
62
|
+
if (variant === "secondary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
61
63
|
if (variant === "tertiary") return "transparent";
|
|
62
64
|
if (variant === "destructive") return "".concat(_colors.BmSecondaryRed);
|
|
63
65
|
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
64
66
|
if (variant === "neutral") return "".concat(_colors.BmGrey400);
|
|
65
|
-
return "".concat(_colors.BmPrimaryBlue);
|
|
67
|
+
return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
66
68
|
} else {
|
|
67
69
|
if (variant === "primary") return "".concat(_colors.BmGrey100);
|
|
68
70
|
if (variant === "secondary") return "".concat(_colors.BmGrey400);
|
|
@@ -70,11 +72,12 @@ var Drop = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon)(_templateO
|
|
|
70
72
|
}
|
|
71
73
|
}, function (_ref3) {
|
|
72
74
|
var variant = _ref3.variant,
|
|
73
|
-
disabled = _ref3.disabled
|
|
75
|
+
disabled = _ref3.disabled,
|
|
76
|
+
color = _ref3.color;
|
|
74
77
|
|
|
75
78
|
if (!disabled) {
|
|
76
79
|
if (variant === "primary") return "".concat(_colors.BmPrimaryWhite);
|
|
77
|
-
if (variant === "secondary") return "".concat(_colors.BmPrimaryBlue);
|
|
80
|
+
if (variant === "secondary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
78
81
|
if (variant === "tertiary") return "transparent";
|
|
79
82
|
if (variant === "destructive") return "".concat(_colors.BmSecondaryRed);
|
|
80
83
|
if (variant === "success") return "".concat(_colors.BmSecondaryDarkGreen);
|
|
@@ -87,16 +90,7 @@ var Drop = (0, _styledComponents.default)(_buttonIconsOnly.BmBtnIcon)(_templateO
|
|
|
87
90
|
}
|
|
88
91
|
});
|
|
89
92
|
exports.Drop = Drop;
|
|
90
|
-
var Button = (0, _styledComponents.default)(_buttons.BmButton)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-top-right-radius: 0.071rem; */}\n border-bottom-right-radius: 0.071rem; */}\n
|
|
91
|
-
/* padding: 0.714rem 1.143rem 0.714rem 1.714rem; */
|
|
92
|
-
, ""
|
|
93
|
-
/* padding: ${({ size }) => {
|
|
94
|
-
if (size === "large") return "0.714rem 1.714rem";
|
|
95
|
-
if (size === "medium") return "0.5rem 1.143rem";
|
|
96
|
-
if (size === "small") return "0.429rem 0.857rem";
|
|
97
|
-
return "0.714rem 1.714rem";
|
|
98
|
-
}}; */
|
|
99
|
-
);
|
|
93
|
+
var Button = (0, _styledComponents.default)(_buttons.BmButton)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-top-right-radius: 0.071rem; */}\n border-bottom-right-radius: 0.071rem; */}\n border-radius: none;\n border-right: none;\n"])));
|
|
100
94
|
exports.Button = Button;
|
|
101
95
|
|
|
102
96
|
var BmButtonDropDown = function BmButtonDropDown(_ref4) {
|
|
@@ -40,17 +40,16 @@ var ButtonIcon = {
|
|
|
40
40
|
var variant = _ref.variant,
|
|
41
41
|
disabled = _ref.disabled,
|
|
42
42
|
color = _ref.color;
|
|
43
|
-
if (color) return color;
|
|
44
43
|
|
|
45
44
|
if (!disabled) {
|
|
46
45
|
if (variant === "active") return "".concat(_colors.BmPrimaryWhite);
|
|
47
46
|
if (variant === "enabled") return "".concat(_colors.BmPrimaryBlack);
|
|
48
47
|
if (variant === "destructive") return "".concat(_colors.BmPrimaryWhite);
|
|
49
48
|
if (variant === "success") return "".concat(_colors.BmPrimaryWhite);
|
|
50
|
-
if (variant === "neutral") return "".concat(_colors.BmPrimaryBlue);
|
|
49
|
+
if (variant === "neutral") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
51
50
|
if (variant === "primary") return "".concat(_colors.BmPrimaryWhite);
|
|
52
|
-
if (variant === "secondary") return "".concat(_colors.BmPrimaryBlue);
|
|
53
|
-
if (variant === "tertiary") return "".concat(_colors.BmPrimaryBlue);
|
|
51
|
+
if (variant === "secondary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
52
|
+
if (variant === "tertiary") return "".concat(color ? color : _colors.BmPrimaryBlue);
|
|
54
53
|
return "".concat(_colors.BmPrimaryWhite);
|
|
55
54
|
} else {
|
|
56
55
|
return "".concat(_colors.BmGrey400);
|
|
@@ -69,8 +68,8 @@ var ButtonIcon = {
|
|
|
69
68
|
if (variant === "success") return "".concat(_colors.BmPrimaryWhite);
|
|
70
69
|
if (variant === "neutral") return "".concat(_colors.BmPrimaryBlue);
|
|
71
70
|
if (variant === "primary") return "".concat(_colors.BmPrimaryWhite);
|
|
72
|
-
if (variant === "secondary") return "".concat(_colors.BmPrimaryBlue);
|
|
73
|
-
if (variant === "tertiary") return "".concat(_colors.BmPrimaryBlue);
|
|
71
|
+
if (variant === "secondary") return "".concat(_color ? _color : _colors.BmPrimaryBlue);
|
|
72
|
+
if (variant === "tertiary") return "".concat(_color ? _color : _colors.BmPrimaryBlue);
|
|
74
73
|
return "".concat(_colors.BmPrimaryWhite);
|
|
75
74
|
} else {
|
|
76
75
|
return "".concat(_colors.BmGrey400);
|
package/dist/components/text.js
CHANGED
|
@@ -3,18 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.p = exports.input = exports.h4 = exports.h3 = exports.h2 = exports.h1 = exports.a = void 0;
|
|
6
|
+
exports.p = exports.input = exports.h5 = exports.h4 = exports.h3 = exports.h2 = exports.h1 = exports.a = void 0;
|
|
7
7
|
|
|
8
8
|
var _typography = require("./typography");
|
|
9
9
|
|
|
10
10
|
var h1 = "font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 2.571rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
11
11
|
exports.h1 = h1;
|
|
12
|
-
var h2 = "font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1.714rem;\
|
|
12
|
+
var h2 = "font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1.714rem;\nletter-spacing: -0.02em;\nmargin: 0rem;");
|
|
13
13
|
exports.h2 = h2;
|
|
14
14
|
var h3 = "font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1.286rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
15
15
|
exports.h3 = h3;
|
|
16
16
|
var h4 = " font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
17
17
|
exports.h4 = h4;
|
|
18
|
+
var h5 = " font-family: ".concat(_typography.PoppinsMedium, ";\nfont-style: normal;\nfont-weight: 500;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
19
|
+
exports.h5 = h5;
|
|
18
20
|
var p = "font-family: ".concat(_typography.OpenSans, ";\nfont-style: normal;\nfont-weight: normal;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
19
21
|
exports.p = p;
|
|
20
22
|
var input = " font-family: ".concat(_typography.OpenSans, ";\nfont-style: normal;\nfont-weight: normal;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
package/package.json
CHANGED
package/src/App.js
CHANGED
|
@@ -7,12 +7,14 @@ import {
|
|
|
7
7
|
BmNoteBar,
|
|
8
8
|
BmTab,
|
|
9
9
|
BmAccordion,
|
|
10
|
+
BmBtnIcon,
|
|
10
11
|
MainWrapper,
|
|
12
|
+
BmButtonDropDown,
|
|
11
13
|
} from "./lib/components";
|
|
12
14
|
import { GlobalStyle } from "./lib/components/globalStyles";
|
|
13
15
|
import "./lib/assets/css/sidebar.scss";
|
|
14
16
|
import BmBanner from "./lib/components/BannerCard/bannerCards";
|
|
15
|
-
import { FileCopyOutlined } from "@material-ui/icons";
|
|
17
|
+
import { FileCopyOutlined, Home } from "@material-ui/icons";
|
|
16
18
|
import BmProgressRing from "./lib/components/ProgressRing/progressRing";
|
|
17
19
|
|
|
18
20
|
export const App = () => {
|
|
@@ -20,7 +22,27 @@ export const App = () => {
|
|
|
20
22
|
<>
|
|
21
23
|
<GlobalStyle />
|
|
22
24
|
{/* <MainWrapper> */}
|
|
23
|
-
<
|
|
25
|
+
<BmButtonDropDown color="green">Hello</BmButtonDropDown>
|
|
26
|
+
<BmNoteBar type="warning" color="purple">
|
|
27
|
+
Hello
|
|
28
|
+
</BmNoteBar>
|
|
29
|
+
<BmButton color="purple" variant="neutral" leadingIcon={<Home />}>
|
|
30
|
+
Hello
|
|
31
|
+
</BmButton>
|
|
32
|
+
<BmBtnIcon icon={<Home />} color="red" />
|
|
33
|
+
<BmButton color="pink" variant="secondary">
|
|
34
|
+
Hello
|
|
35
|
+
</BmButton>
|
|
36
|
+
<BmButton color="pink" variant="tertiary" disabled>
|
|
37
|
+
Hello
|
|
38
|
+
</BmButton>
|
|
39
|
+
<BmBanner
|
|
40
|
+
border="dashed"
|
|
41
|
+
content="center"
|
|
42
|
+
bannerBg="default"
|
|
43
|
+
closeButton
|
|
44
|
+
color="red"
|
|
45
|
+
>
|
|
24
46
|
<BmIcons icon={<FileCopyOutlined />} />
|
|
25
47
|
<h3>Message Title</h3>
|
|
26
48
|
<p>Message Text</p>
|
|
@@ -19,7 +19,9 @@ const BannerCardWrapper = styled.div`
|
|
|
19
19
|
if (border === "solid") return "solid";
|
|
20
20
|
return "none";
|
|
21
21
|
}}
|
|
22
|
-
${
|
|
22
|
+
${({ color }) => {
|
|
23
|
+
return color ? color : BmPrimaryBlue;
|
|
24
|
+
}};
|
|
23
25
|
border-radius: 0.25rem;
|
|
24
26
|
align-items: ${({ content, closeButton }) => {
|
|
25
27
|
if (!closeButton) {
|
|
@@ -32,6 +32,9 @@ export default {
|
|
|
32
32
|
trailingIcon: {
|
|
33
33
|
description: "Material UI Icons",
|
|
34
34
|
},
|
|
35
|
+
color: {
|
|
36
|
+
description: "Color of the Button",
|
|
37
|
+
},
|
|
35
38
|
children: {
|
|
36
39
|
description: "Text of the button",
|
|
37
40
|
default: "Button",
|
|
@@ -49,3 +52,13 @@ BasicButton.args = {
|
|
|
49
52
|
leadingIcon: <Home />,
|
|
50
53
|
trailingIcon: <Favorite />,
|
|
51
54
|
};
|
|
55
|
+
|
|
56
|
+
export const ColoredButton = MainButton.bind({});
|
|
57
|
+
ColoredButton.args = {
|
|
58
|
+
variant: "primary",
|
|
59
|
+
size: "large",
|
|
60
|
+
children: "Button",
|
|
61
|
+
leadingIcon: <Home />,
|
|
62
|
+
trailingIcon: <Favorite />,
|
|
63
|
+
color: "pink",
|
|
64
|
+
};
|
|
@@ -18,33 +18,33 @@ const BeemButtonIcon = styled.button`
|
|
|
18
18
|
flex-direction: row;
|
|
19
19
|
align-items: center;
|
|
20
20
|
justify-content: center;
|
|
21
|
-
background: ${({ variant, disabled }) => {
|
|
21
|
+
background: ${({ variant, disabled, color }) => {
|
|
22
22
|
if (!disabled) {
|
|
23
23
|
if (variant === "active") return `${BmPrimaryBlue}`;
|
|
24
24
|
if (variant === "enabled") return `${BmGrey50}`;
|
|
25
25
|
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
26
26
|
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
27
27
|
if (variant === "neutral") return `${BmPrimaryWhite}`;
|
|
28
|
-
if (variant === "primary") return `${BmPrimaryBlue}`;
|
|
28
|
+
if (variant === "primary") return `${color ? color : BmPrimaryBlue}`;
|
|
29
29
|
if (variant === "secondary") return `${BmPrimaryWhite}`;
|
|
30
30
|
if (variant === "tertiary") return `${BmPrimaryWhite}`;
|
|
31
|
-
return `${BmPrimaryBlue}`;
|
|
31
|
+
return `${color ? color : BmPrimaryBlue}`;
|
|
32
32
|
} else {
|
|
33
33
|
return `${BmGrey100}`;
|
|
34
34
|
}
|
|
35
35
|
}};
|
|
36
36
|
border: 0.071rem solid
|
|
37
|
-
${({ variant, disabled }) => {
|
|
37
|
+
${({ variant, disabled, color }) => {
|
|
38
38
|
if (!disabled) {
|
|
39
39
|
if (variant === "active") return `${BmPrimaryBlue}`;
|
|
40
40
|
if (variant === "enabled") return `${BmGrey50}`;
|
|
41
41
|
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
42
42
|
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
43
43
|
if (variant === "neutral") return `${BmGrey400}`;
|
|
44
|
-
if (variant === "primary") return `${BmPrimaryBlue}`;
|
|
45
|
-
if (variant === "secondary") return `${BmPrimaryBlue}`;
|
|
44
|
+
if (variant === "primary") return `${color ? color : BmPrimaryBlue}`;
|
|
45
|
+
if (variant === "secondary") return `${color ? color : BmPrimaryBlue}`;
|
|
46
46
|
if (variant === "tertiary") return `${BmPrimaryWhite}`;
|
|
47
|
-
return `${BmPrimaryBlue}`;
|
|
47
|
+
return `${color ? color : BmPrimaryBlue}`;
|
|
48
48
|
} else {
|
|
49
49
|
return `${BmGrey100}`;
|
|
50
50
|
}
|
|
@@ -62,7 +62,7 @@ export const BmBtnIcon = (props) => {
|
|
|
62
62
|
const { variant, size, disabled, children, icon, color, ...rest } = props;
|
|
63
63
|
|
|
64
64
|
return (
|
|
65
|
-
<BeemButtonIcon size={size} variant={variant} disabled={disabled} {...rest}>
|
|
65
|
+
<BeemButtonIcon color={color} size={size} variant={variant} disabled={disabled} {...rest}>
|
|
66
66
|
{icon && (
|
|
67
67
|
<BmIconWrapper>
|
|
68
68
|
<BmButtonIcon
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
|
+
import { darken } from "polished";
|
|
5
|
+
|
|
4
6
|
//TODO: Button Links Pending
|
|
5
7
|
import {
|
|
6
8
|
BmPrimaryWhite,
|
|
@@ -10,7 +12,6 @@ import {
|
|
|
10
12
|
BmGrey400,
|
|
11
13
|
BmGrey100,
|
|
12
14
|
BmGrey50,
|
|
13
|
-
BmSecondaryCyan,
|
|
14
15
|
BmSecondaryGreen8,
|
|
15
16
|
BmSecondaryRed8,
|
|
16
17
|
} from "../colors";
|
|
@@ -26,14 +27,13 @@ const ButtonText = styled.div`
|
|
|
26
27
|
}}
|
|
27
28
|
text-align: center;
|
|
28
29
|
color: ${({ variant, disabled, color }) => {
|
|
29
|
-
if (color) return color;
|
|
30
30
|
if (!disabled) {
|
|
31
31
|
if (variant === "primary") return `${BmPrimaryWhite}`;
|
|
32
|
-
if (variant === "secondary") return `${BmPrimaryBlue}
|
|
33
|
-
if (variant === "tertiary") return `${BmPrimaryBlue}
|
|
32
|
+
if (variant === "secondary") return `${color ? color : BmPrimaryBlue}`
|
|
33
|
+
if (variant === "tertiary") return `${color ? color : BmPrimaryBlue}`
|
|
34
34
|
if (variant === "destructive") return `${BmPrimaryWhite}`;
|
|
35
35
|
if (variant === "success") return `${BmPrimaryWhite}`;
|
|
36
|
-
if (variant === "neutral") return `${BmPrimaryBlue}
|
|
36
|
+
if (variant === "neutral") return `${color ? color : BmPrimaryBlue}`
|
|
37
37
|
return `${BmPrimaryWhite}`;
|
|
38
38
|
} else {
|
|
39
39
|
return `${BmGrey400}`;
|
|
@@ -54,15 +54,15 @@ const BeemButton = styled.button`
|
|
|
54
54
|
if (size === "small") return "0.375rem 0.75rem";
|
|
55
55
|
return "0.625rem 1.5rem";
|
|
56
56
|
}};
|
|
57
|
-
background: ${({ variant, disabled }) => {
|
|
57
|
+
background: ${({ variant, disabled, color }) => {
|
|
58
58
|
if (!disabled) {
|
|
59
|
-
if (variant === "primary") return `${BmPrimaryBlue}`;
|
|
59
|
+
if (variant === "primary") return `${color ? color : BmPrimaryBlue}`;
|
|
60
60
|
if (variant === "secondary") return "none";
|
|
61
61
|
if (variant === "tertiary") return "none";
|
|
62
62
|
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
63
63
|
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
64
64
|
if (variant === "neutral") return `${BmPrimaryWhite}`;
|
|
65
|
-
return `${BmPrimaryBlue}`;
|
|
65
|
+
return `${color ? color : BmPrimaryBlue}`;
|
|
66
66
|
} else {
|
|
67
67
|
if (variant === "primary") return `${BmGrey100}`;
|
|
68
68
|
if (variant === "secondary") return "none";
|
|
@@ -72,15 +72,15 @@ const BeemButton = styled.button`
|
|
|
72
72
|
}};
|
|
73
73
|
|
|
74
74
|
border: 0.071rem solid
|
|
75
|
-
${({ variant, disabled }) => {
|
|
75
|
+
${({ variant, disabled, color }) => {
|
|
76
76
|
if (!disabled) {
|
|
77
|
-
if (variant === "primary") return `${BmPrimaryBlue}`;
|
|
78
|
-
if (variant === "secondary") return `${BmPrimaryBlue}`;
|
|
77
|
+
if (variant === "primary") return `${color ? color : BmPrimaryBlue}`;
|
|
78
|
+
if (variant === "secondary") return `${color ? color : BmPrimaryBlue}`;
|
|
79
79
|
if (variant === "tertiary") return "transparent";
|
|
80
80
|
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
81
81
|
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
82
82
|
if (variant === "neutral") return `${BmGrey400}`;
|
|
83
|
-
return `${BmPrimaryBlue}`;
|
|
83
|
+
return `${color ? color : BmPrimaryBlue}`;
|
|
84
84
|
} else {
|
|
85
85
|
if (variant === "primary") return `${BmGrey100}`;
|
|
86
86
|
if (variant === "secondary") return `${BmGrey400}`;
|
|
@@ -89,34 +89,37 @@ const BeemButton = styled.button`
|
|
|
89
89
|
}};
|
|
90
90
|
|
|
91
91
|
&:hover {
|
|
92
|
-
background: ${({ variant, disabled }) => {
|
|
92
|
+
background: ${({ variant, disabled, color }) => {
|
|
93
93
|
if (!disabled) {
|
|
94
|
-
if (variant === "primary")
|
|
94
|
+
if (variant === "primary")
|
|
95
|
+
return `${darken(0.1, color ? color : BmPrimaryBlue)}`;
|
|
95
96
|
if (variant === "neutral") return `${BmGrey50}`;
|
|
96
97
|
if (variant === "success") return `${BmSecondaryGreen8}`;
|
|
97
98
|
if (variant === "destructive") return `${BmSecondaryRed8}`;
|
|
98
99
|
if (!variant) {
|
|
99
|
-
return `${
|
|
100
|
+
return `${darken(0.1, color ? color : BmPrimaryBlue)}`;
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
}};
|
|
103
104
|
border: 0.071rem solid
|
|
104
|
-
${({ variant, disabled }) => {
|
|
105
|
+
${({ variant, disabled, color }) => {
|
|
105
106
|
if (!disabled) {
|
|
106
|
-
if (variant === "secondary")
|
|
107
|
+
if (variant === "secondary")
|
|
108
|
+
return `${darken(0.1, color ? color : BmPrimaryBlue)}`;
|
|
107
109
|
}
|
|
108
110
|
return "none";
|
|
109
111
|
}};
|
|
110
112
|
}
|
|
111
113
|
&:active {
|
|
112
|
-
background: ${({ variant, disabled }) => {
|
|
114
|
+
background: ${({ variant, disabled, color }) => {
|
|
113
115
|
if (!disabled) {
|
|
114
|
-
if (variant === "primary")
|
|
116
|
+
if (variant === "primary")
|
|
117
|
+
return `${darken(0.1, color ? color : BmPrimaryBlue)}`;
|
|
115
118
|
if (variant === "neutral") return `${BmGrey100}`;
|
|
116
119
|
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
117
120
|
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
118
121
|
if (!variant) {
|
|
119
|
-
return `${BmPrimaryBlue}`;
|
|
122
|
+
return `${darken(0.1, color ? color : BmPrimaryBlue)}`;
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
125
|
}};
|
|
@@ -134,27 +137,28 @@ const BeemButton = styled.button`
|
|
|
134
137
|
}
|
|
135
138
|
}};
|
|
136
139
|
border: 0.071rem solid
|
|
137
|
-
${({ variant, disabled }) => {
|
|
140
|
+
${({ variant, disabled, color }) => {
|
|
138
141
|
if (!disabled) {
|
|
139
|
-
if (variant === "secondary")
|
|
142
|
+
if (variant === "secondary")
|
|
143
|
+
return `${darken(0.1, color ? color : BmPrimaryBlue)}`;
|
|
140
144
|
}
|
|
141
145
|
return "none";
|
|
142
146
|
}};
|
|
143
147
|
}
|
|
144
148
|
|
|
145
149
|
&:hover ${ButtonText} {
|
|
146
|
-
color: ${({ variant, disabled }) => {
|
|
150
|
+
color: ${({ variant, disabled, color }) => {
|
|
147
151
|
if (!disabled) {
|
|
148
|
-
if (variant === "secondary"
|
|
149
|
-
|
|
152
|
+
if (variant === "secondary" || variant === "tertiary")
|
|
153
|
+
return `${darken(0.1, color ? color : BmPrimaryBlue)}`;
|
|
150
154
|
}
|
|
151
155
|
}};
|
|
152
156
|
}
|
|
153
157
|
&:active ${ButtonText} {
|
|
154
|
-
color: ${({ variant, disabled }) => {
|
|
158
|
+
color: ${({ variant, disabled, color }) => {
|
|
155
159
|
if (!disabled) {
|
|
156
|
-
if (variant === "secondary"
|
|
157
|
-
|
|
160
|
+
if (variant === "secondary" || variant === "tertiary")
|
|
161
|
+
return `${darken(0.1, color ? color : BmPrimaryBlue)}`;
|
|
158
162
|
}
|
|
159
163
|
}};
|
|
160
164
|
}
|
|
@@ -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,
|
|
@@ -19,15 +19,15 @@ const Wrapper = styled.div`
|
|
|
19
19
|
`;
|
|
20
20
|
|
|
21
21
|
export const Drop = styled(BmBtnIcon)`
|
|
22
|
-
background: ${({ variant, disabled }) => {
|
|
22
|
+
background: ${({ variant, disabled, color }) => {
|
|
23
23
|
if (!disabled) {
|
|
24
|
-
if (variant === "primary") return `${BmPrimaryBlue}
|
|
24
|
+
if (variant === "primary") return `${color ? color : BmPrimaryBlue}`
|
|
25
25
|
if (variant === "secondary") return "none";
|
|
26
26
|
if (variant === "tertiary") return "none";
|
|
27
27
|
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
28
28
|
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
29
29
|
if (variant === "neutral") return `${BmPrimaryWhite}`;
|
|
30
|
-
return `${BmPrimaryBlue}
|
|
30
|
+
return `${color ? color : BmPrimaryBlue}`
|
|
31
31
|
} else {
|
|
32
32
|
if (variant === "primary") return `${BmGrey100}`;
|
|
33
33
|
if (variant === "secondary") return "none";
|
|
@@ -36,15 +36,15 @@ export const Drop = styled(BmBtnIcon)`
|
|
|
36
36
|
}
|
|
37
37
|
}};
|
|
38
38
|
border: 0.071rem solid
|
|
39
|
-
${({ variant, disabled }) => {
|
|
39
|
+
${({ variant, disabled, color }) => {
|
|
40
40
|
if (!disabled) {
|
|
41
|
-
if (variant === "primary") return `${BmPrimaryBlue}
|
|
42
|
-
if (variant === "secondary") return `${BmPrimaryBlue}
|
|
41
|
+
if (variant === "primary") return `${color ? color : BmPrimaryBlue}`
|
|
42
|
+
if (variant === "secondary") return `${color ? color : BmPrimaryBlue}`
|
|
43
43
|
if (variant === "tertiary") return "transparent";
|
|
44
44
|
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
45
45
|
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
46
46
|
if (variant === "neutral") return `${BmGrey400}`;
|
|
47
|
-
return `${BmPrimaryBlue}
|
|
47
|
+
return `${color ? color : BmPrimaryBlue}`
|
|
48
48
|
} else {
|
|
49
49
|
if (variant === "primary") return `${BmGrey100}`;
|
|
50
50
|
if (variant === "secondary") return `${BmGrey400}`;
|
|
@@ -52,10 +52,10 @@ export const Drop = styled(BmBtnIcon)`
|
|
|
52
52
|
}
|
|
53
53
|
}};
|
|
54
54
|
border-left: 0.071rem solid
|
|
55
|
-
${({ variant, disabled }) => {
|
|
55
|
+
${({ variant, disabled, color }) => {
|
|
56
56
|
if (!disabled) {
|
|
57
57
|
if (variant === "primary") return `${BmPrimaryWhite}`;
|
|
58
|
-
if (variant === "secondary") return `${BmPrimaryBlue}
|
|
58
|
+
if (variant === "secondary") return `${color ? color : BmPrimaryBlue}`
|
|
59
59
|
if (variant === "tertiary") return "transparent";
|
|
60
60
|
if (variant === "destructive") return `${BmSecondaryRed}`;
|
|
61
61
|
if (variant === "success") return `${BmSecondaryDarkGreen}`;
|
|
@@ -75,15 +75,6 @@ export const Drop = styled(BmBtnIcon)`
|
|
|
75
75
|
export const Button = styled(BmButton)`
|
|
76
76
|
border-top-right-radius: 0.071rem; */}
|
|
77
77
|
border-bottom-right-radius: 0.071rem; */}
|
|
78
|
-
${"" /* padding: 0.714rem 1.143rem 0.714rem 1.714rem; */}
|
|
79
|
-
${
|
|
80
|
-
"" /* padding: ${({ size }) => {
|
|
81
|
-
if (size === "large") return "0.714rem 1.714rem";
|
|
82
|
-
if (size === "medium") return "0.5rem 1.143rem";
|
|
83
|
-
if (size === "small") return "0.429rem 0.857rem";
|
|
84
|
-
return "0.714rem 1.714rem";
|
|
85
|
-
}}; */
|
|
86
|
-
}
|
|
87
78
|
border-radius: none;
|
|
88
79
|
border-right: none;
|
|
89
80
|
`;
|
|
@@ -27,16 +27,15 @@ const ButtonIcon = {
|
|
|
27
27
|
height: (props) => size(props),
|
|
28
28
|
width: (props) => size(props),
|
|
29
29
|
fill: ({ variant, disabled, color }) => {
|
|
30
|
-
if (color) return color;
|
|
31
30
|
if (!disabled) {
|
|
32
31
|
if (variant === "active") return `${BmPrimaryWhite}`;
|
|
33
32
|
if (variant === "enabled") return `${BmPrimaryBlack}`;
|
|
34
33
|
if (variant === "destructive") return `${BmPrimaryWhite}`;
|
|
35
34
|
if (variant === "success") return `${BmPrimaryWhite}`;
|
|
36
|
-
if (variant === "neutral") return `${BmPrimaryBlue}`;
|
|
35
|
+
if (variant === "neutral") return `${color ? color : BmPrimaryBlue}`;
|
|
37
36
|
if (variant === "primary") return `${BmPrimaryWhite}`;
|
|
38
|
-
if (variant === "secondary") return `${BmPrimaryBlue}`;
|
|
39
|
-
if (variant === "tertiary") return `${BmPrimaryBlue}`;
|
|
37
|
+
if (variant === "secondary") return `${color ? color : BmPrimaryBlue}`;
|
|
38
|
+
if (variant === "tertiary") return `${color ? color : BmPrimaryBlue}`;
|
|
40
39
|
return `${BmPrimaryWhite}`;
|
|
41
40
|
} else {
|
|
42
41
|
return `${BmGrey400}`;
|
|
@@ -51,8 +50,8 @@ const ButtonIcon = {
|
|
|
51
50
|
if (variant === "success") return `${BmPrimaryWhite}`;
|
|
52
51
|
if (variant === "neutral") return `${BmPrimaryBlue}`;
|
|
53
52
|
if (variant === "primary") return `${BmPrimaryWhite}`;
|
|
54
|
-
if (variant === "secondary") return `${BmPrimaryBlue}`;
|
|
55
|
-
if (variant === "tertiary") return `${BmPrimaryBlue}`;
|
|
53
|
+
if (variant === "secondary") return `${color ? color : BmPrimaryBlue}`;
|
|
54
|
+
if (variant === "tertiary") return `${color ? color : BmPrimaryBlue}`;
|
|
56
55
|
return `${BmPrimaryWhite}`;
|
|
57
56
|
} else {
|
|
58
57
|
return `${BmGrey400}`;
|
|
@@ -11,7 +11,6 @@ export const h2 = `font-family: ${PoppinsMedium};
|
|
|
11
11
|
font-style: normal;
|
|
12
12
|
font-weight: 500;
|
|
13
13
|
font-size: 1.714rem;
|
|
14
|
-
text-align: center;
|
|
15
14
|
letter-spacing: -0.02em;
|
|
16
15
|
margin: 0rem;`;
|
|
17
16
|
|
|
@@ -29,6 +28,13 @@ font-size: 1rem;
|
|
|
29
28
|
letter-spacing: -0.02rem;
|
|
30
29
|
margin: 0rem;`;
|
|
31
30
|
|
|
31
|
+
export const h5 = ` font-family: ${PoppinsMedium};
|
|
32
|
+
font-style: normal;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
font-size: 1rem;
|
|
35
|
+
letter-spacing: -0.02rem;
|
|
36
|
+
margin: 0rem;`;
|
|
37
|
+
|
|
32
38
|
export const p = `font-family: ${OpenSans};
|
|
33
39
|
font-style: normal;
|
|
34
40
|
font-weight: normal;
|