@coinbase/cds-common 8.13.1 → 8.13.5
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 +58 -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/candles.d.ts +9 -0
- package/dts/internal/data/candles.d.ts.map +1 -0
- 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/TourContext.d.ts.map +1 -1
- package/dts/tour/useTour.d.ts +86 -77
- package/dts/tour/useTour.d.ts.map +1 -1
- 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/esm/internal/data/assets.js +1 -1
- package/esm/internal/data/candles.js +2101 -0
- package/esm/tour/useTour.js +5 -2
- 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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Takes an array of Dates and Date tuples for date ranges, and generates a flattened array of corresponding Date.getTime() numbers, with the time set to midnight. A number will be generated for every individual date within a date range.
|
|
3
3
|
*/
|
|
4
|
-
export declare const getTimesFromDatesAndRanges: (
|
|
5
|
-
|
|
4
|
+
export declare const getTimesFromDatesAndRanges: (
|
|
5
|
+
datesAndRanges: (Date | [Date, Date])[],
|
|
6
|
+
) => number[];
|
|
7
|
+
//# sourceMappingURL=getTimesFromDatesAndRanges.d.ts.map
|
|
@@ -1,23 +1,39 @@
|
|
|
1
1
|
import { type DateInputValidationError } from './DateInputValidationError';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
type DateInputValidationApi,
|
|
4
|
+
type DateInputValidationOptions,
|
|
5
|
+
} from './useDateInputValidation';
|
|
3
6
|
export type DateInputOptions = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
/** Control the date value of the DateInput. */
|
|
8
|
+
date: Date | null;
|
|
9
|
+
/** Callback function fired when the date changes, e.g. when a valid date is selected or unselected. */
|
|
10
|
+
onChangeDate: (date: Date | null) => void;
|
|
11
|
+
/** Control the error value of the DateInput. */
|
|
12
|
+
error: DateInputValidationError | null;
|
|
13
|
+
/** Callback function fired when validation finds an error, e.g. required input fields and impossible or disabled dates. Will always be called after `onChangeDate`. */
|
|
14
|
+
onErrorDate: (error: DateInputValidationError | null) => void;
|
|
12
15
|
} & DateInputValidationOptions;
|
|
13
16
|
export type DateInputApi = {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
/** The DateInput's date string value. */
|
|
18
|
+
inputValue: string;
|
|
19
|
+
/** Callback that handles a DateInput's changing date string value. Updates the `inputValue` state and calls `onChangeDate` and `onErrorDate` as necessary. */
|
|
20
|
+
onChangeDateInput: (newDateString: string) => void;
|
|
21
|
+
/** The DateInput's placeholder value. */
|
|
22
|
+
placeholder: string;
|
|
20
23
|
} & DateInputValidationApi;
|
|
21
24
|
/** Accepts DateInputOptions and returns a DateInputApi, which can be used to control a custom DateInput component. */
|
|
22
|
-
export declare const useDateInput: ({
|
|
23
|
-
|
|
25
|
+
export declare const useDateInput: ({
|
|
26
|
+
date,
|
|
27
|
+
onChangeDate,
|
|
28
|
+
error,
|
|
29
|
+
onErrorDate,
|
|
30
|
+
intlDateFormat,
|
|
31
|
+
required,
|
|
32
|
+
disabledDates,
|
|
33
|
+
minDate,
|
|
34
|
+
maxDate,
|
|
35
|
+
requiredError,
|
|
36
|
+
invalidDateError,
|
|
37
|
+
disabledDateError,
|
|
38
|
+
}: DateInputOptions) => DateInputApi;
|
|
39
|
+
//# sourceMappingURL=useDateInput.d.ts.map
|
|
@@ -1,46 +1,55 @@
|
|
|
1
1
|
import { DateInputValidationError } from './DateInputValidationError';
|
|
2
2
|
import { type IntlDateFormat } from './IntlDateFormat';
|
|
3
3
|
export type DateInputValidationOptions = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
4
|
+
/** The DateInput's IntlDateFormat. */
|
|
5
|
+
intlDateFormat: IntlDateFormat;
|
|
6
|
+
/** If required, the `requiredError` will be displayed if a user blurs the input, without a date selected, after having typed into it. */
|
|
7
|
+
required?: boolean;
|
|
8
|
+
/** Array of disabled dates, and date tuples for date ranges. Make sure to set `disabledDateError` as well. A number is created for every individual date within a tuple range, so do not abuse this with massive ranges. */
|
|
9
|
+
disabledDates?: (Date | [Date, Date])[];
|
|
10
|
+
/** Minimum date allowed to be selected, inclusive. Dates before the `minDate` are disabled. Make sure to set `disabledDateError` as well. */
|
|
11
|
+
minDate?: Date;
|
|
12
|
+
/** Maximum date allowed to be selected, inclusive. Dates after the `maxDate` are disabled. Make sure to set `disabledDateError` as well. */
|
|
13
|
+
maxDate?: Date;
|
|
14
|
+
/**
|
|
15
|
+
* Error text to display when `required` is true and a user blurs the input without a date selected, after having typed into it.
|
|
16
|
+
* @default 'This field is required'
|
|
17
|
+
*/
|
|
18
|
+
requiredError?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Error text to display when an impossible date is selected, e.g. 99/99/2000. This should always be defined for accessibility. Also displays when a date is selected that is more than 100 years before the `minDate`, or more than 100 years after the `maxDate`.
|
|
21
|
+
* @default 'Please enter a valid date'
|
|
22
|
+
*/
|
|
23
|
+
invalidDateError?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Error text to display when a disabled date is selected, including dates before the `minDate` or after the `maxDate`. However if the selected date is more than 100 years before the `minDate` or more than 100 years after the `maxDate`, the `invalidDateError` will be displayed instead.
|
|
26
|
+
* @default 'Date unavailable'
|
|
27
|
+
*/
|
|
28
|
+
disabledDateError?: string;
|
|
29
29
|
};
|
|
30
30
|
export type DateInputValidationApi = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
/** Validates an IntlDateFormat date string against the DateInputValidationOptions like disabledDates, minDate, maxDate, and required. */
|
|
32
|
+
validateDateInput: (dateString: string) => DateInputValidationError | null;
|
|
33
|
+
/** Flat array of disabled date times set to midnight, generated from `disabledDates` option. */
|
|
34
|
+
disabledTimes: number[];
|
|
35
|
+
/** Date time set to midnight, generated from `minDate` option. */
|
|
36
|
+
minTime: number | undefined;
|
|
37
|
+
/** Date time set to midnight, generated from `maxDate` option. */
|
|
38
|
+
maxTime: number | undefined;
|
|
39
39
|
};
|
|
40
|
-
export declare const useDateInputValidation: ({
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
export declare const useDateInputValidation: ({
|
|
41
|
+
intlDateFormat,
|
|
42
|
+
required,
|
|
43
|
+
disabledDates,
|
|
44
|
+
minDate,
|
|
45
|
+
maxDate,
|
|
46
|
+
requiredError,
|
|
47
|
+
invalidDateError,
|
|
48
|
+
disabledDateError,
|
|
49
|
+
}: DateInputValidationOptions) => {
|
|
50
|
+
validateDateInput: (dateString: string) => DateInputValidationError | null;
|
|
51
|
+
disabledTimes: number[];
|
|
52
|
+
minTime: number | undefined;
|
|
53
|
+
maxTime: number | undefined;
|
|
45
54
|
};
|
|
46
|
-
//# sourceMappingURL=useDateInputValidation.d.ts.map
|
|
55
|
+
//# sourceMappingURL=useDateInputValidation.d.ts.map
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type {
|
|
2
|
+
EventHandlerAction,
|
|
3
|
+
EventHandlerComponent,
|
|
4
|
+
EventHandlerCustomConfig,
|
|
5
|
+
} from '../system/EventHandlerProvider';
|
|
6
|
+
export declare const useEventHandler: (
|
|
7
|
+
component: EventHandlerComponent,
|
|
8
|
+
action: EventHandlerAction,
|
|
9
|
+
eventConfig?: EventHandlerCustomConfig,
|
|
10
|
+
analyticsId?: string,
|
|
11
|
+
) => () => void;
|
|
12
|
+
//# sourceMappingURL=useEventHandler.d.ts.map
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { Shape } from '../types/Shape';
|
|
2
2
|
export type UseFallbackShapeOptions = {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
disableRandomRectWidth?: boolean;
|
|
4
|
+
rectWidthVariant?: number;
|
|
5
5
|
};
|
|
6
|
-
export declare function useFallbackShape(
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export declare function useFallbackShape(
|
|
7
|
+
shape: Shape,
|
|
8
|
+
baseWidth: number | string,
|
|
9
|
+
options?: UseFallbackShapeOptions,
|
|
10
|
+
): {
|
|
11
|
+
borderRadius: number;
|
|
12
|
+
width: string | number;
|
|
9
13
|
};
|
|
10
|
-
//# sourceMappingURL=useFallbackShape.d.ts.map
|
|
14
|
+
//# sourceMappingURL=useFallbackShape.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export type GroupToggleState<T extends string> = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
select: (value?: T) => void;
|
|
3
|
+
unselect: (value?: T) => void;
|
|
4
|
+
toggle: (value?: T) => void;
|
|
5
|
+
isAllSelected: boolean | 'mixed';
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
@@ -19,5 +19,8 @@ export type GroupToggleState<T extends string> = {
|
|
|
19
19
|
]
|
|
20
20
|
*/
|
|
21
21
|
/** @deprecated Do not use this. */
|
|
22
|
-
export declare const useGroupToggler: <T extends string>(
|
|
23
|
-
|
|
22
|
+
export declare const useGroupToggler: <T extends string>(
|
|
23
|
+
values: T[],
|
|
24
|
+
initialState?: T[],
|
|
25
|
+
) => [Set<T>, GroupToggleState<T>];
|
|
26
|
+
//# sourceMappingURL=useGroupToggler.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const useHasMounted: () => boolean;
|
|
2
|
-
//# sourceMappingURL=useHasMounted.d.ts.map
|
|
2
|
+
//# sourceMappingURL=useHasMounted.d.ts.map
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
type StepTrackerParams = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
length: number;
|
|
3
|
+
startIndex?: number;
|
|
4
|
+
onDecrement?: (newIndex: number) => void;
|
|
5
|
+
onIncrement?: (newIndex: number) => void;
|
|
6
|
+
onMinDecrement?: () => void;
|
|
7
|
+
onMaxIncrement?: () => void;
|
|
8
8
|
};
|
|
9
|
-
export declare function useIndexCounter({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
export declare function useIndexCounter({
|
|
10
|
+
length,
|
|
11
|
+
startIndex,
|
|
12
|
+
onDecrement,
|
|
13
|
+
onIncrement,
|
|
14
|
+
onMinDecrement,
|
|
15
|
+
onMaxIncrement,
|
|
16
|
+
}: StepTrackerParams): {
|
|
17
|
+
activeIndex: number;
|
|
18
|
+
setActiveIndex: import('react').Dispatch<import('react').SetStateAction<number>>;
|
|
19
|
+
isAtMin: boolean;
|
|
20
|
+
isAtMax: boolean;
|
|
21
|
+
handleDecrement: () => void;
|
|
22
|
+
handleIncrement: () => void;
|
|
16
23
|
};
|
|
17
24
|
export {};
|
|
18
|
-
//# sourceMappingURL=useIndexCounter.d.ts.map
|
|
25
|
+
//# sourceMappingURL=useIndexCounter.d.ts.map
|
package/dts/hooks/useLogo.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import type { ColorScheme } from '../core/theme';
|
|
2
|
-
export declare const blue =
|
|
3
|
-
export declare const black =
|
|
4
|
-
export declare const white =
|
|
2
|
+
export declare const blue = '#0052FF';
|
|
3
|
+
export declare const black = '#0A0B0D';
|
|
4
|
+
export declare const white = '#FFFFFF';
|
|
5
5
|
export type LogoMarkParams = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
size?: 16 | 24 | 32;
|
|
7
|
+
foreground?: boolean;
|
|
8
|
+
colorScheme: ColorScheme;
|
|
9
9
|
};
|
|
10
10
|
export type LogoWordmarkParams = {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
foreground?: boolean;
|
|
12
|
+
colorScheme: ColorScheme;
|
|
13
13
|
};
|
|
14
14
|
export declare const useLogoWordmark: ({ foreground, colorScheme }: LogoWordmarkParams) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
color: string;
|
|
16
|
+
viewBox: string;
|
|
17
|
+
path: string;
|
|
18
18
|
};
|
|
19
19
|
export declare const useLogoMark: ({ size, foreground, colorScheme }: LogoMarkParams) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
color: string;
|
|
21
|
+
path: string;
|
|
22
|
+
viewBox: string;
|
|
23
|
+
width: 32 | 16 | 24;
|
|
24
|
+
height: 32 | 16 | 24;
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=useLogo.d.ts.map
|
|
26
|
+
//# sourceMappingURL=useLogo.d.ts.map
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export declare const useMergeRefs: <T = any>(
|
|
2
|
-
|
|
1
|
+
export declare const useMergeRefs: <T = any>(
|
|
2
|
+
...refs: (React.MutableRefObject<T> | React.LegacyRef<T> | undefined | null)[]
|
|
3
|
+
) => React.RefCallback<T>;
|
|
4
|
+
//# sourceMappingURL=useMergeRefs.d.ts.map
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
type IdentifierPrefix = string | string[] | null;
|
|
2
|
-
type PrefixedIdResult<T extends IdentifierPrefix> = T extends string
|
|
2
|
+
type PrefixedIdResult<T extends IdentifierPrefix> = T extends string
|
|
3
|
+
? string
|
|
4
|
+
: T extends string[]
|
|
5
|
+
? string[]
|
|
6
|
+
: string;
|
|
3
7
|
/**
|
|
4
8
|
* Returns a prefixed id or array of prefixed ids from React.useId
|
|
5
9
|
* that are SSR safe and unique across the application.
|
|
@@ -7,6 +11,8 @@ type PrefixedIdResult<T extends IdentifierPrefix> = T extends string ? string :
|
|
|
7
11
|
* @link https://react.dev/reference/react/useId#useid
|
|
8
12
|
* @returns string | string[]
|
|
9
13
|
*/
|
|
10
|
-
export declare const usePrefixedId: <T extends IdentifierPrefix = null>(
|
|
14
|
+
export declare const usePrefixedId: <T extends IdentifierPrefix = null>(
|
|
15
|
+
identifierPrefix?: T,
|
|
16
|
+
) => PrefixedIdResult<T>;
|
|
11
17
|
export {};
|
|
12
|
-
//# sourceMappingURL=usePrefixedId.d.ts.map
|
|
18
|
+
//# sourceMappingURL=usePrefixedId.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const usePreviousValue: <T>(value: T) => T | undefined;
|
|
2
|
-
//# sourceMappingURL=usePreviousValue.d.ts.map
|
|
2
|
+
//# sourceMappingURL=usePreviousValue.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare function usePreviousValues<T>(initialValues?: T[]): {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
addPreviousValue: (newValue: T) => void;
|
|
3
|
+
getPreviousValue: (allowDuplicates?: boolean) => T | undefined;
|
|
4
4
|
};
|
|
5
|
-
//# sourceMappingURL=usePreviousValues.d.ts.map
|
|
5
|
+
//# sourceMappingURL=usePreviousValues.d.ts.map
|
package/dts/hooks/useRefMap.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export type RefMapOptions<RefValue> = {
|
|
2
|
-
|
|
2
|
+
initialRefMap?: Record<string, RefValue>;
|
|
3
3
|
};
|
|
4
4
|
export type RefMapItem = {
|
|
5
|
-
|
|
5
|
+
id: string;
|
|
6
6
|
};
|
|
7
7
|
export type RefMapApi<RefValue> = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
refs: Record<string, RefValue>;
|
|
9
|
+
getRef: (id: string) => RefValue | null;
|
|
10
|
+
registerRef: (id: string, ref: RefValue) => void;
|
|
11
11
|
};
|
|
12
|
-
export declare const useRefMap: <RefValue>({
|
|
13
|
-
|
|
12
|
+
export declare const useRefMap: <RefValue>({
|
|
13
|
+
initialRefMap,
|
|
14
|
+
}?: RefMapOptions<RefValue>) => RefMapApi<RefValue>;
|
|
15
|
+
//# sourceMappingURL=useRefMap.d.ts.map
|
package/dts/hooks/useSort.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { RecursiveKeyOf } from '../types/Helpers';
|
|
2
2
|
type UseSortParams<T> = Readonly<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
/** An array of data we want to sort. */
|
|
4
|
+
data: readonly T[];
|
|
5
|
+
/**
|
|
6
|
+
* Key for the item we're sorting.
|
|
7
|
+
* Use null/undefined to sort a simple array of strings or numbers
|
|
8
|
+
* @example 'asset.name'
|
|
9
|
+
*/
|
|
10
|
+
sortBy?: RecursiveKeyOf<T>;
|
|
11
|
+
/**
|
|
12
|
+
* The direction to sort items.
|
|
13
|
+
* @default ascending
|
|
14
|
+
*/
|
|
15
|
+
sortDirection?: React.TdHTMLAttributes<HTMLTableCellElement>['aria-sort'];
|
|
16
16
|
}>;
|
|
17
17
|
export declare const useSort: <T>({ data, sortBy, sortDirection }: UseSortParams<T>) => T[];
|
|
18
18
|
export {};
|
|
19
|
-
//# sourceMappingURL=useSort.d.ts.map
|
|
19
|
+
//# sourceMappingURL=useSort.d.ts.map
|
|
@@ -1,62 +1,70 @@
|
|
|
1
1
|
import type { ColorScheme } from '../core/theme';
|
|
2
2
|
type SubBrandLogoData = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
viewBox: string;
|
|
4
|
+
logoPath: string;
|
|
5
|
+
typePath: string;
|
|
6
6
|
};
|
|
7
7
|
type SubBrandLogoDataByType = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
analytics: SubBrandLogoData;
|
|
9
|
+
ventures: SubBrandLogoData;
|
|
10
|
+
assetHub: SubBrandLogoData;
|
|
11
|
+
commerce: SubBrandLogoData;
|
|
12
|
+
wallet: SubBrandLogoData;
|
|
13
|
+
internationalExchange: SubBrandLogoData;
|
|
14
|
+
privateClient: SubBrandLogoData;
|
|
15
|
+
account: SubBrandLogoData;
|
|
16
|
+
card: SubBrandLogoData;
|
|
17
|
+
cloud: SubBrandLogoData;
|
|
18
|
+
nft: SubBrandLogoData;
|
|
19
|
+
pay: SubBrandLogoData;
|
|
20
|
+
help: SubBrandLogoData;
|
|
21
|
+
tracer: SubBrandLogoData;
|
|
22
|
+
exchange: SubBrandLogoData;
|
|
23
|
+
one: SubBrandLogoData;
|
|
24
|
+
business: SubBrandLogoData;
|
|
25
25
|
};
|
|
26
26
|
type SubBrandLogoMarkData = SubBrandLogoDataByType & {
|
|
27
|
-
|
|
27
|
+
base: SubBrandLogoData;
|
|
28
28
|
};
|
|
29
29
|
type SubBrandLogoWordmarkData = SubBrandLogoDataByType & {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
advanced: SubBrandLogoData;
|
|
31
|
+
derivativesExchange: SubBrandLogoData;
|
|
32
|
+
prime: SubBrandLogoData;
|
|
33
33
|
};
|
|
34
34
|
export type SubBrandLogoType = keyof SubBrandLogoDataByType;
|
|
35
35
|
export type SubBrandLogoMarkType = keyof SubBrandLogoMarkData;
|
|
36
36
|
export type SubBrandLogoWordmarkType = keyof SubBrandLogoWordmarkData;
|
|
37
37
|
export type SubBrandLogoWordmarkParams = {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
type: SubBrandLogoWordmarkType;
|
|
39
|
+
foreground?: boolean;
|
|
40
|
+
colorScheme: ColorScheme;
|
|
41
41
|
};
|
|
42
42
|
export type SubBrandLogoMarkParams = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
export declare const useSubBrandLogoWordmark: ({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
43
|
+
type: SubBrandLogoMarkType;
|
|
44
|
+
foreground?: boolean;
|
|
45
|
+
colorScheme: ColorScheme;
|
|
46
|
+
};
|
|
47
|
+
export declare const useSubBrandLogoWordmark: ({
|
|
48
|
+
foreground,
|
|
49
|
+
type,
|
|
50
|
+
colorScheme,
|
|
51
|
+
}: SubBrandLogoWordmarkParams) => {
|
|
52
|
+
logoColor: string;
|
|
53
|
+
typeColor: string;
|
|
54
|
+
viewBox: string;
|
|
55
|
+
logoPath: string;
|
|
56
|
+
typePath: string;
|
|
57
|
+
};
|
|
58
|
+
export declare const useSubBrandLogoMark: ({
|
|
59
|
+
foreground,
|
|
60
|
+
type,
|
|
61
|
+
colorScheme,
|
|
62
|
+
}: SubBrandLogoMarkParams) => {
|
|
63
|
+
logoColor: string;
|
|
64
|
+
typeColor: string;
|
|
65
|
+
viewBox: string;
|
|
66
|
+
logoPath: string;
|
|
67
|
+
typePath: string;
|
|
60
68
|
};
|
|
61
69
|
export {};
|
|
62
|
-
//# sourceMappingURL=useSubBrandLogo.d.ts.map
|
|
70
|
+
//# sourceMappingURL=useSubBrandLogo.d.ts.map
|
package/dts/hooks/useTimer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const useTimer: () => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
start: (callback: () => void, duration: number) => void;
|
|
3
|
+
clear: () => void;
|
|
4
|
+
pause: () => number;
|
|
5
|
+
resume: () => void;
|
|
6
6
|
};
|
|
7
|
-
//# sourceMappingURL=useTimer.d.ts.map
|
|
7
|
+
//# sourceMappingURL=useTimer.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @deprecated Use React.useState instead. */
|
|
2
2
|
export declare function useToggler(initial?: boolean): [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
boolean,
|
|
4
|
+
{
|
|
5
|
+
toggleOn: () => void;
|
|
6
|
+
toggleOff: () => void;
|
|
7
|
+
toggle: () => void;
|
|
8
|
+
},
|
|
9
9
|
];
|
|
10
|
-
//# sourceMappingURL=useToggler.d.ts.map
|
|
10
|
+
//# sourceMappingURL=useToggler.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const useValueChanges: (newValue: string) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
hasChanged: boolean;
|
|
3
|
+
hasNotChanged: boolean;
|
|
4
|
+
previousValue: unknown;
|
|
5
|
+
newValue: string;
|
|
6
|
+
addPreviousValue: (newValue: unknown) => void;
|
|
7
7
|
};
|
|
8
|
-
//# sourceMappingURL=useValueChanges.d.ts.map
|
|
8
|
+
//# sourceMappingURL=useValueChanges.d.ts.map
|
package/dts/index.d.ts
CHANGED