@entur/button
Advanced tools
Comparing version 2.2.2 to 2.2.4
@@ -6,2 +6,14 @@ # Change Log | ||
## [2.2.4](https://bitbucket.org/enturas/design-system/compare/@entur/button@2.2.2...@entur/button@2.2.4) (2020-03-25) | ||
### Bug Fixes | ||
- fix for disability state for iconbutton ([2550062](https://bitbucket.org/enturas/design-system/commits/2550062988a0deb5ea2dfccddabbd6202fa5be66)) | ||
## [2.2.3](https://bitbucket.org/enturas/design-system/compare/@entur/button@2.2.2...@entur/button@2.2.3) (2020-03-25) | ||
### Bug Fixes | ||
- fix for disability state for iconbutton ([2550062](https://bitbucket.org/enturas/design-system/commits/2550062988a0deb5ea2dfccddabbd6202fa5be66)) | ||
## [2.2.2](https://bitbucket.org/enturas/design-system/compare/@entur/button@2.2.1...@entur/button@2.2.2) (2020-03-20) | ||
@@ -8,0 +20,0 @@ |
@@ -203,3 +203,5 @@ 'use strict'; | ||
'eds-icon-button--disabled': disabled | ||
}) | ||
}), | ||
disabled: disabled, | ||
"aria-disabled": disabled | ||
}, rest), children); | ||
@@ -206,0 +208,0 @@ }; |
@@ -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 s(e,t){if(null==e)return{};var n,a,s={},r=Object.keys(e);for(a=0;a<r.length;a++)t.indexOf(n=r[a])>=0||(s[n]=e[n]);return s}var r=n.forwardRef((function(e,t){var r,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=s(e,["variant","size","loading","className","children","disabled","width","as"]),N=f?"button":p,h=n.Children.toArray(l),E=h.length>1&&"string"!=typeof h[0],j=h.length>1&&"string"!=typeof h[h.length-1];return n.createElement(N,Object.assign({className:a("eds-button",(r={},r["eds-button--variant-"+i]=i,r["eds-button--size-"+u]=u,r["eds-button--width-fluid"]="fluid"===v,r["eds-button--loading"]=c,r["eds-button--leading-icon"]=E,r["eds-button--trailing-icon"]=j,r),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(r,Object.assign({},e,{ref:t,variant:"primary"}))})),o=n.forwardRef((function(e,t){return n.createElement(r,Object.assign({},e,{ref:t,variant:"secondary"}))})),u=n.forwardRef((function(e,t){return n.createElement(r,Object.assign({},e,{ref:t,variant:"success"}))})),c=n.forwardRef((function(e,t){return n.createElement(r,Object.assign({},e,{ref:t,variant:"negative"}))})),d=n.forwardRef((function(e,t){return n.createElement(r,Object.assign({},e,{ref:t,variant:"tertiary"}))})),l=function(e){var t=e.children,r=e.className,i=e.variant,o=e.disabled,u=void 0!==o&&o,c=e.loading,d=void 0!==c&&c,l=e.as,b=void 0===l?"button":l,f=s(e,["children","className","variant","disabled","loading","as"]);return n.createElement(u?"button":b,Object.assign({className:a("eds-square-button",{"eds-square-button--success":"success"===i},{"eds-square-button--secondary":"secondary"===i},{"eds-square-button--loading":d},r),"aria-busy":d,disabled:u,"aria-disabled":u},f),n.Children.map(t,(function(e){return"string"==typeof e?n.createElement("span",{className:"eds-square-button__label"},e):n.createElement("span",{className:"eds-square-button__icon"},d?n.createElement("div",{className:"eds-button__spinner"}):e)})))};t.warnAboutMissingStyles("button"),exports.Button=r,exports.ButtonGroup=function(e){var t=e.as,r=void 0===t?"div":t,i=e.className,o=s(e,["as","className"]);return n.createElement(r,Object.assign({className:a("eds-button-group",i)},o))},exports.FloatingButton=function(e){var t=e.className,r=e.children,i=e.size,o=void 0===i?"medium":i,u=s(e,["className","children","size"]);return n.createElement("button",Object.assign({className:a("eds-floating-button",{"eds-floating-button--extended":n.Children.count(r)>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}))}(r))},exports.IconButton=function(e){var t=e.children,r=e.className,i=e.disabled,o=void 0!==i&&i,u=e.as,c=void 0===u?"button":u,d=s(e,["children","className","variant","disabled","as"]);return n.createElement(o?"button":c,Object.assign({className:a("eds-icon-button",r,{"eds-icon-button--disabled":o})},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; | ||
"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 s(e,t){if(null==e)return{};var n,a,s={},r=Object.keys(e);for(a=0;a<r.length;a++)t.indexOf(n=r[a])>=0||(s[n]=e[n]);return s}var r=n.forwardRef((function(e,t){var r,i=e.variant,o=e.size,u=void 0===o?"medium":o,d=e.loading,c=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=s(e,["variant","size","loading","className","children","disabled","width","as"]),N=f?"button":p,h=n.Children.toArray(l),E=h.length>1&&"string"!=typeof h[0],j=h.length>1&&"string"!=typeof h[h.length-1];return n.createElement(N,Object.assign({className:a("eds-button",(r={},r["eds-button--variant-"+i]=i,r["eds-button--size-"+u]=u,r["eds-button--width-fluid"]="fluid"===v,r["eds-button--loading"]=d,r["eds-button--leading-icon"]=E,r["eds-button--trailing-icon"]=j,r),c),ref:t,"aria-busy":d,disabled:f,"aria-disabled":f},y),d?n.createElement("div",{className:"eds-button__spinner"}):l)})),i=n.forwardRef((function(e,t){return n.createElement(r,Object.assign({},e,{ref:t,variant:"primary"}))})),o=n.forwardRef((function(e,t){return n.createElement(r,Object.assign({},e,{ref:t,variant:"secondary"}))})),u=n.forwardRef((function(e,t){return n.createElement(r,Object.assign({},e,{ref:t,variant:"success"}))})),d=n.forwardRef((function(e,t){return n.createElement(r,Object.assign({},e,{ref:t,variant:"negative"}))})),c=n.forwardRef((function(e,t){return n.createElement(r,Object.assign({},e,{ref:t,variant:"tertiary"}))})),l=function(e){var t=e.children,r=e.className,i=e.variant,o=e.disabled,u=void 0!==o&&o,d=e.loading,c=void 0!==d&&d,l=e.as,b=void 0===l?"button":l,f=s(e,["children","className","variant","disabled","loading","as"]);return n.createElement(u?"button":b,Object.assign({className:a("eds-square-button",{"eds-square-button--success":"success"===i},{"eds-square-button--secondary":"secondary"===i},{"eds-square-button--loading":c},r),"aria-busy":c,disabled:u,"aria-disabled":u},f),n.Children.map(t,(function(e){return"string"==typeof e?n.createElement("span",{className:"eds-square-button__label"},e):n.createElement("span",{className:"eds-square-button__icon"},c?n.createElement("div",{className:"eds-button__spinner"}):e)})))};t.warnAboutMissingStyles("button"),exports.Button=r,exports.ButtonGroup=function(e){var t=e.as,r=void 0===t?"div":t,i=e.className,o=s(e,["as","className"]);return n.createElement(r,Object.assign({className:a("eds-button-group",i)},o))},exports.FloatingButton=function(e){var t=e.className,r=e.children,i=e.size,o=void 0===i?"medium":i,u=s(e,["className","children","size"]);return n.createElement("button",Object.assign({className:a("eds-floating-button",{"eds-floating-button--extended":n.Children.count(r)>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}))}(r))},exports.IconButton=function(e){var t=e.children,r=e.className,i=e.disabled,o=void 0!==i&&i,u=e.as,d=void 0===u?"button":u,c=s(e,["children","className","variant","disabled","as"]);return n.createElement(o?"button":d,Object.assign({className:a("eds-icon-button",r,{"eds-icon-button--disabled":o}),disabled:o,"aria-disabled":o},c),t)},exports.NegativeButton=d,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=c; | ||
//# sourceMappingURL=button.cjs.production.min.js.map |
@@ -197,3 +197,5 @@ import { warnAboutMissingStyles } from '@entur/utils'; | ||
'eds-icon-button--disabled': disabled | ||
}) | ||
}), | ||
disabled: disabled, | ||
"aria-disabled": disabled | ||
}, rest), children); | ||
@@ -200,0 +202,0 @@ }; |
{ | ||
"name": "@entur/button", | ||
"version": "2.2.2", | ||
"version": "2.2.4", | ||
"license": "EUPL-1.2", | ||
@@ -36,3 +36,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "031dff573a51e0064ed5d0ee9c610d20cc2a6e98" | ||
"gitHead": "4a01623f9ef60c84d2d84d19d26f7eea4ac23539" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123586
1101