@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,136 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import IconWithBadge from '@components/IconWithBadge'
|
|
4
|
+
import CountryFlag from '@components/CountryFlag'
|
|
5
|
+
import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
|
|
6
|
+
|
|
7
|
+
// Simple placeholder icon used in stories
|
|
8
|
+
const DEMO_ICON = `data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><circle cx="20" cy="20" r="20" fill="%231976d2"/></svg>`
|
|
9
|
+
|
|
10
|
+
const meta: Meta<typeof IconWithBadge> = {
|
|
11
|
+
title: 'Components/IconWithBadge',
|
|
12
|
+
component: IconWithBadge,
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
argTypes: {
|
|
15
|
+
mainIcon: { control: 'text', description: 'URL of the main icon image' },
|
|
16
|
+
label: { control: 'text', description: 'Tooltip label' },
|
|
17
|
+
mainIconSize: { control: 'number' },
|
|
18
|
+
containerSize: { control: 'number' },
|
|
19
|
+
borderColor: { control: 'color' },
|
|
20
|
+
overlayIcon: { table: { disable: true } },
|
|
21
|
+
overlayPosition: { table: { disable: true } },
|
|
22
|
+
sx: { table: { disable: true } },
|
|
23
|
+
containerSx: { table: { disable: true } },
|
|
24
|
+
onError: { table: { disable: true } },
|
|
25
|
+
},
|
|
26
|
+
args: {
|
|
27
|
+
mainIcon: DEMO_ICON,
|
|
28
|
+
mainIconSize: 20,
|
|
29
|
+
containerSize: 24,
|
|
30
|
+
borderColor: '#F2F2F2',
|
|
31
|
+
label: '',
|
|
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 IconWithBadge>
|
|
48
|
+
|
|
49
|
+
// ──────────────────────────────────────────────
|
|
50
|
+
// Focused stories
|
|
51
|
+
|
|
52
|
+
export const Base: Story = {}
|
|
53
|
+
|
|
54
|
+
export const WithOverlay: Story = {
|
|
55
|
+
name: 'with overlay badge',
|
|
56
|
+
args: {
|
|
57
|
+
overlayIcon: <CountryFlag countryCode="SA" width={10} />,
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const WithLabel: Story = {
|
|
62
|
+
name: 'with tooltip label',
|
|
63
|
+
args: { label: 'Merchant Logo' },
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ──────────────────────────────────────────────
|
|
67
|
+
// Kitchen sink
|
|
68
|
+
|
|
69
|
+
const sizeRows: Array<{ label: string; containerSize: number; mainIconSize: number }> = [
|
|
70
|
+
{ label: 'Small (24)', containerSize: 24, mainIconSize: 18 },
|
|
71
|
+
{ label: 'Medium (32)', containerSize: 32, mainIconSize: 22 },
|
|
72
|
+
{ label: 'Large (40)', containerSize: 40, mainIconSize: 28 },
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
const tableColumns = ['SIZE', 'NO BADGE', 'WITH BADGE'] as const
|
|
76
|
+
|
|
77
|
+
export const AllSizes: Story = {
|
|
78
|
+
name: 'all sizes',
|
|
79
|
+
decorators: [],
|
|
80
|
+
parameters: {
|
|
81
|
+
docs: {
|
|
82
|
+
source: {
|
|
83
|
+
language: 'tsx',
|
|
84
|
+
code: `
|
|
85
|
+
{/* No badge */}
|
|
86
|
+
<IconWithBadge mainIcon={iconUrl} containerSize={24} mainIconSize={18} />
|
|
87
|
+
|
|
88
|
+
{/* With overlay badge */}
|
|
89
|
+
<IconWithBadge
|
|
90
|
+
mainIcon={iconUrl}
|
|
91
|
+
containerSize={24}
|
|
92
|
+
mainIconSize={18}
|
|
93
|
+
overlayIcon={<CountryFlag countryCode="SA" width={10} />}
|
|
94
|
+
overlayPosition={{ top: 13, left: 13 }}
|
|
95
|
+
/>`.trim(),
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
render: () => (
|
|
100
|
+
<Box sx={{ maxWidth: 480, mx: 'auto' }}>
|
|
101
|
+
<StoryTable>
|
|
102
|
+
<StoryThead>
|
|
103
|
+
<StoryRow>
|
|
104
|
+
{tableColumns.map((header, index) => (
|
|
105
|
+
<StoryHeaderCell key={header} first={index === 0}>
|
|
106
|
+
{header}
|
|
107
|
+
</StoryHeaderCell>
|
|
108
|
+
))}
|
|
109
|
+
</StoryRow>
|
|
110
|
+
</StoryThead>
|
|
111
|
+
|
|
112
|
+
<StoryTbody>
|
|
113
|
+
{sizeRows.map(({ label, containerSize, mainIconSize }) => (
|
|
114
|
+
<StoryRow key={label}>
|
|
115
|
+
<StoryRowLabel>{label}</StoryRowLabel>
|
|
116
|
+
<StoryCell>
|
|
117
|
+
<IconWithBadge mainIcon={DEMO_ICON} containerSize={containerSize} mainIconSize={mainIconSize} />
|
|
118
|
+
</StoryCell>
|
|
119
|
+
<StoryCell>
|
|
120
|
+
<IconWithBadge
|
|
121
|
+
mainIcon={DEMO_ICON}
|
|
122
|
+
containerSize={containerSize}
|
|
123
|
+
mainIconSize={mainIconSize}
|
|
124
|
+
overlayIcon={<CountryFlag countryCode="SA" width={Math.round(containerSize * 0.4)} />}
|
|
125
|
+
overlayPosition={{ top: Math.round(containerSize * 0.55), left: Math.round(containerSize * 0.55) }}
|
|
126
|
+
/>
|
|
127
|
+
</StoryCell>
|
|
128
|
+
</StoryRow>
|
|
129
|
+
))}
|
|
130
|
+
</StoryTbody>
|
|
131
|
+
</StoryTable>
|
|
132
|
+
|
|
133
|
+
<StoryHint>The overlay badge position scales with container size.</StoryHint>
|
|
134
|
+
</Box>
|
|
135
|
+
),
|
|
136
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { useContext, useEffect } from 'react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
import Box from '@mui/material/Box'
|
|
4
|
+
import Typography from '@mui/material/Typography'
|
|
5
|
+
import { JsonViewerDialogContext, JsonViewerDialogContextProvider } from '@components/JSONViewer'
|
|
6
|
+
import { StoryHint } from '@storybook-utils'
|
|
7
|
+
|
|
8
|
+
const responsePayload = {
|
|
9
|
+
id: 'chg_story_001',
|
|
10
|
+
status: 'CAPTURED',
|
|
11
|
+
amount: 9,
|
|
12
|
+
currency: 'KWD',
|
|
13
|
+
customer: {
|
|
14
|
+
id: 'cus_story_001',
|
|
15
|
+
email: 'user@example.com',
|
|
16
|
+
phone: { country_code: '965', number: '50001234' },
|
|
17
|
+
},
|
|
18
|
+
metadata: {
|
|
19
|
+
order_id: 'ORD-1001',
|
|
20
|
+
note: 'Payment transaction for monthly subscription',
|
|
21
|
+
},
|
|
22
|
+
activities: [
|
|
23
|
+
{ id: 'activity_1', status: 'INITIATED' },
|
|
24
|
+
{ id: 'activity_2', status: 'CAPTURED' },
|
|
25
|
+
],
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const requestPayload = {
|
|
29
|
+
amount: 9,
|
|
30
|
+
currency: 'KWD',
|
|
31
|
+
description: 'Storybook search demo request',
|
|
32
|
+
customer: {
|
|
33
|
+
first_name: 'Omar',
|
|
34
|
+
last_name: 'Saber',
|
|
35
|
+
email: 'user@example.com',
|
|
36
|
+
},
|
|
37
|
+
metadata: {
|
|
38
|
+
order_id: 'ORD-1001',
|
|
39
|
+
source: 'storybook',
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const meta: Meta = {
|
|
44
|
+
title: 'Components/JSONViewer',
|
|
45
|
+
tags: ['autodocs'],
|
|
46
|
+
parameters: {
|
|
47
|
+
layout: 'fullscreen',
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default meta
|
|
52
|
+
type Story = StoryObj
|
|
53
|
+
|
|
54
|
+
function OpenOnMount({ withRequest = false }: { withRequest?: boolean }) {
|
|
55
|
+
const { handleJsonViewerDialogOpen } = useContext(JsonViewerDialogContext)
|
|
56
|
+
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
handleJsonViewerDialogOpen({
|
|
59
|
+
json: responsePayload,
|
|
60
|
+
requestJson: withRequest ? requestPayload : undefined,
|
|
61
|
+
})
|
|
62
|
+
}, [handleJsonViewerDialogOpen, withRequest])
|
|
63
|
+
|
|
64
|
+
return null
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function StoryLayout({ withRequest = false }: { withRequest?: boolean }) {
|
|
68
|
+
return (
|
|
69
|
+
<JsonViewerDialogContextProvider>
|
|
70
|
+
<Box sx={{ minHeight: '90vh', p: 3, bgcolor: '#f8f9fb' }}>
|
|
71
|
+
<Typography variant="h6" sx={{ mb: 1 }}>
|
|
72
|
+
JSON Viewer
|
|
73
|
+
</Typography>
|
|
74
|
+
<Typography variant="body2" color="text.secondary">
|
|
75
|
+
Use the search icon in the viewer header to test key/value search highlight and next/previous navigation.
|
|
76
|
+
</Typography>
|
|
77
|
+
<StoryHint>
|
|
78
|
+
Try searching for: `captured`, `order_id`, `storybook`, or `50001234`.
|
|
79
|
+
</StoryHint>
|
|
80
|
+
</Box>
|
|
81
|
+
<OpenOnMount withRequest={withRequest} />
|
|
82
|
+
</JsonViewerDialogContextProvider>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const ResponseOnly: Story = {
|
|
87
|
+
render: () => <StoryLayout />,
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export const RequestAndResponse: Story = {
|
|
91
|
+
render: () => <StoryLayout withRequest />,
|
|
92
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
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 { LeftPeekRightExpandingChip } from '@components/LeftPeekRightExpandingChip'
|
|
5
|
+
import CountryFlag from '@components/CountryFlag'
|
|
6
|
+
import { StoryFlexRow, StoryHint } from '@storybook-utils'
|
|
7
|
+
|
|
8
|
+
// Simple chip-like icon node used in stories
|
|
9
|
+
const makeFlag = (code: string) => (
|
|
10
|
+
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
|
|
11
|
+
<CountryFlag countryCode={code} width={14} />
|
|
12
|
+
<Typography variant="caption" sx={{ fontSize: '0.65rem', fontWeight: 600 }}>
|
|
13
|
+
{code}
|
|
14
|
+
</Typography>
|
|
15
|
+
</Box>
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
const twoIcons = [makeFlag('AE'), makeFlag('SA')]
|
|
19
|
+
const threeIcons = [makeFlag('AE'), makeFlag('GB'), makeFlag('SA')]
|
|
20
|
+
const fiveIcons = [makeFlag('AE'), makeFlag('GB'), makeFlag('DE'), makeFlag('FR'), makeFlag('SA')]
|
|
21
|
+
|
|
22
|
+
const meta: Meta<typeof LeftPeekRightExpandingChip> = {
|
|
23
|
+
title: 'Components/LeftPeekRightExpandingChip',
|
|
24
|
+
component: LeftPeekRightExpandingChip,
|
|
25
|
+
tags: ['autodocs'],
|
|
26
|
+
argTypes: {
|
|
27
|
+
expandedZIndex: { control: 'number', description: 'z-index of the expanded state' },
|
|
28
|
+
icons: { table: { disable: true } },
|
|
29
|
+
sx: { table: { disable: true } },
|
|
30
|
+
},
|
|
31
|
+
args: {
|
|
32
|
+
icons: threeIcons,
|
|
33
|
+
expandedZIndex: 1000,
|
|
34
|
+
},
|
|
35
|
+
parameters: {
|
|
36
|
+
layout: 'padded',
|
|
37
|
+
controls: { expanded: true },
|
|
38
|
+
},
|
|
39
|
+
decorators: [
|
|
40
|
+
(Story) => (
|
|
41
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%', py: 6 }}>
|
|
42
|
+
<Story />
|
|
43
|
+
</Box>
|
|
44
|
+
),
|
|
45
|
+
],
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export default meta
|
|
49
|
+
type Story = StoryObj<typeof LeftPeekRightExpandingChip>
|
|
50
|
+
|
|
51
|
+
// ──────────────────────────────────────────────
|
|
52
|
+
// Focused stories
|
|
53
|
+
|
|
54
|
+
const docSource = (count: number) => ({
|
|
55
|
+
docs: {
|
|
56
|
+
source: {
|
|
57
|
+
language: 'tsx' as const,
|
|
58
|
+
code: `
|
|
59
|
+
<LeftPeekRightExpandingChip
|
|
60
|
+
icons={Array.from({ length: ${count} }, (_, i) => (
|
|
61
|
+
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
|
|
62
|
+
<CountryFlag countryCode={countryCode} width={14} />
|
|
63
|
+
<Typography variant="caption">{countryCode}</Typography>
|
|
64
|
+
</Box>
|
|
65
|
+
))}
|
|
66
|
+
/>`.trim(),
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
export const TwoIcons: Story = {
|
|
72
|
+
name: '2 icons',
|
|
73
|
+
args: { icons: twoIcons },
|
|
74
|
+
parameters: docSource(2),
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const ThreeIcons: Story = {
|
|
78
|
+
name: '3 icons',
|
|
79
|
+
args: { icons: threeIcons },
|
|
80
|
+
parameters: docSource(3),
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const FiveIcons: Story = {
|
|
84
|
+
name: '5 icons',
|
|
85
|
+
args: { icons: fiveIcons },
|
|
86
|
+
parameters: docSource(5),
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ──────────────────────────────────────────────
|
|
90
|
+
// Kitchen sink
|
|
91
|
+
|
|
92
|
+
export const AllCounts: Story = {
|
|
93
|
+
name: 'all counts',
|
|
94
|
+
decorators: [],
|
|
95
|
+
parameters: {
|
|
96
|
+
docs: {
|
|
97
|
+
source: {
|
|
98
|
+
language: 'tsx',
|
|
99
|
+
code: `
|
|
100
|
+
{/* 2 icons */}
|
|
101
|
+
<LeftPeekRightExpandingChip icons={[<FlagIcon />, <FlagIcon />]} />
|
|
102
|
+
|
|
103
|
+
{/* 5 icons */}
|
|
104
|
+
<LeftPeekRightExpandingChip icons={[icon1, icon2, icon3, icon4, icon5]} />`.trim(),
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
render: () => (
|
|
109
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 5, alignItems: 'center', py: 4 }}>
|
|
110
|
+
<StoryFlexRow spacing={8} sx={{ flexWrap: 'wrap', justifyContent: 'center' }}>
|
|
111
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 2 }}>
|
|
112
|
+
<Box sx={{ fontSize: '0.7rem', color: 'text.secondary', textTransform: 'uppercase' }}>2 icons</Box>
|
|
113
|
+
<LeftPeekRightExpandingChip icons={twoIcons} />
|
|
114
|
+
</Box>
|
|
115
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 2 }}>
|
|
116
|
+
<Box sx={{ fontSize: '0.7rem', color: 'text.secondary', textTransform: 'uppercase' }}>3 icons</Box>
|
|
117
|
+
<LeftPeekRightExpandingChip icons={threeIcons} />
|
|
118
|
+
</Box>
|
|
119
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 2 }}>
|
|
120
|
+
<Box sx={{ fontSize: '0.7rem', color: 'text.secondary', textTransform: 'uppercase' }}>5 icons</Box>
|
|
121
|
+
<LeftPeekRightExpandingChip icons={fiveIcons} />
|
|
122
|
+
</Box>
|
|
123
|
+
</StoryFlexRow>
|
|
124
|
+
<StoryHint>Hover the rightmost chip to expand the peek stack.</StoryHint>
|
|
125
|
+
</Box>
|
|
126
|
+
),
|
|
127
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import Loader from '@components/Loader'
|
|
4
|
+
import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Loader> = {
|
|
7
|
+
title: 'Components/Loader',
|
|
8
|
+
component: Loader,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
color: {
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: ['primary', 'secondary', 'error', 'warning', 'info', 'success', 'inherit'],
|
|
14
|
+
description: 'Spinner colour — maps to MUI palette tokens',
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
control: 'number',
|
|
18
|
+
description: 'Override the pixel size (default is 24 px via the styled wrapper)',
|
|
19
|
+
},
|
|
20
|
+
thickness: {
|
|
21
|
+
control: { type: 'number', min: 1, max: 10, step: 0.5 },
|
|
22
|
+
description: 'Stroke thickness of the circle',
|
|
23
|
+
},
|
|
24
|
+
variant: {
|
|
25
|
+
control: 'select',
|
|
26
|
+
options: ['indeterminate', 'determinate'],
|
|
27
|
+
},
|
|
28
|
+
value: {
|
|
29
|
+
control: { type: 'number', min: 0, max: 100 },
|
|
30
|
+
description: 'Progress 0–100 (only used when variant = "determinate")',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
parameters: {
|
|
34
|
+
layout: 'padded',
|
|
35
|
+
controls: { expanded: true },
|
|
36
|
+
},
|
|
37
|
+
decorators: [
|
|
38
|
+
(Story) => (
|
|
39
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', width: '100%', minHeight: 80 }}>
|
|
40
|
+
<Story />
|
|
41
|
+
</Box>
|
|
42
|
+
),
|
|
43
|
+
],
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default meta
|
|
47
|
+
|
|
48
|
+
type Story = StoryObj<typeof Loader>
|
|
49
|
+
|
|
50
|
+
// ──────────────────────────────────────────────
|
|
51
|
+
// Focused / named stories
|
|
52
|
+
|
|
53
|
+
export const Base: Story = {
|
|
54
|
+
args: {},
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export const Large: Story = {
|
|
58
|
+
args: { size: 48, thickness: 3 },
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const Small: Story = {
|
|
62
|
+
args: { size: 16 },
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const Determinate: Story = {
|
|
66
|
+
args: { variant: 'determinate', value: 65 },
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// ──────────────────────────────────────────────
|
|
70
|
+
// Kitchen sink
|
|
71
|
+
|
|
72
|
+
const tableColumns = ['SIZE', 'DEFAULT', 'PRIMARY', 'SUCCESS', 'ERROR'] as const
|
|
73
|
+
|
|
74
|
+
const sizeRows: Array<{ label: string; size: number }> = [
|
|
75
|
+
{ label: 'Small', size: 16 },
|
|
76
|
+
{ label: 'Default (24 px)', size: 24 },
|
|
77
|
+
{ label: 'Large', size: 48 },
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
type LoaderColor = 'inherit' | 'primary' | 'success' | 'error'
|
|
81
|
+
const colorCols: LoaderColor[] = ['inherit', 'primary', 'success', 'error']
|
|
82
|
+
|
|
83
|
+
export const AllVariants: Story = {
|
|
84
|
+
name: 'all variants',
|
|
85
|
+
decorators: [],
|
|
86
|
+
render: () => (
|
|
87
|
+
<Box sx={{ maxWidth: 640, mx: 'auto' }}>
|
|
88
|
+
<StoryTable>
|
|
89
|
+
<StoryThead>
|
|
90
|
+
<StoryRow>
|
|
91
|
+
{tableColumns.map((header, index) => (
|
|
92
|
+
<StoryHeaderCell key={header} first={index === 0}>
|
|
93
|
+
{header}
|
|
94
|
+
</StoryHeaderCell>
|
|
95
|
+
))}
|
|
96
|
+
</StoryRow>
|
|
97
|
+
</StoryThead>
|
|
98
|
+
|
|
99
|
+
<StoryTbody>
|
|
100
|
+
{sizeRows.map(({ label, size }) => (
|
|
101
|
+
<StoryRow key={label}>
|
|
102
|
+
<StoryRowLabel>{label}</StoryRowLabel>
|
|
103
|
+
{colorCols.map((color) => (
|
|
104
|
+
<StoryCell key={color}>
|
|
105
|
+
<Loader size={size} color={color} />
|
|
106
|
+
</StoryCell>
|
|
107
|
+
))}
|
|
108
|
+
</StoryRow>
|
|
109
|
+
))}
|
|
110
|
+
</StoryTbody>
|
|
111
|
+
</StoryTable>
|
|
112
|
+
|
|
113
|
+
<StoryHint>Loader wraps MUI CircularProgress with a fixed 24 px default size. Use the Controls panel to try determinate mode.</StoryHint>
|
|
114
|
+
</Box>
|
|
115
|
+
),
|
|
116
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import NoInternet from '@components/NoInternet'
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof NoInternet> = {
|
|
6
|
+
title: 'Components/NoInternet',
|
|
7
|
+
component: NoInternet,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
title: { control: 'text', description: 'Message shown below the icon' },
|
|
11
|
+
},
|
|
12
|
+
args: {
|
|
13
|
+
title: 'No internet connection',
|
|
14
|
+
},
|
|
15
|
+
parameters: {
|
|
16
|
+
layout: 'padded',
|
|
17
|
+
controls: { expanded: true },
|
|
18
|
+
},
|
|
19
|
+
decorators: [
|
|
20
|
+
// `position: fixed` inside NoInternet escapes normal flow.
|
|
21
|
+
// A CSS transform on the parent creates a new containing block that traps it.
|
|
22
|
+
(Story) => (
|
|
23
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%', py: 4, transform: 'translateZ(0)' }}>
|
|
24
|
+
<Story />
|
|
25
|
+
</Box>
|
|
26
|
+
),
|
|
27
|
+
],
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default meta
|
|
31
|
+
type Story = StoryObj<typeof NoInternet>
|
|
32
|
+
|
|
33
|
+
export const Base: Story = {}
|
|
34
|
+
|
|
35
|
+
export const CustomMessage: Story = {
|
|
36
|
+
name: 'custom message',
|
|
37
|
+
args: { title: 'Please check your network and try again.' },
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const ShortMessage: Story = {
|
|
41
|
+
name: 'short message',
|
|
42
|
+
args: { title: 'Offline' },
|
|
43
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import ProgressBar from '@components/ProgressBar'
|
|
4
|
+
import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof ProgressBar> = {
|
|
7
|
+
title: 'Components/ProgressBar',
|
|
8
|
+
component: ProgressBar,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
value: {
|
|
12
|
+
control: { type: 'range', min: 0, max: 100, step: 1 },
|
|
13
|
+
description: 'Progress percentage (0–100)',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
parameters: {
|
|
17
|
+
layout: 'padded',
|
|
18
|
+
controls: { expanded: true },
|
|
19
|
+
},
|
|
20
|
+
decorators: [
|
|
21
|
+
(Story) => (
|
|
22
|
+
<Box sx={{ width: '50%', mx: 'auto', borderRadius: 1, p: 2, bgcolor: 'divider', minHeight: '30vh' }}>
|
|
23
|
+
<Story />
|
|
24
|
+
</Box>
|
|
25
|
+
),
|
|
26
|
+
],
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default meta
|
|
30
|
+
type Story = StoryObj<typeof ProgressBar>
|
|
31
|
+
|
|
32
|
+
// ──────────────────────────────────────────────
|
|
33
|
+
// Focused stories
|
|
34
|
+
|
|
35
|
+
export const Base: Story = {
|
|
36
|
+
args: { value: 50 },
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const Empty: Story = {
|
|
40
|
+
args: { value: 0 },
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const Complete: Story = {
|
|
44
|
+
args: { value: 100 },
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const Decimal: Story = {
|
|
48
|
+
name: 'decimal value',
|
|
49
|
+
args: { value: 66.7 },
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ──────────────────────────────────────────────
|
|
53
|
+
// Kitchen sink
|
|
54
|
+
|
|
55
|
+
const tableColumns = ['VALUE', 'PROGRESS BAR'] as const
|
|
56
|
+
|
|
57
|
+
const valueRows: Array<{ label: string; value: number }> = [
|
|
58
|
+
{ label: '0%', value: 0 },
|
|
59
|
+
{ label: '25%', value: 25 },
|
|
60
|
+
{ label: '50%', value: 50 },
|
|
61
|
+
{ label: '75%', value: 75 },
|
|
62
|
+
{ label: '99.9%', value: 99.9 },
|
|
63
|
+
{ label: '100%', value: 100 },
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
export const AllVariants: Story = {
|
|
67
|
+
name: 'all variants',
|
|
68
|
+
render: (args) => (
|
|
69
|
+
<Box sx={{ maxWidth: 960, mx: 'auto' }}>
|
|
70
|
+
<StoryTable>
|
|
71
|
+
<StoryThead>
|
|
72
|
+
<StoryRow>
|
|
73
|
+
{tableColumns.map((header, index) => (
|
|
74
|
+
<StoryHeaderCell key={header} first={index === 0}>
|
|
75
|
+
{header}
|
|
76
|
+
</StoryHeaderCell>
|
|
77
|
+
))}
|
|
78
|
+
</StoryRow>
|
|
79
|
+
</StoryThead>
|
|
80
|
+
|
|
81
|
+
<StoryTbody>
|
|
82
|
+
{valueRows.map(({ label, value }) => (
|
|
83
|
+
<StoryRow key={label}>
|
|
84
|
+
<StoryRowLabel>{label}</StoryRowLabel>
|
|
85
|
+
<StoryCell>
|
|
86
|
+
<Box sx={{ width: 300 }}>
|
|
87
|
+
<ProgressBar {...args} value={value} />
|
|
88
|
+
</Box>
|
|
89
|
+
</StoryCell>
|
|
90
|
+
</StoryRow>
|
|
91
|
+
))}
|
|
92
|
+
</StoryTbody>
|
|
93
|
+
</StoryTable>
|
|
94
|
+
|
|
95
|
+
<StoryHint>Use the range slider in Controls to scrub through progress values.</StoryHint>
|
|
96
|
+
</Box>
|
|
97
|
+
),
|
|
98
|
+
args: { value: 50 },
|
|
99
|
+
}
|