Socket
Socket
Sign inDemoInstall

@entur/button

Package Overview
Dependencies
Maintainers
12
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@entur/button - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

6

CHANGELOG.md

@@ -6,2 +6,8 @@ # Change Log

## [1.0.3](https://bitbucket.org/enturas/design-system/compare/@entur/button@1.0.2...@entur/button@1.0.3) (2019-11-14)
### Bug Fixes
- **css classnames:** fixing naming collisions with CSS classes ([a93ca43](https://bitbucket.org/enturas/design-system/commits/a93ca435d3a01d61d8f02694a672686b9e943a66))
## [1.0.2](https://bitbucket.org/enturas/design-system/compare/@entur/button@1.0.1...@entur/button@1.0.2) (2019-10-30)

@@ -8,0 +14,0 @@

21

dist/button.cjs.development.js

@@ -5,20 +5,7 @@ 'use strict';

var _defineProperty = _interopDefault(require('@babel/runtime/helpers/defineProperty'));
var _objectWithoutProperties = _interopDefault(require('@babel/runtime/helpers/objectWithoutProperties'));
var React = _interopDefault(require('react'));
var cx = _interopDefault(require('classnames'));
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 Button =

@@ -40,5 +27,5 @@ /*#__PURE__*/

as = _ref$as === void 0 ? 'button' : _ref$as,
rest = _objectWithoutPropertiesLoose(_ref, ["variant", "size", "loading", "className", "children", "disabled", "width", "as"]);
rest = _objectWithoutProperties(_ref, ["variant", "size", "loading", "className", "children", "disabled", "width", "as"]);
var classList = cx('entur-button', (_cx = {}, _cx["entur-button--variant-" + variant] = variant, _cx["entur-button--size-" + size] = size, _cx["entur-button--width-" + width] = width, _cx["entur-button--disabled"] = disabled, _cx["entur-button--loading"] = loading, _cx), className);
var classList = cx('eds-button', (_cx = {}, _defineProperty(_cx, "eds-button--variant-".concat(variant), variant), _defineProperty(_cx, "eds-button--size-".concat(size), size), _defineProperty(_cx, "eds-button--width-".concat(width), width), _defineProperty(_cx, "eds-button--disabled", disabled), _defineProperty(_cx, "eds-button--loading", loading), _cx), className);
var Element = disabled ? 'button' : as;

@@ -45,0 +32,0 @@ return React.createElement(Element, Object.assign({

@@ -1,2 +0,2 @@

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("react")),n=e(require("classnames"));exports.Button=t.forwardRef(function(e,a){var r,i=e.variant,u=e.size,s=void 0===u?"medium":u,d=e.loading,o=e.className,l=e.children,c=e.disabled,b=void 0!==c&&c,f=e.width,v=e.as,m=void 0===v?"button":v,h=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)t.indexOf(n=i[a])>=0||(r[n]=e[n]);return r}(e,["variant","size","loading","className","children","disabled","width","as"]),g=n("entur-button",((r={})["entur-button--variant-"+i]=i,r["entur-button--size-"+s]=s,r["entur-button--width-"+f]=f,r["entur-button--disabled"]=b,r["entur-button--loading"]=d,r),o);return t.createElement(b?"button":m,Object.assign({className:g,ref:a,"aria-busy":d,disabled:b},h),d?t.createElement("div",{className:"spinner"}):l)});
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@babel/runtime/helpers/defineProperty")),a=e(require("@babel/runtime/helpers/objectWithoutProperties")),i=e(require("react")),r=e(require("classnames"));exports.Button=i.forwardRef((function(e,n){var s,d=e.variant,o=e.size,u=void 0===o?"medium":o,c=e.loading,l=e.className,b=e.children,m=e.disabled,f=void 0!==m&&m,v=e.width,h=e.as,p=void 0===h?"button":h,g=a(e,["variant","size","loading","className","children","disabled","width","as"]),q=r("eds-button",(t(s={},"eds-button--variant-".concat(d),d),t(s,"eds-button--size-".concat(u),u),t(s,"eds-button--width-".concat(v),v),t(s,"eds-button--disabled",f),t(s,"eds-button--loading",c),s),l);return i.createElement(f?"button":p,Object.assign({className:q,ref:n,"aria-busy":c,disabled:f},g),c?i.createElement("div",{className:"spinner"}):b)}));
//# sourceMappingURL=button.cjs.production.min.js.map

@@ -0,19 +1,6 @@

import _defineProperty from '@babel/runtime/helpers/defineProperty';
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
import React from 'react';
import cx from 'classnames';
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 Button =

@@ -35,5 +22,5 @@ /*#__PURE__*/

as = _ref$as === void 0 ? 'button' : _ref$as,
rest = _objectWithoutPropertiesLoose(_ref, ["variant", "size", "loading", "className", "children", "disabled", "width", "as"]);
rest = _objectWithoutProperties(_ref, ["variant", "size", "loading", "className", "children", "disabled", "width", "as"]);
var classList = cx('entur-button', (_cx = {}, _cx["entur-button--variant-" + variant] = variant, _cx["entur-button--size-" + size] = size, _cx["entur-button--width-" + width] = width, _cx["entur-button--disabled"] = disabled, _cx["entur-button--loading"] = loading, _cx), className);
var classList = cx('eds-button', (_cx = {}, _defineProperty(_cx, "eds-button--variant-".concat(variant), variant), _defineProperty(_cx, "eds-button--size-".concat(size), size), _defineProperty(_cx, "eds-button--width-".concat(width), width), _defineProperty(_cx, "eds-button--disabled", disabled), _defineProperty(_cx, "eds-button--loading", loading), _cx), className);
var Element = disabled ? 'button' : as;

@@ -40,0 +27,0 @@ return React.createElement(Element, Object.assign({

{
"name": "@entur/button",
"version": "1.0.2",
"version": "1.0.3",
"license": "EUPL-1.2",

@@ -33,5 +33,5 @@ "main": "dist/index.js",

"devDependencies": {
"@entur/tokens": "^1.0.0"
"@entur/tokens": "^1.0.1"
},
"gitHead": "33a589c66b9169353060466237d3e69972b7a726"
"gitHead": "f474568d4572a715c5800781e34d42999d7c22ba"
}

@@ -5,3 +5,3 @@ # Button

> 💡 Looking for the [documentation](https://entur-design-system.firebaseapp.com/komponenter/knapper)?
> 💡 Looking for the [documentation](https://design.entur.org/komponenter/knapper)?

@@ -24,2 +24,2 @@ ## Installation

Please refer to the [documentation](https://entur-design-system.firebaseapp.com/komponenter/knapper) for further usage information.
Please refer to the [documentation](https://design.entur.org/komponenter/knapper) for further usage information.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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