@tap-payments/os-micro-frontend-shared 0.3.306 → 0.3.307

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 (42) hide show
  1. package/build/_chunks/{chunk-GSPSUKZC.js → chunk-EEONDBAL.js} +1 -1
  2. package/build/_chunks/chunk-JBE2LXDH.js +1 -0
  3. package/build/_chunks/chunk-JYVB2MAR.js +1 -0
  4. package/build/_chunks/chunk-LKYA6XFU.js +9 -0
  5. package/build/_chunks/{chunk-6UI52RXI.js → chunk-R2J57DPG.js} +1 -1
  6. package/build/_chunks/{chunk-H6IWML5L.js → chunk-TJMY7Q26.js} +1 -1
  7. package/build/_chunks/chunk-YG4CT6O4.js +1 -0
  8. package/build/components/Autocomplete/index.js +1 -1
  9. package/build/components/ColumnViews/index.js +1 -1
  10. package/build/components/GroupedSelect/index.js +1 -1
  11. package/build/components/ListHeader/index.js +1 -1
  12. package/build/components/MultiLevelSelect/index.js +1 -1
  13. package/build/components/Select/SelectField.d.ts +1 -1
  14. package/build/components/Select/constants.d.ts +24 -0
  15. package/build/components/Select/index.d.ts +1 -1
  16. package/build/components/Select/index.js +1 -1
  17. package/build/components/Select/style.d.ts +12 -0
  18. package/build/components/Select/type.d.ts +11 -2
  19. package/build/components/Select/utils.d.ts +11 -2
  20. package/build/components/StatusIcons/index.js +1 -1
  21. package/build/components/TableCells/index.js +1 -1
  22. package/build/components/index.d.ts +1 -2
  23. package/build/components/index.js +1 -1
  24. package/build/datetime/components/index.js +1 -1
  25. package/build/index.js +1 -1
  26. package/package.json +1 -1
  27. package/build/_chunks/chunk-2JFMUHGQ.js +0 -9
  28. package/build/_chunks/chunk-2LO4STE5.js +0 -1
  29. package/build/_chunks/chunk-B2NOP2A5.js +0 -1
  30. package/build/_chunks/chunk-KBXWH3SO.js +0 -1
  31. package/build/_chunks/chunk-MLOWKQDW.js +0 -1
  32. package/build/components/CurrenciesMenu/CountryFlag.d.ts +0 -10
  33. package/build/components/CurrenciesMenu/CurrenciesMenu.d.ts +0 -4
  34. package/build/components/CurrenciesMenu/OptionContent.d.ts +0 -5
  35. package/build/components/CurrenciesMenu/OptionRow.d.ts +0 -5
  36. package/build/components/CurrenciesMenu/constants.d.ts +0 -15
  37. package/build/components/CurrenciesMenu/icons.d.ts +0 -3
  38. package/build/components/CurrenciesMenu/index.d.ts +0 -4
  39. package/build/components/CurrenciesMenu/index.js +0 -1
  40. package/build/components/CurrenciesMenu/style.d.ts +0 -32
  41. package/build/components/CurrenciesMenu/type.d.ts +0 -64
  42. package/build/components/CurrenciesMenu/utils.d.ts +0 -9
@@ -1 +0,0 @@
1
- import {n,j,k,l,h,f,b,g,i,m as m$1,c,e,d}from'./chunk-2LO4STE5.js';import {X,V,W,Y,k as k$1,a,O,Q,b as b$1,_,P,R,S,T,U,F,m,$,I,G,H,Z,L,M,ba as ba$1,aa,c as c$1,J,K,N}from'./chunk-MLOWKQDW.js';import {ba}from'./chunk-F7I3KDV5.js';import {Ub,Eb,Db}from'./chunk-XBJ4RS2B.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import pe from'@mui/material/Box';import At from'@mui/material/InputLabel';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function Nt({endAdornmentProp:h,isLoading:o,showClear:S,showMenuArrow:i,menuOpen:b,ClearIconComponent:c=$,ChevronIconComponent:u=aa,onClear:p,onClearDefault:R}){if(!h&&!S&&!o&&!i)return null;let m=C=>{C.preventDefault(),C.stopPropagation(),p?p():R();};return jsxs(pe,{className:Eb("Select-endAdornmentRoot",o&&"Select-endAdornmentRoot--loading"),component:"span",children:[h,o?jsx(pe,{component:"span",className:"Select-menuTriggerIcon Select-menuTriggerIcon--loading","aria-hidden":true,children:jsx(ba$1,{})}):null,!o&&S?jsx(pe,{component:"button",className:"Select-clearIconButton","data-select-clear":"",type:"button",tabIndex:0,"aria-label":"Clear selection",onMouseDown:m,onClick:m,children:jsx(c,{})}):null,!o&&i?jsx(pe,{component:"span",className:`Select-menuTriggerIcon${b?" Select-menuTriggerIcon-open":""}`,"aria-hidden":true,children:jsx(u,{})}):null]})}var Et=forwardRef(function({isMultiple:o=false,options:S,value:i,onChange:b,label:c="",disabled:u,required:p,hasError:R=false,helperText:m,feedback:C,showClearIcon:K=false,ClearIconComponent:me,ChevronIconComponent:q,onClear:Q,isLoading:F,MenuProps:j$1,children:ye,id:z="Select",className:J,open:w,onOpen:X$1,onClose:k$1,name:Y$1,inputProps:P,endAdornment:Z,renderValue:D,valueAlignment:_},g){let[fe,ee]=useState(false),I=w??fe,x=!!(u||F),{isProvided:te,isVisible:T,type:le}=Ub(C),L=`${z}-label`,B=Array.isArray(i)?i:i!=null?[i]:[],V$1=useCallback((t,$)=>{$?X$1?.(t):k$1?.(t),w===void 0&&ee($);},[X$1,k$1,w]),ne=t=>{t.button===0&&(m$1(t)||t.target.closest('.MuiSelect-select[role="combobox"]')||x||(t.preventDefault(),t.stopPropagation(),V$1(t,!I)));},oe=t=>{m$1(t)||t.target.closest('.MuiSelect-select[role="combobox"]')||(t.preventDefault(),t.stopPropagation());},ae=t=>{let ce=t.target.value.map(A=>S.find(W=>j(W)===A||String(W.value)===String(A))).filter(A=>A!=null);b?.(ce);},re=jsx(Nt,{endAdornmentProp:Z,isLoading:!!F,showClear:K&&n(i)&&!x,showMenuArrow:!F,menuOpen:I,ClearIconComponent:me,ChevronIconComponent:q,onClear:Q,onClearDefault:()=>b?.(o?[]:null)}),H=o?B.map(j):j(B[0]??null);return jsxs(X,{$hasFeedback:T,onMouseDown:ne,onClick:oe,children:[jsxs(V,{variant:"filled",required:p,className:J,children:[jsx(At,{id:L,children:c}),jsx(W,{multiple:o,ref:g,value:H,error:R&&!T,feedbackType:le,hasFeedback:T,valueAlignment:_,disableUnderline:true,required:p,hasLabel:!!c.trim(),labelId:L,id:z,name:Y$1,open:I,onOpen:t=>V$1(t,true),onClose:t=>{k(t)||o&&l(t)||V$1(t,false);},onChange:o?ae:void 0,renderValue:D,inputProps:P,disabled:x,IconComponent:()=>null,autoWidth:false,endAdornment:re,MenuProps:j$1,children:ye})]}),te?jsx(ba,{...C}):m!=null&&m!==""?jsx(Y,{children:m}):null]})}),Pe=Et;function Rt({options:h,maxVisibleValues:o,valueAlignment:S=m}){let b$1=typeof o=="number"&&Number.isFinite(o)?Math.max(0,Math.floor(o)):h.length,c=h.slice(0,b$1),u=h.length-c.length,p=c.map(b).join(", ");return jsxs(L,{className:a.values,$valueAlignment:S,children:[jsx(M,{className:a.value,children:p}),u>0?jsxs(N,{className:a.valueOverflow,children:["+",u," more"]}):null]})}var Ct=Rt;var vt=forwardRef(function({options:o,isMultiple:S$1=false,hasCheckbox:i$1,maxVisibleValues:b$2,value:c$2,onChange:u,label:p,placeholder:R$1,disabled:m$1,required:C,error:K$1=false,helperText:me,feedback:q,hasClearIcon:Q$1=false,ClearIconComponent:F$1,ChevronIconComponent:j,SearchIconComponent:ye,onClear:z,isLoading:J$1,isSearchable:w=false,searchPlaceholder:X,hasSelectionSummary:k=false,hasSelectedCheckmark:Y=false,valueAlignment:P$1=m,menuDirection:Z$1=k$1,MenuProps:D,children:_$1,id:g$1="Select",className:fe,sx:ee,selectClassNames:I$1,inputRef:x,open:te,onOpen:T$1,onClose:le,name:L$1,inputProps:B,endAdornment:V,renderValue:ne,renderOption:oe},ae){let[re,H$1]=useState(""),[t,$$1]=useState(Z$1),[ce,A]=useState(void 0),W=p??"",Ae=R$1??"",Ne=me??void 0,Ee=X??b$1,Mt=ye??_,Re=i$1??S$1,y=useMemo(()=>h(o),[o]),ke=Eb(a.root,I$1?.root,fe),De=useMemo(()=>f(D,t,ce),[D,t,ce]),Te=e$1=>{let s=c(e$1);s?.width&&A(s.width),$$1(e({preferred:Z$1,anchorRect:s,menuMaxHeight:d(D,w,k),gapPx:c$1})),T$1?.(e$1);},N=w?re.toLowerCase().trim():"",Le=e=>!N||b(e).toLowerCase().includes(N),Be=e=>oe?jsx(J,{className:a.option,$customLayout:true,children:oe(e)}):jsx(J,{className:a.option,children:jsx(K,{title:b(e),children:b(e)})}),wt=useMemo(()=>N?y.filter(e=>b(e).toLowerCase().includes(N)):y,[y,N]),It=!!N&&wt.length===0,se=()=>{u?.(S$1?[]:null),z?.();},He=w?jsx(O,{className:a.search,disableGutters:true,"data-select-menu-search":"",onMouseDown:g,onClick:g,onKeyDown:g,children:jsx(Q,{placeholder:Ee,value:re,onChange:e=>H$1(e.target.value),onMouseDown:g,onClick:g,onKeyDown:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":Ee,onMouseDown:g,onClick:g},endAdornment:jsx(Mt,{})})}):null,$e=It?jsx(P,{disableGutters:true,onMouseDown:g,onClick:g,children:"No results found"}):null;if(S$1){let e=Array.isArray(c$2)?c$2:[],s=y.filter(l=>e.some(f=>f===l.value||String(f)===String(l.value))),U$1=s.length,Ft=k&&U$1>0?jsx(R,{className:a.summary,disableGutters:true,disableSticky:true,"data-select-menu-keep-open":"",onMouseDown:g,onClick:g,onKeyDown:g,children:jsxs(S,{children:[jsxs(T,{children:[U$1," selected"]}),jsx(U,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:l=>{l.preventDefault(),l.stopPropagation(),se();},onClick:l=>{l.preventDefault(),l.stopPropagation(),se();},children:"Clear"})]})}):null;return jsx(F,{id:g$1,"data-testid":g$1??"Select",className:ke,sx:Db(ee??{}),children:jsxs(Pe,{ref:x??ae,isMultiple:true,id:g$1,className:Eb(a.field,I$1?.field),options:y,value:s,onChange:l=>{u?.(Array.isArray(l)?l.map(f=>f.value):[]);},label:W,disabled:m$1,required:C,hasError:K$1,helperText:Ne,feedback:q,showClearIcon:Q$1,ClearIconComponent:F$1??$,ChevronIconComponent:j,onClear:se,isLoading:J$1,MenuProps:De,open:te,onOpen:Te,onClose:l=>{H$1(""),le?.(l);},name:L$1,inputProps:B,endAdornment:V,valueAlignment:P$1,renderValue:()=>s.length>0?jsx(Ct,{options:s,maxVisibleValues:b$2,valueAlignment:P$1}):Ae,children:[_$1,He,Ft,$e,y.map(l=>{let f=e.some(Ue=>Ue===l.value||String(Ue)===String(l.value)),We=Be(l);return jsx(I,{value:String(l.value),disabled:l.disabled,$selected:f,$hidden:!Le(l),className:a.option,onMouseDown:g,onClick:g,children:Re?jsxs(G,{children:[jsx(H,{checked:f,$mutedRect:f&&l.disabled,tabIndex:-1,disableRipple:true}),We]}):jsxs(Fragment,{children:[We,Y&&f?jsx(Z,{}):null]})},l.id)})]})})}let Ot=Array.isArray(c$2)?c$2[0]??null:c$2??null,O$1=i(y,Ot);return jsx(F,{id:g$1,"data-testid":g$1??"Select",className:ke,sx:Db(ee??{}),children:jsxs(Pe,{ref:x??ae,id:g$1,className:Eb(a.field,I$1?.field),options:y,value:O$1,onChange:e=>{u?.(e==null||Array.isArray(e)?null:e.value);},label:W,disabled:m$1,required:C,hasError:K$1,helperText:Ne,feedback:q,showClearIcon:Q$1,ClearIconComponent:F$1??$,ChevronIconComponent:j,onClear:se,isLoading:J$1,MenuProps:De,open:te,onOpen:Te,onClose:e=>{H$1(""),le?.(e);},name:L$1,inputProps:B,endAdornment:V,valueAlignment:P$1,renderValue:()=>{if(!O$1)return Ae;if(ne)return ne(O$1);let e=b(O$1);return jsx(L,{className:a.values,$valueAlignment:P$1,children:jsx(M,{className:a.value,title:e,children:e})})},children:[_$1,He,$e,y.map(e=>{let s=O$1!=null&&(O$1.value===e.value||String(O$1.value)===String(e.value)),U=Be(e);return jsx(I,{value:String(e.value),disabled:e.disabled,$selected:s,$hidden:!Le(e),onMouseDown:g,onClick:()=>u?.(e.value),className:a.option,children:Re?jsxs(G,{children:[jsx(H,{checked:s,tabIndex:-1,disableRipple:true}),U]}):jsxs(Fragment,{children:[U,Y&&s?jsx(Z,{}):null]})},e.id)})]})})});vt.displayName="Select";var Lt=memo(vt);export{Lt as a};
@@ -1 +0,0 @@
1
- import {b,j as j$1,V,U,n,R,d as d$1}from'./chunk-F7I3KDV5.js';import {Eb}from'./chunk-XBJ4RS2B.js';import {Pj,m}from'./chunk-EYLBXWXJ.js';import {memo,forwardRef,useState,useMemo,useCallback}from'react';import Fe from'@mui/material/ClickAwayListener';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import Pe from'@mui/material/SvgIcon';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';var c="os-shared-CurrenciesMenu",r={root:`${c}-root`,trigger:`${c}-trigger`,triggerInfo:`${c}-triggerInfo`,triggerLabel:`${c}-triggerLabel`,triggerArrow:`${c}-triggerArrow`,static:`${c}-static`,flag:`${c}-flag`,category:`${c}-category`,categoryLabel:`${c}-categoryLabel`,option:`${c}-option`,optionLabel:`${c}-optionLabel`};function $e({currency:e,className:o,sx:t}){let i=u=>{u.currentTarget.src!==Pj&&(u.currentTarget.src=Pj);};return jsx(d$1,{src:e?m(e):Pj,alt:e||"flag",onError:i,className:Eb(r.flag,o),sx:t??{width:14,height:14}})}var C=memo($e);var j=e=>jsx(Pe,{viewBox:"0 0 8 5",sx:{width:8,height:5},...e,children:jsx("path",{d:"M7.30267 0.117188C7.38054 0.115307 7.45644 0.138248 7.52045 0.182617C7.58449 0.227088 7.63367 0.290458 7.66205 0.363281C7.6904 0.436073 7.69755 0.516047 7.68256 0.592773C7.66771 0.668745 7.63063 0.738375 7.57709 0.793945L4.17279 4.43164C4.10249 4.50662 4.00517 4.55078 3.90228 4.55078C3.79958 4.55064 3.70294 4.5065 3.63275 4.43164L0.227478 0.794922L0.228455 0.793945C0.175738 0.738766 0.139787 0.669812 0.124939 0.594727C0.110049 0.519097 0.116214 0.440194 0.143494 0.368164C0.170896 0.296002 0.218691 0.232474 0.281189 0.1875C0.343697 0.14262 0.418101 0.11821 0.495056 0.118164C0.54684 0.118166 0.598245 0.12907 0.645447 0.150391C0.691771 0.171346 0.733033 0.201824 0.767517 0.239258L3.90228 3.58691L7.03705 0.239258C7.10541 0.164191 7.20102 0.119752 7.30267 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.233333"})});function Se({currency:e,selected:o,renderOption:t}){return t?jsx(Fragment,{children:t(e,{selected:o})}):jsxs(Fragment,{children:[jsx(C,{currency:e}),jsx(j$1,{sx:{fontSize:11},className:r.optionLabel,children:e})]})}var re=memo(Se);var y=styled(d)(()=>({display:"inline-block"})),S=styled(b,{shouldForwardProp:e=>e!=="$open"})(({theme:e,$open:o=false})=>{let{base:t,border:i,brand:u}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"space-between",height:32,border:`1px solid ${i.default}`,borderRadius:e.v2.radius(4),backgroundColor:t.white,minWidth:74,padding:e.v2.spacing(8),color:t.black,...Re(o,u[500]),"&.Mui-disabled":{opacity:.7,border:`1px solid ${i.default}`,backgroundColor:t.white,color:t.black}}});function Re(e,o){return e?{borderColor:o}:{}}var O=styled(d)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(4),minWidth:0})),M=styled(j$1)(()=>({fontSize:"11px",fontWeight:500,lineHeight:1.1})),F=styled(d,{shouldForwardProp:e=>e!=="$open"})(({$open:e=false})=>({display:"flex",alignItems:"center",flexShrink:0,transition:"transform 200ms cubic-bezier(0.4, 0, 0.2, 1)",...e&&{transform:"rotate(180deg)"}})),te=styled(d)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(4),minWidth:0,padding:e.v2.spacing(8)})),oe=styled(d)(({theme:e})=>({borderBottom:`1px solid ${e.v2.palette.border.default}`,paddingBottom:e.v2.spacing(8),"&:last-child":{borderBottom:"none",paddingBottom:0}})),ne=styled(j$1)(({theme:e})=>({color:e.v2.palette.grey[500],fontSize:"10px",fontWeight:500,lineHeight:"100%",padding:e.v2.spacing(8)})),se=styled(V)({gap:"4px",borderTop:"none !important",height:24,[`& .${U.indicator}`]:{fontSize:11},"&:hover":{boxShadow:"7px 0px 8px 0px #F2F2F2"}});function Ae({currency:e,selected:o,onSelect:t,renderOption:i}){return jsx(se,{isSelected:o,startAdornment:null,onClick:()=>t(e),className:Eb(r.option),children:jsx(re,{currency:e,selected:o,renderOption:i})})}var ae=memo(Ae);function z(e){if(!e)return "";for(let o of e){if(typeof o=="string")return o;let t=o.items??[];if(t.length>0)return t[0]}return ""}function le(e){if(!e||e.length===0)return [];let o=[],t=[],i=0,u=()=>{t.length>0&&(o.push({key:`flat-${i++}`,items:t}),t=[]);};for(let m of e)if(typeof m=="string")t.push(m);else {u();let l=m.items??[];if(l.length===0)continue;o.push({key:`group-${i++}`,label:m.label,items:l});}return u(),o}function ce(e){if(!e)return 0;let o=0;for(let t of e)typeof t=="string"?o+=1:o+=t.items?.length??0;return o}var pe=forwardRef(({value:e,defaultValue:o,onChange:t,options:i,isLoading:u=false,disabled:m=false,id:l,className:b,sx:x,menuPlacement:me,menuProps:ge,placeholder:h="",triggerIcon:D,renderOption:fe,renderSelected:N,...I},L)=>{let[G,V]=useState(null),[Ce,de]=useState(()=>o??z(i)),B=e!==void 0,v=B?e:Ce,$=!!G,ye=useMemo(()=>le(i),[i]),Z=useMemo(()=>ce(i),[i]),Me=useCallback(a=>{m||V(a.currentTarget);},[m]),A=useCallback(()=>{V(null);},[]),be=useCallback(a=>{B||de(a),t?.(a),A();},[B,t,A]),w=D===void 0?jsx(j,{}):D,{placement:xe,sx:P,...he}=ge??{},Ne=xe??me,Ie=useMemo(()=>[{margin:"8px 0",minWidth:74},...Array.isArray(P)?P:[P]],[P]);if(u)return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Eb(r.root,b),sx:x,...I,children:jsxs(S,{variant:"secondary",disabled:true,className:Eb(r.trigger),children:[jsx(O,{className:Eb(r.triggerInfo),children:jsx(M,{className:Eb(r.triggerLabel),children:h})}),jsx(n,{size:12})]})});if(Z===0)return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Eb(r.root,b),sx:x,...I,children:jsxs(S,{variant:"secondary",disabled:true,className:Eb(r.trigger),children:[jsx(O,{className:Eb(r.triggerInfo),children:jsx(M,{className:Eb(r.triggerLabel),children:h})}),w?jsx(F,{$open:false,className:Eb(r.triggerArrow),children:w}):null]})});if(Z===1){let a=z(i);return jsx(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Eb(r.root,b),sx:x,...I,children:jsx(te,{className:Eb(r.static),children:N?jsx(Fragment,{children:N(a)}):jsxs(Fragment,{children:[jsx(C,{currency:a}),jsx(M,{className:Eb(r.triggerLabel),children:a||h})]})})})}return jsx(Fe,{onClickAway:A,children:jsxs(y,{ref:L,id:l,"data-testid":l??"CurrenciesMenu",className:Eb(r.root,b),sx:x,...I,children:[jsxs(S,{variant:"secondary",$open:$,disabled:m,onClick:Me,"aria-haspopup":"listbox","aria-expanded":$,className:Eb(r.trigger),children:[jsx(O,{className:Eb(r.triggerInfo),children:N?jsx(Fragment,{children:N(v)}):jsxs(Fragment,{children:[jsx(C,{currency:v}),jsx(M,{className:Eb(r.triggerLabel),children:v||h})]})}),w?jsx(F,{$open:$,className:Eb(r.triggerArrow),children:w}):null]}),jsx(R,{open:$,anchorEl:G,placement:Ne,sx:Ie,...he,children:ye.map(a=>jsxs(oe,{className:Eb(r.category),children:[a.label?jsx(ne,{className:Eb(r.categoryLabel),children:a.label}):null,a.items.map((T,Le)=>jsx(ae,{currency:T,selected:T===v,onSelect:be,renderOption:fe},`${a.key}:${T}-${Le}`))]},a.key))})]})})});pe.displayName="CurrenciesMenu";var ze=memo(pe);export{r as a,ze as b};
@@ -1 +0,0 @@
1
- import {f as f$1,aa}from'./chunk-F7I3KDV5.js';import {Sc,A as A$1}from'./chunk-EYLBXWXJ.js';import {forwardRef}from'react';import r from'@mui/material/Box';import oe from'@mui/material/CircularProgress';import ne from'@mui/material/SvgIcon';import J from'@mui/material/Button';import K from'@mui/material/FormControl';import Q from'@mui/material/Input';import v from'@mui/material/ListSubheader';import U from'@mui/material/MenuItem';import X from'@mui/material/Select';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var n="os-shared-Select",u={root:`${n}-root`,field:`${n}-field`,menu:`${n}-menu`,option:`${n}-option`,clear:`${n}-clear`,feedback:`${n}-feedback`,values:`${n}-values`,value:`${n}-value`,valueOverflow:`${n}-valueOverflow`,search:`${n}-search`,summary:`${n}-summary`},le="Search",ae=8,de=8,l=28,a=36,o=17,se=4,z=256,W=272,B=293,pe=8,E={bottom:"bottom",top:"top"},ce=E.bottom,h={start:"start",end:"end"},xe=h.start,R=48,O=1,G=R-2*O,D=8,ge=10,j=13,N=D+j,Z=4,q=6,ue=G-N-Z-q,S=8,f=4,b=f,c=8,x=16,y=8,g=4,he=g+x+y,me=g+c+b;var Fe={maxHeight:z,[`&:has(.${u.search})`]:{maxHeight:`${W}px !important`},[`&:has(.${u.search}):has(.${u.summary})`]:{maxHeight:`${B}px !important`}},ke=styled(r)({width:"100%",display:"flex",flexDirection:"column"}),$e=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",minWidth:0})),Le=styled(f$1,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>({padding:0,pointerEvents:"none",...e&&{opacity:.5}})),A="#F8F8F8",ze=styled(U,{shouldForwardProp:e=>e!=="$selected"&&e!=="$hidden"})(({theme:e,$selected:i,$hidden:s})=>({fontSize:"12px",fontWeight:500,lineHeight:"16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1),minHeight:l,height:"auto",flexShrink:0,padding:"6px 8px",overflow:"hidden",[e.breakpoints.up("sm")]:{minHeight:l},boxSizing:"border-box",borderRadius:4,backgroundColor:i?A:e.palette.common.white,"&.Mui-selected, &.Mui-focusVisible, &:hover, &.Mui-selected:hover":{backgroundColor:A},"&.Mui-disabled":{opacity:.38},...s&&{display:"none !important"}})),We=styled(r,{shouldForwardProp:e=>e!=="$customLayout"})(({$customLayout:e})=>({flex:1,minWidth:0,display:"flex",alignItems:e?"flex-start":"center",alignSelf:e?"stretch":void 0,height:e?"auto":void 0,overflow:e?"visible":"hidden",lineHeight:"16px"})),Be=styled("span")({display:"block",minWidth:0,maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"12px",fontWeight:500,lineHeight:"16px"}),Ae=styled(r,{shouldForwardProp:e=>e!=="$valueAlignment"})(({$valueAlignment:e})=>{let i=e===h.end;return {display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:i?"flex-end":"flex-start",width:"100%",minWidth:0,maxWidth:"100%",overflow:"hidden",boxSizing:"border-box",pointerEvents:"none",textAlign:i?"end":"start"}}),Te=styled(r)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"0 1 auto",maxWidth:"100%",fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:e.v2.palette.base.black,textAlign:"start"})),Ve=styled(r)({flex:"0 0 auto",whiteSpace:"nowrap",marginLeft:4,fontWeight:500,fontSize:11,lineHeight:"130%",letterSpacing:0,color:"var(--fg-brand, rgba(31, 136, 208, 1))"}),Y=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:a,minHeight:a,maxHeight:a,padding:0,lineHeight:1,overflow:"hidden",flexShrink:0,position:"sticky",top:0,zIndex:1,"&.MuiListSubheader-root":{height:a,minHeight:a,padding:0,lineHeight:1}}));Y.muiSkipListHighlight=true;var _=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",height:l,minHeight:l,padding:0,display:"flex",alignItems:"center",fontSize:12,fontWeight:500,lineHeight:"14px",color:e.v2.palette.grey[500],flexShrink:0,"&.MuiListSubheader-root":{height:l,minHeight:l,padding:0,lineHeight:"14px"}}));_.muiSkipListHighlight=true;var Ee=styled(Q)(({theme:e})=>({width:"100%",height:a,padding:"8px 8px 8px 12px",borderRadius:4,backgroundColor:e.palette.common.white,border:`1px solid ${e.v2.palette.grey[100]}`,boxSizing:"border-box","&:hover":{borderColor:e.v2.palette.grey[100]},"&.Mui-focused":{borderColor:e.v2.palette.brand[500],boxShadow:`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.common.white},"&:before, &:after":{display:"none"},"& input":{padding:0,fontSize:10},"& .MuiInputBase-input":{paddingRight:4}})),T=styled("img")({width:14,height:14,flexShrink:0,display:"block"}),Re=styled(v)(({theme:e})=>({backgroundColor:e.palette.common.white,boxSizing:"border-box",display:"flex",alignItems:"center",height:o,minHeight:o,maxHeight:o,padding:0,lineHeight:`${o}px`,overflow:"hidden",flexShrink:0,"&.MuiListSubheader-root":{height:o,minHeight:o,padding:0,lineHeight:`${o}px`}})),Oe=styled(r)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"border-box",width:"100%",height:o,minHeight:o,gap:e.spacing(1)})),Ge=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:`${o}px`,letterSpacing:0,color:e.v2.palette.grey[500]})),De=styled(J)(({theme:e})=>({minWidth:0,minHeight:0,height:o,padding:0,fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:`${o}px`,letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:e.v2.palette.brand[500],"&.MuiButton-root":{minWidth:0,minHeight:0,height:o,padding:0,lineHeight:`${o}px`}})),je=styled(K)(({theme:e})=>({minWidth:52,height:"40px !important",maxHeight:"40px !important",backgroundColor:"transparent",width:"100%",cursor:"pointer","& .MuiInputBase-root":{cursor:"pointer"},"& .MuiInputBase-root.Mui-disabled":{cursor:"default"},"& .MuiFormLabel-asterisk":{color:"red"},"& .MuiFormLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`,height:"100%",pointerEvents:"none"},".MuiFormLabel-root.MuiFormLabel-filled":{transform:"translate(8px, 8px) scale(0.75) "},".MuiFormLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)",fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%"}})),Ne=styled(X,{shouldForwardProp:e=>!["feedbackType","hasFeedback","valueAlignment","hasLabel"].includes(e)})(({theme:e,error:i,feedbackType:s,hasFeedback:p,valueAlignment:V,hasLabel:w})=>{let{borderColor:I}=aa(e,s),C=p?"4px 4px 0 0":"4px",m=V===h.end,P=m?g:f,H=w?`18px ${P}px 6px ${S}px !important`:`0 ${P}px 0 ${S}px !important`;return {width:"100%",height:"40px !important",maxHeight:"40px !important",borderRadius:C,overflow:"hidden",backgroundColor:e.palette.grey[400],border:"1px solid transparent",boxSizing:"border-box",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&.Mui-focused":{border:p?`1px solid ${s?I:"transparent"}`:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:p?"none":void 0,boxShadow:p?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`,backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"},".MuiSelect-select":{padding:H,height:"40px !important",maxHeight:"40px !important",display:"flex !important",alignItems:w?"flex-end !important":"center !important",justifyContent:m?"flex-end !important":"flex-start !important",textAlign:m?"end !important":"start !important",boxSizing:"border-box",overflow:"hidden",backgroundColor:`${e.palette.grey[400]} !important`,borderRadius:C,fontSize:"11px",lineHeight:"11px",cursor:"pointer",position:"relative",zIndex:0,"&:focus":{backgroundColor:`${e.palette.grey[400]} !important`}},"&.Mui-disabled .MuiSelect-select":{cursor:"default"},".MuiSelect-filled":{padding:H},"&.MuiInputBase-adornedEnd":{display:"inline-flex",alignItems:"center",backgroundColor:e.palette.grey[400],gap:0},"&&.MuiInputBase-adornedEnd .MuiInputBase-input":{flex:"1 1 0%",minWidth:0,width:"auto",maxWidth:"100%"},"& .Select-endAdornmentRoot":{display:"flex",alignItems:"center",flexShrink:0,marginRight:b,gap:g,position:"relative",zIndex:2,pointerEvents:"auto","&.Select-endAdornmentRoot--loading":{marginRight:y}},"& .Select-clearIconButton":{display:"inline-flex",alignItems:"center",justifyContent:"center",width:12,height:12,padding:0,border:"none",appearance:"none",background:"transparent",color:e.v2.palette.base.black,cursor:"pointer",flexShrink:0,lineHeight:0,position:"relative",zIndex:2,pointerEvents:"auto","& svg":{display:"block",width:8,height:8,fontSize:8},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:1}},"&.Mui-disabled .Select-clearIconButton":{opacity:"0 !important",pointerEvents:"none"},"& .Select-menuTriggerIcon":{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c,minWidth:c,height:c,cursor:"pointer",color:e.v2.palette.base.black,lineHeight:0,"& svg, & .MuiSvgIcon-root":{transition:e.transitions.create(["transform","color"],{duration:e.transitions.duration.shorter})},"&.Select-menuTriggerIcon--loading":{width:x,minWidth:x,height:x,cursor:"default"}},"&.Mui-focused .Select-menuTriggerIcon, & .Select-menuTriggerIcon-open":{color:e.v2.palette.brand[500]},"& .Select-menuTriggerIcon-open svg, & .Select-menuTriggerIcon-open .MuiSvgIcon-root":{transform:"rotate(180deg)"},"&.Mui-disabled .MuiSelect-icon":{color:"rgba(0, 0, 0, 0.38)"},"&.Mui-disabled .Select-menuTriggerIcon":{cursor:"default",color:"rgba(0, 0, 0, 0.38)","& svg path":{fill:"rgba(0, 0, 0, 0.38)",stroke:"rgba(0, 0, 0, 0.38)"}},...s&&{border:`1px solid ${I}`},...p&&{borderBottom:"none"},...i&&{border:`1px solid ${e.palette.error.main}`,boxShadow:"none"}}}),Ze=styled(r,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:i})=>({display:"flex",alignItems:"stretch",height:"100%",flexDirection:"column",flex:1,width:"100%",cursor:"pointer",borderRadius:4,overflow:"visible",textAlign:"start",...i&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}},"&:has(.MuiInputBase-root.Mui-disabled)":{cursor:"default"}})),qe=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));function et(){return jsx(r,{component:"img",src:Sc,alt:"",sx:{width:10,height:7.5,flexShrink:0}})}function tt(){return jsx(T,{src:A$1,alt:""})}function ot(){return jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none","aria-hidden":true,children:[jsx("path",{d:"M1.795 1.739L6.316 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"}),jsx("path",{d:"M6.316 1.739L1.795 6.26",stroke:"currentColor",strokeWidth:"0.875",strokeLinecap:"round"})]})}var ie=forwardRef((e,i)=>jsx(ne,{ref:i,viewBox:"0 0 8 5",fill:"none",fontSize:"small",sx:{width:8,height:5},...e,children:jsx("path",{d:"M7.30273 0.117188C7.3806 0.115307 7.4565 0.138248 7.52051 0.182617C7.58455 0.227088 7.63373 0.290458 7.66211 0.363281C7.69046 0.436073 7.69761 0.516047 7.68262 0.592773C7.66777 0.668745 7.63069 0.738375 7.57715 0.793945L4.17285 4.43164C4.10255 4.50662 4.00523 4.55078 3.90234 4.55078C3.79964 4.55064 3.703 4.5065 3.63281 4.43164L0.227539 0.794922L0.228516 0.793945C0.175799 0.738766 0.139848 0.669812 0.125 0.594727C0.11011 0.519097 0.116275 0.440194 0.143555 0.368164C0.170957 0.296002 0.218752 0.232474 0.28125 0.1875C0.343758 0.14262 0.418162 0.11821 0.495117 0.118164C0.546901 0.118166 0.598306 0.12907 0.645508 0.150391C0.691832 0.171346 0.733094 0.201824 0.767578 0.239258L3.90234 3.58691L7.03711 0.239258C7.10547 0.164191 7.20108 0.119752 7.30273 0.117188Z",fill:"currentColor",stroke:"currentColor",strokeWidth:.233333})}));ie.displayName="SelectChevronIcon";function nt(){return jsx(oe,{size:14,sx:{color:"text.secondary"}})}export{ot as $,y as A,g as B,he as C,me as D,Fe as E,ke as F,$e as G,Le as H,ze as I,We as J,Be as K,Ae as L,Te as M,Ve as N,Y as O,_ as P,Ee as Q,Re as R,Oe as S,Ge as T,De as U,je as V,Ne as W,Ze as X,qe as Y,et as Z,tt as _,u as a,ie as aa,le as b,nt as ba,ae as c,de as d,se as e,z as f,W as g,B as h,pe as i,E as j,ce as k,h as l,xe as m,R as n,O as o,D as p,ge as q,j as r,N as s,Z as t,q as u,ue as v,S as w,b as x,c as y,x as z};
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import type { SxProps, Theme } from '@mui/material/styles';
3
- interface CurrenciesMenuCountryFlagProps {
4
- currency: string;
5
- className?: string;
6
- sx?: SxProps<Theme>;
7
- }
8
- declare function CountryFlag({ currency, className, sx }: Readonly<CurrenciesMenuCountryFlagProps>): import("react").JSX.Element;
9
- declare const _default: import("react").MemoExoticComponent<typeof CountryFlag>;
10
- export default _default;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import type { CurrenciesMenuProps } from './type';
3
- declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<CurrenciesMenuProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>>;
4
- export default _default;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import type { CurrenciesMenuOptionContentProps } from './type';
3
- declare function OptionContent({ currency, selected, renderOption }: Readonly<CurrenciesMenuOptionContentProps>): import("react").JSX.Element;
4
- declare const _default: import("react").MemoExoticComponent<typeof OptionContent>;
5
- export default _default;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import type { CurrenciesMenuOptionRowProps } from './type';
3
- declare function OptionRow({ currency, selected, onSelect, renderOption }: Readonly<CurrenciesMenuOptionRowProps>): import("react").JSX.Element;
4
- declare const _default: import("react").MemoExoticComponent<typeof OptionRow>;
5
- export default _default;
@@ -1,15 +0,0 @@
1
- export declare const currenciesMenuClassNamePrefix: "os-shared-CurrenciesMenu";
2
- export declare const currenciesMenuClassNames: {
3
- readonly root: "os-shared-CurrenciesMenu-root";
4
- readonly trigger: "os-shared-CurrenciesMenu-trigger";
5
- readonly triggerInfo: "os-shared-CurrenciesMenu-triggerInfo";
6
- readonly triggerLabel: "os-shared-CurrenciesMenu-triggerLabel";
7
- readonly triggerArrow: "os-shared-CurrenciesMenu-triggerArrow";
8
- readonly static: "os-shared-CurrenciesMenu-static";
9
- readonly flag: "os-shared-CurrenciesMenu-flag";
10
- readonly category: "os-shared-CurrenciesMenu-category";
11
- readonly categoryLabel: "os-shared-CurrenciesMenu-categoryLabel";
12
- readonly option: "os-shared-CurrenciesMenu-option";
13
- readonly optionLabel: "os-shared-CurrenciesMenu-optionLabel";
14
- };
15
- export type CurrenciesMenuClassNames = (typeof currenciesMenuClassNames)[keyof typeof currenciesMenuClassNames];
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { SvgIconProps } from '@mui/material/SvgIcon';
3
- export declare const CurrenciesMenuChevronIcon: (props: SvgIconProps) => import("react").JSX.Element;
@@ -1,4 +0,0 @@
1
- export { default } from './CurrenciesMenu';
2
- export type { CurrenciesMenuGroupOption, CurrenciesMenuMenuProps, CurrenciesMenuOption, CurrenciesMenuProps } from './type';
3
- export { currenciesMenuClassNames } from './constants';
4
- export type { CurrenciesMenuClassNames } from './constants';
@@ -1 +0,0 @@
1
- export{a as currenciesMenuClassNames,b as default}from'../../_chunks/chunk-KBXWH3SO.js';import'../../_chunks/chunk-F7I3KDV5.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
@@ -1,32 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const Root: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
4
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
5
- export declare const Button: import("@emotion/styled").StyledComponent<Omit<Omit<import("../primitives").ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & {
6
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
7
- } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
8
- $open?: boolean | undefined;
9
- }, {}, {}>;
10
- export declare const Info: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
12
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
13
- export declare const Label: import("@emotion/styled").StyledComponent<Omit<Omit<import("../primitives").TypographyProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & {
14
- ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
15
- } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
16
- export declare const Arrow: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
17
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
18
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
19
- $open?: boolean | undefined;
20
- }, {}, {}>;
21
- export declare const Static: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
22
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
23
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
24
- export declare const Category: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
25
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
26
- }, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
27
- export declare const CategoryLabel: import("@emotion/styled").StyledComponent<Omit<Omit<import("../primitives").TypographyProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & {
28
- ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
29
- } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
30
- export declare const MenuItem: import("@emotion/styled").StyledComponent<Omit<Omit<import("../primitives").MenuItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
31
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
32
- } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -1,64 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { BoxProps } from '@mui/material/Box';
3
- import type { SxProps, Theme } from '@mui/material/styles';
4
- import type { MenuProps } from '../primitives';
5
- import type { currenciesMenuClassNames } from './constants';
6
- export type CurrenciesMenuClassNames = (typeof currenciesMenuClassNames)[keyof typeof currenciesMenuClassNames];
7
- /** Grouped bucket inside `options` — rendered under its own translated heading. */
8
- export interface CurrenciesMenuGroupOption {
9
- /** Already-translated heading shown above the group. Omit to hide the heading. */
10
- label?: string;
11
- /** Currency codes in display order for this group. */
12
- items?: string[];
13
- }
14
- /** Single entry in `options` — a flat currency code or a grouped bucket. */
15
- export type CurrenciesMenuOption = string | CurrenciesMenuGroupOption;
16
- export type CurrenciesMenuMenuProps = Omit<MenuProps, 'open' | 'anchorEl' | 'children'>;
17
- export interface CurrenciesMenuProps extends Omit<BoxProps, 'children' | 'onChange' | 'defaultValue' | 'placeholder'> {
18
- /** Controlled selected currency code. Omit for uncontrolled mode. */
19
- value?: string;
20
- /** Initial selection for uncontrolled mode. Falls back to the first `options` entry. */
21
- defaultValue?: string;
22
- /** Fired with the newly selected currency code. */
23
- onChange?: (currency: string) => void;
24
- /** Flat and/or grouped currencies in display order. Strings render as ungrouped rows; objects render as headed groups. */
25
- options?: CurrenciesMenuOption[];
26
- /** Loading state — bordered non-interactive trigger with a spinner instead of the menu. */
27
- isLoading?: boolean;
28
- /** Disables the trigger and blocks opening the menu. */
29
- disabled?: boolean;
30
- /** Optional id — also used as `data-testid` fallback target. Never auto-generated. */
31
- id?: string;
32
- /** Consumer className merged with the `root` slot. */
33
- className?: string;
34
- /** MUI sx forwarded to the root (perceived trigger box). */
35
- sx?: SxProps<Theme>;
36
- /** Props forwarded to the underlying `Menu` panel (placement, panel `sx`, `popperSx`,
37
- * `panelProps`, Popper behaviors). See `CurrenciesMenuMenuProps`. */
38
- menuProps?: CurrenciesMenuMenuProps;
39
- /** Popper placement for the dropdown panel. */
40
- menuPlacement?: MenuProps['placement'];
41
- /** Already-translated fallback shown when nothing is selected. */
42
- placeholder?: string;
43
- /** Trailing trigger affordance. Defaults to a chevron that rotates when open. Pass `null` to hide. */
44
- triggerIcon?: ReactNode | null;
45
- /** Custom row content. Receives the code plus its selected state. Defaults to flag + code. */
46
- renderOption?: (currency: string, state: {
47
- selected: boolean;
48
- }) => ReactNode;
49
- /** Custom trigger content. Receives the selected code. Defaults to flag + code. */
50
- renderSelected?: (currency: string) => ReactNode;
51
- }
52
- /** Props for the nested `OptionContent` row content (flag + code or custom `renderOption`). */
53
- export interface CurrenciesMenuOptionContentProps {
54
- currency: string;
55
- selected: boolean;
56
- renderOption?: CurrenciesMenuProps['renderOption'];
57
- }
58
- /** Props for the nested `OptionRow` selectable row. */
59
- export interface CurrenciesMenuOptionRowProps {
60
- currency: string;
61
- selected: boolean;
62
- onSelect: (currency: string) => void;
63
- renderOption?: CurrenciesMenuProps['renderOption'];
64
- }
@@ -1,9 +0,0 @@
1
- import type { CurrenciesMenuOption } from './type';
2
- export interface CurrenciesMenuRenderNode {
3
- key: string;
4
- label?: string;
5
- items: string[];
6
- }
7
- export declare function getFirstCurrency(options?: CurrenciesMenuOption[]): string;
8
- export declare function normalizeOptions(options?: CurrenciesMenuOption[]): CurrenciesMenuRenderNode[];
9
- export declare function getCurrencyCount(options?: CurrenciesMenuOption[]): number;