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.3 to 1.0.4

10

CHANGELOG.md

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

## [1.0.4](https://bitbucket.org/enturas/design-system/compare/@entur/button@1.0.3...@entur/button@1.0.4) (2019-11-18)
### Bug Fixes
- add consistent spacing for icons inside buttons ([2c55c15](https://bitbucket.org/enturas/design-system/commits/2c55c1539260d3983ddb82f1a05e369d94425d28))
- **button:** fixing paddings issue with button as link ([48fcd82](https://bitbucket.org/enturas/design-system/commits/48fcd82835a4bde7c97d8461e5385f39552a92b9))
- **buttons:** updating all buttons to new border radius ([e1cbc88](https://bitbucket.org/enturas/design-system/commits/e1cbc888723c305333e1b56a1e26898c4a070c2d))
- **secondary styling:** applying new styling for secondary button ([8fbcc6d](https://bitbucket.org/enturas/design-system/commits/8fbcc6df62552486520391c05f44fcfcaafecf29))
- **square button:** fixing new styling for square buttons ([430c6f3](https://bitbucket.org/enturas/design-system/commits/430c6f3d7ecc2ba058f38b06e8b0f499c1f212cf))
## [1.0.3](https://bitbucket.org/enturas/design-system/compare/@entur/button@1.0.2...@entur/button@1.0.3) (2019-11-14)

@@ -8,0 +18,0 @@

6

dist/button.cjs.development.js

@@ -28,6 +28,8 @@ 'use strict';

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;
var childrenArray = React.Children.toArray(children);
var hasLeadingIcon = childrenArray.length > 1 && typeof childrenArray[0] !== 'string';
var hasTrailingIcon = childrenArray.length > 1 && typeof childrenArray[childrenArray.length - 1] !== 'string';
return React.createElement(Element, Object.assign({
className: classList,
className: 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), _defineProperty(_cx, 'eds-button--leading-icon', hasLeadingIcon), _defineProperty(_cx, 'eds-button--trailing-icon', hasTrailingIcon), _cx), className),
ref: ref,

@@ -34,0 +36,0 @@ "aria-busy": loading,

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

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

@@ -24,6 +24,8 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';

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;
var childrenArray = React.Children.toArray(children);
var hasLeadingIcon = childrenArray.length > 1 && typeof childrenArray[0] !== 'string';
var hasTrailingIcon = childrenArray.length > 1 && typeof childrenArray[childrenArray.length - 1] !== 'string';
return React.createElement(Element, Object.assign({
className: classList,
className: 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), _defineProperty(_cx, 'eds-button--leading-icon', hasLeadingIcon), _defineProperty(_cx, 'eds-button--trailing-icon', hasTrailingIcon), _cx), className),
ref: ref,

@@ -30,0 +32,0 @@ "aria-busy": loading,

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

@@ -35,3 +35,3 @@ "main": "dist/index.js",

},
"gitHead": "f474568d4572a715c5800781e34d42999d7c22ba"
"gitHead": "636c2b374cdfcd69a5faa02224b85616bc4aca2b"
}

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