@carbon-labs/react-ui-shell 0.69.0 → 0.70.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';
@@ -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;
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.70.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": "cc7ea86ffe90b25c4a73caf93502ee36f1c0b05d"
45
+ "gitHead": "7ee50abce7452bb5bc94f5de474ffb7f72a0f234"
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