carbon-react 104.8.0 → 104.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.
@@ -5,14 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _themes = require("../../../style/themes");
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
11
 
12
12
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
13
13
 
14
14
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
15
15
 
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+
16
18
  const StyledNavigationItem = _styledComponents.default.li`
17
19
  width: 100%;
18
20
 
@@ -20,52 +22,32 @@ const StyledNavigationItem = _styledComponents.default.li`
20
22
  cursor: pointer;
21
23
  display: block;
22
24
  text-decoration: none;
23
- color: ${({
24
- theme
25
- }) => theme.text.color};
25
+ color: var(--colorsUtilityYin090);
26
26
  background-color: transparent;
27
- border-left: 3px solid ${({
28
- theme
29
- }) => theme.disabled.background};
27
+ border-left: var(--sizing050) solid var(--colorsActionMinor100);
30
28
  font-weight: 700;
31
29
  padding: 12px 24px;
32
30
 
33
31
  &:focus {
34
- outline: none;
35
- position: relative;
36
-
37
- &:before {
38
- content: "";
39
- position: absolute;
40
- top: 0;
41
- bottom: 0;
42
- left: -3px;
43
- right: 0;
44
- z-index: 1;
45
- box-shadow: 0 0 6px ${({
46
- theme
47
- }) => theme.colors.focus};
48
- }
32
+ outline: var(--borderWidth300) solid var(--colorsSemanticFocus500);
49
33
  }
50
34
 
51
35
  &:hover {
52
36
  background-color: ${({
53
- isSelected,
54
- theme
55
- }) => !isSelected && theme.anchorNavigation.navItemHoverBackground};
37
+ isSelected
38
+ }) => !isSelected && "var(--colorsActionMinor100)"};
56
39
  }
57
40
 
58
41
  ${({
59
- isSelected,
60
- theme
42
+ isSelected
61
43
  }) => isSelected && (0, _styledComponents.css)`
62
- background-color: ${theme.colors.white};
63
- border-left-color: ${theme.colors.primary};
44
+ background-color: var(--colorsActionMinorYang100);
45
+ border-left-color: var(--colorsActionMajor500);
64
46
  `}
65
47
  }
66
48
  `;
67
- StyledNavigationItem.defaultProps = {
68
- theme: _themes.baseTheme
49
+ StyledNavigationItem.propTypes = {
50
+ isSelected: _propTypes.default.bool
69
51
  };
70
52
  var _default = StyledNavigationItem;
71
53
  exports.default = _default;
@@ -7,8 +7,6 @@ exports.StyledContent = exports.StyledNavigation = exports.StyledAnchorNavigatio
7
7
 
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
- var _themes = require("../../style/themes");
11
-
12
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
11
 
14
12
  const StyledAnchorNavigation = _styledComponents.default.div`
@@ -20,9 +18,6 @@ exports.StyledAnchorNavigation = StyledAnchorNavigation;
20
18
  const StyledNavigation = _styledComponents.default.ul`
21
19
  position: sticky;
22
20
  top: 32px;
23
- box-shadow: inset 3px 0px 0px 0px ${({
24
- theme
25
- }) => theme.disabled.background};
26
21
  list-style: none;
27
22
  margin: 0;
28
23
  padding: 0;
@@ -33,13 +28,4 @@ const StyledContent = _styledComponents.default.div`
33
28
  flex: 1;
34
29
  margin-left: 32px;
35
30
  `;
36
- exports.StyledContent = StyledContent;
37
- StyledAnchorNavigation.defaultProps = {
38
- theme: _themes.baseTheme
39
- };
40
- StyledNavigation.defaultProps = {
41
- theme: _themes.baseTheme
42
- };
43
- StyledContent.defaultProps = {
44
- theme: _themes.baseTheme
45
- };
31
+ exports.StyledContent = StyledContent;
@@ -7,20 +7,13 @@ exports.default = void 0;
7
7
 
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
 
10
- var _themes = require("../../../style/themes");
11
-
12
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
11
 
14
12
  const StyledAnchorDivider = _styledComponents.default.div.attrs({
15
13
  "data-element": "anchor-navigation-divider"
16
14
  })`
17
- background-color: ${({
18
- theme
19
- }) => theme.anchorNavigation.divider};
15
+ background-color: var(--colorsActionMinor200);
20
16
  height: 1px;
21
17
  `;
22
- StyledAnchorDivider.defaultProps = {
23
- theme: _themes.baseTheme
24
- };
25
18
  var _default = StyledAnchorDivider;
26
19
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.8.0",
3
+ "version": "104.9.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {