streamlit-nightly 1.44.2.dev20250404__py3-none-any.whl → 1.44.2.dev20250407__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/elements/lib/built_in_chart_utils.py +47 -36
- streamlit/elements/lib/event_utils.py +7 -5
- streamlit/elements/markdown.py +1 -1
- streamlit/elements/write.py +3 -1
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{FileDownload.esm.BcMiTwVB.js → FileDownload.esm.76_siAan.js} +1 -1
- streamlit/static/static/js/{FileHelper.DihUx7xB.js → FileHelper.C-t60d9I.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.BCWMbvg-.js → FormClearHelper.BxIPIP5L.js} +1 -1
- streamlit/static/static/js/{Hooks.DxswZylT.js → Hooks.CsneG6D-.js} +1 -1
- streamlit/static/static/js/{InputInstructions.C3IYQW66.js → InputInstructions.CzJqQPUo.js} +1 -1
- streamlit/static/static/js/{ProgressBar.DsZ44eAG.js → ProgressBar.rnqmSFc7.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.CJo1XNP4.js → RenderInPortalIfExists.BT1iglcq.js} +1 -1
- streamlit/static/static/js/{Toolbar.zC9RMqvO.js → Toolbar.C-G8EZDL.js} +1 -1
- streamlit/static/static/js/{base-input.BYAE3JfB.js → base-input.BE23gnVe.js} +1 -1
- streamlit/static/static/js/{checkbox.B4yv-nA3.js → checkbox.5KG91rAf.js} +1 -1
- streamlit/static/static/js/{createSuper.BYXiuZs5.js → createSuper.Djpx0JHn.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BRSP4Q5h.js → data-grid-overlay-editor.D5ZEJ6-g.js} +1 -1
- streamlit/static/static/js/{downloader.GnadH9DP.js → downloader.2PLh9ewR.js} +1 -1
- streamlit/static/static/js/{es6.D8RYB6b-.js → es6.Co_R4Vrv.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.CjNDfwt8.js → iframeResizer.contentWindow.xC-s1Xv_.js} +1 -1
- streamlit/static/static/js/{index.W1F0OM9G.js → index.3lMrZLLw.js} +1 -1
- streamlit/static/static/js/{index.Kzz4gUPJ.js → index.5KFYXBbC.js} +4 -4
- streamlit/static/static/js/{index.CPBJk1lp.js → index.7G_phRf1.js} +1 -1
- streamlit/static/static/js/{index.CdPagNhq.js → index.7c-G8UGV.js} +1 -1
- streamlit/static/static/js/{index.BRhhwv-C.js → index.BDCmLPQN.js} +1 -1
- streamlit/static/static/js/{index.CDSPljq3.js → index.BDb06VAk.js} +1 -1
- streamlit/static/static/js/{index.BPtOLSNm.js → index.BLuvs8YB.js} +1 -1
- streamlit/static/static/js/{index.C_2tXwz4.js → index.BhQfRF6s.js} +1 -1
- streamlit/static/static/js/{index.PKWaMjh6.js → index.BhwLaup4.js} +1 -1
- streamlit/static/static/js/{index.DuHTqH_9.js → index.C4Lfn2XI.js} +1 -1
- streamlit/static/static/js/{index.Cxfze3Mk.js → index.CD3nk9Fu.js} +1 -1
- streamlit/static/static/js/index.CHq7UPqh.js +1 -0
- streamlit/static/static/js/{index.Dgn3lt9J.js → index.CL9k-WRa.js} +1 -1
- streamlit/static/static/js/{index.CbT7y4TK.js → index.CLlijDQ8.js} +1 -1
- streamlit/static/static/js/{index.B7qpqtD6.js → index.CMDu4q8N.js} +1 -1
- streamlit/static/static/js/{index.CzrE9emY.js → index.CNErThK-.js} +1 -1
- streamlit/static/static/js/{index.BbAJYVXj.js → index.CVpc4758.js} +1 -1
- streamlit/static/static/js/{index.DOpTXgh3.js → index.CbEMdCQd.js} +1 -1
- streamlit/static/static/js/{index.CBxn7sji.js → index.CbPbNHEK.js} +1 -1
- streamlit/static/static/js/{index.DKCBo3om.js → index.CdIt7R38.js} +1 -1
- streamlit/static/static/js/{index.CRMmBBDq.js → index.Cm77Rq1x.js} +1 -1
- streamlit/static/static/js/{index.B3WIarqf.js → index.CwBkmOEf.js} +1 -1
- streamlit/static/static/js/{index.BC5wAIFM.js → index.D8OA-3wz.js} +1 -1
- streamlit/static/static/js/{index.UKdSrnn_.js → index.DEqbXo0i.js} +1 -1
- streamlit/static/static/js/{index.CkZkpK4-.js → index.DIQp9MZY.js} +1 -1
- streamlit/static/static/js/{index.DuV4oQbx.js → index.DNsBOU6p.js} +5 -5
- streamlit/static/static/js/{index.NmHUotTf.js → index.DSs7V2Hz.js} +1 -1
- streamlit/static/static/js/{index.nEP2fCOO.js → index.DUB8mvGX.js} +1 -1
- streamlit/static/static/js/{index.BDlCQX5I.js → index.DZ1bfx6i.js} +1 -1
- streamlit/static/static/js/{index.CrEVoSTM.js → index.DhlyA8r5.js} +1 -1
- streamlit/static/static/js/{index.Dcg-1sHd.js → index.DpkiOR-s.js} +1 -1
- streamlit/static/static/js/{index.BqkJyhUo.js → index.DyhGBqck.js} +1 -1
- streamlit/static/static/js/{index.DRrj4vJq.js → index.G5BB57Lk.js} +1 -1
- streamlit/static/static/js/{index.CzUmKu1R.js → index.KrzfTD2f.js} +1 -1
- streamlit/static/static/js/{index.Bxba7-Vj.js → index.LEPdg6O5.js} +1 -1
- streamlit/static/static/js/{index.Dv3BUspB.js → index.fNuc0k1L.js} +1 -1
- streamlit/static/static/js/{index.Dg7ksnn2.js → index.uyVXCnCm.js} +1 -1
- streamlit/static/static/js/{input.B970MGo0.js → input.Dj1y6w2g.js} +1 -1
- streamlit/static/static/js/{memory.Bds5EpZ8.js → memory.ClgbFfRV.js} +1 -1
- streamlit/static/static/js/{mergeWith.zOP131Mw.js → mergeWith.p3MKF-Jv.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.BxGwsHaY.js → number-overlay-editor.DSy8B0d4.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.CngyaSWa.js → possibleConstructorReturn.PqdlS9VN.js} +1 -1
- streamlit/static/static/js/{sandbox.COLAm094.js → sandbox.JYNAoHIv.js} +1 -1
- streamlit/static/static/js/{textarea.DrttbSkr.js → textarea.BRz2PqBl.js} +1 -1
- streamlit/static/static/js/{timepicker.D02-j0jX.js → timepicker.CLWT7Rjp.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.EMFv73a7.js → toConsumableArray.BesBwzeG.js} +1 -1
- streamlit/static/static/js/{uniqueId.CdAsXj9D.js → uniqueId.HRwxnbrd.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.BDsVFj3k.js → useBasicWidgetState.QU3v4y2-.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.C8C1na1y.js → useOnInputChange.BbhxtdXj.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.BBFCh9IR.js → withFullScreenWrapper.BhOSdZrO.js} +1 -1
- streamlit/type_util.py +1 -1
- {streamlit_nightly-1.44.2.dev20250404.dist-info → streamlit_nightly-1.44.2.dev20250407.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.44.2.dev20250404.dist-info → streamlit_nightly-1.44.2.dev20250407.dist-info}/RECORD +77 -77
- streamlit/static/static/js/index.BD4E56NB.js +0 -1
- {streamlit_nightly-1.44.2.dev20250404.data → streamlit_nightly-1.44.2.dev20250407.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.44.2.dev20250404.dist-info → streamlit_nightly-1.44.2.dev20250407.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.44.2.dev20250404.dist-info → streamlit_nightly-1.44.2.dev20250407.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.44.2.dev20250404.dist-info → streamlit_nightly-1.44.2.dev20250407.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{n as e,r as a,C as t,j as r,aC as o}from"./index.
|
1
|
+
import{n as e,r as a,C as t,j as r,aC as o}from"./index.5KFYXBbC.js";import{P as i}from"./ProgressBar.rnqmSFc7.js";const l=e("div",{target:"e1675qd10"})(({theme:s})=>({paddingBottom:s.spacing.sm,lineHeight:"normal"}));function n({element:s}){return t("div",{className:"stProgress","data-testid":"stProgress",children:[r(l,{children:r(o,{source:s.text,allowHTML:!1,isLabel:!0})}),r(i,{value:s.value})]})}const m=a.memo(n);export{m as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r,E as Q,_ as Y,cC as y,M as m,O as Z,l as mt,n as D,z as gt,bh as ht,cs as It,H as K,C as z,j as c,br as yt,bF as Ct,bs as Tt,ba as wt,bt as St,D as vt,bo as M}from"./index.
|
1
|
+
import{r,E as Q,_ as Y,cC as y,M as m,O as Z,l as mt,n as D,z as gt,bh as ht,cs as It,H as K,C as z,j as c,br as yt,bF as Ct,bs as Tt,ba as wt,bt as St,D as vt,bo as M}from"./index.5KFYXBbC.js";import{u as Vt}from"./uniqueId.HRwxnbrd.js";import{u as kt}from"./FormClearHelper.BxIPIP5L.js";import{I as Rt}from"./InputInstructions.CzJqQPUo.js";import{s as xt}from"./sprintf.D7DtBTRn.js";import{I as Dt}from"./input.Dj1y6w2g.js";import"./base-input.BE23gnVe.js";var tt=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(Q,Y({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M0 3v2h8V3H0z"}))});tt.displayName="Minus";var et=r.forwardRef(function(t,e){var a={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(Q,Y({iconAttrs:a,iconVerticalAlign:"middle",iconViewBox:"0 0 8 8"},t,{ref:e}),r.createElement("path",{d:"M3 0v3H0v2h3v3h2V5h3V3H5V0H3z"}))});et.displayName="Plus";const Et=mt.getLogger("NumberInput");function Nt(t){return m(t)||t===""?void 0:t}const W=({value:t,format:e,step:a,dataType:b})=>{if(m(t))return null;let o=Nt(e);if(m(o)&&Z(a)){const d=a.toString();b===y.DataType.FLOAT&&a!==0&&d.includes(".")&&(o=`%0.${d.split(".")[1].length}f`)}if(m(o))return t.toString();try{return xt.sprintf(o,t)}catch(d){return Et.warn(`Error in sprintf(${o}, ${t}): ${d}`),String(t)}},Ft=(t,e,a)=>m(t)?!1:t-e>=a,zt=(t,e,a)=>m(t)?!1:t+e<=a,Wt=t=>(t.element.dataType===y.DataType.INT?t.widgetMgr.getIntValue(t.element):t.widgetMgr.getDoubleValue(t.element))??t.element.default??null,q=({step:t,dataType:e})=>t||(e===y.DataType.INT?1:.01),Bt=D("div",{target:"e5tuigk0"})(({theme:t})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",height:t.sizes.minElementHeight,borderWidth:t.sizes.borderWidth,borderStyle:"solid",borderColor:t.colors.widgetBorderColor??t.colors.secondaryBg,transitionDuration:"200ms",transitionProperty:"border",transitionTimingFunction:"cubic-bezier(0.2, 0.8, 0.4, 1)",borderRadius:t.radii.default,overflow:"hidden","&.focused":{borderColor:t.colors.primary},input:{MozAppearance:"textfield","&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{WebkitAppearance:"none",margin:t.spacing.none}}})),Lt=D("div",{target:"e5tuigk1"})({display:"flex",flexDirection:"row",alignSelf:"stretch"}),J=D("button",{target:"e5tuigk2"})(({theme:t})=>({margin:t.spacing.none,border:"none",height:t.sizes.full,display:"flex",alignItems:"center",width:t.sizes.numberInputControlsWidth,justifyContent:"center",color:t.colors.bodyText,transition:"color 300ms, backgroundColor 300ms",backgroundColor:t.colors.secondaryBg,"&:hover:enabled, &:focus:enabled":{color:t.colors.white,backgroundColor:t.colors.primary,transition:"none",outline:"none"},"&:active":{outline:"none",border:"none"},"&:last-of-type":{borderTopRightRadius:t.radii.default,borderBottomRightRadius:t.radii.default},"&:disabled":{cursor:"not-allowed",color:t.colors.fadedText40}})),At=D("div",{target:"e5tuigk3"})(({theme:t,clearable:e})=>({position:"absolute",marginRight:t.spacing.twoXS,left:0,right:`calc(${t.sizes.numberInputControlsWidth} * 2 + ${e?"1em":"0em"})`})),Ht=({disabled:t,element:e,widgetMgr:a,fragmentId:b})=>{var X;const o=gt(),{dataType:d,id:S,formId:p,default:B,format:L,icon:C,min:g,max:h}=e,[A,ot]=ht(),[s,rt]=r.useState(()=>q(e)),H=Wt({element:e,widgetMgr:a}),[I,T]=r.useState(!1),[l,w]=r.useState(H),[P,v]=r.useState(()=>W({value:H,...e,step:s})),[U,$]=r.useState(!1),V=r.useRef(null),O=r.useRef(Vt("number_input_")),k=Ft(l,s,g),R=zt(l,s,h),j=It({formId:p}),nt=j?a.allowFormEnterToSubmit(p):I,at=U&&A>o.breakpoints.hideWidgetDetails;r.useEffect(()=>{rt(q({step:e.step,dataType:e.dataType}))},[e.dataType,e.step]);const u=r.useCallback(({value:n,source:i})=>{var f;if(Z(n)&&(g>n||n>h))(f=V.current)==null||f.reportValidity();else{const x=n??B??null;switch(d){case y.DataType.INT:a.setIntValue({id:S,formId:p},x,i,b);break;case y.DataType.FLOAT:a.setDoubleValue({id:S,formId:p},x,i,b);break;default:throw new Error("Invalid data type")}T(!1),w(x),v(W({value:x,dataType:d,format:L,step:s}))}},[g,h,V,a,b,s,d,S,p,B,L]),st=r.useCallback(()=>{I&&u({value:l,source:{fromUi:!0}}),$(!1)},[I,l,u]),it=r.useCallback(()=>{$(!0)},[]),_=r.useCallback(()=>{const{value:n}=e;e.setValue=!1,w(n??null),v(W({value:n??null,...e,step:s})),u({value:n??null,source:{fromUi:!1}})},[e,s,u]);r.useEffect(()=>{e.setValue?_():u({value:l,source:{fromUi:!1}});const n=V.current;if(n){const i=f=>{f.preventDefault()};return n.addEventListener("wheel",i),()=>{n.removeEventListener("wheel",i)}}},[]),e.setValue&&_();const E=m(e.default)&&!t,lt=r.useCallback(()=>{const n=e.default??null;w(n),u({value:n,source:{fromUi:!0}})},[e]);kt({element:e,widgetMgr:a,onFormCleared:lt});const ct=n=>{const{value:i}=n.target;if(i==="")T(!0),w(null),v(null);else{let f;e.dataType===y.DataType.INT?f=parseInt(i,10):f=parseFloat(i),T(!0),w(f),v(i)}},N=r.useCallback(()=>{R&&(T(!0),u({value:(l??g)+s,source:{fromUi:!0}}))},[l,g,s,R]),F=r.useCallback(()=>{k&&(T(!0),u({value:(l??h)-s,source:{fromUi:!0}}))},[l,h,s,k]),ut=r.useCallback(n=>{const{key:i}=n;switch(i){case"ArrowUp":n.preventDefault(),N();break;case"ArrowDown":n.preventDefault(),F();break}},[N,F]),dt=r.useCallback(n=>{n.key==="Enter"&&(I&&u({value:l,source:{fromUi:!0}}),a.allowFormEnterToSubmit(p)&&a.submitForm(p,b))},[I,l,u,a,p,b]),G=C==null?void 0:C.startsWith(":material"),pt=G?"lg":"base",ft=K(o.iconSizes.lg)+2*K(o.spacing.twoXS),bt=C?o.breakpoints.hideNumberInputControls+ft:o.breakpoints.hideNumberInputControls;return z("div",{className:"stNumberInput","data-testid":"stNumberInput",ref:ot,children:[c(St,{label:e.label,disabled:t,labelVisibility:yt((X=e.labelVisibility)==null?void 0:X.value),htmlFor:O.current,children:e.help&&c(Ct,{children:c(Tt,{content:e.help,placement:wt.TOP_RIGHT})})}),z(Bt,{className:U?"focused":"","data-testid":"stNumberInputContainer",children:[c(Dt,{type:"number",inputRef:V,value:P??"",placeholder:e.placeholder,onBlur:st,onFocus:it,onChange:ct,onKeyPress:dt,onKeyDown:ut,clearable:E,clearOnEscape:E,disabled:t,"aria-label":e.label,startEnhancer:e.icon&&c(vt,{"data-testid":"stNumberInputIcon",iconValue:e.icon,size:pt}),id:O.current,overrides:{ClearIconContainer:{style:{padding:0}},ClearIcon:{props:{overrides:{Svg:{style:{color:o.colors.darkGray,padding:o.spacing.threeXS,height:o.sizes.clearIconSize,width:o.sizes.clearIconSize,":hover":{fill:o.colors.bodyText}}}}}},Input:{props:{"data-testid":"stNumberInputField",step:s,min:g,max:h,type:"number",inputMode:""},style:{lineHeight:o.lineHeights.inputWidget,paddingRight:o.spacing.sm,paddingLeft:o.spacing.md,paddingBottom:o.spacing.sm,paddingTop:o.spacing.sm}},InputContainer:{style:()=>({borderTopRightRadius:0,borderBottomRightRadius:0})},Root:{style:{borderTopRightRadius:0,borderBottomRightRadius:0,borderTopLeftRadius:0,borderBottomLeftRadius:0,borderLeftWidth:0,borderRightWidth:0,borderTopWidth:0,borderBottomWidth:0,paddingRight:0,paddingLeft:C?o.spacing.sm:0}},StartEnhancer:{style:{paddingLeft:0,paddingRight:0,minWidth:o.iconSizes.lg,color:G?o.colors.fadedText60:"inherit"}}}}),A>bt&&z(Lt,{children:[c(J,{"data-testid":"stNumberInputStepDown",onClick:F,disabled:!k||t,tabIndex:-1,children:c(M,{content:tt,size:"xs",color:k?"inherit":o.colors.disabled})}),c(J,{"data-testid":"stNumberInputStepUp",onClick:N,disabled:!R||t,tabIndex:-1,children:c(M,{content:et,size:"xs",color:R?"inherit":o.colors.disabled})})]})]}),at&&c(At,{clearable:E,children:c(Rt,{dirty:I,value:P??"",inForm:j,allowEnterToSubmit:nt})})]})},Xt=r.memo(Ht);export{Xt as default};
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import{bv as _,bM as ye,bw as $,r as u,z as $e,C as ne,j as R,bz as Re,bs as Oe,ba as _e,bt as Se,aC as oe,H as ie,c6 as ae,br as Pe}from"./index.
|
1
|
+
import{bv as _,bM as ye,bw as $,r as u,z as $e,C as ne,j as R,bz as Re,bs as Oe,ba as _e,bt as Se,aC as oe,H as ie,c6 as ae,br as Pe}from"./index.5KFYXBbC.js";import{a as we}from"./useBasicWidgetState.QU3v4y2-.js";import"./FormClearHelper.BxIPIP5L.js";var se={vertical:"vertical",horizontal:"horizontal"};function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?le(Object(n),!0).forEach(function(r){O(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=0,L=1,T=2;function D(e){return e.$isActive?T:e.$isHovered?L:E}function Me(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(D(e)){case E:return t.tickFillErrorSelected;case L:return t.tickFillErrorSelectedHover;case T:return t.tickFillErrorSelectedHoverActive}else switch(D(e)){case E:return t.tickFillSelected;case L:return t.tickFillSelectedHover;case T:return t.tickFillSelectedHoverActive}else return o?t.borderSelected:i?t.tickBorderError:t.tickBorder;return null}function ke(e){var t=e.$theme.colors;if(e.$disabled)return t.tickMarkFillDisabled;if(e.$checked)return t.tickMarkFill;if(e.$error)switch(D(e)){case E:return t.tickFillError;case L:return t.tickFillErrorHover;case T:return t.tickFillErrorHoverActive}else switch(D(e)){case E:return t.tickFill;case L:return t.tickFillHover;case T:return t.tickFillActive}}function Fe(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 O({},"padding".concat(o),s)}function Ie(e){var t=e.$disabled,n=e.$theme,r=n.colors;return t?r.contentSecondary:r.contentPrimary}var q=_("div",function(e){var t=e.$disabled,n=e.$align;return{display:"flex",flexWrap:"wrap",flexDirection:n==="horizontal"?"row":"column",alignItems:n==="horizontal"?"center":"flex-start",cursor:t?"not-allowed":"pointer","-webkit-tap-highlight-color":"transparent"}});q.displayName="RadioGroupRoot";q.displayName="RadioGroupRoot";var X=_("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",f=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},O(t,"margin".concat(f),c?a.scale200:null),O(t,"marginBottom",r&&!c?null:a.scale200),t});X.displayName="Root";X.displayName="Root";var K=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{backgroundColor:ke(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",height:e.$checked?r.scale200:r.scale550,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve,width:e.$checked?r.scale200:r.scale550}});K.displayName="RadioMarkInner";K.displayName="RadioMarkInner";var J=_("div",function(e){var t=e.$theme,n=t.animation,r=t.sizing;return{alignItems:"center",backgroundColor:Me(e),borderTopLeftRadius:"50%",borderTopRightRadius:"50%",borderBottomRightRadius:"50%",borderBottomLeftRadius:"50%",boxShadow:e.$isFocusVisible&&e.$checked?"0 0 0 3px ".concat(e.$theme.colors.accent):"none",display:"flex",height:r.scale700,justifyContent:"center",marginTop:r.scale0,marginRight:r.scale0,marginBottom:r.scale0,marginLeft:r.scale0,outline:"none",verticalAlign:"middle",width:r.scale700,flexShrink:0,transitionDuration:n.timing200,transitionTimingFunction:n.easeOutCurve}});J.displayName="RadioMarkOuter";J.displayName="RadioMarkOuter";var Q=_("div",function(e){var t=e.$theme.typography;return z(z({verticalAlign:"middle"},Fe(e)),{},{color:Ie(e)},t.LabelMedium)});Q.displayName="Label";Q.displayName="Label";var Y=_("input",{width:0,height:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,clip:"rect(0 0 0 0)",position:"absolute"});Y.displayName="Input";Y.displayName="Input";var Z=_("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 z(z({},n.typography.ParagraphSmall),{},(t={color:n.colors.contentSecondary,cursor:"auto"},O(t,"margin".concat(i),r==="horizontal"?null:n.sizing.scale900),O(t,"margin".concat(s),o?n.sizing.scale200:null),O(t,"maxWidth","240px"),t))});Z.displayName="Description";Z.displayName="Description";function N(e){"@babel/helpers - typeof";return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(e)}function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},V.apply(this,arguments)}function Ee(e,t){return Ae(e)||xe(e,t)||Te(e,t)||Le()}function Le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(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 xe(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 Ae(e){if(Array.isArray(e))return e}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function De(e,t,n){return t&&ze(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Be(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},U(e,t)}function Ce(e){var t=Ne();return function(){var r=B(e),o;if(t){var i=B(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return He(this,o)}}function He(e,t){if(t&&(N(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return A(e)}function A(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},B(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){Be(n,e);var t=Ce(n);function n(){var r;je(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)),j(A(r),"state",{isFocusVisible:!1,focusedRadioIndex:-1}),j(A(r),"handleFocus",function(a,c){ye(a)&&r.setState({isFocusVisible:!0}),r.setState({focusedRadioIndex:c}),r.props.onFocus&&r.props.onFocus(a)}),j(A(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 De(n,[{key:"render",value:function(){var o=this,i=this.props.overrides,s=i===void 0?{}:i,a=$(s.RadioGroupRoot,q),c=Ee(a,2),f=c[0],b=c[1];return u.createElement(f,V({id:this.props.id,role:"radiogroup","aria-describedby":this.props["aria-describedby"],"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props.error||null,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],$align:this.props.align,$disabled:this.props.disabled,$error:this.props.error,$required:this.props.required},b),u.Children.map(this.props.children,function(p,l){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===l,isFocusVisible:o.state.isFocusVisible,tabIndex:l===0&&!o.props.value||d?"0":"-1",labelPlacement:o.props.labelPlacement,name:o.props.name,onBlur:function(g){return o.handleBlur(g,l)},onFocus:function(g){return o.handleFocus(g,l)},onChange:o.props.onChange,onMouseEnter:o.props.onMouseEnter,onMouseLeave:o.props.onMouseLeave})}))}}]),n}(u.Component);j(pe,"defaultProps",{name:"",value:"",disabled:!1,autoFocus:!1,labelPlacement:"right",align:"vertical",error:!1,required:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onFocus:function(){},onBlur:function(){},overrides:{}});function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function M(e,t){return We(e)||Ge(e,t)||Ue(e,t)||Ve()}function Ve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){if(e){if(typeof e=="string")return ce(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ce(e,t)}}function ce(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ge(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 We(e){if(Array.isArray(e))return e}function qe(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 Ke(e,t,n){return t&&Xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(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 Qe(e){var t=Ze();return function(){var r=C(e),o;if(t){var i=C(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return Ye(this,o)}}function Ye(e,t){if(t&&(G(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k(e)}function k(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function 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 C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},C(e)}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){return e==="top"||e==="left"}function tt(e){return e==="bottom"||e==="right"}var rt=function(t){return t.stopPropagation()},fe=function(e){Je(n,e);var t=Qe(n);function n(){var r;qe(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)),F(k(r),"state",{isActive:!1,isHovered:!1}),F(k(r),"onMouseEnter",function(a){r.setState({isHovered:!0}),r.props.onMouseEnter&&r.props.onMouseEnter(a)}),F(k(r),"onMouseLeave",function(a){r.setState({isHovered:!1}),r.props.onMouseLeave&&r.props.onMouseLeave(a)}),F(k(r),"onMouseDown",function(a){r.setState({isActive:!0}),r.props.onMouseDown&&r.props.onMouseDown(a)}),F(k(r),"onMouseUp",function(a){r.setState({isActive:!1}),r.props.onMouseUp&&r.props.onMouseUp(a)}),r}return Ke(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=$(i.Root,X),a=M(s,2),c=a[0],f=a[1],b=$(i.Label,Q),p=M(b,2),l=p[0],d=p[1],S=$(i.Input,Y),g=M(S,2),P=g[0],H=g[1],x=$(i.Description,Z),I=M(x,2),v=I[0],h=I[1],m=$(i.RadioMarkInner,K),ee=M(m,2),de=ee[0],he=ee[1],be=$(i.RadioMarkOuter,J),te=M(be,2),ge=te[0],ve=te[1],w={$align:this.props.align,$checked:this.props.checked,$disabled:this.props.disabled,$hasDescription:!!this.props.description,$isActive:this.state.isActive,$error:this.props.error,$isFocused:this.props.isFocused,$isFocusVisible:this.props.isFocused&&this.props.isFocusVisible,$isHovered:this.state.isHovered,$labelPlacement:this.props.labelPlacement,$required:this.props.required,$value:this.props.value},re=u.createElement(l,y({},w,d),this.props.containsInteractiveElement?u.createElement("div",{onClick:function(me){return me.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},w,f),et(this.props.labelPlacement)&&re,u.createElement(ge,y({},w,ve),u.createElement(de,y({},w,he))),u.createElement(P,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:rt,onChange:this.props.onChange,ref:this.props.inputRef,required:this.props.required,tabIndex:this.props.tabIndex,type:"radio",value:this.props.value},w,H)),tt(this.props.labelPlacement)&&re),!!this.props.description&&u.createElement(v,y({},w,h),this.props.description))}}]),n}(u.Component);F(fe,"defaultProps",{overrides:{},containsInteractiveElement:!1,checked:!1,disabled:!1,autoFocus:!1,inputRef:u.createRef(),align:"vertical",error:!1,onChange:function(){},onMouseEnter:function(){},onMouseLeave:function(){},onMouseDown:function(){},onMouseUp:function(){},onFocus:function(){},onBlur:function(){}});function nt(e){const t=parseFloat(e.sizes.checkbox),n=parseFloat(e.spacing.threeXS),r=ie(t.toString()),o=Math.round(r*.375);let i=Math.round(ie((t-n).toString()));return i>=r&&(i-=1),[ae(o,"px"),ae(i,"px")]}function ot({disabled:e,horizontal:t,value:n,onChange:r,options:o,captions:i,label:s,labelVisibility:a,help:c}){const[f,b]=u.useState(n??null);u.useEffect(()=>{n!==f&&b(n??null)},[n]);const p=u.useCallback(v=>{const h=parseInt(v.target.value,10);b(h),r(h)},[r]),l=$e(),d=i.length>0,S=o.length>0,g=S?o:["No options to select."],P=e||!S,H=v=>v==""&&t&&d?" ":v,[x,I]=nt(l);return ne("div",{className:"stRadio","data-testid":"stRadio",children:[R(Se,{label:s,disabled:P,labelVisibility:a,children:c&&R(Re,{children:R(Oe,{content:c,placement:_e.TOP_RIGHT})})}),R(pe,{onChange:p,value:f!==null?f.toString():void 0,disabled:P,align:t?se.horizontal:se.vertical,"aria-label":s,"data-testid":"stRadioGroup",overrides:{RadioGroupRoot:{style:{gap:d?l.spacing.sm:l.spacing.none,minHeight:l.sizes.minElementHeight}}},children:g.map((v,h)=>ne(fe,{value:h.toString(),overrides:{Root:{style:({$isFocusVisible:m})=>({marginBottom:l.spacing.none,marginTop:l.spacing.none,marginRight:d?l.spacing.sm:l.spacing.lg,paddingLeft:l.spacing.none,alignItems:"start",paddingRight:l.spacing.threeXS,backgroundColor:m?l.colors.darkenedBgMix25:""})},RadioMarkOuter:{style:({$checked:m})=>({width:l.sizes.checkbox,height:l.sizes.checkbox,marginTop:"0.35rem",marginRight:l.spacing.none,marginLeft:l.spacing.none,backgroundColor:m&&!P?l.colors.primary:l.colors.fadedText40})},RadioMarkInner:{style:({$checked:m})=>({height:m?x:I,width:m?x:I})},Label:{style:{color:P?l.colors.fadedText40:l.colors.bodyText,position:"relative",top:l.spacing.px}}},children:[R(oe,{source:v,allowHTML:!1,isLabel:!0,largerLabel:!0}),d&&R(oe,{source:H(i[h]),allowHTML:!1,isCaption:!0,isLabel:!0})]},h))})]})}const it=u.memo(ot);function at({disabled:e,element:t,widgetMgr:n,fragmentId:r}){const[o,i]=we({getStateFromWidgetMgr:st,getDefaultStateFromProto:lt,getCurrStateFromProto:ut,updateWidgetMgrState:ct,element:t,widgetMgr:n,fragmentId:r}),s=u.useCallback(d=>{i({value:d,fromUi:!0})},[i]),{horizontal:a,options:c,captions:f,label:b,labelVisibility:p,help:l}=t;return R(it,{label:b,onChange:s,options:c,captions:f,disabled:e,horizontal:a,labelVisibility:Pe(p==null?void 0:p.value),value:o??null,help:l})}function st(e,t){return e.getIntValue(t)}function lt(e){return e.default??null}function ut(e){return e.value??null}function ct(e,t,n,r){t.setIntValue(e,n.value??null,{fromUi:n.fromUi},r)}const bt=u.memo(at);export{bt as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r,R as f,aD as m,b5 as l,j as t,b6 as B,bp as b,b4 as p,b7 as D}from"./index.
|
1
|
+
import{r,R as f,aD as m,b5 as l,j as t,b6 as B,bp as b,b4 as p,b7 as D}from"./index.5KFYXBbC.js";import{c as h}from"./createDownloadLinkElement.DZMwyjvU.js";function w(n,o,e){return h({enforceDownloadInNewTab:e,url:n.buildMediaURL(o),filename:""})}function R(n){const{disabled:o,element:e,widgetMgr:s,endpoints:a,fragmentId:c}=n,{libConfig:{enforceDownloadInNewTab:d=!1}}=f.useContext(m);let i=l.SECONDARY;e.type==="primary"?i=l.PRIMARY:e.type==="tertiary"&&(i=l.TERTIARY),r.useEffect(()=>{a.checkSourceUrlResponse(e.url,"Download Button")},[e.url,a]);const u=()=>{e.ignoreRerun||s.setTriggerValue(e,{fromUi:!0},c),w(a,e.url,d).click()};return t("div",{className:"stDownloadButton","data-testid":"stDownloadButton",children:t(B,{help:e.help,containerWidth:e.useContainerWidth,children:t(b,{kind:i,size:p.SMALL,disabled:o,onClick:u,containerWidth:e.useContainerWidth,children:t(D,{icon:e.icon,label:e.label})})})})}const L=r.memo(R);export{L as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as l,M as u,j as d,br as x,c7 as V}from"./index.
|
1
|
+
import{r as l,M as u,j as d,br as x,c7 as V}from"./index.5KFYXBbC.js";import{a as h}from"./useBasicWidgetState.QU3v4y2-.js";import"./FormClearHelper.BxIPIP5L.js";const U=(t,o)=>t.getStringValue(o),v=t=>t.options.length===0||u(t.default)?null:t.options[t.default],C=t=>t.rawValue??null,F=(t,o,e,r)=>{o.setStringValue(t,e.value,{fromUi:e.fromUi},r)},M=({disabled:t,element:o,widgetMgr:e,fragmentId:r})=>{const{options:n,help:c,label:i,labelVisibility:a,placeholder:g,acceptNewOptions:p}=o,[f,s]=h({getStateFromWidgetMgr:U,getDefaultStateFromProto:v,getCurrStateFromProto:C,updateWidgetMgrState:F,element:o,widgetMgr:e,fragmentId:r}),m=l.useCallback(b=>{s({value:b,fromUi:!0})},[s]),S=u(o.default)&&!t;return d(V,{label:i,labelVisibility:x(a==null?void 0:a.value),options:n,disabled:t,onChange:m,value:f,help:c,placeholder:g,clearable:S,acceptNewOptions:p})},w=l.memo(M);export{w as default};
|