beem-component 0.9.6 → 1.0.0
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/Accordicon.js +51 -0
- package/dist/components/Accordion.js +138 -0
- package/dist/components/CustomerInfo/infoAccordion.js +1 -3
- package/dist/components/CustomerInfo/labelsInfo.js +15 -7
- package/dist/components/Link.js +23 -0
- package/dist/components/Modals/noteModalFooter.js +3 -1
- package/dist/components/globalStyles.js +1 -1
- package/dist/components/index.js +39 -1
- package/dist/components/tags.js +2 -2
- package/dist/components/text.js +4 -2
- package/package.json +3 -2
- package/src/App.js +15 -1
- package/src/examples/CustomerInfo.js +69 -6
- package/src/lib/components/Accordicon.js +43 -0
- package/src/lib/components/Accordion.js +103 -0
- package/src/lib/components/CustomerInfo/infoAccordion.js +0 -1
- package/src/lib/components/CustomerInfo/labelsInfo.js +17 -15
- package/src/lib/components/Link.js +19 -0
- package/src/lib/components/Modals/noteModalFooter.js +1 -1
- package/src/lib/components/globalStyles.js +2 -1
- package/src/lib/components/index.js +17 -1
- package/src/lib/components/tags.js +2 -2
- package/src/lib/components/text.js +7 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BmAccordicon = exports.BmAccordiconDetails = exports.BmAccordiconMenu = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
11
|
+
|
|
12
|
+
var _colors = require("./colors");
|
|
13
|
+
|
|
14
|
+
var _iconStyles = require("./iconStyles");
|
|
15
|
+
|
|
16
|
+
var _excluded = ["children", "isOpen", "dropdown", "trailingIcon"];
|
|
17
|
+
|
|
18
|
+
var _templateObject, _templateObject2;
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
27
|
+
|
|
28
|
+
var BmAccordiconMenu = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n ", "\n padding: 0.571rem 1.143rem;\n background: ", ";\n box-shadow: ", ";\n > *:not(:last-child) {\n margin-right: 0.5rem;\n }\n"])), ""
|
|
29
|
+
/* justify-content: space-between; */
|
|
30
|
+
, _colors.BmPrimaryWhite, function (isOpen) {
|
|
31
|
+
if (isOpen) return "inset 0rem 0.071rem 0rem ".concat(_colors.BmGrey400);
|
|
32
|
+
return "inset 0rem -0.071rem 0rem ".concat(_colors.BmGrey400, ", inset 0rem 0.071rem 0rem ").concat(_colors.BmGrey400, ";");
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
exports.BmAccordiconMenu = BmAccordiconMenu;
|
|
36
|
+
|
|
37
|
+
var BmAccordiconDetails = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
38
|
+
|
|
39
|
+
exports.BmAccordiconDetails = BmAccordiconDetails;
|
|
40
|
+
|
|
41
|
+
var BmAccordicon = function BmAccordicon(_ref) {
|
|
42
|
+
var children = _ref.children,
|
|
43
|
+
isOpen = _ref.isOpen,
|
|
44
|
+
dropdown = _ref.dropdown,
|
|
45
|
+
trailingIcon = _ref.trailingIcon,
|
|
46
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
|
+
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(BmAccordiconMenu, rest, dropdown && (isOpen ? /*#__PURE__*/_react.default.createElement(_iconStyles.BmDropupIcon, rest) : /*#__PURE__*/_react.default.createElement(_iconStyles.BmDropdownIcon, rest)), /*#__PURE__*/_react.default.createElement(BmAccordiconDetails, null, children)));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports.BmAccordicon = BmAccordicon;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
16
|
+
var _colors = require("./colors");
|
|
17
|
+
|
|
18
|
+
var _iconStyles = require("./iconStyles");
|
|
19
|
+
|
|
20
|
+
var _excluded = ["children", "disabled", "expandIcon"],
|
|
21
|
+
_excluded2 = ["children", "leadingIcon", "trailingIcon", "size"];
|
|
22
|
+
|
|
23
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
24
|
+
|
|
25
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
|
+
|
|
27
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
28
|
+
|
|
29
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
30
|
+
|
|
31
|
+
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); }
|
|
32
|
+
|
|
33
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
34
|
+
|
|
35
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
36
|
+
|
|
37
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
38
|
+
|
|
39
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
40
|
+
|
|
41
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
42
|
+
|
|
43
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
44
|
+
|
|
45
|
+
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; }
|
|
46
|
+
|
|
47
|
+
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; }
|
|
48
|
+
|
|
49
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
50
|
+
|
|
51
|
+
var _React$createContext = /*#__PURE__*/_react.default.createContext({}),
|
|
52
|
+
Provider = _React$createContext.Provider,
|
|
53
|
+
Consumer = _React$createContext.Consumer;
|
|
54
|
+
|
|
55
|
+
var Dropdown = function Dropdown(value, rest) {
|
|
56
|
+
if (value.expandIcon && value.expandIcon === "none") {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (!value.expandIcon) {
|
|
61
|
+
return value.toggle ? /*#__PURE__*/_react.default.createElement(_iconStyles.BmDropupIcon, rest) : /*#__PURE__*/_react.default.createElement(_iconStyles.BmDropdownIcon, rest);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if (value.expandIcon && value.expandIcon !== "none") {
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
|
|
66
|
+
icon: value.expandIcon
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var BmAccordionMenu = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n flex-direction: row;\n ", "\n padding: 0.571rem 1.143rem;\n border: 1px solid \n background: ", ";\n > *:not(:last-child) {\n margin-right: 0.5rem;\n }\n"])), ""
|
|
72
|
+
/* padding: 0.571rem; */
|
|
73
|
+
, _colors.BmPrimaryWhite);
|
|
74
|
+
|
|
75
|
+
var BmAccordionDetails = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
76
|
+
|
|
77
|
+
var BmAccordionWrapper = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n"])));
|
|
78
|
+
|
|
79
|
+
var BmAccordion = function BmAccordion(_ref) {
|
|
80
|
+
var children = _ref.children,
|
|
81
|
+
disabled = _ref.disabled,
|
|
82
|
+
expandIcon = _ref.expandIcon,
|
|
83
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
84
|
+
|
|
85
|
+
var _useState = (0, _react.useState)(false),
|
|
86
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
87
|
+
toggle = _useState2[0],
|
|
88
|
+
setToggle = _useState2[1];
|
|
89
|
+
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(BmAccordionWrapper, null, /*#__PURE__*/_react.default.createElement(Provider, {
|
|
91
|
+
value: {
|
|
92
|
+
toggle: toggle,
|
|
93
|
+
setToggle: setToggle,
|
|
94
|
+
disabled: disabled,
|
|
95
|
+
expandIcon: expandIcon
|
|
96
|
+
}
|
|
97
|
+
}, children));
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
BmAccordion.Title = function (_ref2) {
|
|
101
|
+
var children = _ref2.children,
|
|
102
|
+
leadingIcon = _ref2.leadingIcon,
|
|
103
|
+
trailingIcon = _ref2.trailingIcon,
|
|
104
|
+
size = _ref2.size,
|
|
105
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
106
|
+
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement(Consumer, null, function (value) {
|
|
108
|
+
return /*#__PURE__*/_react.default.createElement(BmAccordionMenu, _extends({}, rest, {
|
|
109
|
+
onClick: function onClick() {
|
|
110
|
+
return !value.disabled || value.disabled === false ? value.setToggle(!value.toggle) : value.setToggle(false);
|
|
111
|
+
}
|
|
112
|
+
}), Dropdown(value, rest), leadingIcon && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
|
|
113
|
+
icon: leadingIcon,
|
|
114
|
+
size: size
|
|
115
|
+
}), /*#__PURE__*/_react.default.createElement(BmAccordionDetails, null, children), trailingIcon && /*#__PURE__*/_react.default.createElement(_iconStyles.BmIcons, {
|
|
116
|
+
icon: trailingIcon,
|
|
117
|
+
size: size
|
|
118
|
+
}));
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
BmAccordion.Body = function (_ref3) {
|
|
123
|
+
var children = _ref3.children;
|
|
124
|
+
return /*#__PURE__*/_react.default.createElement(Consumer, null, function (value) {
|
|
125
|
+
return value.toggle && /*#__PURE__*/_react.default.createElement("div", null, children);
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
BmAccordion.propTypes = {
|
|
130
|
+
children: _propTypes.default.object,
|
|
131
|
+
size: _propTypes.default.string,
|
|
132
|
+
expandIcon: _propTypes.default.string,
|
|
133
|
+
leadingIcon: _propTypes.default.node,
|
|
134
|
+
trailingIcon: _propTypes.default.node,
|
|
135
|
+
disabled: _propTypes.default.bool
|
|
136
|
+
};
|
|
137
|
+
var _default = BmAccordion;
|
|
138
|
+
exports.default = _default;
|
|
@@ -69,9 +69,7 @@ var BmInfoContentItem = _styledComponents.default.div(_templateObject7 || (_temp
|
|
|
69
69
|
|
|
70
70
|
exports.BmInfoContentItem = BmInfoContentItem;
|
|
71
71
|
|
|
72
|
-
var BmInfoContentLabel = _styledComponents.default.h4(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n margin: 0rem;\n
|
|
73
|
-
/* padding: 0rem; */
|
|
74
|
-
);
|
|
72
|
+
var BmInfoContentLabel = _styledComponents.default.h4(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n margin: 0rem;\n text-align: left;\n width: 50%;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), _colors.BmPrimaryBlack);
|
|
75
73
|
|
|
76
74
|
exports.BmInfoContentLabel = BmInfoContentLabel;
|
|
77
75
|
|
|
@@ -3,27 +3,35 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.BmLabelInfo = exports.BmLabels = exports.BmAddLabel = void 0;
|
|
6
|
+
exports.BmLabelInfo = exports.BmColorLabelPicker = exports.BmColorLabel = exports.BmLabels = exports.BmAddLabel = void 0;
|
|
7
7
|
|
|
8
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _input = require("../input");
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
12
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
15
|
|
|
18
16
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
17
|
|
|
20
|
-
var BmAddLabel = (0, _styledComponents.default)(
|
|
18
|
+
var BmAddLabel = (0, _styledComponents.default)(_input.BmInput)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n margin-bottom: 0.5rem;\n"])));
|
|
21
19
|
exports.BmAddLabel = BmAddLabel;
|
|
22
20
|
|
|
23
21
|
var BmLabels = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n width: 100%;\n flex-wrap: wrap;\n"])));
|
|
24
22
|
|
|
25
23
|
exports.BmLabels = BmLabels;
|
|
26
24
|
|
|
27
|
-
var
|
|
25
|
+
var BmColorLabel = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n"])));
|
|
26
|
+
|
|
27
|
+
exports.BmColorLabel = BmColorLabel;
|
|
28
|
+
|
|
29
|
+
var BmColorLabelPicker = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 1.429rem;\n height: 1.429rem;\n border-radius: 50%;\n margin: 0.5rem;\n background: ", ";\n"])), function (props) {
|
|
30
|
+
return props.color ? props.color : "green";
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
exports.BmColorLabelPicker = BmColorLabelPicker;
|
|
34
|
+
|
|
35
|
+
var BmLabelInfo = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 100%;\n > *:not(:first-child) {\n margin-top: 1.143rem;\n }\n"])));
|
|
28
36
|
|
|
29
37
|
exports.BmLabelInfo = BmLabelInfo;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BmRouteLink = void 0;
|
|
7
|
+
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
+
|
|
10
|
+
var _reactRouterDom = require("react-router-dom");
|
|
11
|
+
|
|
12
|
+
var _colors = require("../components/colors");
|
|
13
|
+
|
|
14
|
+
var _text = require("../components/text");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
|
+
|
|
22
|
+
var BmRouteLink = (0, _styledComponents.default)(_reactRouterDom.Link)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n color: ", ";\n text-decoration: none;\n &:hover,\n &:focus,\n &:active {\n color: ", " !important;\n font-weight: bold;\n &:before {\n font-weight: normal;\n }\n }\n"])), _text.p, _colors.BmPrimaryBlack, _colors.BmPrimaryBlack);
|
|
23
|
+
exports.BmRouteLink = BmRouteLink;
|
|
@@ -17,6 +17,8 @@ var ModalFooter = _styledComponents.default.div(_templateObject || (_templateObj
|
|
|
17
17
|
|
|
18
18
|
exports.ModalFooter = ModalFooter;
|
|
19
19
|
|
|
20
|
-
var BmFooterButtons = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n margin-left: auto;\n
|
|
20
|
+
var BmFooterButtons = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n margin-left: auto;\n ", "\n align-items: center;\n justify-content: space-between;\n"])), ''
|
|
21
|
+
/* width: 50%; */
|
|
22
|
+
);
|
|
21
23
|
|
|
22
24
|
exports.BmFooterButtons = BmFooterButtons;
|
|
@@ -13,5 +13,5 @@ var _templateObject;
|
|
|
13
13
|
|
|
14
14
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
15
15
|
|
|
16
|
-
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n* { font-size: 14px;}\n h1 { ", " }\n h2 { ", " }\n h3 { ", " }\n h4 { ", " }\n p { ", " }\n input {", "}\n"])), _text.h1, _text.h2, _text.h3, _text.h4, _text.p, _text.input);
|
|
16
|
+
var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n* { font-size: 14px;}\n h1 { ", " }\n h2 { ", " }\n h3 { ", " }\n h4 { ", " }\n p { ", " }\n input {", "}\n a {", "}\n"])), _text.h1, _text.h2, _text.h3, _text.h4, _text.p, _text.input, _text.a);
|
|
17
17
|
exports.GlobalStyle = GlobalStyle;
|
package/dist/components/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "BmAccordion", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _Accordion.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "BmAvatar", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -1161,6 +1167,32 @@ Object.defineProperty(exports, "BmLabels", {
|
|
|
1161
1167
|
return _labelsInfo.BmLabels;
|
|
1162
1168
|
}
|
|
1163
1169
|
});
|
|
1170
|
+
Object.defineProperty(exports, "BmColorLabel", {
|
|
1171
|
+
enumerable: true,
|
|
1172
|
+
get: function get() {
|
|
1173
|
+
return _labelsInfo.BmColorLabel;
|
|
1174
|
+
}
|
|
1175
|
+
});
|
|
1176
|
+
Object.defineProperty(exports, "BmColorLabelPicker", {
|
|
1177
|
+
enumerable: true,
|
|
1178
|
+
get: function get() {
|
|
1179
|
+
return _labelsInfo.BmColorLabelPicker;
|
|
1180
|
+
}
|
|
1181
|
+
});
|
|
1182
|
+
Object.defineProperty(exports, "BmAccordicon", {
|
|
1183
|
+
enumerable: true,
|
|
1184
|
+
get: function get() {
|
|
1185
|
+
return _Accordicon.BmAccordicon;
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1188
|
+
Object.defineProperty(exports, "BmRouteLink", {
|
|
1189
|
+
enumerable: true,
|
|
1190
|
+
get: function get() {
|
|
1191
|
+
return _Link.BmRouteLink;
|
|
1192
|
+
}
|
|
1193
|
+
});
|
|
1194
|
+
|
|
1195
|
+
var _Accordion = _interopRequireDefault(require("./Accordion"));
|
|
1164
1196
|
|
|
1165
1197
|
var _avatars = require("./avatars");
|
|
1166
1198
|
|
|
@@ -1254,4 +1286,10 @@ var _checkbox = require("./checkbox");
|
|
|
1254
1286
|
|
|
1255
1287
|
var _notesInfo = require("./CustomerInfo/notesInfo");
|
|
1256
1288
|
|
|
1257
|
-
var _labelsInfo = require("./CustomerInfo/labelsInfo");
|
|
1289
|
+
var _labelsInfo = require("./CustomerInfo/labelsInfo");
|
|
1290
|
+
|
|
1291
|
+
var _Accordicon = require("./Accordicon");
|
|
1292
|
+
|
|
1293
|
+
var _Link = require("./Link");
|
|
1294
|
+
|
|
1295
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/dist/components/tags.js
CHANGED
|
@@ -62,9 +62,9 @@ var TagText = _styledComponents.default.p(_templateObject2 || (_templateObject2
|
|
|
62
62
|
return "".concat(_colors.BmPrimaryWhite);
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
var BmLeftIcon = (0, _styledComponents.default)(_iconStyles.BmTagIcon)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
65
|
+
var BmLeftIcon = (0, _styledComponents.default)(_iconStyles.BmTagIcon)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-right: 0.643rem;\n"])));
|
|
66
66
|
exports.BmLeftIcon = BmLeftIcon;
|
|
67
|
-
var BmRightIcon = (0, _styledComponents.default)(_iconStyles.BmTagIcon)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n
|
|
67
|
+
var BmRightIcon = (0, _styledComponents.default)(_iconStyles.BmTagIcon)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-left: 0.643rem;\n"])));
|
|
68
68
|
exports.BmRightIcon = BmRightIcon;
|
|
69
69
|
|
|
70
70
|
var BmTag = function BmTag(props) {
|
package/dist/components/text.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.input = exports.p = exports.h4 = exports.h3 = exports.h2 = exports.h1 = void 0;
|
|
6
|
+
exports.a = exports.input = exports.p = exports.h4 = exports.h3 = exports.h2 = exports.h1 = void 0;
|
|
7
7
|
|
|
8
8
|
var _typography = require("./typography");
|
|
9
9
|
|
|
@@ -18,4 +18,6 @@ exports.h4 = h4;
|
|
|
18
18
|
var p = "font-family: ".concat(_typography.OpenSans, ";\nfont-style: normal;\nfont-weight: normal;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
19
19
|
exports.p = p;
|
|
20
20
|
var input = " font-family: ".concat(_typography.OpenSans, ";\nfont-style: normal;\nfont-weight: normal;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
21
|
-
exports.input = input;
|
|
21
|
+
exports.input = input;
|
|
22
|
+
var a = "font-family: ".concat(_typography.OpenSans, ";\nfont-style: normal;\nfont-weight: normal;\nfont-size: 1rem;\nletter-spacing: -0.02rem;\nmargin: 0rem;");
|
|
23
|
+
exports.a = a;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "beem-component",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/components/index.js",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
"@material-ui/core": "^4.11.4",
|
|
14
14
|
"@material-ui/icons": "^4.11.2",
|
|
15
15
|
"@mui/icons-material": "^5.0.3",
|
|
16
|
-
"node-sass": "^
|
|
16
|
+
"node-sass": "^6.0.1",
|
|
17
17
|
"react": "^17.0.2",
|
|
18
18
|
"react-dom": "^17.0.2",
|
|
19
|
+
"react-router-dom": "^5.3.0",
|
|
19
20
|
"react-scripts": "4.0.3",
|
|
20
21
|
"styled-components": "^5.3.0",
|
|
21
22
|
"web-vitals": "^1.1.2"
|
package/src/App.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { HashRouter } from "react-router-dom";
|
|
2
3
|
import "../src/main.scss";
|
|
3
4
|
import { MainWrapper } from "./lib/components/Chats/chatwrapper";
|
|
4
5
|
import { GlobalStyle } from "./lib/components/globalStyles";
|
|
@@ -7,12 +8,25 @@ import { Complete } from "./Complete";
|
|
|
7
8
|
import { CreateSegment } from "./CreateSegments";
|
|
8
9
|
// import Buttons from "../src/examples/Buttons";
|
|
9
10
|
import Chat from "./CHAT";
|
|
10
|
-
|
|
11
|
+
import { BmAccordicon } from "./lib/components/Accordicon";
|
|
12
|
+
import BmAccordion from "./lib/components/Accordion";
|
|
13
|
+
import { BmRouteLink } from "./lib/components/Link";
|
|
11
14
|
export const App = () => {
|
|
12
15
|
return (
|
|
13
16
|
<>
|
|
14
17
|
<GlobalStyle />
|
|
18
|
+
<BmAccordicon dropdown trailingIcon>
|
|
19
|
+
<h4>jclkdj</h4>
|
|
20
|
+
<HashRouter>
|
|
21
|
+
<BmRouteLink to="#">Hello</BmRouteLink>
|
|
22
|
+
</HashRouter>
|
|
23
|
+
<h2>kghgfih</h2>
|
|
24
|
+
</BmAccordicon>
|
|
15
25
|
<Chat />
|
|
26
|
+
<BmAccordion>
|
|
27
|
+
<BmAccordion.Title>SMS</BmAccordion.Title>
|
|
28
|
+
<BmAccordion.Body>Reports</BmAccordion.Body>
|
|
29
|
+
</BmAccordion>
|
|
16
30
|
{/* <Buttons /> */}
|
|
17
31
|
{/* <h1>hello</h1> */}
|
|
18
32
|
{/* <MainWrapper>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/anchor-is-valid */
|
|
1
2
|
import React, { useState } from "react";
|
|
2
3
|
import {
|
|
3
4
|
BmCustomer,
|
|
@@ -33,6 +34,10 @@ import {
|
|
|
33
34
|
BmNoteFooter,
|
|
34
35
|
} from "../lib/components/CustomerInfo/notesInfo";
|
|
35
36
|
import {
|
|
37
|
+
BmAddLabel,
|
|
38
|
+
BmColorLabel,
|
|
39
|
+
BmColorLabelContainer,
|
|
40
|
+
BmColorLabelPicker,
|
|
36
41
|
BmLabelInfo,
|
|
37
42
|
BmLabels,
|
|
38
43
|
} from "../lib/components/CustomerInfo/labelsInfo";
|
|
@@ -43,10 +48,26 @@ import {
|
|
|
43
48
|
} from "../lib/components/iconStyles";
|
|
44
49
|
import { Delete, Edit } from "@material-ui/icons";
|
|
45
50
|
import { BmTag } from "../lib/components/tags";
|
|
51
|
+
import { BmAccordicon } from "../lib/components/Accordicon";
|
|
52
|
+
import { ModalBody } from "../lib/components/Modals/noteModalBody";
|
|
53
|
+
import {
|
|
54
|
+
BmFooterButtons,
|
|
55
|
+
ModalFooter,
|
|
56
|
+
} from "../lib/components/Modals/noteModalFooter";
|
|
57
|
+
import {
|
|
58
|
+
CloseModal,
|
|
59
|
+
HeaderText,
|
|
60
|
+
Modal,
|
|
61
|
+
ModalHeader,
|
|
62
|
+
} from "../lib/components/Modals/noteModalHeader";
|
|
63
|
+
import { BmInput } from "../lib/components/input";
|
|
64
|
+
import { BmButton } from "../lib/components/buttons";
|
|
46
65
|
|
|
47
66
|
const CustomerInformation = () => {
|
|
48
67
|
const [isOpen, setIsOpen] = useState(true);
|
|
49
68
|
const toggling = () => setIsOpen(!isOpen);
|
|
69
|
+
const [showModal, setShowModal] = useState(false);
|
|
70
|
+
|
|
50
71
|
return (
|
|
51
72
|
<>
|
|
52
73
|
{/* Main Customer SideBar */}
|
|
@@ -120,9 +141,9 @@ const CustomerInformation = () => {
|
|
|
120
141
|
</BmInformation>
|
|
121
142
|
<BmInformation>
|
|
122
143
|
{/* Notes */}
|
|
123
|
-
<
|
|
124
|
-
Notes
|
|
125
|
-
</
|
|
144
|
+
<BmAccordicon dropdown onClick={toggling} isOpen={isOpen}>
|
|
145
|
+
<h3>Notes</h3>
|
|
146
|
+
</BmAccordicon>
|
|
126
147
|
<BmInfoContent isOpen={isOpen}>
|
|
127
148
|
<BmInfoContentItem>
|
|
128
149
|
<BmNoteInfo>
|
|
@@ -152,9 +173,16 @@ const CustomerInformation = () => {
|
|
|
152
173
|
</BmInformation>
|
|
153
174
|
{/* Labels */}
|
|
154
175
|
<BmInformation>
|
|
155
|
-
<
|
|
156
|
-
Labels
|
|
157
|
-
|
|
176
|
+
<BmAccordicon dropdown onClick={toggling} isOpen={isOpen}>
|
|
177
|
+
<h3>Labels</h3>
|
|
178
|
+
<a
|
|
179
|
+
onClick={() => {
|
|
180
|
+
setShowModal(true);
|
|
181
|
+
}}
|
|
182
|
+
>
|
|
183
|
+
Manage Labels
|
|
184
|
+
</a>
|
|
185
|
+
</BmAccordicon>
|
|
158
186
|
<BmInfoContent isOpen={isOpen}>
|
|
159
187
|
<BmInfoContentItem>
|
|
160
188
|
<BmLabelInfo>
|
|
@@ -178,6 +206,41 @@ const CustomerInformation = () => {
|
|
|
178
206
|
</BmInformation>
|
|
179
207
|
</BmCustomerInfoAccordicon>
|
|
180
208
|
</BmCustomerBar>
|
|
209
|
+
<Modal
|
|
210
|
+
show={showModal}
|
|
211
|
+
setShowModal={() => {
|
|
212
|
+
setShowModal(!showModal);
|
|
213
|
+
}}
|
|
214
|
+
>
|
|
215
|
+
<ModalHeader>
|
|
216
|
+
<HeaderText>Add Labels</HeaderText>
|
|
217
|
+
<CloseModal
|
|
218
|
+
onClick={() => {
|
|
219
|
+
setShowModal(!showModal);
|
|
220
|
+
}}
|
|
221
|
+
/>
|
|
222
|
+
</ModalHeader>
|
|
223
|
+
<ModalBody>
|
|
224
|
+
<BmAddLabel type="text" placeholder="Add label" />
|
|
225
|
+
<BmColorLabel>
|
|
226
|
+
{["#33b1ba", "#000000", "#F62E48", "#8CC63F"].map((color) => (
|
|
227
|
+
<BmColorLabelPicker
|
|
228
|
+
color={color}
|
|
229
|
+
onClick={() => {
|
|
230
|
+
alert(color);
|
|
231
|
+
}}
|
|
232
|
+
/>
|
|
233
|
+
))}
|
|
234
|
+
</BmColorLabel>
|
|
235
|
+
</ModalBody>
|
|
236
|
+
<ModalFooter>
|
|
237
|
+
<BmFooterButtons>
|
|
238
|
+
<BmButton variant="primary" size="medium">
|
|
239
|
+
Save
|
|
240
|
+
</BmButton>
|
|
241
|
+
</BmFooterButtons>
|
|
242
|
+
</ModalFooter>
|
|
243
|
+
</Modal>
|
|
181
244
|
</>
|
|
182
245
|
);
|
|
183
246
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { BmPrimaryWhite, BmGrey400 } from "./colors";
|
|
4
|
+
import { BmDropdownIcon, BmDropupIcon } from "./iconStyles";
|
|
5
|
+
|
|
6
|
+
export const BmAccordiconMenu = styled.div`
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
${"" /* justify-content: space-between; */}
|
|
10
|
+
padding: 0.571rem 1.143rem;
|
|
11
|
+
background: ${BmPrimaryWhite};
|
|
12
|
+
box-shadow: ${(isOpen) => {
|
|
13
|
+
if (isOpen) return `inset 0rem 0.071rem 0rem ${BmGrey400}`;
|
|
14
|
+
return `inset 0rem -0.071rem 0rem ${BmGrey400}, inset 0rem 0.071rem 0rem ${BmGrey400};`;
|
|
15
|
+
}};
|
|
16
|
+
> *:not(:last-child) {
|
|
17
|
+
margin-right: 0.5rem;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
export const BmAccordiconDetails = styled.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
width: 100%;
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
export const BmAccordicon = ({
|
|
28
|
+
children,
|
|
29
|
+
isOpen,
|
|
30
|
+
dropdown,
|
|
31
|
+
trailingIcon,
|
|
32
|
+
...rest
|
|
33
|
+
}) => {
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
<BmAccordiconMenu {...rest}>
|
|
37
|
+
{dropdown &&
|
|
38
|
+
(isOpen ? <BmDropupIcon {...rest} /> : <BmDropdownIcon {...rest} />)}
|
|
39
|
+
<BmAccordiconDetails>{children}</BmAccordiconDetails>
|
|
40
|
+
</BmAccordiconMenu>
|
|
41
|
+
</>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import { BmPrimaryWhite } from "./colors";
|
|
5
|
+
import { BmDropdownIcon, BmDropupIcon, BmIcons } from "./iconStyles";
|
|
6
|
+
|
|
7
|
+
const { Provider, Consumer } = React.createContext({});
|
|
8
|
+
|
|
9
|
+
const Dropdown = (value, rest) => {
|
|
10
|
+
if (value.expandIcon && value.expandIcon === "none") {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (!value.expandIcon) {
|
|
14
|
+
return value.toggle ? (
|
|
15
|
+
<BmDropupIcon {...rest} />
|
|
16
|
+
) : (
|
|
17
|
+
<BmDropdownIcon {...rest} />
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
if (value.expandIcon && value.expandIcon !== "none") {
|
|
21
|
+
return <BmIcons icon={value.expandIcon} />;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const BmAccordionMenu = styled.div`
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
${"" /* padding: 0.571rem; */}
|
|
29
|
+
padding: 0.571rem 1.143rem;
|
|
30
|
+
border: 1px solid
|
|
31
|
+
background: ${BmPrimaryWhite};
|
|
32
|
+
> *:not(:last-child) {
|
|
33
|
+
margin-right: 0.5rem;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const BmAccordionDetails = styled.div`
|
|
38
|
+
display: flex;
|
|
39
|
+
justify-content: space-between;
|
|
40
|
+
width: 100%;
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
const BmAccordionWrapper = styled.div`
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
`;
|
|
47
|
+
|
|
48
|
+
const BmAccordion = ({ children, disabled, expandIcon, ...rest }) => {
|
|
49
|
+
const [toggle, setToggle] = useState(false);
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<BmAccordionWrapper>
|
|
53
|
+
<Provider value={{ toggle, setToggle, disabled, expandIcon }}>
|
|
54
|
+
{children}
|
|
55
|
+
</Provider>
|
|
56
|
+
</BmAccordionWrapper>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
BmAccordion.Title = ({
|
|
61
|
+
children,
|
|
62
|
+
leadingIcon,
|
|
63
|
+
trailingIcon,
|
|
64
|
+
size,
|
|
65
|
+
...rest
|
|
66
|
+
}) => {
|
|
67
|
+
return (
|
|
68
|
+
<Consumer>
|
|
69
|
+
{(value) => (
|
|
70
|
+
<BmAccordionMenu
|
|
71
|
+
{...rest}
|
|
72
|
+
onClick={() =>
|
|
73
|
+
!value.disabled || value.disabled === false
|
|
74
|
+
? value.setToggle(!value.toggle)
|
|
75
|
+
: value.setToggle(false)
|
|
76
|
+
}
|
|
77
|
+
>
|
|
78
|
+
{Dropdown(value, rest)}
|
|
79
|
+
{leadingIcon && <BmIcons icon={leadingIcon} size={size} />}
|
|
80
|
+
<BmAccordionDetails>{children}</BmAccordionDetails>
|
|
81
|
+
{trailingIcon && <BmIcons icon={trailingIcon} size={size} />}
|
|
82
|
+
</BmAccordionMenu>
|
|
83
|
+
)}
|
|
84
|
+
</Consumer>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
BmAccordion.Body = ({ children }) => {
|
|
89
|
+
return (
|
|
90
|
+
<Consumer>{(value) => value.toggle && <div>{children}</div>}</Consumer>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
BmAccordion.propTypes = {
|
|
95
|
+
children: PropTypes.object,
|
|
96
|
+
size: PropTypes.string,
|
|
97
|
+
expandIcon: PropTypes.string,
|
|
98
|
+
leadingIcon: PropTypes.node,
|
|
99
|
+
trailingIcon: PropTypes.node,
|
|
100
|
+
disabled: PropTypes.bool,
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export default BmAccordion;
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
import {
|
|
3
|
-
import { BmSearch } from "../search";
|
|
2
|
+
import { BmInput } from "../input";
|
|
4
3
|
|
|
5
|
-
export const BmAddLabel = styled(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
background: ${BmGrey100};
|
|
9
|
-
flex-grow: 1;
|
|
10
|
-
border: none !important;
|
|
11
|
-
&:visited,
|
|
12
|
-
&:active,
|
|
13
|
-
&:hover,
|
|
14
|
-
&:focus {
|
|
15
|
-
outline: none !important;
|
|
16
|
-
text-decoration: none !important;
|
|
17
|
-
}
|
|
4
|
+
export const BmAddLabel = styled(BmInput)`
|
|
5
|
+
width: 100%;
|
|
6
|
+
margin-bottom: 0.5rem;
|
|
18
7
|
`;
|
|
19
8
|
|
|
20
9
|
export const BmLabels = styled.div`
|
|
@@ -25,6 +14,19 @@ export const BmLabels = styled.div`
|
|
|
25
14
|
flex-wrap: wrap;
|
|
26
15
|
`;
|
|
27
16
|
|
|
17
|
+
export const BmColorLabel = styled.div`
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
`;
|
|
22
|
+
export const BmColorLabelPicker = styled.div`
|
|
23
|
+
width: 1.429rem;
|
|
24
|
+
height: 1.429rem;
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
margin: 0.5rem;
|
|
27
|
+
background: ${(props) => (props.color ? props.color : "green")};
|
|
28
|
+
`;
|
|
29
|
+
|
|
28
30
|
export const BmLabelInfo = styled.div`
|
|
29
31
|
display: flex;
|
|
30
32
|
flex-direction: column;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { Link } from "react-router-dom";
|
|
3
|
+
import { BmPrimaryBlack } from "../components/colors";
|
|
4
|
+
import { p } from "../components/text";
|
|
5
|
+
|
|
6
|
+
export const BmRouteLink = styled(Link)`
|
|
7
|
+
${p}
|
|
8
|
+
color: ${BmPrimaryBlack};
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
&:hover,
|
|
11
|
+
&:focus,
|
|
12
|
+
&:active {
|
|
13
|
+
color: ${BmPrimaryBlack} !important;
|
|
14
|
+
font-weight: bold;
|
|
15
|
+
&:before {
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createGlobalStyle } from "styled-components";
|
|
2
|
-
import { h1, h2, h3, h4, p, input } from "./text";
|
|
2
|
+
import { h1, h2, h3, h4, p, input, a } from "./text";
|
|
3
3
|
|
|
4
4
|
export const GlobalStyle = createGlobalStyle`
|
|
5
5
|
* { font-size: 14px;}
|
|
@@ -9,4 +9,5 @@ export const GlobalStyle = createGlobalStyle`
|
|
|
9
9
|
h4 { ${h4} }
|
|
10
10
|
p { ${p} }
|
|
11
11
|
input {${input}}
|
|
12
|
+
a {${a}}
|
|
12
13
|
`;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import BmAccordion from "./Accordion";
|
|
1
2
|
import { BmAvatar } from "./avatars";
|
|
2
3
|
import { BmAlertIcon } from "./buttonAlertIcons";
|
|
3
4
|
import { BmBtnIcon } from "./buttonIconsOnly";
|
|
@@ -7,6 +8,7 @@ import { BmDropdown } from "./dropdown";
|
|
|
7
8
|
import { BmInput } from "./input";
|
|
8
9
|
import { BmLogo } from "./logo";
|
|
9
10
|
import { BmSearch } from "./search";
|
|
11
|
+
|
|
10
12
|
import {
|
|
11
13
|
BmTab,
|
|
12
14
|
BmTabItem,
|
|
@@ -256,8 +258,18 @@ import {
|
|
|
256
258
|
BmNoteFooter,
|
|
257
259
|
BmNoteDetails,
|
|
258
260
|
} from "./CustomerInfo/notesInfo";
|
|
259
|
-
import {
|
|
261
|
+
import {
|
|
262
|
+
BmAddLabel,
|
|
263
|
+
BmLabelInfo,
|
|
264
|
+
BmLabels,
|
|
265
|
+
BmColorLabel,
|
|
266
|
+
BmColorLabelPicker,
|
|
267
|
+
} from "./CustomerInfo/labelsInfo";
|
|
268
|
+
import { BmAccordicon } from "./Accordicon";
|
|
269
|
+
import { BmRouteLink } from "./Link";
|
|
270
|
+
|
|
260
271
|
export {
|
|
272
|
+
BmAccordion,
|
|
261
273
|
BmButton,
|
|
262
274
|
BmAvatar,
|
|
263
275
|
BmAlertIcon,
|
|
@@ -451,4 +463,8 @@ export {
|
|
|
451
463
|
BmAddLabel,
|
|
452
464
|
BmLabelInfo,
|
|
453
465
|
BmLabels,
|
|
466
|
+
BmColorLabel,
|
|
467
|
+
BmColorLabelPicker,
|
|
468
|
+
BmAccordicon,
|
|
469
|
+
BmRouteLink
|
|
454
470
|
};
|
|
@@ -58,11 +58,11 @@ const TagText = styled.p`
|
|
|
58
58
|
`;
|
|
59
59
|
|
|
60
60
|
export const BmLeftIcon = styled(BmTagIcon)`
|
|
61
|
-
|
|
61
|
+
margin-right: 0.643rem;
|
|
62
62
|
`;
|
|
63
63
|
|
|
64
64
|
export const BmRightIcon = styled(BmTagIcon)`
|
|
65
|
-
|
|
65
|
+
margin-left: 0.643rem;
|
|
66
66
|
`;
|
|
67
67
|
|
|
68
68
|
export const BmTag = (props) => {
|