carbon-react 119.12.0 → 119.12.1

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.
@@ -37,8 +37,9 @@ const StyledMenuItemWrapper = styled.a.attrs({
37
37
  asDiv,
38
38
  hasInput
39
39
  }) => css`
40
- ${padding}
41
-
40
+ ${!inFullscreenView && css`
41
+ ${padding}
42
+ `}
42
43
  display: inline-block;
43
44
  font-size: 14px;
44
45
  font-weight: 700;
@@ -1,10 +1,10 @@
1
- import { FlexboxProps, LayoutProps } from "styled-system";
1
+ import { FlexboxProps, LayoutProps, PaddingProps } from "styled-system";
2
2
  import { MenuProps } from "./menu.component";
3
3
  interface StyledMenuProps extends Pick<MenuProps, "menuType">, FlexboxProps, LayoutProps {
4
4
  inFullscreenView?: boolean;
5
5
  }
6
6
  declare const StyledMenuWrapper: import("styled-components").StyledComponent<"ul", any, StyledMenuProps, never>;
7
- interface StyledMenuItemProps extends Pick<MenuProps, "menuType" | "maxWidth"> {
7
+ interface StyledMenuItemProps extends Pick<MenuProps, "menuType" | "maxWidth">, PaddingProps {
8
8
  inFullscreenView?: boolean;
9
9
  inSubmenu?: boolean;
10
10
  }
@@ -1,8 +1,9 @@
1
1
  import styled, { css } from "styled-components";
2
- import { layout, flexbox } from "styled-system";
2
+ import { layout, flexbox, padding } from "styled-system";
3
3
  import menuConfigVariants from "./menu.config";
4
4
  import { StyledVerticalWrapper, StyledDivider } from "../vertical-divider/vertical-divider.style";
5
5
  import { StyledLink } from "../link/link.style";
6
+ import { baseTheme } from "../../style/themes";
6
7
  const StyledMenuWrapper = styled.ul`
7
8
  line-height: 40px;
8
9
  list-style: none;
@@ -54,8 +55,9 @@ const StyledMenuItem = styled.li`
54
55
  ${({
55
56
  inFullscreenView
56
57
  }) => inFullscreenView && css`
57
- padding-top: 16px;
58
- padding-bottom: 16px;
58
+ padding-top: var(--spacing200);
59
+ padding-bottom: var(--spacing200);
60
+ ${padding}
59
61
 
60
62
  > a,
61
63
  ${StyledLink} > a,
@@ -69,4 +71,7 @@ const StyledMenuItem = styled.li`
69
71
  }
70
72
  `}
71
73
  `;
74
+ StyledMenuItem.defaultProps = {
75
+ theme: baseTheme
76
+ };
72
77
  export { StyledMenuWrapper, StyledMenuItem };
@@ -46,8 +46,9 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
46
46
  asDiv,
47
47
  hasInput
48
48
  }) => (0, _styledComponents.css)`
49
- ${_styledSystem.padding}
50
-
49
+ ${!inFullscreenView && (0, _styledComponents.css)`
50
+ ${_styledSystem.padding}
51
+ `}
51
52
  display: inline-block;
52
53
  font-size: 14px;
53
54
  font-weight: 700;
@@ -1,10 +1,10 @@
1
- import { FlexboxProps, LayoutProps } from "styled-system";
1
+ import { FlexboxProps, LayoutProps, PaddingProps } from "styled-system";
2
2
  import { MenuProps } from "./menu.component";
3
3
  interface StyledMenuProps extends Pick<MenuProps, "menuType">, FlexboxProps, LayoutProps {
4
4
  inFullscreenView?: boolean;
5
5
  }
6
6
  declare const StyledMenuWrapper: import("styled-components").StyledComponent<"ul", any, StyledMenuProps, never>;
7
- interface StyledMenuItemProps extends Pick<MenuProps, "menuType" | "maxWidth"> {
7
+ interface StyledMenuItemProps extends Pick<MenuProps, "menuType" | "maxWidth">, PaddingProps {
8
8
  inFullscreenView?: boolean;
9
9
  inSubmenu?: boolean;
10
10
  }
@@ -9,6 +9,7 @@ var _styledSystem = require("styled-system");
9
9
  var _menu = _interopRequireDefault(require("./menu.config"));
10
10
  var _verticalDivider = require("../vertical-divider/vertical-divider.style");
11
11
  var _link = require("../link/link.style");
12
+ var _themes = require("../../style/themes");
12
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
15
  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; }
@@ -64,8 +65,9 @@ const StyledMenuItem = _styledComponents.default.li`
64
65
  ${({
65
66
  inFullscreenView
66
67
  }) => inFullscreenView && (0, _styledComponents.css)`
67
- padding-top: 16px;
68
- padding-bottom: 16px;
68
+ padding-top: var(--spacing200);
69
+ padding-bottom: var(--spacing200);
70
+ ${_styledSystem.padding}
69
71
 
70
72
  > a,
71
73
  ${_link.StyledLink} > a,
@@ -79,4 +81,7 @@ const StyledMenuItem = _styledComponents.default.li`
79
81
  }
80
82
  `}
81
83
  `;
82
- exports.StyledMenuItem = StyledMenuItem;
84
+ exports.StyledMenuItem = StyledMenuItem;
85
+ StyledMenuItem.defaultProps = {
86
+ theme: _themes.baseTheme
87
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "119.12.0",
3
+ "version": "119.12.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",