@bikdotai/bik-component-library 0.0.721 → 0.0.723
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-chatbot/components/ThinkingIndicator.js +8 -9
- package/dist/cjs/components/states/StateComponent.d.ts +1 -0
- package/dist/cjs/components/states/StateComponent.js +1 -1
- package/dist/esm/components/bik-chatbot/components/ThinkingIndicator.js +8 -9
- 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,11 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/react/jsx-runtime.js"),t=require("react"),s=require("styled-components"),a=require("../../../assets/icons/Idea.svg.js"),i=require("../../../assets/icons/AiEdit.svg.js"),r=require("../../../assets/icons/HelpIcon.svg.js")
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
padding: 16px 18px 20px;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../node_modules/react/jsx-runtime.js"),t=require("react"),s=require("styled-components"),a=require("../../../assets/icons/Idea.svg.js"),i=require("../../../assets/icons/AiEdit.svg.js"),r=require("../../../assets/icons/HelpIcon.svg.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const o=n(s).default.div`
|
|
2
|
+
background: linear-gradient(92.69deg, rgba(255, 230, 238, 0.5) 0.37%, rgba(255, 240, 231, 0.5) 100%);
|
|
3
|
+
padding: 24px;
|
|
5
4
|
border-radius: 16px;
|
|
6
5
|
border-bottom-left-radius: 6px;
|
|
7
6
|
width: clamp(260px, 70vw, 340px);
|
|
8
|
-
min-height:
|
|
7
|
+
min-height: 108px;
|
|
9
8
|
margin-right: auto;
|
|
10
9
|
font-size: 14px;
|
|
11
10
|
color: #1f2937;
|
|
@@ -62,9 +61,9 @@
|
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
.shimmer-line {
|
|
65
|
-
|
|
66
|
-
border-radius:
|
|
67
|
-
background:
|
|
64
|
+
height: 10px;
|
|
65
|
+
border-radius: 20px;
|
|
66
|
+
background: linear-gradient(92.69deg, #FEBAD2 0.37%, #FDD1B9 100%);
|
|
68
67
|
position: relative;
|
|
69
68
|
overflow: hidden;
|
|
70
69
|
animation: shimmerAppear 0.4s ease forwards;
|
|
@@ -145,4 +144,4 @@
|
|
|
145
144
|
transform: translateY(0);
|
|
146
145
|
}
|
|
147
146
|
}
|
|
148
|
-
`,
|
|
147
|
+
`,l=[{icon:a.default,text:"Analyzing your questions..."},{icon:i.default,text:"Gathering insights..."},{icon:r.default,text:"Crafting the perfect response..."}];exports.default=()=>{const[s,a]=t.useState(0);t.useEffect((()=>{const e=window.setInterval((()=>{a((e=>(e+1)%l.length))}),1800);return()=>window.clearInterval(e)}),[]);const i=l[s];return e.jsxRuntimeExports.jsxs(o,Object.assign({role:"status","aria-live":"polite"},{children:[e.jsxRuntimeExports.jsx(i.icon,{height:24,width:24}),e.jsxRuntimeExports.jsxs("div",Object.assign({className:"bubble-content"},{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"status-text"},{children:i.text})),e.jsxRuntimeExports.jsx("div",Object.assign({className:"dots"},{children:[0,1,2,3,4].map((t=>e.jsxRuntimeExports.jsx("span",{className:"dot",style:{animationDelay:.15*t+"s"}},t)))})),e.jsxRuntimeExports.jsx("div",Object.assign({className:"shimmer-group"},{children:[70,85,50].map(((t,s)=>e.jsxRuntimeExports.jsx("div",Object.assign({className:"shimmer-line",style:{width:`${t}%`,animationDelay:.25+.12*s+"s"}},{children:e.jsxRuntimeExports.jsx("span",{className:"shimmer-highlight"})}),t)))}))]}))]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e,s,n=require("../../node_modules/react/jsx-runtime.js"),r=require("../../constants/Theme.js"),o=require("../../assets/icons/errorIcon.svg.js"),i=require("../../assets/icons/retryIcon.svg.js"),a=require("../../assets/icons/
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e,s,n=require("../../node_modules/react/jsx-runtime.js"),r=require("../../constants/Theme.js"),o=require("../../assets/icons/errorIcon.svg.js"),i=require("../../assets/icons/retryIcon.svg.js"),a=require("../../assets/icons/state_icon.svg.js"),x=require("../../assets/icons/successIcon.svg.js"),c=require("../../assets/icons/warningIcon.svg.js"),u=require("../button/Button.js"),p=require("../spinner/Spinner.js"),j=require("../TypographyStyle.js"),d=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",t.INFO="info",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=()=>l==exports.StateInterface.SUCCESS?n.jsxRuntimeExports.jsx(x.default,{}):l==exports.StateInterface.WARNING?n.jsxRuntimeExports.jsx(c.default,{}):l==exports.StateInterface.ERROR?n.jsxRuntimeExports.jsx(o.default,{}):l===exports.StateInterface.LOADING?n.jsxRuntimeExports.jsx(p.Spinner,{size:"large"}):l===exports.StateInterface.RETRY?n.jsxRuntimeExports.jsx(i.default,{}):l==exports.StateInterface.INFO?n.jsxRuntimeExports.jsx(a.default,{}):void 0,{states:l,heading:R,subline:m,errorText:E,icon:S=s(),isButtonEnabled:g,type:h,buttonText:y,buttonType:I,onButtonClick:O,leadingIcon:B,width:T,headerImage:L,iconWidth:C,iconHeight:b,closeButtonType:f,secondaryButtonText:A,"data-test":v}=t;return n.jsxRuntimeExports.jsxs(d.StateComponentContainer,Object.assign({width:T,"data-test":v},{children:[n.jsxRuntimeExports.jsx(d.StateIcon,Object.assign({iconWidth:C,iconHeight:b},{children:L?n.jsxRuntimeExports.jsx("img",{src:L,width:"100%",height:"auto",alt:""}):S})),n.jsxRuntimeExports.jsxs(d.StateHeading,Object.assign({size:t.size},{children:["SMALL"===t.size&&n.jsxRuntimeExports.jsx(j.TitleRegular,{children:R}),"SMALL"!==t.size&&n.jsxRuntimeExports.jsx(j.TitleMedium,{children:R})]})),n.jsxRuntimeExports.jsxs(d.StateSubline,{children:["SMALL"!==t.size&&n.jsxRuntimeExports.jsx(j.BodyPrimary,Object.assign({color:r.COLORS.content.secondary},{children:m})),"SMALL"===t.size&&n.jsxRuntimeExports.jsx(j.BodySecondary,Object.assign({color:r.COLORS.content.secondary},{children:m})),E&&n.jsxRuntimeExports.jsx(j.BodySecondary,Object.assign({color:r.COLORS.content.negative,style:{marginTop:8,whiteSpace:"pre-line"}},{children:E}))]}),null!==(e=t.children)&&void 0!==e?e:n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{}),g&&n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:n.jsxRuntimeExports.jsxs(d.ButtonContainer,Object.assign({size:t.size},{children:[h==exports.ButtonTypes.DOUBLE&&n.jsxRuntimeExports.jsx(u.Button,{"data-test":`${v}-cancel`,onClick:()=>O&&O(exports.ButtonActions.CANCEL),buttonType:f||"secondary",buttonText:A||"Cancel",matchParentWidth:!0}),n.jsxRuntimeExports.jsx(u.Button,{"data-test":`${v}-primary`,onClick:()=>O&&O(exports.ButtonActions.OTHER),buttonType:null!=I?I:"primary",LeadingIcon:B,buttonText:null!=y?y:"Retry",matchParentWidth:!0})]}))})]}))};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import{j as e}from"../../../node_modules/react/jsx-runtime.js";import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
padding: 16px 18px 20px;
|
|
1
|
+
import{j as e}from"../../../node_modules/react/jsx-runtime.js";import{useState as t,useEffect as s}from"react";import a from"styled-components";import i from"../../../assets/icons/Idea.svg.js";import r from"../../../assets/icons/AiEdit.svg.js";import n from"../../../assets/icons/HelpIcon.svg.js";const o=a.div`
|
|
2
|
+
background: linear-gradient(92.69deg, rgba(255, 230, 238, 0.5) 0.37%, rgba(255, 240, 231, 0.5) 100%);
|
|
3
|
+
padding: 24px;
|
|
5
4
|
border-radius: 16px;
|
|
6
5
|
border-bottom-left-radius: 6px;
|
|
7
6
|
width: clamp(260px, 70vw, 340px);
|
|
8
|
-
min-height:
|
|
7
|
+
min-height: 108px;
|
|
9
8
|
margin-right: auto;
|
|
10
9
|
font-size: 14px;
|
|
11
10
|
color: #1f2937;
|
|
@@ -62,9 +61,9 @@ import{j as e}from"../../../node_modules/react/jsx-runtime.js";import t,{useStat
|
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
.shimmer-line {
|
|
65
|
-
|
|
66
|
-
border-radius:
|
|
67
|
-
background:
|
|
64
|
+
height: 10px;
|
|
65
|
+
border-radius: 20px;
|
|
66
|
+
background: linear-gradient(92.69deg, #FEBAD2 0.37%, #FDD1B9 100%);
|
|
68
67
|
position: relative;
|
|
69
68
|
overflow: hidden;
|
|
70
69
|
animation: shimmerAppear 0.4s ease forwards;
|
|
@@ -145,4 +144,4 @@ import{j as e}from"../../../node_modules/react/jsx-runtime.js";import t,{useStat
|
|
|
145
144
|
transform: translateY(0);
|
|
146
145
|
}
|
|
147
146
|
}
|
|
148
|
-
`,
|
|
147
|
+
`,l=[{icon:i,text:"Analyzing your questions..."},{icon:r,text:"Gathering insights..."},{icon:n,text:"Crafting the perfect response..."}],m=()=>{const[a,i]=t(0);s((()=>{const e=window.setInterval((()=>{i((e=>(e+1)%l.length))}),1800);return()=>window.clearInterval(e)}),[]);const r=l[a];return e.jsxs(o,Object.assign({role:"status","aria-live":"polite"},{children:[e.jsx(r.icon,{height:24,width:24}),e.jsxs("div",Object.assign({className:"bubble-content"},{children:[e.jsx("div",Object.assign({className:"status-text"},{children:r.text})),e.jsx("div",Object.assign({className:"dots"},{children:[0,1,2,3,4].map((t=>e.jsx("span",{className:"dot",style:{animationDelay:.15*t+"s"}},t)))})),e.jsx("div",Object.assign({className:"shimmer-group"},{children:[70,85,50].map(((t,s)=>e.jsx("div",Object.assign({className:"shimmer-line",style:{width:`${t}%`,animationDelay:.25+.12*s+"s"}},{children:e.jsx("span",{className:"shimmer-highlight"})}),t)))}))]}))]}))};export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as t}from"../../node_modules/react/jsx-runtime.js";import{COLORS as s}from"../../constants/Theme.js";import e from"../../assets/icons/errorIcon.svg.js";import n from"../../assets/icons/retryIcon.svg.js";import o from"../../assets/icons/state_icon.svg.js";import i from"../../assets/icons/successIcon.svg.js";import r from"../../assets/icons/warningIcon.svg.js";import{Button as c}from"../button/Button.js";import{Spinner as a}from"../spinner/Spinner.js";import{TitleRegular as j,TitleMedium as l,BodyPrimary as d,BodySecondary as m}from"../TypographyStyle.js";import{StateComponentContainer as h,StateIcon as g,StateHeading as x,StateSubline as p,ButtonContainer as u}from"./StateComponent.styled.js";var y,L,O;!function(t){t.SUCCESS="success",t.ERROR="error",t.WARNING="warning",t.LOADING="loading",t.RETRY="retry",t.INFO="info"}(y||(y={})),function(t){t.CANCEL="cancel",t.OTHER="other"}(L||(L={})),function(t){t.SINGLE="SINGLE",t.DOUBLE="DOUBLE"}(O||(O={}));const b=b=>{var E;const S=()=>T==y.SUCCESS?t.jsx(i,{}):T==y.WARNING?t.jsx(r,{}):T==y.ERROR?t.jsx(e,{}):T===y.LOADING?t.jsx(a,{size:"large"}):T===y.RETRY?t.jsx(n,{}):T==y.INFO?t.jsx(o,{}):void 0,{states:T,heading:f,subline:I,errorText:R,icon:C=S(),isButtonEnabled:N,type:v,buttonText:A,buttonType:z,onButtonClick:B,leadingIcon:w,width:G,headerImage:W,iconWidth:D,iconHeight:U,closeButtonType:F,secondaryButtonText:H,"data-test":M}=b;return t.jsxs(h,Object.assign({width:G,"data-test":M},{children:[t.jsx(g,Object.assign({iconWidth:D,iconHeight:U},{children:W?t.jsx("img",{src:W,width:"100%",height:"auto",alt:""}):C})),t.jsxs(x,Object.assign({size:b.size},{children:["SMALL"===b.size&&t.jsx(j,{children:f}),"SMALL"!==b.size&&t.jsx(l,{children:f})]})),t.jsxs(p,{children:["SMALL"!==b.size&&t.jsx(d,Object.assign({color:s.content.secondary},{children:I})),"SMALL"===b.size&&t.jsx(m,Object.assign({color:s.content.secondary},{children:I})),R&&t.jsx(m,Object.assign({color:s.content.negative,style:{marginTop:8,whiteSpace:"pre-line"}},{children:R}))]}),null!==(E=b.children)&&void 0!==E?E:t.jsx(t.Fragment,{}),N&&t.jsx(t.Fragment,{children:t.jsxs(u,Object.assign({size:b.size},{children:[v==O.DOUBLE&&t.jsx(c,{"data-test":`${M}-cancel`,onClick:()=>B&&B(L.CANCEL),buttonType:F||"secondary",buttonText:H||"Cancel",matchParentWidth:!0}),t.jsx(c,{"data-test":`${M}-primary`,onClick:()=>B&&B(L.OTHER),buttonType:null!=z?z:"primary",LeadingIcon:w,buttonText:null!=A?A:"Retry",matchParentWidth:!0})]}))})]}))};export{L as ButtonActions,O as ButtonTypes,b as StateComponent,y as StateInterface};
|