streamlit-nightly 1.45.2.dev20250610__py3-none-any.whl → 1.45.2.dev20250612__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.
Files changed (114) hide show
  1. streamlit/elements/lib/column_types.py +5 -2
  2. streamlit/elements/markdown.py +32 -3
  3. streamlit/proto/NewSession_pb2.py +12 -10
  4. streamlit/proto/NewSession_pb2.pyi +12 -1
  5. streamlit/runtime/app_session.py +3 -0
  6. streamlit/static/index.html +2 -2
  7. streamlit/static/manifest.json +239 -299
  8. streamlit/static/static/css/{index.B57yoT8i.css → index.CJVRHjQZ.css} +1 -1
  9. streamlit/static/static/js/{ErrorOutline.esm.BFmVpS9Y.js → ErrorOutline.esm.DAsQnQAG.js} +1 -1
  10. streamlit/static/static/js/{FileDownload.esm.CUwGnb6l.js → FileDownload.esm.CDvOgvtF.js} +1 -1
  11. streamlit/static/static/js/{FileHelper.7jhiJzN9.js → FileHelper.DDa1_S8P.js} +1 -1
  12. streamlit/static/static/js/{FormClearHelper.DHx8ahLp.js → FormClearHelper.Cd0equ6H.js} +1 -1
  13. streamlit/static/static/js/{Hooks.BDCbPb9Z.js → Hooks.CO94IhEZ.js} +1 -1
  14. streamlit/static/static/js/{InputInstructions.B29VfaHu.js → InputInstructions.DIPLfwqq.js} +1 -1
  15. streamlit/static/static/js/{ProgressBar.DCvzFED3.js → ProgressBar.B96Luxcl.js} +1 -1
  16. streamlit/static/static/js/{RenderInPortalIfExists.Dum6Yo4x.js → RenderInPortalIfExists.V4gb3DZM.js} +1 -1
  17. streamlit/static/static/js/Toolbar.CGCqedkz.js +1 -0
  18. streamlit/static/static/js/{base-input.B5D5SCDU.js → base-input.8P8uB-P_.js} +1 -1
  19. streamlit/static/static/js/{checkbox.eyyRCmXH.js → checkbox.BaU0SuPN.js} +1 -1
  20. streamlit/static/static/js/{createSuper.Bfw-n2CW.js → createSuper.zGgxEDDA.js} +1 -1
  21. streamlit/static/static/js/{data-grid-overlay-editor.Ic_-1uWB.js → data-grid-overlay-editor.BBQL2MW6.js} +1 -1
  22. streamlit/static/static/js/{downloader.BrOujhsH.js → downloader.CmINHiHs.js} +1 -1
  23. streamlit/static/static/js/{es6.Da9PSRiO.js → es6.C3QC4mZP.js} +2 -2
  24. streamlit/static/static/js/{iframeResizer.contentWindow.-m9KEHjj.js → iframeResizer.contentWindow.DifXO9xe.js} +1 -1
  25. streamlit/static/static/js/{index.hHS2hw5y.js → index.9NZLK4V5.js} +1 -1
  26. streamlit/static/static/js/{index.Ff_iBwit.js → index.B0wvsyIn.js} +2 -2
  27. streamlit/static/static/js/{index.CsG3cY4S.js → index.B48AJdNd.js} +1 -1
  28. streamlit/static/static/js/{index.LVLiaAG5.js → index.B6UeWScF.js} +1 -1
  29. streamlit/static/static/js/{index.DM31JZhq.js → index.B7CU3ww0.js} +1 -1
  30. streamlit/static/static/js/{index.CsRqF1UT.js → index.BEwSEGpG.js} +1 -1
  31. streamlit/static/static/js/{index.DVX3m8nA.js → index.BExvuXH2.js} +1 -1
  32. streamlit/static/static/js/{index.lfluHnyb.js → index.BFBJdPsK.js} +1 -1
  33. streamlit/static/static/js/{index.BCuDY7Wq.js → index.BGlybWkw.js} +1 -1
  34. streamlit/static/static/js/index.BKXdOrM1.js +1 -0
  35. streamlit/static/static/js/index.BLxZobpt.js +1 -0
  36. streamlit/static/static/js/{index.CVnrNDsY.js → index.Br2GWLEm.js} +1 -1
  37. streamlit/static/static/js/{index.D-xYY77h.js → index.Bt2lRpBU.js} +1 -1
  38. streamlit/static/static/js/{index.Bkc0rVhi.js → index.C9au0nd6.js} +1 -1
  39. streamlit/static/static/js/index.CKWanB9Z.js +1 -0
  40. streamlit/static/static/js/index.CUQJU-d8.js +778 -0
  41. streamlit/static/static/js/{index.B6hFQ_0c.js → index.CVlA3XMi.js} +1 -1
  42. streamlit/static/static/js/{index.DD4IkJLw.js → index.CerKV33b.js} +22 -22
  43. streamlit/static/static/js/{index.rCHgixxf.js → index.CqqggdSR.js} +1 -1
  44. streamlit/static/static/js/{index.B9zQe0Ch.js → index.CslLBxh_.js} +2 -2
  45. streamlit/static/static/js/{index.X0NCujg7.js → index.CyOYxgX5.js} +1 -1
  46. streamlit/static/static/js/index.D2Mj8XID.js +1 -0
  47. streamlit/static/static/js/{index.CZ7DfyLC.js → index.D6YD7L9B.js} +1 -1
  48. streamlit/static/static/js/{index.tgnkrUS7.js → index.D6_IUG7D.js} +1 -1
  49. streamlit/static/static/js/{index.B_hrvDfD.js → index.D6tuwhtG.js} +1 -1
  50. streamlit/static/static/js/{index.DpjOn_mW.js → index.D7T7fEUZ.js} +1 -1
  51. streamlit/static/static/js/{index.B2Wwybqa.js → index.DRvVsMEA.js} +1 -1
  52. streamlit/static/static/js/index.DbuxO4aX.js +1 -0
  53. streamlit/static/static/js/{index.bgJFjVuq.js → index.DegBKQaf.js} +16 -16
  54. streamlit/static/static/js/index.DfDtyiwa.js +1 -0
  55. streamlit/static/static/js/{index.DHyANL2t.js → index.P3Gk3KUg.js} +1 -1
  56. streamlit/static/static/js/{index.Da6TsobW.js → index.Rbok_xK8.js} +1 -1
  57. streamlit/static/static/js/{index.Cy5cgtmd.js → index.TB4RwQ5L.js} +1 -1
  58. streamlit/static/static/js/{index.B9Hmg5tY.js → index.hIOqOF3N.js} +1 -1
  59. streamlit/static/static/js/index.iYTNSFIE.js +1 -0
  60. streamlit/static/static/js/{index.Dv1JTAEg.js → index.jhzg5Fkk.js} +1 -1
  61. streamlit/static/static/js/{index.DKRwWqPL.js → index.vMfNZrTu.js} +1 -1
  62. streamlit/static/static/js/{input.CcBKvzV7.js → input.BpCKuvTL.js} +1 -1
  63. streamlit/static/static/js/{memory.Dy3vhhGd.js → memory.DRT-6qe5.js} +1 -1
  64. streamlit/static/static/js/{mergeWith.Br7ttj2E.js → mergeWith.C_cG93IR.js} +1 -1
  65. streamlit/static/static/js/{number-overlay-editor.Dp8qIE2c.js → number-overlay-editor.DmJzexxY.js} +1 -1
  66. streamlit/static/static/js/{possibleConstructorReturn.DrBKFKPb.js → possibleConstructorReturn.CGq_veM9.js} +1 -1
  67. streamlit/static/static/js/{sandbox._fV6ffVT.js → sandbox.B6wFYIT9.js} +1 -1
  68. streamlit/static/static/js/{textarea.CG3YusUv.js → textarea.D9fcLEU8.js} +1 -1
  69. streamlit/static/static/js/{timepicker.CgWFbpop.js → timepicker.Bnuz89hd.js} +1 -1
  70. streamlit/static/static/js/{toConsumableArray.COmxQMZV.js → toConsumableArray.oLOBJjzs.js} +1 -1
  71. streamlit/static/static/js/{uniqueId.Cp7qO6qN.js → uniqueId.Yanu-Bte.js} +1 -1
  72. streamlit/static/static/js/{useBasicWidgetState.CunX1Hmv.js → useBasicWidgetState.D2Acm4ak.js} +1 -1
  73. streamlit/static/static/js/{useOnInputChange.DCd-U4SE.js → useOnInputChange.CtoO_nCV.js} +1 -1
  74. streamlit/static/static/js/withFullScreenWrapper.DjCGsGNa.js +1 -0
  75. streamlit/static/static/media/SourceCodeVF-Italic.ttf.Ba1oaZG1.woff2 +0 -0
  76. streamlit/static/static/media/SourceCodeVF-Upright.ttf.BjWn63N-.woff2 +0 -0
  77. streamlit/static/static/media/SourceSansVF-Italic.ttf.Bt9VkdQ3.woff2 +0 -0
  78. streamlit/static/static/media/SourceSansVF-Upright.ttf.BsWL4Kly.woff2 +0 -0
  79. streamlit/static/static/media/SourceSerifVariable-Italic.ttf.CVdzAtxO.woff2 +0 -0
  80. streamlit/static/static/media/SourceSerifVariable-Roman.ttf.mdpVL9bi.woff2 +0 -0
  81. {streamlit_nightly-1.45.2.dev20250610.dist-info → streamlit_nightly-1.45.2.dev20250612.dist-info}/METADATA +1 -1
  82. {streamlit_nightly-1.45.2.dev20250610.dist-info → streamlit_nightly-1.45.2.dev20250612.dist-info}/RECORD +86 -98
  83. streamlit/static/static/js/Toolbar.BKJU0yem.js +0 -1
  84. streamlit/static/static/js/index.BFvBq9Ky.js +0 -1
  85. streamlit/static/static/js/index.BxCeuwGy.js +0 -782
  86. streamlit/static/static/js/index.C2jhjPwI.js +0 -1
  87. streamlit/static/static/js/index.C8Tx_yNT.js +0 -1
  88. streamlit/static/static/js/index.DWZy7E8v.js +0 -1
  89. streamlit/static/static/js/index.DkDFCkmE.js +0 -1
  90. streamlit/static/static/js/index.Dzd6lYTb.js +0 -1
  91. streamlit/static/static/js/index.E46WZGKk.js +0 -1
  92. streamlit/static/static/js/withFullScreenWrapper.C9CPnWj9.js +0 -1
  93. streamlit/static/static/media/SourceCode-Bold.ttf.CFEfr7-q.woff2 +0 -0
  94. streamlit/static/static/media/SourceCode-BoldIt.ttf.C-LkFXxa.woff2 +0 -0
  95. streamlit/static/static/media/SourceCode-It.ttf.CxFOx7N-.woff2 +0 -0
  96. streamlit/static/static/media/SourceCode-Regular.ttf.CBOlD63d.woff2 +0 -0
  97. streamlit/static/static/media/SourceCode-Semibold.ttf.CFHwW3Wd.woff2 +0 -0
  98. streamlit/static/static/media/SourceCode-SemiboldIt.ttf.Cg2yRu82.woff2 +0 -0
  99. streamlit/static/static/media/SourceSans-Bold.ttf.gn7Db9ke.woff2 +0 -0
  100. streamlit/static/static/media/SourceSans-BoldIt.ttf.Bp6Ygjgu.woff2 +0 -0
  101. streamlit/static/static/media/SourceSans-It.ttf.CKnmOrYX.woff2 +0 -0
  102. streamlit/static/static/media/SourceSans-Regular.ttf.BqTI-3mA.woff2 +0 -0
  103. streamlit/static/static/media/SourceSans-Semibold.ttf.BQV5CVwD.woff2 +0 -0
  104. streamlit/static/static/media/SourceSans-SemiboldIt.ttf.C62jiOej.woff2 +0 -0
  105. streamlit/static/static/media/SourceSerif-Bold.ttf.Csh8T7yr.woff2 +0 -0
  106. streamlit/static/static/media/SourceSerif-BoldIt.ttf.1j4hxMHI.woff2 +0 -0
  107. streamlit/static/static/media/SourceSerif-It.ttf.Cr-UUpZM.woff2 +0 -0
  108. streamlit/static/static/media/SourceSerif-Regular.ttf.BNbBs0kC.woff2 +0 -0
  109. streamlit/static/static/media/SourceSerif-Semibold.ttf.CL4HK1l8.woff2 +0 -0
  110. streamlit/static/static/media/SourceSerif-SemiboldIt.ttf.C2G1sf1n.woff2 +0 -0
  111. {streamlit_nightly-1.45.2.dev20250610.data → streamlit_nightly-1.45.2.dev20250612.data}/scripts/streamlit.cmd +0 -0
  112. {streamlit_nightly-1.45.2.dev20250610.dist-info → streamlit_nightly-1.45.2.dev20250612.dist-info}/WHEEL +0 -0
  113. {streamlit_nightly-1.45.2.dev20250610.dist-info → streamlit_nightly-1.45.2.dev20250612.dist-info}/entry_points.txt +0 -0
  114. {streamlit_nightly-1.45.2.dev20250610.dist-info → streamlit_nightly-1.45.2.dev20250612.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- import{n as k,r as s,bd as H,z as B,cp as W,C as j,j as r,bo as q,bC as O,bp as _,b5 as w,bq as K,D as $,cq as A}from"./index.BxCeuwGy.js";import{u as G}from"./uniqueId.Cp7qO6qN.js";import{u as N,a as J,b as M}from"./useOnInputChange.DCd-U4SE.js";import{a as Q}from"./useBasicWidgetState.CunX1Hmv.js";import{I as X}from"./InputInstructions.B29VfaHu.js";import{I as Y}from"./input.CcBKvzV7.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.DHx8ahLp.js";import"./base-input.B5D5SCDU.js";const Z=k("div",{target:"e1o1zy6o0"})("position:relative;");function tt({disabled:a,element:t,widgetMgr:o,fragmentId:d}){var I;const[l,c]=s.useState(()=>y(o,t)??null),[T,x]=H(),[i,p]=s.useState(!1),C=s.useCallback(()=>{c(t.default??null),p(!0)},[t.default]),[V,m]=Q({getStateFromWidgetMgr:y,getDefaultStateFromProto:et,getCurrStateFromProto:at,updateWidgetMgrState:st,element:t,widgetMgr:o,fragmentId:d,onFormCleared:C});N(V,l,c,i);const[F,g]=s.useState(!1),e=B(),[b]=s.useState(()=>G("text_input_")),{placeholder:z,formId:u,icon:n,maxChars:f}=t,h=s.useCallback(()=>{p(!1),m({value:l,fromUi:!0})},[l,m]),v=W({formId:u})?o.allowFormEnterToSubmit(u):i,E=F&&T>e.breakpoints.hideWidgetDetails,R=s.useCallback(()=>{i&&h(),g(!1)},[i,h]),L=s.useCallback(()=>{g(!0)},[]),P=J({formId:u,maxChars:f,setDirty:p,setUiValue:c,setValueWithSource:m}),D=M(u,h,i,o,d),S=n==null?void 0:n.startsWith(":material"),U=S?"lg":"base";return j(Z,{className:"stTextInput","data-testid":"stTextInput",ref:x,children:[r(K,{label:t.label,disabled:a,labelVisibility:q((I=t.labelVisibility)==null?void 0:I.value),htmlFor:b,children:t.help&&r(O,{children:r(_,{content:t.help,placement:w.TOP_RIGHT})})}),r(Y,{value:l??"",placeholder:z,onBlur:R,onFocus:L,onChange:P,onKeyPress:D,"aria-label":t.label,disabled:a,id:b,type:ot(t),autoComplete:t.autocomplete,startEnhancer:n&&r($,{"data-testid":"stTextInputIcon",iconValue:n,size:U}),overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:e.lineHeights.inputWidget,paddingRight:e.spacing.sm,paddingLeft:e.spacing.md,paddingBottom:e.spacing.sm,paddingTop:e.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth,paddingLeft:n?e.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:e.iconSizes.lg,color:S?e.colors.fadedText60:"inherit"}}}}),E&&r(X,{dirty:i,value:l??"",maxLength:f,inForm:W({formId:u}),allowEnterToSubmit:v})]})}function y(a,t){return a.getStringValue(t)??null}function et(a){return a.default??null}function at(a){return a.value??null}function st(a,t,o,d){t.setStringValue(a,o.value,{fromUi:o.fromUi},d)}function ot(a){return a.type===A.Type.PASSWORD?"password":"text"}const ht=s.memo(tt);export{ht as default};
@@ -1 +0,0 @@
1
- import{r as l,b0 as n,j as e,b1 as d,bm as u,a$ as c,b2 as B,b3 as m}from"./index.BxCeuwGy.js";function b(i){const{disabled:o,element:t,widgetMgr:s,fragmentId:r}=i;let a=n.SECONDARY;return t.type==="primary"?a=n.PRIMARY:t.type==="tertiary"&&(a=n.TERTIARY),e(m,{className:"stButton","data-testid":"stButton",children:e(d,{help:t.help,containerWidth:t.useContainerWidth,children:e(u,{kind:a,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 p=l.memo(b);export{p as default};
@@ -1 +0,0 @@
1
- import{r as s,bd as U,z as k,cp as W,C as A,j as l,bo as L,bC as P,bp as B,b5 as D,bq as j}from"./index.BxCeuwGy.js";import{u as _}from"./uniqueId.Cp7qO6qN.js";import{u as q,a as w,b as K}from"./useOnInputChange.DCd-U4SE.js";import{I as O}from"./InputInstructions.B29VfaHu.js";import{a as $}from"./useBasicWidgetState.CunX1Hmv.js";import{T as G}from"./textarea.CG3YusUv.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.DHx8ahLp.js";import"./base-input.B5D5SCDU.js";const x=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,J=a=>a.value??null,Q=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},X=({disabled:a,element:t,widgetMgr:o,fragmentId:u})=>{var f;const h=s.useRef(_("text_area_")).current,[T,S]=U(),[r,n]=s.useState(!1),[C,b]=s.useState(!1),[i,d]=s.useState(()=>x(o,t)??null),I=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[y,c]=$({getStateFromWidgetMgr:x,getDefaultStateFromProto:N,getCurrStateFromProto:J,updateWidgetMgrState:Q,element:t,widgetMgr:o,fragmentId:u,onFormCleared:I});q(y,i,d,r);const e=k(),m=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),V=s.useCallback(()=>{r&&m(),b(!1)},[r,m]),F=s.useCallback(()=>{b(!0)},[]),v=w({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),z=K(t.formId,m,r,o,u,!0),{height:g,placeholder:E,formId:p}=t,R=W({formId:p})?o.allowFormEnterToSubmit(p):r,H=C&&T>e.breakpoints.hideWidgetDetails;return A("div",{className:"stTextArea","data-testid":"stTextArea",ref:S,children:[l(j,{label:t.label,disabled:a,labelVisibility:L((f=t.labelVisibility)==null?void 0:f.value),htmlFor:h,children:t.help&&l(P,{children:l(B,{content:t.help,placement:D.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:E,onBlur:V,onFocus:F,onChange:v,onKeyDown:z,"aria-label":t.label,disabled:a,id:h,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:g?`${g}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.md,paddingLeft:e.spacing.md,paddingBottom:e.spacing.md,paddingTop:e.spacing.md}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),H&&l(O,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:W({formId:p}),allowEnterToSubmit:R})]})},it=s.memo(X);export{it as default};
@@ -1 +0,0 @@
1
- import{n as c,r as s,aE as f,b4 as b,z as x,j as a,b1 as k,b5 as C,C as L,D as v,aC as h}from"./index.BxCeuwGy.js";const T=c("div",{target:"e1ghu24d0"})(({containerWidth:r})=>({display:"flex",flexDirection:"column",width:r?"100%":"fit-content"})),w=c("a",{target:"e1ghu24d1"})(({disabled:r,isCurrentPage:e,containerWidth:l,theme:o})=>({textDecoration:"none",width:l?"100%":"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:o.spacing.sm,borderRadius:o.radii.button,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,marginTop:o.spacing.threeXS,marginBottom:o.spacing.threeXS,lineHeight:o.lineHeights.menuItem,backgroundColor:e?o.colors.darkenedBgMix15:"transparent","&:hover":{backgroundColor:e?o.colors.darkenedBgMix25:o.colors.darkenedBgMix15},"&:active,&:visited,&:hover":{textDecoration:"none"},"&:focus":{outline:"none"},"&:focus-visible":{backgroundColor:o.colors.darkenedBgMix15},"@media print":{paddingLeft:o.spacing.none},...r?{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed","&:hover":{color:o.colors.fadedText40,backgroundColor:o.colors.transparent}}:{}})),S=c("span",{target:"e1ghu24d2"})(({disabled:r,theme:e})=>({color:e.colors.bodyText,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",display:"table-cell",...r?{borderColor:e.colors.borderColor,backgroundColor:e.colors.transparent,color:e.colors.fadedText40,cursor:"not-allowed"}:{}}));function y(r,e){return r===null&&e?!0:r===null&&!e?!1:r===!0}function P(r){const{onPageChange:e,currentPageScriptHash:l}=s.useContext(f),o=s.useContext(b),{colors:d}=x(),{disabled:t,element:n}=r,i=y(n.useContainerWidth,o),g=l===n.pageScriptHash,p=u=>{n.external?t&&u.preventDefault():(u.preventDefault(),t||e(n.pageScriptHash))};return a("div",{className:"stPageLink","data-testid":"stPageLink",children:a(k,{help:n.help,placement:C.TOP_RIGHT,containerWidth:i,children:a(T,{containerWidth:i,children:L(w,{"data-testid":"stPageLink-NavLink",disabled:t,isCurrentPage:g,containerWidth:i,href:n.page,target:n.external?"_blank":"",rel:"noreferrer",onClick:p,children:[n.icon&&a(v,{size:"lg",color:t?d.fadedText40:d.bodyText,iconValue:n.icon}),a(S,{disabled:t,children:a(h,{source:n.label,allowHTML:!1,isLabel:!0,boldLabel:g,largerLabel:!0,disableLinks:!0})})]})})})})}const B=s.memo(P);export{B as default};
@@ -1 +0,0 @@
1
- import{n as T,r,z as M,b4 as W,b_ as I,b$ as V,C as O,j as n,bo as $,bC as L,bp as N,b5 as P,bq as k,bZ as B,c0 as E,bV as A,c1 as F,bz as H}from"./index.BxCeuwGy.js";import{a as D}from"./useBasicWidgetState.CunX1Hmv.js";import"./FormClearHelper.DHx8ahLp.js";const U=T("div",{target:"euzcfsp0"})(({theme:s})=>({"span[aria-disabled='true']":{background:s.colors.fadedText05}})),j=(s,t)=>s.getStringArrayValue(t),G=s=>s.default.map(t=>s.options[t])??null,K=s=>s.rawValues??null,_=(s,t,a,p)=>{t.setStringArrayValue(s,a.value,{fromUi:a.fromUi},p)},Y=s=>{var S;const{element:t,widgetMgr:a,fragmentId:p}=s,e=M(),f=r.useContext(W),[i,m]=D({getStateFromWidgetMgr:j,getDefaultStateFromProto:G,getCurrStateFromProto:K,updateWidgetMgrState:_,element:t,widgetMgr:a,fragmentId:p}),h=t.maxSelections>0&&i.length>=t.maxSelections,y=r.useMemo(()=>{if(t.maxSelections===0)return"No results";if(i.length===t.maxSelections){const o=t.maxSelections!==1?"options":"option";return`You can only select up to ${t.maxSelections} ${o}. Remove an option first.`}return"No results"},[t.maxSelections,i.length]),v=r.useMemo(()=>i.map(o=>({value:o,label:o})),[i]),b=r.useCallback(o=>{var l,d;switch(o.type){case"remove":return I(i,(l=o.option)==null?void 0:l.value);case"clear":return[];case"select":return i.concat([(d=o.option)==null?void 0:d.value]);default:throw new Error(`State transition is unknown: ${o.type}`)}},[i]),x=r.useCallback(o=>{t.maxSelections&&o.type==="select"&&i.length>=t.maxSelections||m({value:b(o),fromUi:!0})},[t.maxSelections,b,m,i.length]),z=r.useCallback((o,l)=>{if(h)return[];const d=o.filter(R=>!i.includes(R.value));return V(d,l)},[h,i]),{options:u}=t;let c=s.disabled,g=t.placeholder;u.length===0&&(t.acceptNewOptions?g="Add options":(g="No options to select",c=!0));const w=u.map((o,l)=>({label:o,value:o,id:`${o}_${l}`})),C=u.length>10;return O("div",{className:"stMultiSelect","data-testid":"stMultiSelect",children:[n(k,{label:t.label,disabled:c,labelVisibility:$((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&n(L,{children:n(N,{content:t.help,placement:P.TOP_RIGHT})})}),n(U,{children:n(B,{creatable:t.acceptNewOptions??!1,options:w,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:g,type:F.select,multi:!0,onChange:x,value:v,disabled:c,size:"compact",noResultsMsg:y,filterOptions:z,closeOnSelect:!1,ignoreCase:!1,overrides:{Popover:{props:{ignoreBoundary:f,overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:A,props:{style:{cursor:"pointer"},overrides:{Svg:{style:()=>({width:e.iconSizes.xl,height:e.iconSizes.xl})}}}},IconsContainer:{style:()=>({paddingRight:e.spacing.sm})},ControlContainer:{style:{minHeight:e.sizes.minElementHeight,borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}},Placeholder:{style:()=>({flex:"inherit",color:c?e.colors.fadedText40:e.colors.fadedText60})},ValueContainer:{style:()=>({paddingLeft:e.spacing.sm,paddingTop:e.spacing.none,paddingBottom:e.spacing.none,paddingRight:e.spacing.none})},ClearIcon:{props:{overrides:{Svg:{style:{color:e.colors.darkGray,padding:e.spacing.threeXS,height:e.sizes.clearIconSize,width:e.sizes.clearIconSize,cursor:"pointer",":hover":{fill:e.colors.bodyText}}}}}},SearchIcon:{style:{color:e.colors.darkGray}},Tag:{props:{overrides:{Root:{style:{borderTopLeftRadius:e.radii.md,borderTopRightRadius:e.radii.md,borderBottomRightRadius:e.radii.md,borderBottomLeftRadius:e.radii.md,fontSize:e.fontSizes.md,paddingLeft:e.spacing.sm,marginLeft:e.spacing.none,marginRight:e.spacing.sm,height:`calc(${e.sizes.minElementHeight} - 2 * ${e.spacing.xs})`,maxWidth:`calc(100% - ${e.spacing.lg})`,cursor:"default !important"}},Action:{style:{paddingLeft:0}},ActionIcon:{props:{overrides:{Svg:{style:{width:"0.625em",height:"0.625em"}}}}}}}},MultiValue:{props:{overrides:{Root:{style:{fontSize:e.fontSizes.sm}}}}},Input:{props:{readOnly:H.isMobile&&C===!1?"readonly":null}},Dropdown:{component:E}}})})]})},J=r.memo(Y);export{J as default};
@@ -1 +0,0 @@
1
- import{r,E as Q,_ as Y,cz as y,M as m,O as Z,l as mt,n as D,z as gt,bd as ht,cp as It,H as q,C as F,j as c,bo as yt,bC as Ct,bp as Tt,b5 as wt,bq as St,D as vt,bl as K}from"./index.BxCeuwGy.js";import{u as Vt}from"./uniqueId.Cp7qO6qN.js";import{u as kt}from"./FormClearHelper.DHx8ahLp.js";import{I as Rt}from"./InputInstructions.B29VfaHu.js";import{s as xt}from"./sprintf.D7DtBTRn.js";import{I as Dt}from"./input.CcBKvzV7.js";import"./base-input.B5D5SCDU.js";var tt=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(Q,Y({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M0 3v2h8V3H0z"}))});tt.displayName="Minus";var et=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(Q,Y({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});et.displayName="Plus";const Et=mt.getLogger("NumberInput");function Nt(t){return m(t)||t===""?void 0:t}const W=({value:t,format:e,step:a,dataType:b})=>{if(m(t))return null;let o=Nt(e);if(m(o)&&Z(a)){const d=a.toString();b===y.DataType.FLOAT&&a!==0&&d.includes(".")&&(o=`%0.${d.split(".")[1].length}f`)}if(m(o))return t.toString();try{return xt.sprintf(o,t)}catch(d){return Et.warn(`Error in sprintf(${o}, ${t}): ${d}`),String(t)}},zt=(t,e,a)=>m(t)?!1:t-e>=a,Ft=(t,e,a)=>m(t)?!1:t+e<=a,Wt=t=>(t.element.dataType===y.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,M=({step:t,dataType:e})=>t||(e===y.DataType.INT?1:.01),Bt=D("div",{target:"e4u2kar0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor??t.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),Lt=D("div",{target:"e4u2kar1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),J=D("button",{target:"e4u2kar2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),Ht=D("div",{target:"e4u2kar3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Pt=({disabled:t,element:e,widgetMgr:a,fragmentId:b})=>{var X;const o=gt(),{dataType:d,id:S,formId:p,default:B,format:L,icon:C,min:g,max:h}=e,[H,ot]=ht(),[s,rt]=r.useState(()=>M(e)),P=Wt({element:e,widgetMgr:a}),[I,T]=r.useState(!1),[l,w]=r.useState(P),[U,v]=r.useState(()=>W({value:P,...e,step:s})),[A,$]=r.useState(!1),V=r.useRef(null),O=r.useRef(Vt("number_input_")),k=zt(l,s,g),R=Ft(l,s,h),j=It({formId:p}),nt=j?a.allowFormEnterToSubmit(p):I,at=A&&H>o.breakpoints.hideWidgetDetails;r.useEffect(()=>{rt(M({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const u=r.useCallback(({value:n,source:i})=>{var f;if(Z(n)&&(g>n||n>h))(f=V.current)==null||f.reportValidity();else{const x=n??B??null;switch(d){case y.DataType.INT:a.setIntValue({id:S,formId:p},x,i,b);break;case y.DataType.FLOAT:a.setDoubleValue({id:S,formId:p},x,i,b);break;default:throw new Error("Invalid data type")}T(!1),w(x),v(W({value:x,dataType:d,format:L,step:s}))}},[g,h,V,a,b,s,d,S,p,B,L]),st=r.useCallback(()=>{I&&u({value:l,source:{fromUi:!0}}),$(!1)},[I,l,u]),it=r.useCallback(()=>{$(!0)},[]),_=r.useCallback(()=>{const{value:n}=e;e.setValue=!1,w(n??null),v(W({value:n??null,...e,step:s})),u({value:n??null,source:{fromUi:!1}})},[e,s,u]);r.useEffect(()=>{e.setValue?_():u({value:l,source:{fromUi:!1}});const n=V.current;if(n){const i=f=>{f.preventDefault()};return n.addEventListener("wheel",i),()=>{n.removeEventListener("wheel",i)}}},[]),e.setValue&&_();const E=m(e.default)&&!t,lt=r.useCallback(()=>{const n=e.default??null;w(n),u({value:n,source:{fromUi:!0}})},[e]);kt({element:e,widgetMgr:a,onFormCleared:lt});const ct=n=>{const{value:i}=n.target;if(i==="")T(!0),w(null),v(null);else{let f;e.dataType===y.DataType.INT?f=parseInt(i,10):f=parseFloat(i),T(!0),w(f),v(i)}},N=r.useCallback(()=>{R&&(T(!0),u({value:(l??g)+s,source:{fromUi:!0}}))},[l,g,s,R]),z=r.useCallback(()=>{k&&(T(!0),u({value:(l??h)-s,source:{fromUi:!0}}))},[l,h,s,k]),ut=r.useCallback(n=>{const{key:i}=n;switch(i){case"ArrowUp":n.preventDefault(),N();break;case"ArrowDown":n.preventDefault(),z();break}},[N,z]),dt=r.useCallback(n=>{n.key==="Enter"&&(I&&u({value:l,source:{fromUi:!0}}),a.allowFormEnterToSubmit(p)&&a.submitForm(p,b))},[I,l,u,a,p,b]),G=C==null?void 0:C.startsWith(":material"),pt=G?"lg":"base",ft=q(o.iconSizes.lg)+2*q(o.spacing.twoXS),bt=C?o.breakpoints.hideNumberInputControls+ft:o.breakpoints.hideNumberInputControls;return F("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:ot,children:[c(St,{label:e.label,disabled:t,labelVisibility:yt((X=e.labelVisibility)==null?void 0:X.value),htmlFor:O.current,children:e.help&&c(Ct,{children:c(Tt,{content:e.help,placement:wt.TOP_RIGHT})})}),F(Bt,{className:A?"focused":"","data-testid":"stNumberInputContainer",children:[c(Dt,{type:"number",inputRef:V,value:U??"",placeholder:e.placeholder,onBlur:st,onFocus:it,onChange:ct,onKeyPress:dt,onKeyDown:ut,clearable:E,clearOnEscape:E,disabled:t,"aria-label":e.label,startEnhancer:e.icon&&c(vt,{"data-testid":"stNumberInputIcon",iconValue:e.icon,size:pt}),id:O.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.darkGray,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:g,max:h,type:"number",inputMode:""},style:{lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm}},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:C?o.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:o.iconSizes.lg,color:G?o.colors.fadedText60:"inherit"}}}}),H>bt&&F(Lt,{children:[c(J,{"data-testid":"stNumberInputStepDown",onClick:z,disabled:!k||t,tabIndex:-1,children:c(K,{content:tt,size:"xs",color:k?"inherit":o.colors.disabled})}),c(J,{"data-testid":"stNumberInputStepUp",onClick:N,disabled:!R||t,tabIndex:-1,children:c(K,{content:et,size:"xs",color:R?"inherit":o.colors.disabled})})]})]}),at&&c(Ht,{clearable:E,children:c(Rt,{dirty:I,value:U??"",inForm:j,allowEnterToSubmit:nt})})]})},Xt=r.memo(Pt);export{Xt as default};
@@ -1 +0,0 @@
1
- import{n as p,r as n,aE as x,aD as h,bc as y,z as C,bd as b,j as i,be as w}from"./index.BxCeuwGy.js";const F=p("div",{target:"e1q5ojhd0"})(({theme:e,isExpanded:t})=>({width:"100%",...t?{position:"fixed",top:0,left:0,bottom:0,right:0,background:e.colors.bgColor,zIndex:e.zIndices.fullscreenWrapper,padding:e.spacing.md,paddingTop:e.sizes.fullScreenHeaderHeight,overflow:"auto",display:"flex",alignItems:"center",justifyContent:"center"}:{}})),f=n.createContext(null);f.displayName="ElementFullscreenContext";const S=()=>{const{setFullScreen:e}=n.useContext(x),[t,c]=n.useState(!1),{fullHeight:s,fullWidth:u}=h(y),l=n.useCallback(a=>{c(a),e(a)},[e]),d=n.useCallback(()=>{document.body.style.overflow="hidden",l(!0)},[l]),o=n.useCallback(()=>{document.body.style.overflow="unset",l(!1)},[l]),r=n.useCallback(a=>{a.keyCode===27&&t&&o()},[o,t]);return n.useEffect(()=>(document.addEventListener("keydown",r,!1),()=>{document.removeEventListener("keydown",r,!1)}),[r]),n.useMemo(()=>({expanded:t,zoomIn:d,zoomOut:o,fullHeight:s,fullWidth:u}),[t,d,o,s,u])},g=({children:e,height:t})=>{const c=C(),{expanded:s,fullHeight:u,fullWidth:l,zoomIn:d,zoomOut:o}=S(),[r,a]=b(),m=n.useMemo(()=>({width:s?l:r,height:s?u:t,expanded:s,expand:d,collapse:o}),[s,u,l,t,r,d,o]);return i(f.Provider,{value:m,children:i(F,{ref:a,isExpanded:s,"data-testid":"stFullScreenFrame",theme:c,children:e})})};function v(e){const t=c=>i(g,{children:i(e,{...c})});return t.displayName=`withFullScreenWrapper(${e.displayName||e.name})`,w(t,e)}export{f as E,v as w};