@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.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare const Modal: React.FC<{
3
- 'data-test': string;
3
+ 'data-test'?: string;
4
4
  open: boolean;
5
5
  onClose?: () => void;
6
6
  children?: React.ReactNode;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("./modal.styled.js"),t=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(s.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(s.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(s.CloseButtonContainer,Object.assign({onClick:()=>o.onClose&&o.onClose()},{children:e.jsx(n.default,{height:20,width:20,color:t.COLORS.content.secondary})})),o.children]})}))}))})};
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,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ButtonProps } from '../button/model';
3
3
  export declare const StyledModal: React.FC<{
4
- 'data-test': string;
4
+ 'data-test'?: string;
5
5
  open: boolean;
6
6
  onClose?: () => void;
7
7
  children?: React.ReactNode;
@@ -15,5 +15,6 @@ export type StateModalComponentProps = {
15
15
  width?: number;
16
16
  onClose?: () => void;
17
17
  zIndex?: number;
18
+ 'data-test'?: string;
18
19
  };
19
20
  export declare const StateModalComponent: React.FC<React.PropsWithChildren<StateModalComponentProps>>;
@@ -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"),r=require("../../assets/icons/warningIcon.svg.js"),i=require("../modals/styledModal.js"),o=require("../spinner/Spinner.js"),a=require("../states/StateComponent.js");exports.StateModalComponent=c=>{const l=()=>u==a.StateInterface.SUCCESS?e.jsx(s.default,{}):u==a.StateInterface.WARNING?e.jsx(r.default,{}):u==a.StateInterface.ERROR?e.jsx(n.default,{}):u===a.StateInterface.LOADING?e.jsx(o.Spinner,{size:"large"}):void 0,{states:u,heading:d,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(i.StyledModal,Object.assign({open:h,onClose:function(){c.onClose&&c.onClose(),O(!1)},closeOnOutsideClick:!(u===a.StateInterface.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:g},hideCrossButton:u===a.StateInterface.LOADING,zIndex:b},{children:e.jsx(a.StateComponent,Object.assign({states:u,heading:d,subline:I,isButtonEnabled:S,leadingIcon:p,type:x,buttonText:C,onButtonClick:f,icon:j,width:g||400},{children:c.children}))}))};
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,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare const Modal: React.FC<{
3
- 'data-test': string;
3
+ 'data-test'?: string;
4
4
  open: boolean;
5
5
  onClose?: () => void;
6
6
  children?: React.ReactNode;
@@ -1 +1 @@
1
- import{jsx as o,Fragment as t,jsxs as n}from"react/jsx-runtime";import{RootContainer as s,CentralContainer as e,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(s,Object.assign({"data-test":c["data-test"],zIndex:c.zIndex||1,onClick:o=>{c.closeOnOutsideClick&&c.onClose?c.onClose():o.stopPropagation()}},{children:o(e,Object.assign({style:Object.assign({},null!==(a=c.centralContainerStyles)&&void 0!==a?a:{}),onClick:o=>{o.stopPropagation()},width:c.width},{children:n(t,{children:[!(null==c?void 0:c.hideCrossButton)&&o(i,Object.assign({onClick:()=>c.onClose&&c.onClose()},{children:o(l,{height:20,width:20,color:r.content.secondary})})),c.children]})}))}))})};export{c as Modal};
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,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ButtonProps } from '../button/model';
3
3
  export declare const StyledModal: React.FC<{
4
- 'data-test': string;
4
+ 'data-test'?: string;
5
5
  open: boolean;
6
6
  onClose?: () => void;
7
7
  children?: React.ReactNode;
@@ -15,5 +15,6 @@ export type StateModalComponentProps = {
15
15
  width?: number;
16
16
  onClose?: () => void;
17
17
  zIndex?: number;
18
+ 'data-test'?: string;
18
19
  };
19
20
  export declare const StateModalComponent: React.FC<React.PropsWithChildren<StateModalComponentProps>>;
@@ -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 o from"../../assets/icons/successIcon.svg.js";import s 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 c,StateComponent as a}from"../states/StateComponent.js";const l=l=>{const d=()=>m==c.SUCCESS?t(o,{}):m==c.WARNING?t(s,{}):m==c.ERROR?t(e,{}):m===c.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({open:x,onClose:function(){l.onClose&&l.onClose(),y(!1)},closeOnOutsideClick:!(m===c.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:b},hideCrossButton:m===c.LOADING,zIndex:O},{children:t(a,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};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.245-beta.4",
3
+ "version": "0.0.245-beta.6",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",