New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pikas-ui/button

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pikas-ui/button - npm Package Compare versions

Comparing version 2.1.11 to 2.1.12

2

dist/button/Button.js

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

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _jsxruntime = require('react/jsx-runtime');var _styles = require('@pikas-ui/styles');var _react = require('react');var _loader = require('@pikas-ui/loader');var _utilsjs = require('../utils.js');const A=_styles.styled.call(void 0, "button",{all:"unset",cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",space:2,borderStyle:"solid",position:"relative",whiteSpace:"nowrap",boxSizing:"border-box",variants:{effect:{globalScale:{transition:"transform 250ms ease","&:hover":{transform:"scale(1.025)",transition:"transform 250ms ease"},"&:active":{transform:"scale(0.95)",transition:"transform 250ms ease"}},boxScale:{transition:"transform 250ms ease","&:after":{background:"inherit",content:"",position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:-1,transition:"transform 250ms ease",borderRadius:"inherit"},"&:hover:after":{transform:"scale(1.1)",transition:"transform 250ms"},"&:active":{transform:"scale(0.95)",transition:"transform 250ms ease"}},opacity:{transition:"opacity 500ms","&:hover":{opacity:.8},"&:active":{opacity:1,transition:"opacity 0s"}}},padding:{xs:{padding:"4px 16px"},sm:{padding:"4px 24px"},md:{padding:"8px 32px"},lg:{padding:"16px 40px"},xl:{padding:"16px 48px"}},disabled:{true:{cursor:"not-allowed",opacity:.5}}}}),D=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center",variants:{textTransform:{capitalize:{textTransform:"capitalize"},uppercase:{textTransform:"uppercase"},default:{"div::first-letter":{textTransform:"uppercase"}},none:{}},gap:{sm:{customGap:4},md:{customGap:8},lg:{customGap:16}}}}),F=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,right:0,bottom:0}),E=({LeftIcon:t,RightIcon:a,loading:s,children:n,styles:e,outlined:l,colorHex:i,contentColorHex:p,textTransform:u,gap:f})=>{const d=_styles.useTheme.call(void 0, );return d?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, F,{children:_jsxruntime.jsx.call(void 0, _loader.BeatLoader,{size:d.fontSizes["EM-XX-SMALL"].value,colorHex:_utilsjs.getContentColor.call(void 0, {outlined:l,contentColorHex:p,colorHex:i}),loading:s})}),_jsxruntime.jsxs.call(void 0, D,{textTransform:u,gap:f,css:{opacity:s?0:1},children:[t?_jsxruntime.jsx.call(void 0, t,{size:"1em",colorHex:_utilsjs.getContentColor.call(void 0, {outlined:l,contentColorHex:p,colorHex:i}),styles:_optionalChain([e, 'optionalAccess', _ => _.icon])}):null,_jsxruntime.jsx.call(void 0, "div",{children:n}),a?_jsxruntime.jsx.call(void 0, a,{size:"1em",colorHex:_utilsjs.getContentColor.call(void 0, {outlined:l,contentColorHex:p,colorHex:i}),styles:_optionalChain([e, 'optionalAccess', _2 => _2.icon])}):null]})]}):null},$= exports.Button =_react.forwardRef.call(void 0, ({color:t,colorHex:a,styles:s,loading:n,disabled:e,effect:l,onClick:i,children:p,gap:u,LeftIcon:f,RightIcon:d,outlined:y,width:T,maxWidth:x,minWidth:h,fontSize:g,textTransform:b,fontWeight:B,borderRadius:S,borderWidth:v,boxShadow:C,contentColor:r,contentColorHex:m,...M},R)=>{const o=_styles.useTheme.call(void 0, ),H=_react.useCallback.call(void 0, ()=>{e||n||_optionalChain([i, 'optionalCall', _3 => _3()])},[e,i,n]);return o?_jsxruntime.jsx.call(void 0, A,{ref:R,onClick:H,disabled:e,effect:e?void 0:l,css:{br:S,fontWeight:`$${B}`,borderWidth:v,fontSize:`$${g}`,width:T,maxWidth:x,minWidth:h,boxShadow:C,..._utilsjs.getColors.call(void 0, {outlined:y,colorHex:a||t&&o.colors[t].value,contentColorHex:m||r&&o.colors[r].value}),..._optionalChain([s, 'optionalAccess', _4 => _4.button])},...M,children:E({LeftIcon:f,RightIcon:d,children:p,gap:u,loading:n,outlined:y,styles:s,textTransform:b,colorHex:a||t&&o.colors[t].value,contentColorHex:m||r&&o.colors[r].value})}):null});$.defaultProps={type:"button",disabled:!1,loading:!1,padding:"md",color:"PRIMARY",gap:"md",effect:"opacity",outlined:!1,width:"100%",maxWidth:"100%",fontSize:"EM-MEDIUM",textTransform:"default",fontWeight:"NORMAL",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};const N=_react.forwardRef.call(void 0, ({color:t,colorHex:a,styles:s,loading:n,disabled:e,fontSize:l,effect:i,onClick:p,children:u,gap:f,LeftIcon:d,RightIcon:y,outlined:T,width:x,maxWidth:h,minWidth:g,textTransform:b,fontWeight:B,borderRadius:S,borderWidth:v,boxShadow:C,contentColor:r,contentColorHex:m,...M},R)=>{const o=_styles.useTheme.call(void 0, ),H=_react.useCallback.call(void 0, ()=>{e||n||_optionalChain([p, 'optionalCall', _5 => _5()])},[e,p,n]);return o?_jsxruntime.jsx.call(void 0, A,{as:"a",ref:R,onClick:H,disabled:e,effect:e?void 0:i,css:{br:S,fontWeight:`$${B}`,borderWidth:v,fontSize:`$${l}`,width:x,maxWidth:h,minWidth:g,boxShadow:C,..._utilsjs.getColors.call(void 0, {outlined:T,colorHex:a||t&&o.colors[t].value,contentColorHex:m||r&&o.colors[r].value}),..._optionalChain([s, 'optionalAccess', _6 => _6.button])},...M,children:E({LeftIcon:d,RightIcon:y,children:u,gap:f,loading:n,outlined:T,styles:s,textTransform:b,colorHex:a||t&&o.colors[t].value,contentColorHex:m||r&&o.colors[r].value})}):null});N.defaultProps={disabled:!1,loading:!1,padding:"md",color:"PRIMARY",gap:"md",effect:"opacity",outlined:!1,width:"100%",maxWidth:"100%",fontSize:"EM-MEDIUM",textTransform:"default",fontWeight:"NORMAL",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};exports.Button = $; exports.ButtonLink = N;
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _jsxruntime = require('react/jsx-runtime');var _styles = require('@pikas-ui/styles');var _react = require('react');var _loader = require('@pikas-ui/loader');var _utilsjs = require('../utils.js');const F=_styles.styled.call(void 0, "button",{all:"unset",cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",space:2,borderStyle:"solid",position:"relative",whiteSpace:"nowrap",boxSizing:"border-box",variants:{effect:{globalScale:{transition:"transform 250ms ease","&:hover":{transform:"scale(1.025)",transition:"transform 250ms ease"},"&:active":{transform:"scale(0.95)",transition:"transform 250ms ease"}},boxScale:{transition:"transform 250ms ease","&:after":{background:"inherit",content:"",position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:-1,transition:"transform 250ms ease",borderRadius:"inherit"},"&:hover:after":{transform:"scale(1.1)",transition:"transform 250ms"},"&:active":{transform:"scale(0.95)",transition:"transform 250ms ease"}},opacity:{transition:"opacity 500ms","&:hover":{opacity:.8},"&:active":{opacity:1,transition:"opacity 0s"}}},padding:{xs:{padding:"4px 16px"},sm:{padding:"4px 24px"},md:{padding:"8px 32px"},lg:{padding:"16px 40px"},xl:{padding:"16px 48px"}},disabled:{true:{cursor:"not-allowed",opacity:.5}}}}),$=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center",variants:{textTransform:{capitalize:{textTransform:"capitalize"},uppercase:{textTransform:"uppercase"},default:{"div::first-letter":{textTransform:"uppercase"}},none:{}},gap:{sm:{customGap:4},md:{customGap:8},lg:{customGap:16}}}}),N=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,right:0,bottom:0}),k=({LeftIcon:o,RightIcon:n,loading:r,children:e,styles:t,contentColor:i,textTransform:p,gap:c})=>{const l=_styles.useTheme.call(void 0, );return l?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, N,{children:_jsxruntime.jsx.call(void 0, _loader.BeatLoader,{size:l.fontSizes["EM-XX-SMALL"].value,colorHex:i,loading:r})}),_jsxruntime.jsxs.call(void 0, $,{textTransform:p,gap:c,css:{opacity:r?0:1},children:[o?_jsxruntime.jsx.call(void 0, o,{size:"1em",colorHex:i,styles:_optionalChain([t, 'optionalAccess', _2 => _2.icon])}):null,_jsxruntime.jsx.call(void 0, "div",{children:e}),n?_jsxruntime.jsx.call(void 0, n,{size:"1em",colorHex:i,styles:_optionalChain([t, 'optionalAccess', _3 => _3.icon])}):null]})]}):null},G= exports.Button =_react.forwardRef.call(void 0, ({color:o,colorHex:n,styles:r,loading:e,disabled:t,effect:i,onClick:p,children:c,gap:l,LeftIcon:y,RightIcon:T,outlined:f,width:m,maxWidth:x,minWidth:h,fontSize:g,textTransform:b,fontWeight:B,borderRadius:C,borderWidth:S,boxShadow:M,contentColor:d,contentColorHex:u,...R},v)=>{const a=_styles.useTheme.call(void 0, ),H=_react.useCallback.call(void 0, ()=>{t||e||_optionalChain([p, 'optionalCall', _4 => _4()])},[t,p,e]);if(!a)return null;const L=n||o&&a.colors[o].value,W=u||d&&a.colors[d].value;return _jsxruntime.jsx.call(void 0, F,{ref:v,onClick:H,disabled:e||t,effect:t?void 0:i,css:{br:C,fontWeight:`$${B}`,borderWidth:S,fontSize:`$${g}`,width:m,maxWidth:x,minWidth:h,boxShadow:M,..._utilsjs.getColors.call(void 0, {outlined:f,colorHex:L,contentColorHex:W}),..._optionalChain([r, 'optionalAccess', _5 => _5.button])},...R,children:k({LeftIcon:y,RightIcon:T,children:c,gap:l,loading:e,styles:r,textTransform:b,contentColor:_utilsjs.getContentColor.call(void 0, {outlined:f,contentColorHex:u,colorHex:n})})})});G.defaultProps={type:"button",disabled:!1,loading:!1,padding:"md",color:"PRIMARY",gap:"md",effect:"opacity",outlined:!1,width:"100%",maxWidth:"100%",fontSize:"EM-MEDIUM",textTransform:"default",fontWeight:"NORMAL",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};const _=_react.forwardRef.call(void 0, ({color:o,colorHex:n,styles:r,loading:e,disabled:t,fontSize:i,effect:p,onClick:c,children:l,gap:y,LeftIcon:T,RightIcon:f,outlined:m,width:x,maxWidth:h,minWidth:g,textTransform:b,fontWeight:B,borderRadius:C,borderWidth:S,boxShadow:M,contentColor:d,contentColorHex:u,...R},v)=>{const a=_styles.useTheme.call(void 0, ),H=_react.useCallback.call(void 0, ()=>{t||e||_optionalChain([c, 'optionalCall', _6 => _6()])},[t,c,e]);if(!a)return null;const L=n||o&&a.colors[o].value,W=u||d&&a.colors[d].value;return _jsxruntime.jsx.call(void 0, F,{as:"a",ref:v,onClick:H,disabled:e||t,effect:t?void 0:p,css:{br:C,fontWeight:`$${B}`,borderWidth:S,fontSize:`$${i}`,width:x,maxWidth:h,minWidth:g,boxShadow:M,..._utilsjs.getColors.call(void 0, {outlined:m,colorHex:L,contentColorHex:W}),..._optionalChain([r, 'optionalAccess', _7 => _7.button])},...R,children:k({LeftIcon:T,RightIcon:f,children:l,gap:y,loading:e,styles:r,textTransform:b,contentColor:_utilsjs.getContentColor.call(void 0, {outlined:m,contentColorHex:u,colorHex:n})})})});_.defaultProps={disabled:!1,loading:!1,padding:"md",color:"PRIMARY",gap:"md",effect:"opacity",outlined:!1,width:"100%",maxWidth:"100%",fontSize:"EM-MEDIUM",textTransform:"default",fontWeight:"NORMAL",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};exports.Button = G; exports.ButtonLink = _;
//# sourceMappingURL=Button.js.map

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

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _jsxruntime = require('react/jsx-runtime');var _styles = require('@pikas-ui/styles');var _react = require('react');var _loader = require('@pikas-ui/loader');var _utilsjs = require('../utils.js');const L=_styles.styled.call(void 0, "button",{all:"unset",cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",space:2,borderStyle:"solid",position:"relative",whiteSpace:"nowrap",boxSizing:"border-box",br:"md",borderWidth:2,boxShadow:"$ELEVATION_BOTTOM_1",variants:{effect:{globalScale:{transition:"transform 250ms ease","&:hover":{transform:"scale(1.025)",transition:"transform 250ms ease"},"&:active":{transform:"scale(0.95)",transition:"transform 250ms ease"}},boxScale:{transition:"transform 250ms ease","&:after":{background:"inherit",content:"",position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:-1,transition:"transform 250ms ease",borderRadius:"inherit"},"&:hover:after":{transform:"scale(1.1)",transition:"transform 250ms"},"&:active":{transform:"scale(0.95)",transition:"transform 250ms ease"}},opacity:{transition:"opacity 500ms","&:hover":{opacity:.8},"&:active":{opacity:1,transition:"opacity 0s"}}},padding:{xs:{padding:2},sm:{padding:4},md:{padding:8},lg:{padding:16},xl:{padding:24}},disabled:{true:{cursor:"not-allowed",opacity:.5}}}}),R=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center"}),A=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,right:0,bottom:0}),M=({loading:t,styles:i,outlined:s,colorHex:e,contentColorHex:n,size:a,Icon:c})=>_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, A,{children:_jsxruntime.jsx.call(void 0, _loader.ClipLoader,{size:_styles.Sizes[a||6],colorHex:_utilsjs.getContentColor.call(void 0, {outlined:s,contentColorHex:n,colorHex:e}),loading:t})}),_jsxruntime.jsx.call(void 0, R,{css:{opacity:t?0:1},children:_jsxruntime.jsx.call(void 0, c,{size:_styles.Sizes[a||6],colorHex:_utilsjs.getContentColor.call(void 0, {outlined:s,contentColorHex:n,colorHex:e}),styles:_optionalChain([i, 'optionalAccess', _ => _.icon])})})]}),w= exports.ButtonIcon =_react.forwardRef.call(void 0, ({color:t,colorHex:i,styles:s,loading:e,disabled:n,effect:a,onClick:c,outlined:u,Icon:f,size:l,borderRadius:y,borderWidth:m,boxShadow:T,contentColor:r,contentColorHex:d,...b},x)=>{const o=_styles.useTheme.call(void 0, ),g=_react.useCallback.call(void 0, ()=>{n||e||_optionalChain([c, 'optionalCall', _2 => _2()])},[n,c,e]);return o?_jsxruntime.jsx.call(void 0, L,{ref:x,onClick:g,disabled:n,effect:n?void 0:a,css:{br:y,borderWidth:m,boxShadow:T,..._utilsjs.getColors.call(void 0, {outlined:u,colorHex:i||t&&o.colors[t].value,contentColorHex:d||r&&o.colors[r].value}),..._optionalChain([s, 'optionalAccess', _3 => _3.button])},...b,children:M({colorHex:i||t&&o.colors[t].value,contentColorHex:d||r&&o.colors[r].value,loading:e,outlined:u,size:l,styles:s,Icon:f})}):null});w.defaultProps={type:"button",disabled:!1,loading:!1,color:"PRIMARY",size:6,effect:"opacity",padding:"md",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};const E=_react.forwardRef.call(void 0, ({color:t,colorHex:i,styles:s,loading:e,effect:n,onClick:a,outlined:c,Icon:u,size:f,disabled:l,borderRadius:y,borderWidth:m,boxShadow:T,contentColor:r,contentColorHex:d,...b},x)=>{const o=_styles.useTheme.call(void 0, ),g=_react.useCallback.call(void 0, ()=>{l||e||_optionalChain([a, 'optionalCall', _4 => _4()])},[l,a,e]);return o?_jsxruntime.jsx.call(void 0, L,{as:"a",ref:x,onClick:g,disabled:l,effect:l?void 0:n,css:{br:y,borderWidth:m,boxShadow:T,..._utilsjs.getColors.call(void 0, {outlined:c,colorHex:i||t&&o.colors[t].value,contentColorHex:d||r&&o.colors[r].value}),..._optionalChain([s, 'optionalAccess', _5 => _5.button])},...b,children:M({colorHex:i||t&&o.colors[t].value,contentColorHex:d||r&&o.colors[r].value,loading:e,outlined:c,size:f,styles:s,Icon:u})}):null});E.defaultProps={loading:!1,color:"PRIMARY",size:6,padding:"md",effect:"opacity",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};exports.ButtonIcon = w; exports.ButtonIconLink = E;
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _jsxruntime = require('react/jsx-runtime');var _styles = require('@pikas-ui/styles');var _react = require('react');var _loader = require('@pikas-ui/loader');var _utilsjs = require('../utils.js');const P=_styles.styled.call(void 0, "button",{all:"unset",cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",userSelect:"none",space:2,borderStyle:"solid",position:"relative",whiteSpace:"nowrap",boxSizing:"border-box",br:"md",borderWidth:2,boxShadow:"$ELEVATION_BOTTOM_1",variants:{effect:{globalScale:{transition:"transform 250ms ease","&:hover":{transform:"scale(1.025)",transition:"transform 250ms ease"},"&:active":{transform:"scale(0.95)",transition:"transform 250ms ease"}},boxScale:{transition:"transform 250ms ease","&:after":{background:"inherit",content:"",position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:-1,transition:"transform 250ms ease",borderRadius:"inherit"},"&:hover:after":{transform:"scale(1.1)",transition:"transform 250ms"},"&:active":{transform:"scale(0.95)",transition:"transform 250ms ease"}},opacity:{transition:"opacity 500ms","&:hover":{opacity:.8},"&:active":{opacity:1,transition:"opacity 0s"}}},padding:{xs:{padding:2},sm:{padding:4},md:{padding:8},lg:{padding:16},xl:{padding:24}},disabled:{true:{cursor:"not-allowed",opacity:.5}}}}),w=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center"}),E=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,right:0,bottom:0}),R=({loading:t,styles:r,contentColor:e,size:o,Icon:n})=>_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, E,{children:_jsxruntime.jsx.call(void 0, _loader.ClipLoader,{size:_styles.Sizes[o||6],colorHex:e,loading:t})}),_jsxruntime.jsx.call(void 0, w,{css:{opacity:t?0:1},children:_jsxruntime.jsx.call(void 0, n,{size:_styles.Sizes[o||6],colorHex:e,styles:_optionalChain([r, 'optionalAccess', _ => _.icon])})})]}),O= exports.ButtonIcon =_react.forwardRef.call(void 0, ({color:t,colorHex:r,styles:e,loading:o,disabled:n,effect:d,onClick:c,outlined:u,Icon:f,size:i,borderRadius:y,borderWidth:m,boxShadow:T,contentColor:l,contentColorHex:p,...b},x)=>{const s=_styles.useTheme.call(void 0, ),h=_react.useCallback.call(void 0, ()=>{n||o||_optionalChain([c, 'optionalCall', _2 => _2()])},[n,c,o]);if(!s)return null;const B=r||t&&s.colors[t].value,C=p||l&&s.colors[l].value;return _jsxruntime.jsx.call(void 0, P,{ref:x,onClick:h,disabled:o||n,effect:n?void 0:d,css:{br:y,borderWidth:m,boxShadow:T,..._utilsjs.getColors.call(void 0, {outlined:u,colorHex:B,contentColorHex:C}),..._optionalChain([e, 'optionalAccess', _3 => _3.button])},...b,children:R({contentColor:_utilsjs.getContentColor.call(void 0, {outlined:u,contentColorHex:p,colorHex:r}),loading:o,size:i,styles:e,Icon:f})})});O.defaultProps={type:"button",disabled:!1,loading:!1,color:"PRIMARY",size:6,effect:"opacity",padding:"md",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};const k=_react.forwardRef.call(void 0, ({color:t,colorHex:r,styles:e,loading:o,effect:n,onClick:d,outlined:c,Icon:u,size:f,disabled:i,borderRadius:y,borderWidth:m,boxShadow:T,contentColor:l,contentColorHex:p,...b},x)=>{const s=_styles.useTheme.call(void 0, ),h=_react.useCallback.call(void 0, ()=>{i||o||_optionalChain([d, 'optionalCall', _4 => _4()])},[i,d,o]);if(!s)return null;const B=r||t&&s.colors[t].value,C=p||l&&s.colors[l].value;return _jsxruntime.jsx.call(void 0, P,{as:"a",ref:x,onClick:h,disabled:o||i,effect:i?void 0:n,css:{br:y,borderWidth:m,boxShadow:T,..._utilsjs.getColors.call(void 0, {outlined:c,colorHex:B,contentColorHex:C}),..._optionalChain([e, 'optionalAccess', _5 => _5.button])},...b,children:R({contentColor:_utilsjs.getContentColor.call(void 0, {outlined:c,contentColorHex:p,colorHex:r}),loading:o,size:f,styles:e,Icon:u})})});k.defaultProps={loading:!1,color:"PRIMARY",size:6,padding:"md",effect:"opacity",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};exports.ButtonIcon = O; exports.ButtonIconLink = k;
//# sourceMappingURL=ButtonIcon.js.map
{
"name": "@pikas-ui/button",
"version": "2.1.11",
"version": "2.1.12",
"private": false,

@@ -37,3 +37,3 @@ "description": "",

"@pikas-ui/icons": "2.1.11",
"@pikas-ui/loader": "2.1.11",
"@pikas-ui/loader": "2.1.12",
"@pikas-ui/styles": "2.3.11",

@@ -40,0 +40,0 @@ "font-color-contrast": "^11.1.0",

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