terra-toggle
Advanced tools
Comparing version 3.50.3 to 3.51.0
@@ -5,2 +5,7 @@ # Changelog | ||
## 3.51.0 - (December 7, 2022) | ||
* Changed | ||
* Minor dependency version bump | ||
## 3.50.3 - (July 5, 2022) | ||
@@ -7,0 +12,0 @@ |
@@ -7,25 +7,13 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _bind = _interopRequireDefault(require("classnames/bind")); | ||
var _reactAnimateHeight = _interopRequireDefault(require("react-animate-height")); | ||
var _ToggleModule = _interopRequireDefault(require("./Toggle.module.scss")); | ||
var _excluded = ["isAnimated", "isOpen", "children"]; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } | ||
var cx = _bind.default.bind(_ToggleModule.default); | ||
var propTypes = { | ||
@@ -36,3 +24,2 @@ /** | ||
children: _propTypes.default.node.isRequired, | ||
/** | ||
@@ -42,3 +29,2 @@ * When set, will animate the toggle component as it is expanded or collapsed | ||
isAnimated: _propTypes.default.bool, | ||
/** | ||
@@ -53,12 +39,9 @@ * Used to expand or collapse toggle content | ||
}; | ||
var Toggle = function Toggle(_ref) { | ||
var isAnimated = _ref.isAnimated, | ||
isOpen = _ref.isOpen, | ||
children = _ref.children, | ||
customProps = _objectWithoutProperties(_ref, _excluded); | ||
isOpen = _ref.isOpen, | ||
children = _ref.children, | ||
customProps = _objectWithoutProperties(_ref, _excluded); | ||
var height = isOpen ? 'auto' : 0; | ||
var body; | ||
if (isAnimated) { | ||
@@ -73,3 +56,2 @@ body = /*#__PURE__*/_react.default.createElement(_reactAnimateHeight.default, { | ||
} | ||
return /*#__PURE__*/_react.default.createElement("div", _extends({}, customProps, { | ||
@@ -80,3 +62,2 @@ className: cx('toggle', customProps.className), | ||
}; | ||
Toggle.propTypes = propTypes; | ||
@@ -83,0 +64,0 @@ Toggle.defaultProps = defaultProps; |
{ | ||
"name": "terra-toggle", | ||
"main": "lib/Toggle.js", | ||
"version": "3.50.3", | ||
"version": "3.51.0", | ||
"description": "Toggle component that transitions content in and out.", | ||
@@ -32,3 +32,3 @@ "repository": { | ||
"react-animate-height": "^2.0.1", | ||
"terra-icon": "^3.48.0" | ||
"terra-icon": "^3.49.0" | ||
}, | ||
@@ -48,3 +48,3 @@ "scripts": { | ||
}, | ||
"gitHead": "5d980c62d9a2c86597ccd689865c4090fc26c4b0" | ||
"gitHead": "421b2643a58e6de628aa789a9cdd0778b0a942a2" | ||
} |
@@ -10,3 +10,3 @@ # Terra Toggle | ||
- [Getting Started](#getting-started) | ||
- [Documentation](https://engineering.cerner.com/terra-ui/components/terra-toggle/toggle/toggle) | ||
- [Documentation](https://engineering.cerner.com/terra-ui/components/cerner-terra-core-docs/toggle/about) | ||
- [LICENSE](#license) | ||
@@ -13,0 +13,0 @@ |
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
34949
1
Updatedterra-icon@^3.49.0