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

@devseed-ui/button

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@devseed-ui/button - npm Package Compare versions

Comparing version 3.0.3 to 3.1.0

11

CHANGELOG.md
# @devseed-ui/button
## 3.1.0
### Minor Changes
- Add new collection icons and update button padding
### Patch Changes
- Updated dependencies [undefined]
- @devseed-ui/collecticons@3.2.0
## 3.0.3

@@ -4,0 +15,0 @@

2

dist/index.node.js

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

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("styled-components"),require("@devseed-ui/theme-provider"),require("prop-types"),require("react"),require("polished"),require("@devseed-ui/collecticons"));else if("function"==typeof define&&define.amd)define(["styled-components","@devseed-ui/theme-provider","prop-types","react","polished","@devseed-ui/collecticons"],t);else{var r="object"==typeof exports?t(require("styled-components"),require("@devseed-ui/theme-provider"),require("prop-types"),require("react"),require("polished"),require("@devseed-ui/collecticons")):t(e["styled-components"],e["@devseed-ui/theme-provider"],e["prop-types"],e.react,e.polished,e["@devseed-ui/collecticons"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(global,(function(e,t,r,n,o,i){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(r(6)),o=u(r(3)),i=u(r(0)),a=r(1),s=r(4);function u(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=i.default.button.withConfig({displayName:"Button__El",componentId:"sc-1n019q7-0"})([""]),f=n.default.forwardRef((function(e,t){var r=e.children,o=d(e,["children"]),i=o.type||(o.as?void 0:"button");return n.default.createElement(c,l({ref:t},o,{type:i}),!!r&&n.default.createElement("span",null,r))}));f.propTypes={children:o.default.node,variation:o.default.string,size:o.default.string,radius:o.default.string,box:o.default.string,active:o.default.bool,hideText:o.default.bool,disabled:o.default.bool,visuallyDisabled:o.default.bool,useIcon:o.default.oneOfType([o.default.array,o.default.string])};var p=(0,i.default)(f).withConfig({displayName:"Button",componentId:"sc-1n019q7-1"})(["cursor:pointer;user-select:none;display:inline-block;text-align:center;white-space:nowrap;vertical-align:middle;line-height:1.5rem;font-size:1rem;padding:0.25rem 0.75rem;min-width:2rem;background:none;text-shadow:none;border:0;font-family:",";font-weight:",";font-style:",";font-variation-settings:",";text-transform:",";&,&:focus{outline:none;}&:hover{opacity:1;}"," > input[type=checkbox],> input[type=radio]{","}transition:background-color 0.24s ease 0s;"," "," "," "," "," ",""],(0,a.themeVal)("type.button.family"),(0,a.themeVal)("type.button.weight"),(0,a.themeVal)("type.button.style"),(0,a.themeVal)("type.button.settings"),(0,a.themeVal)("type.button.case"),(function(e){return(0,s.renderIcon)(e)}),(0,a.visuallyHidden)(),(function(e){return(0,s.renderButtonVariation)(e)}),(function(e){return(0,s.renderButtonSize)(e)}),(function(e){return(0,s.renderButtonRadius)(e)}),(function(e){return(0,s.renderButtonBox)(e)}),(function(e){return(0,s.renderHideText)(e)}),(function(e){return(0,s.renderDisabledState)(e)}));p.defaultProps={variation:"base-plain",size:"medium"};var b=p;t.default=b},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderButtonVariation=function(e){var t=e.theme.color,r=t.primary,n=t.danger,o=t.success,i=e.theme.type.base.color;switch(e.variation){case"primary-raised-light":return u(r,"raised","light",e);case"primary-raised-semidark":return u(r,"raised","semidark",e);case"primary-raised-dark":return u(r,"raised","dark",e);case"primary-plain":return u(r,"plain","light",e);case"danger-raised-light":return u(n,"raised","light",e);case"danger-raised-dark":return u(n,"raised","dark",e);case"danger-plain":return u(n,"plain","light",e);case"success-raised-light":return u(o,"raised","light",e);case"success-raised-dark":return u(o,"raised","dark",e);case"success-plain":return u(o,"plain","light",e);case"achromic-plain":return u("#fff","plain",null,e);case"achromic-glass":return u("#fff","glass",null,e);case"base-raised-light":return u(i,"raised","light",e);case"base-raised-semidark":return u(i,"raised","semidark",e);case"base-raised-dark":return u(i,"raised","dark",e);case"base-plain":default:return u(i,"plain","light",e)}},t.buttonVariation=u,t.buttonVariationBaseCss=l,t.buttonVariationActiveCss=d,t.buttonVariationHoverCss=c,t.renderIcon=function(e){var t=e.useIcon,r=(0,o.css)(["&::before,&::after{font-size:1rem;}&::before{margin-right:0.375rem;}&::after{margin-left:0.375rem;}&::before,&::after,> *{vertical-align:top;display:inline-block;line-height:inherit !important;}"]);if(!t)return r;var n=(l=Array.isArray(t)?t:[t,"before"],d=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(l,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),i=n[0],a=n[1],u="&::".concat(a);var l,d;return(0,o.css)([""," ","{","}"],r,u,(0,s.default)(i))},t.renderButtonRadius=function(e){switch(e.radius){case"ellipsoid":return(0,o.css)(["border-radius:",";"],(0,a.themeVal)("shape.ellipsoid"));case"square":return(0,o.css)(["border-radius:0;"]);default:return(0,o.css)(["border-radius:",";"],(0,a.themeVal)("shape.rounded"))}},t.renderButtonBox=function(e){switch(e.box){case"block":return(0,o.css)(["display:block;width:100%;"]);case"semi-fluid":return(0,o.css)(["display:inline-flex;min-width:16rem;"]);default:return(0,o.css)(["display:inline-block;"])}},t.renderButtonSize=function(e){switch(e.size){case"small":return(0,o.css)(["line-height:1.25rem;font-size:0.875rem;padding:0.125rem 0.25rem;min-width:1.5rem;"]);case"large":return(0,o.css)(["line-height:1.5rem;font-size:1rem;padding:0.5rem 1.25rem;min-width:2.5rem;"]);case"xlarge":return(0,o.css)(["line-height:2rem;font-size:1rem;padding:0.5rem 1.5rem;min-width:3rem;"]);default:return(0,o.css)(["line-height:1.5rem;font-size:1rem;padding:0.25rem 0.75rem;min-width:2rem;"])}},t.renderDisabledState=function(e){if(e.disabled)return(0,a.disabled)();if(e.visuallyDisabled)return(0,o.css)(["&,&:hover{","}"],(0,a.visuallyDisabled)())},t.renderHideText=function(e){if(!e.hideText)return;return(0,o.css)(["padding-left:0;padding-right:0;&::before,&::after{margin:0;}> *{","}"],(0,a.visuallyHidden)())};var n,o=r(0),i=r(7),a=r(1),s=(n=r(8))&&n.__esModule?n:{default:n};function u(e,t,r,n){return(0,o.css)([""," ",""],l(e,t,r,n),(function(i){return!i.visuallyDisabled&&(0,o.css)(["&:hover{","}"," &.active,&.active:hover,&:active{","}"],c(e,t,r,n),(function(e){return e.active?"&, &:hover,":""}),d(e,t,r,n))}))}function l(e,t,r,n){var i=n.theme,s=f(e,t,r,{theme:i}),u=s.textColor,l=s.bgColor,d=s.shadowColor;return(0,o.css)(["background-color:",";&,&:visited{color:",";}",""],l,u,d&&(0,o.css)(["box-shadow:0 -1px 1px 0 ",",0 2px 6px 0 ",";"],(0,a.rgba)(i.color.base,.08),d))}function d(e,t,r,n){var i=f(e,t,r,{theme:n.theme}),a=i.bgColorActive,s=i.shadowColor;return(0,o.css)(["z-index:2;transform:none;background-color:",";",""],a,s&&(0,o.css)(["box-shadow:inset 0 1px 2px 0 ",";"],s))}function c(e,t,r,n){var i=f(e,t,r,{theme:n.theme}).bgColorHover;return(0,o.css)(["background-color:",";"],i)}function f(e,t,r,n){var o=n.theme;switch(t){case"raised":switch(r){case"light":return{textColor:e,bgColor:(0,i.tint)(1,e),bgColorHover:(0,i.tint)(.96,e),bgColorActive:(0,i.tint)(.92,e),shadowColor:(0,a.rgba)(o.color.base,.16)};case"semidark":return{textColor:e,bgColor:(0,i.tint)(.88,e),bgColorHover:(0,i.tint)(.84,e),bgColorActive:(0,i.tint)(.8,e),shadowColor:(0,a.rgba)(o.color.base,.16)};case"dark":return{textColor:(0,i.tint)(1,e),bgColor:e,bgColorHover:(0,i.shade)(.08,e),bgColorActive:(0,i.shade)(.12,e),shadowColor:(0,a.rgba)(o.color.base,.24)};default:console.error("Invalid brightness property for button raised")}break;case"glass":return{textColor:e,bgColor:(0,a.rgba)(e,.16),bgColorHover:(0,a.rgba)(e,.24),bgColorActive:(0,a.rgba)(e,.32)};case"plain":return{textColor:e,bgColor:(0,a.rgba)(e,0),bgColorHover:(0,a.rgba)(e,.08),bgColorActive:(0,a.rgba)(e,.16)};default:console.error("Invalid style property for button")}return{}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"buttonVariation",{enumerable:!0,get:function(){return o.buttonVariation}}),Object.defineProperty(t,"buttonVariationHoverCss",{enumerable:!0,get:function(){return o.buttonVariationHoverCss}}),Object.defineProperty(t,"buttonVariationBaseCss",{enumerable:!0,get:function(){return o.buttonVariationBaseCss}}),Object.defineProperty(t,"buttonVariationActiveCss",{enumerable:!0,get:function(){return o.buttonVariationActiveCss}}),Object.defineProperty(t,"ButtonGroup",{enumerable:!0,get:function(){return i.default}});var n=a(r(2)),o=r(4),i=a(r(9));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(r(3)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r(0)),a=l(r(2)),s=r(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function l(e){return e&&e.__esModule?e:{default:e}}var d=i.default.div.withConfig({displayName:"ButtonGroup",componentId:"tfq0db-0"})(["position:relative;display:inline-flex;> ","{display:block;position:relative;margin:0;z-index:2;}",""],a.default,(function(e){return"horizontal"===(t=e.orientation)?(0,i.css)(["flex-flow:row nowrap;> ",":first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0;clip-path:inset(-100% 0 -100% -100%);}> ",":last-child:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;clip-path:inset(-100% -100% -100% 0);}> ",":not(:first-child):not(:last-child){border-radius:0;clip-path:inset(-100% 0);}> "," + ","{margin-left:-",";}"],a.default,a.default,a.default,a.default,a.default,(0,s.themeVal)("layout.border")):"vertical"===t?(0,i.css)(["flex-flow:column;> ",":first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;clip-path:inset(-100% -100% 0 -100%);}> ",":last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;clip-path:inset(0 -100% -100% -100%);}> ",":not(:first-child):not(:last-child){border-radius:0;clip-path:inset(0 -100%);}> "," + ","{margin-top:-",";}"],a.default,a.default,a.default,a.default,a.default,(0,s.themeVal)("layout.border")):void 0;var t}));d.propTypes={children:o.default.node,orientation:o.default.string};var c=d;t.default=c}])}));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("styled-components"),require("@devseed-ui/theme-provider"),require("prop-types"),require("react"),require("polished"),require("@devseed-ui/collecticons"));else if("function"==typeof define&&define.amd)define(["styled-components","@devseed-ui/theme-provider","prop-types","react","polished","@devseed-ui/collecticons"],t);else{var r="object"==typeof exports?t(require("styled-components"),require("@devseed-ui/theme-provider"),require("prop-types"),require("react"),require("polished"),require("@devseed-ui/collecticons")):t(e["styled-components"],e["@devseed-ui/theme-provider"],e["prop-types"],e.react,e.polished,e["@devseed-ui/collecticons"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(global,(function(e,t,r,n,o,i){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(r(6)),o=u(r(3)),i=u(r(0)),a=r(1),s=r(4);function u(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=i.default.button.withConfig({displayName:"Button__El",componentId:"sc-1n019q7-0"})([""]),f=n.default.forwardRef((function(e,t){var r=e.children,o=d(e,["children"]),i=o.type||(o.as?void 0:"button");return n.default.createElement(c,l({ref:t},o,{type:i}),!!r&&n.default.createElement("span",null,r))}));f.propTypes={children:o.default.node,variation:o.default.string,size:o.default.string,radius:o.default.string,box:o.default.string,active:o.default.bool,hideText:o.default.bool,disabled:o.default.bool,visuallyDisabled:o.default.bool,useIcon:o.default.oneOfType([o.default.array,o.default.string])};var p=(0,i.default)(f).withConfig({displayName:"Button",componentId:"sc-1n019q7-1"})(["cursor:pointer;user-select:none;display:inline-block;text-align:center;white-space:nowrap;vertical-align:middle;line-height:1.5rem;font-size:1rem;padding:0.25rem 0.75rem;min-width:2rem;background:none;text-shadow:none;border:0;font-family:",";font-weight:",";font-style:",";font-variation-settings:",";text-transform:",";&,&:focus{outline:none;}&:hover{opacity:1;}"," > input[type=checkbox],> input[type=radio]{","}transition:background-color 0.24s ease 0s;"," "," "," "," "," ",""],(0,a.themeVal)("type.button.family"),(0,a.themeVal)("type.button.weight"),(0,a.themeVal)("type.button.style"),(0,a.themeVal)("type.button.settings"),(0,a.themeVal)("type.button.case"),(function(e){return(0,s.renderIcon)(e)}),(0,a.visuallyHidden)(),(function(e){return(0,s.renderButtonVariation)(e)}),(function(e){return(0,s.renderButtonSize)(e)}),(function(e){return(0,s.renderButtonRadius)(e)}),(function(e){return(0,s.renderButtonBox)(e)}),(function(e){return(0,s.renderHideText)(e)}),(function(e){return(0,s.renderDisabledState)(e)}));p.defaultProps={variation:"base-plain",size:"medium"};var b=p;t.default=b},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderButtonVariation=function(e){var t=e.theme.color,r=t.primary,n=t.danger,o=t.success,i=e.theme.type.base.color;switch(e.variation){case"primary-raised-light":return u(r,"raised","light",e);case"primary-raised-semidark":return u(r,"raised","semidark",e);case"primary-raised-dark":return u(r,"raised","dark",e);case"primary-plain":return u(r,"plain","light",e);case"danger-raised-light":return u(n,"raised","light",e);case"danger-raised-dark":return u(n,"raised","dark",e);case"danger-plain":return u(n,"plain","light",e);case"success-raised-light":return u(o,"raised","light",e);case"success-raised-dark":return u(o,"raised","dark",e);case"success-plain":return u(o,"plain","light",e);case"achromic-plain":return u("#fff","plain",null,e);case"achromic-glass":return u("#fff","glass",null,e);case"base-raised-light":return u(i,"raised","light",e);case"base-raised-semidark":return u(i,"raised","semidark",e);case"base-raised-dark":return u(i,"raised","dark",e);case"base-plain":default:return u(i,"plain","light",e)}},t.buttonVariation=u,t.buttonVariationBaseCss=l,t.buttonVariationActiveCss=d,t.buttonVariationHoverCss=c,t.renderIcon=function(e){var t=e.useIcon,r=(0,o.css)(["&::before,&::after{font-size:1rem;}&::before{margin-right:0.375rem;}&::after{margin-left:0.375rem;}&::before,&::after,> *{vertical-align:top;display:inline-block;line-height:inherit !important;}"]);if(!t)return r;var n=(l=Array.isArray(t)?t:[t,"before"],d=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(l,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),i=n[0],a=n[1],u="&::".concat(a);var l,d;return(0,o.css)([""," ","{","}"],r,u,(0,s.default)(i))},t.renderButtonRadius=function(e){switch(e.radius){case"ellipsoid":return(0,o.css)(["border-radius:",";"],(0,a.themeVal)("shape.ellipsoid"));case"square":return(0,o.css)(["border-radius:0;"]);default:return(0,o.css)(["border-radius:",";"],(0,a.themeVal)("shape.rounded"))}},t.renderButtonBox=function(e){switch(e.box){case"block":return(0,o.css)(["display:block;width:100%;"]);case"semi-fluid":return(0,o.css)(["display:inline-flex;min-width:16rem;"]);default:return(0,o.css)(["display:inline-block;"])}},t.renderButtonSize=function(e){switch(e.size){case"small":return(0,o.css)(["line-height:1.25rem;font-size:0.875rem;padding:0.125rem 0.5rem;min-width:1.5rem;"]);case"large":return(0,o.css)(["line-height:1.5rem;font-size:1rem;padding:0.5rem 1rem;min-width:2.5rem;"]);case"xlarge":return(0,o.css)(["line-height:2rem;font-size:1rem;padding:0.5rem 1.25rem;min-width:3rem;"]);default:return(0,o.css)(["line-height:1.5rem;font-size:1rem;padding:0.25rem 0.75rem;min-width:2rem;"])}},t.renderDisabledState=function(e){if(e.disabled)return(0,a.disabled)();if(e.visuallyDisabled)return(0,o.css)(["&,&:hover{","}"],(0,a.visuallyDisabled)())},t.renderHideText=function(e){if(!e.hideText)return;return(0,o.css)(["padding-left:0;padding-right:0;&::before,&::after{margin:0;}> *{","}"],(0,a.visuallyHidden)())};var n,o=r(0),i=r(7),a=r(1),s=(n=r(8))&&n.__esModule?n:{default:n};function u(e,t,r,n){return(0,o.css)([""," ",""],l(e,t,r,n),(function(i){return!i.visuallyDisabled&&(0,o.css)(["&:hover{","}"," &.active,&.active:hover,&:active{","}"],c(e,t,r,n),(function(e){return e.active?"&, &:hover,":""}),d(e,t,r,n))}))}function l(e,t,r,n){var i=n.theme,s=f(e,t,r,{theme:i}),u=s.textColor,l=s.bgColor,d=s.shadowColor;return(0,o.css)(["background-color:",";&,&:visited{color:",";}",""],l,u,d&&(0,o.css)(["box-shadow:0 -1px 1px 0 ",",0 2px 6px 0 ",";"],(0,a.rgba)(i.color.base,.08),d))}function d(e,t,r,n){var i=f(e,t,r,{theme:n.theme}),a=i.bgColorActive,s=i.shadowColor;return(0,o.css)(["z-index:2;transform:none;background-color:",";",""],a,s&&(0,o.css)(["box-shadow:inset 0 1px 2px 0 ",";"],s))}function c(e,t,r,n){var i=f(e,t,r,{theme:n.theme}).bgColorHover;return(0,o.css)(["background-color:",";"],i)}function f(e,t,r,n){var o=n.theme;switch(t){case"raised":switch(r){case"light":return{textColor:e,bgColor:(0,i.tint)(1,e),bgColorHover:(0,i.tint)(.96,e),bgColorActive:(0,i.tint)(.92,e),shadowColor:(0,a.rgba)(o.color.base,.16)};case"semidark":return{textColor:e,bgColor:(0,i.tint)(.88,e),bgColorHover:(0,i.tint)(.84,e),bgColorActive:(0,i.tint)(.8,e),shadowColor:(0,a.rgba)(o.color.base,.16)};case"dark":return{textColor:(0,i.tint)(1,e),bgColor:e,bgColorHover:(0,i.shade)(.08,e),bgColorActive:(0,i.shade)(.12,e),shadowColor:(0,a.rgba)(o.color.base,.24)};default:console.error("Invalid brightness property for button raised")}break;case"glass":return{textColor:e,bgColor:(0,a.rgba)(e,.16),bgColorHover:(0,a.rgba)(e,.24),bgColorActive:(0,a.rgba)(e,.32)};case"plain":return{textColor:e,bgColor:(0,a.rgba)(e,0),bgColorHover:(0,a.rgba)(e,.08),bgColorActive:(0,a.rgba)(e,.16)};default:console.error("Invalid style property for button")}return{}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"buttonVariation",{enumerable:!0,get:function(){return o.buttonVariation}}),Object.defineProperty(t,"buttonVariationHoverCss",{enumerable:!0,get:function(){return o.buttonVariationHoverCss}}),Object.defineProperty(t,"buttonVariationBaseCss",{enumerable:!0,get:function(){return o.buttonVariationBaseCss}}),Object.defineProperty(t,"buttonVariationActiveCss",{enumerable:!0,get:function(){return o.buttonVariationActiveCss}}),Object.defineProperty(t,"ButtonGroup",{enumerable:!0,get:function(){return i.default}});var n=a(r(2)),o=r(4),i=a(r(9));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(r(3)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r(0)),a=l(r(2)),s=r(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function l(e){return e&&e.__esModule?e:{default:e}}var d=i.default.div.withConfig({displayName:"ButtonGroup",componentId:"tfq0db-0"})(["position:relative;display:inline-flex;> ","{display:block;position:relative;margin:0;z-index:2;}",""],a.default,(function(e){return"horizontal"===(t=e.orientation)?(0,i.css)(["flex-flow:row nowrap;> ",":first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0;clip-path:inset(-100% 0 -100% -100%);}> ",":last-child:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;clip-path:inset(-100% -100% -100% 0);}> ",":not(:first-child):not(:last-child){border-radius:0;clip-path:inset(-100% 0);}> "," + ","{margin-left:-",";}"],a.default,a.default,a.default,a.default,a.default,(0,s.themeVal)("layout.border")):"vertical"===t?(0,i.css)(["flex-flow:column;> ",":first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;clip-path:inset(-100% -100% 0 -100%);}> ",":last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;clip-path:inset(0 -100% -100% -100%);}> ",":not(:first-child):not(:last-child){border-radius:0;clip-path:inset(0 -100%);}> "," + ","{margin-top:-",";}"],a.default,a.default,a.default,a.default,a.default,(0,s.themeVal)("layout.border")):void 0;var t}));d.propTypes={children:o.default.node,orientation:o.default.string};var c=d;t.default=c}])}));

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

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("styled-components"),require("@devseed-ui/theme-provider"),require("prop-types"),require("react"),require("polished"),require("@devseed-ui/collecticons"));else if("function"==typeof define&&define.amd)define(["styled-components","@devseed-ui/theme-provider","prop-types","react","polished","@devseed-ui/collecticons"],t);else{var r="object"==typeof exports?t(require("styled-components"),require("@devseed-ui/theme-provider"),require("prop-types"),require("react"),require("polished"),require("@devseed-ui/collecticons")):t(e["styled-components"],e["@devseed-ui/theme-provider"],e["prop-types"],e.react,e.polished,e["@devseed-ui/collecticons"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,(function(e,t,r,n,o,i){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(r(6)),o=u(r(3)),i=u(r(0)),a=r(1),s=r(4);function u(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=i.default.button.withConfig({displayName:"Button__El",componentId:"sc-1n019q7-0"})([""]),f=n.default.forwardRef((function(e,t){var r=e.children,o=d(e,["children"]),i=o.type||(o.as?void 0:"button");return n.default.createElement(c,l({ref:t},o,{type:i}),!!r&&n.default.createElement("span",null,r))}));f.propTypes={children:o.default.node,variation:o.default.string,size:o.default.string,radius:o.default.string,box:o.default.string,active:o.default.bool,hideText:o.default.bool,disabled:o.default.bool,visuallyDisabled:o.default.bool,useIcon:o.default.oneOfType([o.default.array,o.default.string])};var p=(0,i.default)(f).withConfig({displayName:"Button",componentId:"sc-1n019q7-1"})(["cursor:pointer;user-select:none;display:inline-block;text-align:center;white-space:nowrap;vertical-align:middle;line-height:1.5rem;font-size:1rem;padding:0.25rem 0.75rem;min-width:2rem;background:none;text-shadow:none;border:0;font-family:",";font-weight:",";font-style:",";font-variation-settings:",";text-transform:",";&,&:focus{outline:none;}&:hover{opacity:1;}"," > input[type=checkbox],> input[type=radio]{","}transition:background-color 0.24s ease 0s;"," "," "," "," "," ",""],(0,a.themeVal)("type.button.family"),(0,a.themeVal)("type.button.weight"),(0,a.themeVal)("type.button.style"),(0,a.themeVal)("type.button.settings"),(0,a.themeVal)("type.button.case"),(function(e){return(0,s.renderIcon)(e)}),(0,a.visuallyHidden)(),(function(e){return(0,s.renderButtonVariation)(e)}),(function(e){return(0,s.renderButtonSize)(e)}),(function(e){return(0,s.renderButtonRadius)(e)}),(function(e){return(0,s.renderButtonBox)(e)}),(function(e){return(0,s.renderHideText)(e)}),(function(e){return(0,s.renderDisabledState)(e)}));p.defaultProps={variation:"base-plain",size:"medium"};var b=p;t.default=b},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderButtonVariation=function(e){var t=e.theme.color,r=t.primary,n=t.danger,o=t.success,i=e.theme.type.base.color;switch(e.variation){case"primary-raised-light":return u(r,"raised","light",e);case"primary-raised-semidark":return u(r,"raised","semidark",e);case"primary-raised-dark":return u(r,"raised","dark",e);case"primary-plain":return u(r,"plain","light",e);case"danger-raised-light":return u(n,"raised","light",e);case"danger-raised-dark":return u(n,"raised","dark",e);case"danger-plain":return u(n,"plain","light",e);case"success-raised-light":return u(o,"raised","light",e);case"success-raised-dark":return u(o,"raised","dark",e);case"success-plain":return u(o,"plain","light",e);case"achromic-plain":return u("#fff","plain",null,e);case"achromic-glass":return u("#fff","glass",null,e);case"base-raised-light":return u(i,"raised","light",e);case"base-raised-semidark":return u(i,"raised","semidark",e);case"base-raised-dark":return u(i,"raised","dark",e);case"base-plain":default:return u(i,"plain","light",e)}},t.buttonVariation=u,t.buttonVariationBaseCss=l,t.buttonVariationActiveCss=d,t.buttonVariationHoverCss=c,t.renderIcon=function(e){var t=e.useIcon,r=(0,o.css)(["&::before,&::after{font-size:1rem;}&::before{margin-right:0.375rem;}&::after{margin-left:0.375rem;}&::before,&::after,> *{vertical-align:top;display:inline-block;line-height:inherit !important;}"]);if(!t)return r;var n=(l=Array.isArray(t)?t:[t,"before"],d=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(l,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),i=n[0],a=n[1],u="&::".concat(a);var l,d;return(0,o.css)([""," ","{","}"],r,u,(0,s.default)(i))},t.renderButtonRadius=function(e){switch(e.radius){case"ellipsoid":return(0,o.css)(["border-radius:",";"],(0,a.themeVal)("shape.ellipsoid"));case"square":return(0,o.css)(["border-radius:0;"]);default:return(0,o.css)(["border-radius:",";"],(0,a.themeVal)("shape.rounded"))}},t.renderButtonBox=function(e){switch(e.box){case"block":return(0,o.css)(["display:block;width:100%;"]);case"semi-fluid":return(0,o.css)(["display:inline-flex;min-width:16rem;"]);default:return(0,o.css)(["display:inline-block;"])}},t.renderButtonSize=function(e){switch(e.size){case"small":return(0,o.css)(["line-height:1.25rem;font-size:0.875rem;padding:0.125rem 0.25rem;min-width:1.5rem;"]);case"large":return(0,o.css)(["line-height:1.5rem;font-size:1rem;padding:0.5rem 1.25rem;min-width:2.5rem;"]);case"xlarge":return(0,o.css)(["line-height:2rem;font-size:1rem;padding:0.5rem 1.5rem;min-width:3rem;"]);default:return(0,o.css)(["line-height:1.5rem;font-size:1rem;padding:0.25rem 0.75rem;min-width:2rem;"])}},t.renderDisabledState=function(e){if(e.disabled)return(0,a.disabled)();if(e.visuallyDisabled)return(0,o.css)(["&,&:hover{","}"],(0,a.visuallyDisabled)())},t.renderHideText=function(e){if(!e.hideText)return;return(0,o.css)(["padding-left:0;padding-right:0;&::before,&::after{margin:0;}> *{","}"],(0,a.visuallyHidden)())};var n,o=r(0),i=r(7),a=r(1),s=(n=r(8))&&n.__esModule?n:{default:n};function u(e,t,r,n){return(0,o.css)([""," ",""],l(e,t,r,n),(function(i){return!i.visuallyDisabled&&(0,o.css)(["&:hover{","}"," &.active,&.active:hover,&:active{","}"],c(e,t,r,n),(function(e){return e.active?"&, &:hover,":""}),d(e,t,r,n))}))}function l(e,t,r,n){var i=n.theme,s=f(e,t,r,{theme:i}),u=s.textColor,l=s.bgColor,d=s.shadowColor;return(0,o.css)(["background-color:",";&,&:visited{color:",";}",""],l,u,d&&(0,o.css)(["box-shadow:0 -1px 1px 0 ",",0 2px 6px 0 ",";"],(0,a.rgba)(i.color.base,.08),d))}function d(e,t,r,n){var i=f(e,t,r,{theme:n.theme}),a=i.bgColorActive,s=i.shadowColor;return(0,o.css)(["z-index:2;transform:none;background-color:",";",""],a,s&&(0,o.css)(["box-shadow:inset 0 1px 2px 0 ",";"],s))}function c(e,t,r,n){var i=f(e,t,r,{theme:n.theme}).bgColorHover;return(0,o.css)(["background-color:",";"],i)}function f(e,t,r,n){var o=n.theme;switch(t){case"raised":switch(r){case"light":return{textColor:e,bgColor:(0,i.tint)(1,e),bgColorHover:(0,i.tint)(.96,e),bgColorActive:(0,i.tint)(.92,e),shadowColor:(0,a.rgba)(o.color.base,.16)};case"semidark":return{textColor:e,bgColor:(0,i.tint)(.88,e),bgColorHover:(0,i.tint)(.84,e),bgColorActive:(0,i.tint)(.8,e),shadowColor:(0,a.rgba)(o.color.base,.16)};case"dark":return{textColor:(0,i.tint)(1,e),bgColor:e,bgColorHover:(0,i.shade)(.08,e),bgColorActive:(0,i.shade)(.12,e),shadowColor:(0,a.rgba)(o.color.base,.24)};default:console.error("Invalid brightness property for button raised")}break;case"glass":return{textColor:e,bgColor:(0,a.rgba)(e,.16),bgColorHover:(0,a.rgba)(e,.24),bgColorActive:(0,a.rgba)(e,.32)};case"plain":return{textColor:e,bgColor:(0,a.rgba)(e,0),bgColorHover:(0,a.rgba)(e,.08),bgColorActive:(0,a.rgba)(e,.16)};default:console.error("Invalid style property for button")}return{}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"buttonVariation",{enumerable:!0,get:function(){return o.buttonVariation}}),Object.defineProperty(t,"buttonVariationHoverCss",{enumerable:!0,get:function(){return o.buttonVariationHoverCss}}),Object.defineProperty(t,"buttonVariationBaseCss",{enumerable:!0,get:function(){return o.buttonVariationBaseCss}}),Object.defineProperty(t,"buttonVariationActiveCss",{enumerable:!0,get:function(){return o.buttonVariationActiveCss}}),Object.defineProperty(t,"ButtonGroup",{enumerable:!0,get:function(){return i.default}});var n=a(r(2)),o=r(4),i=a(r(9));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(r(3)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r(0)),a=l(r(2)),s=r(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function l(e){return e&&e.__esModule?e:{default:e}}var d=i.default.div.withConfig({displayName:"ButtonGroup",componentId:"tfq0db-0"})(["position:relative;display:inline-flex;> ","{display:block;position:relative;margin:0;z-index:2;}",""],a.default,(function(e){return"horizontal"===(t=e.orientation)?(0,i.css)(["flex-flow:row nowrap;> ",":first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0;clip-path:inset(-100% 0 -100% -100%);}> ",":last-child:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;clip-path:inset(-100% -100% -100% 0);}> ",":not(:first-child):not(:last-child){border-radius:0;clip-path:inset(-100% 0);}> "," + ","{margin-left:-",";}"],a.default,a.default,a.default,a.default,a.default,(0,s.themeVal)("layout.border")):"vertical"===t?(0,i.css)(["flex-flow:column;> ",":first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;clip-path:inset(-100% -100% 0 -100%);}> ",":last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;clip-path:inset(0 -100% -100% -100%);}> ",":not(:first-child):not(:last-child){border-radius:0;clip-path:inset(0 -100%);}> "," + ","{margin-top:-",";}"],a.default,a.default,a.default,a.default,a.default,(0,s.themeVal)("layout.border")):void 0;var t}));d.propTypes={children:o.default.node,orientation:o.default.string};var c=d;t.default=c}])}));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("styled-components"),require("@devseed-ui/theme-provider"),require("prop-types"),require("react"),require("polished"),require("@devseed-ui/collecticons"));else if("function"==typeof define&&define.amd)define(["styled-components","@devseed-ui/theme-provider","prop-types","react","polished","@devseed-ui/collecticons"],t);else{var r="object"==typeof exports?t(require("styled-components"),require("@devseed-ui/theme-provider"),require("prop-types"),require("react"),require("polished"),require("@devseed-ui/collecticons")):t(e["styled-components"],e["@devseed-ui/theme-provider"],e["prop-types"],e.react,e.polished,e["@devseed-ui/collecticons"]);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,(function(e,t,r,n,o,i){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(r(6)),o=u(r(3)),i=u(r(0)),a=r(1),s=r(4);function u(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=i.default.button.withConfig({displayName:"Button__El",componentId:"sc-1n019q7-0"})([""]),f=n.default.forwardRef((function(e,t){var r=e.children,o=d(e,["children"]),i=o.type||(o.as?void 0:"button");return n.default.createElement(c,l({ref:t},o,{type:i}),!!r&&n.default.createElement("span",null,r))}));f.propTypes={children:o.default.node,variation:o.default.string,size:o.default.string,radius:o.default.string,box:o.default.string,active:o.default.bool,hideText:o.default.bool,disabled:o.default.bool,visuallyDisabled:o.default.bool,useIcon:o.default.oneOfType([o.default.array,o.default.string])};var p=(0,i.default)(f).withConfig({displayName:"Button",componentId:"sc-1n019q7-1"})(["cursor:pointer;user-select:none;display:inline-block;text-align:center;white-space:nowrap;vertical-align:middle;line-height:1.5rem;font-size:1rem;padding:0.25rem 0.75rem;min-width:2rem;background:none;text-shadow:none;border:0;font-family:",";font-weight:",";font-style:",";font-variation-settings:",";text-transform:",";&,&:focus{outline:none;}&:hover{opacity:1;}"," > input[type=checkbox],> input[type=radio]{","}transition:background-color 0.24s ease 0s;"," "," "," "," "," ",""],(0,a.themeVal)("type.button.family"),(0,a.themeVal)("type.button.weight"),(0,a.themeVal)("type.button.style"),(0,a.themeVal)("type.button.settings"),(0,a.themeVal)("type.button.case"),(function(e){return(0,s.renderIcon)(e)}),(0,a.visuallyHidden)(),(function(e){return(0,s.renderButtonVariation)(e)}),(function(e){return(0,s.renderButtonSize)(e)}),(function(e){return(0,s.renderButtonRadius)(e)}),(function(e){return(0,s.renderButtonBox)(e)}),(function(e){return(0,s.renderHideText)(e)}),(function(e){return(0,s.renderDisabledState)(e)}));p.defaultProps={variation:"base-plain",size:"medium"};var b=p;t.default=b},function(e,t){e.exports=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderButtonVariation=function(e){var t=e.theme.color,r=t.primary,n=t.danger,o=t.success,i=e.theme.type.base.color;switch(e.variation){case"primary-raised-light":return u(r,"raised","light",e);case"primary-raised-semidark":return u(r,"raised","semidark",e);case"primary-raised-dark":return u(r,"raised","dark",e);case"primary-plain":return u(r,"plain","light",e);case"danger-raised-light":return u(n,"raised","light",e);case"danger-raised-dark":return u(n,"raised","dark",e);case"danger-plain":return u(n,"plain","light",e);case"success-raised-light":return u(o,"raised","light",e);case"success-raised-dark":return u(o,"raised","dark",e);case"success-plain":return u(o,"plain","light",e);case"achromic-plain":return u("#fff","plain",null,e);case"achromic-glass":return u("#fff","glass",null,e);case"base-raised-light":return u(i,"raised","light",e);case"base-raised-semidark":return u(i,"raised","semidark",e);case"base-raised-dark":return u(i,"raised","dark",e);case"base-plain":default:return u(i,"plain","light",e)}},t.buttonVariation=u,t.buttonVariationBaseCss=l,t.buttonVariationActiveCss=d,t.buttonVariationHoverCss=c,t.renderIcon=function(e){var t=e.useIcon,r=(0,o.css)(["&::before,&::after{font-size:1rem;}&::before{margin-right:0.375rem;}&::after{margin-left:0.375rem;}&::before,&::after,> *{vertical-align:top;display:inline-block;line-height:inherit !important;}"]);if(!t)return r;var n=(l=Array.isArray(t)?t:[t,"before"],d=2,function(e){if(Array.isArray(e))return e}(l)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}return r}}(l,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),i=n[0],a=n[1],u="&::".concat(a);var l,d;return(0,o.css)([""," ","{","}"],r,u,(0,s.default)(i))},t.renderButtonRadius=function(e){switch(e.radius){case"ellipsoid":return(0,o.css)(["border-radius:",";"],(0,a.themeVal)("shape.ellipsoid"));case"square":return(0,o.css)(["border-radius:0;"]);default:return(0,o.css)(["border-radius:",";"],(0,a.themeVal)("shape.rounded"))}},t.renderButtonBox=function(e){switch(e.box){case"block":return(0,o.css)(["display:block;width:100%;"]);case"semi-fluid":return(0,o.css)(["display:inline-flex;min-width:16rem;"]);default:return(0,o.css)(["display:inline-block;"])}},t.renderButtonSize=function(e){switch(e.size){case"small":return(0,o.css)(["line-height:1.25rem;font-size:0.875rem;padding:0.125rem 0.5rem;min-width:1.5rem;"]);case"large":return(0,o.css)(["line-height:1.5rem;font-size:1rem;padding:0.5rem 1rem;min-width:2.5rem;"]);case"xlarge":return(0,o.css)(["line-height:2rem;font-size:1rem;padding:0.5rem 1.25rem;min-width:3rem;"]);default:return(0,o.css)(["line-height:1.5rem;font-size:1rem;padding:0.25rem 0.75rem;min-width:2rem;"])}},t.renderDisabledState=function(e){if(e.disabled)return(0,a.disabled)();if(e.visuallyDisabled)return(0,o.css)(["&,&:hover{","}"],(0,a.visuallyDisabled)())},t.renderHideText=function(e){if(!e.hideText)return;return(0,o.css)(["padding-left:0;padding-right:0;&::before,&::after{margin:0;}> *{","}"],(0,a.visuallyHidden)())};var n,o=r(0),i=r(7),a=r(1),s=(n=r(8))&&n.__esModule?n:{default:n};function u(e,t,r,n){return(0,o.css)([""," ",""],l(e,t,r,n),(function(i){return!i.visuallyDisabled&&(0,o.css)(["&:hover{","}"," &.active,&.active:hover,&:active{","}"],c(e,t,r,n),(function(e){return e.active?"&, &:hover,":""}),d(e,t,r,n))}))}function l(e,t,r,n){var i=n.theme,s=f(e,t,r,{theme:i}),u=s.textColor,l=s.bgColor,d=s.shadowColor;return(0,o.css)(["background-color:",";&,&:visited{color:",";}",""],l,u,d&&(0,o.css)(["box-shadow:0 -1px 1px 0 ",",0 2px 6px 0 ",";"],(0,a.rgba)(i.color.base,.08),d))}function d(e,t,r,n){var i=f(e,t,r,{theme:n.theme}),a=i.bgColorActive,s=i.shadowColor;return(0,o.css)(["z-index:2;transform:none;background-color:",";",""],a,s&&(0,o.css)(["box-shadow:inset 0 1px 2px 0 ",";"],s))}function c(e,t,r,n){var i=f(e,t,r,{theme:n.theme}).bgColorHover;return(0,o.css)(["background-color:",";"],i)}function f(e,t,r,n){var o=n.theme;switch(t){case"raised":switch(r){case"light":return{textColor:e,bgColor:(0,i.tint)(1,e),bgColorHover:(0,i.tint)(.96,e),bgColorActive:(0,i.tint)(.92,e),shadowColor:(0,a.rgba)(o.color.base,.16)};case"semidark":return{textColor:e,bgColor:(0,i.tint)(.88,e),bgColorHover:(0,i.tint)(.84,e),bgColorActive:(0,i.tint)(.8,e),shadowColor:(0,a.rgba)(o.color.base,.16)};case"dark":return{textColor:(0,i.tint)(1,e),bgColor:e,bgColorHover:(0,i.shade)(.08,e),bgColorActive:(0,i.shade)(.12,e),shadowColor:(0,a.rgba)(o.color.base,.24)};default:console.error("Invalid brightness property for button raised")}break;case"glass":return{textColor:e,bgColor:(0,a.rgba)(e,.16),bgColorHover:(0,a.rgba)(e,.24),bgColorActive:(0,a.rgba)(e,.32)};case"plain":return{textColor:e,bgColor:(0,a.rgba)(e,0),bgColorHover:(0,a.rgba)(e,.08),bgColorActive:(0,a.rgba)(e,.16)};default:console.error("Invalid style property for button")}return{}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"buttonVariation",{enumerable:!0,get:function(){return o.buttonVariation}}),Object.defineProperty(t,"buttonVariationHoverCss",{enumerable:!0,get:function(){return o.buttonVariationHoverCss}}),Object.defineProperty(t,"buttonVariationBaseCss",{enumerable:!0,get:function(){return o.buttonVariationBaseCss}}),Object.defineProperty(t,"buttonVariationActiveCss",{enumerable:!0,get:function(){return o.buttonVariationActiveCss}}),Object.defineProperty(t,"ButtonGroup",{enumerable:!0,get:function(){return i.default}});var n=a(r(2)),o=r(4),i=a(r(9));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=n},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=l(r(3)),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r(0)),a=l(r(2)),s=r(1);function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function l(e){return e&&e.__esModule?e:{default:e}}var d=i.default.div.withConfig({displayName:"ButtonGroup",componentId:"tfq0db-0"})(["position:relative;display:inline-flex;> ","{display:block;position:relative;margin:0;z-index:2;}",""],a.default,(function(e){return"horizontal"===(t=e.orientation)?(0,i.css)(["flex-flow:row nowrap;> ",":first-child:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0;clip-path:inset(-100% 0 -100% -100%);}> ",":last-child:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0;clip-path:inset(-100% -100% -100% 0);}> ",":not(:first-child):not(:last-child){border-radius:0;clip-path:inset(-100% 0);}> "," + ","{margin-left:-",";}"],a.default,a.default,a.default,a.default,a.default,(0,s.themeVal)("layout.border")):"vertical"===t?(0,i.css)(["flex-flow:column;> ",":first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0;clip-path:inset(-100% -100% 0 -100%);}> ",":last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;clip-path:inset(0 -100% -100% -100%);}> ",":not(:first-child):not(:last-child){border-radius:0;clip-path:inset(0 -100%);}> "," + ","{margin-top:-",";}"],a.default,a.default,a.default,a.default,a.default,(0,s.themeVal)("layout.border")):void 0;var t}));d.propTypes={children:o.default.node,orientation:o.default.string};var c=d;t.default=c}])}));
{
"name": "@devseed-ui/button",
"version": "3.0.3",
"version": "3.1.0",
"description": "devseed UI Kit Button",

@@ -29,4 +29,4 @@ "browser": "./dist/index.web.js",

"@devseed-ui/theme-provider": "^3.0.0",
"@devseed-ui/collecticons": "3.1.0"
"@devseed-ui/collecticons": "3.2.0"
}
}

@@ -9,2 +9,3 @@ import React from 'react';

import { DevseedUiThemeProvider, themeVal } from '@devseed-ui/theme-provider';
import { CollecticonsGlobalStyle } from '@devseed-ui/collecticons';

@@ -20,10 +21,4 @@ import { Button, ButtonGroup } from '.';

padding: 0 !important;
> li {
margin-bottom: 1rem;
}
> li:last-child {
margin-bottom: 0;
}
display: grid;
grid-gap: 1rem;
`;

@@ -67,2 +62,3 @@

<DevseedUiThemeProvider>
<CollecticonsGlobalStyle />
<Button

@@ -109,2 +105,3 @@ variation={select(

<DevseedUiThemeProvider>
<CollecticonsGlobalStyle />
<React.Fragment>

@@ -137,2 +134,15 @@ <h2>Button Group</h2>

<h2>Buttons</h2>
<h2>Icon Buttons</h2>
{['small', 'medium', 'large', 'xlarge'].map(s => (
<Button
key={s}
size={s}
hideText
useIcon="brand-development-seed-2"
variation="primary-raised-dark"
>
{s}
</Button>
))}
<p>

@@ -139,0 +149,0 @@ Any button can be visually disabled using the{' '}

@@ -348,3 +348,3 @@ import { css } from 'styled-components';

font-size: 0.875rem;
padding: 0.125rem 0.25rem;
padding: 0.125rem 0.5rem;
min-width: 1.5rem;

@@ -356,3 +356,3 @@ `;

font-size: 1rem;
padding: 0.5rem 1.25rem;
padding: 0.5rem 1rem;
min-width: 2.5rem;

@@ -364,3 +364,3 @@ `;

font-size: 1rem;
padding: 0.5rem 1.5rem;
padding: 0.5rem 1.25rem;
min-width: 3rem;

@@ -367,0 +367,0 @@ `;

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