@coinbase/cds-common 0.0.0 → 8.13.1
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/README.md +3 -0
- package/dts/accordion/AccordionProvider.d.ts +24 -0
- package/dts/accordion/AccordionProvider.d.ts.map +1 -0
- package/dts/accordion/__tests__/AccordionProvider.test.d.ts +2 -0
- package/dts/accordion/__tests__/AccordionProvider.test.d.ts.map +1 -0
- package/dts/animation/accordion.d.ts +4 -0
- package/dts/animation/accordion.d.ts.map +1 -0
- package/dts/animation/border.d.ts +4 -0
- package/dts/animation/border.d.ts.map +1 -0
- package/dts/animation/carousel.d.ts +8 -0
- package/dts/animation/carousel.d.ts.map +1 -0
- package/dts/animation/collapsible.d.ts +15 -0
- package/dts/animation/collapsible.d.ts.map +1 -0
- package/dts/animation/dot.d.ts +6 -0
- package/dts/animation/dot.d.ts.map +1 -0
- package/dts/animation/drawer.d.ts +20 -0
- package/dts/animation/drawer.d.ts.map +1 -0
- package/dts/animation/dropdown.d.ts +27 -0
- package/dts/animation/dropdown.d.ts.map +1 -0
- package/dts/animation/fullscreenModal.d.ts +12 -0
- package/dts/animation/fullscreenModal.d.ts.map +1 -0
- package/dts/animation/likeButton.d.ts +6 -0
- package/dts/animation/likeButton.d.ts.map +1 -0
- package/dts/animation/menu.d.ts +29 -0
- package/dts/animation/menu.d.ts.map +1 -0
- package/dts/animation/modal.d.ts +10 -0
- package/dts/animation/modal.d.ts.map +1 -0
- package/dts/animation/overlay.d.ts +6 -0
- package/dts/animation/overlay.d.ts.map +1 -0
- package/dts/animation/paddle.d.ts +7 -0
- package/dts/animation/paddle.d.ts.map +1 -0
- package/dts/animation/progress.d.ts +3 -0
- package/dts/animation/progress.d.ts.map +1 -0
- package/dts/animation/rotate.d.ts +3 -0
- package/dts/animation/rotate.d.ts.map +1 -0
- package/dts/animation/select.d.ts +4 -0
- package/dts/animation/select.d.ts.map +1 -0
- package/dts/animation/sparkline.d.ts +7 -0
- package/dts/animation/sparkline.d.ts.map +1 -0
- package/dts/animation/tabs.d.ts +5 -0
- package/dts/animation/tabs.d.ts.map +1 -0
- package/dts/animation/toast.d.ts +12 -0
- package/dts/animation/toast.d.ts.map +1 -0
- package/dts/animation/tooltip.d.ts +18 -0
- package/dts/animation/tooltip.d.ts.map +1 -0
- package/dts/cards/getCardBodySpacingProps.d.ts +5 -0
- package/dts/cards/getCardBodySpacingProps.d.ts.map +1 -0
- package/dts/color/__tests__/blendColors.test.d.ts +2 -0
- package/dts/color/__tests__/blendColors.test.d.ts.map +1 -0
- package/dts/color/__tests__/isLightOrDarkColor.test.d.ts +2 -0
- package/dts/color/__tests__/isLightOrDarkColor.test.d.ts.map +1 -0
- package/dts/color/__tests__/overrideAlpha.test.d.ts +2 -0
- package/dts/color/__tests__/overrideAlpha.test.d.ts.map +1 -0
- package/dts/color/blendColors.d.ts +21 -0
- package/dts/color/blendColors.d.ts.map +1 -0
- package/dts/color/colorToHex.d.ts +7 -0
- package/dts/color/colorToHex.d.ts.map +1 -0
- package/dts/color/darkenColor.d.ts +2 -0
- package/dts/color/darkenColor.d.ts.map +1 -0
- package/dts/color/getAccessibleForegroundGradient.d.ts +13 -0
- package/dts/color/getAccessibleForegroundGradient.d.ts.map +1 -0
- package/dts/color/getBlendedColor.d.ts +114 -0
- package/dts/color/getBlendedColor.d.ts.map +1 -0
- package/dts/color/getContrastRatio.d.ts +6 -0
- package/dts/color/getContrastRatio.d.ts.map +1 -0
- package/dts/color/getLuminance.d.ts +13 -0
- package/dts/color/getLuminance.d.ts.map +1 -0
- package/dts/color/isAccessibleColor.d.ts +18 -0
- package/dts/color/isAccessibleColor.d.ts.map +1 -0
- package/dts/color/isLightOrDarkColor.d.ts +2 -0
- package/dts/color/isLightOrDarkColor.d.ts.map +1 -0
- package/dts/color/overrideAlpha.d.ts +8 -0
- package/dts/color/overrideAlpha.d.ts.map +1 -0
- package/dts/core/theme.d.ts +286 -0
- package/dts/core/theme.d.ts.map +1 -0
- package/dts/dates/DateInputValidationError.d.ts +6 -0
- package/dts/dates/DateInputValidationError.d.ts.map +1 -0
- package/dts/dates/IntlDateFormat.d.ts +45 -0
- package/dts/dates/IntlDateFormat.d.ts.map +1 -0
- package/dts/dates/__tests__/IntlDateFormat.test.d.ts +2 -0
- package/dts/dates/__tests__/IntlDateFormat.test.d.ts.map +1 -0
- package/dts/dates/__tests__/useDateInput.test.d.ts +2 -0
- package/dts/dates/__tests__/useDateInput.test.d.ts.map +1 -0
- package/dts/dates/generateCalendarMonth.d.ts +5 -0
- package/dts/dates/generateCalendarMonth.d.ts.map +1 -0
- package/dts/dates/getISOStringLocal.d.ts +5 -0
- package/dts/dates/getISOStringLocal.d.ts.map +1 -0
- package/dts/dates/getMidnightDate.d.ts +5 -0
- package/dts/dates/getMidnightDate.d.ts.map +1 -0
- package/dts/dates/getTimesFromDatesAndRanges.d.ts +5 -0
- package/dts/dates/getTimesFromDatesAndRanges.d.ts.map +1 -0
- package/dts/dates/useDateInput.d.ts +23 -0
- package/dts/dates/useDateInput.d.ts.map +1 -0
- package/dts/dates/useDateInputValidation.d.ts +46 -0
- package/dts/dates/useDateInputValidation.d.ts.map +1 -0
- package/dts/hooks/__tests__/useFallbackShape.test.d.ts +2 -0
- package/dts/hooks/__tests__/useFallbackShape.test.d.ts.map +1 -0
- package/dts/hooks/__tests__/usePrefixedId.test.d.ts +2 -0
- package/dts/hooks/__tests__/usePrefixedId.test.d.ts.map +1 -0
- package/dts/hooks/__tests__/usePreviousValue.test.d.ts +2 -0
- package/dts/hooks/__tests__/usePreviousValue.test.d.ts.map +1 -0
- package/dts/hooks/__tests__/useRefMap.test.d.ts +2 -0
- package/dts/hooks/__tests__/useRefMap.test.d.ts.map +1 -0
- package/dts/hooks/__tests__/useSort.test.d.ts +2 -0
- package/dts/hooks/__tests__/useSort.test.d.ts.map +1 -0
- package/dts/hooks/__tests__/useTimer.test.d.ts +2 -0
- package/dts/hooks/__tests__/useTimer.test.d.ts.map +1 -0
- package/dts/hooks/useEventHandler.d.ts +3 -0
- package/dts/hooks/useEventHandler.d.ts.map +1 -0
- package/dts/hooks/useFallbackShape.d.ts +10 -0
- package/dts/hooks/useFallbackShape.d.ts.map +1 -0
- package/dts/hooks/useGroupToggler.d.ts +23 -0
- package/dts/hooks/useGroupToggler.d.ts.map +1 -0
- package/dts/hooks/useHasMounted.d.ts +2 -0
- package/dts/hooks/useHasMounted.d.ts.map +1 -0
- package/dts/hooks/useIndexCounter.d.ts +18 -0
- package/dts/hooks/useIndexCounter.d.ts.map +1 -0
- package/dts/hooks/useInputVariant.d.ts +3 -0
- package/dts/hooks/useInputVariant.d.ts.map +1 -0
- package/dts/hooks/useLogo.d.ts +26 -0
- package/dts/hooks/useLogo.d.ts.map +1 -0
- package/dts/hooks/useMergeRefs.d.ts +2 -0
- package/dts/hooks/useMergeRefs.d.ts.map +1 -0
- package/dts/hooks/usePrefixedId.d.ts +12 -0
- package/dts/hooks/usePrefixedId.d.ts.map +1 -0
- package/dts/hooks/usePreviousValue.d.ts +2 -0
- package/dts/hooks/usePreviousValue.d.ts.map +1 -0
- package/dts/hooks/usePreviousValues.d.ts +5 -0
- package/dts/hooks/usePreviousValues.d.ts.map +1 -0
- package/dts/hooks/useRefMap.d.ts +13 -0
- package/dts/hooks/useRefMap.d.ts.map +1 -0
- package/dts/hooks/useSort.d.ts +19 -0
- package/dts/hooks/useSort.d.ts.map +1 -0
- package/dts/hooks/useSubBrandLogo.d.ts +62 -0
- package/dts/hooks/useSubBrandLogo.d.ts.map +1 -0
- package/dts/hooks/useTimer.d.ts +7 -0
- package/dts/hooks/useTimer.d.ts.map +1 -0
- package/dts/hooks/useToggler.d.ts +10 -0
- package/dts/hooks/useToggler.d.ts.map +1 -0
- package/dts/hooks/useValueChanges.d.ts +8 -0
- package/dts/hooks/useValueChanges.d.ts.map +1 -0
- package/dts/index.d.ts +8 -0
- package/dts/index.d.ts.map +1 -0
- package/dts/internal/data/accounts.d.ts +359 -0
- package/dts/internal/data/accounts.d.ts.map +1 -0
- package/dts/internal/data/announcementCards.d.ts +10 -0
- package/dts/internal/data/announcementCards.d.ts.map +1 -0
- package/dts/internal/data/asset.d.ts +171 -0
- package/dts/internal/data/asset.d.ts.map +1 -0
- package/dts/internal/data/assets.d.ts +78 -0
- package/dts/internal/data/assets.d.ts.map +1 -0
- package/dts/internal/data/avatars.d.ts +3 -0
- package/dts/internal/data/avatars.d.ts.map +1 -0
- package/dts/internal/data/dataCards.d.ts +23 -0
- package/dts/internal/data/dataCards.d.ts.map +1 -0
- package/dts/internal/data/featureEntryCards.d.ts +17 -0
- package/dts/internal/data/featureEntryCards.d.ts.map +1 -0
- package/dts/internal/data/feedImages.d.ts +2 -0
- package/dts/internal/data/feedImages.d.ts.map +1 -0
- package/dts/internal/data/iconData.d.ts +2 -0
- package/dts/internal/data/iconData.d.ts.map +1 -0
- package/dts/internal/data/loremIpsum.d.ts +2 -0
- package/dts/internal/data/loremIpsum.d.ts.map +1 -0
- package/dts/internal/data/navigation.d.ts +7 -0
- package/dts/internal/data/navigation.d.ts.map +1 -0
- package/dts/internal/data/prices.d.ts +7 -0
- package/dts/internal/data/prices.d.ts.map +1 -0
- package/dts/internal/data/product.d.ts +25 -0
- package/dts/internal/data/product.d.ts.map +1 -0
- package/dts/internal/data/tabs.d.ts +15 -0
- package/dts/internal/data/tabs.d.ts.map +1 -0
- package/dts/internal/data/users.d.ts +10 -0
- package/dts/internal/data/users.d.ts.map +1 -0
- package/dts/internal/utils/storyBuilder.d.ts +113 -0
- package/dts/internal/utils/storyBuilder.d.ts.map +1 -0
- package/dts/internal/visualizations/SparklineInteractiveData.d.ts +13 -0
- package/dts/internal/visualizations/SparklineInteractiveData.d.ts.map +1 -0
- package/dts/jest/timeTravel.d.ts +15 -0
- package/dts/jest/timeTravel.d.ts.map +1 -0
- package/dts/lottie/lottieUtils.d.ts +11 -0
- package/dts/lottie/lottieUtils.d.ts.map +1 -0
- package/dts/lottie/lottieUtils.test.d.ts +2 -0
- package/dts/lottie/lottieUtils.test.d.ts.map +1 -0
- package/dts/lottie/useStatusAnimationPoller.d.ts +12 -0
- package/dts/lottie/useStatusAnimationPoller.d.ts.map +1 -0
- package/dts/media/getAvatarFallbackColor.d.ts +7 -0
- package/dts/media/getAvatarFallbackColor.d.ts.map +1 -0
- package/dts/media/remoteImageFallbackSrc.d.ts +6 -0
- package/dts/media/remoteImageFallbackSrc.d.ts.map +1 -0
- package/dts/motion/animatedCaret.d.ts +3 -0
- package/dts/motion/animatedCaret.d.ts.map +1 -0
- package/dts/motion/checkbox.d.ts +81 -0
- package/dts/motion/checkbox.d.ts.map +1 -0
- package/dts/motion/dot.d.ts +81 -0
- package/dts/motion/dot.d.ts.map +1 -0
- package/dts/motion/hint.d.ts +48 -0
- package/dts/motion/hint.d.ts.map +1 -0
- package/dts/motion/switch.d.ts +7 -0
- package/dts/motion/switch.d.ts.map +1 -0
- package/dts/motion/tokens.d.ts +422 -0
- package/dts/motion/tokens.d.ts.map +1 -0
- package/dts/motion/utils.d.ts +15 -0
- package/dts/motion/utils.d.ts.map +1 -0
- package/dts/numbers/IntlNumberFormat.d.ts +131 -0
- package/dts/numbers/IntlNumberFormat.d.ts.map +1 -0
- package/dts/numbers/__tests__/formatToParts.test.d.ts +2 -0
- package/dts/numbers/__tests__/formatToParts.test.d.ts.map +1 -0
- package/dts/numbers/__tests__/subscript.test.d.ts +2 -0
- package/dts/numbers/__tests__/subscript.test.d.ts.map +1 -0
- package/dts/numbers/subscript.d.ts +7 -0
- package/dts/numbers/subscript.d.ts.map +1 -0
- package/dts/overlays/ModalContext.d.ts +25 -0
- package/dts/overlays/ModalContext.d.ts.map +1 -0
- package/dts/overlays/OverlayContentContext.d.ts +13 -0
- package/dts/overlays/OverlayContentContext.d.ts.map +1 -0
- package/dts/overlays/PortalContext.d.ts +8 -0
- package/dts/overlays/PortalContext.d.ts.map +1 -0
- package/dts/overlays/ToastProvider.d.ts +73 -0
- package/dts/overlays/ToastProvider.d.ts.map +1 -0
- package/dts/overlays/__tests__/useOverlay.test.d.ts +2 -0
- package/dts/overlays/__tests__/useOverlay.test.d.ts.map +1 -0
- package/dts/overlays/__tests__/useToastQueue.test.d.ts +2 -0
- package/dts/overlays/__tests__/useToastQueue.test.d.ts.map +1 -0
- package/dts/overlays/useAlert.d.ts +8 -0
- package/dts/overlays/useAlert.d.ts.map +1 -0
- package/dts/overlays/useModal.d.ts +8 -0
- package/dts/overlays/useModal.d.ts.map +1 -0
- package/dts/overlays/useOverlay.d.ts +6 -0
- package/dts/overlays/useOverlay.d.ts.map +1 -0
- package/dts/overlays/usePortal.d.ts +2 -0
- package/dts/overlays/usePortal.d.ts.map +1 -0
- package/dts/overlays/usePortalState.d.ts +24 -0
- package/dts/overlays/usePortalState.d.ts.map +1 -0
- package/dts/overlays/useToastQueue.d.ts +11 -0
- package/dts/overlays/useToastQueue.d.ts.map +1 -0
- package/dts/stepper/__tests__/useStepper.test.d.ts +2 -0
- package/dts/stepper/__tests__/useStepper.test.d.ts.map +1 -0
- package/dts/stepper/__tests__/utils.test.d.ts +2 -0
- package/dts/stepper/__tests__/utils.test.d.ts.map +1 -0
- package/dts/stepper/useStepper.d.ts +41 -0
- package/dts/stepper/useStepper.d.ts.map +1 -0
- package/dts/stepper/utils.d.ts +22 -0
- package/dts/stepper/utils.d.ts.map +1 -0
- package/dts/system/EventHandlerProvider.d.ts +31 -0
- package/dts/system/EventHandlerProvider.d.ts.map +1 -0
- package/dts/system/LocaleProvider.d.ts +12 -0
- package/dts/system/LocaleProvider.d.ts.map +1 -0
- package/dts/system/RefMapContext.d.ts +10 -0
- package/dts/system/RefMapContext.d.ts.map +1 -0
- package/dts/system/__tests__/EventHandlerProvider.test.d.ts +2 -0
- package/dts/system/__tests__/EventHandlerProvider.test.d.ts.map +1 -0
- package/dts/tabs/TabsContext.d.ts +5 -0
- package/dts/tabs/TabsContext.d.ts.map +1 -0
- package/dts/tabs/__tests__/TabsContext.test.d.ts +2 -0
- package/dts/tabs/__tests__/TabsContext.test.d.ts.map +1 -0
- package/dts/tabs/__tests__/useTabs.test.d.ts +2 -0
- package/dts/tabs/__tests__/useTabs.test.d.ts.map +1 -0
- package/dts/tabs/useTabs.d.ts +29 -0
- package/dts/tabs/useTabs.d.ts.map +1 -0
- package/dts/tokens/accordion.d.ts +7 -0
- package/dts/tokens/accordion.d.ts.map +1 -0
- package/dts/tokens/appSwitcher.d.ts +4 -0
- package/dts/tokens/appSwitcher.d.ts.map +1 -0
- package/dts/tokens/avatar.d.ts +14 -0
- package/dts/tokens/avatar.d.ts.map +1 -0
- package/dts/tokens/banner.d.ts +15 -0
- package/dts/tokens/banner.d.ts.map +1 -0
- package/dts/tokens/borderRadius.d.ts +3 -0
- package/dts/tokens/borderRadius.d.ts.map +1 -0
- package/dts/tokens/button.d.ts +65 -0
- package/dts/tokens/button.d.ts.map +1 -0
- package/dts/tokens/card.d.ts +29 -0
- package/dts/tokens/card.d.ts.map +1 -0
- package/dts/tokens/cell.d.ts +27 -0
- package/dts/tokens/cell.d.ts.map +1 -0
- package/dts/tokens/chip.d.ts +2 -0
- package/dts/tokens/chip.d.ts.map +1 -0
- package/dts/tokens/dot.d.ts +12 -0
- package/dts/tokens/dot.d.ts.map +1 -0
- package/dts/tokens/drawer.d.ts +12 -0
- package/dts/tokens/drawer.d.ts.map +1 -0
- package/dts/tokens/illustrations.d.ts +28 -0
- package/dts/tokens/illustrations.d.ts.map +1 -0
- package/dts/tokens/input.d.ts +6 -0
- package/dts/tokens/input.d.ts.map +1 -0
- package/dts/tokens/interactable.d.ts +5 -0
- package/dts/tokens/interactable.d.ts.map +1 -0
- package/dts/tokens/interactableHeight.d.ts +5 -0
- package/dts/tokens/interactableHeight.d.ts.map +1 -0
- package/dts/tokens/menu.d.ts +3 -0
- package/dts/tokens/menu.d.ts.map +1 -0
- package/dts/tokens/multiContentModule.d.ts +2 -0
- package/dts/tokens/multiContentModule.d.ts.map +1 -0
- package/dts/tokens/navigation.d.ts +2 -0
- package/dts/tokens/navigation.d.ts.map +1 -0
- package/dts/tokens/overlays.d.ts +2 -0
- package/dts/tokens/overlays.d.ts.map +1 -0
- package/dts/tokens/page.d.ts +3 -0
- package/dts/tokens/page.d.ts.map +1 -0
- package/dts/tokens/select.d.ts +7 -0
- package/dts/tokens/select.d.ts.map +1 -0
- package/dts/tokens/sidebar.d.ts +3 -0
- package/dts/tokens/sidebar.d.ts.map +1 -0
- package/dts/tokens/sizing.d.ts +3 -0
- package/dts/tokens/sizing.d.ts.map +1 -0
- package/dts/tokens/sparkline.d.ts +11 -0
- package/dts/tokens/sparkline.d.ts.map +1 -0
- package/dts/tokens/tags.d.ts +12 -0
- package/dts/tokens/tags.d.ts.map +1 -0
- package/dts/tokens/tile.d.ts +4 -0
- package/dts/tokens/tile.d.ts.map +1 -0
- package/dts/tokens/toast.d.ts +5 -0
- package/dts/tokens/toast.d.ts.map +1 -0
- package/dts/tokens/tooltip.d.ts +4 -0
- package/dts/tokens/tooltip.d.ts.map +1 -0
- package/dts/tokens/zIndex.d.ts +14 -0
- package/dts/tokens/zIndex.d.ts.map +1 -0
- package/dts/tour/TourContext.d.ts +6 -0
- package/dts/tour/TourContext.d.ts.map +1 -0
- package/dts/tour/__tests__/TourContext.test.d.ts +2 -0
- package/dts/tour/__tests__/TourContext.test.d.ts.map +1 -0
- package/dts/tour/__tests__/useTour.test.d.ts +2 -0
- package/dts/tour/__tests__/useTour.test.d.ts.map +1 -0
- package/dts/tour/useTour.d.ts +98 -0
- package/dts/tour/useTour.d.ts.map +1 -0
- package/dts/types/AvatarBaseProps.d.ts +6 -0
- package/dts/types/AvatarBaseProps.d.ts.map +1 -0
- package/dts/types/AvatarSize.d.ts +2 -0
- package/dts/types/AvatarSize.d.ts.map +1 -0
- package/dts/types/BannerBaseProps.d.ts +3 -0
- package/dts/types/BannerBaseProps.d.ts.map +1 -0
- package/dts/types/BoxBaseProps.d.ts +62 -0
- package/dts/types/BoxBaseProps.d.ts.map +1 -0
- package/dts/types/ButtonBaseProps.d.ts +2 -0
- package/dts/types/ButtonBaseProps.d.ts.map +1 -0
- package/dts/types/CardHeaderProps.d.ts +12 -0
- package/dts/types/CardHeaderProps.d.ts.map +1 -0
- package/dts/types/CardMediaProps.d.ts +27 -0
- package/dts/types/CardMediaProps.d.ts.map +1 -0
- package/dts/types/CardRemoteImageProps.d.ts +18 -0
- package/dts/types/CardRemoteImageProps.d.ts.map +1 -0
- package/dts/types/CdsPlatform.d.ts +2 -0
- package/dts/types/CdsPlatform.d.ts.map +1 -0
- package/dts/types/CellBaseProps.d.ts +8 -0
- package/dts/types/CellBaseProps.d.ts.map +1 -0
- package/dts/types/Chart.d.ts +27 -0
- package/dts/types/Chart.d.ts.map +1 -0
- package/dts/types/CollapsibleBaseProps.d.ts +2 -0
- package/dts/types/CollapsibleBaseProps.d.ts.map +1 -0
- package/dts/types/Color.d.ts +6 -0
- package/dts/types/Color.d.ts.map +1 -0
- package/dts/types/ComponentEventHandlerProps.d.ts +6 -0
- package/dts/types/ComponentEventHandlerProps.d.ts.map +1 -0
- package/dts/types/DimensionStyles.d.ts +24 -0
- package/dts/types/DimensionStyles.d.ts.map +1 -0
- package/dts/types/Display.d.ts +2 -0
- package/dts/types/Display.d.ts.map +1 -0
- package/dts/types/DotBaseProps.d.ts +5 -0
- package/dts/types/DotBaseProps.d.ts.map +1 -0
- package/dts/types/DotCountBaseProps.d.ts +5 -0
- package/dts/types/DotCountBaseProps.d.ts.map +1 -0
- package/dts/types/ElevationLevels.d.ts +7 -0
- package/dts/types/ElevationLevels.d.ts.map +1 -0
- package/dts/types/FallbackBaseProps.d.ts +10 -0
- package/dts/types/FallbackBaseProps.d.ts.map +1 -0
- package/dts/types/Grid.d.ts +2 -0
- package/dts/types/Grid.d.ts.map +1 -0
- package/dts/types/Helpers.d.ts +4 -0
- package/dts/types/Helpers.d.ts.map +1 -0
- package/dts/types/IconButtonBaseProps.d.ts +3 -0
- package/dts/types/IconButtonBaseProps.d.ts.map +1 -0
- package/dts/types/IconName.d.ts +3 -0
- package/dts/types/IconName.d.ts.map +1 -0
- package/dts/types/IconSize.d.ts +3 -0
- package/dts/types/IconSize.d.ts.map +1 -0
- package/dts/types/IllustrationNames.d.ts +8 -0
- package/dts/types/IllustrationNames.d.ts.map +1 -0
- package/dts/types/IllustrationProps.d.ts +15 -0
- package/dts/types/IllustrationProps.d.ts.map +1 -0
- package/dts/types/InputBaseProps.d.ts +19 -0
- package/dts/types/InputBaseProps.d.ts.map +1 -0
- package/dts/types/LottiePlayer.d.ts +9 -0
- package/dts/types/LottiePlayer.d.ts.map +1 -0
- package/dts/types/LottieSource.d.ts +30 -0
- package/dts/types/LottieSource.d.ts.map +1 -0
- package/dts/types/LottieStatusAnimationProps.d.ts +24 -0
- package/dts/types/LottieStatusAnimationProps.d.ts.map +1 -0
- package/dts/types/Motion.d.ts +34 -0
- package/dts/types/Motion.d.ts.map +1 -0
- package/dts/types/OverlayLifecycleProps.d.ts +19 -0
- package/dts/types/OverlayLifecycleProps.d.ts.map +1 -0
- package/dts/types/Palette.d.ts +5 -0
- package/dts/types/Palette.d.ts.map +1 -0
- package/dts/types/Placement.d.ts +3 -0
- package/dts/types/Placement.d.ts.map +1 -0
- package/dts/types/Position.d.ts +2 -0
- package/dts/types/Position.d.ts.map +1 -0
- package/dts/types/ProgressContainerWithButtonsProps.d.ts +8 -0
- package/dts/types/ProgressContainerWithButtonsProps.d.ts.map +1 -0
- package/dts/types/PulseBaseProps.d.ts +2 -0
- package/dts/types/PulseBaseProps.d.ts.map +1 -0
- package/dts/types/React.d.ts +3 -0
- package/dts/types/React.d.ts.map +1 -0
- package/dts/types/Rect.d.ts +8 -0
- package/dts/types/Rect.d.ts.map +1 -0
- package/dts/types/Responsive.d.ts +3 -0
- package/dts/types/Responsive.d.ts.map +1 -0
- package/dts/types/ResponsiveProps.d.ts +24 -0
- package/dts/types/ResponsiveProps.d.ts.map +1 -0
- package/dts/types/SectionHeaderProps.d.ts +18 -0
- package/dts/types/SectionHeaderProps.d.ts.map +1 -0
- package/dts/types/Shape.d.ts +3 -0
- package/dts/types/Shape.d.ts.map +1 -0
- package/dts/types/SharedAccessibilityProps.d.ts +34 -0
- package/dts/types/SharedAccessibilityProps.d.ts.map +1 -0
- package/dts/types/SharedProps.d.ts +9 -0
- package/dts/types/SharedProps.d.ts.map +1 -0
- package/dts/types/SpacingProps.d.ts +46 -0
- package/dts/types/SpacingProps.d.ts.map +1 -0
- package/dts/types/SparklineInteractiveHeaderBaseProps.d.ts +3 -0
- package/dts/types/SparklineInteractiveHeaderBaseProps.d.ts.map +1 -0
- package/dts/types/SpreadPropsSafely.d.ts +28 -0
- package/dts/types/SpreadPropsSafely.d.ts.map +1 -0
- package/dts/types/StickyFooterProps.d.ts +22 -0
- package/dts/types/StickyFooterProps.d.ts.map +1 -0
- package/dts/types/TagBaseProps.d.ts +4 -0
- package/dts/types/TagBaseProps.d.ts.map +1 -0
- package/dts/types/TextBaseProps.d.ts +10 -0
- package/dts/types/TextBaseProps.d.ts.map +1 -0
- package/dts/types/TooltipBaseProps.d.ts +2 -0
- package/dts/types/TooltipBaseProps.d.ts.map +1 -0
- package/dts/types/TypeOrNumber.d.ts +3 -0
- package/dts/types/TypeOrNumber.d.ts.map +1 -0
- package/dts/types/Visibility.d.ts +5 -0
- package/dts/types/Visibility.d.ts.map +1 -0
- package/dts/types/Weight.d.ts +2 -0
- package/dts/types/Weight.d.ts.map +1 -0
- package/dts/types/index.d.ts +57 -0
- package/dts/types/index.d.ts.map +1 -0
- package/dts/utils/__tests__/cell.test.d.ts +2 -0
- package/dts/utils/__tests__/cell.test.d.ts.map +1 -0
- package/dts/utils/__tests__/chart.test.d.ts +2 -0
- package/dts/utils/__tests__/chart.test.d.ts.map +1 -0
- package/dts/utils/__tests__/flattenNodes.test.d.ts +2 -0
- package/dts/utils/__tests__/flattenNodes.test.d.ts.map +1 -0
- package/dts/utils/__tests__/formatCount.test.d.ts +2 -0
- package/dts/utils/__tests__/formatCount.test.d.ts.map +1 -0
- package/dts/utils/__tests__/getRectWidthVariant.test.d.ts +2 -0
- package/dts/utils/__tests__/getRectWidthVariant.test.d.ts.map +1 -0
- package/dts/utils/cell.d.ts +3 -0
- package/dts/utils/cell.d.ts.map +1 -0
- package/dts/utils/chart.d.ts +2 -0
- package/dts/utils/chart.d.ts.map +1 -0
- package/dts/utils/circle.d.ts +4 -0
- package/dts/utils/circle.d.ts.map +1 -0
- package/dts/utils/convertDimensionToAspectRatio.d.ts +4 -0
- package/dts/utils/convertDimensionToAspectRatio.d.ts.map +1 -0
- package/dts/utils/convertDimensionToSize.d.ts +8 -0
- package/dts/utils/convertDimensionToSize.d.ts.map +1 -0
- package/dts/utils/convertSizeWithMultiplier.d.ts +9 -0
- package/dts/utils/convertSizeWithMultiplier.d.ts.map +1 -0
- package/dts/utils/debounce.d.ts +2 -0
- package/dts/utils/debounce.d.ts.map +1 -0
- package/dts/utils/delay.d.ts +5 -0
- package/dts/utils/delay.d.ts.map +1 -0
- package/dts/utils/flattenNodes.d.ts +5 -0
- package/dts/utils/flattenNodes.d.ts.map +1 -0
- package/dts/utils/formatCount.d.ts +26 -0
- package/dts/utils/formatCount.d.ts.map +1 -0
- package/dts/utils/getAccessibleColor.d.ts +28 -0
- package/dts/utils/getAccessibleColor.d.ts.map +1 -0
- package/dts/utils/getButtonSpacingProps.d.ts +16 -0
- package/dts/utils/getButtonSpacingProps.d.ts.map +1 -0
- package/dts/utils/getDefaultAspectRatioForIllustration.d.ts +4 -0
- package/dts/utils/getDefaultAspectRatioForIllustration.d.ts.map +1 -0
- package/dts/utils/getDefaultSizeObjectForIllustration.d.ts +4 -0
- package/dts/utils/getDefaultSizeObjectForIllustration.d.ts.map +1 -0
- package/dts/utils/getRectWidthVariant.d.ts +2 -0
- package/dts/utils/getRectWidthVariant.d.ts.map +1 -0
- package/dts/utils/getWidthInEm.d.ts +6 -0
- package/dts/utils/getWidthInEm.d.ts.map +1 -0
- package/dts/utils/join.d.ts +6 -0
- package/dts/utils/join.d.ts.map +1 -0
- package/dts/utils/mergeProps.d.ts +3 -0
- package/dts/utils/mergeProps.d.ts.map +1 -0
- package/dts/utils/mockUtils.d.ts +2 -0
- package/dts/utils/mockUtils.d.ts.map +1 -0
- package/dts/utils/modulate.d.ts +9 -0
- package/dts/utils/modulate.d.ts.map +1 -0
- package/dts/utils/parseDotCountMaxOverflow.d.ts +3 -0
- package/dts/utils/parseDotCountMaxOverflow.d.ts.map +1 -0
- package/dts/visualizations/__tests__/getSparklineRange.test.d.ts +2 -0
- package/dts/visualizations/__tests__/getSparklineRange.test.d.ts.map +1 -0
- package/dts/visualizations/__tests__/largestTriangleThreeBucket.test.d.ts +2 -0
- package/dts/visualizations/__tests__/largestTriangleThreeBucket.test.d.ts.map +1 -0
- package/dts/visualizations/__tests__/useCounter.test.d.ts +2 -0
- package/dts/visualizations/__tests__/useCounter.test.d.ts.map +1 -0
- package/dts/visualizations/__tests__/useSparklineArea.test.d.ts +2 -0
- package/dts/visualizations/__tests__/useSparklineArea.test.d.ts.map +1 -0
- package/dts/visualizations/__tests__/useSparklineCoordinates.test.d.ts +2 -0
- package/dts/visualizations/__tests__/useSparklineCoordinates.test.d.ts.map +1 -0
- package/dts/visualizations/__tests__/useSparklinePath.test.d.ts +2 -0
- package/dts/visualizations/__tests__/useSparklinePath.test.d.ts.map +1 -0
- package/dts/visualizations/getProgressCircleParams.d.ts +15 -0
- package/dts/visualizations/getProgressCircleParams.d.ts.map +1 -0
- package/dts/visualizations/getSparklineRange.d.ts +9 -0
- package/dts/visualizations/getSparklineRange.d.ts.map +1 -0
- package/dts/visualizations/getSparklineTransform.d.ts +4 -0
- package/dts/visualizations/getSparklineTransform.d.ts.map +1 -0
- package/dts/visualizations/largestTriangleThreeBucket.d.ts +16 -0
- package/dts/visualizations/largestTriangleThreeBucket.d.ts.map +1 -0
- package/dts/visualizations/useCounter.d.ts +7 -0
- package/dts/visualizations/useCounter.d.ts.map +1 -0
- package/dts/visualizations/useDateLookup.d.ts +8 -0
- package/dts/visualizations/useDateLookup.d.ts.map +1 -0
- package/dts/visualizations/useProgressSize.d.ts +3 -0
- package/dts/visualizations/useProgressSize.d.ts.map +1 -0
- package/dts/visualizations/useSparklineArea.d.ts +3 -0
- package/dts/visualizations/useSparklineArea.d.ts.map +1 -0
- package/dts/visualizations/useSparklineAreaOpacity.d.ts +2 -0
- package/dts/visualizations/useSparklineAreaOpacity.d.ts.map +1 -0
- package/dts/visualizations/useSparklineCoordinates.d.ts +21 -0
- package/dts/visualizations/useSparklineCoordinates.d.ts.map +1 -0
- package/dts/visualizations/useSparklinePath.d.ts +3 -0
- package/dts/visualizations/useSparklinePath.d.ts.map +1 -0
- package/dts/visualizations/useSparklinePathGenerator.d.ts +18 -0
- package/dts/visualizations/useSparklinePathGenerator.d.ts.map +1 -0
- package/dts/visualizations/useTimeseriesPaths.d.ts +11 -0
- package/dts/visualizations/useTimeseriesPaths.d.ts.map +1 -0
- package/dts/visualizations/useVisualizationDimensions.d.ts +15 -0
- package/dts/visualizations/useVisualizationDimensions.d.ts.map +1 -0
- package/esm/accordion/AccordionProvider.js +38 -0
- package/esm/animation/accordion.js +3 -0
- package/esm/animation/border.js +10 -0
- package/esm/animation/carousel.js +21 -0
- package/esm/animation/collapsible.js +75 -0
- package/esm/animation/dot.js +15 -0
- package/esm/animation/drawer.js +19 -0
- package/esm/animation/dropdown.js +31 -0
- package/esm/animation/fullscreenModal.js +39 -0
- package/esm/animation/likeButton.js +18 -0
- package/esm/animation/menu.js +31 -0
- package/esm/animation/modal.js +32 -0
- package/esm/animation/overlay.js +16 -0
- package/esm/animation/paddle.js +17 -0
- package/esm/animation/progress.js +4 -0
- package/esm/animation/rotate.js +5 -0
- package/esm/animation/select.js +16 -0
- package/esm/animation/sparkline.js +8 -0
- package/esm/animation/tabs.js +5 -0
- package/esm/animation/toast.js +36 -0
- package/esm/animation/tooltip.js +87 -0
- package/esm/cards/getCardBodySpacingProps.js +25 -0
- package/esm/color/blendColors.js +44 -0
- package/esm/color/colorToHex.js +11 -0
- package/esm/color/darkenColor.js +5 -0
- package/esm/color/getAccessibleForegroundGradient.js +32 -0
- package/esm/color/getBlendedColor.js +202 -0
- package/esm/color/getContrastRatio.js +11 -0
- package/esm/color/getLuminance.js +28 -0
- package/esm/color/isAccessibleColor.js +31 -0
- package/esm/color/isLightOrDarkColor.js +21 -0
- package/esm/color/overrideAlpha.js +15 -0
- package/esm/core/theme.js +26 -0
- package/esm/dates/DateInputValidationError.js +7 -0
- package/esm/dates/IntlDateFormat.js +66 -0
- package/esm/dates/generateCalendarMonth.js +22 -0
- package/esm/dates/getISOStringLocal.js +8 -0
- package/esm/dates/getMidnightDate.js +4 -0
- package/esm/dates/getTimesFromDatesAndRanges.js +16 -0
- package/esm/dates/useDateInput.js +105 -0
- package/esm/dates/useDateInputValidation.js +50 -0
- package/esm/hooks/useEventHandler.js +54 -0
- package/esm/hooks/useFallbackShape.js +29 -0
- package/esm/hooks/useGroupToggler.js +105 -0
- package/esm/hooks/useHasMounted.js +6 -0
- package/esm/hooks/useIndexCounter.js +47 -0
- package/esm/hooks/useInputVariant.js +4 -0
- package/esm/hooks/useLogo.js +60 -0
- package/esm/hooks/useMergeRefs.js +14 -0
- package/esm/hooks/usePrefixedId.js +25 -0
- package/esm/hooks/usePreviousValue.js +16 -0
- package/esm/hooks/usePreviousValues.js +26 -0
- package/esm/hooks/useRefMap.js +17 -0
- package/esm/hooks/useSort.js +26 -0
- package/esm/hooks/useSubBrandLogo.js +244 -0
- package/esm/hooks/useTimer.js +51 -0
- package/esm/hooks/useToggler.js +24 -0
- package/esm/hooks/useValueChanges.js +15 -0
- package/esm/index.js +7 -0
- package/esm/internal/data/accounts.js +1838 -0
- package/esm/internal/data/announcementCards.js +23 -0
- package/esm/internal/data/asset.js +6345 -0
- package/esm/internal/data/assets.js +82 -0
- package/esm/internal/data/avatars.js +2 -0
- package/esm/internal/data/dataCards.js +22 -0
- package/esm/internal/data/featureEntryCards.js +28 -0
- package/esm/internal/data/feedImages.js +1 -0
- package/esm/internal/data/iconData.js +1 -0
- package/esm/internal/data/loremIpsum.js +1 -0
- package/esm/internal/data/navigation.js +11 -0
- package/esm/internal/data/prices.js +7 -0
- package/esm/internal/data/product.js +24 -0
- package/esm/internal/data/tabs.js +58 -0
- package/esm/internal/data/users.js +9 -0
- package/esm/internal/utils/storyBuilder.js +102 -0
- package/esm/internal/visualizations/SparklineInteractiveData.js +67 -0
- package/esm/jest/timeTravel.js +42 -0
- package/esm/lottie/lottieUtils.js +20 -0
- package/esm/lottie/lottieUtils.test.js +44 -0
- package/esm/lottie/useStatusAnimationPoller.js +67 -0
- package/esm/media/getAvatarFallbackColor.js +50 -0
- package/esm/media/remoteImageFallbackSrc.js +11 -0
- package/esm/motion/animatedCaret.js +6 -0
- package/esm/motion/checkbox.js +9 -0
- package/esm/motion/dot.js +9 -0
- package/esm/motion/hint.js +19 -0
- package/esm/motion/switch.js +8 -0
- package/esm/motion/tokens.js +71 -0
- package/esm/motion/utils.js +17 -0
- package/esm/numbers/IntlNumberFormat.js +204 -0
- package/esm/numbers/subscript.js +53 -0
- package/esm/overlays/ModalContext.js +8 -0
- package/esm/overlays/OverlayContentContext.js +24 -0
- package/esm/overlays/PortalContext.js +6 -0
- package/esm/overlays/ToastProvider.js +51 -0
- package/esm/overlays/useAlert.js +8 -0
- package/esm/overlays/useModal.js +16 -0
- package/esm/overlays/useOverlay.js +28 -0
- package/esm/overlays/usePortal.js +10 -0
- package/esm/overlays/usePortalState.js +55 -0
- package/esm/overlays/useToastQueue.js +67 -0
- package/esm/stepper/useStepper.js +124 -0
- package/esm/stepper/utils.js +45 -0
- package/esm/system/EventHandlerProvider.js +24 -0
- package/esm/system/LocaleProvider.js +19 -0
- package/esm/system/RefMapContext.js +7 -0
- package/esm/tabs/TabsContext.js +7 -0
- package/esm/tabs/useTabs.js +43 -0
- package/esm/tokens/accordion.js +6 -0
- package/esm/tokens/appSwitcher.js +3 -0
- package/esm/tokens/avatar.js +13 -0
- package/esm/tokens/banner.js +39 -0
- package/esm/tokens/borderRadius.js +7 -0
- package/esm/tokens/button.js +64 -0
- package/esm/tokens/card.js +29 -0
- package/esm/tokens/cell.js +40 -0
- package/esm/tokens/chip.js +1 -0
- package/esm/tokens/dot.js +31 -0
- package/esm/tokens/drawer.js +11 -0
- package/esm/tokens/illustrations.js +28 -0
- package/esm/tokens/input.js +5 -0
- package/esm/tokens/interactable.js +4 -0
- package/esm/tokens/interactableHeight.js +4 -0
- package/esm/tokens/menu.js +2 -0
- package/esm/tokens/multiContentModule.js +1 -0
- package/esm/tokens/navigation.js +1 -0
- package/esm/tokens/overlays.js +1 -0
- package/esm/tokens/page.js +2 -0
- package/esm/tokens/select.js +26 -0
- package/esm/tokens/sidebar.js +2 -0
- package/esm/tokens/sizing.js +2 -0
- package/esm/tokens/sparkline.js +24 -0
- package/esm/tokens/tags.js +66 -0
- package/esm/tokens/tile.js +9 -0
- package/esm/tokens/toast.js +4 -0
- package/esm/tokens/tooltip.js +5 -0
- package/esm/tokens/zIndex.js +15 -0
- package/esm/tour/TourContext.js +7 -0
- package/esm/tour/useTour.js +84 -0
- package/esm/types/AvatarBaseProps.js +1 -0
- package/esm/types/AvatarSize.js +1 -0
- package/esm/types/BannerBaseProps.js +1 -0
- package/esm/types/BoxBaseProps.js +1 -0
- package/esm/types/ButtonBaseProps.js +1 -0
- package/esm/types/CardHeaderProps.js +1 -0
- package/esm/types/CardMediaProps.js +1 -0
- package/esm/types/CardRemoteImageProps.js +1 -0
- package/esm/types/CdsPlatform.js +1 -0
- package/esm/types/CellBaseProps.js +1 -0
- package/esm/types/Chart.js +1 -0
- package/esm/types/CollapsibleBaseProps.js +1 -0
- package/esm/types/Color.js +1 -0
- package/esm/types/ComponentEventHandlerProps.js +1 -0
- package/esm/types/DimensionStyles.js +1 -0
- package/esm/types/Display.js +1 -0
- package/esm/types/DotBaseProps.js +1 -0
- package/esm/types/DotCountBaseProps.js +1 -0
- package/esm/types/ElevationLevels.js +1 -0
- package/esm/types/FallbackBaseProps.js +1 -0
- package/esm/types/Grid.js +1 -0
- package/esm/types/Helpers.js +1 -0
- package/esm/types/IconButtonBaseProps.js +1 -0
- package/esm/types/IconName.js +1 -0
- package/esm/types/IconSize.js +1 -0
- package/esm/types/IllustrationNames.js +1 -0
- package/esm/types/IllustrationProps.js +1 -0
- package/esm/types/InputBaseProps.js +1 -0
- package/esm/types/LottiePlayer.js +1 -0
- package/esm/types/LottieSource.js +1 -0
- package/esm/types/LottieStatusAnimationProps.js +1 -0
- package/esm/types/Motion.js +1 -0
- package/esm/types/OverlayLifecycleProps.js +1 -0
- package/esm/types/Palette.js +1 -0
- package/esm/types/Placement.js +1 -0
- package/esm/types/Position.js +1 -0
- package/esm/types/ProgressContainerWithButtonsProps.js +1 -0
- package/esm/types/PulseBaseProps.js +1 -0
- package/esm/types/React.js +1 -0
- package/esm/types/Rect.js +6 -0
- package/esm/types/Responsive.js +1 -0
- package/esm/types/ResponsiveProps.js +1 -0
- package/esm/types/SectionHeaderProps.js +1 -0
- package/esm/types/Shape.js +1 -0
- package/esm/types/SharedAccessibilityProps.js +1 -0
- package/esm/types/SharedProps.js +1 -0
- package/esm/types/SpacingProps.js +1 -0
- package/esm/types/SparklineInteractiveHeaderBaseProps.js +1 -0
- package/esm/types/SpreadPropsSafely.js +1 -0
- package/esm/types/StickyFooterProps.js +1 -0
- package/esm/types/TagBaseProps.js +1 -0
- package/esm/types/TextBaseProps.js +1 -0
- package/esm/types/TooltipBaseProps.js +1 -0
- package/esm/types/TypeOrNumber.js +1 -0
- package/esm/types/Visibility.js +1 -0
- package/esm/types/Weight.js +1 -0
- package/esm/types/index.js +58 -0
- package/esm/utils/cell.js +5 -0
- package/esm/utils/chart.js +14 -0
- package/esm/utils/circle.js +12 -0
- package/esm/utils/convertDimensionToAspectRatio.js +5 -0
- package/esm/utils/convertDimensionToSize.js +9 -0
- package/esm/utils/convertSizeWithMultiplier.js +7 -0
- package/esm/utils/debounce.js +16 -0
- package/esm/utils/delay.js +6 -0
- package/esm/utils/flattenNodes.js +33 -0
- package/esm/utils/formatCount.js +43 -0
- package/esm/utils/getAccessibleColor.js +50 -0
- package/esm/utils/getButtonSpacingProps.js +24 -0
- package/esm/utils/getDefaultAspectRatioForIllustration.js +6 -0
- package/esm/utils/getDefaultSizeObjectForIllustration.js +7 -0
- package/esm/utils/getRectWidthVariant.js +1 -0
- package/esm/utils/getWidthInEm.js +13 -0
- package/esm/utils/join.js +11 -0
- package/esm/utils/mergeProps.js +25 -0
- package/esm/utils/mockUtils.js +1 -0
- package/esm/utils/modulate.js +32 -0
- package/esm/utils/parseDotCountMaxOverflow.js +7 -0
- package/esm/visualizations/getProgressCircleParams.js +18 -0
- package/esm/visualizations/getSparklineRange.js +13 -0
- package/esm/visualizations/getSparklineTransform.js +19 -0
- package/esm/visualizations/largestTriangleThreeBucket.js +57 -0
- package/esm/visualizations/useCounter.js +52 -0
- package/esm/visualizations/useDateLookup.js +18 -0
- package/esm/visualizations/useProgressSize.js +15 -0
- package/esm/visualizations/useSparklineArea.js +30 -0
- package/esm/visualizations/useSparklineAreaOpacity.js +3 -0
- package/esm/visualizations/useSparklineCoordinates.js +73 -0
- package/esm/visualizations/useSparklinePath.js +22 -0
- package/esm/visualizations/useSparklinePathGenerator.js +38 -0
- package/esm/visualizations/useTimeseriesPaths.js +41 -0
- package/esm/visualizations/useVisualizationDimensions.js +27 -0
- package/package.json +61 -5
- package/index.js +0 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if a step or any of its descendants contains the target step ID
|
|
3
|
+
*/
|
|
4
|
+
export function containsStep(_ref) {
|
|
5
|
+
let {
|
|
6
|
+
step,
|
|
7
|
+
targetStepId
|
|
8
|
+
} = _ref;
|
|
9
|
+
if (!step.subSteps) return false;
|
|
10
|
+
return step.subSteps.some(subStep => {
|
|
11
|
+
if (subStep.id === targetStepId) return true;
|
|
12
|
+
return containsStep({
|
|
13
|
+
step: subStep,
|
|
14
|
+
targetStepId
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Flattens a tree of steps into a linear array in the order they appear when rendered
|
|
21
|
+
*/
|
|
22
|
+
export function flattenSteps(steps) {
|
|
23
|
+
const result = [];
|
|
24
|
+
for (const step of steps) {
|
|
25
|
+
result.push(step);
|
|
26
|
+
if (step.subSteps) result.push(...flattenSteps(step.subSteps));
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Checks if a step should be considered "visited" based on step progression.
|
|
33
|
+
* A step is visited if it comes before the active step in the flattened order.
|
|
34
|
+
*/
|
|
35
|
+
export function isStepVisited(_ref2) {
|
|
36
|
+
let {
|
|
37
|
+
step,
|
|
38
|
+
activeStepId,
|
|
39
|
+
flatStepIds
|
|
40
|
+
} = _ref2;
|
|
41
|
+
const currentIndex = flatStepIds.indexOf(step.id);
|
|
42
|
+
const activeIndex = flatStepIds.indexOf(activeStepId);
|
|
43
|
+
// Step is visited if the active step comes after it in the flattened order
|
|
44
|
+
return activeIndex > currentIndex;
|
|
45
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { createContext, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
// Event Custom Config
|
|
4
|
+
// {
|
|
5
|
+
// actions: [],
|
|
6
|
+
// component_name: 'trade',
|
|
7
|
+
// custom_data: {
|
|
8
|
+
// side: 'buy'
|
|
9
|
+
// }
|
|
10
|
+
// }
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
export const DEFAULT_EVENT_HANDLER_CONTEXT = {};
|
|
13
|
+
export const EventHandlerContext = /*#__PURE__*/createContext(DEFAULT_EVENT_HANDLER_CONTEXT);
|
|
14
|
+
export const EventHandlerProvider = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
config,
|
|
17
|
+
children
|
|
18
|
+
} = _ref;
|
|
19
|
+
const configuration = useMemo(() => config !== null && config !== void 0 ? config : DEFAULT_EVENT_HANDLER_CONTEXT, [config]);
|
|
20
|
+
return /*#__PURE__*/_jsx(EventHandlerContext.Provider, {
|
|
21
|
+
value: configuration,
|
|
22
|
+
children: children
|
|
23
|
+
});
|
|
24
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { createContext, useContext, useMemo } from 'react';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export const LocaleContext = /*#__PURE__*/createContext({
|
|
4
|
+
locale: 'en-US'
|
|
5
|
+
});
|
|
6
|
+
export const LocaleProvider = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
locale,
|
|
9
|
+
children
|
|
10
|
+
} = _ref;
|
|
11
|
+
const value = useMemo(() => ({
|
|
12
|
+
locale
|
|
13
|
+
}), [locale]);
|
|
14
|
+
return /*#__PURE__*/_jsx(LocaleContext.Provider, {
|
|
15
|
+
value: value,
|
|
16
|
+
children: children
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
export const useLocale = () => useContext(LocaleContext);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export const RefMapContext = /*#__PURE__*/createContext({});
|
|
3
|
+
export const useRefMapContext = () => {
|
|
4
|
+
const context = useContext(RefMapContext);
|
|
5
|
+
if (!context.refs) throw Error('useRefMapContext must be called inside a RefMapProvider');
|
|
6
|
+
return context;
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export const TabsContext = /*#__PURE__*/createContext(undefined);
|
|
3
|
+
export const useTabsContext = () => {
|
|
4
|
+
const context = useContext(TabsContext);
|
|
5
|
+
if (!context) throw Error('useTabsContext must be used within a TabsContext.Provider');
|
|
6
|
+
return context;
|
|
7
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useCallback, useMemo } from 'react';
|
|
2
|
+
/** A controlled hook for managing tabs state, such as the currently active tab. */
|
|
3
|
+
export const useTabs = _ref => {
|
|
4
|
+
let {
|
|
5
|
+
tabs,
|
|
6
|
+
activeTab,
|
|
7
|
+
disabled,
|
|
8
|
+
onChange
|
|
9
|
+
} = _ref;
|
|
10
|
+
const updateActiveTab = useCallback(tabId => {
|
|
11
|
+
let newActiveTab = null;
|
|
12
|
+
if (typeof tabId === 'string') {
|
|
13
|
+
var _tabs$find;
|
|
14
|
+
newActiveTab = (_tabs$find = tabs.find(tab => tab.id === tabId)) !== null && _tabs$find !== void 0 ? _tabs$find : tabs[0];
|
|
15
|
+
}
|
|
16
|
+
if (newActiveTab !== activeTab) onChange(newActiveTab);
|
|
17
|
+
}, [activeTab, tabs, onChange]);
|
|
18
|
+
const goNextTab = useCallback(() => {
|
|
19
|
+
if (!activeTab || activeTab === tabs.at(-1)) return;
|
|
20
|
+
const activeTabIndex = tabs.indexOf(activeTab);
|
|
21
|
+
// Find next tab that isn't disabled
|
|
22
|
+
for (let i = activeTabIndex + 1; i < tabs.length; i++) {
|
|
23
|
+
if (!tabs[i].disabled) return onChange(tabs[i]);
|
|
24
|
+
}
|
|
25
|
+
}, [activeTab, onChange, tabs]);
|
|
26
|
+
const goPreviousTab = useCallback(() => {
|
|
27
|
+
if (!activeTab || activeTab === tabs[0]) return;
|
|
28
|
+
const activeTabIndex = tabs.indexOf(activeTab);
|
|
29
|
+
// Find previous tab that isn't disabled
|
|
30
|
+
for (let i = activeTabIndex - 1; i > -1; i--) {
|
|
31
|
+
if (!tabs[i].disabled) return onChange(tabs[i]);
|
|
32
|
+
}
|
|
33
|
+
}, [activeTab, onChange, tabs]);
|
|
34
|
+
const api = useMemo(() => ({
|
|
35
|
+
tabs,
|
|
36
|
+
activeTab,
|
|
37
|
+
disabled,
|
|
38
|
+
updateActiveTab,
|
|
39
|
+
goNextTab,
|
|
40
|
+
goPreviousTab
|
|
41
|
+
}), [tabs, activeTab, disabled, updateActiveTab, goNextTab, goPreviousTab]);
|
|
42
|
+
return api;
|
|
43
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const colorSchemeMap = {
|
|
2
|
+
blue: 'blue60',
|
|
3
|
+
teal: 'teal60',
|
|
4
|
+
purple: 'purple60',
|
|
5
|
+
pink: 'pink60',
|
|
6
|
+
green: 'green60',
|
|
7
|
+
gray: 'gray60',
|
|
8
|
+
orange: 'orange60',
|
|
9
|
+
yellow: 'yellow60',
|
|
10
|
+
indigo: 'indigo60',
|
|
11
|
+
red: 'red60',
|
|
12
|
+
chartreuse: 'chartreuse60'
|
|
13
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export const variants = {
|
|
2
|
+
informational: {
|
|
3
|
+
background: 'bgSecondary',
|
|
4
|
+
iconColor: 'fgPrimary',
|
|
5
|
+
textColor: 'fg',
|
|
6
|
+
primaryActionColor: 'fgPrimary',
|
|
7
|
+
secondaryActionColor: 'fg',
|
|
8
|
+
iconButtonColor: 'fg',
|
|
9
|
+
borderColor: 'bgPrimary'
|
|
10
|
+
},
|
|
11
|
+
promotional: {
|
|
12
|
+
background: 'bgPrimaryWash',
|
|
13
|
+
iconColor: 'fgPrimary',
|
|
14
|
+
textColor: 'fg',
|
|
15
|
+
primaryActionColor: 'fgPrimary',
|
|
16
|
+
secondaryActionColor: 'fg',
|
|
17
|
+
iconButtonColor: 'fg',
|
|
18
|
+
borderColor: 'bgPrimary'
|
|
19
|
+
},
|
|
20
|
+
warning: {
|
|
21
|
+
background: 'bgWarningWash',
|
|
22
|
+
iconColor: 'fgWarning',
|
|
23
|
+
textColor: 'fg',
|
|
24
|
+
primaryActionColor: 'fgPrimary',
|
|
25
|
+
secondaryActionColor: 'fg',
|
|
26
|
+
iconButtonColor: 'fg',
|
|
27
|
+
borderColor: 'bgWarning'
|
|
28
|
+
},
|
|
29
|
+
error: {
|
|
30
|
+
background: 'bgNegativeWash',
|
|
31
|
+
iconColor: 'fgNegative',
|
|
32
|
+
textColor: 'fg',
|
|
33
|
+
primaryActionColor: 'fgPrimary',
|
|
34
|
+
secondaryActionColor: 'fg',
|
|
35
|
+
iconButtonColor: 'fg',
|
|
36
|
+
borderColor: 'bgNegative'
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
export const bannerMinWidth = 320;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export const variants = {
|
|
2
|
+
primary: {
|
|
3
|
+
color: 'fgInverse',
|
|
4
|
+
background: 'bgPrimary',
|
|
5
|
+
borderColor: 'bgPrimary'
|
|
6
|
+
},
|
|
7
|
+
secondary: {
|
|
8
|
+
color: 'fg',
|
|
9
|
+
background: 'bgSecondary',
|
|
10
|
+
borderColor: 'bgSecondary'
|
|
11
|
+
},
|
|
12
|
+
tertiary: {
|
|
13
|
+
color: 'fgInverse',
|
|
14
|
+
background: 'bgInverse',
|
|
15
|
+
borderColor: 'bgInverse'
|
|
16
|
+
},
|
|
17
|
+
foregroundMuted: {
|
|
18
|
+
color: 'fgMuted',
|
|
19
|
+
background: 'bgSecondary',
|
|
20
|
+
borderColor: 'bgLine'
|
|
21
|
+
},
|
|
22
|
+
positive: {
|
|
23
|
+
color: 'fgInverse',
|
|
24
|
+
background: 'bgPositive',
|
|
25
|
+
borderColor: 'bgPositive'
|
|
26
|
+
},
|
|
27
|
+
negative: {
|
|
28
|
+
color: 'fgInverse',
|
|
29
|
+
background: 'bgNegative',
|
|
30
|
+
borderColor: 'bgNegative'
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export const transparentVariants = {
|
|
34
|
+
primary: {
|
|
35
|
+
color: 'fgPrimary',
|
|
36
|
+
background: 'bg',
|
|
37
|
+
borderColor: 'transparent'
|
|
38
|
+
},
|
|
39
|
+
secondary: {
|
|
40
|
+
color: 'fg',
|
|
41
|
+
background: 'bg',
|
|
42
|
+
borderColor: 'transparent'
|
|
43
|
+
},
|
|
44
|
+
tertiary: {
|
|
45
|
+
color: 'fg',
|
|
46
|
+
background: 'bg',
|
|
47
|
+
borderColor: 'transparent'
|
|
48
|
+
},
|
|
49
|
+
foregroundMuted: {
|
|
50
|
+
color: 'fgMuted',
|
|
51
|
+
background: 'bg',
|
|
52
|
+
borderColor: 'transparent'
|
|
53
|
+
},
|
|
54
|
+
positive: {
|
|
55
|
+
color: 'fgPositive',
|
|
56
|
+
background: 'bg',
|
|
57
|
+
borderColor: 'transparent'
|
|
58
|
+
},
|
|
59
|
+
negative: {
|
|
60
|
+
color: 'fgNegative',
|
|
61
|
+
background: 'bg',
|
|
62
|
+
borderColor: 'transparent'
|
|
63
|
+
}
|
|
64
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { convertDimensionToSize } from '../utils/convertDimensionToSize';
|
|
2
|
+
export const cardSizes = {
|
|
3
|
+
small: {
|
|
4
|
+
width: 136,
|
|
5
|
+
height: 144
|
|
6
|
+
},
|
|
7
|
+
medium: {
|
|
8
|
+
width: 312,
|
|
9
|
+
height: 192
|
|
10
|
+
},
|
|
11
|
+
large: {
|
|
12
|
+
width: undefined,
|
|
13
|
+
height: undefined
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export const defaultMediaDimension = '96x96';
|
|
17
|
+
export const defaultPictogramMediaDimension = '64x64';
|
|
18
|
+
export const defaultMediaSize = convertDimensionToSize(defaultMediaDimension);
|
|
19
|
+
export const defaultSpacingBottom = 2;
|
|
20
|
+
export const upsellCardMinHeight = 158;
|
|
21
|
+
export const upsellCardDefaultWidth = 327;
|
|
22
|
+
export const containedAssetCardLargeWidth = 359;
|
|
23
|
+
export const containedAssetCardSmallDimension = 156;
|
|
24
|
+
export const containedAssetCardLargeDimension = 327;
|
|
25
|
+
export const floatingAssetCardLargeWidth = 359;
|
|
26
|
+
export const floatingAssetCardSmallDimension = 156;
|
|
27
|
+
export const defaultNudgeCardWidth = 327;
|
|
28
|
+
export const contentCardMinWidth = 280;
|
|
29
|
+
export const contentCardMaxWidth = 800;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { gutter } from './sizing';
|
|
2
|
+
export const mediaSize = 32;
|
|
3
|
+
|
|
4
|
+
// Height of the inner cell without padding
|
|
5
|
+
export const imageSize = 48;
|
|
6
|
+
export const pictogramScaleMultiplier = 1;
|
|
7
|
+
export const listHeight = 80;
|
|
8
|
+
export const compactListHeight = 40;
|
|
9
|
+
|
|
10
|
+
/** Spacing configs for Cells to be parsed in [web/mobile]/hooks/useCellSpacing */
|
|
11
|
+
|
|
12
|
+
/** Default spacing config */
|
|
13
|
+
export const defaultSpacingConfig = {
|
|
14
|
+
innerSpacing: {
|
|
15
|
+
paddingX: 2,
|
|
16
|
+
paddingY: 1,
|
|
17
|
+
marginX: -2
|
|
18
|
+
},
|
|
19
|
+
outerSpacing: {
|
|
20
|
+
paddingX: gutter,
|
|
21
|
+
paddingY: 1,
|
|
22
|
+
marginX: 0
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export const selectOptionHeight = 56;
|
|
26
|
+
export const cellPriorities = ['start', 'middle', 'end'];
|
|
27
|
+
export const cellHelperTextVariants = {
|
|
28
|
+
information: {
|
|
29
|
+
iconName: 'info',
|
|
30
|
+
color: 'fgMuted'
|
|
31
|
+
},
|
|
32
|
+
warning: {
|
|
33
|
+
iconName: 'warning',
|
|
34
|
+
color: 'fgWarning'
|
|
35
|
+
},
|
|
36
|
+
error: {
|
|
37
|
+
iconName: 'error',
|
|
38
|
+
color: 'fgNegative'
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const chipMaxWidth = 200;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const avatarIconSizeMap = {
|
|
2
|
+
xxxl: 's',
|
|
3
|
+
xxl: 's',
|
|
4
|
+
xl: 's',
|
|
5
|
+
l: 'xs',
|
|
6
|
+
m: 'xs',
|
|
7
|
+
s: 'xs'
|
|
8
|
+
};
|
|
9
|
+
export const avatarDotSizeMap = {
|
|
10
|
+
xxxl: 'm',
|
|
11
|
+
xxl: 'm',
|
|
12
|
+
xl: 'm',
|
|
13
|
+
l: 's',
|
|
14
|
+
m: 'xs',
|
|
15
|
+
s: 'xs'
|
|
16
|
+
};
|
|
17
|
+
export const dotCountSize = 24;
|
|
18
|
+
|
|
19
|
+
// This works for the purposes of TabNavigation, but it's not stable
|
|
20
|
+
// TODO Update this with more stable values
|
|
21
|
+
export const dotSizeTokens = {
|
|
22
|
+
s: 28,
|
|
23
|
+
m: 36,
|
|
24
|
+
l: 42
|
|
25
|
+
};
|
|
26
|
+
export const getDotSize = count => {
|
|
27
|
+
if (!count || count < 10) return dotSizeTokens.s;
|
|
28
|
+
if (count >= 10) return dotSizeTokens.m;
|
|
29
|
+
if (count >= 100) return dotSizeTokens.l;
|
|
30
|
+
return dotSizeTokens.s;
|
|
31
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Max percentage of View height the drawer can take up */
|
|
2
|
+
export const verticalDrawerPercentageOfView = 0.75;
|
|
3
|
+
/** Max percentage of View width the drawer can take up */
|
|
4
|
+
export const horizontalDrawerPercentageOfView = 0.85;
|
|
5
|
+
/** The maximum percentage of the View height that the Drawer can take up before being considered large */
|
|
6
|
+
export const drawerHeightThreshold = 0.4;
|
|
7
|
+
/** HandleBar offset from Tray/Bottom Drawer */
|
|
8
|
+
export const handleBarOffset = 60;
|
|
9
|
+
export const handleBarHeight = 4;
|
|
10
|
+
/** Based on trial and error this seems to normalize the relationship between pan gesture distance and drawer translation */
|
|
11
|
+
export const normalizeDrawerPanDistanceMultiplier = 1.1;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const illustrationDimensions = {
|
|
2
|
+
heroSquare: ['240x240', '200x200'],
|
|
3
|
+
spotRectangle: ['240x120'],
|
|
4
|
+
spotSquare: ['96x96'],
|
|
5
|
+
spotIcon: ['32x32', '24x24'],
|
|
6
|
+
pictogram: ['48x48', '64x64']
|
|
7
|
+
};
|
|
8
|
+
export const illustrationDimensionDefaults = {
|
|
9
|
+
all: '48x48',
|
|
10
|
+
heroSquare: '240x240',
|
|
11
|
+
pictogram: '48x48',
|
|
12
|
+
spotSquare: '96x96',
|
|
13
|
+
spotIcon: '32x32',
|
|
14
|
+
spotRectangle: '240x120'
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** [width, height] tuples for allowed dimensions */
|
|
18
|
+
export const illustrationSizes = {
|
|
19
|
+
'24x24': [24, 24],
|
|
20
|
+
'32x32': [32, 32],
|
|
21
|
+
'48x48': [48, 48],
|
|
22
|
+
'64x64': [64, 64],
|
|
23
|
+
'96x96': [96, 96],
|
|
24
|
+
'120x120': [120, 120],
|
|
25
|
+
'200x200': [200, 200],
|
|
26
|
+
'240x120': [240, 120],
|
|
27
|
+
'240x240': [240, 240]
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const defaultMaxWidth = 450;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const navigationBarMinHeight = 80;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const FOCUSABLE_ELEMENTS = 'a[href], button:not([disabled]), textarea, input, select';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { gutter } from './sizing';
|
|
2
|
+
export const labelTextColor = 'foreground';
|
|
3
|
+
|
|
4
|
+
/** Spacing config for Select Option (web) */
|
|
5
|
+
export const selectCellSpacingConfig = {
|
|
6
|
+
outerSpacing: {
|
|
7
|
+
paddingX: 0,
|
|
8
|
+
paddingY: 0
|
|
9
|
+
},
|
|
10
|
+
innerSpacing: {
|
|
11
|
+
marginX: 0,
|
|
12
|
+
paddingX: 2
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** Spacing config for Select Option (mobile) */
|
|
17
|
+
export const selectCellMobileSpacingConfig = {
|
|
18
|
+
outerSpacing: {
|
|
19
|
+
paddingX: 0,
|
|
20
|
+
paddingY: 0
|
|
21
|
+
},
|
|
22
|
+
innerSpacing: {
|
|
23
|
+
marginX: 0,
|
|
24
|
+
paddingX: gutter
|
|
25
|
+
}
|
|
26
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { durations } from '../motion/tokens';
|
|
2
|
+
export const chartHeight = 320;
|
|
3
|
+
export const chartCompactHeight = 120;
|
|
4
|
+
export const maskOpacity = 0.8;
|
|
5
|
+
export const lineOpacity = 0.4;
|
|
6
|
+
export const lineDashArray = [2, 4];
|
|
7
|
+
export const fadeDuration = durations.moderate1;
|
|
8
|
+
|
|
9
|
+
// This list may not be exhaustive, but callsites use period.label as a fallback
|
|
10
|
+
export const periodLabelMap = {
|
|
11
|
+
'1H': '1 hour',
|
|
12
|
+
'1D': '1 day',
|
|
13
|
+
'1W': '1 week',
|
|
14
|
+
'1M': '1 month',
|
|
15
|
+
'1Y': '1 year'
|
|
16
|
+
};
|
|
17
|
+
export const subheadIconSignMap = {
|
|
18
|
+
positive: '+',
|
|
19
|
+
negative: '-',
|
|
20
|
+
upwardTrend: '\u2197',
|
|
21
|
+
downwardTrend: '\u2198',
|
|
22
|
+
'': ''
|
|
23
|
+
};
|
|
24
|
+
export const borderWidth = 2;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export const tagHorizontalSpacing = {
|
|
2
|
+
informational: 0.5,
|
|
3
|
+
promotional: 1
|
|
4
|
+
};
|
|
5
|
+
export const tagFontMap = {
|
|
6
|
+
informational: 'label1',
|
|
7
|
+
promotional: 'caption'
|
|
8
|
+
};
|
|
9
|
+
export const tagBorderRadiusMap = {
|
|
10
|
+
informational: 100,
|
|
11
|
+
promotional: 1000
|
|
12
|
+
};
|
|
13
|
+
export const tagColorMap = {
|
|
14
|
+
informational: {
|
|
15
|
+
green: {
|
|
16
|
+
background: 'green0',
|
|
17
|
+
foreground: 'green60'
|
|
18
|
+
},
|
|
19
|
+
blue: {
|
|
20
|
+
background: 'blue0',
|
|
21
|
+
foreground: 'blue60'
|
|
22
|
+
},
|
|
23
|
+
yellow: {
|
|
24
|
+
background: 'yellow0',
|
|
25
|
+
foreground: 'yellow70'
|
|
26
|
+
},
|
|
27
|
+
purple: {
|
|
28
|
+
background: 'purple0',
|
|
29
|
+
foreground: 'purple80'
|
|
30
|
+
},
|
|
31
|
+
red: {
|
|
32
|
+
background: 'red0',
|
|
33
|
+
foreground: 'red60'
|
|
34
|
+
},
|
|
35
|
+
gray: {
|
|
36
|
+
background: 'gray10',
|
|
37
|
+
foreground: 'gray80'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
promotional: {
|
|
41
|
+
green: {
|
|
42
|
+
background: 'green60',
|
|
43
|
+
foreground: 'green0'
|
|
44
|
+
},
|
|
45
|
+
blue: {
|
|
46
|
+
background: 'blue60',
|
|
47
|
+
foreground: 'blue0'
|
|
48
|
+
},
|
|
49
|
+
yellow: {
|
|
50
|
+
background: 'yellow30',
|
|
51
|
+
foreground: 'yellow70'
|
|
52
|
+
},
|
|
53
|
+
purple: {
|
|
54
|
+
background: 'purple80',
|
|
55
|
+
foreground: 'purple0'
|
|
56
|
+
},
|
|
57
|
+
red: {
|
|
58
|
+
background: 'red60',
|
|
59
|
+
foreground: 'red0'
|
|
60
|
+
},
|
|
61
|
+
gray: {
|
|
62
|
+
background: 'gray80',
|
|
63
|
+
foreground: 'gray10'
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const pictogramSize = 48;
|
|
2
|
+
export const pictogramWrapperSize = 62;
|
|
3
|
+
|
|
4
|
+
/*
|
|
5
|
+
* Multipliers used to ensure estimation of asset dimensions
|
|
6
|
+
* are as close as possible to dimensions in Figma specs
|
|
7
|
+
* so that overflow detection works as expected
|
|
8
|
+
*/
|
|
9
|
+
export const pictogramScaleMultiplier = 0.8;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const zIndex = {
|
|
2
|
+
interactable: 1,
|
|
3
|
+
navigation: 2,
|
|
4
|
+
// Begin portal components
|
|
5
|
+
portal: 100001,
|
|
6
|
+
popoverMenu: 2,
|
|
7
|
+
modal: 3,
|
|
8
|
+
dropdown: 4,
|
|
9
|
+
tooltip: 5,
|
|
10
|
+
toast: 6,
|
|
11
|
+
alert: 7,
|
|
12
|
+
tray: 4,
|
|
13
|
+
// End portal components
|
|
14
|
+
max: 2147483647
|
|
15
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export const TourContext = /*#__PURE__*/createContext(undefined);
|
|
3
|
+
export const useTourContext = () => {
|
|
4
|
+
const context = useContext(TourContext);
|
|
5
|
+
if (!context) throw Error('useTourContext must be called inside a Tour');
|
|
6
|
+
return context;
|
|
7
|
+
};
|