@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,149 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import StatusChip from '@components/StatusChip'
|
|
4
|
+
import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
|
|
5
|
+
import { ChipProps } from '@components/StatusChip/type'
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof StatusChip> = {
|
|
8
|
+
title: 'Components/StatusChip',
|
|
9
|
+
component: StatusChip,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
disabled: { control: 'boolean' },
|
|
13
|
+
isSelected: { control: 'boolean', description: 'Expands chip to reveal copy icon' },
|
|
14
|
+
fullWidth: { control: 'boolean' },
|
|
15
|
+
expandDirection: {
|
|
16
|
+
control: 'radio',
|
|
17
|
+
options: ['left', 'right'],
|
|
18
|
+
description: 'Direction the copy icon expands toward',
|
|
19
|
+
},
|
|
20
|
+
textColor: { control: 'color' },
|
|
21
|
+
bgColor: { control: 'color' },
|
|
22
|
+
borderColor: { control: 'color' },
|
|
23
|
+
copyText: { control: 'text', description: 'Value copied to clipboard on click' },
|
|
24
|
+
children: { control: 'text' },
|
|
25
|
+
chipStyles: { table: { disable: true } },
|
|
26
|
+
containerStyles: { table: { disable: true } },
|
|
27
|
+
},
|
|
28
|
+
parameters: {
|
|
29
|
+
layout: 'padded',
|
|
30
|
+
controls: { expanded: true },
|
|
31
|
+
},
|
|
32
|
+
decorators: [
|
|
33
|
+
(Story) => (
|
|
34
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>
|
|
35
|
+
<Story />
|
|
36
|
+
</Box>
|
|
37
|
+
),
|
|
38
|
+
],
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default meta
|
|
42
|
+
type Story = StoryObj<typeof StatusChip>
|
|
43
|
+
|
|
44
|
+
// ──────────────────────────────────────────────
|
|
45
|
+
// Focused stories
|
|
46
|
+
|
|
47
|
+
export const Base: Story = {
|
|
48
|
+
args: {
|
|
49
|
+
children: 'Active',
|
|
50
|
+
bgColor: '#E6F7EE',
|
|
51
|
+
textColor: '#1A7A45',
|
|
52
|
+
borderColor: '#B0E4C8',
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const Selected: Story = {
|
|
57
|
+
args: {
|
|
58
|
+
children: 'LIVE-TXN-001',
|
|
59
|
+
bgColor: '#EFF5FF',
|
|
60
|
+
textColor: '#1A56DB',
|
|
61
|
+
borderColor: '#C3D9FF',
|
|
62
|
+
isSelected: true,
|
|
63
|
+
copyText: 'LIVE-TXN-001',
|
|
64
|
+
},
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const Disabled: Story = {
|
|
68
|
+
args: {
|
|
69
|
+
children: 'Inactive',
|
|
70
|
+
bgColor: '#F5F5F5',
|
|
71
|
+
textColor: '#9E9E9E',
|
|
72
|
+
borderColor: '#E0E0E0',
|
|
73
|
+
disabled: true,
|
|
74
|
+
},
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const Empty: Story = {
|
|
78
|
+
args: {
|
|
79
|
+
children: undefined,
|
|
80
|
+
unknownText: 'unknown',
|
|
81
|
+
},
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// ──────────────────────────────────────────────
|
|
85
|
+
// Kitchen sink
|
|
86
|
+
|
|
87
|
+
type ChipOverride = Partial<ChipProps>
|
|
88
|
+
|
|
89
|
+
const tableColumns = ['STATUS', 'DEFAULT', 'SELECTED + COPY', 'DISABLED'] as const
|
|
90
|
+
|
|
91
|
+
const statusRows: Array<{ label: string; base: ChipOverride }> = [
|
|
92
|
+
{
|
|
93
|
+
label: 'Success',
|
|
94
|
+
base: { children: 'Paid', bgColor: '#E6F7EE', textColor: '#1A7A45', borderColor: '#B0E4C8' },
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: 'Error',
|
|
98
|
+
base: { children: 'Failed', bgColor: '#FFF0F0', textColor: '#D32F2F', borderColor: '#FFCDD2' },
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: 'Warning',
|
|
102
|
+
base: { children: 'Pending', bgColor: '#FFF8E1', textColor: '#F57F17', borderColor: '#FFE082' },
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: 'Info',
|
|
106
|
+
base: { children: 'Processing', bgColor: '#EFF5FF', textColor: '#1A56DB', borderColor: '#C3D9FF' },
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
label: 'Neutral',
|
|
110
|
+
base: { children: 'Inactive', bgColor: '#F5F5F5', textColor: '#616161', borderColor: '#E0E0E0' },
|
|
111
|
+
},
|
|
112
|
+
]
|
|
113
|
+
|
|
114
|
+
export const AllVariants: Story = {
|
|
115
|
+
name: 'all variants',
|
|
116
|
+
render: (args) => {
|
|
117
|
+
const renderChip = (override: ChipOverride = {}) => <StatusChip {...args} {...override} />
|
|
118
|
+
|
|
119
|
+
return (
|
|
120
|
+
<Box sx={{ maxWidth: 960, mx: 'auto' }}>
|
|
121
|
+
<StoryTable>
|
|
122
|
+
<StoryThead>
|
|
123
|
+
<StoryRow>
|
|
124
|
+
{tableColumns.map((header, index) => (
|
|
125
|
+
<StoryHeaderCell key={header} first={index === 0}>
|
|
126
|
+
{header}
|
|
127
|
+
</StoryHeaderCell>
|
|
128
|
+
))}
|
|
129
|
+
</StoryRow>
|
|
130
|
+
</StoryThead>
|
|
131
|
+
|
|
132
|
+
<StoryTbody>
|
|
133
|
+
{statusRows.map(({ label, base }) => (
|
|
134
|
+
<StoryRow key={label}>
|
|
135
|
+
<StoryRowLabel>{label}</StoryRowLabel>
|
|
136
|
+
<StoryCell>{renderChip(base)}</StoryCell>
|
|
137
|
+
<StoryCell>{renderChip({ ...base, isSelected: true, copyText: String(base.children) })}</StoryCell>
|
|
138
|
+
<StoryCell>{renderChip({ ...base, disabled: true })}</StoryCell>
|
|
139
|
+
</StoryRow>
|
|
140
|
+
))}
|
|
141
|
+
</StoryTbody>
|
|
142
|
+
</StoryTable>
|
|
143
|
+
|
|
144
|
+
<StoryHint>Click a chip to see the copy icon expand. Use Controls to toggle isSelected.</StoryHint>
|
|
145
|
+
</Box>
|
|
146
|
+
)
|
|
147
|
+
},
|
|
148
|
+
args: {},
|
|
149
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import StatusLabel from '@components/StatusLabel'
|
|
4
|
+
import { ChargeStatus } from '@components/TableCells'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof StatusLabel> = {
|
|
7
|
+
title: 'Components/StatusLabel',
|
|
8
|
+
component: StatusLabel,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
status: {
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: Object.values(ChargeStatus),
|
|
14
|
+
},
|
|
15
|
+
statusCode: {
|
|
16
|
+
control: 'select',
|
|
17
|
+
options: Object.values(ChargeStatus),
|
|
18
|
+
},
|
|
19
|
+
tooltip: {
|
|
20
|
+
control: 'text',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
parameters: {
|
|
24
|
+
layout: 'centered',
|
|
25
|
+
controls: { expanded: true },
|
|
26
|
+
},
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default meta
|
|
30
|
+
|
|
31
|
+
type Story = StoryObj<typeof StatusLabel>
|
|
32
|
+
|
|
33
|
+
export const Captured: Story = {
|
|
34
|
+
args: {
|
|
35
|
+
status: ChargeStatus.CAPTURED,
|
|
36
|
+
statusCode: 'CAPTURED',
|
|
37
|
+
tooltip: 'Charge captured successfully',
|
|
38
|
+
},
|
|
39
|
+
render: (args) => (
|
|
40
|
+
<Box sx={{ p: 1 }}>
|
|
41
|
+
<StatusLabel {...args} />
|
|
42
|
+
</Box>
|
|
43
|
+
),
|
|
44
|
+
parameters: {
|
|
45
|
+
docs: {
|
|
46
|
+
source: {
|
|
47
|
+
language: 'tsx',
|
|
48
|
+
code: `
|
|
49
|
+
<StatusLabel
|
|
50
|
+
status={ChargeStatus.CAPTURED}
|
|
51
|
+
statusCode="CAPTURED"
|
|
52
|
+
tooltip="Charge captured successfully"
|
|
53
|
+
/>
|
|
54
|
+
`.trim(),
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const Failed: Story = {
|
|
61
|
+
args: {
|
|
62
|
+
status: ChargeStatus.FAILED,
|
|
63
|
+
statusCode: 'FAILED',
|
|
64
|
+
tooltip: 'Charge failed',
|
|
65
|
+
},
|
|
66
|
+
render: (args) => (
|
|
67
|
+
<Box sx={{ p: 1 }}>
|
|
68
|
+
<StatusLabel {...args} />
|
|
69
|
+
</Box>
|
|
70
|
+
),
|
|
71
|
+
parameters: {
|
|
72
|
+
docs: {
|
|
73
|
+
source: {
|
|
74
|
+
language: 'tsx',
|
|
75
|
+
code: `
|
|
76
|
+
<StatusLabel
|
|
77
|
+
status={ChargeStatus.FAILED}
|
|
78
|
+
statusCode="FAILED"
|
|
79
|
+
tooltip="Charge failed"
|
|
80
|
+
/>
|
|
81
|
+
`.trim(),
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import Text from '@components/Text'
|
|
4
|
+
import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Text> = {
|
|
7
|
+
title: 'Components/Text',
|
|
8
|
+
component: Text,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
children: { control: 'text' },
|
|
12
|
+
color: {
|
|
13
|
+
control: 'select',
|
|
14
|
+
options: ['text.primary', 'text.secondary', 'text.disabled', 'primary.main', 'error.main', 'success.main'],
|
|
15
|
+
description: 'MUI color token or any CSS color string',
|
|
16
|
+
},
|
|
17
|
+
align: {
|
|
18
|
+
control: 'select',
|
|
19
|
+
options: ['left', 'center', 'right', 'justify'],
|
|
20
|
+
},
|
|
21
|
+
noWrap: { control: 'boolean', description: 'Truncate with ellipsis when text overflows' },
|
|
22
|
+
},
|
|
23
|
+
parameters: {
|
|
24
|
+
layout: 'padded',
|
|
25
|
+
controls: { expanded: true },
|
|
26
|
+
},
|
|
27
|
+
decorators: [
|
|
28
|
+
(Story) => (
|
|
29
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>
|
|
30
|
+
<Story />
|
|
31
|
+
</Box>
|
|
32
|
+
),
|
|
33
|
+
],
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default meta
|
|
37
|
+
|
|
38
|
+
type Story = StoryObj<typeof Text>
|
|
39
|
+
|
|
40
|
+
// ──────────────────────────────────────────────
|
|
41
|
+
// Focused / named stories
|
|
42
|
+
|
|
43
|
+
export const Base: Story = {
|
|
44
|
+
args: { children: 'The quick brown fox jumps over the lazy dog' },
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const Secondary: Story = {
|
|
48
|
+
args: { children: 'Secondary text color', color: 'text.secondary' },
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const Error: Story = {
|
|
52
|
+
args: { children: 'Error text color', color: 'error.main' },
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const NoWrap: Story = {
|
|
56
|
+
args: {
|
|
57
|
+
children: 'This is a very long line of text that will be truncated with an ellipsis when it exceeds the container width',
|
|
58
|
+
noWrap: true,
|
|
59
|
+
sx: { maxWidth: 320 },
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// ──────────────────────────────────────────────
|
|
64
|
+
// Kitchen sink
|
|
65
|
+
|
|
66
|
+
const tableColumns = ['COLOR', 'SAMPLE'] as const
|
|
67
|
+
|
|
68
|
+
type ColorRow = { label: string; color: string }
|
|
69
|
+
|
|
70
|
+
const colorRows: ColorRow[] = [
|
|
71
|
+
{ label: 'text.primary', color: 'text.primary' },
|
|
72
|
+
{ label: 'text.secondary', color: 'text.secondary' },
|
|
73
|
+
{ label: 'text.disabled', color: 'text.disabled' },
|
|
74
|
+
{ label: 'primary.main', color: 'primary.main' },
|
|
75
|
+
{ label: 'error.main', color: 'error.main' },
|
|
76
|
+
{ label: 'success.main', color: 'success.main' },
|
|
77
|
+
]
|
|
78
|
+
|
|
79
|
+
export const AllVariants: Story = {
|
|
80
|
+
name: 'all variants',
|
|
81
|
+
decorators: [],
|
|
82
|
+
render: () => (
|
|
83
|
+
<Box sx={{ maxWidth: 720, mx: 'auto' }}>
|
|
84
|
+
<StoryTable>
|
|
85
|
+
<StoryThead>
|
|
86
|
+
<StoryRow>
|
|
87
|
+
{tableColumns.map((header, index) => (
|
|
88
|
+
<StoryHeaderCell key={header} first={index === 0}>
|
|
89
|
+
{header}
|
|
90
|
+
</StoryHeaderCell>
|
|
91
|
+
))}
|
|
92
|
+
</StoryRow>
|
|
93
|
+
</StoryThead>
|
|
94
|
+
|
|
95
|
+
<StoryTbody>
|
|
96
|
+
{colorRows.map(({ label, color }) => (
|
|
97
|
+
<StoryRow key={label}>
|
|
98
|
+
<StoryRowLabel>{label}</StoryRowLabel>
|
|
99
|
+
<StoryCell sx={{ textAlign: 'left' }}>
|
|
100
|
+
<Text color={color}>The quick brown fox jumps over the lazy dog</Text>
|
|
101
|
+
</StoryCell>
|
|
102
|
+
</StoryRow>
|
|
103
|
+
))}
|
|
104
|
+
</StoryTbody>
|
|
105
|
+
</StoryTable>
|
|
106
|
+
|
|
107
|
+
<StoryHint>Text is a styled MUI Typography (subtitle2). Use the Controls panel to experiment with color and alignment.</StoryHint>
|
|
108
|
+
</Box>
|
|
109
|
+
),
|
|
110
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import Button from '@mui/material/Button'
|
|
4
|
+
import Stack from '@mui/material/Stack'
|
|
5
|
+
import toast from 'react-hot-toast'
|
|
6
|
+
import Toaster from '@components/Toaster'
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof Toaster> = {
|
|
9
|
+
title: 'Components/Toaster',
|
|
10
|
+
component: Toaster,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: 'centered',
|
|
14
|
+
controls: { expanded: true },
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default meta
|
|
19
|
+
|
|
20
|
+
type Story = StoryObj<typeof Toaster>
|
|
21
|
+
|
|
22
|
+
export const Playground: Story = {
|
|
23
|
+
render: () => (
|
|
24
|
+
<Box>
|
|
25
|
+
<Stack direction="row" spacing={1.5}>
|
|
26
|
+
<Button
|
|
27
|
+
variant="contained"
|
|
28
|
+
onClick={() => {
|
|
29
|
+
toast.success('Saved successfully')
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
Show success
|
|
33
|
+
</Button>
|
|
34
|
+
<Button
|
|
35
|
+
variant="outlined"
|
|
36
|
+
color="error"
|
|
37
|
+
onClick={() => {
|
|
38
|
+
toast.error('Unable to save changes')
|
|
39
|
+
}}
|
|
40
|
+
>
|
|
41
|
+
Show error
|
|
42
|
+
</Button>
|
|
43
|
+
</Stack>
|
|
44
|
+
<Toaster />
|
|
45
|
+
</Box>
|
|
46
|
+
),
|
|
47
|
+
parameters: {
|
|
48
|
+
docs: {
|
|
49
|
+
source: {
|
|
50
|
+
language: 'tsx',
|
|
51
|
+
code: `
|
|
52
|
+
<Button onClick={() => toast.success('Saved successfully')}>
|
|
53
|
+
Show success
|
|
54
|
+
</Button>
|
|
55
|
+
|
|
56
|
+
<Button onClick={() => toast.error('Unable to save changes')}>
|
|
57
|
+
Show error
|
|
58
|
+
</Button>
|
|
59
|
+
|
|
60
|
+
<Toaster />
|
|
61
|
+
`.trim(),
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import Typography from '@mui/material/Typography'
|
|
4
|
+
import Tooltip from '@components/Tooltip'
|
|
5
|
+
import type { TooltipProps } from '@mui/material/Tooltip'
|
|
6
|
+
import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
|
|
7
|
+
|
|
8
|
+
const TriggerBox = ({ label }: { label: string }) => (
|
|
9
|
+
<Box
|
|
10
|
+
sx={{
|
|
11
|
+
px: 2,
|
|
12
|
+
py: 1,
|
|
13
|
+
border: '1px dashed #ccc',
|
|
14
|
+
borderRadius: 1,
|
|
15
|
+
cursor: 'default',
|
|
16
|
+
fontSize: 13,
|
|
17
|
+
color: '#555',
|
|
18
|
+
}}
|
|
19
|
+
>
|
|
20
|
+
{label}
|
|
21
|
+
</Box>
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
const meta: Meta<typeof Tooltip> = {
|
|
25
|
+
title: 'Components/Tooltip',
|
|
26
|
+
component: Tooltip,
|
|
27
|
+
tags: ['autodocs'],
|
|
28
|
+
argTypes: {
|
|
29
|
+
title: { control: 'text', description: 'Content shown inside the tooltip' },
|
|
30
|
+
placement: {
|
|
31
|
+
control: 'select',
|
|
32
|
+
options: [
|
|
33
|
+
'top',
|
|
34
|
+
'top-start',
|
|
35
|
+
'top-end',
|
|
36
|
+
'bottom',
|
|
37
|
+
'bottom-start',
|
|
38
|
+
'bottom-end',
|
|
39
|
+
'left',
|
|
40
|
+
'left-start',
|
|
41
|
+
'left-end',
|
|
42
|
+
'right',
|
|
43
|
+
'right-start',
|
|
44
|
+
'right-end',
|
|
45
|
+
] as TooltipProps['placement'][],
|
|
46
|
+
},
|
|
47
|
+
children: { table: { disable: true } },
|
|
48
|
+
wrapperProps: { table: { disable: true } },
|
|
49
|
+
},
|
|
50
|
+
parameters: {
|
|
51
|
+
layout: 'padded',
|
|
52
|
+
controls: { expanded: true },
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default meta
|
|
57
|
+
type Story = StoryObj<typeof Tooltip>
|
|
58
|
+
|
|
59
|
+
// ──────────────────────────────────────────────
|
|
60
|
+
// Focused stories
|
|
61
|
+
|
|
62
|
+
export const Base: Story = {
|
|
63
|
+
args: {
|
|
64
|
+
title: 'This is a tooltip',
|
|
65
|
+
placement: 'top',
|
|
66
|
+
},
|
|
67
|
+
parameters: {
|
|
68
|
+
docs: {
|
|
69
|
+
source: {
|
|
70
|
+
language: 'tsx',
|
|
71
|
+
code: `
|
|
72
|
+
<Tooltip title="This is a tooltip" placement="top">
|
|
73
|
+
<Box>Hover me</Box>
|
|
74
|
+
</Tooltip>
|
|
75
|
+
`.trim(),
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
render: (args) => (
|
|
80
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', py: 4 }}>
|
|
81
|
+
<Tooltip {...args}>
|
|
82
|
+
<TriggerBox label="Hover me" />
|
|
83
|
+
</Tooltip>
|
|
84
|
+
</Box>
|
|
85
|
+
),
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const Bottom: Story = {
|
|
89
|
+
args: {
|
|
90
|
+
title: 'Tooltip below',
|
|
91
|
+
placement: 'bottom',
|
|
92
|
+
},
|
|
93
|
+
parameters: {
|
|
94
|
+
docs: {
|
|
95
|
+
source: {
|
|
96
|
+
language: 'tsx',
|
|
97
|
+
code: `
|
|
98
|
+
<Tooltip title="Tooltip below" placement="bottom">
|
|
99
|
+
<Box>Hover me</Box>
|
|
100
|
+
</Tooltip>
|
|
101
|
+
`.trim(),
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
render: (args) => (
|
|
106
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', py: 4 }}>
|
|
107
|
+
<Tooltip {...args}>
|
|
108
|
+
<TriggerBox label="Hover me" />
|
|
109
|
+
</Tooltip>
|
|
110
|
+
</Box>
|
|
111
|
+
),
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export const WithRichContent: Story = {
|
|
115
|
+
name: 'with rich content',
|
|
116
|
+
parameters: {
|
|
117
|
+
docs: {
|
|
118
|
+
source: {
|
|
119
|
+
language: 'tsx',
|
|
120
|
+
code: `
|
|
121
|
+
<Tooltip
|
|
122
|
+
placement="top"
|
|
123
|
+
title={
|
|
124
|
+
<Box>
|
|
125
|
+
<Typography variant="body2" fontWeight={600}>Transaction ID</Typography>
|
|
126
|
+
<Typography variant="caption">TXN-2024-00123</Typography>
|
|
127
|
+
</Box>
|
|
128
|
+
}
|
|
129
|
+
>
|
|
130
|
+
<Box>Hover for details</Box>
|
|
131
|
+
</Tooltip>
|
|
132
|
+
`.trim(),
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
args: {
|
|
137
|
+
placement: 'top',
|
|
138
|
+
title: (
|
|
139
|
+
<Box>
|
|
140
|
+
<Typography variant="body2" fontWeight={600}>
|
|
141
|
+
Transaction ID
|
|
142
|
+
</Typography>
|
|
143
|
+
<Typography variant="caption">TXN-2024-00123</Typography>
|
|
144
|
+
</Box>
|
|
145
|
+
),
|
|
146
|
+
},
|
|
147
|
+
render: (args) => (
|
|
148
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', py: 4 }}>
|
|
149
|
+
<Tooltip {...args}>
|
|
150
|
+
<TriggerBox label="Hover for details" />
|
|
151
|
+
</Tooltip>
|
|
152
|
+
</Box>
|
|
153
|
+
),
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// ──────────────────────────────────────────────
|
|
157
|
+
// Kitchen sink
|
|
158
|
+
|
|
159
|
+
type Placement = TooltipProps['placement']
|
|
160
|
+
|
|
161
|
+
const tableColumns = ['PLACEMENT', 'PREVIEW'] as const
|
|
162
|
+
|
|
163
|
+
const placementRows: Array<{ label: string; placement: Placement }> = [
|
|
164
|
+
{ label: 'Top', placement: 'top' },
|
|
165
|
+
{ label: 'Top-Start', placement: 'top-start' },
|
|
166
|
+
{ label: 'Top-End', placement: 'top-end' },
|
|
167
|
+
{ label: 'Bottom', placement: 'bottom' },
|
|
168
|
+
{ label: 'Left', placement: 'left' },
|
|
169
|
+
{ label: 'Right', placement: 'right' },
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
export const AllVariants: Story = {
|
|
173
|
+
name: 'all variants',
|
|
174
|
+
parameters: {
|
|
175
|
+
docs: {
|
|
176
|
+
source: {
|
|
177
|
+
language: 'tsx',
|
|
178
|
+
code: `
|
|
179
|
+
<Tooltip title="Top" placement="top"><Box>Hover me</Box></Tooltip>
|
|
180
|
+
<Tooltip title="Bottom" placement="bottom"><Box>Hover me</Box></Tooltip>
|
|
181
|
+
<Tooltip title="Left" placement="left"><Box>Hover me</Box></Tooltip>
|
|
182
|
+
<Tooltip title="Right" placement="right"><Box>Hover me</Box></Tooltip>
|
|
183
|
+
`.trim(),
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
render: () => (
|
|
188
|
+
<Box>
|
|
189
|
+
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
|
|
190
|
+
<StoryTable sx={{ width: 'auto' }}>
|
|
191
|
+
<StoryThead>
|
|
192
|
+
<StoryRow>
|
|
193
|
+
{tableColumns.map((header, index) => (
|
|
194
|
+
<StoryHeaderCell key={header} first={index === 0}>
|
|
195
|
+
{header}
|
|
196
|
+
</StoryHeaderCell>
|
|
197
|
+
))}
|
|
198
|
+
</StoryRow>
|
|
199
|
+
</StoryThead>
|
|
200
|
+
|
|
201
|
+
<StoryTbody>
|
|
202
|
+
{placementRows.map(({ label, placement }) => (
|
|
203
|
+
<StoryRow key={label}>
|
|
204
|
+
<StoryRowLabel>{label}</StoryRowLabel>
|
|
205
|
+
<StoryCell>
|
|
206
|
+
<Tooltip title={`Placement: ${placement}`} placement={placement}>
|
|
207
|
+
<TriggerBox label="Hover me" />
|
|
208
|
+
</Tooltip>
|
|
209
|
+
</StoryCell>
|
|
210
|
+
</StoryRow>
|
|
211
|
+
))}
|
|
212
|
+
</StoryTbody>
|
|
213
|
+
</StoryTable>
|
|
214
|
+
</Box>
|
|
215
|
+
<StoryHint>Hover each trigger to see the tooltip position.</StoryHint>
|
|
216
|
+
</Box>
|
|
217
|
+
),
|
|
218
|
+
}
|