@khanacademy/wonder-blocks-button
Advanced tools
Comparing version 2.9.6 to 2.9.7
import { createElement, Fragment, Component } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { getClickableBehavior } from '@khanacademy/wonder-blocks-clickable'; | ||
import { any } from 'prop-types'; | ||
import { isClientSideUrl, getClickableBehavior } from '@khanacademy/wonder-blocks-clickable'; | ||
import { StyleSheet } from 'aphrodite'; | ||
@@ -296,3 +296,3 @@ import { Link } from 'react-router-dom'; | ||
if (href && !disabled) { | ||
return router && !skipClientNav ? /*#__PURE__*/createElement(StyledLink, _extends({}, commonProps, { | ||
return router && !skipClientNav && isClientSideUrl(href) ? /*#__PURE__*/createElement(StyledLink, _extends({}, commonProps, { | ||
to: href | ||
@@ -316,3 +316,3 @@ }), contents) : /*#__PURE__*/createElement(StyledAnchor, _extends({}, commonProps, { | ||
_defineProperty(ButtonCore, "contextTypes", { | ||
router: PropTypes.any | ||
router: any | ||
}); | ||
@@ -619,3 +619,3 @@ var sharedStyles = StyleSheet.create({ | ||
_defineProperty(Button, "contextTypes", { | ||
router: PropTypes.any | ||
router: any | ||
}); | ||
@@ -622,0 +622,0 @@ |
@@ -110,3 +110,3 @@ module.exports = | ||
module.exports = require("@khanacademy/wonder-blocks-core"); | ||
module.exports = require("@khanacademy/wonder-blocks-clickable"); | ||
@@ -117,3 +117,3 @@ /***/ }), | ||
module.exports = require("@khanacademy/wonder-blocks-spacing"); | ||
module.exports = require("@khanacademy/wonder-blocks-core"); | ||
@@ -124,3 +124,3 @@ /***/ }), | ||
module.exports = require("aphrodite"); | ||
module.exports = require("@khanacademy/wonder-blocks-spacing"); | ||
@@ -131,3 +131,3 @@ /***/ }), | ||
module.exports = require("@khanacademy/wonder-blocks-typography"); | ||
module.exports = require("aphrodite"); | ||
@@ -138,3 +138,3 @@ /***/ }), | ||
module.exports = require("@khanacademy/wonder-blocks-clickable"); | ||
module.exports = require("@khanacademy/wonder-blocks-typography"); | ||
@@ -175,9 +175,8 @@ /***/ }), | ||
var external_prop_types_ = __webpack_require__(2); | ||
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_); | ||
// EXTERNAL MODULE: external "@khanacademy/wonder-blocks-clickable" | ||
var wonder_blocks_clickable_ = __webpack_require__(7); | ||
var wonder_blocks_clickable_ = __webpack_require__(3); | ||
// EXTERNAL MODULE: external "aphrodite" | ||
var external_aphrodite_ = __webpack_require__(5); | ||
var external_aphrodite_ = __webpack_require__(6); | ||
@@ -188,3 +187,3 @@ // EXTERNAL MODULE: external "react-router-dom" | ||
// EXTERNAL MODULE: external "@khanacademy/wonder-blocks-typography" | ||
var wonder_blocks_typography_ = __webpack_require__(6); | ||
var wonder_blocks_typography_ = __webpack_require__(7); | ||
@@ -196,3 +195,3 @@ // EXTERNAL MODULE: external "@khanacademy/wonder-blocks-color" | ||
// EXTERNAL MODULE: external "@khanacademy/wonder-blocks-core" | ||
var wonder_blocks_core_ = __webpack_require__(3); | ||
var wonder_blocks_core_ = __webpack_require__(4); | ||
@@ -207,6 +206,6 @@ // EXTERNAL MODULE: external "@khanacademy/wonder-blocks-progress-spinner" | ||
// EXTERNAL MODULE: external "@khanacademy/wonder-blocks-spacing" | ||
var wonder_blocks_spacing_ = __webpack_require__(4); | ||
var wonder_blocks_spacing_ = __webpack_require__(5); | ||
var wonder_blocks_spacing_default = /*#__PURE__*/__webpack_require__.n(wonder_blocks_spacing_); | ||
// CONCATENATED MODULE: ./packages/wonder-blocks-button/components/button-core.js | ||
// CONCATENATED MODULE: ./packages/wonder-blocks-button/src/components/button-core.js | ||
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); } | ||
@@ -256,2 +255,3 @@ | ||
var StyledAnchor = Object(wonder_blocks_core_["addStyle"])("a"); | ||
@@ -336,3 +336,3 @@ var StyledButton = Object(wonder_blocks_core_["addStyle"])("button"); | ||
if (href && !disabled) { | ||
return router && !skipClientNav ? /*#__PURE__*/external_react_["createElement"](StyledLink, _extends({}, commonProps, { | ||
return router && !skipClientNav && Object(wonder_blocks_clickable_["isClientSideUrl"])(href) ? /*#__PURE__*/external_react_["createElement"](StyledLink, _extends({}, commonProps, { | ||
to: href | ||
@@ -356,3 +356,3 @@ }), contents) : /*#__PURE__*/external_react_["createElement"](StyledAnchor, _extends({}, commonProps, { | ||
_defineProperty(button_core_ButtonCore, "contextTypes", { | ||
router: external_prop_types_default.a.any | ||
router: external_prop_types_["any"] | ||
}); | ||
@@ -560,3 +560,3 @@ | ||
}; | ||
// CONCATENATED MODULE: ./packages/wonder-blocks-button/components/button.js | ||
// CONCATENATED MODULE: ./packages/wonder-blocks-button/src/components/button.js | ||
function button_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { button_typeof = function _typeof(obj) { return typeof obj; }; } else { button_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return button_typeof(obj); } | ||
@@ -697,3 +697,3 @@ | ||
button_defineProperty(button_Button, "contextTypes", { | ||
router: external_prop_types_default.a.any | ||
router: external_prop_types_["any"] | ||
}); | ||
@@ -711,3 +711,3 @@ | ||
// CONCATENATED MODULE: ./packages/wonder-blocks-button/index.js | ||
// CONCATENATED MODULE: ./packages/wonder-blocks-button/src/index.js | ||
@@ -714,0 +714,0 @@ |
{ | ||
"name": "@khanacademy/wonder-blocks-button", | ||
"version": "2.9.6", | ||
"version": "2.9.7", | ||
"design": "v1", | ||
@@ -11,3 +11,3 @@ "publishConfig": { | ||
"module": "dist/es/index.js", | ||
"source": "index.js", | ||
"source": "src/index.js", | ||
"scripts": { | ||
@@ -19,9 +19,9 @@ "test": "echo \"Error: no test specified\" && exit 1" | ||
"dependencies": { | ||
"@khanacademy/wonder-blocks-clickable": "^2.0.6", | ||
"@khanacademy/wonder-blocks-color": "^1.1.16", | ||
"@khanacademy/wonder-blocks-core": "^3.1.1", | ||
"@khanacademy/wonder-blocks-icon": "^1.2.18", | ||
"@khanacademy/wonder-blocks-progress-spinner": "^1.1.22", | ||
"@khanacademy/wonder-blocks-spacing": "^3.0.1", | ||
"@khanacademy/wonder-blocks-typography": "^1.1.22" | ||
"@khanacademy/wonder-blocks-clickable": "^2.0.7", | ||
"@khanacademy/wonder-blocks-color": "^1.1.17", | ||
"@khanacademy/wonder-blocks-core": "^3.1.2", | ||
"@khanacademy/wonder-blocks-icon": "^1.2.19", | ||
"@khanacademy/wonder-blocks-progress-spinner": "^1.1.23", | ||
"@khanacademy/wonder-blocks-spacing": "^3.0.2", | ||
"@khanacademy/wonder-blocks-typography": "^1.1.23" | ||
}, | ||
@@ -35,5 +35,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"wb-dev-build-settings": "^0.0.3" | ||
"wb-dev-build-settings": "^0.0.4" | ||
}, | ||
"gitHead": "b3ba970d4e4bbae5f4fd5172e65657bf55b63428" | ||
"gitHead": "4aff5c505331e91477e1c8b454b9b2298004bd2d" | ||
} |
Sorry, the diff of this file is not supported yet
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
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
494261
3682
1