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

@brighthr/component-button

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brighthr/component-button - npm Package Compare versions

Comparing version 1.3.3 to 1.3.4

2

dist/index.modern.js

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

import*as e from"react";import r from"@brighthr/component-spinner";import t from"classnames";function a(){return a=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},a.apply(this,arguments)}const n=["text","id","type","size","outlineButton","isLoading","color"];function o(o){let{text:i="",id:s,type:l="button",size:c="base",outlineButton:b=!1,isLoading:d=!1,color:m="accent"}=o,u=function(e,r){if(null==e)return{};var t,a,n={},o=Object.keys(e);for(a=0;a<o.length;a++)r.indexOf(t=o[a])>=0||(n[t]=e[t]);return n}(o,n);const p=()=>t("rounded font-bold transition-colors cursor-pointer disabled:cursor-default",{"px-[9px] py-[5px] text-xs":"xs"===c},{"px-[11px] py-[7px] text-sm":"sm"===c},{"px-[15px] py-[7px] text-sm ":"base"===c},{"px-[15px] py-[7px] text-base":"lg"===c},{"px-[23px] py-[11px] text-base ":"xl"===c}," "+(b?"bg-white border-2 hover:text-white disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":"text-white border-2 focus:outline focus:outline-2 focus:outline-offset-2 disabled:border-neutral-300 disabled:bg-neutral-300"),{"text-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":b&&"accent"===m},{"text-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":b&&"primary"===m},{"bg-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 focus:outline-accent-500 focus:hover:outline-accent-700 disabled:border-neutral-300 disabled:bg-neutral-300":!b&&"accent"===m},{"bg-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 focus:outline-primary-700 focus:hover:outline-primary-600 disabled:border-neutral-300 disabled:bg-neutral-300":!b&&"primary"===m});return"submit"===l?e.createElement("button",a({id:s,type:"submit",className:p()},u),e.createElement("span",{className:"flex items-center justify-center"},d&&e.createElement(r,{ariaLabel:"Is loading",className:t("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!i}),size:"base"}),i)):e.createElement("button",a({id:s,type:"button",className:p()},u),e.createElement("span",{className:"flex items-center justify-center"},d&&e.createElement(r,{ariaLabel:"Is loading",className:t("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!i}),size:"base"}),i))}export{o as default};
import*as e from"react";import r from"@brighthr/component-spinner";import t from"classnames";function a(){return a=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},a.apply(this,arguments)}const o=["text","id","type","size","outlineButton","isLoading","color"];function n(n){let{text:i="",id:s,type:l="button",size:b="base",outlineButton:c=!1,isLoading:d=!1,color:u="accent"}=n,m=function(e,r){if(null==e)return{};var t,a,o={},n=Object.keys(e);for(a=0;a<n.length;a++)r.indexOf(t=n[a])>=0||(o[t]=e[t]);return o}(n,o);const p=()=>t("rounded font-bold flex items-center justify-center transition-colors cursor-pointer disabled:cursor-default",{"px-[9px] py-[5px] text-xs":"xs"===b},{"px-[11px] py-[7px] text-sm":"sm"===b},{"px-[15px] py-[7px] text-sm ":"base"===b},{"px-[15px] py-[7px] text-base":"lg"===b},{"px-[23px] py-[11px] text-base ":"xl"===b}," "+(c?"bg-white border-2 hover:text-white disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":"text-white border-2 focus:outline focus:outline-2 focus:outline-offset-2 disabled:border-neutral-300 disabled:bg-neutral-300"),{"text-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":c&&"accent"===u},{"text-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":c&&"primary"===u},{"bg-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 focus:outline-accent-500 focus:hover:outline-accent-700 disabled:border-neutral-300 disabled:bg-neutral-300":!c&&"accent"===u},{"bg-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 focus:outline-primary-700 focus:hover:outline-primary-600 disabled:border-neutral-300 disabled:bg-neutral-300":!c&&"primary"===u});return"submit"===l?e.createElement("button",a({id:s,type:"submit",className:p()},m),d&&e.createElement(r,{ariaLabel:"Is loading",className:t("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!i}),size:"base"}),i):e.createElement("button",a({id:s,type:"button",className:p()},m),d&&e.createElement(r,{ariaLabel:"Is loading",className:t("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!i}),size:"base"}),i)}export{n as default};
//# sourceMappingURL=index.modern.js.map

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

import*as e from"react";import r from"@brighthr/component-spinner";import t from"classnames";function a(){return a=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},a.apply(this,arguments)}var o=["text","id","type","size","outlineButton","isLoading","color"];function i(i){var n=i.text,s=void 0===n?"":n,l=i.id,d=void 0===l?void 0:l,c=i.type,b=void 0===c?"button":c,u=i.size,m=void 0===u?"base":u,p=i.outlineButton,x=void 0!==p&&p,f=i.isLoading,y=void 0!==f&&f,h=i.color,v=void 0===h?"accent":h,g=function(e,r){if(null==e)return{};var t,a,o={},i=Object.keys(e);for(a=0;a<i.length;a++)r.indexOf(t=i[a])>=0||(o[t]=e[t]);return o}(i,o),w=function(){return t("rounded font-bold transition-colors cursor-pointer disabled:cursor-default",{"px-[9px] py-[5px] text-xs":"xs"===m},{"px-[11px] py-[7px] text-sm":"sm"===m},{"px-[15px] py-[7px] text-sm ":"base"===m},{"px-[15px] py-[7px] text-base":"lg"===m},{"px-[23px] py-[11px] text-base ":"xl"===m}," "+(x?"bg-white border-2 hover:text-white disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":"text-white border-2 focus:outline focus:outline-2 focus:outline-offset-2 disabled:border-neutral-300 disabled:bg-neutral-300"),{"text-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":x&&"accent"===v},{"text-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":x&&"primary"===v},{"bg-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 focus:outline-accent-500 focus:hover:outline-accent-700 disabled:border-neutral-300 disabled:bg-neutral-300":!x&&"accent"===v},{"bg-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 focus:outline-primary-700 focus:hover:outline-primary-600 disabled:border-neutral-300 disabled:bg-neutral-300":!x&&"primary"===v})};return"submit"===b?e.createElement("button",a({id:d,type:"submit",className:w()},g),e.createElement("span",{className:"flex items-center justify-center"},y&&e.createElement(r,{ariaLabel:"Is loading",className:t("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!s}),size:"base"}),s)):e.createElement("button",a({id:d,type:"button",className:w()},g),e.createElement("span",{className:"flex items-center justify-center"},y&&e.createElement(r,{ariaLabel:"Is loading",className:t("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!s}),size:"base"}),s))}export{i as default};
import*as e from"react";import r from"@brighthr/component-spinner";import t from"classnames";function a(){return a=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},a.apply(this,arguments)}var o=["text","id","type","size","outlineButton","isLoading","color"];function i(i){var n=i.text,s=void 0===n?"":n,d=i.id,l=void 0===d?void 0:d,b=i.type,c=void 0===b?"button":b,u=i.size,m=void 0===u?"base":u,p=i.outlineButton,x=void 0!==p&&p,f=i.isLoading,y=void 0!==f&&f,h=i.color,v=void 0===h?"accent":h,g=function(e,r){if(null==e)return{};var t,a,o={},i=Object.keys(e);for(a=0;a<i.length;a++)r.indexOf(t=i[a])>=0||(o[t]=e[t]);return o}(i,o),w=function(){return t("rounded font-bold flex items-center justify-center transition-colors cursor-pointer disabled:cursor-default",{"px-[9px] py-[5px] text-xs":"xs"===m},{"px-[11px] py-[7px] text-sm":"sm"===m},{"px-[15px] py-[7px] text-sm ":"base"===m},{"px-[15px] py-[7px] text-base":"lg"===m},{"px-[23px] py-[11px] text-base ":"xl"===m}," "+(x?"bg-white border-2 hover:text-white disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":"text-white border-2 focus:outline focus:outline-2 focus:outline-offset-2 disabled:border-neutral-300 disabled:bg-neutral-300"),{"text-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":x&&"accent"===v},{"text-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":x&&"primary"===v},{"bg-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 focus:outline-accent-500 focus:hover:outline-accent-700 disabled:border-neutral-300 disabled:bg-neutral-300":!x&&"accent"===v},{"bg-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 focus:outline-primary-700 focus:hover:outline-primary-600 disabled:border-neutral-300 disabled:bg-neutral-300":!x&&"primary"===v})};return"submit"===c?e.createElement("button",a({id:l,type:"submit",className:w()},g),y&&e.createElement(r,{ariaLabel:"Is loading",className:t("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!s}),size:"base"}),s):e.createElement("button",a({id:l,type:"button",className:w()},g),y&&e.createElement(r,{ariaLabel:"Is loading",className:t("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!s}),size:"base"}),s)}export{i as default};
//# sourceMappingURL=index.module.js.map

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("@brighthr/component-spinner"),require("classnames")):"function"==typeof define&&define.amd?define(["react","@brighthr/component-spinner","classnames"],t):(e||self).componentButton=t(e.react,e.Spinner,e.classnames)}(this,function(e,t,r){function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,t}var o=/*#__PURE__*/a(e),i=/*#__PURE__*/n(t),l=/*#__PURE__*/n(r);function s(){return s=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},s.apply(this,arguments)}var c=["text","id","type","size","outlineButton","isLoading","color"];return function(e){var t=e.text,r=void 0===t?"":t,n=e.id,a=void 0===n?void 0:n,d=e.type,u=void 0===d?"button":d,b=e.size,p=void 0===b?"base":b,m=e.outlineButton,f=void 0!==m&&m,x=e.isLoading,y=void 0!==x&&x,h=e.color,g=void 0===h?"accent":h,v=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(a[r]=e[r]);return a}(e,c),j=function(){return l.default("rounded font-bold transition-colors cursor-pointer disabled:cursor-default",{"px-[9px] py-[5px] text-xs":"xs"===p},{"px-[11px] py-[7px] text-sm":"sm"===p},{"px-[15px] py-[7px] text-sm ":"base"===p},{"px-[15px] py-[7px] text-base":"lg"===p},{"px-[23px] py-[11px] text-base ":"xl"===p}," "+(f?"bg-white border-2 hover:text-white disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":"text-white border-2 focus:outline focus:outline-2 focus:outline-offset-2 disabled:border-neutral-300 disabled:bg-neutral-300"),{"text-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":f&&"accent"===g},{"text-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":f&&"primary"===g},{"bg-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 focus:outline-accent-500 focus:hover:outline-accent-700 disabled:border-neutral-300 disabled:bg-neutral-300":!f&&"accent"===g},{"bg-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 focus:outline-primary-700 focus:hover:outline-primary-600 disabled:border-neutral-300 disabled:bg-neutral-300":!f&&"primary"===g})};return"submit"===u?o.createElement("button",s({id:a,type:"submit",className:j()},v),o.createElement("span",{className:"flex items-center justify-center"},y&&o.createElement(i.default,{ariaLabel:"Is loading",className:l.default("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!r}),size:"base"}),r)):o.createElement("button",s({id:a,type:"button",className:j()},v),o.createElement("span",{className:"flex items-center justify-center"},y&&o.createElement(i.default,{ariaLabel:"Is loading",className:l.default("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!r}),size:"base"}),r))}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("@brighthr/component-spinner"),require("classnames")):"function"==typeof define&&define.amd?define(["react","@brighthr/component-spinner","classnames"],t):(e||self).componentButton=t(e.react,e.Spinner,e.classnames)}(this,function(e,t,r){function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,t}var o=/*#__PURE__*/a(e),i=/*#__PURE__*/n(t),d=/*#__PURE__*/n(r);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},l.apply(this,arguments)}var u=["text","id","type","size","outlineButton","isLoading","color"];return function(e){var t=e.text,r=void 0===t?"":t,n=e.id,a=void 0===n?void 0:n,s=e.type,c=void 0===s?"button":s,b=e.size,p=void 0===b?"base":b,f=e.outlineButton,m=void 0!==f&&f,x=e.isLoading,y=void 0!==x&&x,h=e.color,g=void 0===h?"accent":h,v=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(a[r]=e[r]);return a}(e,u),j=function(){return d.default("rounded font-bold flex items-center justify-center transition-colors cursor-pointer disabled:cursor-default",{"px-[9px] py-[5px] text-xs":"xs"===p},{"px-[11px] py-[7px] text-sm":"sm"===p},{"px-[15px] py-[7px] text-sm ":"base"===p},{"px-[15px] py-[7px] text-base":"lg"===p},{"px-[23px] py-[11px] text-base ":"xl"===p}," "+(m?"bg-white border-2 hover:text-white disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":"text-white border-2 focus:outline focus:outline-2 focus:outline-offset-2 disabled:border-neutral-300 disabled:bg-neutral-300"),{"text-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":m&&"accent"===g},{"text-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 disabled:border-neutral-300 disabled:bg-white disabled:text-neutral-300":m&&"primary"===g},{"bg-accent-500 border-accent-500 hover:border-accent-700 hover:bg-accent-700 focus:outline-accent-500 focus:hover:outline-accent-700 disabled:border-neutral-300 disabled:bg-neutral-300":!m&&"accent"===g},{"bg-primary-700 border-primary-700 hover:border-primary-600 hover:bg-primary-600 focus:outline-primary-700 focus:hover:outline-primary-600 disabled:border-neutral-300 disabled:bg-neutral-300":!m&&"primary"===g})};return"submit"===c?o.createElement("button",l({id:a,type:"submit",className:j()},v),y&&o.createElement(i.default,{ariaLabel:"Is loading",className:d.default("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!r}),size:"base"}),r):o.createElement("button",l({id:a,type:"button",className:j()},v),y&&o.createElement(i.default,{ariaLabel:"Is loading",className:d.default("mr-[0.5rem] max-h-[1rem] max-w-[1rem] stroke-current",{"ml-[0.5rem]":!r}),size:"base"}),r)}});
//# sourceMappingURL=index.umd.js.map
{
"name": "@brighthr/component-button",
"version": "1.3.3",
"version": "1.3.4",
"license": "MIT",

@@ -40,3 +40,3 @@ "type": "module",

},
"gitHead": "ec51e2f616d9caa285b874cbb7a77c3365c6633e"
"gitHead": "a7c75694c9cf496123927f6b6d4ff435488007bb"
}

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

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