@bikdotai/bik-component-library 0.0.245-beta.4 → 0.0.245-beta.6
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/modals/Modal.d.ts +1 -1
- package/dist/cjs/components/modals/Modal.js +1 -1
- package/dist/cjs/components/modals/styledModal.d.ts +1 -1
- package/dist/cjs/components/states-modal/StateModalComponent.d.ts +1 -0
- package/dist/cjs/components/states-modal/StateModalComponent.js +1 -1
- package/dist/esm/components/modals/Modal.d.ts +1 -1
- package/dist/esm/components/modals/Modal.js +1 -1
- package/dist/esm/components/modals/styledModal.d.ts +1 -1
- package/dist/esm/components/states-modal/StateModalComponent.d.ts +1 -0
- package/dist/esm/components/states-modal/StateModalComponent.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./modal.styled.js"),s=require("../../constants/Theme.js"),n=require("../../assets/icons/cross.svg.js");exports.Modal=o=>{var r;return e.jsx(e.Fragment,{children:o.open&&e.jsx(t.RootContainer,Object.assign({"data-test":o["data-test"],zIndex:o.zIndex||1,onClick:e=>{o.closeOnOutsideClick&&o.onClose?o.onClose():e.stopPropagation()}},{children:e.jsx(t.CentralContainer,Object.assign({style:Object.assign({},null!==(r=o.centralContainerStyles)&&void 0!==r?r:{}),onClick:e=>{e.stopPropagation()},width:o.width},{children:e.jsxs(e.Fragment,{children:[!(null==o?void 0:o.hideCrossButton)&&e.jsx(t.CloseButtonContainer,Object.assign({"data-test":"modal-close-button",onClick:()=>o.onClose&&o.onClose()},{children:e.jsx(n.default,{height:20,width:20,color:s.COLORS.content.secondary})})),o.children]})}))}))})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../assets/icons/errorIcon.svg.js"),s=require("../../assets/icons/successIcon.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../assets/icons/errorIcon.svg.js"),s=require("../../assets/icons/successIcon.svg.js"),a=require("../../assets/icons/warningIcon.svg.js"),r=require("../modals/styledModal.js"),i=require("../spinner/Spinner.js"),o=require("../states/StateComponent.js");exports.StateModalComponent=c=>{const l=()=>d==o.StateInterface.SUCCESS?e.jsx(s.default,{}):d==o.StateInterface.WARNING?e.jsx(a.default,{}):d==o.StateInterface.ERROR?e.jsx(n.default,{}):d===o.StateInterface.LOADING?e.jsx(i.Spinner,{size:"large"}):void 0,{states:d,heading:u,subline:I,icon:j=l(),isButtonEnabled:S,type:x,buttonText:C,onButtonClick:f,leadingIcon:p,width:g,zIndex:b}=c,[h,O]=t.useState(!0);return e.jsx(r.StyledModal,Object.assign({"data-test":c["data-test"],open:h,onClose:function(){c.onClose&&c.onClose(),O(!1)},closeOnOutsideClick:!(d===o.StateInterface.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:g},hideCrossButton:d===o.StateInterface.LOADING,zIndex:b},{children:e.jsx(o.StateComponent,Object.assign({states:d,heading:u,subline:I,isButtonEnabled:S,leadingIcon:p,type:x,buttonText:C,onButtonClick:f,icon:j,width:g||400},{children:c.children}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,Fragment as t,jsxs as
|
|
1
|
+
import{jsx as o,Fragment as t,jsxs as s}from"react/jsx-runtime";import{RootContainer as e,CentralContainer as n,CloseButtonContainer as i}from"./modal.styled.js";import{COLORS as r}from"../../constants/Theme.js";import l from"../../assets/icons/cross.svg.js";const c=c=>{var a;return o(t,{children:c.open&&o(e,Object.assign({"data-test":c["data-test"],zIndex:c.zIndex||1,onClick:o=>{c.closeOnOutsideClick&&c.onClose?c.onClose():o.stopPropagation()}},{children:o(n,Object.assign({style:Object.assign({},null!==(a=c.centralContainerStyles)&&void 0!==a?a:{}),onClick:o=>{o.stopPropagation()},width:c.width},{children:s(t,{children:[!(null==c?void 0:c.hideCrossButton)&&o(i,Object.assign({"data-test":"modal-close-button",onClick:()=>c.onClose&&c.onClose()},{children:o(l,{height:20,width:20,color:r.content.secondary})})),c.children]})}))}))})};export{c as Modal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import e from"../../assets/icons/errorIcon.svg.js";import
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useState as n}from"react";import e from"../../assets/icons/errorIcon.svg.js";import s from"../../assets/icons/successIcon.svg.js";import o from"../../assets/icons/warningIcon.svg.js";import{StyledModal as i}from"../modals/styledModal.js";import{Spinner as r}from"../spinner/Spinner.js";import{StateInterface as a,StateComponent as c}from"../states/StateComponent.js";const l=l=>{const d=()=>m==a.SUCCESS?t(s,{}):m==a.WARNING?t(o,{}):m==a.ERROR?t(e,{}):m===a.LOADING?t(r,{size:"large"}):void 0,{states:m,heading:p,subline:u,icon:g=d(),isButtonEnabled:C,type:I,buttonText:f,onButtonClick:j,leadingIcon:h,width:b,zIndex:O}=l,[x,y]=n(!0);return t(i,Object.assign({"data-test":l["data-test"],open:x,onClose:function(){l.onClose&&l.onClose(),y(!1)},closeOnOutsideClick:!(m===a.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:b},hideCrossButton:m===a.LOADING,zIndex:O},{children:t(c,Object.assign({states:m,heading:p,subline:u,isButtonEnabled:C,leadingIcon:h,type:I,buttonText:f,onButtonClick:j,icon:g,width:b||400},{children:l.children}))}))};export{l as StateModalComponent};
|