streamlit-nightly 1.43.3.dev20250313__py3-none-any.whl → 1.43.3.dev20250314__py3-none-any.whl
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.
- streamlit/components/v1/custom_component.py +1 -1
- streamlit/elements/plotly_chart.py +2 -2
- streamlit/navigation/page.py +2 -2
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.imTamlxP.js → FileDownload.esm.C9LJHGQA.js} +1 -1
- streamlit/static/static/js/{FileHelper.BwPSCUvG.js → FileHelper.jkT1raGU.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.DB5q2Avl.js → FormClearHelper.DhbIpC8c.js} +1 -1
- streamlit/static/static/js/{Hooks.Cxijo2P7.js → Hooks.CriWgW_b.js} +1 -1
- streamlit/static/static/js/{InputInstructions.B3OvMrKL.js → InputInstructions.D3RY91P2.js} +1 -1
- streamlit/static/static/js/{ProgressBar.DmTol130.js → ProgressBar.C3Pzm-B2.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.B8t62565.js → RenderInPortalIfExists.BZnHZgZS.js} +1 -1
- streamlit/static/static/js/{Toolbar.CbG49UPG.js → Toolbar.B5rV1WJt.js} +1 -1
- streamlit/static/static/js/{base-input.D7sJ1S2g.js → base-input.Cw4qDIMU.js} +1 -1
- streamlit/static/static/js/{checkbox.0Qx7AQxA.js → checkbox.DkQySTTm.js} +1 -1
- streamlit/static/static/js/{createSuper.DYiyAta_.js → createSuper.BSo5GDIi.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DH61CZYo.js → data-grid-overlay-editor.B1mf5JDE.js} +1 -1
- streamlit/static/static/js/{downloader.ClUad3SK.js → downloader.B1pPErIQ.js} +1 -1
- streamlit/static/static/js/{es6.oePMPTIo.js → es6.DMqquk5e.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.DWkIX4K7.js → iframeResizer.contentWindow.ChumCRtp.js} +1 -1
- streamlit/static/static/js/{index.BSZRb65z.js → index.5WgntJXP.js} +1 -1
- streamlit/static/static/js/{index.BJRyQckV.js → index.7Uw588Xk.js} +1 -1
- streamlit/static/static/js/{index.DlEF0vUx.js → index.B3IKgYX5.js} +1 -1
- streamlit/static/static/js/{index.DoqMrowT.js → index.B3eHKw73.js} +1 -1
- streamlit/static/static/js/{index.CyRCgpSs.js → index.B740eLHm.js} +1 -1
- streamlit/static/static/js/{index.kB2IGVOe.js → index.B96IeQgZ.js} +1 -1
- streamlit/static/static/js/{index.DhcpqbOJ.js → index.BFTTgLeU.js} +1 -1
- streamlit/static/static/js/{index.BhzKPoO6.js → index.BOaNnKYB.js} +1 -1
- streamlit/static/static/js/{index.1VrMb7Gq.js → index.BTOGrbrn.js} +1 -1
- streamlit/static/static/js/{index.CM7PC5PD.js → index.BbRfGs1X.js} +1 -1
- streamlit/static/static/js/{index.tVO_vJdT.js → index.BgDVGIiW.js} +1 -1
- streamlit/static/static/js/{index.CCAIkxXD.js → index.BlL9sy9J.js} +1307 -2132
- streamlit/static/static/js/{index.Dd9D963h.js → index.BlmSw6QY.js} +1 -1
- streamlit/static/static/js/{index.DnJimAdR.js → index.C5YEuIXg.js} +1 -1
- streamlit/static/static/js/{index.XZw2NTV4.js → index.CKXJOTqx.js} +1 -1
- streamlit/static/static/js/{index.axjxDsFs.js → index.CSTjg2CK.js} +1 -1
- streamlit/static/static/js/{index.BccrUqFL.js → index.CVd_6WNy.js} +1 -1
- streamlit/static/static/js/{index.BpNXx3zc.js → index.Cd6xqijF.js} +5 -5
- streamlit/static/static/js/{index.YB9Oe71d.js → index.CfNMuIIh.js} +1 -1
- streamlit/static/static/js/{index.62zz5frt.js → index.CrkWnEhn.js} +1 -1
- streamlit/static/static/js/{index.C-ilKj2l.js → index.D0wPNnz8.js} +1 -1
- streamlit/static/static/js/{index.BWsaTYC-.js → index.DK1PVQ6C.js} +1 -1
- streamlit/static/static/js/{index.DJRmF7dm.js → index.DT_OGzkj.js} +1 -1
- streamlit/static/static/js/{index.CEXlj4h2.js → index.DWAHTwxW.js} +1 -1
- streamlit/static/static/js/{index.CzFs8nXc.js → index.DaaBud_u.js} +5 -5
- streamlit/static/static/js/{index.D2JlVfHE.js → index.DbQZTVYH.js} +1 -1
- streamlit/static/static/js/{index.BQVZQA1G.js → index.DqPipBPf.js} +1 -1
- streamlit/static/static/js/{index.DtS10fdK.js → index.Dz2EqLgY.js} +1 -1
- streamlit/static/static/js/{index.Czxn5B2N.js → index.LgpTjYjs.js} +1 -1
- streamlit/static/static/js/{index.DqsHy8ck.js → index.Sd38jGo-.js} +1 -1
- streamlit/static/static/js/{index.CSLXWDcG.js → index.TcpXhGIM.js} +1 -1
- streamlit/static/static/js/{index.CqywW5KK.js → index._70PT65v.js} +1 -1
- streamlit/static/static/js/{index.BzEstIKX.js → index.bVsz2ldg.js} +1 -1
- streamlit/static/static/js/{index.D0OLo5Dp.js → index.lVcG4OCJ.js} +1 -1
- streamlit/static/static/js/{index.BUJE3tb_.js → index.rPVy0ui5.js} +1 -1
- streamlit/static/static/js/{index.uPQFE7KD.js → index.szAaQUP4.js} +1 -1
- streamlit/static/static/js/{index.CEtBn4Yo.js → index.w7piGYbJ.js} +1 -1
- streamlit/static/static/js/{input.od7ufwko.js → input.CGLa0Mkr.js} +1 -1
- streamlit/static/static/js/{memory.B4tdC6o-.js → memory.u6Bv68yh.js} +1 -1
- streamlit/static/static/js/{mergeWith.BIQlVIWW.js → mergeWith.BEgniPh1.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.yJDCpy9b.js → number-overlay-editor.94bIlYUC.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.CarGSmuW.js → possibleConstructorReturn.Dfpu-j0D.js} +1 -1
- streamlit/static/static/js/{sandbox.DMCKOK6i.js → sandbox.CYYH_geg.js} +1 -1
- streamlit/static/static/js/{textarea.CKKbJt6B.js → textarea.ByGG-B4n.js} +1 -1
- streamlit/static/static/js/{timepicker.BgsARtBm.js → timepicker.B7cgXhs2.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.DXHhbr1a.js → toConsumableArray.K_KdQrnP.js} +1 -1
- streamlit/static/static/js/{uniqueId.Cb5oTCCd.js → uniqueId.BoMGywDL.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.8rZ80dWq.js → useBasicWidgetState.DJ657I97.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.Bc5KC47X.js → useOnInputChange.BT-TUWed.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.CSP3iCNz.js → withFullScreenWrapper.DpT3_k8t.js} +1 -1
- {streamlit_nightly-1.43.3.dev20250313.dist-info → streamlit_nightly-1.43.3.dev20250314.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.43.3.dev20250313.dist-info → streamlit_nightly-1.43.3.dev20250314.dist-info}/RECORD +75 -75
- {streamlit_nightly-1.43.3.dev20250313.data → streamlit_nightly-1.43.3.dev20250314.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.43.3.dev20250313.dist-info → streamlit_nightly-1.43.3.dev20250314.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.43.3.dev20250313.dist-info → streamlit_nightly-1.43.3.dev20250314.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.43.3.dev20250313.dist-info → streamlit_nightly-1.43.3.dev20250314.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{n,r as t,N as i,j as c,b1 as d,b2 as e,L as g}from"./index.
|
1
|
+
import{n,r as t,N as i,j as c,b1 as d,b2 as e,L as g}from"./index.DaaBud_u.js";const l=n("iframe",{target:"e3tg43n0"})(({theme:o,disableScrolling:r})=>({width:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:r?"hidden":void 0}));function s(o){return g(o)||o===""?void 0:o}function m({element:o}){const r=s(o.src),a=i(r)?void 0:s(o.srcdoc);return c(l,{className:"stIFrame","data-testid":"stIFrame",allow:e,disableScrolling:!o.scrolling,src:r,srcDoc:a,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:d,title:"st.iframe"})}const I=t.memo(m);export{I as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as i,j as c,br as g,bP as b}from"./index.
|
1
|
+
import{r as i,j as c,br as g,bP as b}from"./index.DaaBud_u.js";import{a as m}from"./useBasicWidgetState.DJ657I97.js";import"./FormClearHelper.DhbIpC8c.js";const f=(t,e)=>t.getStringValue(e),p=t=>t.default??null,C=t=>t.value??null,d=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},P=({element:t,disabled:e,widgetMgr:r,fragmentId:o})=>{var l;const[s,a]=m({getStateFromWidgetMgr:f,getDefaultStateFromProto:p,getCurrStateFromProto:C,updateWidgetMgrState:d,element:t,widgetMgr:r,fragmentId:o}),u=i.useCallback(n=>{a({value:n,fromUi:!0})},[a]);return c(b,{label:t.label,labelVisibility:g((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:u,disabled:e,value:s})},k=i.memo(P);export{k as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as l,b5 as a,j as e,b6 as d,bp as u,b4 as c,b7 as B,b8 as b}from"./index.
|
1
|
+
import{r as l,b5 as a,j as e,b6 as d,bp as u,b4 as c,b7 as B,b8 as b}from"./index.DaaBud_u.js";function m(i){const{disabled:o,element:t,widgetMgr:s,fragmentId:r}=i;let n=a.SECONDARY;return t.type==="primary"?n=a.PRIMARY:t.type==="tertiary"&&(n=a.TERTIARY),e(b,{className:"stButton","data-testid":"stButton",children:e(d,{help:t.help,containerWidth:t.useContainerWidth,children:e(u,{kind:n,size:c.SMALL,disabled:o,containerWidth:t.useContainerWidth,onClick:()=>s.setTriggerValue(t,{fromUi:!0},r),children:e(B,{icon:t.icon,label:t.label})})})})}const h=l.memo(m);export{h as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{n as o,bm as S,i as f,r as g,R as l,j as r,B as u,c5 as m,aC as $}from"./index.
|
1
|
+
import{n as o,bm as S,i as f,r as g,R as l,j as r,B as u,c5 as m,aC as $}from"./index.DaaBud_u.js";const x=o(S,{shouldForwardProp:f,target:"e12gfcky0"})(({theme:e})=>({fontSize:e.fontSizes.sm,width:e.sizes.spinnerSize,height:e.sizes.spinnerSize,borderWidth:e.sizes.spinnerThickness,justifyContents:"center",padding:e.spacing.none,margin:e.spacing.none,borderColor:e.colors.borderColor,borderTopColor:e.colors.secondary,flexGrow:0,flexShrink:0})),y=o("div",{target:"e12gfcky1"})(({theme:e,cache:s})=>({...s?{paddingBottom:e.spacing.lg,background:`linear-gradient(to bottom, ${e.colors.bgColor} 0%, ${e.colors.bgColor} 80%, transparent 100%)`}:null})),T=o("div",{target:"e12gfcky2"})(({theme:e})=>({opacity:.6,fontSize:e.fontSizes.sm})),h=o("div",{target:"e12gfcky3"})(({theme:e})=>({display:"flex",gap:e.spacing.sm,alignItems:"center",width:"100%"})),b=e=>{const s=Math.floor(e/3600),n=Math.floor(e%3600/60),t=e%60;if(s===0&&n===0)return`(${t.toFixed(1)} seconds)`;if(s===0){const d=`${n} minute${n===1?"":"s"}`,p=t===0?"":`, ${t.toFixed(1)} seconds`;return`(${d}${p})`}const i=`${s} hour${s===1?"":"s"}`,a=n===0?"":`, ${n} minute${n===1?"":"s"}`,c=t===0?"":`, ${t.toFixed(1)} seconds`;return`(${i}${a}${c})`};function z({element:e}){const{cache:s,showTime:n}=e,[t,i]=l.useState(0);return l.useEffect(()=>{if(!n)return;const a=setInterval(()=>{i(c=>c+.1)},100);return()=>clearInterval(a)},[n]),r(y,{className:m({stSpinner:!0,stCacheSpinner:s}),"data-testid":"stSpinner",cache:s,children:u(h,{children:[r(x,{}),r($,{source:e.text,allowHTML:!1}),n&&r(T,{children:b(t)})]})})}const k=g.memo(z);export{k as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as l,E as V,_ as $,n as u,A as ft,y as N,j as n,ba as J,bu as mt,B as z,bp as Q,b5 as Z,bo as U,a$ as vt,bG as yt,bj as wt,bH as I,bs as Ct,F as tt,bh as It,bI as xt,L as D,bl as bt,bk as St}from"./index.CzFs8nXc.js";import{g as zt,F as k,C as Ft,I as Et,E as Ut,a as Ht,s as Tt,u as Bt,b as Dt}from"./FileHelper.BwPSCUvG.js";import{I as Lt}from"./InputInstructions.B3OvMrKL.js";import{i as Rt}from"./inputUtils.CQWz5UKz.js";import{a as Y}from"./index.D8rVyQy1.js";import{U as et}from"./UploadFileInfo.C-jY39rj.js";import{T as Mt}from"./textarea.CKKbJt6B.js";import"./base-input.D7sJ1S2g.js";var ot=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(V,$({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});ot.displayName="AttachFile";var nt=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(V,$({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});nt.displayName="ErrorOutline";var at=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(V,$({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("rect",{width:24,height:24,fill:"none"}),l.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});at.displayName="Send";const kt=u("div",{target:"e1togvvn0"})("border:none;position:relative;display:flex;"),Vt=u("div",{target:"e1togvvn1"})(({theme:t,extended:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,maxHeight:e?"none":t.sizes.minElementHeight,gap:t.spacing.sm,overflow:"hidden",":focus-within":{borderColor:t.colors.primary}})),$t=u("button",{target:"e1togvvn2"})(({theme:t,disabled:e,extended:r})=>{const c=ft(t),[f,p]=c?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:r?"0":t.radii.chatInput,borderTopLeftRadius:r?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?f:p,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:c?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray,cursor:"not-allowed"}}}),Nt=u("div",{target:"e1togvvn3"})(({theme:t})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${t.sizes.borderWidth}`,pointerEvents:"none"})),At=u("div",{target:"e1togvvn4"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),Wt=u("div",{target:"ewqvugz0"})(({theme:t,height:e})=>({backgroundColor:t.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${t.sizes.emptyDropdownHeight}, ${e})`,width:"100%",zIndex:t.zIndices.priority})),qt=u("div",{target:"ewqvugz1"})(({theme:t,height:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.primary,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,color:t.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:e,width:"100%",fontWeight:t.fontWeights.bold})),Pt=u("div",{target:"ewqvugz2"})(({theme:t,disabled:e})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${t.sizes.borderWidth}`,cursor:e?"not-allowed":"auto"})),Kt=u("div",{target:"ewqvugz3"})(({disabled:t})=>({pointerEvents:t?"none":"auto"})),Ot=u("div",{target:"ewqvugz4"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20})),_t=u("div",{target:"ewqvugz5"})(({theme:t})=>({left:0,right:0,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"})),Xt=u("div",{target:"ewqvugz6"})(({})=>({display:"flex"})),Gt=u("div",{target:"ewqvugz7"})(({})=>({flex:"0 0 auto"})),jt=u("div",{target:"ewqvugz8"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS})),Yt=u("div",{target:"ewqvugz9"})(({theme:t})=>({color:t.colors.fadedText60})),Jt=u("div",{target:"ewqvugz10"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60})),Qt=u("div",{target:"ewqvugz11"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60})),Zt=u("small",{target:"ewqvugz12"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}));function te({children:t,content:e}){const r=N();return n(mt,{content:e,placement:J.TOP,overrides:{Body:{style:{top:`-${r.sizes.minElementHeight}`}}},children:t})}const ee=({fileInfo:t})=>{const e=N(),{type:r}=t.status;switch(r){case"uploading":return n(yt,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return n(te,{content:t.status.errorMessage,children:n(U,{color:e.colors.red,content:nt,size:"lg"})});case"uploaded":return n(U,{content:Et,size:"lg"});default:return vt(r),null}},oe=({fileInfo:t,onDelete:e})=>z(jt,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[n(Yt,{children:n(ee,{fileInfo:t})}),n(Jt,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),n(Qt,{children:zt(t.size,k.Byte)}),n(Zt,{"data-testid":"stChatInputDeleteBtn",children:n(Q,{onClick:()=>e(t.id),kind:Z.MINIMAL,children:n(U,{content:Ft,size:"lg"})})})]}),ne=({items:t,onDelete:e})=>n(_t,{"data-testid":"stChatUploadedFiles",children:n(Xt,{children:t.map(r=>n(Gt,{children:n(oe,{fileInfo:r,onDelete:e})},r.id))})}),ae=({getNextLocalFileId:t,addFiles:e,updateFile:r,uploadClient:c,element:f,onUploadProgress:p,onUploadComplete:m})=>(x,h)=>{const v=Y.CancelToken.source(),g=new et(h.name,h.size,t(),{type:"uploading",cancelToken:v,progress:1});e([g]),c.uploadFile({formId:"",...f},x.uploadUrl,h,d=>p(d,g.id),v.token).then(()=>m(g.id,x)).catch(d=>{Y.isCancel(d)||r(g.id,g.setStatus({type:"error",errorMessage:d?d.toString():"Unknown error"}))})},re=({acceptMultipleFiles:t,maxFileSize:e,uploadClient:r,uploadFile:c,addFiles:f,getNextLocalFileId:p,deleteExistingFiles:m,onUploadComplete:x})=>(h,v)=>{if(!t&&h.length===0&&v.length>1){const g=v.findIndex(d=>{var y;return((y=d.errors)==null?void 0:y[0].code)===Ut.TooManyFiles});g>=0&&(h.push(v[g].file),v.splice(g,1))}if(!t&&h.length>0&&m(),r.fetchFileURLs(h).then(g=>{wt(g,h).forEach(([d,y])=>{c(d,y)})}).catch(g=>{f(h.map(d=>new et(d.name,d.size,p(),{type:"error",errorMessage:g})))}),v.length>0){const g=v.map(d=>Ht(d,p(),e));f(g)}x()},ie=({getRootProps:t,getInputProps:e,acceptFile:r,disabled:c,theme:f})=>z(Pt,{disabled:c,children:[z(Kt,{"data-testid":"stChatInputFileUploadButton",disabled:c,...t(),children:[n("input",{...e()}),n(Ct,{content:`Upload or drag and drop ${r===I.Multiple?"files":"a file"}`,placement:J.TOP,onMouseEnterDelay:500,children:n(Q,{kind:Z.MINIMAL,disabled:c,children:n(U,{content:ot,size:"lg",color:c?f.colors.fadedText40:f.colors.fadedText60})})})]}),n(Ot,{})]}),se=({getRootProps:t,getInputProps:e,acceptFile:r,inputHeight:c})=>z(tt,{children:[n(Wt,{height:c,...t(),children:n("input",{...e()})}),n(qt,{height:c,children:`Drag and drop ${r===I.Multiple?"files":"a file"} here`})]}),le=6.5,L=1,R=(t,e,r)=>r.map(c=>c.id===t?e:c),M=(t,e)=>e.find(r=>r.id===t);function de({disabled:t,element:e,widgetMgr:r,fragmentId:c,uploadClient:f}){const p=N(),m=l.useRef(null),x=l.useRef(0),h=l.useRef({minHeight:0,maxHeight:0}),[v,g]=It(),[d,y]=l.useState(e.default),[F,A]=l.useState(0),[H,rt]=l.useState(!1),[b,S]=l.useState([]),[E,T]=l.useState(!1),B=l.useMemo(()=>b.some(o=>o.status.type==="uploading")?!1:d!==""||b.length>0,[b,d]),C=xt(e.acceptFile),W=Tt(e.maxUploadSizeMb,k.Megabyte,k.Byte),q=l.useCallback(o=>S(a=>[...a,...o]),[]),P=l.useCallback(o=>{S(a=>{const s=M(o,a);return D(s)?a:(s.status.type==="uploading"&&s.status.cancelToken.cancel(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&f.deleteFile(s.status.fileUrls.deleteUrl),a.filter(i=>i.id!==o))})},[f]),it=()=>{const o=b.filter(a=>a.status.type==="uploaded").map(a=>{const{name:s,size:i,status:w}=a,{fileId:gt,fileUrls:ht}=w;return new bt({fileId:gt,fileUrls:ht,name:s,size:i})});return new St({uploadedFileInfo:o})},K=()=>x.current++,st=re({acceptMultipleFiles:C===I.Multiple,maxFileSize:W,uploadClient:f,uploadFile:ae({getNextLocalFileId:K,addFiles:q,updateFile:(o,a)=>{S(s=>R(o,a,s))},uploadClient:f,element:e,onUploadProgress:(o,a)=>{S(s=>{const i=M(a,s);if(D(i)||i.status.type!=="uploading")return s;const w=Math.round(o.loaded*100/o.total);return i.status.progress===w?s:R(a,i.setStatus({type:"uploading",cancelToken:i.status.cancelToken,progress:w}),s)})},onUploadComplete:(o,a)=>{S(s=>{const i=M(o,s);return D(i)||i.status.type!=="uploading"?s:R(i.id,i.setStatus({type:"uploaded",fileId:a.fileId,fileUrls:a}),s)})}}),addFiles:q,getNextLocalFileId:K,deleteExistingFiles:()=>b.forEach(o=>P(o.id)),onUploadComplete:()=>{m.current&&m.current.focus()}}),{getRootProps:O,getInputProps:_}=Bt({onDrop:st,multiple:C===I.Multiple,accept:Dt(e.fileType),maxSize:W}),lt=()=>{let o=0;const{current:a}=m;if(a){const s=a.placeholder;a.placeholder="",a.style.height="auto",o=a.scrollHeight,a.placeholder=s,a.style.height=""}return o},X=()=>{if(m.current&&m.current.focus(),!B||t)return;const o={data:d,fileUploaderState:it()};r.setChatInputValue(e,o,{fromUi:!0},c),S([]),y(""),A(0)},dt=o=>{const{metaKey:a,ctrlKey:s,shiftKey:i}=o;Rt(o)&&!i&&!s&&!a&&(o.preventDefault(),X())},ct=o=>{const{value:a}=o.target,{maxChars:s}=e;s!==0&&a.length>s||(y(a),A(lt()))};l.useEffect(()=>{if(e.setValue){e.setValue=!1;const o=e.value||"";y(o)}},[e]),l.useLayoutEffect(()=>{if(m.current){const{offsetHeight:o}=m.current;h.current.minHeight=o,h.current.maxHeight=o*le}},[m]),l.useEffect(()=>{const o=i=>{var w;i.preventDefault(),i.stopPropagation(),!E&&((w=i.dataTransfer)!=null&&w.types.includes("Files"))&&T(!0)},a=i=>{i.preventDefault(),i.stopPropagation(),E&&(i.clientX<=0&&i.clientY<=0||i.clientX>=window.innerWidth&&i.clientY>=window.innerHeight)&&T(!1)},s=i=>{i.preventDefault(),i.stopPropagation(),E&&T(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",s),window.addEventListener("dragleave",a),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",s),window.removeEventListener("dragleave",a)}},[E]),l.useLayoutEffect(()=>{const{minHeight:o}=h.current;rt(F>0&&m.current?Math.abs(F-o)>L:!1)},[F]);const{placeholder:G,maxChars:pt}=e,{maxHeight:j}=h.current,ut=C!==I.None&&E;return z(tt,{children:[C===I.None?null:n(ne,{items:[...b],onDelete:P}),n(kt,{className:"stChatInput","data-testid":"stChatInput",ref:g,children:ut?n(se,{getRootProps:O,getInputProps:_,acceptFile:C,inputHeight:H?`${F+L}px`:p.sizes.minElementHeight}):z(Vt,{extended:H,children:[C===I.None?null:n(ie,{getRootProps:O,getInputProps:_,acceptFile:C,disabled:t,theme:p}),n(Mt,{inputRef:m,value:d,placeholder:G,onChange:ct,onKeyDown:dt,"aria-label":G,disabled:t,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:H?`${F+L}px`:"auto",maxHeight:j?`${j}px`:"none",paddingLeft:p.spacing.none,paddingBottom:p.spacing.sm,paddingTop:p.spacing.sm,paddingRight:`calc(${p.iconSizes.xl} + 2 * ${p.spacing.sm} + ${p.spacing.sm})`}}}}),v>p.breakpoints.hideWidgetDetails&&n(At,{children:n(Lt,{dirty:B,value:d,maxLength:pt,type:"chat",inForm:!1})}),n(Nt,{children:n($t,{onClick:X,disabled:!B||t,extended:H,"data-testid":"stChatInputSubmitButton",children:n(U,{content:at,size:"xl",color:"inherit"})})})]})})]})}const ye=l.memo(de);export{ye as default};
|
1
|
+
import{r as l,E as V,_ as $,n as u,A as ft,y as N,j as n,ba as J,bu as mt,B as z,bp as Q,b5 as Z,bo as U,a$ as vt,bG as yt,bj as wt,bH as I,bs as Ct,F as tt,bh as It,bI as xt,L as D,bl as bt,bk as St}from"./index.DaaBud_u.js";import{g as zt,F as k,C as Ft,I as Et,E as Ut,a as Ht,s as Tt,u as Bt,b as Dt}from"./FileHelper.jkT1raGU.js";import{I as Lt}from"./InputInstructions.D3RY91P2.js";import{i as Rt}from"./inputUtils.CQWz5UKz.js";import{a as Y}from"./index.D8rVyQy1.js";import{U as et}from"./UploadFileInfo.C-jY39rj.js";import{T as Mt}from"./textarea.ByGG-B4n.js";import"./base-input.Cw4qDIMU.js";var ot=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(V,$({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),l.createElement("path",{d:"M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5a2.5 2.5 0 015 0v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5a2.5 2.5 0 005 0V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"}))});ot.displayName="AttachFile";var nt=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(V,$({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});nt.displayName="ErrorOutline";var at=l.forwardRef(function(t,e){var r={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return l.createElement(V,$({iconAttrs:r,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:e}),l.createElement("rect",{width:24,height:24,fill:"none"}),l.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});at.displayName="Send";const kt=u("div",{target:"e1togvvn0"})("border:none;position:relative;display:flex;"),Vt=u("div",{target:"e1togvvn1"})(({theme:t,extended:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.widgetBorderColor??t.colors.transparent,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,position:"relative",flexGrow:1,display:"flex",alignItems:"center",paddingLeft:t.spacing.lg,maxHeight:e?"none":t.sizes.minElementHeight,gap:t.spacing.sm,overflow:"hidden",":focus-within":{borderColor:t.colors.primary}})),$t=u("button",{target:"e1togvvn2"})(({theme:t,disabled:e,extended:r})=>{const c=ft(t),[f,p]=c?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:r?"0":t.radii.chatInput,borderTopLeftRadius:r?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:e?f:p,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:c?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray,cursor:"not-allowed"}}}),Nt=u("div",{target:"e1togvvn3"})(({theme:t})=>({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,marginBottom:`-${t.sizes.borderWidth}`,pointerEvents:"none"})),At=u("div",{target:"e1togvvn4"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),Wt=u("div",{target:"ewqvugz0"})(({theme:t,height:e})=>({backgroundColor:t.colors.transparent,position:"absolute",left:0,bottom:0,minHeight:`max(${t.sizes.emptyDropdownHeight}, ${e})`,width:"100%",zIndex:t.zIndices.priority})),qt=u("div",{target:"ewqvugz1"})(({theme:t,height:e})=>({border:`${t.sizes.borderWidth} solid`,borderColor:t.colors.primary,borderRadius:t.radii.chatInput,backgroundColor:t.colors.secondaryBg,color:t.colors.primary,display:"flex",alignItems:"center",justifyContent:"center",height:e,width:"100%",fontWeight:t.fontWeights.bold})),Pt=u("div",{target:"ewqvugz2"})(({theme:t,disabled:e})=>({display:"flex",alignItems:"top",height:"100%",marginTop:`-${t.sizes.borderWidth}`,cursor:e?"not-allowed":"auto"})),Kt=u("div",{target:"ewqvugz3"})(({disabled:t})=>({pointerEvents:t?"none":"auto"})),Ot=u("div",{target:"ewqvugz4"})(({theme:t})=>({marginTop:"0.625em",marginLeft:t.spacing.sm,height:t.spacing.xl,width:t.sizes.borderWidth,backgroundColor:t.colors.fadedText20})),_t=u("div",{target:"ewqvugz5"})(({theme:t})=>({left:0,right:0,lineHeight:t.lineHeights.tight,paddingLeft:t.spacing.sm,paddingRight:t.spacing.sm,overflowX:"auto"})),Xt=u("div",{target:"ewqvugz6"})(({})=>({display:"flex"})),Gt=u("div",{target:"ewqvugz7"})(({})=>({flex:"0 0 auto"})),jt=u("div",{target:"ewqvugz8"})(({theme:t})=>({display:"flex",alignItems:"center",padding:t.spacing.sm,gap:t.spacing.twoXS})),Yt=u("div",{target:"ewqvugz9"})(({theme:t})=>({color:t.colors.fadedText60})),Jt=u("div",{target:"ewqvugz10"})(({theme:t,fileStatus:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:e.type==="uploaded"?t.colors.bodyText:t.colors.fadedText60})),Qt=u("div",{target:"ewqvugz11"})(({theme:t})=>({marginRight:t.spacing.md,color:t.colors.fadedText60})),Zt=u("small",{target:"ewqvugz12"})(({theme:t})=>({display:"flex",alignItems:"center",maxHeight:t.sizes.smallElementHeight,color:t.colors.fadedText60,"& :hover":{color:t.colors.bodyText}}));function te({children:t,content:e}){const r=N();return n(mt,{content:e,placement:J.TOP,overrides:{Body:{style:{top:`-${r.sizes.minElementHeight}`}}},children:t})}const ee=({fileInfo:t})=>{const e=N(),{type:r}=t.status;switch(r){case"uploading":return n(yt,{usingCustomTheme:!1,"data-testid":"stChatInputFileIconSpinner",size:"lg",margin:"0",padding:"0"});case"error":return n(te,{content:t.status.errorMessage,children:n(U,{color:e.colors.red,content:nt,size:"lg"})});case"uploaded":return n(U,{content:Et,size:"lg"});default:return vt(r),null}},oe=({fileInfo:t,onDelete:e})=>z(jt,{className:"stChatInputFile","data-testid":"stChatInputFile",children:[n(Yt,{children:n(ee,{fileInfo:t})}),n(Jt,{className:"stChatInputFileName","data-testid":"stChatInputFileName",title:t.name,fileStatus:t.status,children:t.name}),n(Qt,{children:zt(t.size,k.Byte)}),n(Zt,{"data-testid":"stChatInputDeleteBtn",children:n(Q,{onClick:()=>e(t.id),kind:Z.MINIMAL,children:n(U,{content:Ft,size:"lg"})})})]}),ne=({items:t,onDelete:e})=>n(_t,{"data-testid":"stChatUploadedFiles",children:n(Xt,{children:t.map(r=>n(Gt,{children:n(oe,{fileInfo:r,onDelete:e})},r.id))})}),ae=({getNextLocalFileId:t,addFiles:e,updateFile:r,uploadClient:c,element:f,onUploadProgress:p,onUploadComplete:m})=>(x,h)=>{const v=Y.CancelToken.source(),g=new et(h.name,h.size,t(),{type:"uploading",cancelToken:v,progress:1});e([g]),c.uploadFile({formId:"",...f},x.uploadUrl,h,d=>p(d,g.id),v.token).then(()=>m(g.id,x)).catch(d=>{Y.isCancel(d)||r(g.id,g.setStatus({type:"error",errorMessage:d?d.toString():"Unknown error"}))})},re=({acceptMultipleFiles:t,maxFileSize:e,uploadClient:r,uploadFile:c,addFiles:f,getNextLocalFileId:p,deleteExistingFiles:m,onUploadComplete:x})=>(h,v)=>{if(!t&&h.length===0&&v.length>1){const g=v.findIndex(d=>{var y;return((y=d.errors)==null?void 0:y[0].code)===Ut.TooManyFiles});g>=0&&(h.push(v[g].file),v.splice(g,1))}if(!t&&h.length>0&&m(),r.fetchFileURLs(h).then(g=>{wt(g,h).forEach(([d,y])=>{c(d,y)})}).catch(g=>{f(h.map(d=>new et(d.name,d.size,p(),{type:"error",errorMessage:g})))}),v.length>0){const g=v.map(d=>Ht(d,p(),e));f(g)}x()},ie=({getRootProps:t,getInputProps:e,acceptFile:r,disabled:c,theme:f})=>z(Pt,{disabled:c,children:[z(Kt,{"data-testid":"stChatInputFileUploadButton",disabled:c,...t(),children:[n("input",{...e()}),n(Ct,{content:`Upload or drag and drop ${r===I.Multiple?"files":"a file"}`,placement:J.TOP,onMouseEnterDelay:500,children:n(Q,{kind:Z.MINIMAL,disabled:c,children:n(U,{content:ot,size:"lg",color:c?f.colors.fadedText40:f.colors.fadedText60})})})]}),n(Ot,{})]}),se=({getRootProps:t,getInputProps:e,acceptFile:r,inputHeight:c})=>z(tt,{children:[n(Wt,{height:c,...t(),children:n("input",{...e()})}),n(qt,{height:c,children:`Drag and drop ${r===I.Multiple?"files":"a file"} here`})]}),le=6.5,L=1,R=(t,e,r)=>r.map(c=>c.id===t?e:c),M=(t,e)=>e.find(r=>r.id===t);function de({disabled:t,element:e,widgetMgr:r,fragmentId:c,uploadClient:f}){const p=N(),m=l.useRef(null),x=l.useRef(0),h=l.useRef({minHeight:0,maxHeight:0}),[v,g]=It(),[d,y]=l.useState(e.default),[F,A]=l.useState(0),[H,rt]=l.useState(!1),[b,S]=l.useState([]),[E,T]=l.useState(!1),B=l.useMemo(()=>b.some(o=>o.status.type==="uploading")?!1:d!==""||b.length>0,[b,d]),C=xt(e.acceptFile),W=Tt(e.maxUploadSizeMb,k.Megabyte,k.Byte),q=l.useCallback(o=>S(a=>[...a,...o]),[]),P=l.useCallback(o=>{S(a=>{const s=M(o,a);return D(s)?a:(s.status.type==="uploading"&&s.status.cancelToken.cancel(),s.status.type==="uploaded"&&s.status.fileUrls.deleteUrl&&f.deleteFile(s.status.fileUrls.deleteUrl),a.filter(i=>i.id!==o))})},[f]),it=()=>{const o=b.filter(a=>a.status.type==="uploaded").map(a=>{const{name:s,size:i,status:w}=a,{fileId:gt,fileUrls:ht}=w;return new bt({fileId:gt,fileUrls:ht,name:s,size:i})});return new St({uploadedFileInfo:o})},K=()=>x.current++,st=re({acceptMultipleFiles:C===I.Multiple,maxFileSize:W,uploadClient:f,uploadFile:ae({getNextLocalFileId:K,addFiles:q,updateFile:(o,a)=>{S(s=>R(o,a,s))},uploadClient:f,element:e,onUploadProgress:(o,a)=>{S(s=>{const i=M(a,s);if(D(i)||i.status.type!=="uploading")return s;const w=Math.round(o.loaded*100/o.total);return i.status.progress===w?s:R(a,i.setStatus({type:"uploading",cancelToken:i.status.cancelToken,progress:w}),s)})},onUploadComplete:(o,a)=>{S(s=>{const i=M(o,s);return D(i)||i.status.type!=="uploading"?s:R(i.id,i.setStatus({type:"uploaded",fileId:a.fileId,fileUrls:a}),s)})}}),addFiles:q,getNextLocalFileId:K,deleteExistingFiles:()=>b.forEach(o=>P(o.id)),onUploadComplete:()=>{m.current&&m.current.focus()}}),{getRootProps:O,getInputProps:_}=Bt({onDrop:st,multiple:C===I.Multiple,accept:Dt(e.fileType),maxSize:W}),lt=()=>{let o=0;const{current:a}=m;if(a){const s=a.placeholder;a.placeholder="",a.style.height="auto",o=a.scrollHeight,a.placeholder=s,a.style.height=""}return o},X=()=>{if(m.current&&m.current.focus(),!B||t)return;const o={data:d,fileUploaderState:it()};r.setChatInputValue(e,o,{fromUi:!0},c),S([]),y(""),A(0)},dt=o=>{const{metaKey:a,ctrlKey:s,shiftKey:i}=o;Rt(o)&&!i&&!s&&!a&&(o.preventDefault(),X())},ct=o=>{const{value:a}=o.target,{maxChars:s}=e;s!==0&&a.length>s||(y(a),A(lt()))};l.useEffect(()=>{if(e.setValue){e.setValue=!1;const o=e.value||"";y(o)}},[e]),l.useLayoutEffect(()=>{if(m.current){const{offsetHeight:o}=m.current;h.current.minHeight=o,h.current.maxHeight=o*le}},[m]),l.useEffect(()=>{const o=i=>{var w;i.preventDefault(),i.stopPropagation(),!E&&((w=i.dataTransfer)!=null&&w.types.includes("Files"))&&T(!0)},a=i=>{i.preventDefault(),i.stopPropagation(),E&&(i.clientX<=0&&i.clientY<=0||i.clientX>=window.innerWidth&&i.clientY>=window.innerHeight)&&T(!1)},s=i=>{i.preventDefault(),i.stopPropagation(),E&&T(!1)};return window.addEventListener("dragover",o),window.addEventListener("drop",s),window.addEventListener("dragleave",a),()=>{window.removeEventListener("dragover",o),window.removeEventListener("drop",s),window.removeEventListener("dragleave",a)}},[E]),l.useLayoutEffect(()=>{const{minHeight:o}=h.current;rt(F>0&&m.current?Math.abs(F-o)>L:!1)},[F]);const{placeholder:G,maxChars:pt}=e,{maxHeight:j}=h.current,ut=C!==I.None&&E;return z(tt,{children:[C===I.None?null:n(ne,{items:[...b],onDelete:P}),n(kt,{className:"stChatInput","data-testid":"stChatInput",ref:g,children:ut?n(se,{getRootProps:O,getInputProps:_,acceptFile:C,inputHeight:H?`${F+L}px`:p.sizes.minElementHeight}):z(Vt,{extended:H,children:[C===I.None?null:n(ie,{getRootProps:O,getInputProps:_,acceptFile:C,disabled:t,theme:p}),n(Mt,{inputRef:m,value:d,placeholder:G,onChange:ct,onKeyDown:dt,"aria-label":G,disabled:t,rows:1,overrides:{Root:{style:{minHeight:p.sizes.minElementHeight,outline:"none",borderLeftWidth:"0",borderRightWidth:"0",borderTopWidth:"0",borderBottomWidth:"0"}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:p.lineHeights.inputWidget,"::placeholder":{opacity:"0.7"},height:H?`${F+L}px`:"auto",maxHeight:j?`${j}px`:"none",paddingLeft:p.spacing.none,paddingBottom:p.spacing.sm,paddingTop:p.spacing.sm,paddingRight:`calc(${p.iconSizes.xl} + 2 * ${p.spacing.sm} + ${p.spacing.sm})`}}}}),v>p.breakpoints.hideWidgetDetails&&n(At,{children:n(Lt,{dirty:B,value:d,maxLength:pt,type:"chat",inForm:!1})}),n(Nt,{children:n($t,{onClick:X,disabled:!B||t,extended:H,"data-testid":"stChatInputSubmitButton",children:n(U,{content:at,size:"xl",color:"inherit"})})})]})})]})}const ye=l.memo(de);export{ye as default};
|