@bikdotai/bik-component-library 0.0.594-am.0 → 0.0.594-am.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/states/StateComponent.d.ts +1 -0
- package/dist/cjs/components/states/StateComponent.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/states/StateComponent.d.ts +1 -0
- package/dist/esm/components/states/StateComponent.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,s,n=require("react/jsx-runtime"),r=require("../../constants/Theme.js"),o=require("../../assets/icons/errorIcon.svg.js"),i=require("../../assets/icons/retryIcon.svg.js"),a=require("../../assets/icons/successIcon.svg.js"),c=require("../../assets/icons/warningIcon.svg.js"),u=require("../button/Button.js"),d=require("../spinner/Spinner.js"),l=require("../TypographyStyle.js"),x=require("./StateComponent.styled.js");exports.StateInterface=void 0,(e=exports.StateInterface||(exports.StateInterface={})).SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.LOADING="loading",e.RETRY="retry",exports.ButtonActions=void 0,(t=exports.ButtonActions||(exports.ButtonActions={})).CANCEL="cancel",t.OTHER="other",exports.ButtonTypes=void 0,(s=exports.ButtonTypes||(exports.ButtonTypes={})).SINGLE="SINGLE",s.DOUBLE="DOUBLE";exports.StateComponent=e=>{var t;const s=()=>p==exports.StateInterface.SUCCESS?n.jsx(a.default,{}):p==exports.StateInterface.WARNING?n.jsx(c.default,{}):p==exports.StateInterface.ERROR?n.jsx(o.default,{}):p===exports.StateInterface.LOADING?n.jsx(d.Spinner,{size:"large"}):p===exports.StateInterface.RETRY?n.jsx(i.default,{}):void 0,{states:p,heading:j,subline:S,icon:h=s(),isButtonEnabled:g,type:y,buttonText:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,s,n=require("react/jsx-runtime"),r=require("../../constants/Theme.js"),o=require("../../assets/icons/errorIcon.svg.js"),i=require("../../assets/icons/retryIcon.svg.js"),a=require("../../assets/icons/successIcon.svg.js"),c=require("../../assets/icons/warningIcon.svg.js"),u=require("../button/Button.js"),d=require("../spinner/Spinner.js"),l=require("../TypographyStyle.js"),x=require("./StateComponent.styled.js");exports.StateInterface=void 0,(e=exports.StateInterface||(exports.StateInterface={})).SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.LOADING="loading",e.RETRY="retry",exports.ButtonActions=void 0,(t=exports.ButtonActions||(exports.ButtonActions={})).CANCEL="cancel",t.OTHER="other",exports.ButtonTypes=void 0,(s=exports.ButtonTypes||(exports.ButtonTypes={})).SINGLE="SINGLE",s.DOUBLE="DOUBLE";exports.StateComponent=e=>{var t;const s=()=>p==exports.StateInterface.SUCCESS?n.jsx(a.default,{}):p==exports.StateInterface.WARNING?n.jsx(c.default,{}):p==exports.StateInterface.ERROR?n.jsx(o.default,{}):p===exports.StateInterface.LOADING?n.jsx(d.Spinner,{size:"large"}):p===exports.StateInterface.RETRY?n.jsx(i.default,{}):void 0,{states:p,heading:j,subline:S,icon:h=s(),isButtonEnabled:g,type:y,buttonText:B,buttonType:I,onButtonClick:L,leadingIcon:O,width:T,headerImage:C,iconWidth:R,iconHeight:b,closeButtonType:E,secondaryButtonText:A}=e;return n.jsxs(x.StateComponentContainer,Object.assign({width:T},{children:[n.jsx(x.StateIcon,Object.assign({iconWidth:R,iconHeight:b},{children:C?n.jsx("img",{src:C,width:"100%",height:"auto",alt:""}):h})),n.jsxs(x.StateHeading,Object.assign({size:e.size},{children:["SMALL"===e.size&&n.jsx(l.TitleRegular,{children:j}),"SMALL"!==e.size&&n.jsx(l.TitleMedium,{children:j})]})),n.jsxs(x.StateSubline,{children:["SMALL"!==e.size&&n.jsx(l.BodyPrimary,Object.assign({color:r.COLORS.content.secondary},{children:S})),"SMALL"===e.size&&n.jsx(l.BodySecondary,Object.assign({color:r.COLORS.content.secondary},{children:S}))]}),null!==(t=e.children)&&void 0!==t?t:n.jsx(n.Fragment,{}),g&&n.jsx(n.Fragment,{children:n.jsxs(x.ButtonContainer,Object.assign({size:e.size},{children:[y==exports.ButtonTypes.DOUBLE&&n.jsx(u.Button,{onClick:()=>L&&L(exports.ButtonActions.CANCEL),buttonType:E||"secondary",buttonText:A||"Cancel",matchParentWidth:!0}),n.jsx(u.Button,{onClick:()=>L&&L(exports.ButtonActions.OTHER),buttonType:null!=I?I:"primary",LeadingIcon:O,buttonText:null!=B?B:"Retry",matchParentWidth:!0})]}))})]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{COLORS as o}from"../../constants/Theme.js";import i from"../../assets/icons/errorIcon.svg.js";import s from"../../assets/icons/retryIcon.svg.js";import r from"../../assets/icons/successIcon.svg.js";import c from"../../assets/icons/warningIcon.svg.js";import{Button as a}from"../button/Button.js";import{Spinner as l}from"../spinner/Spinner.js";import{TitleRegular as d,TitleMedium as h,BodyPrimary as m,BodySecondary as u}from"../TypographyStyle.js";import{StateComponentContainer as g,StateIcon as p,StateHeading as L,StateSubline as y,ButtonContainer as j}from"./StateComponent.styled.js";var E,b,O;!function(t){t.SUCCESS="success",t.ERROR="error",t.WARNING="warning",t.LOADING="loading",t.RETRY="retry"}(E||(E={})),function(t){t.CANCEL="cancel",t.OTHER="other"}(b||(b={})),function(t){t.SINGLE="SINGLE",t.DOUBLE="DOUBLE"}(O||(O={}));const R=R=>{var S;const T=()=>f==E.SUCCESS?n(r,{}):f==E.WARNING?n(c,{}):f==E.ERROR?n(i,{}):f===E.LOADING?n(l,{size:"large"}):f===E.RETRY?n(s,{}):void 0,{states:f,heading:C,subline:I,icon:A=T(),isButtonEnabled:N,type:z,buttonText:v,buttonType:B,onButtonClick:x,leadingIcon:G,width:W,headerImage:w,iconWidth:D,iconHeight:U,closeButtonType:H,secondaryButtonText:M}=R;return t(g,Object.assign({width:W},{children:[n(p,Object.assign({iconWidth:D,iconHeight:U},{children:w?n("img",{src:w,width:"100%",height:"auto",alt:""}):A})),t(L,Object.assign({size:R.size},{children:["SMALL"===R.size&&n(d,{children:C}),"SMALL"!==R.size&&n(h,{children:C})]})),t(y,{children:["SMALL"!==R.size&&n(m,Object.assign({color:o.content.secondary},{children:I})),"SMALL"===R.size&&n(u,Object.assign({color:o.content.secondary},{children:I}))]}),null!==(S=R.children)&&void 0!==S?S:n(e,{}),N&&n(e,{children:t(j,Object.assign({size:R.size},{children:[z==O.DOUBLE&&n(a,{onClick:()=>x&&x(b.CANCEL),buttonType:H||"secondary",buttonText:M||"Cancel",matchParentWidth:!0}),n(a,{onClick:()=>x&&x(b.OTHER),buttonType:null!=B?B:"primary",LeadingIcon:G,buttonText:null!=v?v:"Retry",matchParentWidth:!0})]}))})]}))};export{b as ButtonActions,O as ButtonTypes,R as StateComponent,E as StateInterface};
|