@tap-payments/os-micro-frontend-shared 0.1.491 → 0.1.492-test.2

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 (400) hide show
  1. package/build/{chunk-HQMP5K4E.js → chunk-7JK4Z6IQ.js} +1 -1
  2. package/build/{chunk-ZTFNCBDJ.js → chunk-C5QNPNNY.js} +1 -1
  3. package/build/chunk-DSXKDOAD.js +1 -0
  4. package/build/chunk-LKNVJTYP.js +1 -0
  5. package/build/chunk-VRUT6M23.js +1 -0
  6. package/build/components/ActionMenu/ActionMenuDropDown.d.ts +1 -1
  7. package/build/components/ActionMenu/ActionMenuItem.d.ts +1 -1
  8. package/build/components/ActionMenu/type.d.ts +1 -1
  9. package/build/components/Amount/TotalAmount/TotalAmount.d.ts +1 -1
  10. package/build/components/Amount/index.js +1 -1
  11. package/build/components/AmountConversionFilter/AmountConversionFilter.d.ts +1 -1
  12. package/build/components/AmountConversionFilter/index.js +1 -1
  13. package/build/components/AmountInput/AmountInput.d.ts +1 -1
  14. package/build/components/AmountInput/index.js +1 -1
  15. package/build/components/AmountStatusChip/AmountStatusChip.d.ts +1 -1
  16. package/build/components/AmountStatusChip/style.d.ts +1 -1
  17. package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
  18. package/build/components/AppServices/AppServices.d.ts +1 -1
  19. package/build/components/AppServices/index.js +1 -1
  20. package/build/components/AppServicesBar/AppServicesBar.d.ts +1 -1
  21. package/build/components/AppServicesBar/index.js +1 -1
  22. package/build/components/AppWindowWrapper/headers/AppWindowHeader/type.d.ts +1 -1
  23. package/build/components/AuthenticationTypeChip/AuthenticationTypeChip.d.ts +1 -1
  24. package/build/components/Autocomplete/Autocomplete.d.ts +1 -1
  25. package/build/components/BrandLogo/index.js +1 -1
  26. package/build/components/Chip/style.d.ts +0 -1
  27. package/build/components/CopyImage/index.js +1 -1
  28. package/build/components/CountBadge/style.d.ts +0 -1
  29. package/build/components/CountryFilter/index.js +1 -1
  30. package/build/components/CurrencyFilter/CurrencyFilter.d.ts +1 -1
  31. package/build/components/CurrencyFilter/index.js +1 -1
  32. package/build/components/Customer/CustomerForms/CustomerEmailForm.d.ts +1 -1
  33. package/build/components/Customer/CustomerForms/CustomerFullInfo.d.ts +1 -1
  34. package/build/components/Customer/CustomerForms/CustomerFullInfoForm.d.ts +1 -1
  35. package/build/components/Customer/CustomerForms/CustomerPhoneNumberForm.d.ts +1 -1
  36. package/build/components/Customer/index.js +1 -1
  37. package/build/components/DateFilter/DateFilter.d.ts +1 -1
  38. package/build/components/DateFilter/index.js +1 -1
  39. package/build/components/DeviceIcon/DeviceIcon.d.ts +1 -1
  40. package/build/components/DeviceIcon/style.d.ts +1 -1
  41. package/build/components/Dialog/style.d.ts +0 -1
  42. package/build/components/Discount/DiscountDropdown/DiscountDropdown.d.ts +1 -1
  43. package/build/components/Discount/DiscountRateDropdown/DiscountRateDropdown.d.ts +1 -1
  44. package/build/components/Discount/TotalDiscount/TotalDiscount.d.ts +1 -1
  45. package/build/components/Discount/index.js +1 -1
  46. package/build/components/Discount/utils.d.ts +1 -1
  47. package/build/components/DropdownButton/type.d.ts +1 -1
  48. package/build/components/FileInputPreview/index.js +1 -1
  49. package/build/components/FileInputPreview/type.d.ts +1 -1
  50. package/build/components/FileInputPreview/utils.d.ts +1 -1
  51. package/build/components/FilePreview/type.d.ts +1 -1
  52. package/build/components/FileUploader/type.d.ts +1 -1
  53. package/build/components/FilterDropdown/components/FlatMerchantsListMenu/style.d.ts +1 -1
  54. package/build/components/FilterDropdown/components/MerchantsFilterItem/type.d.ts +1 -1
  55. package/build/components/FilterDropdown/components/MerchantsFilterItem/utils.d.ts +2 -2
  56. package/build/components/FilterDropdown/components/RetailersItem/RetailersItem.d.ts +1 -1
  57. package/build/components/FilterDropdown/index.js +1 -1
  58. package/build/components/FilterDropdown/type.d.ts +1 -1
  59. package/build/components/Filters/index.js +1 -1
  60. package/build/components/FlagDetails/index.js +1 -1
  61. package/build/components/FlippingCard/style.d.ts +0 -1
  62. package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
  63. package/build/components/InputBase/AmountInputBase/AmountInputBase.d.ts +1 -1
  64. package/build/components/InputBase/AmountInputBase/CurrencyList/CurrencyList.d.ts +1 -1
  65. package/build/components/InputBase/PhoneInputBase/CountriesList/CountriesList.d.ts +1 -1
  66. package/build/components/InputBase/PhoneInputBase/PhoneInputBase.d.ts +1 -1
  67. package/build/components/InputBase/SelectBase/DefaultClearIcon.d.ts +5 -0
  68. package/build/components/InputBase/SelectBase/DefaultSelectIcon.d.ts +5 -0
  69. package/build/components/InputBase/SelectBase/SelectBase.d.ts +11 -1
  70. package/build/components/InputBase/SelectBase/SelectBaseMultiple.d.ts +7 -1
  71. package/build/components/InputBase/SelectBase/hasSelectionValue.d.ts +2 -0
  72. package/build/components/InputBase/index.js +1 -1
  73. package/build/components/Inputs/CountriesDropDown/CountriesDropdown.d.ts +1 -1
  74. package/build/components/Inputs/SearchInput/SearchInput.d.ts +1 -1
  75. package/build/components/JSONViewer/components/JSONSearchBar/styles.d.ts +0 -1
  76. package/build/components/JSONViewer/style.d.ts +0 -1
  77. package/build/components/LanguageDropdown/index.js +1 -1
  78. package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
  79. package/build/components/ListColumnFilter/ListColumnFilter.d.ts +1 -1
  80. package/build/components/ListColumnFilter/index.js +1 -1
  81. package/build/components/MainContainer/MainContainer.d.ts +1 -1
  82. package/build/components/MaskedText/type.d.ts +1 -1
  83. package/build/components/MerchantCurrencyDropdown/MerchantCurrencyDropdown.d.ts +1 -1
  84. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  85. package/build/components/MerchantLogo/index.js +1 -1
  86. package/build/components/MerchantLogo/style.d.ts +1 -1
  87. package/build/components/MerchantsDropdown/BrandItem.d.ts +1 -1
  88. package/build/components/MerchantsDropdown/EntityItem.d.ts +1 -1
  89. package/build/components/MerchantsDropdown/EntityList.d.ts +1 -1
  90. package/build/components/MerchantsDropdown/MerchantItem.d.ts +2 -2
  91. package/build/components/MerchantsDropdown/MerchantsList.d.ts +1 -1
  92. package/build/components/MerchantsDropdown/hooks.d.ts +1 -1
  93. package/build/components/MerchantsDropdown/index.js +1 -1
  94. package/build/components/MerchantsDropdown/type.d.ts +1 -1
  95. package/build/components/MultiSelectDropdownButton/components/StatusButton.d.ts +1 -1
  96. package/build/components/MultiSelectDropdownButton/type.d.ts +1 -1
  97. package/build/components/MultiSelectStatusButton/style.d.ts +1 -1
  98. package/build/components/MultiSelectStatusButton/type.d.ts +1 -1
  99. package/build/components/NestedDropdown/NestedDropdown.d.ts +1 -1
  100. package/build/components/NestedDropdown/NestedMenuItem.d.ts +1 -1
  101. package/build/components/NestedDropdown/types.d.ts +1 -1
  102. package/build/components/PartnersFilter/index.js +1 -1
  103. package/build/components/PaymentSourceFilter/AuthenticationMode.d.ts +1 -1
  104. package/build/components/PaymentSourceFilter/PaymentInitiated.d.ts +2 -2
  105. package/build/components/PaymentSourceFilter/PaymentMethod.d.ts +1 -1
  106. package/build/components/PaymentSourceFilter/PaymentMethods.d.ts +1 -1
  107. package/build/components/PaymentSourceFilter/PaymentSchemes.d.ts +1 -1
  108. package/build/components/PaymentSourceFilter/PaymentSourceFilter.d.ts +3 -3
  109. package/build/components/PaymentSourceFilter/index.js +1 -1
  110. package/build/components/PhoneFilter/PhoneFilter.d.ts +1 -1
  111. package/build/components/PhoneFilter/index.js +1 -1
  112. package/build/components/RFH/Inputs/AmountInput/type.d.ts +1 -1
  113. package/build/components/RFH/Inputs/FormInput/FormInput.d.ts +1 -1
  114. package/build/components/RFH/Inputs/FormSelect/FormSelect.d.ts +2 -2
  115. package/build/components/RFH/Inputs/FormSelect/type.d.ts +1 -1
  116. package/build/components/RFH/Inputs/MultiSelect/MultiSelect.d.ts +0 -4
  117. package/build/components/RFH/Inputs/MultiSelect/style.d.ts +3 -0
  118. package/build/components/RFH/Inputs/PhoneInput/PhoneInput.d.ts +1 -1
  119. package/build/components/RFH/index.js +1 -1
  120. package/build/components/RangeCalender/components/Hijri/Hijri.d.ts +1 -1
  121. package/build/components/RangeCalender/components/Timezone/Timezone.d.ts +1 -1
  122. package/build/components/RangeCalender/components/Timezone/components/EntitiesTimezone.d.ts +1 -1
  123. package/build/components/RangeCalender/components/Timezone/components/UserTimezone.d.ts +1 -1
  124. package/build/components/RangeCalender/index.js +1 -1
  125. package/build/components/RangeCalender/type.d.ts +1 -1
  126. package/build/components/ReceiptsViewer/ReceiptsViewer.d.ts +1 -1
  127. package/build/components/ReceiptsViewer/index.js +1 -1
  128. package/build/components/ReceiptsViewer/type.d.ts +1 -1
  129. package/build/components/ReferenceTypeFilter/ReferenceTypeFilter.d.ts +1 -1
  130. package/build/components/ReferenceTypeFilter/index.js +1 -1
  131. package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
  132. package/build/components/SalesChannelFilter/SalesChannelFilter.d.ts +1 -1
  133. package/build/components/SalesChannelFilter/index.js +1 -1
  134. package/build/components/Sandbox/Sandbox.d.ts +1 -1
  135. package/build/components/SearchButton/styles.d.ts +0 -1
  136. package/build/components/SelectDropdown/index.js +1 -1
  137. package/build/components/SelectWithSearch/SelectWithSearch.d.ts +1 -1
  138. package/build/components/SelectWithSearch/index.js +1 -1
  139. package/build/components/SelectWithSearch/type.d.ts +7 -2
  140. package/build/components/StatusBar/StatusBar.d.ts +1 -1
  141. package/build/components/StatusBar/type.d.ts +2 -2
  142. package/build/components/StatusButton/type.d.ts +1 -1
  143. package/build/components/StatusChipWithCopy/StatusChipWithCopy.d.ts +2 -2
  144. package/build/components/StatusChipWithCopy/utils.d.ts +1 -1
  145. package/build/components/StatusFilter/StatusFilter.d.ts +2 -2
  146. package/build/components/StatusFilter/index.js +1 -1
  147. package/build/components/StatusFilter/utils.d.ts +1 -1
  148. package/build/components/StatusGroupChips/style.d.ts +1 -1
  149. package/build/components/StatusGroupChips/type.d.ts +1 -1
  150. package/build/components/StatusIcons/AuthIcons/constants.d.ts +1 -1
  151. package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
  152. package/build/components/StatusIcons/AuthIcons/type.d.ts +1 -1
  153. package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
  154. package/build/components/StatusIcons/AuthorizationAutoIcons/type.d.ts +1 -1
  155. package/build/components/StatusIcons/AuthorizedIcon/AuthorizedIcon.d.ts +2 -2
  156. package/build/components/StatusIcons/ChargeStatusIcon/ChargeStatusIcon.d.ts +2 -2
  157. package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
  158. package/build/components/StatusIcons/DestinationIcon/DestinationIcon.d.ts +1 -1
  159. package/build/components/StatusIcons/DeviceIcon/DeviceIcon.d.ts +1 -1
  160. package/build/components/StatusIcons/GeographyIcon/style.d.ts +1 -1
  161. package/build/components/StatusIcons/IssuerIcon/style.d.ts +1 -1
  162. package/build/components/StatusIcons/IssuerIcon/type.d.ts +1 -1
  163. package/build/components/StatusIcons/PayoutIcon/PayoutIcon.d.ts +2 -2
  164. package/build/components/StatusIcons/RefundIcon/RefundIcon.d.ts +2 -2
  165. package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
  166. package/build/components/StatusIcons/SourceIcons/type.d.ts +1 -1
  167. package/build/components/StatusIcons/index.js +1 -1
  168. package/build/components/TableCells/CustomCells/ActionCell/components/ActionsColumn.d.ts +1 -1
  169. package/build/components/TableCells/CustomCells/ActionCell/constant.d.ts +1 -1
  170. package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -2
  171. package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
  172. package/build/components/TableCells/CustomCells/AmountCell/components/ConversionTypeLabel.d.ts +1 -1
  173. package/build/components/TableCells/CustomCells/AmountCell/components/CurrencyInfo.d.ts +1 -1
  174. package/build/components/TableCells/CustomCells/AmountCell/style.d.ts +1 -1
  175. package/build/components/TableCells/CustomCells/AmountCell/type.d.ts +1 -1
  176. package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
  177. package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
  178. package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
  179. package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
  180. package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
  181. package/build/components/TableCells/CustomCells/BalanceCell/type.d.ts +1 -1
  182. package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
  183. package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
  184. package/build/components/TableCells/CustomCells/CustomerCell/style.d.ts +1 -1
  185. package/build/components/TableCells/CustomCells/DateCell/DateCell.d.ts +1 -1
  186. package/build/components/TableCells/CustomCells/DestinationCell/styled.d.ts +1 -1
  187. package/build/components/TableCells/CustomCells/DestinationCell/type.d.ts +1 -1
  188. package/build/components/TableCells/CustomCells/DestinationStatusCell/constant.d.ts +1 -1
  189. package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
  190. package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
  191. package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
  192. package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
  193. package/build/components/TableCells/CustomCells/InvoiceStatusCell/ChargeStatusIcon.d.ts +1 -1
  194. package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
  195. package/build/components/TableCells/CustomCells/OrdersCell/OrdersCellSheet.d.ts +1 -1
  196. package/build/components/TableCells/CustomCells/PaymentAgreementCell/type.d.ts +1 -1
  197. package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
  198. package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
  199. package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
  200. package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
  201. package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
  202. package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
  203. package/build/components/TableCells/CustomCells/RefundStatusCell/type.d.ts +1 -1
  204. package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
  205. package/build/components/TableCells/CustomCells/SalesChannelCell/type.d.ts +1 -1
  206. package/build/components/TableCells/CustomCells/SalesChannelCell/utils.d.ts +1 -1
  207. package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
  208. package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/AuthenticationMode.d.ts +1 -1
  209. package/build/components/TableCells/CustomCells/StatusCell/constant.d.ts +1 -1
  210. package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
  211. package/build/components/TableCells/CustomCells/TextWithChipCell/TextWithChipCell.d.ts +2 -2
  212. package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
  213. package/build/components/TableCells/CustomCells/style.d.ts +0 -1
  214. package/build/components/TableCells/CustomCells/type.d.ts +2 -2
  215. package/build/components/TableCells/index.js +1 -1
  216. package/build/components/TableHeader/TableHeader.d.ts +1 -1
  217. package/build/components/TableHeader/TableModeButton.d.ts +1 -1
  218. package/build/components/TableHeader/TableView/ColumnItem.d.ts +1 -1
  219. package/build/components/TableHeader/TableView/hooks/useColumnItem.d.ts +1 -1
  220. package/build/components/TableHeader/TableView/hooks/useCreateViewDialog.d.ts +1 -1
  221. package/build/components/TableHeader/TableView/hooks/useCustomTableViews.d.ts +1 -1
  222. package/build/components/TableHeader/TableView/hooks/useOriginalColumns.d.ts +1 -1
  223. package/build/components/TableHeader/TableView/hooks/useViewColumns.d.ts +1 -1
  224. package/build/components/TableHeader/TableView/hooks/useViewsManager.d.ts +1 -1
  225. package/build/components/TableHeader/TableView/hooks/useViewsMenu.d.ts +1 -1
  226. package/build/components/TableHeader/TableView/types.d.ts +1 -1
  227. package/build/components/TableHeader/TableView/utils/columnState.d.ts +1 -1
  228. package/build/components/TableHeader/TableView/utils/customTableViews.d.ts +1 -1
  229. package/build/components/TableHeader/TableView/utils/layoutTransform.d.ts +1 -1
  230. package/build/components/TableHeader/TableView/utils/templateToColumnsView.d.ts +1 -1
  231. package/build/components/TableHeader/TableView/utils/viewMenu.d.ts +1 -1
  232. package/build/components/TableHeader/index.js +1 -1
  233. package/build/components/TableHeader/type.d.ts +3 -3
  234. package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
  235. package/build/components/TableReports/index.js +1 -1
  236. package/build/components/TableReports/style.d.ts +0 -1
  237. package/build/components/TooltipChip/TooltipChip.d.ts +2 -2
  238. package/build/components/TooltipChip/style.d.ts +1 -1
  239. package/build/components/TreeDropdown/TreeNodeItem/style.d.ts +1 -1
  240. package/build/components/TreeDropdown/index.js +1 -1
  241. package/build/components/TreeDropdown/type.d.ts +1 -1
  242. package/build/components/VAT/TotalVAT/TotalVAT.d.ts +1 -1
  243. package/build/components/VAT/VATDropdown/VATDropdown.d.ts +1 -1
  244. package/build/components/VAT/VATRateDropdown/VATRateDropdown.d.ts +1 -1
  245. package/build/components/VAT/index.js +1 -1
  246. package/build/components/VAT/utils.d.ts +1 -1
  247. package/build/components/VerificationIcon/index.js +1 -1
  248. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  249. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeaderCell.d.ts +1 -1
  250. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.d.ts +1 -1
  251. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableNoData.d.ts +1 -1
  252. package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableRowLoading.d.ts +1 -1
  253. package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualTable.d.ts +1 -1
  254. package/build/components/VirtualTables/SheetViewVirtualTable/features/resize/hooks/useColumnResizeWithPinned.d.ts +13 -13
  255. package/build/components/VirtualTables/SheetViewVirtualTable/features/resize/types/index.d.ts +1 -1
  256. package/build/components/VirtualTables/SheetViewVirtualTable/features/resize/utils/resize.d.ts +1 -1
  257. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumns.d.ts +1 -1
  258. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumnsWidths.d.ts +1 -1
  259. package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.d.ts +1 -1
  260. package/build/components/VirtualTables/SheetViewVirtualTable/types.d.ts +1 -1
  261. package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
  262. package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.d.ts +1 -1
  263. package/build/components/VirtualTables/components/ColumnFilter/Inputs/Inputs.d.ts +1 -1
  264. package/build/components/VirtualTables/components/ColumnFilter/List/List.d.ts +1 -1
  265. package/build/components/VirtualTables/components/ColumnFilter/type.d.ts +1 -1
  266. package/build/components/VirtualTables/components/ColumnSort/ColumnSort.d.ts +1 -1
  267. package/build/components/VirtualTables/components/TableFooter/TableFooter.d.ts +1 -1
  268. package/build/components/VirtualTables/components/TableHeader/components/TableCell/TableCell.d.ts +2 -2
  269. package/build/components/VirtualTables/components/TableHeader/type.d.ts +1 -1
  270. package/build/components/VirtualTables/components/TableLoading.d.ts +1 -1
  271. package/build/components/VirtualTables/components/TableNoData.d.ts +1 -1
  272. package/build/components/VirtualTables/components/TableNoDataWithCard.d.ts +1 -1
  273. package/build/components/VirtualTables/components/TableRow.d.ts +1 -1
  274. package/build/components/VirtualTables/components/TableRowLoading.d.ts +1 -1
  275. package/build/components/VirtualTables/components/style.d.ts +0 -1
  276. package/build/components/VirtualTables/components/virtualScroll/ListItemWrapper.d.ts +1 -1
  277. package/build/components/VirtualTables/hooks/useColumnFilter.d.ts +1 -1
  278. package/build/components/WindowSideBar/index.js +1 -1
  279. package/build/components/index.js +1 -1
  280. package/build/constants/segment.d.ts +1 -1
  281. package/build/constants/timezones.d.ts +1 -1
  282. package/build/demo/TapOSIconsGallery/style.d.ts +1 -1
  283. package/build/docs/.storybook/story-utils.d.ts +19 -0
  284. package/build/docs/.storybook/story-utils.js +96 -0
  285. package/build/hooks/useAppsInfo.d.ts +3 -3
  286. package/build/hooks/useIsParameterSelected.d.ts +1 -1
  287. package/build/hooks/useSelectedMerchantDetails.d.ts +2 -2
  288. package/build/hooks/useToast.d.ts +1 -1
  289. package/build/index.js +1 -1
  290. package/build/theme/theme.d.ts +1 -1
  291. package/build/theme/typography.d.ts +1 -1
  292. package/build/types/appEvents.d.ts +1 -1
  293. package/build/types/apps.d.ts +1 -1
  294. package/build/types/cell.d.ts +2 -2
  295. package/build/types/document.d.ts +1 -1
  296. package/build/types/invoice.d.ts +1 -1
  297. package/build/types/refund.d.ts +1 -1
  298. package/build/types/table.d.ts +2 -2
  299. package/build/types/toggleOptions.d.ts +1 -1
  300. package/build/types/views.d.ts +1 -1
  301. package/build/utils/billing.d.ts +1 -1
  302. package/build/utils/columns.d.ts +1 -1
  303. package/build/utils/conversion.d.ts +1 -1
  304. package/build/utils/currency.d.ts +1 -1
  305. package/build/utils/day.d.ts +1 -1
  306. package/build/utils/entity.d.ts +1 -1
  307. package/build/utils/error.d.ts +1 -1
  308. package/build/utils/file.d.ts +1 -1
  309. package/build/utils/freshdesk.d.ts +1 -1
  310. package/build/utils/language.d.ts +1 -1
  311. package/build/utils/localStorage.d.ts +1 -1
  312. package/build/utils/merchant.d.ts +1 -1
  313. package/build/utils/merchantSource.d.ts +1 -1
  314. package/build/utils/navigation.d.ts +3 -3
  315. package/build/utils/segment.d.ts +1 -1
  316. package/build/utils/skeletonColumns.d.ts +1 -1
  317. package/build/utils/table.d.ts +1 -1
  318. package/build/utils/views.d.ts +1 -1
  319. package/docs/.storybook/main.ts +23 -0
  320. package/docs/.storybook/preview.tsx +106 -0
  321. package/docs/.storybook/story-utils.tsx +196 -0
  322. package/docs/01-overview.md +158 -0
  323. package/docs/02-setup.md +326 -0
  324. package/docs/03-architecture.md +438 -0
  325. package/docs/04-component-guide.md +133 -0
  326. package/docs/05-component-development.md +173 -0
  327. package/docs/README.md +38 -0
  328. package/docs/stories/components/Accordion.stories.tsx +302 -0
  329. package/docs/stories/components/AccordionAdapter.stories.tsx +201 -0
  330. package/docs/stories/components/AccountDropdown.stories.tsx +113 -0
  331. package/docs/stories/components/AnimatedSpinnerIcon.stories.tsx +54 -0
  332. package/docs/stories/components/BackgroundAnimation.stories.tsx +139 -0
  333. package/docs/stories/components/BetaBanner.stories.tsx +170 -0
  334. package/docs/stories/components/Button.stories.tsx +132 -0
  335. package/docs/stories/components/CardEmptyState.stories.tsx +43 -0
  336. package/docs/stories/components/CardHeadline.stories.tsx +208 -0
  337. package/docs/stories/components/Chip.stories.tsx +106 -0
  338. package/docs/stories/components/CircularProgressWithLabel.stories.tsx +111 -0
  339. package/docs/stories/components/Collapse.stories.tsx +100 -0
  340. package/docs/stories/components/CountBadge.stories.tsx +115 -0
  341. package/docs/stories/components/CountryFlag.stories.tsx +91 -0
  342. package/docs/stories/components/CurrencySymbol.stories.tsx +108 -0
  343. package/docs/stories/components/DeviceIcon.stories.tsx +122 -0
  344. package/docs/stories/components/Dialog.stories.tsx +270 -0
  345. package/docs/stories/components/DisplayAmount.stories.tsx +102 -0
  346. package/docs/stories/components/DockButton.stories.tsx +118 -0
  347. package/docs/stories/components/ExpandableSideBar.stories.tsx +120 -0
  348. package/docs/stories/components/FlippingCard.stories.tsx +122 -0
  349. package/docs/stories/components/HeatMap.stories.tsx +199 -0
  350. package/docs/stories/components/IconWithBadge.stories.tsx +136 -0
  351. package/docs/stories/components/JSONViewer.stories.tsx +92 -0
  352. package/docs/stories/components/LeftPeekRightExpandingChip.stories.tsx +127 -0
  353. package/docs/stories/components/Loader.stories.tsx +116 -0
  354. package/docs/stories/components/NoInternet.stories.tsx +43 -0
  355. package/docs/stories/components/ProgressBar.stories.tsx +99 -0
  356. package/docs/stories/components/ProgressRing.stories.tsx +139 -0
  357. package/docs/stories/components/SimpleDialog.stories.tsx +170 -0
  358. package/docs/stories/components/Skeleton.stories.tsx +253 -0
  359. package/docs/stories/components/StatusButton.stories.tsx +84 -0
  360. package/docs/stories/components/StatusChip.stories.tsx +149 -0
  361. package/docs/stories/components/StatusLabel.stories.tsx +85 -0
  362. package/docs/stories/components/Text.stories.tsx +110 -0
  363. package/docs/stories/components/Toaster.stories.tsx +65 -0
  364. package/docs/stories/components/Tooltip.stories.tsx +218 -0
  365. package/docs/stories/components/TooltipChip.stories.tsx +104 -0
  366. package/docs/stories/components/WindowAppIcon.stories.tsx +76 -0
  367. package/docs/stories/components/inputs/ActionMenu.stories.tsx +125 -0
  368. package/docs/stories/components/inputs/AmountInput.stories.tsx +103 -0
  369. package/docs/stories/components/inputs/Autocomplete.stories.tsx +209 -0
  370. package/docs/stories/components/inputs/Calender.stories.tsx +105 -0
  371. package/docs/stories/components/inputs/Checkbox.stories.tsx +78 -0
  372. package/docs/stories/components/inputs/ColorPicker.stories.tsx +160 -0
  373. package/docs/stories/components/inputs/CopyImage.stories.tsx +116 -0
  374. package/docs/stories/components/inputs/CountryFilter.stories.tsx +100 -0
  375. package/docs/stories/components/inputs/CurrencyFilter.stories.tsx +140 -0
  376. package/docs/stories/components/inputs/DateFilter.stories.tsx +144 -0
  377. package/docs/stories/components/inputs/DropdownButton.stories.tsx +187 -0
  378. package/docs/stories/components/inputs/DropdownMenu.stories.tsx +282 -0
  379. package/docs/stories/components/inputs/FormSelect.stories.tsx +235 -0
  380. package/docs/stories/components/inputs/IOSSwitch.stories.tsx +95 -0
  381. package/docs/stories/components/inputs/Input.stories.tsx +121 -0
  382. package/docs/stories/components/inputs/InputNumber.stories.tsx +163 -0
  383. package/docs/stories/components/inputs/MerchantCurrencyDropdown.stories.tsx +192 -0
  384. package/docs/stories/components/inputs/MultiSelect.stories.tsx +369 -0
  385. package/docs/stories/components/inputs/MultiSelectWithSearch.stories.tsx +141 -0
  386. package/docs/stories/components/inputs/NestedDropdown.stories.tsx +143 -0
  387. package/docs/stories/components/inputs/OTPInput.stories.tsx +140 -0
  388. package/docs/stories/components/inputs/PartnersFilter.stories.tsx +114 -0
  389. package/docs/stories/components/inputs/RadioButton.stories.tsx +135 -0
  390. package/docs/stories/components/inputs/RadioGroup.stories.tsx +145 -0
  391. package/docs/stories/components/inputs/RangeCalender.stories.tsx +179 -0
  392. package/docs/stories/components/inputs/SearchListInput.stories.tsx +87 -0
  393. package/docs/stories/components/inputs/SelectDropdown.stories.tsx +153 -0
  394. package/docs/stories/components/inputs/SelectWithSearch.stories.tsx +290 -0
  395. package/docs/stories/components/inputs/Timepicker.stories.tsx +91 -0
  396. package/docs/stories/components/inputs/ToggleButtons.stories.tsx +242 -0
  397. package/package.json +4 -3
  398. package/build/chunk-CC4HU4H6.js +0 -1
  399. package/build/chunk-NET3U5QO.js +0 -1
  400. package/build/chunk-QLEUEVEZ.js +0 -1
@@ -0,0 +1,144 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite'
2
+ import { useState } from 'react'
3
+ import Box from '@mui/material/Box'
4
+ import { DateFilter } from '@components/DateFilter'
5
+ import type { Timezone } from '@types'
6
+
7
+ const mockTimezone: Timezone = {
8
+ countryCode: 'KW',
9
+ label: 'Kuwait (GMT+3)',
10
+ timezone: 'Asia/Kuwait',
11
+ offset: 3,
12
+ }
13
+
14
+ const meta: Meta<typeof DateFilter> = {
15
+ title: 'Components/Inputs/DateFilter',
16
+ component: DateFilter,
17
+ tags: ['autodocs'],
18
+ argTypes: {
19
+ title: { control: 'text', description: 'Label displayed on the filter trigger' },
20
+ calendarMode: {
21
+ control: 'select',
22
+ options: ['gregorian', 'hijri'],
23
+ description: 'Calendar display mode',
24
+ },
25
+ },
26
+ parameters: {
27
+ layout: 'padded',
28
+ controls: { expanded: true },
29
+ },
30
+ }
31
+
32
+ export default meta
33
+ type Story = StoryObj<typeof DateFilter>
34
+
35
+ // ──────────────────────────────────────────────
36
+ // Named wrapper components
37
+
38
+ const DateFilterBase = () => {
39
+ const [dateRange, setDateRange] = useState<[Date, Date] | undefined>(undefined)
40
+ const [calendarMode, setCalendarMode] = useState<'gregorian' | 'hijri'>('gregorian')
41
+ const [timezone, setTimezone] = useState<Timezone | null>(null)
42
+
43
+ return (
44
+ <Box sx={{ display: 'flex', justifyContent: 'center', pt: 2 }}>
45
+ <DateFilter
46
+ title="Date"
47
+ dateRange={dateRange}
48
+ onDateRangeChange={(range) => setDateRange(range as [Date, Date])}
49
+ onConfirm={(range) => setDateRange(range)}
50
+ onClear={() => setDateRange(undefined)}
51
+ calendarMode={calendarMode}
52
+ onCalendarModeChange={setCalendarMode}
53
+ timezone={timezone}
54
+ onTimezoneChange={setTimezone}
55
+ browserTimezone="Asia/Kuwait"
56
+ defaultCountryTimezone={mockTimezone}
57
+ timezoneCountriesCodes={['KW', 'SA', 'AE', 'EG', 'JO']}
58
+ />
59
+ </Box>
60
+ )
61
+ }
62
+
63
+ const DateFilterPreSelected = () => {
64
+ const today = new Date()
65
+ const lastWeek = new Date(today)
66
+ lastWeek.setDate(today.getDate() - 7)
67
+
68
+ const [dateRange, setDateRange] = useState<[Date, Date] | undefined>([lastWeek, today])
69
+ const [calendarMode, setCalendarMode] = useState<'gregorian' | 'hijri'>('gregorian')
70
+ const [timezone, setTimezone] = useState<Timezone | null>(null)
71
+
72
+ return (
73
+ <Box sx={{ display: 'flex', justifyContent: 'center', pt: 2 }}>
74
+ <DateFilter
75
+ title="Date"
76
+ dateRange={dateRange}
77
+ onDateRangeChange={(range) => setDateRange(range as [Date, Date])}
78
+ onConfirm={(range) => setDateRange(range)}
79
+ onClear={() => setDateRange(undefined)}
80
+ calendarMode={calendarMode}
81
+ onCalendarModeChange={setCalendarMode}
82
+ timezone={timezone}
83
+ onTimezoneChange={setTimezone}
84
+ browserTimezone="Asia/Kuwait"
85
+ defaultCountryTimezone={mockTimezone}
86
+ timezoneCountriesCodes={['KW', 'SA', 'AE', 'EG', 'JO']}
87
+ />
88
+ </Box>
89
+ )
90
+ }
91
+
92
+ // ──────────────────────────────────────────────
93
+ // Focused stories
94
+
95
+ export const Base: Story = {
96
+ parameters: {
97
+ docs: {
98
+ source: {
99
+ language: 'tsx',
100
+ code: `
101
+ const [dateRange, setDateRange] = useState<[Date, Date] | undefined>(undefined)
102
+ const [timezone, setTimezone] = useState<Timezone | null>(null)
103
+
104
+ <DateFilter
105
+ title="Date"
106
+ dateRange={dateRange}
107
+ onDateRangeChange={setDateRange}
108
+ onConfirm={setDateRange}
109
+ onClear={() => setDateRange(undefined)}
110
+ calendarMode="gregorian"
111
+ onCalendarModeChange={() => {}}
112
+ timezone={timezone}
113
+ onTimezoneChange={setTimezone}
114
+ browserTimezone="Asia/Kuwait"
115
+ defaultCountryTimezone={mockTimezone}
116
+ timezoneCountriesCodes={['KW', 'SA', 'AE']}
117
+ />
118
+ `.trim(),
119
+ },
120
+ },
121
+ },
122
+ render: () => <DateFilterBase />,
123
+ }
124
+
125
+ export const WithDateRange: Story = {
126
+ name: 'with pre-selected date range',
127
+ parameters: {
128
+ docs: {
129
+ source: {
130
+ language: 'tsx',
131
+ code: `
132
+ const today = new Date()
133
+ const lastWeek = new Date(today)
134
+ lastWeek.setDate(today.getDate() - 7)
135
+
136
+ const [dateRange, setDateRange] = useState<[Date, Date]>([lastWeek, today])
137
+
138
+ <DateFilter dateRange={dateRange} onConfirm={setDateRange} ... />
139
+ `.trim(),
140
+ },
141
+ },
142
+ },
143
+ render: () => <DateFilterPreSelected />,
144
+ }
@@ -0,0 +1,187 @@
1
+ import { useState } from 'react'
2
+ import type { Meta, StoryObj } from '@storybook/react-vite'
3
+ import Box from '@mui/material/Box'
4
+ import Typography from '@mui/material/Typography'
5
+ import DropdownButton from '@components/DropdownButton'
6
+ import type { MenuItemI } from '@components/DropdownMenu'
7
+ import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
8
+
9
+ const makeMenuItems = (onSelect?: (label: string) => void): MenuItemI[] => [
10
+ {
11
+ label: 'Newest first',
12
+ onClick: () => onSelect?.('Newest first'),
13
+ },
14
+ {
15
+ label: 'Oldest first',
16
+ onClick: () => onSelect?.('Oldest first'),
17
+ },
18
+ {
19
+ name: 'divider',
20
+ },
21
+ {
22
+ label: 'Reset sorting',
23
+ onClick: () => onSelect?.('Reset sorting'),
24
+ },
25
+ ]
26
+
27
+ const meta: Meta<typeof DropdownButton> = {
28
+ title: 'Components/Inputs/DropdownButton',
29
+ component: DropdownButton,
30
+ tags: ['autodocs'],
31
+ argTypes: {
32
+ variant: {
33
+ control: 'radio',
34
+ options: ['active', 'inActive'],
35
+ description: 'Visual style of the button body',
36
+ },
37
+ label: { control: 'text' },
38
+ disabled: { control: 'boolean' },
39
+ dropdownOptions: { table: { disable: true } },
40
+ onClick: { table: { disable: true } },
41
+ onButtonBodyClick: { table: { disable: true } },
42
+ },
43
+ parameters: {
44
+ layout: 'padded',
45
+ controls: { expanded: true },
46
+ },
47
+ decorators: [
48
+ (Story) => (
49
+ <Box sx={{ display: 'flex', justifyContent: 'center', width: '100%', minHeight: 180, pt: 4 }}>
50
+ <Story />
51
+ </Box>
52
+ ),
53
+ ],
54
+ }
55
+
56
+ export default meta
57
+
58
+ type Story = StoryObj<typeof DropdownButton>
59
+
60
+ export const Base: Story = {
61
+ args: {
62
+ variant: 'inActive',
63
+ label: 'Status',
64
+ },
65
+ }
66
+
67
+ export const Active: Story = {
68
+ args: {
69
+ variant: 'active',
70
+ label: 'Status',
71
+ },
72
+ }
73
+
74
+ export const WithDropdown: Story = {
75
+ args: {
76
+ variant: 'inActive',
77
+ label: 'Sort by',
78
+ dropdownOptions: makeMenuItems(),
79
+ },
80
+ }
81
+
82
+ export const Disabled: Story = {
83
+ args: {
84
+ variant: 'inActive',
85
+ label: 'Disabled',
86
+ disabled: true,
87
+ dropdownOptions: makeMenuItems(),
88
+ },
89
+ }
90
+
91
+ type DropdownButtonOverride = Partial<Parameters<typeof DropdownButton>[0]>
92
+
93
+ const tableColumns = ['STYLE', 'NO DROPDOWN', 'WITH DROPDOWN', 'DISABLED'] as const
94
+
95
+ const variantRows: Array<{ label: string; cells: DropdownButtonOverride[] }> = [
96
+ {
97
+ label: 'InActive',
98
+ cells: [
99
+ { variant: 'inActive', label: 'Filter' },
100
+ { variant: 'inActive', label: 'Filter', dropdownOptions: makeMenuItems() },
101
+ { variant: 'inActive', label: 'Filter', dropdownOptions: makeMenuItems(), disabled: true },
102
+ ],
103
+ },
104
+ {
105
+ label: 'Active',
106
+ cells: [
107
+ { variant: 'active', label: 'Filter' },
108
+ { variant: 'active', label: 'Filter', dropdownOptions: makeMenuItems() },
109
+ { variant: 'active', label: 'Filter', dropdownOptions: makeMenuItems(), disabled: true },
110
+ ],
111
+ },
112
+ ]
113
+
114
+ export const AllVariants: Story = {
115
+ name: 'all variants',
116
+ decorators: [],
117
+ render: (args) => {
118
+ const renderButton = (override: DropdownButtonOverride = {}) => <DropdownButton {...args} {...override} />
119
+
120
+ return (
121
+ <Box sx={{ maxWidth: 960, mx: 'auto' }}>
122
+ <StoryTable>
123
+ <StoryThead>
124
+ <StoryRow>
125
+ {tableColumns.map((header, index) => (
126
+ <StoryHeaderCell key={header} first={index === 0}>
127
+ {header}
128
+ </StoryHeaderCell>
129
+ ))}
130
+ </StoryRow>
131
+ </StoryThead>
132
+
133
+ <StoryTbody>
134
+ {variantRows.map(({ label, cells }) => (
135
+ <StoryRow key={label}>
136
+ <StoryRowLabel>{label}</StoryRowLabel>
137
+ {cells.map((override, index) => (
138
+ <StoryCell key={`${label}-${index}`}>{renderButton(override)}</StoryCell>
139
+ ))}
140
+ </StoryRow>
141
+ ))}
142
+ </StoryTbody>
143
+ </StoryTable>
144
+
145
+ <StoryHint>Buttons with dropdown options show the chevron and open the menu on click.</StoryHint>
146
+ </Box>
147
+ )
148
+ },
149
+ args: {},
150
+ }
151
+
152
+ function InteractiveRender() {
153
+ const [lastSelection, setLastSelection] = useState('None')
154
+
155
+ return (
156
+ <Box sx={{ display: 'grid', gap: 1.5, justifyItems: 'center' }}>
157
+ <DropdownButton variant="active" label="Sort transactions" dropdownOptions={makeMenuItems(setLastSelection)} />
158
+ <Typography variant="caption" color="text.secondary">
159
+ Last selected: {lastSelection}
160
+ </Typography>
161
+ </Box>
162
+ )
163
+ }
164
+
165
+ export const Interactive: Story = {
166
+ name: 'interactive',
167
+ render: InteractiveRender,
168
+ parameters: {
169
+ docs: {
170
+ source: {
171
+ language: 'tsx',
172
+ code: `
173
+ const [lastSelection, setLastSelection] = useState('None')
174
+
175
+ <DropdownButton
176
+ variant="active"
177
+ label="Sort transactions"
178
+ dropdownOptions={[
179
+ { label: 'Newest first', onClick: () => setLastSelection('Newest first') },
180
+ { label: 'Oldest first', onClick: () => setLastSelection('Oldest first') },
181
+ ]}
182
+ />
183
+ `.trim(),
184
+ },
185
+ },
186
+ },
187
+ }
@@ -0,0 +1,282 @@
1
+ import { useMemo, useState } from 'react'
2
+ import type { Meta, StoryObj } from '@storybook/react-vite'
3
+ import Box from '@mui/material/Box'
4
+ import Button from '@mui/material/Button'
5
+ import Typography from '@mui/material/Typography'
6
+ import DropdownMenu, { type MenuItemI } from '@components/DropdownMenu'
7
+ import { StoryFlexRow, StoryHint } from '@storybook-utils'
8
+
9
+ const baseMenuItems: MenuItemI[] = [{ label: 'Newest first' }, { label: 'Oldest first' }, { name: 'divider' }, { label: 'Reset filters' }]
10
+
11
+ const iconMenuItems: MenuItemI[] = [
12
+ { label: 'Open', icon: <span>O</span> },
13
+ { label: 'Duplicate', icon: <span>D</span> },
14
+ { label: 'Archive', icon: <span>A</span>, rightAction: <span>cmd+k</span> },
15
+ ]
16
+
17
+ const meta: Meta<typeof DropdownMenu> = {
18
+ title: 'Components/Inputs/DropdownMenu',
19
+ component: DropdownMenu,
20
+ tags: ['autodocs'],
21
+ argTypes: {
22
+ open: { table: { disable: true } },
23
+ anchorEl: { table: { disable: true } },
24
+ menuItems: { table: { disable: true } },
25
+ onClose: { table: { disable: true } },
26
+ footer: { table: { disable: true } },
27
+ selected: { control: { type: 'number', min: 0, step: 1 } },
28
+ multiple: { control: 'boolean' },
29
+ allowShadows: { control: 'boolean' },
30
+ },
31
+ parameters: {
32
+ layout: 'padded',
33
+ controls: { expanded: true },
34
+ },
35
+ decorators: [
36
+ (Story) => (
37
+ <Box sx={{ display: 'flex', justifyContent: 'center', width: '100%', py: 4, minHeight: 220 }}>
38
+ <Story />
39
+ </Box>
40
+ ),
41
+ ],
42
+ }
43
+
44
+ export default meta
45
+
46
+ type Story = StoryObj<typeof DropdownMenu>
47
+
48
+ function BaseRender() {
49
+ const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
50
+ const [lastAction, setLastAction] = useState('None')
51
+
52
+ const open = Boolean(anchorEl)
53
+
54
+ const items = useMemo(
55
+ () =>
56
+ baseMenuItems.map((item) => ({
57
+ ...item,
58
+ onClick: () => {
59
+ if (item.label) {
60
+ setLastAction(String(item.label))
61
+ }
62
+ setAnchorEl(null)
63
+ },
64
+ })),
65
+ []
66
+ )
67
+
68
+ return (
69
+ <Box sx={{ display: 'grid', justifyItems: 'center', gap: 1.5 }}>
70
+ <Button variant="outlined" sx={{ minWidth: 160, height: 36 }} onClick={(e) => setAnchorEl(open ? null : e.currentTarget)}>
71
+ Toggle menu
72
+ </Button>
73
+
74
+ <DropdownMenu open={open} anchorEl={anchorEl} menuItems={items} onClose={() => setAnchorEl(null)} />
75
+
76
+ <Typography variant="caption" color="text.secondary">
77
+ Last action: {lastAction}
78
+ </Typography>
79
+ </Box>
80
+ )
81
+ }
82
+
83
+ export const Base: Story = {
84
+ render: BaseRender,
85
+ parameters: {
86
+ docs: {
87
+ source: {
88
+ language: 'tsx',
89
+ code: `
90
+ const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
91
+ const open = Boolean(anchorEl)
92
+
93
+ <Button onClick={(e) => setAnchorEl(open ? null : e.currentTarget)}>Toggle menu</Button>
94
+
95
+ <DropdownMenu
96
+ open={open}
97
+ anchorEl={anchorEl}
98
+ menuItems={menuItems}
99
+ onClose={() => setAnchorEl(null)}
100
+ />
101
+ `.trim(),
102
+ },
103
+ },
104
+ },
105
+ }
106
+
107
+ function WithIconsRender() {
108
+ const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
109
+
110
+ const open = Boolean(anchorEl)
111
+
112
+ return (
113
+ <Box sx={{ display: 'grid', justifyItems: 'center', gap: 1.5 }}>
114
+ <Button variant="contained" sx={{ minWidth: 160, height: 36 }} onClick={(e) => setAnchorEl(open ? null : e.currentTarget)}>
115
+ Open icon menu
116
+ </Button>
117
+ <DropdownMenu open={open} anchorEl={anchorEl} menuItems={iconMenuItems} onClose={() => setAnchorEl(null)} />
118
+ </Box>
119
+ )
120
+ }
121
+
122
+ export const WithIcons: Story = {
123
+ name: 'with icons',
124
+ render: WithIconsRender,
125
+ parameters: {
126
+ docs: {
127
+ source: {
128
+ language: 'tsx',
129
+ code: `
130
+ const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
131
+ const open = Boolean(anchorEl)
132
+
133
+ const menuItems = [
134
+ { label: 'Open', icon: <OpenIcon /> },
135
+ { label: 'Duplicate', icon: <DuplicateIcon /> },
136
+ { label: 'Archive', icon: <ArchiveIcon />, rightAction: <span>cmd+k</span> },
137
+ ]
138
+
139
+ <Button onClick={(e) => setAnchorEl(open ? null : e.currentTarget)}>Open icon menu</Button>
140
+
141
+ <DropdownMenu
142
+ open={open}
143
+ anchorEl={anchorEl}
144
+ menuItems={menuItems}
145
+ onClose={() => setAnchorEl(null)}
146
+ />
147
+ `.trim(),
148
+ },
149
+ },
150
+ },
151
+ }
152
+
153
+ function MultipleRender() {
154
+ const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
155
+ const [selectedValues, setSelectedValues] = useState<string[]>(['success'])
156
+
157
+ const open = Boolean(anchorEl)
158
+
159
+ const options = useMemo(
160
+ () =>
161
+ [
162
+ { label: 'Success', value: 'success' },
163
+ { label: 'Failed', value: 'failed' },
164
+ { label: 'Pending', value: 'pending' },
165
+ ].map((option) => ({
166
+ label: option.label,
167
+ selected: selectedValues.includes(option.value),
168
+ onClick: () => {
169
+ setSelectedValues((prev) => {
170
+ if (prev.includes(option.value)) {
171
+ return prev.filter((value) => value !== option.value)
172
+ }
173
+
174
+ return [...prev, option.value]
175
+ })
176
+ },
177
+ })),
178
+ [selectedValues]
179
+ )
180
+
181
+ return (
182
+ <Box sx={{ display: 'grid', justifyItems: 'center', gap: 1.5 }}>
183
+ <Button variant="outlined" sx={{ minWidth: 160, height: 36 }} onClick={(e) => setAnchorEl(open ? null : e.currentTarget)}>
184
+ Open multi-select menu
185
+ </Button>
186
+ <DropdownMenu open={open} anchorEl={anchorEl} menuItems={options} multiple onClose={() => setAnchorEl(null)} />
187
+ <Typography variant="caption" color="text.secondary">
188
+ Selected: {selectedValues.join(', ') || 'none'}
189
+ </Typography>
190
+ </Box>
191
+ )
192
+ }
193
+
194
+ export const MultipleSelection: Story = {
195
+ name: 'multiple selection',
196
+ render: MultipleRender,
197
+ parameters: {
198
+ docs: {
199
+ source: {
200
+ language: 'tsx',
201
+ code: `
202
+ const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
203
+ const [selected, setSelected] = useState<string[]>(['success'])
204
+ const open = Boolean(anchorEl)
205
+
206
+ const options = ['Success', 'Failed', 'Pending'].map((label) => ({
207
+ label,
208
+ selected: selected.includes(label.toLowerCase()),
209
+ onClick: () =>
210
+ setSelected((prev) =>
211
+ prev.includes(label.toLowerCase())
212
+ ? prev.filter((v) => v !== label.toLowerCase())
213
+ : [...prev, label.toLowerCase()]
214
+ ),
215
+ }))
216
+
217
+ <Button onClick={(e) => setAnchorEl(open ? null : e.currentTarget)}>Open multi-select menu</Button>
218
+
219
+ <DropdownMenu
220
+ open={open}
221
+ anchorEl={anchorEl}
222
+ menuItems={options}
223
+ multiple
224
+ onClose={() => setAnchorEl(null)}
225
+ />
226
+ `.trim(),
227
+ },
228
+ },
229
+ },
230
+ }
231
+
232
+ function AllVariantsRender() {
233
+ const [anchors, setAnchors] = useState<Record<string, HTMLElement | null>>({
234
+ basic: null,
235
+ icon: null,
236
+ multi: null,
237
+ })
238
+
239
+ const setAnchor = (key: keyof typeof anchors, value: HTMLElement | null) => {
240
+ setAnchors((prev) => ({ ...prev, [key]: value }))
241
+ }
242
+
243
+ return (
244
+ <Box sx={{ maxWidth: 860, mx: 'auto', display: 'grid', gap: 2.5 }}>
245
+ <StoryFlexRow sx={{ flexWrap: 'wrap', justifyContent: 'center' }}>
246
+ <Button variant="outlined" sx={{ minWidth: 140, height: 36 }} onClick={(e) => setAnchor('basic', anchors.basic ? null : e.currentTarget)}>
247
+ Basic
248
+ </Button>
249
+ <Button variant="outlined" sx={{ minWidth: 140, height: 36 }} onClick={(e) => setAnchor('icon', anchors.icon ? null : e.currentTarget)}>
250
+ Icon menu
251
+ </Button>
252
+ <Button variant="outlined" sx={{ minWidth: 140, height: 36 }} onClick={(e) => setAnchor('multi', anchors.multi ? null : e.currentTarget)}>
253
+ Multi-select
254
+ </Button>
255
+ </StoryFlexRow>
256
+
257
+ <DropdownMenu open={Boolean(anchors.basic)} anchorEl={anchors.basic} menuItems={baseMenuItems} onClose={() => setAnchor('basic', null)} />
258
+ <DropdownMenu
259
+ open={Boolean(anchors.icon)}
260
+ anchorEl={anchors.icon}
261
+ menuItems={iconMenuItems}
262
+ onClose={() => setAnchor('icon', null)}
263
+ allowShadows={false}
264
+ />
265
+ <DropdownMenu
266
+ open={Boolean(anchors.multi)}
267
+ anchorEl={anchors.multi}
268
+ menuItems={[{ label: 'Card' }, { label: 'Bank transfer' }, { label: 'Apple Pay' }]}
269
+ multiple
270
+ onClose={() => setAnchor('multi', null)}
271
+ />
272
+
273
+ <StoryHint>This story shows basic, icon, and multi-select menu modes side by side.</StoryHint>
274
+ </Box>
275
+ )
276
+ }
277
+
278
+ export const AllVariants: Story = {
279
+ name: 'all variants',
280
+ decorators: [],
281
+ render: AllVariantsRender,
282
+ }