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

@bdt-component-library/button-icon

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bdt-component-library/button-icon - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

90

build/index.es.js
import React__default__default, { createElement } from 'react';
function styleInject(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;
if (!css || typeof document === 'undefined') { return; }
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (insertAt === 'top') {
if (head.firstChild) {
head.insertBefore(style, head.firstChild);
} else {
head.appendChild(style);
}
} else {
head.appendChild(style);
}
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
}
var css_248z = ".bui-22VB-3{min-width:0!important}.bui-22VB-3 span{top:0}.bui-22VB-3 svg{margin:0;padding:0;max-height:none}.bui-1r9-2B{height:32px;width:32px}.bui-1r9-2B svg{height:16px;width:16px}.bui-3pn5-j{height:48px;width:48px}.bui-3pn5-j svg{height:20px;width:20px}.bui-EpTbPq{height:72px;width:72px}.bui-EpTbPq svg{height:32px;width:32px}.bui-2IAIC4{border-radius:9999px}";
var Styles = {"button-icon":"bui-22VB-3","small":"bui-1r9-2B","medium":"bui-3pn5-j","large":"bui-EpTbPq","circle":"bui-2IAIC4"};
styleInject(css_248z);
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -113,3 +82,3 @@ var IconLoading = (({

function styleInject$1(css, ref) {
function styleInject(css, ref) {
if ( ref === void 0 ) ref = {};

@@ -141,5 +110,5 @@ var insertAt = ref.insertAt;

var css_248z$1 = ".bui-3dNhx6{display:-webkit-box;display:-ms-flexbox;display:flex;flex-direction:column;align-items:center;justify-content:center;vertical-align:middle;padding-left:1rem;padding-right:1rem;border-radius:.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-duration:.2s;font-weight:600;border-style:none;cursor:pointer;min-width:100px;height:48px;line-height:1;transition-property:background-color,color}.bui-3dNhx6:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:var(--input-box-shadow)}.bui-3dNhx6:disabled{opacity:.5;cursor:not-allowed}.bui-3dNhx6>span{display:-webkit-box;display:-ms-flexbox;display:flex;align-items:center;justify-content:center}.bui-3dNhx6 svg{max-height:14px}.bui-Y4eDv4{padding-left:.5rem;padding-right:.5rem;min-width:45px;height:32px;font-size:var(--small-font-size)}.bui-2VKVnE{width:100%}.bui-3uTYGz{--bg-opacity:1;background-color:#2071bd;background-color:rgba(32,113,189,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-3uTYGz:hover{--bg-opacity:1;background-color:#1b4c8d;background-color:rgba(27,76,141,var(--bg-opacity))}.bui-3uTYGz:active{--bg-opacity:1;background-color:#152e5f;background-color:rgba(21,46,95,var(--bg-opacity))}.bui-22JAL4{--border-opacity:1;border:1px solid #2071bd;border-color:rgba(32,113,189,var(--border-opacity));--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));--text-opacity:1;color:#2071bd;color:rgba(32,113,189,var(--text-opacity))}.bui-22JAL4:hover{--bg-opacity:1;background-color:#edf5fc;background-color:rgba(237,245,252,var(--bg-opacity))}.bui-22JAL4:active{--bg-opacity:1;background-color:#d8ecfa;background-color:rgba(216,236,250,var(--bg-opacity))}.bui-2BW6xV{--bg-opacity:1;background-color:#152e5f;background-color:rgba(21,46,95,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-2BW6xV:hover{--bg-opacity:1;background-color:#1b4c8d;background-color:rgba(27,76,141,var(--bg-opacity))}.bui-2BW6xV:active{--bg-opacity:1;background-color:#2071bd;background-color:rgba(32,113,189,var(--bg-opacity))}.bui-3yRoA0{--bg-opacity:1;background-color:#c53030;background-color:rgba(197,48,48,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-3yRoA0:hover{--bg-opacity:1;background-color:#e53e3e;background-color:rgba(229,62,62,var(--bg-opacity))}.bui-3yRoA0:active{--bg-opacity:1;background-color:#882b2b;background-color:rgba(136,43,43,var(--bg-opacity))}.bui-2ltE3M{background-color:transparent;--text-opacity:1;color:#2071bd;color:rgba(32,113,189,var(--text-opacity))}.bui-2ltE3M:hover{--text-opacity:1;color:#1a202c;color:rgba(26,32,44,var(--text-opacity))}.bui-2ltE3M:active{--bg-opacity:1;background-color:#d8ecfa;background-color:rgba(216,236,250,var(--bg-opacity))}.bui-2DmQrY{margin:0;width:22px}.bui-ed_5rJ{margin-right:.5rem}.bui-1U4f7B{margin-left:.5rem}.bui-1U4f7B svg,.bui-ed_5rJ svg{height:14px;width:14px}";
var Styles$1 = {"button":"bui-3dNhx6","compact":"bui-Y4eDv4","fullWidth":"bui-2VKVnE","solid":"bui-3uTYGz","outlined":"bui-22JAL4","inverted":"bui-2BW6xV","destructive":"bui-3yRoA0","text":"bui-2ltE3M","loadingIcon":"bui-2DmQrY","leadingIcon":"bui-ed_5rJ","trailingIcon":"bui-1U4f7B"};
styleInject$1(css_248z$1);
var css_248z = ".bui-3dNhx6{display:-webkit-box;display:-ms-flexbox;display:flex;flex-direction:column;align-items:center;justify-content:center;vertical-align:middle;padding-left:1rem;padding-right:1rem;border-radius:.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-duration:.2s;font-weight:600;border-style:none;cursor:pointer;min-width:100px;height:48px;line-height:1;transition-property:background-color,color}.bui-3dNhx6:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:var(--input-box-shadow)}.bui-3dNhx6:disabled{opacity:.5;cursor:not-allowed}.bui-3dNhx6>span{display:-webkit-box;display:-ms-flexbox;display:flex;align-items:center;justify-content:center}.bui-3dNhx6 svg{max-height:14px}.bui-Y4eDv4{padding-left:.5rem;padding-right:.5rem;min-width:45px;height:32px;font-size:var(--small-font-size)}.bui-2VKVnE{width:100%}.bui-3uTYGz{--bg-opacity:1;background-color:#2071bd;background-color:rgba(32,113,189,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-3uTYGz:hover{--bg-opacity:1;background-color:#1b4c8d;background-color:rgba(27,76,141,var(--bg-opacity))}.bui-3uTYGz:active{--bg-opacity:1;background-color:#152e5f;background-color:rgba(21,46,95,var(--bg-opacity))}.bui-22JAL4{--border-opacity:1;border:1px solid #2071bd;border-color:rgba(32,113,189,var(--border-opacity));--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));--text-opacity:1;color:#2071bd;color:rgba(32,113,189,var(--text-opacity))}.bui-22JAL4:hover{--bg-opacity:1;background-color:#edf5fc;background-color:rgba(237,245,252,var(--bg-opacity))}.bui-22JAL4:active{--bg-opacity:1;background-color:#d8ecfa;background-color:rgba(216,236,250,var(--bg-opacity))}.bui-2BW6xV{--bg-opacity:1;background-color:#152e5f;background-color:rgba(21,46,95,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-2BW6xV:hover{--bg-opacity:1;background-color:#1b4c8d;background-color:rgba(27,76,141,var(--bg-opacity))}.bui-2BW6xV:active{--bg-opacity:1;background-color:#2071bd;background-color:rgba(32,113,189,var(--bg-opacity))}.bui-3yRoA0{--bg-opacity:1;background-color:#c53030;background-color:rgba(197,48,48,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-3yRoA0:hover{--bg-opacity:1;background-color:#e53e3e;background-color:rgba(229,62,62,var(--bg-opacity))}.bui-3yRoA0:active{--bg-opacity:1;background-color:#882b2b;background-color:rgba(136,43,43,var(--bg-opacity))}.bui-2ltE3M{background-color:transparent;--text-opacity:1;color:#2071bd;color:rgba(32,113,189,var(--text-opacity))}.bui-2ltE3M:hover{--text-opacity:1;color:#1a202c;color:rgba(26,32,44,var(--text-opacity))}.bui-2ltE3M:active{--bg-opacity:1;background-color:#d8ecfa;background-color:rgba(216,236,250,var(--bg-opacity))}.bui-2DmQrY{margin:0;width:22px}.bui-ed_5rJ{margin-right:.5rem}.bui-1U4f7B{margin-left:.5rem}.bui-1U4f7B svg,.bui-ed_5rJ svg{height:14px;width:14px}.bui-Y4eDv4 .bui-1U4f7B svg,.bui-Y4eDv4 .bui-ed_5rJ svg{height:12px;width:12px}";
var Styles = {"button":"bui-3dNhx6","compact":"bui-Y4eDv4","fullWidth":"bui-2VKVnE","solid":"bui-3uTYGz","outlined":"bui-22JAL4","inverted":"bui-2BW6xV","destructive":"bui-3yRoA0","text":"bui-2ltE3M","loadingIcon":"bui-2DmQrY","leadingIcon":"bui-ed_5rJ","trailingIcon":"bui-1U4f7B"};
styleInject(css_248z);

@@ -150,15 +119,46 @@ const classNames = require("classnames");

return (createElement("button", { id: id, className: classNames({
[Styles$1.button]: true,
[Styles$1[variant]]: true,
[Styles$1.compact]: compact,
[Styles$1.fullWidth]: fullWidth,
[Styles.button]: true,
[Styles[variant]]: true,
[Styles.compact]: compact,
[Styles.fullWidth]: fullWidth,
[className]: className
}), disabled: loading === true ? true : disabled, "aria-label": ariaLabel, onClick: onClick, onBlur: onBlur, ref: inputRef, type: type },
createElement("span", { className: loading ? "block invisible h-0" : "" },
inlineIcon && iconPosition === "leading" && (createElement("span", { className: Styles$1.leadingIcon }, inlineIcon)),
inlineIcon && iconPosition === "leading" && (createElement("span", { className: Styles.leadingIcon }, inlineIcon)),
children,
inlineIcon && iconPosition === "trailing" && (createElement("span", { className: Styles$1.trailingIcon }, inlineIcon))),
loading && createElement(IconLoading, { className: Styles$1.loadingIcon, is: "svg" })));
inlineIcon && iconPosition === "trailing" && (createElement("span", { className: Styles.trailingIcon }, inlineIcon))),
loading && createElement(IconLoading, { className: Styles.loadingIcon, is: "svg" })));
};
function styleInject$1(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;
if (!css || typeof document === 'undefined') { return; }
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (insertAt === 'top') {
if (head.firstChild) {
head.insertBefore(style, head.firstChild);
} else {
head.appendChild(style);
}
} else {
head.appendChild(style);
}
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
}
var css_248z$1 = ".bui-22VB-3{min-width:0!important}.bui-22VB-3 span{top:0}.bui-22VB-3 svg{margin:0;padding:0;max-height:none}.bui-1r9-2B{height:32px;width:32px}.bui-1r9-2B svg{height:16px;width:16px}.bui-3pn5-j{height:48px;width:48px}.bui-3pn5-j svg{height:20px;width:20px}.bui-EpTbPq{height:72px;width:72px}.bui-EpTbPq svg{height:32px;width:32px}.bui-2IAIC4{border-radius:9999px}";
var Styles$1 = {"button-icon":"bui-22VB-3","small":"bui-1r9-2B","medium":"bui-3pn5-j","large":"bui-EpTbPq","circle":"bui-2IAIC4"};
styleInject$1(css_248z$1);
const classNames$1 = require("classnames");

@@ -168,5 +168,5 @@ const ButtonIcon = props => {

return (createElement(Button, { variant: variant, className: classNames$1({
[Styles["button-icon"]]: true,
[Styles[size]]: true,
[Styles[shape]]: true,
[Styles$1["button-icon"]]: true,
[Styles$1[size]]: true,
[Styles$1[shape]]: true,
[className]: className

@@ -173,0 +173,0 @@ }), disabled: disabled, ariaLabel: label, onClick: onClick, loading: loading }, icon));

@@ -10,33 +10,2 @@ 'use strict';

function styleInject(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;
if (!css || typeof document === 'undefined') { return; }
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (insertAt === 'top') {
if (head.firstChild) {
head.insertBefore(style, head.firstChild);
} else {
head.appendChild(style);
}
} else {
head.appendChild(style);
}
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
}
var css_248z = ".bui-22VB-3{min-width:0!important}.bui-22VB-3 span{top:0}.bui-22VB-3 svg{margin:0;padding:0;max-height:none}.bui-1r9-2B{height:32px;width:32px}.bui-1r9-2B svg{height:16px;width:16px}.bui-3pn5-j{height:48px;width:48px}.bui-3pn5-j svg{height:20px;width:20px}.bui-EpTbPq{height:72px;width:72px}.bui-EpTbPq svg{height:32px;width:32px}.bui-2IAIC4{border-radius:9999px}";
var Styles = {"button-icon":"bui-22VB-3","small":"bui-1r9-2B","medium":"bui-3pn5-j","large":"bui-EpTbPq","circle":"bui-2IAIC4"};
styleInject(css_248z);
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -121,3 +90,3 @@ var IconLoading = (({

function styleInject$1(css, ref) {
function styleInject(css, ref) {
if ( ref === void 0 ) ref = {};

@@ -149,5 +118,5 @@ var insertAt = ref.insertAt;

var css_248z$1 = ".bui-3dNhx6{display:-webkit-box;display:-ms-flexbox;display:flex;flex-direction:column;align-items:center;justify-content:center;vertical-align:middle;padding-left:1rem;padding-right:1rem;border-radius:.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-duration:.2s;font-weight:600;border-style:none;cursor:pointer;min-width:100px;height:48px;line-height:1;transition-property:background-color,color}.bui-3dNhx6:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:var(--input-box-shadow)}.bui-3dNhx6:disabled{opacity:.5;cursor:not-allowed}.bui-3dNhx6>span{display:-webkit-box;display:-ms-flexbox;display:flex;align-items:center;justify-content:center}.bui-3dNhx6 svg{max-height:14px}.bui-Y4eDv4{padding-left:.5rem;padding-right:.5rem;min-width:45px;height:32px;font-size:var(--small-font-size)}.bui-2VKVnE{width:100%}.bui-3uTYGz{--bg-opacity:1;background-color:#2071bd;background-color:rgba(32,113,189,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-3uTYGz:hover{--bg-opacity:1;background-color:#1b4c8d;background-color:rgba(27,76,141,var(--bg-opacity))}.bui-3uTYGz:active{--bg-opacity:1;background-color:#152e5f;background-color:rgba(21,46,95,var(--bg-opacity))}.bui-22JAL4{--border-opacity:1;border:1px solid #2071bd;border-color:rgba(32,113,189,var(--border-opacity));--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));--text-opacity:1;color:#2071bd;color:rgba(32,113,189,var(--text-opacity))}.bui-22JAL4:hover{--bg-opacity:1;background-color:#edf5fc;background-color:rgba(237,245,252,var(--bg-opacity))}.bui-22JAL4:active{--bg-opacity:1;background-color:#d8ecfa;background-color:rgba(216,236,250,var(--bg-opacity))}.bui-2BW6xV{--bg-opacity:1;background-color:#152e5f;background-color:rgba(21,46,95,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-2BW6xV:hover{--bg-opacity:1;background-color:#1b4c8d;background-color:rgba(27,76,141,var(--bg-opacity))}.bui-2BW6xV:active{--bg-opacity:1;background-color:#2071bd;background-color:rgba(32,113,189,var(--bg-opacity))}.bui-3yRoA0{--bg-opacity:1;background-color:#c53030;background-color:rgba(197,48,48,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-3yRoA0:hover{--bg-opacity:1;background-color:#e53e3e;background-color:rgba(229,62,62,var(--bg-opacity))}.bui-3yRoA0:active{--bg-opacity:1;background-color:#882b2b;background-color:rgba(136,43,43,var(--bg-opacity))}.bui-2ltE3M{background-color:transparent;--text-opacity:1;color:#2071bd;color:rgba(32,113,189,var(--text-opacity))}.bui-2ltE3M:hover{--text-opacity:1;color:#1a202c;color:rgba(26,32,44,var(--text-opacity))}.bui-2ltE3M:active{--bg-opacity:1;background-color:#d8ecfa;background-color:rgba(216,236,250,var(--bg-opacity))}.bui-2DmQrY{margin:0;width:22px}.bui-ed_5rJ{margin-right:.5rem}.bui-1U4f7B{margin-left:.5rem}.bui-1U4f7B svg,.bui-ed_5rJ svg{height:14px;width:14px}";
var Styles$1 = {"button":"bui-3dNhx6","compact":"bui-Y4eDv4","fullWidth":"bui-2VKVnE","solid":"bui-3uTYGz","outlined":"bui-22JAL4","inverted":"bui-2BW6xV","destructive":"bui-3yRoA0","text":"bui-2ltE3M","loadingIcon":"bui-2DmQrY","leadingIcon":"bui-ed_5rJ","trailingIcon":"bui-1U4f7B"};
styleInject$1(css_248z$1);
var css_248z = ".bui-3dNhx6{display:-webkit-box;display:-ms-flexbox;display:flex;flex-direction:column;align-items:center;justify-content:center;vertical-align:middle;padding-left:1rem;padding-right:1rem;border-radius:.25rem;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform;transition-duration:.2s;font-weight:600;border-style:none;cursor:pointer;min-width:100px;height:48px;line-height:1;transition-property:background-color,color}.bui-3dNhx6:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:var(--input-box-shadow)}.bui-3dNhx6:disabled{opacity:.5;cursor:not-allowed}.bui-3dNhx6>span{display:-webkit-box;display:-ms-flexbox;display:flex;align-items:center;justify-content:center}.bui-3dNhx6 svg{max-height:14px}.bui-Y4eDv4{padding-left:.5rem;padding-right:.5rem;min-width:45px;height:32px;font-size:var(--small-font-size)}.bui-2VKVnE{width:100%}.bui-3uTYGz{--bg-opacity:1;background-color:#2071bd;background-color:rgba(32,113,189,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-3uTYGz:hover{--bg-opacity:1;background-color:#1b4c8d;background-color:rgba(27,76,141,var(--bg-opacity))}.bui-3uTYGz:active{--bg-opacity:1;background-color:#152e5f;background-color:rgba(21,46,95,var(--bg-opacity))}.bui-22JAL4{--border-opacity:1;border:1px solid #2071bd;border-color:rgba(32,113,189,var(--border-opacity));--bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--bg-opacity));--text-opacity:1;color:#2071bd;color:rgba(32,113,189,var(--text-opacity))}.bui-22JAL4:hover{--bg-opacity:1;background-color:#edf5fc;background-color:rgba(237,245,252,var(--bg-opacity))}.bui-22JAL4:active{--bg-opacity:1;background-color:#d8ecfa;background-color:rgba(216,236,250,var(--bg-opacity))}.bui-2BW6xV{--bg-opacity:1;background-color:#152e5f;background-color:rgba(21,46,95,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-2BW6xV:hover{--bg-opacity:1;background-color:#1b4c8d;background-color:rgba(27,76,141,var(--bg-opacity))}.bui-2BW6xV:active{--bg-opacity:1;background-color:#2071bd;background-color:rgba(32,113,189,var(--bg-opacity))}.bui-3yRoA0{--bg-opacity:1;background-color:#c53030;background-color:rgba(197,48,48,var(--bg-opacity));--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.bui-3yRoA0:hover{--bg-opacity:1;background-color:#e53e3e;background-color:rgba(229,62,62,var(--bg-opacity))}.bui-3yRoA0:active{--bg-opacity:1;background-color:#882b2b;background-color:rgba(136,43,43,var(--bg-opacity))}.bui-2ltE3M{background-color:transparent;--text-opacity:1;color:#2071bd;color:rgba(32,113,189,var(--text-opacity))}.bui-2ltE3M:hover{--text-opacity:1;color:#1a202c;color:rgba(26,32,44,var(--text-opacity))}.bui-2ltE3M:active{--bg-opacity:1;background-color:#d8ecfa;background-color:rgba(216,236,250,var(--bg-opacity))}.bui-2DmQrY{margin:0;width:22px}.bui-ed_5rJ{margin-right:.5rem}.bui-1U4f7B{margin-left:.5rem}.bui-1U4f7B svg,.bui-ed_5rJ svg{height:14px;width:14px}.bui-Y4eDv4 .bui-1U4f7B svg,.bui-Y4eDv4 .bui-ed_5rJ svg{height:12px;width:12px}";
var Styles = {"button":"bui-3dNhx6","compact":"bui-Y4eDv4","fullWidth":"bui-2VKVnE","solid":"bui-3uTYGz","outlined":"bui-22JAL4","inverted":"bui-2BW6xV","destructive":"bui-3yRoA0","text":"bui-2ltE3M","loadingIcon":"bui-2DmQrY","leadingIcon":"bui-ed_5rJ","trailingIcon":"bui-1U4f7B"};
styleInject(css_248z);

@@ -158,15 +127,46 @@ const classNames = require("classnames");

return (React__default.createElement("button", { id: id, className: classNames({
[Styles$1.button]: true,
[Styles$1[variant]]: true,
[Styles$1.compact]: compact,
[Styles$1.fullWidth]: fullWidth,
[Styles.button]: true,
[Styles[variant]]: true,
[Styles.compact]: compact,
[Styles.fullWidth]: fullWidth,
[className]: className
}), disabled: loading === true ? true : disabled, "aria-label": ariaLabel, onClick: onClick, onBlur: onBlur, ref: inputRef, type: type },
React__default.createElement("span", { className: loading ? "block invisible h-0" : "" },
inlineIcon && iconPosition === "leading" && (React__default.createElement("span", { className: Styles$1.leadingIcon }, inlineIcon)),
inlineIcon && iconPosition === "leading" && (React__default.createElement("span", { className: Styles.leadingIcon }, inlineIcon)),
children,
inlineIcon && iconPosition === "trailing" && (React__default.createElement("span", { className: Styles$1.trailingIcon }, inlineIcon))),
loading && React__default.createElement(IconLoading, { className: Styles$1.loadingIcon, is: "svg" })));
inlineIcon && iconPosition === "trailing" && (React__default.createElement("span", { className: Styles.trailingIcon }, inlineIcon))),
loading && React__default.createElement(IconLoading, { className: Styles.loadingIcon, is: "svg" })));
};
function styleInject$1(css, ref) {
if ( ref === void 0 ) ref = {};
var insertAt = ref.insertAt;
if (!css || typeof document === 'undefined') { return; }
var head = document.head || document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = 'text/css';
if (insertAt === 'top') {
if (head.firstChild) {
head.insertBefore(style, head.firstChild);
} else {
head.appendChild(style);
}
} else {
head.appendChild(style);
}
if (style.styleSheet) {
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
}
var css_248z$1 = ".bui-22VB-3{min-width:0!important}.bui-22VB-3 span{top:0}.bui-22VB-3 svg{margin:0;padding:0;max-height:none}.bui-1r9-2B{height:32px;width:32px}.bui-1r9-2B svg{height:16px;width:16px}.bui-3pn5-j{height:48px;width:48px}.bui-3pn5-j svg{height:20px;width:20px}.bui-EpTbPq{height:72px;width:72px}.bui-EpTbPq svg{height:32px;width:32px}.bui-2IAIC4{border-radius:9999px}";
var Styles$1 = {"button-icon":"bui-22VB-3","small":"bui-1r9-2B","medium":"bui-3pn5-j","large":"bui-EpTbPq","circle":"bui-2IAIC4"};
styleInject$1(css_248z$1);
const classNames$1 = require("classnames");

@@ -176,5 +176,5 @@ const ButtonIcon = props => {

return (React__default.createElement(Button, { variant: variant, className: classNames$1({
[Styles["button-icon"]]: true,
[Styles[size]]: true,
[Styles[shape]]: true,
[Styles$1["button-icon"]]: true,
[Styles$1[size]]: true,
[Styles$1[shape]]: true,
[className]: className

@@ -181,0 +181,0 @@ }), disabled: disabled, ariaLabel: label, onClick: onClick, loading: loading }, icon));

@@ -5,2 +5,14 @@ {

{
"version": "0.1.3",
"tag": "@bdt-component-library/button-icon_v0.1.3",
"date": "Thu, 04 Mar 2021 18:19:09 GMT",
"comments": {
"patch": [
{
"comment": "Update dependency"
}
]
}
},
{
"version": "0.1.2",

@@ -7,0 +19,0 @@ "tag": "@bdt-component-library/button-icon_v0.1.2",

# Change Log - @bdt-component-library/button-icon
This log was last generated on Tue, 23 Feb 2021 20:14:08 GMT and should not be manually modified.
This log was last generated on Thu, 04 Mar 2021 18:19:09 GMT and should not be manually modified.
## 0.1.3
Thu, 04 Mar 2021 18:19:09 GMT
### Patches
- Update dependency
## 0.1.2

@@ -6,0 +13,0 @@ Tue, 23 Feb 2021 20:14:08 GMT

@@ -6,3 +6,3 @@ {

},
"version": "0.1.2",
"version": "0.1.3",
"description": "ButtonIcon component",

@@ -105,3 +105,3 @@ "author": "BDT",

"dependencies": {
"@bdt-component-library/button": "^0.1.3",
"@bdt-component-library/button": "^0.1.4",
"react-number-format": "^4.4.1",

@@ -108,0 +108,0 @@ "classnames": "^2.2.6"

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