@tap-payments/os-micro-frontend-shared 0.3.189 → 0.3.191-test.1
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.
- package/build/_chunks/chunk-2AS2ZAB6.js +2 -0
- package/build/_chunks/{chunk-4Y4TRVPK.js → chunk-2W4VCLHJ.js} +1 -1
- package/build/_chunks/{chunk-BTCTBJEF.js → chunk-2YLEWNVJ.js} +1 -1
- package/build/_chunks/{chunk-RCAO6ZAD.js → chunk-3DXSMD3B.js} +1 -1
- package/build/_chunks/{chunk-KNQ43R7K.js → chunk-56DY2IOC.js} +1 -1
- package/build/_chunks/{chunk-IIUYKXZ5.js → chunk-7464NDOX.js} +1 -1
- package/build/_chunks/{chunk-LRB463GT.js → chunk-7KQVJEOM.js} +1 -1
- package/build/_chunks/{chunk-AZQ6HWUA.js → chunk-7WYTESNH.js} +1 -1
- package/build/_chunks/{chunk-CZEE2EMK.js → chunk-AKF4P7KA.js} +1 -1
- package/build/_chunks/chunk-AXF6U3X5.js +1 -0
- package/build/_chunks/{chunk-4RSATF3L.js → chunk-D5C2523S.js} +1 -1
- package/build/_chunks/{chunk-7TV4RKN7.js → chunk-D7N7HY5W.js} +1 -1
- package/build/_chunks/{chunk-QEO2QRKX.js → chunk-DNEPOE4E.js} +1 -1
- package/build/_chunks/{chunk-SNUY7BF3.js → chunk-DTTQ6SXZ.js} +1 -1
- package/build/_chunks/{chunk-FVE43KC4.js → chunk-E4ARE2GE.js} +1 -1
- package/build/_chunks/chunk-EM7IY6MB.js +1 -0
- package/build/_chunks/chunk-G4VSMK43.js +1 -0
- package/build/_chunks/{chunk-4S4J63Z7.js → chunk-IEHZKLJ3.js} +1 -1
- package/build/_chunks/{chunk-5NNUOI56.js → chunk-IZCX7VUH.js} +1 -1
- package/build/_chunks/{chunk-6KHYKSNX.js → chunk-KIXDDUFZ.js} +1 -1
- package/build/_chunks/chunk-LCPBBNN6.js +2 -0
- package/build/_chunks/{chunk-KCRZDAWH.js → chunk-LSX3HCYK.js} +1 -1
- package/build/_chunks/{chunk-YSV2LPIZ.js → chunk-M3FL6M23.js} +1 -1
- package/build/_chunks/{chunk-JYJXMXMU.js → chunk-MC64H3SE.js} +1 -1
- package/build/_chunks/{chunk-5KVVFTDN.js → chunk-MD7OAK4T.js} +1 -1
- package/build/_chunks/{chunk-FPNR7PKU.js → chunk-MGB3F4QT.js} +1 -1
- package/build/_chunks/chunk-MW2PULH6.js +1 -0
- package/build/_chunks/chunk-O3EI6LW4.js +1 -0
- package/build/_chunks/{chunk-WHACEHGR.js → chunk-OFGNK4YO.js} +1 -1
- package/build/_chunks/{chunk-UKYNGYOO.js → chunk-OQZRUV2S.js} +1 -1
- package/build/_chunks/{chunk-KN7G6DUF.js → chunk-OWIUXOZF.js} +1 -1
- package/build/_chunks/{chunk-KQKSONOX.js → chunk-Q3MY6ESH.js} +1 -1
- package/build/_chunks/{chunk-24EOXOSG.js → chunk-QATB3PPX.js} +1 -1
- package/build/_chunks/{chunk-55FNS2KD.js → chunk-R7A6CC4H.js} +1 -1
- package/build/_chunks/{chunk-HACFGJRP.js → chunk-RREOIBJN.js} +1 -1
- package/build/_chunks/{chunk-6W3SFGQU.js → chunk-SNEI6PN5.js} +1 -1
- package/build/_chunks/{chunk-COIPTJBL.js → chunk-SVQZWXXY.js} +1 -1
- package/build/_chunks/{chunk-5I7BKJA3.js → chunk-SZY5JDY4.js} +1 -1
- package/build/_chunks/chunk-TDOB73LL.js +1 -0
- package/build/_chunks/{chunk-ATRGNJWP.js → chunk-TIOH54EN.js} +1 -1
- package/build/_chunks/{chunk-5OD4THRC.js → chunk-TLFJRRMH.js} +1 -1
- package/build/_chunks/{chunk-3YIQTSZN.js → chunk-TPQZF32W.js} +1 -1
- package/build/_chunks/{chunk-JICMSB65.js → chunk-VF6DYRPH.js} +1 -1
- package/build/_chunks/{chunk-3ORRZSQM.js → chunk-VXQYIB4Z.js} +1 -1
- package/build/_chunks/{chunk-N6P4QALK.js → chunk-X5Y4LZLO.js} +1 -1
- package/build/_chunks/{chunk-CMULAHNW.js → chunk-XH2GRI2U.js} +1 -1
- package/build/_chunks/chunk-XIMED5QH.js +15 -0
- package/build/_chunks/{chunk-5P7CPJJC.js → chunk-XVLSHARJ.js} +1 -1
- package/build/_chunks/{chunk-LXYY5SAC.js → chunk-Y3UT2AO6.js} +1 -1
- package/build/_chunks/{chunk-4D24WQBN.js → chunk-YLIOAJF6.js} +1 -1
- package/build/_chunks/{chunk-KTRSZRCK.js → chunk-Z7WYVK7K.js} +1 -1
- package/build/_chunks/{chunk-BYAERZSV.js → chunk-ZV7L4GKY.js} +1 -1
- package/build/_chunks/{chunk-DNA5JWAG.js → chunk-ZYMH75GG.js} +1 -1
- package/build/components/AccountDropdown/index.js +1 -1
- package/build/components/ActionMenu/index.js +1 -1
- package/build/components/ActiveFilterChip/index.js +1 -1
- package/build/components/AmountConversionFilter/index.js +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AmountInput/style.d.ts +3 -4
- package/build/components/AmountSlider/index.js +1 -1
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/AppWindowWrapper/index.js +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/Calender/index.js +1 -1
- package/build/components/ChipStack/index.js +1 -1
- package/build/components/ColorPicker/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/ConfirmDialog/index.js +1 -1
- package/build/components/CountryFilter/index.js +1 -1
- package/build/components/CurrencyFilter/index.js +1 -1
- package/build/components/Customer/CustomerForms/style.d.ts +6 -7
- package/build/components/Customer/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DeviceIcon/index.js +1 -1
- package/build/components/Discount/index.js +1 -1
- package/build/components/Dropdown2/index.js +1 -1
- package/build/components/DropdownButton/index.js +1 -1
- package/build/components/DropdownMenu/index.js +1 -1
- package/build/components/ExpandableSideBar/index.js +1 -1
- package/build/components/FeedbackInput/FeedbackInput.d.ts +4 -0
- package/build/components/FeedbackInput/constants.d.ts +9 -0
- package/build/components/FeedbackInput/index.d.ts +4 -0
- package/build/components/FeedbackInput/index.js +1 -0
- package/build/components/FeedbackInput/style.d.ts +14 -0
- package/build/components/FeedbackInput/type.d.ts +42 -0
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FileUpload/index.js +1 -1
- package/build/components/FileUploader/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/HeatMap/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/InputBase/InputBase/index.d.ts +9 -3
- package/build/components/InputBase/PhoneInputBase/CountriesList/style.d.ts +3 -4
- package/build/components/InputBase/PhoneInputBase/style.d.ts +3 -4
- package/build/components/InputBase/index.d.ts +1 -1
- package/build/components/InputBase/index.js +1 -1
- package/build/components/InputNumber/InputNumber.d.ts +3 -7
- package/build/components/InputNumber/constants.d.ts +6 -0
- package/build/components/InputNumber/index.d.ts +3 -0
- package/build/components/InputNumber/index.js +1 -1
- package/build/components/InputNumber/type.d.ts +30 -0
- package/build/components/Inputs/CountriesDropDown/style.d.ts +6 -8
- package/build/components/Inputs/index.js +1 -1
- package/build/components/JSONViewer/index.js +1 -1
- package/build/components/LanguageDropdown/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/MerchantCurrencyDropdown/index.js +1 -1
- package/build/components/MerchantLogo/index.js +1 -1
- package/build/components/MerchantsDropdown/index.js +1 -1
- package/build/components/MultiSelectDropdownButton/index.js +1 -1
- package/build/components/MultiSelectWithSearch/index.js +1 -1
- package/build/components/NestedDropdown/index.js +1 -1
- package/build/components/PartnersFilter/index.js +1 -1
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/ProgressRing/index.js +1 -1
- package/build/components/RFH/Inputs/FormInput/FormInput.d.ts +2 -2
- package/build/components/RFH/index.js +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/RatingCount/index.js +1 -1
- package/build/components/ReceiptsViewer/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/ReferenceTypeFilter/style.d.ts +3 -3
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SelectDropdown/index.js +1 -1
- package/build/components/SelectWithSearch/index.js +1 -1
- package/build/components/SelectWithSearch/type.d.ts +2 -2
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/StatusLabel/index.js +1 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/Timepicker/index.js +1 -1
- package/build/components/Timepicker/style.d.ts +3 -4
- package/build/components/Toolbar/index.js +1 -1
- package/build/components/TooltipChip/index.js +1 -1
- package/build/components/TreeDropdown/TreeNodeList/style.d.ts +3 -3
- package/build/components/TreeDropdown/index.js +1 -1
- package/build/components/VAT/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/ViewColumnRadioFilter/index.js +1 -1
- package/build/components/VirtualTables/components/ColumnFilter/Inputs/style.d.ts +3 -3
- package/build/components/VirtualTables/index.js +1 -1
- package/build/components/Widget/index.js +1 -1
- package/build/components/WindowAppIcon/index.js +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/index.d.ts +2 -2
- package/build/components/index.js +1 -1
- package/build/components/primitives/Input/constants.d.ts +13 -0
- package/build/components/primitives/Input/icons.d.ts +5 -0
- package/build/components/primitives/Input/style.d.ts +20 -10
- package/build/components/primitives/Input/type.d.ts +17 -0
- package/build/components/primitives/index.js +1 -1
- package/build/index.js +1 -1
- package/package.json +2 -2
- package/build/_chunks/chunk-4KSZBODD.js +0 -1
- package/build/_chunks/chunk-7NSNVOPD.js +0 -2
- package/build/_chunks/chunk-AVXFHQX2.js +0 -1
- package/build/_chunks/chunk-FCEHROGX.js +0 -1
- package/build/_chunks/chunk-I7435KWJ.js +0 -2
- package/build/_chunks/chunk-P77ATTG5.js +0 -1
- package/build/_chunks/chunk-QXHIDHUU.js +0 -1
- package/build/_chunks/chunk-S5B67HS7.js +0 -1
- package/build/_chunks/chunk-SG2YT6YD.js +0 -15
- package/build/_chunks/chunk-UZSTD2CE.js +0 -1
- package/build/components/Input/Input.d.ts +0 -11
- package/build/components/Input/index.d.ts +0 -2
- package/build/components/Input/index.js +0 -1
- package/build/components/Input/style.d.ts +0 -3
- package/build/components/InputBase/InputBase/InputBase.d.ts +0 -11
- package/build/components/InputBase/InputBase/style.d.ts +0 -15
- package/build/components/InputNumber/style.d.ts +0 -4
- package/build/components/SearchListInput/SearchListInput.d.ts +0 -11
- package/build/components/SearchListInput/index.d.ts +0 -2
- package/build/components/SearchListInput/index.js +0 -1
- package/build/components/SearchListInput/style.d.ts +0 -7
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-3ORRZSQM.js';import {a as a$1}from'./chunk-AVXFHQX2.js';import {j,f}from'./chunk-7NSNVOPD.js';import {yc}from'./chunk-PLMJIRXJ.js';import {Pc}from'./chunk-YKKS24ES.js';import {useId,useState,useCallback,useMemo,createElement}from'react';import c from'@mui/material/Box';import ne from'@mui/material/Typography';import O from'@mui/material/Input';import {styled}from'@mui/material/styles';import {CircularProgress}from'@mui/material';import ee from'@mui/material/SvgIcon';import {jsx,jsxs}from'react/jsx-runtime';var me=styled(j)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"})),xe=styled(j)(({theme:e})=>({fontSize:"11px",color:e.v2.palette.base.black,fontWeight:600,lineHeight:"14.3px",width:200})),fe=styled(c)(()=>({display:"flex",flexDirection:"column",maxHeight:400,overflow:"auto",gap:"8px"})),D=styled(O)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}})),Se=styled(f)({padding:0,width:12,height:12,".MuiSvgIcon-root, img":{width:12,height:12}}),F=styled(c)(()=>({display:"flex",flexDirection:"column",gap:"8px",padding:"4px"})),ge=styled(c)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap"})),Ce=styled(c)(({theme:e})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer"})),g=styled(j)(({selected:e})=>({display:"flex",gap:"8px",alignItems:"center",fontSize:"10px",fontWeight:500,color:"#000",cursor:"pointer",padding:8,justifyContent:"space-between",...e&&{backgroundColor:"#F8F8F8"}}));var te="M4.83332 0C2.16987 0 0 2.16988 0 4.83334C0 7.4968 2.16987 9.66668 4.83332 9.66668C5.98544 9.66668 7.04455 9.2597 7.87628 8.58335L11.1465 11.8535C11.1925 11.9015 11.2477 11.9398 11.3088 11.9662C11.3698 11.9926 11.4356 12.0066 11.5021 12.0072C11.5686 12.0079 11.6346 11.9953 11.6962 11.9702C11.7578 11.945 11.8137 11.9078 11.8607 11.8608C11.9078 11.8138 11.945 11.7578 11.9701 11.6962C11.9953 11.6346 12.0079 11.5686 12.0072 11.5021C12.0065 11.4356 11.9926 11.3699 11.9662 11.3088C11.9398 11.2478 11.9015 11.1926 11.8535 11.1465L8.58331 7.87632C9.25966 7.04458 9.66664 5.98546 9.66664 4.83334C9.66664 2.16988 7.49677 0 4.83332 0ZM4.83332 1C6.95633 1 8.66665 2.71032 8.66665 4.83334C8.66665 5.86755 8.25871 6.80192 7.59699 7.49025C7.5562 7.52023 7.5202 7.55623 7.49022 7.59702C6.80189 8.25875 5.86752 8.66668 4.83332 8.66668C2.71031 8.66668 0.999997 6.95636 0.999997 4.83334C0.999997 2.71032 2.71031 1 4.83332 1Z";function oe({size:e=12,sx:a,className:r,...d}){return jsx(ee,{viewBox:"0 0 12 12",inheritViewBox:true,className:`${r??""} MUISvgIcon__search-icon`,sx:{width:e,height:e,color:"text.primary",...a},...d,children:jsx("path",{d:te,fill:"currentColor"})})}var N=oe;function pe({options:e,onChangeOption:a$2,selectedOption:r,placeholder:d,label:A,isLoading:R,renderOption:C,iconUrl:h,disabled:u,onClearValue:m,slotProps:V={},hideSelectedCheckmark:$,listWrapperSx:Z={},name:U,...q}){let G=yc(useId(),"select-with-search"),{selectInput:I={},searchInput:J={},dropdownContainer:v={},item:b={}}=V,[y,w]=useState(null),[n,x]=useState(""),K=useCallback(()=>{m!==void 0?m():a$2(null);},[m,a$2]),f=!!y,Q=t=>{u||w(f?null:t.currentTarget);},S=()=>{w(null),x("");},X=R?jsx(CircularProgress,{size:16}):jsx(N,{onClick:()=>{n&&x("");},role:"button"}),W=useMemo(()=>n?e.filter(t=>{let p=t?.label?.toLowerCase(),j=t?.value?.toLowerCase();return p?.includes(n.toLowerCase())||j?.includes(n.toLowerCase())}):e,[e,n]),Y=useMemo(()=>jsx(c,{sx:{display:"flex",alignItems:"center",maxWidth:16},children:jsx(c,{component:"img",src:h,alt:"icon",sx:{maxWidth:12,height:12}})}),[h]);return jsx(a,{id:G,"data-testid":"SelectWithSearch",disabled:u,open:f,anchorEl:y,onOpen:Q,onClose:S,hasValue:!!r?.value,onClear:K,trigger:jsx(a$1,{className:"SelectWithSearch_input",name:U,placeholder:"Please Select",label:A,sx:{cursor:"pointer"},value:r?.label||"",InputLabelProps:{filled:!!r?.label},disabled:u,...I,InputProps:{readOnly:true,disableUnderline:true,...!!h&&{startAdornment:Y},...I.InputProps}}),listWrapperSx:{height:"100%",overflow:"hidden",...Z},slotProps:{popover:{slotProps:{paper:{sx:{overflow:"hidden"}}}}},...q,children:jsxs(F,{...v,className:`SelectWithSearch_container ${v?.className??""}`,children:[jsx(D,{className:"SelectWithSearch_input",placeholder:d||"Select",endAdornment:X,onClick:t=>{t.stopPropagation();},value:n,onChange:t=>{x(t.target.value);},disableUnderline:true,sx:{cursor:"default",width:"100%",backgroundColor:"white",border:"1px solid #F2F2F2",...e.length&&{marginBottom:"4px"},...n&&{cursor:"pointer"}},...J}),jsxs(c,{className:"SelectWithSearch_options",overflow:"auto",maxHeight:400,children:[W.length===0&&n&&jsx(g,{selected:false,...b,children:jsx(ne,{component:"span",fontSize:"10px",fontWeight:500,color:"#8D8D94",children:"No results found"})}),W.map(t=>C?C(t,{closeDropdown:S,open:f}):createElement(g,{...b,className:`SelectWithSearch_item ${r?.value===t.value?"SelectWithSearch_item-selected":""}`,key:t.value,selected:r?.value===t.value,onClick:p=>{p.stopPropagation(),p.preventDefault(),r?.value===t.value?a$2(null):a$2(t),S();}},jsx("span",{children:t.label}),!$&&r?.value===t?.value&&jsx(c,{component:"img",src:Pc,alt:"close",sx:{width:10,height:7.5}})))]})]})})}var H=pe;var Re=H;export{me as a,xe as b,fe as c,D as d,Se as e,F as f,ge as g,Ce as h,g as i,Re as j};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-UZSTD2CE.js';import {yc}from'./chunk-PLMJIRXJ.js';import {wi,A}from'./chunk-YKKS24ES.js';import {useId}from'react';import g from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var s=styled(a)(({theme:o})=>({border:`1px solid ${o.palette.divider}`,".icon":{width:14}})),d=styled(g)(()=>({padding:"8px 16px","> div + div":{marginTop:"8px"}}));var v=({value:o,name:c,placeholder:l,onSearchChange:u,onSearchReset:f,...h})=>{let I=yc(useId(),"search-list-input");return jsx(d,{id:I,"data-testid":"SearchListInput",...h,children:jsx(s,{className:"input",name:c,placeholder:l,onChange:t=>u(t.target.value),onKeyDown:t=>t.stopPropagation(),value:o,inputProps:{autoComplete:"off"},endAdornment:jsx(g,{component:"img","data-icon":o?"close":"search",src:o?wi:A,alt:"search",className:"icon",sx:{cursor:o?"pointer":"default"},onClick:f})})})},m=v;var R=m;export{R as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {f as f$1}from'./chunk-QEO2QRKX.js';import {a as a$1}from'./chunk-QXHIDHUU.js';import {a as a$2}from'./chunk-4QONVXGE.js';import {a,f,e}from'./chunk-KN7G6DUF.js';import {z as z$1}from'./chunk-7NSNVOPD.js';import {Ka,g,yc}from'./chunk-PLMJIRXJ.js';import {Cb}from'./chunk-YKKS24ES.js';import {memo,useRef,useMemo,useCallback,useId,useState}from'react';import {styled,Typography,Box,Popper}from'@mui/material';import {useTranslation}from'react-i18next';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var O=styled(Typography)(()=>({display:"block",textAlign:"center",fontSize:"10px",fontWeight:500,color:"#8D8D94",padding:"24px 0"})),A=styled(Box,{shouldForwardProp:t=>t!=="isDisabled"})(({isDisabled:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",...t&&{"& img":{opacity:.3}}}));var tt=memo(t=>{let{variant:e$1="inActive",badgeCount:o,label:r,...n}=t,s=useRef(null),m=useMemo(()=>!o||Number.isNaN(Ka(o))?null:jsx(z$1,{color:"inactive",children:g(Number(o))}),[o]),a$1=useCallback(p=>{p.stopPropagation(),t?.onClick?.(p);},[t]),l=a[e$1];return jsx(l,{"data-testid":"MultiSelectStatusButton",...n,ref:s,onClick:a$1,statusVariant:e$1,children:jsx(f,{children:jsxs(e,{variant:e$1,children:[r,m]})})})}),W=tt;function V(t){let e=new Set;return t.filter(o=>e.has(o.value)?false:(e.add(o.value),true))}function h(t,e){let o=e.toLowerCase();return t.reduce((r,n)=>{if(n.options?.length){let s=h(n.options,e);s.length&&r.push({...n,options:s});}else (n.placeholder?.toLowerCase().includes(o)||n.value.toLowerCase().includes(o))&&r.push(n);return r},[])}function it({buttonLabel:t,onClear:e,onConfirm:o,dropdownItems:r,apiKey:n,data:s,styles:m,buttonDisabled:a,searchable:l,searchPlaceholder:p}){let{t:Q}=useTranslation(),Y=p??`${Q("search")}...`,$=yc(useId(),"multi-select-dropdown-button"),[C,b]=useState(null),[u,d]=useState(""),G=c=>{b(c.currentTarget);},g=()=>{b(null),d("");},x=!!C,L=s?.[n],J=Array.isArray(L)?L.length:0,S=useMemo(()=>{if(!r)return r;let c=V(r);return !l||!u?c:h(c,u)},[l,u,r]),v=l&&!!u&&S?.length===0,U=l?jsxs(Fragment,{children:[jsx(a$1,{name:"multi-select-search",value:u,placeholder:Y,onSearchChange:d,onSearchReset:()=>d(""),sx:{pt:0}}),v&&jsx(O,{children:"No results found"})]}):void 0;return jsxs("div",{id:$,"data-testid":"MultiSelectDropdownButton",children:[jsx(W,{onClick:G,label:jsxs(A,{isDisabled:a,children:[t,jsx("img",{src:Cb,alt:"arrow-down"})]}),disabled:a,badgeCount:J}),x&&jsx(a$2,{onClick:g}),jsx(Popper,{open:x,anchorEl:C,placement:"bottom-start",sx:{zIndex:9999},children:jsx(f$1,{onCloseDropdown:g,filter:{apiKey:n,data:s,onClear:e,onConfirm:o,options:S,type:"list"},styles:{...m,height:v?"auto":"300px",overflowY:"scroll",maxWidth:"200px"},header:U,searchable:l})})]})}var z=memo(it);var Ot=z;export{Ot as a};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-3ORRZSQM.js';import {a,b,f as f$1,d,c,h as h$1,i,e}from'./chunk-AVXFHQX2.js';import {a as a$4}from'./chunk-2DC5PMER.js';import {a as a$1}from'./chunk-VWIY6RR5.js';import {a as a$2,b as b$1}from'./chunk-MUR4ILTY.js';import {f,aa,j,P,O,h,ba}from'./chunk-7NSNVOPD.js';import {yc,Ac}from'./chunk-PLMJIRXJ.js';import {Pc,A}from'./chunk-YKKS24ES.js';import*as de from'react';import de__default,{useId,useState,useEffect,useMemo,useRef,useCallback}from'react';import {useFormContext,Controller,FormProvider,useForm}from'react-hook-form';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import ne from'@mui/material/Box';import Ft from'@mui/material/Button';import Ct from'@mui/material/Input';import lo from'@mui/material/ListSubheader';import io from'@mui/material/MenuItem';import {keyframes,styled,alpha}from'@mui/material/styles';import Rt from'@mui/material/Popper';import Lt from'@mui/material/TextField';function st({onSubmit:e,methods:o,children:t}){let r=yc(useId(),"default-form");return jsx(FormProvider,{...o,children:jsx("form",{id:r,"data-testid":"DefaultForm",onSubmit:e,noValidate:true,children:t})})}var ut=de__default.memo(st);var Xe=de.forwardRef(({name:e,helperText:o,hideArrows:t,feedback:r,...n},l)=>{let{control:s}=useFormContext();return jsx(Controller,{name:e,control:s,defaultValue:n.defaultValue,render:({field:d,fieldState:u})=>jsx(a,{...n,...d,ref:l,hasError:!!u.error,helperText:o??u.error?.message,feedback:r,hideArrows:t,onChange:h=>{d.onChange(h),n.onChange?.(h);},onWheel:h=>{h.target instanceof HTMLElement&&h.target.blur();}})})});Xe.displayName="RFHFormInput";var Ze=de.memo(Xe);var ht=Ze;function oo({phoneName:e,countries:o,countryName:t,helperText:r,isCountriesLoading:n,disabled:l,feedback:s,...d}){let{control:u,watch:h,setValue:f}=useFormContext(),F=h(t),S=x=>{f(t,x);};return jsx(Controller,{name:e,control:u,render:({field:{onChange:x,value:m},fieldState:a})=>jsx(h$1,{...d,phoneValue:m,countries:o,hasError:!!a.error,helperText:r??a.error?.message,feedback:s,onPhoneChange:C=>{x(C);},disabled:l,countryValue:F,onCountryChange:S,isCountriesLoading:n})})}oo.displayName="RFHPhoneInput";var to=oo;var gt=to;var Ie=(e,o)=>e.toFixed(o);function ro({amountName:e,currencies:o,currencyName:t,helperText:r,isCurrenciesLoading:n,...l}){let{control:s,watch:d,setValue:u}=useFormContext(),h=d(t),f=d(e),F=S=>{u(t,S),u(e,Ie(Number(f),S?.decimals||2));};return jsx(Controller,{name:e,control:s,render:({field:{onChange:S,value:x},fieldState:m})=>jsx(i,{...l,amountValue:x??"",currencies:o,hasError:!!m.error,helperText:r??m.error?.message,onAmountChange:a=>{S(a);},onAmountBlur:a=>{S(Ie(Number(a),h?.decimals||2));},currencyValue:h,onCurrencyChange:F,isCurrenciesLoading:n})})}ro.displayName="RFHAmountInput";var ao=ro;var yt=ao;var Mt=keyframes`
|
|
2
|
-
0% {
|
|
3
|
-
transform: rotate(-90deg);
|
|
4
|
-
}
|
|
5
|
-
100% {
|
|
6
|
-
transform: rotate(270deg);
|
|
7
|
-
}
|
|
8
|
-
`,co=styled(ne)({width:12,height:12,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${Mt} 2s linear infinite`}),z=styled(lo)(({theme:e})=>({backgroundColor:e.palette.common.white,paddingLeft:8,paddingRight:8,paddingBottom:6,lineHeight:1})),po=styled("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontWeight:500,fontSize:11,lineHeight:"100%",letterSpacing:0,color:"#8D8D94",leadingTrim:"none",transition:e.transitions.create(["color","opacity"],{duration:90,easing:"ease-in"})})),so=styled(ne)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",gap:e.spacing(1)})),uo=styled(lo)(({theme:e})=>({backgroundColor:e.palette.common.white,paddingLeft:8,paddingRight:8,paddingTop:e.spacing(.75),paddingBottom:e.spacing(.75),lineHeight:1.2,"&.MuiListSubheader-root":{lineHeight:1.2}})),mo=styled(Ft)(({theme:e})=>({minWidth:0,padding:"2px 4px",fontFamily:e.typography.fontFamily,fontWeight:500,fontStyle:"normal",fontSize:11,lineHeight:"120%",letterSpacing:0,textTransform:"none",verticalAlign:"middle",color:"#1F88D0",transition:e.transitions.create(["color","background-color","opacity"],{duration:90,easing:"ease-in"})})),Pt=styled(f)(()=>({padding:0,".MuiSvgIcon-root":{width:12,height:12}})),ho=styled("img")({width:14,height:14,flexShrink:0,display:"block"}),fo=styled(ne)({display:"flex",alignItems:"center",width:"100%",gap:8}),So=styled(io,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:o})=>({fontSize:"12px",backgroundColor:o?"#F8F8F8 !important":e.palette.common.white,"&.Mui-disabled":{opacity:1}})),go=styled(Pt,{shouldForwardProp:e=>e!=="$mutedRect"})(({$mutedRect:e})=>e?{"& svg rect":{fill:"#BDC1CC"}}:{}),me=styled(Ct)(({theme:e})=>({width:"100%",height:36,padding:"8px 8px 8px 12px",borderRadius:4,backgroundColor:e.palette.common.white,border:"1px solid #F2F2F2",boxSizing:"border-box","&:hover":{borderColor:"#F2F2F2"},"&.Mui-focused":{borderColor:"#F2F2F2",backgroundColor:e.palette.common.white},"&:before, &:after":{display:"none"},"& input":{padding:0,fontSize:10},"& .MuiInputBase-input":{paddingRight:4}}));styled(io)(({theme:e})=>({opacity:1,paddingTop:0,paddingBottom:0,marginBottom:8,minHeight:"auto",pointerEvents:"none",backgroundColor:e.palette.common.white,"&:hover":{backgroundColor:e.palette.common.white},"&.Mui-focusVisible":{backgroundColor:e.palette.common.white},"&.Mui-disabled":{backgroundColor:e.palette.common.white,opacity:1}}));var kt=keyframes`
|
|
9
|
-
0% {
|
|
10
|
-
transform: rotate(-90deg);
|
|
11
|
-
}
|
|
12
|
-
100% {
|
|
13
|
-
transform: rotate(270deg);
|
|
14
|
-
}
|
|
15
|
-
`,Fo=styled(ne)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${kt} 2s linear infinite`}),he=styled(ne)(({theme:e})=>({position:"relative",width:11,height:11,transform:"rotate(0deg)",color:e.palette.common.black,"& svg":{width:"100%",height:"100%",display:"block"}})),Co=styled(z)({paddingTop:"8px"}),Pe=styled("ul")({listStyle:"none",margin:0,padding:0}),Io=styled(io)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,"&.Mui-disabled":{opacity:1,color:"#8D8D94"}})),Mo=styled(io,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:o})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),backgroundColor:o?e.palette.action.hover:e.palette.common.white})),fe=styled("span")({flex:1,minWidth:0}),Se=styled("img")({width:10,height:7.5,flexShrink:0}),Po=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:o,$optionDisabled:t})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:48,paddingLeft:e.spacing(2),paddingRight:e.spacing(2),backgroundColor:o?e.palette.action.hover:e.palette.common.white,"&.Mui-focused":{backgroundColor:e.palette.action.hover},...t&&{opacity:.38,pointerEvents:"none"}})),Re=styled("span")({fontSize:"10px",fontWeight:500,color:"#8D8D94"}),Ro=styled(Lt,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:o,feedbackType:t,hasFeedback:r,hasLabel:n})=>{let{borderColor:l}=t?aa(e,t):{borderColor:void 0},s=r?"4px 4px 0 0":"4px";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:s,backgroundColor:e.palette.grey[400],paddingTop:n?"11px":"0px",paddingBottom:n?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:n?"stretch":"center","&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400]},"&.Mui-disabled":{backgroundColor:e.palette.grey[400]}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:n?"flex-end":"center",alignSelf:n?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:n?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:"8px",top:"50%",transform:"translateY(-50%)",right:9},"& .MuiAutocomplete-popupIndicator":{transform:"none",padding:"1px",marginRight:0,marginLeft:0},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:"1px",marginRight:0,marginLeft:0},...t&&l&&{"& .MuiFilledInput-root":{border:`1px solid ${l}`}},...r&&{"& .MuiFilledInput-root":{borderBottom:"none",borderBottomLeftRadius:0,borderBottomRightRadius:0}},...o&&{"& .MuiFilledInput-root":{border:`1px solid ${e.palette.error.main}`}}}}),bo=e=>({display:"flex",alignItems:"center",gap:"8px",padding:"8px",justifyContent:"space-between",fontSize:"10px",fontWeight:500,cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:"#8D8D94"}),Lo=styled(Rt,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$suppressEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:o,$suppressAutocompleteNoOptions:t,$suppressEmptyMenuSurface:r})=>({"& .MuiPaper-root":r?{boxShadow:"none",border:"none",backgroundColor:"transparent",margin:0,marginTop:0,padding:0,maxHeight:0,minHeight:0,overflow:"hidden",borderRadius:0,pointerEvents:"none"}:{marginTop:4,borderRadius:4,boxShadow:e.shadows[8],border:"1px solid #F2F2F2",backgroundColor:e.palette.common.white},"& .MuiAutocomplete-listbox":{padding:0,...r?{maxHeight:0,minHeight:0,overflow:"hidden"}:{maxHeight:320}},"& .MuiAutocomplete-noOptions":t?{display:"none !important"}:bo(e),"& .MuiAutocomplete-loading":{...bo(e),...!o&&{display:"none"}}}));function ge({placeholder:e,value:o,onValueChange:t,isLoading:r}){let n=yc(useId(),"form-select-menu-search-input"),l=useCallback(s=>{s.stopPropagation();},[]);return jsx(me,{id:n,"data-testid":"FormSelectMenuSearchInput",placeholder:e,value:o,onChange:s=>t(s.target.value),onKeyDown:l,onKeyUp:l,onMouseDown:l,onClick:l,disableUnderline:true,fullWidth:true,inputProps:{"aria-label":e},endAdornment:r?jsx(Fo,{"aria-hidden":true,children:jsx(b$1,{})}):jsx(he,{"aria-hidden":true,children:jsx(a$2,{})})})}var be=jsx(Re,{children:"No results found"}),wo=jsx(Re,{children:"Loading\u2026"});function xe(e,o,t){return o?o(e):t?t(e):e?.label}function Le(e,o,t){let r=o.toLowerCase().trim(),n=(t?t(e):e?.label)??"";return String(n).toLowerCase().includes(r)}function ko(e){return e}function Ao(e){let o=de__default.forwardRef(function(r,n){let{children:l,className:s,...d}=r,u=e.current;return u?jsxs(Fragment,{children:[jsx(Co,{disableSticky:true,children:jsx(ge,{placeholder:u.menuSearchPlaceholder,value:u.searchValue,onValueChange:u.setSearchValue,isLoading:u.isLoading})}),jsx(Pe,{ref:n,className:s,...d,children:l})]}):jsx(Pe,{ref:n,className:s,...d,children:l})});return o.displayName="FormSelectMenuSearchListbox",o}function To({menuSearchPlaceholder:e,searchValue:o,onSearchChange:t,isLoading:r,menuHasNoOptionsText:n,menuNoOptionsText:l,optionsWithoutEmptyValue:s,getOptionValue:d,getOptionLabel:u,renderOption:h,isOptionEqualToValue:f,menuHasSelectedCheckMark:F,valueOnly:S,getOptionId:x,field:m}){return jsxs(Fragment,{children:[jsx(z,{disableSticky:true,onMouseDown:a=>a.stopPropagation(),onClick:a=>a.stopPropagation(),children:jsx(ge,{placeholder:e,value:o,onValueChange:t,isLoading:r})}),n&&o.trim()&&s.length===0?jsx(Io,{disabled:true,value:"__form_select_no_results__",children:l??be}):s.map((a,C)=>{let i=f?f(a,m.value):a?.id===m.value?.id,g=xe(a,h,u);return jsxs(Mo,{disabled:!!a.disabled,$selected:i,value:(d?d(a):a?.id)??"",onClick:()=>{m.onChange(S?x(a):a);},children:[jsx(fe,{children:g}),F&&i?jsx(Se,{src:Pc,alt:""}):null]},`form-select-item-${(d?d(a):a?.id)??C}`)})]})}var ye={menuHasLoadingText:false,suppressAutocompleteNoOptions:false,suppressEmptyMenuSurface:false};function Vt(e,o){e!=null&&(typeof e=="function"?e(o):e.current=o);}function Nt(...e){return o=>{for(let t of e)Vt(t,o);}}function Dt(e){let o=t=>{let r=e.current;return jsx(Lo,{...t,$menuHasLoadingText:r.menuHasLoadingText,$suppressAutocompleteNoOptions:r.suppressAutocompleteNoOptions,$suppressEmptyMenuSurface:r.suppressEmptyMenuSurface})};return o.displayName="FormSelectSearchableAutocompletePopper",o}function Ho(e){let o=yc(useId(),"form-select-searchable-field"),t=useRef(null),r=useRef(ye);t.current=e.menuSearchable?{searchValue:e.inMenuSearchContextValue.searchValue,setSearchValue:e.inMenuSearchContextValue.setSearchValue,menuSearchPlaceholder:e.inMenuSearchContextValue.menuSearchPlaceholder,isLoading:e.inMenuSearchContextValue.isLoading}:null,r.current=e.searchableAutocompletePopperFlags;let n=useMemo(()=>Ao(t),[]),l=useMemo(()=>Dt(r),[]),s=e.feedback,{isProvided:d$1,isVisible:u,type:h}=Ac(s),f=!!e.fieldState.error&&!u,F=e.helperText??e.fieldState.error?.message,S=e.internalValue!=null&&e.internalValue!==""&&typeof e.internalValue=="object"?e.internalValue:null,x=e.getOptionLabel??(i=>String(i?.label??"")),m=e.isOptionEqualToValue??((i,g)=>i&&g?i.id===g.id:i===g),a=e.ClearIconComponent??b,C=e.label!=null&&e.label!=="";return jsxs(d,{id:o,"data-testid":"FormSelectSearchableField",children:[jsx(a$1,{...e.autocompleteRest,disableClearable:!e.showClearIcon,clearIcon:jsx(a,{sx:{fontSize:8,width:8,height:8}}),ListboxComponent:e.menuSearchable?n:void 0,PopperComponent:l,options:e.optionsWithClearFilterOnly,value:S,onChange:(i,g,M)=>{if(g==null&&e.onClear&&M==="clear"){e.onClear();return}if(e.valueOnly){let R=g==null?null:e.getOptionId(g);e.field.onChange(R);}else e.field.onChange(g);},onInputChange:(i,g,M)=>{e.setSearchableInputValue(g),(M==="input"||M==="clear")&&e.scheduleSearchNotification(g);},slotProps:e.slotProps??{},filterOptions:e.menuSearchable?e.autocompleteFilterOptions:ko,loading:!!e.isLoading,disabled:!!e.disabled,getOptionLabel:x,getOptionDisabled:i=>!!i.disabled,isOptionEqualToValue:m,renderOption:e.renderAutocompleteOption,noOptionsText:e.menuNoOptionsText??be,loadingText:e.menuHasLoadingText?e.menuLoadingText??wo:null,popupIcon:jsx(he,{children:jsx(a$2,{})}),renderInput:i=>{let{inputProps:g,...M}=i,{ref:R,...U}=g;return jsx(Ro,{...M,variant:"filled",label:e.label,placeholder:e.placeholder,required:e.required,error:f,helperText:null,feedbackType:h,hasFeedback:u,hasLabel:C,inputRef:Nt(R,e.field.ref,e.inputRef),InputProps:{...i.InputProps,disableUnderline:true},inputProps:{...U,name:e.field.name,onBlur:e.field.onBlur}})}}),d$1?jsx(ba,{...s}):jsx(c,{children:F})]})}function Do(e){let{name:o,helperText:t,feedback:r,menuSearchable:n=false,showClearIcon:l=false,ClearIconComponent:s=b,onClear:d,menuSearchPlaceholder:u="Search",getOptionValue:h,getOptionLabel:f,renderOption:F,isOptionEqualToValue:S,options:x,MenuProps:m,valueOnly:a=false,menuHasSelectedCheckMark:C=false,searchable:i=false,onSearchInputChange:g,searchDebounceMs:M=300,minSearchLength:R,menuLoadingText:U,menuHasLoadingText:b$1=false,menuHasNoOptionsText:w=true,menuNoOptionsText:v,label:re,placeholder:K,required:c,disabled:N,isLoading:k,inputRef:Ce,...G}=e,{control:D}=useFormContext(),[I,Y]=useState(""),[j,J]=useState("");useEffect(()=>{i||J("");},[i]);let Xo=useMemo(()=>({searchValue:I,setSearchValue:Y,menuSearchPlaceholder:u,isLoading:!!k}),[I,u,k]),Q=useRef(void 0),ae=useRef(g);ae.current=g,useEffect(()=>()=>{Q.current&&clearTimeout(Q.current);},[]);let Zo=useCallback(p=>{if(!ae.current)return;let y=p.trim();Q.current&&clearTimeout(Q.current),Q.current=setTimeout(()=>{if(y===""){ae.current?.("");return}R!=null&&y.length<R||ae.current?.(y);},M);},[M,R]),W=useMemo(()=>{let p=x??[];return !l||!h?p:p.filter(y=>{let A=h(y);return A!=null&&A!==""})},[l,h,x]),Oe=useMemo(()=>!n||!I.trim()?W:W.filter(p=>Le(p,I,f)),[n,I,W,f]),X=useMemo(()=>n?Oe:W,[n,Oe,W]),et=useCallback(p=>!n||!I.trim()?p:p.filter(y=>Le(y,I,f)),[n,I,f]),ot=useMemo(()=>{if(!i)return ye;let p=j.trim(),y=p.length===0||R!=null&&p.length>0&&p.length<R,A=n&&!!I.trim()&&X.length===0,B=y&&!A||!w,ie=X.length>0;return {menuHasLoadingText:b$1,suppressAutocompleteNoOptions:B,suppressEmptyMenuSurface:!ie&&!(!B&&!ie)&&!!!(k&&b$1)}},[i,j,R,n,I,X,w,k,b$1]),tt={...m,autoFocus:false,disableEnforceFocus:true},le=p=>(h?h(p):p?.id)??"",nt=p=>!a||!p?p:x?.find(y=>le(y)===p)??p,rt=useCallback((p,y,A)=>{let B=xe(y,F,f),ie=!!y.disabled;return jsxs(Po,{...p,$selected:A.selected,$optionDisabled:ie,children:[jsx(fe,{children:B}),C&&A.selected?jsx(Se,{src:Pc,alt:""}):null]})},[f,F,C]),Te={...G};for(let p of ["IconComponent","startComponent"])delete Te[p];let{slotProps:at={},...lt}=Te;return jsx(Controller,{name:o,control:D,render:({field:p,fieldState:y})=>{let A=nt(p.value);return i?jsx(Ho,{menuSearchable:n,inMenuSearchContextValue:Xo,searchableAutocompletePopperFlags:ot,optionsWithClearFilterOnly:W,autocompleteFilterOptions:et,slotProps:at,autocompleteRest:lt,inputRef:Ce,showClearIcon:l,ClearIconComponent:s,menuHasLoadingText:b$1,menuLoadingText:U,menuNoOptionsText:v,isLoading:k,disabled:N,label:re,placeholder:K,required:c,valueOnly:a,getOptionId:le,scheduleSearchNotification:Zo,setSearchableInputValue:J,renderAutocompleteOption:rt,onClear:d,feedback:r,helperText:t,field:p,fieldState:y,internalValue:A,getOptionLabel:f,isOptionEqualToValue:S}):jsx(f$1,{...G,...p,label:re,placeholder:K,required:c,disabled:N,isLoading:k,value:A,menuHasSelectedCheckMark:C,showClearIcon:l,ClearIconComponent:s,onClear:d,options:X,getOptionValue:h,getOptionLabel:f,renderOption:F,isOptionEqualToValue:S,hasError:!!y.error,helperText:t??y.error?.message,feedback:r,onChange:B=>p.onChange(a?le(B):B),MenuProps:tt,children:n?jsx(To,{menuSearchPlaceholder:u,searchValue:I,onSearchChange:Y,isLoading:k,menuHasNoOptionsText:w,menuNoOptionsText:v,optionsWithoutEmptyValue:X,getOptionValue:h,getOptionLabel:f,renderOption:F,isOptionEqualToValue:S,menuHasSelectedCheckMark:C,valueOnly:a,getOptionId:le,field:p}):void 0})}})}Do.displayName="RFHSelect";var Wo=de__default.memo(Do);var ke=Wo;function qo({name:e,disabled:o,...t}){let{control:r}=useFormContext();return jsx(Controller,{name:e,control:r,render:({field:{name:n,onBlur:l,onChange:s,value:d,disabled:u}})=>jsx(h,{...t,onChange:s,onBlur:l,name:n,disabled:u||o,checked:d??false})})}qo.displayName="RFHSwitch";var _o=de.memo(qo);var Gt=_o;var Uo=styled(j)(({theme:e})=>({fontSize:"10px",color:e.v2.palette.grey[500],fontWeight:600,lineHeight:"10px"}));styled(j)(({theme:e})=>({fontSize:"11px",color:e.v2.palette.base.black,fontWeight:600,lineHeight:"14.3px",width:200}));var Ko=styled(ne)(()=>({display:"flex",flexDirection:"column",maxHeight:180,overflow:"auto",scrollbarWidth:"thin",scrollbarColor:"#E5E5E5 #E5E5E5"})),Go=styled(P)(({theme:e})=>{let o=`1px solid ${alpha(e.palette.common.black,.1)}`;return {flexShrink:0,border:0,borderRadius:0,"&.Mui-expanded:not(:last-of-type)":{borderBottom:o},[`&:last-of-type .${O.summary}`]:{borderBottom:"none"},[`&.Mui-expanded:last-of-type .${O.summary}`]:{borderBottom:o},[`& .${O.summary}`]:{backgroundColor:e.palette.common.white,borderBottom:o,minHeight:28,height:"auto","& .MuiAccordionSummary-content":{margin:"auto"},"&.Mui-expanded":{backgroundColor:"#F8F8F8",minHeight:28,height:"auto"}},[`& .${O.content}`]:{borderTop:"none"}}});styled(Ct)(({theme:e})=>({width:"inherit",height:32,padding:"11px 12px",fontSize:"10px",borderRadius:"5px",backgroundColor:"#F9F9F9",border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.info.dark}}));var Yo=styled(ne)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));styled(ne)(()=>({display:"flex",gap:"8px",padding:"4px",flexWrap:"wrap",paddingInlineEnd:"20px"}));styled(ne)(({theme:e,maxWidth:o})=>({display:"flex",padding:"4px 8px 4px 6px",alignItems:"center",gap:"4px",borderRadius:"13px",backgroundColor:`${e.palette.info.dark}1a`,fontSize:"10px",fontWeight:500,cursor:"pointer",...o&&{maxWidth:`${o}%`}}));var jo=styled(j)(()=>({display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",fontSize:"10px",fontWeight:500,color:"#000",cursor:"pointer",padding:"8px 20px"}));styled(ne)(({theme:e})=>({width:"100%",flexDirection:"column",border:`1px solid ${e.palette.grey[100]}`,borderRadius:"4px",backgroundColor:e.palette.grey[400]}));function Xt({name:e,options:o,...t}){let r=yc(useId(),"select-with-accordion"),[n,l]=useState(null),[s,d]=useState(0),u=!!n,h=m=>{l(u?null:m.currentTarget);},f=()=>{l(null);},{watch:F,setValue:S}=useFormContext(),x=F(e);return jsx(a$3,{id:r,"data-testid":"SelectWithAccordion",open:u,anchorEl:n,onOpen:h,onClose:f,trigger:jsx(ke,{name:e,options:[],...t,open:false}),hideArrow:true,listWrapperSx:{padding:0,margin:0},children:jsx(Yo,{onClick:m=>m.stopPropagation(),onMouseDown:m=>m.stopPropagation(),children:jsx(Ko,{"data-testid":"AccordionWrapper",children:o.map?.((m,a)=>jsx(Go,{expanded:s===a,onChange:i=>d(i?a:null),label:jsx(Uo,{variant:"caption",children:m.group}),content:(m?.options||[]).map((i,g)=>{let M=t?.isOptionEqualToValue?.(i,x);return jsxs(jo,{onClick:()=>{S(e,i,{shouldDirty:true,shouldTouch:true,shouldValidate:true}),f();},children:[t.renderOption?.(i)||i.label,M&&jsx(a$4,{src:Pc,alt:"blue-check",sx:{width:14,height:10}})]},`${i.value}-${i.label}-${g}`)})},`${m.group}-group-${a}`))})})})}var Qo=Xt;var en=Qo;function Ae({name:e$1,helperText:o,getOptionValue:t,getOptionLabel:r,renderOption:n,isOptionEqualToValue:l,getOptionDisabled:s,menuSearchable:d=false,menuSearchPlaceholder:u="Search",showCheckbox:h=true,menuHasSelectionSummary:f=false,valueOnly:F=false,options:S,isLoading:x,...m}){let{control:a}=useFormContext(),[C,i]=useState(""),g=b=>(t?t(b):b?.id)??"",M=b=>!F||!b?.length?b??[]:b.map(w=>S?.find(v=>g(v)===w)).filter(Boolean),R=b=>b?.map(g)??[],U=useMemo(()=>{if(!d||!C.trim())return S??[];let b=C.toLowerCase().trim();return (S??[]).filter(w=>{let v=(r?r(w):w?.label)??"";return String(v).toLowerCase().includes(b)})},[S,d,C,r]);return jsx(Controller,{name:e$1,control:a,defaultValue:[],render:({field:b,fieldState:w})=>{let v=Array.isArray(b.value)?b.value.filter(c=>c!=null).length:0,re=f&&v>0,K=M(b.value);return jsxs(e,{...m,isLoading:x,...b,options:S??[],value:K,getOptionLabel:r,hasError:!!w.error,helperText:o??w.error?.message,onChange:c=>b.onChange(F?R(c):c),MenuProps:{...m.MenuProps,autoFocus:false,disableEnforceFocus:true},children:[d&&jsx(z,{disableSticky:true,children:jsx(me,{placeholder:u,value:C,onChange:c=>i(c.target.value),onKeyDown:c=>c.stopPropagation(),onKeyUp:c=>c.stopPropagation(),disableUnderline:true,fullWidth:true,inputProps:{"aria-label":u},endAdornment:x?jsx(co,{"aria-hidden":true,children:jsx(b$1,{})}):jsx(ho,{src:A,alt:"search"})})}),re&&jsx(uo,{disableSticky:true,children:jsxs(so,{children:[jsxs(po,{children:[v," selected"]}),jsx(mo,{type:"button",variant:"text",disableRipple:true,"aria-label":"Clear all selected options",onMouseDown:c=>{c.preventDefault(),c.stopPropagation();},onClick:c=>{c.preventDefault(),c.stopPropagation(),m.onClear?m.onClear():b.onChange([]);},children:"Clear"})]})}),U?.map(c=>{let N=K?.some(D=>{if(D==null)return false;if(l)return l(c,D);if(t){let j=t(c),J=t(D);return j===J||String(j)===String(J)}let I=c?.id,Y=D?.id;return I===Y||String(I)===String(Y)}),k=s?s(c):false,Ce=r?r(c):c.label,G=n?n(c):Ce;return jsx(So,{value:(t?t(c):c?.id)??"",disabled:k,$selected:N,children:h?jsxs(fo,{children:[jsx(go,{checked:N,$mutedRect:N&&k}),G]}):G},(t?t(c):c?.id)??"")})]})}})}var ln=useForm;export{ut as a,ht as b,gt as c,yt as d,ke as e,Gt as f,en as g,Ae as h,ln as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {yc}from'./chunk-PLMJIRXJ.js';import {memo,useId}from'react';import f from'@mui/material/Box';import a from'@mui/material/Input';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var p=styled(a,{shouldForwardProp:o=>o!=="isError"})(({theme:o})=>({padding:"8px",border:`1px solid ${o.palette.divider}`,borderRadius:"4px",height:32,color:o.palette.text.primary,fontSize:"11px",outline:0,maxWidth:"100%",display:"flex",flexGrow:1,"::placeholder":{color:o.palette.grey[700],fontWeight:400}}));function i({isError:o,...t}){let l=yc(useId(),"input");return jsx(f,{id:l,"data-testid":"Input",sx:{flexGrow:1},onClick:d=>{d.stopPropagation();},children:jsx(p,{...t,placeholder:t.placeholder,isError:o,disableUnderline:true})})}i.displayName="Input";var n=memo(i);var S=n;export{S as a};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { InputProps } from '@mui/material/Input';
|
|
3
|
-
type InputAttrs = InputProps & {
|
|
4
|
-
isError?: boolean;
|
|
5
|
-
};
|
|
6
|
-
declare function Input({ isError, ...props }: Readonly<InputAttrs>): import("react").JSX.Element;
|
|
7
|
-
declare namespace Input {
|
|
8
|
-
var displayName: string;
|
|
9
|
-
}
|
|
10
|
-
declare const _default: import("react").MemoExoticComponent<typeof Input>;
|
|
11
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as default}from'../../_chunks/chunk-UZSTD2CE.js';import'../../_chunks/chunk-PLMJIRXJ.js';import'../../_chunks/chunk-WHXHVOBY.js';import'../../_chunks/chunk-YKKS24ES.js';import'../../_chunks/chunk-4GZ7XOYY.js';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React, { type ComponentProps } from 'react';
|
|
2
|
-
import { type FieldFeedbackProps } from '../../primitives';
|
|
3
|
-
import { StyledInput } from './style';
|
|
4
|
-
type InputProps = ComponentProps<typeof StyledInput>;
|
|
5
|
-
export interface InputBaseProps extends Omit<InputProps, 'onChange'> {
|
|
6
|
-
onChange?: (value: string) => void;
|
|
7
|
-
hasError?: boolean;
|
|
8
|
-
feedback?: FieldFeedbackProps | null;
|
|
9
|
-
}
|
|
10
|
-
declare const InputBase: React.ForwardRefExoticComponent<Omit<InputBaseProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
11
|
-
export default InputBase;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { FieldFeedbackType } from '../../primitives';
|
|
3
|
-
export declare const StyledWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
6
|
-
export declare const StyledInput: import("@emotion/styled").StyledComponent<{
|
|
7
|
-
variant?: import("@mui/material/TextField").TextFieldVariants | undefined;
|
|
8
|
-
} & Omit<import("@mui/material/TextField").FilledTextFieldProps | import("@mui/material/TextField").OutlinedTextFieldProps | import("@mui/material/TextField").StandardTextFieldProps, "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
9
|
-
hasError?: boolean | undefined;
|
|
10
|
-
feedbackType?: FieldFeedbackType | undefined;
|
|
11
|
-
hasFeedback?: boolean | undefined;
|
|
12
|
-
hideArrows?: boolean | undefined;
|
|
13
|
-
hasLabel?: boolean | undefined;
|
|
14
|
-
}, {}, {}>;
|
|
15
|
-
export declare const StyledHelperText: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const InputStyled: import("@emotion/styled").StyledComponent<import("@mui/material/Input").InputProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
2
|
-
isError?: boolean | undefined;
|
|
3
|
-
hideArrows?: boolean | undefined;
|
|
4
|
-
}, {}, {}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BoxProps } from '@mui/material/Box';
|
|
3
|
-
type Props = BoxProps & {
|
|
4
|
-
value: string;
|
|
5
|
-
name: string;
|
|
6
|
-
placeholder: string;
|
|
7
|
-
onSearchChange: (value: string) => void;
|
|
8
|
-
onSearchReset: () => void;
|
|
9
|
-
};
|
|
10
|
-
declare const SearchListInput: ({ value, name, placeholder, onSearchChange, onSearchReset, ...props }: Props) => import("react").JSX.Element;
|
|
11
|
-
export default SearchListInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{a as default}from'../../_chunks/chunk-QXHIDHUU.js';import'../../_chunks/chunk-UZSTD2CE.js';import'../../_chunks/chunk-PLMJIRXJ.js';import'../../_chunks/chunk-WHXHVOBY.js';import'../../_chunks/chunk-YKKS24ES.js';import'../../_chunks/chunk-4GZ7XOYY.js';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const InputStyled: import("@emotion/styled").StyledComponent<Readonly<import("@mui/material").InputProps & {
|
|
3
|
-
isError?: boolean | undefined;
|
|
4
|
-
}> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
5
|
-
export declare const InputsWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
7
|
-
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material/styles").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|