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

@ndla/button

Package Overview
Dependencies
Maintainers
5
Versions
311
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ndla/button - npm Package Compare versions

Comparing version 0.2.8 to 0.2.9

16

es/Button.js

@@ -23,2 +23,8 @@ 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); }

var appearances = {
inverted:
/*#__PURE__*/
css("background:#0f2b47;color:#fff;.c-icon{fill:#fff;}"),
invertedOutline:
/*#__PURE__*/
css("color:#fff;background-color:transparent;border:2px solid #fff;font-weight:", fonts.weight.bold, ";box-shadow:none;&:hover,&:focus{color:white;background-color:", colors.brand.primary, ";border:2px solid transparent;transform:translateY(0) translateX(0);}&:disabled{border:2px solid transparent;cursor:not-allowed;transform:translateY(0) translateX(0);}"),
lighter:

@@ -64,3 +70,5 @@ /*#__PURE__*/

disabled = _ref.disabled,
rest = _objectWithoutProperties(_ref, ["outline", "stripped", "link", "lighter", "submit", "loading", "appearance", "children", "disabled"]);
inverted = _ref.inverted,
invertedOutline = _ref.invertedOutline,
rest = _objectWithoutProperties(_ref, ["outline", "stripped", "link", "lighter", "submit", "loading", "appearance", "children", "disabled", "inverted", "invertedOutline"]);

@@ -71,3 +79,5 @@ var modifiers = {

lighter: lighter,
stripped: stripped
stripped: stripped,
inverted: inverted,
invertedOutline: invertedOutline
};

@@ -96,3 +106,3 @@ var styledAppearance = appearance || modifierToApperance(modifiers);

onClick: PropTypes.func,
appearance: PropTypes.oneOf(['outline', 'link', 'stripped', 'lighter']),
appearance: PropTypes.oneOf(['outline', 'link', 'stripped', 'lighter', 'inverted', 'invertedOutline']),

@@ -99,0 +109,0 @@ /**

8

es/CopyButton.js

@@ -19,2 +19,4 @@ function _typeof(obj) { 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 _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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); }

@@ -24,4 +26,2 @@

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
/**

@@ -53,4 +53,4 @@ * Copyright (c) 2016-present, NDLA.

_this.timer = null;
_this.handleCopy = _this.handleCopy.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.exitCopyState = _this.exitCopyState.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleCopy = _this.handleCopy.bind(_assertThisInitialized(_this));
_this.exitCopyState = _this.exitCopyState.bind(_assertThisInitialized(_this));
return _this;

@@ -57,0 +57,0 @@ }

@@ -38,2 +38,8 @@ "use strict";

var appearances = {
inverted:
/*#__PURE__*/
(0, _reactEmotion.css)("background:#0f2b47;color:#fff;.c-icon{fill:#fff;}"),
invertedOutline:
/*#__PURE__*/
(0, _reactEmotion.css)("color:#fff;background-color:transparent;border:2px solid #fff;font-weight:", _core.fonts.weight.bold, ";box-shadow:none;&:hover,&:focus{color:white;background-color:", _core.colors.brand.primary, ";border:2px solid transparent;transform:translateY(0) translateX(0);}&:disabled{border:2px solid transparent;cursor:not-allowed;transform:translateY(0) translateX(0);}"),
lighter:

@@ -79,3 +85,5 @@ /*#__PURE__*/

disabled = _ref.disabled,
rest = _objectWithoutProperties(_ref, ["outline", "stripped", "link", "lighter", "submit", "loading", "appearance", "children", "disabled"]);
inverted = _ref.inverted,
invertedOutline = _ref.invertedOutline,
rest = _objectWithoutProperties(_ref, ["outline", "stripped", "link", "lighter", "submit", "loading", "appearance", "children", "disabled", "inverted", "invertedOutline"]);

@@ -86,3 +94,5 @@ var modifiers = {

lighter: lighter,
stripped: stripped
stripped: stripped,
inverted: inverted,
invertedOutline: invertedOutline
};

@@ -112,3 +122,3 @@ var styledAppearance = appearance || modifierToApperance(modifiers);

onClick: _propTypes2.default.func,
appearance: _propTypes2.default.oneOf(['outline', 'link', 'stripped', 'lighter']),
appearance: _propTypes2.default.oneOf(['outline', 'link', 'stripped', 'lighter', 'inverted', 'invertedOutline']),

@@ -115,0 +125,0 @@ /**

@@ -37,2 +37,4 @@ "use strict";

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
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); }

@@ -42,4 +44,2 @@

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
var CopyButton =

@@ -60,4 +60,4 @@ /*#__PURE__*/

_this.timer = null;
_this.handleCopy = _this.handleCopy.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.exitCopyState = _this.exitCopyState.bind(_assertThisInitialized(_assertThisInitialized(_this)));
_this.handleCopy = _this.handleCopy.bind(_assertThisInitialized(_this));
_this.exitCopyState = _this.exitCopyState.bind(_assertThisInitialized(_this));
return _this;

@@ -64,0 +64,0 @@ }

{
"name": "@ndla/button",
"version": "0.2.8",
"version": "0.2.9",
"description": "Button component for NDLA",

@@ -23,3 +23,3 @@ "license": "GPL-3.0",

"dependencies": {
"@ndla/core": "^0.4.10"
"@ndla/core": "^0.5.0"
},

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

},
"gitHead": "531c748f15a3ea027ba0e4f5c6292889b5c7847a"
"gitHead": "d85fe2f9a64554365874dc621b0f51a09a22177d"
}
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