@pikas-ui/button
Advanced tools
Comparing version 3.0.9 to 3.0.10
@@ -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 k=_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 20px"},sm:{padding:"6px 30px"},md:{padding:"8px 40px"},lg:{padding:"12px 60px"},xl:{padding:"16px 80px"}},disabled:{true:{cursor:"not-allowed",opacity:.5}}}}),$=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center",variants:{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}),G=_styles.styled.call(void 0, "div",{display:"block",variants:{textTransform:{capitalize:{textTransform:"capitalize"},uppercase:{textTransform:"uppercase"},default:{"&::first-letter":{textTransform:"uppercase"}},none:{}}}}),F=({LeftIcon:o,RightIcon:n,loading:r,children:e,css:t,contentColor:a,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:a,loading:r})}),_jsxruntime.jsxs.call(void 0, $,{gap:c,css:{opacity:r?0:1},children:[o?_jsxruntime.jsx.call(void 0, o,{size:"1em",colorHex:a,css:_optionalChain([t, 'optionalAccess', _2 => _2.icon])}):null,_jsxruntime.jsx.call(void 0, G,{textTransform:p,children:e}),n?_jsxruntime.jsx.call(void 0, n,{size:"1em",colorHex:a,css:_optionalChain([t, 'optionalAccess', _3 => _3.icon])}):null]})]}):null},_= exports.Button =_react.forwardRef.call(void 0, ({color:o,colorHex:n,css:r,loading:e,disabled:t,effect:a,onClick:p,children:c,gap:l,LeftIcon:x,RightIcon:y,outlined:f,width:m,maxWidth:h,minWidth:g,fontSize:b,textTransform:C,fontWeight:B,borderRadius:S,borderWidth:M,boxShadow:R,contentColor:d,contentColorHex:u,...v},H)=>{const i=_styles.useTheme.call(void 0, ),L=_react.useCallback.call(void 0, ()=>{t||e||_optionalChain([p, 'optionalCall', _4 => _4()])},[t,p,e]);if(!i)return null;const W=n||o&&i.colors[o].value,I=u||d&&i.colors[d].value;return _jsxruntime.jsx.call(void 0, k,{ref:H,onClick:L,disabled:e||t,effect:t?void 0:a,css:{br:S,fontWeight:`$${B}`,borderWidth:M,fontSize:`$${b}`,width:m,maxWidth:h,minWidth:g,boxShadow:R,..._utilsjs.getColors.call(void 0, {outlined:f,colorHex:W,contentColorHex:I}),..._optionalChain([r, 'optionalAccess', _5 => _5.button])},...v,children:F({LeftIcon:x,RightIcon:y,children:c,gap:l,loading:e,css:r,textTransform:C,contentColor:_utilsjs.getContentColor.call(void 0, {outlined:f,contentColorHex:u,colorHex:n})})})});_.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 j=_react.forwardRef.call(void 0, ({color:o,colorHex:n,css:r,loading:e,disabled:t,fontSize:a,effect:p,onClick:c,children:l,gap:x,LeftIcon:y,RightIcon:f,outlined:m,width:h,maxWidth:g,minWidth:b,textTransform:C,fontWeight:B,borderRadius:S,borderWidth:M,boxShadow:R,contentColor:d,contentColorHex:u,...v},H)=>{const i=_styles.useTheme.call(void 0, ),L=_react.useCallback.call(void 0, ()=>{t||e||_optionalChain([c, 'optionalCall', _6 => _6()])},[t,c,e]);if(!i)return null;const W=n||o&&i.colors[o].value,I=u||d&&i.colors[d].value;return _jsxruntime.jsx.call(void 0, k,{as:"a",ref:H,onClick:L,disabled:e||t,effect:t?void 0:p,css:{br:S,fontWeight:`$${B}`,borderWidth:M,fontSize:`$${a}`,width:h,maxWidth:g,minWidth:b,boxShadow:R,..._utilsjs.getColors.call(void 0, {outlined:m,colorHex:W,contentColorHex:I}),..._optionalChain([r, 'optionalAccess', _7 => _7.button])},...v,children:F({LeftIcon:y,RightIcon:f,children:l,gap:x,loading:e,css:r,textTransform:C,contentColor:_utilsjs.getContentColor.call(void 0, {outlined:m,contentColorHex:u,colorHex:n})})})});j.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 = j; | ||
"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 k=_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 20px"},sm:{padding:"6px 30px"},md:{padding:"8px 40px"},lg:{padding:"12px 60px"},xl:{padding:"16px 80px"}},disabled:{true:{cursor:"not-allowed",opacity:.5}}}}),D=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center",variants:{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}),G=_styles.styled.call(void 0, "div",{display:"block",variants:{textTransform:{capitalize:{textTransform:"capitalize"},uppercase:{textTransform:"uppercase"},default:{"&::first-letter":{textTransform:"uppercase"}},none:{}}}}),F=({LeftIcon:o,RightIcon:n,loading:r,children:e,css:t,contentColor:a,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:a,loading:r})}),_jsxruntime.jsxs.call(void 0, D,{gap:c,css:{opacity:r?0:1},children:[o?_jsxruntime.jsx.call(void 0, o,{size:"1em",colorHex:a,css:_optionalChain([t, 'optionalAccess', _2 => _2.icon])}):null,_jsxruntime.jsx.call(void 0, G,{textTransform:p,children:e}),n?_jsxruntime.jsx.call(void 0, n,{size:"1em",colorHex:a,css:_optionalChain([t, 'optionalAccess', _3 => _3.icon])}):null]})]}):null},_= exports.Button =_react.forwardRef.call(void 0, ({color:o,colorHex:n,css:r,loading:e,disabled:t,effect:a,onClick:p,children:c,gap:l,LeftIcon:x,RightIcon:y,outlined:f,width:m,maxWidth:h,minWidth:g,fontSize:b,textTransform:C,fontWeight:B,borderRadius:S,borderWidth:M,boxShadow:R,contentColor:d,contentColorHex:u,...v},H)=>{const i=_styles.useTheme.call(void 0, ),L=_react.useCallback.call(void 0, ()=>{t||e||_optionalChain([p, 'optionalCall', _4 => _4()])},[t,p,e]);if(!i)return null;const W=n||o&&i.colors[o].value,I=u||d&&i.colors[d].value;return _jsxruntime.jsx.call(void 0, k,{ref:H,onClick:L,disabled:e||t,effect:t?void 0:a,css:{br:S,fontWeight:`$${B}`,borderWidth:M,fontSize:`$${b}`,width:m,maxWidth:h,minWidth:g,boxShadow:`$${R}`,..._utilsjs.getColors.call(void 0, {outlined:f,colorHex:W,contentColorHex:I}),..._optionalChain([r, 'optionalAccess', _5 => _5.button])},...v,children:F({LeftIcon:x,RightIcon:y,children:c,gap:l,loading:e,css:r,textTransform:C,contentColor:_utilsjs.getContentColor.call(void 0, {outlined:f,contentColorHex:u,colorHex:n})})})});_.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 j=_react.forwardRef.call(void 0, ({color:o,colorHex:n,css:r,loading:e,disabled:t,fontSize:a,effect:p,onClick:c,children:l,gap:x,LeftIcon:y,RightIcon:f,outlined:m,width:h,maxWidth:g,minWidth:b,textTransform:C,fontWeight:B,borderRadius:S,borderWidth:M,boxShadow:R,contentColor:d,contentColorHex:u,...v},H)=>{const i=_styles.useTheme.call(void 0, ),L=_react.useCallback.call(void 0, ()=>{t||e||_optionalChain([c, 'optionalCall', _6 => _6()])},[t,c,e]);if(!i)return null;const W=n||o&&i.colors[o].value,I=u||d&&i.colors[d].value;return _jsxruntime.jsx.call(void 0, k,{as:"a",ref:H,onClick:L,disabled:e||t,effect:t?void 0:p,css:{br:S,fontWeight:`$${B}`,borderWidth:M,fontSize:`$${a}`,width:h,maxWidth:g,minWidth:b,boxShadow:`$${R}`,..._utilsjs.getColors.call(void 0, {outlined:m,colorHex:W,contentColorHex:I}),..._optionalChain([r, 'optionalAccess', _7 => _7.button])},...v,children:F({LeftIcon:y,RightIcon:f,children:l,gap:x,loading:e,css:r,textTransform:C,contentColor:_utilsjs.getContentColor.call(void 0, {outlined:m,contentColorHex:u,colorHex:n})})})});j.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 = j; | ||
//# 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 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,css: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,css:_optionalChain([r, 'optionalAccess', _ => _.icon])})})]}),O= exports.ButtonIcon =_react.forwardRef.call(void 0, ({color:t,colorHex:r,css:e,loading:o,disabled:n,effect:d,onClick:c,outlined:u,Icon:f,size:i,borderRadius:m,borderWidth:y,boxShadow:T,contentColor:l,contentColorHex:p,...b},C)=>{const s=_styles.useTheme.call(void 0, ),x=_react.useCallback.call(void 0, ()=>{n||o||_optionalChain([c, 'optionalCall', _2 => _2()])},[n,c,o]);if(!s)return null;const h=r||t&&s.colors[t].value,B=p||l&&s.colors[l].value;return _jsxruntime.jsx.call(void 0, P,{ref:C,onClick:x,disabled:o||n,effect:n?void 0:d,css:{br:m,borderWidth:y,boxShadow:T,..._utilsjs.getColors.call(void 0, {outlined:u,colorHex:h,contentColorHex:B}),..._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,css: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,css:e,loading:o,effect:n,onClick:d,outlined:c,Icon:u,size:f,disabled:i,borderRadius:m,borderWidth:y,boxShadow:T,contentColor:l,contentColorHex:p,...b},C)=>{const s=_styles.useTheme.call(void 0, ),x=_react.useCallback.call(void 0, ()=>{i||o||_optionalChain([d, 'optionalCall', _4 => _4()])},[i,d,o]);if(!s)return null;const h=r||t&&s.colors[t].value,B=p||l&&s.colors[l].value;return _jsxruntime.jsx.call(void 0, P,{as:"a",ref:C,onClick:x,disabled:o||i,effect:i?void 0:n,css:{br:m,borderWidth:y,boxShadow:T,..._utilsjs.getColors.call(void 0, {outlined:c,colorHex:h,contentColorHex:B}),..._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,css: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; | ||
"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,css: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,css:_optionalChain([r, 'optionalAccess', _ => _.icon])})})]}),O= exports.ButtonIcon =_react.forwardRef.call(void 0, ({color:t,colorHex:r,css:e,loading:o,disabled:n,effect:d,onClick:c,outlined:u,Icon:f,size:i,borderRadius:m,borderWidth:y,boxShadow:T,contentColor:l,contentColorHex:p,...b},C)=>{const s=_styles.useTheme.call(void 0, ),x=_react.useCallback.call(void 0, ()=>{n||o||_optionalChain([c, 'optionalCall', _2 => _2()])},[n,c,o]);if(!s)return null;const h=r||t&&s.colors[t].value,B=p||l&&s.colors[l].value;return _jsxruntime.jsx.call(void 0, P,{ref:C,onClick:x,disabled:o||n,effect:n?void 0:d,css:{br:m,borderWidth:y,boxShadow:`$${T}`,..._utilsjs.getColors.call(void 0, {outlined:u,colorHex:h,contentColorHex:B}),..._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,css: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,css:e,loading:o,effect:n,onClick:d,outlined:c,Icon:u,size:f,disabled:i,borderRadius:m,borderWidth:y,boxShadow:T,contentColor:l,contentColorHex:p,...b},C)=>{const s=_styles.useTheme.call(void 0, ),x=_react.useCallback.call(void 0, ()=>{i||o||_optionalChain([d, 'optionalCall', _4 => _4()])},[i,d,o]);if(!s)return null;const h=r||t&&s.colors[t].value,B=p||l&&s.colors[l].value;return _jsxruntime.jsx.call(void 0, P,{as:"a",ref:C,onClick:x,disabled:o||i,effect:i?void 0:n,css:{br:m,borderWidth:y,boxShadow:`$${T}`,..._utilsjs.getColors.call(void 0, {outlined:c,colorHex:h,contentColorHex:B}),..._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,css: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": "3.0.9", | ||
"version": "3.0.10", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Components for creating buttons", |
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
94099