@coinbase/cds-common 8.13.1 → 8.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/dts/accordion/AccordionProvider.d.ts +23 -17
- package/dts/animation/accordion.d.ts +1 -1
- package/dts/animation/border.d.ts +9 -3
- package/dts/animation/carousel.d.ts +1 -1
- package/dts/animation/collapsible.d.ts +4 -4
- package/dts/animation/dot.d.ts +1 -1
- package/dts/animation/drawer.d.ts +8 -8
- package/dts/animation/dropdown.d.ts +19 -19
- package/dts/animation/fullscreenModal.d.ts +1 -1
- package/dts/animation/likeButton.d.ts +1 -1
- package/dts/animation/menu.d.ts +21 -21
- package/dts/animation/modal.d.ts +1 -1
- package/dts/animation/overlay.d.ts +1 -1
- package/dts/animation/paddle.d.ts +1 -1
- package/dts/animation/progress.d.ts +1 -1
- package/dts/animation/rotate.d.ts +1 -1
- package/dts/animation/select.d.ts +1 -1
- package/dts/animation/sparkline.d.ts +3 -3
- package/dts/animation/tabs.d.ts +1 -1
- package/dts/animation/toast.d.ts +1 -1
- package/dts/animation/tooltip.d.ts +7 -4
- package/dts/cards/getCardBodySpacingProps.d.ts +16 -4
- package/dts/color/blendColors.d.ts +12 -9
- package/dts/color/colorToHex.d.ts +1 -1
- package/dts/color/darkenColor.d.ts +1 -1
- package/dts/color/getAccessibleForegroundGradient.d.ts +13 -8
- package/dts/color/getBlendedColor.d.ts +61 -54
- package/dts/color/getContrastRatio.d.ts +1 -1
- package/dts/color/getLuminance.d.ts +1 -1
- package/dts/color/isAccessibleColor.d.ts +11 -6
- package/dts/color/isLightOrDarkColor.d.ts +2 -2
- package/dts/color/overrideAlpha.d.ts +1 -1
- package/dts/core/theme.d.ts +251 -252
- package/dts/dates/DateInputValidationError.d.ts +3 -3
- package/dts/dates/IntlDateFormat.d.ts +29 -32
- package/dts/dates/generateCalendarMonth.d.ts +1 -1
- package/dts/dates/getISOStringLocal.d.ts +1 -1
- package/dts/dates/getMidnightDate.d.ts +1 -1
- package/dts/dates/getTimesFromDatesAndRanges.d.ts +4 -2
- package/dts/dates/useDateInput.d.ts +33 -17
- package/dts/dates/useDateInputValidation.d.ts +48 -39
- package/dts/hooks/useEventHandler.d.ts +12 -3
- package/dts/hooks/useFallbackShape.d.ts +10 -6
- package/dts/hooks/useGroupToggler.d.ts +9 -6
- package/dts/hooks/useHasMounted.d.ts +1 -1
- package/dts/hooks/useIndexCounter.d.ts +21 -14
- package/dts/hooks/useInputVariant.d.ts +1 -1
- package/dts/hooks/useLogo.d.ts +17 -17
- package/dts/hooks/useMergeRefs.d.ts +4 -2
- package/dts/hooks/usePrefixedId.d.ts +9 -3
- package/dts/hooks/usePreviousValue.d.ts +1 -1
- package/dts/hooks/usePreviousValues.d.ts +3 -3
- package/dts/hooks/useRefMap.d.ts +9 -7
- package/dts/hooks/useSort.d.ts +14 -14
- package/dts/hooks/useSubBrandLogo.d.ts +53 -45
- package/dts/hooks/useTimer.d.ts +5 -5
- package/dts/hooks/useToggler.d.ts +7 -7
- package/dts/hooks/useValueChanges.d.ts +6 -6
- package/dts/index.d.ts +1 -1
- package/dts/internal/data/accounts.d.ts +220 -210
- package/dts/internal/data/announcementCards.d.ts +7 -7
- package/dts/internal/data/asset.d.ts +162 -162
- package/dts/internal/data/assets.d.ts +73 -70
- package/dts/internal/data/avatars.d.ts +6 -3
- package/dts/internal/data/dataCards.d.ts +25 -21
- package/dts/internal/data/featureEntryCards.d.ts +19 -16
- package/dts/internal/data/feedImages.d.ts +1 -1
- package/dts/internal/data/iconData.d.ts +2 -2
- package/dts/internal/data/loremIpsum.d.ts +3 -2
- package/dts/internal/data/navigation.d.ts +5 -5
- package/dts/internal/data/prices.d.ts +3 -3
- package/dts/internal/data/product.d.ts +31 -23
- package/dts/internal/data/tabs.d.ts +16 -13
- package/dts/internal/data/users.d.ts +13 -10
- package/dts/internal/utils/storyBuilder.d.ts +136 -95
- package/dts/internal/visualizations/SparklineInteractiveData.d.ts +8 -8
- package/dts/jest/timeTravel.d.ts +1 -1
- package/dts/lottie/lottieUtils.d.ts +7 -4
- package/dts/lottie/useStatusAnimationPoller.d.ts +29 -6
- package/dts/media/getAvatarFallbackColor.d.ts +4 -2
- package/dts/media/remoteImageFallbackSrc.d.ts +5 -3
- package/dts/motion/animatedCaret.d.ts +1 -1
- package/dts/motion/checkbox.d.ts +85 -77
- package/dts/motion/dot.d.ts +85 -77
- package/dts/motion/hint.d.ts +46 -42
- package/dts/motion/switch.d.ts +1 -1
- package/dts/motion/tokens.d.ts +896 -414
- package/dts/motion/utils.d.ts +30 -12
- package/dts/numbers/IntlNumberFormat.d.ts +101 -103
- package/dts/numbers/subscript.d.ts +1 -1
- package/dts/overlays/ModalContext.d.ts +22 -22
- package/dts/overlays/OverlayContentContext.d.ts +10 -10
- package/dts/overlays/PortalContext.d.ts +5 -5
- package/dts/overlays/ToastProvider.d.ts +44 -35
- package/dts/overlays/useAlert.d.ts +3 -3
- package/dts/overlays/useModal.d.ts +3 -3
- package/dts/overlays/useOverlay.d.ts +3 -3
- package/dts/overlays/usePortal.d.ts +2 -2
- package/dts/overlays/usePortalState.d.ts +12 -12
- package/dts/overlays/useToastQueue.d.ts +8 -8
- package/dts/stepper/useStepper.d.ts +27 -23
- package/dts/stepper/utils.d.ts +15 -8
- package/dts/system/EventHandlerProvider.d.ts +13 -11
- package/dts/system/LocaleProvider.d.ts +8 -5
- package/dts/system/RefMapContext.d.ts +3 -3
- package/dts/tabs/TabsContext.d.ts +2 -2
- package/dts/tabs/useTabs.d.ts +27 -22
- package/dts/tokens/accordion.d.ts +4 -4
- package/dts/tokens/appSwitcher.d.ts +1 -1
- package/dts/tokens/avatar.d.ts +12 -12
- package/dts/tokens/banner.d.ts +8 -8
- package/dts/tokens/borderRadius.d.ts +1 -1
- package/dts/tokens/button.d.ts +61 -61
- package/dts/tokens/card.d.ts +16 -16
- package/dts/tokens/cell.d.ts +17 -14
- package/dts/tokens/chip.d.ts +1 -1
- package/dts/tokens/dot.d.ts +4 -4
- package/dts/tokens/drawer.d.ts +1 -1
- package/dts/tokens/illustrations.d.ts +21 -21
- package/dts/tokens/input.d.ts +1 -1
- package/dts/tokens/interactable.d.ts +1 -1
- package/dts/tokens/interactableHeight.d.ts +3 -3
- package/dts/tokens/menu.d.ts +1 -1
- package/dts/tokens/multiContentModule.d.ts +1 -1
- package/dts/tokens/navigation.d.ts +1 -1
- package/dts/tokens/overlays.d.ts +3 -2
- package/dts/tokens/page.d.ts +1 -1
- package/dts/tokens/select.d.ts +1 -1
- package/dts/tokens/sidebar.d.ts +1 -1
- package/dts/tokens/sizing.d.ts +1 -1
- package/dts/tokens/sparkline.d.ts +1 -1
- package/dts/tokens/tags.d.ts +11 -5
- package/dts/tokens/tile.d.ts +1 -1
- package/dts/tokens/toast.d.ts +1 -1
- package/dts/tokens/tooltip.d.ts +1 -1
- package/dts/tokens/zIndex.d.ts +12 -12
- package/dts/tour/TourContext.d.ts +1 -1
- package/dts/tour/useTour.d.ts +83 -77
- package/dts/types/AvatarBaseProps.d.ts +1 -1
- package/dts/types/AvatarSize.d.ts +1 -1
- package/dts/types/BannerBaseProps.d.ts +1 -1
- package/dts/types/BoxBaseProps.d.ts +61 -48
- package/dts/types/ButtonBaseProps.d.ts +8 -2
- package/dts/types/CardHeaderProps.d.ts +9 -9
- package/dts/types/CardMediaProps.d.ts +28 -22
- package/dts/types/CardRemoteImageProps.d.ts +18 -14
- package/dts/types/CdsPlatform.d.ts +1 -1
- package/dts/types/CellBaseProps.d.ts +3 -3
- package/dts/types/Chart.d.ts +18 -16
- package/dts/types/CollapsibleBaseProps.d.ts +1 -1
- package/dts/types/Color.d.ts +3 -3
- package/dts/types/ComponentEventHandlerProps.d.ts +3 -3
- package/dts/types/DimensionStyles.d.ts +18 -18
- package/dts/types/Display.d.ts +9 -2
- package/dts/types/DotBaseProps.d.ts +1 -1
- package/dts/types/DotCountBaseProps.d.ts +1 -1
- package/dts/types/ElevationLevels.d.ts +3 -3
- package/dts/types/FallbackBaseProps.d.ts +8 -8
- package/dts/types/Grid.d.ts +1 -1
- package/dts/types/Helpers.d.ts +6 -2
- package/dts/types/IconButtonBaseProps.d.ts +1 -1
- package/dts/types/IconName.d.ts +1 -1
- package/dts/types/IconSize.d.ts +1 -1
- package/dts/types/IllustrationNames.d.ts +14 -3
- package/dts/types/IllustrationProps.d.ts +15 -3
- package/dts/types/InputBaseProps.d.ts +23 -17
- package/dts/types/LottiePlayer.d.ts +9 -6
- package/dts/types/LottieSource.d.ts +19 -19
- package/dts/types/LottieStatusAnimationProps.d.ts +21 -15
- package/dts/types/Motion.d.ts +58 -21
- package/dts/types/OverlayLifecycleProps.d.ts +17 -17
- package/dts/types/Palette.d.ts +1 -1
- package/dts/types/Placement.d.ts +1 -1
- package/dts/types/Position.d.ts +1 -1
- package/dts/types/ProgressContainerWithButtonsProps.d.ts +5 -5
- package/dts/types/PulseBaseProps.d.ts +1 -1
- package/dts/types/React.d.ts +1 -1
- package/dts/types/Rect.d.ts +5 -5
- package/dts/types/Responsive.d.ts +9 -2
- package/dts/types/ResponsiveProps.d.ts +13 -6
- package/dts/types/SectionHeaderProps.d.ts +15 -13
- package/dts/types/Shape.d.ts +1 -1
- package/dts/types/SharedAccessibilityProps.d.ts +32 -32
- package/dts/types/SharedProps.d.ts +7 -7
- package/dts/types/SpacingProps.d.ts +37 -37
- package/dts/types/SparklineInteractiveHeaderBaseProps.d.ts +7 -2
- package/dts/types/SpreadPropsSafely.d.ts +2 -2
- package/dts/types/StickyFooterProps.d.ts +17 -15
- package/dts/types/TagBaseProps.d.ts +5 -2
- package/dts/types/TextBaseProps.d.ts +7 -7
- package/dts/types/TooltipBaseProps.d.ts +1 -1
- package/dts/types/TypeOrNumber.d.ts +1 -1
- package/dts/types/Visibility.d.ts +2 -2
- package/dts/types/Weight.d.ts +1 -1
- package/dts/types/index.d.ts +1 -1
- package/dts/utils/cell.d.ts +5 -2
- package/dts/utils/chart.d.ts +1 -1
- package/dts/utils/circle.d.ts +1 -1
- package/dts/utils/convertDimensionToAspectRatio.d.ts +12 -2
- package/dts/utils/convertDimensionToSize.d.ts +3 -3
- package/dts/utils/convertSizeWithMultiplier.d.ts +8 -5
- package/dts/utils/debounce.d.ts +5 -2
- package/dts/utils/delay.d.ts +1 -1
- package/dts/utils/flattenNodes.d.ts +6 -2
- package/dts/utils/formatCount.d.ts +1 -1
- package/dts/utils/getAccessibleColor.d.ts +16 -11
- package/dts/utils/getButtonSpacingProps.d.ts +12 -9
- package/dts/utils/getDefaultAspectRatioForIllustration.d.ts +9 -2
- package/dts/utils/getDefaultSizeObjectForIllustration.d.ts +4 -2
- package/dts/utils/getRectWidthVariant.d.ts +5 -2
- package/dts/utils/getWidthInEm.d.ts +1 -1
- package/dts/utils/join.d.ts +5 -2
- package/dts/utils/mergeProps.d.ts +1 -1
- package/dts/utils/mockUtils.d.ts +1 -1
- package/dts/utils/modulate.d.ts +8 -5
- package/dts/utils/parseDotCountMaxOverflow.d.ts +1 -1
- package/dts/visualizations/getProgressCircleParams.d.ts +15 -11
- package/dts/visualizations/getSparklineRange.d.ts +11 -7
- package/dts/visualizations/getSparklineTransform.d.ts +7 -3
- package/dts/visualizations/largestTriangleThreeBucket.d.ts +1 -1
- package/dts/visualizations/useCounter.d.ts +9 -5
- package/dts/visualizations/useDateLookup.d.ts +9 -5
- package/dts/visualizations/useProgressSize.d.ts +1 -1
- package/dts/visualizations/useSparklineArea.d.ts +1 -1
- package/dts/visualizations/useSparklineAreaOpacity.d.ts +1 -1
- package/dts/visualizations/useSparklineCoordinates.d.ts +19 -12
- package/dts/visualizations/useSparklinePath.d.ts +1 -1
- package/dts/visualizations/useSparklinePathGenerator.d.ts +16 -10
- package/dts/visualizations/useTimeseriesPaths.d.ts +6 -6
- package/dts/visualizations/useVisualizationDimensions.d.ts +15 -10
- package/package.json +7 -7
- package/dts/accordion/__tests__/AccordionProvider.test.d.ts +0 -2
- package/dts/accordion/__tests__/AccordionProvider.test.d.ts.map +0 -1
- package/dts/color/__tests__/blendColors.test.d.ts +0 -2
- package/dts/color/__tests__/blendColors.test.d.ts.map +0 -1
- package/dts/color/__tests__/isLightOrDarkColor.test.d.ts +0 -2
- package/dts/color/__tests__/isLightOrDarkColor.test.d.ts.map +0 -1
- package/dts/color/__tests__/overrideAlpha.test.d.ts +0 -2
- package/dts/color/__tests__/overrideAlpha.test.d.ts.map +0 -1
- package/dts/dates/__tests__/IntlDateFormat.test.d.ts +0 -2
- package/dts/dates/__tests__/IntlDateFormat.test.d.ts.map +0 -1
- package/dts/dates/__tests__/useDateInput.test.d.ts +0 -2
- package/dts/dates/__tests__/useDateInput.test.d.ts.map +0 -1
- package/dts/hooks/__tests__/useFallbackShape.test.d.ts +0 -2
- package/dts/hooks/__tests__/useFallbackShape.test.d.ts.map +0 -1
- package/dts/hooks/__tests__/usePrefixedId.test.d.ts +0 -2
- package/dts/hooks/__tests__/usePrefixedId.test.d.ts.map +0 -1
- package/dts/hooks/__tests__/usePreviousValue.test.d.ts +0 -2
- package/dts/hooks/__tests__/usePreviousValue.test.d.ts.map +0 -1
- package/dts/hooks/__tests__/useRefMap.test.d.ts +0 -2
- package/dts/hooks/__tests__/useRefMap.test.d.ts.map +0 -1
- package/dts/hooks/__tests__/useSort.test.d.ts +0 -2
- package/dts/hooks/__tests__/useSort.test.d.ts.map +0 -1
- package/dts/hooks/__tests__/useTimer.test.d.ts +0 -2
- package/dts/hooks/__tests__/useTimer.test.d.ts.map +0 -1
- package/dts/lottie/lottieUtils.test.d.ts +0 -2
- package/dts/lottie/lottieUtils.test.d.ts.map +0 -1
- package/dts/numbers/__tests__/formatToParts.test.d.ts +0 -2
- package/dts/numbers/__tests__/formatToParts.test.d.ts.map +0 -1
- package/dts/numbers/__tests__/subscript.test.d.ts +0 -2
- package/dts/numbers/__tests__/subscript.test.d.ts.map +0 -1
- package/dts/overlays/__tests__/useOverlay.test.d.ts +0 -2
- package/dts/overlays/__tests__/useOverlay.test.d.ts.map +0 -1
- package/dts/overlays/__tests__/useToastQueue.test.d.ts +0 -2
- package/dts/overlays/__tests__/useToastQueue.test.d.ts.map +0 -1
- package/dts/stepper/__tests__/useStepper.test.d.ts +0 -2
- package/dts/stepper/__tests__/useStepper.test.d.ts.map +0 -1
- package/dts/stepper/__tests__/utils.test.d.ts +0 -2
- package/dts/stepper/__tests__/utils.test.d.ts.map +0 -1
- package/dts/system/__tests__/EventHandlerProvider.test.d.ts +0 -2
- package/dts/system/__tests__/EventHandlerProvider.test.d.ts.map +0 -1
- package/dts/tabs/__tests__/TabsContext.test.d.ts +0 -2
- package/dts/tabs/__tests__/TabsContext.test.d.ts.map +0 -1
- package/dts/tabs/__tests__/useTabs.test.d.ts +0 -2
- package/dts/tabs/__tests__/useTabs.test.d.ts.map +0 -1
- package/dts/tour/__tests__/TourContext.test.d.ts +0 -2
- package/dts/tour/__tests__/TourContext.test.d.ts.map +0 -1
- package/dts/tour/__tests__/useTour.test.d.ts +0 -2
- package/dts/tour/__tests__/useTour.test.d.ts.map +0 -1
- package/dts/utils/__tests__/cell.test.d.ts +0 -2
- package/dts/utils/__tests__/cell.test.d.ts.map +0 -1
- package/dts/utils/__tests__/chart.test.d.ts +0 -2
- package/dts/utils/__tests__/chart.test.d.ts.map +0 -1
- package/dts/utils/__tests__/flattenNodes.test.d.ts +0 -2
- package/dts/utils/__tests__/flattenNodes.test.d.ts.map +0 -1
- package/dts/utils/__tests__/formatCount.test.d.ts +0 -2
- package/dts/utils/__tests__/formatCount.test.d.ts.map +0 -1
- package/dts/utils/__tests__/getRectWidthVariant.test.d.ts +0 -2
- package/dts/utils/__tests__/getRectWidthVariant.test.d.ts.map +0 -1
- package/dts/visualizations/__tests__/getSparklineRange.test.d.ts +0 -2
- package/dts/visualizations/__tests__/getSparklineRange.test.d.ts.map +0 -1
- package/dts/visualizations/__tests__/largestTriangleThreeBucket.test.d.ts +0 -2
- package/dts/visualizations/__tests__/largestTriangleThreeBucket.test.d.ts.map +0 -1
- package/dts/visualizations/__tests__/useCounter.test.d.ts +0 -2
- package/dts/visualizations/__tests__/useCounter.test.d.ts.map +0 -1
- package/dts/visualizations/__tests__/useSparklineArea.test.d.ts +0 -2
- package/dts/visualizations/__tests__/useSparklineArea.test.d.ts.map +0 -1
- package/dts/visualizations/__tests__/useSparklineCoordinates.test.d.ts +0 -2
- package/dts/visualizations/__tests__/useSparklineCoordinates.test.d.ts.map +0 -1
- package/dts/visualizations/__tests__/useSparklinePath.test.d.ts +0 -2
- package/dts/visualizations/__tests__/useSparklinePath.test.d.ts.map +0 -1
package/dts/tokens/tags.d.ts
CHANGED
|
@@ -3,10 +3,16 @@ import type { TagColorScheme, TagIntent } from '../types/TagBaseProps';
|
|
|
3
3
|
export declare const tagHorizontalSpacing: Record<TagIntent, ThemeVars.Space>;
|
|
4
4
|
export declare const tagFontMap: Record<TagIntent, ThemeVars.FontFamily>;
|
|
5
5
|
export declare const tagBorderRadiusMap: Record<TagIntent, ThemeVars.BorderRadius>;
|
|
6
|
-
type TagColorMap = Record<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
type TagColorMap = Record<
|
|
7
|
+
TagIntent,
|
|
8
|
+
Record<
|
|
9
|
+
TagColorScheme,
|
|
10
|
+
{
|
|
11
|
+
background: ThemeVars.SpectrumColor;
|
|
12
|
+
foreground: ThemeVars.SpectrumColor;
|
|
13
|
+
}
|
|
14
|
+
>
|
|
15
|
+
>;
|
|
10
16
|
export declare const tagColorMap: TagColorMap;
|
|
11
17
|
export {};
|
|
12
|
-
//# sourceMappingURL=tags.d.ts.map
|
|
18
|
+
//# sourceMappingURL=tags.d.ts.map
|
package/dts/tokens/tile.d.ts
CHANGED
package/dts/tokens/toast.d.ts
CHANGED
package/dts/tokens/tooltip.d.ts
CHANGED
package/dts/tokens/zIndex.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export declare const zIndex: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
readonly interactable: 1;
|
|
3
|
+
readonly navigation: 2;
|
|
4
|
+
readonly portal: 100001;
|
|
5
|
+
readonly popoverMenu: 2;
|
|
6
|
+
readonly modal: 3;
|
|
7
|
+
readonly dropdown: 4;
|
|
8
|
+
readonly tooltip: 5;
|
|
9
|
+
readonly toast: 6;
|
|
10
|
+
readonly alert: 7;
|
|
11
|
+
readonly tray: 4;
|
|
12
|
+
readonly max: 2147483647;
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=zIndex.d.ts.map
|
|
14
|
+
//# sourceMappingURL=zIndex.d.ts.map
|
|
@@ -3,4 +3,4 @@ import type { TourApi } from './useTour';
|
|
|
3
3
|
export type TourContextValue<T extends string = string> = TourApi<T>;
|
|
4
4
|
export declare const TourContext: Context<TourContextValue<string> | undefined>;
|
|
5
5
|
export declare const useTourContext: <T extends string = string>() => TourContextValue<T>;
|
|
6
|
-
//# sourceMappingURL=TourContext.d.ts.map
|
|
6
|
+
//# sourceMappingURL=TourContext.d.ts.map
|
package/dts/tour/useTour.d.ts
CHANGED
|
@@ -1,98 +1,104 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type Coords, type Placement } from '@floating-ui/react-dom';
|
|
3
3
|
export type TourStepArrowComponentProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
arrow?: Partial<Coords> & {
|
|
5
|
+
centerOffset: number;
|
|
6
|
+
alignmentOffset?: number;
|
|
7
|
+
};
|
|
8
|
+
placement: Placement;
|
|
9
|
+
style?: Record<string, string | number>;
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
12
|
* The TourStepArrowComponent must forwardRef onto the underlying element for `@floating-ui` to correctly position the element.
|
|
13
13
|
*/
|
|
14
|
-
export type TourStepArrowComponent = React.ForwardRefExoticComponent<
|
|
14
|
+
export type TourStepArrowComponent = React.ForwardRefExoticComponent<
|
|
15
|
+
TourStepArrowComponentProps & {
|
|
15
16
|
ref?: React.Ref<any>;
|
|
16
|
-
}
|
|
17
|
+
}
|
|
18
|
+
>;
|
|
17
19
|
export type TourStepComponent = React.FC<Omit<TourStepValue, 'Component'>>;
|
|
18
20
|
/**
|
|
19
21
|
* Web only.
|
|
20
22
|
*/
|
|
21
23
|
export type TourScrollOptions = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
behavior?: ScrollBehavior;
|
|
25
|
+
marginX?: number;
|
|
26
|
+
marginY?: number;
|
|
25
27
|
};
|
|
26
28
|
export type TourStepValue<T extends string = string> = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
29
|
+
/**
|
|
30
|
+
* The tour step id.
|
|
31
|
+
*/
|
|
32
|
+
id: T;
|
|
33
|
+
/**
|
|
34
|
+
* The Component to render for this tour step.
|
|
35
|
+
*/
|
|
36
|
+
Component: TourStepComponent;
|
|
37
|
+
/**
|
|
38
|
+
* The TourStepArrowComponent to render for this tour step.
|
|
39
|
+
*/
|
|
40
|
+
ArrowComponent?: TourStepArrowComponent;
|
|
41
|
+
/**
|
|
42
|
+
* Disabling the tour step causes it to be skipped when calling `goNextTourStep()` or `goPreviousTourStep()`.
|
|
43
|
+
*/
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Hides the overlay when the tour is active.
|
|
47
|
+
*/
|
|
48
|
+
hideOverlay?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Callback function fired as this step becomes active. This step's `onActive` will fire simultaneously with the previously active step's `onInactive`.
|
|
51
|
+
*/
|
|
52
|
+
onActive?: () => void | Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Callback function fired right before this step becomes active. This step's `onBeforeActive` will fire simultaneously with the previously active step's `onBeforeInactive`.
|
|
55
|
+
*/
|
|
56
|
+
onBeforeActive?: () => void | Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Callback function fired as this step becomes inactive. This step's `onInactive` will fire simultaneously with the new active step's `onActive`.
|
|
59
|
+
*/
|
|
60
|
+
onInactive?: () => void | Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Callback function fired right before this step becomes inactive. This step's `onBeforeInactive` will fire simultaneously with the new active step's `onBeforeActive`.
|
|
63
|
+
*/
|
|
64
|
+
onBeforeInactive?: () => void | Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Padding to add around the edges of the TourMask's content mask.
|
|
67
|
+
*/
|
|
68
|
+
tourMaskPadding?: string | number;
|
|
69
|
+
/**
|
|
70
|
+
* Corner radius for the TourMask's content mask. Uses SVG rect element's `rx` and `ry` attributes https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/rx.
|
|
71
|
+
*/
|
|
72
|
+
tourMaskBorderRadius?: string | number;
|
|
73
|
+
/**
|
|
74
|
+
* Add styles to the TourStepArrowComponent for this tour step.
|
|
75
|
+
*/
|
|
76
|
+
arrowStyle?: Record<string, string | number>;
|
|
77
|
+
/**
|
|
78
|
+
* Web only. Disables automatically scrolling to this TourStep when it becomes active.
|
|
79
|
+
*/
|
|
80
|
+
disableAutoScroll?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Web only. Controls the scrolling behavior and margins when calling element.scrollTo() to scroll to an active TourStep target.
|
|
83
|
+
*/
|
|
84
|
+
scrollOptions?: TourScrollOptions;
|
|
83
85
|
};
|
|
84
86
|
export type TourOptions<T extends string = string> = {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
87
|
+
steps: TourStepValue<T>[];
|
|
88
|
+
activeTourStep: TourStepValue<T> | null;
|
|
89
|
+
onChange: (tourStep: TourStepValue<T> | null) => void;
|
|
88
90
|
};
|
|
89
91
|
export type TourApi<T extends string = string> = Omit<TourOptions<T>, 'onChange'> & {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
setActiveTourStep: (tourStepId: T | null) => void;
|
|
93
|
+
startTour: (tourStepId?: T) => void;
|
|
94
|
+
stopTour: () => void;
|
|
95
|
+
goNextTourStep: () => void;
|
|
96
|
+
goPreviousTourStep: () => void;
|
|
95
97
|
};
|
|
96
98
|
/** A controlled hook for managing tour state, such as the currently active tour step. */
|
|
97
|
-
export declare const useTour: <T extends string = string>({
|
|
98
|
-
|
|
99
|
+
export declare const useTour: <T extends string = string>({
|
|
100
|
+
steps,
|
|
101
|
+
activeTourStep,
|
|
102
|
+
onChange,
|
|
103
|
+
}: TourOptions<T>) => TourApi<T>;
|
|
104
|
+
//# sourceMappingURL=useTour.d.ts.map
|
|
@@ -3,4 +3,4 @@ import type { Shape } from './Shape';
|
|
|
3
3
|
export type AvatarShape = Extract<Shape, 'circle' | 'square' | 'hexagon'>;
|
|
4
4
|
export type AvatarFallback = 'image' | 'text';
|
|
5
5
|
export type AvatarFallbackColor = ThemeVars.SpectrumHue;
|
|
6
|
-
//# sourceMappingURL=AvatarBaseProps.d.ts.map
|
|
6
|
+
//# sourceMappingURL=AvatarBaseProps.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type AvatarSize = 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
|
|
2
|
-
//# sourceMappingURL=AvatarSize.d.ts.map
|
|
2
|
+
//# sourceMappingURL=AvatarSize.d.ts.map
|
|
@@ -4,59 +4,72 @@ export type FlexAxisValue = 'flex-start' | 'flex-end' | 'center';
|
|
|
4
4
|
export type FlexAlignCommon = FlexAxisValue | 'stretch';
|
|
5
5
|
export type FlexSpaceCommon = 'space-between' | 'space-around';
|
|
6
6
|
export type FlexShrink = {
|
|
7
|
-
|
|
7
|
+
flexShrink?: number;
|
|
8
8
|
};
|
|
9
9
|
export type FlexGrow = {
|
|
10
|
-
|
|
10
|
+
flexGrow?: number;
|
|
11
11
|
};
|
|
12
12
|
export type FlexStyles = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Set the distribution of space between and around content items along the cross-axis.
|
|
15
|
+
* @default flex-start
|
|
16
|
+
*/
|
|
17
|
+
alignContent?:
|
|
18
|
+
| 'flex-start'
|
|
19
|
+
| 'flex-end'
|
|
20
|
+
| 'center'
|
|
21
|
+
| 'stretch'
|
|
22
|
+
| 'space-between'
|
|
23
|
+
| 'space-around'
|
|
24
|
+
| 'space-evenly';
|
|
25
|
+
/**
|
|
26
|
+
* Set the alignment of all direct children on the cross-axis.
|
|
27
|
+
* @default stretch
|
|
28
|
+
*/
|
|
29
|
+
alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
30
|
+
/**
|
|
31
|
+
* Override the parent's defined item alignment for this element alone.
|
|
32
|
+
* @default auto
|
|
33
|
+
*/
|
|
34
|
+
alignSelf?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'auto' | 'baseline';
|
|
35
|
+
/** Sets the initial main flex size. */
|
|
36
|
+
flexBasis?: number | string;
|
|
37
|
+
/** Order children on the main-axis in this direction. */
|
|
38
|
+
flexDirection?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
39
|
+
/** Set the grow factor of this flex item. */
|
|
40
|
+
flexGrow?: number;
|
|
41
|
+
/** Set the shrink factor of this flex item. */
|
|
42
|
+
flexShrink?: number;
|
|
43
|
+
/**
|
|
44
|
+
* How should children wrap when overflowing.
|
|
45
|
+
* @default nowrap
|
|
46
|
+
*/
|
|
47
|
+
flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
48
|
+
/**
|
|
49
|
+
* Set the distribution of space between and around content items along the main-axis.
|
|
50
|
+
* @default flex-start
|
|
51
|
+
*/
|
|
52
|
+
justifyContent?:
|
|
53
|
+
| 'flex-start'
|
|
54
|
+
| 'flex-end'
|
|
55
|
+
| 'center'
|
|
56
|
+
| 'space-between'
|
|
57
|
+
| 'space-around'
|
|
58
|
+
| 'space-evenly';
|
|
46
59
|
};
|
|
47
60
|
export type PinningDirection = 'top' | 'bottom' | 'left' | 'right' | 'all';
|
|
48
61
|
export type PositionStyles = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
/** Position the box to the bottom edge. */
|
|
63
|
+
bottom?: DimensionValue;
|
|
64
|
+
/** Position the box to the left edge. */
|
|
65
|
+
left?: DimensionValue;
|
|
66
|
+
/** How to position the box within its parent. */
|
|
67
|
+
position?: Position;
|
|
68
|
+
/** Position the box to the right edge. */
|
|
69
|
+
right?: DimensionValue;
|
|
70
|
+
/** Position the box to the top edge. */
|
|
71
|
+
top?: DimensionValue;
|
|
72
|
+
/** Adjust the z-index positioning layer. */
|
|
73
|
+
zIndex?: number;
|
|
61
74
|
};
|
|
62
|
-
//# sourceMappingURL=BoxBaseProps.d.ts.map
|
|
75
|
+
//# sourceMappingURL=BoxBaseProps.d.ts.map
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
export type ButtonVariant =
|
|
2
|
-
|
|
1
|
+
export type ButtonVariant =
|
|
2
|
+
| 'primary'
|
|
3
|
+
| 'secondary'
|
|
4
|
+
| 'tertiary'
|
|
5
|
+
| 'positive'
|
|
6
|
+
| 'negative'
|
|
7
|
+
| 'foregroundMuted';
|
|
8
|
+
//# sourceMappingURL=ButtonBaseProps.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { SharedProps } from './SharedProps';
|
|
2
2
|
export type CardHeaderProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
/** Absolute or Relative path to Avatar */
|
|
4
|
+
avatar?: string;
|
|
5
|
+
/** Meta Data Text to be displayed in TextLegal */
|
|
6
|
+
metaData?: string;
|
|
7
|
+
/** Text to be displayed in TextCaption */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** IconButton ReactNode */
|
|
10
|
+
action?: React.ReactNode;
|
|
11
11
|
} & SharedProps;
|
|
12
|
-
//# sourceMappingURL=CardHeaderProps.d.ts.map
|
|
12
|
+
//# sourceMappingURL=CardHeaderProps.d.ts.map
|
|
@@ -2,26 +2,32 @@ import type { PictogramName, SpotSquareName } from '@coinbase/cds-illustrations'
|
|
|
2
2
|
import type { CardRemoteImageDimensionValue } from './CardRemoteImageProps';
|
|
3
3
|
import type { AspectRatio } from './Shape';
|
|
4
4
|
export type CardMediaPlacement = 'start' | 'above' | 'end';
|
|
5
|
-
export type CardMediaImageSizeObject =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
export type CardMediaImageSizeObject =
|
|
6
|
+
| {
|
|
7
|
+
width: CardRemoteImageDimensionValue;
|
|
8
|
+
height: CardRemoteImageDimensionValue;
|
|
9
|
+
}
|
|
10
|
+
| {
|
|
11
|
+
width: CardRemoteImageDimensionValue;
|
|
12
|
+
aspectRatio: AspectRatio;
|
|
13
|
+
};
|
|
12
14
|
export type CardMediaProps = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} & (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
/** Informs how to auto-magically size the media. */
|
|
16
|
+
placement: CardMediaPlacement;
|
|
17
|
+
testID?: string;
|
|
18
|
+
alt?: string;
|
|
19
|
+
} & (
|
|
20
|
+
| {
|
|
21
|
+
type: 'image';
|
|
22
|
+
src: string;
|
|
23
|
+
}
|
|
24
|
+
| {
|
|
25
|
+
type: 'spotSquare';
|
|
26
|
+
name: SpotSquareName;
|
|
27
|
+
}
|
|
28
|
+
| {
|
|
29
|
+
type: 'pictogram';
|
|
30
|
+
name: PictogramName;
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
//# sourceMappingURL=CardMediaProps.d.ts.map
|
|
@@ -2,17 +2,21 @@ import type { AspectRatio } from './Shape';
|
|
|
2
2
|
import type { SharedProps } from './SharedProps';
|
|
3
3
|
export type CardRemoteImageDimensionValue = number | `${number}%`;
|
|
4
4
|
export type CardRemoteImageProps = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} & SharedProps &
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
/** The url to the image asset */
|
|
6
|
+
src: string;
|
|
7
|
+
width?: CardRemoteImageDimensionValue;
|
|
8
|
+
height?: CardRemoteImageDimensionValue;
|
|
9
|
+
aspectRatio?: AspectRatio;
|
|
10
|
+
alt?: string;
|
|
11
|
+
} & SharedProps &
|
|
12
|
+
(
|
|
13
|
+
| {
|
|
14
|
+
width: CardRemoteImageDimensionValue;
|
|
15
|
+
aspectRatio: AspectRatio;
|
|
16
|
+
}
|
|
17
|
+
| {
|
|
18
|
+
width: CardRemoteImageDimensionValue;
|
|
19
|
+
height: CardRemoteImageDimensionValue;
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
//# sourceMappingURL=CardRemoteImageProps.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type CdsPlatform = 'mobile' | 'web';
|
|
2
|
-
//# sourceMappingURL=CdsPlatform.d.ts.map
|
|
2
|
+
//# sourceMappingURL=CdsPlatform.d.ts.map
|
|
@@ -2,7 +2,7 @@ import type { cellPriorities } from '../tokens/cell';
|
|
|
2
2
|
import type { MarginProps, PaddingProps } from '../types';
|
|
3
3
|
export type CellPriority = (typeof cellPriorities)[number];
|
|
4
4
|
export type CellSpacingConfig = {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
innerSpacing?: PaddingProps & MarginProps;
|
|
6
|
+
outerSpacing?: PaddingProps & MarginProps;
|
|
7
7
|
};
|
|
8
|
-
//# sourceMappingURL=CellBaseProps.d.ts.map
|
|
8
|
+
//# sourceMappingURL=CellBaseProps.d.ts.map
|
package/dts/types/Chart.d.ts
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import type { ScaleTime } from 'd3-scale';
|
|
2
2
|
export type ChartDataPoint = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
value: number;
|
|
4
|
+
date: Date;
|
|
5
|
+
x?: number;
|
|
6
|
+
y?: number;
|
|
7
7
|
};
|
|
8
8
|
export type ChartData = ChartDataPoint[];
|
|
9
9
|
export type ChartTimeseries = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
points: ChartData;
|
|
11
|
+
id: string;
|
|
12
|
+
strokeColor: string;
|
|
13
13
|
};
|
|
14
14
|
export type ChartFormatDate<Period extends string> = (value: Date, period: Period) => string;
|
|
15
15
|
export type ChartFormatAmount = (value: string | number) => string;
|
|
16
16
|
export type ChartScrubParams<T> = {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
point: ChartDataPoint;
|
|
18
|
+
period: T;
|
|
19
19
|
};
|
|
20
20
|
export type ChartXFunction = ScaleTime<number, number>;
|
|
21
|
-
export type ChartGetMarker = (xPos: number) =>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
export type ChartGetMarker = (xPos: number) =>
|
|
22
|
+
| {
|
|
23
|
+
value: number;
|
|
24
|
+
date: Date;
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}
|
|
28
|
+
| undefined;
|
|
29
|
+
//# sourceMappingURL=Chart.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type CollapsibleDirection = 'vertical' | 'horizontal';
|
|
2
|
-
//# sourceMappingURL=CollapsibleBaseProps.d.ts.map
|
|
2
|
+
//# sourceMappingURL=CollapsibleBaseProps.d.ts.map
|
package/dts/types/Color.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EventHandlerCustomConfig } from '../system/EventHandlerProvider';
|
|
2
2
|
export type ComponentEventHandlerProps = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
eventConfig?: EventHandlerCustomConfig;
|
|
4
|
+
analyticsId?: string;
|
|
5
5
|
};
|
|
6
|
-
//# sourceMappingURL=ComponentEventHandlerProps.d.ts.map
|
|
6
|
+
//# sourceMappingURL=ComponentEventHandlerProps.d.ts.map
|