streamlit-nightly 1.44.2.dev20250402__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.
- streamlit/runtime/context.py +14 -0
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.A_AIJJwM.js → FileDownload.esm.B3kD8CdX.js} +1 -1
- streamlit/static/static/js/{FileHelper.DaAC-m0e.js → FileHelper.CZMZF2jC.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.D_lZQKmD.js → FormClearHelper.BjztopwY.js} +1 -1
- streamlit/static/static/js/{Hooks.C0-CX_rN.js → Hooks.B2w-p718.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CG3UMf4u.js → InputInstructions.CuF13wx9.js} +1 -1
- streamlit/static/static/js/{ProgressBar.BgDegYng.js → ProgressBar.BbIgSlVa.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.Bfu_UPRt.js → RenderInPortalIfExists.yENMDBLa.js} +1 -1
- streamlit/static/static/js/{Toolbar.npzZKxFq.js → Toolbar.DJ7G2mIO.js} +1 -1
- streamlit/static/static/js/{base-input.Byf0k1mc.js → base-input.DIlOlDo4.js} +1 -1
- streamlit/static/static/js/{checkbox.Dcghyd9d.js → checkbox.BQjuWiaH.js} +1 -1
- streamlit/static/static/js/{createSuper.BWg31u-J.js → createSuper.DsCxV-v8.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BSxd5jh_.js → data-grid-overlay-editor.D4K6HcP0.js} +1 -1
- streamlit/static/static/js/{downloader.bq2bzQ0v.js → downloader.Lq-fJZlW.js} +1 -1
- streamlit/static/static/js/{es6.CribWmTX.js → es6.BE-9QZmp.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.D2ozJC_5.js → iframeResizer.contentWindow.CVN6zezL.js} +1 -1
- streamlit/static/static/js/{index.DjyS5qFg.js → index.0HztFnVa.js} +1 -1
- streamlit/static/static/js/{index.DUait78G.js → index.5819-zgt.js} +1 -1
- streamlit/static/static/js/{index.rPO2EmEV.js → index.B-KH-iJ1.js} +1 -1
- streamlit/static/static/js/{index.Bvfc-6Em.js → index.B0f5Sqj9.js} +1 -1
- streamlit/static/static/js/{index.DwUILGc6.js → index.B1gZ98Ih.js} +1 -1
- streamlit/static/static/js/{index.Bewme-Iz.js → index.B2XNA40L.js} +1 -1
- streamlit/static/static/js/{index.L6dFUXCS.js → index.B7RGQCfs.js} +1 -1
- streamlit/static/static/js/{index.DwMiMUP8.js → index.BB3TfMGO.js} +1 -1
- streamlit/static/static/js/{index.4B-awRcA.js → index.BDovkxCx.js} +1 -1
- streamlit/static/static/js/{index.ClZ1_5cJ.js → index.BMWHViZF.js} +1 -1
- streamlit/static/static/js/{index.CYPlhGDf.js → index.BM_qS2Z6.js} +1 -1
- streamlit/static/static/js/{index.DU9FnZDE.js → index.BYWoEwfP.js} +1 -1
- streamlit/static/static/js/{index.BlG4Ekbx.js → index.Bs_nrSu4.js} +1 -1
- streamlit/static/static/js/{index.D3V3VqLp.js → index.BwOqVS7B.js} +1 -1
- streamlit/static/static/js/{index.D0Z4Dv5j.js → index.BysxR7v7.js} +1 -1
- streamlit/static/static/js/{index.DQRvT4O9.js → index.C6uLzsGN.js} +1 -1
- streamlit/static/static/js/{index.CLy0RAEc.js → index.CDspsVkR.js} +1 -1
- streamlit/static/static/js/{index.oXMoemDa.js → index.CE-qPTwY.js} +1 -1
- streamlit/static/static/js/{index.NaV2bIRC.js → index.CFnDv8Ab.js} +1 -1
- streamlit/static/static/js/{index.BR9Yq4Nt.js → index.CQYXOt0H.js} +1 -1
- streamlit/static/static/js/{index.DZ8osDCc.js → index.CU_SzKbN.js} +1 -1
- streamlit/static/static/js/{index.DrBbayNm.js → index.CWOluRqa.js} +1 -1
- streamlit/static/static/js/{index.lO5QuA5T.js → index.CbDE21BB.js} +1 -1
- streamlit/static/static/js/{index.BP7ti61f.js → index.ChX_XN9v.js} +1 -1
- streamlit/static/static/js/{index.BjcotTEW.js → index.Cn3q8ZVn.js} +1 -1
- streamlit/static/static/js/{index.SwSr3nyi.js → index.CzzEyXiC.js} +3 -3
- streamlit/static/static/js/{index.WQPAt2Xq.js → index.DIxzN4oM.js} +3 -3
- streamlit/static/static/js/index.DSsFpl6V.js +3 -0
- streamlit/static/static/js/{index.BWc_Gs92.js → index.DmZP-_fu.js} +1 -1
- streamlit/static/static/js/{index.D5qv7QOP.js → index.Dw1CjpSH.js} +1 -1
- streamlit/static/static/js/{index.B2vrM38X.js → index.IydYP9PK.js} +1 -1
- streamlit/static/static/js/{index.7dAqUpNn.js → index.TnCoD1oP.js} +1 -1
- streamlit/static/static/js/{index.9M25VFY4.js → index.WW1pXc2g.js} +1 -1
- streamlit/static/static/js/{index.MkSF6mBf.js → index.eNGIEtgK.js} +5 -5
- streamlit/static/static/js/{index.DLcS0BNy.js → index.m_aVBz2b.js} +1 -1
- streamlit/static/static/js/{index.DdCJP9co.js → index.rPwcP7b8.js} +1 -1
- streamlit/static/static/js/{index.COAPwLSh.js → index.u-RVYMyk.js} +1 -1
- streamlit/static/static/js/{input.BEFQQ7Gt.js → input.CVw5KI0x.js} +2 -2
- streamlit/static/static/js/{memory.DNVmX4SL.js → memory.CnrS2dOM.js} +1 -1
- streamlit/static/static/js/{mergeWith.DEwF0jm-.js → mergeWith.DUDC520V.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.DPbEdoi0.js → number-overlay-editor.Ccw3Yu2p.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.BQ3_H8VM.js → possibleConstructorReturn.wVJHSwqv.js} +1 -1
- streamlit/static/static/js/{sandbox.AkK_2cIl.js → sandbox.CpAztCDM.js} +1 -1
- streamlit/static/static/js/{textarea.BSF7Yv2g.js → textarea.CFjEVTUg.js} +2 -2
- streamlit/static/static/js/{timepicker.tp7yYNUs.js → timepicker.DMKQZM-V.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.Cd84Lveq.js → toConsumableArray.KVlxKIgo.js} +1 -1
- streamlit/static/static/js/{uniqueId.F4Tb7bUT.js → uniqueId.kOCufBPt.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.DPIaUy49.js → useBasicWidgetState.Bs_D3hOD.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.CKZQKyKc.js → useOnInputChange.BH-JyYhR.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.BgMcm0NO.js → withFullScreenWrapper.vQYihw6n.js} +1 -1
- {streamlit_nightly-1.44.2.dev20250402.dist-info → streamlit_nightly-1.44.2.dev20250403.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.44.2.dev20250402.dist-info → streamlit_nightly-1.44.2.dev20250403.dist-info}/RECORD +73 -73
- streamlit/static/static/js/index.BVG2y6Li.js +0 -3
- {streamlit_nightly-1.44.2.dev20250402.data → streamlit_nightly-1.44.2.dev20250403.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.44.2.dev20250402.dist-info → streamlit_nightly-1.44.2.dev20250403.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.44.2.dev20250402.dist-info → streamlit_nightly-1.44.2.dev20250403.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.44.2.dev20250402.dist-info → streamlit_nightly-1.44.2.dev20250403.dist-info}/top_level.txt +0 -0
@@ -1,3 +0,0 @@
|
|
1
|
-
import{bv as _,bM as ve,bw as $,r as u,z as me,C as te,j as O,bz as ye,bs as $e,ba as Oe,bt as Re,aC as re,br as _e}from"./index.WQPAt2Xq.js";import{a as Pe}from"./useBasicWidgetState.DPIaUy49.js";import"./FormClearHelper.D_lZQKmD.js";var ne={vertical:"vertical",horizontal:"horizontal"};function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oe(Object(r),!0).forEach(function(n){R(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function R(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var E=0,I=1,L=2;function x(e){return e.$isActive?L:e.$isHovered?I:E}function we(e){var t=e.$theme.colors,r=e.$disabled,n=e.$checked,o=e.$isFocusVisible,i=e.$error;if(r)return t.tickFillDisabled;if(n)if(i)switch(x(e)){case E:return t.tickFillErrorSelected;case I:return t.tickFillErrorSelectedHover;case L:return t.tickFillErrorSelectedHoverActive}else switch(x(e)){case E:return t.tickFillSelected;case I:return t.tickFillSelectedHover;case L:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function Se(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(x(e)){case E:return t.tickFillError;case I:return t.tickFillErrorHover;case L:return t.tickFillErrorHoverActive}else switch(x(e)){case E:return t.tickFill;case I:return t.tickFillHover;case L:return t.tickFillActive}}function Me(e){var t=e.$labelPlacement,r=t===void 0?"":t,n=e.$theme,o;switch(r){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=n.direction==="rtl"?"Left":"Right";break;default:case"right":o=n.direction==="rtl"?"Right":"Left";break}var i=n.sizing,l=i.scale300;return R({},"padding".concat(o),l)}function ke(e){var t=e.$disabled,r=e.$theme,n=r.colors;return t?n.contentSecondary:n.contentPrimary}var G=_("div",function(e){var t=e.$disabled,r=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:r==="horizontal"?"row":"column",alignItems:r==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});G.displayName="RadioGroupRoot";G.displayName="RadioGroupRoot";var W=_("label",function(e){var t,r=e.$disabled,n=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,l=e.$align,s=i.sizing,c=l==="horizontal",f=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:r?"not-allowed":"pointer",marginTop:s.scale200},R(t,"margin".concat(f),c?s.scale200:null),R(t,"marginBottom",n&&!c?null:s.scale200),t});W.displayName="Root";W.displayName="Root";var q=_("div",function(e){var t=e.$theme,r=t.animation,n=t.sizing;return{backgroundColor:Se(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?n.scale200:n.scale550,transitionDuration:r.timing200,transitionTimingFunction:r.easeOutCurve,width:e.$checked?n.scale200:n.scale550}});q.displayName="RadioMarkInner";q.displayName="RadioMarkInner";var X=_("div",function(e){var t=e.$theme,r=t.animation,n=t.sizing;return{alignItems:"center",backgroundColor:we(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:n.scale700,justifyContent:"center",marginTop:n.scale0,marginRight:n.scale0,marginBottom:n.scale0,marginLeft:n.scale0,outline:"none",verticalAlign:"middle",width:n.scale700,flexShrink:0,transitionDuration:r.timing200,transitionTimingFunction:r.easeOutCurve}});X.displayName="RadioMarkOuter";X.displayName="RadioMarkOuter";var K=_("div",function(e){var t=e.$theme.typography;return j(j({verticalAlign:"middle"},Me(e)),{},{color:ke(e)},t.LabelMedium)});K.displayName="Label";K.displayName="Label";var J=_("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"});J.displayName="Input";J.displayName="Input";var Q=_("div",function(e){var t,r=e.$theme,n=e.$align,o=n==="horizontal",i=r.direction==="rtl"?"Right":"Left",l=r.direction==="rtl"?"Left":"Right";return j(j({},r.typography.ParagraphSmall),{},(t={color:r.colors.contentSecondary,cursor:"auto"},R(t,"margin".concat(i),n==="horizontal"?null:r.sizing.scale900),R(t,"margin".concat(l),o?r.sizing.scale200:null),R(t,"maxWidth","240px"),t))});Q.displayName="Description";Q.displayName="Description";function z(e){"@babel/helpers - typeof";return z=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},z(e)}function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}function Fe(e,t){return Te(e)||Le(e,t)||Ie(e,t)||Ee()}function Ee(){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 Ie(e,t){if(e){if(typeof e=="string")return ie(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ie(e,t)}}function ie(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Le(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,l,s;try{for(r=r.call(e);!(o=(l=r.next()).done)&&(n.push(l.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw s}}return n}}function Te(e){if(Array.isArray(e))return e}function Ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function je(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xe(e,t,r){return t&&je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function De(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&&N(e,t)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},N(e,t)}function Be(e){var t=ze();return function(){var n=D(e),o;if(t){var i=D(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ce(this,o)}}function Ce(e,t){if(t&&(z(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T(e)}function T(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 D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},D(e)}function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var se=function(e){De(r,e);var t=Be(r);function r(){var n;Ae(this,r);for(var o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];return n=t.call.apply(t,[this].concat(i)),A(T(n),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),A(T(n),"handleFocus",function(s,c){ve(s)&&n.setState({isFocusVisible:!0}),n.setState({focusedRadioIndex:c}),n.props.onFocus&&n.props.onFocus(s)}),A(T(n),"handleBlur",function(s,c){n.state.isFocusVisible!==!1&&n.setState({isFocusVisible:!1}),n.setState({focusedRadioIndex:-1}),n.props.onBlur&&n.props.onBlur(s)}),n}return xe(r,[{key:"render",value:function(){var o=this,i=this.props.overrides,l=i===void 0?{}:i,s=$(l.RadioGroupRoot,G),c=Fe(s,2),f=c[0],b=c[1];return u.createElement(f,H({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,a){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===a,isFocusVisible:o.state.isFocusVisible,tabIndex:a===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(g){return o.handleBlur(g,a)},onFocus:function(g){return o.handleFocus(g,a)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),r}(u.Component);A(se,"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 V(e){"@babel/helpers - typeof";return V=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},V(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y.apply(this,arguments)}function M(e,t){return Ue(e)||Ve(e,t)||Ne(e,t)||He()}function He(){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 Ne(e,t){if(e){if(typeof e=="string")return ae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ae(e,t)}}function ae(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,l,s;try{for(r=r.call(e);!(o=(l=r.next()).done)&&(n.push(l.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw s}}return n}}function Ue(e){if(Array.isArray(e))return e}function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qe(e,t,r){return t&&We(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xe(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(n,o){return n.__proto__=o,n},U(e,t)}function Ke(e){var t=Qe();return function(){var n=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Je(this,o)}}function Je(e,t){if(t&&(V(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 Qe(){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(r){return r.__proto__||Object.getPrototypeOf(r)},B(e)}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ye(e){return e==="top"||e==="left"}function Ze(e){return e==="bottom"||e==="right"}var et=function(t){return t.stopPropagation()},le=function(e){Xe(r,e);var t=Ke(r);function r(){var n;Ge(this,r);for(var o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];return n=t.call.apply(t,[this].concat(i)),F(k(n),"state",{isActive:!1,isHovered:!1}),F(k(n),"onMouseEnter",function(s){n.setState({isHovered:!0}),n.props.onMouseEnter&&n.props.onMouseEnter(s)}),F(k(n),"onMouseLeave",function(s){n.setState({isHovered:!1}),n.props.onMouseLeave&&n.props.onMouseLeave(s)}),F(k(n),"onMouseDown",function(s){n.setState({isActive:!0}),n.props.onMouseDown&&n.props.onMouseDown(s)}),F(k(n),"onMouseUp",function(s){n.setState({isActive:!1}),n.props.onMouseUp&&n.props.onMouseUp(s)}),n}return qe(r,[{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,l=$(i.Root,W),s=M(l,2),c=s[0],f=s[1],b=$(i.Label,K),p=M(b,2),a=p[0],d=p[1],P=$(i.Input,J),g=M(P,2),w=g[0],C=g[1],v=$(i.Description,Q),h=M(v,2),m=h[0],ue=h[1],ce=$(i.RadioMarkInner,q),Y=M(ce,2),pe=Y[0],fe=Y[1],de=$(i.RadioMarkOuter,X),Z=M(de,2),he=Z[0],be=Z[1],S={$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},ee=u.createElement(a,y({},S,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(ge){return ge.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},S,f),Ye(this.props.labelPlacement)&&ee,u.createElement(he,y({},S,be),u.createElement(pe,y({},S,fe))),u.createElement(w,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:et,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},S,C)),Ze(this.props.labelPlacement)&&ee),!!this.props.description&&u.createElement(m,y({},S,ue),this.props.description))}}]),r}(u.Component);F(le,"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 tt({disabled:e,horizontal:t,value:r,onChange:n,options:o,captions:i,label:l,labelVisibility:s,help:c}){const[f,b]=u.useState(r??null);u.useEffect(()=>{r!==f&&b(r??null)},[r]);const p=u.useCallback(v=>{const h=parseInt(v.target.value,10);b(h),n(h)},[n]),a=me(),d=i.length>0,P=o.length>0,g=P?o:["No options to select."],w=e||!P,C=v=>v==""&&t&&d?" ":v;return te("div",{className:"stRadio","data-testid":"stRadio",children:[O(Re,{label:l,disabled:w,labelVisibility:s,children:c&&O(ye,{children:O($e,{content:c,placement:Oe.TOP_RIGHT})})}),O(se,{onChange:p,value:f!==null?f.toString():void 0,disabled:w,align:t?ne.horizontal:ne.vertical,"aria-label":l,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?a.spacing.sm:a.spacing.none,minHeight:a.sizes.minElementHeight}}},children:g.map((v,h)=>te(le,{value:h.toString(),overrides:{Root:{style:({$isFocusVisible:m})=>({marginBottom:a.spacing.none,marginTop:a.spacing.none,marginRight:d?a.spacing.sm:a.spacing.lg,paddingLeft:a.spacing.none,alignItems:"start",paddingRight:a.spacing.threeXS,backgroundColor:m?a.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:m})=>({width:a.sizes.checkbox,height:a.sizes.checkbox,marginTop:"0.35rem",marginRight:a.spacing.none,marginLeft:a.spacing.none,backgroundColor:m&&!w?a.colors.primary:a.colors.fadedText40})},RadioMarkInner:{style:({$checked:m})=>({height:m?"37.5%":`calc(${a.sizes.checkbox} - ${a.spacing.threeXS})`,width:m?"37.5%":`calc(${a.sizes.checkbox} - ${a.spacing.threeXS})`})},Label:{style:{color:w?a.colors.fadedText40:a.colors.bodyText,position:"relative",top:a.spacing.px}}},children:[O(re,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&O(re,{source:C(i[h]),allowHTML:!1,isCaption:!0,isLabel:!0})]},h))})]})}const rt=u.memo(tt);function nt({disabled:e,element:t,widgetMgr:r,fragmentId:n}){const[o,i]=Pe({getStateFromWidgetMgr:ot,getDefaultStateFromProto:it,getCurrStateFromProto:at,updateWidgetMgrState:st,element:t,widgetMgr:r,fragmentId:n}),l=u.useCallback(d=>{i({value:d,fromUi:!0})},[i]),{horizontal:s,options:c,captions:f,label:b,labelVisibility:p,help:a}=t;return O(rt,{label:b,onChange:l,options:c,captions:f,disabled:e,horizontal:s,labelVisibility:_e(p==null?void 0:p.value),value:o??null,help:a})}function ot(e,t){return e.getIntValue(t)}function it(e){return e.default??null}function at(e){return e.value??null}function st(e,t,r,n){t.setIntValue(e,r.value??null,{fromUi:r.fromUi},n)}const ft=u.memo(nt);export{ft as default};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|