@eduzz-automacoes/webchat-widget 0.0.2 → 0.1.0
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/eduzz-webchat.cjs +1 -1
- package/dist/eduzz-webchat.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -2
package/dist/eduzz-webchat.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),c=require("react"),F=require("@botpress/webchat"),E={botName:"Assistente Virtual",subtitle:"Conectado ao bot real",botAvatar:"",color:"",themeMode:"light",variant:"solid",headerVariant:"glass",radius:4,fontFamily:"Inter",additionalStylesheet:"",additionalStylesheetUrl:"",accentColor:"#2563eb",brandColor:"#18181b",brandTextColor:"#fafafa",placeholder:"Escreva uma mensagem...",fabBackgroundColor:"#2563eb",fabIconColor:"#ffffff",fabChatIconVariant:"messages-square",primaryButtonBackgroundColor:"#18181b",primaryButtonTextColor:"#fafafa",primaryButtonHoverBackgroundColor:"#27272a",panelBackgroundColor:"#ffffff",panelElevatedBackgroundColor:"#ffffff",panelSubtleBackgroundColor:"#fafafa",panelMutedBackgroundColor:"#f4f4f5",panelHoverBackgroundColor:"#f4f4f5",panelSelectedBackgroundColor:"#f5f5f5",panelBorderColor:"#e4e4e7",panelStrongBorderColor:"#d4d4d8",panelTextColor:"#18181b",panelMutedTextColor:"#71717a",panelHeaderBackgroundColor:"rgba(255, 255, 255, 0.96)",welcomeBackground:"linear-gradient(180deg, #f4f4f5 0%, #fafafa 34%, #ffffff 34%, #ffffff 100%)",welcomeHeroBackground:"linear-gradient(180deg, #f5f5f5 0%, #efeff1 100%)",welcomeOnlineStatusColor:"#16a34a",secondaryButtonBackgroundColor:"#ffffff",secondaryButtonTextColor:"#18181b",secondaryButtonBorderColor:"#e4e4e7",secondaryButtonHoverBackgroundColor:"#f4f4f5",iconButtonBackgroundColor:"#ffffff",iconButtonIconColor:"#71717a",iconButtonBorderColor:"#e4e4e7",iconButtonHoverBackgroundColor:"#f4f4f5",outgoingMessageBackgroundColor:"#ebf1fd",outgoingMessageTextColor:"#0f2346",incomingMessageBackgroundColor:"#f0f0f3",incomingMessageTextColor:"#202127",position:"bottom-right",initiallyOpen:!0,showWelcomeScreen:!0,width:"380px",height:"640px",welcomeCoverImage:"",welcomeCardImage:"",welcomeCardTitle:"Suporte",welcomeCardStatus:"Online agora!",welcomeCardDescription:"Estamos disponíveis para esclarecer qualquer dúvida que você possa ter. Sinta-se a vontade para nos contatar a qualquer momento.",welcomeCtaLabel:"Iniciar atendimento",welcomeButtonDescription:"",welcomeCloseLabel:"Fechar painel",openFabBackgroundColor:"#2563eb",openFabIconColor:"#ffffff"},ye=e=>e==="bottom-left"||e==="top-left"?"bottom-left":"bottom-right",_e=e=>{switch(ye(e)){case"bottom-left":return{bottom:"24px",left:"24px","--widget-align":"flex-start","--panel-transform-origin":"left bottom"};case"bottom-right":default:return{bottom:"24px",right:"24px","--widget-align":"flex-end","--panel-transform-origin":"right bottom"}}},Ce=(e,t,a)=>Math.min(Math.max(e,t),a),de=e=>{if(typeof e!="string")return null;let t=e.trim();return!t||(t.startsWith("#")&&(t=t.slice(1)),t.length===3&&(t=t.split("").map(a=>`${a}${a}`).join("")),!/^[0-9a-fA-F]{6}$/.test(t))?null:`#${t.toLowerCase()}`},ue=e=>{const t=de(e);if(!t)return null;const a=t.slice(1);return{r:Number.parseInt(a.slice(0,2),16),g:Number.parseInt(a.slice(2,4),16),b:Number.parseInt(a.slice(4,6),16)}},Le=({r:e,g:t,b:a})=>`#${[e,t,a].map(r=>Ce(Math.round(r),0,255).toString(16).padStart(2,"0")).join("")}`,ne=(e,t,a)=>{const r=ue(e),s=ue(t);if(!r||!s)return null;const n=Ce(a,0,1);return Le({r:r.r*(1-n)+s.r*n,g:r.g*(1-n)+s.g*n,b:r.b*(1-n)+s.b*n})},qe=(e,t)=>t<0?ne(e,"#000000",Math.abs(t)):ne(e,"#ffffff",t),Q=e=>{const t=ue(e);return t&&[t.r,t.g,t.b].map(r=>{const s=r/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4}).reduce((r,s,n)=>r+s*[.2126,.7152,.0722][n],0)>.42?"#18181b":"#ffffff"},A=(e,t)=>e&&Object.prototype.hasOwnProperty.call(e,t)&&e[t]!=null&&e[t]!=="",ze=(e,t)=>{const a=de(e.brandColor);if(!a)return e;const r=de(e.brandTextColor)||Q(a),s=ne(a,"#ffffff",.82)||E.secondaryButtonBorderColor,n=ne(a,"#ffffff",.92)||E.secondaryButtonHoverBackgroundColor,l=qe(a,-.12)||E.primaryButtonHoverBackgroundColor;return{...e,brandColor:a,brandTextColor:r,primaryButtonBackgroundColor:A(t,"primaryButtonBackgroundColor")?e.primaryButtonBackgroundColor:a,primaryButtonTextColor:A(t,"primaryButtonTextColor")?e.primaryButtonTextColor:r,primaryButtonHoverBackgroundColor:A(t,"primaryButtonHoverBackgroundColor")?e.primaryButtonHoverBackgroundColor:l,secondaryButtonBackgroundColor:A(t,"secondaryButtonBackgroundColor")?e.secondaryButtonBackgroundColor:"#ffffff",secondaryButtonTextColor:A(t,"secondaryButtonTextColor")?e.secondaryButtonTextColor:a,secondaryButtonBorderColor:A(t,"secondaryButtonBorderColor")?e.secondaryButtonBorderColor:s,secondaryButtonHoverBackgroundColor:A(t,"secondaryButtonHoverBackgroundColor")?e.secondaryButtonHoverBackgroundColor:n,iconButtonBackgroundColor:A(t,"iconButtonBackgroundColor")?e.iconButtonBackgroundColor:"#ffffff",iconButtonIconColor:A(t,"iconButtonIconColor")?e.iconButtonIconColor:a,iconButtonBorderColor:A(t,"iconButtonBorderColor")?e.iconButtonBorderColor:s,iconButtonHoverBackgroundColor:A(t,"iconButtonHoverBackgroundColor")?e.iconButtonHoverBackgroundColor:n}},De=e=>{const t=e.fabBackgroundColor||e.openFabBackgroundColor||E.fabBackgroundColor,a=e.fabIconColor||e.openFabIconColor||E.fabIconColor;return{...e,fabBackgroundColor:t,fabIconColor:a,openFabBackgroundColor:t,openFabIconColor:a}},ve=(e={})=>De(ze({...E,...e,position:ye(e.position??E.position)},e)),G=e=>({..._e(e.position),"--widget-width":e.width,"--widget-height":e.height,"--bpGray-1":"var(--ui-bg)","--bpGray-50":"var(--ui-bg-subtle)","--bpGray-100":"var(--ui-bg-muted)","--bpGray-200":"var(--ui-border)","--bpGray-300":"var(--ui-border-strong)","--bpGray-400":"var(--ui-text-muted)","--bpGray-500":"var(--ui-text-muted)","--bpGray-600":"var(--ui-text-muted)","--bpGray-700":"var(--ui-text)","--bpGray-800":"var(--ui-text)","--bpGray-900":"var(--ui-text)","--bpGray-950":"var(--ui-text)","--accent-color":e.accentColor,"--accent-text-color":Q(e.accentColor),"--header-avatar-bg":e.accentColor,"--header-avatar-text":Q(e.accentColor),"--primary-button-background-color":e.primaryButtonBackgroundColor,"--primary-button-text-color":e.primaryButtonTextColor,"--primary-button-hover-background-color":e.primaryButtonHoverBackgroundColor,"--panel-background-color":e.panelBackgroundColor,"--panel-elevated-background-color":e.panelElevatedBackgroundColor,"--panel-subtle-background-color":e.panelSubtleBackgroundColor,"--panel-muted-background-color":e.panelMutedBackgroundColor,"--panel-hover-background-color":e.panelHoverBackgroundColor,"--panel-selected-background-color":e.panelSelectedBackgroundColor,"--panel-border-color":e.panelBorderColor,"--panel-strong-border-color":e.panelStrongBorderColor,"--panel-text-color":e.panelTextColor,"--panel-muted-text-color":e.panelMutedTextColor,"--panel-header-background-color":e.panelHeaderBackgroundColor,"--welcome-background":e.welcomeBackground,"--welcome-hero-background":e.welcomeHeroBackground,"--welcome-online-status-color":e.welcomeOnlineStatusColor,"--secondary-button-background-color":e.secondaryButtonBackgroundColor,"--secondary-button-text-color":e.secondaryButtonTextColor,"--secondary-button-border-color":e.secondaryButtonBorderColor,"--secondary-button-hover-background-color":e.secondaryButtonHoverBackgroundColor,"--icon-button-background-color":e.iconButtonBackgroundColor,"--icon-button-icon-color":e.iconButtonIconColor,"--icon-button-border-color":e.iconButtonBorderColor,"--icon-button-hover-background-color":e.iconButtonHoverBackgroundColor,"--outgoing-message-background-color":e.outgoingMessageBackgroundColor,"--outgoing-message-text-color":e.outgoingMessageTextColor,"--incoming-message-background-color":e.incomingMessageBackgroundColor,"--incoming-message-text-color":e.incomingMessageTextColor,"--message-bg":e.outgoingMessageBackgroundColor,"--message-text":e.outgoingMessageTextColor,"--message-bg-hover":e.outgoingMessageBackgroundColor,"--send-button-bg":e.primaryButtonBackgroundColor,"--send-button-bg-hover":e.primaryButtonHoverBackgroundColor,"--send-button-text":e.primaryButtonTextColor,"--button-bg":e.secondaryButtonBackgroundColor,"--button-bg-hover":e.secondaryButtonHoverBackgroundColor,"--button-text":e.secondaryButtonTextColor,"--fab-background-color":e.fabBackgroundColor,"--fab-icon-color":e.fabIconColor}),Oe=e=>({color:e.color||e.accentColor,fontFamily:e.fontFamily,radius:e.radius,themeMode:e.themeMode,variant:e.variant,headerVariant:e.headerVariant,additionalStylesheet:e.additionalStylesheet,additionalStylesheetUrl:e.additionalStylesheetUrl});const We=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ge=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,r)=>r?r.toUpperCase():a.toLowerCase()),we=e=>{const t=Ge(e);return t.charAt(0).toUpperCase()+t.slice(1)},Be=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim(),Ke=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Je={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ze=c.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:s="",children:n,iconNode:l,...d},h)=>c.createElement("svg",{ref:h,...Je,width:t,height:t,stroke:e,strokeWidth:r?Number(a)*24/Number(t):a,className:Be("lucide",s),...!n&&!Ke(d)&&{"aria-hidden":"true"},...d},[...l.map(([C,B])=>c.createElement(C,B)),...Array.isArray(n)?n:[n]]));const N=(e,t)=>{const a=c.forwardRef(({className:r,...s},n)=>c.createElement(Ze,{ref:n,iconNode:t,className:Be(`lucide-${We(we(e))}`,`lucide-${e}`,r),...s}));return a.displayName=we(e),a};const Xe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ye=N("arrow-right",Xe);const Qe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],et=N("chevron-right",Qe);const tt=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],ot=N("house",tt);const at=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]],nt=N("message-circle-more",at);const rt=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],st=N("message-circle",rt);const ct=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],ke=N("message-square",ct);const lt=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],je=N("messages-square",lt);const it=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],dt=N("rotate-ccw",it);const ut=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],bt=N("square-pen",ut);const ht=[["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}],["path",{d:"M17 14V2",key:"8ymqnk"}]],mt=N("thumbs-down",ht);const pt=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]],wt=N("thumbs-up",pt);const ft=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],gt=N("user-round",ft);const xt=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ne=N("x",xt),y={"aria-hidden":!0,strokeWidth:1.9},yt=o.jsx(dt,{...y}),re=o.jsx(Ne,{...y}),Ct=o.jsx(Ne,{...y}),fe={"message-circle-more":o.jsx(nt,{...y}),"message-circle":o.jsx(st,{...y}),"message-square":o.jsx(ke,{...y}),"messages-square":o.jsx(je,{...y})},vt=(e="messages-square")=>fe[e]||fe["messages-square"],Bt=o.jsx(Ye,{...y}),Ie=o.jsx(ot,{...y}),kt=o.jsx(ke,{...y}),jt=o.jsx(wt,{...y}),Nt=o.jsx(mt,{...y}),It=o.jsx(je,{...y}),Mt=o.jsx(et,{...y}),St=o.jsx(bt,{...y}),Tt=o.jsx(gt,{...y}),ae=e=>String(e).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"),At=({name:e,backgroundColor:t})=>{const a=(e||"B").trim().charAt(0).toUpperCase()||"B",r=Q(t),s=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./style.css');const o=require("react/jsx-runtime"),c=require("react"),F=require("@botpress/webchat"),E={botName:"Assistente Virtual",subtitle:"Conectado ao bot real",botAvatar:"",color:"",themeMode:"light",variant:"solid",headerVariant:"glass",radius:4,fontFamily:"Inter",additionalStylesheet:"",additionalStylesheetUrl:"",accentColor:"#2563eb",brandColor:"#18181b",brandTextColor:"#fafafa",placeholder:"Escreva uma mensagem...",fabBackgroundColor:"#2563eb",fabIconColor:"#ffffff",fabChatIconVariant:"messages-square",primaryButtonBackgroundColor:"#18181b",primaryButtonTextColor:"#fafafa",primaryButtonHoverBackgroundColor:"#27272a",panelBackgroundColor:"#ffffff",panelElevatedBackgroundColor:"#ffffff",panelSubtleBackgroundColor:"#fafafa",panelMutedBackgroundColor:"#f4f4f5",panelHoverBackgroundColor:"#f4f4f5",panelSelectedBackgroundColor:"#f5f5f5",panelBorderColor:"#e4e4e7",panelStrongBorderColor:"#d4d4d8",panelTextColor:"#18181b",panelMutedTextColor:"#71717a",panelHeaderBackgroundColor:"rgba(255, 255, 255, 0.96)",welcomeBackground:"linear-gradient(180deg, #f4f4f5 0%, #fafafa 34%, #ffffff 34%, #ffffff 100%)",welcomeHeroBackground:"linear-gradient(180deg, #f5f5f5 0%, #efeff1 100%)",welcomeOnlineStatusColor:"#16a34a",secondaryButtonBackgroundColor:"#ffffff",secondaryButtonTextColor:"#18181b",secondaryButtonBorderColor:"#e4e4e7",secondaryButtonHoverBackgroundColor:"#f4f4f5",iconButtonBackgroundColor:"#ffffff",iconButtonIconColor:"#71717a",iconButtonBorderColor:"#e4e4e7",iconButtonHoverBackgroundColor:"#f4f4f5",outgoingMessageBackgroundColor:"#ebf1fd",outgoingMessageTextColor:"#0f2346",incomingMessageBackgroundColor:"#f0f0f3",incomingMessageTextColor:"#202127",position:"bottom-right",initiallyOpen:!0,showWelcomeScreen:!0,width:"380px",height:"640px",welcomeCoverImage:"",welcomeCardImage:"",welcomeCardTitle:"Suporte",welcomeCardStatus:"Online agora!",welcomeCardDescription:"Estamos disponíveis para esclarecer qualquer dúvida que você possa ter. Sinta-se a vontade para nos contatar a qualquer momento.",welcomeCtaLabel:"Iniciar atendimento",welcomeButtonDescription:"",welcomeCloseLabel:"Fechar painel",openFabBackgroundColor:"#2563eb",openFabIconColor:"#ffffff"},ye=e=>e==="bottom-left"||e==="top-left"?"bottom-left":"bottom-right",_e=e=>{switch(ye(e)){case"bottom-left":return{bottom:"24px",left:"24px","--widget-align":"flex-start","--panel-transform-origin":"left bottom"};case"bottom-right":default:return{bottom:"24px",right:"24px","--widget-align":"flex-end","--panel-transform-origin":"right bottom"}}},Ce=(e,t,a)=>Math.min(Math.max(e,t),a),de=e=>{if(typeof e!="string")return null;let t=e.trim();return!t||(t.startsWith("#")&&(t=t.slice(1)),t.length===3&&(t=t.split("").map(a=>`${a}${a}`).join("")),!/^[0-9a-fA-F]{6}$/.test(t))?null:`#${t.toLowerCase()}`},ue=e=>{const t=de(e);if(!t)return null;const a=t.slice(1);return{r:Number.parseInt(a.slice(0,2),16),g:Number.parseInt(a.slice(2,4),16),b:Number.parseInt(a.slice(4,6),16)}},Le=({r:e,g:t,b:a})=>`#${[e,t,a].map(r=>Ce(Math.round(r),0,255).toString(16).padStart(2,"0")).join("")}`,ne=(e,t,a)=>{const r=ue(e),s=ue(t);if(!r||!s)return null;const n=Ce(a,0,1);return Le({r:r.r*(1-n)+s.r*n,g:r.g*(1-n)+s.g*n,b:r.b*(1-n)+s.b*n})},qe=(e,t)=>t<0?ne(e,"#000000",Math.abs(t)):ne(e,"#ffffff",t),Q=e=>{const t=ue(e);return t&&[t.r,t.g,t.b].map(r=>{const s=r/255;return s<=.03928?s/12.92:((s+.055)/1.055)**2.4}).reduce((r,s,n)=>r+s*[.2126,.7152,.0722][n],0)>.42?"#18181b":"#ffffff"},A=(e,t)=>e&&Object.prototype.hasOwnProperty.call(e,t)&&e[t]!=null&&e[t]!=="",ze=(e,t)=>{const a=de(e.brandColor);if(!a)return e;const r=de(e.brandTextColor)||Q(a),s=ne(a,"#ffffff",.82)||E.secondaryButtonBorderColor,n=ne(a,"#ffffff",.92)||E.secondaryButtonHoverBackgroundColor,l=qe(a,-.12)||E.primaryButtonHoverBackgroundColor;return{...e,brandColor:a,brandTextColor:r,primaryButtonBackgroundColor:A(t,"primaryButtonBackgroundColor")?e.primaryButtonBackgroundColor:a,primaryButtonTextColor:A(t,"primaryButtonTextColor")?e.primaryButtonTextColor:r,primaryButtonHoverBackgroundColor:A(t,"primaryButtonHoverBackgroundColor")?e.primaryButtonHoverBackgroundColor:l,secondaryButtonBackgroundColor:A(t,"secondaryButtonBackgroundColor")?e.secondaryButtonBackgroundColor:"#ffffff",secondaryButtonTextColor:A(t,"secondaryButtonTextColor")?e.secondaryButtonTextColor:a,secondaryButtonBorderColor:A(t,"secondaryButtonBorderColor")?e.secondaryButtonBorderColor:s,secondaryButtonHoverBackgroundColor:A(t,"secondaryButtonHoverBackgroundColor")?e.secondaryButtonHoverBackgroundColor:n,iconButtonBackgroundColor:A(t,"iconButtonBackgroundColor")?e.iconButtonBackgroundColor:"#ffffff",iconButtonIconColor:A(t,"iconButtonIconColor")?e.iconButtonIconColor:a,iconButtonBorderColor:A(t,"iconButtonBorderColor")?e.iconButtonBorderColor:s,iconButtonHoverBackgroundColor:A(t,"iconButtonHoverBackgroundColor")?e.iconButtonHoverBackgroundColor:n}},De=e=>{const t=e.fabBackgroundColor||e.openFabBackgroundColor||E.fabBackgroundColor,a=e.fabIconColor||e.openFabIconColor||E.fabIconColor;return{...e,fabBackgroundColor:t,fabIconColor:a,openFabBackgroundColor:t,openFabIconColor:a}},ve=(e={})=>De(ze({...E,...e,position:ye(e.position??E.position)},e)),G=e=>({..._e(e.position),"--widget-width":e.width,"--widget-height":e.height,"--bpGray-1":"var(--ui-bg)","--bpGray-50":"var(--ui-bg-subtle)","--bpGray-100":"var(--ui-bg-muted)","--bpGray-200":"var(--ui-border)","--bpGray-300":"var(--ui-border-strong)","--bpGray-400":"var(--ui-text-muted)","--bpGray-500":"var(--ui-text-muted)","--bpGray-600":"var(--ui-text-muted)","--bpGray-700":"var(--ui-text)","--bpGray-800":"var(--ui-text)","--bpGray-900":"var(--ui-text)","--bpGray-950":"var(--ui-text)","--accent-color":e.accentColor,"--accent-text-color":Q(e.accentColor),"--header-avatar-bg":e.accentColor,"--header-avatar-text":Q(e.accentColor),"--primary-button-background-color":e.primaryButtonBackgroundColor,"--primary-button-text-color":e.primaryButtonTextColor,"--primary-button-hover-background-color":e.primaryButtonHoverBackgroundColor,"--panel-background-color":e.panelBackgroundColor,"--panel-elevated-background-color":e.panelElevatedBackgroundColor,"--panel-subtle-background-color":e.panelSubtleBackgroundColor,"--panel-muted-background-color":e.panelMutedBackgroundColor,"--panel-hover-background-color":e.panelHoverBackgroundColor,"--panel-selected-background-color":e.panelSelectedBackgroundColor,"--panel-border-color":e.panelBorderColor,"--panel-strong-border-color":e.panelStrongBorderColor,"--panel-text-color":e.panelTextColor,"--panel-muted-text-color":e.panelMutedTextColor,"--panel-header-background-color":e.panelHeaderBackgroundColor,"--welcome-background":e.welcomeBackground,"--welcome-hero-background":e.welcomeHeroBackground,"--welcome-online-status-color":e.welcomeOnlineStatusColor,"--secondary-button-background-color":e.secondaryButtonBackgroundColor,"--secondary-button-text-color":e.secondaryButtonTextColor,"--secondary-button-border-color":e.secondaryButtonBorderColor,"--secondary-button-hover-background-color":e.secondaryButtonHoverBackgroundColor,"--icon-button-background-color":e.iconButtonBackgroundColor,"--icon-button-icon-color":e.iconButtonIconColor,"--icon-button-border-color":e.iconButtonBorderColor,"--icon-button-hover-background-color":e.iconButtonHoverBackgroundColor,"--outgoing-message-background-color":e.outgoingMessageBackgroundColor,"--outgoing-message-text-color":e.outgoingMessageTextColor,"--incoming-message-background-color":e.incomingMessageBackgroundColor,"--incoming-message-text-color":e.incomingMessageTextColor,"--message-bg":e.outgoingMessageBackgroundColor,"--message-text":e.outgoingMessageTextColor,"--message-bg-hover":e.outgoingMessageBackgroundColor,"--send-button-bg":e.primaryButtonBackgroundColor,"--send-button-bg-hover":e.primaryButtonHoverBackgroundColor,"--send-button-text":e.primaryButtonTextColor,"--button-bg":e.secondaryButtonBackgroundColor,"--button-bg-hover":e.secondaryButtonHoverBackgroundColor,"--button-text":e.secondaryButtonTextColor,"--fab-background-color":e.fabBackgroundColor,"--fab-icon-color":e.fabIconColor}),Oe=e=>({color:e.color||e.accentColor,fontFamily:e.fontFamily,radius:e.radius,themeMode:e.themeMode,variant:e.variant,headerVariant:e.headerVariant,additionalStylesheet:e.additionalStylesheet,additionalStylesheetUrl:e.additionalStylesheetUrl});const We=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ge=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,r)=>r?r.toUpperCase():a.toLowerCase()),we=e=>{const t=Ge(e);return t.charAt(0).toUpperCase()+t.slice(1)},Be=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim(),Ke=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Je={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ze=c.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:s="",children:n,iconNode:l,...d},h)=>c.createElement("svg",{ref:h,...Je,width:t,height:t,stroke:e,strokeWidth:r?Number(a)*24/Number(t):a,className:Be("lucide",s),...!n&&!Ke(d)&&{"aria-hidden":"true"},...d},[...l.map(([C,B])=>c.createElement(C,B)),...Array.isArray(n)?n:[n]]));const N=(e,t)=>{const a=c.forwardRef(({className:r,...s},n)=>c.createElement(Ze,{ref:n,iconNode:t,className:Be(`lucide-${We(we(e))}`,`lucide-${e}`,r),...s}));return a.displayName=we(e),a};const Xe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ye=N("arrow-right",Xe);const Qe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],et=N("chevron-right",Qe);const tt=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],ot=N("house",tt);const at=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]],nt=N("message-circle-more",at);const rt=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],st=N("message-circle",rt);const ct=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],ke=N("message-square",ct);const lt=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],je=N("messages-square",lt);const it=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],dt=N("rotate-ccw",it);const ut=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],bt=N("square-pen",ut);const ht=[["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}],["path",{d:"M17 14V2",key:"8ymqnk"}]],mt=N("thumbs-down",ht);const pt=[["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}],["path",{d:"M7 10v12",key:"1qc93n"}]],wt=N("thumbs-up",pt);const ft=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],gt=N("user-round",ft);const xt=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ne=N("x",xt),y={"aria-hidden":!0,strokeWidth:1.9},yt=o.jsx(dt,{...y}),re=o.jsx(Ne,{...y}),Ct=o.jsx(Ne,{...y}),fe={"message-circle-more":o.jsx(nt,{...y}),"message-circle":o.jsx(st,{...y}),"message-square":o.jsx(ke,{...y}),"messages-square":o.jsx(je,{...y})},vt=(e="messages-square")=>fe[e]||fe["messages-square"],Bt=o.jsx(Ye,{...y}),Ie=o.jsx(ot,{...y}),kt=o.jsx(ke,{...y}),jt=o.jsx(wt,{...y}),Nt=o.jsx(mt,{...y}),It=o.jsx(je,{...y}),Mt=o.jsx(et,{...y}),St=o.jsx(bt,{...y}),Tt=o.jsx(gt,{...y}),ae=e=>String(e).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'"),At=({name:e,backgroundColor:t})=>{const a=(e||"B").trim().charAt(0).toUpperCase()||"B",r=Q(t),s=`
|
|
2
2
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96" role="img" aria-label="${ae(e||"Bot")}">
|
|
3
3
|
<rect width="96" height="96" rx="48" fill="${ae(t)}" />
|
|
4
4
|
<text x="50%" y="52%" dominant-baseline="middle" text-anchor="middle" font-family="Arial, Helvetica, sans-serif" font-size="42" font-weight="700" fill="${ae(r)}">${ae(a)}</text>
|
package/dist/eduzz-webchat.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as l, Fragment as Ne } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as Ie, createElement as he, useState as R, useEffect as A, useMemo as f, useRef as me, useCallback as ee, useReducer as We } from "react";
|
|
3
3
|
import { Container as Ge, MessageList as Ke, Composer as Je, WebchatProvider as Ze, useActiveConversation as Xe, useConversations as Ye, useUser as Qe, useConversationList as et, Block as tt, StylesheetProvider as ot } from "@botpress/webchat";
|
|
4
|
-
const j = {
|
|
4
|
+
import './style.css';const j = {
|
|
5
5
|
botName: "Assistente Virtual",
|
|
6
6
|
subtitle: "Conectado ao bot real",
|
|
7
7
|
botAvatar: "",
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:host{all:initial}.bp-webchat-shell *,.bp-webchat-shell *:before,.bp-webchat-shell *:after{box-sizing:border-box}.bp-webchat-shell{position:fixed;z-index:2147483000;display:flex;flex-direction:column;align-items:var(--widget-align, flex-end);gap:16px;width:min(var(--widget-width),calc(100vw - 24px));font-family:Inter,Segoe UI,sans-serif;--ui-bg: var(--panel-background-color, #ffffff);--ui-bg-elevated: var(--panel-elevated-background-color, #ffffff);--ui-bg-subtle: var(--panel-subtle-background-color, #fafafa);--ui-bg-muted: var(--panel-muted-background-color, #f4f4f5);--ui-bg-hover: var(--panel-hover-background-color, #f4f4f5);--ui-bg-selected: var(--panel-selected-background-color, #f5f5f5);--ui-border: var(--panel-border-color, #e4e4e7);--ui-border-strong: var(--panel-strong-border-color, #d4d4d8);--ui-text: var(--panel-text-color, #18181b);--ui-text-muted: var(--panel-muted-text-color, #71717a);--ui-primary: var(--primary-button-background-color, #18181b);--ui-primary-hover: var(--primary-button-hover-background-color, #27272a);--ui-primary-text: var(--primary-button-text-color, #fafafa);--ui-secondary: var(--secondary-button-background-color, #ffffff);--ui-secondary-hover: var(--secondary-button-hover-background-color, #f4f4f5);--ui-secondary-text: var(--secondary-button-text-color, #18181b);--ui-secondary-border: var(--secondary-button-border-color, #e4e4e7);--ui-icon-button-bg: var(--icon-button-background-color, #ffffff);--ui-icon-button-hover: var(--icon-button-hover-background-color, #f4f4f5);--ui-icon-button-color: var(--icon-button-icon-color, #71717a);--ui-icon-button-border: var(--icon-button-border-color, #e4e4e7);--ui-ring: 0 0 0 3px rgba(24, 24, 27, .08);--ui-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);--ui-shadow-md: 0 12px 32px rgba(15, 23, 42, .1);--ui-radius-sm: 10px;--ui-radius-md: 12px;--ui-radius-lg: 16px}.bp-webchat-panel{position:relative;overflow:hidden;width:100%;height:min(var(--widget-height),calc(100dvh - 132px));border:1px solid var(--ui-border);border-radius:24px;background:var(--ui-bg);box-shadow:0 18px 50px #0f172a1f;opacity:0;transform:translateY(12px) scale(.98);transform-origin:var(--panel-transform-origin, right bottom);transition:opacity .22s cubic-bezier(.22,1,.36,1),transform .22s cubic-bezier(.22,1,.36,1);will-change:opacity,transform}.bp-webchat-panel[data-state=open]{opacity:1;transform:translateY(0) scale(1)}.bp-webchat-panel[data-state=closed]{pointer-events:none}.bp-webchat-error{padding:18px;border-radius:20px;background:#fff7ed;color:#9a3412;line-height:1.6;font-size:.95rem;box-shadow:0 20px 40px #0f172a1f}.bp-webchat-layout{position:relative;display:flex;flex-direction:column;width:100%;height:100%;background:var(--ui-bg)}.bp-webchat-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 14px;border-bottom:1px solid var(--ui-border);background:var(--panel-header-background-color, rgba(255, 255, 255, .96))}.bp-webchat-header-meta{display:flex;align-items:center;min-width:0;gap:12px}.bp-webchat-header-actions{display:inline-flex;align-items:center;gap:6px}.bp-webchat-avatar{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 auto;border-radius:999px;background:var(--header-avatar-bg, var(--accent-color));color:var(--header-avatar-text, #ffffff);font-size:1rem;font-weight:700;text-transform:uppercase;overflow:hidden}.bp-webchat-avatar img{width:100%;height:100%;object-fit:cover}.bp-webchat-header-text{min-width:0}.bp-webchat-header-title{margin:0;color:var(--ui-text);font-size:.96rem;line-height:1.2;font-weight:600}.bp-webchat-header-subtitle{margin:4px 0 0;color:var(--ui-text-muted);font-size:.84rem;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bp-webchat-welcome{position:relative;display:flex;flex-direction:column;height:100%;overflow:hidden;background:var( --welcome-background, linear-gradient(180deg, #f4f4f5 0%, #fafafa 34%, #ffffff 34%, #ffffff 100%) )}.bp-webchat-welcome-hero{position:relative;min-height:184px;background:var( --welcome-hero-background, linear-gradient(180deg, #f5f5f5 0%, #efeff1 100%) );overflow:hidden}.bp-webchat-welcome-hero:after{content:"";position:absolute;inset:0;background:#0000002e;pointer-events:none}.bp-webchat-welcome-close{position:absolute;top:14px;right:14px;z-index:3}.bp-webchat-welcome-cover{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top}.bp-webchat-welcome-card-wrap{position:relative;margin-top:-24px;padding:0 16px;z-index:2}.bp-webchat-welcome-card{position:relative;border-radius:22px;background:var(--ui-bg-elevated);box-shadow:var(--ui-shadow-md);border:1px solid var(--ui-border);padding:68px 22px 18px}.bp-webchat-welcome-card-badge{position:absolute;top:-34px;left:50%;transform:translate(-50%);display:grid;place-items:center;width:84px;height:84px;border-radius:999px;background:var(--header-avatar-bg, var(--accent-color));box-shadow:var(--ui-shadow-sm);overflow:hidden;border:1px solid color-mix(in srgb,var(--header-avatar-bg, var(--accent-color)) 78%,var(--ui-bg-elevated))}.bp-webchat-welcome-card-badge img{width:100%;height:100%;object-fit:cover}.bp-webchat-welcome-card-badge span{color:var(--header-avatar-text, #ffffff);font-size:2rem;font-weight:700}.bp-webchat-welcome-card-title{margin:0;color:var(--ui-text);font-size:1rem;line-height:1.15;font-weight:700;text-wrap:balance}.bp-webchat-welcome-card-status{margin:10px 0 0;color:var(--ui-text-muted);font-size:.88rem;line-height:1.4}.bp-webchat-welcome-card-status strong{color:var(--welcome-online-status-color, #16a34a);font-weight:700}.bp-webchat-welcome-card-description{margin:14px 0 0;color:var(--ui-text-muted);font-size:.94rem;line-height:1.62;max-width:30ch}.bp-webchat-welcome-cta{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin-top:22px;padding:14px 16px;border:1px solid var(--ui-primary);border-radius:var(--ui-radius-lg);box-shadow:var(--ui-shadow-sm);color:var(--ui-primary-text);font:inherit;font-size:.98rem;font-weight:600;cursor:pointer;background:var(--ui-primary);text-align:left;transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border-color .14s ease}.bp-webchat-welcome-cta:hover{transform:translateY(-1px);border-color:var(--ui-primary-hover);background:var(--ui-primary-hover);box-shadow:0 10px 20px #0f172a1f}.bp-webchat-welcome-cta-left{display:inline-flex;align-items:center;gap:12px}.bp-webchat-welcome-cta-copy{display:grid;gap:2px}.bp-webchat-welcome-cta-title{color:inherit;font-size:.98rem;font-weight:600;line-height:1.2}.bp-webchat-welcome-cta-description{color:color-mix(in srgb,var(--ui-primary-text) 74%,transparent);font-size:.82rem;line-height:1.35;font-weight:500}.bp-webchat-welcome-cta-right{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex:0 0 auto;color:inherit;border-radius:999px;background:color-mix(in srgb,var(--ui-primary-text) 10%,transparent)}.bp-webchat-welcome-cta-right svg{width:18px;height:18px}.bp-webchat-tabs,.bp-webchat-welcome-bottom{margin-top:auto;border-top:1px solid var(--ui-border);display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:6px;background:var(--ui-bg)}.bp-webchat-tab,.bp-webchat-welcome-tab{border:0;background:transparent;display:grid;justify-items:center;gap:4px;padding:9px 8px;color:var(--ui-text-muted);font-size:.84rem;font-family:inherit;font-weight:500;cursor:pointer;border-radius:var(--ui-radius-md);transition:color .14s ease,background .14s ease,box-shadow .14s ease}.bp-webchat-tab:hover,.bp-webchat-welcome-tab:hover{background:var(--ui-bg-hover)}.bp-webchat-tab[data-active=true],.bp-webchat-welcome-tab[data-active=true]{color:var(--ui-text);background:transparent;box-shadow:none}.bp-webchat-tab-icon,.bp-webchat-welcome-tab-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:999px;color:inherit;background:transparent;transition:background .14s ease,transform .14s ease}.bp-webchat-tab:hover .bp-webchat-tab-icon,.bp-webchat-welcome-tab:hover .bp-webchat-welcome-tab-icon{transform:translateY(-1px)}.bp-webchat-tab[data-active=true] .bp-webchat-tab-icon,.bp-webchat-welcome-tab[data-active=true] .bp-webchat-welcome-tab-icon{background:transparent}.bp-webchat-tab-icon svg,.bp-webchat-welcome-tab-icon svg{width:15px;height:15px}.bp-webchat-icon-button{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 auto;border:1px solid var(--ui-icon-button-border);border-radius:999px;background:var(--ui-icon-button-bg);color:var(--ui-icon-button-color);cursor:pointer;box-shadow:var(--ui-shadow-sm);transition:background .14s ease,border-color .14s ease,color .14s ease,box-shadow .14s ease}.bp-webchat-icon-button:hover{background:var(--ui-icon-button-hover);border-color:var(--ui-icon-button-border);color:var(--ui-text)}.bp-webchat-icon-button:focus-visible,.bp-webchat-tab:focus-visible,.bp-webchat-welcome-tab:focus-visible,.bp-webchat-welcome-cta:focus-visible,.bp-webchat-history-item:focus-visible,.bp-webchat-history-new:focus-visible,.bp-webchat-modal-button:focus-visible{outline:0;box-shadow:var(--ui-ring)}.bp-webchat-icon-button svg{width:20px;height:20px}.bp-webchat-mobile-close{display:none}.bp-webchat-container.bpContainer{height:100%;max-height:none;border-radius:0;border-color:var(--ui-border);background:var(--ui-bg);color:var(--ui-text);box-shadow:none}.bp-webchat-container .bpHeader{display:none}.bp-webchat-container .bpMessageListContainer,.bp-webchat-container .bpMessageListViewport,.bp-webchat-container .bpMessageListMarqueeContainer{background:var(--ui-bg);color:var(--ui-text)}.bp-webchat-container .bpMessageListContainer{padding-top:0;background:var(--ui-bg);--bpPrimary-600: var(--header-avatar-bg, var(--accent-color));--bpPrimary-50: var(--header-avatar-text, #ffffff);--message-bg: var(--outgoing-message-background-color, #ebf1fd);--message-text: var(--outgoing-message-text-color, #0f2346)}.bp-webchat-container .bpMessageListMarqueeContainer:only-child{margin-block:auto;padding-block:0}.bp-webchat-container .bpMessageListMarqueeTitle{color:var(--ui-text)}.bp-webchat-container .bpMessageListMarqueeDescription,.bp-webchat-container .bpMessageListHeaderMessage{color:var(--ui-text-muted)}.bp-webchat-container .bpMessageListScrollDownButton{z-index:1}.bp-webchat-container .bpMessageBlocksBubble[data-direction=incoming]{background-color:var(--incoming-message-background-color, #f0f0f3);color:var(--incoming-message-text-color, #202127)}.bp-webchat-container .bpMessageBlocksBubble[data-direction=outgoing]{background-color:var(--outgoing-message-background-color, #ebf1fd);color:var(--outgoing-message-text-color, #0f2346)}.bp-webchat-container .bpComposer{border-top:1px solid var(--ui-border);background:var(--ui-bg);padding:12px 14px 14px}.bp-webchat-container .bpComposerWrapper,.bp-webchat-container .bpComposerContainer{border:0;background:transparent;box-shadow:none}.bp-webchat-container .bpComposerContainer{gap:10px;padding:0;outline:none}.bp-webchat-container .bpComposerContainer:focus-within,.bp-webchat-container .bpComposerContainer[data-waiting=true]{outline:none;box-shadow:none}.bp-webchat-container .bpComposerInputContainer{border:1px solid var(--ui-border);border-radius:14px;background:var(--ui-bg-elevated);box-shadow:var(--ui-shadow-sm);overflow:hidden;transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}.bp-webchat-container .bpComposerInputContainer:focus-within{border-color:var(--ui-border-strong);box-shadow:var(--ui-ring)}.bp-webchat-container .bpComposerInput{color:var(--ui-text);font-size:.95rem}.bp-webchat-container .bpComposerInput::placeholder{color:var(--ui-text-muted)}.bp-webchat-container .bpComposerSendButton{border-radius:12px;background:var(--ui-primary);color:var(--ui-primary-text);box-shadow:var(--ui-shadow-sm)}.bp-webchat-container .bpComposerSendButton:hover{background:var(--ui-primary-hover)}.bp-webchat-container .bpComposerUploadButton,.bp-webchat-container .bpComposerVoiceButton{border:1px solid var(--ui-icon-button-border);border-radius:12px;background:var(--ui-icon-button-bg);color:var(--ui-icon-button-color);box-shadow:var(--ui-shadow-sm)}.bp-webchat-container .bpComposerUploadButton:hover,.bp-webchat-container .bpComposerVoiceButton:hover{background:var(--ui-icon-button-hover);border-color:var(--ui-icon-button-border);color:var(--ui-text)}.bp-webchat-container .bpComposerFileAttachement{border-color:var(--ui-border);border-radius:12px;background:var(--ui-bg-elevated);box-shadow:none}.bp-webchat-container .bpComposerFileAttachement:hover{border-color:var(--ui-border-strong)}.bp-webchat-container .bpComposerFileIconWrapper{border-color:var(--ui-border);background:var(--ui-bg-subtle)}.bp-webchat-container .bpComposerFileName{color:var(--ui-text)}.bp-webchat-container .bpComposerFileExtension,.bp-webchat-container .bpComposerFooter{color:var(--ui-text-muted)}.bp-webchat-container .bpMessageListMarqueeAvatarFallback,.bp-webchat-container .bpMessageAvatarFallback,.bp-webchat-container .bpHeaderContentAvatarFallback,.bp-webchat-container .bpMessagePreviewAvatarFallback,.bp-webchat-container .bpConversationHistoryConversationAvatarFallback{background-color:var(--header-avatar-bg, var(--accent-color))!important;color:var(--header-avatar-text, #ffffff)!important}.bp-webchat-history{display:flex;flex-direction:column;height:100%;background:var(--ui-bg)}.bp-webchat-history-header{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--ui-border)}.bp-webchat-history-title{margin:0;color:var(--ui-text);font-size:1rem;font-weight:600}.bp-webchat-history-list{flex:1;overflow:auto;padding:8px}.bp-webchat-history-empty,.bp-webchat-history-loading{display:grid;place-items:center;min-height:220px;padding:24px;color:var(--ui-text-muted);text-align:center;line-height:1.6}.bp-webchat-history-item{width:100%;display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;padding:14px;border:1px solid transparent;border-radius:14px;background:var(--ui-bg);color:inherit;text-align:left;cursor:pointer;font:inherit;transition:background .14s ease,border-color .14s ease,box-shadow .14s ease}.bp-webchat-history-item+.bp-webchat-history-item{margin-top:8px}.bp-webchat-history-item:hover{background:var(--ui-bg-subtle);border-color:var(--ui-border)}.bp-webchat-history-avatar{display:grid;place-items:center;width:48px;height:48px;border-radius:999px;overflow:hidden;background:var(--ui-bg-muted);color:var(--ui-text-muted);font-size:1rem;font-weight:700;flex:0 0 auto;border:1px solid var(--ui-border)}.bp-webchat-history-avatar[data-kind=bot]{background:var(--header-avatar-bg, var(--accent-color));color:var(--header-avatar-text, #ffffff);border-color:color-mix(in srgb,var(--header-avatar-bg, var(--accent-color)) 76%,var(--ui-bg-elevated))}.bp-webchat-history-avatar img{width:100%;height:100%;object-fit:cover}.bp-webchat-history-avatar svg{width:20px;height:20px}.bp-webchat-history-content{min-width:0;display:grid;gap:4px}.bp-webchat-history-name{color:var(--ui-text);font-size:.93rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bp-webchat-history-time{color:var(--ui-text-muted);font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bp-webchat-history-chevron{color:var(--ui-text-muted)}.bp-webchat-history-chevron svg{width:20px;height:20px}.bp-webchat-history-footer{padding:12px 16px 16px;border-top:1px solid var(--ui-border);background:var(--ui-bg)}.bp-webchat-history-new{width:100%;display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1px solid var(--ui-primary);border-radius:14px;padding:13px 16px;background:var(--ui-primary);color:var(--ui-primary-text);font:inherit;font-size:.94rem;font-weight:600;cursor:pointer;box-shadow:var(--ui-shadow-sm);transition:background .14s ease,border-color .14s ease,transform .14s ease}.bp-webchat-history-new:hover{background:var(--ui-primary-hover);border-color:var(--ui-primary-hover);transform:translateY(-1px)}.bp-webchat-history-new svg{width:20px;height:20px}.bp-webchat-loading{display:flex;flex-direction:column;gap:18px;padding:22px 18px 18px;height:100%;background:var(--ui-bg)}.bp-webchat-loading-hero{display:grid;place-items:center;gap:14px;padding:12px 0 18px}.bp-webchat-loading-circle{width:86px;height:86px;border-radius:999px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent-color) 16%,transparent),color-mix(in srgb,var(--accent-color) 32%,transparent))}.bp-webchat-loading-line{border-radius:999px;background:linear-gradient(90deg,var(--ui-bg-muted) 0%,var(--ui-bg-subtle) 50%,var(--ui-bg-muted) 100%);background-size:200% 100%;animation:bp-webchat-shimmer 1.5s linear infinite}.bp-webchat-loading-line--title{width:120px;height:16px}.bp-webchat-loading-line--subtitle{width:170px;height:12px}.bp-webchat-loading-bubble{max-width:82%;padding:16px;border-radius:18px 18px 18px 6px;background:var(--ui-bg-muted)}.bp-webchat-loading-bubble--right{margin-left:auto;border-radius:18px 18px 6px;background:var(--ui-bg-subtle)}.bp-webchat-loading-bubble .bp-webchat-loading-line+.bp-webchat-loading-line{margin-top:10px}.bp-webchat-loading-composer{margin-top:auto;display:flex;align-items:center;gap:12px;padding-top:8px}.bp-webchat-loading-input{flex:1;height:50px;border-radius:14px;background:var(--ui-bg);border:1px solid var(--ui-border)}.bp-webchat-loading-mic{width:42px;height:42px;border-radius:999px;background:var(--ui-bg);border:1px solid var(--ui-border)}@keyframes bp-webchat-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.bp-webchat-fab{position:relative;width:64px;height:64px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:999px;cursor:pointer;color:var(--fab-icon-color, #ffffff);box-shadow:0 14px 28px #0f172a1f;transition:transform .18s ease,box-shadow .18s ease,background .18s ease;background:var(--fab-background-color, var(--accent-color));overflow:hidden}.bp-webchat-fab:hover{transform:translateY(-2px);box-shadow:0 18px 32px #0f172a29}.bp-webchat-fab:focus-visible{outline:0;box-shadow:0 0 0 4px #ffffffe0,0 0 0 7px #2563eb2e,0 18px 36px #0f172a2e}.bp-webchat-fab:before{content:"";position:absolute;inset:1px;border-radius:999px;background:linear-gradient(180deg,#ffffff2e,#fff0);pointer-events:none}.bp-webchat-fab-icon{position:absolute;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .18s ease,transform .18s ease;will-change:opacity,transform}.bp-webchat-fab-icon svg{position:relative;z-index:1;width:24px;height:24px}.bp-webchat-fab-icon--chat{opacity:1;transform:scale(1) rotate(0)}.bp-webchat-fab-icon--chat svg{width:30px;height:30px}.bp-webchat-fab-icon--close{opacity:0;transform:scale(.72) rotate(-90deg)}.bp-webchat-fab[data-open=true] .bp-webchat-fab-icon--chat{opacity:0;transform:scale(.72) rotate(90deg)}.bp-webchat-fab[data-open=true] .bp-webchat-fab-icon--close{opacity:1;transform:scale(1) rotate(0)}.bpMessageBlocksBubbleFeedbackIcon svg{width:14px;height:14px}.bp-webchat-modal-backdrop{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:18px;overflow:hidden;border-radius:inherit;background:linear-gradient(180deg,color-mix(in srgb,var(--ui-bg-elevated) 24%,transparent),color-mix(in srgb,var(--ui-text) 16%,transparent));backdrop-filter:blur(10px) saturate(1.04);-webkit-backdrop-filter:blur(10px) saturate(1.04);z-index:20}.bp-webchat-modal{width:100%;max-width:360px;border:1px solid var(--ui-border);border-radius:18px;background:var(--ui-bg-elevated);box-shadow:var(--ui-shadow-md);overflow:hidden}.bp-webchat-modal-title{margin:0;padding:20px 20px 8px;text-align:left;color:var(--ui-text);font-size:1rem;line-height:1.3;font-weight:600}.bp-webchat-modal-description{margin:0;padding:0 20px 16px;text-align:left;color:var(--ui-text-muted);font-size:.9rem;line-height:1.55}.bp-webchat-modal-field-wrap{padding:0 20px 16px}.bp-webchat-modal-textarea{width:100%;min-height:96px;resize:vertical;border-radius:var(--ui-radius-md);border:1px solid var(--ui-border);background:var(--ui-bg-subtle);padding:12px 14px;font:inherit;color:var(--ui-text);outline:0;transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}.bp-webchat-modal-textarea::placeholder{color:var(--ui-text-muted)}.bp-webchat-modal-textarea:focus{border-color:var(--ui-border-strong);box-shadow:var(--ui-ring);background:var(--ui-bg)}.bp-webchat-modal-actions{display:grid;gap:12px;padding:0 20px 20px}.bp-webchat-modal-button{width:100%;border:1px solid var(--ui-secondary-border);border-radius:var(--ui-radius-md);padding:12px 16px;font:inherit;font-size:.94rem;font-weight:600;cursor:pointer;color:var(--ui-secondary-text);background:var(--ui-secondary);box-shadow:var(--ui-shadow-sm);transition:transform .14s ease,background .14s ease,border-color .14s ease,box-shadow .14s ease,color .14s ease}.bp-webchat-modal-button:hover{transform:translateY(-1px);border-color:var(--ui-secondary-border);background:var(--ui-secondary-hover)}.bp-webchat-modal-button--primary{border-color:var(--ui-primary);color:var(--ui-primary-text);background:var(--ui-primary)}.bp-webchat-modal-button--primary:hover{border-color:var(--ui-primary-hover);background:var(--ui-primary-hover)}@media(max-width:640px){.bp-webchat-shell{width:calc(100vw - 24px)}.bp-webchat-panel{height:min(var(--widget-height),calc(100vh - 120px))}.bp-webchat-welcome-card{padding-left:20px;padding-right:20px}.bp-webchat-welcome-card-description{max-width:none}.bp-webchat-shell[data-panel-mounted=true]{inset:0!important;width:100vw!important;max-width:100vw!important;height:100vh;height:100dvh;gap:0}.bp-webchat-shell[data-panel-mounted=true] .bp-webchat-panel{width:100%;height:100%;border:0;border-radius:0;box-shadow:none;transform:none}.bp-webchat-shell[data-panel-mounted=true] .bp-webchat-fab{display:none}.bp-webchat-mobile-close{display:inline-flex}}
|
|
1
|
+
:host{all:initial}.bp-webchat-shell *,.bp-webchat-shell *:before,.bp-webchat-shell *:after{box-sizing:border-box}.bp-webchat-shell{position:fixed;z-index:2147483000;display:flex;flex-direction:column;align-items:var(--widget-align, flex-end);gap:16px;width:min(var(--widget-width),calc(100vw - 24px));font-family:Inter,Segoe UI,sans-serif;--ui-bg: var(--panel-background-color, #ffffff);--ui-bg-elevated: var(--panel-elevated-background-color, #ffffff);--ui-bg-subtle: var(--panel-subtle-background-color, #fafafa);--ui-bg-muted: var(--panel-muted-background-color, #f4f4f5);--ui-bg-hover: var(--panel-hover-background-color, #f4f4f5);--ui-bg-selected: var(--panel-selected-background-color, #f5f5f5);--ui-border: var(--panel-border-color, #e4e4e7);--ui-border-strong: var(--panel-strong-border-color, #d4d4d8);--ui-text: var(--panel-text-color, #18181b);--ui-text-muted: var(--panel-muted-text-color, #71717a);--ui-primary: var(--primary-button-background-color, #18181b);--ui-primary-hover: var(--primary-button-hover-background-color, #27272a);--ui-primary-text: var(--primary-button-text-color, #fafafa);--ui-secondary: var(--secondary-button-background-color, #ffffff);--ui-secondary-hover: var(--secondary-button-hover-background-color, #f4f4f5);--ui-secondary-text: var(--secondary-button-text-color, #18181b);--ui-secondary-border: var(--secondary-button-border-color, #e4e4e7);--ui-icon-button-bg: var(--icon-button-background-color, #ffffff);--ui-icon-button-hover: var(--icon-button-hover-background-color, #f4f4f5);--ui-icon-button-color: var(--icon-button-icon-color, #71717a);--ui-icon-button-border: var(--icon-button-border-color, #e4e4e7);--ui-ring: 0 0 0 3px rgba(24, 24, 27, .08);--ui-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);--ui-shadow-md: 0 12px 32px rgba(15, 23, 42, .1);--ui-radius-sm: 10px;--ui-radius-md: 12px;--ui-radius-lg: 16px}.bp-webchat-panel{position:relative;overflow:hidden;width:100%;height:min(var(--widget-height),calc(100dvh - 132px));border:1px solid var(--ui-border);border-radius:24px;background:var(--ui-bg);box-shadow:0 18px 50px #0f172a1f;opacity:0;transform:translateY(12px) scale(.98);transform-origin:var(--panel-transform-origin, right bottom);transition:opacity .22s cubic-bezier(.22,1,.36,1),transform .22s cubic-bezier(.22,1,.36,1);will-change:opacity,transform}.bp-webchat-panel[data-state=open]{opacity:1;transform:translateY(0) scale(1)}.bp-webchat-panel[data-state=closed]{pointer-events:none}.bp-webchat-error{padding:18px;border-radius:20px;background:#fff7ed;color:#9a3412;line-height:1.6;font-size:.95rem;box-shadow:0 20px 40px #0f172a1f}.bp-webchat-layout{position:relative;display:flex;flex-direction:column;width:100%;height:100%;background:var(--ui-bg)}.bp-webchat-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 16px 14px;border-bottom:1px solid var(--ui-border);background:var(--panel-header-background-color, rgba(255, 255, 255, .96))}.bp-webchat-header-meta{display:flex;align-items:center;min-width:0;gap:12px}.bp-webchat-header-actions{display:inline-flex;align-items:center;gap:6px}.bp-webchat-avatar{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 auto;border-radius:999px;background:var(--header-avatar-bg, var(--accent-color));color:var(--header-avatar-text, #ffffff);font-size:1rem;font-weight:700;text-transform:uppercase;overflow:hidden}.bp-webchat-avatar img{width:100%;height:100%;object-fit:cover}.bp-webchat-header-text{min-width:0}.bp-webchat-header-title{margin:0;color:var(--ui-text);font-size:.96rem;line-height:1.2;font-weight:600}.bp-webchat-header-subtitle{margin:4px 0 0;color:var(--ui-text-muted);font-size:.84rem;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bp-webchat-welcome{position:relative;display:flex;flex-direction:column;height:100%;overflow:hidden;background:var( --welcome-background, linear-gradient(180deg, #f4f4f5 0%, #fafafa 34%, #ffffff 34%, #ffffff 100%) )}.bp-webchat-welcome-hero{position:relative;min-height:184px;background:var( --welcome-hero-background, linear-gradient(180deg, #f5f5f5 0%, #efeff1 100%) );overflow:hidden}.bp-webchat-welcome-hero:after{content:"";position:absolute;inset:0;background:#0000002e;pointer-events:none}.bp-webchat-welcome-close{position:absolute;top:14px;right:14px;z-index:3}.bp-webchat-welcome-cover{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top}.bp-webchat-welcome-card-wrap{position:relative;margin-top:-24px;padding:0 16px;z-index:2}.bp-webchat-welcome-card{position:relative;border-radius:22px;background:var(--ui-bg-elevated);box-shadow:var(--ui-shadow-md);border:1px solid var(--ui-border);padding:68px 22px 18px}.bp-webchat-welcome-card-badge{position:absolute;top:-34px;left:50%;transform:translate(-50%);display:grid;place-items:center;width:84px;height:84px;border-radius:999px;background:var(--header-avatar-bg, var(--accent-color));box-shadow:var(--ui-shadow-sm);overflow:hidden;border:1px solid color-mix(in srgb,var(--header-avatar-bg, var(--accent-color)) 78%,var(--ui-bg-elevated))}.bp-webchat-welcome-card-badge img{width:100%;height:100%;object-fit:cover}.bp-webchat-welcome-card-badge span{color:var(--header-avatar-text, #ffffff);font-size:2rem;font-weight:700}.bp-webchat-welcome-card-title{margin:0;color:var(--ui-text);font-size:1rem;line-height:1.15;font-weight:700;text-wrap:balance}.bp-webchat-welcome-card-status{margin:10px 0 0;color:var(--ui-text-muted);font-size:.88rem;line-height:1.4}.bp-webchat-welcome-card-status strong{color:var(--welcome-online-status-color, #16a34a);font-weight:700}.bp-webchat-welcome-card-description{margin:14px 0 0;color:var(--ui-text-muted);font-size:.94rem;line-height:1.62;text-align:justify;white-space:pre-wrap}.bp-webchat-welcome-cta{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin-top:22px;padding:14px 16px;border:1px solid var(--ui-primary);border-radius:var(--ui-radius-lg);box-shadow:var(--ui-shadow-sm);color:var(--ui-primary-text);font:inherit;font-size:.98rem;font-weight:600;cursor:pointer;background:var(--ui-primary);text-align:left;transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border-color .14s ease}.bp-webchat-welcome-cta:hover{transform:translateY(-1px);border-color:var(--ui-primary-hover);background:var(--ui-primary-hover);box-shadow:0 10px 20px #0f172a1f}.bp-webchat-welcome-cta-left{display:inline-flex;align-items:center;gap:12px}.bp-webchat-welcome-cta-copy{display:grid;gap:2px}.bp-webchat-welcome-cta-title{color:inherit;font-size:.98rem;font-weight:600;line-height:1.2}.bp-webchat-welcome-cta-description{color:color-mix(in srgb,var(--ui-primary-text) 74%,transparent);font-size:.82rem;line-height:1.35;font-weight:500}.bp-webchat-welcome-cta-right{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex:0 0 auto;color:inherit;border-radius:999px;background:color-mix(in srgb,var(--ui-primary-text) 10%,transparent)}.bp-webchat-welcome-cta-right svg{width:18px;height:18px}.bp-webchat-tabs,.bp-webchat-welcome-bottom{margin-top:auto;border-top:1px solid var(--ui-border);display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:6px;background:var(--ui-bg)}.bp-webchat-tab,.bp-webchat-welcome-tab{border:0;background:transparent;display:grid;justify-items:center;gap:4px;padding:9px 8px;color:var(--ui-text-muted);font-size:.84rem;font-family:inherit;font-weight:500;cursor:pointer;border-radius:var(--ui-radius-md);transition:color .14s ease,background .14s ease,box-shadow .14s ease}.bp-webchat-tab:hover,.bp-webchat-welcome-tab:hover{background:var(--ui-bg-hover)}.bp-webchat-tab[data-active=true],.bp-webchat-welcome-tab[data-active=true]{color:var(--ui-text);background:transparent;box-shadow:none}.bp-webchat-tab-icon,.bp-webchat-welcome-tab-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:999px;color:inherit;background:transparent;transition:background .14s ease,transform .14s ease}.bp-webchat-tab:hover .bp-webchat-tab-icon,.bp-webchat-welcome-tab:hover .bp-webchat-welcome-tab-icon{transform:translateY(-1px)}.bp-webchat-tab[data-active=true] .bp-webchat-tab-icon,.bp-webchat-welcome-tab[data-active=true] .bp-webchat-welcome-tab-icon{background:transparent}.bp-webchat-tab-icon svg,.bp-webchat-welcome-tab-icon svg{width:15px;height:15px}.bp-webchat-icon-button{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 auto;border:1px solid var(--ui-icon-button-border);border-radius:999px;background:var(--ui-icon-button-bg);color:var(--ui-icon-button-color);cursor:pointer;box-shadow:var(--ui-shadow-sm);transition:background .14s ease,border-color .14s ease,color .14s ease,box-shadow .14s ease}.bp-webchat-icon-button:hover{background:var(--ui-icon-button-hover);border-color:var(--ui-icon-button-border);color:var(--ui-text)}.bp-webchat-icon-button:focus-visible,.bp-webchat-tab:focus-visible,.bp-webchat-welcome-tab:focus-visible,.bp-webchat-welcome-cta:focus-visible,.bp-webchat-history-item:focus-visible,.bp-webchat-history-new:focus-visible,.bp-webchat-modal-button:focus-visible{outline:0;box-shadow:var(--ui-ring)}.bp-webchat-icon-button svg{width:20px;height:20px}.bp-webchat-mobile-close{display:none}.bp-webchat-container.bpContainer{height:100%;max-height:none;border-radius:0;border-color:var(--ui-border);background:var(--ui-bg);color:var(--ui-text);box-shadow:none}.bp-webchat-container .bpHeader{display:none}.bp-webchat-container .bpMessageListContainer,.bp-webchat-container .bpMessageListViewport,.bp-webchat-container .bpMessageListMarqueeContainer{background:var(--ui-bg);color:var(--ui-text)}.bp-webchat-container .bpMessageListContainer{padding-top:0;background:var(--ui-bg);--bpPrimary-600: var(--header-avatar-bg, var(--accent-color));--bpPrimary-50: var(--header-avatar-text, #ffffff);--message-bg: var(--outgoing-message-background-color, #ebf1fd);--message-text: var(--outgoing-message-text-color, #0f2346)}.bp-webchat-container .bpMessageListMarqueeContainer:only-child{margin-block:auto;padding-block:0}.bp-webchat-container .bpMessageListMarqueeTitle{color:var(--ui-text)}.bp-webchat-container .bpMessageListMarqueeDescription,.bp-webchat-container .bpMessageListHeaderMessage{color:var(--ui-text-muted)}.bp-webchat-container .bpMessageListScrollDownButton{z-index:1}.bp-webchat-container .bpMessageBlocksBubble[data-direction=incoming]{background-color:var(--incoming-message-background-color, #f0f0f3);color:var(--incoming-message-text-color, #202127)}.bp-webchat-container .bpMessageBlocksBubble[data-direction=outgoing]{background-color:var(--outgoing-message-background-color, #ebf1fd);color:var(--outgoing-message-text-color, #0f2346)}.bp-webchat-container .bpComposer{border-top:1px solid var(--ui-border);background:var(--ui-bg);padding:12px 14px 14px}.bp-webchat-container .bpComposerWrapper,.bp-webchat-container .bpComposerContainer{border:0;background:transparent;box-shadow:none}.bp-webchat-container .bpComposerContainer{gap:10px;padding:0;outline:none}.bp-webchat-container .bpComposerContainer:focus-within,.bp-webchat-container .bpComposerContainer[data-waiting=true]{outline:none;box-shadow:none}.bp-webchat-container .bpComposerInputContainer{border:1px solid var(--ui-border);border-radius:14px;background:var(--ui-bg-elevated);box-shadow:var(--ui-shadow-sm);overflow:hidden;transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}.bp-webchat-container .bpComposerInputContainer:focus-within{border-color:var(--ui-border-strong);box-shadow:var(--ui-ring)}.bp-webchat-container .bpComposerInput{color:var(--ui-text);font-size:.95rem}.bp-webchat-container .bpComposerInput::placeholder{color:var(--ui-text-muted)}.bp-webchat-container .bpComposerSendButton{border-radius:12px;background:var(--ui-primary);color:var(--ui-primary-text);box-shadow:var(--ui-shadow-sm)}.bp-webchat-container .bpComposerSendButton:hover{background:var(--ui-primary-hover)}.bp-webchat-container .bpComposerUploadButton,.bp-webchat-container .bpComposerVoiceButton{border:1px solid var(--ui-icon-button-border);border-radius:12px;background:var(--ui-icon-button-bg);color:var(--ui-icon-button-color);box-shadow:var(--ui-shadow-sm)}.bp-webchat-container .bpComposerUploadButton:hover,.bp-webchat-container .bpComposerVoiceButton:hover{background:var(--ui-icon-button-hover);border-color:var(--ui-icon-button-border);color:var(--ui-text)}.bp-webchat-container .bpComposerFileAttachement{border-color:var(--ui-border);border-radius:12px;background:var(--ui-bg-elevated);box-shadow:none}.bp-webchat-container .bpComposerFileAttachement:hover{border-color:var(--ui-border-strong)}.bp-webchat-container .bpComposerFileIconWrapper{border-color:var(--ui-border);background:var(--ui-bg-subtle)}.bp-webchat-container .bpComposerFileName{color:var(--ui-text)}.bp-webchat-container .bpComposerFileExtension,.bp-webchat-container .bpComposerFooter{color:var(--ui-text-muted)}.bp-webchat-container .bpMessageListMarqueeAvatarFallback,.bp-webchat-container .bpMessageAvatarFallback,.bp-webchat-container .bpHeaderContentAvatarFallback,.bp-webchat-container .bpMessagePreviewAvatarFallback,.bp-webchat-container .bpConversationHistoryConversationAvatarFallback{background-color:var(--header-avatar-bg, var(--accent-color))!important;color:var(--header-avatar-text, #ffffff)!important}.bp-webchat-history{display:flex;flex-direction:column;height:100%;background:var(--ui-bg)}.bp-webchat-history-header{display:flex;align-items:center;justify-content:space-between;padding:16px;border-bottom:1px solid var(--ui-border)}.bp-webchat-history-title{margin:0;color:var(--ui-text);font-size:1rem;font-weight:600}.bp-webchat-history-list{flex:1;overflow:auto;padding:8px}.bp-webchat-history-empty,.bp-webchat-history-loading{display:grid;place-items:center;min-height:220px;padding:24px;color:var(--ui-text-muted);text-align:center;line-height:1.6}.bp-webchat-history-item{width:100%;display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;padding:14px;border:1px solid transparent;border-radius:14px;background:var(--ui-bg);color:inherit;text-align:left;cursor:pointer;font:inherit;transition:background .14s ease,border-color .14s ease,box-shadow .14s ease}.bp-webchat-history-item+.bp-webchat-history-item{margin-top:8px}.bp-webchat-history-item:hover{background:var(--ui-bg-subtle);border-color:var(--ui-border)}.bp-webchat-history-avatar{display:grid;place-items:center;width:48px;height:48px;border-radius:999px;overflow:hidden;background:var(--ui-bg-muted);color:var(--ui-text-muted);font-size:1rem;font-weight:700;flex:0 0 auto;border:1px solid var(--ui-border)}.bp-webchat-history-avatar[data-kind=bot]{background:var(--header-avatar-bg, var(--accent-color));color:var(--header-avatar-text, #ffffff);border-color:color-mix(in srgb,var(--header-avatar-bg, var(--accent-color)) 76%,var(--ui-bg-elevated))}.bp-webchat-history-avatar img{width:100%;height:100%;object-fit:cover}.bp-webchat-history-avatar svg{width:20px;height:20px}.bp-webchat-history-content{min-width:0;display:grid;gap:4px}.bp-webchat-history-name{color:var(--ui-text);font-size:.93rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bp-webchat-history-time{color:var(--ui-text-muted);font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bp-webchat-history-chevron{color:var(--ui-text-muted)}.bp-webchat-history-chevron svg{width:20px;height:20px}.bp-webchat-history-footer{padding:12px 16px 16px;border-top:1px solid var(--ui-border);background:var(--ui-bg)}.bp-webchat-history-new{width:100%;display:inline-flex;align-items:center;justify-content:center;gap:10px;border:1px solid var(--ui-primary);border-radius:14px;padding:13px 16px;background:var(--ui-primary);color:var(--ui-primary-text);font:inherit;font-size:.94rem;font-weight:600;cursor:pointer;box-shadow:var(--ui-shadow-sm);transition:background .14s ease,border-color .14s ease,transform .14s ease}.bp-webchat-history-new:hover{background:var(--ui-primary-hover);border-color:var(--ui-primary-hover);transform:translateY(-1px)}.bp-webchat-history-new svg{width:20px;height:20px}.bp-webchat-loading{display:flex;flex-direction:column;gap:18px;padding:22px 18px 18px;height:100%;background:var(--ui-bg)}.bp-webchat-loading-hero{display:grid;place-items:center;gap:14px;padding:12px 0 18px}.bp-webchat-loading-circle{width:86px;height:86px;border-radius:999px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent-color) 16%,transparent),color-mix(in srgb,var(--accent-color) 32%,transparent))}.bp-webchat-loading-line{border-radius:999px;background:linear-gradient(90deg,var(--ui-bg-muted) 0%,var(--ui-bg-subtle) 50%,var(--ui-bg-muted) 100%);background-size:200% 100%;animation:bp-webchat-shimmer 1.5s linear infinite}.bp-webchat-loading-line--title{width:120px;height:16px}.bp-webchat-loading-line--subtitle{width:170px;height:12px}.bp-webchat-loading-bubble{max-width:82%;padding:16px;border-radius:18px 18px 18px 6px;background:var(--ui-bg-muted)}.bp-webchat-loading-bubble--right{margin-left:auto;border-radius:18px 18px 6px;background:var(--ui-bg-subtle)}.bp-webchat-loading-bubble .bp-webchat-loading-line+.bp-webchat-loading-line{margin-top:10px}.bp-webchat-loading-composer{margin-top:auto;display:flex;align-items:center;gap:12px;padding-top:8px}.bp-webchat-loading-input{flex:1;height:50px;border-radius:14px;background:var(--ui-bg);border:1px solid var(--ui-border)}.bp-webchat-loading-mic{width:42px;height:42px;border-radius:999px;background:var(--ui-bg);border:1px solid var(--ui-border)}@keyframes bp-webchat-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.bp-webchat-fab{position:relative;width:64px;height:64px;display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:999px;cursor:pointer;color:var(--fab-icon-color, #ffffff);box-shadow:0 14px 28px #0f172a1f;transition:transform .18s ease,box-shadow .18s ease,background .18s ease;background:var(--fab-background-color, var(--accent-color));overflow:hidden}.bp-webchat-fab:hover{transform:translateY(-2px);box-shadow:0 18px 32px #0f172a29}.bp-webchat-fab:focus-visible{outline:0;box-shadow:0 0 0 4px #ffffffe0,0 0 0 7px #2563eb2e,0 18px 36px #0f172a2e}.bp-webchat-fab:before{content:"";position:absolute;inset:1px;border-radius:999px;background:linear-gradient(180deg,#ffffff2e,#fff0);pointer-events:none}.bp-webchat-fab-icon{position:absolute;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .18s ease,transform .18s ease;will-change:opacity,transform}.bp-webchat-fab-icon svg{position:relative;z-index:1;width:24px;height:24px}.bp-webchat-fab-icon--chat{opacity:1;transform:scale(1) rotate(0)}.bp-webchat-fab-icon--chat svg{width:30px;height:30px}.bp-webchat-fab-icon--close{opacity:0;transform:scale(.72) rotate(-90deg)}.bp-webchat-fab[data-open=true] .bp-webchat-fab-icon--chat{opacity:0;transform:scale(.72) rotate(90deg)}.bp-webchat-fab[data-open=true] .bp-webchat-fab-icon--close{opacity:1;transform:scale(1) rotate(0)}.bpMessageBlocksBubbleFeedbackIcon svg{width:14px;height:14px}.bp-webchat-modal-backdrop{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:18px;overflow:hidden;border-radius:inherit;background:linear-gradient(180deg,color-mix(in srgb,var(--ui-bg-elevated) 24%,transparent),color-mix(in srgb,var(--ui-text) 16%,transparent));backdrop-filter:blur(10px) saturate(1.04);-webkit-backdrop-filter:blur(10px) saturate(1.04);z-index:20}.bp-webchat-modal{width:100%;max-width:360px;border:1px solid var(--ui-border);border-radius:18px;background:var(--ui-bg-elevated);box-shadow:var(--ui-shadow-md);overflow:hidden}.bp-webchat-modal-title{margin:0;padding:20px 20px 8px;text-align:left;color:var(--ui-text);font-size:1rem;line-height:1.3;font-weight:600}.bp-webchat-modal-description{margin:0;padding:0 20px 16px;text-align:left;color:var(--ui-text-muted);font-size:.9rem;line-height:1.55}.bp-webchat-modal-field-wrap{padding:0 20px 16px}.bp-webchat-modal-textarea{width:100%;min-height:96px;resize:vertical;border-radius:var(--ui-radius-md);border:1px solid var(--ui-border);background:var(--ui-bg-subtle);padding:12px 14px;font:inherit;color:var(--ui-text);outline:0;transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}.bp-webchat-modal-textarea::placeholder{color:var(--ui-text-muted)}.bp-webchat-modal-textarea:focus{border-color:var(--ui-border-strong);box-shadow:var(--ui-ring);background:var(--ui-bg)}.bp-webchat-modal-actions{display:grid;gap:12px;padding:0 20px 20px}.bp-webchat-modal-button{width:100%;border:1px solid var(--ui-secondary-border);border-radius:var(--ui-radius-md);padding:12px 16px;font:inherit;font-size:.94rem;font-weight:600;cursor:pointer;color:var(--ui-secondary-text);background:var(--ui-secondary);box-shadow:var(--ui-shadow-sm);transition:transform .14s ease,background .14s ease,border-color .14s ease,box-shadow .14s ease,color .14s ease}.bp-webchat-modal-button:hover{transform:translateY(-1px);border-color:var(--ui-secondary-border);background:var(--ui-secondary-hover)}.bp-webchat-modal-button--primary{border-color:var(--ui-primary);color:var(--ui-primary-text);background:var(--ui-primary)}.bp-webchat-modal-button--primary:hover{border-color:var(--ui-primary-hover);background:var(--ui-primary-hover)}@media(max-width:640px){.bp-webchat-shell{width:calc(100vw - 24px)}.bp-webchat-panel{height:min(var(--widget-height),calc(100vh - 120px))}.bp-webchat-welcome-card{padding-left:20px;padding-right:20px}.bp-webchat-welcome-card-description{max-width:none}.bp-webchat-shell[data-panel-mounted=true]{inset:0!important;width:100vw!important;max-width:100vw!important;height:100vh;height:100dvh;gap:0}.bp-webchat-shell[data-panel-mounted=true] .bp-webchat-panel{width:100%;height:100%;border:0;border-radius:0;box-shadow:none;transform:none}.bp-webchat-shell[data-panel-mounted=true] .bp-webchat-fab{display:none}.bp-webchat-mobile-close{display:inline-flex}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eduzz-automacoes/webchat-widget",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Eduzz Webchat library for React/npm and CDN integration",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"@vitejs/plugin-react": "^5.1.1",
|
|
40
40
|
"react": "^19.2.0",
|
|
41
41
|
"react-dom": "^19.2.0",
|
|
42
|
-
"vite": "^7.2.4"
|
|
42
|
+
"vite": "^7.2.4",
|
|
43
|
+
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
43
44
|
}
|
|
44
45
|
}
|