streamlit-nightly 1.41.2.dev20241227__py2.py3-none-any.whl → 1.41.2.dev20250124__py2.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 (429) hide show
  1. streamlit/__init__.py +11 -2
  2. streamlit/__main__.py +1 -1
  3. streamlit/auth_util.py +209 -0
  4. streamlit/cli_util.py +1 -1
  5. streamlit/column_config.py +1 -1
  6. streamlit/commands/__init__.py +1 -1
  7. streamlit/commands/echo.py +1 -1
  8. streamlit/commands/execution_control.py +1 -1
  9. streamlit/commands/experimental_query_params.py +1 -1
  10. streamlit/commands/logo.py +1 -1
  11. streamlit/commands/navigation.py +16 -15
  12. streamlit/commands/page_config.py +1 -1
  13. streamlit/components/__init__.py +1 -1
  14. streamlit/components/lib/__init__.py +1 -1
  15. streamlit/components/lib/local_component_registry.py +1 -1
  16. streamlit/components/types/__init__.py +1 -1
  17. streamlit/components/types/base_component_registry.py +1 -1
  18. streamlit/components/types/base_custom_component.py +1 -1
  19. streamlit/components/v1/__init__.py +1 -1
  20. streamlit/components/v1/component_arrow.py +1 -1
  21. streamlit/components/v1/component_registry.py +1 -1
  22. streamlit/components/v1/components.py +1 -1
  23. streamlit/components/v1/custom_component.py +1 -1
  24. streamlit/config.py +18 -3
  25. streamlit/config_option.py +10 -19
  26. streamlit/config_util.py +1 -1
  27. streamlit/connections/__init__.py +1 -1
  28. streamlit/connections/base_connection.py +1 -1
  29. streamlit/connections/snowflake_connection.py +31 -50
  30. streamlit/connections/snowpark_connection.py +1 -1
  31. streamlit/connections/sql_connection.py +1 -1
  32. streamlit/connections/util.py +1 -1
  33. streamlit/cursor.py +1 -1
  34. streamlit/dataframe_util.py +3 -3
  35. streamlit/delta_generator.py +7 -3
  36. streamlit/delta_generator_singletons.py +1 -1
  37. streamlit/deprecation_util.py +1 -1
  38. streamlit/development.py +1 -1
  39. streamlit/elements/__init__.py +1 -1
  40. streamlit/elements/alert.py +1 -1
  41. streamlit/elements/arrow.py +25 -3
  42. streamlit/elements/balloons.py +1 -1
  43. streamlit/elements/bokeh_chart.py +1 -1
  44. streamlit/elements/code.py +9 -1
  45. streamlit/elements/deck_gl_json_chart.py +1 -1
  46. streamlit/elements/dialog_decorator.py +1 -1
  47. streamlit/elements/doc_string.py +1 -1
  48. streamlit/elements/empty.py +1 -1
  49. streamlit/elements/exception.py +8 -10
  50. streamlit/elements/form.py +1 -1
  51. streamlit/elements/graphviz_chart.py +1 -1
  52. streamlit/elements/heading.py +1 -1
  53. streamlit/elements/html.py +1 -1
  54. streamlit/elements/iframe.py +1 -1
  55. streamlit/elements/image.py +1 -1
  56. streamlit/elements/json.py +1 -1
  57. streamlit/elements/layouts.py +1 -1
  58. streamlit/elements/lib/__init__.py +1 -1
  59. streamlit/elements/lib/built_in_chart_utils.py +1 -1
  60. streamlit/elements/lib/color_util.py +1 -1
  61. streamlit/elements/lib/column_config_utils.py +1 -1
  62. streamlit/elements/lib/column_types.py +1 -1
  63. streamlit/elements/lib/dialog.py +1 -1
  64. streamlit/elements/lib/dicttools.py +1 -1
  65. streamlit/elements/lib/event_utils.py +1 -1
  66. streamlit/elements/lib/file_uploader_utils.py +1 -1
  67. streamlit/elements/lib/form_utils.py +1 -1
  68. streamlit/elements/lib/image_utils.py +1 -1
  69. streamlit/elements/lib/js_number.py +1 -1
  70. streamlit/elements/lib/mutable_status_container.py +1 -1
  71. streamlit/elements/lib/options_selector_utils.py +1 -1
  72. streamlit/elements/lib/pandas_styler_utils.py +1 -1
  73. streamlit/elements/lib/policies.py +1 -1
  74. streamlit/elements/lib/streamlit_plotly_theme.py +1 -1
  75. streamlit/elements/lib/subtitle_utils.py +1 -1
  76. streamlit/elements/lib/utils.py +1 -1
  77. streamlit/elements/map.py +1 -1
  78. streamlit/elements/markdown.py +3 -3
  79. streamlit/elements/media.py +1 -1
  80. streamlit/elements/metric.py +1 -1
  81. streamlit/elements/plotly_chart.py +1 -1
  82. streamlit/elements/progress.py +1 -1
  83. streamlit/elements/pyplot.py +1 -1
  84. streamlit/elements/snow.py +1 -1
  85. streamlit/elements/spinner.py +14 -7
  86. streamlit/elements/text.py +1 -1
  87. streamlit/elements/toast.py +1 -1
  88. streamlit/elements/vega_charts.py +20 -6
  89. streamlit/elements/widgets/__init__.py +1 -1
  90. streamlit/elements/widgets/audio_input.py +1 -1
  91. streamlit/elements/widgets/button.py +9 -8
  92. streamlit/elements/widgets/button_group.py +6 -4
  93. streamlit/elements/widgets/camera_input.py +1 -1
  94. streamlit/elements/widgets/chat.py +1 -1
  95. streamlit/elements/widgets/checkbox.py +1 -1
  96. streamlit/elements/widgets/color_picker.py +1 -1
  97. streamlit/elements/widgets/data_editor.py +6 -5
  98. streamlit/elements/widgets/file_uploader.py +1 -1
  99. streamlit/elements/widgets/multiselect.py +1 -1
  100. streamlit/elements/widgets/number_input.py +1 -1
  101. streamlit/elements/widgets/radio.py +1 -1
  102. streamlit/elements/widgets/select_slider.py +1 -1
  103. streamlit/elements/widgets/selectbox.py +1 -1
  104. streamlit/elements/widgets/slider.py +1 -1
  105. streamlit/elements/widgets/text_widgets.py +1 -1
  106. streamlit/elements/widgets/time_widgets.py +63 -3
  107. streamlit/elements/write.py +2 -2
  108. streamlit/emojis.py +2 -2
  109. streamlit/env_util.py +1 -1
  110. streamlit/error_util.py +9 -3
  111. streamlit/errors.py +5 -1
  112. streamlit/external/__init__.py +1 -1
  113. streamlit/external/langchain/__init__.py +1 -1
  114. streamlit/external/langchain/streamlit_callback_handler.py +1 -1
  115. streamlit/file_util.py +1 -1
  116. streamlit/git_util.py +1 -1
  117. streamlit/hello/__init__.py +1 -1
  118. streamlit/hello/animation_demo.py +1 -1
  119. streamlit/hello/dataframe_demo.py +1 -1
  120. streamlit/hello/hello.py +1 -1
  121. streamlit/hello/mapping_demo.py +1 -1
  122. streamlit/hello/plotting_demo.py +1 -1
  123. streamlit/hello/streamlit_app.py +1 -1
  124. streamlit/hello/utils.py +1 -1
  125. streamlit/logger.py +1 -1
  126. streamlit/material_icon_names.py +2 -2
  127. streamlit/navigation/__init__.py +1 -1
  128. streamlit/navigation/page.py +7 -4
  129. streamlit/net_util.py +1 -1
  130. streamlit/platform.py +1 -1
  131. streamlit/proto/Alert_pb2.pyi +1 -1
  132. streamlit/proto/AppPage_pb2.pyi +1 -1
  133. streamlit/proto/ArrowNamedDataSet_pb2.pyi +1 -1
  134. streamlit/proto/ArrowVegaLiteChart_pb2.pyi +1 -1
  135. streamlit/proto/Arrow_pb2.pyi +1 -1
  136. streamlit/proto/AudioInput_pb2.pyi +1 -1
  137. streamlit/proto/Audio_pb2.pyi +1 -1
  138. streamlit/proto/AuthRedirect_pb2.py +27 -0
  139. streamlit/proto/AuthRedirect_pb2.pyi +41 -0
  140. streamlit/proto/AutoRerun_pb2.pyi +1 -1
  141. streamlit/proto/BackMsg_pb2.pyi +1 -1
  142. streamlit/proto/Balloons_pb2.pyi +1 -1
  143. streamlit/proto/Block_pb2.pyi +1 -1
  144. streamlit/proto/BokehChart_pb2.pyi +1 -1
  145. streamlit/proto/ButtonGroup_pb2.pyi +1 -1
  146. streamlit/proto/Button_pb2.pyi +1 -1
  147. streamlit/proto/CameraInput_pb2.pyi +1 -1
  148. streamlit/proto/ChatInput_pb2.pyi +1 -1
  149. streamlit/proto/Checkbox_pb2.pyi +1 -1
  150. streamlit/proto/ClientState_pb2.pyi +1 -1
  151. streamlit/proto/Code_pb2.py +2 -2
  152. streamlit/proto/Code_pb2.pyi +5 -2
  153. streamlit/proto/ColorPicker_pb2.pyi +1 -1
  154. streamlit/proto/Common_pb2.pyi +1 -1
  155. streamlit/proto/Components_pb2.pyi +1 -1
  156. streamlit/proto/DataFrame_pb2.pyi +1 -1
  157. streamlit/proto/DateInput_pb2.pyi +1 -1
  158. streamlit/proto/DeckGlJsonChart_pb2.pyi +1 -1
  159. streamlit/proto/Delta_pb2.pyi +1 -1
  160. streamlit/proto/DocString_pb2.pyi +1 -1
  161. streamlit/proto/DownloadButton_pb2.pyi +1 -1
  162. streamlit/proto/Element_pb2.pyi +1 -1
  163. streamlit/proto/Empty_pb2.pyi +1 -1
  164. streamlit/proto/Exception_pb2.pyi +1 -1
  165. streamlit/proto/Favicon_pb2.pyi +1 -1
  166. streamlit/proto/FileUploader_pb2.pyi +1 -1
  167. streamlit/proto/ForwardMsg_pb2.py +12 -9
  168. streamlit/proto/ForwardMsg_pb2.pyi +34 -4
  169. streamlit/proto/GitInfo_pb2.pyi +1 -1
  170. streamlit/proto/GraphVizChart_pb2.pyi +1 -1
  171. streamlit/proto/Heading_pb2.pyi +1 -1
  172. streamlit/proto/Html_pb2.pyi +1 -1
  173. streamlit/proto/IFrame_pb2.pyi +1 -1
  174. streamlit/proto/Image_pb2.pyi +1 -1
  175. streamlit/proto/Json_pb2.pyi +1 -1
  176. streamlit/proto/LabelVisibilityMessage_pb2.pyi +1 -1
  177. streamlit/proto/LinkButton_pb2.pyi +1 -1
  178. streamlit/proto/Logo_pb2.pyi +1 -1
  179. streamlit/proto/Markdown_pb2.pyi +1 -1
  180. streamlit/proto/Metric_pb2.pyi +1 -1
  181. streamlit/proto/MetricsEvent_pb2.pyi +1 -1
  182. streamlit/proto/MultiSelect_pb2.pyi +1 -1
  183. streamlit/proto/NamedDataSet_pb2.pyi +1 -1
  184. streamlit/proto/Navigation_pb2.pyi +1 -1
  185. streamlit/proto/NewSession_pb2.pyi +1 -1
  186. streamlit/proto/NumberInput_pb2.pyi +1 -1
  187. streamlit/proto/PageConfig_pb2.pyi +1 -1
  188. streamlit/proto/PageInfo_pb2.pyi +1 -1
  189. streamlit/proto/PageLink_pb2.pyi +1 -1
  190. streamlit/proto/PageNotFound_pb2.pyi +1 -1
  191. streamlit/proto/PageProfile_pb2.pyi +1 -1
  192. streamlit/proto/PagesChanged_pb2.pyi +1 -1
  193. streamlit/proto/ParentMessage_pb2.pyi +1 -1
  194. streamlit/proto/PlotlyChart_pb2.pyi +1 -1
  195. streamlit/proto/Progress_pb2.pyi +1 -1
  196. streamlit/proto/Radio_pb2.pyi +1 -1
  197. streamlit/proto/RootContainer_pb2.pyi +1 -1
  198. streamlit/proto/Selectbox_pb2.pyi +1 -1
  199. streamlit/proto/SessionEvent_pb2.pyi +1 -1
  200. streamlit/proto/SessionStatus_pb2.pyi +1 -1
  201. streamlit/proto/Skeleton_pb2.pyi +1 -1
  202. streamlit/proto/Slider_pb2.pyi +1 -1
  203. streamlit/proto/Snow_pb2.pyi +1 -1
  204. streamlit/proto/Spinner_pb2.py +2 -2
  205. streamlit/proto/Spinner_pb2.pyi +6 -2
  206. streamlit/proto/TextArea_pb2.pyi +1 -1
  207. streamlit/proto/TextInput_pb2.pyi +1 -1
  208. streamlit/proto/Text_pb2.pyi +1 -1
  209. streamlit/proto/TimeInput_pb2.pyi +1 -1
  210. streamlit/proto/Toast_pb2.pyi +1 -1
  211. streamlit/proto/VegaLiteChart_pb2.pyi +1 -1
  212. streamlit/proto/Video_pb2.pyi +1 -1
  213. streamlit/proto/WidgetStates_pb2.pyi +1 -1
  214. streamlit/proto/__init__.py +1 -1
  215. streamlit/runtime/__init__.py +1 -1
  216. streamlit/runtime/app_session.py +29 -5
  217. streamlit/runtime/caching/__init__.py +1 -1
  218. streamlit/runtime/caching/cache_data_api.py +3 -3
  219. streamlit/runtime/caching/cache_errors.py +1 -1
  220. streamlit/runtime/caching/cache_resource_api.py +1 -1
  221. streamlit/runtime/caching/cache_type.py +1 -1
  222. streamlit/runtime/caching/cache_utils.py +5 -4
  223. streamlit/runtime/caching/cached_message_replay.py +1 -1
  224. streamlit/runtime/caching/hashing.py +1 -1
  225. streamlit/runtime/caching/legacy_cache_api.py +1 -1
  226. streamlit/runtime/caching/storage/__init__.py +1 -1
  227. streamlit/runtime/caching/storage/cache_storage_protocol.py +1 -1
  228. streamlit/runtime/caching/storage/dummy_cache_storage.py +1 -1
  229. streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py +1 -1
  230. streamlit/runtime/caching/storage/local_disk_cache_storage.py +5 -5
  231. streamlit/runtime/connection_factory.py +1 -1
  232. streamlit/runtime/context.py +1 -1
  233. streamlit/runtime/credentials.py +5 -5
  234. streamlit/runtime/forward_msg_cache.py +4 -2
  235. streamlit/runtime/forward_msg_queue.py +33 -5
  236. streamlit/runtime/fragment.py +2 -2
  237. streamlit/runtime/media_file_manager.py +1 -1
  238. streamlit/runtime/media_file_storage.py +1 -1
  239. streamlit/runtime/memory_media_file_storage.py +1 -1
  240. streamlit/runtime/memory_session_storage.py +1 -1
  241. streamlit/runtime/memory_uploaded_file_manager.py +1 -1
  242. streamlit/runtime/metrics_util.py +2 -1
  243. streamlit/runtime/pages_manager.py +4 -2
  244. streamlit/runtime/runtime.py +22 -6
  245. streamlit/runtime/runtime_util.py +1 -1
  246. streamlit/runtime/script_data.py +1 -1
  247. streamlit/runtime/scriptrunner/__init__.py +1 -1
  248. streamlit/runtime/scriptrunner/exec_code.py +34 -1
  249. streamlit/runtime/scriptrunner/magic.py +1 -1
  250. streamlit/runtime/scriptrunner/magic_funcs.py +1 -1
  251. streamlit/runtime/scriptrunner/script_cache.py +1 -1
  252. streamlit/runtime/scriptrunner/script_runner.py +23 -12
  253. streamlit/runtime/scriptrunner_utils/__init__.py +1 -1
  254. streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
  255. streamlit/runtime/scriptrunner_utils/script_requests.py +2 -1
  256. streamlit/runtime/scriptrunner_utils/script_run_context.py +2 -2
  257. streamlit/runtime/secrets.py +1 -1
  258. streamlit/runtime/session_manager.py +2 -2
  259. streamlit/runtime/state/__init__.py +1 -1
  260. streamlit/runtime/state/common.py +1 -1
  261. streamlit/runtime/state/query_params.py +2 -2
  262. streamlit/runtime/state/query_params_proxy.py +15 -5
  263. streamlit/runtime/state/safe_session_state.py +1 -1
  264. streamlit/runtime/state/session_state.py +1 -1
  265. streamlit/runtime/state/session_state_proxy.py +1 -1
  266. streamlit/runtime/state/widgets.py +1 -1
  267. streamlit/runtime/stats.py +1 -1
  268. streamlit/runtime/uploaded_file_manager.py +1 -1
  269. streamlit/runtime/websocket_session_manager.py +2 -2
  270. streamlit/source_util.py +1 -1
  271. streamlit/static/index.html +3 -3
  272. streamlit/static/static/css/index.mUTQuMqR.css +1 -0
  273. streamlit/static/static/js/{FileDownload.esm.WslOojMp.js → FileDownload.esm.C1QvS8Zm.js} +1 -1
  274. streamlit/static/static/js/{FormClearHelper.DSgVZ-NK.js → FormClearHelper.mT4-5rFn.js} +1 -1
  275. streamlit/static/static/js/{Hooks.wzeYp0oD.js → Hooks.CVNEuaGG.js} +1 -1
  276. streamlit/static/static/js/InputInstructions.BCvAGBeC.js +1 -0
  277. streamlit/static/static/js/{ProgressBar.D1he2Gib.js → ProgressBar.CcQcYD9u.js} +2 -2
  278. streamlit/static/static/js/RenderInPortalIfExists.DHDG9PHn.js +1 -0
  279. streamlit/static/static/js/Toolbar.yTE_O6B7.js +1 -0
  280. streamlit/static/static/js/{base-input.gDrmzpbY.js → base-input.CQPY9_oN.js} +4 -4
  281. streamlit/static/static/js/createSuper.DE47Tkz4.js +1 -0
  282. streamlit/static/static/js/data-grid-overlay-editor.5JEQwfzp.js +1 -0
  283. streamlit/static/static/js/{downloader.B-SkHjg2.js → downloader.CX7_KkfB.js} +1 -1
  284. streamlit/static/static/js/{es6.DoVDVSd_.js → es6.Be2vwxoI.js} +2 -2
  285. streamlit/static/static/js/{iframeResizer.contentWindow.Exq_q4jU.js → iframeResizer.contentWindow.CFHofqC-.js} +1 -1
  286. streamlit/static/static/js/index.0OeiPvr3.js +1 -0
  287. streamlit/static/static/js/index.1GBg_Cdb.js +1 -0
  288. streamlit/static/static/js/index.4nNgvhbk.js +4 -0
  289. streamlit/static/static/js/index.5F9_LJ-9.js +1 -0
  290. streamlit/static/static/js/index.6v5ZgUAy.js +1 -0
  291. streamlit/static/static/js/index.8tVXPrLX.js +1 -0
  292. streamlit/static/static/js/index.AExANgn1.js +1 -0
  293. streamlit/static/static/js/index.AXOgS1NM.js +1 -0
  294. streamlit/static/static/js/index.B-xzXPZE.js +3 -0
  295. streamlit/static/static/js/index.B0pfFJGU.js +1 -0
  296. streamlit/static/static/js/index.BBjf7kH1.js +1 -0
  297. streamlit/static/static/js/index.BGICDmL0.js +201 -0
  298. streamlit/static/static/js/{index.rDDlhQFp.js → index.BOeLQ18h.js} +1 -1
  299. streamlit/static/static/js/index.BUgJRfqp.js +3 -0
  300. streamlit/static/static/js/index.BpeIAypN.js +1 -0
  301. streamlit/static/static/js/{index.BjQJsYG6.js → index.C0ZNaKGF.js} +1 -1
  302. streamlit/static/static/js/index.C3eR9AQ5.js +1 -0
  303. streamlit/static/static/js/index.CCmrDm8Z.js +2 -0
  304. streamlit/static/static/js/index.CHuo89tL.js +1 -0
  305. streamlit/static/static/js/index.Cbi_d9ak.js +197 -0
  306. streamlit/static/static/js/{index.CyRDf6c5.js → index.Cg7T4wJt.js} +3 -3
  307. streamlit/static/static/js/index.Ci3iebpl.js +1 -0
  308. streamlit/static/static/js/index.CjsaBedq.js +1 -0
  309. streamlit/static/static/js/{index.CLHVvMN0.js → index.CvqaNor_.js} +139 -128
  310. streamlit/static/static/js/index.D0lxtOCO.js +2 -0
  311. streamlit/static/static/js/index.D1AD4NsW.js +1 -0
  312. streamlit/static/static/js/{index.4lqQPLdu.js → index.DLjk_wlB.js} +1 -1
  313. streamlit/static/static/js/{index.DfwGDOWW.js → index.DNDhYAPI.js} +2 -2
  314. streamlit/static/static/js/index.DY6666R7.js +1 -0
  315. streamlit/static/static/js/{index.DaTKmBKa.js → index.Dkr_c_9x.js} +100 -100
  316. streamlit/static/static/js/{index.Bcz23DKe.js → index.Hhv6gSq2.js} +12 -12
  317. streamlit/static/static/js/{index.Bm2n8u7I.js → index.OM83ZHKg.js} +2 -2
  318. streamlit/static/static/js/index.SLleoa9s.js +1 -0
  319. streamlit/static/static/js/{index.2Rr5kbVL.js → index.XCwDes79.js} +1 -1
  320. streamlit/static/static/js/{index.B_RzfO7U.js → index.a6pesEXT.js} +1 -1
  321. streamlit/static/static/js/{index.CAkYXoVB.js → index.er3Zfn3e.js} +2 -2
  322. streamlit/static/static/js/{index.CZ-znj8N.js → index.mtSGfsND.js} +1 -1
  323. streamlit/static/static/js/{input.28wXD4uV.js → input.B07wSbwn.js} +2 -2
  324. streamlit/static/static/js/{memory.jbWyoc5k.js → memory.CC_p93jh.js} +1 -1
  325. streamlit/static/static/js/mergeWith.ivc75cD1.js +1 -0
  326. streamlit/static/static/js/number-overlay-editor.Db2Be6nq.js +9 -0
  327. streamlit/static/static/js/possibleConstructorReturn.BNprLGNF.js +1 -0
  328. streamlit/static/static/js/{sandbox.CfK9-cKf.js → sandbox.BlG3HhHL.js} +1 -1
  329. streamlit/static/static/js/{textarea.C5OZk1uL.js → textarea.Bz6Z-kmO.js} +2 -2
  330. streamlit/static/static/js/threshold.B8r8f5kt.js +1 -0
  331. streamlit/static/static/js/{timepicker.DEpQEk7W.js → timepicker.BMSb5NlP.js} +3 -3
  332. streamlit/static/static/js/timer.RueuYoQV.js +1 -0
  333. streamlit/static/static/js/toConsumableArray.uYLXBIlD.js +3 -0
  334. streamlit/static/static/js/uniqueId.BdisvZXg.js +1 -0
  335. streamlit/static/static/js/{useBasicWidgetState.C2DsWpWi.js → useBasicWidgetState.BJFGEQDL.js} +1 -1
  336. streamlit/static/static/js/{useOnInputChange.Bw6YkmJD.js → useOnInputChange.BmSN_ACz.js} +1 -1
  337. streamlit/static/static/js/value.iufjd77T.js +1 -0
  338. streamlit/static/static/js/withFullScreenWrapper.CbOOMX5j.js +1 -0
  339. streamlit/static/static/media/MaterialSymbols-Rounded.DzyB5T7Y.woff2 +0 -0
  340. streamlit/string_util.py +1 -1
  341. streamlit/temporary_directory.py +1 -1
  342. streamlit/testing/__init__.py +1 -1
  343. streamlit/testing/v1/__init__.py +1 -1
  344. streamlit/testing/v1/app_test.py +1 -1
  345. streamlit/testing/v1/element_tree.py +1 -1
  346. streamlit/testing/v1/local_script_runner.py +1 -1
  347. streamlit/testing/v1/util.py +1 -1
  348. streamlit/time_util.py +1 -1
  349. streamlit/type_util.py +2 -2
  350. streamlit/url_util.py +24 -1
  351. streamlit/user_info.py +445 -25
  352. streamlit/util.py +1 -1
  353. streamlit/version.py +1 -1
  354. streamlit/watcher/__init__.py +1 -1
  355. streamlit/watcher/event_based_path_watcher.py +1 -1
  356. streamlit/watcher/folder_black_list.py +1 -1
  357. streamlit/watcher/local_sources_watcher.py +5 -3
  358. streamlit/watcher/path_watcher.py +1 -1
  359. streamlit/watcher/polling_path_watcher.py +1 -1
  360. streamlit/watcher/util.py +87 -21
  361. streamlit/web/__init__.py +1 -1
  362. streamlit/web/bootstrap.py +22 -2
  363. streamlit/web/cache_storage_manager_config.py +1 -1
  364. streamlit/web/cli.py +1 -1
  365. streamlit/web/server/__init__.py +1 -1
  366. streamlit/web/server/app_static_file_handler.py +1 -1
  367. streamlit/web/server/authlib_tornado_integration.py +58 -0
  368. streamlit/web/server/browser_websocket_handler.py +73 -7
  369. streamlit/web/server/component_request_handler.py +1 -1
  370. streamlit/web/server/media_file_handler.py +1 -1
  371. streamlit/web/server/oauth_authlib_routes.py +176 -0
  372. streamlit/web/server/oidc_mixin.py +108 -0
  373. streamlit/web/server/routes.py +6 -4
  374. streamlit/web/server/server.py +41 -4
  375. streamlit/web/server/server_util.py +25 -1
  376. streamlit/web/server/stats_request_handler.py +1 -1
  377. streamlit/web/server/upload_file_request_handler.py +3 -2
  378. streamlit/web/server/websocket_headers.py +1 -1
  379. {streamlit_nightly-1.41.2.dev20241227.data → streamlit_nightly-1.41.2.dev20250124.data}/scripts/streamlit.cmd +1 -1
  380. {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/METADATA +16 -4
  381. streamlit_nightly-1.41.2.dev20250124.dist-info/RECORD +560 -0
  382. {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/WHEEL +1 -1
  383. streamlit/static/static/css/index.ZIJkhegp.css +0 -1
  384. streamlit/static/static/js/InputInstructions.DpTmOmkP.js +0 -1
  385. streamlit/static/static/js/RenderInPortalIfExists.CphMKHZ_.js +0 -1
  386. streamlit/static/static/js/Toolbar.YZjXpW2P.js +0 -1
  387. streamlit/static/static/js/_commonjs-dynamic-modules.TDtrdbi3.js +0 -1
  388. streamlit/static/static/js/createSuper.Cj3WfXha.js +0 -1
  389. streamlit/static/static/js/data-grid-overlay-editor.CXW3Vrt9.js +0 -1
  390. streamlit/static/static/js/getPrototypeOf.BZAK2f3t.js +0 -1
  391. streamlit/static/static/js/index.1auHKWgw.js +0 -3
  392. streamlit/static/static/js/index.2XFKVtzu.js +0 -1
  393. streamlit/static/static/js/index.B9O1l5Yf.js +0 -32
  394. streamlit/static/static/js/index.BjtDBCFh.js +0 -2
  395. streamlit/static/static/js/index.Bp-uIPRI.js +0 -1
  396. streamlit/static/static/js/index.BrGYP4fV.js +0 -1
  397. streamlit/static/static/js/index.BwUmNKlx.js +0 -1
  398. streamlit/static/static/js/index.CCVCD0op.js +0 -1
  399. streamlit/static/static/js/index.CP7C0jmi.js +0 -1
  400. streamlit/static/static/js/index.CVNaQiWI.js +0 -4
  401. streamlit/static/static/js/index.CX7qwffH.js +0 -1
  402. streamlit/static/static/js/index.CaCnIXu_.js +0 -1
  403. streamlit/static/static/js/index.Ck6XWYeb.js +0 -1
  404. streamlit/static/static/js/index.CmD2DSvp.js +0 -201
  405. streamlit/static/static/js/index.CnX4MRBV.js +0 -1
  406. streamlit/static/static/js/index.DR8k91Kp.js +0 -1
  407. streamlit/static/static/js/index.Dc0EFNHf.js +0 -197
  408. streamlit/static/static/js/index.M9USxdKN.js +0 -1
  409. streamlit/static/static/js/index.MCDV8ab_.js +0 -1
  410. streamlit/static/static/js/index.T4c5nSGV.js +0 -2
  411. streamlit/static/static/js/index.brVZtr01.js +0 -1
  412. streamlit/static/static/js/index.fm1fEqFi.js +0 -1
  413. streamlit/static/static/js/index.vm3Bds7I.js +0 -1
  414. streamlit/static/static/js/index.y_EIxzAg.js +0 -1
  415. streamlit/static/static/js/number-overlay-editor.D5dgP2YW.js +0 -9
  416. streamlit/static/static/js/slicedToArray.DVgs1NsC.js +0 -2
  417. streamlit/static/static/js/string.Bl9OLDCw.js +0 -1
  418. streamlit/static/static/js/threshold.skajmqVB.js +0 -1
  419. streamlit/static/static/js/timer.DwZfkapc.js +0 -1
  420. streamlit/static/static/js/uniqueId.OJw6SDpp.js +0 -1
  421. streamlit/static/static/js/withFullScreenWrapper.BjS0eA06.js +0 -1
  422. streamlit/static/static/media/MaterialSymbols-Rounded.MYSe4dsi.woff2 +0 -0
  423. streamlit/vendor/ipython/__init__.py +0 -0
  424. streamlit/vendor/ipython/modified_sys_path.py +0 -67
  425. streamlit_nightly-1.41.2.dev20241227.dist-info/RECORD +0 -556
  426. /streamlit/static/static/css/{index.B26BQfSF.css → index.Bmkmz40k.css} +0 -0
  427. /streamlit/static/static/css/{index.CG16XVnL.css → index.DzuxGC_t.css} +0 -0
  428. {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/entry_points.txt +0 -0
  429. {streamlit_nightly-1.41.2.dev20241227.dist-info → streamlit_nightly-1.41.2.dev20250124.dist-info}/top_level.txt +0 -0
@@ -1,3 +1,3 @@
1
- import{b2 as P,bc as me,b3 as R,r as u,M as ve,a7 as oe,j as O,b7 as ye,a$ as $e,aK as Re,b0 as Oe,a1 as ie,a_ as _e}from"./index.CLHVvMN0.js";import{a as Pe}from"./useBasicWidgetState.C2DsWpWi.js";import"./FormClearHelper.DSgVZ-NK.js";var ae={vertical:"vertical",horizontal:"horizontal"};function se(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 B(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?se(Object(n),!0).forEach(function(r){_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I=0,L=1,T=2;function C(e){return e.$isActive?T:e.$isHovered?L:I}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(C(e)){case I:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(C(e)){case I: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 Se(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(C(e)){case I:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(C(e)){case I:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Me(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 _({},"padding".concat(o),s)}function ke(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var K=P("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"}});K.displayName="RadioGroupRoot";K.displayName="RadioGroupRoot";var J=P("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",b=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},_(t,"margin".concat(b),c?a.scale200:null),_(t,"marginBottom",r&&!c?null:a.scale200),t});J.displayName="Root";J.displayName="Root";var Q=P("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:Se(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}});Q.displayName="RadioMarkInner";Q.displayName="RadioMarkInner";var Y=P("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}});Y.displayName="RadioMarkOuter";Y.displayName="RadioMarkOuter";var Z=P("div",function(e){var t=e.$theme.typography;return B(B({verticalAlign:"middle"},Me(e)),{},{color:ke(e)},t.LabelMedium)});Z.displayName="Label";Z.displayName="Label";var ee=P("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"});ee.displayName="Input";ee.displayName="Input";var te=P("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 B(B({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},_(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),_(t,"margin".concat(s),o?n.sizing.scale200:null),_(t,"maxWidth","240px"),t))});te.displayName="Description";te.displayName="Description";function U(e){"@babel/helpers - typeof";return U=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},U(e)}function G(){return G=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},G.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 le(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 le(e,t)}}function le(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 Le(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 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 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&&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&&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 Be(e){var t=ze();return function(){var r=z(e),o;if(t){var i=z(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ce(this,o)}}function Ce(e,t){if(t&&(U(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}function x(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 z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(e)}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ce=function(e){De(n,e);var t=Be(n);function n(){var r;Ae(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)),D(x(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),D(x(r),"handleFocus",function(a,c){me(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),D(x(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 xe(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=R(s.RadioGroupRoot,K),c=Fe(a,2),b=c[0],m=c[1];return u.createElement(b,G({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},m),u.Children.map(this.props.children,function(p,f){if(!u.isValidElement(p))return null;var l=o.props.value===p.props.value;return u.cloneElement(p,{align:o.props.align,autoFocus:o.props.autoFocus,checked:l,disabled:o.props.disabled||p.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===f,isFocusVisible:o.state.isFocusVisible,tabIndex:f===0&&!o.props.value||l?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(h){return o.handleBlur(h,f)},onFocus:function(h){return o.handleFocus(h,f)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);D(ce,"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 q(e){"@babel/helpers - typeof";return q=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},q(e)}function $(){return $=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},$.apply(this,arguments)}function k(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 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 Ve(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 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 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 qe(e,t,n){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&&X(e,t)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},X(e,t)}function Ke(e){var t=Qe();return function(){var r=H(e),o;if(t){var i=H(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Je(this,o)}}function Je(e,t){if(t&&(q(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(e)}function F(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 H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},H(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e){return e==="top"||e==="left"}function Ze(e){return e==="bottom"||e==="right"}var et=function(t){return t.stopPropagation()},pe=function(e){Xe(n,e);var t=Ke(n);function n(){var r;Ge(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)),E(F(r),"state",{isActive:!1,isHovered:!1}),E(F(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),E(F(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),E(F(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),E(F(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return qe(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=R(i.Root,J),a=k(s,2),c=a[0],b=a[1],m=R(i.Label,Z),p=k(m,2),f=p[0],l=p[1],d=R(i.Input,ee),h=k(d,2),N=h[0],w=h[1],A=R(i.Description,te),j=k(A,2),S=j[0],V=j[1],v=R(i.RadioMarkInner,Q),g=k(v,2),y=g[0],fe=g[1],de=R(i.RadioMarkOuter,Y),re=k(de,2),he=re[0],be=re[1],M={$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},ne=u.createElement(f,$({},M,l),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,$({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},M,b),Ye(this.props.labelPlacement)&&ne,u.createElement(he,$({},M,be),u.createElement(y,$({},M,fe))),u.createElement(N,$({"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},M,w)),Ze(this.props.labelPlacement)&&ne),!!this.props.description&&u.createElement(S,$({},M,V),this.props.description))}}]),n}(u.Component);E(pe,"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,width:n,value:r,onChange:o,options:i,captions:s,label:a,labelVisibility:c,help:b}){const[m,p]=u.useState(r??null);u.useEffect(()=>{r!==m&&p(r??null)},[r]);const f=u.useCallback(v=>{const g=parseInt(v.target.value,10);p(g),o(g)},[o]),l=ve(),{colors:d,radii:h}=l,N={width:n},w=s.length>0,A=i.length>0,j=A?i:["No options to select."],S=e||!A,V=v=>v==""&&t&&w?"&nbsp;":v;return oe("div",{className:"stRadio","data-testid":"stRadio",style:N,children:[O(Oe,{label:a,disabled:S,labelVisibility:c,children:b&&O(ye,{children:O($e,{content:b,placement:Re.TOP_RIGHT})})}),O(ce,{onChange:f,value:m!==null?m.toString():void 0,disabled:S,align:t?ae.horizontal:ae.vertical,"aria-label":a,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:w?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:j.map((v,g)=>oe(pe,{value:g.toString(),overrides:{Root:{style:({$isFocusVisible:y})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:w?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:y?d.darkenedBgMix25:"",borderTopLeftRadius:h.md,borderTopRightRadius:h.md,borderBottomLeftRadius:h.md,borderBottomRightRadius:h.md})},RadioMarkOuter:{style:({$checked:y})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:y&&!S?d.primary:d.fadedText40})},RadioMarkInner:{style:({$checked:y})=>({height:y?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`,width:y?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`})},Label:{style:{color:S?d.fadedText40:d.bodyText,position:"relative",top:l.spacing.px}}},children:[O(ie,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),w&&O(ie,{source:V(s[g]),allowHTML:!1,isCaption:!0,isLabel:!0})]},g))})]})}const rt=u.memo(tt);function nt({disabled:e,element:t,widgetMgr:n,width:r,fragmentId:o}){const[i,s]=Pe({getStateFromWidgetMgr:ot,getDefaultStateFromProto:it,getCurrStateFromProto:at,updateWidgetMgrState:st,element:t,widgetMgr:n,fragmentId:o}),a=u.useCallback(d=>{s({value:d,fromUi:!0})},[s]),{horizontal:c,options:b,captions:m,label:p,labelVisibility:f,help:l}=t;return O(rt,{label:p,onChange:a,options:b,captions:m,width:r,disabled:e,horizontal:c,labelVisibility:_e(f==null?void 0:f.value),value:i??null,help:l})}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,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const ft=u.memo(nt);export{ft as default};
1
+ import{bx as P,bH as me,by as R,r as u,y as ve,z as oe,j as O,bC as ye,bu as $e,bd as Re,bv as Oe,aF as ie,bt as _e}from"./index.CvqaNor_.js";import{a as Pe}from"./useBasicWidgetState.BJFGEQDL.js";import"./FormClearHelper.mT4-5rFn.js";var ae={vertical:"vertical",horizontal:"horizontal"};function se(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 B(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?se(Object(n),!0).forEach(function(r){_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I=0,L=1,T=2;function C(e){return e.$isActive?T:e.$isHovered?L:I}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(C(e)){case I:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(C(e)){case I: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 Se(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(C(e)){case I:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(C(e)){case I:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Me(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 _({},"padding".concat(o),s)}function ke(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var K=P("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"}});K.displayName="RadioGroupRoot";K.displayName="RadioGroupRoot";var J=P("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",b=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},_(t,"margin".concat(b),c?a.scale200:null),_(t,"marginBottom",r&&!c?null:a.scale200),t});J.displayName="Root";J.displayName="Root";var Q=P("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:Se(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}});Q.displayName="RadioMarkInner";Q.displayName="RadioMarkInner";var Y=P("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}});Y.displayName="RadioMarkOuter";Y.displayName="RadioMarkOuter";var Z=P("div",function(e){var t=e.$theme.typography;return B(B({verticalAlign:"middle"},Me(e)),{},{color:ke(e)},t.LabelMedium)});Z.displayName="Label";Z.displayName="Label";var ee=P("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"});ee.displayName="Input";ee.displayName="Input";var te=P("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 B(B({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},_(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),_(t,"margin".concat(s),o?n.sizing.scale200:null),_(t,"maxWidth","240px"),t))});te.displayName="Description";te.displayName="Description";function U(e){"@babel/helpers - typeof";return U=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},U(e)}function G(){return G=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},G.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 le(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 le(e,t)}}function le(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 Le(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 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 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 je(e,t,n){return t&&xe(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&&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 Be(e){var t=ze();return function(){var r=z(e),o;if(t){var i=z(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ce(this,o)}}function Ce(e,t){if(t&&(U(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return j(e)}function j(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 z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z(e)}function D(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ce=function(e){De(n,e);var t=Be(n);function n(){var r;Ae(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)),D(j(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),D(j(r),"handleFocus",function(a,c){me(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),D(j(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 je(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=R(s.RadioGroupRoot,K),c=Fe(a,2),b=c[0],m=c[1];return u.createElement(b,G({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},m),u.Children.map(this.props.children,function(p,f){if(!u.isValidElement(p))return null;var l=o.props.value===p.props.value;return u.cloneElement(p,{align:o.props.align,autoFocus:o.props.autoFocus,checked:l,disabled:o.props.disabled||p.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===f,isFocusVisible:o.state.isFocusVisible,tabIndex:f===0&&!o.props.value||l?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(h){return o.handleBlur(h,f)},onFocus:function(h){return o.handleFocus(h,f)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);D(ce,"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 q(e){"@babel/helpers - typeof";return q=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},q(e)}function $(){return $=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},$.apply(this,arguments)}function k(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 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 Ve(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 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 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 qe(e,t,n){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&&X(e,t)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},X(e,t)}function Ke(e){var t=Qe();return function(){var r=H(e),o;if(t){var i=H(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Je(this,o)}}function Je(e,t){if(t&&(q(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(e)}function F(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 H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},H(e)}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e){return e==="top"||e==="left"}function Ze(e){return e==="bottom"||e==="right"}var et=function(t){return t.stopPropagation()},pe=function(e){Xe(n,e);var t=Ke(n);function n(){var r;Ge(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)),E(F(r),"state",{isActive:!1,isHovered:!1}),E(F(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),E(F(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),E(F(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),E(F(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return qe(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=R(i.Root,J),a=k(s,2),c=a[0],b=a[1],m=R(i.Label,Z),p=k(m,2),f=p[0],l=p[1],d=R(i.Input,ee),h=k(d,2),N=h[0],w=h[1],A=R(i.Description,te),x=k(A,2),S=x[0],V=x[1],v=R(i.RadioMarkInner,Q),g=k(v,2),y=g[0],fe=g[1],de=R(i.RadioMarkOuter,Y),re=k(de,2),he=re[0],be=re[1],M={$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},ne=u.createElement(f,$({},M,l),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,$({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},M,b),Ye(this.props.labelPlacement)&&ne,u.createElement(he,$({},M,be),u.createElement(y,$({},M,fe))),u.createElement(N,$({"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},M,w)),Ze(this.props.labelPlacement)&&ne),!!this.props.description&&u.createElement(S,$({},M,V),this.props.description))}}]),n}(u.Component);E(pe,"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,width:n,value:r,onChange:o,options:i,captions:s,label:a,labelVisibility:c,help:b}){const[m,p]=u.useState(r??null);u.useEffect(()=>{r!==m&&p(r??null)},[r]);const f=u.useCallback(v=>{const g=parseInt(v.target.value,10);p(g),o(g)},[o]),l=ve(),{colors:d,radii:h}=l,N={width:n},w=s.length>0,A=i.length>0,x=A?i:["No options to select."],S=e||!A,V=v=>v==""&&t&&w?"&nbsp;":v;return oe("div",{className:"stRadio","data-testid":"stRadio",style:N,children:[O(Oe,{label:a,disabled:S,labelVisibility:c,children:b&&O(ye,{children:O($e,{content:b,placement:Re.TOP_RIGHT})})}),O(ce,{onChange:f,value:m!==null?m.toString():void 0,disabled:S,align:t?ae.horizontal:ae.vertical,"aria-label":a,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:w?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:x.map((v,g)=>oe(pe,{value:g.toString(),overrides:{Root:{style:({$isFocusVisible:y})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:w?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:y?d.darkenedBgMix25:"",borderTopLeftRadius:h.md,borderTopRightRadius:h.md,borderBottomLeftRadius:h.md,borderBottomRightRadius:h.md})},RadioMarkOuter:{style:({$checked:y})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:y&&!S?d.primary:d.fadedText40})},RadioMarkInner:{style:({$checked:y})=>({height:y?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`,width:y?"37.5%":`calc(${l.sizes.checkbox} - ${l.spacing.threeXS})`})},Label:{style:{color:S?d.fadedText40:d.bodyText,position:"relative",top:l.spacing.px}}},children:[O(ie,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),w&&O(ie,{source:V(s[g]),allowHTML:!1,isCaption:!0,isLabel:!0})]},g))})]})}const rt=u.memo(tt);function nt({disabled:e,element:t,widgetMgr:n,width:r,fragmentId:o}){const[i,s]=Pe({getStateFromWidgetMgr:ot,getDefaultStateFromProto:it,getCurrStateFromProto:at,updateWidgetMgrState:st,element:t,widgetMgr:n,fragmentId:o}),a=u.useCallback(d=>{s({value:d,fromUi:!0})},[s]),{horizontal:c,options:b,captions:m,label:p,labelVisibility:f,help:l}=t;return O(rt,{label:p,onChange:a,options:b,captions:m,width:r,disabled:e,horizontal:c,labelVisibility:_e(f==null?void 0:f.value),value:i??null,help:l})}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,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const ft=u.memo(nt);export{ft as default};
@@ -0,0 +1 @@
1
+ import{r as i,E as L,_ as W,n as d,C as $,y as V,j as s,z as D,bq as K}from"./index.CvqaNor_.js";import{I as N}from"./InputInstructions.BCvAGBeC.js";import{i as _}from"./inputUtils.CQWz5UKz.js";import{T as j}from"./textarea.Bz6Z-kmO.js";import"./base-input.CQPY9_oN.js";var H=i.forwardRef(function(t,r){var c={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return i.createElement(L,W({iconAttrs:c,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),i.createElement("rect",{width:24,height:24,fill:"none"}),i.createElement("path",{d:"M3 5.51v3.71c0 .46.31.86.76.97L11 12l-7.24 1.81c-.45.11-.76.51-.76.97v3.71c0 .72.73 1.2 1.39.92l15.42-6.49c.82-.34.82-1.5 0-1.84L4.39 4.58C3.73 4.31 3 4.79 3 5.51z"}))});H.displayName="Send";const A=d("div",{target:"e1xgt8o30"})(({theme:t,width:r})=>({borderRadius:t.radii.chatInput,display:"flex",backgroundColor:t.colors.widgetBackgroundColor??t.colors.secondaryBg,width:`${r}px`})),M=d("div",{target:"e1xgt8o31"})(({theme:t})=>({backgroundColor:t.colors.transparent,position:"relative",flexGrow:1,borderRadius:t.radii.chatInput,display:"flex",alignItems:"center"})),F=d("button",{target:"e1xgt8o32"})(({theme:t,disabled:r,extended:c})=>{const u=$(t),[o,g]=u?[t.colors.gray60,t.colors.gray80]:[t.colors.gray80,t.colors.gray40];return{border:"none",backgroundColor:t.colors.transparent,borderTopRightRadius:c?"0":t.radii.chatInput,borderTopLeftRadius:c?t.radii.default:"0",borderBottomRightRadius:t.radii.chatInput,display:"inline-flex",alignItems:"center",justifyContent:"center",lineHeight:t.lineHeights.none,margin:t.spacing.none,padding:t.spacing.sm,color:r?o:g,pointerEvents:"auto","&:focus":{outline:"none"},":focus":{outline:"none"},"&:focus-visible":{backgroundColor:u?t.colors.gray10:t.colors.gray90},"&:hover":{color:t.colors.primary},"&:disabled, &:disabled:hover, &:disabled:active":{backgroundColor:t.colors.transparent,borderColor:t.colors.transparent,color:t.colors.gray}}}),G=d("div",{target:"e1xgt8o33"})({display:"flex",alignItems:"flex-end",height:"100%",position:"absolute",right:0,pointerEvents:"none"}),U=d("div",{target:"e1xgt8o34"})(({theme:t})=>({position:"absolute",bottom:"0px",right:`calc(${t.iconSizes.xl} + 2 * ${t.spacing.sm} + ${t.spacing.sm})`})),O=6.5,R=1;function Z({width:t,element:r,widgetMgr:c,fragmentId:u}){const o=V(),[g,h]=i.useState(!1),[p,f]=i.useState(r.default),[b,y]=i.useState(0),a=i.useRef(null),x=i.useRef({minHeight:0,maxHeight:0}),E=()=>{let e=0;const{current:n}=a;if(n){const l=n.placeholder;n.placeholder="",n.style.height="auto",e=n.scrollHeight,n.placeholder=l,n.style.height=""}return e},I=()=>{a.current&&a.current.focus(),p&&(c.setStringTriggerValue(r,p,{fromUi:!0},u),h(!1),f(""),y(0))},B=e=>{const{metaKey:n,ctrlKey:l,shiftKey:z}=e;_(e)&&!z&&!l&&!n&&(e.preventDefault(),I())},w=e=>{const{value:n}=e.target,{maxChars:l}=r;l!==0&&n.length>l||(h(n!==""),f(n),y(E()))};i.useEffect(()=>{if(r.setValue){r.setValue=!1;const e=r.value||"";f(e),h(e!=="")}},[r]),i.useEffect(()=>{if(a.current){const{offsetHeight:e}=a.current;x.current.minHeight=e,x.current.maxHeight=e*O}},[a]);const{disabled:C,placeholder:m,maxChars:T}=r,{minHeight:k,maxHeight:S}=x.current,v=b>0&&a.current?Math.abs(b-k)>R:!1;return s(A,{className:"stChatInput","data-testid":"stChatInput",width:t,children:D(M,{children:[s(j,{inputRef:a,value:p,placeholder:m,onChange:w,onKeyDown:B,"aria-label":m,disabled:C,rows:1,overrides:{Root:{style:{minHeight:o.sizes.minElementHeight,outline:"none",backgroundColor:o.colors.transparent,borderBottomLeftRadius:o.radii.chatInput,borderBottomRightRadius:o.radii.chatInput,borderTopLeftRadius:o.radii.chatInput,borderTopRightRadius:o.radii.chatInput,borderLeftWidth:o.sizes.borderWidth,borderRightWidth:o.sizes.borderWidth,borderTopWidth:o.sizes.borderWidth,borderBottomWidth:o.sizes.borderWidth,width:`${t}px`}},InputContainer:{style:{backgroundColor:o.colors.transparent}},Input:{props:{"data-testid":"stChatInputTextArea"},style:{lineHeight:o.lineHeights.inputWidget,backgroundColor:o.colors.transparent,resize:"none","::placeholder":{opacity:"0.7"},height:v?`${b+R}px`:"auto",maxHeight:S?`${S}px`:"none",paddingLeft:o.spacing.lg,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm,paddingRight:`calc(${o.iconSizes.xl} + 2 * ${o.spacing.sm} + ${o.spacing.sm})`}}}}),t>o.breakpoints.hideWidgetDetails&&s(U,{children:s(N,{dirty:g,value:p,maxLength:T,type:"chat",inForm:!1})}),s(G,{children:s(F,{onClick:I,disabled:!g||C,extended:v,"data-testid":"stChatInputSubmitButton",children:s(K,{content:H,size:"xl",color:"inherit"})})})]})})}export{Z as default};
@@ -0,0 +1 @@
1
+ import{R as m,aG as B,b9 as i,j as e,ba as h,br as p,b8 as w,bb as D}from"./index.CvqaNor_.js";import{c as k}from"./createDownloadLinkElement.DZMwyjvU.js";function R(n,a,t){return k({enforceDownloadInNewTab:t,url:n.buildMediaURL(a),filename:""})}function y(n){const{disabled:a,element:t,widgetMgr:s,width:l,endpoints:d,fragmentId:r}=n,c={width:l},{libConfig:{enforceDownloadInNewTab:u=!1}}=m.useContext(B);let o=i.SECONDARY;t.type==="primary"?o=i.PRIMARY:t.type==="tertiary"&&(o=i.TERTIARY);const f=()=>{s.setTriggerValue(t,{fromUi:!0},r),R(d,t.url,u).click()},b=t.help?l:!0;return e("div",{className:"stDownloadButton","data-testid":"stDownloadButton",style:c,children:e(h,{help:t.help,children:e(p,{kind:o,size:w.SMALL,disabled:a,onClick:f,fluidWidth:t.useContainerWidth?b:!1,children:e(D,{icon:t.icon,label:t.label})})})})}export{y as default};