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

@entur/button

Package Overview
Dependencies
Maintainers
13
Versions
156
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 2.1.4 to 2.2.0

dist/IconButton.d.ts

10

CHANGELOG.md

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

# [2.2.0](https://bitbucket.org/enturas/design-system/compare/@entur/button@2.1.4...@entur/button@2.2.0) (2020-03-05)
### Bug Fixes
- fix square button focus styling ([803ffd1](https://bitbucket.org/enturas/design-system/commits/803ffd139faaea4cc222cf0a6ae163f1d646c7d6))
### Features
- **iconbutton:** add iconbutton component ([81e966f](https://bitbucket.org/enturas/design-system/commits/81e966f3be5cac8605a26abe7f558aeb3682aa1c))
## [2.1.4](https://bitbucket.org/enturas/design-system/compare/@entur/button@2.1.3...@entur/button@2.1.4) (2020-02-20)

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

@@ -181,2 +181,17 @@ 'use strict';

var IconButton = function IconButton(_ref) {
var children = _ref.children,
className = _ref.className,
_ref$disabled = _ref.disabled,
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
_ref$as = _ref.as,
as = _ref$as === void 0 ? 'button' : _ref$as,
rest = _objectWithoutPropertiesLoose(_ref, ["children", "className", "variant", "disabled", "as"]);
var Element = disabled ? 'button' : as;
return React.createElement(Element, Object.assign({
className: classNames('eds-icon-button', className)
}, rest), children);
};
utils.warnAboutMissingStyles('button');

@@ -187,2 +202,3 @@

exports.FloatingButton = FloatingButton;
exports.IconButton = IconButton;
exports.NegativeButton = NegativeButton;

@@ -189,0 +205,0 @@ exports.PrimaryButton = PrimaryButton;

2

dist/button.cjs.production.min.js

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@entur/utils"),n=e(require("react")),a=e(require("classnames"));function r(e,t){if(null==e)return{};var n,a,r={},s=Object.keys(e);for(a=0;a<s.length;a++)t.indexOf(n=s[a])>=0||(r[n]=e[n]);return r}var s=n.forwardRef((function(e,t){var s,i=e.variant,o=e.size,u=void 0===o?"medium":o,c=e.loading,d=e.className,l=e.children,f=e.disabled,b=void 0!==f&&f,m=e.width,g=void 0===m?"auto":m,v=e.as,p=void 0===v?"button":v,y=r(e,["variant","size","loading","className","children","disabled","width","as"]),h=b?"button":p,N=n.Children.toArray(l),j=N.length>1&&"string"!=typeof N[0],E=N.length>1&&"string"!=typeof N[N.length-1];return n.createElement(h,Object.assign({className:a("eds-button",(s={},s["eds-button--variant-"+i]=i,s["eds-button--size-"+u]=u,s["eds-button--width-fluid"]="fluid"===g,s["eds-button--loading"]=c,s["eds-button--leading-icon"]=j,s["eds-button--trailing-icon"]=E,s),d),ref:t,"aria-busy":c,disabled:b,"aria-disabled":b},y),c?n.createElement("div",{className:"eds-button__spinner"}):l)})),i=n.forwardRef((function(e,t){return n.createElement(s,Object.assign({},e,{ref:t,variant:"primary"}))})),o=n.forwardRef((function(e,t){return n.createElement(s,Object.assign({},e,{ref:t,variant:"secondary"}))})),u=n.forwardRef((function(e,t){return n.createElement(s,Object.assign({},e,{ref:t,variant:"success"}))})),c=n.forwardRef((function(e,t){return n.createElement(s,Object.assign({},e,{ref:t,variant:"negative"}))})),d=n.forwardRef((function(e,t){return n.createElement(s,Object.assign({},e,{ref:t,variant:"tertiary"}))})),l=function(e){var t=e.children,s=e.className,i=e.variant,o=e.disabled,u=void 0!==o&&o,c=e.as,d=void 0===c?"button":c,l=r(e,["children","className","variant","disabled","as"]);return n.createElement(u?"button":d,Object.assign({className:a("eds-square-button",{"eds-square-button--success":"success"===i},{"eds-square-button--secondary":"secondary"===i},s)},l),n.Children.map(t,(function(e){return n.createElement("span","string"==typeof e?{className:"eds-square-button__label"}:{className:"eds-square-button__icon"},e)})))};t.warnAboutMissingStyles("button"),exports.Button=s,exports.ButtonGroup=function(e){var t=e.as,s=void 0===t?"div":t,i=e.className,o=r(e,["as","className"]);return n.createElement(s,Object.assign({className:a("eds-button-group",i)},o))},exports.FloatingButton=function(e){var t=e.className,s=e.children,i=e.size,o=void 0===i?"medium":i,u=r(e,["className","children","size"]);return n.createElement("button",Object.assign({className:a("eds-floating-button",{"eds-floating-button--extended":n.Children.count(s)>1},{"eds-floating-button--small":"small"===o},t),type:"button"},u),function(e){return n.Children.map(e,(function(e){return"string"==typeof e?n.createElement("span",null,e):e}))}(s))},exports.NegativeButton=c,exports.PrimaryButton=i,exports.SecondaryButton=o,exports.SecondarySquareButton=function(e){return n.createElement(l,Object.assign({},e,{variant:"secondary"}))},exports.SuccessButton=u,exports.SuccessSquareButton=function(e){return n.createElement(l,Object.assign({},e,{variant:"success"}))},exports.TertiaryButton=d;
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@entur/utils"),n=e(require("react")),a=e(require("classnames"));function r(e,t){if(null==e)return{};var n,a,r={},s=Object.keys(e);for(a=0;a<s.length;a++)t.indexOf(n=s[a])>=0||(r[n]=e[n]);return r}var s=n.forwardRef((function(e,t){var s,i=e.variant,o=e.size,u=void 0===o?"medium":o,c=e.loading,d=e.className,l=e.children,b=e.disabled,f=void 0!==b&&b,m=e.width,v=void 0===m?"auto":m,g=e.as,p=void 0===g?"button":g,y=r(e,["variant","size","loading","className","children","disabled","width","as"]),h=f?"button":p,N=n.Children.toArray(l),j=N.length>1&&"string"!=typeof N[0],E=N.length>1&&"string"!=typeof N[N.length-1];return n.createElement(h,Object.assign({className:a("eds-button",(s={},s["eds-button--variant-"+i]=i,s["eds-button--size-"+u]=u,s["eds-button--width-fluid"]="fluid"===v,s["eds-button--loading"]=c,s["eds-button--leading-icon"]=j,s["eds-button--trailing-icon"]=E,s),d),ref:t,"aria-busy":c,disabled:f,"aria-disabled":f},y),c?n.createElement("div",{className:"eds-button__spinner"}):l)})),i=n.forwardRef((function(e,t){return n.createElement(s,Object.assign({},e,{ref:t,variant:"primary"}))})),o=n.forwardRef((function(e,t){return n.createElement(s,Object.assign({},e,{ref:t,variant:"secondary"}))})),u=n.forwardRef((function(e,t){return n.createElement(s,Object.assign({},e,{ref:t,variant:"success"}))})),c=n.forwardRef((function(e,t){return n.createElement(s,Object.assign({},e,{ref:t,variant:"negative"}))})),d=n.forwardRef((function(e,t){return n.createElement(s,Object.assign({},e,{ref:t,variant:"tertiary"}))})),l=function(e){var t=e.children,s=e.className,i=e.variant,o=e.disabled,u=void 0!==o&&o,c=e.as,d=void 0===c?"button":c,l=r(e,["children","className","variant","disabled","as"]);return n.createElement(u?"button":d,Object.assign({className:a("eds-square-button",{"eds-square-button--success":"success"===i},{"eds-square-button--secondary":"secondary"===i},s)},l),n.Children.map(t,(function(e){return n.createElement("span","string"==typeof e?{className:"eds-square-button__label"}:{className:"eds-square-button__icon"},e)})))};t.warnAboutMissingStyles("button"),exports.Button=s,exports.ButtonGroup=function(e){var t=e.as,s=void 0===t?"div":t,i=e.className,o=r(e,["as","className"]);return n.createElement(s,Object.assign({className:a("eds-button-group",i)},o))},exports.FloatingButton=function(e){var t=e.className,s=e.children,i=e.size,o=void 0===i?"medium":i,u=r(e,["className","children","size"]);return n.createElement("button",Object.assign({className:a("eds-floating-button",{"eds-floating-button--extended":n.Children.count(s)>1},{"eds-floating-button--small":"small"===o},t),type:"button"},u),function(e){return n.Children.map(e,(function(e){return"string"==typeof e?n.createElement("span",null,e):e}))}(s))},exports.IconButton=function(e){var t=e.children,s=e.className,i=e.disabled,o=void 0!==i&&i,u=e.as,c=void 0===u?"button":u,d=r(e,["children","className","variant","disabled","as"]);return n.createElement(o?"button":c,Object.assign({className:a("eds-icon-button",s)},d),t)},exports.NegativeButton=c,exports.PrimaryButton=i,exports.SecondaryButton=o,exports.SecondarySquareButton=function(e){return n.createElement(l,Object.assign({},e,{variant:"secondary"}))},exports.SuccessButton=u,exports.SuccessSquareButton=function(e){return n.createElement(l,Object.assign({},e,{variant:"success"}))},exports.TertiaryButton=d;
//# sourceMappingURL=button.cjs.production.min.js.map

@@ -175,5 +175,20 @@ import { warnAboutMissingStyles } from '@entur/utils';

var IconButton = function IconButton(_ref) {
var children = _ref.children,
className = _ref.className,
_ref$disabled = _ref.disabled,
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
_ref$as = _ref.as,
as = _ref$as === void 0 ? 'button' : _ref$as,
rest = _objectWithoutPropertiesLoose(_ref, ["children", "className", "variant", "disabled", "as"]);
var Element = disabled ? 'button' : as;
return React.createElement(Element, Object.assign({
className: classNames('eds-icon-button', className)
}, rest), children);
};
warnAboutMissingStyles('button');
export { Button, ButtonGroup, FloatingButton, NegativeButton, PrimaryButton, SecondaryButton, SecondarySquareButton, SuccessButton, SuccessSquareButton, TertiaryButton };
export { Button, ButtonGroup, FloatingButton, IconButton, NegativeButton, PrimaryButton, SecondaryButton, SecondarySquareButton, SuccessButton, SuccessSquareButton, TertiaryButton };
//# sourceMappingURL=button.esm.js.map

@@ -12,1 +12,2 @@ import './index.scss';

export * from './SuccessSquareButton';
export * from './IconButton';
{
"name": "@entur/button",
"version": "2.1.4",
"version": "2.2.0",
"license": "EUPL-1.2",

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

},
"gitHead": "4adf368b06a4aaa92cf4d0f9934ab39179f42eb5"
"gitHead": "769d9757ac1503bec7fb3f954b4f302df93efcac"
}

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