@woovi/ui 4.0.942
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/.eslintrc.js +1 -0
- package/README.md +1 -0
- package/babel.config.js +3 -0
- package/babel.rollup.config.js +20 -0
- package/jest-eslint.config.js +7 -0
- package/jest.config.js +17 -0
- package/lib/index.cjs.js +1 -0
- package/package.json +107 -0
- package/rollup.config.js +96 -0
- package/src/BackButton.tsx +25 -0
- package/src/Badge.tsx +17 -0
- package/src/Banner.stories.tsx +108 -0
- package/src/Banner.tsx +44 -0
- package/src/CashbackTagStatus.tsx +31 -0
- package/src/Circle.tsx +10 -0
- package/src/CircleButton.tsx +51 -0
- package/src/ClockIcon.tsx +41 -0
- package/src/Column.tsx +6 -0
- package/src/CopyInput.tsx +40 -0
- package/src/EmptyMessage.stories.tsx +19 -0
- package/src/EmptyMessage.tsx +23 -0
- package/src/EncryptedText.tsx +23 -0
- package/src/FloatingMenu.tsx +88 -0
- package/src/LayoutRoot.tsx +14 -0
- package/src/LinearProgress.tsx +79 -0
- package/src/Link.tsx +9 -0
- package/src/Loading.stories.tsx +29 -0
- package/src/Loading.tsx +44 -0
- package/src/Logo.tsx +8 -0
- package/src/LoremIpsum.tsx +4 -0
- package/src/Modal/Modal.stories.tsx +38 -0
- package/src/Modal/Modal.tsx +93 -0
- package/src/OverflowDiv.tsx +25 -0
- package/src/ProgressBar.tsx +58 -0
- package/src/ProgressBarText.tsx +34 -0
- package/src/QuestionTooltip.tsx +40 -0
- package/src/RadioCard/RadioCard.tsx +101 -0
- package/src/RadioCard/__stories__/RadioCard.stories.tsx +235 -0
- package/src/Row.tsx +8 -0
- package/src/SafeTextTooltip.tsx +35 -0
- package/src/SearchField.tsx +71 -0
- package/src/Step.tsx +32 -0
- package/src/TagWebhookStatus.tsx +20 -0
- package/src/ToggleButtonGroup.stories.tsx +65 -0
- package/src/ToggleButtonGroup.tsx +114 -0
- package/src/ToggleButtonGroupMobile.tsx +56 -0
- package/src/TransactionTagEntryTypes.tsx +18 -0
- package/src/TransactionTagStatus.tsx +27 -0
- package/src/UnsupportedBrowserWarning.tsx +76 -0
- package/src/__visual__/CopyInput.spec.tsx +12 -0
- package/src/__visual__/__image_snapshots__/copy-input-spec-tsx-match-image-snapshot-copy-input-1-snap.png +0 -0
- package/src/auth/LoginWrapper.tsx +21 -0
- package/src/avatar/Avatar.tsx +66 -0
- package/src/avatar/AvatarGroup.tsx +103 -0
- package/src/avatar/AvatarGroupArray.tsx +67 -0
- package/src/avatar/AvatarGroupSelectedAll.tsx +76 -0
- package/src/avatar/stories/Avatar.stories.tsx +24 -0
- package/src/buttons/ActionButton.tsx +111 -0
- package/src/buttons/DangerButton.tsx +35 -0
- package/src/buttons/PayWithPixButton.tsx +75 -0
- package/src/buttons/SplitButton.tsx +112 -0
- package/src/buttons/__stories__/PayWithPixButton.stories.tsx +19 -0
- package/src/buttons/__visual__/ActionButton.spec.tsx +12 -0
- package/src/buttons/__visual__/PayWithPixButton.spec.tsx +12 -0
- package/src/buttons/__visual__/__image_snapshots__/action-button-spec-tsx-match-image-snapshot-action-button-1-snap.png +0 -0
- package/src/buttons/__visual__/__image_snapshots__/pay-with-pix-button-spec-tsx-match-image-snapshot-pay-with-pix-button-1-snap.png +0 -0
- package/src/buttons/getLoadingIconProp.tsx +7 -0
- package/src/buttons/stories/ActionButton.stories.tsx +196 -0
- package/src/buttons/stories/SplitButton.stories.tsx +28 -0
- package/src/card/Card.tsx +91 -0
- package/src/card/CardActions.tsx +13 -0
- package/src/card/CardContent.tsx +26 -0
- package/src/card/CardForm.tsx +80 -0
- package/src/card/CardList.tsx +67 -0
- package/src/card/CardRadio.tsx +0 -0
- package/src/card/CardSkeleton.tsx +25 -0
- package/src/card/CardWithLink.tsx +49 -0
- package/src/card/CardWithLinkSkeleton.tsx +14 -0
- package/src/card/basicContext/CardBasicContext.tsx +190 -0
- package/src/card/cardWithActions/CardFooter.tsx +13 -0
- package/src/card/cardWithActions/CardHeader.tsx +15 -0
- package/src/card/cardWithActions/CardWithActions.stories.tsx +53 -0
- package/src/card/cardWithActions/CardWithActions.tsx +161 -0
- package/src/card/stories/Card.stories.tsx +91 -0
- package/src/card/stories/CardContent.stories.tsx +28 -0
- package/src/card/stories/CardForm.stories.tsx +49 -0
- package/src/card/stories/CardWithLink.stories.tsx +64 -0
- package/src/cardAnalytics/CardAnalytics.stories.tsx +83 -0
- package/src/cardAnalytics/CardAnalytics.tsx +78 -0
- package/src/cardAnalytics/CardAnalyticsSkeleton.tsx +26 -0
- package/src/cardGrid/CardField.tsx +44 -0
- package/src/cardGrid/CardFieldCentered.tsx +28 -0
- package/src/cardGrid/CardGrid.stories.tsx +102 -0
- package/src/cardGrid/CardGrid.tsx +38 -0
- package/src/cardGrid/Grid.tsx +27 -0
- package/src/cardWithImage/CardWithImage.tsx +66 -0
- package/src/cardWithImage/__stories__/CardWithImage.stories.tsx +25 -0
- package/src/cardWithImage/__stories__/__assets__/WooviCashback.png +0 -0
- package/src/code/Code.stories.tsx +25 -0
- package/src/code/Code.tsx +20 -0
- package/src/collapsible/Collapse.tsx +73 -0
- package/src/collapsible/Collapsible.tsx +214 -0
- package/src/collapsible/CollapsibleActions.tsx +162 -0
- package/src/collapsible/CollapsibleDetails.tsx +37 -0
- package/src/collapsible/CollapsibleFillWrapper.tsx +6 -0
- package/src/collapsible/CollapsibleGroup.tsx +6 -0
- package/src/collapsible/CollapsibleInfinityActions.tsx +238 -0
- package/src/collapsible/CollapsiblePanelActions.tsx +57 -0
- package/src/collapsible/CollapsibleStep.tsx +118 -0
- package/src/collapsible/CollapsibleStepHeader.tsx +90 -0
- package/src/collapsible/CollapsibleSummary.tsx +54 -0
- package/src/collapsible/CollapsibleTree.tsx +236 -0
- package/src/collapsible/ExpandMoreIcon.tsx +12 -0
- package/src/collapsible/LeafCollapsible.tsx +17 -0
- package/src/collapsible/TransparencyCollapsibleWrapper.tsx +28 -0
- package/src/collapsible/stories/CollapisbleStep.stories.tsx +121 -0
- package/src/collapsible/stories/Collapse.stories.tsx +50 -0
- package/src/collapsible/stories/Collapsible.stories.tsx +121 -0
- package/src/collapsible/stories/CollapsibleGroup.stories.tsx +110 -0
- package/src/collapsible/stories/CollapsibleOld.stories.tsx +582 -0
- package/src/collapsible/stories/CollapsibleStepHeader.stories.tsx +37 -0
- package/src/company/CompanyLogo.tsx +38 -0
- package/src/company/stories/CompanyLogo.stories.tsx +18 -0
- package/src/content/ActionMargin.stories.tsx +21 -0
- package/src/content/ActionMargin.tsx +40 -0
- package/src/content/ActionMarginText.tsx +8 -0
- package/src/content/Content.tsx +18 -0
- package/src/content/IntroText.tsx +23 -0
- package/src/countdown/Countdown.stories.tsx +32 -0
- package/src/countdown/Countdown.tsx +41 -0
- package/src/countdown/ShowCounter.tsx +36 -0
- package/src/countdown/useCountdown.tsx +34 -0
- package/src/datagrid/DataGrid.stories.tsx +146 -0
- package/src/datagrid/DataGrid.tsx +263 -0
- package/src/datagrid/DataGridDetailContainer.tsx +23 -0
- package/src/datagrid/DataGridRow.tsx +30 -0
- package/src/datagrid/__tests__/DataGrid.spec.tsx +33 -0
- package/src/datagrid/cellTypeBasisToPercentage.tsx +18 -0
- package/src/datagrid/cellTypeBoolean.tsx +21 -0
- package/src/datagrid/cellTypeCurrency.ts +18 -0
- package/src/datagrid/cellTypeDate.ts +8 -0
- package/src/datagrid/cellTypeDatetime.ts +8 -0
- package/src/datagrid/cellTypeDatetimeSeconds.ts +8 -0
- package/src/datagrid/cellTypeExpand.tsx +77 -0
- package/src/datagrid/cellTypeLink.tsx +22 -0
- package/src/datagrid/cellTypePhone.tsx +22 -0
- package/src/datagrid/cellTypeTag.tsx +28 -0
- package/src/datagrid/cellTypeTaxID.tsx +12 -0
- package/src/datagrid/cellTypeTime.ts +8 -0
- package/src/datagrid/columnTypes.ts +21 -0
- package/src/datagrid/useTableView.tsx +26 -0
- package/src/deprecated/VirtualizedMobileList.tsx +71 -0
- package/src/deprecated/VirtualizedTable.tsx +165 -0
- package/src/deprecated/VirtualizedTableHeader.tsx +103 -0
- package/src/device/Phone.stories.tsx +34 -0
- package/src/device/Phone.tsx +62 -0
- package/src/dialog/DialogContext.tsx +22 -0
- package/src/dialog/DialogProvider.tsx +141 -0
- package/src/dialog/__tests__/useDialog.spec.tsx +73 -0
- package/src/dialog/index.tsx +6 -0
- package/src/dialog/useDialog.tsx +14 -0
- package/src/drawer/DrawerCard.tsx +70 -0
- package/src/drawer/DrawerResponsiveWrapper.tsx +12 -0
- package/src/drawer/swipable/SwipeableDrawer.stories.tsx +35 -0
- package/src/drawer/swipable/SwipeableDrawer.tsx +40 -0
- package/src/error/ErrorBoundaryWithRetry.tsx +50 -0
- package/src/error/ErrorView.tsx +61 -0
- package/src/file/FileDrop.tsx +73 -0
- package/src/file/IconButton.tsx +57 -0
- package/src/file/MaterialIcon.tsx +35 -0
- package/src/filter/Filter.tsx +108 -0
- package/src/filter/FilterRelayFormik.tsx +53 -0
- package/src/filter/FormikFilter.tsx +39 -0
- package/src/filter/__tests__/FieldDecoding.spec.tsx +68 -0
- package/src/filter/__tests__/FieldEncoding.spec.tsx +68 -0
- package/src/filter/__tests__/Filter.spec.tsx +35 -0
- package/src/filter/__tests__/FilterRelayFormik.spec.tsx +43 -0
- package/src/filter/decodeQueryParamsFromLocation.tsx +19 -0
- package/src/filter/fieldToParamConfigMap.tsx +31 -0
- package/src/filter/formatFilterValue.tsx +36 -0
- package/src/filter/formatFilters.tsx +27 -0
- package/src/filter/isValidDatetime.tsx +4 -0
- package/src/filter/orderBy/OrderBySelect.tsx +81 -0
- package/src/filter/stringToBoolean.ts +15 -0
- package/src/filter/useFilterFormik.tsx +372 -0
- package/src/form/FieldRow.tsx +28 -0
- package/src/form/__stories__/FieldRow.stories.tsx +27 -0
- package/src/heading/SectionHeading.tsx +18 -0
- package/src/heading/__stories__/SectionHeading.stories.tsx +23 -0
- package/src/helpers/Divider.tsx +27 -0
- package/src/helpers/HorizontalStack.tsx +12 -0
- package/src/helpers/HoverPopper.tsx +57 -0
- package/src/helpers/stories/HorizontalStack.stories.tsx +82 -0
- package/src/helpers.ts +133 -0
- package/src/icons/AssineOnlineIcon.tsx +123 -0
- package/src/icons/BotConversaIcon.tsx +39 -0
- package/src/icons/CheckIconLabel.tsx +34 -0
- package/src/icons/CheckboxChecked.tsx +34 -0
- package/src/icons/CheckboxIndeterminate.tsx +27 -0
- package/src/icons/CheckboxUnchecked.tsx +36 -0
- package/src/icons/Icon.tsx +8 -0
- package/src/icons/N8nIcon.tsx +40 -0
- package/src/icons/NuvemshopIcon.tsx +25 -0
- package/src/icons/RightTopDiagonalVector.tsx +22 -0
- package/src/icons/SVG.tsx +9 -0
- package/src/icons/SocPanelIcon.tsx +48 -0
- package/src/icons/WabizIcon.tsx +42 -0
- package/src/icons/WakeIcon.tsx +45 -0
- package/src/import/Dropzone.tsx +13 -0
- package/src/import/DropzoneFile.tsx +278 -0
- package/src/import/xlsx/Import.tsx +161 -0
- package/src/import/xlsx/ImportDropzone.tsx +120 -0
- package/src/import/xlsx/ImportProcessData.tsx +92 -0
- package/src/import/xlsx/ImportProcessQueue.tsx +176 -0
- package/src/import/xlsx/ImportStepper.tsx +247 -0
- package/src/import/xlsx/ImportTable.tsx +72 -0
- package/src/import/xlsx/ImportUtils.tsx +726 -0
- package/src/index.tsx +328 -0
- package/src/layoutWrapper/LayoutWrapper.tsx +48 -0
- package/src/layoutWrapper/LayoutWrapperFluid.tsx +38 -0
- package/src/logo/OpenPixLogoColor.tsx +137 -0
- package/src/logo/WooviLogo.tsx +46 -0
- package/src/mui/BoxFlex.tsx +27 -0
- package/src/mui/Typography.tsx +8 -0
- package/src/mui/__stories__/Typography.stories.tsx +14 -0
- package/src/mui/__stories__/TypographyExample.tsx +29 -0
- package/src/multifactor/MultiFactorConfirmModal.tsx +67 -0
- package/src/multifactor/__stories__/MultiFactorConfirmModal.stories.tsx +30 -0
- package/src/openpix/charge/ChargeTagStatus.tsx +21 -0
- package/src/openpix/images/GiftbackEnvelopeSvg.tsx +152 -0
- package/src/openpix/images/WooviLogoInMobile.tsx +35 -0
- package/src/openpix/order/CheckIcon.tsx +20 -0
- package/src/openpix/order/ConfirmedIcon.tsx +189 -0
- package/src/openpix/order/EarnCashback.tsx +39 -0
- package/src/openpix/order/EarnCashbackExclusive.tsx +42 -0
- package/src/openpix/order/GiftbackRedeem.tsx +38 -0
- package/src/openpix/order/PayPixValueCompany.tsx +85 -0
- package/src/openpix/order/PixPaymentWoovi.tsx +82 -0
- package/src/openpix/order/RedeemCashbackExclusiveScheduled.tsx +52 -0
- package/src/openpix/order/ShopperSeeMyGiftback.tsx +51 -0
- package/src/openpix/order/__generated__/RedeemCashbackExclusiveScheduled_charge.graphql.ts +55 -0
- package/src/openpix/order/discount/EarnDiscount.tsx +34 -0
- package/src/openpix/order/giftback/EarnGiftback.tsx +53 -0
- package/src/openpix/order/giftback/GiftbackRule.tsx +32 -0
- package/src/openpix/paymentLink/AdditionalInfo.tsx +60 -0
- package/src/openpix/paymentLink/BrCodeInput.tsx +48 -0
- package/src/openpix/paymentLink/ChargeInfo.tsx +76 -0
- package/src/openpix/paymentLink/CopyQRCode.stories.tsx +21 -0
- package/src/openpix/paymentLink/CopyQRCode.tsx +75 -0
- package/src/openpix/paymentLink/ErrorIcon.tsx +18 -0
- package/src/openpix/paymentLink/InfoSide.tsx +174 -0
- package/src/openpix/paymentLink/InterestsInfo.tsx +60 -0
- package/src/openpix/paymentLink/NotFound.tsx +16 -0
- package/src/openpix/paymentLink/PaymentDeleted.tsx +172 -0
- package/src/openpix/paymentLink/PaymentExpired.tsx +170 -0
- package/src/openpix/paymentLink/PaymentFooter.tsx +13 -0
- package/src/openpix/paymentLink/PaymentLink.stories.tsx +57 -0
- package/src/openpix/paymentLink/PaymentLink.tsx +97 -0
- package/src/openpix/paymentLink/PaymentLinkActive.tsx +36 -0
- package/src/openpix/paymentLink/PaymentLinkTestAccountBanner.tsx +47 -0
- package/src/openpix/paymentLink/PaymentLinkWrapper.tsx +60 -0
- package/src/openpix/paymentLink/PaymentLogo.tsx +56 -0
- package/src/openpix/paymentLink/QrCodeResponsive.tsx +77 -0
- package/src/openpix/paymentLink/QrCodeSectionHeaderInfo.tsx +45 -0
- package/src/openpix/paymentLink/QrCodeShowButton.tsx +44 -0
- package/src/openpix/paymentLink/QrCodeSide.tsx +200 -0
- package/src/openpix/paymentLink/ShareButton.tsx +133 -0
- package/src/openpix/paymentLink/__generated__/PaymentLinkActive_charge.graphql.ts +40 -0
- package/src/openpix/paymentLink/__generated__/PaymentLink_charge.graphql.ts +45 -0
- package/src/openpix/paymentLink/__generated__/QrCodeSide_charge.graphql.ts +40 -0
- package/src/openpix/paymentLink/types/ChargeDataType.tsx +119 -0
- package/src/openpix/paymentSuccess/PaymentSuccess.tsx +213 -0
- package/src/openpix/paymentSuccess/PaymentSuccessRewards.tsx +229 -0
- package/src/openpix/paymentSuccess/__generated__/PaymentSuccessRewards_charge.graphql.ts +195 -0
- package/src/openpix/paymentSuccess/__generated__/PaymentSuccess_charge.graphql.ts +40 -0
- package/src/openpix/shopper/WooviAuthForm.tsx +225 -0
- package/src/openpix/transaction/PixTransactionTypeTag.tsx +22 -0
- package/src/paymentLinkRow/PaymentLinkRow.tsx +37 -0
- package/src/paymentLinkRow/__stories__/PaymentLinkRow.stories.tsx +40 -0
- package/src/pinInput/PinInput.stories.tsx +48 -0
- package/src/pinInput/PinInput.tsx +246 -0
- package/src/pinInput/PinInputFormik.tsx +18 -0
- package/src/pinInput/createPinArray.ts +17 -0
- package/src/pinInput/pinInputRegex.ts +4 -0
- package/src/relay/RefreshButtonRelay.tsx +45 -0
- package/src/relay/RefreshIconButton.tsx +15 -0
- package/src/relay/SearchInputRelay.tsx +101 -0
- package/src/relay/TopPagination.tsx +68 -0
- package/src/rewardTicket/RewardTicket.tsx +68 -0
- package/src/rewardTicket/__stories__/RewardTicket.stories.tsx +40 -0
- package/src/ribbon/Ribbon.tsx +31 -0
- package/src/ribbon/__stories__/Ribbon.stories.tsx +34 -0
- package/src/ribbon/__visual__/Ribbon.spec.tsx +23 -0
- package/src/ribbon/__visual__/__image_snapshots__/ribbon-spec-tsx-match-image-snapshot-ribbon-1-snap.png +0 -0
- package/src/root/ContentBoundary.tsx +45 -0
- package/src/routed/RoutedTabs.tsx +166 -0
- package/src/routed/TabbedContent.tsx +41 -0
- package/src/routed/__tests__/RoutedTabs.spec.tsx +50 -0
- package/src/screenHeader/ScreenHeader.stories.tsx +106 -0
- package/src/screenHeader/ScreenHeaderUI.tsx +149 -0
- package/src/screenHeader/components/ScreenHeaderSubtitle.tsx +10 -0
- package/src/screenHeader/components/ScreenHeaderTitle.tsx +32 -0
- package/src/screenHeaderCard/ScreenHeaderCard.stories.tsx +49 -0
- package/src/screenHeaderCard/ScreenHeaderCard.tsx +93 -0
- package/src/search/GlobalSearchField.tsx +148 -0
- package/src/select/Select.tsx +22 -0
- package/src/select/SelectAll.tsx +64 -0
- package/src/select/__stories__/Select.stories.tsx +40 -0
- package/src/sidebar/Group.tsx +135 -0
- package/src/sidebar/Item.tsx +52 -0
- package/src/sidebar/MenuList.tsx +95 -0
- package/src/sidebar/Sidebar.stories.tsx +148 -0
- package/src/sidebar/Sidebar.tsx +58 -0
- package/src/sidebar/SidebarContext.tsx +32 -0
- package/src/sidebar/index.tsx +7 -0
- package/src/sidebar/useSidebar.tsx +28 -0
- package/src/sidebar/utils.ts +6 -0
- package/src/snackbar/Snackbar.tsx +117 -0
- package/src/snackbar/SnackbarContext.tsx +22 -0
- package/src/snackbar/__tests__/Snackbar.spec.tsx +19 -0
- package/src/snackbar/fixtures/ShowSnackbar.tsx +38 -0
- package/src/snackbar/index.tsx +6 -0
- package/src/snackbar/useSnackbar.tsx +16 -0
- package/src/statement/TransactionTypeText.tsx +7 -0
- package/src/statement/statementColors.ts +6 -0
- package/src/stepper/Stepper.stories.tsx +25 -0
- package/src/stepper/Stepper.tsx +74 -0
- package/src/swipeableModal/SwipeableModal.stories.tsx +47 -0
- package/src/swipeableModal/SwipeableModal.tsx +68 -0
- package/src/swipeableModal/SwipeableModalTransition.tsx +33 -0
- package/src/table/CardColumn.tsx +34 -0
- package/src/table/CardListVirtualized.tsx +217 -0
- package/src/table/TableToggleViewModel.tsx +49 -0
- package/src/table/cells/ActionCellNode.tsx +80 -0
- package/src/table/cells/Cell.tsx +26 -0
- package/src/table/cells/CheckboxCellNode.tsx +47 -0
- package/src/table/cells/IconCellNode.tsx +53 -0
- package/src/table/cells/LinkCellNode.tsx +76 -0
- package/src/table/cells/RenderCell.tsx +17 -0
- package/src/table/cells/__tests__/LinkCellNode.spec.tsx +40 -0
- package/src/table/cells/cellTypes.ts +16 -0
- package/src/table/cells/getCellCurrency.tsx +17 -0
- package/src/table/cells/getCellDate.tsx +29 -0
- package/src/table/cells/getCellLink.tsx +20 -0
- package/src/table/cells/getCellValue.tsx +79 -0
- package/src/table/cells/index.ts +1 -0
- package/src/table/stories/TableToggleViewModel.stories.tsx +10 -0
- package/src/tag/Tag.tsx +62 -0
- package/src/tag/TagsContainer.tsx +19 -0
- package/src/tag/stories/Tag.stories.tsx +148 -0
- package/src/term/Terms.tsx +8 -0
- package/src/term/TermsLink.tsx +7 -0
- package/src/term/TermsModal.stories.tsx +19 -0
- package/src/term/TermsModal.tsx +40 -0
- package/src/term/useTerms.tsx +57 -0
- package/src/text/TextMultiline.tsx +24 -0
- package/src/textDialog/TextDialog.tsx +86 -0
- package/src/theme/Themes.tsx +223 -0
- package/src/theme/stories/Theme.stories.tsx +13 -0
- package/src/theme/stories/ThemeExample.tsx +193 -0
- package/src/timeline/Timeline.tsx +23 -0
- package/src/timeline/TimelineAppEventDomainIcon.tsx +21 -0
- package/src/timeline/TimelineAppEventItem.tsx +70 -0
- package/src/timeline/TimelineAppEventTypeColor.tsx +33 -0
- package/src/timeline/TimelineItem.tsx +57 -0
- package/src/timeline/__stories__/Timeline.stories.tsx +39 -0
- package/src/timeline/__stories__/TimelineAppEvent.stories.tsx +43 -0
- package/src/unSupportedBrowser/UnsupportedBrowserWarning.tsx +78 -0
- package/src/unSupportedBrowser/index.tsx +2 -0
- package/src/unSupportedBrowser/isUnSupportedBrowser.tsx +15 -0
- package/src/user/chip/UserChip.tsx +25 -0
- package/src/user/chip/stories/UserChip.stories.tsx +26 -0
- package/src/utils/BrowserOnly.tsx +21 -0
- package/src/utils/DesktopOnly.tsx +27 -0
- package/src/utils/MobileOnly.tsx +27 -0
- package/src/windowPopper/WindowPopper.stories.tsx +52 -0
- package/src/windowPopper/WindowPopper.tsx +109 -0
- package/src/windowPopper/WindowPopperTransition.tsx +22 -0
- package/test/ImageReporter.js +41 -0
- package/test/babel-transformer.js +7 -0
- package/test/convertHtmlToImage.tsx +25 -0
- package/test/jest.setup.js +31 -0
- package/test/testUtils.tsx +37 -0
- package/tsconfig.build.json +25 -0
- package/tsconfig.json +4 -0
- package/types/form/test/i18n.d.ts +1 -0
- package/types/ui/src/BackButton.d.ts +5 -0
- package/types/ui/src/Badge.d.ts +2 -0
- package/types/ui/src/Banner.d.ts +10 -0
- package/types/ui/src/Banner.stories.d.ts +6 -0
- package/types/ui/src/CashbackTagStatus.d.ts +5 -0
- package/types/ui/src/Circle.d.ts +5 -0
- package/types/ui/src/CircleButton.d.ts +8 -0
- package/types/ui/src/ClockIcon.d.ts +5 -0
- package/types/ui/src/Column.d.ts +2 -0
- package/types/ui/src/CopyInput.d.ts +5 -0
- package/types/ui/src/EmptyMessage.d.ts +6 -0
- package/types/ui/src/EmptyMessage.stories.d.ts +3 -0
- package/types/ui/src/EncryptedText.d.ts +2 -0
- package/types/ui/src/FloatingMenu.d.ts +13 -0
- package/types/ui/src/LayoutRoot.d.ts +1 -0
- package/types/ui/src/LinearProgress.d.ts +7 -0
- package/types/ui/src/Link.d.ts +3 -0
- package/types/ui/src/Loading.d.ts +8 -0
- package/types/ui/src/Loading.stories.d.ts +5 -0
- package/types/ui/src/Logo.d.ts +1 -0
- package/types/ui/src/LoremIpsum.d.ts +2 -0
- package/types/ui/src/Modal/Modal.d.ts +19 -0
- package/types/ui/src/Modal/Modal.stories.d.ts +6 -0
- package/types/ui/src/OverflowDiv.d.ts +2 -0
- package/types/ui/src/ProgressBar.d.ts +9 -0
- package/types/ui/src/ProgressBarText.d.ts +6 -0
- package/types/ui/src/QuestionTooltip.d.ts +11 -0
- package/types/ui/src/RadioCard/RadioCard.d.ts +11 -0
- package/types/ui/src/RadioCard/__stories__/RadioCard.stories.d.ts +8 -0
- package/types/ui/src/Row.d.ts +2 -0
- package/types/ui/src/SafeTextTooltip.d.ts +8 -0
- package/types/ui/src/SearchField.d.ts +13 -0
- package/types/ui/src/Step.d.ts +9 -0
- package/types/ui/src/TagWebhookStatus.d.ts +7 -0
- package/types/ui/src/ToggleButtonGroup.d.ts +23 -0
- package/types/ui/src/ToggleButtonGroup.stories.d.ts +7 -0
- package/types/ui/src/ToggleButtonGroupMobile.d.ts +7 -0
- package/types/ui/src/TransactionTagEntryTypes.d.ts +4 -0
- package/types/ui/src/TransactionTagStatus.d.ts +8 -0
- package/types/ui/src/UnsupportedBrowserWarning.d.ts +2 -0
- package/types/ui/src/auth/LoginWrapper.d.ts +8 -0
- package/types/ui/src/avatar/Avatar.d.ts +11 -0
- package/types/ui/src/avatar/AvatarGroup.d.ts +12 -0
- package/types/ui/src/avatar/AvatarGroupArray.d.ts +7 -0
- package/types/ui/src/avatar/AvatarGroupSelectedAll.d.ts +8 -0
- package/types/ui/src/avatar/stories/Avatar.stories.d.ts +6 -0
- package/types/ui/src/buttons/ActionButton.d.ts +13 -0
- package/types/ui/src/buttons/DangerButton.d.ts +2 -0
- package/types/ui/src/buttons/PayWithPixButton.d.ts +12 -0
- package/types/ui/src/buttons/SplitButton.d.ts +18 -0
- package/types/ui/src/buttons/__stories__/PayWithPixButton.stories.d.ts +5 -0
- package/types/ui/src/buttons/getLoadingIconProp.d.ts +3 -0
- package/types/ui/src/buttons/stories/ActionButton.stories.d.ts +12 -0
- package/types/ui/src/buttons/stories/SplitButton.stories.d.ts +3 -0
- package/types/ui/src/card/Card.d.ts +16 -0
- package/types/ui/src/card/CardActions.d.ts +3 -0
- package/types/ui/src/card/CardContent.d.ts +6 -0
- package/types/ui/src/card/CardForm.d.ts +9 -0
- package/types/ui/src/card/CardList.d.ts +13 -0
- package/types/ui/src/card/CardRadio.d.ts +0 -0
- package/types/ui/src/card/CardSkeleton.d.ts +2 -0
- package/types/ui/src/card/CardWithLink.d.ts +8 -0
- package/types/ui/src/card/CardWithLinkSkeleton.d.ts +2 -0
- package/types/ui/src/card/basicContext/CardBasicContext.d.ts +35 -0
- package/types/ui/src/card/cardWithActions/CardFooter.d.ts +3 -0
- package/types/ui/src/card/cardWithActions/CardHeader.d.ts +6 -0
- package/types/ui/src/card/cardWithActions/CardWithActions.d.ts +27 -0
- package/types/ui/src/card/cardWithActions/CardWithActions.stories.d.ts +6 -0
- package/types/ui/src/card/stories/Card.stories.d.ts +9 -0
- package/types/ui/src/card/stories/CardContent.stories.d.ts +4 -0
- package/types/ui/src/card/stories/CardForm.stories.d.ts +5 -0
- package/types/ui/src/card/stories/CardWithLink.stories.d.ts +5 -0
- package/types/ui/src/cardAnalytics/CardAnalytics.d.ts +11 -0
- package/types/ui/src/cardAnalytics/CardAnalytics.stories.d.ts +5 -0
- package/types/ui/src/cardAnalytics/CardAnalyticsSkeleton.d.ts +2 -0
- package/types/ui/src/cardGrid/CardField.d.ts +9 -0
- package/types/ui/src/cardGrid/CardFieldCentered.d.ts +8 -0
- package/types/ui/src/cardGrid/CardGrid.d.ts +12 -0
- package/types/ui/src/cardGrid/CardGrid.stories.d.ts +8 -0
- package/types/ui/src/cardGrid/Grid.d.ts +12 -0
- package/types/ui/src/cardWithImage/CardWithImage.d.ts +9 -0
- package/types/ui/src/cardWithImage/__stories__/CardWithImage.stories.d.ts +4 -0
- package/types/ui/src/code/Code.d.ts +7 -0
- package/types/ui/src/code/Code.stories.d.ts +3 -0
- package/types/ui/src/collapsible/Collapse.d.ts +7 -0
- package/types/ui/src/collapsible/Collapsible.d.ts +59 -0
- package/types/ui/src/collapsible/CollapsibleActions.d.ts +6 -0
- package/types/ui/src/collapsible/CollapsibleDetails.d.ts +7 -0
- package/types/ui/src/collapsible/CollapsibleFillWrapper.d.ts +1 -0
- package/types/ui/src/collapsible/CollapsibleGroup.d.ts +2 -0
- package/types/ui/src/collapsible/CollapsibleInfinityActions.d.ts +57 -0
- package/types/ui/src/collapsible/CollapsiblePanelActions.d.ts +3 -0
- package/types/ui/src/collapsible/CollapsibleStep.d.ts +15 -0
- package/types/ui/src/collapsible/CollapsibleStepHeader.d.ts +11 -0
- package/types/ui/src/collapsible/CollapsibleSummary.d.ts +9 -0
- package/types/ui/src/collapsible/CollapsibleTree.d.ts +12 -0
- package/types/ui/src/collapsible/ExpandMoreIcon.d.ts +7 -0
- package/types/ui/src/collapsible/LeafCollapsible.d.ts +5 -0
- package/types/ui/src/collapsible/TransparencyCollapsibleWrapper.d.ts +2 -0
- package/types/ui/src/collapsible/stories/CollapisbleStep.stories.d.ts +8 -0
- package/types/ui/src/collapsible/stories/Collapse.stories.d.ts +4 -0
- package/types/ui/src/collapsible/stories/Collapsible.stories.d.ts +13 -0
- package/types/ui/src/collapsible/stories/CollapsibleGroup.stories.d.ts +4 -0
- package/types/ui/src/collapsible/stories/CollapsibleOld.stories.d.ts +50 -0
- package/types/ui/src/collapsible/stories/CollapsibleStepHeader.stories.d.ts +5 -0
- package/types/ui/src/company/CompanyLogo.d.ts +15 -0
- package/types/ui/src/company/stories/CompanyLogo.stories.d.ts +5 -0
- package/types/ui/src/content/ActionMargin.d.ts +7 -0
- package/types/ui/src/content/ActionMargin.stories.d.ts +3 -0
- package/types/ui/src/content/ActionMarginText.d.ts +2 -0
- package/types/ui/src/content/Content.d.ts +6 -0
- package/types/ui/src/content/IntroText.d.ts +6 -0
- package/types/ui/src/countdown/Countdown.d.ts +5 -0
- package/types/ui/src/countdown/Countdown.stories.d.ts +5 -0
- package/types/ui/src/countdown/ShowCounter.d.ts +8 -0
- package/types/ui/src/countdown/useCountdown.d.ts +2 -0
- package/types/ui/src/datagrid/DataGrid.d.ts +14 -0
- package/types/ui/src/datagrid/DataGrid.stories.d.ts +3 -0
- package/types/ui/src/datagrid/DataGridDetailContainer.d.ts +6 -0
- package/types/ui/src/datagrid/DataGridRow.d.ts +10 -0
- package/types/ui/src/datagrid/cellTypeBasisToPercentage.d.ts +2 -0
- package/types/ui/src/datagrid/cellTypeBoolean.d.ts +6 -0
- package/types/ui/src/datagrid/cellTypeCurrency.d.ts +2 -0
- package/types/ui/src/datagrid/cellTypeDate.d.ts +2 -0
- package/types/ui/src/datagrid/cellTypeDatetime.d.ts +2 -0
- package/types/ui/src/datagrid/cellTypeDatetimeSeconds.d.ts +2 -0
- package/types/ui/src/datagrid/cellTypeExpand.d.ts +45 -0
- package/types/ui/src/datagrid/cellTypeLink.d.ts +2 -0
- package/types/ui/src/datagrid/cellTypePhone.d.ts +2 -0
- package/types/ui/src/datagrid/cellTypeTag.d.ts +2 -0
- package/types/ui/src/datagrid/cellTypeTaxID.d.ts +2 -0
- package/types/ui/src/datagrid/cellTypeTime.d.ts +2 -0
- package/types/ui/src/datagrid/columnTypes.d.ts +11 -0
- package/types/ui/src/datagrid/useTableView.d.ts +8 -0
- package/types/ui/src/deprecated/VirtualizedMobileList.d.ts +8 -0
- package/types/ui/src/deprecated/VirtualizedTable.d.ts +3 -0
- package/types/ui/src/deprecated/VirtualizedTableHeader.d.ts +8 -0
- package/types/ui/src/device/Phone.d.ts +6 -0
- package/types/ui/src/device/Phone.stories.d.ts +4 -0
- package/types/ui/src/dialog/DialogContext.d.ts +18 -0
- package/types/ui/src/dialog/DialogProvider.d.ts +7 -0
- package/types/ui/src/dialog/index.d.ts +5 -0
- package/types/ui/src/dialog/useDialog.d.ts +5 -0
- package/types/ui/src/drawer/DrawerCard.d.ts +11 -0
- package/types/ui/src/drawer/DrawerResponsiveWrapper.d.ts +1 -0
- package/types/ui/src/drawer/swipable/SwipeableDrawer.d.ts +8 -0
- package/types/ui/src/drawer/swipable/SwipeableDrawer.stories.d.ts +3 -0
- package/types/ui/src/error/ErrorBoundaryWithRetry.d.ts +26 -0
- package/types/ui/src/error/ErrorView.d.ts +9 -0
- package/types/ui/src/file/FileDrop.d.ts +12 -0
- package/types/ui/src/file/MaterialIcon.d.ts +14 -0
- package/types/ui/src/filter/Filter.d.ts +15 -0
- package/types/ui/src/filter/FilterRelayFormik.d.ts +26 -0
- package/types/ui/src/filter/FormikFilter.d.ts +9 -0
- package/types/ui/src/filter/decodeQueryParamsFromLocation.d.ts +2 -0
- package/types/ui/src/filter/fieldToParamConfigMap.d.ts +2 -0
- package/types/ui/src/filter/formatFilterValue.d.ts +1 -0
- package/types/ui/src/filter/formatFilters.d.ts +1 -0
- package/types/ui/src/filter/isValidDatetime.d.ts +1 -0
- package/types/ui/src/filter/orderBy/OrderBySelect.d.ts +15 -0
- package/types/ui/src/filter/stringToBoolean.d.ts +1 -0
- package/types/ui/src/filter/useFilterFormik.d.ts +91 -0
- package/types/ui/src/form/FieldRow.d.ts +6 -0
- package/types/ui/src/form/__stories__/FieldRow.stories.d.ts +3 -0
- package/types/ui/src/heading/SectionHeading.d.ts +6 -0
- package/types/ui/src/heading/__stories__/SectionHeading.stories.d.ts +4 -0
- package/types/ui/src/helpers/Divider.d.ts +8 -0
- package/types/ui/src/helpers/HorizontalStack.d.ts +3 -0
- package/types/ui/src/helpers/HoverPopper.d.ts +10 -0
- package/types/ui/src/helpers/stories/HorizontalStack.stories.d.ts +5 -0
- package/types/ui/src/helpers.d.ts +10 -0
- package/types/ui/src/icons/AssineOnlineIcon.d.ts +14 -0
- package/types/ui/src/icons/BotConversaIcon.d.ts +14 -0
- package/types/ui/src/icons/CheckIconLabel.d.ts +5 -0
- package/types/ui/src/icons/CheckboxChecked.d.ts +7 -0
- package/types/ui/src/icons/CheckboxIndeterminate.d.ts +14 -0
- package/types/ui/src/icons/CheckboxUnchecked.d.ts +14 -0
- package/types/ui/src/icons/Icon.d.ts +3 -0
- package/types/ui/src/icons/N8nIcon.d.ts +13 -0
- package/types/ui/src/icons/NuvemshopIcon.d.ts +14 -0
- package/types/ui/src/icons/RightTopDiagonalVector.d.ts +4 -0
- package/types/ui/src/icons/SVG.d.ts +32 -0
- package/types/ui/src/icons/SocPanelIcon.d.ts +12 -0
- package/types/ui/src/icons/WabizIcon.d.ts +13 -0
- package/types/ui/src/icons/WakeIcon.d.ts +14 -0
- package/types/ui/src/import/Dropzone.d.ts +2 -0
- package/types/ui/src/import/DropzoneFile.d.ts +19 -0
- package/types/ui/src/import/xlsx/Import.d.ts +19 -0
- package/types/ui/src/import/xlsx/ImportDropzone.d.ts +15 -0
- package/types/ui/src/import/xlsx/ImportProcessData.d.ts +7 -0
- package/types/ui/src/import/xlsx/ImportProcessQueue.d.ts +20 -0
- package/types/ui/src/import/xlsx/ImportStepper.d.ts +23 -0
- package/types/ui/src/import/xlsx/ImportTable.d.ts +7 -0
- package/types/ui/src/import/xlsx/ImportUtils.d.ts +89 -0
- package/types/ui/src/index.d.ts +212 -0
- package/types/ui/src/layoutWrapper/LayoutWrapper.d.ts +8 -0
- package/types/ui/src/layoutWrapper/LayoutWrapperFluid.d.ts +8 -0
- package/types/ui/src/logo/OpenPixLogoColor.d.ts +7 -0
- package/types/ui/src/logo/WooviLogo.d.ts +7 -0
- package/types/ui/src/mui/BoxFlex.d.ts +10 -0
- package/types/ui/src/mui/Typography.d.ts +3 -0
- package/types/ui/src/mui/__stories__/Typography.stories.d.ts +3 -0
- package/types/ui/src/mui/__stories__/TypographyExample.d.ts +2 -0
- package/types/ui/src/multifactor/MultiFactorConfirmModal.d.ts +11 -0
- package/types/ui/src/multifactor/__stories__/MultiFactorConfirmModal.stories.d.ts +5 -0
- package/types/ui/src/openpix/charge/ChargeTagStatus.d.ts +11 -0
- package/types/ui/src/openpix/images/GiftbackEnvelopeSvg.d.ts +6 -0
- package/types/ui/src/openpix/images/WooviLogoInMobile.d.ts +4 -0
- package/types/ui/src/openpix/order/CheckIcon.d.ts +2 -0
- package/types/ui/src/openpix/order/ConfirmedIcon.d.ts +2 -0
- package/types/ui/src/openpix/order/EarnCashback.d.ts +6 -0
- package/types/ui/src/openpix/order/EarnCashbackExclusive.d.ts +6 -0
- package/types/ui/src/openpix/order/GiftbackRedeem.d.ts +5 -0
- package/types/ui/src/openpix/order/PayPixValueCompany.d.ts +7 -0
- package/types/ui/src/openpix/order/PixPaymentWoovi.d.ts +6 -0
- package/types/ui/src/openpix/order/RedeemCashbackExclusiveScheduled.d.ts +6 -0
- package/types/ui/src/openpix/order/ShopperSeeMyGiftback.d.ts +8 -0
- package/types/ui/src/openpix/order/__generated__/RedeemCashbackExclusiveScheduled_charge.graphql.d.ts +19 -0
- package/types/ui/src/openpix/order/discount/EarnDiscount.d.ts +6 -0
- package/types/ui/src/openpix/order/giftback/EarnGiftback.d.ts +6 -0
- package/types/ui/src/openpix/order/giftback/GiftbackRule.d.ts +6 -0
- package/types/ui/src/openpix/paymentLink/AdditionalInfo.d.ts +12 -0
- package/types/ui/src/openpix/paymentLink/BrCodeInput.d.ts +5 -0
- package/types/ui/src/openpix/paymentLink/ChargeInfo.d.ts +7 -0
- package/types/ui/src/openpix/paymentLink/CopyQRCode.d.ts +6 -0
- package/types/ui/src/openpix/paymentLink/CopyQRCode.stories.d.ts +3 -0
- package/types/ui/src/openpix/paymentLink/ErrorIcon.d.ts +2 -0
- package/types/ui/src/openpix/paymentLink/InfoSide.d.ts +7 -0
- package/types/ui/src/openpix/paymentLink/InterestsInfo.d.ts +11 -0
- package/types/ui/src/openpix/paymentLink/NotFound.d.ts +2 -0
- package/types/ui/src/openpix/paymentLink/PaymentDeleted.d.ts +30 -0
- package/types/ui/src/openpix/paymentLink/PaymentExpired.d.ts +35 -0
- package/types/ui/src/openpix/paymentLink/PaymentFooter.d.ts +5 -0
- package/types/ui/src/openpix/paymentLink/PaymentLink.d.ts +15 -0
- package/types/ui/src/openpix/paymentLink/PaymentLink.stories.d.ts +4 -0
- package/types/ui/src/openpix/paymentLink/PaymentLinkActive.d.ts +8 -0
- package/types/ui/src/openpix/paymentLink/PaymentLinkTestAccountBanner.d.ts +6 -0
- package/types/ui/src/openpix/paymentLink/PaymentLinkWrapper.d.ts +8 -0
- package/types/ui/src/openpix/paymentLink/PaymentLogo.d.ts +7 -0
- package/types/ui/src/openpix/paymentLink/QrCodeResponsive.d.ts +12 -0
- package/types/ui/src/openpix/paymentLink/QrCodeSectionHeaderInfo.d.ts +2 -0
- package/types/ui/src/openpix/paymentLink/QrCodeShowButton.d.ts +6 -0
- package/types/ui/src/openpix/paymentLink/QrCodeSide.d.ts +10 -0
- package/types/ui/src/openpix/paymentLink/ShareButton.d.ts +9 -0
- package/types/ui/src/openpix/paymentLink/__generated__/PaymentLinkActive_charge.graphql.d.ts +17 -0
- package/types/ui/src/openpix/paymentLink/__generated__/PaymentLink_charge.graphql.d.ts +17 -0
- package/types/ui/src/openpix/paymentLink/__generated__/QrCodeSide_charge.graphql.d.ts +17 -0
- package/types/ui/src/openpix/paymentLink/types/ChargeDataType.d.ts +106 -0
- package/types/ui/src/openpix/paymentSuccess/PaymentSuccess.d.ts +17 -0
- package/types/ui/src/openpix/paymentSuccess/PaymentSuccessRewards.d.ts +8 -0
- package/types/ui/src/openpix/paymentSuccess/__generated__/PaymentSuccessRewards_charge.graphql.d.ts +55 -0
- package/types/ui/src/openpix/paymentSuccess/__generated__/PaymentSuccess_charge.graphql.d.ts +17 -0
- package/types/ui/src/openpix/shopper/WooviAuthForm.d.ts +21 -0
- package/types/ui/src/openpix/transaction/PixTransactionTypeTag.d.ts +6 -0
- package/types/ui/src/paymentLinkRow/PaymentLinkRow.d.ts +9 -0
- package/types/ui/src/paymentLinkRow/__stories__/PaymentLinkRow.stories.d.ts +7 -0
- package/types/ui/src/pinInput/PinInput.d.ts +62 -0
- package/types/ui/src/pinInput/PinInput.stories.d.ts +6 -0
- package/types/ui/src/pinInput/PinInputFormik.d.ts +6 -0
- package/types/ui/src/pinInput/createPinArray.d.ts +1 -0
- package/types/ui/src/pinInput/pinInputRegex.d.ts +4 -0
- package/types/ui/src/relay/RefreshButtonRelay.d.ts +8 -0
- package/types/ui/src/relay/RefreshIconButton.d.ts +5 -0
- package/types/ui/src/relay/SearchInputRelay.d.ts +17 -0
- package/types/ui/src/relay/TopPagination.d.ts +9 -0
- package/types/ui/src/rewardTicket/RewardTicket.d.ts +8 -0
- package/types/ui/src/rewardTicket/__stories__/RewardTicket.stories.d.ts +5 -0
- package/types/ui/src/ribbon/Ribbon.d.ts +7 -0
- package/types/ui/src/ribbon/__stories__/Ribbon.stories.d.ts +4 -0
- package/types/ui/src/root/ContentBoundary.d.ts +4 -0
- package/types/ui/src/routed/RoutedTabs.d.ts +19 -0
- package/types/ui/src/routed/TabbedContent.d.ts +8 -0
- package/types/ui/src/screenHeader/ScreenHeader.stories.d.ts +9 -0
- package/types/ui/src/screenHeader/ScreenHeaderUI.d.ts +14 -0
- package/types/ui/src/screenHeader/components/ScreenHeaderSubtitle.d.ts +2 -0
- package/types/ui/src/screenHeader/components/ScreenHeaderTitle.d.ts +6 -0
- package/types/ui/src/screenHeaderCard/ScreenHeaderCard.d.ts +12 -0
- package/types/ui/src/screenHeaderCard/ScreenHeaderCard.stories.d.ts +5 -0
- package/types/ui/src/search/GlobalSearchField.d.ts +12 -0
- package/types/ui/src/select/Select.d.ts +7 -0
- package/types/ui/src/select/SelectAll.d.ts +13 -0
- package/types/ui/src/select/__stories__/Select.stories.d.ts +7 -0
- package/types/ui/src/sidebar/Group.d.ts +7 -0
- package/types/ui/src/sidebar/Item.d.ts +7 -0
- package/types/ui/src/sidebar/MenuList.d.ts +13 -0
- package/types/ui/src/sidebar/Sidebar.d.ts +14 -0
- package/types/ui/src/sidebar/Sidebar.stories.d.ts +5 -0
- package/types/ui/src/sidebar/SidebarContext.d.ts +9 -0
- package/types/ui/src/sidebar/index.d.ts +6 -0
- package/types/ui/src/sidebar/useSidebar.d.ts +7 -0
- package/types/ui/src/sidebar/utils.d.ts +2 -0
- package/types/ui/src/snackbar/Snackbar.d.ts +6 -0
- package/types/ui/src/snackbar/SnackbarContext.d.ts +15 -0
- package/types/ui/src/snackbar/fixtures/ShowSnackbar.d.ts +2 -0
- package/types/ui/src/snackbar/index.d.ts +5 -0
- package/types/ui/src/snackbar/useSnackbar.d.ts +6 -0
- package/types/ui/src/statement/TransactionTypeText.d.ts +2 -0
- package/types/ui/src/statement/statementColors.d.ts +3 -0
- package/types/ui/src/stepper/Stepper.d.ts +9 -0
- package/types/ui/src/stepper/Stepper.stories.d.ts +3 -0
- package/types/ui/src/swipeableModal/SwipeableModal.d.ts +12 -0
- package/types/ui/src/swipeableModal/SwipeableModal.stories.d.ts +3 -0
- package/types/ui/src/swipeableModal/SwipeableModalTransition.d.ts +7 -0
- package/types/ui/src/table/CardColumn.d.ts +9 -0
- package/types/ui/src/table/CardListVirtualized.d.ts +20 -0
- package/types/ui/src/table/TableToggleViewModel.d.ts +6 -0
- package/types/ui/src/table/cells/ActionCellNode.d.ts +5 -0
- package/types/ui/src/table/cells/Cell.d.ts +9 -0
- package/types/ui/src/table/cells/CheckboxCellNode.d.ts +15 -0
- package/types/ui/src/table/cells/IconCellNode.d.ts +5 -0
- package/types/ui/src/table/cells/LinkCellNode.d.ts +7 -0
- package/types/ui/src/table/cells/cellTypes.d.ts +15 -0
- package/types/ui/src/table/cells/getCellCurrency.d.ts +3 -0
- package/types/ui/src/table/cells/getCellDate.d.ts +8 -0
- package/types/ui/src/table/cells/getCellLink.d.ts +3 -0
- package/types/ui/src/table/cells/getCellValue.d.ts +1 -0
- package/types/ui/src/table/cells/index.d.ts +1 -0
- package/types/ui/src/table/stories/TableToggleViewModel.stories.d.ts +3 -0
- package/types/ui/src/tag/Tag.d.ts +9 -0
- package/types/ui/src/tag/TagsContainer.d.ts +6 -0
- package/types/ui/src/tag/stories/Tag.stories.d.ts +10 -0
- package/types/ui/src/term/Terms.d.ts +1 -0
- package/types/ui/src/term/TermsLink.d.ts +1 -0
- package/types/ui/src/term/TermsModal.d.ts +12 -0
- package/types/ui/src/term/TermsModal.stories.d.ts +3 -0
- package/types/ui/src/term/useTerms.d.ts +5 -0
- package/types/ui/src/text/TextMultiline.d.ts +6 -0
- package/types/ui/src/textDialog/TextDialog.d.ts +8 -0
- package/types/ui/src/theme/Themes.d.ts +22 -0
- package/types/ui/src/theme/stories/Theme.stories.d.ts +3 -0
- package/types/ui/src/theme/stories/ThemeExample.d.ts +2 -0
- package/types/ui/src/timeline/Timeline.d.ts +6 -0
- package/types/ui/src/timeline/TimelineAppEventDomainIcon.d.ts +3 -0
- package/types/ui/src/timeline/TimelineAppEventItem.d.ts +9 -0
- package/types/ui/src/timeline/TimelineAppEventTypeColor.d.ts +3 -0
- package/types/ui/src/timeline/TimelineItem.d.ts +11 -0
- package/types/ui/src/timeline/__stories__/Timeline.stories.d.ts +3 -0
- package/types/ui/src/timeline/__stories__/TimelineAppEvent.stories.d.ts +3 -0
- package/types/ui/src/unSupportedBrowser/UnsupportedBrowserWarning.d.ts +2 -0
- package/types/ui/src/unSupportedBrowser/index.d.ts +2 -0
- package/types/ui/src/unSupportedBrowser/isUnSupportedBrowser.d.ts +4 -0
- package/types/ui/src/user/chip/UserChip.d.ts +6 -0
- package/types/ui/src/user/chip/stories/UserChip.stories.d.ts +4 -0
- package/types/ui/src/utils/BrowserOnly.d.ts +7 -0
- package/types/ui/src/utils/DesktopOnly.d.ts +8 -0
- package/types/ui/src/utils/MobileOnly.d.ts +8 -0
- package/types/ui/src/windowPopper/WindowPopper.d.ts +16 -0
- package/types/ui/src/windowPopper/WindowPopper.stories.d.ts +3 -0
- package/types/ui/src/windowPopper/WindowPopperTransition.d.ts +7 -0
- package/types/ui/test/convertHtmlToImage.d.ts +1 -0
- package/types/ui/test/testUtils.d.ts +9 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Message, ReceiptLong } from '@mui/icons-material';
|
|
2
|
+
import type { Meta } from '@storybook/react/types-6-0';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import { Timeline } from '../Timeline';
|
|
6
|
+
import { TimelineAppEventItem } from '../TimelineAppEventItem';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'UI/Timeline/AppEvent',
|
|
10
|
+
component: Timeline,
|
|
11
|
+
} as Meta;
|
|
12
|
+
|
|
13
|
+
export const SolidWithAppEvent = () => {
|
|
14
|
+
return (
|
|
15
|
+
<Timeline>
|
|
16
|
+
<TimelineAppEventItem
|
|
17
|
+
title='Charge Completed'
|
|
18
|
+
time={new Date('2022-11-25')}
|
|
19
|
+
icon={<ReceiptLong fontSize='small' />}
|
|
20
|
+
isFirstItem
|
|
21
|
+
/>
|
|
22
|
+
<TimelineAppEventItem
|
|
23
|
+
title='Charge Viewed'
|
|
24
|
+
time={new Date('2022-11-24')}
|
|
25
|
+
icon={<ReceiptLong fontSize='small' />}
|
|
26
|
+
color='info'
|
|
27
|
+
/>
|
|
28
|
+
<TimelineAppEventItem
|
|
29
|
+
title='SMS Sent'
|
|
30
|
+
color='success'
|
|
31
|
+
time={new Date('2022-11-23')}
|
|
32
|
+
icon={<Message fontSize='small' />}
|
|
33
|
+
onClick={() => ''}
|
|
34
|
+
/>
|
|
35
|
+
<TimelineAppEventItem
|
|
36
|
+
title='Charge Created'
|
|
37
|
+
time={new Date('2022-11-23')}
|
|
38
|
+
icon={<ReceiptLong fontSize='small' />}
|
|
39
|
+
isLastItem
|
|
40
|
+
/>
|
|
41
|
+
</Timeline>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import Card from '../card/Card';
|
|
5
|
+
|
|
6
|
+
const BlankPageWrapper = styled.div`
|
|
7
|
+
position: fixed;
|
|
8
|
+
top: 0;
|
|
9
|
+
bottom: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
const CenteredCard = styled(Card)`
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
align-items: center;
|
|
21
|
+
height: auto;
|
|
22
|
+
padding: 20px 60px;
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
const CardHeader = styled.h1`
|
|
26
|
+
font-weight: normal;
|
|
27
|
+
text-align: center;
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
const BrowserIcons = styled.ul`
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
width: 100%;
|
|
34
|
+
max-width: 500px;
|
|
35
|
+
margin: 20px 0;
|
|
36
|
+
padding: 0;
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
const BrowserIconsListItem = styled.li`
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
list-style-type: none;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
align-items: center;
|
|
44
|
+
`;
|
|
45
|
+
|
|
46
|
+
const Anchor = styled.a`
|
|
47
|
+
text-decoration: none;
|
|
48
|
+
color: inherit;
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
const UnsupportedBrowserWarning = () => {
|
|
52
|
+
const { t } = useTranslation();
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<BlankPageWrapper>
|
|
56
|
+
<CenteredCard>
|
|
57
|
+
<CardHeader>{t('Browser not supported.')}</CardHeader>
|
|
58
|
+
<BrowserIcons>
|
|
59
|
+
<BrowserIconsListItem>
|
|
60
|
+
<Anchor href='https://www.mozilla.org/en-US/firefox/new/'>
|
|
61
|
+
Firefox
|
|
62
|
+
</Anchor>
|
|
63
|
+
</BrowserIconsListItem>
|
|
64
|
+
<BrowserIconsListItem>
|
|
65
|
+
<Anchor href='https://www.google.com/chrome/'>Chrome</Anchor>
|
|
66
|
+
</BrowserIconsListItem>
|
|
67
|
+
<BrowserIconsListItem>
|
|
68
|
+
<Anchor href='https://www.microsoft.com/en-us/windows/microsoft-edge'>
|
|
69
|
+
Edge
|
|
70
|
+
</Anchor>
|
|
71
|
+
</BrowserIconsListItem>
|
|
72
|
+
</BrowserIcons>
|
|
73
|
+
</CenteredCard>
|
|
74
|
+
</BlankPageWrapper>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export default UnsupportedBrowserWarning;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// https://stackoverflow.com/a/9851769
|
|
2
|
+
export const browserDetectors = {
|
|
3
|
+
isIE: () => false || !!document.documentMode,
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export const isUnSupportedBrowser = (): boolean => {
|
|
7
|
+
// enable any browser in staging
|
|
8
|
+
if (process.env.APP_ENV === 'staging') {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const unsupportedBrowsers = [browserDetectors.isIE];
|
|
13
|
+
|
|
14
|
+
return !!unsupportedBrowsers.find((checker) => checker());
|
|
15
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Chip from '@mui/material/Chip';
|
|
2
|
+
import { formatToCPF } from 'brazilian-values';
|
|
3
|
+
|
|
4
|
+
import { isSafeCPF } from '@woovi/utils';
|
|
5
|
+
|
|
6
|
+
import Avatar from '../../avatar/Avatar';
|
|
7
|
+
|
|
8
|
+
export type UserChipProps = {
|
|
9
|
+
label: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const UserChip = ({ label, name }: UserChipProps) => {
|
|
14
|
+
return (
|
|
15
|
+
<Chip
|
|
16
|
+
size='medium'
|
|
17
|
+
variant='outlined'
|
|
18
|
+
avatar={<Avatar name={name} size={20} />}
|
|
19
|
+
label={isSafeCPF(label) ? formatToCPF(label) : label}
|
|
20
|
+
sx={{ fontSize: '14px', backgroundColor: 'transparent' }}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default UserChip;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
|
+
|
|
3
|
+
import type { UserChipProps } from '../UserChip';
|
|
4
|
+
import UserChip from '../UserChip';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Ui/UserChip',
|
|
8
|
+
component: UserChip,
|
|
9
|
+
name: {
|
|
10
|
+
control: 'text',
|
|
11
|
+
},
|
|
12
|
+
label: {
|
|
13
|
+
control: 'text',
|
|
14
|
+
},
|
|
15
|
+
parameters: {
|
|
16
|
+
layout: 'centered',
|
|
17
|
+
},
|
|
18
|
+
} as Meta;
|
|
19
|
+
|
|
20
|
+
const Template: Story<UserChipProps> = (args) => <UserChip {...args} />;
|
|
21
|
+
|
|
22
|
+
export const Example = Template.bind({});
|
|
23
|
+
Example.args = { label: 'user@woovi.com', name: 'User Name' };
|
|
24
|
+
|
|
25
|
+
export const WithCPF = Template.bind({});
|
|
26
|
+
WithCPF.args = { label: '26602647407', name: 'User Name' };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
type BrowserOnlyProps = {
|
|
4
|
+
loading?: React.ReactNode;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const BrowserOnly = ({ children, loading = null }: BrowserOnlyProps) => {
|
|
9
|
+
const [show, setShow] = useState(false);
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (typeof window === typeof undefined) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
setShow(true);
|
|
17
|
+
}, []);
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
20
|
+
return <>{show ? children : loading}</>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SxProps } from '@mui/material';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
|
|
4
|
+
import BoxFlex from '../mui/BoxFlex';
|
|
5
|
+
|
|
6
|
+
type DesktopOnlyProps = {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
sx?: SxProps;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const DesktopOnly = forwardRef<HTMLDivElement, DesktopOnlyProps>(
|
|
12
|
+
({ children, sx }, ref) => {
|
|
13
|
+
return (
|
|
14
|
+
<BoxFlex
|
|
15
|
+
ref={ref}
|
|
16
|
+
sx={{
|
|
17
|
+
'@media (max-width: 600px)': {
|
|
18
|
+
display: 'none',
|
|
19
|
+
},
|
|
20
|
+
...sx,
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
</BoxFlex>
|
|
25
|
+
);
|
|
26
|
+
},
|
|
27
|
+
);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SxProps } from '@mui/material';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
|
|
4
|
+
import BoxFlex from '../mui/BoxFlex';
|
|
5
|
+
|
|
6
|
+
type MobileOnlyProps = {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
sx?: SxProps;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const MobileOnly = forwardRef<HTMLDivElement, MobileOnlyProps>(
|
|
12
|
+
({ children, sx }, ref) => {
|
|
13
|
+
return (
|
|
14
|
+
<BoxFlex
|
|
15
|
+
ref={ref}
|
|
16
|
+
sx={{
|
|
17
|
+
'@media (min-width: 600px)': {
|
|
18
|
+
display: 'none',
|
|
19
|
+
},
|
|
20
|
+
...sx,
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
</BoxFlex>
|
|
25
|
+
);
|
|
26
|
+
},
|
|
27
|
+
);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import TextField from '@mui/material/TextField';
|
|
2
|
+
import type { Meta } from '@storybook/react/types-6-0';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
|
|
5
|
+
import { WindowPopper } from './WindowPopper';
|
|
6
|
+
import ActionButton from '../buttons/ActionButton';
|
|
7
|
+
import BoxFlex from '../mui/BoxFlex';
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: 'WindowPopper',
|
|
11
|
+
component: WindowPopper,
|
|
12
|
+
} as Meta;
|
|
13
|
+
|
|
14
|
+
export const Default = () => {
|
|
15
|
+
const [open, setOpen] = useState(false);
|
|
16
|
+
|
|
17
|
+
const handleOpen = () => setOpen(!open);
|
|
18
|
+
const handleClose = () => setOpen(false);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<BoxFlex>
|
|
22
|
+
<ActionButton onClick={handleOpen}>Open WindowPopper</ActionButton>
|
|
23
|
+
<WindowPopper
|
|
24
|
+
y={40}
|
|
25
|
+
minWidth={200}
|
|
26
|
+
height={400}
|
|
27
|
+
open={open}
|
|
28
|
+
onClose={handleClose}
|
|
29
|
+
title='Window Popper'
|
|
30
|
+
cancelDragOnContent
|
|
31
|
+
>
|
|
32
|
+
<BoxFlex
|
|
33
|
+
sx={{
|
|
34
|
+
boxSizing: 'border-box',
|
|
35
|
+
flexDirection: 'column',
|
|
36
|
+
height: '100%',
|
|
37
|
+
width: '100%',
|
|
38
|
+
p: 2,
|
|
39
|
+
gap: 1,
|
|
40
|
+
overflow: 'auto',
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
<TextField name='textfield1' label='TextField1' fullWidth />
|
|
44
|
+
<TextField name='textfield2' label='TextField2' fullWidth />
|
|
45
|
+
<TextField name='textfield3' label='TextField3' fullWidth />
|
|
46
|
+
<TextField name='textfield4' label='TextField4' fullWidth />
|
|
47
|
+
<ActionButton fullWidth>Submit</ActionButton>
|
|
48
|
+
</BoxFlex>
|
|
49
|
+
</WindowPopper>
|
|
50
|
+
</BoxFlex>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import Box from '@mui/material/Box';
|
|
2
|
+
import Divider from '@mui/material/Divider';
|
|
3
|
+
import IconButton from '@mui/material/IconButton';
|
|
4
|
+
import { useTheme } from '@mui/material/styles';
|
|
5
|
+
import Typography from '@mui/material/Typography';
|
|
6
|
+
import { GridCloseIcon } from '@mui/x-data-grid-pro';
|
|
7
|
+
import { Rnd } from 'react-rnd';
|
|
8
|
+
|
|
9
|
+
import { WindowPopperTransition } from './WindowPopperTransition';
|
|
10
|
+
import BoxFlex from '../mui/BoxFlex';
|
|
11
|
+
|
|
12
|
+
type WindowPopperProps = {
|
|
13
|
+
open: boolean;
|
|
14
|
+
title: string;
|
|
15
|
+
onClose: () => void;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
width?: number;
|
|
18
|
+
height?: number;
|
|
19
|
+
minWidth?: number;
|
|
20
|
+
minHeight?: number;
|
|
21
|
+
x?: number;
|
|
22
|
+
y?: number;
|
|
23
|
+
cancelDragOnContent?: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const WindowPopper = ({
|
|
27
|
+
open,
|
|
28
|
+
onClose,
|
|
29
|
+
title,
|
|
30
|
+
children,
|
|
31
|
+
cancelDragOnContent = false,
|
|
32
|
+
x = 0,
|
|
33
|
+
y = 0,
|
|
34
|
+
width = 500,
|
|
35
|
+
height = 500,
|
|
36
|
+
minWidth = 200,
|
|
37
|
+
minHeight = 200,
|
|
38
|
+
}: WindowPopperProps) => {
|
|
39
|
+
const theme = useTheme();
|
|
40
|
+
|
|
41
|
+
if (!open) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const getCancelDrag = () => {
|
|
46
|
+
if (!cancelDragOnContent) {
|
|
47
|
+
return {};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return { cancel: '.no-drag' };
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<Rnd
|
|
55
|
+
default={{
|
|
56
|
+
x,
|
|
57
|
+
y,
|
|
58
|
+
width,
|
|
59
|
+
height,
|
|
60
|
+
}}
|
|
61
|
+
style={{ zIndex: theme.zIndex.appBar + 1 }}
|
|
62
|
+
minWidth={minWidth}
|
|
63
|
+
minHeight={minHeight}
|
|
64
|
+
bounds='window'
|
|
65
|
+
{...getCancelDrag()}
|
|
66
|
+
>
|
|
67
|
+
<WindowPopperTransition in={open}>
|
|
68
|
+
<Box
|
|
69
|
+
sx={{
|
|
70
|
+
width: '100%',
|
|
71
|
+
height: '100%',
|
|
72
|
+
display: 'flex',
|
|
73
|
+
backgroundColor: theme.palette.background.paper,
|
|
74
|
+
boxShadow: theme.shadows[3],
|
|
75
|
+
borderRadius: '4px',
|
|
76
|
+
flexDirection: 'column',
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
79
|
+
<BoxFlex
|
|
80
|
+
sx={{
|
|
81
|
+
py: 1,
|
|
82
|
+
pl: 2,
|
|
83
|
+
pr: 1,
|
|
84
|
+
alignItems: 'center',
|
|
85
|
+
justifyContent: 'space-between',
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
88
|
+
<Typography variant='subtitle1' fontWeight={600} color='black'>
|
|
89
|
+
{title}
|
|
90
|
+
</Typography>
|
|
91
|
+
<IconButton onClick={onClose}>
|
|
92
|
+
<GridCloseIcon />
|
|
93
|
+
</IconButton>
|
|
94
|
+
</BoxFlex>
|
|
95
|
+
<Divider />
|
|
96
|
+
<Box
|
|
97
|
+
className='no-drag'
|
|
98
|
+
sx={{
|
|
99
|
+
width: '100%',
|
|
100
|
+
overflow: 'hidden',
|
|
101
|
+
}}
|
|
102
|
+
>
|
|
103
|
+
{children}
|
|
104
|
+
</Box>
|
|
105
|
+
</Box>
|
|
106
|
+
</WindowPopperTransition>
|
|
107
|
+
</Rnd>
|
|
108
|
+
);
|
|
109
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Fade } from '@mui/material';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
|
|
4
|
+
import BoxFlex from '../mui/BoxFlex';
|
|
5
|
+
|
|
6
|
+
type WindowPopperTransitionProps = {
|
|
7
|
+
in: boolean;
|
|
8
|
+
children: JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const WindowPopperTransition = forwardRef<
|
|
12
|
+
HTMLDivElement,
|
|
13
|
+
WindowPopperTransitionProps
|
|
14
|
+
>(({ children, ...props }, ref) => {
|
|
15
|
+
return (
|
|
16
|
+
<BoxFlex tabIndex={-1} ref={ref} sx={{ height: '100%', width: '100%' }}>
|
|
17
|
+
<Fade mountOnEnter unmountOnExit {...props}>
|
|
18
|
+
{children}
|
|
19
|
+
</Fade>
|
|
20
|
+
</BoxFlex>
|
|
21
|
+
);
|
|
22
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const S3 = require('aws-sdk/clients/s3');
|
|
2
|
+
const AWS = require('aws-sdk/global');
|
|
3
|
+
const chalk = require('chalk');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
|
|
6
|
+
const UPLOAD_BUCKET = 'YOUR_S3_BUCKET_NAME';
|
|
7
|
+
|
|
8
|
+
const s3 = new AWS.S3({ apiVersion: '2006-03-01' });
|
|
9
|
+
|
|
10
|
+
class ImageReporter {
|
|
11
|
+
constructor(globalConfig, options) {
|
|
12
|
+
this._globalConfig = globalConfig;
|
|
13
|
+
this._options = options;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
onTestResult(test, testResult, aggregateResults) {
|
|
17
|
+
if (testResult.numFailingTests && testResult.failureMessage.match(/different from snapshot/)) {
|
|
18
|
+
const files = fs.readdirSync('./__tests__/__image_snapshots__/__diff_output__/');
|
|
19
|
+
|
|
20
|
+
files.forEach((value) => {
|
|
21
|
+
const path = `diff_output/${value}`;
|
|
22
|
+
const params = {
|
|
23
|
+
Body: fs.readFileSync(`./__tests__/__image_snapshots__/__diff_output__/${value}`),
|
|
24
|
+
Bucket: UPLOAD_BUCKET,
|
|
25
|
+
Key: path,
|
|
26
|
+
ContentType: 'image/png',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
s3.putObject(params, (err) => {
|
|
30
|
+
if (err) {
|
|
31
|
+
console.log(err, err.stack);
|
|
32
|
+
} else {
|
|
33
|
+
console.log(chalk.red.bold(`Uploaded image diff file to https://${UPLOAD_BUCKET}.s3.amazonaws.com/${path}`));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
module.exports = ImageReporter;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { toCanvas } from 'html-to-image';
|
|
2
|
+
|
|
3
|
+
export const convertHtmlToImage = async (
|
|
4
|
+
html: string,
|
|
5
|
+
width = 100,
|
|
6
|
+
height = 100,
|
|
7
|
+
) => {
|
|
8
|
+
const canvas = document.createElement('canvas');
|
|
9
|
+
|
|
10
|
+
canvas.width = width;
|
|
11
|
+
canvas.height = height;
|
|
12
|
+
document.body.appendChild(canvas);
|
|
13
|
+
|
|
14
|
+
await toCanvas(
|
|
15
|
+
canvas,
|
|
16
|
+
{ backgroundColor: 'white', quality: 1, pixelRatio: 1, width, height },
|
|
17
|
+
document.body,
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const dataUrl = canvas.toDataURL('image/png');
|
|
21
|
+
|
|
22
|
+
document.body.removeChild(canvas);
|
|
23
|
+
|
|
24
|
+
return dataUrl;
|
|
25
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import '@testing-library/jest-dom/extend-expect';
|
|
2
|
+
import { configureToMatchImageSnapshot } from 'jest-image-snapshot';
|
|
3
|
+
import { jestPreviewConfigure } from 'jest-preview';
|
|
4
|
+
|
|
5
|
+
expect.extend({
|
|
6
|
+
toMatchImageSnapshot: configureToMatchImageSnapshot({
|
|
7
|
+
customDiffDir: '__diff_output__',
|
|
8
|
+
dumpDiffToConsole: true,
|
|
9
|
+
comparisonMethod: 'ssim',
|
|
10
|
+
// failureThreshold: 0.01,
|
|
11
|
+
failureThreshold: 0.05, // intel and arm produce different screenshots
|
|
12
|
+
failureThresholdType: 'percent',
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
jestPreviewConfigure({
|
|
17
|
+
autoPreview: true,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
window.matchMedia = jest.fn().mockImplementation((query) => {
|
|
21
|
+
return {
|
|
22
|
+
matches: true,
|
|
23
|
+
media: query,
|
|
24
|
+
onchange: null,
|
|
25
|
+
addListener: jest.fn(), // deprecated
|
|
26
|
+
removeListener: jest.fn(), // deprecated
|
|
27
|
+
addEventListener: jest.fn(),
|
|
28
|
+
removeEventListener: jest.fn(),
|
|
29
|
+
dispatchEvent: jest.fn(),
|
|
30
|
+
};
|
|
31
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { StyledEngineProvider } from '@mui/material';
|
|
2
|
+
import { ThemeProvider as MuiThemeProvider, StylesProvider } from '@mui/styles';
|
|
3
|
+
import { MemoryRouter, Route } from 'react-router-dom';
|
|
4
|
+
import { ThemeProvider } from 'styled-components';
|
|
5
|
+
|
|
6
|
+
import { ThemeMuiTheme } from '../src/theme/Themes';
|
|
7
|
+
|
|
8
|
+
type WithProviders = {
|
|
9
|
+
initialState?: Record<string, unknown>;
|
|
10
|
+
initialEntries?: string[];
|
|
11
|
+
path?: string;
|
|
12
|
+
Component: React.ComponentType;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const withProviders =
|
|
16
|
+
({ initialEntries = ['/'], path = '/', Component }: WithProviders) =>
|
|
17
|
+
(props: any) => {
|
|
18
|
+
return (
|
|
19
|
+
<StylesProvider injectFirst>
|
|
20
|
+
<ThemeProvider theme={ThemeMuiTheme}>
|
|
21
|
+
<StyledEngineProvider injectFirst>
|
|
22
|
+
<MuiThemeProvider theme={ThemeMuiTheme}>
|
|
23
|
+
<MemoryRouter initialEntries={initialEntries}>
|
|
24
|
+
<Route
|
|
25
|
+
path={path}
|
|
26
|
+
exact
|
|
27
|
+
render={(routeProps) => {
|
|
28
|
+
return <Component {...routeProps} {...props} />;
|
|
29
|
+
}}
|
|
30
|
+
/>
|
|
31
|
+
</MemoryRouter>
|
|
32
|
+
</MuiThemeProvider>
|
|
33
|
+
</StyledEngineProvider>
|
|
34
|
+
</ThemeProvider>
|
|
35
|
+
</StylesProvider>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowSyntheticDefaultImports": true,
|
|
4
|
+
"emitDecoratorMetadata": true,
|
|
5
|
+
"experimentalDecorators": true,
|
|
6
|
+
"forceConsistentCasingInFileNames": true,
|
|
7
|
+
"jsx": "react-jsx",
|
|
8
|
+
"module": "esnext",
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"moduleResolution": "node",
|
|
11
|
+
"noImplicitAny": true,
|
|
12
|
+
"outDir": "./lib",
|
|
13
|
+
"preserveConstEnums": true,
|
|
14
|
+
"target": "esnext",
|
|
15
|
+
"declaration": true,
|
|
16
|
+
"declarationDir": "./types",
|
|
17
|
+
"sourceMap": true,
|
|
18
|
+
"emitDeclarationOnly": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"resolveJsonModule": true,
|
|
21
|
+
"lib": ["esnext", "dom", "dom.iterable", "es2020.intl"],
|
|
22
|
+
"typeRoots": ["./typing/image"]
|
|
23
|
+
},
|
|
24
|
+
"exclude": ["node_modules", "**/*.spec.tsx", "./src/emails", "types"]
|
|
25
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getI18n: () => import("i18next").i18n;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type VariantTypes = 'solid' | 'outline';
|
|
3
|
+
type ColorTypes = 'primary' | 'secondary' | 'tertiary' | 'error' | 'warning' | 'info';
|
|
4
|
+
export type BannerProps = {
|
|
5
|
+
variant?: VariantTypes;
|
|
6
|
+
color?: ColorTypes;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare const Banner: import("styled-components").StyledComponent<"div", any, BannerProps, never>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: Meta;
|
|
2
|
+
export default _default;
|
|
3
|
+
export declare const Solid: () => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const Outline: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const ComplexSolid: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const ComplexOutline: () => import("react/jsx-runtime").JSX.Element;
|