carbon-react 144.20.1 → 144.21.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.
@@ -1,13 +1,13 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import { padding } from "styled-system";
3
- import StyledButton from "../../button/button.style";
4
- import { StyledContent, StyledLink } from "../../link/link.style";
5
- import StyledIcon from "../../icon/icon.style";
6
- import StyledIconButton from "../../icon-button/icon-button.style";
7
3
  import menuConfigVariants from "../menu.config";
8
4
  import Link from "../../link";
9
- import addFocusStyling from "../../../style/utils/add-focus-styling";
5
+ import StyledButton from "../../button/button.style";
6
+ import StyledIconButton from "../../icon-button/icon-button.style";
7
+ import StyledIcon from "../../icon/icon.style";
8
+ import { StyledContent, StyledLink } from "../../link/link.style";
10
9
  import { baseTheme } from "../../../style/themes";
10
+ import addFocusStyling from "../../../style/utils/add-focus-styling";
11
11
  const BASE_SPACING = 16;
12
12
  const parsePadding = props => {
13
13
  const {
@@ -121,16 +121,6 @@ const StyledMenuItemWrapper = styled.a.attrs({
121
121
  `}
122
122
  }
123
123
 
124
- ${!maxWidth && css`
125
- a:has([data-component="icon"]):not(:has(button))
126
- ${StyledContent},
127
- button:has([data-component="icon"]):not(:has(button))
128
- ${StyledContent} {
129
- position: relative;
130
- top: -1px;
131
- }
132
- `}
133
-
134
124
  :has([data-element="input"]) ${StyledContent} {
135
125
  width: 100%;
136
126
  }
@@ -209,7 +199,7 @@ const StyledMenuItemWrapper = styled.a.attrs({
209
199
 
210
200
  > a:has(${StyledButton}:not(.search-button)) {
211
201
  height: 100%;
212
-
202
+
213
203
  ${StyledContent} {
214
204
  height: inherit;
215
205
 
@@ -445,7 +435,7 @@ const StyledMenuItemWrapper = styled.a.attrs({
445
435
  }
446
436
  `}
447
437
 
448
-
438
+
449
439
  > a, > button {
450
440
  min-height: 40px;
451
441
  line-height: 40px;
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
8
  var _styledSystem = require("styled-system");
9
+ var _menu = _interopRequireDefault(require("../menu.config"));
10
+ var _link = _interopRequireDefault(require("../../link"));
9
11
  var _button = _interopRequireDefault(require("../../button/button.style"));
10
- var _link = require("../../link/link.style");
11
- var _icon = _interopRequireDefault(require("../../icon/icon.style"));
12
12
  var _iconButton = _interopRequireDefault(require("../../icon-button/icon-button.style"));
13
- var _menu = _interopRequireDefault(require("../menu.config"));
14
- var _link2 = _interopRequireDefault(require("../../link"));
15
- var _addFocusStyling = _interopRequireDefault(require("../../../style/utils/add-focus-styling"));
13
+ var _icon = _interopRequireDefault(require("../../icon/icon.style"));
14
+ var _link2 = require("../../link/link.style");
16
15
  var _themes = require("../../../style/themes");
16
+ var _addFocusStyling = _interopRequireDefault(require("../../../style/utils/add-focus-styling"));
17
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -87,7 +87,7 @@ const oldFocusStyling = `
87
87
  box-shadow: inset 0 0 0 var(--borderWidth300) var(--colorsSemanticFocus500);
88
88
  `;
89
89
  const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
90
- as: _link2.default
90
+ as: _link.default
91
91
  })`
92
92
  ${({
93
93
  menuType,
@@ -130,17 +130,7 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
130
130
  `}
131
131
  }
132
132
 
133
- ${!maxWidth && (0, _styledComponents.css)`
134
- a:has([data-component="icon"]):not(:has(button))
135
- ${_link.StyledContent},
136
- button:has([data-component="icon"]):not(:has(button))
137
- ${_link.StyledContent} {
138
- position: relative;
139
- top: -1px;
140
- }
141
- `}
142
-
143
- :has([data-element="input"]) ${_link.StyledContent} {
133
+ :has([data-element="input"]) ${_link2.StyledContent} {
144
134
  width: 100%;
145
135
  }
146
136
 
@@ -218,8 +208,8 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
218
208
 
219
209
  > a:has(${_button.default}:not(.search-button)) {
220
210
  height: 100%;
221
-
222
- ${_link.StyledContent} {
211
+
212
+ ${_link2.StyledContent} {
223
213
  height: inherit;
224
214
 
225
215
  div {
@@ -252,25 +242,25 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
252
242
  ` : `
253
243
  ${hasSubmenu || maxWidth && !inFullscreenView ? `
254
244
  a,
255
- ${_link.StyledLink} a,
245
+ ${_link2.StyledLink} a,
256
246
  button,
257
- ${_link.StyledLink} button {
247
+ ${_link2.StyledLink} button {
258
248
  padding: 11px 16px ${hasSubmenu && maxWidth ? "12px" : "10px"};
259
249
  }
260
250
  ` : `
261
251
  a,
262
- ${_link.StyledLink} a,
252
+ ${_link2.StyledLink} a,
263
253
  button,
264
- ${_link.StyledLink} button {
254
+ ${_link2.StyledLink} button {
265
255
  padding: ${!inFullscreenView ? "11px" : "0px"} 16px;
266
256
  }
267
257
  `}
268
258
  `}
269
259
 
270
260
  button,
271
- ${_link.StyledLink} button,
261
+ ${_link2.StyledLink} button,
272
262
  a,
273
- ${_link.StyledLink} a {
263
+ ${_link2.StyledLink} a {
274
264
  margin: 0px;
275
265
  text-align: left;
276
266
 
@@ -288,9 +278,9 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
288
278
  a,
289
279
  button,
290
280
  [data-component="icon"],
291
- ${_link.StyledLink} a,
292
- ${_link.StyledLink} button,
293
- ${_link.StyledLink} [data-component="icon"] {
281
+ ${_link2.StyledLink} a,
282
+ ${_link2.StyledLink} button,
283
+ ${_link2.StyledLink} [data-component="icon"] {
294
284
  font-weight: 500;
295
285
  text-decoration: none;
296
286
  ${!hasInput && `color: ${_menu.default[menuType].color};`}
@@ -454,16 +444,16 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
454
444
  }
455
445
  `}
456
446
 
457
-
447
+
458
448
  > a, > button {
459
449
  min-height: 40px;
460
450
  line-height: 40px;
461
451
  }
462
452
 
463
453
  a,
464
- ${_link.StyledLink} a,
454
+ ${_link2.StyledLink} a,
465
455
  button,
466
- ${_link.StyledLink} button {
456
+ ${_link2.StyledLink} button {
467
457
  width: 100vw;
468
458
  box-sizing: border-box;
469
459
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "144.20.1",
3
+ "version": "144.21.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",