streamlit-nightly 1.44.1.dev20250327__py3-none-any.whl → 1.44.2.dev20250403__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 (95) hide show
  1. streamlit/commands/execution_control.py +3 -0
  2. streamlit/commands/page_config.py +1 -1
  3. streamlit/config.py +0 -26
  4. streamlit/elements/write.py +8 -0
  5. streamlit/proto/ClientState_pb2.py +2 -2
  6. streamlit/proto/ClientState_pb2.pyi +11 -1
  7. streamlit/proto/ForwardMsg_pb2.pyi +4 -7
  8. streamlit/runtime/app_session.py +5 -4
  9. streamlit/runtime/context.py +14 -0
  10. streamlit/runtime/forward_msg_cache.py +35 -230
  11. streamlit/runtime/forward_msg_queue.py +41 -23
  12. streamlit/runtime/runtime.py +2 -60
  13. streamlit/runtime/runtime_util.py +15 -14
  14. streamlit/runtime/scriptrunner/script_runner.py +9 -1
  15. streamlit/runtime/scriptrunner_utils/script_requests.py +3 -0
  16. streamlit/runtime/scriptrunner_utils/script_run_context.py +25 -3
  17. streamlit/runtime/session_manager.py +5 -6
  18. streamlit/static/index.html +1 -1
  19. streamlit/static/static/js/{FileDownload.esm.jX-9l2Ep.js → FileDownload.esm.B3kD8CdX.js} +1 -1
  20. streamlit/static/static/js/{FileHelper.aCeQQwv9.js → FileHelper.CZMZF2jC.js} +1 -1
  21. streamlit/static/static/js/{FormClearHelper.CWUgHOqb.js → FormClearHelper.BjztopwY.js} +1 -1
  22. streamlit/static/static/js/{Hooks.z6bpnOa4.js → Hooks.B2w-p718.js} +1 -1
  23. streamlit/static/static/js/{InputInstructions.CxNXqmaa.js → InputInstructions.CuF13wx9.js} +1 -1
  24. streamlit/static/static/js/{ProgressBar.DeJx_v03.js → ProgressBar.BbIgSlVa.js} +1 -1
  25. streamlit/static/static/js/{RenderInPortalIfExists.BzVEnQEP.js → RenderInPortalIfExists.yENMDBLa.js} +1 -1
  26. streamlit/static/static/js/{Toolbar.Buaxb3gQ.js → Toolbar.DJ7G2mIO.js} +1 -1
  27. streamlit/static/static/js/{base-input.B02pchZb.js → base-input.DIlOlDo4.js} +1 -1
  28. streamlit/static/static/js/{checkbox.BNevNWhL.js → checkbox.BQjuWiaH.js} +1 -1
  29. streamlit/static/static/js/{createSuper.HF1JI-bK.js → createSuper.DsCxV-v8.js} +1 -1
  30. streamlit/static/static/js/{data-grid-overlay-editor.DHpEpsQ_.js → data-grid-overlay-editor.D4K6HcP0.js} +1 -1
  31. streamlit/static/static/js/{downloader.B32k91dq.js → downloader.Lq-fJZlW.js} +1 -1
  32. streamlit/static/static/js/{es6.j4L3xv_m.js → es6.BE-9QZmp.js} +2 -2
  33. streamlit/static/static/js/{iframeResizer.contentWindow.DQOV--zq.js → iframeResizer.contentWindow.CVN6zezL.js} +1 -1
  34. streamlit/static/static/js/{index.BTG2J5Pk.js → index.0HztFnVa.js} +1 -1
  35. streamlit/static/static/js/{index.ChvqDLgw.js → index.5819-zgt.js} +1 -1
  36. streamlit/static/static/js/{index.DaJw5fna.js → index.B-KH-iJ1.js} +1 -1
  37. streamlit/static/static/js/{index.1tdxODWC.js → index.B0f5Sqj9.js} +1 -1
  38. streamlit/static/static/js/{index.CKYXxi_d.js → index.B1gZ98Ih.js} +1 -1
  39. streamlit/static/static/js/{index.DTDyF8nE.js → index.B2XNA40L.js} +1 -1
  40. streamlit/static/static/js/index.B7RGQCfs.js +1 -0
  41. streamlit/static/static/js/{index.CTwaWONb.js → index.BB3TfMGO.js} +1 -1
  42. streamlit/static/static/js/{index.DsRxnb2z.js → index.BDovkxCx.js} +1 -1
  43. streamlit/static/static/js/{index.CpDe9l-f.js → index.BMWHViZF.js} +1 -1
  44. streamlit/static/static/js/{index.R8Go3XlF.js → index.BM_qS2Z6.js} +1 -1
  45. streamlit/static/static/js/{index.BT-PT2u0.js → index.BYWoEwfP.js} +1 -1
  46. streamlit/static/static/js/{index.BDIF1v3E.js → index.Bs_nrSu4.js} +1 -1
  47. streamlit/static/static/js/{index.Cq_L2WtW.js → index.BwOqVS7B.js} +1 -1
  48. streamlit/static/static/js/{index.CExICAHy.js → index.BysxR7v7.js} +1 -1
  49. streamlit/static/static/js/{index.CTgHTp02.js → index.C6uLzsGN.js} +1 -1
  50. streamlit/static/static/js/{index.DbqewZ6W.js → index.CDspsVkR.js} +1 -1
  51. streamlit/static/static/js/{index.C1B9TyzK.js → index.CE-qPTwY.js} +1 -1
  52. streamlit/static/static/js/{index.BnYJb__c.js → index.CFnDv8Ab.js} +1 -1
  53. streamlit/static/static/js/{index.CcMFXZBL.js → index.CQYXOt0H.js} +1 -1
  54. streamlit/static/static/js/{index.B2-yUxP6.js → index.CU_SzKbN.js} +1 -1
  55. streamlit/static/static/js/{index.C-GJaT09.js → index.CWOluRqa.js} +1 -1
  56. streamlit/static/static/js/{index.V3D0L00K.js → index.CbDE21BB.js} +1 -1
  57. streamlit/static/static/js/{index.DNURUtUa.js → index.ChX_XN9v.js} +1 -1
  58. streamlit/static/static/js/index.Cn3q8ZVn.js +2 -0
  59. streamlit/static/static/js/{index.DBEif7dq.js → index.CzzEyXiC.js} +3 -3
  60. streamlit/static/static/js/{index.B28jf8c_.js → index.DIxzN4oM.js} +51 -51
  61. streamlit/static/static/js/index.DSsFpl6V.js +3 -0
  62. streamlit/static/static/js/{index.ClfebD_T.js → index.DmZP-_fu.js} +1 -1
  63. streamlit/static/static/js/{index.Nb8G9oM-.js → index.Dw1CjpSH.js} +1 -1
  64. streamlit/static/static/js/index.IydYP9PK.js +1 -0
  65. streamlit/static/static/js/{index.Uid-bSyh.js → index.TnCoD1oP.js} +1 -1
  66. streamlit/static/static/js/{index.BRDvEQpe.js → index.WW1pXc2g.js} +1 -1
  67. streamlit/static/static/js/{index.qkhdJyyt.js → index.eNGIEtgK.js} +7 -7
  68. streamlit/static/static/js/{index.BBHrAwbG.js → index.m_aVBz2b.js} +1 -1
  69. streamlit/static/static/js/{index.BeuGcxG8.js → index.rPwcP7b8.js} +1 -1
  70. streamlit/static/static/js/{index.m0rRkw04.js → index.u-RVYMyk.js} +1 -1
  71. streamlit/static/static/js/{input.DogdK8Cg.js → input.CVw5KI0x.js} +2 -2
  72. streamlit/static/static/js/{memory.B_1d0kyG.js → memory.CnrS2dOM.js} +1 -1
  73. streamlit/static/static/js/{mergeWith.9h0p6sC_.js → mergeWith.DUDC520V.js} +1 -1
  74. streamlit/static/static/js/{number-overlay-editor.yRe6Yodu.js → number-overlay-editor.Ccw3Yu2p.js} +1 -1
  75. streamlit/static/static/js/{possibleConstructorReturn.C73_6grg.js → possibleConstructorReturn.wVJHSwqv.js} +1 -1
  76. streamlit/static/static/js/{sandbox.2u3nOS5d.js → sandbox.CpAztCDM.js} +1 -1
  77. streamlit/static/static/js/{textarea.DFCEFjUj.js → textarea.CFjEVTUg.js} +2 -2
  78. streamlit/static/static/js/{timepicker.GuNna1EN.js → timepicker.DMKQZM-V.js} +1 -1
  79. streamlit/static/static/js/{toConsumableArray.DARzcvE5.js → toConsumableArray.KVlxKIgo.js} +1 -1
  80. streamlit/static/static/js/{uniqueId.fceb1ayN.js → uniqueId.kOCufBPt.js} +1 -1
  81. streamlit/static/static/js/{useBasicWidgetState.D6255-xX.js → useBasicWidgetState.Bs_D3hOD.js} +1 -1
  82. streamlit/static/static/js/{useOnInputChange.BjnOKne4.js → useOnInputChange.BH-JyYhR.js} +1 -1
  83. streamlit/static/static/js/{withFullScreenWrapper.B7h9p1kI.js → withFullScreenWrapper.vQYihw6n.js} +1 -1
  84. streamlit/web/server/routes.py +1 -59
  85. streamlit/web/server/server.py +7 -8
  86. {streamlit_nightly-1.44.1.dev20250327.dist-info → streamlit_nightly-1.44.2.dev20250403.dist-info}/METADATA +1 -1
  87. {streamlit_nightly-1.44.1.dev20250327.dist-info → streamlit_nightly-1.44.2.dev20250403.dist-info}/RECORD +91 -91
  88. streamlit/static/static/js/index.BUz0sS-V.js +0 -1
  89. streamlit/static/static/js/index.CDMGlkYx.js +0 -3
  90. streamlit/static/static/js/index.CPMy5pwd.js +0 -1
  91. streamlit/static/static/js/index.DfvKnm4Q.js +0 -2
  92. {streamlit_nightly-1.44.1.dev20250327.data → streamlit_nightly-1.44.2.dev20250403.data}/scripts/streamlit.cmd +0 -0
  93. {streamlit_nightly-1.44.1.dev20250327.dist-info → streamlit_nightly-1.44.2.dev20250403.dist-info}/WHEEL +0 -0
  94. {streamlit_nightly-1.44.1.dev20250327.dist-info → streamlit_nightly-1.44.2.dev20250403.dist-info}/entry_points.txt +0 -0
  95. {streamlit_nightly-1.44.1.dev20250327.dist-info → streamlit_nightly-1.44.2.dev20250403.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,3 @@
1
+ import{bv as _,bM as ye,bw as $,r as u,z as $e,C as ne,j as R,bz as Re,bs as Oe,ba as _e,bt as Se,aC as oe,H as ie,c6 as ae,br as Pe}from"./index.DIxzN4oM.js";import{a as we}from"./useBasicWidgetState.Bs_D3hOD.js";import"./FormClearHelper.BjztopwY.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){O(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function D(e){return e.$isActive?T:e.$isHovered?L:E}function Me(e){var t=e.$theme.colors,n=e.$disabled,r=e.$checked,o=e.$isFocusVisible,i=e.$error;if(n)return t.tickFillDisabled;if(r)if(i)switch(D(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(D(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(D(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(D(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(e){var t=e.$labelPlacement,n=t===void 0?"":t,r=e.$theme,o;switch(n){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=r.direction==="rtl"?"Left":"Right";break;default:case"right":o=r.direction==="rtl"?"Right":"Left";break}var i=r.sizing,s=i.scale300;return O({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,s=e.$align,a=i.sizing,c=s==="horizontal",f=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:a.scale200},O(t,"margin".concat(f),c?a.scale200:null),O(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});K.displayName="RadioMarkInner";K.displayName="RadioMarkInner";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});J.displayName="RadioMarkOuter";J.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return z(z({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",s=n.direction==="rtl"?"Left":"Right";return z(z({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),O(t,"margin".concat(s),o?n.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(e,t){if(e){if(typeof e=="string")return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}}function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function Ae(e){if(Array.isArray(e))return e}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function De(e,t,n){return t&&ze(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Ce(e){var t=Ne();return function(){var r=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return He(this,o)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},B(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){Be(n,e);var t=Ce(n);function n(){var r;je(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(a,c){ye(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),j(A(r),"handleBlur",function(a,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(a)}),r}return De(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=$(s.RadioGroupRoot,q),c=Ee(a,2),f=c[0],b=c[1];return u.createElement(f,V({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},b),u.Children.map(this.props.children,function(p,l){if(!u.isValidElement(p))return null;var d=o.props.value===p.props.value;return u.cloneElement(p,{align:o.props.align,autoFocus:o.props.autoFocus,checked:d,disabled:o.props.disabled||p.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===l,isFocusVisible:o.state.isFocusVisible,tabIndex:l===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(g){return o.handleBlur(g,l)},onFocus:function(g){return o.handleFocus(g,l)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);j(pe,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function M(e,t){return We(e)||Ge(e,t)||Ue(e,t)||Ve()}function Ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,a=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function We(e){if(Array.isArray(e))return e}function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ke(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},W(e,t)}function Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=function(e){Je(n,e);var t=Qe(n);function n(){var r;qe(this,n);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Ke(n,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,s=$(i.Root,X),a=M(s,2),c=a[0],f=a[1],b=$(i.Label,Q),p=M(b,2),l=p[0],d=p[1],S=$(i.Input,Y),g=M(S,2),P=g[0],H=g[1],x=$(i.Description,Z),I=M(x,2),v=I[0],h=I[1],m=$(i.RadioMarkInner,K),ee=M(m,2),de=ee[0],he=ee[1],be=$(i.RadioMarkOuter,J),te=M(be,2),ge=te[0],ve=te[1],w={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(l,y({},w,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,y({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},w,f),et(this.props.labelPlacement)&&re,u.createElement(ge,y({},w,ve),u.createElement(de,y({},w,he))),u.createElement(P,y({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:rt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},w,H)),tt(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(v,y({},w,h),this.props.description))}}]),n}(u.Component);F(fe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function nt(e){const t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=ie(t.toString()),o=Math.round(r*.375);let i=Math.round(ie((t-n).toString()));return i>=r&&(i-=1),[ae(o,"px"),ae(i,"px")]}function ot({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:s,labelVisibility:a,help:c}){const[f,b]=u.useState(n??null);u.useEffect(()=>{n!==f&&b(n??null)},[n]);const p=u.useCallback(v=>{const h=parseInt(v.target.value,10);b(h),r(h)},[r]),l=$e(),d=i.length>0,S=o.length>0,g=S?o:["No options to select."],P=e||!S,H=v=>v==""&&t&&d?"&nbsp;":v,[x,I]=nt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[R(Se,{label:s,disabled:P,labelVisibility:a,children:c&&R(Re,{children:R(Oe,{content:c,placement:_e.TOP_RIGHT})})}),R(pe,{onChange:p,value:f!==null?f.toString():void 0,disabled:P,align:t?se.horizontal:se.vertical,"aria-label":s,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:g.map((v,h)=>ne(fe,{value:h.toString(),overrides:{Root:{style:({$isFocusVisible:m})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:m?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:m})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:m&&!P?l.colors.primary:l.colors.fadedText40})},RadioMarkInner:{style:({$checked:m})=>({height:m?x:I,width:m?x:I})},Label:{style:{color:P?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[R(oe,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&R(oe,{source:H(i[h]),allowHTML:!1,isCaption:!0,isLabel:!0})]},h))})]})}const it=u.memo(ot);function at({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=we({getStateFromWidgetMgr:st,getDefaultStateFromProto:lt,getCurrStateFromProto:ut,updateWidgetMgrState:ct,element:t,widgetMgr:n,fragmentId:r}),s=u.useCallback(d=>{i({value:d,fromUi:!0})},[i]),{horizontal:a,options:c,captions:f,label:b,labelVisibility:p,help:l}=t;return R(it,{label:b,onChange:s,options:c,captions:f,disabled:e,horizontal:a,labelVisibility:Pe(p==null?void 0:p.value),value:o??null,help:l})}function st(e,t){return e.getIntValue(t)}function lt(e){return e.default??null}function ut(e){return e.value??null}function ct(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const bt=u.memo(at);export{bt 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.B28jf8c_.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
+ 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.DIxzN4oM.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{r as l,M as u,j as d,br as x,c6 as V}from"./index.B28jf8c_.js";import{a as h}from"./useBasicWidgetState.D6255-xX.js";import"./FormClearHelper.CWUgHOqb.js";const U=(t,o)=>t.getStringValue(o),v=t=>t.options.length===0||u(t.default)?null:t.options[t.default],C=t=>t.rawValue??null,F=(t,o,e,r)=>{o.setStringValue(t,e.value,{fromUi:e.fromUi},r)},M=({disabled:t,element:o,widgetMgr:e,fragmentId:r})=>{const{options:n,help:c,label:i,labelVisibility:a,placeholder:g,acceptNewOptions:p}=o,[f,s]=h({getStateFromWidgetMgr:U,getDefaultStateFromProto:v,getCurrStateFromProto:C,updateWidgetMgrState:F,element:o,widgetMgr:e,fragmentId:r}),m=l.useCallback(b=>{s({value:b,fromUi:!0})},[s]),S=u(o.default)&&!t;return d(V,{label:i,labelVisibility:x(a==null?void 0:a.value),options:n,disabled:t,onChange:m,value:f,help:c,placeholder:g,clearable:S,acceptNewOptions:p})},w=l.memo(M);export{w as default};
1
+ import{r as l,M as u,j as d,br as x,c7 as V}from"./index.DIxzN4oM.js";import{a as h}from"./useBasicWidgetState.Bs_D3hOD.js";import"./FormClearHelper.BjztopwY.js";const U=(t,o)=>t.getStringValue(o),v=t=>t.options.length===0||u(t.default)?null:t.options[t.default],C=t=>t.rawValue??null,F=(t,o,e,r)=>{o.setStringValue(t,e.value,{fromUi:e.fromUi},r)},M=({disabled:t,element:o,widgetMgr:e,fragmentId:r})=>{const{options:n,help:c,label:i,labelVisibility:a,placeholder:g,acceptNewOptions:p}=o,[f,s]=h({getStateFromWidgetMgr:U,getDefaultStateFromProto:v,getCurrStateFromProto:C,updateWidgetMgrState:F,element:o,widgetMgr:e,fragmentId:r}),m=l.useCallback(b=>{s({value:b,fromUi:!0})},[s]),S=u(o.default)&&!t;return d(V,{label:i,labelVisibility:x(a==null?void 0:a.value),options:n,disabled:t,onChange:m,value:f,help:c,placeholder:g,clearable:S,acceptNewOptions:p})},w=l.memo(M);export{w as default};
@@ -0,0 +1 @@
1
+ import{n as T,r,z as M,c1 as W,c2 as C,C as I,j as l,br as V,bF as O,bs as L,ba as N,bt as P,c0 as k,c3 as E,bY as $,c4 as A,bC as B}from"./index.DIxzN4oM.js";import{a as F}from"./useBasicWidgetState.Bs_D3hOD.js";import"./FormClearHelper.BjztopwY.js";const H=T("div",{target:"euzcfsp0"})(({theme:s})=>({"span[aria-disabled='true']":{background:s.colors.fadedText05}})),D=(s,t)=>s.getStringArrayValue(t),U=s=>s.default.map(t=>s.options[t])??null,j=s=>s.rawValues??null,G=(s,t,n,p)=>{t.setStringArrayValue(s,n.value,{fromUi:n.fromUi},p)},K=s=>{var S;const{element:t,widgetMgr:n,fragmentId:p}=s,e=M(),[i,m]=F({getStateFromWidgetMgr:D,getDefaultStateFromProto:U,getCurrStateFromProto:j,updateWidgetMgrState:G,element:t,widgetMgr:n,fragmentId:p}),h=t.maxSelections>0&&i.length>=t.maxSelections,f=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]),y=r.useMemo(()=>i.map(o=>({value:o,label:o})),[i]),b=r.useCallback(o=>{var c,d;switch(o.type){case"remove":return W(i,(c=o.option)==null?void 0:c.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]),v=r.useCallback(o=>{t.maxSelections&&o.type==="select"&&i.length>=t.maxSelections||m({value:b(o),fromUi:!0})},[t.maxSelections,b,m,i.length]),x=r.useCallback((o,c)=>{if(h)return[];const d=o.filter(R=>!i.includes(R.value));return C(d,c)},[h,i]),{options:u}=t;let a=s.disabled,g=t.placeholder;u.length===0&&(t.acceptNewOptions?g="Add options":(g="No options to select",a=!0));const z=u.map(o=>({label:o,value:o})),w=u.length>10;return I("div",{className:"stMultiSelect","data-testid":"stMultiSelect",children:[l(P,{label:t.label,disabled:a,labelVisibility:V((S=t.labelVisibility)==null?void 0:S.value),children:t.help&&l(O,{children:l(L,{content:t.help,placement:N.TOP_RIGHT})})}),l(H,{children:l(k,{creatable:t.acceptNewOptions??!1,options:z,labelKey:"label",valueKey:"value","aria-label":t.label,placeholder:g,type:A.select,multi:!0,onChange:v,value:y,disabled:a,size:"compact",noResultsMsg:f,filterOptions:x,closeOnSelect:!1,overrides:{Popover:{props:{overrides:{Body:{style:()=>({marginTop:e.spacing.px})}}}},SelectArrow:{component:$,props:{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:a?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:B.isMobile&&w===!1?"readonly":null}},Dropdown:{component:E}}})})]})},q=r.memo(K);export{q as default};