terra-slide-panel
Advanced tools
Comparing version 3.36.0 to 3.37.0
@@ -5,2 +5,8 @@ # Changelog | ||
## 3.37.0 - (February 14, 2023) | ||
* Changed | ||
* Updated WDIO screenshots due to webpack-config-terra and | ||
terra-functional-testing upgrade. | ||
## 3.36.0 - (March 15, 2022) | ||
@@ -7,0 +13,0 @@ |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,39 +8,20 @@ value: true | ||
exports.default = exports.SlidePanelPositions = void 0; | ||
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); | ||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _react = _interopRequireDefault(require("react")); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _classnames = _interopRequireDefault(require("classnames")); | ||
var _bind = _interopRequireDefault(require("classnames/bind")); | ||
var _terraThemeContext = _interopRequireDefault(require("terra-theme-context")); | ||
var _SlidePanelModule = _interopRequireDefault(require("./SlidePanel.module.scss")); | ||
var _excluded = ["panelAriaLabel", "mainAriaLabel", "mainContent", "panelContent", "panelBehavior", "panelPosition", "panelSize", "isFullscreen", "isOpen", "fill"]; | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
var cx = _bind.default.bind(_SlidePanelModule.default); | ||
var SlidePanelPositions = { | ||
@@ -57,3 +37,2 @@ START: 'start', | ||
panelAriaLabel: _propTypes.default.string, | ||
/** | ||
@@ -63,3 +42,2 @@ * String that labels the Main content area for screen readers. | ||
mainAriaLabel: _propTypes.default.string, | ||
/** | ||
@@ -69,3 +47,2 @@ * The component to display in the main content area. | ||
mainContent: _propTypes.default.node, | ||
/** | ||
@@ -75,3 +52,2 @@ * The component to display in the panel content area. | ||
panelContent: _propTypes.default.node, | ||
/** | ||
@@ -81,3 +57,2 @@ * The style of panel presentation. One of `overlay`, `squish`. | ||
panelBehavior: _propTypes.default.oneOf(['overlay', 'squish']), | ||
/** | ||
@@ -87,3 +62,2 @@ * The position at which the panel will be displayed. This property honors the current direction setting. One of `start`, `end`. | ||
panelPosition: _propTypes.default.oneOf(['start', 'end']), | ||
/** | ||
@@ -93,3 +67,2 @@ * The size at which the panel will be displayed. One of `small`, `large`. | ||
panelSize: _propTypes.default.oneOf(['small', 'large']), | ||
/** | ||
@@ -99,3 +72,2 @@ * Whether or not, when open, the panel should be displayed with the full width of the SlidePanel. | ||
isFullscreen: _propTypes.default.bool, | ||
/** | ||
@@ -105,3 +77,2 @@ * Whether or not the panel should be displayed. | ||
isOpen: _propTypes.default.bool, | ||
/** | ||
@@ -117,11 +88,7 @@ * Whether or not the SlidePanel should be sized relative to its parent container. | ||
}; | ||
var SlidePanel = /*#__PURE__*/function (_React$Component) { | ||
(0, _inherits2.default)(SlidePanel, _React$Component); | ||
var _super = _createSuper(SlidePanel); | ||
function SlidePanel(props) { | ||
var _this; | ||
(0, _classCallCheck2.default)(this, SlidePanel); | ||
@@ -133,3 +100,2 @@ _this = _super.call(this, props); | ||
} | ||
(0, _createClass2.default)(SlidePanel, [{ | ||
@@ -153,13 +119,13 @@ key: "componentDidUpdate", | ||
var _this$props = this.props, | ||
panelAriaLabel = _this$props.panelAriaLabel, | ||
mainAriaLabel = _this$props.mainAriaLabel, | ||
mainContent = _this$props.mainContent, | ||
panelContent = _this$props.panelContent, | ||
panelBehavior = _this$props.panelBehavior, | ||
panelPosition = _this$props.panelPosition, | ||
panelSize = _this$props.panelSize, | ||
isFullscreen = _this$props.isFullscreen, | ||
isOpen = _this$props.isOpen, | ||
fill = _this$props.fill, | ||
customProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded); | ||
panelAriaLabel = _this$props.panelAriaLabel, | ||
mainAriaLabel = _this$props.mainAriaLabel, | ||
mainContent = _this$props.mainContent, | ||
panelContent = _this$props.panelContent, | ||
panelBehavior = _this$props.panelBehavior, | ||
panelPosition = _this$props.panelPosition, | ||
panelSize = _this$props.panelSize, | ||
isFullscreen = _this$props.isFullscreen, | ||
isOpen = _this$props.isOpen, | ||
fill = _this$props.fill, | ||
customProps = (0, _objectWithoutProperties2.default)(_this$props, _excluded); | ||
var theme = this.context; | ||
@@ -173,3 +139,2 @@ var slidePanelClassNames = (0, _classnames.default)(cx('slide-panel', { | ||
}, theme.className), customProps.className); | ||
var panelDiv = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -183,3 +148,2 @@ className: cx(['panel']), | ||
}, panelContent); | ||
var mainDiv = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -192,3 +156,2 @@ className: cx('main'), | ||
}, mainContent); | ||
var content = panelPosition === SlidePanelPositions.START ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, panelDiv, mainDiv) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, mainDiv, panelDiv); | ||
@@ -205,3 +168,2 @@ return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, customProps, { | ||
}(_react.default.Component); | ||
SlidePanel.propTypes = propTypes; | ||
@@ -208,0 +170,0 @@ SlidePanel.defaultProps = defaultProps; |
{ | ||
"name": "terra-slide-panel", | ||
"main": "lib/SlidePanel.js", | ||
"version": "3.36.0", | ||
"version": "3.37.0", | ||
"description": "The Terra SlidePanel component is a progressive disclosure mechanism that allows additional content to be shown and hidden in a variety of ways.", | ||
@@ -47,3 +47,3 @@ "repository": { | ||
}, | ||
"gitHead": "40ac61f9fd7360971f1a38dda1fbfe871d0486cf" | ||
"gitHead": "dadf4d9798ac1d94e56840504fe67623f75f9a9a" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
55210
1