@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.
- package/build/{chunk-HQMP5K4E.js → chunk-7JK4Z6IQ.js} +1 -1
- package/build/{chunk-ZTFNCBDJ.js → chunk-C5QNPNNY.js} +1 -1
- package/build/chunk-DSXKDOAD.js +1 -0
- package/build/chunk-LKNVJTYP.js +1 -0
- package/build/chunk-VRUT6M23.js +1 -0
- package/build/components/ActionMenu/ActionMenuDropDown.d.ts +1 -1
- package/build/components/ActionMenu/ActionMenuItem.d.ts +1 -1
- package/build/components/ActionMenu/type.d.ts +1 -1
- package/build/components/Amount/TotalAmount/TotalAmount.d.ts +1 -1
- package/build/components/Amount/index.js +1 -1
- package/build/components/AmountConversionFilter/AmountConversionFilter.d.ts +1 -1
- package/build/components/AmountConversionFilter/index.js +1 -1
- package/build/components/AmountInput/AmountInput.d.ts +1 -1
- package/build/components/AmountInput/index.js +1 -1
- package/build/components/AmountStatusChip/AmountStatusChip.d.ts +1 -1
- package/build/components/AmountStatusChip/style.d.ts +1 -1
- package/build/components/AnimatedSpinnerIcon/style.d.ts +0 -1
- package/build/components/AppServices/AppServices.d.ts +1 -1
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesBar/AppServicesBar.d.ts +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/AppWindowWrapper/headers/AppWindowHeader/type.d.ts +1 -1
- package/build/components/AuthenticationTypeChip/AuthenticationTypeChip.d.ts +1 -1
- package/build/components/Autocomplete/Autocomplete.d.ts +1 -1
- package/build/components/BrandLogo/index.js +1 -1
- package/build/components/Chip/style.d.ts +0 -1
- package/build/components/CopyImage/index.js +1 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- package/build/components/CountryFilter/index.js +1 -1
- package/build/components/CurrencyFilter/CurrencyFilter.d.ts +1 -1
- package/build/components/CurrencyFilter/index.js +1 -1
- package/build/components/Customer/CustomerForms/CustomerEmailForm.d.ts +1 -1
- package/build/components/Customer/CustomerForms/CustomerFullInfo.d.ts +1 -1
- package/build/components/Customer/CustomerForms/CustomerFullInfoForm.d.ts +1 -1
- package/build/components/Customer/CustomerForms/CustomerPhoneNumberForm.d.ts +1 -1
- package/build/components/Customer/index.js +1 -1
- package/build/components/DateFilter/DateFilter.d.ts +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/DeviceIcon/DeviceIcon.d.ts +1 -1
- package/build/components/DeviceIcon/style.d.ts +1 -1
- package/build/components/Dialog/style.d.ts +0 -1
- package/build/components/Discount/DiscountDropdown/DiscountDropdown.d.ts +1 -1
- package/build/components/Discount/DiscountRateDropdown/DiscountRateDropdown.d.ts +1 -1
- package/build/components/Discount/TotalDiscount/TotalDiscount.d.ts +1 -1
- package/build/components/Discount/index.js +1 -1
- package/build/components/Discount/utils.d.ts +1 -1
- package/build/components/DropdownButton/type.d.ts +1 -1
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FileInputPreview/type.d.ts +1 -1
- package/build/components/FileInputPreview/utils.d.ts +1 -1
- package/build/components/FilePreview/type.d.ts +1 -1
- package/build/components/FileUploader/type.d.ts +1 -1
- package/build/components/FilterDropdown/components/FlatMerchantsListMenu/style.d.ts +1 -1
- package/build/components/FilterDropdown/components/MerchantsFilterItem/type.d.ts +1 -1
- package/build/components/FilterDropdown/components/MerchantsFilterItem/utils.d.ts +2 -2
- package/build/components/FilterDropdown/components/RetailersItem/RetailersItem.d.ts +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/FilterDropdown/type.d.ts +1 -1
- package/build/components/Filters/index.js +1 -1
- package/build/components/FlagDetails/index.js +1 -1
- package/build/components/FlippingCard/style.d.ts +0 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
- package/build/components/InputBase/AmountInputBase/AmountInputBase.d.ts +1 -1
- package/build/components/InputBase/AmountInputBase/CurrencyList/CurrencyList.d.ts +1 -1
- package/build/components/InputBase/PhoneInputBase/CountriesList/CountriesList.d.ts +1 -1
- package/build/components/InputBase/PhoneInputBase/PhoneInputBase.d.ts +1 -1
- package/build/components/InputBase/SelectBase/DefaultClearIcon.d.ts +5 -0
- package/build/components/InputBase/SelectBase/DefaultSelectIcon.d.ts +5 -0
- package/build/components/InputBase/SelectBase/SelectBase.d.ts +11 -1
- package/build/components/InputBase/SelectBase/SelectBaseMultiple.d.ts +7 -1
- package/build/components/InputBase/SelectBase/hasSelectionValue.d.ts +2 -0
- package/build/components/InputBase/index.js +1 -1
- package/build/components/Inputs/CountriesDropDown/CountriesDropdown.d.ts +1 -1
- package/build/components/Inputs/SearchInput/SearchInput.d.ts +1 -1
- package/build/components/JSONViewer/components/JSONSearchBar/styles.d.ts +0 -1
- package/build/components/JSONViewer/style.d.ts +0 -1
- package/build/components/LanguageDropdown/index.js +1 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
- package/build/components/ListColumnFilter/ListColumnFilter.d.ts +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/MainContainer/MainContainer.d.ts +1 -1
- package/build/components/MaskedText/type.d.ts +1 -1
- package/build/components/MerchantCurrencyDropdown/MerchantCurrencyDropdown.d.ts +1 -1
- package/build/components/MerchantCurrencyDropdown/index.js +1 -1
- package/build/components/MerchantLogo/index.js +1 -1
- package/build/components/MerchantLogo/style.d.ts +1 -1
- package/build/components/MerchantsDropdown/BrandItem.d.ts +1 -1
- package/build/components/MerchantsDropdown/EntityItem.d.ts +1 -1
- package/build/components/MerchantsDropdown/EntityList.d.ts +1 -1
- package/build/components/MerchantsDropdown/MerchantItem.d.ts +2 -2
- package/build/components/MerchantsDropdown/MerchantsList.d.ts +1 -1
- package/build/components/MerchantsDropdown/hooks.d.ts +1 -1
- package/build/components/MerchantsDropdown/index.js +1 -1
- package/build/components/MerchantsDropdown/type.d.ts +1 -1
- package/build/components/MultiSelectDropdownButton/components/StatusButton.d.ts +1 -1
- package/build/components/MultiSelectDropdownButton/type.d.ts +1 -1
- package/build/components/MultiSelectStatusButton/style.d.ts +1 -1
- package/build/components/MultiSelectStatusButton/type.d.ts +1 -1
- package/build/components/NestedDropdown/NestedDropdown.d.ts +1 -1
- package/build/components/NestedDropdown/NestedMenuItem.d.ts +1 -1
- package/build/components/NestedDropdown/types.d.ts +1 -1
- package/build/components/PartnersFilter/index.js +1 -1
- package/build/components/PaymentSourceFilter/AuthenticationMode.d.ts +1 -1
- package/build/components/PaymentSourceFilter/PaymentInitiated.d.ts +2 -2
- package/build/components/PaymentSourceFilter/PaymentMethod.d.ts +1 -1
- package/build/components/PaymentSourceFilter/PaymentMethods.d.ts +1 -1
- package/build/components/PaymentSourceFilter/PaymentSchemes.d.ts +1 -1
- package/build/components/PaymentSourceFilter/PaymentSourceFilter.d.ts +3 -3
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/PhoneFilter.d.ts +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/RFH/Inputs/AmountInput/type.d.ts +1 -1
- package/build/components/RFH/Inputs/FormInput/FormInput.d.ts +1 -1
- package/build/components/RFH/Inputs/FormSelect/FormSelect.d.ts +2 -2
- package/build/components/RFH/Inputs/FormSelect/type.d.ts +1 -1
- package/build/components/RFH/Inputs/MultiSelect/MultiSelect.d.ts +0 -4
- package/build/components/RFH/Inputs/MultiSelect/style.d.ts +3 -0
- package/build/components/RFH/Inputs/PhoneInput/PhoneInput.d.ts +1 -1
- package/build/components/RFH/index.js +1 -1
- package/build/components/RangeCalender/components/Hijri/Hijri.d.ts +1 -1
- package/build/components/RangeCalender/components/Timezone/Timezone.d.ts +1 -1
- package/build/components/RangeCalender/components/Timezone/components/EntitiesTimezone.d.ts +1 -1
- package/build/components/RangeCalender/components/Timezone/components/UserTimezone.d.ts +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/RangeCalender/type.d.ts +1 -1
- package/build/components/ReceiptsViewer/ReceiptsViewer.d.ts +1 -1
- package/build/components/ReceiptsViewer/index.js +1 -1
- package/build/components/ReceiptsViewer/type.d.ts +1 -1
- package/build/components/ReferenceTypeFilter/ReferenceTypeFilter.d.ts +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
- package/build/components/SalesChannelFilter/SalesChannelFilter.d.ts +1 -1
- package/build/components/SalesChannelFilter/index.js +1 -1
- package/build/components/Sandbox/Sandbox.d.ts +1 -1
- package/build/components/SearchButton/styles.d.ts +0 -1
- package/build/components/SelectDropdown/index.js +1 -1
- package/build/components/SelectWithSearch/SelectWithSearch.d.ts +1 -1
- package/build/components/SelectWithSearch/index.js +1 -1
- package/build/components/SelectWithSearch/type.d.ts +7 -2
- package/build/components/StatusBar/StatusBar.d.ts +1 -1
- package/build/components/StatusBar/type.d.ts +2 -2
- package/build/components/StatusButton/type.d.ts +1 -1
- package/build/components/StatusChipWithCopy/StatusChipWithCopy.d.ts +2 -2
- package/build/components/StatusChipWithCopy/utils.d.ts +1 -1
- package/build/components/StatusFilter/StatusFilter.d.ts +2 -2
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusFilter/utils.d.ts +1 -1
- package/build/components/StatusGroupChips/style.d.ts +1 -1
- package/build/components/StatusGroupChips/type.d.ts +1 -1
- package/build/components/StatusIcons/AuthIcons/constants.d.ts +1 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthIcons/type.d.ts +1 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/type.d.ts +1 -1
- package/build/components/StatusIcons/AuthorizedIcon/AuthorizedIcon.d.ts +2 -2
- package/build/components/StatusIcons/ChargeStatusIcon/ChargeStatusIcon.d.ts +2 -2
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/DestinationIcon/DestinationIcon.d.ts +1 -1
- package/build/components/StatusIcons/DeviceIcon/DeviceIcon.d.ts +1 -1
- package/build/components/StatusIcons/GeographyIcon/style.d.ts +1 -1
- package/build/components/StatusIcons/IssuerIcon/style.d.ts +1 -1
- package/build/components/StatusIcons/IssuerIcon/type.d.ts +1 -1
- package/build/components/StatusIcons/PayoutIcon/PayoutIcon.d.ts +2 -2
- package/build/components/StatusIcons/RefundIcon/RefundIcon.d.ts +2 -2
- package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/SourceIcons/type.d.ts +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/components/ActionsColumn.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/constant.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +1 -2
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AmountCell/components/ConversionTypeLabel.d.ts +1 -1
- package/build/components/TableCells/CustomCells/AmountCell/components/CurrencyInfo.d.ts +1 -1
- package/build/components/TableCells/CustomCells/AmountCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/AmountCell/type.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/type.d.ts +1 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CustomerCell/style.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DateCell/DateCell.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DestinationCell/styled.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DestinationCell/type.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/constant.d.ts +1 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/ChargeStatusIcon.d.ts +1 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/OrdersCell/OrdersCellSheet.d.ts +1 -1
- package/build/components/TableCells/CustomCells/PaymentAgreementCell/type.d.ts +1 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/type.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/type.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/utils.d.ts +1 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SourceCell/components/AuthenticationMode/AuthenticationMode.d.ts +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/constant.d.ts +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TextWithChipCell/TextWithChipCell.d.ts +2 -2
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/type.d.ts +2 -2
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableHeader/TableHeader.d.ts +1 -1
- package/build/components/TableHeader/TableModeButton.d.ts +1 -1
- package/build/components/TableHeader/TableView/ColumnItem.d.ts +1 -1
- package/build/components/TableHeader/TableView/hooks/useColumnItem.d.ts +1 -1
- package/build/components/TableHeader/TableView/hooks/useCreateViewDialog.d.ts +1 -1
- package/build/components/TableHeader/TableView/hooks/useCustomTableViews.d.ts +1 -1
- package/build/components/TableHeader/TableView/hooks/useOriginalColumns.d.ts +1 -1
- package/build/components/TableHeader/TableView/hooks/useViewColumns.d.ts +1 -1
- package/build/components/TableHeader/TableView/hooks/useViewsManager.d.ts +1 -1
- package/build/components/TableHeader/TableView/hooks/useViewsMenu.d.ts +1 -1
- package/build/components/TableHeader/TableView/types.d.ts +1 -1
- package/build/components/TableHeader/TableView/utils/columnState.d.ts +1 -1
- package/build/components/TableHeader/TableView/utils/customTableViews.d.ts +1 -1
- package/build/components/TableHeader/TableView/utils/layoutTransform.d.ts +1 -1
- package/build/components/TableHeader/TableView/utils/templateToColumnsView.d.ts +1 -1
- package/build/components/TableHeader/TableView/utils/viewMenu.d.ts +1 -1
- package/build/components/TableHeader/index.js +1 -1
- package/build/components/TableHeader/type.d.ts +3 -3
- package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/TableReports/style.d.ts +0 -1
- package/build/components/TooltipChip/TooltipChip.d.ts +2 -2
- package/build/components/TooltipChip/style.d.ts +1 -1
- package/build/components/TreeDropdown/TreeNodeItem/style.d.ts +1 -1
- package/build/components/TreeDropdown/index.js +1 -1
- package/build/components/TreeDropdown/type.d.ts +1 -1
- package/build/components/VAT/TotalVAT/TotalVAT.d.ts +1 -1
- package/build/components/VAT/VATDropdown/VATDropdown.d.ts +1 -1
- package/build/components/VAT/VATRateDropdown/VATRateDropdown.d.ts +1 -1
- package/build/components/VAT/index.js +1 -1
- package/build/components/VAT/utils.d.ts +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/ViewColumnRadioFilter/index.js +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableHeaderCell.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableLoading.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableNoData.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/SheetViewTableRowLoading.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/components/VirtualTable.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/features/resize/hooks/useColumnResizeWithPinned.d.ts +13 -13
- package/build/components/VirtualTables/SheetViewVirtualTable/features/resize/types/index.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/features/resize/utils/resize.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumns.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/usePinnedColumnsWidths.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/hooks/useVirtualTableContainer.d.ts +1 -1
- package/build/components/VirtualTables/SheetViewVirtualTable/types.d.ts +1 -1
- package/build/components/VirtualTables/VirtualTable/VirtualTable.d.ts +1 -1
- package/build/components/VirtualTables/VirtualTableWithCard/VirtualTableWithCard.d.ts +1 -1
- package/build/components/VirtualTables/components/ColumnFilter/Inputs/Inputs.d.ts +1 -1
- package/build/components/VirtualTables/components/ColumnFilter/List/List.d.ts +1 -1
- package/build/components/VirtualTables/components/ColumnFilter/type.d.ts +1 -1
- package/build/components/VirtualTables/components/ColumnSort/ColumnSort.d.ts +1 -1
- package/build/components/VirtualTables/components/TableFooter/TableFooter.d.ts +1 -1
- package/build/components/VirtualTables/components/TableHeader/components/TableCell/TableCell.d.ts +2 -2
- package/build/components/VirtualTables/components/TableHeader/type.d.ts +1 -1
- package/build/components/VirtualTables/components/TableLoading.d.ts +1 -1
- package/build/components/VirtualTables/components/TableNoData.d.ts +1 -1
- package/build/components/VirtualTables/components/TableNoDataWithCard.d.ts +1 -1
- package/build/components/VirtualTables/components/TableRow.d.ts +1 -1
- package/build/components/VirtualTables/components/TableRowLoading.d.ts +1 -1
- package/build/components/VirtualTables/components/style.d.ts +0 -1
- package/build/components/VirtualTables/components/virtualScroll/ListItemWrapper.d.ts +1 -1
- package/build/components/VirtualTables/hooks/useColumnFilter.d.ts +1 -1
- package/build/components/WindowSideBar/index.js +1 -1
- package/build/components/index.js +1 -1
- package/build/constants/segment.d.ts +1 -1
- package/build/constants/timezones.d.ts +1 -1
- package/build/demo/TapOSIconsGallery/style.d.ts +1 -1
- package/build/docs/.storybook/story-utils.d.ts +19 -0
- package/build/docs/.storybook/story-utils.js +96 -0
- package/build/hooks/useAppsInfo.d.ts +3 -3
- package/build/hooks/useIsParameterSelected.d.ts +1 -1
- package/build/hooks/useSelectedMerchantDetails.d.ts +2 -2
- package/build/hooks/useToast.d.ts +1 -1
- package/build/index.js +1 -1
- package/build/theme/theme.d.ts +1 -1
- package/build/theme/typography.d.ts +1 -1
- package/build/types/appEvents.d.ts +1 -1
- package/build/types/apps.d.ts +1 -1
- package/build/types/cell.d.ts +2 -2
- package/build/types/document.d.ts +1 -1
- package/build/types/invoice.d.ts +1 -1
- package/build/types/refund.d.ts +1 -1
- package/build/types/table.d.ts +2 -2
- package/build/types/toggleOptions.d.ts +1 -1
- package/build/types/views.d.ts +1 -1
- package/build/utils/billing.d.ts +1 -1
- package/build/utils/columns.d.ts +1 -1
- package/build/utils/conversion.d.ts +1 -1
- package/build/utils/currency.d.ts +1 -1
- package/build/utils/day.d.ts +1 -1
- package/build/utils/entity.d.ts +1 -1
- package/build/utils/error.d.ts +1 -1
- package/build/utils/file.d.ts +1 -1
- package/build/utils/freshdesk.d.ts +1 -1
- package/build/utils/language.d.ts +1 -1
- package/build/utils/localStorage.d.ts +1 -1
- package/build/utils/merchant.d.ts +1 -1
- package/build/utils/merchantSource.d.ts +1 -1
- package/build/utils/navigation.d.ts +3 -3
- package/build/utils/segment.d.ts +1 -1
- package/build/utils/skeletonColumns.d.ts +1 -1
- package/build/utils/table.d.ts +1 -1
- package/build/utils/views.d.ts +1 -1
- package/docs/.storybook/main.ts +23 -0
- package/docs/.storybook/preview.tsx +106 -0
- package/docs/.storybook/story-utils.tsx +196 -0
- package/docs/01-overview.md +158 -0
- package/docs/02-setup.md +326 -0
- package/docs/03-architecture.md +438 -0
- package/docs/04-component-guide.md +133 -0
- package/docs/05-component-development.md +173 -0
- package/docs/README.md +38 -0
- package/docs/stories/components/Accordion.stories.tsx +302 -0
- package/docs/stories/components/AccordionAdapter.stories.tsx +201 -0
- package/docs/stories/components/AccountDropdown.stories.tsx +113 -0
- package/docs/stories/components/AnimatedSpinnerIcon.stories.tsx +54 -0
- package/docs/stories/components/BackgroundAnimation.stories.tsx +139 -0
- package/docs/stories/components/BetaBanner.stories.tsx +170 -0
- package/docs/stories/components/Button.stories.tsx +132 -0
- package/docs/stories/components/CardEmptyState.stories.tsx +43 -0
- package/docs/stories/components/CardHeadline.stories.tsx +208 -0
- package/docs/stories/components/Chip.stories.tsx +106 -0
- package/docs/stories/components/CircularProgressWithLabel.stories.tsx +111 -0
- package/docs/stories/components/Collapse.stories.tsx +100 -0
- package/docs/stories/components/CountBadge.stories.tsx +115 -0
- package/docs/stories/components/CountryFlag.stories.tsx +91 -0
- package/docs/stories/components/CurrencySymbol.stories.tsx +108 -0
- package/docs/stories/components/DeviceIcon.stories.tsx +122 -0
- package/docs/stories/components/Dialog.stories.tsx +270 -0
- package/docs/stories/components/DisplayAmount.stories.tsx +102 -0
- package/docs/stories/components/DockButton.stories.tsx +118 -0
- package/docs/stories/components/ExpandableSideBar.stories.tsx +120 -0
- package/docs/stories/components/FlippingCard.stories.tsx +122 -0
- package/docs/stories/components/HeatMap.stories.tsx +199 -0
- package/docs/stories/components/IconWithBadge.stories.tsx +136 -0
- package/docs/stories/components/JSONViewer.stories.tsx +92 -0
- package/docs/stories/components/LeftPeekRightExpandingChip.stories.tsx +127 -0
- package/docs/stories/components/Loader.stories.tsx +116 -0
- package/docs/stories/components/NoInternet.stories.tsx +43 -0
- package/docs/stories/components/ProgressBar.stories.tsx +99 -0
- package/docs/stories/components/ProgressRing.stories.tsx +139 -0
- package/docs/stories/components/SimpleDialog.stories.tsx +170 -0
- package/docs/stories/components/Skeleton.stories.tsx +253 -0
- package/docs/stories/components/StatusButton.stories.tsx +84 -0
- package/docs/stories/components/StatusChip.stories.tsx +149 -0
- package/docs/stories/components/StatusLabel.stories.tsx +85 -0
- package/docs/stories/components/Text.stories.tsx +110 -0
- package/docs/stories/components/Toaster.stories.tsx +65 -0
- package/docs/stories/components/Tooltip.stories.tsx +218 -0
- package/docs/stories/components/TooltipChip.stories.tsx +104 -0
- package/docs/stories/components/WindowAppIcon.stories.tsx +76 -0
- package/docs/stories/components/inputs/ActionMenu.stories.tsx +125 -0
- package/docs/stories/components/inputs/AmountInput.stories.tsx +103 -0
- package/docs/stories/components/inputs/Autocomplete.stories.tsx +209 -0
- package/docs/stories/components/inputs/Calender.stories.tsx +105 -0
- package/docs/stories/components/inputs/Checkbox.stories.tsx +78 -0
- package/docs/stories/components/inputs/ColorPicker.stories.tsx +160 -0
- package/docs/stories/components/inputs/CopyImage.stories.tsx +116 -0
- package/docs/stories/components/inputs/CountryFilter.stories.tsx +100 -0
- package/docs/stories/components/inputs/CurrencyFilter.stories.tsx +140 -0
- package/docs/stories/components/inputs/DateFilter.stories.tsx +144 -0
- package/docs/stories/components/inputs/DropdownButton.stories.tsx +187 -0
- package/docs/stories/components/inputs/DropdownMenu.stories.tsx +282 -0
- package/docs/stories/components/inputs/FormSelect.stories.tsx +235 -0
- package/docs/stories/components/inputs/IOSSwitch.stories.tsx +95 -0
- package/docs/stories/components/inputs/Input.stories.tsx +121 -0
- package/docs/stories/components/inputs/InputNumber.stories.tsx +163 -0
- package/docs/stories/components/inputs/MerchantCurrencyDropdown.stories.tsx +192 -0
- package/docs/stories/components/inputs/MultiSelect.stories.tsx +369 -0
- package/docs/stories/components/inputs/MultiSelectWithSearch.stories.tsx +141 -0
- package/docs/stories/components/inputs/NestedDropdown.stories.tsx +143 -0
- package/docs/stories/components/inputs/OTPInput.stories.tsx +140 -0
- package/docs/stories/components/inputs/PartnersFilter.stories.tsx +114 -0
- package/docs/stories/components/inputs/RadioButton.stories.tsx +135 -0
- package/docs/stories/components/inputs/RadioGroup.stories.tsx +145 -0
- package/docs/stories/components/inputs/RangeCalender.stories.tsx +179 -0
- package/docs/stories/components/inputs/SearchListInput.stories.tsx +87 -0
- package/docs/stories/components/inputs/SelectDropdown.stories.tsx +153 -0
- package/docs/stories/components/inputs/SelectWithSearch.stories.tsx +290 -0
- package/docs/stories/components/inputs/Timepicker.stories.tsx +91 -0
- package/docs/stories/components/inputs/ToggleButtons.stories.tsx +242 -0
- package/package.json +4 -3
- package/build/chunk-CC4HU4H6.js +0 -1
- package/build/chunk-NET3U5QO.js +0 -1
- package/build/chunk-QLEUEVEZ.js +0 -1
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
# Architecture Guide
|
|
2
|
+
|
|
3
|
+
System architecture, design decisions, and build system for the component library.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
1. [Architecture Overview](#architecture-overview) - Package structure and exports
|
|
8
|
+
2. [Folder Structure](#folder--module-structure) - Source code organization
|
|
9
|
+
3. [Module Connections](#module-connections) - Import relationships
|
|
10
|
+
4. [Design Decisions](#design-decisions--constraints) - Technical constraints and rationale
|
|
11
|
+
5. [Build System](#build-system) - Compilation and output
|
|
12
|
+
6. [Path Aliases](#path-aliases) - Import paths in source
|
|
13
|
+
7. [Export Strategy](#export-strategy) - Consumer import patterns
|
|
14
|
+
8. [Tech Stack Summary](#tech-stack-summary) - Dependencies overview
|
|
15
|
+
|
|
16
|
+
## Architecture Overview
|
|
17
|
+
|
|
18
|
+
### Package Exports
|
|
19
|
+
|
|
20
|
+
| Export Path | Contents | Purpose |
|
|
21
|
+
|-------------|----------|---------|
|
|
22
|
+
| `/` | All exports | Main entry point with everything |
|
|
23
|
+
| `/components` | All UI components | Component library exports |
|
|
24
|
+
| `/components/*` | Individual components | Granular component imports |
|
|
25
|
+
| `/hooks` | Custom React hooks | Hook utilities |
|
|
26
|
+
| `/utils` | Utility functions | Helper functions |
|
|
27
|
+
| `/types` | TypeScript definitions | Type interfaces |
|
|
28
|
+
| `/constants` | App constants | Configuration values |
|
|
29
|
+
| `/theme` | MUI theme config | Theme factory and customization |
|
|
30
|
+
|
|
31
|
+
### Dependency Flow
|
|
32
|
+
|
|
33
|
+
**1. Consumption (who imports what)**
|
|
34
|
+
|
|
35
|
+
Consumer apps import from the package entry; the package re-exports from its internal modules. Types and constants are consumed by the library itself and by consumers who need type imports.
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart TB
|
|
39
|
+
subgraph External["Micro frontends"]
|
|
40
|
+
Consumer["Consumer Apps"]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
subgraph PackageEntry["Package entry"]
|
|
44
|
+
Entry["Main Entry"]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
subgraph PackageExports["Package export paths"]
|
|
48
|
+
E1["/components"]
|
|
49
|
+
E2["/hooks"]
|
|
50
|
+
E3["/utils"]
|
|
51
|
+
E4["/types"]
|
|
52
|
+
E5["/constants"]
|
|
53
|
+
E6["/theme"]
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
Consumer -->|import from @tap-payments/...| Entry
|
|
57
|
+
Entry --> E1
|
|
58
|
+
Entry --> E2
|
|
59
|
+
Entry --> E3
|
|
60
|
+
Entry --> E4
|
|
61
|
+
Entry --> E5
|
|
62
|
+
Entry --> E6
|
|
63
|
+
|
|
64
|
+
Consumer -.->|provided by consumer| Peer["React, MUI, Emotion, RHF, etc."]
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**2. Internal dependencies (what depends on what inside the package)**
|
|
69
|
+
|
|
70
|
+
Components sit at the top of the internal dependency graph; they may use hooks, utils, types, constants, and theme. Hooks and utils depend only on types (and utils on constants). Theme depends on MUI. Types and constants have no internal package dependencies.
|
|
71
|
+
|
|
72
|
+
```mermaid
|
|
73
|
+
flowchart TB
|
|
74
|
+
subgraph Internal["Package internal (src/)"]
|
|
75
|
+
Components[Components]
|
|
76
|
+
Hooks[Hooks]
|
|
77
|
+
Utils[Utils]
|
|
78
|
+
Theme[Theme]
|
|
79
|
+
Types[Types]
|
|
80
|
+
Constants[Constants]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
subgraph ExternalDeps["External (peer deps)"]
|
|
84
|
+
MUI[MUI createTheme]
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
Components --> Hooks
|
|
88
|
+
Components --> Utils
|
|
89
|
+
Components --> Types
|
|
90
|
+
Components --> Constants
|
|
91
|
+
Components --> Theme
|
|
92
|
+
|
|
93
|
+
Hooks --> Types
|
|
94
|
+
Hooks --> Utils
|
|
95
|
+
|
|
96
|
+
Utils --> Types
|
|
97
|
+
Utils --> Constants
|
|
98
|
+
|
|
99
|
+
Theme --> MUI
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**3. Layer summary**
|
|
103
|
+
|
|
104
|
+
| Layer | Depends on | Description |
|
|
105
|
+
|-------|------------|-------------|
|
|
106
|
+
| **Consumer apps** | Package entry | Import from `@tap-payments/os-micro-frontend-shared` or subpaths (`/components`, `/hooks`, etc.). |
|
|
107
|
+
| **Package entry** | All module indices | Re-exports from `components`, `hooks`, `utils`, `types`, `constants`, `theme`. |
|
|
108
|
+
| **Components** | hooks, utils, types, constants, theme | UI components use hooks (e.g. useToast), utils (formatting, validation), types (props), constants (config), theme (styled components). |
|
|
109
|
+
| **Hooks** | types, utils | Custom hooks use type definitions and utility functions. |
|
|
110
|
+
| **Utils** | types, constants | Pure helpers with type safety and config/constants. |
|
|
111
|
+
| **Theme** | MUI createTheme | Theme factory (palette, typography, components, shadows). |
|
|
112
|
+
| **Types** | — | No internal deps; consumed by components, hooks, utils. |
|
|
113
|
+
| **Constants** | — | No internal deps; consumed by components, utils. |
|
|
114
|
+
| **All modules** | Peer dependencies | React, MUI, Emotion, etc. are provided by the consumer at runtime. |
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Folder / Module Structure
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
src/
|
|
122
|
+
├── index.ts # Main entry point - re-exports all modules
|
|
123
|
+
│
|
|
124
|
+
├── components/ # 100+ UI components (1000+ files)
|
|
125
|
+
│ ├── [ComponentName]/ # Each component in its own folder
|
|
126
|
+
│ │ ├── index.ts # Public exports
|
|
127
|
+
│ │ ├── Component.tsx # Main component
|
|
128
|
+
│ │ ├── style.ts # Styled components (Emotion)
|
|
129
|
+
│ │ └── types.ts # Component-specific types
|
|
130
|
+
│ └── index.ts # Aggregates all component exports
|
|
131
|
+
│
|
|
132
|
+
├── hooks/ # 18 custom React hooks
|
|
133
|
+
│ ├── index.ts # Aggregates all hook exports
|
|
134
|
+
│ ├── useWindowDimensions.ts
|
|
135
|
+
│ ├── useThemeMode.ts
|
|
136
|
+
│ ├── useToast.ts
|
|
137
|
+
│ └── ...
|
|
138
|
+
│
|
|
139
|
+
├── utils/ # 47 utility modules
|
|
140
|
+
│ ├── index.ts # Aggregates all util exports
|
|
141
|
+
│ ├── date.ts # Date formatting utilities
|
|
142
|
+
│ ├── currency.ts # Currency utilities
|
|
143
|
+
│ ├── api.ts # API helpers
|
|
144
|
+
│ └── ...
|
|
145
|
+
│
|
|
146
|
+
├── types/ # 37 TypeScript type definition files
|
|
147
|
+
│ ├── index.ts # Aggregates all type exports
|
|
148
|
+
│ ├── theme.ts # Theme types
|
|
149
|
+
│ ├── api.ts # API types
|
|
150
|
+
│ └── ...
|
|
151
|
+
│
|
|
152
|
+
├── constants/ # 41 constant definition files
|
|
153
|
+
│ ├── index.ts # Aggregates all constant exports
|
|
154
|
+
│ ├── apps.ts # App constants
|
|
155
|
+
│ ├── currency.ts # Currency constants
|
|
156
|
+
│ └── ...
|
|
157
|
+
│
|
|
158
|
+
├── theme/ # MUI theme configuration
|
|
159
|
+
│ ├── index.ts # Theme exports
|
|
160
|
+
│ ├── theme.ts # appTheme() factory function
|
|
161
|
+
│ ├── palette.ts # Light/dark color palettes
|
|
162
|
+
│ ├── typography.ts # Font configurations
|
|
163
|
+
│ ├── components.ts # MUI component overrides
|
|
164
|
+
│ └── shadows.ts # Shadow definitions
|
|
165
|
+
│
|
|
166
|
+
└── demo/ # Development examples (not exported)
|
|
167
|
+
├── Table/ # Table demo components
|
|
168
|
+
├── Forms/ # Form demo components
|
|
169
|
+
└── ...
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Module Connections
|
|
175
|
+
|
|
176
|
+
| Module | Imports From | Purpose |
|
|
177
|
+
|--------|--------------|---------|
|
|
178
|
+
| components | hooks | useActionMenu, useToast, useWindowDimensions, etc. |
|
|
179
|
+
| components | utils | Formatting, validation, data manipulation |
|
|
180
|
+
| components | types | Prop interfaces and type definitions |
|
|
181
|
+
| components | constants | Config values, enums, static data |
|
|
182
|
+
| components | theme | Styled components, palette, typography |
|
|
183
|
+
| hooks | types, utils | Type definitions and utility functions |
|
|
184
|
+
| utils | types, constants | Type safety and configuration values |
|
|
185
|
+
|
|
186
|
+
### Theme System Flow
|
|
187
|
+
|
|
188
|
+
```mermaid
|
|
189
|
+
flowchart TD
|
|
190
|
+
A[appTheme(mode, direction)] --> B{mode}
|
|
191
|
+
B -->|light| C[lightPalette]
|
|
192
|
+
B -->|dark| D[darkPalette]
|
|
193
|
+
A --> E{direction}
|
|
194
|
+
E -->|ltr / rtl| F[typography & layout]
|
|
195
|
+
C --> G[MUI createTheme]
|
|
196
|
+
D --> G
|
|
197
|
+
F --> G
|
|
198
|
+
G --> H[Consumer: MUIThemeProvider]
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Design Decisions & Constraints
|
|
204
|
+
|
|
205
|
+
### Why ESM-Only Build?
|
|
206
|
+
|
|
207
|
+
- Modern bundlers (Vite, Webpack 5+) prefer ESM
|
|
208
|
+
- Tree-shaking works best with ESM
|
|
209
|
+
- Peer dependencies avoid duplication
|
|
210
|
+
- `preserveModules: true` maintains import paths
|
|
211
|
+
|
|
212
|
+
### Why Peer Dependencies?
|
|
213
|
+
|
|
214
|
+
Package expects consumer to provide:
|
|
215
|
+
|
|
216
|
+
- react ^18, react-dom ^18
|
|
217
|
+
- @mui/material ^5, @emotion/react ^11, @emotion/styled ^11
|
|
218
|
+
- framer-motion ^10, react-hook-form ^7
|
|
219
|
+
- Others: see `package.json` peerDependencies
|
|
220
|
+
|
|
221
|
+
**Reason:** Prevents version conflicts and bundle bloat.
|
|
222
|
+
|
|
223
|
+
### Why No Tests in Package?
|
|
224
|
+
|
|
225
|
+
- Components tested in consuming applications
|
|
226
|
+
- Visual testing preferred (Storybook in consumers)
|
|
227
|
+
- Types provide compile-time safety
|
|
228
|
+
- Lint-staged ensures code quality
|
|
229
|
+
|
|
230
|
+
### Why Path Aliases?
|
|
231
|
+
|
|
232
|
+
**Benefits:** Cleaner imports in source, easier refactoring, consistent paths, IDE autocomplete.
|
|
233
|
+
|
|
234
|
+
**Implementation:** `tsconfig.json` defines aliases; `tsc-alias` resolves them at build time. Consumers use package exports, not aliases.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Build System
|
|
239
|
+
|
|
240
|
+
### Build Output Structure
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
build/
|
|
244
|
+
├── index.js # Main entry
|
|
245
|
+
├── index.d.ts # Type definitions
|
|
246
|
+
├── components/
|
|
247
|
+
│ ├── index.js
|
|
248
|
+
│ ├── index.d.ts
|
|
249
|
+
│ ├── [Component]/
|
|
250
|
+
│ │ ├── index.js
|
|
251
|
+
│ │ └── index.d.ts
|
|
252
|
+
├── hooks/
|
|
253
|
+
├── utils/
|
|
254
|
+
├── types/
|
|
255
|
+
├── constants/
|
|
256
|
+
└── theme/
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Build Process
|
|
260
|
+
|
|
261
|
+
```mermaid
|
|
262
|
+
flowchart TD
|
|
263
|
+
A[yarn ts:build] --> B[rm -rf build]
|
|
264
|
+
B --> C[tsc -p tsconfig.npm.json]
|
|
265
|
+
C --> D[Compile .ts → .js]
|
|
266
|
+
C --> E[Generate .d.ts files]
|
|
267
|
+
C --> F[Output to build/]
|
|
268
|
+
A --> G[tsc-alias -p tsconfig.npm.json]
|
|
269
|
+
G --> H[Resolve path aliases]
|
|
270
|
+
H --> I["@components → ./components"]
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### Build Configuration
|
|
274
|
+
|
|
275
|
+
**vite.config.ts** (for dev server):
|
|
276
|
+
|
|
277
|
+
| Setting | Value | Purpose |
|
|
278
|
+
|---------|-------|---------|
|
|
279
|
+
| lib.entry | src/index.ts | Entry point |
|
|
280
|
+
| formats | ['es'] | ESM only |
|
|
281
|
+
| preserveModules | true | Keep folder structure |
|
|
282
|
+
| external | react, react-dom, react/jsx-runtime | Peer deps |
|
|
283
|
+
| outDir | build | Output directory |
|
|
284
|
+
|
|
285
|
+
**tsconfig.npm.json** (for production build):
|
|
286
|
+
|
|
287
|
+
| Setting | Value | Purpose |
|
|
288
|
+
|---------|-------|---------|
|
|
289
|
+
| target | ES2015 | Browser compatibility |
|
|
290
|
+
| module | ES2015 | ESM |
|
|
291
|
+
| declaration | true | Generate .d.ts |
|
|
292
|
+
| declarationMap | true | Source maps for types |
|
|
293
|
+
| outDir | build | Output directory |
|
|
294
|
+
| paths | {...} | Path aliases |
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Path Aliases
|
|
299
|
+
|
|
300
|
+
### Internal Path Aliases (Source Code)
|
|
301
|
+
|
|
302
|
+
Use these in imports within the library source only:
|
|
303
|
+
|
|
304
|
+
| Alias | Resolves To |
|
|
305
|
+
|-------|-------------|
|
|
306
|
+
| `@types` | src/types/ |
|
|
307
|
+
| `@utils` | src/utils/ |
|
|
308
|
+
| `@constants` | src/constants/ |
|
|
309
|
+
| `@theme` | src/theme/ |
|
|
310
|
+
| `@components` | src/components/ |
|
|
311
|
+
| `@components/*` | src/components/* |
|
|
312
|
+
| `@hooks` | src/hooks/ |
|
|
313
|
+
|
|
314
|
+
**Configuration** (tsconfig.json):
|
|
315
|
+
|
|
316
|
+
```json
|
|
317
|
+
{
|
|
318
|
+
"compilerOptions": {
|
|
319
|
+
"paths": {
|
|
320
|
+
"@constants": ["src/constants/index.ts"],
|
|
321
|
+
"@utils": ["src/utils/index.ts"],
|
|
322
|
+
"@types": ["src/types/index.ts"],
|
|
323
|
+
"@theme": ["src/theme/index.ts"],
|
|
324
|
+
"@components": ["src/components/index.ts"],
|
|
325
|
+
"@components/*": ["src/components/*"],
|
|
326
|
+
"@hooks": ["src/hooks/index.ts"]
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Consumers use package exports, not path aliases:
|
|
333
|
+
|
|
334
|
+
```typescript
|
|
335
|
+
// ✓ Correct (consumer code)
|
|
336
|
+
import { Button } from '@tap-payments/os-micro-frontend-shared'
|
|
337
|
+
|
|
338
|
+
// ✗ Wrong (internal only)
|
|
339
|
+
import { Button } from '@components'
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## Export Strategy
|
|
345
|
+
|
|
346
|
+
### Package.json Exports Map
|
|
347
|
+
|
|
348
|
+
Consumers can import from multiple entry points:
|
|
349
|
+
|
|
350
|
+
```typescript
|
|
351
|
+
// Main entry (everything)
|
|
352
|
+
import { Button, useToast, formatCurrency } from '@tap-payments/os-micro-frontend-shared'
|
|
353
|
+
|
|
354
|
+
// Specific modules (tree-shaking friendly)
|
|
355
|
+
import { Button } from '@tap-payments/os-micro-frontend-shared/components'
|
|
356
|
+
import { useToast } from '@tap-payments/os-micro-frontend-shared/hooks'
|
|
357
|
+
import { formatCurrency } from '@tap-payments/os-micro-frontend-shared/utils'
|
|
358
|
+
import type { Column } from '@tap-payments/os-micro-frontend-shared/types'
|
|
359
|
+
import { CURRENCY_SYMBOLS } from '@tap-payments/os-micro-frontend-shared/constants'
|
|
360
|
+
import { appTheme } from '@tap-payments/os-micro-frontend-shared/theme'
|
|
361
|
+
|
|
362
|
+
// Specific component (granular imports)
|
|
363
|
+
import { Button } from '@tap-payments/os-micro-frontend-shared/components/Button'
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**package.json**:
|
|
367
|
+
|
|
368
|
+
```json
|
|
369
|
+
{
|
|
370
|
+
"exports": {
|
|
371
|
+
".": "./build/index.js",
|
|
372
|
+
"./components": "./build/components/index.js",
|
|
373
|
+
"./components/*": "./build/components/*/index.js",
|
|
374
|
+
"./hooks": "./build/hooks/index.js",
|
|
375
|
+
"./utils": "./build/utils/index.js",
|
|
376
|
+
"./types": "./build/types/index.js",
|
|
377
|
+
"./constants": "./build/constants/index.js",
|
|
378
|
+
"./theme": "./build/theme/index.js"
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## Tech Stack Summary
|
|
386
|
+
|
|
387
|
+
### Core Dependencies (Peer)
|
|
388
|
+
|
|
389
|
+
```mermaid
|
|
390
|
+
flowchart LR
|
|
391
|
+
subgraph Runtime
|
|
392
|
+
R1[React 18]
|
|
393
|
+
R2[TypeScript 5]
|
|
394
|
+
R3[ES2015]
|
|
395
|
+
end
|
|
396
|
+
subgraph UI
|
|
397
|
+
U1[MUI 5]
|
|
398
|
+
U2[Emotion]
|
|
399
|
+
U3[Framer Motion 10]
|
|
400
|
+
end
|
|
401
|
+
subgraph Forms
|
|
402
|
+
F1[React Hook Form 7]
|
|
403
|
+
F2[Yup]
|
|
404
|
+
end
|
|
405
|
+
subgraph Data
|
|
406
|
+
D1[Axios]
|
|
407
|
+
D2[dayjs]
|
|
408
|
+
D3[i18next]
|
|
409
|
+
end
|
|
410
|
+
subgraph Virtualization
|
|
411
|
+
V1[react-window]
|
|
412
|
+
V2[react-window-infinite-loader]
|
|
413
|
+
end
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
| Category | Key Dependencies |
|
|
417
|
+
|----------|-------------------|
|
|
418
|
+
| Runtime | React 18, TypeScript 5.0, ES2015 target |
|
|
419
|
+
| UI | MUI 5, Emotion, Framer Motion 10 |
|
|
420
|
+
| Forms | React Hook Form 7, @hookform/resolvers, Yup |
|
|
421
|
+
| Data & Utils | Axios, dayjs, i18next |
|
|
422
|
+
| Virtualization | react-window, react-window-infinite-loader, react-virtualized-auto-sizer |
|
|
423
|
+
|
|
424
|
+
### Build Dependencies
|
|
425
|
+
|
|
426
|
+
| Category | Tools |
|
|
427
|
+
|----------|-------|
|
|
428
|
+
| Build | Vite 6, TypeScript 5, tsc-alias |
|
|
429
|
+
| Quality | ESLint 9, Prettier, Husky, lint-staged |
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## Next Steps
|
|
434
|
+
|
|
435
|
+
- [Overview](./01-overview.md) - Project overview and goals
|
|
436
|
+
- [Setup Guide](./02-setup.md) - Setup and development workflows
|
|
437
|
+
- [Component Guide](./04-component-guide.md) - Component catalog and how to choose components
|
|
438
|
+
- [Building Components](./05-component-development.md) - How to create new components and follow patterns
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Component Guide
|
|
2
|
+
|
|
3
|
+
Catalog of 100+ components and how to choose the right one. **Avoid duplicating:** check this catalog first, reuse or extend existing components; create new only when necessary. Step-by-step for creating components: [Building Components](./05-component-development.md).
|
|
4
|
+
|
|
5
|
+
## Building New Components & Avoiding Duplication
|
|
6
|
+
|
|
7
|
+
1. **Check this catalog** – [Quick Component Finder](#quick-component-finder), [Categories](#component-categories-overview).
|
|
8
|
+
2. **Prefer existing** – Use or compose (e.g. wrap `Input`, `DropdownMenu`); extend with props/variants when possible.
|
|
9
|
+
3. **Create new only when** – No existing component fits and composition isn’t practical. Then follow [05-component-development.md](./05-component-development.md).
|
|
10
|
+
|
|
11
|
+
## Quick Component Finder
|
|
12
|
+
|
|
13
|
+
| Need | Component | Notes |
|
|
14
|
+
|------|-----------|--------|
|
|
15
|
+
| Button | `Button` | variant: confirm/cancel, size: small/default |
|
|
16
|
+
| Table (large) | `VirtualTable` | 100+ rows, infinite scroll; needs `Column[]` from `/types` |
|
|
17
|
+
| Table (spreadsheet) | `SheetViewVirtualTable` | Editable, column resize, filters |
|
|
18
|
+
| Text input | `Input` or `RFHInput` | Form → RFHInput; standalone → Input |
|
|
19
|
+
| Dropdown | `DropdownMenu` | options: `{id, label, value}[]` |
|
|
20
|
+
| Dialog | `Dialog`, `SimpleDialog` | open, onClose, title, maxWidth |
|
|
21
|
+
| Loading | `Loader` | size, color |
|
|
22
|
+
| Toast | `useToast` + `<Toaster />` | Hook in component; Toaster at app root |
|
|
23
|
+
| Status badge | `StatusChip` | status: success/warning/error/info |
|
|
24
|
+
| Date | `Calender`, `RFHDatePicker` | Form → RFHDatePicker |
|
|
25
|
+
| Filter | `FilterDropdown` | label, options, value, onChange; optional multiple |
|
|
26
|
+
|
|
27
|
+
**Import:** `import { ComponentName } from '@tap-payments/os-micro-frontend-shared'` (or `/components`, `/hooks`, etc. – see [Architecture](./03-architecture.md)).
|
|
28
|
+
|
|
29
|
+
## Component Categories Overview
|
|
30
|
+
|
|
31
|
+
| Category | Key Components |
|
|
32
|
+
|----------|-----------------|
|
|
33
|
+
| Core UI (20+) | Button, Dialog, Input, Checkbox, Menu, Dropdown, Tooltip |
|
|
34
|
+
| Layout (15+) | AppWindowWrapper, Window, MainContainer, ExpandableSideBar |
|
|
35
|
+
| Data Display (25+) | VirtualTable, SheetViewVirtualTable, Widget, HeatMap, JSONViewer |
|
|
36
|
+
| Forms (20+) | RFHInput, RFHSelect, RFHCheckbox, RFHDatePicker (React Hook Form + Yup) |
|
|
37
|
+
| Filters (15+) | FilterDropdown, DateFilter, StatusFilter, CurrencyFilter, CountryFilter, TreeDropdown |
|
|
38
|
+
| Status & Feedback (10+) | StatusChip, Loader, Toaster, ProgressBar, Error |
|
|
39
|
+
| Media (8+) | LazyImage, FileUpload, FilePreview, ImageWrapper, ReceiptsViewer |
|
|
40
|
+
| Charts (5+) | ActivityAreaChart, HeatMap, TableReports |
|
|
41
|
+
| Specialized (20+) | PaymentSourceFilter, MerchantsDropdown, Amount, DisplayAmount, VAT, Discount |
|
|
42
|
+
|
|
43
|
+
## Component Reference (compact)
|
|
44
|
+
|
|
45
|
+
One-line usage; all from `@tap-payments/os-micro-frontend-shared` unless noted.
|
|
46
|
+
|
|
47
|
+
| Component | Usage / key props |
|
|
48
|
+
|-----------|-------------------|
|
|
49
|
+
| **Core UI** | |
|
|
50
|
+
| Button | `variant="confirm"|"cancel"`, `size`, `onClick` |
|
|
51
|
+
| Dialog | `open`, `onClose`, `title`, `maxWidth`; use DialogContent inside |
|
|
52
|
+
| Input, InputBase | `label`, `value`, `onChange`, `error`, `helperText` |
|
|
53
|
+
| DropdownMenu | `options`, `value`, `onChange`, `placeholder` |
|
|
54
|
+
| Checkbox | `checked`, `onChange`, `label` |
|
|
55
|
+
| Menu, MenuItem | `anchorEl`, `open`, `onClose`; MenuItem `onClick` |
|
|
56
|
+
| Tooltip | `title`, `placement`; wrap trigger |
|
|
57
|
+
| **Layout** | |
|
|
58
|
+
| AppWindowWrapper | `header`, `leftSidebar`, `rightSidebar` + children |
|
|
59
|
+
| MainContainer | Wraps page content |
|
|
60
|
+
| ExpandableSideBar | `sections`, `defaultExpanded` |
|
|
61
|
+
| Window, WindowBackdrop | WindowBackdrop `open`; Window `title`, `onClose` |
|
|
62
|
+
| **Data** | |
|
|
63
|
+
| VirtualTable | `columns`, `data`, `rowHeight`, `height`, `onRowClick`, `hasMore`, `loadMore`, `isLoading`; type `Column` from `/types` |
|
|
64
|
+
| SheetViewVirtualTable | `columns`, `data`, `rowHeight`, `enableColumnResize`, `enableFilters`, `onCellEdit` |
|
|
65
|
+
| Widget, WidgetHeader, WidgetList, ListItem | Compose for dashboard widgets |
|
|
66
|
+
| JSONViewer | `data`, `collapsed`, `enableClipboard`, `theme` |
|
|
67
|
+
| HeatMap | `data` (day, hour, value), `width`, `height`, `colorScheme` |
|
|
68
|
+
| **Forms (RFH)** | `control` from useForm(), `name`, `label`, `rules`; options for Select |
|
|
69
|
+
| RFHInput, RFHSelect, RFHCheckbox, RFHDatePicker | Same pattern: control, name, label, rules |
|
|
70
|
+
| **Filters** | |
|
|
71
|
+
| FilterDropdown | `label`, `options`, `value`, `onChange`, optional `multiple` |
|
|
72
|
+
| DateFilter | `startDate`, `endDate`, `onChange`, `preset` |
|
|
73
|
+
| StatusFilter, CurrencyFilter, CountryFilter | `*s` list, `selected`, `onChange`; CountryFilter `multiple` |
|
|
74
|
+
| TreeDropdown | `data` (id, label, children[]), `selected`, `onChange`, `multiSelect` |
|
|
75
|
+
| **Status** | |
|
|
76
|
+
| StatusChip | `status`, `label`, `size` |
|
|
77
|
+
| Loader | `size`, `color` |
|
|
78
|
+
| Toaster + useToast | `<Toaster />` in app; `useToast()` then `toast.success()`, etc. |
|
|
79
|
+
| ProgressBar | `value`, `max`, `label` |
|
|
80
|
+
| Error | `message`, `onRetry` |
|
|
81
|
+
| **Media** | |
|
|
82
|
+
| LazyImage | `src`, `alt`, `width`, `height`, optional `placeholder` |
|
|
83
|
+
| FileUpload | `accept`, `maxSize`, `onUpload`, `multiple` |
|
|
84
|
+
| FilePreview | `file`, `onRemove`, `onDownload` |
|
|
85
|
+
| **Charts** | |
|
|
86
|
+
| ActivityAreaChart | `data`, `width`, `height`, `xKey`, `yKey` |
|
|
87
|
+
| TableReports | `data`, `columns`, `summary` |
|
|
88
|
+
| **Specialized** | |
|
|
89
|
+
| MerchantsDropdown | `merchants`, `selected`, `onChange` |
|
|
90
|
+
| PaymentSourceFilter | `sources`, `selected`, `onChange` |
|
|
91
|
+
| Amount, DisplayAmount | `value`/`amount`, `currency`; DisplayAmount `conversion` |
|
|
92
|
+
| VAT, Discount | amount/rate; originalPrice/discountedPrice/percentage |
|
|
93
|
+
|
|
94
|
+
## Component Selection Guide
|
|
95
|
+
|
|
96
|
+
### Which component to use
|
|
97
|
+
|
|
98
|
+
| Need | Use |
|
|
99
|
+
|------|-----|
|
|
100
|
+
| Tabular 100+ rows | VirtualTable |
|
|
101
|
+
| Tabular editable / resize | SheetViewVirtualTable |
|
|
102
|
+
| Input in form | RFHInput, RFHSelect, RFHCheckbox, RFHDatePicker |
|
|
103
|
+
| Input standalone | Input, DropdownMenu, Checkbox |
|
|
104
|
+
| Status static | StatusChip |
|
|
105
|
+
| Loading | Loader |
|
|
106
|
+
| Notification | Toaster + useToast |
|
|
107
|
+
| Layout full page | AppWindowWrapper |
|
|
108
|
+
| Layout section | MainContainer, Widget |
|
|
109
|
+
| Sidebar | ExpandableSideBar |
|
|
110
|
+
| Modal | Dialog, SimpleDialog, ConfirmDialog |
|
|
111
|
+
| Filter date | DateFilter |
|
|
112
|
+
| Filter options | FilterDropdown |
|
|
113
|
+
| Filter tree | TreeDropdown |
|
|
114
|
+
| Image | LazyImage |
|
|
115
|
+
| File | FileUpload, FilePreview |
|
|
116
|
+
|
|
117
|
+
### VirtualTable vs SheetViewVirtualTable
|
|
118
|
+
|
|
119
|
+
| | VirtualTable | SheetViewVirtualTable |
|
|
120
|
+
|--|--------------|------------------------|
|
|
121
|
+
| Rows | 100+ (virtualized) | Any (virtualized) |
|
|
122
|
+
| Infinite scroll | ✓ | ✓ |
|
|
123
|
+
| Inline edit | ✗ | ✓ |
|
|
124
|
+
| Column resize | — | ✓ |
|
|
125
|
+
|
|
126
|
+
### RFH vs regular inputs
|
|
127
|
+
|
|
128
|
+
- **RFH** (RFHInput, RFHSelect, …): forms with validation, React Hook Form, Yup.
|
|
129
|
+
- **Regular** (Input, DropdownMenu, …): standalone, no RHF, or custom form lib.
|
|
130
|
+
|
|
131
|
+
## Next Steps
|
|
132
|
+
|
|
133
|
+
- [Overview](./01-overview.md) · [Setup](./02-setup.md) · [Architecture](./03-architecture.md) · [Building Components](./05-component-development.md)
|