Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

terra-content-container

Package Overview
Dependencies
Maintainers
8
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terra-content-container - npm Package Compare versions

Comparing version 3.39.0 to 3.39.1

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Changelog

## 3.39.1 - (July 13, 2023)
* Fixed
* Fixed issue of focus outline when `setFocusOnContainer` is not set.
## 3.39.0 - (June 28, 2023)

@@ -7,0 +12,0 @@

16

lib/ContentContainer.js

@@ -71,4 +71,11 @@ "use strict";

var theme = _react.default.useContext(_terraThemeContext.default);
var lightBackground = 'light';
var contentLayoutClassNames = cx(["content-container-".concat(fill ? 'fill' : 'static'), customProps.className]);
var background = backgroundColor || 'light';
// setting tab index to 0 if setFocusOnContainer is set
var scrollAttrs = setFocusOnContainer ? {
tabIndex: 0
} : '';
// border will only be visible when setFocusOnContainer is set for content-container
var background = setFocusOnContainer && (backgroundColor || lightBackground);
var scrollClassNames = cx('normalizer', theme.className, {

@@ -85,7 +92,6 @@ 'content-container-focused-padding': setFocusOnContainer

className: cx('main')
}, /*#__PURE__*/_react.default.createElement(_terraScroll.default, {
}, /*#__PURE__*/_react.default.createElement(_terraScroll.default, _extends({
className: scrollClassNames,
refCallback: scrollRefCallback,
tabIndex: setFocusOnContainer ? '0' : '-1'
}, children)), footer && /*#__PURE__*/_react.default.createElement("div", {
refCallback: scrollRefCallback
}, scrollAttrs), children)), footer && /*#__PURE__*/_react.default.createElement("div", {
className: cx('footer', {

@@ -92,0 +98,0 @@ 'content-container-focused-padding': setFocusOnContainer

{
"name": "terra-content-container",
"main": "lib/ContentContainer.js",
"version": "3.39.0",
"version": "3.39.1",
"description": "The Terra ContentContainer is a structural component for the purpose of arranging content with a header.",

@@ -47,3 +47,3 @@ "repository": {

},
"gitHead": "12c5a230bf239557ce9df5827155138d3a415b5a"
"gitHead": "70ccf4fee8dafedd22ccdb4a224c2227bc7e764f"
}

@@ -65,2 +65,3 @@ import React from 'react';

const theme = React.useContext(ThemeContext);
const lightBackground = 'light';

@@ -72,3 +73,6 @@ const contentLayoutClassNames = cx([

const background = backgroundColor || 'light';
// setting tab index to 0 if setFocusOnContainer is set
const scrollAttrs = (setFocusOnContainer) ? { tabIndex: 0 } : '';
// border will only be visible when setFocusOnContainer is set for content-container
const background = setFocusOnContainer && (backgroundColor || lightBackground);
const scrollClassNames = cx(

@@ -85,3 +89,3 @@ 'normalizer',

<div className={cx('main')}>
<Scroll className={scrollClassNames} refCallback={scrollRefCallback} tabIndex={setFocusOnContainer ? '0' : '-1'}>
<Scroll className={scrollClassNames} refCallback={scrollRefCallback} {...scrollAttrs}>
{children}

@@ -88,0 +92,0 @@ </Scroll>

@@ -26,2 +26,8 @@ Terra.describeViewports('Content Container', ['medium'], () => {

});
it('displays Content Container without border when clicked', () => {
browser.url('/raw/tests/cerner-terra-core-docs/content-container/content-container-click-event');
$('#click-on-content').click();
Terra.validates.element('no border on click');
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc