@carbon-labs/react-ui-shell 0.28.0 → 0.29.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
@@ -26,7 +26,7 @@ yarn add @carbon-labs/react-ui-shell @carbon/react
26
26
  ## ⚡ Usage
27
27
 
28
28
  To use this package you will need to import components from both `@carbon/react`
29
- and `@carbon-labs/react-ui-shell`o compose the UI Shell. The following
29
+ and `@carbon-labs/react-ui-shell` to compose the UI Shell. The following
30
30
  components are provided by `@carbon-labs/react-ui-shell`:
31
31
 
32
32
  - `SideNav`
@@ -35,6 +35,8 @@ components are provided by `@carbon-labs/react-ui-shell`:
35
35
  - `SideNavMenu`
36
36
  - `SideNavMenuItem`
37
37
  - `HeaderPanel`
38
+ - `HeaderDivider`
39
+ - `SharkFinIcon`
38
40
 
39
41
  ```jsx
40
42
  import { SideNav } from '@carbon-labs/react-ui-shell/es/index';
@@ -0,0 +1,14 @@
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 HeaderDividerProps {
9
+ /**
10
+ * Provide an optional class to be applied to the containing node
11
+ */
12
+ className?: string;
13
+ }
14
+ export declare const HeaderDivider: React.FC<HeaderDividerProps>;
@@ -0,0 +1,30 @@
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 '../_virtual/index.js';
9
+ import PropTypes from 'prop-types';
10
+ import React from 'react';
11
+ import { usePrefix } from '../internal/usePrefix.js';
12
+
13
+ const HeaderDivider = _ref => {
14
+ let {
15
+ className
16
+ } = _ref;
17
+ const prefix = usePrefix();
18
+ const classNames = cx(`${prefix}--header__divider`, className);
19
+ return /*#__PURE__*/React.createElement("span", {
20
+ className: classNames
21
+ });
22
+ };
23
+ HeaderDivider.propTypes = {
24
+ /**
25
+ * Provide an optional class to be applied to the containing node
26
+ */
27
+ className: PropTypes.string
28
+ };
29
+
30
+ export { HeaderDivider };
package/es/index.d.ts CHANGED
@@ -15,3 +15,4 @@ export { SideNavMenuItem } from './components/SideNavMenuItem.js';
15
15
  export { HeaderContainer } from './components/HeaderContainer';
16
16
  export { HeaderPanel } from './components/HeaderPanel';
17
17
  export { SharkFinIcon } from './components/SharkFinIcon';
18
+ export { HeaderDivider } from './components/HeaderDivider';
package/es/index.js CHANGED
@@ -14,3 +14,4 @@ export { SideNavMenuItem } from './components/SideNavMenuItem.js';
14
14
  export { HeaderContainer } from './components/HeaderContainer.js';
15
15
  export { HeaderPanel } from './components/HeaderPanel.js';
16
16
  export { SharkFinIcon } from './components/SharkFinIcon.js';
17
+ export { HeaderDivider } from './components/HeaderDivider.js';
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { getAttributes } from '../../icon-helpers/es/index.js';
8
+ import { getAttributes } from '../node_modules/@carbon/icon-helpers/es/index.js';
9
9
  import PropTypes from 'prop-types';
10
10
  import React from 'react';
11
11
 
@@ -0,0 +1,14 @@
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 HeaderDividerProps {
9
+ /**
10
+ * Provide an optional class to be applied to the containing node
11
+ */
12
+ className?: string;
13
+ }
14
+ export declare const HeaderDivider: React.FC<HeaderDividerProps>;
@@ -0,0 +1,32 @@
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 index = require('../_virtual/index.js');
11
+ var PropTypes = require('prop-types');
12
+ var React = require('react');
13
+ var usePrefix = require('../internal/usePrefix.js');
14
+
15
+ const HeaderDivider = _ref => {
16
+ let {
17
+ className
18
+ } = _ref;
19
+ const prefix = usePrefix.usePrefix();
20
+ const classNames = index.default(`${prefix}--header__divider`, className);
21
+ return /*#__PURE__*/React.createElement("span", {
22
+ className: classNames
23
+ });
24
+ };
25
+ HeaderDivider.propTypes = {
26
+ /**
27
+ * Provide an optional class to be applied to the containing node
28
+ */
29
+ className: PropTypes.string
30
+ };
31
+
32
+ exports.HeaderDivider = HeaderDivider;
package/lib/index.d.ts CHANGED
@@ -15,3 +15,4 @@ export { SideNavMenuItem } from './components/SideNavMenuItem.js';
15
15
  export { HeaderContainer } from './components/HeaderContainer';
16
16
  export { HeaderPanel } from './components/HeaderPanel';
17
17
  export { SharkFinIcon } from './components/SharkFinIcon';
18
+ export { HeaderDivider } from './components/HeaderDivider';
package/lib/index.js CHANGED
@@ -16,6 +16,7 @@ var SideNavMenuItem = require('./components/SideNavMenuItem.js');
16
16
  var HeaderContainer = require('./components/HeaderContainer.js');
17
17
  var HeaderPanel = require('./components/HeaderPanel.js');
18
18
  var SharkFinIcon = require('./components/SharkFinIcon.js');
19
+ var HeaderDivider = require('./components/HeaderDivider.js');
19
20
 
20
21
 
21
22
 
@@ -29,3 +30,4 @@ exports.SideNavMenuItem = SideNavMenuItem.SideNavMenuItem;
29
30
  exports.HeaderContainer = HeaderContainer.HeaderContainer;
30
31
  exports.HeaderPanel = HeaderPanel.HeaderPanel;
31
32
  exports.SharkFinIcon = SharkFinIcon.SharkFinIcon;
33
+ exports.HeaderDivider = HeaderDivider.HeaderDivider;
@@ -9,7 +9,7 @@
9
9
 
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
- var index = require('../../icon-helpers/es/index.js');
12
+ var index = require('../node_modules/@carbon/icon-helpers/es/index.js');
13
13
  var PropTypes = require('prop-types');
14
14
  var React = require('react');
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon-labs/react-ui-shell",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -33,5 +33,5 @@
33
33
  "dependencies": {
34
34
  "@ibm/telemetry-js": "^1.9.1"
35
35
  },
36
- "gitHead": "4a8aca9677b353f76cfcd7021a2665d95a22782c"
36
+ "gitHead": "0b543e502dcedecdc6d8b624536dc3d7f153607b"
37
37
  }
@@ -0,0 +1,17 @@
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
+ @use '@carbon/styles/scss/utilities/convert' as convert;
8
+ @use '@carbon/styles/scss/theme' as *;
9
+
10
+ $prefix: 'cds' !default;
11
+
12
+ .#{$prefix}--header__divider {
13
+ flex-shrink: 0;
14
+ background: $border-subtle;
15
+ block-size: convert.to-rem(24px);
16
+ inline-size: 1px;
17
+ }
@@ -4,9 +4,27 @@
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
+ @use '@carbon/styles/scss/theme' as *;
7
8
 
8
9
  $prefix: 'cds' !default;
9
10
 
11
+ .#{$prefix}--header__global {
12
+ align-items: center;
13
+ }
14
+
15
+ .#{$prefix}--header__action {
16
+ flex-shrink: 0;
17
+ }
18
+
10
19
  .#{$prefix}--header__action:focus {
11
20
  border-width: 2px;
12
21
  }
22
+
23
+ //----------------------------------------------------------------------------
24
+ // Menu button inside Header
25
+ //----------------------------------------------------------------------------
26
+
27
+ .#{$prefix}--header
28
+ .#{$prefix}--menu-button__trigger.#{$prefix}--btn--ghost:not([disabled]) {
29
+ color: $text-secondary;
30
+ }
@@ -9,3 +9,4 @@
9
9
  @use 'styles/side-nav';
10
10
  @use 'styles/content';
11
11
  @use 'styles/shark-fin-icon.scss';
12
+ @use 'styles/header-divider.scss';