@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,105 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import Box from '@mui/material/Box'
|
|
4
|
+
import type { DateObject } from 'react-multi-date-picker'
|
|
5
|
+
import Calender from '@components/Calender'
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Calender> = {
|
|
8
|
+
title: 'Components/Inputs/Calender',
|
|
9
|
+
component: Calender,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
isAr: { control: 'boolean', description: 'Switch to Arabic locale' },
|
|
13
|
+
enableTimePicker: { control: 'boolean', description: 'Show a time picker inside the calendar popover' },
|
|
14
|
+
placement: {
|
|
15
|
+
control: 'select',
|
|
16
|
+
options: ['bottom-start', 'bottom-end', 'top-start', 'top-end'],
|
|
17
|
+
description: 'Popper placement relative to the trigger button',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
parameters: {
|
|
21
|
+
layout: 'padded',
|
|
22
|
+
controls: { expanded: true },
|
|
23
|
+
},
|
|
24
|
+
decorators: [
|
|
25
|
+
(Story) => (
|
|
26
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', pt: 4, minHeight: 200 }}>
|
|
27
|
+
<Story />
|
|
28
|
+
</Box>
|
|
29
|
+
),
|
|
30
|
+
],
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default meta
|
|
34
|
+
type Story = StoryObj<typeof Calender>
|
|
35
|
+
|
|
36
|
+
// ──────────────────────────────────────────────
|
|
37
|
+
// Named wrapper components
|
|
38
|
+
|
|
39
|
+
const CalenderBase = () => {
|
|
40
|
+
const [date, setDate] = useState<DateObject | undefined>(undefined)
|
|
41
|
+
return <Calender value={date} setValue={setDate} />
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const CalenderWithTime = () => {
|
|
45
|
+
const [date, setDate] = useState<DateObject | undefined>(undefined)
|
|
46
|
+
return <Calender value={date} setValue={setDate} enableTimePicker />
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const CalenderArabic = () => {
|
|
50
|
+
const [date, setDate] = useState<DateObject | undefined>(undefined)
|
|
51
|
+
return <Calender value={date} setValue={setDate} isAr />
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// ──────────────────────────────────────────────
|
|
55
|
+
// Focused stories
|
|
56
|
+
|
|
57
|
+
export const Base: Story = {
|
|
58
|
+
parameters: {
|
|
59
|
+
docs: {
|
|
60
|
+
source: {
|
|
61
|
+
language: 'tsx',
|
|
62
|
+
code: `
|
|
63
|
+
const [date, setDate] = useState<DateObject | undefined>(undefined)
|
|
64
|
+
|
|
65
|
+
<Calender value={date} setValue={setDate} />
|
|
66
|
+
`.trim(),
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
render: () => <CalenderBase />,
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const WithTimePicker: Story = {
|
|
74
|
+
name: 'with time picker',
|
|
75
|
+
parameters: {
|
|
76
|
+
docs: {
|
|
77
|
+
source: {
|
|
78
|
+
language: 'tsx',
|
|
79
|
+
code: `
|
|
80
|
+
const [date, setDate] = useState<DateObject | undefined>(undefined)
|
|
81
|
+
|
|
82
|
+
<Calender value={date} setValue={setDate} enableTimePicker />
|
|
83
|
+
`.trim(),
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
render: () => <CalenderWithTime />,
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export const Arabic: Story = {
|
|
91
|
+
name: 'arabic locale',
|
|
92
|
+
parameters: {
|
|
93
|
+
docs: {
|
|
94
|
+
source: {
|
|
95
|
+
language: 'tsx',
|
|
96
|
+
code: `
|
|
97
|
+
const [date, setDate] = useState<DateObject | undefined>(undefined)
|
|
98
|
+
|
|
99
|
+
<Calender value={date} setValue={setDate} isAr />
|
|
100
|
+
`.trim(),
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
render: () => <CalenderArabic />,
|
|
105
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Box from '@mui/material/Box'
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
4
|
+
import Checkbox from '@components/Checkbox'
|
|
5
|
+
import { StoryFlexRow, StoryHint } from '@storybook-utils'
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Checkbox> = {
|
|
8
|
+
title: 'Components/Inputs/Checkbox',
|
|
9
|
+
component: Checkbox,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'padded',
|
|
13
|
+
},
|
|
14
|
+
decorators: [
|
|
15
|
+
(Story) => (
|
|
16
|
+
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
|
|
17
|
+
<Story />
|
|
18
|
+
</Box>
|
|
19
|
+
),
|
|
20
|
+
],
|
|
21
|
+
argTypes: {
|
|
22
|
+
checked: { control: 'boolean' },
|
|
23
|
+
indeterminate: { control: 'boolean' },
|
|
24
|
+
disabled: { control: 'boolean' },
|
|
25
|
+
size: {
|
|
26
|
+
control: 'select',
|
|
27
|
+
options: ['small', 'medium', 'large'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const baseCheckboxSx = {
|
|
33
|
+
'& .MuiSvgIcon-root': {
|
|
34
|
+
width: '14px !important',
|
|
35
|
+
height: '14px !important',
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default meta
|
|
40
|
+
type Story = StoryObj<typeof Checkbox>
|
|
41
|
+
|
|
42
|
+
export const Base: Story = {
|
|
43
|
+
args: { checked: false },
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const Checked: Story = {
|
|
47
|
+
args: { checked: true },
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export const Indeterminate: Story = {
|
|
51
|
+
args: { indeterminate: true },
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const Disabled: Story = {
|
|
55
|
+
args: { disabled: true },
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Disabled + checked renders the UNCHECKED icon — intentional component behaviour
|
|
59
|
+
export const DisabledChecked: Story = {
|
|
60
|
+
name: 'Disabled (checked)',
|
|
61
|
+
args: { checked: true, disabled: true },
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const AllStates: Story = {
|
|
65
|
+
name: 'all variants',
|
|
66
|
+
render: () => (
|
|
67
|
+
<>
|
|
68
|
+
<StoryFlexRow spacing={1}>
|
|
69
|
+
<Checkbox checked={false} sx={() => baseCheckboxSx} />
|
|
70
|
+
<Checkbox checked />
|
|
71
|
+
<Checkbox indeterminate />
|
|
72
|
+
<Checkbox disabled />
|
|
73
|
+
<Checkbox checked disabled />
|
|
74
|
+
</StoryFlexRow>
|
|
75
|
+
<StoryHint>unchecked · checked · indeterminate · disabled · disabled (checked)</StoryHint>
|
|
76
|
+
</>
|
|
77
|
+
),
|
|
78
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
3
|
+
import Box from '@mui/material/Box'
|
|
4
|
+
import ColorPicker from '@components/ColorPicker'
|
|
5
|
+
import { StoryFlexRow, StoryHint } from '@storybook-utils'
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof ColorPicker> = {
|
|
8
|
+
title: 'Components/Inputs/ColorPicker',
|
|
9
|
+
component: ColorPicker,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
value: { control: 'color', description: 'Current color value (hex/hexa string)' },
|
|
13
|
+
disabled: { control: 'boolean' },
|
|
14
|
+
|
|
15
|
+
onChange: { table: { disable: true } },
|
|
16
|
+
onReset: { table: { disable: true } },
|
|
17
|
+
options: { table: { disable: true } },
|
|
18
|
+
},
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'padded',
|
|
21
|
+
controls: { expanded: true },
|
|
22
|
+
},
|
|
23
|
+
decorators: [
|
|
24
|
+
(Story) => (
|
|
25
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%', py: 4 }}>
|
|
26
|
+
<Story />
|
|
27
|
+
</Box>
|
|
28
|
+
),
|
|
29
|
+
],
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default meta
|
|
33
|
+
type Story = StoryObj<typeof ColorPicker>
|
|
34
|
+
|
|
35
|
+
// ──────────────────────────────────────────────
|
|
36
|
+
// Focused stories
|
|
37
|
+
|
|
38
|
+
export const Base: Story = {
|
|
39
|
+
name: 'base',
|
|
40
|
+
render: () => {
|
|
41
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
42
|
+
const [color, setColor] = useState('#1976d2')
|
|
43
|
+
return <ColorPicker value={color} onChange={setColor} onReset={() => setColor('#1976d2')} />
|
|
44
|
+
},
|
|
45
|
+
parameters: {
|
|
46
|
+
docs: {
|
|
47
|
+
source: {
|
|
48
|
+
language: 'tsx',
|
|
49
|
+
code: `
|
|
50
|
+
const [color, setColor] = useState('#1976d2')
|
|
51
|
+
|
|
52
|
+
<ColorPicker
|
|
53
|
+
value={color}
|
|
54
|
+
onChange={setColor}
|
|
55
|
+
onReset={() => setColor('#1976d2')}
|
|
56
|
+
/>`.trim(),
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const NoAlpha: Story = {
|
|
63
|
+
name: 'no alpha',
|
|
64
|
+
render: () => {
|
|
65
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
66
|
+
const [color, setColor] = useState('#e53935')
|
|
67
|
+
return <ColorPicker value={color} onChange={setColor} options={{ disableAlpha: true }} />
|
|
68
|
+
},
|
|
69
|
+
parameters: {
|
|
70
|
+
docs: {
|
|
71
|
+
source: {
|
|
72
|
+
language: 'tsx',
|
|
73
|
+
code: `
|
|
74
|
+
const [color, setColor] = useState('#e53935')
|
|
75
|
+
|
|
76
|
+
<ColorPicker
|
|
77
|
+
value={color}
|
|
78
|
+
onChange={setColor}
|
|
79
|
+
options={{ disableAlpha: true }}
|
|
80
|
+
/>`.trim(),
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const NoReset: Story = {
|
|
87
|
+
name: 'no reset button',
|
|
88
|
+
render: () => {
|
|
89
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
90
|
+
const [color, setColor] = useState('#43a047')
|
|
91
|
+
return <ColorPicker value={color} onChange={setColor} options={{ hideReset: true }} />
|
|
92
|
+
},
|
|
93
|
+
parameters: {
|
|
94
|
+
docs: {
|
|
95
|
+
source: {
|
|
96
|
+
language: 'tsx',
|
|
97
|
+
code: `
|
|
98
|
+
const [color, setColor] = useState('#43a047')
|
|
99
|
+
|
|
100
|
+
<ColorPicker
|
|
101
|
+
value={color}
|
|
102
|
+
onChange={setColor}
|
|
103
|
+
options={{ hideReset: true }}
|
|
104
|
+
/>`.trim(),
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export const Disabled: Story = {
|
|
111
|
+
render: () => <ColorPicker value="#9e9e9e" onChange={() => {}} disabled />,
|
|
112
|
+
parameters: {
|
|
113
|
+
docs: {
|
|
114
|
+
source: {
|
|
115
|
+
language: 'tsx',
|
|
116
|
+
code: `<ColorPicker value="#9e9e9e" onChange={() => {}} disabled />`,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// ──────────────────────────────────────────────
|
|
123
|
+
// Kitchen sink
|
|
124
|
+
|
|
125
|
+
export const AllVariants: Story = {
|
|
126
|
+
name: 'all variants',
|
|
127
|
+
decorators: [],
|
|
128
|
+
render: () => {
|
|
129
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
130
|
+
const [c1, setC1] = useState('#1976d2')
|
|
131
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
132
|
+
const [c2, setC2] = useState('#e53935')
|
|
133
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
134
|
+
const [c3, setC3] = useState('#43a047')
|
|
135
|
+
|
|
136
|
+
return (
|
|
137
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 3, alignItems: 'center' }}>
|
|
138
|
+
<StoryFlexRow spacing={3} sx={{ flexWrap: 'wrap', justifyContent: 'center' }}>
|
|
139
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1, alignItems: 'center' }}>
|
|
140
|
+
<Box sx={{ fontSize: '0.7rem', color: 'text.secondary', textTransform: 'uppercase' }}>Default</Box>
|
|
141
|
+
<ColorPicker value={c1} onChange={setC1} onReset={() => setC1('#1976d2')} />
|
|
142
|
+
</Box>
|
|
143
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1, alignItems: 'center' }}>
|
|
144
|
+
<Box sx={{ fontSize: '0.7rem', color: 'text.secondary', textTransform: 'uppercase' }}>No Alpha</Box>
|
|
145
|
+
<ColorPicker value={c2} onChange={setC2} options={{ disableAlpha: true }} />
|
|
146
|
+
</Box>
|
|
147
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1, alignItems: 'center' }}>
|
|
148
|
+
<Box sx={{ fontSize: '0.7rem', color: 'text.secondary', textTransform: 'uppercase' }}>No Reset</Box>
|
|
149
|
+
<ColorPicker value={c3} onChange={setC3} options={{ hideReset: true }} />
|
|
150
|
+
</Box>
|
|
151
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1, alignItems: 'center' }}>
|
|
152
|
+
<Box sx={{ fontSize: '0.7rem', color: 'text.secondary', textTransform: 'uppercase' }}>Disabled</Box>
|
|
153
|
+
<ColorPicker value="#9e9e9e" onChange={() => {}} disabled />
|
|
154
|
+
</Box>
|
|
155
|
+
</StoryFlexRow>
|
|
156
|
+
<StoryHint>Click "Edit" on any swatch to open the color picker panel.</StoryHint>
|
|
157
|
+
</Box>
|
|
158
|
+
)
|
|
159
|
+
},
|
|
160
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import Box from '@mui/material/Box'
|
|
4
|
+
import CopyImage from '@components/CopyImage'
|
|
5
|
+
import { StoryTable, StoryThead, StoryTbody, StoryRow, StoryHeaderCell, StoryRowLabel, StoryCell, StoryHint } from '@storybook-utils'
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof CopyImage> = {
|
|
8
|
+
title: 'Components/Inputs/CopyImage',
|
|
9
|
+
component: CopyImage,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
argTypes: {
|
|
12
|
+
isCopyActive: { control: 'boolean', description: 'When true shows the green check (copied); false shows the copy icon' },
|
|
13
|
+
},
|
|
14
|
+
parameters: {
|
|
15
|
+
layout: 'padded',
|
|
16
|
+
controls: { expanded: true },
|
|
17
|
+
},
|
|
18
|
+
decorators: [
|
|
19
|
+
(Story) => (
|
|
20
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>
|
|
21
|
+
<Story />
|
|
22
|
+
</Box>
|
|
23
|
+
),
|
|
24
|
+
],
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default meta
|
|
28
|
+
type Story = StoryObj<typeof CopyImage>
|
|
29
|
+
|
|
30
|
+
// ──────────────────────────────────────────────
|
|
31
|
+
// Focused stories
|
|
32
|
+
|
|
33
|
+
export const Idle: Story = {
|
|
34
|
+
args: { isCopyActive: false, onClick: () => {} },
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const Copied: Story = {
|
|
38
|
+
args: { isCopyActive: true, onClick: () => {} },
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Named component so React hooks rules are satisfied
|
|
42
|
+
const CopyImageInteractive = () => {
|
|
43
|
+
const [isCopied, setIsCopied] = useState(false)
|
|
44
|
+
|
|
45
|
+
const handleCopy = () => {
|
|
46
|
+
setIsCopied(true)
|
|
47
|
+
setTimeout(() => setIsCopied(false), 2000)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return <CopyImage isCopyActive={isCopied} onClick={handleCopy} />
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const Interactive: Story = {
|
|
54
|
+
name: 'interactive (click to copy)',
|
|
55
|
+
decorators: [],
|
|
56
|
+
parameters: {
|
|
57
|
+
docs: {
|
|
58
|
+
source: {
|
|
59
|
+
language: 'tsx',
|
|
60
|
+
code: `
|
|
61
|
+
const [isCopied, setIsCopied] = useState(false)
|
|
62
|
+
|
|
63
|
+
const handleCopy = () => {
|
|
64
|
+
setIsCopied(true)
|
|
65
|
+
setTimeout(() => setIsCopied(false), 2000)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
<CopyImage isCopyActive={isCopied} onClick={handleCopy} />
|
|
69
|
+
`.trim(),
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
render: () => <CopyImageInteractive />,
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// ──────────────────────────────────────────────
|
|
77
|
+
// Kitchen sink
|
|
78
|
+
|
|
79
|
+
const tableColumns = ['STATE', 'PREVIEW'] as const
|
|
80
|
+
|
|
81
|
+
export const AllVariants: Story = {
|
|
82
|
+
name: 'all variants',
|
|
83
|
+
decorators: [],
|
|
84
|
+
render: () => (
|
|
85
|
+
<Box sx={{ maxWidth: 960, mx: 'auto' }}>
|
|
86
|
+
<StoryTable sx={{ width: 'auto' }}>
|
|
87
|
+
<StoryThead>
|
|
88
|
+
<StoryRow>
|
|
89
|
+
{tableColumns.map((header, index) => (
|
|
90
|
+
<StoryHeaderCell key={header} first={index === 0}>
|
|
91
|
+
{header}
|
|
92
|
+
</StoryHeaderCell>
|
|
93
|
+
))}
|
|
94
|
+
</StoryRow>
|
|
95
|
+
</StoryThead>
|
|
96
|
+
|
|
97
|
+
<StoryTbody>
|
|
98
|
+
<StoryRow>
|
|
99
|
+
<StoryRowLabel>Idle</StoryRowLabel>
|
|
100
|
+
<StoryCell>
|
|
101
|
+
<CopyImage isCopyActive={false} onClick={() => {}} />
|
|
102
|
+
</StoryCell>
|
|
103
|
+
</StoryRow>
|
|
104
|
+
<StoryRow>
|
|
105
|
+
<StoryRowLabel>Copied</StoryRowLabel>
|
|
106
|
+
<StoryCell>
|
|
107
|
+
<CopyImage isCopyActive={true} onClick={() => {}} />
|
|
108
|
+
</StoryCell>
|
|
109
|
+
</StoryRow>
|
|
110
|
+
</StoryTbody>
|
|
111
|
+
</StoryTable>
|
|
112
|
+
|
|
113
|
+
<StoryHint>Click the icon in the Interactive story to see the animated transition.</StoryHint>
|
|
114
|
+
</Box>
|
|
115
|
+
),
|
|
116
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import Box from '@mui/material/Box'
|
|
4
|
+
import { CountryFilter } from '@components/CountryFilter'
|
|
5
|
+
|
|
6
|
+
// Icon URLs — replace with locally-imported flag assets in production
|
|
7
|
+
const countryOptions = [
|
|
8
|
+
{ label: 'Kuwait', value: 'KW', icon: 'https://flagcdn.com/w20/kw.png' },
|
|
9
|
+
{ label: 'Saudi Arabia', value: 'SA', icon: 'https://flagcdn.com/w20/sa.png' },
|
|
10
|
+
{ label: 'UAE', value: 'AE', icon: 'https://flagcdn.com/w20/ae.png' },
|
|
11
|
+
{ label: 'Egypt', value: 'EG', icon: 'https://flagcdn.com/w20/eg.png' },
|
|
12
|
+
{ label: 'Jordan', value: 'JO', icon: 'https://flagcdn.com/w20/jo.png' },
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
const meta: Meta<typeof CountryFilter> = {
|
|
16
|
+
title: 'Components/Inputs/CountryFilter',
|
|
17
|
+
component: CountryFilter,
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'padded',
|
|
21
|
+
controls: { expanded: true },
|
|
22
|
+
},
|
|
23
|
+
decorators: [
|
|
24
|
+
(Story) => (
|
|
25
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>
|
|
26
|
+
<Story />
|
|
27
|
+
</Box>
|
|
28
|
+
),
|
|
29
|
+
],
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default meta
|
|
33
|
+
type Story = StoryObj<typeof CountryFilter>
|
|
34
|
+
|
|
35
|
+
// ──────────────────────────────────────────────
|
|
36
|
+
// Named wrapper components
|
|
37
|
+
|
|
38
|
+
const CountryFilterBase = () => {
|
|
39
|
+
const [selected, setSelected] = useState<string[]>([])
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<Box sx={{ width: 220, border: '1px solid #F2F2F2', borderRadius: 1 }}>
|
|
43
|
+
<CountryFilter countriesOptions={countryOptions} selectedCountries={selected} onCountriesChange={setSelected} />
|
|
44
|
+
</Box>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const CountryFilterPreSelected = () => {
|
|
49
|
+
const [selected, setSelected] = useState<string[]>(['KW', 'SA'])
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<Box sx={{ width: 220, border: '1px solid #F2F2F2', borderRadius: 1 }}>
|
|
53
|
+
<CountryFilter countriesOptions={countryOptions} selectedCountries={selected} onCountriesChange={setSelected} />
|
|
54
|
+
</Box>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ──────────────────────────────────────────────
|
|
59
|
+
// Focused stories
|
|
60
|
+
|
|
61
|
+
export const Base: Story = {
|
|
62
|
+
parameters: {
|
|
63
|
+
docs: {
|
|
64
|
+
source: {
|
|
65
|
+
language: 'tsx',
|
|
66
|
+
code: `
|
|
67
|
+
const [selected, setSelected] = useState<string[]>([])
|
|
68
|
+
|
|
69
|
+
<CountryFilter
|
|
70
|
+
countriesOptions={countryOptions}
|
|
71
|
+
selectedCountries={selected}
|
|
72
|
+
onCountriesChange={setSelected}
|
|
73
|
+
/>
|
|
74
|
+
`.trim(),
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
render: () => <CountryFilterBase />,
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const PreSelected: Story = {
|
|
82
|
+
name: 'with pre-selected countries',
|
|
83
|
+
parameters: {
|
|
84
|
+
docs: {
|
|
85
|
+
source: {
|
|
86
|
+
language: 'tsx',
|
|
87
|
+
code: `
|
|
88
|
+
const [selected, setSelected] = useState(['KW', 'SA'])
|
|
89
|
+
|
|
90
|
+
<CountryFilter
|
|
91
|
+
countriesOptions={countryOptions}
|
|
92
|
+
selectedCountries={selected}
|
|
93
|
+
onCountriesChange={setSelected}
|
|
94
|
+
/>
|
|
95
|
+
`.trim(),
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
render: () => <CountryFilterPreSelected />,
|
|
100
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import Box from '@mui/material/Box'
|
|
4
|
+
import Button from '@mui/material/Button'
|
|
5
|
+
import { CurrencyFilter } from '@components/CurrencyFilter'
|
|
6
|
+
|
|
7
|
+
const merchantCurrencies = [
|
|
8
|
+
{ currencyCode: 'KWD' },
|
|
9
|
+
{ currencyCode: 'SAR' },
|
|
10
|
+
{ currencyCode: 'USD' },
|
|
11
|
+
{ currencyCode: 'EUR' },
|
|
12
|
+
{ currencyCode: 'AED' },
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
const meta: Meta<typeof CurrencyFilter> = {
|
|
16
|
+
title: 'Components/Inputs/CurrencyFilter',
|
|
17
|
+
component: CurrencyFilter,
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'padded',
|
|
21
|
+
controls: { expanded: true },
|
|
22
|
+
},
|
|
23
|
+
decorators: [
|
|
24
|
+
(Story) => (
|
|
25
|
+
<Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>
|
|
26
|
+
<Story />
|
|
27
|
+
</Box>
|
|
28
|
+
),
|
|
29
|
+
],
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default meta
|
|
33
|
+
type Story = StoryObj<typeof CurrencyFilter>
|
|
34
|
+
|
|
35
|
+
// ──────────────────────────────────────────────
|
|
36
|
+
// Named wrapper components
|
|
37
|
+
// CurrencyFilter is anchor-driven — it must be opened by an external element.
|
|
38
|
+
|
|
39
|
+
const CurrencyFilterDemo = () => {
|
|
40
|
+
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
|
|
41
|
+
const [selected, setSelected] = useState<string[]>([])
|
|
42
|
+
|
|
43
|
+
const handleClose = () => setAnchorEl(null)
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<Box>
|
|
47
|
+
<Button variant="outlined" onClick={(e) => setAnchorEl(e.currentTarget)}>
|
|
48
|
+
{`Currency filter${selected.length > 0 ? ` (${selected.length})` : ''}`}
|
|
49
|
+
</Button>
|
|
50
|
+
<CurrencyFilter
|
|
51
|
+
anchorEl={anchorEl}
|
|
52
|
+
setAnchorEl={setAnchorEl}
|
|
53
|
+
onCloseDropdown={handleClose}
|
|
54
|
+
merchantCurrencies={merchantCurrencies}
|
|
55
|
+
selectedCurrencies={selected}
|
|
56
|
+
onCurrenciesChange={(currencies) => setSelected(currencies ?? [])}
|
|
57
|
+
onConfirm={handleClose}
|
|
58
|
+
/>
|
|
59
|
+
</Box>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const CurrencyFilterPreSelected = () => {
|
|
64
|
+
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
|
|
65
|
+
const [selected, setSelected] = useState<string[]>(['KWD', 'USD'])
|
|
66
|
+
|
|
67
|
+
const handleClose = () => setAnchorEl(null)
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<Box>
|
|
71
|
+
<Button variant="outlined" onClick={(e) => setAnchorEl(e.currentTarget)}>
|
|
72
|
+
{`Currency filter (${selected.length})`}
|
|
73
|
+
</Button>
|
|
74
|
+
<CurrencyFilter
|
|
75
|
+
anchorEl={anchorEl}
|
|
76
|
+
setAnchorEl={setAnchorEl}
|
|
77
|
+
onCloseDropdown={handleClose}
|
|
78
|
+
merchantCurrencies={merchantCurrencies}
|
|
79
|
+
selectedCurrencies={selected}
|
|
80
|
+
onCurrenciesChange={(currencies) => setSelected(currencies ?? [])}
|
|
81
|
+
onConfirm={handleClose}
|
|
82
|
+
/>
|
|
83
|
+
</Box>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// ──────────────────────────────────────────────
|
|
88
|
+
// Focused stories
|
|
89
|
+
|
|
90
|
+
export const Base: Story = {
|
|
91
|
+
parameters: {
|
|
92
|
+
docs: {
|
|
93
|
+
source: {
|
|
94
|
+
language: 'tsx',
|
|
95
|
+
code: `
|
|
96
|
+
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
|
|
97
|
+
const [selected, setSelected] = useState<string[]>([])
|
|
98
|
+
|
|
99
|
+
<Button onClick={(e) => setAnchorEl(e.currentTarget)}>Currency filter</Button>
|
|
100
|
+
|
|
101
|
+
<CurrencyFilter
|
|
102
|
+
anchorEl={anchorEl}
|
|
103
|
+
setAnchorEl={setAnchorEl}
|
|
104
|
+
onCloseDropdown={() => setAnchorEl(null)}
|
|
105
|
+
merchantCurrencies={[{ currencyCode: 'KWD' }, { currencyCode: 'SAR' }]}
|
|
106
|
+
selectedCurrencies={selected}
|
|
107
|
+
onCurrenciesChange={setSelected}
|
|
108
|
+
onConfirm={() => setAnchorEl(null)}
|
|
109
|
+
/>
|
|
110
|
+
`.trim(),
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
render: () => <CurrencyFilterDemo />,
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export const PreSelected: Story = {
|
|
118
|
+
name: 'with pre-selected currencies',
|
|
119
|
+
parameters: {
|
|
120
|
+
docs: {
|
|
121
|
+
source: {
|
|
122
|
+
language: 'tsx',
|
|
123
|
+
code: `
|
|
124
|
+
const [selected, setSelected] = useState(['KWD', 'USD'])
|
|
125
|
+
|
|
126
|
+
<CurrencyFilter
|
|
127
|
+
anchorEl={anchorEl}
|
|
128
|
+
setAnchorEl={setAnchorEl}
|
|
129
|
+
onCloseDropdown={() => setAnchorEl(null)}
|
|
130
|
+
merchantCurrencies={merchantCurrencies}
|
|
131
|
+
selectedCurrencies={selected}
|
|
132
|
+
onCurrenciesChange={setSelected}
|
|
133
|
+
onConfirm={() => setAnchorEl(null)}
|
|
134
|
+
/>
|
|
135
|
+
`.trim(),
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
render: () => <CurrencyFilterPreSelected />,
|
|
140
|
+
}
|