@tap-payments/os-micro-frontend-shared 0.3.177 → 0.3.179
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/README.md +14 -15
- package/build/_chunks/{chunk-WPRI37BB.js → chunk-2HEAVWCD.js} +1 -1
- package/build/_chunks/{chunk-ALU4ED6U.js → chunk-2JH4ZLWH.js} +1 -1
- package/build/_chunks/chunk-2KRFZVKH.js +1 -0
- package/build/_chunks/{chunk-5SLDZGLX.js → chunk-2SVYHE3E.js} +1 -1
- package/build/_chunks/{chunk-KA5OW6KM.js → chunk-35NOZO3A.js} +2 -2
- package/build/_chunks/{chunk-YCZIYVQU.js → chunk-3II5V2WW.js} +1 -1
- package/build/_chunks/{chunk-4GAZ3SQE.js → chunk-3KBLVSY2.js} +1 -1
- package/build/_chunks/{chunk-IH5OWVNN.js → chunk-4FQYWSG7.js} +1 -1
- package/build/_chunks/chunk-4IIRXM7I.js +1 -0
- package/build/_chunks/{chunk-WDPEG4N2.js → chunk-4T227AXE.js} +1 -1
- package/build/_chunks/{chunk-6AJGHLIA.js → chunk-4YPPY6JG.js} +1 -1
- package/build/_chunks/{chunk-C3LIADHQ.js → chunk-4Z4QGWLY.js} +1 -1
- package/build/_chunks/{chunk-2II3PIPV.js → chunk-554F7U5K.js} +1 -1
- package/build/_chunks/{chunk-7IA2JOEA.js → chunk-5BRIR2WC.js} +1 -1
- package/build/_chunks/{chunk-V5ACKQNH.js → chunk-6ML55OS6.js} +1 -1
- package/build/_chunks/{chunk-BBC44PBI.js → chunk-76P5CX7O.js} +1 -1
- package/build/_chunks/chunk-AUSL24CJ.js +1 -0
- package/build/_chunks/{chunk-WJML27P6.js → chunk-B2PPWKLO.js} +1 -1
- package/build/_chunks/{chunk-KSOVBMNE.js → chunk-B44VARBK.js} +1 -1
- package/build/_chunks/{chunk-6G45KTCP.js → chunk-BPOEPKOQ.js} +1 -1
- package/build/_chunks/{chunk-YE6EIJWK.js → chunk-BVKQBVP4.js} +1 -1
- package/build/_chunks/chunk-BXCL5X7D.js +2 -0
- package/build/_chunks/{chunk-YHZCWI2Z.js → chunk-C4OUGB3C.js} +1 -1
- package/build/_chunks/{chunk-RIIDTK4T.js → chunk-CMGL5QJL.js} +1 -1
- package/build/_chunks/{chunk-KUOKFWXS.js → chunk-CYWPV3SB.js} +1 -1
- package/build/_chunks/chunk-DBRZBG7Q.js +2 -0
- package/build/_chunks/{chunk-BMUPHUDC.js → chunk-DEBCPU4I.js} +1 -1
- package/build/_chunks/{chunk-57IWKRJC.js → chunk-DS572UO2.js} +1 -1
- package/build/_chunks/{chunk-ZPYQXJ2S.js → chunk-EBZ4BXJX.js} +1 -1
- package/build/_chunks/{chunk-EHUY67GV.js → chunk-EMEBWAMB.js} +1 -1
- package/build/_chunks/{chunk-NA3ZJGND.js → chunk-EYGEYWBA.js} +1 -1
- package/build/_chunks/{chunk-UCGGUCR5.js → chunk-FXXZNCPN.js} +1 -1
- package/build/_chunks/{chunk-LPU4DLAN.js → chunk-G7GLG2QX.js} +1 -1
- package/build/_chunks/{chunk-ELYWQI63.js → chunk-GDIAZJOM.js} +1 -1
- package/build/_chunks/{chunk-P5JPXIB6.js → chunk-GVAGN6TI.js} +1 -1
- package/build/_chunks/chunk-H3TGL34E.js +1 -0
- package/build/_chunks/chunk-H7JFUJ4X.js +1 -0
- package/build/_chunks/{chunk-AJVH62M3.js → chunk-HGYEDB6U.js} +1 -1
- package/build/_chunks/{chunk-QCB5IDK3.js → chunk-HH3L7YPX.js} +1 -1
- package/build/_chunks/chunk-HI62DX6A.js +1 -0
- package/build/_chunks/{chunk-NXZOAMNR.js → chunk-HRVUMECN.js} +1 -1
- package/build/_chunks/{chunk-ON3R4M3U.js → chunk-HURSHAI2.js} +1 -1
- package/build/_chunks/{chunk-ATOLL6Z7.js → chunk-IJD2OYLY.js} +1 -1
- package/build/_chunks/{chunk-RFSR64TF.js → chunk-IJXYJXDT.js} +1 -1
- package/build/_chunks/{chunk-2NADVU3B.js → chunk-J2ATWDK7.js} +1 -1
- package/build/_chunks/{chunk-YL2COX6W.js → chunk-JCU5G6KH.js} +1 -1
- package/build/_chunks/{chunk-LDK7QJZB.js → chunk-JMFVI3V4.js} +1 -1
- package/build/_chunks/chunk-JTZOWLY7.js +1 -0
- package/build/_chunks/{chunk-3TKFTDUU.js → chunk-JVCUIZOV.js} +1 -1
- package/build/_chunks/{chunk-UWK7C3OQ.js → chunk-JZPHDD62.js} +1 -1
- package/build/_chunks/{chunk-4AM27BVT.js → chunk-K2TI7E45.js} +1 -1
- package/build/_chunks/{chunk-HNYQHLED.js → chunk-K6SUGXPA.js} +1 -1
- package/build/_chunks/{chunk-57FCA4PR.js → chunk-KEKICE4P.js} +1 -1
- package/build/_chunks/{chunk-WWEOT6XF.js → chunk-KGSYWWZG.js} +1 -1
- package/build/_chunks/{chunk-SA72YYWW.js → chunk-KMGLK7QS.js} +1 -1
- package/build/_chunks/{chunk-TIB7OG4H.js → chunk-KVMPEPHL.js} +1 -1
- package/build/_chunks/{chunk-O6WQFHOA.js → chunk-L35VR6XY.js} +1 -1
- package/build/_chunks/chunk-L5RR3FXI.js +1 -0
- package/build/_chunks/{chunk-RZIO5KW7.js → chunk-L7QSGX42.js} +1 -1
- package/build/_chunks/{chunk-TSKIEYMO.js → chunk-LOJAZ62H.js} +1 -1
- package/build/_chunks/{chunk-WMNFDDLA.js → chunk-LTHPGGJG.js} +1 -1
- package/build/_chunks/{chunk-5ZZCVF4B.js → chunk-LUZVA4XD.js} +1 -1
- package/build/_chunks/{chunk-6Z5EAN7R.js → chunk-MD2UG3GO.js} +1 -1
- package/build/_chunks/{chunk-MXXAZH6N.js → chunk-MH5USFCO.js} +1 -1
- package/build/_chunks/{chunk-W5RQHQ2Z.js → chunk-MIO2HBFQ.js} +1 -1
- package/build/_chunks/{chunk-S7BDJA6H.js → chunk-MMMYNZTF.js} +1 -1
- package/build/_chunks/{chunk-Y7DN6PV3.js → chunk-MSDEH7BW.js} +1 -1
- package/build/_chunks/{chunk-SLTY4KD6.js → chunk-MSM5GYDZ.js} +1 -1
- package/build/_chunks/{chunk-JKH2UKMC.js → chunk-N2QLQZ22.js} +1 -1
- package/build/_chunks/{chunk-AMD6YF2E.js → chunk-NC2S4CMY.js} +1 -1
- package/build/_chunks/chunk-NGTHV6BD.js +1 -0
- package/build/_chunks/{chunk-ESF4WBBN.js → chunk-OATE5BWL.js} +1 -1
- package/build/_chunks/{chunk-IW6GAFMI.js → chunk-OCUPKOQC.js} +2 -2
- package/build/_chunks/chunk-OGDMMHG4.js +1 -0
- package/build/_chunks/{chunk-4Q3P5OVC.js → chunk-P5J6IR6G.js} +1 -1
- package/build/_chunks/{chunk-2IEIHK5L.js → chunk-PFV2BANZ.js} +1 -1
- package/build/_chunks/{chunk-WZ7VMCB6.js → chunk-PPHKSN4I.js} +1 -1
- package/build/_chunks/{chunk-OMWYCWCN.js → chunk-PZOTVZ5G.js} +1 -1
- package/build/_chunks/{chunk-ZH35RF3I.js → chunk-QRBPFPJ6.js} +1 -1
- package/build/_chunks/{chunk-32XNGJJX.js → chunk-RDGZQA7I.js} +1 -1
- package/build/_chunks/chunk-RESLAI62.js +1 -0
- package/build/_chunks/{chunk-SKWOFSTP.js → chunk-RLHJCE6Z.js} +1 -1
- package/build/_chunks/{chunk-ZZAZC5EN.js → chunk-SCMBOHCD.js} +1 -1
- package/build/_chunks/{chunk-R26A2GDD.js → chunk-SRLNPPTU.js} +1 -1
- package/build/_chunks/{chunk-EGOELNBL.js → chunk-T55CHBRW.js} +1 -1
- package/build/_chunks/{chunk-TE4NMDPX.js → chunk-TK6BOFKW.js} +1 -1
- package/build/_chunks/{chunk-CSUO5V7Y.js → chunk-UVCGT2KS.js} +1 -1
- package/build/_chunks/{chunk-7Q6MEXUY.js → chunk-VJBBTZIU.js} +1 -1
- package/build/_chunks/{chunk-73MHTQIF.js → chunk-VVD6MREE.js} +1 -1
- package/build/_chunks/{chunk-QGIUFATL.js → chunk-WP6HAML2.js} +1 -1
- package/build/_chunks/{chunk-Y3RKRLVZ.js → chunk-X4UVZRUN.js} +1 -1
- package/build/_chunks/{chunk-HAOFRIMW.js → chunk-X75AHXZO.js} +1 -1
- package/build/_chunks/{chunk-IP74OBDP.js → chunk-XTTNZLS6.js} +1 -1
- package/build/_chunks/{chunk-PTY3O5PM.js → chunk-XUBYXJ7L.js} +1 -1
- package/build/_chunks/{chunk-XQYCJYZI.js → chunk-Y7BWIJMJ.js} +2 -2
- package/build/_chunks/{chunk-QEDWP7RH.js → chunk-YEWY2D2G.js} +1 -1
- package/build/_chunks/{chunk-KC4A5BKD.js → chunk-YHYIIFNJ.js} +1 -1
- package/build/_chunks/{chunk-UYDM5BBG.js → chunk-YLGDVJQ3.js} +1 -1
- package/build/components/AccountDropdown/index.js +1 -1
- package/build/components/ActionMenu/index.js +1 -1
- package/build/components/ActionsDropdownMenu/index.js +1 -1
- package/build/components/ActiveFilterChip/index.js +1 -1
- package/build/components/ActivityAreaChart/index.js +1 -1
- package/build/components/AmountConversionFilter/index.js +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AmountSlider/AmountSlider.d.ts +3 -2
- package/build/components/AmountSlider/index.js +1 -1
- package/build/components/AmountStatusChip/index.js +1 -1
- package/build/components/AnimatedSpinnerIcon/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/AuthenticationTypeChip/index.js +1 -1
- package/build/components/Autocomplete/index.js +1 -1
- package/build/components/BetaBanner/index.js +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/Button/index.js +1 -1
- package/build/components/Calender/index.js +1 -1
- package/build/components/CardEmptyState/index.js +1 -1
- package/build/components/Chip/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/CountryFlag/index.js +1 -1
- package/build/components/CurrencyAmount/index.js +1 -1
- package/build/components/CurrencyFilter/index.js +1 -1
- package/build/components/CurrencySymbol/index.js +1 -1
- package/build/components/CustomBackdrop/index.js +1 -1
- 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/Dialog/index.js +1 -1
- package/build/components/Discount/index.js +1 -1
- package/build/components/DisplayAmount/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/Error/index.js +1 -1
- package/build/components/ErrorToast/index.js +1 -1
- package/build/components/ExpandableSideBar/index.js +1 -1
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FilePreview/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/FlippingCard/index.js +1 -1
- package/build/components/HeatMap/index.js +1 -1
- package/build/components/Icon/index.js +1 -1
- package/build/components/IconWithBadge/index.js +1 -1
- package/build/components/Input/index.js +1 -1
- package/build/components/InputBase/index.js +1 -1
- package/build/components/InputNumber/index.js +1 -1
- 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/LeftPeekRightExpandingChip/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/ListLayout/index.js +1 -1
- package/build/components/Loader/index.js +1 -1
- package/build/components/MFWidgetLoader/index.js +1 -1
- package/build/components/MaskedText/index.js +1 -1
- package/build/components/Menu/index.js +1 -1
- package/build/components/MenuItem/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/NoInternet/index.js +1 -1
- package/build/components/OpenFileInNewTab/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/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/RemoteFallback/index.js +1 -1
- package/build/components/ResizableHeightInput/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/SearchButton/index.js +1 -1
- package/build/components/SearchListInput/index.js +1 -1
- package/build/components/SelectDropdown/index.js +1 -1
- package/build/components/SelectWithSearch/index.js +1 -1
- package/build/components/StatusBar/index.js +1 -1
- package/build/components/StatusButton/index.js +1 -1
- package/build/components/StatusChip/index.js +1 -1
- package/build/components/StatusChipWithCopy/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusGroupChips/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/Toaster/index.js +1 -1
- package/build/components/ToggleView/index.js +1 -1
- package/build/components/Toolbar/index.js +1 -1
- package/build/components/ToolbarIcon/index.js +1 -1
- package/build/components/TooltipChip/index.js +1 -1
- 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/index.js +1 -1
- package/build/components/Widget/index.js +1 -1
- package/build/components/Window/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 +1 -1
- package/build/components/index.js +1 -1
- package/build/components/primitives/index.js +1 -1
- package/build/constants/assets.d.ts +0 -1
- package/build/constants/index.js +1 -1
- package/build/hooks/index.js +1 -1
- package/build/index.js +1 -1
- package/build/utils/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-3YAJNHQC.js +0 -2
- package/build/_chunks/chunk-4HKGRDJQ.js +0 -1
- package/build/_chunks/chunk-7T76F7UP.js +0 -1
- package/build/_chunks/chunk-DLYIC7LX.js +0 -1
- package/build/_chunks/chunk-EUEVNPSG.js +0 -1
- package/build/_chunks/chunk-FYMLKBWA.js +0 -1
- package/build/_chunks/chunk-GB5N3AEY.js +0 -1
- package/build/_chunks/chunk-HQ6V36KP.js +0 -1
- package/build/_chunks/chunk-KJKTKQFF.js +0 -1
- package/build/_chunks/chunk-MRUYYZH7.js +0 -1
- package/build/_chunks/chunk-N372QRVU.js +0 -1
- package/build/_chunks/chunk-SUBIH236.js +0 -1
- package/build/_chunks/chunk-W6W4YZ7G.js +0 -1
- package/build/_chunks/chunk-YVHH6NS2.js +0 -2
- package/build/components/Slider/Slider.d.ts +0 -15
- package/build/components/Slider/index.d.ts +0 -2
- package/build/components/Slider/index.js +0 -1
- package/build/components/Slider/style.d.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import {k,l}from'./chunk-
|
|
1
|
+
import {k,l}from'./chunk-QRBPFPJ6.js';import {yc}from'./chunk-HI62DX6A.js';import {memo,useId,useMemo}from'react';import E from'@mui/material/RadioGroup';import {styled}from'@mui/material/styles';import F from'@mui/material/FormControlLabel';import {FormControl,FormLabel,Stack}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var h=styled(F,{shouldForwardProp:o=>!["size","showHoverEffects","labelSx"].includes(o)})(({size:o="small",showHoverEffects:a=true,labelSx:r})=>({margin:"0",width:"100%",cursor:"pointer",padding:o==="small"?"7.5px 16px 7.5px 8px":o==="medium"?"9px 16px 9px 10px":"11px 16px 11px 12px",maxHeight:o==="small"?"35px":o==="medium"?"40px":"45px",...a&&{"&:hover":{boxShadow:"0px 0px 16px 0px #00000021",borderLeft:"1px solid transparent"}},"& .MuiFormControlLabel-label":{fontSize:o==="small"?"11px":o==="medium"?"13px":"15px",fontWeight:"500",color:"#20232B",width:"100%",cursor:"pointer",...r},[`& .${k.root}`]:{cursor:"pointer",color:"#8C9196","&.Mui-checked":{color:"#1F88D0"}}}));function B({option:o,size:a="small",customLabelRenderer:r,labelPosition:m="end",showHoverEffects:i=true,customRadioProps:s,labelSx:n,icon:l$1,...d}){let p=r?r(o):o.label,u=useMemo(()=>l$1?jsxs(Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[p,jsx("img",{alt:"icon",...l$1})]}):p,[l$1,p]);return jsx(h,{value:o.value,control:jsx(l,{...s,...o.customProps}),label:u,disabled:o.disabled,size:a,labelPlacement:m,showHoverEffects:i,labelSx:n,...d})}function R({options:o,onOptionChange:a,size:r="small",customLabelRenderer:m,layout:i="vertical",spacing:s=0,labelPosition:n="end",showHoverEffects:l=true,customRadioProps:d,labelSx:p,onChange:u,title:c,sx:S,...v}){let w=e=>{let x=e.target.value;a?.(x),u?.(e,x);},P=yc(useId(),"radio-group");return jsxs(FormControl,{id:P,"data-testid":"RadioGroup",children:[typeof c=="string"?jsx(FormLabel,{children:c}):c,jsx(E,{onChange:w,sx:{display:"flex",flexDirection:i==="horizontal"?"row":"column",gap:s,...S},...v,children:o.map(e=>jsx(B,{icon:e.icon,option:e,size:r,customLabelRenderer:m,labelPosition:n,showHoverEffects:l,customRadioProps:d,labelSx:p},e.value))})]})}R.displayName="RadioGroup";var D=memo(R);export{D as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {yc}from'./chunk-HI62DX6A.js';import {Pj,j,m as m$1}from'./chunk-DBRZBG7Q.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {jsx}from'react/jsx-runtime';function g({countryCode:o,currencyCode:t,...n}){let l=yc(useId(),"country-flag");return jsx(d,{...n,id:l,"data-testid":"CountryFlag",component:"img",src:o&&j(o)||t&&m$1(t)||Pj,width:n.width||16,alt:o??t??"flag",loading:"lazy",onError:u=>{u.currentTarget.src=Pj;}})}g.displayName="CountryFlag";var m=memo(g);var h=m;export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {yc,Wb}from'./chunk-
|
|
1
|
+
import {yc,Wb}from'./chunk-HI62DX6A.js';import {Eb}from'./chunk-DBRZBG7Q.js';import {useId}from'react';import i from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var x=styled(i,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:n})=>({width:"100%",borderRadius:"4px",padding:"4px 8px",display:"flex",alignItems:"center",justifyContent:"flex-start",background:e.palette.grey[400],gap:"8px",...n&&{opacity:.6,cursor:"default"}})),f=styled(i)(()=>({width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px"})),u=styled(i)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:e.palette.text.primary,cursor:"pointer",gap:"8px"})),y=styled("span")(({theme:e})=>({fontWeight:500,color:e.palette.text.primary,cursor:"pointer",fontSize:"9px"})),I=styled(i)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:"4px",color:e.palette.text.primary})),g=styled(i)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",background:e.palette.common.white,borderRadius:"4px",border:`1px solid ${e.palette.divider}`})),F=styled(i)(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"}));var T=({files:e,disabled:n,sx:C,onRemoveFile:W,getFilePreview:b,renderBrandLogo:h,renderOpenFileInNewTab:P})=>{let v=yc(useId(),"file-preview");return jsx(Fragment,{children:e?.map((t,d)=>{let l=Wb(t)?b(t.file):null,j=Wb(t)&&t.file.type.includes("application/pdf"),a=Wb(t)?t.file:t;return jsx(x,{id:`${v}-${d}`,"data-testid":"FilePreview",sx:C,disabled:n,children:jsxs(f,{"data-slot":"file-wrapper",children:[jsxs(u,{"data-slot":"file-Content",children:[jsx(g,{"data-slot":"file-icon-wrapper",children:Wb(t)&&l?jsx(i,{component:"img",src:l,width:24,height:24,sx:{borderRadius:"50%",objectFit:j?"none":"cover"},onError:k=>{k.currentTarget.src=a.name;}}):h?.(a.id)}),jsxs(I,{"data-slot":"text-wrapper",children:[jsx(y,{"data-slot":"filename",children:a.name}),!Wb(t)&&!l&&P?.(a.id)]})]}),!n&&jsx(F,{"data-slot":"close-icon-wrapper",onClick:()=>{W?.(t);},children:jsx(i,{component:"img",src:Eb,width:10,height:10})})]})},d)})})},A=T;export{x as a,f as b,u as c,y as d,I as e,g as f,F as g,A as h};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-ZONDSLTR.js';import {p}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-ZONDSLTR.js';import {p}from'./chunk-QRBPFPJ6.js';import {yc,f as f$1}from'./chunk-HI62DX6A.js';import {mb}from'./chunk-DBRZBG7Q.js';import {useId}from'react';import {useTranslation}from'react-i18next';import {jsx,jsxs}from'react/jsx-runtime';var m=t=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}});var d=({children:t})=>jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"2px"},children:t});function f({value:t,index:e}){let s=yc(useId(),"rating-count"),{t:u}=useTranslation();return jsx(p,{title:u("totalPaymentCount",{amount:f$1(t)}),wrapperProps:{display:"inline-flex"},children:jsx(a,{id:s,order:e,variants:m(e),"data-testid":"RatingCount",children:jsxs(d,{children:[jsx("img",{src:mb,alt:"star",style:{width:"10px",height:"10px"}})," ",(t||0)>1&&jsx("span",{style:{fontSize:"9.782px"},children:t})]})})})}export{f as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c,d}from'./chunk-5SLDZGLX.js';import {a,c as c$1,d as d$1}from'./chunk-YE6EIJWK.js';import {b,a as a$1}from'./chunk-32XNGJJX.js';import {yc,xa}from'./chunk-W6W4YZ7G.js';import {Hf}from'./chunk-3YAJNHQC.js';import {createContext,memo,useRef,useId,useContext,useMemo,useState,useLayoutEffect,useCallback}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {createPortal}from'react-dom';import {styled,Box,Button,alpha,Dialog}from'@mui/material';import nt from'@mui/material/Box';import {Resizable}from're-resizable';import st from'react-draggable';import {motion}from'framer-motion';var Y=createContext({viewerDefaultWidth:555,viewerDefaultHeight:545,position:{x:0,y:0},setPosition:()=>{},dimensions:{width:0,height:0},windowZIndex:1e4,isOpen:true,setIsMaximized:()=>{},setIsSidebarExpanded:()=>{},setIsToolbarAnimationDisabled:()=>{},setIsResized:()=>{},setNewDimensions:()=>{},isMaximized:false,isToolbarAnimationDisabled:true,isSidebarExpanded:false,isResized:false,onClose:()=>{},fullWindowWidth:0,fullWindowHeight:0,resizableRef:{current:null},updateRefSize:()=>{},updateSize:()=>{},containerRef:{current:null}});var Oe=555,Ve=545;function Q({children:e,isOpen:t,onClose:i,defaultWindowHeight:r,defaultWindowWidth:n,initialPosition:l,minWidth:u,maxWidth:a,minHeight:s,maxHeight:d,containerRef:m,windowZIndex:f=1}){let{height:c,width:E}=a$1(),[o,k]=useState(false),L=o?null:m?.current,y=L?.clientWidth||E,h=L?.clientHeight||c,I=n||Oe,g=r||Ve,[v,_]=useState({x:l?.x??y/2+I/2,y:l?.y??h/2-g/2}),[W,z]=useState(false),[T,D]=useState(false),[C,w]=useState(true),H=useRef(),[F,P]=useState({width:n??0,height:r??0}),G=useCallback(b=>{H?.current?.updateSize(b);},[]),O=useCallback(b=>{H.current?.updateSize(b),P(p=>({width:b.width??p.width,height:b.height??p.height}));},[]),J=useMemo(()=>({position:v,setPosition:_,resizableRef:H,windowZIndex:f,isOpen:t,setIsMaximized:k,setIsSidebarExpanded:w,setIsToolbarAnimationDisabled:D,setIsResized:z,isMaximized:o,isToolbarAnimationDisabled:T,isSidebarExpanded:C,isResized:W,dimensions:F,setNewDimensions:P,viewerDefaultWidth:I,viewerDefaultHeight:g,onClose:i,fullWindowWidth:y,fullWindowHeight:h,updateRefSize:G,updateSize:O,minWidth:u,maxWidth:a,minHeight:s,maxHeight:d,containerRef:m}),[v,_,H,t,k,w,D,z,o,T,C,W,F,P,y,h,I,g,G,O,i,u,a,s,d,m,f]);return jsx(Y.Provider,{value:J,children:e})}var xe=(e,t)=>t.toLowerCase().includes(e);function he(e,t,i){let r=xe("top",t),n=xe("left",t);return !r&&!n?null:{x:n?e.x+i.width:e.x,y:r?e.y-i.height:e.y}}var S=.5,we=183,be=287,ge=840,We=545,ee=35;function Xe({title:e,onClose:t,onMaximize:i,maximized:r=false,id:n,onRequestClick:l,isSidebarExpanded:u=false,isHovered:a$1=false,onMouseHover:s,onMouseLeave:d$2,showSectionsButton:m,rightActions:f,icon:c$2}){return jsx(c,{id:n,"data-testid":"UserTitleBar",maximized:r||false,children:jsx(d,{onMouseEnter:s,onMouseLeave:d$2,isMaximized:r,isHovered:a$1,title:e,icon:c$2||Hf,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:r,onClick:i}),m&&jsx(d$1,{onClick:l,isExpanded:!u,isHovered:a$1,children:"Sidebar"})]}),rightActions:f})})}var ye=memo(Xe);var te=ye;function Ze({isMaximized:e,setIsToolbarAnimationDisabled:t,setIsMaximized:i,onClose:r,isSidebarExpanded:n,setIsSidebarExpanded:l,isToolbarAnimationDisabled:u,title:a,showSectionsButton:s,rightActions:d,icon:m}){let{isHovered:f,onMouseEnter:c,onMouseLeave:E}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...u&&{duration:0}},children:jsx(te,{title:a||"Users",showSectionsButton:s,onClose:r,onMaximize:()=>{i?.(o=>!o),t?.(true),setTimeout(()=>{t?.(false);},.5*1e3);},maximized:e,id:"draggable-dialog-title",onRequestClick:()=>{t?.(false),l(!n);},isSidebarExpanded:n,isHovered:f,onMouseHover:c,onMouseLeave:E,rightActions:d,icon:m})})}var Ae=memo(Ze);var Re=Ae;function dt({children:e,titleBar:t,titleBarText:i,mainAppOrder:r,mainAppIsMinimized:n,showSectionsButton:l=true,rightActions:u,titleBarIcon:a,overflow:s="hidden"}){let d=useRef(null),m=yc(useId(),"app-window"),{dimensions:f,position:c,resizableRef:E,isMaximized:o,isOpen:k,onClose:L,viewerDefaultWidth:y,viewerDefaultHeight:h,windowZIndex:I,setPosition:g,setNewDimensions:v,isToolbarAnimationDisabled:_,fullWindowWidth:W,fullWindowHeight:z,setIsMaximized:T,setIsResized:D,isResized:C,setIsToolbarAnimationDisabled:w,setIsSidebarExpanded:H,isSidebarExpanded:F,minWidth:P,maxWidth:G,minHeight:O,maxHeight:J,containerRef:b}=useContext(Y),p=useMemo(()=>document.createElement("div"),[]),[Pe,Be]=useState(null);useLayoutEffect(()=>{Be(b?.current??document.body);},[b]);let x=o?document.body:Pe;useLayoutEffect(()=>{if(!x)return;let A=x===document.body;return p.style.position=A?"":"absolute",p.style.inset=A?"":"0",p.style.pointerEvents="none",p.style.overflow="visible",x.appendChild(p),()=>{p.parentNode===x&&x.removeChild(p);}},[x,p]);let ne=useRef({x:0,y:0}),ae=xa(),Me=useCallback((A,N,se,Le)=>{D(true),v({width:se.offsetWidth,height:se.offsetHeight});let de=he(ne.current,N,Le);de&&g(de);},[v,D,g]),V=f.width||y;if(!x)return null;let ke=jsx(st,{nodeRef:d,disabled:o,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultClassName:"draggable-lead-dialog",defaultPosition:{x:W/2-V/2,y:z/2-h/2},position:{x:W-c.x,y:c.y},onStop:(A,N)=>{g({x:W-N.x,y:N.y});},...x===document.body&&{bounds:{top:10}},children:jsx(Dialog,{ref:d,sx:{backgroundColor:"transparent",pointerEvents:"none",zIndex:Number(r||0)+I+(o?1:0),...n&&{display:"none"},...x===document.body?!o&&{transform:"translate(180px, 14px)"}:!o&&{position:"absolute"},...!o&&{width:ae?V:"fit-content",height:ae?h:"fit-content"},...o&&{transform:"none !important"},boxShadow:"0px 0px 20px 0px rgba(0, 0, 0, 0.15)",overflow:"visible","& .MuiDialog-container":{overflow:"visible"}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",pointerEvents:"auto",overflow:s,width:C?"fit-content":V,height:C?"fit-content":"100%",...o&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{T(false),w(true),setTimeout(()=>{w(false);},.5*1e3);},open:k,hideBackdrop:true,disableEnforceFocus:true,disableScrollLock:true,container:p,fullScreen:o,"aria-labelledby":"draggable-dialog-title",disablePortal:true,children:jsx(Resizable,{"data-testid":"Resizable",enable:{topLeft:true,topRight:true,bottomLeft:true,bottomRight:true,left:true,right:true,bottom:true,top:true},handleStyles:{bottom:{zIndex:2},bottomLeft:{zIndex:2},bottomRight:{zIndex:2}},size:{width:f.width,height:f.height},maxHeight:J??z-40,maxWidth:G??W,minWidth:o?"100vw":P??y,minHeight:o?"100vh":O??h,ref:A=>{E.current=A;},onResizeStart:()=>{ne.current=c,w(true);},onResizeStop:()=>{w(false);},onResize:Me,defaultSize:{width:V,height:h},style:{background:"transparent",height:f.height,overflow:s,...o&&{height:"100% !important",width:"100% !important",flex:1},...o&&{position:"relative"}},children:jsxs(nt,{sx:{height:"100%"},id:m,"data-testid":"AppWindow",children:[t??jsx(Re,{setIsToolbarAnimationDisabled:w,onClose:L,setIsMaximized:T,isToolbarAnimationDisabled:_,setIsSidebarExpanded:H,isSidebarExpanded:F,title:i,isMaximized:o,showSectionsButton:l,rightActions:u,icon:a}),e]})})})});return createPortal(ke,p)}var Ie=memo(dt);var ut=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({background:t?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:t?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer"})),mt=styled(Button)(({theme:e,disabled:t})=>({background:t?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"0px 8px",fontSize:"9px",fontWeight:600,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),ft=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px",backgroundColor:e.palette.background.paper,padding:"6px",transform:"translateY(calc(-50% - 6px))",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px",height:"36px",transition:e.transitions.create(["width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex})})),ct=styled(Box)(()=>({position:"fixed",height:35,bottom:0,left:0,right:0,padding:"6px 16px",zIndex:1,backgroundColor:"#eaeaea",backdropFilter:"blur(12px)",display:"flex",justifyContent:"flex-end",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"})),xt=styled(Button)(()=>({padding:"4px 8px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.08)",display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",color:"rgba(32, 35, 43, 0.80)",fontWeight:600,fontSize:"9px",textTransform:"none"}));var ie=Ie;function ht({children:e,windowProps:t,...i}){return i.isOpen?jsx(Q,{...i,children:jsx(ie,{...t,children:e})}):null}var Te=ht;function bt({title:e,maximized:t=false,id:i,isHovered:r=false,onMouseHover:n,onMouseLeave:l,leftActions:u,titleIconSrc:a,sx:s,...d$1}){return jsx(c,{className:"header-wrapper",id:i,maximized:t||false,sx:s,...d$1,children:jsx(d,{onMouseEnter:n,onMouseLeave:l,isMaximized:t,isHovered:r,title:e||"",icon:a,leftActions:u})})}var re=memo(bt);function yt({isMaximized:e,id:t,isToolbarAnimationDisabled:i,title:r,leftActions:n,onClose:l,onMaximize:u,sx:a$1}){let{isHovered:s,onMouseEnter:d,onMouseLeave:m}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...i&&{duration:0}},children:jsx(re,{title:r,maximized:e,id:t||"draggable-dialog-title",isHovered:s,onMouseHover:d,onMouseLeave:m,leftActions:n||jsxs(Fragment,{children:[jsx(a,{onClick:l}),jsx(c$1,{isMaximized:e,onClick:()=>u?.(!e)})]}),sx:a$1})})}var Ce=memo(yt);var Rt=Ce;var Vo=Te;export{Y as a,Q as b,S as c,we as d,be as e,ge as f,We as g,ee as h,te as i,ut as j,mt as k,ft as l,ct as m,xt as n,ie as o,re as p,Rt as q,Vo as r};
|
|
1
|
+
import {a,c as c$1,d as d$1}from'./chunk-BVKQBVP4.js';import {c,d}from'./chunk-2SVYHE3E.js';import {b,a as a$1}from'./chunk-RDGZQA7I.js';import {yc,xa}from'./chunk-HI62DX6A.js';import {Gf}from'./chunk-DBRZBG7Q.js';import {createContext,memo,useRef,useId,useContext,useMemo,useState,useLayoutEffect,useCallback}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {createPortal}from'react-dom';import {styled,Box,Button,alpha,Dialog}from'@mui/material';import nt from'@mui/material/Box';import {Resizable}from're-resizable';import st from'react-draggable';import {motion}from'framer-motion';var Y=createContext({viewerDefaultWidth:555,viewerDefaultHeight:545,position:{x:0,y:0},setPosition:()=>{},dimensions:{width:0,height:0},windowZIndex:1e4,isOpen:true,setIsMaximized:()=>{},setIsSidebarExpanded:()=>{},setIsToolbarAnimationDisabled:()=>{},setIsResized:()=>{},setNewDimensions:()=>{},isMaximized:false,isToolbarAnimationDisabled:true,isSidebarExpanded:false,isResized:false,onClose:()=>{},fullWindowWidth:0,fullWindowHeight:0,resizableRef:{current:null},updateRefSize:()=>{},updateSize:()=>{},containerRef:{current:null}});var Oe=555,Ve=545;function Q({children:e,isOpen:t,onClose:i,defaultWindowHeight:r,defaultWindowWidth:n,initialPosition:l,minWidth:u,maxWidth:a,minHeight:s,maxHeight:d,containerRef:m,windowZIndex:f=1}){let{height:c,width:E}=a$1(),[o,k]=useState(false),L=o?null:m?.current,y=L?.clientWidth||E,h=L?.clientHeight||c,I=n||Oe,g=r||Ve,[v,_]=useState({x:l?.x??y/2+I/2,y:l?.y??h/2-g/2}),[W,z]=useState(false),[T,D]=useState(false),[C,w]=useState(true),H=useRef(),[F,P]=useState({width:n??0,height:r??0}),G=useCallback(b=>{H?.current?.updateSize(b);},[]),O=useCallback(b=>{H.current?.updateSize(b),P(p=>({width:b.width??p.width,height:b.height??p.height}));},[]),J=useMemo(()=>({position:v,setPosition:_,resizableRef:H,windowZIndex:f,isOpen:t,setIsMaximized:k,setIsSidebarExpanded:w,setIsToolbarAnimationDisabled:D,setIsResized:z,isMaximized:o,isToolbarAnimationDisabled:T,isSidebarExpanded:C,isResized:W,dimensions:F,setNewDimensions:P,viewerDefaultWidth:I,viewerDefaultHeight:g,onClose:i,fullWindowWidth:y,fullWindowHeight:h,updateRefSize:G,updateSize:O,minWidth:u,maxWidth:a,minHeight:s,maxHeight:d,containerRef:m}),[v,_,H,t,k,w,D,z,o,T,C,W,F,P,y,h,I,g,G,O,i,u,a,s,d,m,f]);return jsx(Y.Provider,{value:J,children:e})}var xe=(e,t)=>t.toLowerCase().includes(e);function he(e,t,i){let r=xe("top",t),n=xe("left",t);return !r&&!n?null:{x:n?e.x+i.width:e.x,y:r?e.y-i.height:e.y}}var S=.5,we=183,be=287,ge=840,We=545,ee=35;function Xe({title:e,onClose:t,onMaximize:i,maximized:r=false,id:n,onRequestClick:l,isSidebarExpanded:u=false,isHovered:a$1=false,onMouseHover:s,onMouseLeave:d$2,showSectionsButton:m,rightActions:f,icon:c$2}){return jsx(c,{id:n,"data-testid":"UserTitleBar",maximized:r||false,children:jsx(d,{onMouseEnter:s,onMouseLeave:d$2,isMaximized:r,isHovered:a$1,title:e,icon:c$2||Gf,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:r,onClick:i}),m&&jsx(d$1,{onClick:l,isExpanded:!u,isHovered:a$1,children:"Sidebar"})]}),rightActions:f})})}var ye=memo(Xe);var te=ye;function Ze({isMaximized:e,setIsToolbarAnimationDisabled:t,setIsMaximized:i,onClose:r,isSidebarExpanded:n,setIsSidebarExpanded:l,isToolbarAnimationDisabled:u,title:a,showSectionsButton:s,rightActions:d,icon:m}){let{isHovered:f,onMouseEnter:c,onMouseLeave:E}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...u&&{duration:0}},children:jsx(te,{title:a||"Users",showSectionsButton:s,onClose:r,onMaximize:()=>{i?.(o=>!o),t?.(true),setTimeout(()=>{t?.(false);},.5*1e3);},maximized:e,id:"draggable-dialog-title",onRequestClick:()=>{t?.(false),l(!n);},isSidebarExpanded:n,isHovered:f,onMouseHover:c,onMouseLeave:E,rightActions:d,icon:m})})}var Ae=memo(Ze);var Re=Ae;function dt({children:e,titleBar:t,titleBarText:i,mainAppOrder:r,mainAppIsMinimized:n,showSectionsButton:l=true,rightActions:u,titleBarIcon:a,overflow:s="hidden"}){let d=useRef(null),m=yc(useId(),"app-window"),{dimensions:f,position:c,resizableRef:E,isMaximized:o,isOpen:k,onClose:L,viewerDefaultWidth:y,viewerDefaultHeight:h,windowZIndex:I,setPosition:g,setNewDimensions:v,isToolbarAnimationDisabled:_,fullWindowWidth:W,fullWindowHeight:z,setIsMaximized:T,setIsResized:D,isResized:C,setIsToolbarAnimationDisabled:w,setIsSidebarExpanded:H,isSidebarExpanded:F,minWidth:P,maxWidth:G,minHeight:O,maxHeight:J,containerRef:b}=useContext(Y),p=useMemo(()=>document.createElement("div"),[]),[Pe,Be]=useState(null);useLayoutEffect(()=>{Be(b?.current??document.body);},[b]);let x=o?document.body:Pe;useLayoutEffect(()=>{if(!x)return;let A=x===document.body;return p.style.position=A?"":"absolute",p.style.inset=A?"":"0",p.style.pointerEvents="none",p.style.overflow="visible",x.appendChild(p),()=>{p.parentNode===x&&x.removeChild(p);}},[x,p]);let ne=useRef({x:0,y:0}),ae=xa(),Me=useCallback((A,N,se,Le)=>{D(true),v({width:se.offsetWidth,height:se.offsetHeight});let de=he(ne.current,N,Le);de&&g(de);},[v,D,g]),V=f.width||y;if(!x)return null;let ke=jsx(st,{nodeRef:d,disabled:o,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultClassName:"draggable-lead-dialog",defaultPosition:{x:W/2-V/2,y:z/2-h/2},position:{x:W-c.x,y:c.y},onStop:(A,N)=>{g({x:W-N.x,y:N.y});},...x===document.body&&{bounds:{top:10}},children:jsx(Dialog,{ref:d,sx:{backgroundColor:"transparent",pointerEvents:"none",zIndex:Number(r||0)+I+(o?1:0),...n&&{display:"none"},...x===document.body?!o&&{transform:"translate(180px, 14px)"}:!o&&{position:"absolute"},...!o&&{width:ae?V:"fit-content",height:ae?h:"fit-content"},...o&&{transform:"none !important"},boxShadow:"0px 0px 20px 0px rgba(0, 0, 0, 0.15)",overflow:"visible","& .MuiDialog-container":{overflow:"visible"}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",pointerEvents:"auto",overflow:s,width:C?"fit-content":V,height:C?"fit-content":"100%",...o&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{T(false),w(true),setTimeout(()=>{w(false);},.5*1e3);},open:k,hideBackdrop:true,disableEnforceFocus:true,disableScrollLock:true,container:p,fullScreen:o,"aria-labelledby":"draggable-dialog-title",disablePortal:true,children:jsx(Resizable,{"data-testid":"Resizable",enable:{topLeft:true,topRight:true,bottomLeft:true,bottomRight:true,left:true,right:true,bottom:true,top:true},handleStyles:{bottom:{zIndex:2},bottomLeft:{zIndex:2},bottomRight:{zIndex:2}},size:{width:f.width,height:f.height},maxHeight:J??z-40,maxWidth:G??W,minWidth:o?"100vw":P??y,minHeight:o?"100vh":O??h,ref:A=>{E.current=A;},onResizeStart:()=>{ne.current=c,w(true);},onResizeStop:()=>{w(false);},onResize:Me,defaultSize:{width:V,height:h},style:{background:"transparent",height:f.height,overflow:s,...o&&{height:"100% !important",width:"100% !important",flex:1},...o&&{position:"relative"}},children:jsxs(nt,{sx:{height:"100%"},id:m,"data-testid":"AppWindow",children:[t??jsx(Re,{setIsToolbarAnimationDisabled:w,onClose:L,setIsMaximized:T,isToolbarAnimationDisabled:_,setIsSidebarExpanded:H,isSidebarExpanded:F,title:i,isMaximized:o,showSectionsButton:l,rightActions:u,icon:a}),e]})})})});return createPortal(ke,p)}var Ie=memo(dt);var ut=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({background:t?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:t?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer"})),mt=styled(Button)(({theme:e,disabled:t})=>({background:t?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"0px 8px",fontSize:"9px",fontWeight:600,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),ft=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px",backgroundColor:e.palette.background.paper,padding:"6px",transform:"translateY(calc(-50% - 6px))",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px",height:"36px",transition:e.transitions.create(["width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex})})),ct=styled(Box)(()=>({position:"fixed",height:35,bottom:0,left:0,right:0,padding:"6px 16px",zIndex:1,backgroundColor:"#eaeaea",backdropFilter:"blur(12px)",display:"flex",justifyContent:"flex-end",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"})),xt=styled(Button)(()=>({padding:"4px 8px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.08)",display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",color:"rgba(32, 35, 43, 0.80)",fontWeight:600,fontSize:"9px",textTransform:"none"}));var ie=Ie;function ht({children:e,windowProps:t,...i}){return i.isOpen?jsx(Q,{...i,children:jsx(ie,{...t,children:e})}):null}var Te=ht;function bt({title:e,maximized:t=false,id:i,isHovered:r=false,onMouseHover:n,onMouseLeave:l,leftActions:u,titleIconSrc:a,sx:s,...d$1}){return jsx(c,{className:"header-wrapper",id:i,maximized:t||false,sx:s,...d$1,children:jsx(d,{onMouseEnter:n,onMouseLeave:l,isMaximized:t,isHovered:r,title:e||"",icon:a,leftActions:u})})}var re=memo(bt);function yt({isMaximized:e,id:t,isToolbarAnimationDisabled:i,title:r,leftActions:n,onClose:l,onMaximize:u,sx:a$1}){let{isHovered:s,onMouseEnter:d,onMouseLeave:m}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...i&&{duration:0}},children:jsx(re,{title:r,maximized:e,id:t||"draggable-dialog-title",isHovered:s,onMouseHover:d,onMouseLeave:m,leftActions:n||jsxs(Fragment,{children:[jsx(a,{onClick:l}),jsx(c$1,{isMaximized:e,onClick:()=>u?.(!e)})]}),sx:a$1})})}var Ce=memo(yt);var Rt=Ce;var Vo=Te;export{Y as a,Q as b,S as c,we as d,be as e,ge as f,We as g,ee as h,te as i,ut as j,mt as k,ft as l,ct as m,xt as n,ie as o,re as p,Rt as q,Vo as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {yc}from'./chunk-
|
|
1
|
+
import {yc}from'./chunk-HI62DX6A.js';import {Mc}from'./chunk-DBRZBG7Q.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var e=styled(d)(({theme:r})=>({fontSize:"10px",color:r.palette.error.light,padding:"8px",background:r.palette.background.gradient.error,borderRadius:"4px",display:"flex",gap:"4px",alignItems:"center",height:32}));function l({error:r,...i}){let n=yc(useId(),"error");return jsxs(e,{...i,id:n,"data-testid":"Error",children:[jsx("img",{src:Mc,alt:"w"}),r]})}var p=memo(l);var k=p;export{k as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f as f$1}from'./chunk-
|
|
1
|
+
import {f as f$1}from'./chunk-QRBPFPJ6.js';import {yc}from'./chunk-HI62DX6A.js';import {memo,useId}from'react';import f from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var d=styled(f,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:o})=>({padding:e.spacing(1),position:"relative",display:"flex",alignItems:"center",gap:"8px",textTransform:"capitalize",cursor:o?"not-allowed":"pointer",flex:1,fontSize:"0.6875rem",color:"#20232B"})),a=styled(f$1)({padding:0,width:"14px !important",".MuiSvgIcon-root":{width:"14px !important",height:"14px !important"}});function g({isSelected:e,isDisabled:o,isIndeterminate:p,hideCheckbox:l,onClick:s,children:c,className:t,...x}){let u=yc(useId(),"menu-item"),n=o?"disabled menu-item":"menu-item",b=t?`${n} ${t}`:n;return jsxs(d,{id:u,"data-testid":"MenuItem",className:b,onClick:s,disabled:o,...x,children:[!l&&jsx(a,{size:"small",checked:e,indeterminate:p,disabled:o}),c]})}var v=memo(g);export{v as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {yc}from'./chunk-
|
|
1
|
+
import {yc}from'./chunk-HI62DX6A.js';import {forwardRef,useId,memo}from'react';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var d=styled("img")(({theme:o})=>({width:o.spacing(2),height:o.spacing(2),verticalAlign:"middle"})),f=forwardRef((o,n)=>{let r=yc(useId(),"icon");return jsx(d,{id:r,"data-testid":"Icon",sx:o.sx,...o,ref:n})}),e=memo(f);var L=e;export{L as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {yc}from'./chunk-
|
|
1
|
+
import {yc}from'./chunk-HI62DX6A.js';import {fc}from'./chunk-DBRZBG7Q.js';import {useId}from'react';import {motion}from'framer-motion';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var e=styled(motion.img,{shouldForwardProp:n=>n!=="width"&&n!=="height"})(({width:n,height:i})=>({width:n||"16px",height:i||"16px"}));var h=({width:n,height:i,sx:p}={})=>{let m=yc(useId(),"animated-spinner-icon");return jsx(e,{id:m,"data-testid":"AnimatedSpinnerIcon",src:fc,alt:"Loading",className:"spinner-loader",width:n,height:i,sx:p,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}})},r=h;var u=r;export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-WP6HAML2.js';import {a}from'./chunk-L5RR3FXI.js';import {r}from'./chunk-QRBPFPJ6.js';import {yc,Fa,Ga,Ea,h}from'./chunk-HI62DX6A.js';import {Yc,Xc,Oc,Nc,Mc,Pc,Te}from'./chunk-DBRZBG7Q.js';import {useRef,useId,useState,useEffect}from'react';import {useTranslation}from'react-i18next';import {createPortal}from'react-dom';import {styled,alpha}from'@mui/material';import oe from'@mui/material/Popover';import Je from'react-currency-input-field';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var ne=styled("div")(({showWarning:e})=>({display:"flex",gap:"0.25rem",justifyContent:"flex-start",alignItems:"flex-start",padding:"0.25rem",borderRadius:"0.25rem",width:"14.25rem",minHeight:e?"3.6rem":"2.5rem"})),te=styled("div")(()=>({display:"flex",flexDirection:"column",width:"100%"})),re=styled("div")(()=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",flex:1})),ie=styled("div")(({theme:e,showWarning:o,showDropDown:t})=>({height:"2rem",border:o?`1px solid ${e.palette.common.red}24`:t?`1px solid ${e.palette.info.dark}`:`1px solid ${e.palette.grey[100]}`,borderRadius:o?"0.25rem 0.25rem 0rem 0rem":"0.25rem",display:"flex",alignItems:"center",justifyContent:"space-between",paddingRight:"0.5rem",paddingLeft:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",margin:0,zIndex:4e3,...t&&{boxShadow:`0px 0px 4px 0px ${e.palette.info.dark}80`}})),ae=styled("div")(({theme:e})=>({height:"1.1rem",borderRadius:"0rem 0rem 0.25rem 0.25rem",display:"flex",justifyContent:"flex-start",margin:0,alignItems:"center",background:e.palette.background.gradient.error,paddingLeft:"0.5rem"})),se=styled("p")(({theme:e})=>({color:e.palette.common.red,fontSize:"0.62rem",fontWeight:400,fontFamily:"Lato",padding:0,margin:0,paddingLeft:"0.25rem"})),de=styled("img")({height:"auto",width:"auto",verticalAlign:"top"}),le=styled("div")({display:"flex",flexDirection:"column",justifyContent:"center"}),ce=styled("div")({display:"flex",height:"0.8rem",alignItems:"center",width:"8.5rem"}),pe=styled(Je)(({theme:e,showWarning:o,disabled:t})=>({color:o?e.palette.common.red:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"4.5rem",height:"0.9rem",border:"none",outline:"none",textAlign:"right",padding:0,"&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},backgroundColor:"transparent",alignSelf:"flex-end","&::placeholder":{color:e.palette.grey.A400},...t&&{opacity:.3}})),me=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.8125rem",fontWeight:600,width:"5.2rem",border:"none",outline:"none",padding:0,margin:0,paddingLeft:16,textAlign:"right","&::-webkit-outer-spin-button":{appearance:"none",margin:0},"&::-webkit-inner-spin-button":{appearance:"none",margin:0},alignSelf:"center"})),I=styled("p")(({theme:e,showWarning:o,showBottomPadding:t,autoMargin:i})=>({color:o?e.palette.common.red:e.palette.grey[700],fontSize:"0.625rem",fontWeight:500,padding:0,margin:0,height:t?"0.43rem":"auto",...t&&{lineHeight:"0.625",leadingTrim:"both",paddingBottom:"0.31rem"},...i&&{paddingBottom:"0.43rem",lineHeight:"0.625"}})),Ne=styled("div")({display:"flex"}),v=styled(Ne)(({limited:e,paddingTop:o,marginRightAuto:t})=>({paddingRight:"0.5rem",alignItems:"center",cursor:"pointer",...t&&{marginRight:"auto"},...e&&{width:"3rem"},...o&&{paddingTop:"0.31rem"}})),A=styled("p")(({theme:e})=>({color:e.palette.text.primary,fontSize:"0.68rem",fontWeight:500,margin:0,padding:0,textTransform:"capitalize",paddingRight:"0.25rem",paddingLeft:"0.2rem",lineHeight:"0.865"})),ue=styled("div")({width:0,height:0}),ge=styled(oe)(({theme:e})=>({backgroundColor:e.palette.background.default,boxShadow:e.shadows[21],"& .MuiPaper-root":{borderRadius:"0.25rem"}})),F=styled("div")(({theme:e,disabled:o,isRefundInProcess:t,warning:i,isHighlighted:a})=>({borderRadius:"0.3rem",backgroundColor:e.palette.common.white,border:`1px solid ${t?e.palette.info.dark:e.palette.grey[100]}`,width:"2rem",height:"2rem",display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer",pointerEvents:o?"none":"auto",transition:"all 0.2s ease-in-out","&:hover":{border:`1px solid ${i?e.palette.common.red:e.palette.info.dark}`},...a&&{border:`1px solid ${e.palette.info.dark}`},...o&&{opacity:.3}})),H=styled("img")(()=>({width:"0.85rem",height:"0.85rem"})),fe=styled(oe)(({theme:e})=>({backgroundColor:"transparent",boxShadow:e.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem"}})),he=styled("div")(({showDaysMenu:e})=>({height:e?"4.5rem":"auto"})),ye=styled("div")(({theme:e})=>({display:"flex",alignItems:"flex-start",justifyContent:"space-between",borderBottom:`1px solid ${e.palette.grey[100]}`,maxWidth:"9.25rem",height:"2.75rem",padding:"0.5rem",cursor:"pointer",gap:"0.31rem",flexDirection:"column",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:`0px 0px 16px 0px ${alpha(e.palette.common.black,.13)}`}})),Ce=styled("img")(({spaceFromBottom:e,currencyPadding:o})=>({height:"0.4rem",width:"0.6rem",cursor:"pointer",marginBottom:e||o?"0":"auto",verticalAlign:"middle",...e&&{marginTop:"2px"}}));var Xe=({selectedCurrency:e,option:o,closeDropdown:t,handleSelectOption:i})=>{let{t:a$1}=useTranslation();return jsxs(ye,{onClick:()=>{i&&i(o.value,o?.currency),t();},children:[jsx(I,{showBottomPadding:true,showWarning:false,children:a$1(o.name)}),jsxs(ce,{children:[jsxs(v,{marginRightAuto:true,children:[jsx(a,{currencyCode:o?.currency??e,width:"0.76rem"}),jsx(A,{children:o?.currency??e})]}),jsx(me,{showWarning:false,children:Fa(o.value||0,o?.currency??e)})]})]})};function Ye({menuAnchor:e,showDropDown:o,selectedCurrency:t,options:i,closeDropdown:a,handleSelectOption:g}){return i.length<=1?null:jsx(fe,{open:o,anchorEl:e,anchorOrigin:{vertical:18,horizontal:-76},style:{backgroundColor:"transparent",zIndex:4e3,padding:0,margin:0},onClose:a,children:jsx(he,{children:i.map(f=>jsx(Fragment,{children:Xe({selectedCurrency:t,option:f,closeDropdown:a,handleSelectOption:g})}))})})}var $=Ye;function oo({showWarning:e,selectedCurrency:o,onAmountChange:t,amount:i,currencyConfig:a$2,toggleDropDown:g,showDropDown:f,showDropdownIcon:M,disabled:x,isLoading:h}){let{t:b}=useTranslation(),y=useRef(null),C=()=>{y.current&&y.current.click();};return jsxs(Fragment,{children:[jsxs(le,{children:[jsx(I,{showBottomPadding:true,showWarning:e,children:b("amount")}),jsxs(v,{limited:true,paddingTop:true,onClick:C,children:[jsx(a,{currencyCode:o,width:"0.76rem"}),jsx(A,{children:jsx(a$1,{currency:o})}),!e&&M&&jsx(Ce,{src:f?Yc:Xc,alt:"drop-down icon",currencyPadding:true})]})]}),jsx(ue,{ref:y,onClick:g}),h?jsx(r,{variant:"text",width:"100%",height:"100%"}):jsx(pe,{disabled:x,placeholder:a$2[o]?"0.000":"0.00",onValueChange:t,value:i,decimalsLimit:a$2[o]??2,showWarning:e||false,decimalScale:a$2[o]??2,autoFocus:true})]})}var B=oo;function so({anchorEl:e,initialAmount:o,options:t,onConfirm:i,handleClose:a,currency:g,isCheckMarkHighlighted:f}){let M=yc(useId(),"action-menu"),{t:x}=useTranslation(),[h$1,b]=useState(o?.toString()),[y,C]=useState(),[u,k]=useState(""),be=useRef(null),[R,E]=useState(false),[c,Se]=useState(g),j=false,[De,Ie]=useState(false),[ve,G]=useState(Oc),[Ae,K]=useState(Nc),Me=useRef(),ke=()=>{C(void 0),E(false);};useEffect(()=>{Me.current?.focus();},[De]);let Re=()=>{ke(),Ie(r=>!r);},Ee=!!e,We=r=>{E(p=>!p),C(r.currentTarget);},Pe=t?.find(r=>r.currency===c)?.value,Te$1=Fa(Pe||0,c),Oe=`${x("maxAllowed")} ${Te$1}`,Fe=`${x("minAllowed")} ${Ga(.1,c||"KWD")}`,He=r=>{let p=h(r);p>o?k(Oe):p<.1&&r!==void 0?k(Fe):k(""),b(r);},Le=(r,p)=>{let Ve=Ga(r||0,p||"KWD");b(Ve),Se(p||c);},U=r=>{C(void 0),E(false),a(r);},$e=()=>{K(Pc);},ze=()=>{K(Nc);},V=r=>{U(r);},Be=()=>{U();},je=()=>{G(Te);},Ge=()=>{G(Oc);},Ke=()=>{i?.(h(h$1),c),V();},Ue=!!u||!h$1;return createPortal(jsx(ge,{id:M,"data-testid":"ActionMenu",open:Ee,anchorEl:e,style:{backgroundColor:"transparent",zIndex:3e3},"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",anchorOrigin:{vertical:"top",horizontal:-234},ref:be,onClose:r=>{V(r);},children:jsxs(ne,{showWarning:!!u,children:[jsxs(te,{children:[jsxs(ie,{showWarning:!!u,showDropDown:R,children:[jsx(B,{showWarning:!!u,selectedCurrency:c,onAmountChange:He,amount:h$1,currencyConfig:Ea,toggleDropDown:We,showDropDown:!R,showDropdownIcon:(t?.length||0)>1}),jsx($,{showDropDown:R,menuAnchor:y,selectedCurrency:c,closeDropdown:Re,options:t??[],handleSelectOption:Le})]}),!!u&&jsxs(ae,{children:[jsx(de,{src:Mc,alt:"info"}),jsx(se,{children:u})]})]}),jsxs(re,{children:[jsx(F,{onMouseLeave:Ge,onMouseEnter:je,warning:true,role:"button",onClick:Be,children:jsx(H,{isRefundInProcess:j,src:ve,alt:"Cross icon"})}),jsx(F,{onMouseLeave:ze,onMouseEnter:$e,isRefundInProcess:j,disabled:Ue,role:"button",onClick:Ke,isHighlighted:f,children:jsx(H,{src:Ae,alt:"Check icon"})})]})]})}),document.body)}var xe=so;var jo=xe;export{$ as a,B as b,jo as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {yc,Ia}from'./chunk-
|
|
1
|
+
import {yc,Ia}from'./chunk-HI62DX6A.js';import {memo,useId}from'react';import d from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var r=styled("span")(()=>({fontWeight:400})),p=styled(d)(()=>({fontWeight:700,fontSize:"11px",display:"flex",alignItems:"center",cursor:"default",whiteSpace:"nowrap",overflow:"auto"}));function a({amount:i,currencyCode:s,...u}){let l=yc(useId(),"display-amount"),{integerAmount:c,decimalAmount:f}=Ia(i,s);return jsxs(p,{...u,id:l,"data-testid":"DisplayAmount",children:[jsx("span",{children:c}),jsx("span",{children:"."}),jsx(r,{children:f})]})}a.displayName="DisplayAmount";var m=memo(a);var P=m;export{P as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-JCU5G6KH.js';import {a as a$2}from'./chunk-CYWPV3SB.js';import {a}from'./chunk-GNY2VGGW.js';import {yc,Ka}from'./chunk-HI62DX6A.js';import {dl,el}from'./chunk-DBRZBG7Q.js';import {useId,useState,useEffect}from'react';import te from'@mui/material/ClickAwayListener';import m from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var L=styled(m)(()=>({width:157,padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"})),B=styled(a,{shouldForwardProp:e=>e!=="open"&&e!=="size"})(({theme:e,open:o,size:p})=>({fontSize:"11px",fontWeight:500,background:e.palette.common.white,border:`1px solid ${e.palette.divider}`,borderRadius:"19px",height:p==="large"?32:24,width:p==="large"?74:58,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{boxShadow:"0px 0px 4px 0px #1F88D080",borderColor:e.palette.info.dark}})),d=styled(m)(()=>({textAlign:"center",cursor:"pointer",userSelect:"none"})),S=styled(a,{shouldForwardProp:e=>e!=="selected"})(({theme:e,selected:o})=>({fontSize:"11px",fontWeight:500,background:e.palette.common.white,border:`1px solid ${e.palette.divider}`,borderRadius:"4px",height:24,width:33,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{borderColor:"transparent",color:e.palette.info.dark,backgroundColor:alpha(e.palette.info.dark,.1)}})),z=styled(m)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),$=styled(m)(()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"})),k=styled(m)(()=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"6px"})),h=styled(a$1)(()=>({".MuiInput-input":{fontWeight:"500",fontSize:"11px"},height:32,width:32}));var _=e=>e===0?12:e<=12?e:e-12,ue=e=>e>=12?"PM":"AM",j=()=>new Date().getMinutes(),F=()=>{let e=new Date().getHours();return _(e)},ce=(e,o)=>o==="AM"&&e===12?0:o==="PM"&&e!==12?e+12:e;var N=["AM","PM"],f=12,g=59;function R({onChange:e,defaultTime:o,enableRealTimeChange:p,size:O="large"}){let U=yc(useId(),"time-picker"),[A,y]=useState(null),[a$1,q]=useState(o?.period??(new Date().getHours()>=12?"PM":"AM")),[s,w]=useState(o?.hour??F()),[u,C]=useState(o?.minute??j()),H=!!A;useEffect(()=>{p&&e?.({hour:s,minute:u,period:a$1});},[s,u,a$1,p]);let G=r=>{y(r.currentTarget);},J=()=>{y(null),e?.({hour:s,minute:u,period:a$1});},K=r=>{q(r);},i=r=>r<10?`0${r}`:r.toString(),Q=r=>{let c=Ka(i(Number(r.target.value)));if(c>12){r.preventDefault();return}w(c);},I=()=>{w(r=>r===12?1:r+1);},v=()=>{w(r=>r===1?12:r-1);},V=r=>{let c=Ka(i(Number(r.target.value)));if(c>59){r.preventDefault();return}C(c);},X=()=>{C(r=>r===59?(I(),0):r+1);},Y=()=>{C(r=>r===0?(v(),59):r-1);};return jsx(te,{onClickAway:J,children:jsxs(m,{id:U,"data-testid":"TimePicker",children:[jsx(B,{size:O,open:H,onClick:G,children:`${i(s)}:${i(u)}${a$1.toLowerCase()}`}),jsx(a$2,{open:H,anchorEl:A,placement:"top-start",sx:{marginTop:"8px",marginBottom:"8px"},children:jsxs(L,{children:[jsxs($,{children:[jsxs(k,{children:[jsx(d,{onClick:I,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(h,{value:i(s),onChange:Q}),jsx(d,{onClick:v,children:jsx("img",{src:el,alt:"arrow"})})]}),jsx(a,{children:":"}),jsxs(k,{children:[jsx(d,{onClick:X,children:jsx("img",{src:dl,alt:"arrow"})}),jsx(h,{value:i(u),onChange:V}),jsx(d,{onClick:Y,children:jsx("img",{src:el,alt:"arrow"})})]})]}),jsx(z,{children:N.map(r=>jsx(S,{onClick:()=>{K(r);},selected:a$1===r,children:r},r))})]})})]})})}var ve=R;export{_ as a,ue as b,j as c,F as d,ce as e,N as f,f as g,g as h,R as i,ve as j};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {h,g,a,f,e,d,c}from'./chunk-
|
|
1
|
+
import {h,g,a,f,e,d,c}from'./chunk-EBZ4BXJX.js';import {z}from'./chunk-QRBPFPJ6.js';import {yc,Ka,g as g$1}from'./chunk-HI62DX6A.js';import {zl,ja,Ta,Pg,jl,Ya,Sa,Yg,Xg,Zg,Wg,$g,zb,yb,Bk,jk,gb,wk,B,w,A,D,Uh,ik,u,Ck}from'./chunk-DBRZBG7Q.js';import {memo,useId,useState,useRef,useEffect,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function L({isActive:p,disableHover:n}){let[c,C]=useState(false),s=useTheme(),e=()=>{n||C(true);},i=()=>{C(false);},h=p?s.palette.common.white:s.palette.grey[700],u=c?s.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:u,fillOpacity:"0.1",onMouseEnter:e,onMouseLeave:i}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:h})]})})}var vt={inProgress:Ck,initiated:Ck,abandoned:u,cancelled:ik,reversed:Uh,reports:D,search:A,chevronDown:w,unAuthorized:B,unSettled:wk,unCaptured:gb,captured:jk,authorized:Bk,openFlag:yb,closedFlag:zb,unauthenticated:$g,authenticated:Wg,paidOut:Zg,scheduled:Xg,checked:Yg,dashedChecked:Sa,deactivated:Ya,destination:jl,destinationReversed:Pg,outstanding:Ta,active:ja,inactive:zl};var Nt=memo(p=>{let{variant:n="inActive",badgeCount:c$1,icon:C,label:s,dropdownOptions:e$1,selectedStatus:i,onButtonBodyClick:h$1,iconMapper:u=vt,buttonSx:Bt,...bt}=p,St=yc(useId(),"status-button"),[Lt,M]=useState(0),{t:y}=useTranslation(),E=useRef(null),[x,f$1]=useState(null),[o,H]=useState(i??e$1?.[0]?.status);useEffect(()=>{i!==void 0&&H(i);},[i]);let d$1=useMemo(()=>!!e$1?.length,[e$1]),I=!!x&&Lt>1,l=n==="active",P=useMemo(()=>l?"active":"inactive",[l]),m=useMemo(()=>o?e$1?.find(t=>t.status===o):null,[o,e$1]),kt=useMemo(()=>{if(m?.icon)return jsx(h,{variant:n,children:m.icon});let t=o&&u[o]?o:C;if(t&&u[t])return jsx(g,{icon:t,variant:n,src:u[t],alt:`${t}-icon`})},[m,o,u,C,n]),wt=useMemo(()=>!c$1||Number.isNaN(Ka(c$1))?null:jsx(z,{color:P,children:g$1(Number(c$1))}),[c$1,P]),T=useMemo(()=>d$1?jsx(L,{isActive:l}):null,[d$1,l]);useEffect(()=>{l||(M(0),f$1(null));},[l]);let g$2=useCallback(()=>{f$1(null);},[]),A=useCallback(()=>{d$1&&f$1(I?null:E.current);},[d$1,I]),Mt=useCallback(t=>{t.stopPropagation(),p?.onClick?.(t),h$1?.(o||e$1?.[0]?.status||"all"),A(),M(B=>B+1);},[p,h$1,o,e$1,A]),D=useCallback(t=>B=>{t?.onClick?.(B),H(t.status),g$2();},[g$2]),yt=useMemo(()=>e$1?.map(t=>({...t,onClick:D(t)}))||[],[e$1,D]),Et=a[n],xt=useMemo(()=>m?.label||(o?y(o):s),[m,o,y,s]);return jsxs(Fragment,{children:[jsx(Et,{id:St,"data-testid":"StatusButton",...bt,ref:E,onClick:Mt,statusVariant:n,sx:{...d$1&&{paddingInlineEnd:"27px"},...Bt},children:jsxs(f,{children:[jsxs(e,{variant:n,children:[kt,xt,wt]}),T&&jsx(d,{children:T})]})}),I&&d$1&&jsx(c,{open:I,onClose:g$2,anchorEl:x,menuItems:yt})]})}),gt=Nt;var oo=gt;
|
|
2
2
|
export{L as a,oo as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a,d,b,c,j as j$1,e}from'./chunk-
|
|
1
|
+
import {a,d,b,c,j as j$1,e}from'./chunk-MSM5GYDZ.js';import {yc}from'./chunk-HI62DX6A.js';import {dc,ec}from'./chunk-DBRZBG7Q.js';import {memo,useId,useState}from'react';import ee from'@mui/material/ClickAwayListener';import te from'@mui/material/Popper';import {useTranslation}from'react-i18next';import {DateObject,Calendar}from'react-multi-date-picker';import i from'@mui/material/Box';import l from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var O=styled(l)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),z=styled(i)(()=>({position:"relative"})),H=styled(i,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({display:t?"flex":"none",flexDirection:"column",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),top:37,color:e.palette.text.primary,fontSize:"11px",margin:"8px 0",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"}})),j=styled(l,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:500,padding:e.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,textTransform:"none",height:32,...t&&{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),A=styled(i)(({theme:t})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8,padding:"16px",borderTop:`1px solid ${t.palette.divider}`})),E=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:t.palette.text.primary,border:"1px solid",borderColor:t.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:t.palette.text.primary}})),Y=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:t.palette.info.dark,"&:hover":{background:t.palette.info.dark}})),F=styled(i)(()=>({display:"flex",gap:"8px"}));var ne=["Su","Mo","Tu","We","Th","Fr","Sa"];function ae({isAr:t=false,value:e$1,setValue:y,enableTimePicker:p,placement:L,sx:R,...N}){let V=yc(useId(),"calender"),[w,k]=useState(null),[C,$]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),[D,g]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),q=e$1?.hour?a(e$1.hour):d(),G=e$1?.hour?b(e$1.hour):b(new Date().getHours()),[a$1,J]=useState({hour:q,minute:e$1?.minute??c(),period:G}),{t:B}=useTranslation(),u=!!w,K=r=>r==="right"?t?dc:ec:t?ec:dc,Q=r=>{k(r.currentTarget);},f=()=>{k(null);},U=()=>{let r=a$1.hour;p&&(r=e(a$1.hour,a$1.period||"AM"));let d=p?D.setHour(r).setMinute(a$1.minute):D;$(d),y&&y(d),f();},X=r=>{J(r);};return jsx(ee,{onClickAway:f,children:jsxs(z,{sx:{...R},id:V,"data-testid":"Calender",children:[jsx(j,{onClick:Q,open:u,className:"date-button",children:C.format("MMM D, YYYY")}),jsx(te,{open:u,anchorEl:w,placement:L,children:jsxs(H,{className:"calender-content",open:u,children:[jsx(Calendar,{numberOfMonths:1,format:"MMM DD YYYY",monthYearSeparator:" ",renderButton:(r,d)=>jsx(O,{onClick:d,children:jsx("img",{src:K(r),alt:"arrow"})}),onMonthChange:r=>{g(r);},onYearChange:r=>{g(r);},onChange:r=>{g(r);},weekDays:t?void 0:ne,minDate:new Date,value:C,...N}),jsxs(A,{sx:{...p&&{justifyContent:"space-between"}},children:[p&&jsx(j$1,{enableRealTimeChange:true,onChange:X,defaultTime:a$1}),jsxs(F,{children:[jsx(E,{variant:"contained",onClick:f,children:B("cancel")}),jsx(Y,{variant:"contained",onClick:U,children:B("okay")})]})]})]})})]})})}var I=memo(ae);var Te=I;export{Te as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {Bk,zk,xk,uk,kk,mk,Ck,jk,ik,Ak,Nh,sb,nk,qb,ok,qk,rk,wk,vk,pk}from'./chunk-DBRZBG7Q.js';var b={ABANDONED:Nh,IN_PROGRESS:Ck,VOID:Ak,CANCELLED:ik,CAPTURED:jk,INITIATED:Ck,FAILED:mk,DECLINED:kk,RESTRICTED:uk,TIMEDOUT:xk,UNKNOWN:zk,AUTHORIZED:Bk},C={UNKNOWN:{gatewayIcon:nk,acquirerIcon:sb,color:"#FF7A00",background:"#FF7A001A"},TIMEDOUT:{gatewayIcon:nk,acquirerIcon:sb,color:"#FF7A00",background:"#FFF3E5"},FAILED:{gatewayIcon:nk,acquirerIcon:sb,color:"#FF7A00",background:"#FFF3E5"},DECLINED:{gatewayIcon:ok,acquirerIcon:qb,color:"#FF3D00",background:"#FFEAE5"},RESTRICTED:{gatewayIcon:ok,acquirerIcon:qb,color:"#FF3D00",background:"#FFEAE5"},ABANDONED:{gatewayIcon:nk,acquirerIcon:sb,color:"#FFD600",background:"#FFFBE5"},CANCELLED:{gatewayIcon:nk,acquirerIcon:sb,color:"#FFD600",background:"#FFFBE5"},INITIATED:{color:"#8D8D94",background:"transparent",gatewayIcon:nk,acquirerIcon:sb}},R={PENDING:rk,REFUNDED:qk},S={PENDING:{color:"#FF7A00",backgroundColor:"#FF7A000D"},REFUNDED:{color:"#4E1FD0",backgroundColor:"#4E1FD00D"}},O={PAID_OUT:pk,SETTLED:vk,PENDING:wk},k={AUTHORIZED:Bk},w={CAPTURED:{color:"#1F88D0",background:"#1F88D00D"}};export{b as a,C as b,R as c,S as d,O as e,k as f,w as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-MH5USFCO.js';import {a as a$1}from'./chunk-JMFVI3V4.js';import {n}from'./chunk-QRBPFPJ6.js';import {a}from'./chunk-GNY2VGGW.js';import {Vb,yc}from'./chunk-HI62DX6A.js';import {Dj,Ej,Kj,Oe}from'./chunk-DBRZBG7Q.js';import {forwardRef,useState,useImperativeHandle,useEffect,useMemo,memo,useId}from'react';import {Button}from'@mui/material';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {useTranslation}from'react-i18next';import {useDropzone}from'react-dropzone';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var G=styled(p)(()=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"32px"})),u=styled(p)(()=>({paddingInline:"40px"})),d=styled(a,{shouldForwardProp:e=>e!=="isError"})(({theme:e,isError:i})=>({color:i?"#FF2000":e.palette.text.primary,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:"8px"})),J=styled(p)(({theme:e})=>({color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,cursor:"pointer"})),g=styled(a)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),F=styled(p,{shouldForwardProp:e=>e!=="width"})(({theme:e,width:i})=>({width:i||431,minHeight:176,border:`1px dashed ${e.palette.secondary.light}`,borderRadius:"8px",padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center"})),h=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"24px",color:e.palette.text.primary,fontSize:"14px",lineHeight:"20px",cursor:"default"})),K=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),b=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px",color:e.palette.text.primary})),z=styled(p)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),O=styled(Button)(({theme:e,disabled:i})=>({borderRadius:"4px",minWidth:"105px",background:i?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"4px 8px",fontSize:"9px",fontWeight:600,height:"32px",display:"flex",alignItems:"center",justifyContent:"center",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),Q=styled(p)(()=>({display:"flex",gap:"8px",justifyContent:"center",alignItems:"center",padding:"6px",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px"}));var Y=forwardRef(({accept:e,footer:i,options:x,isCreateLoading:U,progress:te,error:R,errorHint:oe,subtitleComponent:S,isSuccess:P,onConfirm:re,isSendDisabled:ie,errorActionComponent:le,title:l,width:B,successFooter:pe,progressVariant:ne},ae)=>{let{t:n$1}=useTranslation(),[a,H]=useState([]),{getRootProps:de,getInputProps:se,open:f,acceptedFiles:j,isDragReject:M,fileRejections:s}=useDropzone(x);useImperativeHandle(ae,()=>({open:f}),[f]),useEffect(()=>{H(j);},[j]);let C=Vb(x?.maxSize||0,0).toUpperCase(),m=useMemo(()=>{let me=s.length&&s[0].errors.some(k=>k.code==="file-invalid-type"),ce=s.length&&s[0].errors.some(k=>k.code==="file-too-large");return M||me?n$1("invalidFileType"):ce?`File is larger than ${C}`:R},[M,R,s,C,n$1]),W=useMemo(()=>a.length?jsxs(b,{sx:{fontWeight:600},children:[jsx(p,{children:a[0].name}),jsx(z,{children:Vb(a[0].size)})]}):null,[a]);return P&&a.length&&!U?jsxs(Fragment,{children:[jsxs(u,{children:[typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:"File uploaded"}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[P&&jsx(p,{component:"img",src:Dj,width:56,height:56}),W]})}),pe??jsxs(Q,{children:[jsx(a$1,{onClick:()=>{H([]);},children:jsx(a$2,{src:Ej,alt:"delete",sx:{width:14,height:14}})}),jsx(O,{disabled:ie,onClick:()=>{re?.(a);},children:"Bulk Send"})]})]}):U&&a.length?jsxs(Fragment,{children:[jsxs(u,{children:[l&&typeof l!="string"?l:jsxs(Fragment,{children:[jsx(d,{children:l??n$1("uploading")}),jsx(g,{children:n$1("wait")})]}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[U&&jsx(n,{size:56,value:te,variant:ne??"determinate"}),W]})}),i]}):jsxs(Fragment,{children:[jsxs(u,{children:[m?jsx(d,{isError:true,children:m}):typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:n$1("uploadBulkFile")}),S||!!m&&jsx(g,{children:"Supported formats: xls, xlxs"})]}),jsxs(F,{width:B,...de(),children:[jsx("input",{...se()}),jsxs(h,{"data-slot":"content",children:[jsx(p,{component:"img",src:m?Kj:Oe,width:56,height:56}),oe,W,m?jsx(Fragment,{children:le||jsx(J,{onClick:f,children:n$1("uploadAgain")})}):jsxs(b,{children:[jsxs(p,{children:[jsx(K,{onClick:f,children:"Click to upload"})," or drag and drop"]}),jsxs(z,{children:["Maximum file size ",C]}),e&&jsx(g,{children:n$1("supportedFormats",{accept:e})})]})]})]}),i]})});Y.displayName="FileUploadBase";var Z=memo(Y);var L=forwardRef((e,i)=>{let x=yc(useId(),"file-upload");return jsx(G,{id:x,"data-testid":"FileUpload","data-slot":"file-upload-wrapper",children:jsx(Z,{...e,ref:i})})});L.displayName="FileUpload";var ee=memo(L);var Xe=ee;export{Xe as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-BPOEPKOQ.js';import {a,b,f as f$1,d,c,h as h$1,i,e}from'./chunk-YEWY2D2G.js';import {a as a$5}from'./chunk-MH5USFCO.js';import {a as a$2}from'./chunk-Y7BWIJMJ.js';import {a as a$3,b as b$1}from'./chunk-MUR4ILTY.js';import {f,ba,P,O,h,ca}from'./chunk-QRBPFPJ6.js';import {a as a$1}from'./chunk-GNY2VGGW.js';import {yc,Ac}from'./chunk-HI62DX6A.js';import {Pc,A}from'./chunk-DBRZBG7Q.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
2
|
0% {
|
|
3
3
|
transform: rotate(-90deg);
|
|
4
4
|
}
|
|
@@ -12,4 +12,4 @@ import {a as a$4}from'./chunk-6G45KTCP.js';import {a,b,f as f$1,d,c,h as h$1,i,e
|
|
|
12
12
|
100% {
|
|
13
13
|
transform: rotate(270deg);
|
|
14
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?ba(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$3,{})})})}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:Qc,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$2,{...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$3,{})}),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(ca,{...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:Qc,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(a$1)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a$1)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,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(a$1)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",fontSize:"10px",fontWeight:500,color:e.palette.common.black,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$4,{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$5,{src:Qc,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:B,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};
|
|
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?ba(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$3,{})})})}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$2,{...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$3,{})}),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(ca,{...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(a$1)(({theme:e})=>({fontSize:"10px",color:e.palette.grey[700],fontWeight:600,lineHeight:"10px"}));styled(a$1)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,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(a$1)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",fontSize:"10px",fontWeight:500,color:e.palette.common.black,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$4,{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$5,{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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d as d$1}from'./chunk-5BRIR2WC.js';import {a}from'./chunk-MD2UG3GO.js';import {yc}from'./chunk-HI62DX6A.js';import {Eb,A as A$1}from'./chunk-DBRZBG7Q.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(a)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(a)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B=yc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Eb:A$1,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-YLGDVJQ3.js';import {yc}from'./chunk-HI62DX6A.js';import {useId}from'react';import {styled,Box}from'@mui/material';import {jsx}from'react/jsx-runtime';var r=styled(Box)(()=>({display:"flex",gap:"4px",alignItems:"center",flexDirection:"row"})),i=styled(b)(()=>({padding:"0.75px 12px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"}));var x=({chips:t,containerSx:a,defaultChipSx:n,...l})=>{let u=yc(useId(),"status-group-chips");return !t||t.length===0?null:jsx(r,{id:u,"data-testid":"StatusGroupChips",sx:a,...l,children:t.map(({key:d,content:C,sx:f,...m})=>jsx(i,{sx:{...n,...f},...m,children:C},d))})},y=x;export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {yc}from'./chunk-
|
|
1
|
+
import {yc}from'./chunk-HI62DX6A.js';import {Cj}from'./chunk-DBRZBG7Q.js';import {memo,useId}from'react';import f from'@mui/material/ButtonBase';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';import {Box}from'@mui/material';var d=styled(f,{shouldForwardProp:t=>t!=="variant"&&t!=="size"&&t!=="width"&&t!=="height"})(({theme:t,variant:o="confirm",size:e="default",width:n,height:r})=>({textTransform:"capitalize",borderRadius:"4px",lineHeight:"100%",gap:"8px","&.Mui-disabled":{opacity:.5},...o==="confirm"&&{color:t.palette.common.white,background:t.palette.info.dark},...o==="cancel"&&{color:t.palette.grey[700],border:`1px solid ${t.palette.divider}`},...e==="small"&&{height:24,width:"auto",padding:"8px 16px",fontWeight:600,fontSize:"10px"},...e==="default"&&{height:32,width:75,fontWeight:700,padding:"8px 24px",fontSize:"11px"},...n!==void 0&&{width:n},...r!==void 0&&{height:r}}));function u({children:t,sx:o,...e}){let n=yc(useId(),"button");return jsx(d,{id:n,"data-testid":"Button",sx:o,...e,children:t})}u.displayName="Button";var p=memo(u);function s({...t}){return jsx(Box,{component:"button","data-testid":"PlusButton",...t,sx:{cursor:"pointer",padding:0,margin:0,background:"transparent",border:"none",width:24,height:24,...t.sx},children:jsx("img",{src:Cj,alt:"Plus Button",width:24,height:24})})}s.displayName="PlusButton";var l=memo(s);var y=l;var q=p;export{y as a,q as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-EBZ4BXJX.js';import {z}from'./chunk-QRBPFPJ6.js';import {yc}from'./chunk-HI62DX6A.js';import {Rh}from'./chunk-DBRZBG7Q.js';import {memo,useId}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a=styled(Box,{shouldForwardProp:t=>t!=="isLongLabel"})(({theme:t,isLongLabel:e})=>({display:"flex",justifyContent:"center",alignItems:"center",padding:"6px 16px",height:"32px",background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,borderRadius:"50px",fontSize:"11px",gap:t.spacing(1),minWidth:e?"12rem":"8.4rem",marginRight:"auto",position:"relative"}));function u({ids:t,visible:e,label:o,onDismiss:c,dismissible:m=true}){let d=yc(useId(),"active-filter-chip");return e?jsxs(a,{id:d,"data-testid":"ActiveFilterChip",isLongLabel:(o?.length??0)>11,children:[o?jsx(b,{children:o}):jsx("span",{children:t?.join(",")}),m&&jsx(z,{pointer:true,round:true,onClick:c,color:"active",sx:{position:"absolute",right:"8px"},children:jsx("img",{src:Rh,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var S=s;export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {v}from'./chunk-
|
|
1
|
+
import {v}from'./chunk-QRBPFPJ6.js';import {yc,Ba,Ca}from'./chunk-HI62DX6A.js';import {Eb,Vc}from'./chunk-DBRZBG7Q.js';import mo,{useId,useState,useRef,useCallback,useEffect,useMemo}from'react';import B from'@mui/material/Box';import uo from'@mui/material/ClickAwayListener';import ro from'@mui/material/Stack';import Y from'@mui/material/Typography';import {styled,alpha}from'@mui/material/styles';import O from'@mui/material/Button';import lo from'@mui/material/TextField';import po from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import fo from'@mui/material/Popper';import J from'@mui/material/MenuItem';import j from'@mui/material/InputAdornment';import v$1 from'color';import {Popper}from'@mui/material';var G=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),D=styled(B)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:"#ffffff",padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),V=styled(B)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),X=styled(o=>jsx(Y,{...o,component:"button"}))(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,"&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none"},"&:hover":{textDecoration:"none"}})),$=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),U=styled(O)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Z=styled(B,{shouldForwardProp:o=>o!=="active"})(({theme:o,active:s})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...s&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),q=styled(po)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),x=styled(lo)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var ho=({scheme:o,setScheme:s})=>{let[n,r]=mo.useState(null),m=!!n,a=useCallback(c=>{r(n?null:c.currentTarget);},[n]),i=useCallback(()=>{r(null);},[]),d=useCallback(c=>{i(),s(c);},[i,s]);return jsxs(Fragment,{children:[jsxs(Z,{component:"button",active:m,onClick:a,children:[o,jsx(B,{component:"img",sx:{transform:m?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Vc})]}),jsx(fo,{anchorEl:n,open:!!n,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(uo,{onClickAway:c=>{n?.contains(c.target)||i();},children:jsxs(q,{children:[jsx(J,{onClick:()=>d("RGB"),children:"RGB"}),jsx(J,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},K=ho;var Ro=({value:o,onChange:s,disableAlpha:n=false})=>{let[r,m]=useState(o),{r:a,g:i,b:d,a:c}=r;useEffect(()=>{m(o);},[o]);let u=useCallback((l,f)=>(isNaN(l)&&(l=0),l<0&&(l=0),l>f&&(l=f),console.log("num",l),l),[]),t=useCallback((l,f)=>P=>{m({...r,[l]:u(+P.target.value,f)});},[r,u]),e=useCallback((l,f)=>{s({...r,[l]:u(r[l],f)});},[s,r,u]);return jsxs(ro,{direction:"row",spacing:1,...n&&{flex:1},children:[jsx(x,{type:"number",value:a,onBlur:()=>e("r",255),onChange:t("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:i,onBlur:()=>e("g",255),onChange:t("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),jsx(x,{type:"number",value:d,onBlur:()=>e("b",255),onChange:t("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...n&&{sx:{flex:1}}}),!n&&jsx(x,{type:"number",value:c,onBlur:()=>e("a",100),onChange:t("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},Q=Ro;var vo=({value:o,onChange:s,disableAlpha:n=false})=>{let r=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[m,a]=useState(r),i=Math.round(o.a*100);return useEffect(()=>{let t=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");a(t);},[o.r,o.g,o.b]),jsxs(ro,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(x,{value:m,onChange:t=>{let e=t.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();e.length>6&&(e=e.slice(0,6)),a(e);},onBlur:()=>{let t=m;if(t.length===3&&(t=t.split("").map(e=>e+e).join(""),a(t)),t.length===6)try{let e=v$1(`#${t}`).alpha(o.a);s({r:e.red(),g:e.green(),b:e.blue(),a:e.alpha()});}catch{a(r);}else a(r);},placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(j,{position:"start",sx:{m:0},children:jsx(Y,{component:"span",color:t=>alpha(t.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!n&&jsx(x,{type:"number",value:i,onChange:t=>{let e=parseInt(t.target.value,10);isNaN(e)&&(e=0),e<0&&(e=0),e>100&&(e=100),s({...o,a:e/100});},inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(j,{position:"end",sx:{m:0},children:jsx(Y,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},oo=vo;var Wo=({initialValue:o="#ffffff",onCancel:s,onConfirm:n,disableAlpha:r=false})=>{let[m,a]=useState("RGB"),[i,d]=useState(()=>{let{alpha:p,...y}=Ba(o).value;return {...y,a:p}}),{t:c}=useTranslation(),u=useCallback(()=>{let{alpha:p,...y}=Ba(o).value;d({...y,a:p}),s();},[o,s]),t=useCallback(()=>{let{a:p,...y}=i;n(Ca({...y,alpha:r?1:p}));},[i,n,r]),e=useCallback(p=>{d(r?{...p,a:1}:p);},[r]),l=useCallback(p=>{d({...p,a:p.a/100});},[]),f=useCallback(p=>{d({...p,a:p.a});},[]);return jsxs(D,{className:"color-picker__widget",children:[jsx(r?RgbColorPicker:RgbaColorPicker,{color:i,onChange:e}),jsxs(ro,{mt:2,spacing:1,direction:"row",children:[jsx(K,{scheme:m,setScheme:a}),m==="RGB"?jsx(Q,{value:{...i,a:Math.round(i.a*100)},onChange:l,disableAlpha:r}):jsx(oo,{value:{...i,a:i.a},onChange:f,disableAlpha:r})]}),jsx(v,{sx:{my:"12px"}}),jsxs(V,{className:"color-picker__widget-actions",children:[jsx(U,{className:"color-picker__widget-actions__cancel",onClick:u,children:c("cancel")}),jsx($,{className:"color-picker__widget-actions__confirm",onClick:t,children:c("okay")})]})]})},to=Wo;var no={hideReset:false,disableAlpha:false},Vo=({value:o="#ffffff",onChange:s,onReset:n,sx:r,options:m=no,disabled:a=false})=>{let i=yc(useId(),"color-picker"),[d,c]=useState(null),{disableAlpha:u=false,hideReset:t=false}={...no,...m},e=useRef(null),l=useCallback(()=>{a||c(e.current);},[a]),f=useCallback(()=>{a||c(null);},[a]),P=useCallback(p=>{s(u?p.substring(0,7):p),c(null);},[s,u]);return jsx(uo,{onClickAway:()=>c(null),children:jsxs(ro,{ref:e,id:i,"data-testid":"ColorPicker",bgcolor:"grey.400",borderRadius:"4px",p:"4px",pr:"12px",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:"color-picker",sx:r,children:[jsxs(ro,{direction:"row",spacing:1,alignItems:"center",className:"color-picker__controls-wrapper",children:[jsx(B,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:"color-picker__viewer"}),jsxs(B,{className:"color-picker__actions-wrapper",children:[jsx(Y,{className:"color-picker__label",fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(X,{className:"color-picker__edit-btn",type:"button",onClick:l,disabled:a,children:"Edit"})]})]}),t?jsx("div",{}):jsx(G,{className:"color-picker__close-btn",type:"button",disabled:a,onClick:n,children:jsx(B,{component:"img",src:Eb,width:10,height:10})}),jsx(Popper,{anchorEl:d,open:!!d,placement:"top",children:jsx(to,{initialValue:o,onCancel:f,onConfirm:P,disableAlpha:u})})]})})},ao=Vo;var ot=ao;export{ot as a};
|