beem-component 1.8.8 → 1.9.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.
@@ -16,7 +16,10 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
16
16
  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; }
17
17
  var Container = _styledComponents.default.div.withConfig({
18
18
  displayName: "rowLabels__Container"
19
- })(["display:flex;flex-direction:row;align-items:center;padding:0.5rem 1rem;justify-content:space-between;background:", ";margin:0rem;&:hover{background:", ";}"], _colors.BmPrimaryWhite, _colors.BmGrey100);
19
+ })(["display:flex;flex-direction:row;align-items:center;padding:0.5rem 1rem;justify-content:space-between;background:", ";margin:0rem;&:hover{background:", ";}", ";"], _colors.BmPrimaryWhite, _colors.BmGrey100, function (_ref) {
20
+ var disabled = _ref.disabled;
21
+ return disabled && " \n pointer-events: none;\n opacity: 0.5;\n background: ".concat(_colors.BmGrey100, ";\n");
22
+ });
20
23
  exports.Container = Container;
21
24
  var LeftContainer = _styledComponents.default.div.withConfig({
22
25
  displayName: "rowLabels__LeftContainer"
@@ -28,19 +31,19 @@ var RightContainer = _styledComponents.default.div.withConfig({
28
31
  exports.RightContainer = RightContainer;
29
32
  var Label = _styledComponents.default.p.withConfig({
30
33
  displayName: "rowLabels__Label"
31
- })(["color:", ";", ""], _colors.BmPrimaryBlack, function (_ref) {
32
- var trailingIcon = _ref.trailingIcon;
34
+ })(["color:", ";", ""], _colors.BmPrimaryBlack, function (_ref2) {
35
+ var trailingIcon = _ref2.trailingIcon;
33
36
  return trailingIcon && "\n margin-right: 0.5rem;\n ";
34
37
  });
35
38
  exports.Label = Label;
36
- var BmRowLabel = function BmRowLabel(_ref2) {
37
- var children = _ref2.children,
38
- trailingIcon = _ref2.trailingIcon,
39
- leadingIcon = _ref2.leadingIcon,
40
- label = _ref2.label,
41
- color = _ref2.color,
42
- size = _ref2.size,
43
- rest = _objectWithoutProperties(_ref2, _excluded);
39
+ var BmRowLabel = function BmRowLabel(_ref3) {
40
+ var children = _ref3.children,
41
+ trailingIcon = _ref3.trailingIcon,
42
+ leadingIcon = _ref3.leadingIcon,
43
+ label = _ref3.label,
44
+ color = _ref3.color,
45
+ size = _ref3.size,
46
+ rest = _objectWithoutProperties(_ref3, _excluded);
44
47
  return /*#__PURE__*/_react.default.createElement(Container, _extends({
45
48
  trailingIcon: trailingIcon,
46
49
  leadingIcon: leadingIcon,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beem-component",
3
- "version": "1.8.8",
3
+ "version": "1.9.0",
4
4
  "private": false,
5
5
  "main": "dist/components/index.js",
6
6
  "scripts": {
package/src/App.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import { GlobalStyle } from './lib/components';
2
+ import { BmRowLabel, GlobalStyle } from './lib/components';
3
3
  import BmButtonGroup from './lib/components/ButtonGroup/buttonGroup';
4
4
  import { BmInputCounter } from './lib/components/InputCounter/inputCounter';
5
5
  import BmMultiDateSelector from './lib/components/MultipleDateSelector/multipleDateSelector';
@@ -91,6 +91,7 @@ const App = () => {
91
91
  </BmStepper>
92
92
  );
93
93
  })}
94
+ <BmRowLabel disabled>Hello</BmRowLabel>
94
95
  </>
95
96
  );
96
97
  };
@@ -15,6 +15,13 @@ export const Container = styled.div`
15
15
  &:hover {
16
16
  background: ${BmGrey100};
17
17
  }
18
+ ${({ disabled }) =>
19
+ disabled &&
20
+ `
21
+ pointer-events: none;
22
+ opacity: 0.5;
23
+ background: ${BmGrey100};
24
+ `};
18
25
  `;
19
26
 
20
27
  export const LeftContainer = styled.div`