@bikdotai/bik-component-library 0.0.772-test.12 → 0.0.772-test.13

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.
@@ -0,0 +1 @@
1
+ "use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r,a=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},n.apply(this,arguments)}var c=e=>a.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},e),t||(t=a.createElement("g",{clipPath:"url(#archive-icon_svg__a)"},a.createElement("path",{fill:"currentColor",d:"M17.5 2.5c.805 0 1.458.653 1.458 1.458v1.875c0 .755-.573 1.376-1.309 1.451l-.149.008v8.398c0 .368-.114.752-.356 1.059a1.383 1.383 0 0 1-1.083.543H3.939c-.454 0-.836-.23-1.083-.543a1.718 1.718 0 0 1-.356-1.06V7.293l-.15-.008a1.459 1.459 0 0 1-1.308-1.451V3.958c0-.805.653-1.458 1.458-1.458h15ZM4.167 15.625h11.666V7.292H4.167v8.333Zm7.708-6.875a.833.833 0 0 1 0 1.667h-3.75a.834.834 0 0 1 0-1.667h3.75ZM2.708 5.625h14.584V4.167H2.708v1.458Z"}))),r||(r=a.createElement("defs",null,a.createElement("clipPath",{id:"archive-icon_svg__a"},a.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))));exports.default=c;
@@ -0,0 +1 @@
1
+ "use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r,a=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},n.apply(this,arguments)}var l=e=>a.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},e),t||(t=a.createElement("path",{fill:"currentColor",d:"M10.133 8.372h.015a.646.646 0 0 1 .107.015h.003c.037.01.073.021.107.036.024.01.046.024.069.037a.65.65 0 0 1 .134.1l2.5 2.5a.648.648 0 0 1-.916.917l-1.394-1.394v3.152a.648.648 0 0 1-1.296 0v-3.152l-1.394 1.394a.648.648 0 0 1-.916-.917l2.5-2.5.05-.044.02-.014a.647.647 0 0 1 .296-.125l.01-.001a.656.656 0 0 1 .082-.005h.023Z"})),r||(r=a.createElement("path",{fill:"#212121",fillRule:"evenodd",d:"M17.5 2.511c.805 0 1.458.653 1.458 1.459v1.875c0 .805-.653 1.458-1.458 1.458h-.2v8.451c0 .364-.109.744-.343 1.052a1.36 1.36 0 0 1-1.079.556H4.121a1.36 1.36 0 0 1-1.079-.556 1.746 1.746 0 0 1-.342-1.052v-8.45h-.2a1.459 1.459 0 0 1-1.458-1.46V3.97c0-.806.653-1.459 1.458-1.459h15ZM4.367 15.695h11.265V7.303H4.367v8.392ZM2.708 5.636h14.584V4.178H2.708v1.458Z",clipRule:"evenodd"})));exports.default=l;
@@ -7,6 +7,7 @@ export type StateModalComponentProps = {
7
7
  heading: string;
8
8
  subline: string;
9
9
  icon?: JSX.Element;
10
+ iconType?: string;
10
11
  isButtonEnabled: boolean;
11
12
  type?: ButtonTypes;
12
13
  buttonText?: string;
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../constants/zindex.js"),s=require("../../assets/icons/errorIcon.svg.js"),r=require("../../assets/icons/successIcon.svg.js"),o=require("../../assets/icons/warningIcon.svg.js"),a=require("../modals/styledModal.js"),i=require("../spinner/Spinner.js"),c=require("../../constants/Theme.js"),u=require("../states/StateComponent.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const l=d(require("styled-components")).default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../constants/zindex.js"),s=require("../../assets/icons/errorIcon.svg.js"),r=require("../../assets/icons/successIcon.svg.js"),i=require("../../assets/icons/warningIcon.svg.js"),a=require("../../assets/icons/archive-icon.svg.js"),o=require("../../assets/icons/unarchive.svg.js"),c=require("../modals/styledModal.js"),u=require("../spinner/Spinner.js"),d=require("../../constants/Theme.js"),l=require("../states/StateComponent.js"),h=require("styled-components"),j=require("@bikdotai/bik-models/crm/models/macros");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const f=x(h).default.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
5
5
  width: 64px;
6
6
  height: 64px;
7
- background-color: ${c.COLORS.background.base};
7
+ background-color: ${d.COLORS.background.base};
8
8
  border-radius: 32px;
9
- `;exports.StateModalComponent=c=>{const d=()=>{switch(x){case u.StateInterface.SUCCESS:return e.jsx(r.default,{});case u.StateInterface.WARNING:return e.jsx(o.default,{});case u.StateInterface.ERROR:return e.jsx(s.default,{});case u.StateInterface.LOADING:return e.jsx(i.Spinner,{size:"large"});default:return e.jsx(l,{children:f})}},{states:x,heading:j,subline:p,icon:f=d(),isButtonEnabled:h,type:g,buttonText:I,onButtonClick:S,leadingIcon:y,width:C,zIndex:b,headerImage:m,iconHeight:O,iconWidth:q,closeButtonType:B,secondaryButtonText:T}=c,[v,w]=t.useState(!0);return e.jsx(a.StyledModal,Object.assign({"data-test":c["data-test"],open:v,onClose:function(){c.onClose&&c.onClose(),w(!1)},closeOnOutsideClick:!(x===u.StateInterface.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:C},hideCrossButton:x===u.StateInterface.LOADING,zIndex:b||n.ComponentZindex.STATE_MODAL},{children:e.jsx(u.StateComponent,Object.assign({states:x,heading:j,subline:p,isButtonEnabled:h,leadingIcon:y,type:g,buttonText:I,onButtonClick:S,icon:f,width:C||400,headerImage:m,iconHeight:O,iconWidth:q,closeButtonType:B,secondaryButtonText:T},{children:c.children}))}))};
9
+ `;exports.StateModalComponent=d=>{const h=()=>{if(d.iconType===j.MacroStatus.LIVE)return e.jsx(f,{children:e.jsx(a.default,{height:40,width:40})});if(d.iconType===j.MacroStatus.ARCHIVED)return e.jsx(f,{children:e.jsx(o.default,{height:40,width:40})});switch(x){case l.StateInterface.SUCCESS:return e.jsx(r.default,{});case l.StateInterface.WARNING:return e.jsx(i.default,{});case l.StateInterface.ERROR:return e.jsx(s.default,{});case l.StateInterface.LOADING:return e.jsx(u.Spinner,{size:"large"});default:return e.jsx(e.Fragment,{})}},{states:x,heading:g,subline:p,icon:I=h(),isButtonEnabled:S,type:y,buttonText:m,onButtonClick:C,leadingIcon:b,width:q,zIndex:O,headerImage:T,iconHeight:v,iconWidth:B,closeButtonType:w,secondaryButtonText:k}=d,[A,E]=t.useState(!0);return e.jsx(c.StyledModal,Object.assign({"data-test":d["data-test"],open:A,onClose:function(){d.onClose&&d.onClose(),E(!1)},closeOnOutsideClick:!(x===l.StateInterface.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:q},hideCrossButton:x===l.StateInterface.LOADING,zIndex:O||n.ComponentZindex.STATE_MODAL},{children:e.jsx(l.StateComponent,Object.assign({states:x,heading:g,subline:p,isButtonEnabled:S,leadingIcon:b,type:y,buttonText:m,onButtonClick:C,icon:I,width:q||400,headerImage:T,iconHeight:v,iconWidth:B,closeButtonType:w,secondaryButtonText:k},{children:d.children}))}))};
@@ -0,0 +1 @@
1
+ import*as e from"react";var t,a;function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},r.apply(this,arguments)}var l=l=>e.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},l),t||(t=e.createElement("g",{clipPath:"url(#archive-icon_svg__a)"},e.createElement("path",{fill:"currentColor",d:"M17.5 2.5c.805 0 1.458.653 1.458 1.458v1.875c0 .755-.573 1.376-1.309 1.451l-.149.008v8.398c0 .368-.114.752-.356 1.059a1.383 1.383 0 0 1-1.083.543H3.939c-.454 0-.836-.23-1.083-.543a1.718 1.718 0 0 1-.356-1.06V7.293l-.15-.008a1.459 1.459 0 0 1-1.308-1.451V3.958c0-.805.653-1.458 1.458-1.458h15ZM4.167 15.625h11.666V7.292H4.167v8.333Zm7.708-6.875a.833.833 0 0 1 0 1.667h-3.75a.834.834 0 0 1 0-1.667h3.75ZM2.708 5.625h14.584V4.167H2.708v1.458Z"}))),a||(a=e.createElement("defs",null,e.createElement("clipPath",{id:"archive-icon_svg__a"},e.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))));export{l as default};
@@ -0,0 +1 @@
1
+ import*as e from"react";var a,t;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},l.apply(this,arguments)}var r=r=>e.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"},r),a||(a=e.createElement("path",{fill:"currentColor",d:"M10.133 8.372h.015a.646.646 0 0 1 .107.015h.003c.037.01.073.021.107.036.024.01.046.024.069.037a.65.65 0 0 1 .134.1l2.5 2.5a.648.648 0 0 1-.916.917l-1.394-1.394v3.152a.648.648 0 0 1-1.296 0v-3.152l-1.394 1.394a.648.648 0 0 1-.916-.917l2.5-2.5.05-.044.02-.014a.647.647 0 0 1 .296-.125l.01-.001a.656.656 0 0 1 .082-.005h.023Z"})),t||(t=e.createElement("path",{fill:"#212121",fillRule:"evenodd",d:"M17.5 2.511c.805 0 1.458.653 1.458 1.459v1.875c0 .805-.653 1.458-1.458 1.458h-.2v8.451c0 .364-.109.744-.343 1.052a1.36 1.36 0 0 1-1.079.556H4.121a1.36 1.36 0 0 1-1.079-.556 1.746 1.746 0 0 1-.342-1.052v-8.45h-.2a1.459 1.459 0 0 1-1.458-1.46V3.97c0-.806.653-1.459 1.458-1.459h15ZM4.367 15.695h11.265V7.303H4.367v8.392ZM2.708 5.636h14.584V4.178H2.708v1.458Z",clipRule:"evenodd"})));export{r as default};
@@ -7,6 +7,7 @@ export type StateModalComponentProps = {
7
7
  heading: string;
8
8
  subline: string;
9
9
  icon?: JSX.Element;
10
+ iconType?: string;
10
11
  isButtonEnabled: boolean;
11
12
  type?: ButtonTypes;
12
13
  buttonText?: string;
@@ -1,9 +1,9 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as e}from"react";import{ComponentZindex as n}from"../../constants/zindex.js";import o from"../../assets/icons/errorIcon.svg.js";import s from"../../assets/icons/successIcon.svg.js";import i from"../../assets/icons/warningIcon.svg.js";import{StyledModal as r}from"../modals/styledModal.js";import{Spinner as c}from"../spinner/Spinner.js";import{COLORS as a}from"../../constants/Theme.js";import{StateInterface as d,StateComponent as l}from"../states/StateComponent.js";import m from"styled-components";const u=a=>{const m=()=>{switch(u){case d.SUCCESS:return t(s,{});case d.WARNING:return t(i,{});case d.ERROR:return t(o,{});case d.LOADING:return t(c,{size:"large"});default:return t(p,{children:f})}},{states:u,heading:h,subline:g,icon:f=m(),isButtonEnabled:x,type:I,buttonText:j,onButtonClick:y,leadingIcon:b,width:C,zIndex:B,headerImage:O,iconHeight:T,iconWidth:S,closeButtonType:w,secondaryButtonText:A}=a,[k,E]=e(!0);return t(r,Object.assign({"data-test":a["data-test"],open:k,onClose:function(){a.onClose&&a.onClose(),E(!1)},closeOnOutsideClick:!(u===d.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:C},hideCrossButton:u===d.LOADING,zIndex:B||n.STATE_MODAL},{children:t(l,Object.assign({states:u,heading:h,subline:g,isButtonEnabled:x,leadingIcon:b,type:I,buttonText:j,onButtonClick:y,icon:f,width:C||400,headerImage:O,iconHeight:T,iconWidth:S,closeButtonType:w,secondaryButtonText:A},{children:a.children}))}))},p=m.div`
1
+ import{jsx as t,Fragment as e}from"react/jsx-runtime";import{useState as n}from"react";import{ComponentZindex as o}from"../../constants/zindex.js";import s from"../../assets/icons/errorIcon.svg.js";import i from"../../assets/icons/successIcon.svg.js";import r from"../../assets/icons/warningIcon.svg.js";import c from"../../assets/icons/archive-icon.svg.js";import a from"../../assets/icons/unarchive.svg.js";import{StyledModal as d}from"../modals/styledModal.js";import{Spinner as m}from"../spinner/Spinner.js";import{COLORS as l}from"../../constants/Theme.js";import{StateInterface as u,StateComponent as p}from"../states/StateComponent.js";import h from"styled-components";import{MacroStatus as g}from"@bikdotai/bik-models/crm/models/macros";const f=l=>{const h=()=>{if(l.iconType===g.LIVE)return t(I,{children:t(c,{height:40,width:40})});if(l.iconType===g.ARCHIVED)return t(I,{children:t(a,{height:40,width:40})});switch(f){case u.SUCCESS:return t(i,{});case u.WARNING:return t(r,{});case u.ERROR:return t(s,{});case u.LOADING:return t(m,{size:"large"});default:return t(e,{})}},{states:f,heading:j,subline:y,icon:b=h(),isButtonEnabled:x,type:C,buttonText:T,onButtonClick:B,leadingIcon:O,width:v,zIndex:w,headerImage:k,iconHeight:A,iconWidth:E,closeButtonType:S,secondaryButtonText:D}=l,[L,N]=n(!0);return t(d,Object.assign({"data-test":l["data-test"],open:L,onClose:function(){l.onClose&&l.onClose(),N(!1)},closeOnOutsideClick:!(f===u.LOADING),centralContainerStyles:{display:"flex",alignItems:"center",justifyContent:"center",width:v},hideCrossButton:f===u.LOADING,zIndex:w||o.STATE_MODAL},{children:t(p,Object.assign({states:f,heading:j,subline:y,isButtonEnabled:x,leadingIcon:O,type:C,buttonText:T,onButtonClick:B,icon:b,width:v||400,headerImage:k,iconHeight:A,iconWidth:E,closeButtonType:S,secondaryButtonText:D},{children:l.children}))}))},I=h.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
5
5
  width: 64px;
6
6
  height: 64px;
7
- background-color: ${a.background.base};
7
+ background-color: ${l.background.base};
8
8
  border-radius: 32px;
9
- `;export{u as StateModalComponent};
9
+ `;export{f as StateModalComponent};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.772-test.12",
3
+ "version": "0.0.772-test.13",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",