streamlit-nightly 1.52.3.dev20260113__py3-none-any.whl → 1.53.1.dev20260114__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 (113) hide show
  1. streamlit/commands/logo.py +2 -0
  2. streamlit/commands/page_config.py +16 -16
  3. streamlit/components/v2/__init__.py +2 -2
  4. streamlit/connections/base_connection.py +16 -4
  5. streamlit/connections/snowflake_connection.py +254 -205
  6. streamlit/elements/form.py +2 -2
  7. streamlit/elements/metric.py +49 -48
  8. streamlit/elements/widgets/button.py +9 -9
  9. streamlit/elements/widgets/chat.py +5 -9
  10. streamlit/elements/widgets/data_editor.py +3 -3
  11. streamlit/elements/widgets/file_uploader.py +10 -11
  12. streamlit/elements/widgets/select_slider.py +4 -0
  13. streamlit/runtime/caching/cache_data_api.py +25 -21
  14. streamlit/runtime/caching/cache_resource_api.py +69 -41
  15. streamlit/runtime/connection_factory.py +67 -41
  16. streamlit/static/index.html +1 -1
  17. streamlit/static/manifest.json +304 -304
  18. streamlit/static/static/js/{ErrorOutline.esm.BjVqd_6R.js → ErrorOutline.esm.BAZUU4id.js} +1 -1
  19. streamlit/static/static/js/{FileDownload.esm.DJCSsghl.js → FileDownload.esm.C6tTTniR.js} +1 -1
  20. streamlit/static/static/js/{FileHelper.C---TH7o.js → FileHelper.BOHlwlc9.js} +1 -1
  21. streamlit/static/static/js/{FormClearHelper.C-6BC487.js → FormClearHelper.D4lty7rT.js} +1 -1
  22. streamlit/static/static/js/{InputInstructions.sxc3InCI.js → InputInstructions.BWw9lhud.js} +1 -1
  23. streamlit/static/static/js/{Particles.S8yD7iW-.js → Particles.BDi7fIn-.js} +1 -1
  24. streamlit/static/static/js/{ProgressBar.BiYsyZCC.js → ProgressBar.DCHh4N3P.js} +1 -1
  25. streamlit/static/static/js/{StreamlitSyntaxHighlighter.9jZF8jX1.js → StreamlitSyntaxHighlighter.BRydQwEj.js} +1 -1
  26. streamlit/static/static/js/{TableChart.esm.BdA4Q1rZ.js → TableChart.esm.7KFX5I_G.js} +1 -1
  27. streamlit/static/static/js/{Toolbar.B9DaaDfN.js → Toolbar.guIuiwEF.js} +1 -1
  28. streamlit/static/static/js/{WidgetLabelHelpIconInline.DxODTLS2.js → WidgetLabelHelpIconInline.CzodezAH.js} +1 -1
  29. streamlit/static/static/js/{base-input.Gf1cKuQR.js → base-input.Cg7NpsfS.js} +1 -1
  30. streamlit/static/static/js/{checkbox.CnoNruf3.js → checkbox.Bs20OTna.js} +1 -1
  31. streamlit/static/static/js/{createDownloadLinkElement.B48AepiL.js → createDownloadLinkElement.DSqCyu38.js} +1 -1
  32. streamlit/static/static/js/{data-grid-overlay-editor.Cmdq9aqU.js → data-grid-overlay-editor.Ch4SqNfY.js} +1 -1
  33. streamlit/static/static/js/{downloader.CQLoQdMX.js → downloader.Oj5CTGJA.js} +1 -1
  34. streamlit/static/static/js/{embed.oKwocwU8.js → embed.CqzzUq73.js} +1 -1
  35. streamlit/static/static/js/{es6.BRxlY_y5.js → es6.CYrlw0Vn.js} +2 -2
  36. streamlit/static/static/js/{formatNumber.DaagZyZe.js → formatNumber.CT_v8e75.js} +1 -1
  37. streamlit/static/static/js/{iconPosition.Q3hNvmK4.js → iconPosition.DPAvXTmd.js} +1 -1
  38. streamlit/static/static/js/{iframeResizer.contentWindow.B6EBvI9L.js → iframeResizer.contentWindow.T4DvQsIf.js} +1 -1
  39. streamlit/static/static/js/{index.BoX8d5rK.js → index.AGYZDQZm.js} +1 -1
  40. streamlit/static/static/js/{index.KtjGDGY5.js → index.B3HdcUdo.js} +1 -1
  41. streamlit/static/static/js/{index.B9kZB0o1.js → index.B8ZZdPqF.js} +1 -1
  42. streamlit/static/static/js/{index.CFCBhOfx.js → index.B9Oowxt8.js} +1 -1
  43. streamlit/static/static/js/{index.CCQ5p_WC.js → index.BEzgNZOm.js} +1 -1
  44. streamlit/static/static/js/{index.D1pK_Vw2.js → index.BJnWg9Jq.js} +1 -1
  45. streamlit/static/static/js/{index.na9UBuse.js → index.BPxuKK0S.js} +1 -1
  46. streamlit/static/static/js/{index.QTaWooav.js → index.BTA0d5oq.js} +1 -1
  47. streamlit/static/static/js/{index.pU9mQeVC.js → index.BTqav7_K.js} +1 -1
  48. streamlit/static/static/js/{index.BXEC4cf3.js → index.BZ8xp-w9.js} +1 -1
  49. streamlit/static/static/js/{index.BF23fbfs.js → index.BoWBzl6h.js} +1 -1
  50. streamlit/static/static/js/index.Bqgt60FU.js +1 -0
  51. streamlit/static/static/js/{index.Dh5SAThV.js → index.BsYYrijt.js} +1 -1
  52. streamlit/static/static/js/{index.19_qtO6t.js → index.CGRIbGGV.js} +1 -1
  53. streamlit/static/static/js/{index.CSfsEKCF.js → index.CJQq5LcR.js} +1 -1
  54. streamlit/static/static/js/{index.Fu73QtkD.js → index.CPYB1awG.js} +1 -1
  55. streamlit/static/static/js/{index.BzwlrgZO.js → index.CVKk1nkB.js} +1 -1
  56. streamlit/static/static/js/{index.B03eQZoH.js → index.CVXiBeDI.js} +1 -1
  57. streamlit/static/static/js/{index.BRfGUOQ-.js → index.CXVpBAvU.js} +4 -4
  58. streamlit/static/static/js/{index.slgxPafU.js → index.Cfe-tCQJ.js} +1 -1
  59. streamlit/static/static/js/{index.D6X2coHR.js → index.ClFk8x0U.js} +1 -1
  60. streamlit/static/static/js/{index.WXybx2Xq.js → index.CnXxoVEM.js} +1 -1
  61. streamlit/static/static/js/{index.j4fnjyHo.js → index.Cw4eSvJ7.js} +1 -1
  62. streamlit/static/static/js/{index.KN1VmyYN.js → index.D6HCANv6.js} +1 -1
  63. streamlit/static/static/js/{index.CP-hoxJM.js → index.D7KbBAWb.js} +1 -1
  64. streamlit/static/static/js/{index.CCFwVy90.js → index.D84XHt50.js} +1 -1
  65. streamlit/static/static/js/{index.BkSwGJoh.js → index.DL_Ooizi.js} +1 -1
  66. streamlit/static/static/js/{index.QHnxuesF.js → index.DNyw7S7Z.js} +1 -1
  67. streamlit/static/static/js/{index.BAI9aHCq.js → index.DPlPEuq6.js} +1 -1
  68. streamlit/static/static/js/{index.CJ4oJe0V.js → index.DQzRwgrT.js} +1 -1
  69. streamlit/static/static/js/{index.CVlg41MB.js → index.DXRGd--0.js} +1 -1
  70. streamlit/static/static/js/{index.CIbgt5wY.js → index.DZDt5hYD.js} +1 -1
  71. streamlit/static/static/js/{index.BVT89mQw.js → index.DesNeXSA.js} +1 -1
  72. streamlit/static/static/js/{index.Boa0Egng.js → index.Dg9k4R8B.js} +1 -1
  73. streamlit/static/static/js/{index.43b777iP.js → index.Do9A7QCt.js} +1 -1
  74. streamlit/static/static/js/{index.DJ7P09eb.js → index.DrSH3pK3.js} +1 -1
  75. streamlit/static/static/js/{index.OpATzEaW.js → index.Dtd5z2rM.js} +1 -1
  76. streamlit/static/static/js/{index.BnfTPrHb.js → index.DzldU3Hy.js} +1 -1
  77. streamlit/static/static/js/{index.C0fSEz-3.js → index.GZi6GTJa.js} +1 -1
  78. streamlit/static/static/js/{index.CYE7b5Du.js → index.LOA31DFn.js} +1 -1
  79. streamlit/static/static/js/{index.Ca7MUNWJ.js → index.MtwRNvlS.js} +1 -1
  80. streamlit/static/static/js/{index.BbSFVZ3p.js → index.XHtvnZ0-.js} +1 -1
  81. streamlit/static/static/js/{index.CvIqsWy1.js → index.Yj6vcyFD.js} +1 -1
  82. streamlit/static/static/js/{index.BGBTkulf.js → index.b-MrPulo.js} +1 -1
  83. streamlit/static/static/js/{index.DGYHxruh.js → index.hcUYvTqs.js} +1 -1
  84. streamlit/static/static/js/{index.CvB9JBqS.js → index.tLZuZM89.js} +6 -6
  85. streamlit/static/static/js/{index.Xg-Qttib.js → index.wngeYhKj.js} +1 -1
  86. streamlit/static/static/js/{index.whRT3Vm3.js → index.xCV2qwtw.js} +1 -1
  87. streamlit/static/static/js/{input.CPzINTl-.js → input.CYXuTqoa.js} +1 -1
  88. streamlit/static/static/js/{main.DSPn8dUe.js → main.BE-siVKv.js} +1 -1
  89. streamlit/static/static/js/{memory.CfD8IGoU.js → memory.V554ztRg.js} +1 -1
  90. streamlit/static/static/js/{number-overlay-editor.4Ae0qegV.js → number-overlay-editor.BiUTOXIl.js} +1 -1
  91. streamlit/static/static/js/{pandasStylerUtils.D2EjZ7k6.js → pandasStylerUtils.Dej3Tstq.js} +1 -1
  92. streamlit/static/static/js/{sandbox.C6vcPIm0.js → sandbox.gpd7KGMo.js} +1 -1
  93. streamlit/static/static/js/{styled-components.BBmp8buj.js → styled-components.Coj4dr6D.js} +1 -1
  94. streamlit/static/static/js/{throttle.BPcPpy-S.js → throttle.gZUdtYp7.js} +1 -1
  95. streamlit/static/static/js/{timepicker.ryzkTs2C.js → timepicker.B-Y4aU15.js} +1 -1
  96. streamlit/static/static/js/{toConsumableArray.Dg1nDaB_.js → toConsumableArray.CcKcKvEd.js} +1 -1
  97. streamlit/static/static/js/uniqueId.PRn3V1WU.js +1 -0
  98. streamlit/static/static/js/{useBasicWidgetState.A4U5lzAm.js → useBasicWidgetState.D-fc_aIL.js} +1 -1
  99. streamlit/static/static/js/{useIntlLocale.DWJgLlNz.js → useIntlLocale.CY32IeNt.js} +1 -1
  100. streamlit/static/static/js/{useTextInputAutoExpand.BrBonw8t.js → useTextInputAutoExpand.C0jK7TwF.js} +1 -1
  101. streamlit/static/static/js/{useUpdateUiValue.BkOWyNVX.js → useUpdateUiValue.CDQloDgB.js} +1 -1
  102. streamlit/static/static/js/{useWaveformController.CBlvXlgZ.js → useWaveformController.BLEIAIDo.js} +1 -1
  103. streamlit/static/static/js/{withCalculatedWidth.D4cpOyNe.js → withCalculatedWidth.B3oSlRC0.js} +1 -1
  104. streamlit/static/static/js/{withFullScreenWrapper.BMim3w94.js → withFullScreenWrapper.Cw_ebNmr.js} +1 -1
  105. streamlit/user_info.py +225 -166
  106. {streamlit_nightly-1.52.3.dev20260113.dist-info → streamlit_nightly-1.53.1.dev20260114.dist-info}/METADATA +1 -1
  107. {streamlit_nightly-1.52.3.dev20260113.dist-info → streamlit_nightly-1.53.1.dev20260114.dist-info}/RECORD +111 -111
  108. streamlit/static/static/js/index.CrPjcPY1.js +0 -1
  109. streamlit/static/static/js/uniqueId.BFHzT5KQ.js +0 -1
  110. {streamlit_nightly-1.52.3.dev20260113.data → streamlit_nightly-1.53.1.dev20260114.data}/scripts/streamlit.cmd +0 -0
  111. {streamlit_nightly-1.52.3.dev20260113.dist-info → streamlit_nightly-1.53.1.dev20260114.dist-info}/WHEEL +0 -0
  112. {streamlit_nightly-1.52.3.dev20260113.dist-info → streamlit_nightly-1.53.1.dev20260114.dist-info}/entry_points.txt +0 -0
  113. {streamlit_nightly-1.52.3.dev20260113.dist-info → streamlit_nightly-1.53.1.dev20260114.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,3 @@
1
- import{ao as O,ap as ye,x as $,r as u,l as $e,o as ne,j as M,P as Re,ad as Oe,q as oe,ab as ie,bs as ae,p as _e}from"./index.BRfGUOQ-.js";import{W as Se}from"./WidgetLabelHelpIconInline.DxODTLS2.js";import{u as Pe}from"./useBasicWidgetState.A4U5lzAm.js";import"./FormClearHelper.C-6BC487.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 D(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){R(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 R(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 z(e){return e.$isActive?T:e.$isHovered?L:E}function we(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(z(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(z(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 Me(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(z(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(z(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function ke(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,a=i.scale300;return R({},"padding".concat(o),a)}function Fe(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=O("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=O("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,a=e.$align,s=i.sizing,c=a==="horizontal",p=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:s.scale200},R(t,"margin".concat(p),c?s.scale200:null),R(t,"marginBottom",r&&!c?null:s.scale200),t});X.displayName="Root";X.displayName="Root";var K=O("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:Me(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=O("div",function(e){var t=e.$theme,n=t.animation,r=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: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=O("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},ke(e)),{},{color:Fe(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=O("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=O("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",a=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},R(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),R(t,"margin".concat(a),o?n.sizing.scale200:null),R(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 Ie(e,t){return xe(e)||Te(e,t)||Le(e,t)||Ee()}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{ao as O,ap as ye,x as $,r as u,l as $e,o as ne,j as M,P as Re,ad as Oe,q as oe,ab as ie,bs as ae,p as _e}from"./index.CXVpBAvU.js";import{W as Se}from"./WidgetLabelHelpIconInline.CzodezAH.js";import{u as Pe}from"./useBasicWidgetState.D-fc_aIL.js";import"./FormClearHelper.D4lty7rT.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 D(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){R(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 R(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 z(e){return e.$isActive?T:e.$isHovered?L:E}function we(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(z(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(z(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 Me(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(z(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(z(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function ke(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,a=i.scale300;return R({},"padding".concat(o),a)}function Fe(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=O("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=O("label",function(e){var t,n=e.$disabled,r=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,a=e.$align,s=i.sizing,c=a==="horizontal",p=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:n?"not-allowed":"pointer",marginTop:s.scale200},R(t,"margin".concat(p),c?s.scale200:null),R(t,"marginBottom",r&&!c?null:s.scale200),t});X.displayName="Root";X.displayName="Root";var K=O("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:Me(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=O("div",function(e){var t=e.$theme,n=t.animation,r=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: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=O("div",function(e){var t=e.$theme.typography;return D(D({verticalAlign:"middle"},ke(e)),{},{color:Fe(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=O("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=O("div",function(e){var t,n=e.$theme,r=e.$align,o=r==="horizontal",i=n.direction==="rtl"?"Right":"Left",a=n.direction==="rtl"?"Left":"Right";return D(D({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},R(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),R(t,"margin".concat(a),o?n.sizing.scale200:null),R(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 Ie(e,t){return xe(e)||Te(e,t)||Le(e,t)||Ee()}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Le(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 Te(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function xe(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 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&&je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ze(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 Be(e){var t=He();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 Ce(this,o)}}function Ce(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 He(){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){ze(n,e);var t=Be(n);function n(){var r;Ae(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=t.call.apply(t,[this].concat(i)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(s,c){ye(s)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(s)}),j(A(r),"handleBlur",function(s,c){r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1}),r.setState({focusedRadioIndex:-1}),r.props.onBlur&&r.props.onBlur(s)}),r}return De(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,a=i===void 0?{}:i,s=$(a.RadioGroupRoot,q),c=Ie(s,2),p=c[0],g=c[1];return u.createElement(p,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},g),u.Children.map(this.props.children,function(f,l){if(!u.isValidElement(f))return null;var d=o.props.value===f.props.value;return u.cloneElement(f,{align:o.props.align,autoFocus:o.props.autoFocus,checked:d,disabled:o.props.disabled||f.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(b){return o.handleBlur(b,l)},onFocus:function(b){return o.handleFocus(b,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 w(e,t){return Ge(e)||Ue(e,t)||Ve(e,t)||Ne()}function Ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ve(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 Ue(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function Ge(e){if(Array.isArray(e))return e}function We(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qe(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 Xe(e,t,n){return t&&qe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ke(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 Je(e){var t=Ye();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 Qe(this,o)}}function Qe(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 Ye(){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 Ze(e){return e==="top"||e==="left"}function et(e){return e==="bottom"||e==="right"}var tt=function(t){return t.stopPropagation()},fe=(function(e){Ke(n,e);var t=Je(n);function n(){var r;We(this,n);for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return r=t.call.apply(t,[this].concat(i)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(s){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(s)}),F(k(r),"onMouseLeave",function(s){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(s)}),F(k(r),"onMouseDown",function(s){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(s)}),F(k(r),"onMouseUp",function(s){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(s)}),r}return Xe(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,a=$(i.Root,X),s=w(a,2),c=s[0],p=s[1],g=$(i.Label,Q),f=w(g,2),l=f[0],d=f[1],_=$(i.Input,Y),b=w(_,2),S=b[0],H=b[1],x=$(i.Description,Z),I=w(x,2),m=I[0],h=I[1],v=$(i.RadioMarkInner,K),ee=w(v,2),de=ee[0],he=ee[1],ge=$(i.RadioMarkOuter,J),te=w(ge,2),be=te[0],me=te[1],P={$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({},P,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(ve){return ve.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},P,p),Ze(this.props.labelPlacement)&&re,u.createElement(be,y({},P,me),u.createElement(de,y({},P,he))),u.createElement(S,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:tt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},P,H)),et(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(m,y({},P,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 rt(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 nt({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:a,labelVisibility:s,help:c}){const[p,g]=u.useState(n??null);u.useEffect(()=>{n!==p&&g(n??null)},[n]);const f=u.useCallback(m=>{const h=parseInt(m.target.value,10);g(h),r(h)},[r]),l=$e(),d=i.length>0,_=o.length>0,b=_?o:["No options to select."],S=e||!_,H=m=>m==""&&t&&d?"&nbsp;":m,[x,I]=rt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[M(Oe,{label:a,disabled:S,labelVisibility:s,children:c&&M(Se,{content:c,placement:Re.TOP_RIGHT,label:a})}),M(pe,{onChange:f,value:p!==null?p.toString():void 0,disabled:S,align:t?se.horizontal:se.vertical,"aria-label":a,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:b.map((m,h)=>ne(fe,{value:h.toString(),overrides:{Root:{style:({$isFocusVisible:v})=>({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:v?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:v})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:v&&!S?l.colors.primary:l.colors.borderColor})},RadioMarkInner:{style:({$checked:v})=>({height:v?x:I,width:v?x:I})},Label:{style:{color:S?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[M(oe,{source:m,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&M(oe,{source:H(i[h]),allowHTML:!1,isCaption:!0,isLabel:!0})]},h))})]})}const ot=u.memo(nt);function it({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=Pe({getStateFromWidgetMgr:at,getDefaultStateFromProto:st,getCurrStateFromProto:lt,updateWidgetMgrState:ut,element:t,widgetMgr:n,fragmentId:r}),a=u.useCallback(d=>{i({value:d,fromUi:!0})},[i]),{horizontal:s,options:c,captions:p,label:g,labelVisibility:f,help:l}=t;return M(ot,{label:g,onChange:a,options:c,captions:p,disabled:e,horizontal:s,labelVisibility:_e(f?.value),value:o??null,help:l})}function at(e,t){return e.getIntValue(t)}function st(e){return e.default??null}function lt(e){return e.value??null}function ut(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const gt=u.memo(it);export{gt as default};