@carbon-labs/react-ui-shell 0.68.0 → 0.69.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,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { ArrowLeft, ChevronRight, ChevronDown } from '@carbon/icons-react';
8
+ import { ChevronRight, ChevronDown, ArrowLeft } from '@carbon/icons-react';
9
9
  import { SideNavIcon, Layer, Button } from '@carbon/react';
10
10
  import { breakpoints } from '../node_modules/@carbon/layout/es/index.js';
11
11
  import cx from 'classnames';
@@ -332,7 +332,7 @@ const SideNavMenu = /*#__PURE__*/React__default.forwardRef(function SideNavMenu(
332
332
  ref: menuRef,
333
333
  type: "button",
334
334
  tabIndex: isTreeview ? -1 : 0
335
- }, IconElement && /*#__PURE__*/React__default.createElement(SideNavIcon, null, /*#__PURE__*/React__default.createElement(IconElement, null)), !sideNavExpanded && /*#__PURE__*/React__default.createElement("div", {
335
+ }, IconElement && /*#__PURE__*/React__default.createElement(SideNavIcon, null, /*#__PURE__*/React__default.createElement(IconElement, null)), !sideNavExpanded && navType == SIDE_NAV_TYPE.PANEL && /*#__PURE__*/React__default.createElement("div", {
336
336
  className: `${prefix}--side-nav--panel-submenu-caret-container`
337
337
  }, /*#__PURE__*/React__default.createElement("div", {
338
338
  className: `${prefix}--side-nav--panel-submenu-caret`
@@ -334,7 +334,7 @@ const SideNavMenu = /*#__PURE__*/React__default.forwardRef(function SideNavMenu(
334
334
  ref: menuRef,
335
335
  type: "button",
336
336
  tabIndex: isTreeview ? -1 : 0
337
- }, IconElement && /*#__PURE__*/React__default.createElement(react.SideNavIcon, null, /*#__PURE__*/React__default.createElement(IconElement, null)), !sideNavExpanded && /*#__PURE__*/React__default.createElement("div", {
337
+ }, IconElement && /*#__PURE__*/React__default.createElement(react.SideNavIcon, null, /*#__PURE__*/React__default.createElement(IconElement, null)), !sideNavExpanded && navType == SideNav.SIDE_NAV_TYPE.PANEL && /*#__PURE__*/React__default.createElement("div", {
338
338
  className: `${prefix}--side-nav--panel-submenu-caret-container`
339
339
  }, /*#__PURE__*/React__default.createElement("div", {
340
340
  className: `${prefix}--side-nav--panel-submenu-caret`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon-labs/react-ui-shell",
3
- "version": "0.68.0",
3
+ "version": "0.69.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -42,5 +42,5 @@
42
42
  "dependencies": {
43
43
  "@ibm/telemetry-js": "^1.9.1"
44
44
  },
45
- "gitHead": "d3da5ef4a94c2af71e3c06af5104b0b726473351"
45
+ "gitHead": "cc7ea86ffe90b25c4a73caf93502ee36f1c0b05d"
46
46
  }
@@ -16,7 +16,7 @@ $prefix: 'cds' !default;
16
16
  .#{$prefix}--side-nav--panel ~ .#{$prefix}--content,
17
17
  div:has(.#{$prefix}--side-nav--panel) ~ .#{$prefix}--content {
18
18
  margin-inline-start: $spacing-09;
19
- transition: margin-inline-start $duration-fast-02, transform $duration-fast-02;
19
+ transition: $fast-02 motion(exit, productive);
20
20
  }
21
21
 
22
22
  .#{$prefix}--side-nav--panel.#{$prefix}--side-nav--expanded
@@ -24,6 +24,8 @@ div:has(.#{$prefix}--side-nav--panel) ~ .#{$prefix}--content {
24
24
  div:has(.#{$prefix}--side-nav--panel.#{$prefix}--side-nav--expanded)
25
25
  ~ .#{$prefix}--content {
26
26
  margin-inline-start: convert.to-rem(256px);
27
+ transition: $moderate-01 motion(standard, productive);
28
+ transition-delay: 40ms;
27
29
  }
28
30
 
29
31
  // should not be a grid influencer when used with overlay
@@ -29,7 +29,17 @@ div:has(.#{$prefix}--header)
29
29
  }
30
30
 
31
31
  .#{$prefix}--side-nav {
32
+ z-index: z('header') - 1;
32
33
  overflow: visible;
34
+
35
+ // closing side-nav transition
36
+ transition: $fast-02 motion(exit, productive);
37
+ }
38
+
39
+ .#{$prefix}--side-nav.#{$prefix}--side-nav--expanded {
40
+ // opening side-nav transition
41
+ transition: $moderate-01 motion(standard, productive);
42
+ transition-delay: 40ms;
33
43
  }
34
44
 
35
45
  //----------------------------------------------------------------------------
@@ -302,22 +312,25 @@ div:has(.#{$prefix}--header)
302
312
  inset-block-start: 0;
303
313
  inset-inline-start: 100%;
304
314
  transform: translateX(-100%);
305
- transition: color $duration-fast-02, background-color $duration-fast-02,
306
- outline $duration-fast-02;
315
+ transition: $fast-02 motion(exit, productive);
307
316
  will-change: inline-size;
308
317
  }
309
318
 
310
319
  .#{$prefix}--side-nav__menu-secondary-wrapper-expanded {
320
+ box-shadow: $spacing-02 0 convert.to-rem(6px) convert.to-rem(-3px) $shadow;
321
+
311
322
  inline-size: 16rem;
312
323
  overflow-y: auto;
313
324
  transform: translateX(0);
325
+ transition: $moderate-01 motion(standard, productive);
326
+ transition-delay: 40ms;
314
327
  }
315
328
 
316
329
  //----------------------------------------------------------------------------
317
330
  // Panel
318
331
  //----------------------------------------------------------------------------
319
332
  .#{$prefix}--side-nav--panel {
320
- z-index: 7999; /* needs to be below header */
333
+ z-index: z('header') - 2;
321
334
  overflow: visible;
322
335
  border-inline-end: 1px solid $border-subtle;
323
336
 
@@ -554,10 +567,15 @@ div:has(.#{$prefix}--header)
554
567
  // Rail
555
568
  //----------------------------------------------------------------------------
556
569
  .#{$prefix}--side-nav--rail {
557
- z-index: 7999; /* needs to be below header */
570
+ z-index: z('header') - 2;
558
571
  border-inline-end: 1px solid $border-subtle;
559
572
  }
560
573
 
574
+ .#{$prefix}--side-nav--rail.#{$prefix}--side-nav--expanded {
575
+ border-inline-end: none;
576
+ box-shadow: $spacing-02 0 convert.to-rem(6px) convert.to-rem(-3px) $shadow;
577
+ }
578
+
561
579
  @each $breakpoint in ('sm', 'md', 'lg', 'xlg', 'max') {
562
580
  .#{$prefix}--side-nav--rail.#{$prefix}--side-nav--hide-rail-breakpoint-down-#{$breakpoint} {
563
581
  @include breakpoint-down($breakpoint) {
@@ -568,13 +586,9 @@ div:has(.#{$prefix}--header)
568
586
 
569
587
  // allow overlay to display at all breakpoints
570
588
  .#{$prefix}--side-nav__overlay-active {
571
- z-index: z('overlay');
572
- background-color: $overlay;
589
+ background-color: transparent;
573
590
  block-size: 100vh;
574
591
  inline-size: 100vw;
575
- opacity: 1;
576
- transition: opacity $transition-expansion $standard-easing,
577
- background-color $transition-expansion $standard-easing;
578
592
  }
579
593
 
580
594
  //----------------------------------------------------------------------------