streamlit 1.44.1__py3-none-any.whl → 1.45.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/__init__.py +5 -2
- streamlit/commands/execution_control.py +4 -0
- streamlit/commands/navigation.py +2 -1
- streamlit/components/types/base_custom_component.py +9 -0
- streamlit/components/v1/custom_component.py +21 -0
- streamlit/config.py +45 -47
- streamlit/config_util.py +1 -1
- streamlit/delta_generator.py +5 -1
- streamlit/deprecation_util.py +3 -3
- streamlit/elements/alert.py +83 -0
- streamlit/elements/exception.py +35 -6
- streamlit/elements/html.py +58 -6
- streamlit/elements/iframe.py +65 -0
- streamlit/elements/lib/built_in_chart_utils.py +47 -36
- streamlit/elements/lib/dicttools.py +2 -4
- streamlit/elements/lib/event_utils.py +7 -5
- streamlit/elements/lib/file_uploader_utils.py +8 -2
- streamlit/elements/lib/layout_utils.py +51 -0
- streamlit/elements/lib/options_selector_utils.py +26 -5
- streamlit/elements/lib/policies.py +1 -1
- streamlit/elements/markdown.py +1 -2
- streamlit/elements/toast.py +1 -1
- streamlit/elements/vega_charts.py +1 -1
- streamlit/elements/widgets/audio_input.py +0 -42
- streamlit/elements/widgets/button_group.py +42 -11
- streamlit/elements/widgets/chat.py +1 -1
- streamlit/elements/widgets/multiselect.py +211 -31
- streamlit/elements/widgets/number_input.py +31 -5
- streamlit/elements/widgets/selectbox.py +225 -42
- streamlit/elements/widgets/text_widgets.py +29 -4
- streamlit/elements/widgets/time_widgets.py +3 -2
- streamlit/elements/write.py +14 -4
- streamlit/env_util.py +4 -4
- streamlit/errors.py +15 -0
- streamlit/logger.py +1 -1
- streamlit/material_icon_names.py +1 -1
- streamlit/net_util.py +2 -2
- streamlit/proto/Alert_pb2.py +6 -5
- streamlit/proto/Alert_pb2.pyi +9 -1
- streamlit/proto/ClientState_pb2.py +4 -4
- streamlit/proto/ClientState_pb2.pyi +23 -3
- streamlit/proto/Components_pb2.py +10 -10
- streamlit/proto/Components_pb2.pyi +6 -1
- streamlit/proto/Exception_pb2.py +4 -3
- streamlit/proto/Exception_pb2.pyi +9 -1
- streamlit/proto/ForwardMsg_pb2.pyi +4 -7
- streamlit/proto/IFrame_pb2.py +3 -3
- streamlit/proto/IFrame_pb2.pyi +8 -2
- streamlit/proto/MetricsEvent_pb2.py +4 -4
- streamlit/proto/MetricsEvent_pb2.pyi +23 -11
- streamlit/proto/MultiSelect_pb2.py +4 -2
- streamlit/proto/MultiSelect_pb2.pyi +14 -2
- streamlit/proto/NewSession_pb2.py +4 -4
- streamlit/proto/NewSession_pb2.pyi +20 -2
- streamlit/proto/NumberInput_pb2.py +4 -4
- streamlit/proto/NumberInput_pb2.pyi +4 -1
- streamlit/proto/Selectbox_pb2.py +4 -2
- streamlit/proto/Selectbox_pb2.pyi +15 -2
- streamlit/proto/TextInput_pb2.py +4 -4
- streamlit/proto/TextInput_pb2.pyi +4 -1
- streamlit/proto/WidthConfig_pb2.py +27 -0
- streamlit/proto/WidthConfig_pb2.pyi +34 -0
- streamlit/runtime/app_session.py +20 -12
- streamlit/runtime/caching/cache_errors.py +1 -1
- streamlit/runtime/context.py +100 -0
- streamlit/runtime/context_util.py +49 -0
- streamlit/runtime/forward_msg_cache.py +35 -230
- streamlit/runtime/forward_msg_queue.py +41 -23
- streamlit/runtime/metrics_util.py +40 -6
- streamlit/runtime/runtime.py +2 -60
- streamlit/runtime/runtime_util.py +17 -16
- streamlit/runtime/scriptrunner/script_runner.py +12 -7
- streamlit/runtime/scriptrunner_utils/script_requests.py +3 -0
- streamlit/runtime/scriptrunner_utils/script_run_context.py +25 -3
- streamlit/runtime/session_manager.py +5 -6
- streamlit/runtime/state/session_state_proxy.py +2 -2
- streamlit/static/index.html +2 -2
- streamlit/static/static/css/{index.BOl9eq08.css → index.DqDwtg6_.css} +1 -1
- streamlit/static/static/js/ErrorOutline.esm.DU9IrB3M.js +1 -0
- streamlit/static/static/js/{FileDownload.esm.urHTnoG1.js → FileDownload.esm.P9rKwKo8.js} +1 -1
- streamlit/static/static/js/{FileHelper.C9xUPdMQ.js → FileHelper.D7RMkx0e.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.B56TOIUD.js → FormClearHelper.B67tgll0.js} +1 -1
- streamlit/static/static/js/{Hooks.CmfGcI8T.js → Hooks.ncTJktu9.js} +1 -1
- streamlit/static/static/js/{InputInstructions.55wIEZQg.js → InputInstructions.D-Y8geDN.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CCmWmhAk.js → ProgressBar.B-kexwwD.js} +2 -2
- streamlit/static/static/js/{RenderInPortalIfExists.RD5lXr52.js → RenderInPortalIfExists.BgaoZgep.js} +1 -1
- streamlit/static/static/js/Toolbar.D9RUZv9G.js +1 -0
- streamlit/static/static/js/{base-input.CPpHElOA.js → base-input.BoAa1U94.js} +4 -4
- streamlit/static/static/js/{checkbox.CFqAmEFb.js → checkbox.Z6iSfe5F.js} +2 -2
- streamlit/static/static/js/{createSuper.CsgKz_Fb.js → createSuper.B4oGDYRm.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.Ca14Ol57.js → data-grid-overlay-editor.msYws2Ou.js} +1 -1
- streamlit/static/static/js/{downloader.zKHUWJjs.js → downloader.kc14n2Hv.js} +1 -1
- streamlit/static/static/js/{es6.BxIE0hzV.js → es6.CxQz807-.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.DDXicIFm.js → iframeResizer.contentWindow.B19u0ONI.js} +1 -1
- streamlit/static/static/js/{index.DsxUfkY2.js → index.-5ruC9At.js} +1 -1
- streamlit/static/static/js/{index.CmrEO5y1.js → index.8jhZBWF2.js} +3 -3
- streamlit/static/static/js/{index.Dhuj2eHv.js → index.9V1KdxfP.js} +1 -1
- streamlit/static/static/js/index.BCx3C6e_.js +1 -0
- streamlit/static/static/js/index.BFz9U2y0.js +3 -0
- streamlit/static/static/js/{index.DXwmtOFz.js → index.BGga-hcS.js} +1 -1
- streamlit/static/static/js/{index.VDXwgnpn.js → index.BHGGDa8K.js} +2 -2
- streamlit/static/static/js/{index.DKn_lTbw.js → index.BHXxWdde.js} +1 -1
- streamlit/static/static/js/{index.DHfKVVrC.js → index.BRXmLIsC.js} +1 -1
- streamlit/static/static/js/index.BRuTz_S4.js +1 -0
- streamlit/static/static/js/{index.LZYrKXpZ.js → index.Bcru_ti-.js} +1 -1
- streamlit/static/static/js/index.Bl1FMJRd.js +1 -0
- streamlit/static/static/js/{index.DOrPk35C.js → index.BoigZiu7.js} +1 -1
- streamlit/static/static/js/{index.CdkbqTPi.js → index.BpILzHf_.js} +14 -14
- streamlit/static/static/js/{index.KqOtBFCd.js → index.BqfdT8-Q.js} +1 -1
- streamlit/static/static/js/{index.B-cSXLfy.js → index.C1z8KpLA.js} +143 -143
- streamlit/static/static/js/index.C32I2PUe.js +2 -0
- streamlit/static/static/js/{index.Cs9td93t.js → index.C5GnDRB7.js} +1 -1
- streamlit/static/static/js/{index.CDo4zkBx.js → index.CG4qPaaW.js} +2 -2
- streamlit/static/static/js/{index.Cc4G8Rqb.js → index.C_msmT1u.js} +1 -1
- streamlit/static/static/js/index.CbeNTdd6.js +1 -0
- streamlit/static/static/js/{index.D_Qa2jw1.js → index.CmTAF0dM.js} +1 -1
- streamlit/static/static/js/index.CnGQVJcw.js +12 -0
- streamlit/static/static/js/index.CopVVq4l.js +1 -0
- streamlit/static/static/js/{index.DsopOKvk.js → index.CtXupx4d.js} +54 -54
- streamlit/static/static/js/index.DGmCchO7.js +1 -0
- streamlit/static/static/js/index.DH6zBk0e.js +1 -0
- streamlit/static/static/js/index.DHVlVWsm.js +1 -0
- streamlit/static/static/js/index.DRKIVBoi.js +1 -0
- streamlit/static/static/js/index.DUd-lFXx.js +73 -0
- streamlit/static/static/js/index.D_uRBA4B.js +1 -0
- streamlit/static/static/js/{index.D8rTof6f.js → index.DeB9iKFW.js} +1051 -223
- streamlit/static/static/js/index.LaIasviC.js +3 -0
- streamlit/static/static/js/{index.Bi19R12v.js → index.QHNfgPJd.js} +1 -1
- streamlit/static/static/js/index.a-RJocYL.js +1 -0
- streamlit/static/static/js/index.cvz4B1gy.js +1 -0
- streamlit/static/static/js/{index.D8rVyQy1.js → index.t--hEgTQ.js} +2 -2
- streamlit/static/static/js/{index.CdNWl5UD.js → index.xNQq3Ei5.js} +1 -1
- streamlit/static/static/js/{input.DG8cw326.js → input.DsCfafm0.js} +2 -2
- streamlit/static/static/js/{memory.8AYDhEw0.js → memory.nY_lMTtu.js} +1 -1
- streamlit/static/static/js/{mergeWith.DA0rAJcB.js → mergeWith.B_7zmsM4.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.CfuWV-Nu.js → number-overlay-editor.CSeVhHRU.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.cdV2PGO5.js → possibleConstructorReturn.nNhsvgRd.js} +1 -1
- streamlit/static/static/js/{sandbox.D3iuhIxb.js → sandbox.Cgm3iuL6.js} +1 -1
- streamlit/static/static/js/{textarea.aafhCY26.js → textarea.BR8rlyih.js} +2 -2
- streamlit/static/static/js/{timepicker.B4X4SBBg.js → timepicker.w4XhAenH.js} +4 -4
- streamlit/static/static/js/{toConsumableArray.BXMHXdEK.js → toConsumableArray.CgkEPBwD.js} +1 -1
- streamlit/static/static/js/{uniqueId.Dd1Zs3iN.js → uniqueId.j-1rlNNH.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.fZnKVVgz.js → useBasicWidgetState.zXY9CjFS.js} +1 -1
- streamlit/static/static/js/useOnInputChange.z04u96A8.js +1 -0
- streamlit/static/static/js/withFullScreenWrapper.Ov13692o.js +1 -0
- streamlit/static/static/media/MaterialSymbols-Rounded.DsbC8sYI.woff2 +0 -0
- streamlit/testing/v1/element_tree.py +8 -3
- streamlit/type_util.py +2 -3
- streamlit/user_info.py +72 -33
- streamlit/watcher/local_sources_watcher.py +1 -1
- streamlit/watcher/util.py +6 -6
- streamlit/web/cli.py +6 -3
- streamlit/web/server/routes.py +1 -59
- streamlit/web/server/server.py +7 -8
- streamlit/web/server/server_util.py +7 -6
- {streamlit-1.44.1.dist-info → streamlit-1.45.1.dist-info}/METADATA +4 -4
- {streamlit-1.44.1.dist-info → streamlit-1.45.1.dist-info}/RECORD +161 -156
- {streamlit-1.44.1.dist-info → streamlit-1.45.1.dist-info}/WHEEL +1 -1
- streamlit/static/static/js/Toolbar.BDz48EIu.js +0 -1
- streamlit/static/static/js/index.57sI0PzI.js +0 -1
- streamlit/static/static/js/index.6E7GR8Jv.js +0 -1
- streamlit/static/static/js/index.6w1bxtr_.js +0 -3
- streamlit/static/static/js/index.B4xKWXb9.js +0 -1
- streamlit/static/static/js/index.BJbw2HY2.js +0 -3
- streamlit/static/static/js/index.BUT1S9DN.js +0 -1
- streamlit/static/static/js/index.Be1QaPWo.js +0 -2
- streamlit/static/static/js/index.Bl-BqJMM.js +0 -1
- streamlit/static/static/js/index.C5lSqAd6.js +0 -1
- streamlit/static/static/js/index.CC6uDm-p.js +0 -1
- streamlit/static/static/js/index.DtVI4O5R.js +0 -1
- streamlit/static/static/js/index.GZTHUQjY.js +0 -1
- streamlit/static/static/js/index.LxKV_y1F.js +0 -73
- streamlit/static/static/js/index.Y1tjChmn.js +0 -12
- streamlit/static/static/js/index.ZZuB32lN.js +0 -1
- streamlit/static/static/js/index.lOHJHD2E.js +0 -1
- streamlit/static/static/js/index.sbUaFfd3.js +0 -1
- streamlit/static/static/js/useOnInputChange.CNxfGIgD.js +0 -1
- streamlit/static/static/js/withFullScreenWrapper.BvDb1IYP.js +0 -1
- streamlit/static/static/media/MaterialSymbols-Rounded.BFCIvovZ.woff2 +0 -0
- {streamlit-1.44.1.data → streamlit-1.45.1.data}/scripts/streamlit.cmd +0 -0
- {streamlit-1.44.1.dist-info → streamlit-1.45.1.dist-info}/entry_points.txt +0 -0
- {streamlit-1.44.1.dist-info → streamlit-1.45.1.dist-info}/top_level.txt +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,E as p,_ as v,n as d,B as y,j as n,C as h,z as b,bu as g,ba as x,b5 as E,bo as T,bp as w,aC as z}from"./index.B-cSXLfy.js";var f=a.forwardRef(function(t,o){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(p,v({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:o}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}))});f.displayName="Fullscreen";var u=a.forwardRef(function(t,o){var e={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return a.createElement(p,v({iconAttrs:e,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:o}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),a.createElement("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}))});u.displayName="FullscreenExit";const c="-2.4rem",B=d("div",{target:"e1oyu9gy0"})(({theme:t,locked:o,target:e})=>({padding:`${t.spacing.sm} 0 ${t.spacing.sm} ${t.spacing.sm}`,position:"absolute",top:o?c:"-1rem",right:t.spacing.none,transition:"none",...!o&&{opacity:0,"&:active, &:focus-visible, &:hover":{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:c},...e&&{[`${e}:hover &, ${e}:active &, ${e}:focus-visible &`]:{transition:"opacity 150ms 100ms, top 100ms 100ms",opacity:1,top:c}}}})),V=d("div",{target:"e1oyu9gy1"})(({theme:t})=>({color:y(t)?t.colors.fadedText60:t.colors.bodyText,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",boxShadow:"1px 2px 8px rgba(0, 0, 0, 0.08)",borderRadius:t.radii.default,backgroundColor:t.colors.lightenedBg05,width:"fit-content",zIndex:t.zIndices.sidebar+1})),H=d("div",{target:"e1oyu9gy2"})(({width:t,height:o,useContainerWidth:e,topCentered:i})=>({position:"relative",height:e&&o?o:"fit-content",width:e?t:"fit-content",maxWidth:"100%",...i?{display:"flex",justifyContent:"center"}:{}}));function m({label:t,show_label:o,icon:e,onClick:i}){const l=b(),s=o?t:"";return n("div",{"data-testid":"stElementToolbarButton",children:n(g,{content:n(z,{source:t,allowHTML:!1,style:{fontSize:l.fontSizes.sm}}),placement:x.TOP,onMouseEnterDelay:1e3,inline:!0,children:h(w,{onClick:r=>{i&&i(),r.stopPropagation()},kind:E.ELEMENT_TOOLBAR,"aria-label":t,children:[e&&n(T,{content:e,size:"md",testid:"stElementToolbarButtonIcon"}),s&&n("span",{children:s})]})})})}const M=({onExpand:t,onCollapse:o,isFullScreen:e,locked:i,children:l,target:s,disableFullscreenMode:r})=>n(B,{className:"stElementToolbar","data-testid":"stElementToolbar",locked:i||e,target:s,children:h(V,{children:[l,t&&!r&&!e&&n(m,{label:"Fullscreen",icon:f,onClick:()=>t()}),o&&!r&&e&&n(m,{label:"Close fullscreen",icon:u,onClick:()=>o()})]})});export{H as S,M as T,m as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n,r as t,O as i,j as c,b1 as d,b2 as e,M as g}from"./index.B-cSXLfy.js";const l=n("iframe",{target:"e3tg43n0"})(({theme:o,disableScrolling:r})=>({width:"100%",colorScheme:"normal",border:"none",padding:o.spacing.none,margin:o.spacing.none,overflow:r?"hidden":void 0}));function s(o){return g(o)||o===""?void 0:o}function m({element:o}){const r=s(o.src),a=i(r)?void 0:s(o.srcdoc);return c(l,{className:"stIFrame","data-testid":"stIFrame",allow:e,disableScrolling:!o.scrolling,src:r,srcDoc:a,height:o.height,scrolling:o.scrolling?"auto":"no",sandbox:d,title:"st.iframe"})}const I=t.memo(m);export{I as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as t,b3 as k,J as u,b4 as s,b5 as l,j as n,r as C,b6 as v,b7 as B,b8 as S}from"./index.B-cSXLfy.js";function x(o,i){switch(o){case s.XSMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.sm}`,fontSize:i.fontSizes.sm};case s.SMALL:return{padding:`${i.spacing.twoXS} ${i.spacing.md}`};case s.LARGE:return{padding:`${i.spacing.md} ${i.spacing.md}`};default:return{padding:`${i.spacing.xs} ${i.spacing.md}`}}}const b=t("a",{target:"e11mkfd20"})(({containerWidth:o,size:i,theme:r})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",fontWeight:r.fontWeights.normal,padding:`${r.spacing.xs} ${r.spacing.md}`,borderRadius:r.radii.default,minHeight:r.sizes.minElementHeight,margin:0,lineHeight:r.lineHeights.base,color:r.colors.primary,textDecoration:"none",width:o?"100%":"auto",userSelect:"none","&:visited":{color:r.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{boxShadow:`0 0 0 0.2rem ${u(r.colors.primary,.5)}`},"&:hover":{textDecoration:"none"},"&:active":{textDecoration:"none"},...x(i,r)})),L=t(b,{target:"e11mkfd21"})(({theme:o})=>({backgroundColor:o.colors.primary,color:o.colors.white,border:`${o.sizes.borderWidth} solid ${o.colors.primary}`,"&:hover":{backgroundColor:k(o.colors.primary,.05),color:o.colors.white},"&:active":{backgroundColor:"transparent",color:o.colors.primary},"&:visited:not(:active)":{color:o.colors.white},"&[disabled], &[disabled]:hover, &[disabled]:active, &[disabled]:visited":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),$=t(b,{target:"e11mkfd22"})(({theme:o})=>({backgroundColor:o.colors.lightenedBg05,color:o.colors.bodyText,border:`${o.sizes.borderWidth} solid ${o.colors.borderColor}`,"&:visited":{color:o.colors.bodyText},"&:hover":{borderColor:o.colors.primary,color:o.colors.primary},"&:active":{color:o.colors.white,borderColor:o.colors.primary,backgroundColor:o.colors.primary},"&:focus:not(:active)":{borderColor:o.colors.primary,color:o.colors.primary},"&[disabled], &[disabled]:hover, &[disabled]:active":{borderColor:o.colors.borderColor,backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}})),w=t(b,{target:"e11mkfd23"})(({theme:o})=>({padding:o.spacing.none,backgroundColor:o.colors.transparent,color:o.colors.bodyText,border:"none","&:visited":{color:o.colors.bodyText},"&:hover":{color:o.colors.primary},"&:active":{color:o.colors.primary},"&:focus":{outline:"none"},"&:focus-visible":{color:o.colors.primary,boxShadow:`0 0 0 0.2rem ${u(o.colors.primary,.5)}`},"&[disabled], &[disabled]:hover, &[disabled]:active":{backgroundColor:o.colors.transparent,color:o.colors.fadedText40,cursor:"not-allowed"}}));function T({kind:o,size:i,disabled:r,containerWidth:a,children:c,autoFocus:d,href:p,rel:g,target:y,onClick:f}){let e=L;return o===l.SECONDARY?e=$:o===l.TERTIARY&&(e=w),n(e,{kind:o,size:i||s.MEDIUM,containerWidth:a||!1,disabled:r||!1,autoFocus:d||!1,href:p,target:y,rel:g,onClick:f,tabIndex:r?-1:0,"data-testid":`stBaseLinkButton-${o}`,children:c})}function z(o){const{disabled:i,element:r}=o;let a=l.SECONDARY;r.type==="primary"?a=l.PRIMARY:r.type==="tertiary"&&(a=l.TERTIARY);const c=d=>{o.disabled&&d.preventDefault()};return n(S,{className:"stLinkButton","data-testid":"stLinkButton",children:n(v,{help:r.help,containerWidth:r.useContainerWidth,children:n(T,{kind:a,size:s.SMALL,disabled:i,onClick:c,containerWidth:r.useContainerWidth,href:r.url,target:"_blank",rel:"noreferrer","aria-disabled":i,children:n(B,{icon:r.icon,label:r.label})})})})}const A=C.memo(z);export{A as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{bv as _,bM as ve,bw as $,r as u,z as me,C as te,j as O,bz as ye,bs as $e,ba as Oe,bt as Re,aC as re,br as _e}from"./index.B-cSXLfy.js";import{a as Pe}from"./useBasicWidgetState.fZnKVVgz.js";import"./FormClearHelper.B56TOIUD.js";var ne={vertical:"vertical",horizontal:"horizontal"};function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oe(Object(r),!0).forEach(function(n){R(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function R(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var E=0,I=1,L=2;function x(e){return e.$isActive?L:e.$isHovered?I:E}function we(e){var t=e.$theme.colors,r=e.$disabled,n=e.$checked,o=e.$isFocusVisible,i=e.$error;if(r)return t.tickFillDisabled;if(n)if(i)switch(x(e)){case E:return t.tickFillErrorSelected;case I:return t.tickFillErrorSelectedHover;case L:return t.tickFillErrorSelectedHoverActive}else switch(x(e)){case E:return t.tickFillSelected;case I:return t.tickFillSelectedHover;case L:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function Se(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(x(e)){case E:return t.tickFillError;case I:return t.tickFillErrorHover;case L:return t.tickFillErrorHoverActive}else switch(x(e)){case E:return t.tickFill;case I:return t.tickFillHover;case L:return t.tickFillActive}}function Me(e){var t=e.$labelPlacement,r=t===void 0?"":t,n=e.$theme,o;switch(r){case"top":o="Bottom";break;case"bottom":o="Top";break;case"left":o=n.direction==="rtl"?"Left":"Right";break;default:case"right":o=n.direction==="rtl"?"Right":"Left";break}var i=n.sizing,l=i.scale300;return R({},"padding".concat(o),l)}function ke(e){var t=e.$disabled,r=e.$theme,n=r.colors;return t?n.contentSecondary:n.contentPrimary}var G=_("div",function(e){var t=e.$disabled,r=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:r==="horizontal"?"row":"column",alignItems:r==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});G.displayName="RadioGroupRoot";G.displayName="RadioGroupRoot";var W=_("label",function(e){var t,r=e.$disabled,n=e.$hasDescription,o=e.$labelPlacement,i=e.$theme,l=e.$align,s=i.sizing,c=l==="horizontal",f=i.direction==="rtl"?"Left":"Right";return t={flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:"center",cursor:r?"not-allowed":"pointer",marginTop:s.scale200},R(t,"margin".concat(f),c?s.scale200:null),R(t,"marginBottom",n&&!c?null:s.scale200),t});W.displayName="Root";W.displayName="Root";var q=_("div",function(e){var t=e.$theme,r=t.animation,n=t.sizing;return{backgroundColor:Se(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?n.scale200:n.scale550,transitionDuration:r.timing200,transitionTimingFunction:r.easeOutCurve,width:e.$checked?n.scale200:n.scale550}});q.displayName="RadioMarkInner";q.displayName="RadioMarkInner";var X=_("div",function(e){var t=e.$theme,r=t.animation,n=t.sizing;return{alignItems:"center",backgroundColor:we(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:n.scale700,justifyContent:"center",marginTop:n.scale0,marginRight:n.scale0,marginBottom:n.scale0,marginLeft:n.scale0,outline:"none",verticalAlign:"middle",width:n.scale700,flexShrink:0,transitionDuration:r.timing200,transitionTimingFunction:r.easeOutCurve}});X.displayName="RadioMarkOuter";X.displayName="RadioMarkOuter";var K=_("div",function(e){var t=e.$theme.typography;return j(j({verticalAlign:"middle"},Me(e)),{},{color:ke(e)},t.LabelMedium)});K.displayName="Label";K.displayName="Label";var J=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});J.displayName="Input";J.displayName="Input";var Q=_("div",function(e){var t,r=e.$theme,n=e.$align,o=n==="horizontal",i=r.direction==="rtl"?"Right":"Left",l=r.direction==="rtl"?"Left":"Right";return j(j({},r.typography.ParagraphSmall),{},(t={color:r.colors.contentSecondary,cursor:"auto"},R(t,"margin".concat(i),n==="horizontal"?null:r.sizing.scale900),R(t,"margin".concat(l),o?r.sizing.scale200:null),R(t,"maxWidth","240px"),t))});Q.displayName="Description";Q.displayName="Description";function z(e){"@babel/helpers - typeof";return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},z(e)}function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}function Fe(e,t){return Te(e)||Le(e,t)||Ie(e,t)||Ee()}function Ee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ie(e,t){if(e){if(typeof e=="string")return ie(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ie(e,t)}}function ie(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Le(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,l,s;try{for(r=r.call(e);!(o=(l=r.next()).done)&&(n.push(l.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw s}}return n}}function Te(e){if(Array.isArray(e))return e}function Ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function je(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xe(e,t,r){return t&&je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function De(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},N(e,t)}function Be(e){var t=ze();return function(){var n=D(e),o;if(t){var i=D(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Ce(this,o)}}function Ce(e,t){if(t&&(z(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T(e)}function T(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ze(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},D(e)}function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var se=function(e){De(r,e);var t=Be(r);function r(){var n;Ae(this,r);for(var o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];return n=t.call.apply(t,[this].concat(i)),A(T(n),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),A(T(n),"handleFocus",function(s,c){ve(s)&&n.setState({isFocusVisible:!0}),n.setState({focusedRadioIndex:c}),n.props.onFocus&&n.props.onFocus(s)}),A(T(n),"handleBlur",function(s,c){n.state.isFocusVisible!==!1&&n.setState({isFocusVisible:!1}),n.setState({focusedRadioIndex:-1}),n.props.onBlur&&n.props.onBlur(s)}),n}return xe(r,[{key:"render",value:function(){var o=this,i=this.props.overrides,l=i===void 0?{}:i,s=$(l.RadioGroupRoot,G),c=Fe(s,2),f=c[0],b=c[1];return u.createElement(f,H({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},b),u.Children.map(this.props.children,function(p,a){if(!u.isValidElement(p))return null;var d=o.props.value===p.props.value;return u.cloneElement(p,{align:o.props.align,autoFocus:o.props.autoFocus,checked:d,disabled:o.props.disabled||p.props.disabled,error:o.props.error,isFocused:o.state.focusedRadioIndex===a,isFocusVisible:o.state.isFocusVisible,tabIndex:a===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(g){return o.handleBlur(g,a)},onFocus:function(g){return o.handleFocus(g,a)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),r}(u.Component);A(se,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function V(e){"@babel/helpers - typeof";return V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y.apply(this,arguments)}function M(e,t){return Ue(e)||Ve(e,t)||Ne(e,t)||He()}function He(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(e,t){if(e){if(typeof e=="string")return ae(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ae(e,t)}}function ae(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ve(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],o=!0,i=!1,l,s;try{for(r=r.call(e);!(o=(l=r.next()).done)&&(n.push(l.value),!(t&&n.length===t));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&r.return!=null&&r.return()}finally{if(i)throw s}}return n}}function Ue(e){if(Array.isArray(e))return e}function Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qe(e,t,r){return t&&We(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},U(e,t)}function Ke(e){var t=Qe();return function(){var n=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return Je(this,o)}}function Je(e,t){if(t&&(V(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},B(e)}function F(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ye(e){return e==="top"||e==="left"}function Ze(e){return e==="bottom"||e==="right"}var et=function(t){return t.stopPropagation()},le=function(e){Xe(r,e);var t=Ke(r);function r(){var n;Ge(this,r);for(var o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];return n=t.call.apply(t,[this].concat(i)),F(k(n),"state",{isActive:!1,isHovered:!1}),F(k(n),"onMouseEnter",function(s){n.setState({isHovered:!0}),n.props.onMouseEnter&&n.props.onMouseEnter(s)}),F(k(n),"onMouseLeave",function(s){n.setState({isHovered:!1}),n.props.onMouseLeave&&n.props.onMouseLeave(s)}),F(k(n),"onMouseDown",function(s){n.setState({isActive:!0}),n.props.onMouseDown&&n.props.onMouseDown(s)}),F(k(n),"onMouseUp",function(s){n.setState({isActive:!1}),n.props.onMouseUp&&n.props.onMouseUp(s)}),n}return qe(r,[{key:"componentDidMount",value:function(){var o;this.props.autoFocus&&(o=this.props.inputRef)!==null&&o!==void 0&&o.current&&this.props.inputRef.current.focus()}},{key:"render",value:function(){var o=this.props.overrides,i=o===void 0?{}:o,l=$(i.Root,W),s=M(l,2),c=s[0],f=s[1],b=$(i.Label,K),p=M(b,2),a=p[0],d=p[1],P=$(i.Input,J),g=M(P,2),w=g[0],C=g[1],v=$(i.Description,Q),h=M(v,2),m=h[0],ue=h[1],ce=$(i.RadioMarkInner,q),Y=M(ce,2),pe=Y[0],fe=Y[1],de=$(i.RadioMarkOuter,X),Z=M(de,2),he=Z[0],be=Z[1],S={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},ee=u.createElement(a,y({},S,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(ge){return ge.preventDefault()}},this.props.children):this.props.children);return u.createElement(u.Fragment,null,u.createElement(c,y({"data-baseweb":"radio",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},S,f),Ye(this.props.labelPlacement)&&ee,u.createElement(he,y({},S,be),u.createElement(pe,y({},S,fe))),u.createElement(w,y({"aria-invalid":this.props.error||null,checked:this.props.checked,disabled:this.props.disabled,name:this.props.name,onBlur:this.props.onBlur,onFocus:this.props.onFocus,onClick:et,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},S,C)),Ze(this.props.labelPlacement)&&ee),!!this.props.description&&u.createElement(m,y({},S,ue),this.props.description))}}]),r}(u.Component);F(le,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function tt({disabled:e,horizontal:t,value:r,onChange:n,options:o,captions:i,label:l,labelVisibility:s,help:c}){const[f,b]=u.useState(r??null);u.useEffect(()=>{r!==f&&b(r??null)},[r]);const p=u.useCallback(v=>{const h=parseInt(v.target.value,10);b(h),n(h)},[n]),a=me(),d=i.length>0,P=o.length>0,g=P?o:["No options to select."],w=e||!P,C=v=>v==""&&t&&d?" ":v;return te("div",{className:"stRadio","data-testid":"stRadio",children:[O(Re,{label:l,disabled:w,labelVisibility:s,children:c&&O(ye,{children:O($e,{content:c,placement:Oe.TOP_RIGHT})})}),O(se,{onChange:p,value:f!==null?f.toString():void 0,disabled:w,align:t?ne.horizontal:ne.vertical,"aria-label":l,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?a.spacing.sm:a.spacing.none,minHeight:a.sizes.minElementHeight}}},children:g.map((v,h)=>te(le,{value:h.toString(),overrides:{Root:{style:({$isFocusVisible:m})=>({marginBottom:a.spacing.none,marginTop:a.spacing.none,marginRight:d?a.spacing.sm:a.spacing.lg,paddingLeft:a.spacing.none,alignItems:"start",paddingRight:a.spacing.threeXS,backgroundColor:m?a.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:m})=>({width:a.sizes.checkbox,height:a.sizes.checkbox,marginTop:"0.35rem",marginRight:a.spacing.none,marginLeft:a.spacing.none,backgroundColor:m&&!w?a.colors.primary:a.colors.fadedText40})},RadioMarkInner:{style:({$checked:m})=>({height:m?"37.5%":`calc(${a.sizes.checkbox} - ${a.spacing.threeXS})`,width:m?"37.5%":`calc(${a.sizes.checkbox} - ${a.spacing.threeXS})`})},Label:{style:{color:w?a.colors.fadedText40:a.colors.bodyText,position:"relative",top:a.spacing.px}}},children:[O(re,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&O(re,{source:C(i[h]),allowHTML:!1,isCaption:!0,isLabel:!0})]},h))})]})}const rt=u.memo(tt);function nt({disabled:e,element:t,widgetMgr:r,fragmentId:n}){const[o,i]=Pe({getStateFromWidgetMgr:ot,getDefaultStateFromProto:it,getCurrStateFromProto:at,updateWidgetMgrState:st,element:t,widgetMgr:r,fragmentId:n}),l=u.useCallback(d=>{i({value:d,fromUi:!0})},[i]),{horizontal:s,options:c,captions:f,label:b,labelVisibility:p,help:a}=t;return O(rt,{label:b,onChange:l,options:c,captions:f,disabled:e,horizontal:s,labelVisibility:_e(p==null?void 0:p.value),value:o??null,help:a})}function ot(e,t){return e.getIntValue(t)}function it(e){return e.default??null}function at(e){return e.value??null}function st(e,t,r,n){t.setIntValue(e,r.value??null,{fromUi:r.fromUi},n)}const ft=u.memo(nt);export{ft as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,bh as U,z as k,cr as W,C as A,j as l,br as L,bF as P,bs as B,ba as D,bt as j}from"./index.B-cSXLfy.js";import{u as _}from"./uniqueId.Dd1Zs3iN.js";import{u as w,a as K,b as O}from"./useOnInputChange.CNxfGIgD.js";import{I as $}from"./InputInstructions.55wIEZQg.js";import{a as q}from"./useBasicWidgetState.fZnKVVgz.js";import{T as G}from"./textarea.aafhCY26.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.B56TOIUD.js";import"./base-input.CPpHElOA.js";const x=(a,t)=>a.getStringValue(t)??t.default??null,N=a=>a.default??null,J=a=>a.value??null,Q=(a,t,o,u)=>{t.setStringValue(a,o.value,{fromUi:o.fromUi},u)},X=({disabled:a,element:t,widgetMgr:o,fragmentId:u})=>{var f;const p=s.useRef(_("text_area_")).current,[T,S]=U(),[r,n]=s.useState(!1),[C,b]=s.useState(!1),[i,d]=s.useState(()=>x(o,t)??null),I=s.useCallback(()=>{d(t.default??null),n(!0)},[t]),[y,c]=q({getStateFromWidgetMgr:x,getDefaultStateFromProto:N,getCurrStateFromProto:J,updateWidgetMgrState:Q,element:t,widgetMgr:o,fragmentId:u,onFormCleared:I});w(y,i,d,r);const e=k(),m=s.useCallback(()=>{n(!1),c({value:i,fromUi:!0})},[i,c]),F=s.useCallback(()=>{r&&m(),b(!1)},[r,m]),V=s.useCallback(()=>{b(!0)},[]),v=K({formId:t.formId,maxChars:t.maxChars,setDirty:n,setUiValue:d,setValueWithSource:c}),z=O(t.formId,m,r,o,u,!0),{height:g,placeholder:E,formId:h}=t,R=W({formId:h})?o.allowFormEnterToSubmit(h):r,H=C&&T>e.breakpoints.hideWidgetDetails;return A("div",{className:"stTextArea","data-testid":"stTextArea",ref:S,children:[l(j,{label:t.label,disabled:a,labelVisibility:L((f=t.labelVisibility)==null?void 0:f.value),htmlFor:p,children:t.help&&l(P,{children:l(B,{content:t.help,placement:D.TOP_RIGHT})})}),l(G,{value:i??"",placeholder:E,onBlur:F,onFocus:V,onChange:v,onKeyDown:z,"aria-label":t.label,disabled:a,id:p,overrides:{Input:{style:{lineHeight:e.lineHeights.inputWidget,height:g?`${g}px`:"",minHeight:e.sizes.largestElementHeight,resize:"vertical","::placeholder":{opacity:"0.7"},paddingRight:e.spacing.md,paddingLeft:e.spacing.md,paddingBottom:e.spacing.md,paddingTop:e.spacing.md}},Root:{props:{"data-testid":"stTextAreaRootElement"},style:{borderLeftWidth:e.sizes.borderWidth,borderRightWidth:e.sizes.borderWidth,borderTopWidth:e.sizes.borderWidth,borderBottomWidth:e.sizes.borderWidth}}}}),H&&l($,{dirty:r,value:i??"",maxLength:t.maxChars,type:"multiline",inForm:W({formId:h}),allowEnterToSubmit:R})]})},it=s.memo(X);export{it as default};
|