terra-clinical-header
Advanced tools
Comparing version 3.24.0 to 3.25.0
@@ -5,2 +5,7 @@ # Changelog | ||
## 3.25.0 - (March 29, 2023) | ||
* Changed | ||
* Updated wdio screenshots. | ||
## 3.24.0 - (July 21, 2021) | ||
@@ -7,0 +12,0 @@ |
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,31 +8,16 @@ value: true | ||
exports.default = void 0; | ||
var _react = _interopRequireWildcard(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 _HeaderModule = _interopRequireDefault(require("./Header.module.scss")); | ||
var _excluded = ["children", "title", "startContent", "endContent", "isSubheader"]; | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _extends() { _extends = Object.assign || 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 _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(_HeaderModule.default); | ||
var propTypes = { | ||
@@ -45,3 +29,2 @@ /** | ||
children: _propTypes.default.element, | ||
/** | ||
@@ -51,3 +34,2 @@ * Content to be displayed at the start of the header, placed before the title | ||
startContent: _propTypes.default.element, | ||
/** | ||
@@ -57,3 +39,2 @@ * Text to be displayed as the title in the header bar | ||
title: _propTypes.default.string, | ||
/** | ||
@@ -64,3 +45,2 @@ * Content to be displayed at the end of the header | ||
endContent: _propTypes.default.element, | ||
/** | ||
@@ -77,14 +57,11 @@ * A Boolean indicating if element is a subheader. | ||
}; | ||
var Header = function Header(_ref) { | ||
var children = _ref.children, | ||
title = _ref.title, | ||
startContent = _ref.startContent, | ||
endContent = _ref.endContent, | ||
isSubheader = _ref.isSubheader, | ||
customProps = _objectWithoutProperties(_ref, _excluded); | ||
title = _ref.title, | ||
startContent = _ref.startContent, | ||
endContent = _ref.endContent, | ||
isSubheader = _ref.isSubheader, | ||
customProps = _objectWithoutProperties(_ref, _excluded); | ||
var theme = (0, _react.useContext)(_terraThemeContext.default); | ||
var titleElement; | ||
if (title) { | ||
@@ -97,3 +74,2 @@ titleElement = /*#__PURE__*/_react.default.createElement("div", { | ||
} | ||
var content = _react.default.Children.map(children, function (child) { | ||
@@ -104,3 +80,2 @@ return /*#__PURE__*/_react.default.cloneElement(child, { | ||
}); | ||
var headerClassNames = (0, _classnames.default)([cx(['flex-header', { | ||
@@ -119,3 +94,2 @@ subheader: isSubheader | ||
}; | ||
Header.propTypes = propTypes; | ||
@@ -122,0 +96,0 @@ Header.defaultProps = defaultProps; |
@@ -7,11 +7,6 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _terraButton = _interopRequireDefault(require("terra-button")); | ||
var _terraClinicalHeader = _interopRequireDefault(require("terra-clinical-header")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var TitleHeader = function TitleHeader() { | ||
@@ -28,4 +23,3 @@ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_terraClinicalHeader.default, { | ||
}; | ||
var _default = TitleHeader; | ||
exports.default = _default; |
@@ -7,9 +7,5 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _terraClinicalHeader = _interopRequireDefault(require("terra-clinical-header")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var LongTextWithButtons = function LongTextWithButtons() { | ||
@@ -20,4 +16,3 @@ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_terraClinicalHeader.default, { | ||
}; | ||
var _default = LongTextWithButtons; | ||
exports.default = _default; |
@@ -7,11 +7,6 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _terraButton = _interopRequireDefault(require("terra-button")); | ||
var _terraClinicalHeader = _interopRequireDefault(require("terra-clinical-header")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var LongTextWithContent = function LongTextWithContent() { | ||
@@ -30,4 +25,3 @@ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_terraClinicalHeader.default, { | ||
}; | ||
var _default = LongTextWithContent; | ||
exports.default = _default; |
@@ -7,11 +7,6 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _terraButton = _interopRequireDefault(require("terra-button")); | ||
var _terraClinicalHeader = _interopRequireDefault(require("terra-clinical-header")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var Subheader = function Subheader() { | ||
@@ -29,4 +24,3 @@ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_terraClinicalHeader.default, { | ||
}; | ||
var _default = Subheader; | ||
exports.default = _default; |
@@ -7,9 +7,5 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _terraClinicalHeader = _interopRequireDefault(require("terra-clinical-header")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var TitleHeader = function TitleHeader() { | ||
@@ -20,4 +16,3 @@ return /*#__PURE__*/_react.default.createElement(_terraClinicalHeader.default, { | ||
}; | ||
var _default = TitleHeader; | ||
exports.default = _default; |
@@ -7,9 +7,5 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _Header = _interopRequireDefault(require("../../../Header")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _default = function _default() { | ||
@@ -20,3 +16,2 @@ return /*#__PURE__*/_react.default.createElement(_Header.default, { | ||
}; | ||
exports.default = _default; |
@@ -7,15 +7,8 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _bind = _interopRequireDefault(require("classnames/bind")); | ||
var _Header = _interopRequireDefault(require("../../../Header")); | ||
var _ClinicalHeaderCommonTestModule = _interopRequireDefault(require("./ClinicalHeaderCommon.test.module.scss")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var cx = _bind.default.bind(_ClinicalHeaderCommonTestModule.default); | ||
var startContent = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -25,3 +18,2 @@ id: "headerTest--startContent", | ||
}); | ||
var endContent = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -31,3 +23,2 @@ id: "headerTest--endContent", | ||
}); | ||
var _default = function _default() { | ||
@@ -40,3 +31,2 @@ return /*#__PURE__*/_react.default.createElement(_Header.default, { | ||
}; | ||
exports.default = _default; |
@@ -7,15 +7,8 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _bind = _interopRequireDefault(require("classnames/bind")); | ||
var _Header = _interopRequireDefault(require("../../../Header")); | ||
var _ClinicalHeaderCommonTestModule = _interopRequireDefault(require("./ClinicalHeaderCommon.test.module.scss")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var cx = _bind.default.bind(_ClinicalHeaderCommonTestModule.default); | ||
var startContent = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -25,3 +18,2 @@ id: "headerTest--startContent", | ||
}); | ||
var endContent = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -31,3 +23,2 @@ id: "headerTest--endContent", | ||
}); | ||
var _default = function _default() { | ||
@@ -41,3 +32,2 @@ return /*#__PURE__*/_react.default.createElement(_Header.default, { | ||
}; | ||
exports.default = _default; |
@@ -7,15 +7,8 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _bind = _interopRequireDefault(require("classnames/bind")); | ||
var _Header = _interopRequireDefault(require("../../../Header")); | ||
var _ClinicalHeaderCommonTestModule = _interopRequireDefault(require("./ClinicalHeaderCommon.test.module.scss")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var cx = _bind.default.bind(_ClinicalHeaderCommonTestModule.default); | ||
var content = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -25,3 +18,2 @@ id: "headerTest--content", | ||
}); | ||
var _default = function _default() { | ||
@@ -33,3 +25,2 @@ return /*#__PURE__*/_react.default.createElement(_Header.default, { | ||
}; | ||
exports.default = _default; |
@@ -7,15 +7,8 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _bind = _interopRequireDefault(require("classnames/bind")); | ||
var _Header = _interopRequireDefault(require("../../../Header")); | ||
var _ClinicalHeaderCommonTestModule = _interopRequireDefault(require("./ClinicalHeaderCommon.test.module.scss")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var cx = _bind.default.bind(_ClinicalHeaderCommonTestModule.default); | ||
var startContent = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -25,3 +18,2 @@ id: "headerTest--startContent", | ||
}); | ||
var endContent = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -31,3 +23,2 @@ id: "headerTest--endContent", | ||
}); | ||
var _default = function _default() { | ||
@@ -41,3 +32,2 @@ return /*#__PURE__*/_react.default.createElement(_Header.default, { | ||
}; | ||
exports.default = _default; |
@@ -7,9 +7,5 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _Header = _interopRequireDefault(require("../../../Header")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var LongTitleHeader = /*#__PURE__*/_react.default.createElement(_Header.default, { | ||
@@ -19,7 +15,5 @@ id: "Header", | ||
}); | ||
var _default = function _default() { | ||
return LongTitleHeader; | ||
}; | ||
exports.default = _default; |
@@ -7,15 +7,8 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _bind = _interopRequireDefault(require("classnames/bind")); | ||
var _Header = _interopRequireDefault(require("../../../Header")); | ||
var _ClinicalHeaderCommonTestModule = _interopRequireDefault(require("./ClinicalHeaderCommon.test.module.scss")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var cx = _bind.default.bind(_ClinicalHeaderCommonTestModule.default); | ||
var content = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -25,3 +18,2 @@ id: "headerTest--content", | ||
}); | ||
var _default = function _default() { | ||
@@ -32,3 +24,2 @@ return /*#__PURE__*/_react.default.createElement(_Header.default, { | ||
}; | ||
exports.default = _default; |
@@ -7,15 +7,8 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _bind = _interopRequireDefault(require("classnames/bind")); | ||
var _Header = _interopRequireDefault(require("../../../Header")); | ||
var _ClinicalHeaderCommonTestModule = _interopRequireDefault(require("./ClinicalHeaderCommon.test.module.scss")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var cx = _bind.default.bind(_ClinicalHeaderCommonTestModule.default); | ||
var content = /*#__PURE__*/_react.default.createElement("div", { | ||
@@ -25,3 +18,2 @@ id: "headerTest--content", | ||
}); | ||
var _default = function _default() { | ||
@@ -33,3 +25,2 @@ return /*#__PURE__*/_react.default.createElement(_Header.default, { | ||
}; | ||
exports.default = _default; |
@@ -7,9 +7,5 @@ "use strict"; | ||
exports.default = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _Header = _interopRequireDefault(require("../../../Header")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var _default = function _default() { | ||
@@ -21,3 +17,2 @@ return /*#__PURE__*/_react.default.createElement(_Header.default, { | ||
}; | ||
exports.default = _default; |
{ | ||
"name": "terra-clinical-header", | ||
"main": "lib/Header.js", | ||
"version": "3.24.0", | ||
"version": "3.25.0", | ||
"description": "A Header component that allows elements to be placed on the left and right ends of the header with a left aligned title in the center. ", | ||
@@ -48,3 +48,3 @@ "repository": { | ||
}, | ||
"gitHead": "65c6df407049577f47cef244a0b7e3c38617647f" | ||
"gitHead": "afd20da19b6bc33e3af9fc58c052fbb742e0fba3" | ||
} |
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
64429
1