@bikdotai/bik-component-library 0.0.647--beta--analytics0.2 → 0.0.647--beta--analytics0.3

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 n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r,n,c=e(require("react"));function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l.apply(this,arguments)}var a=e=>c.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 56 56"},e),t||(t=c.createElement("rect",{width:56,height:56,fill:"#F0F0F0",rx:28})),r||(r=c.createElement("path",{fill:"#9E9E9E",d:"M28 21.333c.736 0 1.333.597 1.333 1.334V28a1.333 1.333 0 0 1-2.666 0v-5.333c0-.737.596-1.334 1.333-1.334ZM28 33.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666Z"})),n||(n=c.createElement("path",{fill:"#9E9E9E",fillRule:"evenodd",d:"M13.333 28c0-8.1 6.567-14.667 14.667-14.667S42.667 19.9 42.667 28 36.1 42.667 28 42.667 13.333 36.1 13.333 28ZM28 16c-6.628 0-12 5.373-12 12s5.372 12 12 12c6.627 0 12-5.373 12-12s-5.373-12-12-12Z",clipRule:"evenodd"})));exports.default=a;
@@ -6,7 +6,8 @@ export declare enum StateInterface {
6
6
  ERROR = "error",
7
7
  WARNING = "warning",
8
8
  LOADING = "loading",
9
- RETRY = "retry"
9
+ RETRY = "retry",
10
+ info = "info"
10
11
  }
11
12
  export declare enum ButtonActions {
12
13
  CANCEL = "cancel",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e,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,(t=exports.StateInterface||(exports.StateInterface={})).SUCCESS="success",t.ERROR="error",t.WARNING="warning",t.LOADING="loading",t.RETRY="retry",exports.ButtonActions=void 0,(e=exports.ButtonActions||(exports.ButtonActions={})).CANCEL="cancel",e.OTHER="other",exports.ButtonTypes=void 0,(s=exports.ButtonTypes||(exports.ButtonTypes={})).SINGLE="SINGLE",s.DOUBLE="DOUBLE";exports.StateComponent=t=>{var e;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:m,"data-test":A}=t;return n.jsxs(x.StateComponentContainer,Object.assign({width:T,"data-test":A},{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:t.size},{children:["SMALL"===t.size&&n.jsx(l.TitleRegular,{children:j}),"SMALL"!==t.size&&n.jsx(l.TitleMedium,{children:j})]})),n.jsxs(x.StateSubline,{children:["SMALL"!==t.size&&n.jsx(l.BodyPrimary,Object.assign({color:r.COLORS.content.secondary},{children:S})),"SMALL"===t.size&&n.jsx(l.BodySecondary,Object.assign({color:r.COLORS.content.secondary},{children:S}))]}),null!==(e=t.children)&&void 0!==e?e:n.jsx(n.Fragment,{}),g&&n.jsx(n.Fragment,{children:n.jsxs(x.ButtonContainer,Object.assign({size:t.size},{children:[y==exports.ButtonTypes.DOUBLE&&n.jsx(u.Button,{"data-test":`${A}-cancel`,onClick:()=>L&&L(exports.ButtonActions.CANCEL),buttonType:E||"secondary",buttonText:m||"Cancel",matchParentWidth:!0}),n.jsx(u.Button,{"data-test":`${A}-primary`,onClick:()=>L&&L(exports.ButtonActions.OTHER),buttonType:null!=I?I:"primary",LeadingIcon:O,buttonText:null!=B?B:"Retry",matchParentWidth:!0})]}))})]}))};
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("../../assets/icons/state_icon.svg.js"),d=require("../button/Button.js"),l=require("../spinner/Spinner.js"),x=require("../TypographyStyle.js"),p=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",e.info="info",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=()=>j==exports.StateInterface.SUCCESS?n.jsx(a.default,{}):j==exports.StateInterface.WARNING?n.jsx(c.default,{}):j==exports.StateInterface.ERROR?n.jsx(o.default,{}):j===exports.StateInterface.LOADING?n.jsx(l.Spinner,{size:"large"}):j===exports.StateInterface.RETRY?n.jsx(i.default,{}):j==exports.StateInterface.info?n.jsx(u.default,{}):void 0,{states:j,heading:S,subline:h,icon:g=s(),isButtonEnabled:y,type:I,buttonText:B,buttonType:L,onButtonClick:O,leadingIcon:T,width:C,headerImage:f,iconWidth:R,iconHeight:b,closeButtonType:E,secondaryButtonText:m,"data-test":A}=e;return n.jsxs(p.StateComponentContainer,Object.assign({width:C,"data-test":A},{children:[n.jsx(p.StateIcon,Object.assign({iconWidth:R,iconHeight:b},{children:f?n.jsx("img",{src:f,width:"100%",height:"auto",alt:""}):g})),n.jsxs(p.StateHeading,Object.assign({size:e.size},{children:["SMALL"===e.size&&n.jsx(x.TitleRegular,{children:S}),"SMALL"!==e.size&&n.jsx(x.TitleMedium,{children:S})]})),n.jsxs(p.StateSubline,{children:["SMALL"!==e.size&&n.jsx(x.BodyPrimary,Object.assign({color:r.COLORS.content.secondary},{children:h})),"SMALL"===e.size&&n.jsx(x.BodySecondary,Object.assign({color:r.COLORS.content.secondary},{children:h}))]}),null!==(t=e.children)&&void 0!==t?t:n.jsx(n.Fragment,{}),y&&n.jsx(n.Fragment,{children:n.jsxs(p.ButtonContainer,Object.assign({size:e.size},{children:[I==exports.ButtonTypes.DOUBLE&&n.jsx(d.Button,{"data-test":`${A}-cancel`,onClick:()=>O&&O(exports.ButtonActions.CANCEL),buttonType:E||"secondary",buttonText:m||"Cancel",matchParentWidth:!0}),n.jsx(d.Button,{"data-test":`${A}-primary`,onClick:()=>O&&O(exports.ButtonActions.OTHER),buttonType:null!=L?L:"primary",LeadingIcon:T,buttonText:null!=B?B:"Retry",matchParentWidth:!0})]}))})]}))};
@@ -0,0 +1 @@
1
+ import*as e from"react";var t,r,l;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e},a.apply(this,arguments)}var n=n=>e.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 56 56"},n),t||(t=e.createElement("rect",{width:56,height:56,fill:"#F0F0F0",rx:28})),r||(r=e.createElement("path",{fill:"#9E9E9E",d:"M28 21.333c.736 0 1.333.597 1.333 1.334V28a1.333 1.333 0 0 1-2.666 0v-5.333c0-.737.596-1.334 1.333-1.334ZM28 33.333a1.333 1.333 0 1 0 0-2.666 1.333 1.333 0 0 0 0 2.666Z"})),l||(l=e.createElement("path",{fill:"#9E9E9E",fillRule:"evenodd",d:"M13.333 28c0-8.1 6.567-14.667 14.667-14.667S42.667 19.9 42.667 28 36.1 42.667 28 42.667 13.333 36.1 13.333 28ZM28 16c-6.628 0-12 5.373-12 12s5.372 12 12 12c6.627 0 12-5.373 12-12s-5.373-12-12-12Z",clipRule:"evenodd"})));export{n as default};
@@ -6,7 +6,8 @@ export declare enum StateInterface {
6
6
  ERROR = "error",
7
7
  WARNING = "warning",
8
8
  LOADING = "loading",
9
- RETRY = "retry"
9
+ RETRY = "retry",
10
+ info = "info"
10
11
  }
11
12
  export declare enum ButtonActions {
12
13
  CANCEL = "cancel",
@@ -1 +1 @@
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 d}from"../spinner/Spinner.js";import{TitleRegular as l,TitleMedium as h,BodyPrimary as m,BodySecondary as u}from"../TypographyStyle.js";import{StateComponentContainer as g,StateIcon as p,StateHeading as y,StateSubline as L,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(d,{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,"data-test":k}=R;return t(g,Object.assign({width:W,"data-test":k},{children:[n(p,Object.assign({iconWidth:D,iconHeight:U},{children:w?n("img",{src:w,width:"100%",height:"auto",alt:""}):A})),t(y,Object.assign({size:R.size},{children:["SMALL"===R.size&&n(l,{children:C}),"SMALL"!==R.size&&n(h,{children:C})]})),t(L,{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,{"data-test":`${k}-cancel`,onClick:()=>x&&x(b.CANCEL),buttonType:H||"secondary",buttonText:M||"Cancel",matchParentWidth:!0}),n(a,{"data-test":`${k}-primary`,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};
1
+ import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{COLORS as o}from"../../constants/Theme.js";import s from"../../assets/icons/errorIcon.svg.js";import i from"../../assets/icons/retryIcon.svg.js";import r from"../../assets/icons/successIcon.svg.js";import c from"../../assets/icons/warningIcon.svg.js";import a from"../../assets/icons/state_icon.svg.js";import{Button as d}from"../button/Button.js";import{Spinner as l}from"../spinner/Spinner.js";import{TitleRegular as m,TitleMedium as h,BodyPrimary as g,BodySecondary as p}from"../TypographyStyle.js";import{StateComponentContainer as u,StateIcon as y,StateHeading as L,StateSubline as f,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",t.info="info"}(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=()=>C==E.SUCCESS?n(r,{}):C==E.WARNING?n(c,{}):C==E.ERROR?n(s,{}):C===E.LOADING?n(l,{size:"large"}):C===E.RETRY?n(i,{}):C==E.info?n(a,{}):void 0,{states:C,heading:I,subline:A,icon:N=T(),isButtonEnabled:v,type:z,buttonText:B,buttonType:x,onButtonClick:G,leadingIcon:W,width:w,headerImage:D,iconWidth:U,iconHeight:H,closeButtonType:M,secondaryButtonText:k,"data-test":P}=R;return t(u,Object.assign({width:w,"data-test":P},{children:[n(y,Object.assign({iconWidth:U,iconHeight:H},{children:D?n("img",{src:D,width:"100%",height:"auto",alt:""}):N})),t(L,Object.assign({size:R.size},{children:["SMALL"===R.size&&n(m,{children:I}),"SMALL"!==R.size&&n(h,{children:I})]})),t(f,{children:["SMALL"!==R.size&&n(g,Object.assign({color:o.content.secondary},{children:A})),"SMALL"===R.size&&n(p,Object.assign({color:o.content.secondary},{children:A}))]}),null!==(S=R.children)&&void 0!==S?S:n(e,{}),v&&n(e,{children:t(j,Object.assign({size:R.size},{children:[z==O.DOUBLE&&n(d,{"data-test":`${P}-cancel`,onClick:()=>G&&G(b.CANCEL),buttonType:M||"secondary",buttonText:k||"Cancel",matchParentWidth:!0}),n(d,{"data-test":`${P}-primary`,onClick:()=>G&&G(b.OTHER),buttonType:null!=x?x:"primary",LeadingIcon:W,buttonText:null!=B?B:"Retry",matchParentWidth:!0})]}))})]}))};export{b as ButtonActions,O as ButtonTypes,R as StateComponent,E as StateInterface};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.647--beta--analytics0.2",
3
+ "version": "0.0.647--beta--analytics0.3",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",