@pikas-ui/button
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _styles = require('@pikas-ui/styles');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _loader = require('@pikas-ui/loader');var _utilsjs = require('../utils.js');const E=_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"}},state:{true:{cursor:"initial",opacity:.5}}}}),D=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center",variants:{textTransform:{capitalize:{textTransform:"capitalize"},uppercase:{textTransform:"uppercase"},default:{"span::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}),R=({LeftIcon:e,RightIcon:i,loading:a,children:r,styles:o,outlined:u,colorHex:p,contentColorHex:l,textTransform:d,gap:f,pikasUiContext:c})=>c?_react2.default.createElement(_react2.default.Fragment,null,_react2.default.createElement(F,null,_react2.default.createElement(_loader.BeatLoader,{size:c.fontSizes["EM-XX-SMALL"].value,colorHex:_utilsjs.getContentColor.call(void 0, {outlined:u,contentColorHex:l,colorHex:p}),loading:a})),_react2.default.createElement(D,{textTransform:d,gap:f,css:{opacity:a?0:1}},e?_react2.default.createElement(e,{size:"1em",colorHex:_utilsjs.getContentColor.call(void 0, {outlined:u,contentColorHex:l,colorHex:p}),styles:_optionalChain([o, 'optionalAccess', _ => _.icon])}):null,_react2.default.createElement("span",null,r),i?_react2.default.createElement(i,{size:"1em",colorHex:_utilsjs.getContentColor.call(void 0, {outlined:u,contentColorHex:l,colorHex:p}),styles:_optionalChain([o, 'optionalAccess', _2 => _2.icon])}):null)):null,$= exports.Button =_react.forwardRef.call(void 0, ({color:e,colorHex:i,styles:a,loading:r,disabled:o,effect:u,onClick:p,children:l,gap:d,LeftIcon:f,RightIcon:c,outlined:x,width:y,maxWidth:T,minWidth:g,fontSize:h,textTransform:b,fontWeight:B,borderRadius:C,borderWidth:S,boxShadow:M,contentColor:s,contentColorHex:m,...v},I)=>{const t=_react.useContext.call(void 0, _styles.PikasUIContext),H=_react.useCallback.call(void 0, ()=>{o||r||_optionalChain([p, 'optionalCall', _3 => _3()])},[o,p,r]);return t?_react2.default.createElement(E,{ref:I,onClick:H,state:o,effect:o?void 0:u,css:{br:C,fontWeight:`$${B}`,borderWidth:S,fontSize:`$${h}`,width:y,maxWidth:T,minWidth:g,boxShadow:M,..._utilsjs.getColors.call(void 0, {outlined:x,colorHex:i||e&&t.colors[e].value,contentColorHex:m||s&&t.colors[s].value}),..._optionalChain([a, 'optionalAccess', _4 => _4.button])},...v},R({pikasUiContext:t,LeftIcon:f,RightIcon:c,children:l,gap:d,loading:r,outlined:x,styles:a,textTransform:b,colorHex:i||e&&t.colors[e].value,contentColorHex:m||s&&t.colors[s].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:e,colorHex:i,styles:a,loading:r,disabled:o,fontSize:u,effect:p,onClick:l,children:d,gap:f,LeftIcon:c,RightIcon:x,outlined:y,width:T,maxWidth:g,minWidth:h,textTransform:b,fontWeight:B,borderRadius:C,borderWidth:S,boxShadow:M,contentColor:s,contentColorHex:m,...v},I)=>{const t=_react.useContext.call(void 0, _styles.PikasUIContext),H=_react.useCallback.call(void 0, ()=>{o||r||_optionalChain([l, 'optionalCall', _5 => _5()])},[o,l,r]);return t?_react2.default.createElement(E,{as:"a",ref:I,onClick:H,state:o,effect:o?void 0:p,css:{br:C,fontWeight:`$${B}`,borderWidth:S,fontSize:`$${u}`,width:T,maxWidth:g,minWidth:h,boxShadow:M,..._utilsjs.getColors.call(void 0, {outlined:y,colorHex:i||e&&t.colors[e].value,contentColorHex:m||s&&t.colors[s].value}),..._optionalChain([a, 'optionalAccess', _6 => _6.button])},...v},R({pikasUiContext:t,LeftIcon:c,RightIcon:x,children:d,gap:f,loading:r,outlined:y,styles:a,textTransform:b,colorHex:i||e&&t.colors[e].value,contentColorHex:m||s&&t.colors[s].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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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; }"use strict";var _styles = require('@pikas-ui/styles');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _loader = require('@pikas-ui/loader');var _utilsjs = require('../utils.js');const E=_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"}},state:{true:{cursor:"initial",opacity:.5}}}}),D=_styles.styled.call(void 0, "div",{display:"flex",alignItems:"center",justifyContent:"center",variants:{textTransform:{capitalize:{textTransform:"capitalize"},uppercase:{textTransform:"uppercase"},default:{"span::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}),R=({LeftIcon:e,RightIcon:i,loading:a,children:r,styles:o,outlined:u,colorHex:p,contentColorHex:l,textTransform:d,gap:f,pikasUiContext:c})=>c?_react2.default.createElement(_react2.default.Fragment,null,_react2.default.createElement(F,null,_react2.default.createElement(_loader.BeatLoader,{size:c.fontSizes["EM-XX-SMALL"].value,colorHex:_utilsjs.getContentColor.call(void 0, {outlined:u,contentColorHex:l,colorHex:p}),loading:a})),_react2.default.createElement(D,{textTransform:d,gap:f,css:{opacity:a?0:1}},e?_react2.default.createElement(e,{size:"1em",colorHex:_utilsjs.getContentColor.call(void 0, {outlined:u,contentColorHex:l,colorHex:p}),styles:_optionalChain([o, 'optionalAccess', _ => _.icon])}):null,_react2.default.createElement("span",null,r),i?_react2.default.createElement(i,{size:"1em",colorHex:_utilsjs.getContentColor.call(void 0, {outlined:u,contentColorHex:l,colorHex:p}),styles:_optionalChain([o, 'optionalAccess', _2 => _2.icon])}):null)):null,$= exports.Button =_react.forwardRef.call(void 0, ({color:e,colorHex:i,styles:a,loading:r,disabled:o,effect:u,onClick:p,children:l,gap:d,LeftIcon:f,RightIcon:c,outlined:x,width:y,maxWidth:T,minWidth:g,fontSize:h,textTransform:b,fontWeight:B,borderRadius:C,borderWidth:S,boxShadow:M,contentColor:s,contentColorHex:m,...v},I)=>{const t=_react.useContext.call(void 0, _styles.PikasUIContext),H=_react.useCallback.call(void 0, ()=>{o||r||_optionalChain([p, 'optionalCall', _3 => _3()])},[o,p,r]);return t?_react2.default.createElement(E,{ref:I,onClick:H,state:o,effect:o?void 0:u,css:{br:C,fontWeight:`$${B}`,borderWidth:S,fontSize:`$${h}`,width:y,maxWidth:T,minWidth:g,boxShadow:M,..._utilsjs.getColors.call(void 0, {outlined:x,colorHex:i||e&&t.colors[e].value,contentColorHex:m||s&&t.colors[s].value}),..._optionalChain([a, 'optionalAccess', _4 => _4.button])},...v},R({pikasUiContext:t,LeftIcon:f,RightIcon:c,children:l,gap:d,loading:r,outlined:x,styles:a,textTransform:b,colorHex:i||e&&t.colors[e].value,contentColorHex:m||s&&t.colors[s].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:e,colorHex:i,styles:a,loading:r,disabled:o,fontSize:u,effect:p,onClick:l,children:d,gap:f,LeftIcon:c,RightIcon:x,outlined:y,width:T,maxWidth:g,minWidth:h,textTransform:b,fontWeight:B,borderRadius:C,borderWidth:S,boxShadow:M,contentColor:s,contentColorHex:m,...v},I)=>{const t=_react.useContext.call(void 0, _styles.PikasUIContext),H=_react.useCallback.call(void 0, ()=>{o||r||_optionalChain([l, 'optionalCall', _5 => _5()])},[o,l,r]);return t?_react2.default.createElement(E,{as:"a",ref:I,onClick:H,state:o,effect:o?void 0:p,css:{br:C,fontWeight:`$${B}`,borderWidth:S,fontSize:`$${u}`,width:T,maxWidth:g,minWidth:h,boxShadow:M,..._utilsjs.getColors.call(void 0, {outlined:y,colorHex:i||e&&t.colors[e].value,contentColorHex:m||s&&t.colors[s].value}),..._optionalChain([a, 'optionalAccess', _6 => _6.button])},...v},R({pikasUiContext:t,LeftIcon:c,RightIcon:x,children:d,gap:f,loading:r,outlined:y,styles:a,textTransform:b,colorHex:i||e&&t.colors[e].value,contentColorHex:m||s&&t.colors[s].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; | ||
//# sourceMappingURL=Button.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, get: () => obj[key]}); }); }var _Buttonjs = require('./Button.js'); _createStarExport(_Buttonjs); | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, get: () => obj[key]}); }); }"use strict";var _Buttonjs = require('./Button.js'); _createStarExport(_Buttonjs); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _styles = require('@pikas-ui/styles');var _react = require('react'); var _react2 = _interopRequireDefault(_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}},state:{true:{cursor:"initial",opacity:.5}}}}),k=_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}),P=({loading:t,styles:a,outlined:s,colorHex:e,contentColorHex:n,size:c,Icon:p})=>_react2.default.createElement(_react2.default.Fragment,null,_react2.default.createElement(A,null,_react2.default.createElement(_loader.ClipLoader,{size:_styles.Sizes[c||"MEDIUM"],colorHex:_utilsjs.getContentColor.call(void 0, {outlined:s,contentColorHex:n,colorHex:e}),loading:t})),_react2.default.createElement(k,{css:{opacity:t?0:1}},_react2.default.createElement(p,{size:_styles.Sizes[c||"MEDIUM"],colorHex:_utilsjs.getContentColor.call(void 0, {outlined:s,contentColorHex:n,colorHex:e}),styles:_optionalChain([a, 'optionalAccess', _ => _.icon])}))),O= exports.ButtonIcon =_react.forwardRef.call(void 0, ({color:t,colorHex:a,styles:s,loading:e,disabled:n,effect:c,onClick:p,outlined:d,Icon:f,size:l,borderRadius:y,borderWidth:m,boxShadow:T,contentColor:r,contentColorHex:u,...b},x)=>{const o=_react.useContext.call(void 0, _styles.PikasUIContext),I=_react.useCallback.call(void 0, ()=>{n||e||_optionalChain([p, 'optionalCall', _2 => _2()])},[n,p,e]);return o?_react2.default.createElement(L,{ref:x,onClick:I,state:n,effect:n?void 0:c,css:{br:y,borderWidth:m,boxShadow:T,..._utilsjs.getColors.call(void 0, {outlined:d,colorHex:a||t&&o.colors[t].value,contentColorHex:u||r&&o.colors[r].value}),..._optionalChain([s, 'optionalAccess', _3 => _3.button])},...b},P({colorHex:a||t&&o.colors[t].value,contentColorHex:u||r&&o.colors[r].value,loading:e,outlined:d,size:l,styles:s,Icon:f})):null});O.defaultProps={type:"button",disabled:!1,loading:!1,color:"PRIMARY",size:"MEDIUM",effect:"opacity",padding:"md",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};const w=_react.forwardRef.call(void 0, ({color:t,colorHex:a,styles:s,loading:e,effect:n,onClick:c,outlined:p,Icon:d,size:f,disabled:l,borderRadius:y,borderWidth:m,boxShadow:T,contentColor:r,contentColorHex:u,...b},x)=>{const o=_react.useContext.call(void 0, _styles.PikasUIContext),I=_react.useCallback.call(void 0, ()=>{l||e||_optionalChain([c, 'optionalCall', _4 => _4()])},[l,c,e]);return o?_react2.default.createElement(L,{as:"a",ref:x,onClick:I,state:l,effect:l?void 0:n,css:{br:y,borderWidth:m,boxShadow:T,..._utilsjs.getColors.call(void 0, {outlined:p,colorHex:a||t&&o.colors[t].value,contentColorHex:u||r&&o.colors[r].value}),..._optionalChain([s, 'optionalAccess', _5 => _5.button])},...b},P({colorHex:a||t&&o.colors[t].value,contentColorHex:u||r&&o.colors[r].value,loading:e,outlined:p,size:f,styles:s,Icon:d})):null});w.defaultProps={loading:!1,color:"PRIMARY",size:"MEDIUM",padding:"md",effect:"opacity",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};exports.ButtonIcon = O; exports.ButtonIconLink = w; | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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; }"use strict";var _styles = require('@pikas-ui/styles');var _react = require('react'); var _react2 = _interopRequireDefault(_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}},state:{true:{cursor:"initial",opacity:.5}}}}),k=_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}),P=({loading:t,styles:a,outlined:s,colorHex:e,contentColorHex:n,size:c,Icon:p})=>_react2.default.createElement(_react2.default.Fragment,null,_react2.default.createElement(A,null,_react2.default.createElement(_loader.ClipLoader,{size:_styles.Sizes[c||"MEDIUM"],colorHex:_utilsjs.getContentColor.call(void 0, {outlined:s,contentColorHex:n,colorHex:e}),loading:t})),_react2.default.createElement(k,{css:{opacity:t?0:1}},_react2.default.createElement(p,{size:_styles.Sizes[c||"MEDIUM"],colorHex:_utilsjs.getContentColor.call(void 0, {outlined:s,contentColorHex:n,colorHex:e}),styles:_optionalChain([a, 'optionalAccess', _ => _.icon])}))),O= exports.ButtonIcon =_react.forwardRef.call(void 0, ({color:t,colorHex:a,styles:s,loading:e,disabled:n,effect:c,onClick:p,outlined:d,Icon:f,size:l,borderRadius:y,borderWidth:m,boxShadow:T,contentColor:r,contentColorHex:u,...b},x)=>{const o=_react.useContext.call(void 0, _styles.PikasUIContext),I=_react.useCallback.call(void 0, ()=>{n||e||_optionalChain([p, 'optionalCall', _2 => _2()])},[n,p,e]);return o?_react2.default.createElement(L,{ref:x,onClick:I,state:n,effect:n?void 0:c,css:{br:y,borderWidth:m,boxShadow:T,..._utilsjs.getColors.call(void 0, {outlined:d,colorHex:a||t&&o.colors[t].value,contentColorHex:u||r&&o.colors[r].value}),..._optionalChain([s, 'optionalAccess', _3 => _3.button])},...b},P({colorHex:a||t&&o.colors[t].value,contentColorHex:u||r&&o.colors[r].value,loading:e,outlined:d,size:l,styles:s,Icon:f})):null});O.defaultProps={type:"button",disabled:!1,loading:!1,color:"PRIMARY",size:"MEDIUM",effect:"opacity",padding:"md",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};const w=_react.forwardRef.call(void 0, ({color:t,colorHex:a,styles:s,loading:e,effect:n,onClick:c,outlined:p,Icon:d,size:f,disabled:l,borderRadius:y,borderWidth:m,boxShadow:T,contentColor:r,contentColorHex:u,...b},x)=>{const o=_react.useContext.call(void 0, _styles.PikasUIContext),I=_react.useCallback.call(void 0, ()=>{l||e||_optionalChain([c, 'optionalCall', _4 => _4()])},[l,c,e]);return o?_react2.default.createElement(L,{as:"a",ref:x,onClick:I,state:l,effect:l?void 0:n,css:{br:y,borderWidth:m,boxShadow:T,..._utilsjs.getColors.call(void 0, {outlined:p,colorHex:a||t&&o.colors[t].value,contentColorHex:u||r&&o.colors[r].value}),..._optionalChain([s, 'optionalAccess', _5 => _5.button])},...b},P({colorHex:a||t&&o.colors[t].value,contentColorHex:u||r&&o.colors[r].value,loading:e,outlined:p,size:f,styles:s,Icon:d})):null});w.defaultProps={loading:!1,color:"PRIMARY",size:"MEDIUM",padding:"md",effect:"opacity",borderRadius:"md",borderWidth:2,boxShadow:"ELEVATION_BOTTOM_1"};exports.ButtonIcon = O; exports.ButtonIconLink = w; | ||
//# sourceMappingURL=ButtonIcon.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, get: () => obj[key]}); }); }var _ButtonIconjs = require('./ButtonIcon.js'); _createStarExport(_ButtonIconjs); | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, get: () => obj[key]}); }); }"use strict";var _ButtonIconjs = require('./ButtonIcon.js'); _createStarExport(_ButtonIconjs); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, get: () => obj[key]}); }); }var _indexjs = require('./button/index.js'); _createStarExport(_indexjs);var _indexjs3 = require('./buttonIcon/index.js'); _createStarExport(_indexjs3);var _typesjs = require('./types.js'); _createStarExport(_typesjs); | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, get: () => obj[key]}); }); }"use strict";var _indexjs = require('./button/index.js'); _createStarExport(_indexjs);var _indexjs3 = require('./buttonIcon/index.js'); _createStarExport(_indexjs3);var _typesjs = require('./types.js'); _createStarExport(_typesjs); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});const t={button:!0,submit:!0,reset:!0},e= exports.ButtonPadding ={xs:!0,sm:!0,md:!0,lg:!0,xl:!0},o= exports.ButtonTextTransform ={capitalize:!0,uppercase:!0,default:!0,none:!0},r= exports.ButtonEffect ={globalScale:!0,boxScale:!0,opacity:!0},u= exports.ButtonGap ={sm:!0,md:!0,lg:!0},p= exports.ButtonTarget ={_self:!0,_blank:!0,_parent:!0,_top:!0};exports.ButtonEffect = r; exports.ButtonGap = u; exports.ButtonPadding = e; exports.ButtonTarget = p; exports.ButtonTextTransform = o; exports.ButtonType = t; | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use strict";const t={button:!0,submit:!0,reset:!0},e= exports.ButtonPadding ={xs:!0,sm:!0,md:!0,lg:!0,xl:!0},o= exports.ButtonTextTransform ={capitalize:!0,uppercase:!0,default:!0,none:!0},r= exports.ButtonEffect ={globalScale:!0,boxScale:!0,opacity:!0},u= exports.ButtonGap ={sm:!0,md:!0,lg:!0},p= exports.ButtonTarget ={_self:!0,_blank:!0,_parent:!0,_top:!0};exports.ButtonEffect = r; exports.ButtonGap = u; exports.ButtonPadding = e; exports.ButtonTarget = p; exports.ButtonTextTransform = o; exports.ButtonType = t; | ||
//# sourceMappingURL=types.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _fontcolorcontrast = require('font-color-contrast'); var _fontcolorcontrast2 = _interopRequireDefault(_fontcolorcontrast);const n=({contentColorHex:o,colorHex:r,outlined:t})=>o||(t?r:_fontcolorcontrast2.default.call(void 0, r||"",.7)),i= exports.getColors =({colorHex:o,outlined:r,contentColorHex:t})=>r?{backgroundColor:"$TRANSPARENT",borderColor:o,color:n({contentColorHex:t,colorHex:o,outlined:r})}:{backgroundColor:o,borderColor:o,color:n({contentColorHex:t,colorHex:o,outlined:r})};exports.getColors = i; exports.getContentColor = n; | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use strict";var _fontcolorcontrast = require('font-color-contrast'); var _fontcolorcontrast2 = _interopRequireDefault(_fontcolorcontrast);const n=({contentColorHex:o,colorHex:r,outlined:t})=>o||(t?r:_fontcolorcontrast2.default.call(void 0, r||"",.7)),i= exports.getColors =({colorHex:o,outlined:r,contentColorHex:t})=>r?{backgroundColor:"$TRANSPARENT",borderColor:o,color:n({contentColorHex:t,colorHex:o,outlined:r})}:{backgroundColor:o,borderColor:o,color:n({contentColorHex:t,colorHex:o,outlined:r})};exports.getColors = i; exports.getContentColor = n; | ||
//# sourceMappingURL=utils.js.map |
{ | ||
"name": "@pikas-ui/button", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"private": false, | ||
@@ -33,5 +33,5 @@ "description": "", | ||
"dependencies": { | ||
"@pikas-ui/icons": "2.0.1", | ||
"@pikas-ui/loader": "2.0.1", | ||
"@pikas-ui/styles": "2.1.0", | ||
"@pikas-ui/icons": "2.0.2", | ||
"@pikas-ui/loader": "2.0.2", | ||
"@pikas-ui/styles": "2.1.1", | ||
"font-color-contrast": "^11.1.0", | ||
@@ -38,0 +38,0 @@ "react": "^18.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
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
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
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
108263
250
+ Added@pikas-ui/icons@2.0.2(transitive)
+ Added@pikas-ui/loader@2.0.2(transitive)
+ Added@pikas-ui/styles@2.1.1(transitive)
+ Addedlodash.clonedeep@4.5.0(transitive)
- Removed@pikas-ui/icons@2.0.1(transitive)
- Removed@pikas-ui/loader@2.0.1(transitive)
- Removed@pikas-ui/styles@2.1.0(transitive)
Updated@pikas-ui/icons@2.0.2
Updated@pikas-ui/loader@2.0.2
Updated@pikas-ui/styles@2.1.1