@carbon-labs/react-ui-shell 0.69.0 → 0.71.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.
package/README.md CHANGED
@@ -41,6 +41,7 @@ components are provided by `@carbon-labs/react-ui-shell`:
41
41
  - `SideNavMenu`
42
42
  - `SideNavMenuItem`
43
43
  - `SideNavSlot`
44
+ - `SideNavTitle`
44
45
  - `TrialCountdown`
45
46
 
46
47
  ```jsx
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ export interface SideNavTitleProps {
9
+ /**
10
+ * Provide the contents of the SideNavTitle.
11
+ */
12
+ children?: React.ReactNode;
13
+ /**
14
+ * Provide an optional class to be applied to the containing node
15
+ */
16
+ className?: string;
17
+ }
18
+ export declare const SideNavTitle: React.FC<SideNavTitleProps>;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import cx from 'classnames';
9
+ import PropTypes from 'prop-types';
10
+ import React__default from 'react';
11
+ import { usePrefix } from '../internal/usePrefix.js';
12
+ import { SideNavDivider } from '@carbon/react';
13
+
14
+ var _SideNavDivider;
15
+ const SideNavTitle = ({
16
+ children,
17
+ className: customClassName
18
+ }) => {
19
+ const prefix = usePrefix();
20
+ const className = cx(`${prefix}--side-nav__title`, customClassName);
21
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("li", {
22
+ className: className
23
+ }, children), _SideNavDivider || (_SideNavDivider = /*#__PURE__*/React__default.createElement(SideNavDivider, null)));
24
+ };
25
+ SideNavTitle.propTypes = {
26
+ /**
27
+ * Provide the contents of the SideNavTitle.
28
+ */
29
+ children: PropTypes.node,
30
+ /**
31
+ * Provide an optional class to be applied to the containing node
32
+ */
33
+ className: PropTypes.string
34
+ };
35
+
36
+ export { SideNavTitle };
package/es/index.d.ts CHANGED
@@ -19,3 +19,4 @@ export { HeaderDivider } from './components/HeaderDivider';
19
19
  export { TrialCountdown } from './components/TrialCountdown';
20
20
  export * as Profile from './components/Profile';
21
21
  export { SideNavSlot } from './components/SideNavSlot';
22
+ export { SideNavTitle } from './components/SideNavTitle';
package/es/index.js CHANGED
@@ -19,3 +19,4 @@ export { TrialCountdown } from './components/TrialCountdown.js';
19
19
  import * as Profile from './components/Profile.js';
20
20
  export { Profile };
21
21
  export { SideNavSlot } from './components/SideNavSlot.js';
22
+ export { SideNavTitle } from './components/SideNavTitle.js';
@@ -29,9 +29,8 @@ const componentName = 'UserAvatar';
29
29
  * TODO: A description of the component.
30
30
  */
31
31
 
32
- let UserAvatar = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
33
- let {
34
- // The component props, in alphabetical order (for consistency).
32
+ let UserAvatar = /*#__PURE__*/React__default.forwardRef((props, ref) => {
33
+ const {
35
34
  backgroundColor = 'order-1-cyan',
36
35
  className,
37
36
  image,
@@ -42,9 +41,8 @@ let UserAvatar = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
42
41
  size = 'md',
43
42
  tooltipText,
44
43
  tooltipAlignment = 'bottom',
45
- // Collect any other property values passed in.
46
44
  ...rest
47
- } = _ref;
45
+ } = props;
48
46
  const carbonPrefix = usePrefix();
49
47
  const iconSize = {
50
48
  sm: 16,
@@ -137,10 +135,10 @@ UserAvatar.propTypes = {
137
135
  * When passing the image prop use the imageDescription prop to describe the image for screen reader.
138
136
  */
139
137
  /**@ts-ignore */
140
- imageDescription: PropTypes.string.isRequired.if(_ref2 => {
138
+ imageDescription: PropTypes.string.isRequired.if(_ref => {
141
139
  let {
142
140
  image
143
- } = _ref2;
141
+ } = _ref;
144
142
  return !!image;
145
143
  }),
146
144
  /**
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- // Copyright IBM Corp. 2020, 2024
8
+ // Copyright IBM Corp. 2020, 2025
9
9
  //
10
10
  // This source code is licensed under the Apache-2.0 license found in the
11
11
  // LICENSE file in the root directory of this source tree.
@@ -77,8 +77,9 @@ const defaults = {
77
77
  Nav: false,
78
78
  NavItem: false,
79
79
  NavList: false,
80
- BigNumbers: false,
80
+ BigNumber: false,
81
81
  TruncatedList: false,
82
+ TruncatedText: false,
82
83
  DelimitedList: false,
83
84
  ScrollGradient: false,
84
85
  StringFormatter: false,
@@ -126,7 +127,7 @@ const defaults = {
126
127
  InlineTip: false,
127
128
  InlineTipButton: false,
128
129
  InlineTipLink: false,
129
- InterstitialScreen: false,
130
+ InterstitialScreen: true,
130
131
  NonLinearReading: false
131
132
  },
132
133
  // feature level flags
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ export interface SideNavTitleProps {
9
+ /**
10
+ * Provide the contents of the SideNavTitle.
11
+ */
12
+ children?: React.ReactNode;
13
+ /**
14
+ * Provide an optional class to be applied to the containing node
15
+ */
16
+ className?: string;
17
+ }
18
+ export declare const SideNavTitle: React.FC<SideNavTitleProps>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ 'use strict';
9
+
10
+ var cx = require('classnames');
11
+ var PropTypes = require('prop-types');
12
+ var React__default = require('react');
13
+ var usePrefix = require('../internal/usePrefix.js');
14
+ var react = require('@carbon/react');
15
+
16
+ var _SideNavDivider;
17
+ const SideNavTitle = ({
18
+ children,
19
+ className: customClassName
20
+ }) => {
21
+ const prefix = usePrefix.usePrefix();
22
+ const className = cx(`${prefix}--side-nav__title`, customClassName);
23
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("li", {
24
+ className: className
25
+ }, children), _SideNavDivider || (_SideNavDivider = /*#__PURE__*/React__default.createElement(react.SideNavDivider, null)));
26
+ };
27
+ SideNavTitle.propTypes = {
28
+ /**
29
+ * Provide the contents of the SideNavTitle.
30
+ */
31
+ children: PropTypes.node,
32
+ /**
33
+ * Provide an optional class to be applied to the containing node
34
+ */
35
+ className: PropTypes.string
36
+ };
37
+
38
+ exports.SideNavTitle = SideNavTitle;
package/lib/index.d.ts CHANGED
@@ -19,3 +19,4 @@ export { HeaderDivider } from './components/HeaderDivider';
19
19
  export { TrialCountdown } from './components/TrialCountdown';
20
20
  export * as Profile from './components/Profile';
21
21
  export { SideNavSlot } from './components/SideNavSlot';
22
+ export { SideNavTitle } from './components/SideNavTitle';
package/lib/index.js CHANGED
@@ -20,6 +20,7 @@ var HeaderDivider = require('./components/HeaderDivider.js');
20
20
  var TrialCountdown = require('./components/TrialCountdown.js');
21
21
  var Profile = require('./components/Profile.js');
22
22
  var SideNavSlot = require('./components/SideNavSlot.js');
23
+ var SideNavTitle = require('./components/SideNavTitle.js');
23
24
 
24
25
 
25
26
 
@@ -40,3 +41,4 @@ exports.HeaderDivider = HeaderDivider.HeaderDivider;
40
41
  exports.TrialCountdown = TrialCountdown.TrialCountdown;
41
42
  exports.Profile = Profile;
42
43
  exports.SideNavSlot = SideNavSlot.SideNavSlot;
44
+ exports.SideNavTitle = SideNavTitle.SideNavTitle;
@@ -31,9 +31,8 @@ const componentName = 'UserAvatar';
31
31
  * TODO: A description of the component.
32
32
  */
33
33
 
34
- exports.UserAvatar = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
35
- let {
36
- // The component props, in alphabetical order (for consistency).
34
+ exports.UserAvatar = /*#__PURE__*/React__default.forwardRef((props, ref) => {
35
+ const {
37
36
  backgroundColor = 'order-1-cyan',
38
37
  className,
39
38
  image,
@@ -44,9 +43,8 @@ exports.UserAvatar = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
44
43
  size = 'md',
45
44
  tooltipText,
46
45
  tooltipAlignment = 'bottom',
47
- // Collect any other property values passed in.
48
46
  ...rest
49
- } = _ref;
47
+ } = props;
50
48
  const carbonPrefix = react.usePrefix();
51
49
  const iconSize = {
52
50
  sm: 16,
@@ -139,10 +137,10 @@ exports.UserAvatar.propTypes = {
139
137
  * When passing the image prop use the imageDescription prop to describe the image for screen reader.
140
138
  */
141
139
  /**@ts-ignore */
142
- imageDescription: index.default.string.isRequired.if(_ref2 => {
140
+ imageDescription: index.default.string.isRequired.if(_ref => {
143
141
  let {
144
142
  image
145
- } = _ref2;
143
+ } = _ref;
146
144
  return !!image;
147
145
  }),
148
146
  /**
@@ -9,7 +9,7 @@
9
9
 
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
- // Copyright IBM Corp. 2020, 2024
12
+ // Copyright IBM Corp. 2020, 2025
13
13
  //
14
14
  // This source code is licensed under the Apache-2.0 license found in the
15
15
  // LICENSE file in the root directory of this source tree.
@@ -81,8 +81,9 @@ const defaults = {
81
81
  Nav: false,
82
82
  NavItem: false,
83
83
  NavList: false,
84
- BigNumbers: false,
84
+ BigNumber: false,
85
85
  TruncatedList: false,
86
+ TruncatedText: false,
86
87
  DelimitedList: false,
87
88
  ScrollGradient: false,
88
89
  StringFormatter: false,
@@ -130,7 +131,7 @@ const defaults = {
130
131
  InlineTip: false,
131
132
  InlineTipButton: false,
132
133
  InlineTipLink: false,
133
- InterstitialScreen: false,
134
+ InterstitialScreen: true,
134
135
  NonLinearReading: false
135
136
  },
136
137
  // feature level flags
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon-labs/react-ui-shell",
3
- "version": "0.69.0",
3
+ "version": "0.71.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -37,10 +37,10 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@carbon-labs/utilities": "canary",
40
- "@carbon/ibm-products": "^2.68.0"
40
+ "@carbon/ibm-products": "^2.72.1"
41
41
  },
42
42
  "dependencies": {
43
43
  "@ibm/telemetry-js": "^1.9.1"
44
44
  },
45
- "gitHead": "cc7ea86ffe90b25c4a73caf93502ee36f1c0b05d"
45
+ "gitHead": "889e0c8a703724b78f30308264867ae332e04377"
46
46
  }
@@ -139,6 +139,21 @@ div:has(.#{$prefix}--header)
139
139
  }
140
140
  }
141
141
 
142
+ // SideNavTitle
143
+ .#{$prefix}--side-nav__title {
144
+ @include type-style('label-01');
145
+
146
+ display: none;
147
+ color: $text-secondary;
148
+ padding-block-start: $spacing-05;
149
+ padding-inline-start: $spacing-05;
150
+ white-space: nowrap;
151
+ }
152
+
153
+ .#{$prefix}--side-nav--expanded .#{$prefix}--side-nav__title {
154
+ display: block;
155
+ }
156
+
142
157
  // SideNavMenu
143
158
  // Level 2 / Doublewide Level 3
144
159
  // without icon