@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,173 @@
|
|
|
1
|
+
# Building Components
|
|
2
|
+
|
|
3
|
+
How to create new components, follow conventions, and wire them into the library. **Check the [Component Guide](./04-component-guide.md) first** to avoid duplicating existing components.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
1. [Component Folder Structure](#component-folder-structure) - File layout for a new component
|
|
8
|
+
2. [Export Chain](#export-chain) - How exports flow to consumers
|
|
9
|
+
3. [Conventions & Patterns](#conventions--patterns) - DO/DON'T and code patterns
|
|
10
|
+
4. [Component Template](#component-template) - Standard component structure
|
|
11
|
+
5. [Styling & Types](#styling--types) - style.ts and types.ts patterns
|
|
12
|
+
6. [Decision Tree](#decision-tree) - Structure, imports, exports, styling
|
|
13
|
+
7. [Quick Task Reference](#quick-task-reference) - Common development tasks
|
|
14
|
+
|
|
15
|
+
## Component Folder Structure
|
|
16
|
+
|
|
17
|
+
Each component lives in its own folder under `src/components/[Name]/`:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
src/components/[ComponentName]/
|
|
21
|
+
├── index.ts # Public exports (named + default)
|
|
22
|
+
├── [ComponentName].tsx # Main React component
|
|
23
|
+
├── style.ts # Emotion styled components
|
|
24
|
+
└── types.ts # Props and related interfaces
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Optional: add `helper.ts`, `utils.ts`, or subcomponents in the same folder as needed. Keep the public API in `index.ts`.
|
|
28
|
+
|
|
29
|
+
## Export Chain
|
|
30
|
+
|
|
31
|
+
```mermaid
|
|
32
|
+
flowchart TD
|
|
33
|
+
A["Component/index.ts"] --> B["components/index.ts"]
|
|
34
|
+
B --> C["src/index.ts"]
|
|
35
|
+
C --> D["build/"]
|
|
36
|
+
B["Named/default exports aggregated"] --> C
|
|
37
|
+
A["Public exports only"] --> B
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Steps to expose a new component to consumers:
|
|
41
|
+
|
|
42
|
+
1. Implement the component in `src/components/[Name]/` with `index.ts`, `[Name].tsx`, `types.ts`, `style.ts`.
|
|
43
|
+
2. Export the component from `src/components/[Name]/index.ts` (default + named types).
|
|
44
|
+
3. Re-export from `src/components/index.ts`.
|
|
45
|
+
4. Run `yarn ts:build`; the build output in `build/` reflects the same structure.
|
|
46
|
+
|
|
47
|
+
Consumers then import from the package (e.g. `@tap-payments/os-micro-frontend-shared` or `/components/Button`), not from path aliases.
|
|
48
|
+
|
|
49
|
+
## Conventions & Patterns
|
|
50
|
+
|
|
51
|
+
### Component Patterns
|
|
52
|
+
|
|
53
|
+
**DO:**
|
|
54
|
+
|
|
55
|
+
- Use `React.memo()` for performance where appropriate
|
|
56
|
+
- Name props interface `[Component]Props` or `[Component]I`
|
|
57
|
+
- Put styled components in a separate `style.ts`
|
|
58
|
+
- Export from `index.ts` with both named (types/helpers) and default (component) exports
|
|
59
|
+
- Use `@mui/material` base components
|
|
60
|
+
|
|
61
|
+
**DON'T:**
|
|
62
|
+
|
|
63
|
+
- Use inline styles; use Emotion/styled components
|
|
64
|
+
- Use class components; use function components only
|
|
65
|
+
- Export internal helpers that are not part of the public API from the main package
|
|
66
|
+
|
|
67
|
+
### Export Pattern
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
// Component/index.ts - Standard pattern
|
|
71
|
+
import ComponentName from './ComponentName'
|
|
72
|
+
|
|
73
|
+
export { SomeHelper } from './helper'
|
|
74
|
+
export type { ComponentNameProps } from './types'
|
|
75
|
+
|
|
76
|
+
export default ComponentName
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Component Template
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
// [Name].tsx
|
|
83
|
+
import { memo } from 'react'
|
|
84
|
+
import { StyledWrapper } from './style'
|
|
85
|
+
import type { MyComponentProps } from './types'
|
|
86
|
+
|
|
87
|
+
function MyComponent({ children, ...props }: MyComponentProps) {
|
|
88
|
+
return <StyledWrapper {...props}>{children}</StyledWrapper>
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export default memo(MyComponent)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Styling & Types
|
|
95
|
+
|
|
96
|
+
### Styling Pattern (style.ts)
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
// style.ts - Standard pattern
|
|
100
|
+
import { styled } from '@mui/material/styles'
|
|
101
|
+
|
|
102
|
+
export const StyledComponent = styled('div')(({ theme }) => ({
|
|
103
|
+
backgroundColor: theme.palette.background.paper,
|
|
104
|
+
borderRadius: theme.shape.borderRadius,
|
|
105
|
+
padding: theme.spacing(2),
|
|
106
|
+
}))
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Use theme tokens (palette, typography, spacing, shape) so the component respects the app theme.
|
|
110
|
+
|
|
111
|
+
### Type Definition Pattern (types.ts)
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
// types.ts
|
|
115
|
+
export interface MyComponentProps {
|
|
116
|
+
children?: React.ReactNode
|
|
117
|
+
variant?: 'primary' | 'secondary'
|
|
118
|
+
disabled?: boolean
|
|
119
|
+
onClick?: () => void
|
|
120
|
+
}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Export only the types that consumers need; keep internal types in the same file or a separate internal type file if needed.
|
|
124
|
+
|
|
125
|
+
## Decision Tree
|
|
126
|
+
|
|
127
|
+
```mermaid
|
|
128
|
+
flowchart TD
|
|
129
|
+
Q[How should I structure my component?]
|
|
130
|
+
Q --> A[Component folder structure]
|
|
131
|
+
Q --> B[How to import in source?]
|
|
132
|
+
Q --> C[How to export for consumers?]
|
|
133
|
+
Q --> D[How do consumers import?]
|
|
134
|
+
Q --> E[How to style?]
|
|
135
|
+
|
|
136
|
+
A --> A1["src/components/[Name]/"]
|
|
137
|
+
A1 --> A2["index.ts, [Name].tsx, types.ts, style.ts"]
|
|
138
|
+
|
|
139
|
+
B --> B1["Path aliases: @components, @utils, @types, etc."]
|
|
140
|
+
|
|
141
|
+
C --> C1["Add to module index e.g. src/components/index.ts"]
|
|
142
|
+
|
|
143
|
+
D --> D1["From package: '@tap-payments/os-micro-frontend-shared'"]
|
|
144
|
+
|
|
145
|
+
E --> E1["Emotion styled() with theme tokens"]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
| Question | Answer |
|
|
149
|
+
|----------|--------|
|
|
150
|
+
| Component folder structure | `src/components/[Name]/` with `index.ts`, `[Name].tsx`, `types.ts`, `style.ts` |
|
|
151
|
+
| How to import in source code? | Use path aliases: `@components`, `@utils`, `@types`, etc. |
|
|
152
|
+
| How to export for consumers? | Add to the module `index.ts` (e.g. `src/components/index.ts`) |
|
|
153
|
+
| How do consumers import? | From the package: `@tap-payments/os-micro-frontend-shared` or `/components/ComponentName` |
|
|
154
|
+
| How to style components? | Use Emotion `styled()` with theme tokens |
|
|
155
|
+
|
|
156
|
+
## Quick Task Reference
|
|
157
|
+
|
|
158
|
+
| Task | Steps |
|
|
159
|
+
|------|--------|
|
|
160
|
+
| **Find a component** | Search in `src/components/[ComponentName]/`; check `src/components/index.ts` for exports |
|
|
161
|
+
| **Understand a component** | Read `[ComponentName].tsx` for logic, `types.ts` for props, `style.ts` for styling |
|
|
162
|
+
| **Add new component** | Create `src/components/[Name]/` with `[Name].tsx`, `index.ts`, `types.ts`, `style.ts`; export from `src/components/index.ts`; follow patterns in this guide |
|
|
163
|
+
| **Debug import error** | Check `package.json` exports; verify path matches exports; confirm component is exported in the right `index.ts` |
|
|
164
|
+
| **Modify theme** | Edit `src/theme/palette.ts` (colors), `src/theme/typography.ts` (fonts), `src/theme/components.ts` (MUI overrides) |
|
|
165
|
+
| **Add utility function** | Add to the appropriate `src/utils/[category].ts`; export from `src/utils/index.ts`; add TypeScript types |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Next Steps
|
|
170
|
+
|
|
171
|
+
- [Component Guide](./04-component-guide.md) - Catalog of existing components and how to choose them (avoid duplication)
|
|
172
|
+
- [Architecture](./03-architecture.md) - Package structure, build system, path aliases
|
|
173
|
+
- [Setup Guide](./02-setup.md) - Development and build commands
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# OS Micro Frontend Shared - Documentation
|
|
2
|
+
|
|
3
|
+
Complete documentation for understanding and using the @tap-payments/os-micro-frontend-shared library. Designed for developers and AI assistants.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
1. [Overview](./01-overview.md) - Project purpose, goals, and key features
|
|
8
|
+
2. [Setup Guide](./02-setup.md) - Installation, development workflows, and CI/CD
|
|
9
|
+
3. [Architecture](./03-architecture.md) - System architecture and design decisions
|
|
10
|
+
4. [Component Guide](./04-component-guide.md) - Component catalog, selection, and avoiding duplication
|
|
11
|
+
5. [Building Components](./05-component-development.md) - How to create new components and follow patterns
|
|
12
|
+
|
|
13
|
+
## Quick Links
|
|
14
|
+
|
|
15
|
+
- **Getting Started**: [Setup Guide](./02-setup.md) for installation and commands
|
|
16
|
+
- **System Design**: [Architecture](./03-architecture.md) for understanding the structure
|
|
17
|
+
- **Using Components**: [Component Guide](./04-component-guide.md) for component catalog and selection
|
|
18
|
+
- **Creating Components**: [Building Components](./05-component-development.md) for new component steps and patterns
|
|
19
|
+
- **Project Goals**: [Overview](./01-overview.md) for context and features
|
|
20
|
+
|
|
21
|
+
## Project Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
os-micro-frontend-shared/
|
|
25
|
+
├── src/ # Source code
|
|
26
|
+
│ ├── components/ # UI components (100+)
|
|
27
|
+
│ ├── hooks/ # Custom React hooks (18)
|
|
28
|
+
│ ├── utils/ # Utility functions (47)
|
|
29
|
+
│ ├── types/ # TypeScript definitions (37)
|
|
30
|
+
│ ├── constants/ # Constants and configs (41)
|
|
31
|
+
│ ├── theme/ # MUI theme configuration
|
|
32
|
+
│ ├── demo/ # Development examples
|
|
33
|
+
│ └── index.ts # Main entry point
|
|
34
|
+
├── build/ # Compiled output (ESM)
|
|
35
|
+
└── docs/ # This documentation
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Version**: 1.0.0 | **Updated**: Feb 2026
|
|
@@ -0,0 +1,302 @@
|
|
|
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 Accordion from '@components/Accordion'
|
|
6
|
+
import type { AccordionProps } from '@components/Accordion/types'
|
|
7
|
+
import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
|
|
8
|
+
|
|
9
|
+
const baseContent = (
|
|
10
|
+
<Box sx={{ p: 2 }}>
|
|
11
|
+
<Typography variant="body2" color="text.secondary">
|
|
12
|
+
This is accordion body content. Use this area for forms, details, or grouped actions.
|
|
13
|
+
</Typography>
|
|
14
|
+
</Box>
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
const meta: Meta<typeof Accordion> = {
|
|
18
|
+
title: 'Components/Accordion',
|
|
19
|
+
component: Accordion,
|
|
20
|
+
tags: ['autodocs'],
|
|
21
|
+
argTypes: {
|
|
22
|
+
expanded: { table: { disable: true } },
|
|
23
|
+
onChange: { table: { disable: true } },
|
|
24
|
+
label: { control: 'text' },
|
|
25
|
+
content: { table: { disable: true } },
|
|
26
|
+
labelStartAdornment: { table: { disable: true } },
|
|
27
|
+
labelEndAdornment: { table: { disable: true } },
|
|
28
|
+
slotProps: { table: { disable: true } },
|
|
29
|
+
expandIcon: { table: { disable: true } },
|
|
30
|
+
disabled: { control: 'boolean' },
|
|
31
|
+
},
|
|
32
|
+
parameters: {
|
|
33
|
+
layout: 'padded',
|
|
34
|
+
controls: { expanded: true },
|
|
35
|
+
},
|
|
36
|
+
decorators: [
|
|
37
|
+
(Story) => (
|
|
38
|
+
<Box sx={{ maxWidth: 640, mx: 'auto', width: '100%' }}>
|
|
39
|
+
<Story />
|
|
40
|
+
</Box>
|
|
41
|
+
),
|
|
42
|
+
],
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default meta
|
|
46
|
+
|
|
47
|
+
type Story = StoryObj<typeof Accordion>
|
|
48
|
+
|
|
49
|
+
function BaseRender(args: Partial<AccordionProps>) {
|
|
50
|
+
const [expanded, setExpanded] = useState(false)
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Accordion
|
|
54
|
+
expanded={expanded}
|
|
55
|
+
onChange={setExpanded}
|
|
56
|
+
label={args.label || 'Section title'}
|
|
57
|
+
content={baseContent}
|
|
58
|
+
disabled={args.disabled}
|
|
59
|
+
slotProps={args.slotProps}
|
|
60
|
+
labelStartAdornment={args.labelStartAdornment}
|
|
61
|
+
labelEndAdornment={args.labelEndAdornment}
|
|
62
|
+
expandIcon={args.expandIcon}
|
|
63
|
+
/>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const Base: Story = {
|
|
68
|
+
render: BaseRender,
|
|
69
|
+
args: {
|
|
70
|
+
label: 'Section title',
|
|
71
|
+
disabled: false,
|
|
72
|
+
},
|
|
73
|
+
parameters: {
|
|
74
|
+
docs: {
|
|
75
|
+
source: {
|
|
76
|
+
language: 'tsx',
|
|
77
|
+
code: `
|
|
78
|
+
const [expanded, setExpanded] = useState(false)
|
|
79
|
+
|
|
80
|
+
<Accordion
|
|
81
|
+
expanded={expanded}
|
|
82
|
+
onChange={setExpanded}
|
|
83
|
+
label="Section title"
|
|
84
|
+
content={<Box sx={{ p: 2 }}>...</Box>}
|
|
85
|
+
/>
|
|
86
|
+
`.trim(),
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function DefaultExpandedRender() {
|
|
93
|
+
const [expanded, setExpanded] = useState(true)
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<Accordion
|
|
97
|
+
expanded={expanded}
|
|
98
|
+
onChange={setExpanded}
|
|
99
|
+
label="Initially expanded"
|
|
100
|
+
content={baseContent}
|
|
101
|
+
labelEndAdornment={<Typography variant="caption">3 items</Typography>}
|
|
102
|
+
/>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export const DefaultExpanded: Story = {
|
|
107
|
+
name: 'default expanded',
|
|
108
|
+
render: DefaultExpandedRender,
|
|
109
|
+
parameters: {
|
|
110
|
+
docs: {
|
|
111
|
+
source: {
|
|
112
|
+
language: 'tsx',
|
|
113
|
+
code: `
|
|
114
|
+
const [expanded, setExpanded] = useState(true)
|
|
115
|
+
|
|
116
|
+
<Accordion
|
|
117
|
+
expanded={expanded}
|
|
118
|
+
onChange={setExpanded}
|
|
119
|
+
label="Initially expanded"
|
|
120
|
+
content={<Box sx={{ p: 2 }}>...</Box>}
|
|
121
|
+
labelEndAdornment={<Typography variant="caption">3 items</Typography>}
|
|
122
|
+
/>
|
|
123
|
+
`.trim(),
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function WithAdornmentsRender() {
|
|
130
|
+
const [expanded, setExpanded] = useState(false)
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<Accordion
|
|
134
|
+
expanded={expanded}
|
|
135
|
+
onChange={setExpanded}
|
|
136
|
+
label="Filters"
|
|
137
|
+
labelStartAdornment={<Box component="span">F</Box>}
|
|
138
|
+
labelEndAdornment={<Typography variant="caption">Updated now</Typography>}
|
|
139
|
+
content={
|
|
140
|
+
<Box sx={{ p: 2, display: 'grid', gap: 1 }}>
|
|
141
|
+
<Typography variant="body2" color="text.secondary">
|
|
142
|
+
Status: Paid
|
|
143
|
+
</Typography>
|
|
144
|
+
<Typography variant="body2" color="text.secondary">
|
|
145
|
+
Region: GCC
|
|
146
|
+
</Typography>
|
|
147
|
+
</Box>
|
|
148
|
+
}
|
|
149
|
+
/>
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export const WithAdornments: Story = {
|
|
154
|
+
name: 'with adornments',
|
|
155
|
+
render: WithAdornmentsRender,
|
|
156
|
+
parameters: {
|
|
157
|
+
docs: {
|
|
158
|
+
source: {
|
|
159
|
+
language: 'tsx',
|
|
160
|
+
code: `
|
|
161
|
+
const [expanded, setExpanded] = useState(false)
|
|
162
|
+
|
|
163
|
+
<Accordion
|
|
164
|
+
expanded={expanded}
|
|
165
|
+
onChange={setExpanded}
|
|
166
|
+
label="Filters"
|
|
167
|
+
labelStartAdornment={<Box component="span">F</Box>}
|
|
168
|
+
labelEndAdornment={<Typography variant="caption">Updated now</Typography>}
|
|
169
|
+
content={<Box sx={{ p: 2 }}>...</Box>}
|
|
170
|
+
/>
|
|
171
|
+
`.trim(),
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
function DisabledRender() {
|
|
178
|
+
const [expanded, setExpanded] = useState(false)
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
<Accordion
|
|
182
|
+
expanded={expanded}
|
|
183
|
+
onChange={setExpanded}
|
|
184
|
+
disabled
|
|
185
|
+
label="Disabled section"
|
|
186
|
+
content={
|
|
187
|
+
<Box sx={{ p: 2 }}>
|
|
188
|
+
<Typography variant="body2">This section is not interactive while disabled.</Typography>
|
|
189
|
+
</Box>
|
|
190
|
+
}
|
|
191
|
+
/>
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export const Disabled: Story = {
|
|
196
|
+
render: DisabledRender,
|
|
197
|
+
parameters: {
|
|
198
|
+
docs: {
|
|
199
|
+
source: {
|
|
200
|
+
language: 'tsx',
|
|
201
|
+
code: `
|
|
202
|
+
const [expanded, setExpanded] = useState(false)
|
|
203
|
+
|
|
204
|
+
<Accordion
|
|
205
|
+
expanded={expanded}
|
|
206
|
+
onChange={setExpanded}
|
|
207
|
+
disabled
|
|
208
|
+
label="Disabled section"
|
|
209
|
+
content={<Box sx={{ p: 2 }}>...</Box>}
|
|
210
|
+
/>
|
|
211
|
+
`.trim(),
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const tableColumns = ['VARIANT', 'PREVIEW'] as const
|
|
218
|
+
|
|
219
|
+
function AllVariantsRender() {
|
|
220
|
+
const [expandedRows, setExpandedRows] = useState({
|
|
221
|
+
collapsed: false,
|
|
222
|
+
expanded: true,
|
|
223
|
+
noArrow: false,
|
|
224
|
+
disabled: false,
|
|
225
|
+
})
|
|
226
|
+
|
|
227
|
+
return (
|
|
228
|
+
<Box sx={{ maxWidth: 960, mx: 'auto' }}>
|
|
229
|
+
<StoryTable>
|
|
230
|
+
<StoryThead>
|
|
231
|
+
<StoryRow>
|
|
232
|
+
{tableColumns.map((header, index) => (
|
|
233
|
+
<StoryHeaderCell key={header} first={index === 0}>
|
|
234
|
+
{header}
|
|
235
|
+
</StoryHeaderCell>
|
|
236
|
+
))}
|
|
237
|
+
</StoryRow>
|
|
238
|
+
</StoryThead>
|
|
239
|
+
|
|
240
|
+
<StoryTbody>
|
|
241
|
+
<StoryRow>
|
|
242
|
+
<StoryRowLabel>Collapsed</StoryRowLabel>
|
|
243
|
+
<StoryCell sx={{ width: '75%' }}>
|
|
244
|
+
<Accordion
|
|
245
|
+
expanded={expandedRows.collapsed}
|
|
246
|
+
onChange={(next) => setExpandedRows((prev) => ({ ...prev, collapsed: next }))}
|
|
247
|
+
label="Collapsed accordion"
|
|
248
|
+
content={baseContent}
|
|
249
|
+
/>
|
|
250
|
+
</StoryCell>
|
|
251
|
+
</StoryRow>
|
|
252
|
+
|
|
253
|
+
<StoryRow>
|
|
254
|
+
<StoryRowLabel>Expanded</StoryRowLabel>
|
|
255
|
+
<StoryCell sx={{ width: '75%' }}>
|
|
256
|
+
<Accordion
|
|
257
|
+
expanded={expandedRows.expanded}
|
|
258
|
+
onChange={(next) => setExpandedRows((prev) => ({ ...prev, expanded: next }))}
|
|
259
|
+
label="Expanded accordion"
|
|
260
|
+
content={baseContent}
|
|
261
|
+
/>
|
|
262
|
+
</StoryCell>
|
|
263
|
+
</StoryRow>
|
|
264
|
+
|
|
265
|
+
<StoryRow>
|
|
266
|
+
<StoryRowLabel>No Arrow</StoryRowLabel>
|
|
267
|
+
<StoryCell sx={{ width: '75%' }}>
|
|
268
|
+
<Accordion
|
|
269
|
+
expanded={expandedRows.noArrow}
|
|
270
|
+
onChange={(next) => setExpandedRows((prev) => ({ ...prev, noArrow: next }))}
|
|
271
|
+
label="Arrow hidden via slot props"
|
|
272
|
+
content={baseContent}
|
|
273
|
+
slotProps={{ label: { showArrow: false } }}
|
|
274
|
+
/>
|
|
275
|
+
</StoryCell>
|
|
276
|
+
</StoryRow>
|
|
277
|
+
|
|
278
|
+
<StoryRow>
|
|
279
|
+
<StoryRowLabel>Disabled</StoryRowLabel>
|
|
280
|
+
<StoryCell sx={{ width: '75%' }}>
|
|
281
|
+
<Accordion
|
|
282
|
+
expanded={expandedRows.disabled}
|
|
283
|
+
onChange={(next) => setExpandedRows((prev) => ({ ...prev, disabled: next }))}
|
|
284
|
+
label="Disabled accordion"
|
|
285
|
+
content={baseContent}
|
|
286
|
+
disabled
|
|
287
|
+
/>
|
|
288
|
+
</StoryCell>
|
|
289
|
+
</StoryRow>
|
|
290
|
+
</StoryTbody>
|
|
291
|
+
</StoryTable>
|
|
292
|
+
|
|
293
|
+
<StoryHint>Each row is independently controllable. Click labels to toggle expansion.</StoryHint>
|
|
294
|
+
</Box>
|
|
295
|
+
)
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export const AllVariants: Story = {
|
|
299
|
+
name: 'all variants',
|
|
300
|
+
decorators: [],
|
|
301
|
+
render: AllVariantsRender,
|
|
302
|
+
}
|