@khanacademy/wonder-blocks-core
Advanced tools
Comparing version 12.1.0 to 12.1.1
# @khanacademy/wonder-blocks-core | ||
## 12.1.1 | ||
### Patch Changes | ||
- ee8d95a: Rollback rollup version from v4 to v2 to prevent an issue with CJS builds in unit tests | ||
## 12.1.0 | ||
@@ -4,0 +10,0 @@ |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var _extends = require('@babel/runtime/helpers/extends'); | ||
@@ -8,3 +10,6 @@ var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose'); | ||
function _interopNamespaceDefault(e) { | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
var n = Object.create(null); | ||
@@ -22,7 +27,9 @@ if (e) { | ||
} | ||
n.default = e; | ||
n["default"] = e; | ||
return Object.freeze(n); | ||
} | ||
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React); | ||
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends); | ||
var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose); | ||
var React__namespace = /*#__PURE__*/_interopNamespace(React); | ||
@@ -100,7 +107,7 @@ function flatten(list) { | ||
} = _ref, | ||
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2); | ||
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$2); | ||
const isHeader = isHeaderRegex.test(Tag); | ||
const styleAttributes = processStyleList([styles$1.text, isHeader && styles$1.header, style]); | ||
const classNames = otherProps.className ? [otherProps.className, styleAttributes.className].join(" ") : styleAttributes.className; | ||
return (React__namespace.createElement(Tag, _extends({}, otherProps, { | ||
return (React__namespace.createElement(Tag, _extends__default["default"]({}, otherProps, { | ||
style: styleAttributes.style, | ||
@@ -122,3 +129,3 @@ className: classNames, | ||
} = _ref, | ||
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$1); | ||
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$1); | ||
const reset = typeof Component === "string" ? overrides[Component] : null; | ||
@@ -129,3 +136,3 @@ const { | ||
} = processStyleList([reset, defaultStyle, style]); | ||
return React__namespace.createElement(Component, _extends({}, otherProps, { | ||
return React__namespace.createElement(Component, _extends__default["default"]({}, otherProps, { | ||
ref: ref, | ||
@@ -173,4 +180,4 @@ className: [aphroditeClassName, className].filter(Boolean).join(" "), | ||
} = props, | ||
restProps = _objectWithoutPropertiesLoose(props, _excluded); | ||
const commonProps = _extends({}, restProps, { | ||
restProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded); | ||
const commonProps = _extends__default["default"]({}, restProps, { | ||
"data-testid": testId | ||
@@ -180,19 +187,19 @@ }); | ||
case "article": | ||
return React__namespace.createElement(StyledArticle, _extends({}, commonProps, { | ||
return React__namespace.createElement(StyledArticle, _extends__default["default"]({}, commonProps, { | ||
ref: ref | ||
})); | ||
case "aside": | ||
return React__namespace.createElement(StyledAside, _extends({}, commonProps, { | ||
return React__namespace.createElement(StyledAside, _extends__default["default"]({}, commonProps, { | ||
ref: ref | ||
})); | ||
case "nav": | ||
return React__namespace.createElement(StyledNav, _extends({}, commonProps, { | ||
return React__namespace.createElement(StyledNav, _extends__default["default"]({}, commonProps, { | ||
ref: ref | ||
})); | ||
case "section": | ||
return React__namespace.createElement(StyledSection, _extends({}, commonProps, { | ||
return React__namespace.createElement(StyledSection, _extends__default["default"]({}, commonProps, { | ||
ref: ref | ||
})); | ||
case "div": | ||
return React__namespace.createElement(StyledDiv, _extends({}, commonProps, { | ||
return React__namespace.createElement(StyledDiv, _extends__default["default"]({}, commonProps, { | ||
ref: ref | ||
@@ -199,0 +206,0 @@ })); |
{ | ||
"name": "@khanacademy/wonder-blocks-core", | ||
"version": "12.1.0", | ||
"version": "12.1.1", | ||
"design": "v1", | ||
@@ -23,4 +23,4 @@ "publishConfig": { | ||
"devDependencies": { | ||
"@khanacademy/wb-dev-build-settings": "2.1.0", | ||
"@khanacademy/wonder-blocks-testing-core": "2.1.0" | ||
"@khanacademy/wb-dev-build-settings": "2.1.1", | ||
"@khanacademy/wonder-blocks-testing-core": "2.1.1" | ||
}, | ||
@@ -27,0 +27,0 @@ "author": "", |
67416
1647