@coinbase/cds-web 8.66.2 → 9.0.0-rc.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/CHANGELOG.md +6 -0
- package/dts/AccessibilityAnnouncer/AccessibilityAnnouncer.d.ts +14 -16
- package/dts/AccessibilityAnnouncer/AccessibilityAnnouncer.d.ts.map +1 -1
- package/dts/accordion/AccordionHeader.d.ts +16 -18
- package/dts/accordion/AccordionHeader.d.ts.map +1 -1
- package/dts/accordion/AccordionItem.d.ts +2 -2
- package/dts/accordion/AccordionItem.d.ts.map +1 -1
- package/dts/accordion/AccordionPanel.d.ts +11 -13
- package/dts/accordion/AccordionPanel.d.ts.map +1 -1
- package/dts/alpha/combobox/DefaultComboboxControl.d.ts.map +1 -1
- package/dts/alpha/select/DefaultSelectControl.d.ts.map +1 -1
- package/dts/alpha/select/DefaultSelectDropdown.d.ts.map +1 -1
- package/dts/alpha/select/DefaultSelectOption.d.ts.map +1 -1
- package/dts/alpha/select/DefaultSelectOptionGroup.d.ts.map +1 -1
- package/dts/alpha/select/types.d.ts +6 -1
- package/dts/alpha/select/types.d.ts.map +1 -1
- package/dts/animation/Lottie.d.ts +3 -5
- package/dts/animation/Lottie.d.ts.map +1 -1
- package/dts/animation/LottieStatusAnimation.d.ts +2 -3
- package/dts/animation/LottieStatusAnimation.d.ts.map +1 -1
- package/dts/animation/useLottieLoader.d.ts +1 -1
- package/dts/banner/Banner.d.ts +26 -2
- package/dts/banner/Banner.d.ts.map +1 -1
- package/dts/buttons/AvatarButton.d.ts +89 -1
- package/dts/buttons/AvatarButton.d.ts.map +1 -1
- package/dts/buttons/Button.d.ts.map +1 -1
- package/dts/buttons/IconButton.d.ts.map +1 -1
- package/dts/buttons/IconCounterButton.d.ts +22 -11
- package/dts/buttons/IconCounterButton.d.ts.map +1 -1
- package/dts/buttons/Tile.d.ts +1 -1
- package/dts/buttons/Tile.d.ts.map +1 -1
- package/dts/cards/AnnouncementCard.d.ts +2 -2
- package/dts/cards/AnnouncementCard.d.ts.map +1 -1
- package/dts/cards/Card.d.ts +4 -0
- package/dts/cards/Card.d.ts.map +1 -1
- package/dts/cards/CardGroup.d.ts +2 -4
- package/dts/cards/CardGroup.d.ts.map +1 -1
- package/dts/cards/CardMedia.d.ts.map +1 -1
- package/dts/cards/FeatureEntryCard.d.ts +2 -6
- package/dts/cards/FeatureEntryCard.d.ts.map +1 -1
- package/dts/cards/FeedCard.d.ts +2 -6
- package/dts/cards/FeedCard.d.ts.map +1 -1
- package/dts/cards/LikeButton.d.ts +2 -3
- package/dts/cards/LikeButton.d.ts.map +1 -1
- package/dts/cards/UpsellCard.d.ts +7 -2
- package/dts/cards/UpsellCard.d.ts.map +1 -1
- package/dts/carousel/Carousel.d.ts +12 -19
- package/dts/carousel/Carousel.d.ts.map +1 -1
- package/dts/carousel/DefaultCarouselPagination.d.ts.map +1 -1
- package/dts/cells/Cell.d.ts.map +1 -1
- package/dts/cells/CellAccessory.d.ts +2 -4
- package/dts/cells/CellAccessory.d.ts.map +1 -1
- package/dts/cells/CellHelperText.d.ts +2 -4
- package/dts/cells/CellHelperText.d.ts.map +1 -1
- package/dts/cells/ContentCellFallback.d.ts +4 -0
- package/dts/cells/ContentCellFallback.d.ts.map +1 -1
- package/dts/cells/ListCell.d.ts.map +1 -1
- package/dts/cells/MediaFallback.d.ts +1 -2
- package/dts/cells/MediaFallback.d.ts.map +1 -1
- package/dts/chips/Chip.d.ts +3 -5
- package/dts/chips/Chip.d.ts.map +1 -1
- package/dts/chips/ChipProps.d.ts.map +1 -1
- package/dts/chips/InputChip.d.ts +2 -4
- package/dts/chips/InputChip.d.ts.map +1 -1
- package/dts/chips/MediaChip.d.ts +2 -4
- package/dts/chips/MediaChip.d.ts.map +1 -1
- package/dts/chips/SelectChip.d.ts +2 -2
- package/dts/chips/SelectChip.d.ts.map +1 -1
- package/dts/coachmark/Coachmark.d.ts +4 -4
- package/dts/coachmark/Coachmark.d.ts.map +1 -1
- package/dts/collapsible/Collapsible.d.ts +32 -34
- package/dts/collapsible/Collapsible.d.ts.map +1 -1
- package/dts/collapsible/useCollapsibleMotionProps.d.ts +328 -288
- package/dts/collapsible/useCollapsibleMotionProps.d.ts.map +1 -1
- package/dts/controls/CheckboxGroup.d.ts +2 -26
- package/dts/controls/CheckboxGroup.d.ts.map +1 -1
- package/dts/controls/Control.d.ts +28 -6
- package/dts/controls/Control.d.ts.map +1 -1
- package/dts/controls/HelperText.d.ts +14 -0
- package/dts/controls/HelperText.d.ts.map +1 -1
- package/dts/controls/InputIcon.d.ts +2 -2
- package/dts/controls/InputIcon.d.ts.map +1 -1
- package/dts/controls/InputIconButton.d.ts +2 -4
- package/dts/controls/InputIconButton.d.ts.map +1 -1
- package/dts/controls/InputStack.d.ts +23 -3
- package/dts/controls/InputStack.d.ts.map +1 -1
- package/dts/controls/NativeInput.d.ts +6 -4
- package/dts/controls/NativeInput.d.ts.map +1 -1
- package/dts/controls/NativeTextArea.d.ts +2 -4
- package/dts/controls/NativeTextArea.d.ts.map +1 -1
- package/dts/controls/RadioGroup.d.ts +2 -24
- package/dts/controls/RadioGroup.d.ts.map +1 -1
- package/dts/controls/SearchInput.d.ts +8 -6
- package/dts/controls/SearchInput.d.ts.map +1 -1
- package/dts/controls/SegmentedControl.d.ts +2 -2
- package/dts/controls/SegmentedControl.d.ts.map +1 -1
- package/dts/controls/Select.d.ts +21 -23
- package/dts/controls/Select.d.ts.map +1 -1
- package/dts/controls/SelectOption.d.ts +4 -0
- package/dts/controls/SelectOption.d.ts.map +1 -1
- package/dts/controls/SelectStack.d.ts +10 -12
- package/dts/controls/SelectStack.d.ts.map +1 -1
- package/dts/controls/SelectTrigger.d.ts +8 -10
- package/dts/controls/SelectTrigger.d.ts.map +1 -1
- package/dts/controls/Switch.d.ts +80 -30
- package/dts/controls/Switch.d.ts.map +1 -1
- package/dts/controls/TextInput.d.ts +8 -7
- package/dts/controls/TextInput.d.ts.map +1 -1
- package/dts/controls/selectContext.d.ts +16 -0
- package/dts/controls/selectContext.d.ts.map +1 -1
- package/dts/controls/useRefocusTrigger.d.ts +1 -1
- package/dts/controls/useRefocusTrigger.d.ts.map +1 -1
- package/dts/dates/Calendar.d.ts +58 -60
- package/dts/dates/Calendar.d.ts.map +1 -1
- package/dts/dates/DateInput.d.ts +2 -4
- package/dts/dates/DateInput.d.ts.map +1 -1
- package/dts/dates/DatePicker.d.ts +2 -4
- package/dts/dates/DatePicker.d.ts.map +1 -1
- package/dts/dots/DotCount.d.ts +12 -0
- package/dts/dots/DotCount.d.ts.map +1 -1
- package/dts/dropdown/Dropdown.d.ts +33 -35
- package/dts/dropdown/Dropdown.d.ts.map +1 -1
- package/dts/dropdown/DropdownContent.d.ts +7 -10
- package/dts/dropdown/DropdownContent.d.ts.map +1 -1
- package/dts/dropdown/useResponsiveHeight.d.ts +2 -2
- package/dts/dropdown/useResponsiveHeight.d.ts.map +1 -1
- package/dts/hooks/useCellSpacing.d.ts +48 -164
- package/dts/hooks/useCellSpacing.d.ts.map +1 -1
- package/dts/hooks/useClickOutside.d.ts +1 -3
- package/dts/hooks/useClickOutside.d.ts.map +1 -1
- package/dts/hooks/useDimensions.d.ts +2 -2
- package/dts/hooks/useDimensions.d.ts.map +1 -1
- package/dts/hooks/useHorizontalScrollToTarget.d.ts +1 -1
- package/dts/hooks/useResolveResponsiveProp.d.ts +19 -0
- package/dts/hooks/useResolveResponsiveProp.d.ts.map +1 -0
- package/dts/icons/Icon.d.ts +6 -3
- package/dts/icons/Icon.d.ts.map +1 -1
- package/dts/layout/Box.d.ts +4 -1
- package/dts/layout/Box.d.ts.map +1 -1
- package/dts/layout/Grid.d.ts +2 -3
- package/dts/layout/Grid.d.ts.map +1 -1
- package/dts/layout/Group.d.ts +4 -4
- package/dts/layout/Group.d.ts.map +1 -1
- package/dts/loaders/Spinner.d.ts +2 -1
- package/dts/loaders/Spinner.d.ts.map +1 -1
- package/dts/media/Hexagon.d.ts.map +1 -1
- package/dts/media/RemoteImageGroup.d.ts.map +1 -1
- package/dts/motion/ColorSurge.d.ts +8 -10
- package/dts/motion/ColorSurge.d.ts.map +1 -1
- package/dts/motion/Pulse.d.ts +21 -23
- package/dts/motion/Pulse.d.ts.map +1 -1
- package/dts/motion/Shake.d.ts +4 -6
- package/dts/motion/Shake.d.ts.map +1 -1
- package/dts/motion/useMotionProps.d.ts +710 -630
- package/dts/motion/useMotionProps.d.ts.map +1 -1
- package/dts/motion/utils.d.ts +326 -286
- package/dts/motion/utils.d.ts.map +1 -1
- package/dts/navigation/NavigationTitleSelect.d.ts.map +1 -1
- package/dts/navigation/SidebarItem.d.ts +22 -5
- package/dts/navigation/SidebarItem.d.ts.map +1 -1
- package/dts/numbers/RollingNumber/DefaultRollingNumberDigit.d.ts.map +1 -1
- package/dts/numbers/RollingNumber/RollingNumber.d.ts.map +1 -1
- package/dts/overlays/Alert.d.ts +56 -58
- package/dts/overlays/Alert.d.ts.map +1 -1
- package/dts/overlays/Portal.d.ts +8 -6
- package/dts/overlays/Portal.d.ts.map +1 -1
- package/dts/overlays/PortalProvider.d.ts +17 -0
- package/dts/overlays/PortalProvider.d.ts.map +1 -1
- package/dts/overlays/Toast.d.ts +2 -2
- package/dts/overlays/Toast.d.ts.map +1 -1
- package/dts/overlays/modal/FullscreenModalHeader.d.ts +2 -4
- package/dts/overlays/modal/FullscreenModalHeader.d.ts.map +1 -1
- package/dts/overlays/modal/FullscreenModalLayout.d.ts +20 -22
- package/dts/overlays/modal/FullscreenModalLayout.d.ts.map +1 -1
- package/dts/overlays/modal/Modal.d.ts +6 -8
- package/dts/overlays/modal/Modal.d.ts.map +1 -1
- package/dts/overlays/modal/ModalBody.d.ts +2 -4
- package/dts/overlays/modal/ModalBody.d.ts.map +1 -1
- package/dts/overlays/modal/ModalHeader.d.ts.map +1 -1
- package/dts/overlays/modal/ModalWrapper.d.ts +2 -4
- package/dts/overlays/modal/ModalWrapper.d.ts.map +1 -1
- package/dts/overlays/overlay/Overlay.d.ts +2 -2
- package/dts/overlays/overlay/Overlay.d.ts.map +1 -1
- package/dts/overlays/popover/Popover.d.ts +38 -40
- package/dts/overlays/popover/Popover.d.ts.map +1 -1
- package/dts/overlays/popover/PopoverPanelContent.d.ts +18 -20
- package/dts/overlays/popover/PopoverPanelContent.d.ts.map +1 -1
- package/dts/overlays/popover/usePopper.d.ts +4 -0
- package/dts/overlays/popover/usePopper.d.ts.map +1 -1
- package/dts/overlays/tooltip/Tooltip.d.ts.map +1 -1
- package/dts/overlays/tooltip/TooltipContent.d.ts +10 -12
- package/dts/overlays/tooltip/TooltipContent.d.ts.map +1 -1
- package/dts/overlays/tooltip/TooltipProps.d.ts +1 -2
- package/dts/overlays/tooltip/TooltipProps.d.ts.map +1 -1
- package/dts/overlays/tray/Tray.d.ts +114 -118
- package/dts/overlays/tray/Tray.d.ts.map +1 -1
- package/dts/overlays/useModal.d.ts +1 -1
- package/dts/page/PageFooter.d.ts +4 -6
- package/dts/page/PageFooter.d.ts.map +1 -1
- package/dts/page/PageHeader.d.ts +4 -6
- package/dts/page/PageHeader.d.ts.map +1 -1
- package/dts/section-header/SectionHeader.d.ts +2 -4
- package/dts/section-header/SectionHeader.d.ts.map +1 -1
- package/dts/stepper/DefaultStepperHeaderHorizontal.d.ts.map +1 -1
- package/dts/stepper/DefaultStepperLabelHorizontal.d.ts +1 -1
- package/dts/stepper/DefaultStepperLabelHorizontal.d.ts.map +1 -1
- package/dts/stepper/DefaultStepperProgressHorizontal.d.ts +1 -1
- package/dts/stepper/DefaultStepperProgressHorizontal.d.ts.map +1 -1
- package/dts/stepper/DefaultStepperProgressVertical.d.ts +1 -1
- package/dts/stepper/DefaultStepperProgressVertical.d.ts.map +1 -1
- package/dts/stepper/DefaultStepperStepHorizontal.d.ts.map +1 -1
- package/dts/stepper/Stepper.d.ts +25 -14
- package/dts/stepper/Stepper.d.ts.map +1 -1
- package/dts/styles/styleProps.d.ts +12 -8
- package/dts/styles/styleProps.d.ts.map +1 -1
- package/dts/system/BrowserOnly.d.ts +1 -1
- package/dts/system/BrowserOnly.d.ts.map +1 -1
- package/dts/system/ButtonOrLink.d.ts +5 -7
- package/dts/system/ButtonOrLink.d.ts.map +1 -1
- package/dts/system/Interactable.d.ts +10 -12
- package/dts/system/Interactable.d.ts.map +1 -1
- package/dts/system/ThemeProvider.d.ts +48 -26
- package/dts/system/ThemeProvider.d.ts.map +1 -1
- package/dts/system/interactableCSSProperties.d.ts +11 -11
- package/dts/system/interactableCSSProperties.d.ts.map +1 -1
- package/dts/tables/Table.d.ts +40 -43
- package/dts/tables/Table.d.ts.map +1 -1
- package/dts/tables/TableCell.d.ts +2 -1
- package/dts/tables/TableCell.d.ts.map +1 -1
- package/dts/tabs/DefaultTab.d.ts +17 -19
- package/dts/tabs/DefaultTab.d.ts.map +1 -1
- package/dts/tabs/Paddle.d.ts.map +1 -1
- package/dts/tabs/SegmentedTab.d.ts +25 -27
- package/dts/tabs/SegmentedTab.d.ts.map +1 -1
- package/dts/tabs/TabIndicator.d.ts +11 -13
- package/dts/tabs/TabIndicator.d.ts.map +1 -1
- package/dts/tabs/TabNavigation.d.ts +6 -0
- package/dts/tabs/TabNavigation.d.ts.map +1 -1
- package/dts/tabs/Tabs.d.ts.map +1 -1
- package/dts/tabs/hooks/useAnimateTabIndicator.d.ts +710 -630
- package/dts/tabs/hooks/useAnimateTabIndicator.d.ts.map +1 -1
- package/dts/tag/Tag.d.ts +2 -2
- package/dts/tag/Tag.d.ts.map +1 -1
- package/dts/tour/DefaultTourStepArrow.d.ts +2 -2
- package/dts/tour/DefaultTourStepArrow.d.ts.map +1 -1
- package/dts/tour/Tour.d.ts.map +1 -1
- package/dts/tour/TourStep.d.ts.map +1 -1
- package/dts/typography/Text.d.ts +4 -1
- package/dts/typography/Text.d.ts.map +1 -1
- package/dts/typography/TextBody.d.ts +12 -0
- package/dts/typography/TextBody.d.ts.map +1 -1
- package/dts/typography/TextCaption.d.ts +12 -0
- package/dts/typography/TextCaption.d.ts.map +1 -1
- package/dts/typography/TextDisplay1.d.ts +12 -0
- package/dts/typography/TextDisplay1.d.ts.map +1 -1
- package/dts/typography/TextDisplay2.d.ts +12 -0
- package/dts/typography/TextDisplay2.d.ts.map +1 -1
- package/dts/typography/TextDisplay3.d.ts +12 -0
- package/dts/typography/TextDisplay3.d.ts.map +1 -1
- package/dts/typography/TextHeadline.d.ts +12 -0
- package/dts/typography/TextHeadline.d.ts.map +1 -1
- package/dts/typography/TextInherited.d.ts +12 -0
- package/dts/typography/TextInherited.d.ts.map +1 -1
- package/dts/typography/TextLabel1.d.ts +12 -0
- package/dts/typography/TextLabel1.d.ts.map +1 -1
- package/dts/typography/TextLabel2.d.ts +12 -0
- package/dts/typography/TextLabel2.d.ts.map +1 -1
- package/dts/typography/TextLegal.d.ts +12 -0
- package/dts/typography/TextLegal.d.ts.map +1 -1
- package/dts/typography/TextTitle1.d.ts +12 -0
- package/dts/typography/TextTitle1.d.ts.map +1 -1
- package/dts/typography/TextTitle2.d.ts +12 -0
- package/dts/typography/TextTitle2.d.ts.map +1 -1
- package/dts/typography/TextTitle3.d.ts +12 -0
- package/dts/typography/TextTitle3.d.ts.map +1 -1
- package/dts/typography/TextTitle4.d.ts +12 -0
- package/dts/typography/TextTitle4.d.ts.map +1 -1
- package/dts/utils/flattenAndJoinNodes.d.ts +13 -1
- package/dts/utils/flattenAndJoinNodes.d.ts.map +1 -1
- package/dts/visualizations/ProgressBar.d.ts +45 -47
- package/dts/visualizations/ProgressBar.d.ts.map +1 -1
- package/dts/visualizations/ProgressCircle.d.ts +63 -65
- package/dts/visualizations/ProgressCircle.d.ts.map +1 -1
- package/dts/visualizations/VisualizationContainer.d.ts +3 -4
- package/dts/visualizations/VisualizationContainer.d.ts.map +1 -1
- package/dts/visualizations/chart/CartesianChart.d.ts +104 -0
- package/dts/visualizations/chart/CartesianChart.d.ts.map +1 -0
- package/dts/visualizations/chart/ChartProvider.d.ts +9 -0
- package/dts/visualizations/chart/ChartProvider.d.ts.map +1 -0
- package/dts/visualizations/chart/Path.d.ts +100 -0
- package/dts/visualizations/chart/Path.d.ts.map +1 -0
- package/dts/visualizations/chart/PeriodSelector.d.ts +73 -0
- package/dts/visualizations/chart/PeriodSelector.d.ts.map +1 -0
- package/dts/visualizations/chart/area/Area.d.ts +83 -0
- package/dts/visualizations/chart/area/Area.d.ts.map +1 -0
- package/dts/visualizations/chart/area/AreaChart.d.ts +90 -0
- package/dts/visualizations/chart/area/AreaChart.d.ts.map +1 -0
- package/dts/visualizations/chart/area/DottedArea.d.ts +45 -0
- package/dts/visualizations/chart/area/DottedArea.d.ts.map +1 -0
- package/dts/visualizations/chart/area/GradientArea.d.ts +39 -0
- package/dts/visualizations/chart/area/GradientArea.d.ts.map +1 -0
- package/dts/visualizations/chart/area/SolidArea.d.ts +23 -0
- package/dts/visualizations/chart/area/SolidArea.d.ts.map +1 -0
- package/dts/visualizations/chart/area/index.d.ts +6 -0
- package/dts/visualizations/chart/area/index.d.ts.map +1 -0
- package/dts/visualizations/chart/axis/Axis.d.ts +254 -0
- package/dts/visualizations/chart/axis/Axis.d.ts.map +1 -0
- package/dts/visualizations/chart/axis/DefaultAxisTickLabel.d.ts +8 -0
- package/dts/visualizations/chart/axis/DefaultAxisTickLabel.d.ts.map +1 -0
- package/dts/visualizations/chart/axis/XAxis.d.ts +22 -0
- package/dts/visualizations/chart/axis/XAxis.d.ts.map +1 -0
- package/dts/visualizations/chart/axis/YAxis.d.ts +22 -0
- package/dts/visualizations/chart/axis/YAxis.d.ts.map +1 -0
- package/dts/visualizations/chart/axis/index.d.ts +5 -0
- package/dts/visualizations/chart/axis/index.d.ts.map +1 -0
- package/dts/visualizations/chart/bar/Bar.d.ts +102 -0
- package/dts/visualizations/chart/bar/Bar.d.ts.map +1 -0
- package/dts/visualizations/chart/bar/BarChart.d.ts +83 -0
- package/dts/visualizations/chart/bar/BarChart.d.ts.map +1 -0
- package/dts/visualizations/chart/bar/BarPlot.d.ts +31 -0
- package/dts/visualizations/chart/bar/BarPlot.d.ts.map +1 -0
- package/dts/visualizations/chart/bar/BarStack.d.ts +141 -0
- package/dts/visualizations/chart/bar/BarStack.d.ts.map +1 -0
- package/dts/visualizations/chart/bar/BarStackGroup.d.ts +37 -0
- package/dts/visualizations/chart/bar/BarStackGroup.d.ts.map +1 -0
- package/dts/visualizations/chart/bar/DefaultBar.d.ts +17 -0
- package/dts/visualizations/chart/bar/DefaultBar.d.ts.map +1 -0
- package/dts/visualizations/chart/bar/DefaultBarStack.d.ts +16 -0
- package/dts/visualizations/chart/bar/DefaultBarStack.d.ts.map +1 -0
- package/dts/visualizations/chart/bar/PercentageBarChart.d.ts +61 -0
- package/dts/visualizations/chart/bar/PercentageBarChart.d.ts.map +1 -0
- package/dts/visualizations/chart/bar/index.d.ts +9 -0
- package/dts/visualizations/chart/bar/index.d.ts.map +1 -0
- package/dts/visualizations/chart/gradient/Gradient.d.ts +43 -0
- package/dts/visualizations/chart/gradient/Gradient.d.ts.map +1 -0
- package/dts/visualizations/chart/gradient/index.d.ts +2 -0
- package/dts/visualizations/chart/gradient/index.d.ts.map +1 -0
- package/dts/visualizations/chart/index.d.ts +15 -0
- package/dts/visualizations/chart/index.d.ts.map +1 -0
- package/dts/visualizations/chart/legend/DefaultLegendEntry.d.ts +21 -0
- package/dts/visualizations/chart/legend/DefaultLegendEntry.d.ts.map +1 -0
- package/dts/visualizations/chart/legend/DefaultLegendShape.d.ts +7 -0
- package/dts/visualizations/chart/legend/DefaultLegendShape.d.ts.map +1 -0
- package/dts/visualizations/chart/legend/Legend.d.ts +139 -0
- package/dts/visualizations/chart/legend/Legend.d.ts.map +1 -0
- package/dts/visualizations/chart/legend/index.d.ts +4 -0
- package/dts/visualizations/chart/legend/index.d.ts.map +1 -0
- package/dts/visualizations/chart/line/DefaultReferenceLineLabel.d.ts +9 -0
- package/dts/visualizations/chart/line/DefaultReferenceLineLabel.d.ts.map +1 -0
- package/dts/visualizations/chart/line/DottedLine.d.ts +26 -0
- package/dts/visualizations/chart/line/DottedLine.d.ts.map +1 -0
- package/dts/visualizations/chart/line/Line.d.ts +146 -0
- package/dts/visualizations/chart/line/Line.d.ts.map +1 -0
- package/dts/visualizations/chart/line/LineChart.d.ts +77 -0
- package/dts/visualizations/chart/line/LineChart.d.ts.map +1 -0
- package/dts/visualizations/chart/line/ReferenceLine.d.ts +187 -0
- package/dts/visualizations/chart/line/ReferenceLine.d.ts.map +1 -0
- package/dts/visualizations/chart/line/SolidLine.d.ts +25 -0
- package/dts/visualizations/chart/line/SolidLine.d.ts.map +1 -0
- package/dts/visualizations/chart/line/index.d.ts +7 -0
- package/dts/visualizations/chart/line/index.d.ts.map +1 -0
- package/dts/visualizations/chart/point/DefaultPointLabel.d.ts +10 -0
- package/dts/visualizations/chart/point/DefaultPointLabel.d.ts.map +1 -0
- package/dts/visualizations/chart/point/Point.d.ts +225 -0
- package/dts/visualizations/chart/point/Point.d.ts.map +1 -0
- package/dts/visualizations/chart/point/index.d.ts +3 -0
- package/dts/visualizations/chart/point/index.d.ts.map +1 -0
- package/dts/visualizations/chart/scrubber/DefaultScrubberBeacon.d.ts +39 -0
- package/dts/visualizations/chart/scrubber/DefaultScrubberBeacon.d.ts.map +1 -0
- package/dts/visualizations/chart/scrubber/DefaultScrubberBeaconLabel.d.ts +12 -0
- package/dts/visualizations/chart/scrubber/DefaultScrubberBeaconLabel.d.ts.map +1 -0
- package/dts/visualizations/chart/scrubber/DefaultScrubberLabel.d.ts +11 -0
- package/dts/visualizations/chart/scrubber/DefaultScrubberLabel.d.ts.map +1 -0
- package/dts/visualizations/chart/scrubber/Scrubber.d.ts +390 -0
- package/dts/visualizations/chart/scrubber/Scrubber.d.ts.map +1 -0
- package/dts/visualizations/chart/scrubber/ScrubberBeaconGroup.d.ts +78 -0
- package/dts/visualizations/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -0
- package/dts/visualizations/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +56 -0
- package/dts/visualizations/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -0
- package/dts/visualizations/chart/scrubber/ScrubberProvider.d.ts +17 -0
- package/dts/visualizations/chart/scrubber/ScrubberProvider.d.ts.map +1 -0
- package/dts/visualizations/chart/scrubber/index.d.ts +5 -0
- package/dts/visualizations/chart/scrubber/index.d.ts.map +1 -0
- package/dts/visualizations/chart/text/ChartText.d.ts +117 -0
- package/dts/visualizations/chart/text/ChartText.d.ts.map +1 -0
- package/dts/visualizations/chart/text/ChartTextGroup.d.ts +61 -0
- package/dts/visualizations/chart/text/ChartTextGroup.d.ts.map +1 -0
- package/dts/visualizations/chart/text/index.d.ts +3 -0
- package/dts/visualizations/chart/text/index.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/axis.d.ts +391 -0
- package/dts/visualizations/chart/utils/axis.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/bar.d.ts +223 -0
- package/dts/visualizations/chart/utils/bar.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/chart.d.ts +158 -0
- package/dts/visualizations/chart/utils/chart.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/context.d.ts +117 -0
- package/dts/visualizations/chart/utils/context.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/gradient.d.ts +116 -0
- package/dts/visualizations/chart/utils/gradient.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/index.d.ts +12 -0
- package/dts/visualizations/chart/utils/index.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/interpolate.d.ts +112 -0
- package/dts/visualizations/chart/utils/interpolate.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/path.d.ts +156 -0
- package/dts/visualizations/chart/utils/path.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/point.d.ts +115 -0
- package/dts/visualizations/chart/utils/point.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/scale.d.ts +54 -0
- package/dts/visualizations/chart/utils/scale.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/scrubber.d.ts +40 -0
- package/dts/visualizations/chart/utils/scrubber.d.ts.map +1 -0
- package/dts/visualizations/chart/utils/transition.d.ts +101 -0
- package/dts/visualizations/chart/utils/transition.d.ts.map +1 -0
- package/dts/visualizations/index.d.ts +2 -0
- package/dts/visualizations/index.d.ts.map +1 -1
- package/dts/visualizations/sparkline/Counter.d.ts +8 -0
- package/dts/visualizations/sparkline/Counter.d.ts.map +1 -0
- package/dts/visualizations/sparkline/Sparkline.d.ts +66 -0
- package/dts/visualizations/sparkline/Sparkline.d.ts.map +1 -0
- package/dts/visualizations/sparkline/SparklineArea.d.ts +14 -0
- package/dts/visualizations/sparkline/SparklineArea.d.ts.map +1 -0
- package/dts/visualizations/sparkline/SparklineAreaPattern.d.ts +14 -0
- package/dts/visualizations/sparkline/SparklineAreaPattern.d.ts.map +1 -0
- package/dts/visualizations/sparkline/SparklineGradient.d.ts +22 -0
- package/dts/visualizations/sparkline/SparklineGradient.d.ts.map +1 -0
- package/dts/visualizations/sparkline/SparklinePath.d.ts +12 -0
- package/dts/visualizations/sparkline/SparklinePath.d.ts.map +1 -0
- package/dts/visualizations/sparkline/__figma__/Sparkline.figma.d.ts +2 -0
- package/dts/visualizations/sparkline/__figma__/Sparkline.figma.d.ts.map +1 -0
- package/dts/visualizations/sparkline/generateSparklineWithId.d.ts +11 -0
- package/dts/visualizations/sparkline/generateSparklineWithId.d.ts.map +1 -0
- package/dts/visualizations/sparkline/index.d.ts +6 -0
- package/dts/visualizations/sparkline/index.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/InnerSparklineInteractiveProvider.d.ts +13 -0
- package/dts/visualizations/sparkline/sparkline-interactive/InnerSparklineInteractiveProvider.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractive.d.ts +200 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractive.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts +26 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.d.ts +5 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveHoverPrice.d.ts +5 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveHoverPrice.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.d.ts +8 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.d.ts +17 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts +25 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.d.ts +25 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveProvider.d.ts +25 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveProvider.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveScrubHandler.d.ts +30 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveScrubHandler.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveScrubProvider.d.ts +18 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveScrubProvider.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.d.ts +31 -0
- package/dts/visualizations/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts +2 -0
- package/dts/visualizations/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/fade.d.ts +3 -0
- package/dts/visualizations/sparkline/sparkline-interactive/fade.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive/useSparklineInteractiveConstants.d.ts +13 -0
- package/dts/visualizations/sparkline/sparkline-interactive/useSparklineInteractiveConstants.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.d.ts +110 -0
- package/dts/visualizations/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.d.ts.map +1 -0
- package/dts/visualizations/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts +2 -0
- package/dts/visualizations/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts.map +1 -0
- package/esm/alpha/combobox/DefaultComboboxControl.js +6 -6
- package/esm/alpha/select/DefaultSelectControl.js +26 -21
- package/esm/alpha/select/DefaultSelectDropdown.js +9 -4
- package/esm/alpha/select/DefaultSelectOption.css +1 -1
- package/esm/alpha/select/DefaultSelectOption.js +0 -1
- package/esm/animation/LottieStatusAnimation.js +1 -1
- package/esm/animation/useLottieLoader.js +1 -1
- package/esm/banner/Banner.js +119 -86
- package/esm/buttons/AvatarButton.css +1 -1
- package/esm/buttons/AvatarButton.js +8 -10
- package/esm/buttons/Button.css +1 -3
- package/esm/buttons/Button.js +26 -12
- package/esm/buttons/IconButton.css +1 -3
- package/esm/buttons/IconButton.js +23 -13
- package/esm/buttons/IconCounterButton.js +14 -6
- package/esm/cards/Card.js +5 -0
- package/esm/cards/CardMedia.js +6 -10
- package/esm/cards/FeatureEntryCard.js +0 -5
- package/esm/cards/FeedCard.js +0 -5
- package/esm/cards/LikeButton.js +14 -8
- package/esm/cards/UpsellCard.js +11 -3
- package/esm/cards/__figma__/UpsellCard.figma.js +3 -1
- package/esm/carousel/Carousel.js +4 -3
- package/esm/carousel/DefaultCarouselPagination.js +10 -4
- package/esm/carousel/__figma__/Carousel.figma.js +0 -1
- package/esm/cells/Cell.js +48 -9
- package/esm/cells/CellAccessory.js +3 -2
- package/esm/cells/ContentCellFallback.js +5 -0
- package/esm/cells/ListCell.js +8 -3
- package/esm/cells/MediaFallback.js +5 -5
- package/esm/coachmark/Coachmark.js +3 -2
- package/esm/collapsible/Collapsible.js +30 -25
- package/esm/controls/CheckboxGroup.js +0 -26
- package/esm/controls/Control.js +36 -12
- package/esm/controls/HelperText.js +18 -2
- package/esm/controls/InputIcon.js +3 -4
- package/esm/controls/InputIconButton.js +1 -1
- package/esm/controls/InputStack.js +15 -5
- package/esm/controls/Radio.css +1 -1
- package/esm/controls/Radio.js +1 -1
- package/esm/controls/RadioGroup.js +0 -25
- package/esm/controls/SearchInput.js +5 -0
- package/esm/controls/SegmentedControl.css +1 -1
- package/esm/controls/SegmentedControl.js +2 -1
- package/esm/controls/SelectOption.js +4 -0
- package/esm/controls/Switch.js +34 -10
- package/esm/controls/TextInput.js +5 -5
- package/esm/controls/selectContext.js +21 -0
- package/esm/dates/DateInput.js +3 -4
- package/esm/dates/DatePicker.js +2 -2
- package/esm/dots/DotCount.css +1 -1
- package/esm/dots/DotCount.js +14 -5
- package/esm/dots/DotSymbol.js +2 -2
- package/esm/hooks/useDimensions.js +1 -1
- package/esm/hooks/useResolveResponsiveProp.js +31 -0
- package/esm/media/Avatar.js +2 -2
- package/esm/media/Hexagon.js +3 -2
- package/esm/navigation/NavigationTitleSelect.js +25 -6
- package/esm/navigation/SidebarItem.js +43 -13
- package/esm/numbers/RollingNumber/DefaultRollingNumberDigit.js +3 -1
- package/esm/numbers/RollingNumber/RollingNumber.js +1 -1
- package/esm/overlays/Alert.js +3 -3
- package/esm/overlays/FocusTrap.js +2 -3
- package/esm/overlays/Portal.js +7 -0
- package/esm/overlays/PortalProvider.js +20 -0
- package/esm/overlays/Toast.js +5 -4
- package/esm/overlays/modal/FullscreenModalLayout.js +3 -2
- package/esm/overlays/modal/ModalHeader.js +10 -5
- package/esm/overlays/overlay/OverlayContent.js +3 -4
- package/esm/overlays/popover/usePopper.js +7 -0
- package/esm/overlays/tooltip/__figma__/Tooltip.figma.js +5 -3
- package/esm/overlays/useModal.js +1 -1
- package/esm/stepper/DefaultStepperHeaderHorizontal.js +20 -16
- package/esm/stepper/DefaultStepperLabelHorizontal.js +18 -14
- package/esm/stepper/DefaultStepperProgressHorizontal.js +19 -7
- package/esm/stepper/DefaultStepperProgressVertical.js +50 -38
- package/esm/stepper/DefaultStepperStepHorizontal.js +6 -4
- package/esm/stepper/DefaultStepperStepVertical.js +5 -5
- package/esm/stepper/Stepper.js +59 -66
- package/esm/styles/styleProps.js +3 -0
- package/esm/system/Interactable.css +1 -1
- package/esm/system/Interactable.js +4 -2
- package/esm/system/Pressable.css +1 -1
- package/esm/system/PressableOpacity.js +2 -2
- package/esm/system/ThemeProvider.js +43 -15
- package/esm/system/interactableCSSProperties.js +11 -11
- package/esm/tabs/Paddle.js +4 -4
- package/esm/tabs/TabLabel.js +7 -9
- package/esm/tabs/TabNavigation.js +8 -7
- package/esm/tabs/Tabs.js +3 -1
- package/esm/tour/Tour.js +4 -1
- package/esm/tour/TourStep.js +5 -1
- package/esm/typography/TextBody.js +15 -0
- package/esm/typography/TextCaption.js +15 -0
- package/esm/typography/TextDisplay1.js +15 -0
- package/esm/typography/TextDisplay2.js +15 -0
- package/esm/typography/TextDisplay3.js +15 -0
- package/esm/typography/TextHeadline.js +15 -0
- package/esm/typography/TextInherited.js +15 -0
- package/esm/typography/TextLabel1.js +15 -0
- package/esm/typography/TextLabel2.js +15 -0
- package/esm/typography/TextLegal.js +15 -0
- package/esm/typography/TextTitle1.js +15 -0
- package/esm/typography/TextTitle2.js +15 -0
- package/esm/typography/TextTitle3.js +15 -0
- package/esm/typography/TextTitle4.js +15 -0
- package/esm/visualizations/chart/CartesianChart.css +1 -0
- package/esm/visualizations/chart/CartesianChart.js +379 -0
- package/esm/visualizations/chart/ChartProvider.js +10 -0
- package/esm/visualizations/chart/Path.js +125 -0
- package/esm/visualizations/chart/PeriodSelector.css +1 -0
- package/esm/visualizations/chart/PeriodSelector.js +130 -0
- package/esm/visualizations/chart/area/Area.js +85 -0
- package/esm/visualizations/chart/area/AreaChart.js +173 -0
- package/esm/visualizations/chart/area/DottedArea.js +95 -0
- package/esm/visualizations/chart/area/GradientArea.js +72 -0
- package/esm/visualizations/chart/area/SolidArea.js +52 -0
- package/esm/visualizations/chart/area/index.js +7 -0
- package/esm/visualizations/chart/axis/Axis.js +11 -0
- package/esm/visualizations/chart/axis/DefaultAxisTickLabel.js +15 -0
- package/esm/visualizations/chart/axis/XAxis.css +2 -0
- package/esm/visualizations/chart/axis/XAxis.js +315 -0
- package/esm/visualizations/chart/axis/YAxis.css +2 -0
- package/esm/visualizations/chart/axis/YAxis.js +316 -0
- package/esm/visualizations/chart/axis/index.js +6 -0
- package/esm/visualizations/chart/bar/Bar.js +69 -0
- package/esm/visualizations/chart/bar/BarChart.js +128 -0
- package/esm/visualizations/chart/bar/BarPlot.js +92 -0
- package/esm/visualizations/chart/bar/BarStack.js +173 -0
- package/esm/visualizations/chart/bar/BarStackGroup.js +95 -0
- package/esm/visualizations/chart/bar/DefaultBar.js +82 -0
- package/esm/visualizations/chart/bar/DefaultBarStack.js +71 -0
- package/esm/visualizations/chart/bar/PercentageBarChart.js +102 -0
- package/esm/visualizations/chart/bar/index.js +10 -0
- package/esm/visualizations/chart/gradient/Gradient.js +106 -0
- package/esm/visualizations/chart/gradient/index.js +1 -0
- package/esm/visualizations/chart/index.js +16 -0
- package/esm/visualizations/chart/legend/DefaultLegendEntry.css +1 -0
- package/esm/visualizations/chart/legend/DefaultLegendEntry.js +50 -0
- package/esm/visualizations/chart/legend/DefaultLegendShape.css +5 -0
- package/esm/visualizations/chart/legend/DefaultLegendShape.js +47 -0
- package/esm/visualizations/chart/legend/Legend.js +76 -0
- package/esm/visualizations/chart/legend/index.js +3 -0
- package/esm/visualizations/chart/line/DefaultReferenceLineLabel.js +81 -0
- package/esm/visualizations/chart/line/DottedLine.js +64 -0
- package/esm/visualizations/chart/line/Line.js +183 -0
- package/esm/visualizations/chart/line/LineChart.js +142 -0
- package/esm/visualizations/chart/line/ReferenceLine.js +144 -0
- package/esm/visualizations/chart/line/SolidLine.js +60 -0
- package/esm/visualizations/chart/line/index.js +8 -0
- package/esm/visualizations/chart/point/DefaultPointLabel.js +45 -0
- package/esm/visualizations/chart/point/Point.css +2 -0
- package/esm/visualizations/chart/point/Point.js +201 -0
- package/esm/visualizations/chart/point/index.js +2 -0
- package/esm/visualizations/chart/scrubber/DefaultScrubberBeacon.js +154 -0
- package/esm/visualizations/chart/scrubber/DefaultScrubberBeaconLabel.js +57 -0
- package/esm/visualizations/chart/scrubber/DefaultScrubberLabel.js +48 -0
- package/esm/visualizations/chart/scrubber/Scrubber.js +200 -0
- package/esm/visualizations/chart/scrubber/ScrubberBeaconGroup.js +190 -0
- package/esm/visualizations/chart/scrubber/ScrubberBeaconLabelGroup.js +209 -0
- package/esm/visualizations/chart/scrubber/ScrubberProvider.js +233 -0
- package/esm/visualizations/chart/scrubber/index.js +4 -0
- package/esm/visualizations/chart/text/ChartText.js +231 -0
- package/esm/visualizations/chart/text/ChartTextGroup.js +227 -0
- package/esm/visualizations/chart/text/index.js +4 -0
- package/esm/visualizations/chart/utils/axis.js +666 -0
- package/esm/visualizations/chart/utils/bar.js +952 -0
- package/esm/visualizations/chart/utils/chart.js +314 -0
- package/esm/visualizations/chart/utils/context.js +22 -0
- package/esm/visualizations/chart/utils/gradient.js +270 -0
- package/esm/visualizations/chart/utils/index.js +13 -0
- package/esm/visualizations/chart/utils/interpolate.js +644 -0
- package/esm/visualizations/chart/utils/path.js +254 -0
- package/esm/visualizations/chart/utils/point.js +214 -0
- package/esm/visualizations/chart/utils/scale.js +59 -0
- package/esm/visualizations/chart/utils/scrubber.js +137 -0
- package/esm/visualizations/chart/utils/transition.js +132 -0
- package/esm/visualizations/index.js +3 -1
- package/esm/visualizations/sparkline/Counter.css +3 -0
- package/esm/visualizations/sparkline/Counter.js +35 -0
- package/esm/visualizations/sparkline/Sparkline.js +165 -0
- package/esm/visualizations/sparkline/SparklineArea.js +19 -0
- package/esm/visualizations/sparkline/SparklineAreaPattern.js +37 -0
- package/esm/visualizations/sparkline/SparklineGradient.js +31 -0
- package/esm/visualizations/sparkline/SparklinePath.js +19 -0
- package/esm/visualizations/sparkline/__figma__/Sparkline.figma.js +24 -0
- package/esm/visualizations/sparkline/generateSparklineWithId.js +7 -0
- package/esm/visualizations/sparkline/index.js +5 -0
- package/esm/visualizations/sparkline/sparkline-interactive/InnerSparklineInteractiveProvider.js +21 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractive.js +318 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.js +108 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.css +2 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.js +27 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveHoverPrice.css +2 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveHoverPrice.js +25 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.css +4 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.js +65 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.css +1 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.js +85 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractivePaths.js +56 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.js +71 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveProvider.js +45 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveScrubHandler.css +5 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveScrubHandler.js +201 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveScrubProvider.js +39 -0
- package/esm/visualizations/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.js +92 -0
- package/esm/visualizations/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.js +89 -0
- package/esm/visualizations/sparkline/sparkline-interactive/fade.css +2 -0
- package/esm/visualizations/sparkline/sparkline-interactive/fade.js +15 -0
- package/esm/visualizations/sparkline/sparkline-interactive/useSparklineInteractiveConstants.js +28 -0
- package/esm/visualizations/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.js +226 -0
- package/esm/visualizations/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.js +108 -0
- package/package.json +23 -10
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Rect, SharedProps } from '@coinbase/cds-common/types';
|
|
3
|
+
import { type BoxProps } from '../../../layout';
|
|
4
|
+
import { type ChartInset } from '../utils';
|
|
5
|
+
type ValidChartTextChildElements =
|
|
6
|
+
| React.ReactElement<React.SVGProps<SVGTSpanElement>, 'tspan'>
|
|
7
|
+
| React.ReactElement<React.SVGProps<SVGTextPathElement>, 'textPath'>;
|
|
8
|
+
/**
|
|
9
|
+
* The supported content types for ChartText.
|
|
10
|
+
*/
|
|
11
|
+
export type ChartTextChildren =
|
|
12
|
+
| string
|
|
13
|
+
| number
|
|
14
|
+
| null
|
|
15
|
+
| undefined
|
|
16
|
+
| ValidChartTextChildElements
|
|
17
|
+
| ValidChartTextChildElements[];
|
|
18
|
+
/**
|
|
19
|
+
* Horizontal alignment options for chart text.
|
|
20
|
+
*/
|
|
21
|
+
export type TextHorizontalAlignment = 'left' | 'center' | 'right';
|
|
22
|
+
/**
|
|
23
|
+
* Vertical alignment options for chart text.
|
|
24
|
+
*/
|
|
25
|
+
export type TextVerticalAlignment = 'top' | 'middle' | 'bottom';
|
|
26
|
+
export type ChartTextBaseProps = SharedProps & {
|
|
27
|
+
/**
|
|
28
|
+
* The text color.
|
|
29
|
+
* @default 'var(--color-fgMuted)'
|
|
30
|
+
*/
|
|
31
|
+
color?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The background color of the text's background rectangle.
|
|
34
|
+
* @default 'var(--color-bg)' if elevated, otherwise 'transparent'
|
|
35
|
+
*/
|
|
36
|
+
background?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the text should have an elevated appearance with a shadow.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
elevated?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* When true, disables automatic repositioning to fit within bounds.
|
|
44
|
+
*/
|
|
45
|
+
disableRepositioning?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Optional bounds rectangle to constrain the text within. If provided, text will be positioned
|
|
48
|
+
* to stay within these bounds. Defaults to the full chart bounds when not provided.
|
|
49
|
+
*/
|
|
50
|
+
bounds?: Rect;
|
|
51
|
+
/**
|
|
52
|
+
* Callback fired when text dimensions change.
|
|
53
|
+
* Used for collision detection and smart positioning.
|
|
54
|
+
* Returns the adjusted position and dimensions.
|
|
55
|
+
*/
|
|
56
|
+
onDimensionsChange?: (rect: Rect) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Inset around the text content for the background rect.
|
|
59
|
+
* Only affects the background, text position remains unchanged.
|
|
60
|
+
*/
|
|
61
|
+
inset?: number | ChartInset;
|
|
62
|
+
/**
|
|
63
|
+
* Border radius for the background rectangle.
|
|
64
|
+
* @default 4
|
|
65
|
+
*/
|
|
66
|
+
borderRadius?: number;
|
|
67
|
+
};
|
|
68
|
+
export type ChartTextProps = ChartTextBaseProps &
|
|
69
|
+
Pick<BoxProps<'g'>, 'font' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'opacity'> & {
|
|
70
|
+
/**
|
|
71
|
+
* The desired x offset in SVG pixels.
|
|
72
|
+
*/
|
|
73
|
+
dx?: number;
|
|
74
|
+
/**
|
|
75
|
+
* The desired y offset in SVG pixels.
|
|
76
|
+
*/
|
|
77
|
+
dy?: number;
|
|
78
|
+
/**
|
|
79
|
+
* The text content to display.
|
|
80
|
+
*/
|
|
81
|
+
children: ChartTextChildren;
|
|
82
|
+
/**
|
|
83
|
+
* The desired x position in SVG pixels.
|
|
84
|
+
* @note Text will be automatically positioned to fit within bounds unless `disableRepositioning` is true.
|
|
85
|
+
*/
|
|
86
|
+
x: number;
|
|
87
|
+
/**
|
|
88
|
+
* The desired y position in SVG pixels.
|
|
89
|
+
* @note Text will be automatically positioned to fit within bounds unless `disableRepositioning` is true.
|
|
90
|
+
*/
|
|
91
|
+
y: number;
|
|
92
|
+
/**
|
|
93
|
+
* Horizontal alignment of the component.
|
|
94
|
+
* @default 'center'
|
|
95
|
+
*/
|
|
96
|
+
horizontalAlignment?: TextHorizontalAlignment;
|
|
97
|
+
/**
|
|
98
|
+
* Vertical alignment of the component.
|
|
99
|
+
* @default 'middle'
|
|
100
|
+
*/
|
|
101
|
+
verticalAlignment?: TextVerticalAlignment;
|
|
102
|
+
style?: React.CSSProperties;
|
|
103
|
+
styles?: {
|
|
104
|
+
root?: React.CSSProperties;
|
|
105
|
+
text?: React.CSSProperties;
|
|
106
|
+
backgroundRect?: React.CSSProperties;
|
|
107
|
+
};
|
|
108
|
+
className?: string;
|
|
109
|
+
classNames?: {
|
|
110
|
+
root?: string;
|
|
111
|
+
text?: string;
|
|
112
|
+
backgroundRect?: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export declare const ChartText: React.NamedExoticComponent<ChartTextProps>;
|
|
116
|
+
export {};
|
|
117
|
+
//# sourceMappingURL=ChartText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartText.d.ts","sourceRoot":"","sources":["../../../../src/visualizations/chart/text/ChartText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAC1E,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIpE,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGrD,OAAO,EAAE,KAAK,UAAU,EAAiB,MAAM,UAAU,CAAC;AAG1D,KAAK,2BAA2B,GAC5B,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,GAC5D,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,UAAU,CAAC,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,MAAM,GACN,IAAI,GACJ,SAAS,GACT,2BAA2B,GAC3B,2BAA2B,EAAE,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG;IAC7C;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAC7C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC,GAAG;IACnF;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,QAAQ,EAAE,iBAAiB,CAAC;IAC5B;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;;OAGG;IACH,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;IAC9C;;;OAGG;IACH,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;IAC1C,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC3B,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC3B,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KACtC,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH,CAAC;AAkCJ,eAAO,MAAM,SAAS,4CA4MrB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type ChartTextChildren, type ChartTextProps } from './ChartText';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for a single text label in the display list
|
|
4
|
+
*/
|
|
5
|
+
export type TextLabelData = {
|
|
6
|
+
/**
|
|
7
|
+
* The text content to display
|
|
8
|
+
*/
|
|
9
|
+
label: ChartTextChildren;
|
|
10
|
+
/**
|
|
11
|
+
* X coordinate where the text should be positioned
|
|
12
|
+
*/
|
|
13
|
+
x: number;
|
|
14
|
+
/**
|
|
15
|
+
* Y coordinate where the text should be positioned
|
|
16
|
+
*/
|
|
17
|
+
y: number;
|
|
18
|
+
/**
|
|
19
|
+
* Additional props to pass to the ChartText component for this specific label
|
|
20
|
+
*/
|
|
21
|
+
chartTextProps?: Partial<ChartTextProps>;
|
|
22
|
+
};
|
|
23
|
+
export type TextLabelDataWithKey = TextLabelData & {
|
|
24
|
+
key: string;
|
|
25
|
+
};
|
|
26
|
+
export type ChartTextGroupBaseProps = {
|
|
27
|
+
/**
|
|
28
|
+
* Array of text labels to display
|
|
29
|
+
*/
|
|
30
|
+
labels: TextLabelData[];
|
|
31
|
+
/**
|
|
32
|
+
* Minimum gap between labels in pixels
|
|
33
|
+
* @default 8
|
|
34
|
+
*/
|
|
35
|
+
minGap?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Whether to always show first and last labels
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
prioritizeEndLabels?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Common props to apply to all ChartText components
|
|
43
|
+
*/
|
|
44
|
+
chartTextProps?: Partial<ChartTextProps>;
|
|
45
|
+
/**
|
|
46
|
+
* Custom component to render each label
|
|
47
|
+
* @default ChartText
|
|
48
|
+
*/
|
|
49
|
+
LabelComponent?: React.FC<ChartTextProps>;
|
|
50
|
+
};
|
|
51
|
+
export type ChartTextGroupProps = ChartTextGroupBaseProps;
|
|
52
|
+
/**
|
|
53
|
+
* A smart text display component that prevents label overlap through collision detection.
|
|
54
|
+
*
|
|
55
|
+
* This component renders a list of ChartText components and automatically hides overlapping elements
|
|
56
|
+
* to ensure readability.
|
|
57
|
+
*
|
|
58
|
+
* The component focuses solely on overlap prevention logic for better separation of concerns.
|
|
59
|
+
*/
|
|
60
|
+
export declare const ChartTextGroup: import('react').NamedExoticComponent<ChartTextGroupBaseProps>;
|
|
61
|
+
//# sourceMappingURL=ChartTextGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartTextGroup.d.ts","sourceRoot":"","sources":["../../../../src/visualizations/chart/text/ChartTextGroup.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,KAAK,EAAE,iBAAiB,CAAC;IACzB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACzC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAiB1D;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,+DA0M1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/visualizations/chart/text/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Rect } from '@coinbase/cds-common/types';
|
|
3
|
+
import { type AxisBounds, type Series } from './chart';
|
|
4
|
+
import type { CartesianChartLayout } from './context';
|
|
5
|
+
import { type ChartAxisScaleType, type ChartScaleFunction, type PointAnchor } from './scale';
|
|
6
|
+
export declare const defaultAxisId = 'DEFAULT_AXIS_ID';
|
|
7
|
+
export declare const defaultAxisScaleType = 'linear';
|
|
8
|
+
/**
|
|
9
|
+
* Position options for band scale axis elements.
|
|
10
|
+
*
|
|
11
|
+
* - `'start'` - At the start of each step (before bar padding)
|
|
12
|
+
* - `'middle'` - At the center of each band
|
|
13
|
+
* - `'end'` - At the end of each step (after bar padding)
|
|
14
|
+
* - `'edges'` - At start of each tick, plus end for the last tick (encloses the chart)
|
|
15
|
+
*
|
|
16
|
+
* @note These properties only apply when using a band scale (`scaleType: 'band'`).
|
|
17
|
+
*/
|
|
18
|
+
export type AxisBandPlacement = 'start' | 'middle' | 'end' | 'edges';
|
|
19
|
+
/**
|
|
20
|
+
* Converts an AxisBandPlacement to the corresponding PointAnchor for use with getPointOnScale.
|
|
21
|
+
*
|
|
22
|
+
* @param placement - The axis placement value
|
|
23
|
+
* @returns The corresponding PointAnchor for scale calculations
|
|
24
|
+
*/
|
|
25
|
+
export declare const toPointAnchor: (placement: AxisBandPlacement) => PointAnchor;
|
|
26
|
+
/**
|
|
27
|
+
* Axis configuration with computed bounds
|
|
28
|
+
*/
|
|
29
|
+
export type AxisConfig = {
|
|
30
|
+
/** The type of scale to use */
|
|
31
|
+
scaleType: ChartAxisScaleType;
|
|
32
|
+
/**
|
|
33
|
+
* Domain bounds for the axis (data space)
|
|
34
|
+
*/
|
|
35
|
+
domain: AxisBounds;
|
|
36
|
+
/**
|
|
37
|
+
* Range bounds for the axis (visual space in pixels)
|
|
38
|
+
*/
|
|
39
|
+
range: AxisBounds;
|
|
40
|
+
/**
|
|
41
|
+
* Data for the axis.
|
|
42
|
+
* @note only used by the category axis.
|
|
43
|
+
*/
|
|
44
|
+
data?: string[] | number[];
|
|
45
|
+
/**
|
|
46
|
+
* Padding between categories for band scales (0-1, where 0.1 = 10% spacing)
|
|
47
|
+
* Only used when scaleType is 'band'
|
|
48
|
+
* @default 0.1
|
|
49
|
+
*/
|
|
50
|
+
categoryPadding?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Domain limit type for numeric scales
|
|
53
|
+
* - 'nice': Rounds the domain to human-friendly values
|
|
54
|
+
* - 'strict': Uses the exact min/max values from the data
|
|
55
|
+
*/
|
|
56
|
+
domainLimit: 'nice' | 'strict';
|
|
57
|
+
};
|
|
58
|
+
export type CartesianAxisConfig = AxisConfig & {
|
|
59
|
+
/**
|
|
60
|
+
* Baseline value used as the origin for numeric series on this axis.
|
|
61
|
+
* Only applies when this axis is the value axis for the current chart layout.
|
|
62
|
+
* - Non-stacked numeric series render from `[baseline, value]`.
|
|
63
|
+
* - Multi-series stacks are normalized around this baseline before stacking.
|
|
64
|
+
*
|
|
65
|
+
* @default 0 for value axes, undefined for category axes
|
|
66
|
+
*/
|
|
67
|
+
baseline?: number;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Axis configuration without computed bounds (used for input)
|
|
71
|
+
*/
|
|
72
|
+
export type CartesianAxisConfigProps = Omit<CartesianAxisConfig, 'domain' | 'range'> & {
|
|
73
|
+
/**
|
|
74
|
+
* Unique identifier for this axis.
|
|
75
|
+
*/
|
|
76
|
+
id: string;
|
|
77
|
+
/**
|
|
78
|
+
* Domain configuration for the axis (data space).
|
|
79
|
+
*
|
|
80
|
+
* The domainLimit parameter (inherited from AxisConfig) controls how initial domain bounds are calculated:
|
|
81
|
+
* - 'nice' (default for y axes): Rounds the domain to human-friendly values (e.g., 0-100 instead of 1.2-97.8)
|
|
82
|
+
* - 'strict' (default for x axes): Uses the exact min/max values from the data
|
|
83
|
+
*
|
|
84
|
+
* The domain can be:
|
|
85
|
+
* - A partial bounds object to override specific min/max values
|
|
86
|
+
* - A function that receives the limit-processed bounds and allows further customization
|
|
87
|
+
*
|
|
88
|
+
* This allows you to first apply nice/strict processing, then optionally transform the result.
|
|
89
|
+
*/
|
|
90
|
+
domain?: Partial<AxisBounds> | ((bounds: AxisBounds) => AxisBounds);
|
|
91
|
+
/**
|
|
92
|
+
* Range configuration for the axis (visual space in pixels).
|
|
93
|
+
* Can be a partial bounds object to override specific values, or a function that transforms the calculated range.
|
|
94
|
+
*
|
|
95
|
+
* When using a function, it receives the initial calculated range bounds and allows you to adjust them.
|
|
96
|
+
* This replaces the previous rangeOffset approach and provides more flexibility for range customization.
|
|
97
|
+
*/
|
|
98
|
+
range?: Partial<AxisBounds> | ((bounds: AxisBounds) => AxisBounds);
|
|
99
|
+
};
|
|
100
|
+
export declare const withBaselineDomain: (
|
|
101
|
+
domain: CartesianAxisConfigProps['domain'],
|
|
102
|
+
baseline?: number,
|
|
103
|
+
) => CartesianAxisConfigProps['domain'];
|
|
104
|
+
/**
|
|
105
|
+
* Gets a D3 scale based on the axis configuration.
|
|
106
|
+
* Handles both numeric (linear/log) and categorical (band) scales.
|
|
107
|
+
*
|
|
108
|
+
* For numeric scales, the domain limit controls whether bounds are "nice" (human-friendly)
|
|
109
|
+
* or "strict" (exact min/max). Range can be customized using function-based configuration.
|
|
110
|
+
*
|
|
111
|
+
* Range inversion is determined by axis role (category vs value) and layout:
|
|
112
|
+
* - Vertical layout: Y axis (value) is inverted for SVG coordinate system
|
|
113
|
+
* - Horizontal layout: Y axis (category) is inverted (first category at top)
|
|
114
|
+
*
|
|
115
|
+
* @param params - Scale parameters
|
|
116
|
+
* @returns The D3 scale function
|
|
117
|
+
* @throws An Error if bounds are invalid
|
|
118
|
+
*/
|
|
119
|
+
export declare const getCartesianAxisScale: ({
|
|
120
|
+
config,
|
|
121
|
+
type,
|
|
122
|
+
range,
|
|
123
|
+
dataDomain,
|
|
124
|
+
layout,
|
|
125
|
+
}: {
|
|
126
|
+
config?: CartesianAxisConfig;
|
|
127
|
+
type: 'x' | 'y';
|
|
128
|
+
range: AxisBounds;
|
|
129
|
+
dataDomain: AxisBounds;
|
|
130
|
+
layout?: CartesianChartLayout;
|
|
131
|
+
}) => ChartScaleFunction;
|
|
132
|
+
/**
|
|
133
|
+
* Formats the array of user-provided axis configs with default values and validates axis ids.
|
|
134
|
+
* Ensures at least one axis config exists if no input is provided.
|
|
135
|
+
* Requires specific axis ids when there are more than 1 axes.
|
|
136
|
+
* Defaults the axis id for a single axis config if there is no id.
|
|
137
|
+
* @param type - the type of axis, 'x' or 'y'
|
|
138
|
+
* @param axes - array of axis configs or single axis config
|
|
139
|
+
* @param defaultId - the default id to use for the axis
|
|
140
|
+
* @param defaultScaleType - the default scale type to use for the axis
|
|
141
|
+
* @returns array of axis configs with IDs
|
|
142
|
+
*/
|
|
143
|
+
export declare const getAxisConfig: (
|
|
144
|
+
type: 'x' | 'y',
|
|
145
|
+
axes: Partial<CartesianAxisConfigProps> | Partial<CartesianAxisConfigProps>[] | undefined,
|
|
146
|
+
defaultId?: string,
|
|
147
|
+
defaultScaleType?: ChartAxisScaleType,
|
|
148
|
+
) => CartesianAxisConfigProps[];
|
|
149
|
+
/**
|
|
150
|
+
* Calculates the data domain for an axis based on its configuration and series data.
|
|
151
|
+
* Handles both x and y axes, categorical data, custom domain configurations, and stacking.
|
|
152
|
+
*
|
|
153
|
+
* @param axisParam - The axis configuration
|
|
154
|
+
* @param series - Array of series objects (for stacking support)
|
|
155
|
+
* @param axisType - Whether this is an 'x' or 'y' axis
|
|
156
|
+
* @param layout - Chart layout ('horizontal' or 'vertical')
|
|
157
|
+
* @returns The calculated axis bounds
|
|
158
|
+
*/
|
|
159
|
+
export declare const getCartesianAxisDomain: (
|
|
160
|
+
axisParam: CartesianAxisConfigProps,
|
|
161
|
+
series: Series[],
|
|
162
|
+
axisType: 'x' | 'y',
|
|
163
|
+
layout?: CartesianChartLayout,
|
|
164
|
+
) => AxisBounds;
|
|
165
|
+
/**
|
|
166
|
+
* Calculates the visual range for an axis based on the chart rectangle and configuration.
|
|
167
|
+
* Handles custom range configurations including functions and partial bounds.
|
|
168
|
+
*
|
|
169
|
+
* @param axisParam - The axis configuration
|
|
170
|
+
* @param chartRect - The chart drawing area rectangle
|
|
171
|
+
* @param axisType - Whether this is an 'x' or 'y' axis
|
|
172
|
+
* @returns The calculated axis range bounds
|
|
173
|
+
*/
|
|
174
|
+
export declare const getAxisRange: (
|
|
175
|
+
axisParam: CartesianAxisConfigProps,
|
|
176
|
+
chartRect: Rect,
|
|
177
|
+
axisType: 'x' | 'y',
|
|
178
|
+
) => AxisBounds;
|
|
179
|
+
/**
|
|
180
|
+
* Options for tick generation behavior
|
|
181
|
+
*/
|
|
182
|
+
type TickGenerationOptions = {
|
|
183
|
+
/**
|
|
184
|
+
* Minimum step size allowed for ticks.
|
|
185
|
+
* Prevents the step from being smaller than this value.
|
|
186
|
+
* @example 1 // Prevents fractional steps like 0.5
|
|
187
|
+
*/
|
|
188
|
+
minStep?: number;
|
|
189
|
+
/**
|
|
190
|
+
* Maximum step size allowed for ticks.
|
|
191
|
+
* Prevents the step from being larger than this value.
|
|
192
|
+
* @example 100 // Prevents steps larger than 100
|
|
193
|
+
*/
|
|
194
|
+
maxStep?: number;
|
|
195
|
+
/**
|
|
196
|
+
* Minimum number of ticks to generate when using tickInterval.
|
|
197
|
+
* @default 4
|
|
198
|
+
*/
|
|
199
|
+
minTickCount?: number;
|
|
200
|
+
/**
|
|
201
|
+
* Anchor position for band/categorical scales.
|
|
202
|
+
* Controls where tick labels are positioned within each band.
|
|
203
|
+
* @default 'middle'
|
|
204
|
+
*/
|
|
205
|
+
anchor?: PointAnchor;
|
|
206
|
+
};
|
|
207
|
+
export type GetAxisTicksDataProps = {
|
|
208
|
+
/**
|
|
209
|
+
* Custom tick configuration for the axis.
|
|
210
|
+
* - **Array**: Uses these exact values for tick positioning and labels.
|
|
211
|
+
* - For numeric scales: exact values to display
|
|
212
|
+
* - For band scales: category indices to display
|
|
213
|
+
* - **Function**: Filters based on the predicate function.
|
|
214
|
+
* - For numeric scales: filters generated tick values
|
|
215
|
+
* - For band scales: filters category indices
|
|
216
|
+
*/
|
|
217
|
+
ticks?: number[] | ((value: number) => boolean);
|
|
218
|
+
/**
|
|
219
|
+
* The scale function to use for positioning and tick generation.
|
|
220
|
+
* Can be either a numeric scale or a band scale.
|
|
221
|
+
*/
|
|
222
|
+
scaleFunction: ChartScaleFunction;
|
|
223
|
+
/**
|
|
224
|
+
* Requested number of ticks to display (only used for numeric scales).
|
|
225
|
+
* For band/categorical scales, use the `ticks` parameter to control which categories are shown.
|
|
226
|
+
*/
|
|
227
|
+
requestedTickCount?: number;
|
|
228
|
+
/**
|
|
229
|
+
* Categories for band scales
|
|
230
|
+
*/
|
|
231
|
+
categories?: string[];
|
|
232
|
+
/**
|
|
233
|
+
* Possible tick values to filter from when using function-based ticks.
|
|
234
|
+
* Used for discrete data (such as 'band' scale indices).
|
|
235
|
+
*/
|
|
236
|
+
possibleTickValues?: number[];
|
|
237
|
+
/**
|
|
238
|
+
* Interval at which to show ticks in pixels.
|
|
239
|
+
* When provided, calculates tick count based on available space and generates
|
|
240
|
+
* evenly distributed ticks that always include first and last domain values.
|
|
241
|
+
* Only applies to numeric scales and overrides requestedTickCount.
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* // For a chart with 400px width, tickInterval: 64 would generate ~6 ticks
|
|
245
|
+
* // evenly distributed across the data range, always including first and last values
|
|
246
|
+
* getAxisTicksData({
|
|
247
|
+
* scaleFunction: numericScale,
|
|
248
|
+
* tickInterval: 32,
|
|
249
|
+
* possibleTickValues: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
|
250
|
+
* });
|
|
251
|
+
* // Result: ticks at indices [0, 2, 4, 6, 8, 10] with their corresponding positions
|
|
252
|
+
*/
|
|
253
|
+
tickInterval?: number;
|
|
254
|
+
/**
|
|
255
|
+
* Options for tick generation behavior
|
|
256
|
+
*/
|
|
257
|
+
options?: TickGenerationOptions;
|
|
258
|
+
};
|
|
259
|
+
/**
|
|
260
|
+
* Formats a tick value for display on an axis.
|
|
261
|
+
* Consolidates the identical formatting logic shared between XAxis and YAxis.
|
|
262
|
+
*
|
|
263
|
+
* @param value - The raw tick value to format
|
|
264
|
+
* @param tickFormatter - Optional custom formatter function
|
|
265
|
+
* @returns The formatted tick value as a React node
|
|
266
|
+
*/
|
|
267
|
+
export declare const formatAxisTick: (
|
|
268
|
+
value: any,
|
|
269
|
+
tickFormatter?: (value: any) => React.ReactNode,
|
|
270
|
+
) => React.ReactNode;
|
|
271
|
+
/**
|
|
272
|
+
* Processes tick configuration and returns tick data with positions.
|
|
273
|
+
*
|
|
274
|
+
* **Parameter Precedence by Scale Type:**
|
|
275
|
+
*
|
|
276
|
+
* **For Numeric Scales (linear/log):**
|
|
277
|
+
* 1. `ticks` (array) - Explicit tick values override all other options
|
|
278
|
+
* 2. `ticks` (function) - Filter function for tick selection
|
|
279
|
+
* 3. `ticks` (boolean) - Show/hide all possible ticks
|
|
280
|
+
* 4. `requestedTickCount` - D3 automatic tick generation (overrides tickInterval)
|
|
281
|
+
* 5. `tickInterval` - Pixel-based spacing (fallback)
|
|
282
|
+
*
|
|
283
|
+
* **For Categorical Scales (band):**
|
|
284
|
+
* 1. `ticks` (array) - Explicit category indices to display
|
|
285
|
+
* 2. `ticks` (function) - Filter function for category selection
|
|
286
|
+
* 3. `ticks` (boolean) - Show/hide all categories
|
|
287
|
+
* 4. Default - Show all categories (requestedTickCount and tickInterval are ignored)
|
|
288
|
+
*
|
|
289
|
+
* @param params - Tick processing parameters
|
|
290
|
+
* @param params.ticks - Custom tick configuration with multiple formats:
|
|
291
|
+
* - **Array**: For numeric scales: exact tick values; For band scales: category indices
|
|
292
|
+
* - **Function**: Predicate to filter tick values or category indices
|
|
293
|
+
* - **Boolean**: Show all (true) or no ticks (false) for both scale types
|
|
294
|
+
* @param params.scaleFunction - D3 scale function (numeric or band scale)
|
|
295
|
+
* @param params.requestedTickCount - Number of ticks for D3 generation (**numeric scales only**, overrides tickInterval)
|
|
296
|
+
* @param params.categories - Category labels (**band scales only**)
|
|
297
|
+
* @param params.possibleTickValues - Available tick values for filtering/selection (**numeric scales only**)
|
|
298
|
+
* @param params.tickInterval - Pixel spacing between ticks (**numeric scales only**, fallback option)
|
|
299
|
+
* @returns Array of tick data with values and positions
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* // Basic usage with tickInterval for pixel-based spacing
|
|
303
|
+
* import { scaleLinear } from 'd3-scale';
|
|
304
|
+
*
|
|
305
|
+
* const numericScale = scaleLinear().domain([0, 10]).range([0, 400]);
|
|
306
|
+
* const result = getAxisTicksData({
|
|
307
|
+
* scaleFunction: numericScale,
|
|
308
|
+
* tickInterval: 80, // 80 pixels between ticks
|
|
309
|
+
* possibleTickValues: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
|
310
|
+
* });
|
|
311
|
+
* // Returns: [
|
|
312
|
+
* // { tick: 0, position: 0 }, // Always includes first
|
|
313
|
+
* // { tick: 2, position: 80 },
|
|
314
|
+
* // { tick: 5, position: 200 },
|
|
315
|
+
* // { tick: 7, position: 280 },
|
|
316
|
+
* // { tick: 10, position: 400 } // Always includes last
|
|
317
|
+
* // ]
|
|
318
|
+
*
|
|
319
|
+
* @example
|
|
320
|
+
* // Using requestedTickCount for D3-generated ticks
|
|
321
|
+
* const result = getAxisTicksData({
|
|
322
|
+
* scaleFunction: numericScale,
|
|
323
|
+
* requestedTickCount: 5
|
|
324
|
+
* });
|
|
325
|
+
* // Uses D3's tick generation algorithm
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* // Using explicit tick values
|
|
329
|
+
* const result = getAxisTicksData({
|
|
330
|
+
* scaleFunction: numericScale,
|
|
331
|
+
* ticks: [0, 2.5, 5, 7.5, 10]
|
|
332
|
+
* });
|
|
333
|
+
* // Returns exact positions for specified values
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* // Using tick filter function
|
|
337
|
+
* const result = getAxisTicksData({
|
|
338
|
+
* scaleFunction: numericScale,
|
|
339
|
+
* ticks: (value) => value % 2 === 0, // Only even numbers
|
|
340
|
+
* possibleTickValues: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
|
341
|
+
* });
|
|
342
|
+
* // Returns: [0, 2, 4, 6, 8, 10] with their positions
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* // Band scale with categories (requestedTickCount and tickInterval are ignored)
|
|
346
|
+
* import { scaleBand } from 'd3-scale';
|
|
347
|
+
*
|
|
348
|
+
* const bandScale = scaleBand().domain([0, 1, 2, 3, 4]).range([0, 400]).padding(0.1);
|
|
349
|
+
* const result = getAxisTicksData({
|
|
350
|
+
* scaleFunction: bandScale,
|
|
351
|
+
* categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
|
|
352
|
+
* ticks: [0, 2, 4], // Show only Jan (index 0), Mar (index 2), May (index 4)
|
|
353
|
+
* requestedTickCount: 10, // IGNORED for band scales
|
|
354
|
+
* tickInterval: 50 // IGNORED for band scales
|
|
355
|
+
* });
|
|
356
|
+
* // Returns tick positions centered in each selected band
|
|
357
|
+
*/
|
|
358
|
+
export declare const getAxisTicksData: ({
|
|
359
|
+
ticks,
|
|
360
|
+
scaleFunction,
|
|
361
|
+
requestedTickCount,
|
|
362
|
+
categories,
|
|
363
|
+
possibleTickValues,
|
|
364
|
+
tickInterval,
|
|
365
|
+
options,
|
|
366
|
+
}: GetAxisTicksDataProps) => Array<{
|
|
367
|
+
tick: number;
|
|
368
|
+
position: number;
|
|
369
|
+
}>;
|
|
370
|
+
export type RegisteredAxis = {
|
|
371
|
+
id: string;
|
|
372
|
+
position: 'top' | 'bottom' | 'left' | 'right';
|
|
373
|
+
size: number;
|
|
374
|
+
};
|
|
375
|
+
/**
|
|
376
|
+
* Calculates the total amount of padding needed to render a set of axes on the main drawing area of the chart.
|
|
377
|
+
* Returns the registed axes, an API for adding/removing axes as well as the total calculated padding that must be reserved in the drawing area.
|
|
378
|
+
*/
|
|
379
|
+
export declare const useTotalAxisPadding: () => {
|
|
380
|
+
renderedAxes: Map<string, RegisteredAxis>;
|
|
381
|
+
axisPadding: {
|
|
382
|
+
top: number;
|
|
383
|
+
right: number;
|
|
384
|
+
bottom: number;
|
|
385
|
+
left: number;
|
|
386
|
+
};
|
|
387
|
+
registerAxis: (id: string, position: 'top' | 'bottom' | 'left' | 'right', size: number) => void;
|
|
388
|
+
unregisterAxis: (id: string) => void;
|
|
389
|
+
};
|
|
390
|
+
export {};
|
|
391
|
+
//# sourceMappingURL=axis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axis.d.ts","sourceRoot":"","sources":["../../../../src/visualizations/chart/utils/axis.ts"],"names":[],"mappings":"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"}
|