@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,102 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import DisplayAmount from '@components/DisplayAmount'
|
|
4
|
+
import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof DisplayAmount> = {
|
|
7
|
+
title: 'Components/DisplayAmount',
|
|
8
|
+
component: DisplayAmount,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
amount: {
|
|
12
|
+
control: { type: 'number' },
|
|
13
|
+
description: 'Numeric amount value',
|
|
14
|
+
},
|
|
15
|
+
currencyCode: {
|
|
16
|
+
control: 'text',
|
|
17
|
+
description: 'ISO currency code (e.g. USD, EUR, SAR)',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
parameters: {
|
|
21
|
+
layout: 'padded',
|
|
22
|
+
controls: { expanded: true },
|
|
23
|
+
},
|
|
24
|
+
decorators: [
|
|
25
|
+
(Story) => (
|
|
26
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%', py: 2 }}>
|
|
27
|
+
<Story />
|
|
28
|
+
</Box>
|
|
29
|
+
),
|
|
30
|
+
],
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default meta
|
|
34
|
+
type Story = StoryObj<typeof DisplayAmount>
|
|
35
|
+
|
|
36
|
+
// ──────────────────────────────────────────────
|
|
37
|
+
// Focused stories
|
|
38
|
+
|
|
39
|
+
export const Base: Story = {
|
|
40
|
+
args: { amount: 1234.56, currencyCode: 'USD' },
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const Zero: Story = {
|
|
44
|
+
args: { amount: 0, currencyCode: 'USD' },
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const LargeAmount: Story = {
|
|
48
|
+
name: 'large amount',
|
|
49
|
+
args: { amount: 999999.99, currencyCode: 'EUR' },
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const SAR: Story = {
|
|
53
|
+
name: 'SAR currency',
|
|
54
|
+
args: { amount: 5000.0, currencyCode: 'SAR' },
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ──────────────────────────────────────────────
|
|
58
|
+
// Kitchen sink
|
|
59
|
+
|
|
60
|
+
const tableColumns = ['CURRENCY', 'AMOUNT'] as const
|
|
61
|
+
|
|
62
|
+
const currencyRows: Array<{ label: string; currencyCode: string; amount: number }> = [
|
|
63
|
+
{ label: 'USD', currencyCode: 'USD', amount: 1234.56 },
|
|
64
|
+
{ label: 'EUR', currencyCode: 'EUR', amount: 9876.5 },
|
|
65
|
+
{ label: 'SAR', currencyCode: 'SAR', amount: 500.0 },
|
|
66
|
+
{ label: 'GBP', currencyCode: 'GBP', amount: 299.99 },
|
|
67
|
+
{ label: 'Zero', currencyCode: 'USD', amount: 0 },
|
|
68
|
+
{ label: 'Large', currencyCode: 'USD', amount: 1000000.0 },
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
export const AllVariants: Story = {
|
|
72
|
+
name: 'all variants',
|
|
73
|
+
decorators: [],
|
|
74
|
+
render: () => (
|
|
75
|
+
<Box sx={{ maxWidth: 960, mx: 'auto' }}>
|
|
76
|
+
<StoryTable>
|
|
77
|
+
<StoryThead>
|
|
78
|
+
<StoryRow>
|
|
79
|
+
{tableColumns.map((header, index) => (
|
|
80
|
+
<StoryHeaderCell key={header} first={index === 0}>
|
|
81
|
+
{header}
|
|
82
|
+
</StoryHeaderCell>
|
|
83
|
+
))}
|
|
84
|
+
</StoryRow>
|
|
85
|
+
</StoryThead>
|
|
86
|
+
|
|
87
|
+
<StoryTbody>
|
|
88
|
+
{currencyRows.map(({ label, currencyCode, amount }) => (
|
|
89
|
+
<StoryRow key={label}>
|
|
90
|
+
<StoryRowLabel>{label}</StoryRowLabel>
|
|
91
|
+
<StoryCell>
|
|
92
|
+
<DisplayAmount amount={amount} currencyCode={currencyCode} />
|
|
93
|
+
</StoryCell>
|
|
94
|
+
</StoryRow>
|
|
95
|
+
))}
|
|
96
|
+
</StoryTbody>
|
|
97
|
+
</StoryTable>
|
|
98
|
+
|
|
99
|
+
<StoryHint>Use the Controls panel to try different amounts and currency codes.</StoryHint>
|
|
100
|
+
</Box>
|
|
101
|
+
),
|
|
102
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import DockButton from '@components/DockButton'
|
|
4
|
+
import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
|
|
5
|
+
|
|
6
|
+
// Simple colored-square SVG used as a stand-in icon in all stories
|
|
7
|
+
const DEMO_ICON = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22"><rect width="22" height="22" rx="4" fill="%231976d2"/></svg>`
|
|
8
|
+
const DEMO_ICON_2 = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22"><rect width="22" height="22" rx="4" fill="%23e53935"/></svg>`
|
|
9
|
+
|
|
10
|
+
const meta: Meta<typeof DockButton> = {
|
|
11
|
+
title: 'Components/DockButton',
|
|
12
|
+
component: DockButton,
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
argTypes: {
|
|
15
|
+
iconUrl: { control: 'text', description: 'URL of the icon image' },
|
|
16
|
+
title: { control: 'text' },
|
|
17
|
+
isActive: { control: 'boolean' },
|
|
18
|
+
tooltipTitle: { control: 'boolean', description: 'Show title in a Tooltip instead of below the icon' },
|
|
19
|
+
height: { control: 'number' },
|
|
20
|
+
width: { control: 'number' },
|
|
21
|
+
iconSize: { control: 'number' },
|
|
22
|
+
onClick: { table: { disable: true } },
|
|
23
|
+
onContextMenu: { table: { disable: true } },
|
|
24
|
+
},
|
|
25
|
+
args: {
|
|
26
|
+
iconUrl: DEMO_ICON,
|
|
27
|
+
title: 'App',
|
|
28
|
+
isActive: false,
|
|
29
|
+
height: 51,
|
|
30
|
+
width: 51,
|
|
31
|
+
iconSize: 22,
|
|
32
|
+
},
|
|
33
|
+
parameters: {
|
|
34
|
+
layout: 'padded',
|
|
35
|
+
controls: { expanded: true },
|
|
36
|
+
},
|
|
37
|
+
decorators: [
|
|
38
|
+
(Story) => (
|
|
39
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%', py: 4 }}>
|
|
40
|
+
<Story />
|
|
41
|
+
</Box>
|
|
42
|
+
),
|
|
43
|
+
],
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default meta
|
|
47
|
+
type Story = StoryObj<typeof DockButton>
|
|
48
|
+
|
|
49
|
+
// ──────────────────────────────────────────────
|
|
50
|
+
// Focused stories
|
|
51
|
+
|
|
52
|
+
export const Base: Story = {}
|
|
53
|
+
|
|
54
|
+
export const Active: Story = {
|
|
55
|
+
args: { isActive: true },
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export const WithTooltip: Story = {
|
|
59
|
+
name: 'with tooltip',
|
|
60
|
+
args: { tooltipTitle: true, title: 'Dashboard' },
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// ──────────────────────────────────────────────
|
|
64
|
+
// Kitchen sink
|
|
65
|
+
|
|
66
|
+
const tableColumns = ['STATE', 'DEFAULT', 'ACTIVE'] as const
|
|
67
|
+
|
|
68
|
+
const iconRows = [
|
|
69
|
+
{ label: 'App 1', iconUrl: DEMO_ICON },
|
|
70
|
+
{ label: 'App 2', iconUrl: DEMO_ICON_2 },
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
export const AllStates: Story = {
|
|
74
|
+
name: 'all states',
|
|
75
|
+
decorators: [],
|
|
76
|
+
parameters: {
|
|
77
|
+
docs: {
|
|
78
|
+
source: {
|
|
79
|
+
language: 'tsx',
|
|
80
|
+
code: `
|
|
81
|
+
<DockButton iconUrl={iconUrl} title="App" />
|
|
82
|
+
<DockButton iconUrl={iconUrl} title="App" isActive />
|
|
83
|
+
<DockButton iconUrl={iconUrl} title="Dashboard" tooltipTitle />`.trim(),
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
render: () => (
|
|
88
|
+
<Box sx={{ maxWidth: 480, mx: 'auto' }}>
|
|
89
|
+
<StoryTable>
|
|
90
|
+
<StoryThead>
|
|
91
|
+
<StoryRow>
|
|
92
|
+
{tableColumns.map((header, index) => (
|
|
93
|
+
<StoryHeaderCell key={header} first={index === 0}>
|
|
94
|
+
{header}
|
|
95
|
+
</StoryHeaderCell>
|
|
96
|
+
))}
|
|
97
|
+
</StoryRow>
|
|
98
|
+
</StoryThead>
|
|
99
|
+
|
|
100
|
+
<StoryTbody>
|
|
101
|
+
{iconRows.map(({ label, iconUrl }) => (
|
|
102
|
+
<StoryRow key={label}>
|
|
103
|
+
<StoryRowLabel>{label}</StoryRowLabel>
|
|
104
|
+
<StoryCell>
|
|
105
|
+
<DockButton iconUrl={iconUrl} title={label} />
|
|
106
|
+
</StoryCell>
|
|
107
|
+
<StoryCell>
|
|
108
|
+
<DockButton iconUrl={iconUrl} title={label} isActive />
|
|
109
|
+
</StoryCell>
|
|
110
|
+
</StoryRow>
|
|
111
|
+
))}
|
|
112
|
+
</StoryTbody>
|
|
113
|
+
</StoryTable>
|
|
114
|
+
|
|
115
|
+
<StoryHint>The active dot appears below the icon when isActive is true.</StoryHint>
|
|
116
|
+
</Box>
|
|
117
|
+
),
|
|
118
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import Box from '@mui/material/Box'
|
|
4
|
+
import ExpandableSideBar from '@components/ExpandableSideBar'
|
|
5
|
+
import type { Section } from '@components/ExpandableSideBar/type'
|
|
6
|
+
|
|
7
|
+
const sections: Section[] = [
|
|
8
|
+
{
|
|
9
|
+
id: 'dashboard',
|
|
10
|
+
title: 'Dashboard',
|
|
11
|
+
subSections: [
|
|
12
|
+
{ id: 'overview', title: 'Overview' },
|
|
13
|
+
{ id: 'analytics', title: 'Analytics' },
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: 'transactions',
|
|
18
|
+
title: 'Transactions',
|
|
19
|
+
subSections: [
|
|
20
|
+
{ id: 'all', title: 'All Transactions' },
|
|
21
|
+
{ id: 'pending', title: 'Pending' },
|
|
22
|
+
{ id: 'refunds', title: 'Refunds' },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 'settings',
|
|
27
|
+
title: 'Settings',
|
|
28
|
+
subSections: [
|
|
29
|
+
{ id: 'profile', title: 'Profile' },
|
|
30
|
+
{ id: 'security', title: 'Security' },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
const meta: Meta<typeof ExpandableSideBar> = {
|
|
36
|
+
title: 'Components/ExpandableSideBar',
|
|
37
|
+
component: ExpandableSideBar,
|
|
38
|
+
tags: ['autodocs'],
|
|
39
|
+
argTypes: {
|
|
40
|
+
isMaximized: { control: 'boolean', description: 'Expand the sidebar to show section titles' },
|
|
41
|
+
},
|
|
42
|
+
parameters: {
|
|
43
|
+
layout: 'fullscreen',
|
|
44
|
+
controls: { expanded: true },
|
|
45
|
+
},
|
|
46
|
+
decorators: [
|
|
47
|
+
(Story) => (
|
|
48
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>
|
|
49
|
+
<Story />
|
|
50
|
+
</Box>
|
|
51
|
+
),
|
|
52
|
+
],
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default meta
|
|
56
|
+
type Story = StoryObj<typeof ExpandableSideBar>
|
|
57
|
+
|
|
58
|
+
// ──────────────────────────────────────────────
|
|
59
|
+
// Named wrapper component
|
|
60
|
+
|
|
61
|
+
const SidebarDemo = ({ isMaximized = true }: { isMaximized?: boolean }) => {
|
|
62
|
+
const [activeSection, setActiveSection] = useState('dashboard')
|
|
63
|
+
const [activeSubSection, setActiveSubSection] = useState('overview')
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<Box sx={{ display: 'flex', height: '100vh' }}>
|
|
67
|
+
<ExpandableSideBar
|
|
68
|
+
sections={sections}
|
|
69
|
+
isMaximized={isMaximized}
|
|
70
|
+
activeSection={activeSection}
|
|
71
|
+
activeSubSection={activeSubSection}
|
|
72
|
+
onClick={(sectionId, subSectionId) => {
|
|
73
|
+
setActiveSection(sectionId)
|
|
74
|
+
if (subSectionId) setActiveSubSection(subSectionId)
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
<Box sx={{ flex: 1, p: 4, color: 'text.secondary' }}>
|
|
78
|
+
Active: <strong>{activeSection}</strong> → {activeSubSection}
|
|
79
|
+
</Box>
|
|
80
|
+
</Box>
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// ──────────────────────────────────────────────
|
|
85
|
+
// Focused stories
|
|
86
|
+
|
|
87
|
+
export const Expanded: Story = {
|
|
88
|
+
parameters: {
|
|
89
|
+
docs: {
|
|
90
|
+
source: {
|
|
91
|
+
language: 'tsx',
|
|
92
|
+
code: `
|
|
93
|
+
<ExpandableSideBar
|
|
94
|
+
sections={sections}
|
|
95
|
+
isMaximized={true}
|
|
96
|
+
activeSection={activeSection}
|
|
97
|
+
activeSubSection={activeSubSection}
|
|
98
|
+
onClick={(sectionId, subSectionId) => {
|
|
99
|
+
setActiveSection(sectionId)
|
|
100
|
+
if (subSectionId) setActiveSubSection(subSectionId)
|
|
101
|
+
}}
|
|
102
|
+
/>
|
|
103
|
+
`.trim(),
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
render: () => <SidebarDemo isMaximized />,
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export const Collapsed: Story = {
|
|
111
|
+
parameters: {
|
|
112
|
+
docs: {
|
|
113
|
+
source: {
|
|
114
|
+
language: 'tsx',
|
|
115
|
+
code: `<ExpandableSideBar sections={sections} isMaximized={false} onClick={handleClick} />`.trim(),
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
render: () => <SidebarDemo isMaximized={false} />,
|
|
120
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
import Box from '@mui/material/Box'
|
|
4
|
+
import Button from '@mui/material/Button'
|
|
5
|
+
import Typography from '@mui/material/Typography'
|
|
6
|
+
import FlippingCard from '@components/FlippingCard'
|
|
7
|
+
import { StoryHint } from '@storybook-utils'
|
|
8
|
+
|
|
9
|
+
const FrontFace = () => (
|
|
10
|
+
<Box
|
|
11
|
+
sx={{
|
|
12
|
+
width: 220,
|
|
13
|
+
height: 140,
|
|
14
|
+
borderRadius: 2,
|
|
15
|
+
background: 'linear-gradient(135deg, #1976d2 0%, #42a5f5 100%)',
|
|
16
|
+
display: 'flex',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
}}
|
|
20
|
+
>
|
|
21
|
+
<Typography variant="h6" color="white" fontWeight={700}>
|
|
22
|
+
Front
|
|
23
|
+
</Typography>
|
|
24
|
+
</Box>
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
const BackFace = () => (
|
|
28
|
+
<Box
|
|
29
|
+
sx={{
|
|
30
|
+
width: 220,
|
|
31
|
+
height: 140,
|
|
32
|
+
borderRadius: 2,
|
|
33
|
+
background: 'linear-gradient(135deg, #e53935 0%, #ef9a9a 100%)',
|
|
34
|
+
display: 'flex',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
justifyContent: 'center',
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
39
|
+
<Typography variant="h6" color="white" fontWeight={700}>
|
|
40
|
+
Back
|
|
41
|
+
</Typography>
|
|
42
|
+
</Box>
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
const meta: Meta<typeof FlippingCard> = {
|
|
46
|
+
title: 'Components/FlippingCard',
|
|
47
|
+
component: FlippingCard,
|
|
48
|
+
tags: ['autodocs'],
|
|
49
|
+
argTypes: {
|
|
50
|
+
isFlipped: { control: 'boolean', description: 'When true the back face is shown' },
|
|
51
|
+
frontCard: { table: { disable: true } },
|
|
52
|
+
backCard: { table: { disable: true } },
|
|
53
|
+
},
|
|
54
|
+
args: {
|
|
55
|
+
isFlipped: false,
|
|
56
|
+
frontCard: <FrontFace />,
|
|
57
|
+
backCard: <BackFace />,
|
|
58
|
+
},
|
|
59
|
+
parameters: {
|
|
60
|
+
layout: 'padded',
|
|
61
|
+
controls: { expanded: true },
|
|
62
|
+
},
|
|
63
|
+
decorators: [
|
|
64
|
+
(Story) => (
|
|
65
|
+
<Box id="sehrish-box" sx={{ display: 'flex', justifyContent: 'center', width: '100%', py: 4 }}>
|
|
66
|
+
<Box sx={{ width: 'max-content' }}>
|
|
67
|
+
<Story />
|
|
68
|
+
</Box>
|
|
69
|
+
</Box>
|
|
70
|
+
),
|
|
71
|
+
],
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export default meta
|
|
75
|
+
type Story = StoryObj<typeof FlippingCard>
|
|
76
|
+
|
|
77
|
+
// ──────────────────────────────────────────────
|
|
78
|
+
// Focused stories
|
|
79
|
+
|
|
80
|
+
export const Front: Story = {
|
|
81
|
+
args: { isFlipped: false },
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const Flipped: Story = {
|
|
85
|
+
args: { isFlipped: true },
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// ──────────────────────────────────────────────
|
|
89
|
+
// Interactive
|
|
90
|
+
|
|
91
|
+
export const Interactive: Story = {
|
|
92
|
+
name: 'interactive flip',
|
|
93
|
+
render: () => {
|
|
94
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
95
|
+
const [flipped, setFlipped] = useState(false)
|
|
96
|
+
return (
|
|
97
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 3 }}>
|
|
98
|
+
<FlippingCard isFlipped={flipped} frontCard={<FrontFace />} backCard={<BackFace />} />
|
|
99
|
+
<Button variant="outlined" size="small" onClick={() => setFlipped((v) => !v)}>
|
|
100
|
+
{flipped ? 'Show Front' : 'Flip Card'}
|
|
101
|
+
</Button>
|
|
102
|
+
<StoryHint>Click the button to animate the 3D flip.</StoryHint>
|
|
103
|
+
</Box>
|
|
104
|
+
)
|
|
105
|
+
},
|
|
106
|
+
parameters: {
|
|
107
|
+
docs: {
|
|
108
|
+
source: {
|
|
109
|
+
language: 'tsx',
|
|
110
|
+
code: `
|
|
111
|
+
const [flipped, setFlipped] = useState(false)
|
|
112
|
+
|
|
113
|
+
<FlippingCard
|
|
114
|
+
isFlipped={flipped}
|
|
115
|
+
frontCard={<MyFrontContent />}
|
|
116
|
+
backCard={<MyBackContent />}
|
|
117
|
+
/>
|
|
118
|
+
<Button onClick={() => setFlipped(v => !v)}>Flip</Button>`.trim(),
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import HeatMap from '@components/HeatMap'
|
|
4
|
+
import type { HeatMapProps, Data } from '@components/HeatMap/type'
|
|
5
|
+
import { StoryHint } from '@storybook-utils'
|
|
6
|
+
|
|
7
|
+
// ── Mock data ──────────────────────────────────────────────────────────────────
|
|
8
|
+
const hours = ['00', '04', '08', '12', '16', '20']
|
|
9
|
+
const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
|
|
10
|
+
|
|
11
|
+
// Fixed intensity values so the story is deterministic
|
|
12
|
+
const intensityMatrix: number[][] = [
|
|
13
|
+
[10, 20, 55, 80, 60, 30, 5],
|
|
14
|
+
[15, 35, 70, 95, 75, 45, 10],
|
|
15
|
+
[5, 25, 60, 85, 65, 35, 8],
|
|
16
|
+
[20, 40, 75, 100, 80, 50, 15],
|
|
17
|
+
[12, 30, 65, 90, 70, 40, 10],
|
|
18
|
+
[8, 18, 50, 75, 55, 25, 5],
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
const buildSeries = (matrix: number[][]): HeatMapProps['series'] => {
|
|
22
|
+
const series: HeatMapProps['series'] = {}
|
|
23
|
+
hours.forEach((hour, hi) => {
|
|
24
|
+
series[hour] = {}
|
|
25
|
+
days.forEach((day, di) => {
|
|
26
|
+
const v = matrix[hi][di]
|
|
27
|
+
series[hour][day] = { value: v, percentage: `${v}%`, colorOpacityDegree: v }
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
return series
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const mockSeries = buildSeries(intensityMatrix)
|
|
34
|
+
|
|
35
|
+
const meta: Meta<typeof HeatMap> = {
|
|
36
|
+
title: 'Components/HeatMap',
|
|
37
|
+
component: HeatMap,
|
|
38
|
+
tags: ['autodocs'],
|
|
39
|
+
argTypes: {
|
|
40
|
+
isLoading: { control: 'boolean', description: 'Show skeleton loading state instead of data cells' },
|
|
41
|
+
},
|
|
42
|
+
parameters: {
|
|
43
|
+
layout: 'padded',
|
|
44
|
+
controls: { expanded: true },
|
|
45
|
+
},
|
|
46
|
+
decorators: [
|
|
47
|
+
(Story) => (
|
|
48
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>
|
|
49
|
+
<Story />
|
|
50
|
+
</Box>
|
|
51
|
+
),
|
|
52
|
+
],
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default meta
|
|
56
|
+
type Story = StoryObj<typeof HeatMap>
|
|
57
|
+
|
|
58
|
+
// ──────────────────────────────────────────────
|
|
59
|
+
// Focused stories
|
|
60
|
+
|
|
61
|
+
export const Base: Story = {
|
|
62
|
+
args: {
|
|
63
|
+
isLoading: false,
|
|
64
|
+
},
|
|
65
|
+
parameters: {
|
|
66
|
+
docs: {
|
|
67
|
+
source: {
|
|
68
|
+
language: 'tsx',
|
|
69
|
+
code: `
|
|
70
|
+
<HeatMap
|
|
71
|
+
xAxis={{ labels: ['00', '04', '08', '12', '16', '20'] }}
|
|
72
|
+
yAxis={{ labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }}
|
|
73
|
+
series={series}
|
|
74
|
+
/>
|
|
75
|
+
`.trim(),
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
render: (args) => <HeatMap {...args} xAxis={{ labels: hours }} yAxis={{ labels: days }} series={mockSeries} />,
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export const Loading: Story = {
|
|
83
|
+
args: {
|
|
84
|
+
isLoading: true,
|
|
85
|
+
},
|
|
86
|
+
parameters: {
|
|
87
|
+
docs: {
|
|
88
|
+
source: {
|
|
89
|
+
language: 'tsx',
|
|
90
|
+
code: `<HeatMap xAxis={xAxis} yAxis={yAxis} series={series} isLoading />`,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
render: (args) => <HeatMap {...args} xAxis={{ labels: hours }} yAxis={{ labels: days }} series={mockSeries} />,
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export const WithTooltip: Story = {
|
|
98
|
+
args: {
|
|
99
|
+
isLoading: false,
|
|
100
|
+
},
|
|
101
|
+
name: 'with custom tooltip',
|
|
102
|
+
parameters: {
|
|
103
|
+
docs: {
|
|
104
|
+
source: {
|
|
105
|
+
language: 'tsx',
|
|
106
|
+
code: `
|
|
107
|
+
<HeatMap
|
|
108
|
+
xAxis={xAxis}
|
|
109
|
+
yAxis={yAxis}
|
|
110
|
+
series={series}
|
|
111
|
+
tooltip={{
|
|
112
|
+
render: (data, x, y) => (
|
|
113
|
+
<Box sx={{ p: 1, fontSize: 12 }}>
|
|
114
|
+
<strong>{y} at {x}:00</strong>
|
|
115
|
+
<div>Value: {data.value}</div>
|
|
116
|
+
</Box>
|
|
117
|
+
),
|
|
118
|
+
}}
|
|
119
|
+
/>
|
|
120
|
+
`.trim(),
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
render: (args) => (
|
|
125
|
+
<HeatMap
|
|
126
|
+
{...args}
|
|
127
|
+
xAxis={{ labels: hours }}
|
|
128
|
+
yAxis={{ labels: days }}
|
|
129
|
+
series={mockSeries}
|
|
130
|
+
tooltip={{
|
|
131
|
+
render: (data: Data, x, y) => (
|
|
132
|
+
<Box sx={{ p: 1, fontSize: 12 }}>
|
|
133
|
+
<div>
|
|
134
|
+
<strong>
|
|
135
|
+
{y} at {x}:00
|
|
136
|
+
</strong>
|
|
137
|
+
</div>
|
|
138
|
+
<div>Value: {data.value}</div>
|
|
139
|
+
<div>Intensity: {data.colorOpacityDegree}%</div>
|
|
140
|
+
</Box>
|
|
141
|
+
),
|
|
142
|
+
}}
|
|
143
|
+
/>
|
|
144
|
+
),
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export const WithCustomLabels: Story = {
|
|
148
|
+
args: {
|
|
149
|
+
isLoading: false,
|
|
150
|
+
},
|
|
151
|
+
name: 'with custom label renderers',
|
|
152
|
+
parameters: {
|
|
153
|
+
docs: {
|
|
154
|
+
source: {
|
|
155
|
+
language: 'tsx',
|
|
156
|
+
code: `
|
|
157
|
+
<HeatMap
|
|
158
|
+
xAxis={{ labels: hours, render: (label) => <strong>{label}h</strong> }}
|
|
159
|
+
yAxis={{ labels: days, render: (label) => <em>{label}</em> }}
|
|
160
|
+
series={series}
|
|
161
|
+
/>
|
|
162
|
+
`.trim(),
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
render: (args) => (
|
|
167
|
+
<HeatMap
|
|
168
|
+
{...args}
|
|
169
|
+
xAxis={{
|
|
170
|
+
labels: hours,
|
|
171
|
+
render: (label) => <strong>{label}h</strong>,
|
|
172
|
+
}}
|
|
173
|
+
yAxis={{
|
|
174
|
+
labels: days,
|
|
175
|
+
render: (label) => <em>{label}</em>,
|
|
176
|
+
}}
|
|
177
|
+
series={mockSeries}
|
|
178
|
+
/>
|
|
179
|
+
),
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export const AllVariants: Story = {
|
|
183
|
+
name: 'all variants',
|
|
184
|
+
render: () => (
|
|
185
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 6, maxWidth: 960, mx: 'auto' }}>
|
|
186
|
+
<Box>
|
|
187
|
+
<Box sx={{ mb: 1, fontWeight: 600 }}>Default</Box>
|
|
188
|
+
<HeatMap xAxis={{ labels: hours }} yAxis={{ labels: days }} series={mockSeries} />
|
|
189
|
+
</Box>
|
|
190
|
+
|
|
191
|
+
<Box>
|
|
192
|
+
<Box sx={{ mb: 1, fontWeight: 600 }}>Loading</Box>
|
|
193
|
+
<HeatMap xAxis={{ labels: hours }} yAxis={{ labels: days }} series={mockSeries} isLoading />
|
|
194
|
+
</Box>
|
|
195
|
+
|
|
196
|
+
<StoryHint>Hover cells in the "with custom tooltip" story to see tooltip content.</StoryHint>
|
|
197
|
+
</Box>
|
|
198
|
+
),
|
|
199
|
+
}
|