streamlit-nightly 1.41.2.dev20250105__py2.py3-none-any.whl → 1.41.2.dev20250107__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 (98) hide show
  1. streamlit/elements/markdown.py +2 -2
  2. streamlit/elements/write.py +1 -1
  3. streamlit/static/index.html +1 -1
  4. streamlit/static/static/js/{FileDownload.esm.hzusuo1b.js → FileDownload.esm.Dod29kzi.js} +1 -1
  5. streamlit/static/static/js/{FormClearHelper.YHWCggTS.js → FormClearHelper.0CIwSBFI.js} +1 -1
  6. streamlit/static/static/js/{Hooks.Bs4Ve5LI.js → Hooks.D0iBCSJR.js} +1 -1
  7. streamlit/static/static/js/{InputInstructions.BLn5uLvO.js → InputInstructions.BGz0VNnm.js} +1 -1
  8. streamlit/static/static/js/ProgressBar.BaPlfiH4.js +2 -0
  9. streamlit/static/static/js/{RenderInPortalIfExists.CH7OWBaV.js → RenderInPortalIfExists.CDLwOGJN.js} +1 -1
  10. streamlit/static/static/js/Toolbar.U2Q07lHA.js +1 -0
  11. streamlit/static/static/js/{base-input.CsYjr-Mv.js → base-input.Fk16kR45.js} +4 -4
  12. streamlit/static/static/js/{createSuper.DdedKqOK.js → createSuper.B8NDjS0T.js} +1 -1
  13. streamlit/static/static/js/data-grid-overlay-editor.C0oC7OWz.js +1 -0
  14. streamlit/static/static/js/{downloader.DTiZHQMC.js → downloader.BLJWoPl1.js} +1 -1
  15. streamlit/static/static/js/{es6.oT7UuwOI.js → es6.D9yZ4-e5.js} +2 -2
  16. streamlit/static/static/js/getPrototypeOf.DKKmv0PS.js +1 -0
  17. streamlit/static/static/js/{iframeResizer.contentWindow.C4V1QE40.js → iframeResizer.contentWindow.Du2ek_IY.js} +1 -1
  18. streamlit/static/static/js/{index.Dq0mtJUi.js → index.B8MC65SU.js} +25 -25
  19. streamlit/static/static/js/{index.BceNwBQ7.js → index.BAADbUet.js} +1 -1
  20. streamlit/static/static/js/index.BEr9HRGP.js +1 -0
  21. streamlit/static/static/js/index.BGyFJsxB.js +1 -0
  22. streamlit/static/static/js/{index.U0queCso.js → index.BY0L_QLh.js} +2 -2
  23. streamlit/static/static/js/index.BZAVJreZ.js +1 -0
  24. streamlit/static/static/js/index.C2_hseSo.js +1 -0
  25. streamlit/static/static/js/{index.BlDvA0Pm.js → index.C73yVjC9.js} +11 -11
  26. streamlit/static/static/js/{index.yge1jSoD.js → index.C9Sks6cD.js} +1 -1
  27. streamlit/static/static/js/{index.CgwMN8Xv.js → index.CCLqv4q8.js} +1 -1
  28. streamlit/static/static/js/index.CGSuEM6K.js +1 -0
  29. streamlit/static/static/js/{index.Bw-My5yL.js → index.CIPlrA_8.js} +1 -1
  30. streamlit/static/static/js/{index.BozobE_y.js → index.CKwgjL0N.js} +1 -1
  31. streamlit/static/static/js/{index.Bo90e_Uc.js → index.CTvaDQgd.js} +2 -2
  32. streamlit/static/static/js/{index.I1VZoGQK.js → index.CaORMlLk.js} +1 -1
  33. streamlit/static/static/js/{index.D3_j16sc.js → index.Cfmr2hoW.js} +1 -1
  34. streamlit/static/static/js/{index.DKS2m2dW.js → index.CgHOvdK_.js} +1 -1
  35. streamlit/static/static/js/{index.DSToQbfG.js → index.Chl3QVe6.js} +1 -1
  36. streamlit/static/static/js/{index.DgYh-jV7.js → index.Cnd636WC.js} +3 -3
  37. streamlit/static/static/js/{index.Cd1M1khv.js → index.CxrCMTqd.js} +3 -3
  38. streamlit/static/static/js/{index.cf6LJRuO.js → index.CzDEy16B.js} +1 -1
  39. streamlit/static/static/js/{index.B00Rrwlo.js → index.D-s5XFne.js} +2 -2
  40. streamlit/static/static/js/{index.BwNWvULL.js → index.DCosyf4Y.js} +1 -1
  41. streamlit/static/static/js/{index.BE3Oy0-w.js → index.DU9T3IwS.js} +1 -1
  42. streamlit/static/static/js/index.DbcRQLkk.js +1 -0
  43. streamlit/static/static/js/index.DcJiNltm.js +197 -0
  44. streamlit/static/static/js/{index.DokSVIB2.js → index.DdG-jRFd.js} +1 -1
  45. streamlit/static/static/js/{index.CWgiCNwz.js → index.DnCNih03.js} +1 -1
  46. streamlit/static/static/js/index.DxFUMDyF.js +1 -0
  47. streamlit/static/static/js/index.HXS4cXj6.js +3 -0
  48. streamlit/static/static/js/{index.BEtyBSSz.js → index.K_IYAbRz.js} +100 -100
  49. streamlit/static/static/js/{index.D2jry5bi.js → index.NpAsSk7C.js} +1 -1
  50. streamlit/static/static/js/index.UMKksAwF.js +1 -0
  51. streamlit/static/static/js/index.clUXhmTv.js +201 -0
  52. streamlit/static/static/js/index.d_eIUHvJ.js +2 -0
  53. streamlit/static/static/js/{index.BOcbB1Se.js → index.n6SGF_yN.js} +1 -1
  54. streamlit/static/static/js/{index.qDaxAO86.js → index.ncJlJcLt.js} +2 -2
  55. streamlit/static/static/js/{input.BZL_gOdc.js → input.BX19stYv.js} +2 -2
  56. streamlit/static/static/js/{memory.DMPJKDWA.js → memory.DrUTC0E1.js} +1 -1
  57. streamlit/static/static/js/mergeWith.DthgK8_y.js +1 -0
  58. streamlit/static/static/js/number-overlay-editor.17BCi9Ve.js +9 -0
  59. streamlit/static/static/js/{sandbox.DUM1HsOb.js → sandbox.5Hd92fh0.js} +1 -1
  60. streamlit/static/static/js/{slicedToArray.B6rsNbE6.js → slicedToArray.Bu7hUD78.js} +1 -1
  61. streamlit/static/static/js/{textarea.BEHsDT2-.js → textarea.B2pXMKyh.js} +2 -2
  62. streamlit/static/static/js/threshold.B8r8f5kt.js +1 -0
  63. streamlit/static/static/js/{timepicker.D7ARfySh.js → timepicker.5G_63qYl.js} +1 -1
  64. streamlit/static/static/js/timer.RueuYoQV.js +1 -0
  65. streamlit/static/static/js/{uniqueId.r-l9CNmZ.js → uniqueId.B7repv29.js} +1 -1
  66. streamlit/static/static/js/{useBasicWidgetState.yEDDcbjV.js → useBasicWidgetState.ZoM17KXF.js} +1 -1
  67. streamlit/static/static/js/{useOnInputChange.MQgT3jRx.js → useOnInputChange.DK_jsnv_.js} +1 -1
  68. streamlit/static/static/js/value.iufjd77T.js +1 -0
  69. streamlit/static/static/js/withFullScreenWrapper.ByjGCoNh.js +1 -0
  70. streamlit/type_util.py +1 -1
  71. {streamlit_nightly-1.41.2.dev20250105.dist-info → streamlit_nightly-1.41.2.dev20250107.dist-info}/METADATA +1 -1
  72. {streamlit_nightly-1.41.2.dev20250105.dist-info → streamlit_nightly-1.41.2.dev20250107.dist-info}/RECORD +76 -76
  73. streamlit/static/static/js/ProgressBar.syQAAKS_.js +0 -2
  74. streamlit/static/static/js/Toolbar.BytO0Vjs.js +0 -1
  75. streamlit/static/static/js/_commonjs-dynamic-modules.TDtrdbi3.js +0 -1
  76. streamlit/static/static/js/data-grid-overlay-editor.HI85rFWc.js +0 -1
  77. streamlit/static/static/js/getPrototypeOf.CfOrwPYw.js +0 -1
  78. streamlit/static/static/js/index.BFuk3D-a.js +0 -1
  79. streamlit/static/static/js/index.BLsk_Naj.js +0 -201
  80. streamlit/static/static/js/index.BtyW8_Lq.js +0 -1
  81. streamlit/static/static/js/index.C7m2u1Hi.js +0 -1
  82. streamlit/static/static/js/index.CKLsExlx.js +0 -2
  83. streamlit/static/static/js/index.CSkOy9Ie.js +0 -1
  84. streamlit/static/static/js/index.D2sEk90l.js +0 -197
  85. streamlit/static/static/js/index.DJaNJkBl.js +0 -1
  86. streamlit/static/static/js/index.IkCWa6ie.js +0 -1
  87. streamlit/static/static/js/index.e2mIXcY7.js +0 -32
  88. streamlit/static/static/js/index.ln_0INpA.js +0 -1
  89. streamlit/static/static/js/index.wXwVYako.js +0 -1
  90. streamlit/static/static/js/number-overlay-editor.DgxZowLy.js +0 -9
  91. streamlit/static/static/js/string.Bl9OLDCw.js +0 -1
  92. streamlit/static/static/js/threshold.skajmqVB.js +0 -1
  93. streamlit/static/static/js/timer.DwZfkapc.js +0 -1
  94. streamlit/static/static/js/withFullScreenWrapper.CkGbHkwr.js +0 -1
  95. {streamlit_nightly-1.41.2.dev20250105.data → streamlit_nightly-1.41.2.dev20250107.data}/scripts/streamlit.cmd +0 -0
  96. {streamlit_nightly-1.41.2.dev20250105.dist-info → streamlit_nightly-1.41.2.dev20250107.dist-info}/WHEEL +0 -0
  97. {streamlit_nightly-1.41.2.dev20250105.dist-info → streamlit_nightly-1.41.2.dev20250107.dist-info}/entry_points.txt +0 -0
  98. {streamlit_nightly-1.41.2.dev20250105.dist-info → streamlit_nightly-1.41.2.dev20250107.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- import{b3 as x,r as g,bd as ae,be as T,bf as w,M as le,a5 as ce,j as S,bg as se,X as ue,a8 as de,a$ as fe,a2 as ge,b8 as he,b0 as be,aL as me,bh as ve,bi as pe}from"./index.Dq0mtJUi.js";import{a as $e}from"./useBasicWidgetState.yEDDcbjV.js";import"./FormClearHelper.YHWCggTS.js";var L=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),ke=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(r){G(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ye(e){var t=e.$disabled,o=e.$checked,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.colors;return t?c.tickFillDisabled:o||i?"transparent":r?c.borderNegative:n?c.borderSelected:c.tickBorder}function Te(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,i=r.sizing,l=i.scale300,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n="Right";break;default:case"right":n="Left";break}return r.direction==="rtl"&&n==="Left"?n="Right":r.direction==="rtl"&&n==="Right"&&(n="Left"),G({},"padding".concat(n),l)}function we(e){var t=e.$disabled,o=e.$checked,r=e.$isIndeterminate,i=e.$error,l=e.$isHovered,n=e.$isActive,c=e.$theme,a=c.colors;return t?o||r?a.tickFillDisabled:a.tickFill:i&&(r||o)?n?a.tickFillErrorSelectedHoverActive:l?a.tickFillErrorSelectedHover:a.tickFillErrorSelected:i?n?a.tickFillErrorHoverActive:l?a.tickFillErrorHover:a.tickFillError:r||o?n?a.tickFillSelectedHoverActive:l?a.tickFillSelectedHover:a.tickFillSelected:n?a.tickFillActive:l?a.tickFillHover:a.tickFill}function xe(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var M=x("label",function(e){var t=e.$disabled,o=e.$labelPlacement;return{flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:o==="top"||o==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});M.displayName="Root";M.displayName="Root";var _=x("span",function(e){var t=e.$checked,o=e.$disabled,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.sizing,a=l.animation,s=o?l.colors.tickMarkFillDisabled:r?l.colors.tickMarkFillError:l.colors.tickMarkFill,k=encodeURIComponent(`
1
+ import{bg as x,r as g,bq as ae,br as T,bs as w,a0 as le,aj as ce,j as S,bt as se,aa as ue,am as de,bc as fe,ag as ge,bl as he,bd as be,aY as me,bu as ve,bv as pe}from"./index.B8MC65SU.js";import{a as $e}from"./useBasicWidgetState.ZoM17KXF.js";import"./FormClearHelper.0CIwSBFI.js";var F=Object.freeze({default:"default",toggle:"toggle",toggle_round:"toggle"}),ke=Object.freeze({top:"top",right:"right",bottom:"bottom",left:"left"});function q(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function P(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(r){G(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function G(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ye(e){var t=e.$disabled,o=e.$checked,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.colors;return t?c.tickFillDisabled:o||i?"transparent":r?c.borderNegative:n?c.borderSelected:c.tickBorder}function Te(e){var t=e.$labelPlacement,o=t===void 0?"":t,r=e.$theme,i=r.sizing,l=i.scale300,n;switch(o){case"top":n="Bottom";break;case"bottom":n="Top";break;case"left":n="Right";break;default:case"right":n="Left";break}return r.direction==="rtl"&&n==="Left"?n="Right":r.direction==="rtl"&&n==="Right"&&(n="Left"),G({},"padding".concat(n),l)}function we(e){var t=e.$disabled,o=e.$checked,r=e.$isIndeterminate,i=e.$error,l=e.$isHovered,n=e.$isActive,c=e.$theme,a=c.colors;return t?o||r?a.tickFillDisabled:a.tickFill:i&&(r||o)?n?a.tickFillErrorSelectedHoverActive:l?a.tickFillErrorSelectedHover:a.tickFillErrorSelected:i?n?a.tickFillErrorHoverActive:l?a.tickFillErrorHover:a.tickFillError:r||o?n?a.tickFillSelectedHoverActive:l?a.tickFillSelectedHover:a.tickFillSelected:n?a.tickFillActive:l?a.tickFillHover:a.tickFill}function xe(e){var t=e.$disabled,o=e.$theme,r=o.colors;return t?r.contentSecondary:r.contentPrimary}var M=x("label",function(e){var t=e.$disabled,o=e.$labelPlacement;return{flexDirection:o==="top"||o==="bottom"?"column":"row",display:"flex",alignItems:o==="top"||o==="bottom"?"center":"flex-start",cursor:t?"not-allowed":"pointer",userSelect:"none"}});M.displayName="Root";M.displayName="Root";var _=x("span",function(e){var t=e.$checked,o=e.$disabled,r=e.$error,i=e.$isIndeterminate,l=e.$theme,n=e.$isFocusVisible,c=l.sizing,a=l.animation,s=o?l.colors.tickMarkFillDisabled:r?l.colors.tickMarkFillError:l.colors.tickMarkFill,k=encodeURIComponent(`
2
2
  <svg width="14" height="4" viewBox="0 0 14 4" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M14 0.5H0V3.5H14V0.5Z" fill="`.concat(s,`"/>
4
4
  </svg>
@@ -6,4 +6,4 @@ import{b3 as x,r as g,bd as ae,be as T,bf as w,M as le,a5 as ce,j as S,bg as se,
6
6
  <svg width="17" height="13" viewBox="0 0 17 13" fill="none" xmlns="http://www.w3.org/2000/svg">
7
7
  <path d="M6.50002 12.6L0.400024 6.60002L2.60002 4.40002L6.50002 8.40002L13.9 0.900024L16.1 3.10002L6.50002 12.6Z" fill="`.concat(s,`"/>
8
8
  </svg>
9
- `)),h=l.borders.checkboxBorderRadius,b=ye(e);return{flex:"0 0 auto",transitionDuration:a.timing200,transitionTimingFunction:a.easeOutCurve,transitionProperty:"background-image, border-color, background-color",width:c.scale700,height:c.scale700,left:"4px",top:"4px",boxSizing:"border-box",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftWidth:"3px",borderRightWidth:"3px",borderTopWidth:"3px",borderBottomWidth:"3px",borderLeftColor:b,borderRightColor:b,borderTopColor:b,borderBottomColor:b,borderTopLeftRadius:h,borderTopRightRadius:h,borderBottomRightRadius:h,borderBottomLeftRadius:h,outline:n&&t?"3px solid ".concat(l.colors.accent):"none",display:"inline-block",verticalAlign:"middle",backgroundImage:i?"url('data:image/svg+xml,".concat(k,"');"):t?"url('data:image/svg+xml,".concat(u,"');"):null,backgroundColor:we(e),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain",marginTop:l.sizing.scale0,marginBottom:l.sizing.scale0,marginLeft:l.sizing.scale0,marginRight:l.sizing.scale0}});_.displayName="Checkmark";_.displayName="Checkmark";var I=x("div",function(e){var t=e.$theme,o=t.typography;return P(P(P({verticalAlign:"middle"},Te(e)),{},{color:xe(e)},o.LabelMedium),{},{lineHeight:"24px"})});I.displayName="Label";I.displayName="Label";var H=x("input",{opacity:0,width:0,height:0,overflow:"hidden",margin:0,padding:0,position:"absolute"});H.displayName="Input";H.displayName="Input";var z=x("div",function(e){var t=e.$theme.colors.toggleFill;return e.$disabled?t=e.$theme.colors.toggleFillDisabled:e.$checked&&e.$error?t=e.$theme.colors.tickFillErrorSelected:e.$checked&&(t=e.$theme.colors.toggleFillChecked),{backgroundColor:t,borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(e.$theme.colors.accent):e.$isHovered&&!e.$disabled?e.$theme.lighting.shadow500:e.$theme.lighting.shadow400,outline:"none",height:e.$theme.sizing.scale700,width:e.$theme.sizing.scale700,transform:e.$checked?"translateX(".concat(e.$theme.direction==="rtl"?"-100%":"100%",")"):null,transition:"transform ".concat(e.$theme.animation.timing200)}});z.displayName="Toggle";z.displayName="Toggle";var D=x("div",function(e){var t=e.$theme.colors.toggleTrackFill;return e.$disabled?t=e.$theme.colors.toggleTrackFillDisabled:e.$error&&e.$checked&&(t=e.$theme.colors.tickFillError),{alignItems:"center",backgroundColor:t,borderTopLeftRadius:"7px",borderTopRightRadius:"7px",borderBottomRightRadius:"7px",borderBottomLeftRadius:"7px",display:"flex",height:e.$theme.sizing.scale550,marginTop:e.$theme.sizing.scale200,marginBottom:e.$theme.sizing.scale100,marginLeft:e.$theme.sizing.scale200,marginRight:e.$theme.sizing.scale100,width:e.$theme.sizing.scale1000}});D.displayName="ToggleTrack";D.displayName="ToggleTrack";function E(e){"@babel/helpers - typeof";return E=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},E(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},$.apply(this,arguments)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Le(e,t,o){return t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fe(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&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},B(e,t)}function Ce(e){var t=Pe();return function(){var r=F(e),i;if(t){var l=F(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Oe(this,i)}}function Oe(e,t){if(t&&(E(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pe(){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 F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},F(e)}function p(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var Ee=function(t){return t.stopPropagation()},Y=function(e){Fe(o,e);var t=Ce(o);function o(){var r;Re(this,o);for(var i=arguments.length,l=new Array(i),n=0;n<i;n++)l[n]=arguments[n];return r=t.call.apply(t,[this].concat(l)),p(v(r),"state",{isFocused:r.props.autoFocus||!1,isFocusVisible:!1,isHovered:!1,isActive:!1}),p(v(r),"onMouseEnter",function(c){r.setState({isHovered:!0}),r.props.onMouseEnter(c)}),p(v(r),"onMouseLeave",function(c){r.setState({isHovered:!1,isActive:!1}),r.props.onMouseLeave(c)}),p(v(r),"onMouseDown",function(c){r.setState({isActive:!0}),r.props.onMouseDown(c)}),p(v(r),"onMouseUp",function(c){r.setState({isActive:!1}),r.props.onMouseUp(c)}),p(v(r),"onFocus",function(c){r.setState({isFocused:!0}),r.props.onFocus(c),ae(c)&&r.setState({isFocusVisible:!0})}),p(v(r),"onBlur",function(c){r.setState({isFocused:!1}),r.props.onBlur(c),r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1})}),r}return Le(o,[{key:"componentDidMount",value:function(){var i=this.props,l=i.autoFocus,n=i.inputRef;l&&n.current&&n.current.focus()}},{key:"render",value:function(){var i=this.props,l=i.overrides,n=l===void 0?{}:l,c=i.onChange,a=i.labelPlacement,s=a===void 0?this.props.checkmarkType===L.toggle?"left":"right":a,k=i.inputRef,u=i.isIndeterminate,h=i.error,b=i.disabled,R=i.value,f=i.name,m=i.type,d=i.checked,C=i.children,O=i.required,Z=i.title,j=n.Root,V=n.Checkmark,W=n.Label,A=n.Input,N=n.Toggle,U=n.ToggleTrack,K=T(j)||M,J=T(V)||_,Q=T(W)||I,ee=T(A)||H,te=T(N)||z,re=T(U)||D,oe={onChange:c,onFocus:this.onFocus,onBlur:this.onBlur},ie={onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},y={$isFocused:this.state.isFocused,$isFocusVisible:this.state.isFocusVisible,$isHovered:this.state.isHovered,$isActive:this.state.isActive,$error:h,$checked:d,$isIndeterminate:u,$required:O,$disabled:b,$value:R},X=C&&g.createElement(Q,$({$labelPlacement:s},y,w(W)),this.props.containsInteractiveElement?g.createElement("div",{onClick:function(ne){return ne.preventDefault()}},C):C);return g.createElement(K,$({"data-baseweb":"checkbox",title:Z||null,$labelPlacement:s},y,ie,w(j)),(s==="top"||s==="left")&&X,this.props.checkmarkType===L.toggle?g.createElement(re,$({},y,w(U)),g.createElement(te,$({},y,w(N)))):g.createElement(J,$({},y,w(V))),g.createElement(ee,$({value:R,name:f,checked:d,required:O,"aria-label":this.props["aria-label"]||this.props.ariaLabel,"aria-checked":u?"mixed":d,"aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":h||null,"aria-required":O||null,disabled:b,type:m,ref:k,onClick:Ee},y,oe,w(A))),(s==="bottom"||s==="right")&&X)}}]),o}(g.Component);p(Y,"defaultProps",{overrides:{},checked:!1,containsInteractiveElement:!1,disabled:!1,autoFocus:!1,isIndeterminate:!1,inputRef:g.createRef(),error:!1,type:"checkbox",checkmarkType:L.default,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Be({width:e,element:t,disabled:o,widgetMgr:r,fragmentId:i}){var R;const[l,n]=$e({getStateFromWidgetMgr:Me,getDefaultStateFromProto:_e,getCurrStateFromProto:Ie,updateWidgetMgrState:He,element:t,widgetMgr:r,fragmentId:i}),c=g.useCallback(f=>{n({value:f.target.checked,fromUi:!0})},[n]),a=le(),{colors:s,spacing:k,sizes:u}=a,h=ce(a),b=o?s.fadedText40:s.bodyText;return S(pe,{className:"row-widget stCheckbox","data-testid":"stCheckbox",width:e,children:S(Y,{checked:l,disabled:o,onChange:c,"aria-label":t.label,checkmarkType:t.type===se.StyleType.TOGGLE?L.toggle:L.default,labelPlacement:ke.right,overrides:{Root:{style:({$isFocusVisible:f})=>({marginBottom:k.none,marginTop:k.none,backgroundColor:f?s.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:f})=>{let m=h?s.bgColor:s.bodyText;return o&&(m=h?s.gray70:s.gray90),{width:`calc(${u.checkbox} - ${a.spacing.twoXS})`,height:`calc(${u.checkbox} - ${a.spacing.twoXS})`,transform:f?`translateX(${u.checkbox})`:"",backgroundColor:m,boxShadow:""}}},ToggleTrack:{style:({$checked:f,$isHovered:m})=>{let d=s.fadedText40;return m&&!o&&(d=s.fadedText20),f&&!o&&(d=s.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:a.spacing.twoXS,paddingLeft:a.spacing.threeXS,paddingRight:a.spacing.threeXS,width:`calc(2 * ${u.checkbox})`,minWidth:`calc(2 * ${u.checkbox})`,height:u.checkbox,minHeight:u.checkbox,borderBottomLeftRadius:a.radii.full,borderTopLeftRadius:a.radii.full,borderBottomRightRadius:a.radii.full,borderTopRightRadius:a.radii.full,backgroundColor:d}}},Checkmark:{style:({$isFocusVisible:f,$checked:m})=>{const d=m&&!o?s.primary:s.fadedText40;return{outline:0,width:u.checkbox,height:u.checkbox,marginTop:a.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:f&&m?`0 0 0 0.2rem ${ue(s.primary,.5)}`:"",borderLeftWidth:u.borderWidth,borderRightWidth:u.borderWidth,borderTopWidth:u.borderWidth,borderBottomWidth:u.borderWidth,borderLeftColor:d,borderRightColor:d,borderTopColor:d,borderBottomColor:d}}},Label:{style:{lineHeight:a.lineHeights.small,paddingLeft:a.spacing.sm,position:"relative",color:b}}},children:de(ve,{visibility:fe((R=t.labelVisibility)==null?void 0:R.value),"data-testid":"stWidgetLabel",children:[S(ge,{source:t.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),t.help&&S(he,{color:b,children:S(be,{content:t.help,placement:me.TOP_RIGHT})})]})})})}function Me(e,t){return e.getBoolValue(t)}function _e(e){return e.default??null}function Ie(e){return e.value??null}function He(e,t,o,r){t.setBoolValue(e,o.value,{fromUi:o.fromUi},r)}const We=g.memo(Be);export{We as default};
9
+ `)),h=l.borders.checkboxBorderRadius,b=ye(e);return{flex:"0 0 auto",transitionDuration:a.timing200,transitionTimingFunction:a.easeOutCurve,transitionProperty:"background-image, border-color, background-color",width:c.scale700,height:c.scale700,left:"4px",top:"4px",boxSizing:"border-box",borderLeftStyle:"solid",borderRightStyle:"solid",borderTopStyle:"solid",borderBottomStyle:"solid",borderLeftWidth:"3px",borderRightWidth:"3px",borderTopWidth:"3px",borderBottomWidth:"3px",borderLeftColor:b,borderRightColor:b,borderTopColor:b,borderBottomColor:b,borderTopLeftRadius:h,borderTopRightRadius:h,borderBottomRightRadius:h,borderBottomLeftRadius:h,outline:n&&t?"3px solid ".concat(l.colors.accent):"none",display:"inline-block",verticalAlign:"middle",backgroundImage:i?"url('data:image/svg+xml,".concat(k,"');"):t?"url('data:image/svg+xml,".concat(u,"');"):null,backgroundColor:we(e),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain",marginTop:l.sizing.scale0,marginBottom:l.sizing.scale0,marginLeft:l.sizing.scale0,marginRight:l.sizing.scale0}});_.displayName="Checkmark";_.displayName="Checkmark";var I=x("div",function(e){var t=e.$theme,o=t.typography;return P(P(P({verticalAlign:"middle"},Te(e)),{},{color:xe(e)},o.LabelMedium),{},{lineHeight:"24px"})});I.displayName="Label";I.displayName="Label";var H=x("input",{opacity:0,width:0,height:0,overflow:"hidden",margin:0,padding:0,position:"absolute"});H.displayName="Input";H.displayName="Input";var j=x("div",function(e){var t=e.$theme.colors.toggleFill;return e.$disabled?t=e.$theme.colors.toggleFillDisabled:e.$checked&&e.$error?t=e.$theme.colors.tickFillErrorSelected:e.$checked&&(t=e.$theme.colors.toggleFillChecked),{backgroundColor:t,borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible?"0 0 0 3px ".concat(e.$theme.colors.accent):e.$isHovered&&!e.$disabled?e.$theme.lighting.shadow500:e.$theme.lighting.shadow400,outline:"none",height:e.$theme.sizing.scale700,width:e.$theme.sizing.scale700,transform:e.$checked?"translateX(".concat(e.$theme.direction==="rtl"?"-100%":"100%",")"):null,transition:"transform ".concat(e.$theme.animation.timing200)}});j.displayName="Toggle";j.displayName="Toggle";var z=x("div",function(e){var t=e.$theme.colors.toggleTrackFill;return e.$disabled?t=e.$theme.colors.toggleTrackFillDisabled:e.$error&&e.$checked&&(t=e.$theme.colors.tickFillError),{alignItems:"center",backgroundColor:t,borderTopLeftRadius:"7px",borderTopRightRadius:"7px",borderBottomRightRadius:"7px",borderBottomLeftRadius:"7px",display:"flex",height:e.$theme.sizing.scale550,marginTop:e.$theme.sizing.scale200,marginBottom:e.$theme.sizing.scale100,marginLeft:e.$theme.sizing.scale200,marginRight:e.$theme.sizing.scale100,width:e.$theme.sizing.scale1000}});z.displayName="ToggleTrack";z.displayName="ToggleTrack";function E(e){"@babel/helpers - typeof";return E=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},E(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},$.apply(this,arguments)}function Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Se(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fe(e,t,o){return t&&Se(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Le(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&&B(e,t)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},B(e,t)}function Ce(e){var t=Pe();return function(){var r=L(e),i;if(t){var l=L(this).constructor;i=Reflect.construct(r,arguments,l)}else i=r.apply(this,arguments);return Oe(this,i)}}function Oe(e,t){if(t&&(E(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return v(e)}function v(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pe(){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 L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},L(e)}function p(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var Ee=function(t){return t.stopPropagation()},Y=function(e){Le(o,e);var t=Ce(o);function o(){var r;Re(this,o);for(var i=arguments.length,l=new Array(i),n=0;n<i;n++)l[n]=arguments[n];return r=t.call.apply(t,[this].concat(l)),p(v(r),"state",{isFocused:r.props.autoFocus||!1,isFocusVisible:!1,isHovered:!1,isActive:!1}),p(v(r),"onMouseEnter",function(c){r.setState({isHovered:!0}),r.props.onMouseEnter(c)}),p(v(r),"onMouseLeave",function(c){r.setState({isHovered:!1,isActive:!1}),r.props.onMouseLeave(c)}),p(v(r),"onMouseDown",function(c){r.setState({isActive:!0}),r.props.onMouseDown(c)}),p(v(r),"onMouseUp",function(c){r.setState({isActive:!1}),r.props.onMouseUp(c)}),p(v(r),"onFocus",function(c){r.setState({isFocused:!0}),r.props.onFocus(c),ae(c)&&r.setState({isFocusVisible:!0})}),p(v(r),"onBlur",function(c){r.setState({isFocused:!1}),r.props.onBlur(c),r.state.isFocusVisible!==!1&&r.setState({isFocusVisible:!1})}),r}return Fe(o,[{key:"componentDidMount",value:function(){var i=this.props,l=i.autoFocus,n=i.inputRef;l&&n.current&&n.current.focus()}},{key:"render",value:function(){var i=this.props,l=i.overrides,n=l===void 0?{}:l,c=i.onChange,a=i.labelPlacement,s=a===void 0?this.props.checkmarkType===F.toggle?"left":"right":a,k=i.inputRef,u=i.isIndeterminate,h=i.error,b=i.disabled,R=i.value,f=i.name,m=i.type,d=i.checked,C=i.children,O=i.required,Z=i.title,D=n.Root,V=n.Checkmark,W=n.Label,A=n.Input,N=n.Toggle,U=n.ToggleTrack,K=T(D)||M,J=T(V)||_,Q=T(W)||I,ee=T(A)||H,te=T(N)||j,re=T(U)||z,oe={onChange:c,onFocus:this.onFocus,onBlur:this.onBlur},ie={onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp},y={$isFocused:this.state.isFocused,$isFocusVisible:this.state.isFocusVisible,$isHovered:this.state.isHovered,$isActive:this.state.isActive,$error:h,$checked:d,$isIndeterminate:u,$required:O,$disabled:b,$value:R},X=C&&g.createElement(Q,$({$labelPlacement:s},y,w(W)),this.props.containsInteractiveElement?g.createElement("div",{onClick:function(ne){return ne.preventDefault()}},C):C);return g.createElement(K,$({"data-baseweb":"checkbox",title:Z||null,$labelPlacement:s},y,ie,w(D)),(s==="top"||s==="left")&&X,this.props.checkmarkType===F.toggle?g.createElement(re,$({},y,w(U)),g.createElement(te,$({},y,w(N)))):g.createElement(J,$({},y,w(V))),g.createElement(ee,$({value:R,name:f,checked:d,required:O,"aria-label":this.props["aria-label"]||this.props.ariaLabel,"aria-checked":u?"mixed":d,"aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":h||null,"aria-required":O||null,disabled:b,type:m,ref:k,onClick:Ee},y,oe,w(A))),(s==="bottom"||s==="right")&&X)}}]),o}(g.Component);p(Y,"defaultProps",{overrides:{},checked:!1,containsInteractiveElement:!1,disabled:!1,autoFocus:!1,isIndeterminate:!1,inputRef:g.createRef(),error:!1,type:"checkbox",checkmarkType:F.default,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function Be({width:e,element:t,disabled:o,widgetMgr:r,fragmentId:i}){var R;const[l,n]=$e({getStateFromWidgetMgr:Me,getDefaultStateFromProto:_e,getCurrStateFromProto:Ie,updateWidgetMgrState:He,element:t,widgetMgr:r,fragmentId:i}),c=g.useCallback(f=>{n({value:f.target.checked,fromUi:!0})},[n]),a=le(),{colors:s,spacing:k,sizes:u}=a,h=ce(a),b=o?s.fadedText40:s.bodyText;return S(pe,{className:"row-widget stCheckbox","data-testid":"stCheckbox",width:e,children:S(Y,{checked:l,disabled:o,onChange:c,"aria-label":t.label,checkmarkType:t.type===se.StyleType.TOGGLE?F.toggle:F.default,labelPlacement:ke.right,overrides:{Root:{style:({$isFocusVisible:f})=>({marginBottom:k.none,marginTop:k.none,backgroundColor:f?s.darkenedBgMix25:"",display:"flex",alignItems:"start"})},Toggle:{style:({$checked:f})=>{let m=h?s.bgColor:s.bodyText;return o&&(m=h?s.gray70:s.gray90),{width:`calc(${u.checkbox} - ${a.spacing.twoXS})`,height:`calc(${u.checkbox} - ${a.spacing.twoXS})`,transform:f?`translateX(${u.checkbox})`:"",backgroundColor:m,boxShadow:""}}},ToggleTrack:{style:({$checked:f,$isHovered:m})=>{let d=s.fadedText40;return m&&!o&&(d=s.fadedText20),f&&!o&&(d=s.primary),{marginRight:0,marginLeft:0,marginBottom:0,marginTop:a.spacing.twoXS,paddingLeft:a.spacing.threeXS,paddingRight:a.spacing.threeXS,width:`calc(2 * ${u.checkbox})`,minWidth:`calc(2 * ${u.checkbox})`,height:u.checkbox,minHeight:u.checkbox,borderBottomLeftRadius:a.radii.full,borderTopLeftRadius:a.radii.full,borderBottomRightRadius:a.radii.full,borderTopRightRadius:a.radii.full,backgroundColor:d}}},Checkmark:{style:({$isFocusVisible:f,$checked:m})=>{const d=m&&!o?s.primary:s.fadedText40;return{outline:0,width:u.checkbox,height:u.checkbox,marginTop:a.spacing.twoXS,marginLeft:0,marginBottom:0,boxShadow:f&&m?`0 0 0 0.2rem ${ue(s.primary,.5)}`:"",borderLeftWidth:u.borderWidth,borderRightWidth:u.borderWidth,borderTopWidth:u.borderWidth,borderBottomWidth:u.borderWidth,borderLeftColor:d,borderRightColor:d,borderTopColor:d,borderBottomColor:d}}},Label:{style:{lineHeight:a.lineHeights.small,paddingLeft:a.spacing.sm,position:"relative",color:b}}},children:de(ve,{visibility:fe((R=t.labelVisibility)==null?void 0:R.value),"data-testid":"stWidgetLabel",children:[S(ge,{source:t.label,allowHTML:!1,isLabel:!0,largerLabel:!0}),t.help&&S(he,{color:b,children:S(be,{content:t.help,placement:me.TOP_RIGHT})})]})})})}function Me(e,t){return e.getBoolValue(t)}function _e(e){return e.default??null}function Ie(e){return e.value??null}function He(e,t,o,r){t.setBoolValue(e,o.value,{fromUi:o.fromUi},r)}const We=g.memo(Be);export{We as default};
@@ -1 +1 @@
1
- import{r as i,j as g,a$ as m,bj as b}from"./index.Dq0mtJUi.js";import{a as f}from"./useBasicWidgetState.yEDDcbjV.js";import"./FormClearHelper.YHWCggTS.js";const p=(t,e)=>t.getStringValue(e),C=t=>t.default??null,d=t=>t.value??null,S=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},V=({element:t,disabled:e,widgetMgr:r,width:o,fragmentId:s})=>{var l;const[u,a]=f({getStateFromWidgetMgr:p,getDefaultStateFromProto:C,getCurrStateFromProto:d,updateWidgetMgrState:S,element:t,widgetMgr:r,fragmentId:s}),n=i.useCallback(c=>{a({value:c,fromUi:!0})},[a]);return g(b,{label:t.label,labelVisibility:m((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:n,disabled:e,width:o,value:u})},v=i.memo(V);export{v as default};
1
+ import{r as i,j as g,bc as b,bw as m}from"./index.B8MC65SU.js";import{a as f}from"./useBasicWidgetState.ZoM17KXF.js";import"./FormClearHelper.0CIwSBFI.js";const p=(t,e)=>t.getStringValue(e),C=t=>t.default??null,d=t=>t.value??null,S=(t,e,r,o)=>{e.setStringValue(t,r.value,{fromUi:r.fromUi},o)},V=({element:t,disabled:e,widgetMgr:r,width:o,fragmentId:s})=>{var l;const[u,a]=f({getStateFromWidgetMgr:p,getDefaultStateFromProto:C,getCurrStateFromProto:d,updateWidgetMgrState:S,element:t,widgetMgr:r,fragmentId:s}),n=i.useCallback(c=>{a({value:c,fromUi:!0})},[a]);return g(m,{label:t.label,labelVisibility:b((l=t.labelVisibility)==null?void 0:l.value),help:t.help,onChange:n,disabled:e,width:o,value:u})},v=i.memo(V);export{v as default};
@@ -1 +1 @@
1
- import{aH as i,j as e,aI as c,aZ as B,aG as f,aJ as h}from"./index.Dq0mtJUi.js";function m(s){const{disabled:l,element:t,widgetMgr:o,width:n,fragmentId:r}=s,d={width:n};let a=i.SECONDARY;t.type==="primary"?a=i.PRIMARY:t.type==="tertiary"&&(a=i.TERTIARY);const u=t.help?n:!0;return e("div",{className:"stButton","data-testid":"stButton",style:d,children:e(c,{help:t.help,children:e(B,{kind:a,size:f.SMALL,disabled:l,fluidWidth:t.useContainerWidth?u:!1,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e(h,{icon:t.icon,label:t.label})})})})}export{m as default};
1
+ import{aU as i,j as e,aV as c,ba as B,aT as f,aW as h}from"./index.B8MC65SU.js";function m(s){const{disabled:l,element:t,widgetMgr:o,width:n,fragmentId:r}=s,d={width:n};let a=i.SECONDARY;t.type==="primary"?a=i.PRIMARY:t.type==="tertiary"&&(a=i.TERTIARY);const u=t.help?n:!0;return e("div",{className:"stButton","data-testid":"stButton",style:d,children:e(c,{help:t.help,children:e(B,{kind:a,size:f.SMALL,disabled:l,fluidWidth:t.useContainerWidth?u:!1,onClick:()=>o.setTriggerValue(t,{fromUi:!0},r),children:e(h,{icon:t.icon,label:t.label})})})})}export{m as default};
@@ -0,0 +1 @@
1
+ import{n as R,r as o,a0 as U,ca as I,am as k,j as u,bc as z,bp as H,bd as L,aY as B,be as D,cc as j}from"./index.B8MC65SU.js";import{u as O}from"./uniqueId.B7repv29.js";import{u as _,a as K,b as q}from"./useOnInputChange.DK_jsnv_.js";import{a as w}from"./useBasicWidgetState.ZoM17KXF.js";import{I as A}from"./InputInstructions.BGz0VNnm.js";import{I as G}from"./input.BX19stYv.js";import"./inputUtils.CQWz5UKz.js";import"./FormClearHelper.0CIwSBFI.js";import"./base-input.Fk16kR45.js";const N=R("div",{target:"e6m0wlp0"})(({width:e})=>({position:"relative",width:e}));function rt({disabled:e,element:t,widgetMgr:s,width:n,fragmentId:m}){var g;const[r,l]=o.useState(S(s,t)??null),[i,d]=o.useState(!1),W=o.useCallback(()=>{l(t.default??null),d(!0)},[t.default]),[y,p]=w({getStateFromWidgetMgr:S,getDefaultStateFromProto:Y,getCurrStateFromProto:$,updateWidgetMgrState:J,element:t,widgetMgr:s,fragmentId:m,onFormCleared:W});_(y,r,l,i);const[T,h]=o.useState(!1),a=U(),[f]=o.useState(()=>O("text_input_")),{placeholder:x,formId:b}=t,c=o.useCallback(()=>{d(!1),p({value:r,fromUi:!0})},[r,p]),C=I({formId:b})?s.allowFormEnterToSubmit(b):i,V=T&&n>a.breakpoints.hideWidgetDetails,F=o.useCallback(()=>{i&&c(),h(!1)},[i,c]),v=o.useCallback(()=>{h(!0)},[]),E=K({formId:t.formId,maxChars:t.maxChars,setDirty:d,setUiValue:l,setValueWithSource:p}),P=q(t.formId,c,i,s,m);return k(N,{className:"stTextInput","data-testid":"stTextInput",width:n,children:[u(D,{label:t.label,disabled:e,labelVisibility:z((g=t.labelVisibility)==null?void 0:g.value),htmlFor:f,children:t.help&&u(H,{children:u(L,{content:t.help,placement:B.TOP_RIGHT})})}),u(G,{value:r??"",placeholder:x,onBlur:F,onFocus:v,onChange:E,onKeyPress:P,"aria-label":t.label,disabled:e,id:f,type:Q(t),autoComplete:t.autocomplete,overrides:{Input:{style:{minWidth:0,"::placeholder":{opacity:"0.7"},lineHeight:a.lineHeights.inputWidget,paddingRight:a.spacing.sm,paddingLeft:a.spacing.sm,paddingBottom:a.spacing.sm,paddingTop:a.spacing.sm}},Root:{props:{"data-testid":"stTextInputRootElement"},style:{height:a.sizes.minElementHeight,borderLeftWidth:a.sizes.borderWidth,borderRightWidth:a.sizes.borderWidth,borderTopWidth:a.sizes.borderWidth,borderBottomWidth:a.sizes.borderWidth}}}}),V&&u(A,{dirty:i,value:r??"",maxLength:t.maxChars,inForm:I({formId:t.formId}),allowEnterToSubmit:C})]})}function S(e,t){return e.getStringValue(t)??null}function Y(e){return e.default??null}function $(e){return e.value??null}function J(e,t,s,n){t.setStringValue(e,s.value,{fromUi:s.fromUi},n)}function Q(e){return e.type===j.Type.PASSWORD?"password":"text"}export{rt as default};