Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@khanacademy/wonder-blocks-icon-button

Package Overview
Dependencies
Maintainers
1
Versions
395
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanacademy/wonder-blocks-icon-button - npm Package Compare versions

Comparing version 3.1.11 to 3.1.12

__tests__/__snapshots__/custom-snapshot.test.js.snap

52

dist/es/index.js

@@ -129,2 +129,15 @@ import React from 'react';

function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
return true;
} catch (e) {
return false;
}
}
function _objectWithoutPropertiesLoose(source, excluded) {

@@ -182,2 +195,21 @@ if (source == null) return {};

function _createSuper(Derived) {
var hasNativeReflectConstruct = _isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = _getPrototypeOf(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
var StyledAnchor = addStyle("a");

@@ -190,6 +222,8 @@ var StyledButton = addStyle("button");

var _super = _createSuper(IconButtonCore);
function IconButtonCore() {
_classCallCheck(this, IconButtonCore);
return _possibleConstructorReturn(this, _getPrototypeOf(IconButtonCore).apply(this, arguments));
return _super.apply(this, arguments);
}

@@ -221,3 +255,3 @@

var defaultStyle = [sharedStyles.shared, disabled && sharedStyles.disabled, buttonStyles.default, disabled && buttonStyles.disabled, !disabled && (pressed ? buttonStyles.active : (hovered || focused) && buttonStyles.focus)];
var child = React.createElement(Icon, {
var child = /*#__PURE__*/React.createElement(Icon, {
size: "medium",

@@ -234,9 +268,9 @@ color: "currentColor",

if (href && !disabled) {
return router && !skipClientNav ? React.createElement(StyledLink, _extends({}, commonProps, {
return router && !skipClientNav ? /*#__PURE__*/React.createElement(StyledLink, _extends({}, commonProps, {
to: href
}), child) : React.createElement(StyledAnchor, _extends({}, commonProps, {
}), child) : /*#__PURE__*/React.createElement(StyledAnchor, _extends({}, commonProps, {
href: href
}), child);
} else {
return React.createElement(StyledButton, _extends({
return /*#__PURE__*/React.createElement(StyledButton, _extends({
type: "button"

@@ -382,6 +416,8 @@ }, commonProps, {

var _super = _createSuper(IconButton);
function IconButton() {
_classCallCheck(this, IconButton);
return _possibleConstructorReturn(this, _getPrototypeOf(IconButton).apply(this, arguments));
return _super.apply(this, arguments);
}

@@ -399,3 +435,3 @@

var ClickableBehavior = getClickableBehavior(href, skipClientNav, this.context.router);
return React.createElement(ClickableBehavior, {
return /*#__PURE__*/React.createElement(ClickableBehavior, {
disabled: sharedProps.disabled,

@@ -406,3 +442,3 @@ href: href,

}, function (state, handlers) {
return React.createElement(IconButtonCore, _extends({}, sharedProps, state, handlers, {
return /*#__PURE__*/React.createElement(IconButtonCore, _extends({}, sharedProps, state, handlers, {
skipClientNav: skipClientNav,

@@ -409,0 +445,0 @@ href: href

44

dist/index.js

@@ -185,2 +185,8 @@ module.exports =

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

@@ -190,8 +196,6 @@

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -213,6 +217,8 @@

var _super = _createSuper(IconButtonCore);
function IconButtonCore() {
_classCallCheck(this, IconButtonCore);
return _possibleConstructorReturn(this, _getPrototypeOf(IconButtonCore).apply(this, arguments));
return _super.apply(this, arguments);
}

@@ -244,3 +250,3 @@

var defaultStyle = [sharedStyles.shared, disabled && sharedStyles.disabled, buttonStyles.default, disabled && buttonStyles.disabled, !disabled && (pressed ? buttonStyles.active : (hovered || focused) && buttonStyles.focus)];
var child = external_react_default.a.createElement(wonder_blocks_icon_default.a, {
var child = /*#__PURE__*/external_react_default.a.createElement(wonder_blocks_icon_default.a, {
size: "medium",

@@ -257,9 +263,9 @@ color: "currentColor",

if (href && !disabled) {
return router && !skipClientNav ? external_react_default.a.createElement(StyledLink, _extends({}, commonProps, {
return router && !skipClientNav ? /*#__PURE__*/external_react_default.a.createElement(StyledLink, _extends({}, commonProps, {
to: href
}), child) : external_react_default.a.createElement(StyledAnchor, _extends({}, commonProps, {
}), child) : /*#__PURE__*/external_react_default.a.createElement(StyledAnchor, _extends({}, commonProps, {
href: href
}), child);
} else {
return external_react_default.a.createElement(StyledButton, _extends({
return /*#__PURE__*/external_react_default.a.createElement(StyledButton, _extends({
type: "button"

@@ -382,2 +388,8 @@ }, commonProps, {

function icon_button_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) icon_button_setPrototypeOf(subClass, superClass); }
function icon_button_setPrototypeOf(o, p) { icon_button_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return icon_button_setPrototypeOf(o, p); }
function icon_button_createSuper(Derived) { var hasNativeReflectConstruct = icon_button_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = icon_button_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = icon_button_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return icon_button_possibleConstructorReturn(this, result); }; }
function icon_button_possibleConstructorReturn(self, call) { if (call && (icon_button_typeof(call) === "object" || typeof call === "function")) { return call; } return icon_button_assertThisInitialized(self); }

@@ -387,8 +399,6 @@

function icon_button_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function icon_button_getPrototypeOf(o) { icon_button_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return icon_button_getPrototypeOf(o); }
function icon_button_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) icon_button_setPrototypeOf(subClass, superClass); }
function icon_button_setPrototypeOf(o, p) { icon_button_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return icon_button_setPrototypeOf(o, p); }
function icon_button_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -440,6 +450,8 @@

var _super = icon_button_createSuper(IconButton);
function IconButton() {
icon_button_classCallCheck(this, IconButton);
return icon_button_possibleConstructorReturn(this, icon_button_getPrototypeOf(IconButton).apply(this, arguments));
return _super.apply(this, arguments);
}

@@ -457,3 +469,3 @@

var ClickableBehavior = Object(wonder_blocks_core_["getClickableBehavior"])(href, skipClientNav, this.context.router);
return external_react_default.a.createElement(ClickableBehavior, {
return /*#__PURE__*/external_react_default.a.createElement(ClickableBehavior, {
disabled: sharedProps.disabled,

@@ -464,3 +476,3 @@ href: href,

}, function (state, handlers) {
return external_react_default.a.createElement(icon_button_core_IconButtonCore, icon_button_extends({}, sharedProps, state, handlers, {
return /*#__PURE__*/external_react_default.a.createElement(icon_button_core_IconButtonCore, icon_button_extends({}, sharedProps, state, handlers, {
skipClientNav: skipClientNav,

@@ -467,0 +479,0 @@ href: href

{
"name": "@khanacademy/wonder-blocks-icon-button",
"version": "3.1.11",
"version": "3.1.12",
"design": "v1",

@@ -18,5 +18,5 @@ "publishConfig": {

"dependencies": {
"@khanacademy/wonder-blocks-color": "^1.1.11",
"@khanacademy/wonder-blocks-core": "^2.5.1",
"@khanacademy/wonder-blocks-icon": "^1.2.7"
"@khanacademy/wonder-blocks-color": "^1.1.12",
"@khanacademy/wonder-blocks-core": "^2.5.2",
"@khanacademy/wonder-blocks-icon": "^1.2.8"
},

@@ -32,3 +32,3 @@ "peerDependencies": {

},
"gitHead": "3c6c92225a4eba049ead8d78e2d3eb648e5b16ab"
"gitHead": "a2b5548f5d7db108c39961071d081ec5d96fa88f"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc