@stlite/desktop 0.91.2 → 0.92.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/CHANGELOG.md +7 -1
- package/build/assets/{ErrorOutline.esm-CBPRrcCq-C9-TIHiy.js → ErrorOutline.esm-Cq78Z69r-C4NqF_Dy.js} +1 -1
- package/build/assets/{FileDownload.esm-zztsCQgv-C5piFaVt.js → FileDownload.esm-CK4kq1fm-rUa3b6xk.js} +1 -1
- package/build/assets/{FileHelper-D9iak492-B1kwMP-N.js → FileHelper-SZ_yiD2z-B6mYMaXP.js} +1 -1
- package/build/assets/{FormClearHelper-B-0AN2KG-drNJ-Zdq.js → FormClearHelper-FCPJEFCb-8WTdS9Fc.js} +1 -1
- package/build/assets/{Hooks-BLb3umpI-CC08A2wx.js → Hooks-BLb3umpI-2VYJiKlE.js} +1 -1
- package/build/assets/{InputInstructions-w5hPdqFC-DnPj3I4S.js → InputInstructions-C9-W08mI-ZHhoQkfd.js} +1 -1
- package/build/assets/{Particles-DQoPZNo9-BWmBxXhd.js → Particles-BOhWNEfk-Dwf6AovX.js} +1 -1
- package/build/assets/{ProgressBar-DlHaaa-z-DdC3oXz0.js → ProgressBar-BiR12xMF-C3tqN3I7.js} +1 -1
- package/build/assets/{Toolbar-Cau3SOTY-cJ6wtM04.js → Toolbar-DmNTasId-CQXwCpBc.js} +1 -1
- package/build/assets/{base-input-D-Fvddky-3QuAUeGB.js → base-input-CrN3cmkk-CZot_VyG.js} +1 -1
- package/build/assets/{checkbox-CjcIG3na-LB8a9-d7.js → checkbox-gyt_OEZr-DUZ4Njwr.js} +1 -1
- package/build/assets/{createSuper-B81LEHTk-DVB4ulOX.js → createSuper-XjH7KYVR-huv_3l0M.js} +1 -1
- package/build/assets/{data-grid-overlay-editor-C7-8Z8CC-CmhK1L1G.js → data-grid-overlay-editor-DCBtdsKu-B2V4v_R4.js} +1 -1
- package/build/assets/{downloader-DcCTL3Wz-DfHnsO-D.js → downloader-DcCTL3Wz-DFslBafZ.js} +1 -1
- package/build/assets/{es6--XPcqeHG-CU-P5RWV.js → es6--XPcqeHG-DCoiAwz4.js} +2 -2
- package/build/assets/{iframeResizer.contentWindow-vAQsQkcx-DjDgPkx5.js → iframeResizer.contentWindow-DCqlq0RN-CJu19_xt.js} +1 -1
- package/build/assets/{index-vdN_5NIh-CyyygayY.js → index-86FKY3SR-GAsovcTH.js} +1 -1
- package/build/assets/{index-JJq6JoHy-CX1Omp_x.js → index-B1GzS8wP-BVHWU3EN.js} +1 -1
- package/build/assets/{index-BDD6ManL-XC9-hEWd.js → index-B4dU8RRL-QuTU7dp3.js} +1 -1
- package/build/assets/{index-D6OV4wQy-CQIpYALu.js → index-B8kWnRO8-DdaQzYiC.js} +1 -1
- package/build/assets/{index-CR_1rzEZ-DaqWZNME.js → index-B8qxfFCx-B29C_PY3.js} +1 -1
- package/build/assets/{index-DbIPIRRU-UJS7GIgX.js → index-BDBGy17s-C8ZIrWop.js} +1 -1
- package/build/assets/{index-DVo6TdD5-Cigl7ucs.js → index-BHzjdNgW-BhgR3SHQ.js} +1 -1
- package/build/assets/{index-BXbsmcnm-D0BJVs7R.js → index-BMMzkW3e-BZqEtXz_.js} +1 -1
- package/build/assets/{index-B5h0Xgw3-CNFqm9ip.js → index-BZG3RZnU-DmEQbf_P.js} +1 -1
- package/build/assets/{index-BDtR3I-m-C6v_enzF.js → index-BitC4Xgz-B1kdgnmM.js} +1 -1
- package/build/assets/{index-BxpEVUJq.js → index-Bs9zibyE.js} +10 -10
- package/build/assets/{index-DYssp6us-ss1M0SKX.js → index-BwEfMSwG-CvQYoItt.js} +1 -1
- package/build/assets/{index-DEKI5kx7-B8lK1On8.js → index-C5hOYK-b-CDfEUvDR.js} +1 -1
- package/build/assets/{index-D5GvvN8r-CL05rAIV.js → index-C9u8J5la-oadhV8vp.js} +1 -1
- package/build/assets/{index-OAJkEMe--vGYqEFkN.js → index-CGDCEBHp-ighEw3vp.js} +1 -1
- package/build/assets/{index-CeUKVR_x-6fYziq6X.js → index-CJcifvpp-CqixlSHI.js} +1 -1
- package/build/assets/{index-Bt2pmgaJ-ymksNLCl.js → index-CNntS3OC-D1QLB5uC.js} +5 -5
- package/build/assets/{index-CL9VPrGG-DvzaBWYj.js → index-CZIwCRD7-DBIOlrRp.js} +1 -1
- package/build/assets/{index-6t9Tq-Ab-Cc_ees8I.js → index-CbyG2v0j-Bk1EJlZY.js} +1 -1
- package/build/assets/{index-oFRA4JRK-kx0e_3zA.js → index-ChdNP8aj-ecf7J23U.js} +1 -1
- package/build/assets/{index-DBM8Q3zu-1UaS0Le1.js → index-ClhODq1M-DUfGDbEi.js} +1 -1
- package/build/assets/{index-Bx1YyC6x-bUWv5Yyf.js → index-CrabjEa7-DFujXtro.js} +1 -1
- package/build/assets/{index-kgY8PEpO-BUILDAe7.js → index-D6yR1pA8-C0-kJ6Bz.js} +1 -1
- package/build/assets/{index-Ds3R2kL1-CFh_Kz3Y.js → index-DE-Rg3QE-eG0zJJn8.js} +1 -1
- package/build/assets/{index-C5FPtYYS-BTTgdUI2.js → index-DedW9Ks6-M0WgASrb.js} +1 -1
- package/build/assets/{index-COXlYbHo-B2m8urCs.js → index-Dj2NFIKD-B_r24aHL.js} +1 -1
- package/build/assets/{index-CUH8SI0g-CgCG3Tq7.js → index-Dk05MMVQ-ZROGl5dG.js} +1 -1
- package/build/assets/{index-D9Ww6wIM-CODTYNKi.js → index-DmuMAiWB-BGkOpKfb.js} +1 -1
- package/build/assets/{index-Da8BucgM-CDMzLZMq.js → index-DtqQ0QT_-CymByJbd.js} +1 -1
- package/build/assets/{index-FbSORAjW-Lthz52ML.js → index-Dvp-SyXX-qvRtm5BZ.js} +1 -1
- package/build/assets/{index-D8AcUh2z-BvmWAicd.js → index-Dx_Ep62U-DaqDcI-n.js} +1 -1
- package/build/assets/{index-D9xjkRNt-CFe8X0f3.js → index-IdwmhHqO-gZocvOjV.js} +1 -1
- package/build/assets/{index-DqAvSOqr-BCGTFud5.js → index-Q6g9NCof-Cpxw6WZY.js} +1 -1
- package/build/assets/{index-BNeCf0z6-eizg-dFz.js → index-WybFjBpB-BX8U2u7x.js} +1 -1
- package/build/assets/{index--hiX6Uwv-DtKO9Hld.js → index-jhfsAAJw-CHbJB1wk.js} +1 -1
- package/build/assets/{index-PfjJDWy5-DkldmeJ8.js → index-tZy2wPj--B6SS_c-g.js} +1 -1
- package/build/assets/{index-D4OS_mB9-BwMU_oxN.js → index-wXdUq_7J--4XuNFfI.js} +1 -1
- package/build/assets/{inherits-DIXnBNlu-DQhXiByk.js → inherits-CHhCwN_k-BN2PGj6j.js} +1 -1
- package/build/assets/{input-D3V-zfyu-Ca751_uU.js → input-DjbrZONF-D-7fuXI2.js} +1 -1
- package/build/assets/{memory-B3L1Fctl-DNb7NEQl.js → memory-B3L1Fctl-DdOaGvHF.js} +1 -1
- package/build/assets/{number-overlay-editor-ChRMsdOl-C6ThLwiC.js → number-overlay-editor-jbR6fFWZ-C4ZPxc4R.js} +1 -1
- package/build/assets/{sandbox-ChAzL-i--FikCfyDW.js → sandbox-ChAzL-i--D-scXFSF.js} +1 -1
- package/build/assets/{slicedToArray-BPQXLGHq-C21Y2TxO.js → slicedToArray-Bh3FRcm_-BQG060Uv.js} +1 -1
- package/build/assets/{timepicker-B0aGGgzd-sxFvpbfo.js → timepicker-Zb-gfcls-BvLvhDNx.js} +1 -1
- package/build/assets/{uniqueId-MHj2wT7u-DPxsodx6.js → uniqueId-zIZf20F6-D11mfTaK.js} +1 -1
- package/build/assets/{useBasicWidgetState-zjZCXhqV-BNiFnFun.js → useBasicWidgetState-BrKZEJpK-CxwkzeKG.js} +1 -1
- package/build/assets/{useTextInputAutoExpand-ox95UJrD-CZJQOtsK.js → useTextInputAutoExpand-NGyMMcIL-u7iGmO95.js} +1 -1
- package/build/assets/{useUpdateUiValue-Yj1mvLxf-DIZzUp3u.js → useUpdateUiValue-BHPP0ppl-jFtPQcBG.js} +1 -1
- package/build/assets/{withFullScreenWrapper-Ca0mIjWH-ClODS1xe.js → withFullScreenWrapper-66pmUMIV-CT4beZ0m.js} +1 -1
- package/build/index.html +1 -1
- package/package.json +2 -2
- package/wheels/streamlit-1.50.0-cp313-none-any.whl +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,ai as t,j as a,aj as f,ak as x,al as i,am as v,c as n,an as s,ao as k}from"./index-
|
|
1
|
+
import{r as p,ai as t,j as a,aj as f,ak as x,al as i,am as v,c as n,an as s,ao as k}from"./index-Bs9zibyE.js";function y(o,e){switch(o){case i.XSMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.sm}`,fontSize:e.fontSizes.sm};case i.SMALL:return{padding:`${e.spacing.twoXS} ${e.spacing.md}`};case i.LARGE:return{padding:`${e.spacing.md} ${e.spacing.md}`};default:return{padding:`${e.spacing.xs} ${e.spacing.md}`}}}const u=n("a",{target:"e16zdaao3"})(({containerWidth:o,size:e,theme:r})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:r.fontWeights.normal,padding:`${r.spacing.xs} ${r.spacing.md}`,borderRadius:r.radii.button,minHeight:r.sizes.minElementHeight,margin:0,lineHeight:r.lineHeights.base,color:r.colors.primary,textDecoration:"none",width:o?"100%":"auto",userSelect:"none","&:visited":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${k(r.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...y(e,r)}),""),C=n(u,{target:"e16zdaao2"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover, &:focus-visible":{backgroundColor:s(o.colors.primary,.15),borderColor:s(o.colors.primary,.15)},"&:active":{backgroundColor:o.colors.primary,borderColor:s(o.colors.primary,.15)},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),""),$=n(u,{target:"e16zdaao1"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover, &:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"&:active":{backgroundColor:o.colors.darkenedBgMix25},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),""),z=n(u,{target:"e16zdaao0"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover, &:focus-visible":{color:o.colors.primary},"&:hover:not([disabled]), &:focus-visible:not([disabled])":{"span.stMarkdownColoredText":{color:"inherit !important"}},"&:active":{color:s(o.colors.primary,.25)},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}),"");function B({kind:o,size:e,disabled:r,children:d,autoFocus:l,href:m,rel:h,target:g,onClick:b}){let c=C;return o===t.SECONDARY?c=$:o===t.TERTIARY&&(c=z),a.jsx(c,{kind:o,size:e||i.MEDIUM,containerWidth:!0,disabled:r||!1,autoFocus:l||!1,href:m,target:g,rel:h,onClick:b,tabIndex:r?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:d})}const S=p.memo(B);function T(o){const{element:e}=o;let r=t.SECONDARY;e.type==="primary"?r=t.PRIMARY:e.type==="tertiary"&&(r=t.TERTIARY);const d=l=>{e.disabled&&l.preventDefault()};return a.jsx(f,{className:"stLinkButton","data-testid":"stLinkButton",children:a.jsx(x,{help:e.help,containerWidth:!0,children:a.jsx(S,{kind:r,size:i.SMALL,disabled:e.disabled,onClick:d,href:e.url,target:"_blank",rel:"noreferrer","aria-disabled":e.disabled,children:a.jsx(v,{icon:e.icon,label:e.label})})})})}const L=p.memo(T);export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,m as pe,f as me,bV as fe,x as G,c7 as w,v as b,aB as O,j as l,aI as ge,aJ as he,b0 as be,aK as ye,ap as ve,c as S,F as we,aR as _,l as xe,E as J,_ as q}from"./index-
|
|
1
|
+
import{r as a,m as pe,f as me,bV as fe,x as G,c7 as w,v as b,aB as O,j as l,aI as ge,aJ as he,b0 as be,aK as ye,ap as ve,c as S,F as we,aR as _,l as xe,E as J,_ as q}from"./index-Bs9zibyE.js";import{I as Te}from"./uniqueId-zIZf20F6-D11mfTaK.js";import{e as Ie}from"./InputInstructions-C9-W08mI-ZHhoQkfd.js";import{m as Ce}from"./FormClearHelper-FCPJEFCb-8WTdS9Fc.js";import{_ as ke}from"./sprintf-D5E86llw-6tzWM3a-.js";import{a as Re}from"./input-DjbrZONF-D-7fuXI2.js";import"./base-input-CrN3cmkk-CZot_VyG.js";var Q=a.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(J,q({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),a.createElement("path",{d:"M0 3v2h8V3H0z"}))});Q.displayName="Minus";var Y=a.forwardRef(function(e,t){var n={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(J,q({iconAttrs:n,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},e,{ref:t}),a.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});Y.displayName="Plus";const Ee=S("div",{target:"e116k4er3"})(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:e.sizes.minElementHeight,borderWidth:e.sizes.borderWidth,borderStyle:"solid",borderColor:e.colors.widgetBorderColor??e.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:e.radii.default,overflow:"hidden","&.focused":{borderColor:e.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:e.spacing.none}}}),""),Se=S("div",{target:"e116k4er2"})({name:"76z9jo",styles:"display:flex;flex-direction:row;align-self:stretch"}),K=S("button",{target:"e116k4er1"})(({theme:e})=>({margin:e.spacing.none,border:"none",height:e.sizes.full,display:"flex",alignItems:"center",width:e.sizes.numberInputControlsWidth,justifyContent:"center",color:e.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:e.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:e.colors.white,backgroundColor:e.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:disabled":{cursor:"not-allowed",color:e.colors.fadedText40}}),""),Ve=S("div",{target:"e116k4er0"})(({theme:e,clearable:t})=>({position:"absolute",marginRight:e.spacing.twoXS,left:0,right:`calc(${e.sizes.numberInputControlsWidth} * 2 + ${t?"1em":"0em"})`}),""),Ne=xe.getLogger("NumberInput");function ze(e){return b(e)||e===""?void 0:e}const E=({value:e,format:t,step:n,dataType:f})=>{if(b(e))return null;let r=ze(t);if(b(r)&&G(n)){const i=n.toString();f===w.DataType.FLOAT&&n!==0&&i.includes(".")&&(r=`%0.${i.split(".")[1].length}f`)}if(b(r))return e.toString();try{return ke.sprintf(r,e)}catch(i){return Ne.warn(`Error in sprintf(${r}, ${e}): ${i}`),String(e)}},je=(e,t,n)=>b(e)?!1:e-t>=n,De=(e,t,n)=>b(e)?!1:e+t<=n,We=e=>(e.element.dataType===w.DataType.INT?e.widgetMgr.getIntValue(e.element):e.widgetMgr.getDoubleValue(e.element))??e.element.default??null,X=({step:e,dataType:t})=>e||(t===w.DataType.INT?1:.01),Fe=({disabled:e,element:t,widgetMgr:n,fragmentId:f})=>{const r=pe(),{dataType:i,id:V,formId:m,default:W,format:g,icon:N,min:y,max:v}=t,{width:F,elementRef:Z}=me(),[s,ee]=a.useState(()=>X(t)),L=We({element:t,widgetMgr:n}),[h,x]=a.useState(!1),[d,T]=a.useState(L),[B,U]=a.useState(!1),C=a.useRef(null),M=a.useRef(Te("number_input_")),[A,I]=a.useState(()=>E({value:L,dataType:i,format:g,step:s})),k=je(d,s,y),R=De(d,s,v),H=fe({formId:m}),te=H?n.allowFormEnterToSubmit(m):h,re=B&&F>r.breakpoints.hideWidgetDetails;a.useEffect(()=>{ee(X({step:t.step,dataType:t.dataType}))},[t.dataType,t.step]),a.useEffect(()=>{h||I(E({value:d,dataType:i,format:g,step:s}))},[i,g,s]);const c=a.useCallback(({value:o,source:u})=>{if(G(o)&&(y>o||o>v))C.current?.reportValidity();else{const p=o??W??null;switch(i){case w.DataType.INT:n.setIntValue({id:V,formId:m},p,u,f);break;case w.DataType.FLOAT:n.setDoubleValue({id:V,formId:m},p,u,f);break;default:throw new Error("Invalid data type")}x(!1),T(p),I(E({value:p,dataType:i,format:g,step:s}))}},[y,v,C,n,f,s,i,V,m,W,g]),ae=a.useCallback(()=>{h&&c({value:d,source:{fromUi:!0}}),U(!1)},[h,d,c]),oe=a.useCallback(()=>{U(!0)},[]),$=a.useCallback(()=>{const{value:o}=t;t.setValue=!1,T(o??null),I(E({value:o??null,dataType:i,format:g,step:s})),c({value:o??null,source:{fromUi:!1}})},[t,s,c,i,g]);a.useEffect(()=>{t.setValue?$():c({value:d,source:{fromUi:!1}});const o=C.current;if(o){const u=p=>{p.preventDefault()};return o.addEventListener("wheel",u),()=>{o.removeEventListener("wheel",u)}}},[]),t.setValue&&$();const z=b(t.default)&&!e,ne=a.useCallback(()=>{const o=t.default??null;T(o),c({value:o,source:{fromUi:!0}})},[t]);Ce({element:t,widgetMgr:n,onFormCleared:ne});const se=o=>{const{value:u}=o.target;if(u==="")x(!0),T(null),I(null);else{let p;t.dataType===w.DataType.INT?p=parseInt(u,10):p=parseFloat(u),x(!0),T(p),I(u)}},j=a.useCallback(()=>{R&&(x(!0),c({value:(d??y)+s,source:{fromUi:!0}}))},[d,y,s,R]),D=a.useCallback(()=>{k&&(x(!0),c({value:(d??v)-s,source:{fromUi:!0}}))},[d,v,s,k]),le=a.useCallback(o=>{const{key:u}=o;switch(u){case"ArrowUp":o.preventDefault(),j();break;case"ArrowDown":o.preventDefault(),D();break}},[j,D]),ie=a.useCallback(o=>{o.key==="Enter"&&(h&&c({value:d,source:{fromUi:!0}}),n.allowFormEnterToSubmit(m)&&n.submitForm(m,f))},[h,d,c,n,m,f]),P=N?.startsWith(":material"),de=P?"lg":"base",ue=O(r.iconSizes.lg)+2*O(r.spacing.twoXS),ce=N?r.breakpoints.hideNumberInputControls+ue:r.breakpoints.hideNumberInputControls;return l.jsxs("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:Z,children:[l.jsx(ge,{label:t.label,disabled:e,labelVisibility:he(t.labelVisibility?.value),htmlFor:M.current,children:t.help&&l.jsx(be,{children:l.jsx(ye,{content:t.help,placement:ve.TOP_RIGHT})})}),l.jsxs(Ee,{className:B?"focused":"","data-testid":"stNumberInputContainer",children:[l.jsx(Re,{type:"number",inputRef:C,value:A??"",placeholder:t.placeholder,onBlur:ae,onFocus:oe,onChange:se,onKeyPress:ie,onKeyDown:le,clearable:z,clearOnEscape:z,disabled:e,"aria-label":t.label,startEnhancer:t.icon&&l.jsx(we,{"data-testid":"stNumberInputIcon",iconValue:t.icon,size:de}),id:M.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:r.colors.grayTextColor,padding:r.spacing.threeXS,height:r.sizes.clearIconSize,width:r.sizes.clearIconSize,":hover":{fill:r.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:y,max:v,type:"number",inputMode:""},style:{fontWeight:r.fontWeights.normal,lineHeight:r.lineHeights.inputWidget,paddingRight:r.spacing.sm,paddingLeft:r.spacing.md,paddingBottom:r.spacing.sm,paddingTop:r.spacing.sm,"::placeholder":{color:r.colors.fadedText60}}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0,paddingLeft:N?r.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:r.iconSizes.lg,color:P?r.colors.fadedText60:"inherit"}}}}),F>ce&&l.jsxs(Se,{children:[l.jsx(K,{"data-testid":"stNumberInputStepDown",onClick:D,disabled:!k||e,tabIndex:-1,children:l.jsx(_,{content:Q,size:"xs",color:k?"inherit":r.colors.fadedText40})}),l.jsx(K,{"data-testid":"stNumberInputStepUp",onClick:j,disabled:!R||e,tabIndex:-1,children:l.jsx(_,{content:Y,size:"xs",color:R?"inherit":r.colors.fadedText40})})]})]}),re&&l.jsx(Ve,{clearable:z,children:l.jsx(Ie,{dirty:h,value:A??"",inForm:H,allowEnterToSubmit:te})})]})},Pe=a.memo(Fe);export{Pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,m as S,j as o,c as f,F as T,H as v,I as a,J as R,K as z,M as j,x as C}from"./index-
|
|
1
|
+
import{r as i,m as S,j as o,c as f,F as T,H as v,I as a,J as R,K as z,M as j,x as C}from"./index-Bs9zibyE.js";const H=f("button",{target:"elibz2u2"})(({theme:e})=>({fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,color:e.colors.fadedText60,backgroundColor:e.colors.transparent,fontFamily:"inherit",margin:e.spacing.none,border:"none",boxShadow:"none",padding:e.spacing.none,"&:hover, &:active, &:focus":{border:"none",outline:"none",boxShadow:"none"},"&:hover":{color:e.colors.primary}}),""),I=f("div",{target:"elibz2u1"})(({theme:e})=>({display:"flex",flexDirection:"row",gap:e.spacing.lg,"> span":{marginTop:e.spacing.twoXS}}),""),B=f("div",{target:"elibz2u0"})(({theme:e})=>({display:"flex",flexDirection:"column",gap:e.spacing.sm,alignItems:"start",justifyContent:"center",overflow:"hidden",minHeight:"100%",fontSize:e.fontSizes.sm,lineHeight:e.lineHeights.base,div:{display:"inline-flex"}}),"");function E(e){const t=j(e);return{Body:{props:{"data-testid":"stToast",className:"stToast"},style:{display:"flex",flexDirection:"row",gap:e.spacing.md,width:e.sizes.toastWidth,marginTop:e.spacing.sm,borderTopLeftRadius:e.radii.default,borderTopRightRadius:e.radii.default,borderBottomLeftRadius:e.radii.default,borderBottomRightRadius:e.radii.default,paddingTop:e.spacing.lg,paddingBottom:e.spacing.lg,paddingLeft:e.spacing.twoXL,paddingRight:e.spacing.twoXL,backgroundColor:e.colors.bgColor,filter:t?"brightness(0.98)":"brightness(1.2)",color:e.colors.bodyText,boxShadow:t?"0px 4px 16px rgba(0, 0, 0, 0.16)":"0px 4px 16px rgba(0, 0, 0, 0.7)"}},CloseIcon:{style:{color:e.colors.fadedText40,width:e.fontSizes.lg,height:e.fontSizes.lg,marginRight:`calc(-1 * ${e.spacing.lg} / 2)`,":hover":{color:e.colors.bodyText}}}}}function L(e){if(e.length>104){let t=e.replace(/^(.{104}[^\s]*).*/,"$1");return t.length>104&&(t=t.substring(0,104).split(" ").slice(0,-1).join(" ")),t.trim()}return e}function k({element:e}){const{body:t,icon:r,duration:d}=e,n=S(),c=L(t),l=t!==c,[s,b]=i.useState(!l),[m,x]=i.useState(0),h=i.useCallback(()=>{b(!s)},[s]),g=i.useMemo(()=>E(n),[n]),p=i.useMemo(()=>o.jsxs(I,{expanded:s,children:[r&&o.jsx(T,{iconValue:r,size:"xl",testid:"stToastDynamicIcon"}),o.jsxs(B,{children:[o.jsx(v,{source:s?t:c,allowHTML:!1,isToast:!0}),l&&o.jsx(H,{"data-testid":"stToastViewButton",onClick:h,children:s?"view less":"view more"})]})]}),[l,s,t,r,c,h]);i.useEffect(()=>{if(n.inSidebar)return;const w=C(d)?d===0?0:d*1e3:4e3,u=a.info(p,{overrides:{...g},autoHideDuration:w});return x(u),()=>{a.update(u,{overrides:{Body:{style:{display:"none"}}}}),a.clear(u)}},[]),i.useEffect(()=>{a.update(m,{children:p,overrides:{...g}})},[m,p,g]);const y=o.jsx(R,{kind:z.ERROR,body:"Streamlit API Error: `st.toast` cannot be called directly on the sidebar with `st.sidebar.toast`.\n See our `st.toast` API [docs](https://docs.streamlit.io/develop/api-reference/status/st.toast) for more information."});return o.jsx(o.Fragment,{children:n.inSidebar&&y})}const M=i.memo(k);export{M as default};
|