@tap-payments/os-micro-frontend-shared 0.3.264 → 0.3.265

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/build/_chunks/{chunk-6IAMZFT6.js → chunk-2JYBMD4I.js} +1 -1
  2. package/build/_chunks/{chunk-ZRRZG4CU.js → chunk-4JUVQWRF.js} +1 -1
  3. package/build/_chunks/chunk-5DKCOPDF.js +1 -0
  4. package/build/_chunks/chunk-5V3PUIXN.js +1 -0
  5. package/build/_chunks/{chunk-ALZSCMJI.js → chunk-64ZDTAAW.js} +1 -1
  6. package/build/_chunks/{chunk-VDOQXEUT.js → chunk-7NMMD6VJ.js} +1 -1
  7. package/build/_chunks/{chunk-54TY5SXL.js → chunk-ABVY4O2O.js} +1 -1
  8. package/build/_chunks/{chunk-OL6PQPSI.js → chunk-AJS7K55Q.js} +1 -1
  9. package/build/_chunks/chunk-AXNWVU3K.js +2 -0
  10. package/build/_chunks/chunk-BK7CW4W6.js +2 -0
  11. package/build/_chunks/{chunk-MBC5H6W7.js → chunk-BNM6FJCR.js} +1 -1
  12. package/build/_chunks/{chunk-3CMVSEFO.js → chunk-BRFCMPF5.js} +1 -1
  13. package/build/_chunks/{chunk-LJY75SQY.js → chunk-BXVLLRHG.js} +1 -1
  14. package/build/_chunks/chunk-DEEC67P7.js +2 -0
  15. package/build/_chunks/{chunk-Q6AL55UP.js → chunk-DFEQ23C7.js} +1 -1
  16. package/build/_chunks/{chunk-5BAFTVZQ.js → chunk-DJRPY3A2.js} +1 -1
  17. package/build/_chunks/{chunk-ZZPTXUPF.js → chunk-DOZLA7RE.js} +1 -1
  18. package/build/_chunks/{chunk-PGRQEN5C.js → chunk-DRRME7J2.js} +1 -1
  19. package/build/_chunks/{chunk-BTE72W4R.js → chunk-EUMG4QKT.js} +1 -1
  20. package/build/_chunks/{chunk-YFIYVG7E.js → chunk-F3U4ZIAP.js} +1 -1
  21. package/build/_chunks/{chunk-IA5IEBOH.js → chunk-FMUJQ45L.js} +1 -1
  22. package/build/_chunks/{chunk-IRBWQZSH.js → chunk-FNUU2KSZ.js} +1 -1
  23. package/build/_chunks/chunk-FTRMTWS4.js +1 -0
  24. package/build/_chunks/{chunk-6BFV6NCN.js → chunk-GBGW63EG.js} +1 -1
  25. package/build/_chunks/{chunk-EB24OXAG.js → chunk-GFOWTME6.js} +1 -1
  26. package/build/_chunks/{chunk-44P3BD62.js → chunk-H4FZYTL7.js} +1 -1
  27. package/build/_chunks/{chunk-WYJOH2AK.js → chunk-HOHQMC2O.js} +1 -1
  28. package/build/_chunks/{chunk-PNIR4GUC.js → chunk-IBHWDBBJ.js} +1 -1
  29. package/build/_chunks/{chunk-ESRTU72R.js → chunk-IPEPXEL5.js} +1 -1
  30. package/build/_chunks/{chunk-JZN7D44A.js → chunk-K6LOVRKX.js} +1 -1
  31. package/build/_chunks/{chunk-Y2GYQNCW.js → chunk-KCIFOOFA.js} +1 -1
  32. package/build/_chunks/{chunk-UPSV4H3R.js → chunk-LDCBWAC4.js} +1 -1
  33. package/build/_chunks/{chunk-74TIGJAP.js → chunk-LON6X4MJ.js} +1 -1
  34. package/build/_chunks/{chunk-C5EKTMXI.js → chunk-LTIWXK7D.js} +1 -1
  35. package/build/_chunks/{chunk-HBR7P4LZ.js → chunk-LVQ2UFZT.js} +1 -1
  36. package/build/_chunks/{chunk-BFVDSVFM.js → chunk-LXG5YXOJ.js} +1 -1
  37. package/build/_chunks/chunk-MF5ATA3Y.js +1 -0
  38. package/build/_chunks/{chunk-TYMPXKFT.js → chunk-MI3EC2ZF.js} +1 -1
  39. package/build/_chunks/chunk-N5KO2TC3.js +9 -0
  40. package/build/_chunks/{chunk-QNBOZQDY.js → chunk-NUCUSAD2.js} +1 -1
  41. package/build/_chunks/{chunk-TC4ME6DZ.js → chunk-ONANHXZA.js} +1 -1
  42. package/build/_chunks/{chunk-2YNDLGG6.js → chunk-OOLWSYGD.js} +1 -1
  43. package/build/_chunks/chunk-OPDVYLZK.js +1 -0
  44. package/build/_chunks/{chunk-WHPBDYOY.js → chunk-PUJ762TG.js} +1 -1
  45. package/build/_chunks/{chunk-7GTNCNBB.js → chunk-REZFP4CA.js} +1 -1
  46. package/build/_chunks/{chunk-DCQXQHAI.js → chunk-RNJI3YXH.js} +1 -1
  47. package/build/_chunks/chunk-RUFO5P34.js +1 -0
  48. package/build/_chunks/{chunk-334EPCW5.js → chunk-SMJCH23I.js} +1 -1
  49. package/build/_chunks/{chunk-JWLIHVLP.js → chunk-TN55SPRQ.js} +1 -1
  50. package/build/_chunks/{chunk-4HUB6MWM.js → chunk-TX3XM6XL.js} +1 -1
  51. package/build/_chunks/chunk-TY7VGG46.js +1 -0
  52. package/build/_chunks/{chunk-SPNEIGHB.js → chunk-TZOMS57X.js} +1 -1
  53. package/build/_chunks/{chunk-TDNUHD3F.js → chunk-UC5FMNUV.js} +1 -1
  54. package/build/_chunks/chunk-UCJQFE45.js +1 -0
  55. package/build/_chunks/{chunk-NCG4PCDH.js → chunk-UPZR423T.js} +1 -1
  56. package/build/_chunks/{chunk-XOH5TUDL.js → chunk-UXR6RZN4.js} +1 -1
  57. package/build/_chunks/{chunk-LEFLUMTS.js → chunk-WC2MF35C.js} +1 -1
  58. package/build/_chunks/{chunk-AN2PVRN2.js → chunk-WXCTMI3J.js} +1 -1
  59. package/build/_chunks/{chunk-ZT35MSJQ.js → chunk-X5HRCMTE.js} +1 -1
  60. package/build/_chunks/{chunk-MGH52F2U.js → chunk-XRUOTYCI.js} +1 -1
  61. package/build/_chunks/{chunk-7SNHZ7VW.js → chunk-XXCH74F3.js} +1 -1
  62. package/build/_chunks/{chunk-HWDXYAQY.js → chunk-YIZKLFYJ.js} +1 -1
  63. package/build/_chunks/{chunk-7ZWAT3EG.js → chunk-ZCULKYWE.js} +1 -1
  64. package/build/_chunks/chunk-ZGWS7XFH.js +1 -0
  65. package/build/_chunks/chunk-ZRABDQRJ.js +2 -0
  66. package/build/_chunks/{chunk-OGVYYV4P.js → chunk-ZUK5FRG5.js} +1 -1
  67. package/build/components/ActionsDropdownMenu/index.js +1 -1
  68. package/build/components/Alert/index.js +1 -1
  69. package/build/components/AppServices/index.js +1 -1
  70. package/build/components/AppServicesBar/index.js +1 -1
  71. package/build/components/AppWindowWrapper/index.js +1 -1
  72. package/build/components/AreaChart/index.js +1 -1
  73. package/build/components/Autocomplete/Autocomplete.d.ts +5 -10
  74. package/build/components/Autocomplete/constants.d.ts +69 -0
  75. package/build/components/Autocomplete/icons.d.ts +10 -0
  76. package/build/components/Autocomplete/index.d.ts +3 -1
  77. package/build/components/Autocomplete/index.js +1 -1
  78. package/build/components/Autocomplete/style.d.ts +61 -6
  79. package/build/components/Autocomplete/type.d.ts +64 -0
  80. package/build/components/Autocomplete/utils.d.ts +11 -0
  81. package/build/components/AvatarStack/index.js +1 -1
  82. package/build/components/Calender/index.js +1 -1
  83. package/build/components/Card/index.js +1 -1
  84. package/build/components/CardList/index.js +1 -1
  85. package/build/components/ColorPicker/index.js +1 -1
  86. package/build/components/ColorPicker/style.d.ts +1 -1
  87. package/build/components/ColumnViews/index.js +1 -1
  88. package/build/components/ConfirmDialog/index.js +1 -1
  89. package/build/components/CountryFilter/index.js +1 -1
  90. package/build/components/CountryFlag/index.js +1 -1
  91. package/build/components/CurrenciesMenu/index.js +1 -1
  92. package/build/components/CurrencyAmount/index.js +1 -1
  93. package/build/components/CurrencyAmountInput/index.js +1 -1
  94. package/build/components/CurrencySymbol/index.js +1 -1
  95. package/build/components/DateFilter/index.js +1 -1
  96. package/build/components/DateInput/DateInput.d.ts +4 -0
  97. package/build/components/DateInput/constants.d.ts +83 -0
  98. package/build/components/DateInput/icons.d.ts +3 -0
  99. package/build/components/DateInput/index.d.ts +5 -0
  100. package/build/components/DateInput/index.js +1 -0
  101. package/build/components/DateInput/style.d.ts +41 -0
  102. package/build/components/DateInput/type.d.ts +85 -0
  103. package/build/components/DateInput/utils.d.ts +25 -0
  104. package/build/components/DeviceIcon/index.js +1 -1
  105. package/build/components/DropdownMenu/index.js +1 -1
  106. package/build/components/EmptyState/index.js +1 -1
  107. package/build/components/ErrorToast/index.js +1 -1
  108. package/build/components/FileDropbox/index.js +1 -1
  109. package/build/components/FilePreview/index.js +1 -1
  110. package/build/components/FileUploader/index.js +1 -1
  111. package/build/components/FilterChip/index.js +1 -1
  112. package/build/components/FilterDropdown/index.js +1 -1
  113. package/build/components/Filters/index.js +1 -1
  114. package/build/components/FlippingCard/index.js +1 -1
  115. package/build/components/GroupedSelect/constants.d.ts +1 -0
  116. package/build/components/GroupedSelect/icons.d.ts +1 -1
  117. package/build/components/GroupedSelect/index.js +1 -1
  118. package/build/components/GroupedSelect/style.d.ts +8 -2
  119. package/build/components/GroupedSelect/type.d.ts +3 -0
  120. package/build/components/HeatMap/index.js +1 -1
  121. package/build/components/JSONViewer/index.js +1 -1
  122. package/build/components/LeftPeekRightExpandingChip/index.js +1 -1
  123. package/build/components/ListColumnFilter/index.js +1 -1
  124. package/build/components/ListHeader/index.js +1 -1
  125. package/build/components/ListLayout/index.js +1 -1
  126. package/build/components/Loader/index.js +1 -1
  127. package/build/components/Logo/index.js +1 -1
  128. package/build/components/MFWidgetLoader/index.js +1 -1
  129. package/build/components/MaskedText/index.js +1 -1
  130. package/build/components/{NestedMultiSelect → MultiLevelSelect}/FieldSelectedValues.d.ts +2 -2
  131. package/build/components/MultiLevelSelect/MultiLevelSelect.d.ts +4 -0
  132. package/build/components/MultiLevelSelect/NodeMenuItem.d.ts +11 -0
  133. package/build/components/{NestedMultiSelect → MultiLevelSelect}/SelectableOption.d.ts +4 -4
  134. package/build/components/{NestedMultiSelect → MultiLevelSelect}/SelectedChips.d.ts +3 -3
  135. package/build/components/{NestedMultiSelect → MultiLevelSelect}/constants.d.ts +13 -12
  136. package/build/components/MultiLevelSelect/index.d.ts +4 -0
  137. package/build/components/MultiLevelSelect/index.js +1 -0
  138. package/build/components/{NestedMultiSelect → MultiLevelSelect}/style.d.ts +10 -2
  139. package/build/components/{NestedMultiSelect → MultiLevelSelect}/type.d.ts +10 -10
  140. package/build/components/{NestedMultiSelect → MultiLevelSelect}/utils.d.ts +12 -12
  141. package/build/components/NestedDropdown/index.js +1 -1
  142. package/build/components/PhoneFilter/index.js +1 -1
  143. package/build/components/PhoneInput/index.js +1 -1
  144. package/build/components/ProgressRing/index.js +1 -1
  145. package/build/components/RadioGroup/index.js +1 -1
  146. package/build/components/RangeCalender/index.js +1 -1
  147. package/build/components/RatingCount/index.js +1 -1
  148. package/build/components/RightLeftExpandingCenterChip/index.js +1 -1
  149. package/build/components/SearchButton/index.js +1 -1
  150. package/build/components/SearchInput/index.js +1 -1
  151. package/build/components/Select/Select.d.ts +4 -0
  152. package/build/components/Select/SelectField.d.ts +37 -0
  153. package/build/components/Select/SelectFieldValue.d.ts +14 -0
  154. package/build/components/Select/constants.d.ts +89 -0
  155. package/build/components/Select/icons.d.ts +10 -0
  156. package/build/components/Select/index.d.ts +5 -0
  157. package/build/components/Select/index.js +1 -0
  158. package/build/components/Select/style.d.ts +91 -0
  159. package/build/components/Select/type.d.ts +106 -0
  160. package/build/components/Select/utils.d.ts +39 -0
  161. package/build/components/SheetViewChip/index.js +1 -1
  162. package/build/components/Sidebar/index.js +1 -1
  163. package/build/components/StatusBar/index.js +1 -1
  164. package/build/components/StatusButton/index.js +1 -1
  165. package/build/components/StatusFilter/index.js +1 -1
  166. package/build/components/StatusIcons/index.js +1 -1
  167. package/build/components/StatusLabel/index.js +1 -1
  168. package/build/components/TableCells/index.js +1 -1
  169. package/build/components/TableReports/index.js +1 -1
  170. package/build/components/TextInput/constants.d.ts +2 -0
  171. package/build/components/TextInput/index.js +1 -1
  172. package/build/components/TextInput/type.d.ts +6 -0
  173. package/build/components/TextInput/utils.d.ts +3 -1
  174. package/build/components/Timepicker/index.js +1 -1
  175. package/build/components/Toolbar/index.js +1 -1
  176. package/build/components/TreeDropdown/index.js +1 -1
  177. package/build/components/VerificationIcon/index.js +1 -1
  178. package/build/components/VirtualTables/index.js +1 -1
  179. package/build/components/index.d.ts +4 -6
  180. package/build/components/index.js +1 -1
  181. package/build/components/modules/RangeCalender/index.js +1 -1
  182. package/build/components/modules/VirtualTables/index.js +1 -1
  183. package/build/components/primitives/FieldFeedback/icons.d.ts +2 -1
  184. package/build/components/primitives/index.js +1 -1
  185. package/build/datetime/components/index.js +1 -1
  186. package/build/hooks/index.js +1 -1
  187. package/build/index.js +1 -1
  188. package/build/types/user.d.ts +0 -46
  189. package/build/utils/index.js +1 -1
  190. package/build/utils/number.d.ts +7 -0
  191. package/package.json +1 -1
  192. package/build/_chunks/chunk-4YB6A7BD.js +0 -8
  193. package/build/_chunks/chunk-53C2M4NA.js +0 -1
  194. package/build/_chunks/chunk-5DFEQLOX.js +0 -1
  195. package/build/_chunks/chunk-637B2KTR.js +0 -2
  196. package/build/_chunks/chunk-DS6S5G66.js +0 -1
  197. package/build/_chunks/chunk-FOSRKOWU.js +0 -1
  198. package/build/_chunks/chunk-FQ2VMVUY.js +0 -0
  199. package/build/_chunks/chunk-HDCNWBW5.js +0 -1
  200. package/build/_chunks/chunk-I3LSSBRI.js +0 -1
  201. package/build/_chunks/chunk-JUVW4KPW.js +0 -1
  202. package/build/_chunks/chunk-K43ZLU4I.js +0 -2
  203. package/build/_chunks/chunk-L3QJZAXC.js +0 -1
  204. package/build/_chunks/chunk-MRA4IYK7.js +0 -1
  205. package/build/_chunks/chunk-MUR4ILTY.js +0 -2
  206. package/build/_chunks/chunk-NW7HJXBW.js +0 -8
  207. package/build/_chunks/chunk-O3LHVRBN.js +0 -2
  208. package/build/_chunks/chunk-SNCNXCPA.js +0 -1
  209. package/build/_chunks/chunk-Y7SE3WMR.js +0 -1
  210. package/build/_chunks/chunk-YROLX5D7.js +0 -8
  211. package/build/components/FormSelect/FormSelect.d.ts +0 -8
  212. package/build/components/FormSelect/FormSelectMenuSearchInput.d.ts +0 -9
  213. package/build/components/FormSelect/FormSelectSearchableField.d.ts +0 -3
  214. package/build/components/FormSelect/FormSelectSelectMenu.d.ts +0 -21
  215. package/build/components/FormSelect/index.d.ts +0 -3
  216. package/build/components/FormSelect/index.js +0 -1
  217. package/build/components/FormSelect/style.d.ts +0 -52
  218. package/build/components/FormSelect/type.d.ts +0 -105
  219. package/build/components/FormSelect/utils.d.ts +0 -15
  220. package/build/components/Icons/LoadingIcon.d.ts +0 -4
  221. package/build/components/Icons/MenuSearchIcon.d.ts +0 -3
  222. package/build/components/Icons/index.d.ts +0 -2
  223. package/build/components/Icons/index.js +0 -1
  224. package/build/components/InputBase/SelectBase/SelectBase.d.ts +0 -46
  225. package/build/components/InputBase/SelectBase/SelectBaseMultiple.d.ts +0 -33
  226. package/build/components/InputBase/SelectBase/components/DefaultClearIcon.d.ts +0 -5
  227. package/build/components/InputBase/SelectBase/components/DefaultSelectIcon.d.ts +0 -5
  228. package/build/components/InputBase/SelectBase/components/SelectBaseEndAdornment.d.ts +0 -13
  229. package/build/components/InputBase/SelectBase/components/SelectInlineProgress.d.ts +0 -6
  230. package/build/components/InputBase/SelectBase/index.d.ts +0 -3
  231. package/build/components/InputBase/SelectBase/style.d.ts +0 -14
  232. package/build/components/InputBase/SelectBase/utils.d.ts +0 -2
  233. package/build/components/InputBase/index.d.ts +0 -1
  234. package/build/components/InputBase/index.js +0 -1
  235. package/build/components/Inputs/Select/Select.d.ts +0 -3
  236. package/build/components/Inputs/Select/index.d.ts +0 -2
  237. package/build/components/Inputs/Select/type.d.ts +0 -9
  238. package/build/components/Inputs/index.d.ts +0 -2
  239. package/build/components/Inputs/index.js +0 -1
  240. package/build/components/MultiSelect/MultiSelect.d.ts +0 -21
  241. package/build/components/MultiSelect/index.d.ts +0 -2
  242. package/build/components/MultiSelect/index.js +0 -1
  243. package/build/components/MultiSelect/style.d.ts +0 -40
  244. package/build/components/NestedMultiSelect/NestedMultiSelect.d.ts +0 -4
  245. package/build/components/NestedMultiSelect/NodeMenuItem.d.ts +0 -11
  246. package/build/components/NestedMultiSelect/index.d.ts +0 -4
  247. package/build/components/NestedMultiSelect/index.js +0 -1
  248. /package/build/components/{NestedMultiSelect → MultiLevelSelect}/BranchMenuItem.d.ts +0 -0
  249. /package/build/components/{NestedMultiSelect → MultiLevelSelect}/icons.d.ts +0 -0
@@ -1 +1 @@
1
- import {zc,bb,lc,kc,_b}from'./chunk-I3LSSBRI.js';import {$o,ta,ra}from'./chunk-IQAHULGQ.js';import {forwardRef,useId,useRef,useState,useEffect,useCallback,memo}from'react';import {useTranslation}from'react-i18next';import {useForkRef}from'@mui/material/utils';import R from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var f="os-shared-SheetViewChip",r={root:`${f}-root`,chip:`${f}-chip`,text:`${f}-text`,copyButton:`${f}-copyButton`},J=2e3,K=.3;var Q=styled("div")({position:"relative",width:"fit-content",maxWidth:"100%",'[data-column-align="right"] &':{marginLeft:"auto"}}),x=styled(R,{shouldForwardProp:e=>!["chipTextColor","chipBgColor","chipBorderColor","disabled","isSelected","disableAnimation"].includes(e)})(({theme:e,isSelected:w,chipTextColor:n=e.palette.text.primary,chipBgColor:i="#EFF1F2",chipBorderColor:o="#EFF1F2",disabled:h=false,disableAnimation:y})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",height:"18px",padding:"0px 8px",borderRadius:"30px",border:`1px solid ${o}`,backgroundColor:i,color:n,cursor:h?"not-allowed":"pointer",opacity:h?.5:1,whiteSpace:"nowrap",fontSize:"11px",minWidth:"67px",maxWidth:"none",width:"fit-content",overflow:"hidden",textOverflow:"unset",boxSizing:"border-box",...w&&{boxShadow:"white 7px 0px 8px 2px"},...y&&{transition:"none !important",animation:"none !important",transform:"none !important","& *":{transform:"none !important"}}})),L=styled(R)(()=>({gap:"4px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1})),U=styled(R)(()=>({position:"absolute",top:0,height:"100%",width:"12px",display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"})),Y=styled("img",{shouldForwardProp:e=>e!=="isVisible"})(({isVisible:e})=>({height:12,width:12,objectFit:"contain",opacity:e?1:0,transform:`translateX(${e?0:-5}px)`,pointerEvents:e?"auto":"none",transition:"opacity 100ms ease, transform 100ms ease"}));var oe=forwardRef(({id:e,className:w,children:n,copyText:i,copyTrigger:o="hover",animationDirection:h="right",animationDuration:y=200,disableAnimation:S=false,disabled:v=false,unknownText:ie,fullWidth:a=false,containerStyles:se,sx:b,onClick:g,onMouseEnter:V,onMouseLeave:E,...N},F)=>{let $=zc(useId(),"sheet-view-chip"),{t:ne}=useTranslation(),k=useRef(null),re=useForkRef(k,F),M=useRef(),[P,c]=useState(false),[W,A]=useState(false),p=o==="always"||P,I=p&&!!i,l=h==="left",H=Math.max(0,y),T=K*1e3,ae=p?0:T;useEffect(()=>{if(o!=="press"||!P)return;let t=me=>{k.current?.contains(me.target)||c(false);};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[o,P]),useEffect(()=>()=>clearTimeout(M.current),[]);let pe=useCallback(t=>{o==="press"&&c(true),g?.(t);},[o,g]),le=useCallback(t=>{o==="hover"&&i&&c(true),V?.(t);},[o,i,V]),de=useCallback(t=>{o==="hover"&&c(false),E?.(t);},[o,E]),he=useCallback(t=>{t.stopPropagation(),i&&(A(true),bb(i),clearTimeout(M.current),M.current=setTimeout(()=>A(false),J));},[i]),B=lc(r.chip,w);if(!n)return jsx(x,{...N,chipBgColor:$o.bgColor,chipBorderColor:$o.borderColor,chipTextColor:$o.textColor,ref:F,id:e??$,"data-testid":"SheetViewChip",className:lc(r.root,B),disabled:v,disableAnimation:S,onClick:g,onMouseEnter:V,onMouseLeave:E,sx:kc(b??{},t=>({borderColor:t.palette.divider,width:a?"100%":"auto"})),children:ne(ie??"unknown")});let ce=S?"none":`z-index 0ms linear ${p?0:T+H}ms`,z={zIndex:p?3:0,transition:ce};return jsxs(Q,{ref:re,id:e??$,"data-testid":"SheetViewChip",className:r.root,style:{...z,...se,...a&&{width:"100%",minWidth:0,marginLeft:0}},children:[jsx(x,{...N,"aria-hidden":true,className:B,disabled:v,sx:kc(b??{},{visibility:"hidden",pointerEvents:"none",width:a?"100%":"fit-content"}),children:jsx(L,{children:n})}),jsx("div",{style:{position:"absolute",top:0,...z,width:a?"100%":"max-content",left:l?"auto":0,right:l?0:"auto"},children:jsxs(x,{...N,className:B,isSelected:p,disabled:v,disableAnimation:S,onClick:pe,onMouseEnter:le,onMouseLeave:de,sx:kc({width:a?"100%":"auto"},b),children:[jsx("div",{style:{display:"flex",gap:"4px",...a&&{maxWidth:"100%",width:"100%"},paddingRight:I&&!l?12:0,paddingLeft:I&&l?12:0,transition:`padding ${H}ms ease ${ae}ms`},children:jsx(L,{className:r.text,"data-is-arabic":typeof n=="string"&&_b(n),children:n})}),i&&jsx(U,{className:r.copyButton,sx:l?{left:"8px"}:{right:"8px"},children:jsx(Y,{isVisible:I,src:W?ta:ra,alt:W?"copied":"copy",onClick:he})})]})})]})});oe.displayName="SheetViewChip";var ye=memo(oe);export{r as a,ye as b};
1
+ import {Bc,db,nc,mc,ac}from'./chunk-RUFO5P34.js';import {$o,ta,ra}from'./chunk-IQAHULGQ.js';import {forwardRef,useId,useRef,useState,useEffect,useCallback,memo}from'react';import {useTranslation}from'react-i18next';import {useForkRef}from'@mui/material/utils';import R from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var f="os-shared-SheetViewChip",r={root:`${f}-root`,chip:`${f}-chip`,text:`${f}-text`,copyButton:`${f}-copyButton`},J=2e3,K=.3;var Q=styled("div")({position:"relative",width:"fit-content",maxWidth:"100%",'[data-column-align="right"] &':{marginLeft:"auto"}}),x=styled(R,{shouldForwardProp:e=>!["chipTextColor","chipBgColor","chipBorderColor","disabled","isSelected","disableAnimation"].includes(e)})(({theme:e,isSelected:w,chipTextColor:n=e.palette.text.primary,chipBgColor:i="#EFF1F2",chipBorderColor:o="#EFF1F2",disabled:h=false,disableAnimation:y})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",height:"18px",padding:"0px 8px",borderRadius:"30px",border:`1px solid ${o}`,backgroundColor:i,color:n,cursor:h?"not-allowed":"pointer",opacity:h?.5:1,whiteSpace:"nowrap",fontSize:"11px",minWidth:"67px",maxWidth:"none",width:"fit-content",overflow:"hidden",textOverflow:"unset",boxSizing:"border-box",...w&&{boxShadow:"white 7px 0px 8px 2px"},...y&&{transition:"none !important",animation:"none !important",transform:"none !important","& *":{transform:"none !important"}}})),L=styled(R)(()=>({gap:"4px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1})),U=styled(R)(()=>({position:"absolute",top:0,height:"100%",width:"12px",display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"})),Y=styled("img",{shouldForwardProp:e=>e!=="isVisible"})(({isVisible:e})=>({height:12,width:12,objectFit:"contain",opacity:e?1:0,transform:`translateX(${e?0:-5}px)`,pointerEvents:e?"auto":"none",transition:"opacity 100ms ease, transform 100ms ease"}));var oe=forwardRef(({id:e,className:w,children:n,copyText:i,copyTrigger:o="hover",animationDirection:h="right",animationDuration:y=200,disableAnimation:S=false,disabled:v=false,unknownText:ie,fullWidth:a=false,containerStyles:se,sx:b,onClick:g,onMouseEnter:V,onMouseLeave:E,...N},F)=>{let $=Bc(useId(),"sheet-view-chip"),{t:ne}=useTranslation(),k=useRef(null),re=useForkRef(k,F),M=useRef(),[P,c]=useState(false),[W,A]=useState(false),p=o==="always"||P,I=p&&!!i,l=h==="left",H=Math.max(0,y),T=K*1e3,ae=p?0:T;useEffect(()=>{if(o!=="press"||!P)return;let t=me=>{k.current?.contains(me.target)||c(false);};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[o,P]),useEffect(()=>()=>clearTimeout(M.current),[]);let pe=useCallback(t=>{o==="press"&&c(true),g?.(t);},[o,g]),le=useCallback(t=>{o==="hover"&&i&&c(true),V?.(t);},[o,i,V]),de=useCallback(t=>{o==="hover"&&c(false),E?.(t);},[o,E]),he=useCallback(t=>{t.stopPropagation(),i&&(A(true),db(i),clearTimeout(M.current),M.current=setTimeout(()=>A(false),J));},[i]),B=nc(r.chip,w);if(!n)return jsx(x,{...N,chipBgColor:$o.bgColor,chipBorderColor:$o.borderColor,chipTextColor:$o.textColor,ref:F,id:e??$,"data-testid":"SheetViewChip",className:nc(r.root,B),disabled:v,disableAnimation:S,onClick:g,onMouseEnter:V,onMouseLeave:E,sx:mc(b??{},t=>({borderColor:t.palette.divider,width:a?"100%":"auto"})),children:ne(ie??"unknown")});let ce=S?"none":`z-index 0ms linear ${p?0:T+H}ms`,z={zIndex:p?3:0,transition:ce};return jsxs(Q,{ref:re,id:e??$,"data-testid":"SheetViewChip",className:r.root,style:{...z,...se,...a&&{width:"100%",minWidth:0,marginLeft:0}},children:[jsx(x,{...N,"aria-hidden":true,className:B,disabled:v,sx:mc(b??{},{visibility:"hidden",pointerEvents:"none",width:a?"100%":"fit-content"}),children:jsx(L,{children:n})}),jsx("div",{style:{position:"absolute",top:0,...z,width:a?"100%":"max-content",left:l?"auto":0,right:l?0:"auto"},children:jsxs(x,{...N,className:B,isSelected:p,disabled:v,disableAnimation:S,onClick:pe,onMouseEnter:le,onMouseLeave:de,sx:mc({width:a?"100%":"auto"},b),children:[jsx("div",{style:{display:"flex",gap:"4px",...a&&{maxWidth:"100%",width:"100%"},paddingRight:I&&!l?12:0,paddingLeft:I&&l?12:0,transition:`padding ${H}ms ease ${ae}ms`},children:jsx(L,{className:r.text,"data-is-arabic":typeof n=="string"&&ac(n),children:n})}),i&&jsx(U,{className:r.copyButton,sx:l?{left:"8px"}:{right:"8px"},children:jsx(Y,{isVisible:I,src:W?ta:ra,alt:W?"copied":"copy",onClick:he})})]})})]})});oe.displayName="SheetViewChip";var ye=memo(oe);export{r as a,ye as b};
@@ -0,0 +1,2 @@
1
+ import {a as a$1}from'./chunk-OPDVYLZK.js';import {a}from'./chunk-ZGWS7XFH.js';import {aa,ba}from'./chunk-AXNWVU3K.js';import {Dc,nc}from'./chunk-RUFO5P34.js';import {forwardRef,useRef,useState,useCallback,useEffect,useMemo,memo}from'react';import S from'@mui/material/Box';import {jsxs,jsx}from'react/jsx-runtime';import {styled,alpha}from'@mui/material/styles';import et from'react-date-object';import _ from'react-date-object/calendars/arabic';import tt from'react-date-object/calendars/gregorian';import q from'react-date-object/locales/arabic_en';import at from'react-date-object/locales/gregorian_en';var n={gregorian:"gregorian",hijri:"hijri"};var d="os-shared-DateInput",i={root:`${d}-root`,card:`${d}-card`,header:`${d}-header`,label:`${d}-label`,parts:`${d}-parts`,day:`${d}-day`,month:`${d}-month`,year:`${d}-year`,switcher:`${d}-switcher`,switcherLabel:`${d}-switcherLabel`,helperText:`${d}-helperText`},De=n.gregorian,Me="Day",we="Month",Se="Year",Ce="Switch to Hijri Calendar",Ve="Switch to Gregorian Calendar",$e=4,je=8,Oe=.85,z=.55,Fe=52,Le=56,Re=1,He=3,ke=1,ve=360,Q=1900,Pe=10,Ne=["January","February","March","April","May","June","July","August","September","October","November","December"],Te=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],Ye=["Muharram","Safar","Rabi' al-Awwal","Rabi' al-Thani","Jumada al-Awwal","Jumada al-Thani","Rajab","Sha'ban","Ramadan","Shawwal","Dhul-Qa'dah","Dhul-Hijjah"],Ge=["Muh","Saf","Rab' I","Rab' II","Jum I","Jum II","Raj","Sha'","Ram","Shaw","Dhu'Q","Dhu'H"],We={day:null,month:null,year:null},Tt=256,Ie=30,ge={height:Ie,minHeight:Ie,boxSizing:"border-box"},H={MenuListProps:{sx:{gap:0}},PaperProps:{sx:{maxHeight:Tt,[`& .${a.option}`]:ge,"& .MuiMenuItem-root":ge}}};function Be(e){return jsxs("svg",{width:12,height:12,viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,...e,children:[jsx("path",{d:"M7.375 8.625H1.625C0.935 8.625 0.375 8.065 0.375 7.375V1.625C0.375 0.935 0.935 0.375 1.625 0.375H7.375C8.065 0.375 8.625 0.935 8.625 1.625V7.375C8.625 8.065 8.065 8.625 7.375 8.625Z",stroke:"currentColor",strokeWidth:"0.75"}),jsx("path",{d:"M0.375 2.375H8.625",stroke:"currentColor",strokeWidth:"0.75"}),jsx("circle",{cx:"2.375",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"4.5",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"6.625",cy:"4.375",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"2.375",cy:"6.625",r:"0.625",fill:"currentColor"}),jsx("circle",{cx:"4.5",cy:"6.625",r:"0.625",fill:"currentColor"})]})}var Ae=styled(S)({display:"flex",flexDirection:"column",width:"100%"}),Ee=styled(S,{shouldForwardProp:e=>!["$error","$feedbackType","$hasSwitcher","$hasFeedback"].includes(e)})(({theme:e,$error:t,$feedbackType:o,$hasSwitcher:l,$hasFeedback:r})=>{let m=(o?aa(e,o).borderColor:void 0)??(t?e.palette.error.main:e.v2.palette.grey[100]),I=`${$e}px`,j=r?0:l?`${je}px`:I;return {display:"flex",flexDirection:"column",width:"100%",overflow:"hidden",boxSizing:"border-box",backgroundColor:e.palette.common.white,border:`1px solid ${m}`,borderBottom:r?"none":`1px solid ${m}`,borderRadius:`${I} ${I} ${j} ${j}`,"& .MuiInputBase-root.Mui-disabled":{opacity:Oe}}}),Je=styled(S)({display:"flex",flexDirection:"column",gap:8,padding:8,boxSizing:"border-box",width:"100%"}),ze=styled(S)({display:"flex",alignItems:"center",gap:4,minHeight:10}),Qe=styled("span")(({theme:e})=>({fontSize:10,fontWeight:500,fontStyle:"normal",lineHeight:"100%",letterSpacing:0,color:e.palette.grey[700]})),Ue=styled(S)({display:"grid",gridTemplateColumns:`minmax(${Fe}px, ${Re}fr) minmax(0, ${He}fr) minmax(${Le}px, ${ke}fr)`,alignItems:"flex-start",gap:4,width:"100%",minWidth:0,[`& .${i.day}`]:{minWidth:0,width:"100%"},[`& .${i.month}`]:{minWidth:0,width:"100%"},[`& .${i.year}`]:{minWidth:0,width:"100%"}}),Ze=styled("button")(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",justifyContent:"center",width:"100%",minHeight:32,margin:0,padding:8,boxSizing:"border-box",border:"none",borderRadius:0,backgroundColor:alpha(e.palette.common.black,.05),color:e.palette.text.primary,cursor:"pointer",appearance:"none",fontFamily:"inherit",whiteSpace:"nowrap","&:hover:not(:disabled)":{backgroundColor:alpha(e.palette.common.black,.08)},"&:disabled":{cursor:"not-allowed",pointerEvents:"none"},"&:focus-visible:not(:disabled)":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:-2}})),_e=styled("span")({display:"inline-flex",flexDirection:"row",flexWrap:"nowrap",alignItems:"center",gap:4,minWidth:0,whiteSpace:"nowrap"}),qe=styled("span",{shouldForwardProp:e=>e!=="$disabled"})(({$disabled:e=false})=>({width:12,height:12,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",opacity:e?z:1,"& svg":{display:"block",width:12,height:12}})),Ke=styled("span",{shouldForwardProp:e=>e!=="$disabled"})(({$disabled:e=false})=>({display:"block",fontSize:10,fontWeight:500,fontStyle:"normal",lineHeight:"16px",letterSpacing:0,whiteSpace:"nowrap",color:"rgba(32, 35, 43, 1)",opacity:e?z:1})),Xe=styled("small",{shouldForwardProp:e=>e!=="$error"})(({theme:e,$error:t})=>({color:t?e.palette.error.main:alpha(e.palette.common.black,.6),fontSize:10,lineHeight:"10px",marginTop:4,display:"block"})),k={width:"100%"};function p(e){if(e==null||e==="")return null;let t=Number(e);return Number.isFinite(t)?t:null}function nt(e){return p(e.day)!=null&&p(e.month)!=null&&p(e.year)!=null}function rt(e){return {day:e.day,month:e.month.number,year:e.year}}function ot(e,t){let o=p(e.day),l=p(e.month),r=p(e.year);if(o==null||l==null||r==null)return null;let u=t===n.hijri,m=new et({year:r,month:l,day:1,calendar:u?_:tt,locale:u?q:at}),I=m.month.length;return m.setDay(Math.min(Math.max(o,1),I)),m}function Z(e){let t=ot(e,n.gregorian);return t?(t.convert(_,q),rt(t)):null}function Gt(e){let t=ot(e,n.hijri);return t?(t.convert(tt,at),rt(t)):null}function lt(e,t){return t!==n.hijri?e:Z(e)??{day:null,month:null,year:null}}function it(e,t){return t!==n.hijri?e:Gt(e)}function Wt(e,t){return new Date(e,t,0).getDate()}function K(e,t,o){return t==null||t<1||t>12?30:o===n.hijri?e==null?30:new et({year:e,month:t,day:1,calendar:_,locale:q}).month.length:Wt(e??2001,t)}function ut(e){let t=Math.max(1,Math.min(31,Math.floor(e)));return Array.from({length:t},(o,l)=>{let r=l+1;return {value:r,label:String(r)}})}function pt(e,t=false){return (e===n.hijri?t?Ge:Ye:t?Te:Ne).map((l,r)=>({value:r+1,label:l}))}function st(e,t){let o=Math.floor(Math.min(e,t)),l=Math.floor(Math.max(e,t)),r=[];for(let u=l;u>=o;u-=1)r.push({value:u,label:String(u)});return r}function dt(e,t){let o=Z({day:1,month:1,year:e}),l=Z({day:31,month:12,year:t});return {yearMin:p(o?.year)??e,yearMax:p(l?.year)??t}}function ct(){return new Date().getFullYear()+Pe}function mt(e,t){let o=p(e.day);if(o==null)return e;let l=K(p(e.year),p(e.month),t);return o<=l?e:{...e,day:l}}function ht(e){return e===n.hijri?n.gregorian:n.hijri}function ft(e){return e==null?null:Array.isArray(e)?e[0]??null:e}function zt(e,t){if(e){if(typeof e=="function"){e(t);return}e.current=t;}}var bt=forwardRef(function({label:t,value:o,onChange:l,dayOptions:r,monthOptions:u,yearOptions:m,hasAbbreviatedMonths:I=false,dayLabel:j=Me,monthLabel:yt=we,yearLabel:It=Se,hasCalendarSwitcher:ee=false,calendarMode:te,onCalendarModeChange:ae,switcherLabel:gt,yearMin:P=Q,yearMax:Dt,disabled:x=false,error:Mt=false,helperText:ne,feedback:N,id:w="DateInput",className:wt,sx:St,dateInputClassNames:y},re){let oe=useRef(null),[Ct,Vt]=useState(false),T=o!==void 0,[$t,jt]=useState(We),Y=T?o:$t,G=te!==void 0,[Ot,Ft]=useState(De),O=G?te:Ot,[le,W]=useState(null),Lt=!!(r||u||m),g=O===n.hijri&&!Lt,ie=I||Ct,F=useCallback(a=>{let h=a<ve;Vt(f=>f===h?f:h);},[]),Rt=useCallback(a=>{oe.current=a,zt(re,a),a&&!u&&F(a.getBoundingClientRect().width);},[u,re,F]);useEffect(()=>{let a=oe.current;if(!a||u)return;let h=()=>F(a.getBoundingClientRect().width);if(h(),typeof ResizeObserver>"u")return;let f=new ResizeObserver(h);return f.observe(a),()=>f.disconnect()},[u,F]);let{isProvided:ue,isVisible:pe,type:Ht}=Dc(N),se=!!Mt&&!ue,de=t?.trim()??"",ce=gt??(O===n.hijri?Ve:Ce),D=useMemo(()=>{if(!g)return Y;let a=lt(Y,n.hijri);return nt(a)?a:le??a},[le,g,Y]),B=Dt??ct(),L=useMemo(()=>g?dt(P,B):{yearMin:P,yearMax:B},[g,B,P]),A=g?n.hijri:n.gregorian,me=K(p(D.year),p(D.month),A),kt=useMemo(()=>r??ut(me),[me,r]),vt=useMemo(()=>u??pt(A,ie),[A,u,ie]),Pt=useMemo(()=>m??st(L.yearMin,L.yearMax),[L.yearMax,L.yearMin,m]),E=useCallback(a=>{let h=r?a:mt(a,n.gregorian);T||jt(h),l?.(h);},[r,T,l]),J=useCallback(a=>h=>{let f={...D,[a]:ft(h)};if(!g){E(f);return}let he=it(f,n.hijri);if(he){W(null),E(he);return}W(f);},[E,D,g]),Nt=useCallback(()=>{if(x)return;let a=ht(O);W(null),G||Ft(a),ae?.(a);},[O,x,G,ae]);return jsxs(Ae,{ref:Rt,id:w,"data-testid":"DateInput",className:nc(i.root,y?.root,wt),sx:St,children:[jsxs(Ee,{className:nc(i.card,y?.card),$error:se,$feedbackType:pe?Ht:void 0,$hasSwitcher:ee,$hasFeedback:pe,children:[jsxs(Je,{children:[de?jsx(ze,{className:nc(i.header,y?.header),children:jsx(Qe,{className:nc(i.label,y?.label),children:de})}):null,jsxs(Ue,{className:nc(i.parts,y?.parts),children:[jsx(S,{className:i.day,children:jsx(a$1,{id:`${w}-day`,label:j,options:kt,value:D.day,onChange:J("day"),disabled:x,MenuProps:H,sx:k})}),jsx(S,{className:i.month,children:jsx(a$1,{id:`${w}-month`,label:yt,options:vt,value:D.month,onChange:J("month"),disabled:x,MenuProps:H,sx:k})}),jsx(S,{className:i.year,children:jsx(a$1,{id:`${w}-year`,label:It,options:Pt,value:D.year,onChange:J("year"),disabled:x,MenuProps:H,sx:k})})]})]}),ee?jsx(Ze,{type:"button",id:`${w}-switcher`,className:nc(i.switcher,y?.switcher),onClick:Nt,disabled:x,"aria-label":ce,children:jsxs(_e,{children:[jsx(qe,{$disabled:x,children:jsx(Be,{"aria-hidden":true})}),jsx(Ke,{className:nc(i.switcherLabel,y?.switcherLabel),$disabled:x,children:ce})]})}):null]}),N?jsx(ba,{...N}):null,!ue&&ne?jsx(Xe,{className:nc(i.helperText,y?.helperText),$error:se,children:ne}):null]})});bt.displayName="DateInput";var xt=memo(bt);
2
+ export{n as a,i as b,xt as c};
@@ -1 +1 @@
1
- import {zc}from'./chunk-I3LSSBRI.js';import {useId,useState,useRef,useCallback,useMemo,useEffect,useLayoutEffect}from'react';import {motion,AnimatePresence,useMotionValue,animate}from'framer-motion';import zt from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var x=3,ft=styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:0,minWidth:0,height:"auto",lineHeight:1,position:"relative",zIndex:1001,fontSize:"12px",color:t.palette.text.primary})),ht=styled(motion.div)(()=>({display:"inline-flex"})),ut=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),gt=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),tt=styled(motion.div)(({side:t})=>({position:"absolute",display:"flex",alignItems:"center",...t==="left"?{right:"100%",flexDirection:"row-reverse",transformOrigin:"right center"}:{},...t==="right"?{left:"100%",flexDirection:"row",transformOrigin:"left center"}:{},top:"50%",transform:"translateY(-50%)",gap:0,pointerEvents:"auto",overflow:"visible"})),et=styled("div")(({side:t})=>({position:"absolute",top:0,bottom:0,...t==="left"?{right:"100%"}:{left:"100%"},pointerEvents:"auto",background:"transparent"})),xt=styled(motion.div)(()=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:24,overflow:"visible"})),j=t=>({border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,paddingInline:"8px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,fontSize:12,boxSizing:"border-box",whiteSpace:"nowrap",overflow:"visible"}),mt=styled(motion.div)(({theme:t})=>({...j(t),position:"relative",zIndex:2,minWidth:24,flex:"0 0 auto",display:"inline-flex",overflow:"hidden",willChange:"transform"})),Ct=styled(motion.span)(()=>({display:"inline-flex",alignItems:"center",transform:"translateZ(0)"})),nt=styled(motion.span)(({theme:t})=>({display:"inline-flex",whiteSpace:"nowrap",overflow:"hidden",boxSizing:"border-box",willChange:"width",border:`1px solid ${t.palette.divider}`,backgroundColor:t.palette.background.paper,height:"24px",alignItems:"center",paddingInline:"0px"})),it=styled(motion.span)(()=>({display:"inline-flex",whiteSpace:"nowrap",alignItems:"center",height:"100%"})),yt=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",left:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),Et=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",right:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),rt=styled(motion.div)(({theme:t})=>({...j(t),minWidth:24,flex:"0 0 auto",display:"inline-flex"})),vt=styled(zt)(()=>({position:"relative",overflow:"visible",zIndex:101,display:"flex",alignItems:"center",justifyContent:"center",minHeight:"20px"}));var L=24;function Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}){let[l,P]=useState(false),[r,q]=useState({left:0,right:0}),[c,G]=useState([]),[d,X]=useState([]),[f,J]=useState(0),[b,Y]=useState(0),m=useRef(null),k=useRef(null),z=useRef(null),M=useRef(null),A=useRef([]),O=useRef([]),T=useRef(null),$=useRef(null),I=useRef(null),w=useCallback((e,i)=>{if(e===i)return true;if(e.length!==i.length)return false;for(let a=0;a<e.length;a++)if(e[a]!==i[a])return false;return true},[]),D=useCallback((e,i)=>e.left===i.left&&e.right===i.right,[]),g=useMotionValue(0),n=useMotionValue(0),N=useMotionValue(0),C=useMemo(()=>{if(!c.length)return [];let e=[],i=x+c[0]/2;e.push(i);for(let a=1;a<c.length;a++)i+=c[a-1]/2+x+c[a]/2,e.push(i);return e},[c]),y=useMemo(()=>{if(!d.length)return [];let e=[],i=x+d[0]/2;e.push(i);for(let a=1;a<d.length;a++)i+=d[a-1]/2+x+d[a]/2,e.push(i);return e},[d]),Lt=l&&h?f:0,K=l&&u?b:0,at=h?f:0,Wt=useCallback(()=>{m.current&&clearTimeout(m.current),P(true);},[]),St=useCallback(()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(false),120);},[]),_=useCallback(()=>{let e=k.current,i=M.current,a=z.current,Q=r;if(e){let R=e.getBoundingClientRect(),Z=(i??a)?.getBoundingClientRect();if(Z){let Pt=Math.round(Z.left-R.left),kt=Math.round(Z.right-R.left);Q={left:Pt,right:kt};}}let st=A.current.map(R=>R?R.offsetWidth:L),lt=O.current.map(R=>R?R.offsetWidth:L),pt=T.current?.scrollWidth??0,ct=$.current?.scrollWidth??0;D(r,Q)||q(Q),w(c,st)||G(st),w(d,lt)||X(lt),f!==pt&&J(pt),b!==ct&&Y(ct);},[r,c,d,f,b,D,w]),B=useCallback(()=>{I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>{_();});},[_]);useEffect(()=>()=>{m.current&&clearTimeout(m.current);},[]),useLayoutEffect(()=>{_();},[H,t,v,h,u,_]),useEffect(()=>(B(),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B),I.current&&cancelAnimationFrame(I.current);}),[B]),useEffect(()=>{let i=animate(g,l&&h?f:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,h,f,g]),useEffect(()=>{let i=animate(n,l&&u?b:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,u,b,n]);let wt=useMemo(()=>{if(!C.length)return 0;let e=C.length-1,i=c[e]??L;return C[e]+i/2+K+x},[C,c,K]),Ht=useMemo(()=>{if(!y.length)return 0;let e=y.length-1,i=d[e]??L;return at+y[e]+i/2+x},[y,d,at]);return {isHovering:l,handleMouseEnter:Wt,handleMouseLeave:St,centerWrapRef:k,centerContentRef:z,centerChipRef:M,anchors:r,leftChipRefs:A,rightChipRefs:O,leftOffsets:C,rightOffsets:y,expandableRightInnerRef:T,expandableLeftInnerRef:$,expandableRightWidth:f,expandableLeftWidth:b,expandedRightMV:g,expandedLeftMV:n,shiftX:N,rightShift:Lt,leftShift:K,leftHoverWidth:wt,rightHoverWidth:Ht}}function Ot({leftIcons:t=[],rightIcons:v=[],centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u,expandedZIndex:l=1e3,...P}){let{isHovering:r,handleMouseEnter:q,handleMouseLeave:c,centerWrapRef:G,centerContentRef:d,centerChipRef:X,anchors:f,leftChipRefs:J,rightChipRefs:b,leftOffsets:Y,rightOffsets:m,expandableRightInnerRef:k,expandableLeftInnerRef:z,expandedRightMV:M,expandedLeftMV:A,shiftX:O,rightShift:T,leftShift:$,leftHoverWidth:I,rightHoverWidth:w}=Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}),D=zc(useId(),"right-left-expanding-center-chip");return jsx(vt,{...P,id:D,"data-testid":"RightLeftExpandingCenterChipBox",children:jsx(ht,{"data-testid":"CenterShiftWrapper",initial:false,style:{x:O},children:jsxs(ft,{"data-testid":"CenterIconWrapper",ref:G,onMouseLeave:c,children:[jsxs(xt,{"data-testid":"PeekContainer",children:[jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(yt,{"data-testid":"LeftPeekChip",initial:{opacity:0,scale:.95,x:-4},animate:r?{opacity:0,scale:.9,x:-6}:{opacity:1,scale:1,x:-5},exit:{opacity:0,scale:.95,x:-4},transition:{duration:.18,ease:"easeOut"}},"left-peek")}),jsx(mt,{"data-testid":"CenterChip",ref:X,onMouseEnter:q,style:{borderRadius:(()=>{let g=u&&r,n=h&&r;return g&&n?"0":g?"0 12px 12px 0":n?"12px 0 0 12px":"12px"})(),borderLeft:u&&r?"none":void 0,borderRight:h&&r?"none":void 0},children:jsx(Ct,{"data-testid":"CenterContent",ref:d,children:H})}),u&&jsx(nt,{"data-testid":"ExpandableLeftContainer",style:{width:A,position:"absolute",right:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"12px 0 0 12px",borderRight:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableLeftInner",ref:z,children:u})}),h&&jsx(nt,{"data-testid":"ExpandableRightContainer",style:{width:M,position:"absolute",left:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"0 12px 12px 0",borderLeft:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableRightInner",ref:k,children:h})}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(Et,{"data-testid":"RightPeekChip",initial:{opacity:0,scale:.95,x:4},animate:r?{opacity:0,scale:.9,x:6}:{opacity:1,scale:1,x:5},exit:{opacity:0,scale:.95,x:4},transition:{duration:.18,ease:"easeOut"}},"right-peek")})]}),r&&t.length>0&&jsx(et,{"data-testid":"LeftHoverBridge",side:"left",style:{width:I,right:`calc(100% - ${f.left}px)`,zIndex:l,pointerEvents:"auto"}}),r&&v.length>0&&jsx(et,{"data-testid":"RightHoverBridge",side:"right",style:{width:w,left:`${f.right}px`,zIndex:l,pointerEvents:"auto"}}),jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(tt,{"data-testid":"LeftExpandedSection",side:"left",style:{right:`calc(100% - ${f.left}px)`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:t.map((g,n)=>{let C=(Y[n]??(L+x)*(n+1))+$;return jsx(ut,{"data-testid":`LeftExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:-C}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(t.length-n)},children:jsx(rt,{"data-testid":`LeftExpandChip-${n}`,ref:y=>J.current[n]=y,children:g})},`left-${n}`)})},"left-expanded")}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(tt,{"data-testid":"RightExpandedSection",side:"right",style:{left:`${f.right}px`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:v.map((g,n)=>{let N=m[n]??(L+x)*(n+1),C=T;return jsx(gt,{"data-testid":`RightExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:C+N}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(v.length-n)},children:jsx(rt,{"data-testid":`RightExpandChip-${n}`,ref:y=>b.current[n]=y,children:g})},`right-${n}`)})},"right-expanded")})]})})})}var Tt=Ot;export{Tt as a};
1
+ import {Bc}from'./chunk-RUFO5P34.js';import {useId,useState,useRef,useCallback,useMemo,useEffect,useLayoutEffect}from'react';import {motion,AnimatePresence,useMotionValue,animate}from'framer-motion';import zt from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var x=3,ft=styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:0,minWidth:0,height:"auto",lineHeight:1,position:"relative",zIndex:1001,fontSize:"12px",color:t.palette.text.primary})),ht=styled(motion.div)(()=>({display:"inline-flex"})),ut=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),gt=styled(motion.span)(({theme:t})=>({position:"static",display:"inline-flex",alignItems:"center",justifyContent:"center",width:0,overflow:"visible",margin:0,padding:0,fontSize:"10px",lineHeight:1,color:t.palette.text.secondary,userSelect:"none"})),tt=styled(motion.div)(({side:t})=>({position:"absolute",display:"flex",alignItems:"center",...t==="left"?{right:"100%",flexDirection:"row-reverse",transformOrigin:"right center"}:{},...t==="right"?{left:"100%",flexDirection:"row",transformOrigin:"left center"}:{},top:"50%",transform:"translateY(-50%)",gap:0,pointerEvents:"auto",overflow:"visible"})),et=styled("div")(({side:t})=>({position:"absolute",top:0,bottom:0,...t==="left"?{right:"100%"}:{left:"100%"},pointerEvents:"auto",background:"transparent"})),xt=styled(motion.div)(()=>({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",height:24,overflow:"visible"})),j=t=>({border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,paddingInline:"8px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",lineHeight:1,fontSize:12,boxSizing:"border-box",whiteSpace:"nowrap",overflow:"visible"}),mt=styled(motion.div)(({theme:t})=>({...j(t),position:"relative",zIndex:2,minWidth:24,flex:"0 0 auto",display:"inline-flex",overflow:"hidden",willChange:"transform"})),Ct=styled(motion.span)(()=>({display:"inline-flex",alignItems:"center",transform:"translateZ(0)"})),nt=styled(motion.span)(({theme:t})=>({display:"inline-flex",whiteSpace:"nowrap",overflow:"hidden",boxSizing:"border-box",willChange:"width",border:`1px solid ${t.palette.divider}`,backgroundColor:t.palette.background.paper,height:"24px",alignItems:"center",paddingInline:"0px"})),it=styled(motion.span)(()=>({display:"inline-flex",whiteSpace:"nowrap",alignItems:"center",height:"100%"})),yt=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",left:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),Et=styled(motion.div)(({theme:t})=>({...j(t),position:"absolute",right:0,zIndex:1,pointerEvents:"none",minWidth:24,paddingInline:0})),rt=styled(motion.div)(({theme:t})=>({...j(t),minWidth:24,flex:"0 0 auto",display:"inline-flex"})),vt=styled(zt)(()=>({position:"relative",overflow:"visible",zIndex:101,display:"flex",alignItems:"center",justifyContent:"center",minHeight:"20px"}));var L=24;function Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}){let[l,P]=useState(false),[r,q]=useState({left:0,right:0}),[c,G]=useState([]),[d,X]=useState([]),[f,J]=useState(0),[b,Y]=useState(0),m=useRef(null),k=useRef(null),z=useRef(null),M=useRef(null),A=useRef([]),O=useRef([]),T=useRef(null),$=useRef(null),I=useRef(null),w=useCallback((e,i)=>{if(e===i)return true;if(e.length!==i.length)return false;for(let a=0;a<e.length;a++)if(e[a]!==i[a])return false;return true},[]),D=useCallback((e,i)=>e.left===i.left&&e.right===i.right,[]),g=useMotionValue(0),n=useMotionValue(0),N=useMotionValue(0),C=useMemo(()=>{if(!c.length)return [];let e=[],i=x+c[0]/2;e.push(i);for(let a=1;a<c.length;a++)i+=c[a-1]/2+x+c[a]/2,e.push(i);return e},[c]),y=useMemo(()=>{if(!d.length)return [];let e=[],i=x+d[0]/2;e.push(i);for(let a=1;a<d.length;a++)i+=d[a-1]/2+x+d[a]/2,e.push(i);return e},[d]),Lt=l&&h?f:0,K=l&&u?b:0,at=h?f:0,Wt=useCallback(()=>{m.current&&clearTimeout(m.current),P(true);},[]),St=useCallback(()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>P(false),120);},[]),_=useCallback(()=>{let e=k.current,i=M.current,a=z.current,Q=r;if(e){let R=e.getBoundingClientRect(),Z=(i??a)?.getBoundingClientRect();if(Z){let Pt=Math.round(Z.left-R.left),kt=Math.round(Z.right-R.left);Q={left:Pt,right:kt};}}let st=A.current.map(R=>R?R.offsetWidth:L),lt=O.current.map(R=>R?R.offsetWidth:L),pt=T.current?.scrollWidth??0,ct=$.current?.scrollWidth??0;D(r,Q)||q(Q),w(c,st)||G(st),w(d,lt)||X(lt),f!==pt&&J(pt),b!==ct&&Y(ct);},[r,c,d,f,b,D,w]),B=useCallback(()=>{I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>{_();});},[_]);useEffect(()=>()=>{m.current&&clearTimeout(m.current);},[]),useLayoutEffect(()=>{_();},[H,t,v,h,u,_]),useEffect(()=>(B(),window.addEventListener("resize",B),()=>{window.removeEventListener("resize",B),I.current&&cancelAnimationFrame(I.current);}),[B]),useEffect(()=>{let i=animate(g,l&&h?f:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,h,f,g]),useEffect(()=>{let i=animate(n,l&&u?b:0,{duration:.2,ease:"easeOut"});return ()=>i.stop()},[l,u,b,n]);let wt=useMemo(()=>{if(!C.length)return 0;let e=C.length-1,i=c[e]??L;return C[e]+i/2+K+x},[C,c,K]),Ht=useMemo(()=>{if(!y.length)return 0;let e=y.length-1,i=d[e]??L;return at+y[e]+i/2+x},[y,d,at]);return {isHovering:l,handleMouseEnter:Wt,handleMouseLeave:St,centerWrapRef:k,centerContentRef:z,centerChipRef:M,anchors:r,leftChipRefs:A,rightChipRefs:O,leftOffsets:C,rightOffsets:y,expandableRightInnerRef:T,expandableLeftInnerRef:$,expandableRightWidth:f,expandableLeftWidth:b,expandedRightMV:g,expandedLeftMV:n,shiftX:N,rightShift:Lt,leftShift:K,leftHoverWidth:wt,rightHoverWidth:Ht}}function Ot({leftIcons:t=[],rightIcons:v=[],centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u,expandedZIndex:l=1e3,...P}){let{isHovering:r,handleMouseEnter:q,handleMouseLeave:c,centerWrapRef:G,centerContentRef:d,centerChipRef:X,anchors:f,leftChipRefs:J,rightChipRefs:b,leftOffsets:Y,rightOffsets:m,expandableRightInnerRef:k,expandableLeftInnerRef:z,expandedRightMV:M,expandedLeftMV:A,shiftX:O,rightShift:T,leftShift:$,leftHoverWidth:I,rightHoverWidth:w}=Rt({leftIcons:t,rightIcons:v,centerIcon:H,expandableCenterRight:h,expandableCenterLeft:u}),D=Bc(useId(),"right-left-expanding-center-chip");return jsx(vt,{...P,id:D,"data-testid":"RightLeftExpandingCenterChipBox",children:jsx(ht,{"data-testid":"CenterShiftWrapper",initial:false,style:{x:O},children:jsxs(ft,{"data-testid":"CenterIconWrapper",ref:G,onMouseLeave:c,children:[jsxs(xt,{"data-testid":"PeekContainer",children:[jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(yt,{"data-testid":"LeftPeekChip",initial:{opacity:0,scale:.95,x:-4},animate:r?{opacity:0,scale:.9,x:-6}:{opacity:1,scale:1,x:-5},exit:{opacity:0,scale:.95,x:-4},transition:{duration:.18,ease:"easeOut"}},"left-peek")}),jsx(mt,{"data-testid":"CenterChip",ref:X,onMouseEnter:q,style:{borderRadius:(()=>{let g=u&&r,n=h&&r;return g&&n?"0":g?"0 12px 12px 0":n?"12px 0 0 12px":"12px"})(),borderLeft:u&&r?"none":void 0,borderRight:h&&r?"none":void 0},children:jsx(Ct,{"data-testid":"CenterContent",ref:d,children:H})}),u&&jsx(nt,{"data-testid":"ExpandableLeftContainer",style:{width:A,position:"absolute",right:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"12px 0 0 12px",borderRight:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableLeftInner",ref:z,children:u})}),h&&jsx(nt,{"data-testid":"ExpandableRightContainer",style:{width:M,position:"absolute",left:"100%",top:0,height:"24px",zIndex:1,opacity:r?1:0,pointerEvents:r?"auto":"none",borderRadius:"0 12px 12px 0",borderLeft:"none"},initial:false,transition:{duration:.2,ease:"easeOut"},children:jsx(it,{"data-testid":"ExpandableRightInner",ref:k,children:h})}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(Et,{"data-testid":"RightPeekChip",initial:{opacity:0,scale:.95,x:4},animate:r?{opacity:0,scale:.9,x:6}:{opacity:1,scale:1,x:5},exit:{opacity:0,scale:.95,x:4},transition:{duration:.18,ease:"easeOut"}},"right-peek")})]}),r&&t.length>0&&jsx(et,{"data-testid":"LeftHoverBridge",side:"left",style:{width:I,right:`calc(100% - ${f.left}px)`,zIndex:l,pointerEvents:"auto"}}),r&&v.length>0&&jsx(et,{"data-testid":"RightHoverBridge",side:"right",style:{width:w,left:`${f.right}px`,zIndex:l,pointerEvents:"auto"}}),jsx(AnimatePresence,{initial:false,children:t.length>0&&jsx(tt,{"data-testid":"LeftExpandedSection",side:"left",style:{right:`calc(100% - ${f.left}px)`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:t.map((g,n)=>{let C=(Y[n]??(L+x)*(n+1))+$;return jsx(ut,{"data-testid":`LeftExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:-C}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(t.length-n)},children:jsx(rt,{"data-testid":`LeftExpandChip-${n}`,ref:y=>J.current[n]=y,children:g})},`left-${n}`)})},"left-expanded")}),jsx(AnimatePresence,{initial:false,children:v.length>0&&jsx(tt,{"data-testid":"RightExpandedSection",side:"right",style:{left:`${f.right}px`,top:"50%",position:"absolute",pointerEvents:r?"auto":"none",zIndex:l},initial:{opacity:0,x:0,y:"-50%"},animate:r?{opacity:1,x:0,y:"-50%"}:{opacity:0,x:0,y:"-50%"},exit:{opacity:0,x:0,y:"-50%"},transition:{duration:.25,ease:"easeOut"},children:v.map((g,n)=>{let N=m[n]??(L+x)*(n+1),C=T;return jsx(gt,{"data-testid":`RightExpandIcon-${n}`,initial:{opacity:0,x:0},animate:r?{opacity:1,x:C+N}:{opacity:0,x:0},exit:{opacity:0,x:0},transition:{duration:.25+n*.04,ease:"easeOut"},style:{zIndex:l+(v.length-n)},children:jsx(rt,{"data-testid":`RightExpandChip-${n}`,ref:y=>b.current[n]=y,children:g})},`right-${n}`)})},"right-expanded")})]})})})}var Tt=Ot;export{Tt as a};
@@ -1 +1 @@
1
- import {v}from'./chunk-K43ZLU4I.js';import {zc,Ba,Ca}from'./chunk-I3LSSBRI.js';import {Gb,Xc}from'./chunk-IQAHULGQ.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:Xc})]}),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=zc(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:Gb,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};
1
+ import {v}from'./chunk-AXNWVU3K.js';import {Bc,Da,Ea}from'./chunk-RUFO5P34.js';import {Gb,Xc}from'./chunk-IQAHULGQ.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:Xc})]}),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}=Da(o).value;return {...y,a:p}}),{t:c}=useTranslation(),u=useCallback(()=>{let{alpha:p,...y}=Da(o).value;d({...y,a:p}),s();},[o,s]),t=useCallback(()=>{let{a:p,...y}=i;n(Ea({...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=Bc(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:Gb,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};
@@ -1,2 +1,2 @@
1
- import {lc}from'./chunk-I3LSSBRI.js';import {forwardRef,memo}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled}from'@mui/material/styles';var o="os-shared-MaskedText",t={root:`${o}-root`,start:`${o}-start`,mask:`${o}-mask`,end:`${o}-end`};var p=()=>jsxs("svg",{width:"16",height:"8",viewBox:"0 0 16 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,children:[jsx("circle",{cx:"3",cy:"4",r:"1.5",fill:"currentColor"}),jsx("circle",{cx:"8",cy:"4",r:"1.5",fill:"currentColor"}),jsx("circle",{cx:"13",cy:"4",r:"1.5",fill:"currentColor"})]});var k=styled("span")(({theme:e})=>({display:"inline-flex",alignItems:"center",gap:e.v2.spacing(2),minWidth:0,color:"inherit",font:"inherit",lineHeight:1,whiteSpace:"nowrap"})),m=styled("span")({minWidth:0}),c=styled("span")({display:"inline-flex",alignItems:"center",flexShrink:0,lineHeight:0,"& svg":{display:"block",width:16,height:8}});function M(e,d,n){let s=Math.max(0,d),a=Math.max(0,n);return !e||s+a>=e.length?{start:e,end:"",isMasked:false}:{start:e.slice(0,s),end:e.slice(e.length-a),isMasked:true}}var T=forwardRef(({className:e,sx:d,text:n,startLength:s=8,endLength:a=4,separator:y,id:h,...g},S)=>{let{start:C,end:N,isMasked:u}=M(n,s,a);return jsxs(k,{ref:S,id:h??"MaskedText",className:lc(t.root,e),sx:d,"data-testid":"MaskedText",...g,children:[jsx(m,{className:t.start,children:C}),u&&jsxs(Fragment,{children:[jsx(c,{className:t.mask,children:y??jsx(p,{})}),jsx(m,{className:t.end,children:N})]})]})});T.displayName="MaskedText";var P=memo(T);
1
+ import {nc}from'./chunk-RUFO5P34.js';import {forwardRef,memo}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {styled}from'@mui/material/styles';var o="os-shared-MaskedText",t={root:`${o}-root`,start:`${o}-start`,mask:`${o}-mask`,end:`${o}-end`};var p=()=>jsxs("svg",{width:"16",height:"8",viewBox:"0 0 16 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":true,children:[jsx("circle",{cx:"3",cy:"4",r:"1.5",fill:"currentColor"}),jsx("circle",{cx:"8",cy:"4",r:"1.5",fill:"currentColor"}),jsx("circle",{cx:"13",cy:"4",r:"1.5",fill:"currentColor"})]});var k=styled("span")(({theme:e})=>({display:"inline-flex",alignItems:"center",gap:e.v2.spacing(2),minWidth:0,color:"inherit",font:"inherit",lineHeight:1,whiteSpace:"nowrap"})),m=styled("span")({minWidth:0}),c=styled("span")({display:"inline-flex",alignItems:"center",flexShrink:0,lineHeight:0,"& svg":{display:"block",width:16,height:8}});function M(e,d,n){let s=Math.max(0,d),a=Math.max(0,n);return !e||s+a>=e.length?{start:e,end:"",isMasked:false}:{start:e.slice(0,s),end:e.slice(e.length-a),isMasked:true}}var T=forwardRef(({className:e,sx:d,text:n,startLength:s=8,endLength:a=4,separator:y,id:h,...g},S)=>{let{start:C,end:N,isMasked:u}=M(n,s,a);return jsxs(k,{ref:S,id:h??"MaskedText",className:nc(t.root,e),sx:d,"data-testid":"MaskedText",...g,children:[jsx(m,{className:t.start,children:C}),u&&jsxs(Fragment,{children:[jsx(c,{className:t.mask,children:y??jsx(p,{})}),jsx(m,{className:t.end,children:N})]})]})});T.displayName="MaskedText";var P=memo(T);
2
2
  export{t as a,P as b};
@@ -1 +1 @@
1
- import {j}from'./chunk-K43ZLU4I.js';import {styled,Box,Button}from'@mui/material';var d=styled(j)(({theme:o})=>{let{grey:r}=o.v2.palette;return {fontWeight:o.v2.typography.fontWeightMedium,fontSize:"0.6875rem",color:r[500],paddingInlineStart:o.v2.spacing(16),paddingTop:o.v2.spacing(8),paddingBottom:o.v2.spacing(8),paddingInlineEnd:o.v2.spacing(8),borderBottom:`1px solid ${r[100]}`}}),l=styled(Box)(({theme:o})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center",position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999,borderTop:`1px solid ${o.palette.divider}`})),c=styled(Button)(({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}})),s=styled(Button)(({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"}}));export{d as a,l as b,c,s as d};
1
+ import {j}from'./chunk-AXNWVU3K.js';import {styled,Box,Button}from'@mui/material';var d=styled(j)(({theme:o})=>{let{grey:r}=o.v2.palette;return {fontWeight:o.v2.typography.fontWeightMedium,fontSize:"0.6875rem",color:r[500],paddingInlineStart:o.v2.spacing(16),paddingTop:o.v2.spacing(8),paddingBottom:o.v2.spacing(8),paddingInlineEnd:o.v2.spacing(8),borderBottom:`1px solid ${r[100]}`}}),l=styled(Box)(({theme:o})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center",position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999,borderTop:`1px solid ${o.palette.divider}`})),c=styled(Button)(({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}})),s=styled(Button)(({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"}}));export{d as a,l as b,c,s as d};
@@ -1 +1 @@
1
- import {T,S as S$1,b as b$1}from'./chunk-K43ZLU4I.js';import {forwardRef,memo,createContext,useState,useRef,useCallback,useMemo,useContext}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var x=styled(T)(({theme:o})=>({[`& .${S$1.title}`]:{fontSize:"13px",fontWeight:700,lineHeight:o.typography.h6.lineHeight,borderBottom:`1px solid ${o.palette.divider}`,margin:0,padding:"16px 16px 16px 12px",color:o.palette.text.primary}})),y=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing(2),minWidth:"256px",padding:o.spacing(2)})),p=styled(b$1)(({theme:o})=>({paddingInline:o.spacing(3),paddingBlock:o.spacing(1),borderRadius:o.spacing(.5),minWidth:64,fontSize:"11px",fontWeight:o.typography.fontWeightMedium,color:o.palette.text.primary,textTransform:"none",border:`1px solid ${o.palette.divider}`,boxShadow:"none","&:hover":{boxShadow:"none",backgroundColor:o.palette.action.hover}})),D=styled("p")(({theme:o})=>({margin:0,fontSize:o.typography.fontSize,fontWeight:o.typography.fontWeightMedium,lineHeight:o.typography.body1.lineHeight})),S=styled("div")(({theme:o})=>({display:"flex",gap:o.spacing(1),justifyContent:"flex-end"}));var b=forwardRef(({message:o,title:t,confirmText:a,cancelText:i,onConfirm:r,onCancel:s,className:m,sx:e,...n},d)=>jsx(x,{ref:d,"data-testid":"ConfirmDialog",heading:t,className:m,sx:e,...n,children:jsxs(y,{children:[jsx(D,{children:o}),jsxs(S,{children:[jsx(p,{variant:"ghost",onClick:s,children:i||"No"}),jsx(p,{variant:"ghost",onClick:r,children:a||"Yes"})]})]})}));b.displayName="ConfirmDialog";var h=memo(b);var g=createContext(null);function M(){let o=useContext(g);if(!o)throw new Error("useConfirm must be used within <ConfirmDialogProvider>");return o}var H={open:false,message:null,title:void 0,confirmText:void 0,cancelText:void 0,sx:void 0,dismissible:true};function z({children:o}){let[t,a]=useState(H),i=useRef(null),r=useCallback(e=>{let n=i.current;n&&(i.current=null,a(d=>({...d,open:false})),n(e));},[]),s=useCallback(e=>new Promise(n=>{i.current?.(false),i.current=n,a({open:true,dismissible:e.dismissible??true,message:e.message,title:e.title,confirmText:e.confirmText,cancelText:e.cancelText,sx:e.sx});}),[]),m=useMemo(()=>({confirm:s}),[s]);return jsxs(g.Provider,{value:m,children:[o,jsx(h,{open:t.open,message:t.message,title:t.title,confirmText:t.confirmText,cancelText:t.cancelText,onConfirm:()=>r(true),onCancel:()=>r(false),onClose:t.dismissible?()=>r(false):void 0,sx:t.sx})]})}var O=memo(z);export{M as a,O as b};
1
+ import {T,S as S$1,b as b$1}from'./chunk-AXNWVU3K.js';import {forwardRef,memo,createContext,useState,useRef,useCallback,useMemo,useContext}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var x=styled(T)(({theme:o})=>({[`& .${S$1.title}`]:{fontSize:"13px",fontWeight:700,lineHeight:o.typography.h6.lineHeight,borderBottom:`1px solid ${o.palette.divider}`,margin:0,padding:"16px 16px 16px 12px",color:o.palette.text.primary}})),y=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",gap:o.spacing(2),minWidth:"256px",padding:o.spacing(2)})),p=styled(b$1)(({theme:o})=>({paddingInline:o.spacing(3),paddingBlock:o.spacing(1),borderRadius:o.spacing(.5),minWidth:64,fontSize:"11px",fontWeight:o.typography.fontWeightMedium,color:o.palette.text.primary,textTransform:"none",border:`1px solid ${o.palette.divider}`,boxShadow:"none","&:hover":{boxShadow:"none",backgroundColor:o.palette.action.hover}})),D=styled("p")(({theme:o})=>({margin:0,fontSize:o.typography.fontSize,fontWeight:o.typography.fontWeightMedium,lineHeight:o.typography.body1.lineHeight})),S=styled("div")(({theme:o})=>({display:"flex",gap:o.spacing(1),justifyContent:"flex-end"}));var b=forwardRef(({message:o,title:t,confirmText:a,cancelText:i,onConfirm:r,onCancel:s,className:m,sx:e,...n},d)=>jsx(x,{ref:d,"data-testid":"ConfirmDialog",heading:t,className:m,sx:e,...n,children:jsxs(y,{children:[jsx(D,{children:o}),jsxs(S,{children:[jsx(p,{variant:"ghost",onClick:s,children:i||"No"}),jsx(p,{variant:"ghost",onClick:r,children:a||"Yes"})]})]})}));b.displayName="ConfirmDialog";var h=memo(b);var g=createContext(null);function M(){let o=useContext(g);if(!o)throw new Error("useConfirm must be used within <ConfirmDialogProvider>");return o}var H={open:false,message:null,title:void 0,confirmText:void 0,cancelText:void 0,sx:void 0,dismissible:true};function z({children:o}){let[t,a]=useState(H),i=useRef(null),r=useCallback(e=>{let n=i.current;n&&(i.current=null,a(d=>({...d,open:false})),n(e));},[]),s=useCallback(e=>new Promise(n=>{i.current?.(false),i.current=n,a({open:true,dismissible:e.dismissible??true,message:e.message,title:e.title,confirmText:e.confirmText,cancelText:e.cancelText,sx:e.sx});}),[]),m=useMemo(()=>({confirm:s}),[s]);return jsxs(g.Provider,{value:m,children:[o,jsx(h,{open:t.open,message:t.message,title:t.title,confirmText:t.confirmText,cancelText:t.cancelText,onConfirm:()=>r(true),onCancel:()=>r(false),onClose:t.dismissible?()=>r(false):void 0,sx:t.sx})]})}var O=memo(z);export{M as a,O as b};
@@ -1 +1 @@
1
- import {V,R}from'./chunk-K43ZLU4I.js';import {zc}from'./chunk-I3LSSBRI.js';import {xb}from'./chunk-IQAHULGQ.js';import {useId,useState,useRef,useMemo}from'react';import T from'@mui/material/Box';import {ClickAwayListener}from'@mui/material';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var h=styled("span")(()=>({fontSize:"11px"})),I=styled(V)(()=>({display:"flex",alignItems:"center",paddingInline:"16px",gap:"4px",borderBlock:"1px solid #F2F2F2",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),M=styled(V)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:"#F4F4F4",fontWeight:600,paddingInline:"16px",fontSize:"11px",gap:"4px"})),k=styled(V)(()=>({gap:"2px",paddingInline:"16px",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),A=styled("img")({marginLeft:"auto",width:16,height:12}),b=styled("img")({borderRadius:"2px",width:16,height:12,flexShrink:0}),w={marginTop:"8px",marginBottom:"8px",maxHeight:"190px",overflow:"auto"},P={zIndex:99999};function s({onCountriesChange:e,sx:L,selectedCountries:r,countriesOptions:i}){let B=zc(useId(),"country-filter"),[a,g]=useState(null),f=useRef(null),y=!!a,E=()=>{if(!y){g(f.current);return}d();},d=()=>{g(null);},z=t=>r?.includes(t)??false,u=t=>{e(t);},H=t=>{let o=r?.includes(t)?r?.filter(m=>m!==t):[...r??[],t];u(o),e(o);},x=useMemo(()=>r?.length===i.length,[r,i]);return jsx(ClickAwayListener,{onClickAway:d,children:jsxs(T,{ref:f,sx:L,id:B,"data-testid":"CountryFilter",children:[jsx(T,{children:jsxs(I,{onMouseEnter:t=>{t.stopPropagation(),E();},startAdornment:null,children:[jsx(h,{children:"Country"}),jsx(A,{src:xb,alt:""})]})}),jsxs(R,{open:y,anchorEl:a,sx:w,placement:"right-start",popperSx:P,children:[jsx(M,{onClick:t=>{t.stopPropagation(),x?(u([]),e([])):(u(i.map(({value:o})=>o)),e(i.map(({value:o})=>o)));},isSelected:x,children:x?"Unselect All":"Select All"}),i.map(({value:t,label:o,icon:m})=>jsxs(k,{isSelected:z(t),onClick:()=>H(t),children:[jsx(b,{src:m,alt:""}),o]},t))]})]})})}var tt=s;export{s as a,tt as b};
1
+ import {V,R}from'./chunk-AXNWVU3K.js';import {Bc}from'./chunk-RUFO5P34.js';import {xb}from'./chunk-IQAHULGQ.js';import {useId,useState,useRef,useMemo}from'react';import T from'@mui/material/Box';import {ClickAwayListener}from'@mui/material';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var h=styled("span")(()=>({fontSize:"11px"})),I=styled(V)(()=>({display:"flex",alignItems:"center",paddingInline:"16px",gap:"4px",borderBlock:"1px solid #F2F2F2",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),M=styled(V)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:"#F4F4F4",fontWeight:600,paddingInline:"16px",fontSize:"11px",gap:"4px"})),k=styled(V)(()=>({gap:"2px",paddingInline:"16px",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),A=styled("img")({marginLeft:"auto",width:16,height:12}),b=styled("img")({borderRadius:"2px",width:16,height:12,flexShrink:0}),w={marginTop:"8px",marginBottom:"8px",maxHeight:"190px",overflow:"auto"},P={zIndex:99999};function s({onCountriesChange:e,sx:L,selectedCountries:r,countriesOptions:i}){let B=Bc(useId(),"country-filter"),[a,g]=useState(null),f=useRef(null),y=!!a,E=()=>{if(!y){g(f.current);return}d();},d=()=>{g(null);},z=t=>r?.includes(t)??false,u=t=>{e(t);},H=t=>{let o=r?.includes(t)?r?.filter(m=>m!==t):[...r??[],t];u(o),e(o);},x=useMemo(()=>r?.length===i.length,[r,i]);return jsx(ClickAwayListener,{onClickAway:d,children:jsxs(T,{ref:f,sx:L,id:B,"data-testid":"CountryFilter",children:[jsx(T,{children:jsxs(I,{onMouseEnter:t=>{t.stopPropagation(),E();},startAdornment:null,children:[jsx(h,{children:"Country"}),jsx(A,{src:xb,alt:""})]})}),jsxs(R,{open:y,anchorEl:a,sx:w,placement:"right-start",popperSx:P,children:[jsx(M,{onClick:t=>{t.stopPropagation(),x?(u([]),e([])):(u(i.map(({value:o})=>o)),e(i.map(({value:o})=>o)));},isSelected:x,children:x?"Unselect All":"Select All"}),i.map(({value:t,label:o,icon:m})=>jsxs(k,{isSelected:z(t),onClick:()=>H(t),children:[jsx(b,{src:m,alt:""}),o]},t))]})]})})}var tt=s;export{s as a,tt as b};
@@ -1 +1 @@
1
- import {j}from'./chunk-K43ZLU4I.js';import {Ia,lc}from'./chunk-I3LSSBRI.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmount",e={root:`${r}-root`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var l=styled(j)(({theme:t})=>{let{fontSize:n,fontWeight:o}=t.v2.typography.textVariants.body.small.bold;return {fontSize:n,fontWeight:o,fontFamily:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"}}),u=styled("span")(({theme:t})=>({fontWeight:t.v2.typography.fontWeightRegular}));var f=forwardRef(({amount:t,currency:n,id:o,className:C,sx:A,...d},g)=>{let{integerAmount:h,decimalAmount:s}=Ia(t,n??"");return jsxs(l,{ref:g,component:"span",id:o,"data-testid":o??"CurrencyAmount",className:lc(e.root,C),sx:A,...d,children:[jsx("span",{className:e.integer,children:h}),s?jsxs(Fragment,{children:[jsx("span",{className:e.separator,children:"."}),jsx(u,{className:e.decimal,children:s})]}):null]})});f.displayName="CurrencyAmount";var S=memo(f);export{e as a,S as b};
1
+ import {j}from'./chunk-AXNWVU3K.js';import {Ka,nc}from'./chunk-RUFO5P34.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmount",e={root:`${r}-root`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var l=styled(j)(({theme:t})=>{let{fontSize:n,fontWeight:o}=t.v2.typography.textVariants.body.small.bold;return {fontSize:n,fontWeight:o,fontFamily:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"}}),u=styled("span")(({theme:t})=>({fontWeight:t.v2.typography.fontWeightRegular}));var f=forwardRef(({amount:t,currency:n,id:o,className:C,sx:A,...d},g)=>{let{integerAmount:h,decimalAmount:s}=Ka(t,n??"");return jsxs(l,{ref:g,component:"span",id:o,"data-testid":o??"CurrencyAmount",className:nc(e.root,C),sx:A,...d,children:[jsx("span",{className:e.integer,children:h}),s?jsxs(Fragment,{children:[jsx("span",{className:e.separator,children:"."}),jsx(u,{className:e.decimal,children:s})]}):null]})});f.displayName="CurrencyAmount";var S=memo(f);export{e as a,S as b};
@@ -1 +1 @@
1
- import {d,j}from'./chunk-K43ZLU4I.js';import {Xb,Ub,lc}from'./chunk-I3LSSBRI.js';import {Kj,Qe,Gb}from'./chunk-IQAHULGQ.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var p="os-shared-FileUploader",a={root:`${p}-root`,content:`${p}-content`,iconWrapper:`${p}-iconWrapper`,textWrapper:`${p}-textWrapper`,upload:`${p}-upload`,maximum:`${p}-maximum`,errorMessage:`${p}-errorMessage`,closeButton:`${p}-closeButton`};var E=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>{let{grey:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:s[50],gap:e.v2.spacing(8),cursor:o?"default":"pointer",position:"relative",'& [data-slot="input"]':{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"},...o&&{'& [data-slot="content"], & [data-slot="icon-wrapper"]':{cursor:"default",opacity:.6}}}}),V=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),v=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:e.v2.spacing(4),color:"inherit"})),G=styled("div")(({theme:e})=>{let{grey:o,base:s}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,padding:e.v2.spacing(7),backgroundColor:s.white,borderRadius:e.v2.radius(4),border:`1px solid ${o[100]}`}}),H=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",border:"none",width:16,height:16,padding:0,marginLeft:"auto"}));function J(e,o){return e||(o?`PDF, JPG or PNG files up to ${o}`:"PDF, JPG or PNG files")}var pe="Click to upload",L=forwardRef(function({options:o,files:s,onChange:$,processFiles:U,disabled:f,error:I,invalidFileTypeText:P="Invalid file type",fileTooLargePrefix:W="File is larger than",maxFileSize:F,preventDuplicates:y,label:A=pe,hintText:K,onResetError:C,className:O,sx:Q,id:w},Y){let[S,g]=useState(null),T=useCallback(t=>{if(g(null),U)return U(t);if(!y)return t.map(r=>({file:r,id:r.name}));let l=[],n=[];for(let r of t)Xb(r,s??[])?l.push(r.name):n.push({file:r,id:r.name});if(l.length>0){let r=l.length===1?"file":"files";g(`Duplicate ${r} detected: ${l.join(", ")}`);}return n},[s,y,U]),Z=useCallback(t=>{if(t.length===0){g(null);return}let l=T(t);(l.length>0||!y)&&$?.(l);},[T,y,$]),{getRootProps:_,getInputProps:ee,open:te,isDragReject:j$1,fileRejections:d$1}=useDropzone({...o,disabled:f||o?.disabled,onDrop:(t,l,n)=>{o?.onDrop?.(t,l,n),Z(t);}}),x=useMemo(()=>{if(F)return F;if(o?.maxSize)return Ub(o.maxSize,0).toUpperCase()},[F,o?.maxSize]),c=useMemo(()=>{let t=!!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-invalid-type"));return !!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-too-large"))&&x?`${W} ${x}`:t||j$1?P:S||I},[j$1,d$1,x,S,I,P,W]),oe=J(K,x),re=useCallback(t=>{t.stopPropagation(),g(null),C?.(t);},[C]);return jsxs(E,{ref:Y,id:w,"data-testid":w??"FileUploader",..._(),className:lc(a.root,O),sx:Q,$disabled:f,onClick:f?void 0:te,children:[jsx("input",{"data-slot":"input",...ee(),disabled:f}),jsxs(V,{"data-slot":"content",className:a.content,children:[jsx(G,{"data-slot":"icon-wrapper",className:a.iconWrapper,children:jsx(d,{src:c?Kj:Qe,alt:c?"Upload error":"Upload file",sx:{width:16,height:16}})}),c?jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"micro.medium",className:a.errorMessage,sx:t=>({color:t.v2.palette.error[500]}),children:c}),jsx(j,{textVariant:"caption.medium",className:a.upload,children:"Click to upload again"})]}):jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"caption.medium",className:a.upload,children:A}),jsx(j,{textVariant:"micro.medium",className:a.maximum,sx:{opacity:.7},children:oe})]})]}),c&&C&&jsx(H,{type:"button","data-slot":"close-icon-wrapper",className:a.closeButton,onClick:re,"aria-label":"Dismiss upload error",children:jsx(d,{src:Gb,alt:"Dismiss",sx:{width:10,height:10}})})]})});L.displayName="FileUploader";var X=memo(L);export{a,X as b};
1
+ import {d,j}from'./chunk-AXNWVU3K.js';import {Zb,Wb,nc}from'./chunk-RUFO5P34.js';import {Kj,Qe,Gb}from'./chunk-IQAHULGQ.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var p="os-shared-FileUploader",a={root:`${p}-root`,content:`${p}-content`,iconWrapper:`${p}-iconWrapper`,textWrapper:`${p}-textWrapper`,upload:`${p}-upload`,maximum:`${p}-maximum`,errorMessage:`${p}-errorMessage`,closeButton:`${p}-closeButton`};var E=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>{let{grey:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:s[50],gap:e.v2.spacing(8),cursor:o?"default":"pointer",position:"relative",'& [data-slot="input"]':{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"},...o&&{'& [data-slot="content"], & [data-slot="icon-wrapper"]':{cursor:"default",opacity:.6}}}}),V=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),v=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:e.v2.spacing(4),color:"inherit"})),G=styled("div")(({theme:e})=>{let{grey:o,base:s}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,padding:e.v2.spacing(7),backgroundColor:s.white,borderRadius:e.v2.radius(4),border:`1px solid ${o[100]}`}}),H=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",border:"none",width:16,height:16,padding:0,marginLeft:"auto"}));function J(e,o){return e||(o?`PDF, JPG or PNG files up to ${o}`:"PDF, JPG or PNG files")}var pe="Click to upload",L=forwardRef(function({options:o,files:s,onChange:$,processFiles:U,disabled:f,error:I,invalidFileTypeText:P="Invalid file type",fileTooLargePrefix:W="File is larger than",maxFileSize:F,preventDuplicates:y,label:A=pe,hintText:K,onResetError:C,className:O,sx:Q,id:w},Y){let[S,g]=useState(null),T=useCallback(t=>{if(g(null),U)return U(t);if(!y)return t.map(r=>({file:r,id:r.name}));let l=[],n=[];for(let r of t)Zb(r,s??[])?l.push(r.name):n.push({file:r,id:r.name});if(l.length>0){let r=l.length===1?"file":"files";g(`Duplicate ${r} detected: ${l.join(", ")}`);}return n},[s,y,U]),Z=useCallback(t=>{if(t.length===0){g(null);return}let l=T(t);(l.length>0||!y)&&$?.(l);},[T,y,$]),{getRootProps:_,getInputProps:ee,open:te,isDragReject:j$1,fileRejections:d$1}=useDropzone({...o,disabled:f||o?.disabled,onDrop:(t,l,n)=>{o?.onDrop?.(t,l,n),Z(t);}}),x=useMemo(()=>{if(F)return F;if(o?.maxSize)return Wb(o.maxSize,0).toUpperCase()},[F,o?.maxSize]),c=useMemo(()=>{let t=!!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-invalid-type"));return !!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-too-large"))&&x?`${W} ${x}`:t||j$1?P:S||I},[j$1,d$1,x,S,I,P,W]),oe=J(K,x),re=useCallback(t=>{t.stopPropagation(),g(null),C?.(t);},[C]);return jsxs(E,{ref:Y,id:w,"data-testid":w??"FileUploader",..._(),className:nc(a.root,O),sx:Q,$disabled:f,onClick:f?void 0:te,children:[jsx("input",{"data-slot":"input",...ee(),disabled:f}),jsxs(V,{"data-slot":"content",className:a.content,children:[jsx(G,{"data-slot":"icon-wrapper",className:a.iconWrapper,children:jsx(d,{src:c?Kj:Qe,alt:c?"Upload error":"Upload file",sx:{width:16,height:16}})}),c?jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"micro.medium",className:a.errorMessage,sx:t=>({color:t.v2.palette.error[500]}),children:c}),jsx(j,{textVariant:"caption.medium",className:a.upload,children:"Click to upload again"})]}):jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"caption.medium",className:a.upload,children:A}),jsx(j,{textVariant:"micro.medium",className:a.maximum,sx:{opacity:.7},children:oe})]})]}),c&&C&&jsx(H,{type:"button","data-slot":"close-icon-wrapper",className:a.closeButton,onClick:re,"aria-label":"Dismiss upload error",children:jsx(d,{src:Gb,alt:"Dismiss",sx:{width:10,height:10}})})]})});L.displayName="FileUploader";var X=memo(L);export{a,X as b};
@@ -0,0 +1 @@
1
+ import {j,a}from'./chunk-4JUVQWRF.js';import {b}from'./chunk-TZOMS57X.js';import {b as b$1}from'./chunk-HOHQMC2O.js';import {R,B as B$1,x,h}from'./chunk-AXNWVU3K.js';import {oc,pc,Bc,q}from'./chunk-RUFO5P34.js';import {Wc,Xc,Vj,Wj,Xj,fc,gc,Yj,ec}from'./chunk-IQAHULGQ.js';import {memo,forwardRef,useState,useMemo,useRef,useId,useEffect,useCallback}from'react';import S from'@mui/material/Box';import bt from'@mui/material/Popper';import It from'dayjs';import {useTranslation}from'react-i18next';import {Calendar,DateObject}from'react-multi-date-picker';import Ko from'@mui/material/ClickAwayListener';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';import he from'@mui/material/Button';import q$1 from'react-date-object';import ot from'react-date-object/calendars/arabic';import tt from'react-date-object/calendars/gregorian';import rt from'react-date-object/locales/arabic_ar';import nt from'react-date-object/locales/arabic_en';import it from'react-date-object/locales/gregorian_ar';import at from'react-date-object/locales/gregorian_en';var Ne=styled(S)(({theme:e})=>({color:e.palette.grey[700],fontSize:"9px",fontWeight:500,marginBottom:"6px"})),Ke=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,height:32,padding:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",...o&&{border:`1px solid ${e.palette.info.dark}`,background:e.palette.common.white,boxShadow:e.shadows[7]}})),_e=styled(S)(({theme:e})=>({borderRadius:"8px",background:e.palette.common.white,boxShadow:"0px 8px 36px 0px rgba(0, 0, 0, 0.15)",textAlign:"center",color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px",padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",flexDirection:"column"})),qe=styled(S)(({theme:e})=>({width:71,padding:"4px 0",cursor:"pointer","&:hover, &.active":{borderRadius:"100px",background:e.palette.info.light}}));var Xe={day:"Day",month:"Month",quarter:"Quarter",year:"Year"};function qo({sx:e,groupBy:o,isCalenderOpen:i,onUpdate:t}){let[n,p]=useState(null),m=!!n&&i,{t:s}=useTranslation(),c=()=>{p(null);},u=d=>{p(d.currentTarget);},l=d=>{t?.(d),c();};return jsx(Ko,{onClickAway:c,children:jsxs(S,{sx:e,children:[jsx(Ne,{children:s("groupedBy")}),jsxs(Ke,{onClick:u,open:m,children:[jsx("span",{children:Xe[o]}),jsx(S,{component:"img",src:Xc,alt:"arrow",sx:{...m&&{transform:"rotate(180deg)"}}})]}),jsx(R,{open:m,anchorEl:n,children:jsx(_e,{sx:{width:n?.clientWidth},children:Object.entries(Xe).map(([d,a])=>jsx(qe,{onClick:()=>{l(d);},className:o===d?"active":"",children:a},`${d}-groupedBy`))})})]})})}var Ve=memo(qo);var eo=Ve;var oo=styled(S)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"50px",paddingInline:"6px 12px",color:e.palette.text.primary,fontSize:"11px",display:"flex",gap:"8px",alignItems:"center",justifyContent:"space-between",height:32,marginTop:"8px",img:{width:16,height:16},"& > div":{display:"flex",alignItems:"center",gap:"2px"}}));function se({isHijri:e,onCalendarModeSwitch:o}){let{t:i}=useTranslation(),t=()=>{o?.(e?"gregorian":"hijri");};return jsx(S,{children:jsxs(oo,{children:[jsxs(S,{children:[jsx("img",{src:ec,alt:"hijri"}),jsx("span",{children:i("hijri")})]}),jsx(h,{checked:e,onChange:t})]})})}var no=se;var ao=styled(he)(({theme:e})=>({cursor:"pointer",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,paddingInline:"12px",height:32,width:"max-content",textTransform:"unset","&:hover":{boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark}})),po=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"8px"}));var J=({isHijri:e,isAr:o=false})=>e?o?rt:nt:o?it:at,X=e=>e?ot:tt,M=e=>e.setHour(0).setMinute(0).setSecond(0).setMillisecond(0),B=e=>e.setHour(23).setMinute(59).setSecond(59).setMillisecond(999),Z=e=>{if(!(e?.[0]instanceof Date)||!(e?.[1]instanceof Date)){let[o,i]=q();return [new q$1(o),new q$1(i)]}return [new q$1(e?.[0]),new q$1(e?.[1])]};function ce({onChange:e,isHijri:o,isAr:i=false}){let t={locale:J({isHijri:o,isAr:i}),calendar:X(o)},n=useMemo(()=>[{id:"today",value:[new DateObject(t),new DateObject(t)]},{id:"lastWeek",value:[new DateObject(t).subtract(6,"day"),new DateObject(t)]},{id:"lastMonth",value:[new DateObject(t).subtract(30,"day"),new DateObject(t)]},{id:new DateObject(t).subtract(1,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(1,"month").toFirstOfMonth(),new DateObject(t).subtract(1,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(2,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(2,"month").toFirstOfMonth(),new DateObject(t).subtract(2,"month").toLastOfMonth()]},{id:new DateObject(t).subtract(3,"month").toFirstOfMonth().format("MMMM YYYY"),value:[new DateObject(t).subtract(3,"month").toFirstOfMonth(),new DateObject(t).subtract(3,"month").toLastOfMonth()]}],[o,i]),{t:p}=useTranslation();return jsx(S,{"data-testid":"RangeCalender_QuickFilters",children:jsx(po,{children:n.map(m=>jsx(ao,{onClick:s=>{s.preventDefault(),e(m.value);},children:p(m.id)},m.id))})})}var lo=ce;var so=styled(he)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}}));var ft=["Su","Mo","Tu","We","Th","Fr","Sa"];function gt({isAr:e=false,isHijri:o,values:i,onChange:t,numberOfMonths:n=2,...p},m){let s=c=>c==="right"?e?fc:gc:e?gc:fc;return jsx(Calendar,{ref:m,numberOfMonths:n,value:i,onChange:t,calendar:X(o),locale:J({isHijri:o,isAr:e}),range:true,format:"MMM DD",monthYearSeparator:" ",renderButton:(c,u)=>jsx(so,{onClick:u,children:jsx("img",{src:s(c),alt:"arrow"})}),weekDays:e?void 0:ft,maxDate:new Date,...p})}var mo=forwardRef(gt);var co=mo;var uo=styled(S)(()=>({'[class$="-IndicatorsContainer2"]':{display:"none"},"#react-select-2-listbox":{width:300}})),V=styled(S)(({theme:e})=>({borderRadius:e.spacing(.5),border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,boxShadow:e.shadows[10],minWidth:200,width:"max-content",overflow:"auto"})),fo=styled(S,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:o})=>({width:156,fontSize:"11px",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,minHeight:32,borderRadius:"4px",padding:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"flex",alignItems:"center",gap:e.spacing(1),fontWeight:500,...o&&{borderRadius:"4px",boxShadow:e.shadows[7],border:"1px solid",borderColor:e.palette.info.dark,background:e.palette.common.white},span:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}})),L=styled(S)(({theme:e})=>({padding:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",gap:e.spacing(1),height:33,cursor:"pointer","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},"&+&":{borderTop:"1px solid",borderColor:e.palette.divider},"&.active span":{fontWeight:500},span:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}})),A=styled(S)(()=>({width:12,height:12})),F=styled(S)(({theme:e})=>({fontSize:"11px",color:e.palette.text.secondary,lineHeight:"15.03px","&.selected":{color:e.palette.info.dark}}));function ge({selectedTimezone:e,onChange:o,timezoneCountriesCodes:i,defaultCountryTimezone:t}){let[n,p]=useState(null),m=a=>{n||p(a.currentTarget);},s=()=>{n&&p(null);},c=(a,D)=>{a.stopPropagation(),o(D);},u=useMemo(()=>i?.map(a=>oc(a)),[i]),l=useMemo(()=>u?.some(a=>e?.timezone===a?.timezone),[u,e]),d=useMemo(()=>e&&l?e:t,[e,t,l]);return jsxs(L,{onMouseEnter:m,onMouseLeave:s,onClick:()=>{e&&o(d);},children:[l?jsx("img",{src:Yj,alt:"icon"}):jsx(A,{}),jsx("img",{src:Wj,alt:"entity-timezone"}),jsx(b,{countryCode:d?.countryCode}),jsx(F,{className:l?"selected":"",children:l?e?.label:t?.label}),jsx(bt,{open:!!n,anchorEl:n,placement:"right-start",sx:{zIndex:3},disablePortal:true,children:jsx(V,{sx:{maxHeight:300},children:u?.map((a,D)=>{let j=a?.timezone===e?.timezone;return jsxs(L,{onClick:te=>{c(te,a);},sx:{gap:"4px"},children:[j?jsx("img",{src:Yj,alt:"icon"}):jsx(A,{}),jsx(b,{countryCode:a?.countryCode}),jsx(F,{className:j?"selected":"",children:a?.label})]},`timezone-item-${D}`)})})})]})}function xe({onChange:e,selectedTimezone:o,browserTimezone:i}){let t=useMemo(()=>i?pc(i):void 0,[i]),n=()=>{t&&e(t);},p=t?.timezone===o?.timezone;return jsxs(L,{onClick:n,children:[p?jsx("img",{src:Yj,alt:"icon"}):jsx(A,{}),jsx("img",{src:Vj,alt:"user-timezone"}),jsx(b,{countryCode:t?.countryCode}),jsx(F,{className:p?"selected":"",children:t?.label})]})}function St({onChange:e,selectedTimezone:o,browserTimezone:i,defaultCountryTimezone:t,timezoneCountriesCodes:n}){let[p,m]=useState(null),s=!!p,c=()=>{m(null);},u=a=>{e(a),c();},l=a=>{m(a.currentTarget);},d=useMemo(()=>i===o?.timezone?Vj:o?.timezone===t.timezone?Wj:Xj,[i,t.timezone,o?.timezone]);return jsx(Ko,{onClickAway:c,children:jsxs(uo,{"data-testid":"CustomTimezone",children:[jsxs(fo,{open:s,onClick:l,children:[jsx("img",{src:d,alt:"timezone-icon"}),jsx(b,{countryCode:o?.countryCode}),jsx("span",{children:o?.label})]}),jsx(bt,{open:s,anchorEl:p,placement:"top-start",sx:{zIndex:1400},children:jsxs(V,{"data-testid":"CustomTimezone_dropdown",children:[jsx(ge,{onChange:u,selectedTimezone:o,defaultCountryTimezone:t,timezoneCountriesCodes:n}),jsx(xe,{onChange:u,selectedTimezone:o,browserTimezone:i})]})})]})})}var xo=memo(St);var bo=xo;var ho=styled(S,{shouldForwardProp:e=>e!=="$isSingleMonth"})(({theme:e,$isSingleMonth:o})=>({display:"flex",marginTop:"8px",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),color:e.palette.text.primary,fontSize:"11px",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none",...o&&{width:"100%"}},".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,...o&&{display:"block !important"}},".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"},".rmdp-day.rmdp-disabled":{color:"#ccc",cursor:"not-allowed"}})),yo=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:e.palette.text.primary,border:"1px solid",borderColor:e.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:e.palette.text.primary}})),wo=styled(he)(({theme:e})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:e.palette.info.dark,"&:hover":{background:e.palette.info.dark}})),Co=styled(S)(()=>({display:"flex",gap:8,marginLeft:"auto",flexShrink:0})),To=styled(he,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:o})=>({color:o.palette.text.primary,fontSize:"11px",fontWeight:500,padding:o.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:o.palette.divider,background:o.palette.common.white,textTransform:"none",height:32,...e&&{border:"1px solid",borderColor:o.palette.info.dark,boxShadow:o.shadows[7]}})),ko=styled(S)(({theme:e})=>({background:e.palette.common.white,display:"flex",justifyContent:"space-between",alignItems:"center",gap:10,padding:"16px",borderTop:"1px solid",borderColor:e.palette.divider,borderBottomRightRadius:"8px"})),zo=styled(S)(({theme:e})=>({padding:16,paddingInlineEnd:"23px",borderRight:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,width:"max-content",borderTopLeftRadius:"8px",borderBottomLeftRadius:"8px",display:"flex",flexDirection:"column",gap:10,justifyContent:"space-between"})),So=styled(S)(()=>({display:"flex",alignItems:"center",gap:"10px"})),vo=styled(S)(()=>({position:"relative"})),Do=styled(S)(()=>({display:"flex",flexDirection:"column",gap:"24px"}));var Mo=styled(S,{shouldForwardProp:e=>e!=="isAllDay"})(({theme:e,isAllDay:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),position:"relative",paddingInline:"5px",".label":{width:"max-content"},...!o&&{paddingRight:e.spacing(1),"&:after":{content:'""',position:"absolute",width:"1px",background:e.palette.divider,right:0,height:17}}})),Bo=styled(S)(()=>({width:235})),Eo=styled(S)(({theme:e})=>({display:"flex",gap:"4px",".rmdp-input":{width:"64px",borderRadius:"19px",border:"1px solid",borderColor:e.palette.divider,color:e.palette.text.primary,fontSize:"11px",fontWeight:500,background:"transparent",cursor:"pointer"},".rmdp-input:focus":{boxShadow:e.shadows[7],border:`1px solid ${e.palette.info.dark}`,borderRadius:"19px"},".rmdp-time-picker":{boxShadow:e.shadows[5],borderRadius:e.spacing(1),padding:e.spacing(2),minWidth:"auto !important",div:{marginTop:0,display:"block"},"> div":{width:32,height:64},".rmdp-arrow":{borderColor:`${e.palette.background.transparent[1]} !important`},".rmdp-arrow-container":{justifyContent:"center","&:hover":{backgroundColor:"transparent",boxShadow:"unset"}},input:{borderRadius:"4px",border:`1px solid ${e.palette.divider}`,padding:0,width:32,height:32,fontSize:"11px",color:e.palette.text.primary,fontWeight:500,"&:focus, &:focus-visible":{border:`1px solid ${e.palette.info.dark}`,outline:"unset"}},".dvdr":{margin:"7px 4px 0"},".rmdp-am, .rmdp-pm":{margin:0,width:32,height:32,flex:"auto",justifyContent:"center",fontSize:"11px",color:e.palette.text.primary,fontWeight:500,display:"flex",cursor:"default"},"> div:last-child":{marginInlineStart:"4px",display:"block !important"},".rmdp-down, .rmdp-up":{position:"relative",i:{display:"none"},"&:before":{content:'""',position:"absolute",top:"5px",width:"10px",height:"10px",backgroundImage:`url(${Wc})`}},".rmdp-down:before":{transform:"rotate(180deg)"}},".rmdp-container":{position:"relative","> div":{top:"unset !important",bottom:"28px",transform:"unset !important"}}})),Oo=styled(S)(({theme:e})=>({display:"flex",gap:"8px",alignItems:"center",borderRadius:"50px",border:"1px solid",borderColor:e.palette.divider,paddingInline:"5px",width:"fit-content",height:32}));function Mt({values:e,setValues:o}){let{t:i}=useTranslation(),t=new DateObject(e[0]),n=new DateObject(e[1]),[p,m]=useState(t.dayOfYear===n.dayOfYear&&t.hour===0&&t.minute===0&&n.hour===23&&n.minute===59),s=({period:l,hour:d})=>l==="PM"&&d!==12?d+12:l==="AM"&&d===12?0:d,c=({hour:l,minute:d,period:a})=>{o([t.setHour(s({hour:l,period:a})).setMinute(d).setSecond(0),n]);},u=({hour:l,minute:d,period:a})=>{o([t,n.setHour(s({hour:l,period:a})).setMinute(d).setSecond(59)]);};return jsx(Bo,{children:jsxs(Oo,{children:[jsxs(Mo,{isAllDay:p,children:[jsx("span",{className:"label",children:i("allDay")}),jsx(h,{checked:p,onChange:l=>{m(!p),l.target.checked?o([M(e[0]),B(e[1])]):o(e);}})]}),!p&&jsxs(Eo,{children:[jsx(j,{defaultTime:{hour:a(t.hour),minute:t.minute,period:t.hour>=12?"PM":"AM"},size:"small",onChange:c,enableRealTimeChange:true},`${e[0]?.toString()}-start`),jsx(j,{defaultTime:{hour:a(n.hour),minute:n.minute,period:n.hour>=12?"PM":"AM"},size:"small",onChange:u,enableRealTimeChange:true},`${e[1]?.toString()}-end`)]})]})})}var Po=Mt;var Io=Po;function At({defaultDate:e,onDateChange:o,mode:i="gregorian",onCalendarModeSwitch:t,numberOfMonths:n,noTimezone:p,noQuickFilter:m,maxDateRange:s,onCalendarGroupChange:c,groupBy:u,timezone:l,onChangeTimezone:d,browserTimezone:a,renderCalendarButton:D,mainSx:j,popperProps:te,rangeDatePickerProps:Fo,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te}){let[w,ke]=useState(Z(e)),[x$1,C]=useState(w),[ze,Se]=useState(l??null),[ve,Wo]=useState(u||"day"),[De,Me]=useState(null),y=!!De,[Be,Ee]=useState(false),{t:re}=useTranslation(),P=useRef(null),Ho=Bc(useId(),"range-calender"),ne=i==="hijri",Y=()=>{Me(null);},Oe=r=>{Me(r.currentTarget);};useEffect(()=>{if(!y){if(n===1)return;C(Z(e));}},[y]),useEffect(()=>{if(e){let r=Z(e);ke(r),C(r),P.current&&P.current.set("date",r[0]);}},[e]),useEffect(()=>{Se(l??null);},[l,y]);let Re=()=>{ke(x$1),Y();let r;x$1[0].dayOfYear===x$1[1].dayOfYear?r=[x$1[0],x$1[1]]:r=[M(x$1[0]),B(x$1[1])],o([r[0].toDate(),r[1].toDate()]),c?.(ve||"day"),d?.(ze);},jo=useCallback(()=>{let r=w[0].format("MMM D"),$=w[1]?w[1].format("MMM D"):w[0].format("MMM D");return r===$&&!p?r:`${r} - ${$}`},[w,p]),Yo=r=>{if(r.length<2||!s){C(r);return}let $=M(r[0]).toDate(),Qo=B(r[1]).toDate(),Pe=It(Qo).diff($,"day");if(Pe<=s){C(r);return}Ee(true),C([r[0],r[1].subtract(Pe-s,"d")]),setTimeout(()=>{Ee(false);},3e3);},$o=r=>{C([M(r[0]),B(r[1])]),P.current&&P.current.set("date",r[0]);},Go=r=>{r.key==="Enter"&&x$1[1]&&!Be?(r.stopPropagation(),Re()):r.key==="Escape"&&(r.stopPropagation(),Y());};return jsxs(vo,{id:Ho,"data-testid":"RangeCalender",sx:j,children:[D?D(y,Oe):jsx(To,{onClick:Oe,open:y,children:(w[0]||w[1])&&jo()}),y&&jsx(B$1,{onClick:r=>{r.stopPropagation(),Y();}}),jsx(bt,{open:y,anchorEl:De,placement:"bottom-end",...te,children:jsxs(ho,{onKeyDown:Go,$isSingleMonth:n===1,children:[!m&&jsxs(zo,{children:[jsx(lo,{onChange:$o,isHijri:ne}),jsxs(Do,{children:[u&&jsx(eo,{groupBy:ve,isCalenderOpen:y,onUpdate:r=>{Wo(r);}}),jsx(no,{isHijri:ne,onCalendarModeSwitch:t})]})]}),jsxs(S,{sx:{display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[jsx(co,{values:x$1,onChange:Yo,isHijri:ne,ref:P,numberOfMonths:n,...Fo}),jsx(x,{in:Be&&!!s,children:jsx(b$1,{severity:"error",message:re("dateRangeError",{number:s}),sx:{marginInline:"16px",marginBottom:"16px"}})}),jsxs(ko,{sx:{borderBottomLeftRadius:"8px"},children:[!p&&Ce&&a&&Te&&jsx(So,{children:jsx(bo,{onChange:Se,selectedTimezone:ze,browserTimezone:a,defaultCountryTimezone:Ce,timezoneCountriesCodes:Te},String(y))}),new DateObject(x$1[0]).dayOfYear===new DateObject(x$1[1]).dayOfYear&&jsx(Io,{values:x$1,setValues:C}),jsxs(Co,{children:[jsx(yo,{variant:"contained",onClick:Y,children:re("cancel")}),jsx(wo,{variant:"contained",onClick:Re,disabled:!x$1[1],children:re("okay")})]})]})]})]})})]})}var Ao=At;var bi=Ao;export{bi as a};
@@ -1 +1 @@
1
- import {L as L$1}from'./chunk-K43ZLU4I.js';import {lc}from'./chunk-I3LSSBRI.js';import {forwardRef,useRef,useState,useEffect,useCallback,memo}from'react';import y from'@mui/material/SvgIcon';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import E from'@mui/material/IconButton';import G from'@mui/material/InputAdornment';import {styled}from'@mui/material/styles';var o="os-shared-SearchInput",t={root:`${o}-root`,searchAdornment:`${o}-searchAdornment`,searchButton:`${o}-searchButton`,clearButton:`${o}-clearButton`,searchIcon:`${o}-searchIcon`,clearIcon:`${o}-clearIcon`};var L=n=>jsx(y,{viewBox:"0 0 12 12",sx:{width:12,height:12},...n,children:jsx("path",{d:"M7.68817 8.21429L7.6463 8.17242L7.60036 8.20978C6.88378 8.79249 5.97154 9.14299 4.97917 9.14299C2.68489 9.14299 0.815625 7.27372 0.815625 4.97943C0.815625 2.68514 2.68489 0.815869 4.97917 0.815869C7.27345 0.815869 9.14271 2.68514 9.14271 4.97943C9.14271 5.9718 8.79221 6.88405 8.2095 7.60064L8.17215 7.64657L8.21401 7.68844L11.0754 10.5499L11.0754 10.5499L11.0764 10.5508C11.1121 10.5851 11.1406 10.6261 11.1602 10.6715C11.1798 10.7169 11.1902 10.7658 11.1907 10.8153C11.1912 10.8648 11.1818 10.9139 11.1631 10.9597C11.1444 11.0055 11.1168 11.0471 11.0818 11.0821C11.0468 11.1171 11.0052 11.1447 10.9594 11.1634C10.9136 11.1821 10.8645 11.1915 10.815 11.191C10.7655 11.1905 10.7167 11.1801 10.6712 11.1605C10.6258 11.1409 10.5848 11.1124 10.5505 11.0767L10.5496 11.0757L7.68817 8.21429ZM7.43625 7.35711L7.43682 7.35789L7.44469 7.34971C8.03496 6.73571 8.39896 5.90202 8.39896 4.97943C8.39896 3.08554 6.87305 1.55962 4.97917 1.55962C3.08528 1.55962 1.55937 3.08554 1.55937 4.97943C1.55937 6.87332 3.08528 8.39924 4.97917 8.39924C5.90175 8.39924 6.73544 8.03524 7.34944 7.44496L7.35011 7.44566L7.35683 7.43652C7.37913 7.40618 7.40591 7.37941 7.43625 7.35711Z",fill:"#20232B",stroke:"white",strokeWidth:.13125})}),g=n=>jsxs(y,{viewBox:"0 0 13 13",sx:{width:13,height:13},...n,children:[jsx("rect",{width:"13",height:"13",rx:"6.5",fill:"#F2F2F2"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"#8D8D94"})]});var v=styled(G)(({theme:n})=>({display:"flex",alignItems:"center",gap:n.v2.spacing(4),flexShrink:0,paddingTop:1})),M={padding:2,borderRadius:"50%",flexShrink:0},B=styled(E)(()=>({...M,"&.Mui-disabled":{opacity:.5}})),x=styled(E)(()=>({...M}));var N=forwardRef(({clearable:n=true,onClear:P,disabled:p=false,value:a,defaultValue:d,onChange:T,endAdornment:H,id:s="SearchInput",className:k,onKeyDown:m,inputProps:A,onClick:D,...R},c)=>{let h=useRef(null),[$,C]=useState(()=>String(a??d??"").length>0),K=n&&$&&!p;useEffect(()=>{a!==void 0&&C(String(a??"").length>0);},[a]);let F=useCallback(e=>{h.current=e,typeof c=="function"?c(e):c&&(c.current=e);},[c]),Z=e=>{C(e.target.value.length>0),T?.(e);},O=e=>{e.stopPropagation(),D?.(e);},V=useCallback(e=>{e.stopPropagation(),m?.(e);},[m]),W=e=>{e.stopPropagation();let l=h.current;l&&(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(l,""),l.dispatchEvent(new Event("input",{bubbles:true})),l.focus()),C(false),P?.();},j=e=>{e.stopPropagation(),h.current?.focus();},I=e=>{e.preventDefault();},q=jsxs(Fragment,{children:[jsx(v,{position:"end",className:t.searchAdornment,children:K?jsx(x,{className:t.clearButton,id:s?`${s}-clear-button`:void 0,type:"button","aria-label":"Clear search",disabled:p,disableRipple:true,onMouseDown:I,onClick:W,children:jsx(g,{className:t.clearIcon})}):jsx(B,{className:t.searchButton,id:s?`${s}-search-button`:void 0,type:"button","aria-label":"Search",disabled:p,disableRipple:true,onMouseDown:I,onClick:j,children:jsx(L,{className:t.searchIcon})})}),H]});return jsx(L$1,{...R,ref:F,id:s,type:"text",disabled:p,value:a,defaultValue:d,onChange:Z,onKeyDown:V,onClick:O,inputProps:{autoComplete:"off",...A},endAdornment:q,className:lc(t.root,k),"data-testid":"SearchInput"})});N.displayName="SearchInput";var w=memo(N);export{t as a,w as b};
1
+ import {L as L$1}from'./chunk-AXNWVU3K.js';import {nc}from'./chunk-RUFO5P34.js';import {forwardRef,useRef,useState,useEffect,useCallback,memo}from'react';import y from'@mui/material/SvgIcon';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import E from'@mui/material/IconButton';import G from'@mui/material/InputAdornment';import {styled}from'@mui/material/styles';var o="os-shared-SearchInput",t={root:`${o}-root`,searchAdornment:`${o}-searchAdornment`,searchButton:`${o}-searchButton`,clearButton:`${o}-clearButton`,searchIcon:`${o}-searchIcon`,clearIcon:`${o}-clearIcon`};var L=n=>jsx(y,{viewBox:"0 0 12 12",sx:{width:12,height:12},...n,children:jsx("path",{d:"M7.68817 8.21429L7.6463 8.17242L7.60036 8.20978C6.88378 8.79249 5.97154 9.14299 4.97917 9.14299C2.68489 9.14299 0.815625 7.27372 0.815625 4.97943C0.815625 2.68514 2.68489 0.815869 4.97917 0.815869C7.27345 0.815869 9.14271 2.68514 9.14271 4.97943C9.14271 5.9718 8.79221 6.88405 8.2095 7.60064L8.17215 7.64657L8.21401 7.68844L11.0754 10.5499L11.0754 10.5499L11.0764 10.5508C11.1121 10.5851 11.1406 10.6261 11.1602 10.6715C11.1798 10.7169 11.1902 10.7658 11.1907 10.8153C11.1912 10.8648 11.1818 10.9139 11.1631 10.9597C11.1444 11.0055 11.1168 11.0471 11.0818 11.0821C11.0468 11.1171 11.0052 11.1447 10.9594 11.1634C10.9136 11.1821 10.8645 11.1915 10.815 11.191C10.7655 11.1905 10.7167 11.1801 10.6712 11.1605C10.6258 11.1409 10.5848 11.1124 10.5505 11.0767L10.5496 11.0757L7.68817 8.21429ZM7.43625 7.35711L7.43682 7.35789L7.44469 7.34971C8.03496 6.73571 8.39896 5.90202 8.39896 4.97943C8.39896 3.08554 6.87305 1.55962 4.97917 1.55962C3.08528 1.55962 1.55937 3.08554 1.55937 4.97943C1.55937 6.87332 3.08528 8.39924 4.97917 8.39924C5.90175 8.39924 6.73544 8.03524 7.34944 7.44496L7.35011 7.44566L7.35683 7.43652C7.37913 7.40618 7.40591 7.37941 7.43625 7.35711Z",fill:"#20232B",stroke:"white",strokeWidth:.13125})}),g=n=>jsxs(y,{viewBox:"0 0 13 13",sx:{width:13,height:13},...n,children:[jsx("rect",{width:"13",height:"13",rx:"6.5",fill:"#F2F2F2"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"#8D8D94"})]});var v=styled(G)(({theme:n})=>({display:"flex",alignItems:"center",gap:n.v2.spacing(4),flexShrink:0,paddingTop:1})),M={padding:2,borderRadius:"50%",flexShrink:0},B=styled(E)(()=>({...M,"&.Mui-disabled":{opacity:.5}})),x=styled(E)(()=>({...M}));var N=forwardRef(({clearable:n=true,onClear:P,disabled:p=false,value:a,defaultValue:d,onChange:T,endAdornment:H,id:s="SearchInput",className:k,onKeyDown:m,inputProps:A,onClick:D,...R},c)=>{let h=useRef(null),[$,C]=useState(()=>String(a??d??"").length>0),K=n&&$&&!p;useEffect(()=>{a!==void 0&&C(String(a??"").length>0);},[a]);let F=useCallback(e=>{h.current=e,typeof c=="function"?c(e):c&&(c.current=e);},[c]),Z=e=>{C(e.target.value.length>0),T?.(e);},O=e=>{e.stopPropagation(),D?.(e);},V=useCallback(e=>{e.stopPropagation(),m?.(e);},[m]),W=e=>{e.stopPropagation();let l=h.current;l&&(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(l,""),l.dispatchEvent(new Event("input",{bubbles:true})),l.focus()),C(false),P?.();},j=e=>{e.stopPropagation(),h.current?.focus();},I=e=>{e.preventDefault();},q=jsxs(Fragment,{children:[jsx(v,{position:"end",className:t.searchAdornment,children:K?jsx(x,{className:t.clearButton,id:s?`${s}-clear-button`:void 0,type:"button","aria-label":"Clear search",disabled:p,disableRipple:true,onMouseDown:I,onClick:W,children:jsx(g,{className:t.clearIcon})}):jsx(B,{className:t.searchButton,id:s?`${s}-search-button`:void 0,type:"button","aria-label":"Search",disabled:p,disableRipple:true,onMouseDown:I,onClick:j,children:jsx(L,{className:t.searchIcon})})}),H]});return jsx(L$1,{...R,ref:F,id:s,type:"text",disabled:p,value:a,defaultValue:d,onChange:Z,onKeyDown:V,onClick:O,inputProps:{autoComplete:"off",...A},endAdornment:q,className:nc(t.root,k),"data-testid":"SearchInput"})});N.displayName="SearchInput";var w=memo(N);export{t as a,w as b};
@@ -1,2 +1,2 @@
1
- import {f}from'./chunk-JWLIHVLP.js';import {z}from'./chunk-K43ZLU4I.js';import {zc,Ka,g}from'./chunk-I3LSSBRI.js';import {zl,ja,Va,Pg,jl,_a,Ua,Yg,Xg,Zg,Wg,$g,Bb,Ab,Ak,ik,ib,vk,B,w as w$1,A,D,Uh,hk,u,Bk}from'./chunk-IQAHULGQ.js';import {memo,useId,useState,useRef,useEffect,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Button,Box,alpha,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function w({isActive:t,disableHover:e}){let[n,g]=useState(false),l=useTheme(),r=()=>{e||g(true);},u=()=>{g(false);},C=t?l.palette.common.white:l.palette.grey[700],d=n?l.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:d,fillOpacity:"0.1",onMouseEnter:r,onMouseLeave:u}),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:C})]})})}var zt=t=>({...t.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:t.spacing(2)}),mt=styled(Button,{shouldForwardProp:t=>t!=="statusVariant"})(({theme:t,statusVariant:e})=>({...zt(t),...e==="active"?{background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,"&:hover":{background:t.palette.background.gradient.shadedBlue,opacity:.8}}:{backgroundColor:t.palette.common.white,borderColor:t.palette.grey[100],color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.common.white,opacity:.7}}})),gt={active:mt,inActive:mt};styled(Box)(({theme:t,variant:e})=>({borderRadius:"50px",backgroundColor:e==="active"?alpha(t.palette.text.primary,.1):t.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:t.spacing(.5),paddingBlock:t.spacing(.25),color:e==="active"?t.palette.common.white:t.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:t,variant:e,icon:n})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(n??"")&&e==="inActive")&&n!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"}));styled("p")(({theme:t})=>({fontSize:"0.6875rem",color:t.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"}));var ht=styled(f)(({theme:t})=>({backgroundColor:"white",boxShadow:t.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),Ct=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),ft=styled(Box)(({variant:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",fontWeight:t==="active"?700:400})),vt=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),It=styled("img")(({theme:t,variant:e,icon:n})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(n??"")&&e==="inActive")&&n!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"})),xt=styled(Box)(({variant:t})=>({width:"14px",height:"14px",display:"flex",alignItems:"center","& img":{width:"14px",height:"14px",filter:t==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"}}));var bt={inProgress:Bk,initiated:Bk,abandoned:u,cancelled:hk,reversed:Uh,reports:D,search:A,chevronDown:w$1,unAuthorized:B,unSettled:vk,unCaptured:ib,captured:ik,authorized:Ak,openFlag:Ab,closedFlag:Bb,unauthenticated:$g,authenticated:Wg,paidOut:Zg,scheduled:Xg,checked:Yg,dashedChecked:Ua,deactivated:_a,destination:jl,destinationReversed:Pg,outstanding:Va,active:ja,inactive:zl};var Ut=memo(t=>{let{variant:e="inActive",badgeCount:n,icon:g$1,label:l,dropdownOptions:r,selectedStatus:u,onButtonBodyClick:C,iconMapper:d=bt,buttonSx:yt,...wt}=t,kt=zc(useId(),"status-button"),[Lt,M]=useState(0),{t:R}=useTranslation(),P=useRef(null),[T,x]=useState(null),[a,V]=useState(u??r?.[0]?.status);useEffect(()=>{u!==void 0&&V(u);},[u]);let p=useMemo(()=>!!r?.length,[r]),f=!!T&&Lt>1,m=e==="active",H=useMemo(()=>m?"active":"inactive",[m]),h=useMemo(()=>a?r?.find(o=>o.status===a):null,[a,r]),Mt=useMemo(()=>{if(h?.icon)return jsx(xt,{variant:e,children:h.icon});let o=a&&d[a]?a:g$1;if(o&&d[o])return jsx(It,{icon:o,variant:e,src:d[o],alt:`${o}-icon`})},[h,a,d,g$1,e]),Rt=useMemo(()=>!n||Number.isNaN(Ka(n))?null:jsx(z,{color:H,children:g(Number(n))}),[n,H]),W=useMemo(()=>p?jsx(w,{isActive:m}):null,[p,m]);useEffect(()=>{m||(M(0),x(null));},[m]);let b=useCallback(()=>{x(null);},[]),A=useCallback(()=>{p&&x(f?null:P.current);},[p,f]),Pt=useCallback(o=>{o.stopPropagation(),t?.onClick?.(o),C?.(a||r?.[0]?.status||"all"),A(),M(B=>B+1);},[t,C,a,r,A]),E=useCallback(o=>B=>{o?.onClick?.(B),V(o.status),b();},[b]),Tt=useMemo(()=>r?.map(o=>({...o,onClick:E(o)}))||[],[r,E]),Vt=gt[e],Ht=useMemo(()=>h?.label||(a?R(a):l),[h,a,R,l]);return jsxs(Fragment,{children:[jsx(Vt,{id:kt,"data-testid":"StatusButton",...wt,ref:P,onClick:Pt,statusVariant:e,sx:{...p&&{paddingInlineEnd:"27px"},...yt},children:jsxs(vt,{children:[jsxs(ft,{variant:e,children:[Mt,Ht,Rt]}),W&&jsx(Ct,{children:W})]})}),f&&p&&jsx(ht,{open:f,onClose:b,anchorEl:T,menuItems:Tt})]})}),St=Ut;var ge=St;
1
+ import {f}from'./chunk-TN55SPRQ.js';import {z}from'./chunk-AXNWVU3K.js';import {Bc,Ma,g}from'./chunk-RUFO5P34.js';import {zl,ja,Va,Pg,jl,_a,Ua,Yg,Xg,Zg,Wg,$g,Bb,Ab,Ak,ik,ib,vk,B,w as w$1,A,D,Uh,hk,u,Bk}from'./chunk-IQAHULGQ.js';import {memo,useId,useState,useRef,useEffect,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Button,Box,alpha,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function w({isActive:t,disableHover:e}){let[n,g]=useState(false),l=useTheme(),r=()=>{e||g(true);},u=()=>{g(false);},C=t?l.palette.common.white:l.palette.grey[700],d=n?l.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:d,fillOpacity:"0.1",onMouseEnter:r,onMouseLeave:u}),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:C})]})})}var zt=t=>({...t.typography.subtitle1,borderRadius:"50px",borderWidth:"1px",borderStyle:"solid",minWidth:"135.11px",height:"32px",display:"flex",justifyContent:"center",alignItems:"center",gap:"8px",textTransform:"none",transition:"none",paddingInline:t.spacing(2)}),mt=styled(Button,{shouldForwardProp:t=>t!=="statusVariant"})(({theme:t,statusVariant:e})=>({...zt(t),...e==="active"?{background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,"&:hover":{background:t.palette.background.gradient.shadedBlue,opacity:.8}}:{backgroundColor:t.palette.common.white,borderColor:t.palette.grey[100],color:t.palette.text.primary,"&:hover":{backgroundColor:t.palette.common.white,opacity:.7}}})),gt={active:mt,inActive:mt};styled(Box)(({theme:t,variant:e})=>({borderRadius:"50px",backgroundColor:e==="active"?alpha(t.palette.text.primary,.1):t.palette.grey[100],display:"flex",justifyContent:"center",alignItems:"center",paddingInline:t.spacing(.5),paddingBlock:t.spacing(.25),color:e==="active"?t.palette.common.white:t.palette.text.primary,fontSize:"8px",fontWeight:700,lineHeight:"10px"}));styled("img")(({theme:t,variant:e,icon:n})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(n??"")&&e==="inActive")&&n!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"}));styled("p")(({theme:t})=>({fontSize:"0.6875rem",color:t.palette.background.default,fontStyle:"normal",margin:"auto",textTransform:"capitalize"}));var ht=styled(f)(({theme:t})=>({backgroundColor:"white",boxShadow:t.shadows[21],borderRadius:"0.25rem","& .MuiPaper-root":{borderRadius:"0.25rem",width:"12.5rem"}})),Ct=styled("span")(()=>({width:"27px",height:"100%",maxHeight:"100%",position:"absolute",top:"0",right:"0",bottom:"0",overflow:"hidden"})),ft=styled(Box)(({variant:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",fontWeight:t==="active"?700:400})),vt=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%"})),It=styled("img")(({theme:t,variant:e,icon:n})=>({fill:e==="active"?t.palette.common.white:t.palette.text.primary,color:e==="active"?t.palette.common.white:t.palette.text.primary,...!(["openFlag","closedFlag"].includes(n??"")&&e==="inActive")&&n!=="captured"&&{filter:e==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"},maxWidth:"14px",maxHeight:"14px"})),xt=styled(Box)(({variant:t})=>({width:"14px",height:"14px",display:"flex",alignItems:"center","& img":{width:"14px",height:"14px",filter:t==="active"?"brightness(0) invert(1)":"brightness(0) invert(0)"}}));var bt={inProgress:Bk,initiated:Bk,abandoned:u,cancelled:hk,reversed:Uh,reports:D,search:A,chevronDown:w$1,unAuthorized:B,unSettled:vk,unCaptured:ib,captured:ik,authorized:Ak,openFlag:Ab,closedFlag:Bb,unauthenticated:$g,authenticated:Wg,paidOut:Zg,scheduled:Xg,checked:Yg,dashedChecked:Ua,deactivated:_a,destination:jl,destinationReversed:Pg,outstanding:Va,active:ja,inactive:zl};var Ut=memo(t=>{let{variant:e="inActive",badgeCount:n,icon:g$1,label:l,dropdownOptions:r,selectedStatus:u,onButtonBodyClick:C,iconMapper:d=bt,buttonSx:yt,...wt}=t,kt=Bc(useId(),"status-button"),[Lt,M]=useState(0),{t:R}=useTranslation(),P=useRef(null),[T,x]=useState(null),[a,V]=useState(u??r?.[0]?.status);useEffect(()=>{u!==void 0&&V(u);},[u]);let p=useMemo(()=>!!r?.length,[r]),f=!!T&&Lt>1,m=e==="active",H=useMemo(()=>m?"active":"inactive",[m]),h=useMemo(()=>a?r?.find(o=>o.status===a):null,[a,r]),Mt=useMemo(()=>{if(h?.icon)return jsx(xt,{variant:e,children:h.icon});let o=a&&d[a]?a:g$1;if(o&&d[o])return jsx(It,{icon:o,variant:e,src:d[o],alt:`${o}-icon`})},[h,a,d,g$1,e]),Rt=useMemo(()=>!n||Number.isNaN(Ma(n))?null:jsx(z,{color:H,children:g(Number(n))}),[n,H]),W=useMemo(()=>p?jsx(w,{isActive:m}):null,[p,m]);useEffect(()=>{m||(M(0),x(null));},[m]);let b=useCallback(()=>{x(null);},[]),A=useCallback(()=>{p&&x(f?null:P.current);},[p,f]),Pt=useCallback(o=>{o.stopPropagation(),t?.onClick?.(o),C?.(a||r?.[0]?.status||"all"),A(),M(B=>B+1);},[t,C,a,r,A]),E=useCallback(o=>B=>{o?.onClick?.(B),V(o.status),b();},[b]),Tt=useMemo(()=>r?.map(o=>({...o,onClick:E(o)}))||[],[r,E]),Vt=gt[e],Ht=useMemo(()=>h?.label||(a?R(a):l),[h,a,R,l]);return jsxs(Fragment,{children:[jsx(Vt,{id:kt,"data-testid":"StatusButton",...wt,ref:P,onClick:Pt,statusVariant:e,sx:{...p&&{paddingInlineEnd:"27px"},...yt},children:jsxs(vt,{children:[jsxs(ft,{variant:e,children:[Mt,Ht,Rt]}),W&&jsx(Ct,{children:W})]})}),f&&p&&jsx(ht,{open:f,onClose:b,anchorEl:T,menuItems:Tt})]})}),St=Ut;var ge=St;
2
2
  export{w as a,ge as b};
@@ -1 +1 @@
1
- import {lc}from'./chunk-I3LSSBRI.js';import {forwardRef,memo}from'react';import y from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var p="os-shared-ListLayout",t={root:`${p}-root`};var a=styled(y)(()=>({flex:1,position:"relative",display:"flex",flexDirection:"column",height:"100%"}));var e=forwardRef(({id:o,className:r,sx:i,children:m,...L},l)=>jsx(a,{ref:l,component:"article",id:o,"data-testid":o??"ListLayout",...L,className:lc(t.root,r),sx:i,children:m}));e.displayName="ListLayout";var d=memo(e);export{t as a,d as b};
1
+ import {nc}from'./chunk-RUFO5P34.js';import {forwardRef,memo}from'react';import y from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var p="os-shared-ListLayout",t={root:`${p}-root`};var a=styled(y)(()=>({flex:1,position:"relative",display:"flex",flexDirection:"column",height:"100%"}));var e=forwardRef(({id:o,className:r,sx:i,children:m,...L},l)=>jsx(a,{ref:l,component:"article",id:o,"data-testid":o??"ListLayout",...L,className:nc(t.root,r),sx:i,children:m}));e.displayName="ListLayout";var d=memo(e);export{t as a,d as b};
@@ -1,2 +1,2 @@
1
- import {j}from'./chunk-K43ZLU4I.js';import {lc}from'./chunk-I3LSSBRI.js';import {forwardRef,memo}from'react';import {jsxs,jsx}from'react/jsx-runtime';import S from'@mui/material/Box';import {styled}from'@mui/material/styles';var l="os-shared-Alert",r={root:`${l}-root`,icon:`${l}-icon`,message:`${l}-message`},p={error:e=>({color:e.v2.palette.error[500],background:e.v2.palette.status.danger.subtle}),warning:e=>({color:e.v2.palette.warning[500],background:e.v2.palette.status.warning.subtle}),success:e=>({color:e.v2.palette.success[700],background:e.v2.palette.status.success.subtle}),info:e=>({color:e.v2.palette.brand[500],background:e.v2.palette.interactive.primary.subtle})};var C=()=>jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M6 12C9.30838 12 12 9.30838 12 6C12 2.69162 9.30838 -2.35309e-07 6 -5.24537e-07C2.69162 -8.13764e-07 8.13764e-07 2.69162 5.24537e-07 6C2.35309e-07 9.30838 2.69162 12 6 12ZM6 11.1C3.17801 11.1 0.9 8.82198 0.9 6C0.9 3.17802 3.17802 0.899999 6 0.899999C8.82199 0.899999 11.1 3.17802 11.1 6C11.1 8.82198 8.82198 11.1 6 11.1ZM6 9C6.15913 9 6.31174 8.93679 6.42426 8.82426C6.53679 8.71174 6.6 8.55913 6.6 8.4C6.6 8.24087 6.53679 8.08826 6.42426 7.97574C6.31174 7.86321 6.15913 7.8 6 7.8C5.84087 7.8 5.68826 7.86321 5.57574 7.97574C5.46321 8.08826 5.4 8.24087 5.4 8.4C5.4 8.55913 5.46321 8.71174 5.57574 8.82426C5.68826 8.93679 5.84087 9 6 9ZM6.00703 6.90644C6.12628 6.90458 6.23991 6.85546 6.32296 6.76988C6.40602 6.6843 6.45171 6.56925 6.45 6.45L6.45 3.15C6.45084 3.09037 6.43983 3.03116 6.41759 2.97583C6.39535 2.92049 6.36234 2.87013 6.32047 2.82766C6.2786 2.7852 6.22871 2.75148 6.17369 2.72846C6.11868 2.70544 6.05964 2.69359 6 2.69359C5.94036 2.69359 5.88132 2.70544 5.82631 2.72846C5.77129 2.75148 5.7214 2.7852 5.67953 2.82766C5.63766 2.87013 5.60465 2.92049 5.58241 2.97583C5.56017 3.03116 5.54916 3.09037 5.55 3.15L5.55 6.45C5.54914 6.51023 5.56037 6.57002 5.58304 6.62583C5.60571 6.68163 5.63935 6.73232 5.68197 6.77489C5.72459 6.81745 5.77533 6.85103 5.83116 6.87363C5.887 6.89623 5.9468 6.90739 6.00703 6.90644Z",fill:"currentColor"})}),d=()=>jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M9.63285 0.429835C9.54018 0.432536 9.45219 0.471196 9.38752 0.537631L3.21672 6.70844L0.614302 4.10602C0.581421 4.07177 0.542037 4.04443 0.498457 4.0256C0.454877 4.00676 0.407977 3.99681 0.360503 3.99633C0.313029 3.99585 0.265937 4.00484 0.221983 4.02279C0.178029 4.04073 0.138097 4.06727 0.104526 4.10084C0.0709555 4.13441 0.0444206 4.17434 0.0264755 4.21829C0.00853037 4.26225 -0.000464234 4.30934 1.8446e-05 4.35681C0.000501126 4.40429 0.0104514 4.45119 0.0292865 4.49477C0.0481216 4.53835 0.0754629 4.57773 0.109709 4.61061L2.96442 7.46533C3.03134 7.53222 3.12209 7.5698 3.21672 7.5698C3.31134 7.5698 3.40209 7.53222 3.46901 7.46533L9.89212 1.04222C9.9436 0.992086 9.97874 0.927576 9.99295 0.857134C10.0072 0.786693 9.99978 0.713603 9.97176 0.647428C9.94374 0.581254 9.8964 0.525079 9.83593 0.486255C9.77546 0.447431 9.70468 0.427767 9.63285 0.429835Z",fill:"currentColor"})}),m=()=>jsx("svg",{width:"12",height:"11",viewBox:"0 0 12 11",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M6 7.5V5.5M6 3.5H6.005M11 5.5C11 8.26142 8.76142 10.5 6 10.5C3.23858 10.5 1 8.26142 1 5.5C1 2.73858 3.23858 0.5 6 0.5C8.76142 0.5 11 2.73858 11 5.5Z",stroke:"currentColor",strokeWidth:"0.8",strokeLinecap:"round",strokeLinejoin:"round"})});var g=styled(S,{shouldForwardProp:e=>e!=="$severity"})(({theme:e,$severity:s})=>({...p[s](e),display:"flex",alignItems:"center",gap:e.v2.spacing(4),minHeight:e.v2.spacing(32),padding:e.v2.spacing(8),borderRadius:e.v2.radius(4)})),f=styled("span")({width:12,height:12,flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center","& svg":{width:12,height:12,display:"block"}}),u=styled(j)({color:"inherit",wordBreak:"break-word"});function k(e){switch(e){case "success":return jsx(d,{});case "info":return jsx(m,{});case "error":case "warning":return jsx(C,{})}}var y=forwardRef(({severity:e="error",message:s,icon:v,className:h,sx:w,id:i,...A},x)=>jsxs(g,{ref:x,...A,$severity:e,className:lc(r.root,h),sx:w,id:i,"data-testid":i??"Alert",children:[jsx(f,{className:r.icon,children:v??k(e)}),jsx(u,{component:"p",textVariant:"body.xsmall.regular",className:r.message,children:s})]}));y.displayName="Alert";var M=memo(y);
1
+ import {j}from'./chunk-AXNWVU3K.js';import {nc}from'./chunk-RUFO5P34.js';import {forwardRef,memo}from'react';import {jsxs,jsx}from'react/jsx-runtime';import S from'@mui/material/Box';import {styled}from'@mui/material/styles';var l="os-shared-Alert",r={root:`${l}-root`,icon:`${l}-icon`,message:`${l}-message`},p={error:e=>({color:e.v2.palette.error[500],background:e.v2.palette.status.danger.subtle}),warning:e=>({color:e.v2.palette.warning[500],background:e.v2.palette.status.warning.subtle}),success:e=>({color:e.v2.palette.success[700],background:e.v2.palette.status.success.subtle}),info:e=>({color:e.v2.palette.brand[500],background:e.v2.palette.interactive.primary.subtle})};var C=()=>jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M6 12C9.30838 12 12 9.30838 12 6C12 2.69162 9.30838 -2.35309e-07 6 -5.24537e-07C2.69162 -8.13764e-07 8.13764e-07 2.69162 5.24537e-07 6C2.35309e-07 9.30838 2.69162 12 6 12ZM6 11.1C3.17801 11.1 0.9 8.82198 0.9 6C0.9 3.17802 3.17802 0.899999 6 0.899999C8.82199 0.899999 11.1 3.17802 11.1 6C11.1 8.82198 8.82198 11.1 6 11.1ZM6 9C6.15913 9 6.31174 8.93679 6.42426 8.82426C6.53679 8.71174 6.6 8.55913 6.6 8.4C6.6 8.24087 6.53679 8.08826 6.42426 7.97574C6.31174 7.86321 6.15913 7.8 6 7.8C5.84087 7.8 5.68826 7.86321 5.57574 7.97574C5.46321 8.08826 5.4 8.24087 5.4 8.4C5.4 8.55913 5.46321 8.71174 5.57574 8.82426C5.68826 8.93679 5.84087 9 6 9ZM6.00703 6.90644C6.12628 6.90458 6.23991 6.85546 6.32296 6.76988C6.40602 6.6843 6.45171 6.56925 6.45 6.45L6.45 3.15C6.45084 3.09037 6.43983 3.03116 6.41759 2.97583C6.39535 2.92049 6.36234 2.87013 6.32047 2.82766C6.2786 2.7852 6.22871 2.75148 6.17369 2.72846C6.11868 2.70544 6.05964 2.69359 6 2.69359C5.94036 2.69359 5.88132 2.70544 5.82631 2.72846C5.77129 2.75148 5.7214 2.7852 5.67953 2.82766C5.63766 2.87013 5.60465 2.92049 5.58241 2.97583C5.56017 3.03116 5.54916 3.09037 5.55 3.15L5.55 6.45C5.54914 6.51023 5.56037 6.57002 5.58304 6.62583C5.60571 6.68163 5.63935 6.73232 5.68197 6.77489C5.72459 6.81745 5.77533 6.85103 5.83116 6.87363C5.887 6.89623 5.9468 6.90739 6.00703 6.90644Z",fill:"currentColor"})}),d=()=>jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M9.63285 0.429835C9.54018 0.432536 9.45219 0.471196 9.38752 0.537631L3.21672 6.70844L0.614302 4.10602C0.581421 4.07177 0.542037 4.04443 0.498457 4.0256C0.454877 4.00676 0.407977 3.99681 0.360503 3.99633C0.313029 3.99585 0.265937 4.00484 0.221983 4.02279C0.178029 4.04073 0.138097 4.06727 0.104526 4.10084C0.0709555 4.13441 0.0444206 4.17434 0.0264755 4.21829C0.00853037 4.26225 -0.000464234 4.30934 1.8446e-05 4.35681C0.000501126 4.40429 0.0104514 4.45119 0.0292865 4.49477C0.0481216 4.53835 0.0754629 4.57773 0.109709 4.61061L2.96442 7.46533C3.03134 7.53222 3.12209 7.5698 3.21672 7.5698C3.31134 7.5698 3.40209 7.53222 3.46901 7.46533L9.89212 1.04222C9.9436 0.992086 9.97874 0.927576 9.99295 0.857134C10.0072 0.786693 9.99978 0.713603 9.97176 0.647428C9.94374 0.581254 9.8964 0.525079 9.83593 0.486255C9.77546 0.447431 9.70468 0.427767 9.63285 0.429835Z",fill:"currentColor"})}),m=()=>jsx("svg",{width:"12",height:"11",viewBox:"0 0 12 11",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",children:jsx("path",{d:"M6 7.5V5.5M6 3.5H6.005M11 5.5C11 8.26142 8.76142 10.5 6 10.5C3.23858 10.5 1 8.26142 1 5.5C1 2.73858 3.23858 0.5 6 0.5C8.76142 0.5 11 2.73858 11 5.5Z",stroke:"currentColor",strokeWidth:"0.8",strokeLinecap:"round",strokeLinejoin:"round"})});var g=styled(S,{shouldForwardProp:e=>e!=="$severity"})(({theme:e,$severity:s})=>({...p[s](e),display:"flex",alignItems:"center",gap:e.v2.spacing(4),minHeight:e.v2.spacing(32),padding:e.v2.spacing(8),borderRadius:e.v2.radius(4)})),f=styled("span")({width:12,height:12,flexShrink:0,display:"inline-flex",alignItems:"center",justifyContent:"center","& svg":{width:12,height:12,display:"block"}}),u=styled(j)({color:"inherit",wordBreak:"break-word"});function k(e){switch(e){case "success":return jsx(d,{});case "info":return jsx(m,{});case "error":case "warning":return jsx(C,{})}}var y=forwardRef(({severity:e="error",message:s,icon:v,className:h,sx:w,id:i,...A},x)=>jsxs(g,{ref:x,...A,$severity:e,className:nc(r.root,h),sx:w,id:i,"data-testid":i??"Alert",children:[jsx(f,{className:r.icon,children:v??k(e)}),jsx(u,{component:"p",textVariant:"body.xsmall.regular",className:r.message,children:s})]}));y.displayName="Alert";var M=memo(y);
2
2
  export{r as a,M as b};
@@ -1,2 +1,2 @@
1
- import {P as P$1,O}from'./chunk-K43ZLU4I.js';import {lc}from'./chunk-I3LSSBRI.js';import'./chunk-IQAHULGQ.js';import {forwardRef,useMemo,useState,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var a="os-shared-Sidebar",e={root:`${a}-root`,header:`${a}-header`,content:`${a}-content`,footer:`${a}-footer`,link:`${a}-link`,group:`${a}-group`,groupSummary:`${a}-groupSummary`,groupSummaryActive:`${a}-groupSummaryActive`,groupSummaryExpanded:`${a}-groupSummaryExpanded`,groupHeader:`${a}-groupHeader`,groupContent:`${a}-groupContent`,groupItem:`${a}-groupItem`,startAdornment:`${a}-startAdornment`,endAdornment:`${a}-endAdornment`};var G=r=>{let{palette:n}=useTheme();return jsx("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:jsx("path",{d:"M9.97437 5.23633C10.0426 5.23465 10.1087 5.25507 10.1648 5.29395C10.2207 5.33278 10.264 5.3876 10.2888 5.45117C10.3136 5.51487 10.3195 5.5852 10.3064 5.65234C10.2934 5.71873 10.2614 5.77954 10.2146 5.82813L7.23608 9.01172C7.17462 9.07723 7.08968 9.11518 6.99976 9.11523C6.90985 9.11523 6.82492 9.07717 6.76343 9.01172L3.78394 5.8291L3.78491 5.82812C3.73877 5.77985 3.70612 5.71999 3.69312 5.6543C3.68007 5.58802 3.68575 5.51818 3.70972 5.45508C3.7337 5.39201 3.77618 5.33717 3.83081 5.29785C3.88553 5.25857 3.95095 5.23732 4.01831 5.2373C4.0635 5.23736 4.10797 5.24702 4.14917 5.26562C4.18997 5.28407 4.2263 5.31071 4.25659 5.34375L6.99878 8.27246L9.74194 5.34375C9.80179 5.27779 9.88521 5.23858 9.97437 5.23633Z",fill:n.text.textSecondary,stroke:n.text.textSecondary,strokeWidth:"0.204167"})})};var E="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)",H=styled("div")(({theme:r})=>{let{base:n}=r.v2.palette;return {backgroundColor:alpha(n.white,.7),backdropFilter:r.v2.blur[16],width:183,position:"sticky",padding:`${r.v2.spacing(16)} ${r.v2.spacing(8)}`,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"}}),L=styled("div")({flexShrink:0}),R=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),flex:1,minHeight:0,overflow:"auto"})),P=styled("div")({flexShrink:0}),C={border:"none",width:"100%",textAlign:"left",font:"inherit",cursor:"pointer"},f=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),x=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto"}),D=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}}),F=styled(P$1)(({theme:r})=>({"&&":{background:"transparent",boxShadow:"none"},border:"none !important",borderRadius:"4px !important",[`& .${O.summary}`]:{padding:0,paddingRight:8,minHeight:"24px",height:"24px","&.Mui-expanded":{minHeight:"24px",height:"24px"},borderRadius:"4px !important",background:"transparent",transition:"none"},[`& .${O.summary}.${e.groupSummaryActive}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.summary}.${e.groupSummaryExpanded}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.content}`]:{borderTop:"none",padding:0},[`& .${O.labelContent}`]:{flexGrow:1,minWidth:0}})),V=styled("span",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?o.white:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4),width:"100%",cursor:"pointer"}}),T=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),paddingTop:r.v2.spacing(4)})),j=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}});var $=r=>!!r.sections?.length;function M(r,n){let o=n??r?.[0]?.sections?.[0]?.id??r?.[0]?.id,d=r?.find(c=>c.id===o),u=!d||!$(d),l=u?r?.find(c=>c.sections?.some(y=>y.id===o)):d,g=l?.id??d?.id??o,b=l?u?o:l.sections?.[0]?.id:void 0;return {activeId:o,activeGroupId:g,activeLeafId:b}}var B=forwardRef(({sections:r,activeSectionId:n,onSelect:o,defaultExpandedIds:d,header:u,footer:l,id:g,className:b,sx:c},y)=>{let{activeId:h,activeGroupId:A,activeLeafId:k}=useMemo(()=>M(r,n),[r,n]),[W,O]=useState(()=>Object.fromEntries((d??[]).map(t=>[t,true])));return jsxs(H,{ref:y,id:g,"data-testid":g??"Sidebar",className:lc(e.root,b),sx:c,children:[u?jsx(L,{className:e.header,children:u}):null,jsx(R,{className:e.content,children:r?.map(t=>{if(!$(t))return jsxs(D,{type:"button",$isActive:h===t.id,"aria-current":h===t.id?"true":void 0,onClick:()=>o?.(t,void 0,[t]),className:e.link,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]},t.id);let I=W[t.id]??t.id===A;return jsx(F,{className:e.group,expanded:I,onChange:i=>O(_=>({..._,[t.id]:i})),expandIcon:jsx(G,{}),slotProps:{root:{component:"section"},summary:{className:lc(e.groupSummary,A===t.id&&e.groupSummaryActive,I&&e.groupSummaryExpanded)}},label:jsxs(V,{$isActive:A===t.id,className:e.groupHeader,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]}),content:jsx(T,{className:e.groupContent,children:t.sections?.map(i=>jsxs(j,{type:"button",$isActive:k===i.id,"aria-current":k===i.id?"true":void 0,onClick:()=>o?.(i,t,[t,i]),className:e.groupItem,children:[i.startAdornment?jsx(f,{className:e.startAdornment,children:i.startAdornment}):null,i.title,i.endAdornment?jsx(x,{className:e.endAdornment,children:i.endAdornment}):null]},`${t.id}-${i.id}`))})},t.id)})}),l?jsx(P,{className:e.footer,children:l}):null]})});B.displayName="Sidebar";var X=memo(B);
1
+ import {P as P$1,O}from'./chunk-AXNWVU3K.js';import {nc}from'./chunk-RUFO5P34.js';import'./chunk-IQAHULGQ.js';import {forwardRef,useMemo,useState,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var a="os-shared-Sidebar",e={root:`${a}-root`,header:`${a}-header`,content:`${a}-content`,footer:`${a}-footer`,link:`${a}-link`,group:`${a}-group`,groupSummary:`${a}-groupSummary`,groupSummaryActive:`${a}-groupSummaryActive`,groupSummaryExpanded:`${a}-groupSummaryExpanded`,groupHeader:`${a}-groupHeader`,groupContent:`${a}-groupContent`,groupItem:`${a}-groupItem`,startAdornment:`${a}-startAdornment`,endAdornment:`${a}-endAdornment`};var G=r=>{let{palette:n}=useTheme();return jsx("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:jsx("path",{d:"M9.97437 5.23633C10.0426 5.23465 10.1087 5.25507 10.1648 5.29395C10.2207 5.33278 10.264 5.3876 10.2888 5.45117C10.3136 5.51487 10.3195 5.5852 10.3064 5.65234C10.2934 5.71873 10.2614 5.77954 10.2146 5.82813L7.23608 9.01172C7.17462 9.07723 7.08968 9.11518 6.99976 9.11523C6.90985 9.11523 6.82492 9.07717 6.76343 9.01172L3.78394 5.8291L3.78491 5.82812C3.73877 5.77985 3.70612 5.71999 3.69312 5.6543C3.68007 5.58802 3.68575 5.51818 3.70972 5.45508C3.7337 5.39201 3.77618 5.33717 3.83081 5.29785C3.88553 5.25857 3.95095 5.23732 4.01831 5.2373C4.0635 5.23736 4.10797 5.24702 4.14917 5.26562C4.18997 5.28407 4.2263 5.31071 4.25659 5.34375L6.99878 8.27246L9.74194 5.34375C9.80179 5.27779 9.88521 5.23858 9.97437 5.23633Z",fill:n.text.textSecondary,stroke:n.text.textSecondary,strokeWidth:"0.204167"})})};var E="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)",H=styled("div")(({theme:r})=>{let{base:n}=r.v2.palette;return {backgroundColor:alpha(n.white,.7),backdropFilter:r.v2.blur[16],width:183,position:"sticky",padding:`${r.v2.spacing(16)} ${r.v2.spacing(8)}`,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column"}}),L=styled("div")({flexShrink:0}),R=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),flex:1,minHeight:0,overflow:"auto"})),P=styled("div")({flexShrink:0}),C={border:"none",width:"100%",textAlign:"left",font:"inherit",cursor:"pointer"},f=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),x=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto"}),D=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}}),F=styled(P$1)(({theme:r})=>({"&&":{background:"transparent",boxShadow:"none"},border:"none !important",borderRadius:"4px !important",[`& .${O.summary}`]:{padding:0,paddingRight:8,minHeight:"24px",height:"24px","&.Mui-expanded":{minHeight:"24px",height:"24px"},borderRadius:"4px !important",background:"transparent",transition:"none"},[`& .${O.summary}.${e.groupSummaryActive}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.summary}.${e.groupSummaryExpanded}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.content}`]:{borderTop:"none",padding:0},[`& .${O.labelContent}`]:{flexGrow:1,minWidth:0}})),V=styled("span",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?o.white:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4),width:"100%",cursor:"pointer"}}),T=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),paddingTop:r.v2.spacing(4)})),j=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}});var $=r=>!!r.sections?.length;function M(r,n){let o=n??r?.[0]?.sections?.[0]?.id??r?.[0]?.id,d=r?.find(c=>c.id===o),u=!d||!$(d),l=u?r?.find(c=>c.sections?.some(y=>y.id===o)):d,g=l?.id??d?.id??o,b=l?u?o:l.sections?.[0]?.id:void 0;return {activeId:o,activeGroupId:g,activeLeafId:b}}var B=forwardRef(({sections:r,activeSectionId:n,onSelect:o,defaultExpandedIds:d,header:u,footer:l,id:g,className:b,sx:c},y)=>{let{activeId:h,activeGroupId:A,activeLeafId:k}=useMemo(()=>M(r,n),[r,n]),[W,O]=useState(()=>Object.fromEntries((d??[]).map(t=>[t,true])));return jsxs(H,{ref:y,id:g,"data-testid":g??"Sidebar",className:nc(e.root,b),sx:c,children:[u?jsx(L,{className:e.header,children:u}):null,jsx(R,{className:e.content,children:r?.map(t=>{if(!$(t))return jsxs(D,{type:"button",$isActive:h===t.id,"aria-current":h===t.id?"true":void 0,onClick:()=>o?.(t,void 0,[t]),className:e.link,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]},t.id);let I=W[t.id]??t.id===A;return jsx(F,{className:e.group,expanded:I,onChange:i=>O(_=>({..._,[t.id]:i})),expandIcon:jsx(G,{}),slotProps:{root:{component:"section"},summary:{className:nc(e.groupSummary,A===t.id&&e.groupSummaryActive,I&&e.groupSummaryExpanded)}},label:jsxs(V,{$isActive:A===t.id,className:e.groupHeader,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]}),content:jsx(T,{className:e.groupContent,children:t.sections?.map(i=>jsxs(j,{type:"button",$isActive:k===i.id,"aria-current":k===i.id?"true":void 0,onClick:()=>o?.(i,t,[t,i]),className:e.groupItem,children:[i.startAdornment?jsx(f,{className:e.startAdornment,children:i.startAdornment}):null,i.title,i.endAdornment?jsx(x,{className:e.endAdornment,children:i.endAdornment}):null]},`${t.id}-${i.id}`))})},t.id)})}),l?jsx(P,{className:e.footer,children:l}):null]})});B.displayName="Sidebar";var X=memo(B);
2
2
  export{e as a,X as b};
@@ -1 +1 @@
1
- import {d,j}from'./chunk-K43ZLU4I.js';import {Vb,lc}from'./chunk-I3LSSBRI.js';import {Gb}from'./chunk-IQAHULGQ.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var i="os-shared-FilePreview",t={root:`${i}-root`,wrapper:`${i}-wrapper`,content:`${i}-content`,iconWrapper:`${i}-iconWrapper`,textWrapper:`${i}-textWrapper`,filename:`${i}-filename`,closeButton:`${i}-closeButton`};var x=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:r})=>{let{grey:o,base:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:o[50],gap:e.v2.spacing(8),color:s.black,...r&&{opacity:.6,cursor:"default"}}}),P=styled("div")(({theme:e})=>({width:"100%",minWidth:0,display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.v2.spacing(8)})),g=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",flex:1,minWidth:0,overflow:"hidden",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),F=styled("div")(({theme:e})=>{let{grey:r,base:o}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,overflow:"hidden",backgroundColor:o.white,borderRadius:e.v2.radius(4),border:`1px solid ${r[100]}`}}),C=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",flex:1,minWidth:0,overflow:"hidden",gap:e.v2.spacing(4),color:"inherit"})),b=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto",cursor:"pointer",backgroundColor:"transparent",border:"none",padding:0}));var L=e=>e.type.includes("image")?URL.createObjectURL(e):"",h=forwardRef(function({file:r,disabled:o,onRemoveFile:s,getFilePreview:W=L,icon:N,action:m,id:v,className:$,sx:I},j$1){let f=Vb(r)?W(r.file):"",R=Vb(r)&&r.file.type.includes("application/pdf"),p=Vb(r)?r.file:r;return jsx(x,{ref:j$1,id:v,"data-testid":v??"FilePreview",className:lc(t.root,$),sx:I,$disabled:o,children:jsxs(P,{"data-slot":"file-wrapper",className:t.wrapper,children:[jsxs(g,{"data-slot":"file-Content",className:t.content,children:[jsx(F,{"data-slot":"file-icon-wrapper",className:t.iconWrapper,children:Vb(r)&&f?jsx(d,{src:f,alt:p.name,className:t.iconWrapper,sx:{width:32,height:32,borderRadius:"50%",objectFit:R?"none":"cover"},onError:k=>{k.currentTarget.src=p.name;}}):N}),jsxs(C,{"data-slot":"text-wrapper",className:t.textWrapper,children:[jsx(j,{textVariant:"caption.medium",noWrap:true,"data-slot":"filename",className:t.filename,children:p.name}),!Vb(r)&&m?m:null]})]}),!o&&jsx(b,{type:"button","aria-label":"Remove file","data-slot":"close-icon-wrapper",className:t.closeButton,onClick:()=>{s?.(r);},children:jsx(d,{src:Gb,alt:"Remove file",sx:{width:10,height:10}})})]})})});h.displayName="FilePreview";var S=memo(h);export{t as a,S as b};
1
+ import {d,j}from'./chunk-AXNWVU3K.js';import {Xb,nc}from'./chunk-RUFO5P34.js';import {Gb}from'./chunk-IQAHULGQ.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var i="os-shared-FilePreview",t={root:`${i}-root`,wrapper:`${i}-wrapper`,content:`${i}-content`,iconWrapper:`${i}-iconWrapper`,textWrapper:`${i}-textWrapper`,filename:`${i}-filename`,closeButton:`${i}-closeButton`};var x=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:r})=>{let{grey:o,base:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:o[50],gap:e.v2.spacing(8),color:s.black,...r&&{opacity:.6,cursor:"default"}}}),P=styled("div")(({theme:e})=>({width:"100%",minWidth:0,display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.v2.spacing(8)})),g=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",flex:1,minWidth:0,overflow:"hidden",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),F=styled("div")(({theme:e})=>{let{grey:r,base:o}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,overflow:"hidden",backgroundColor:o.white,borderRadius:e.v2.radius(4),border:`1px solid ${r[100]}`}}),C=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",flex:1,minWidth:0,overflow:"hidden",gap:e.v2.spacing(4),color:"inherit"})),b=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto",cursor:"pointer",backgroundColor:"transparent",border:"none",padding:0}));var L=e=>e.type.includes("image")?URL.createObjectURL(e):"",h=forwardRef(function({file:r,disabled:o,onRemoveFile:s,getFilePreview:W=L,icon:N,action:m,id:v,className:$,sx:I},j$1){let f=Xb(r)?W(r.file):"",R=Xb(r)&&r.file.type.includes("application/pdf"),p=Xb(r)?r.file:r;return jsx(x,{ref:j$1,id:v,"data-testid":v??"FilePreview",className:nc(t.root,$),sx:I,$disabled:o,children:jsxs(P,{"data-slot":"file-wrapper",className:t.wrapper,children:[jsxs(g,{"data-slot":"file-Content",className:t.content,children:[jsx(F,{"data-slot":"file-icon-wrapper",className:t.iconWrapper,children:Xb(r)&&f?jsx(d,{src:f,alt:p.name,className:t.iconWrapper,sx:{width:32,height:32,borderRadius:"50%",objectFit:R?"none":"cover"},onError:k=>{k.currentTarget.src=p.name;}}):N}),jsxs(C,{"data-slot":"text-wrapper",className:t.textWrapper,children:[jsx(j,{textVariant:"caption.medium",noWrap:true,"data-slot":"filename",className:t.filename,children:p.name}),!Xb(r)&&m?m:null]})]}),!o&&jsx(b,{type:"button","aria-label":"Remove file","data-slot":"close-icon-wrapper",className:t.closeButton,onClick:()=>{s?.(r);},children:jsx(d,{src:Gb,alt:"Remove file",sx:{width:10,height:10}})})]})})});h.displayName="FilePreview";var S=memo(h);export{t as a,S as b};
@@ -1 +1 @@
1
- import {L,K,j}from'./chunk-K43ZLU4I.js';import {xa,Ia,l,lc}from'./chunk-I3LSSBRI.js';import {forwardRef,useState,useMemo,memo}from'react';import V from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmountInput",t={root:`${r}-root`,field:`${r}-field`,display:`${r}-display`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var N=styled(V)(({theme:e})=>({color:e.v2.palette.foreground.primary,border:`1px solid ${e.v2.palette.border.default}`,padding:e.v2.spacing(8),borderRadius:e.v2.radius(4),display:"flex",alignItems:"center",justifyContent:"flex-end",width:93,height:32,textAlign:"right",input:{fontSize:"11px",border:"none",color:e.v2.palette.foreground.primary,height:30,padding:0,textAlign:"right"}})),I=styled(L)(({theme:e})=>({flexGrow:1,maxWidth:"100%",padding:0,border:"none",backgroundColor:"transparent",borderRadius:"none",height:24,[`& .${K.input}`]:{padding:0},input:{textAlign:"right",width:"100%",fontWeight:e.v2.typography.fontWeightRegular}})),b=styled(j)(({theme:e})=>({...e.v2.typography.textVariants.body.small.bold,display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"})),v=styled("span")(({theme:e})=>({fontWeight:e.v2.typography.fontWeightRegular}));var q=xa(),D=forwardRef(({amount:e,setAmount:u,maxAmount:l$1,isError:R,placeholder:E,selectedCurrency:p,id:o,className:k,sx:P,...B},M)=>{let[W,m]=useState(false),[c,S]=useState(e||""),{integerAmount:F,decimalAmount:d}=Ia(e,p?.code?.english),K=useMemo(()=>l(p?.decimals),[p]),T=n=>{let i=Number(n.target.value)||0;if(l$1&&i>l$1)return false;S(i),u(i);},H=()=>{m(false),u(Number(c));},L=n=>{q&&isNaN(Number(n.key))&&n.key!=="Backspace"&&n.key!=="."&&n.preventDefault();};return jsx(N,{id:o,"data-testid":o??"CurrencyAmountInput",className:lc(t.root,k),sx:P,...B,children:W?jsx(I,{ref:M,id:o,className:t.field,type:"number",placeholder:E??K,value:c,onChange:T,onBlur:H,onKeyDown:L,error:!!R,inputProps:{step:"0.01"},hideArrows:true,autoFocus:true,disableFocusRing:true}):jsxs(b,{id:o?`${o}-display`:void 0,"data-testid":o?`${o}-display`:"CurrencyAmount",className:t.display,component:"span",onClick:()=>{m(true);},children:[jsx("span",{className:t.integer,children:F}),d?jsxs(Fragment,{children:[jsx("span",{className:t.separator,children:"."}),jsx(v,{className:t.decimal,children:d})]}):null]})})});D.displayName="CurrencyAmountInput";var J=memo(D);export{t as a,J as b};
1
+ import {L,K,j}from'./chunk-AXNWVU3K.js';import {za,Ka,l,nc}from'./chunk-RUFO5P34.js';import {forwardRef,useState,useMemo,memo}from'react';import V from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmountInput",t={root:`${r}-root`,field:`${r}-field`,display:`${r}-display`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var N=styled(V)(({theme:e})=>({color:e.v2.palette.foreground.primary,border:`1px solid ${e.v2.palette.border.default}`,padding:e.v2.spacing(8),borderRadius:e.v2.radius(4),display:"flex",alignItems:"center",justifyContent:"flex-end",width:93,height:32,textAlign:"right",input:{fontSize:"11px",border:"none",color:e.v2.palette.foreground.primary,height:30,padding:0,textAlign:"right"}})),I=styled(L)(({theme:e})=>({flexGrow:1,maxWidth:"100%",padding:0,border:"none",backgroundColor:"transparent",borderRadius:"none",height:24,[`& .${K.input}`]:{padding:0},input:{textAlign:"right",width:"100%",fontWeight:e.v2.typography.fontWeightRegular}})),b=styled(j)(({theme:e})=>({...e.v2.typography.textVariants.body.small.bold,display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"})),v=styled("span")(({theme:e})=>({fontWeight:e.v2.typography.fontWeightRegular}));var q=za(),D=forwardRef(({amount:e,setAmount:u,maxAmount:l$1,isError:R,placeholder:E,selectedCurrency:p,id:o,className:k,sx:P,...B},M)=>{let[W,m]=useState(false),[c,S]=useState(e||""),{integerAmount:F,decimalAmount:d}=Ka(e,p?.code?.english),K=useMemo(()=>l(p?.decimals),[p]),T=n=>{let i=Number(n.target.value)||0;if(l$1&&i>l$1)return false;S(i),u(i);},H=()=>{m(false),u(Number(c));},L=n=>{q&&isNaN(Number(n.key))&&n.key!=="Backspace"&&n.key!=="."&&n.preventDefault();};return jsx(N,{id:o,"data-testid":o??"CurrencyAmountInput",className:nc(t.root,k),sx:P,...B,children:W?jsx(I,{ref:M,id:o,className:t.field,type:"number",placeholder:E??K,value:c,onChange:T,onBlur:H,onKeyDown:L,error:!!R,inputProps:{step:"0.01"},hideArrows:true,autoFocus:true,disableFocusRing:true}):jsxs(b,{id:o?`${o}-display`:void 0,"data-testid":o?`${o}-display`:"CurrencyAmount",className:t.display,component:"span",onClick:()=>{m(true);},children:[jsx("span",{className:t.integer,children:F}),d?jsxs(Fragment,{children:[jsx("span",{className:t.separator,children:"."}),jsx(v,{className:t.decimal,children:d})]}):null]})})});D.displayName="CurrencyAmountInput";var J=memo(D);export{t as a,J as b};
@@ -1 +1 @@
1
- import {a,d,b,c,j as j$1,e}from'./chunk-ZRRZG4CU.js';import {zc}from'./chunk-I3LSSBRI.js';import {fc,gc}from'./chunk-IQAHULGQ.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=zc(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?fc:gc:t?gc:fc,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};
1
+ import {a,d,b,c,j as j$1,e}from'./chunk-4JUVQWRF.js';import {Bc}from'./chunk-RUFO5P34.js';import {fc,gc}from'./chunk-IQAHULGQ.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=Bc(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?fc:gc:t?gc:fc,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};
@@ -1 +1 @@
1
- import {d,r as r$1}from'./chunk-K43ZLU4I.js';import {kc,lc}from'./chunk-I3LSSBRI.js';import {Td,Ye}from'./chunk-IQAHULGQ.js';import {forwardRef,useMemo,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var N="os-shared-Logo",r={root:`${N}-root`,skeleton:`${N}-skeleton`},C="logo";var I=styled(d)(({theme:n})=>({borderRadius:"50%",backgroundColor:n.palette.common.white}));var R=forwardRef(({className:n,sx:f,id:s,src:o,width:g=24,height:l=24,isError:e,isLoading:S,fallback:t,alt:P=C},U)=>{let m=useMemo(()=>typeof o!="string"&&!!o?.type?.includes("application/pdf"),[o]),d=useMemo(()=>o?typeof o=="string"?o:(window.URL?URL:webkitURL).createObjectURL(o):"",[o]),w=useMemo(()=>e||!o?typeof t=="string"&&t?t:Td:m?Ye:d,[o,t,e,m,d]);return S?jsx(r$1,{variant:"circular",className:r.skeleton,sx:kc({width:g,height:l,flexShrink:0},f),"data-testid":s??"Logo"}):(e||!o)&&t!==void 0&&typeof t!="string"?jsx(Fragment,{children:t}):jsx(I,{ref:U,id:s,"data-testid":s??"Logo",alt:P,src:w,className:lc(r.root,n),sx:kc({width:g,height:l,objectFit:m&&o&&!e?"none":"contain"},f)})});R.displayName="Logo";var D=memo(R);export{r as a,D as b};
1
+ import {d,r as r$1}from'./chunk-AXNWVU3K.js';import {mc,nc}from'./chunk-RUFO5P34.js';import {Td,Ye}from'./chunk-IQAHULGQ.js';import {forwardRef,useMemo,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var N="os-shared-Logo",r={root:`${N}-root`,skeleton:`${N}-skeleton`},C="logo";var I=styled(d)(({theme:n})=>({borderRadius:"50%",backgroundColor:n.palette.common.white}));var R=forwardRef(({className:n,sx:f,id:s,src:o,width:g=24,height:l=24,isError:e,isLoading:S,fallback:t,alt:P=C},U)=>{let m=useMemo(()=>typeof o!="string"&&!!o?.type?.includes("application/pdf"),[o]),d=useMemo(()=>o?typeof o=="string"?o:(window.URL?URL:webkitURL).createObjectURL(o):"",[o]),w=useMemo(()=>e||!o?typeof t=="string"&&t?t:Td:m?Ye:d,[o,t,e,m,d]);return S?jsx(r$1,{variant:"circular",className:r.skeleton,sx:mc({width:g,height:l,flexShrink:0},f),"data-testid":s??"Logo"}):(e||!o)&&t!==void 0&&typeof t!="string"?jsx(Fragment,{children:t}):jsx(I,{ref:U,id:s,"data-testid":s??"Logo",alt:P,src:w,className:nc(r.root,n),sx:mc({width:g,height:l,objectFit:m&&o&&!e?"none":"contain"},f)})});R.displayName="Logo";var D=memo(R);export{r as a,D as b};