@coinbase/cds-web 8.66.1 → 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 +12 -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/SegmentedTab.js +5 -15
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["step", "parentStep", "activeStepId", "depth", "active", "visited", "flatStepIds", "complete", "isDescendentActive", "className", "style", "completedStepAccessibilityLabel", "setActiveStepLabelElement", "defaultColor", "activeColor", "descendentActiveColor", "visitedColor", "completeColor", "display", "alignItems", "width", "font", "fontFamily", "fontSize", "fontWeight", "lineHeight", "textTransform"];
|
|
1
|
+
const _excluded = ["step", "parentStep", "activeStepId", "depth", "active", "visited", "flatStepIds", "complete", "isDescendentActive", "className", "style", "completedStepAccessibilityLabel", "progressTimingConfig", "setActiveStepLabelElement", "defaultColor", "activeColor", "descendentActiveColor", "visitedColor", "completeColor", "display", "alignItems", "width", "font", "fontFamily", "fontSize", "fontWeight", "lineHeight", "textTransform", "disableAnimateOnMount"];
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -8,12 +8,13 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
9
|
import { memo, useMemo } from 'react';
|
|
10
10
|
import useMeasure from 'react-use-measure';
|
|
11
|
-
import {
|
|
11
|
+
import { m as motion } from 'framer-motion';
|
|
12
12
|
import { Box } from '../layout/Box';
|
|
13
13
|
import { HStack } from '../layout/HStack';
|
|
14
14
|
import { Text } from '../typography/Text';
|
|
15
|
+
import { defaultProgressTimingConfig } from './Stepper';
|
|
15
16
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
const
|
|
17
|
+
const MotionBox = motion(Box);
|
|
17
18
|
const displayStyle = {
|
|
18
19
|
phone: 'none',
|
|
19
20
|
tablet: 'flex',
|
|
@@ -33,6 +34,7 @@ export const DefaultStepperLabelHorizontal = /*#__PURE__*/memo(function DefaultS
|
|
|
33
34
|
className,
|
|
34
35
|
style,
|
|
35
36
|
completedStepAccessibilityLabel,
|
|
37
|
+
progressTimingConfig = defaultProgressTimingConfig,
|
|
36
38
|
setActiveStepLabelElement,
|
|
37
39
|
defaultColor = 'fgMuted',
|
|
38
40
|
activeColor = 'fg',
|
|
@@ -47,19 +49,15 @@ export const DefaultStepperLabelHorizontal = /*#__PURE__*/memo(function DefaultS
|
|
|
47
49
|
fontSize = font,
|
|
48
50
|
fontWeight = font,
|
|
49
51
|
lineHeight = font,
|
|
50
|
-
textTransform
|
|
52
|
+
textTransform,
|
|
53
|
+
disableAnimateOnMount
|
|
51
54
|
} = _ref,
|
|
52
55
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
53
56
|
const isStepGroupActive = active || isDescendentActive;
|
|
57
|
+
const showPagination = isStepGroupActive && !complete && !visited;
|
|
54
58
|
const [paginationRef, {
|
|
55
59
|
width: paginationWidth
|
|
56
60
|
}] = useMeasure();
|
|
57
|
-
const paginationSpring = useSpring({
|
|
58
|
-
opacity: isStepGroupActive && !complete && !visited ? 1 : 0
|
|
59
|
-
});
|
|
60
|
-
const labelSpring = useSpring({
|
|
61
|
-
left: isStepGroupActive && !complete && !visited ? paginationWidth : 0
|
|
62
|
-
});
|
|
63
61
|
const flatStepIndex = flatStepIds.indexOf(step.id);
|
|
64
62
|
const fontProps = useMemo(() => ({
|
|
65
63
|
font,
|
|
@@ -99,15 +97,21 @@ export const DefaultStepperLabelHorizontal = /*#__PURE__*/memo(function DefaultS
|
|
|
99
97
|
style: style,
|
|
100
98
|
width: width
|
|
101
99
|
}, props), {}, {
|
|
102
|
-
children: [/*#__PURE__*/_jsx(
|
|
100
|
+
children: [/*#__PURE__*/_jsx(MotionBox, {
|
|
103
101
|
ref: paginationRef,
|
|
102
|
+
animate: {
|
|
103
|
+
opacity: showPagination ? 1 : 0
|
|
104
|
+
},
|
|
104
105
|
paddingEnd: 1,
|
|
105
|
-
|
|
106
|
+
transition: progressTimingConfig,
|
|
106
107
|
children: paginationText
|
|
107
|
-
}), /*#__PURE__*/_jsx(
|
|
108
|
+
}), /*#__PURE__*/_jsx(MotionBox, {
|
|
109
|
+
animate: {
|
|
110
|
+
left: showPagination ? paginationWidth : 0
|
|
111
|
+
},
|
|
108
112
|
maxWidth: "calc(100% - ".concat(paginationWidth, "px)"),
|
|
109
113
|
position: "absolute",
|
|
110
|
-
|
|
114
|
+
transition: progressTimingConfig,
|
|
111
115
|
width: "100%",
|
|
112
116
|
children: labelElement
|
|
113
117
|
})]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["step", "parentStep", "progress", "activeStepId", "depth", "active", "visited", "flatStepIds", "complete", "isDescendentActive", "
|
|
1
|
+
const _excluded = ["step", "parentStep", "progress", "activeStepId", "depth", "active", "visited", "flatStepIds", "complete", "isDescendentActive", "progressTimingConfig", "activeStepLabelElement", "animate", "disableAnimateOnMount", "className", "style", "background", "defaultFill", "activeFill", "descendentActiveFill", "visitedFill", "completeFill", "width", "borderRadius", "height"];
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -6,9 +6,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
|
-
import { memo } from 'react';
|
|
10
|
-
import {
|
|
9
|
+
import { memo, useMemo } from 'react';
|
|
10
|
+
import { m as motion } from 'framer-motion';
|
|
11
11
|
import { Box } from '../layout/Box';
|
|
12
|
+
import { defaultProgressTimingConfig } from './Stepper';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
export const DefaultStepperProgressHorizontal = /*#__PURE__*/memo(function DefaultStepperProgressHorizontal(_ref) {
|
|
14
15
|
let {
|
|
@@ -22,7 +23,7 @@ export const DefaultStepperProgressHorizontal = /*#__PURE__*/memo(function Defau
|
|
|
22
23
|
flatStepIds,
|
|
23
24
|
complete,
|
|
24
25
|
isDescendentActive,
|
|
25
|
-
|
|
26
|
+
progressTimingConfig,
|
|
26
27
|
activeStepLabelElement,
|
|
27
28
|
animate,
|
|
28
29
|
disableAnimateOnMount,
|
|
@@ -39,6 +40,10 @@ export const DefaultStepperProgressHorizontal = /*#__PURE__*/memo(function Defau
|
|
|
39
40
|
height = 4
|
|
40
41
|
} = _ref,
|
|
41
42
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
43
|
+
const transition = useMemo(() => animate ? progressTimingConfig !== null && progressTimingConfig !== void 0 ? progressTimingConfig : defaultProgressTimingConfig : {
|
|
44
|
+
type: 'tween',
|
|
45
|
+
duration: 0
|
|
46
|
+
}, [animate, progressTimingConfig]);
|
|
42
47
|
return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread({
|
|
43
48
|
background: background,
|
|
44
49
|
borderRadius: borderRadius,
|
|
@@ -57,11 +62,18 @@ export const DefaultStepperProgressHorizontal = /*#__PURE__*/memo(function Defau
|
|
|
57
62
|
height: "100%",
|
|
58
63
|
overflow: "hidden",
|
|
59
64
|
width: "100%",
|
|
60
|
-
children: /*#__PURE__*/_jsx(
|
|
65
|
+
children: /*#__PURE__*/_jsx(motion.div, {
|
|
66
|
+
animate: {
|
|
67
|
+
width: "".concat(progress * 100, "%")
|
|
68
|
+
},
|
|
69
|
+
initial: {
|
|
70
|
+
width: disableAnimateOnMount ? "".concat(progress * 100, "%") : '0%'
|
|
71
|
+
},
|
|
61
72
|
style: {
|
|
62
73
|
backgroundColor: 'currentColor',
|
|
63
|
-
|
|
64
|
-
}
|
|
74
|
+
height: '100%'
|
|
75
|
+
},
|
|
76
|
+
transition: transition
|
|
65
77
|
})
|
|
66
78
|
})
|
|
67
79
|
}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["step", "parentStep", "activeStepId", "depth", "active", "visited", "flatStepIds", "complete", "isDescendentActive", "className", "style", "activeStepLabelElement", "
|
|
1
|
+
const _excluded = ["step", "parentStep", "activeStepId", "depth", "active", "visited", "flatStepIds", "complete", "isDescendentActive", "className", "style", "activeStepLabelElement", "progressTimingConfig", "animate", "disableAnimateOnMount", "background", "defaultFill", "activeFill", "descendentActiveFill", "visitedFill", "completeFill", "minHeight", "width", "progress"];
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -6,11 +6,11 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
|
-
import { memo, useCallback, useEffect, useRef, useState } from 'react';
|
|
9
|
+
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
10
10
|
import { defaultRect } from '@coinbase/cds-common/types/Rect';
|
|
11
|
-
import {
|
|
12
|
-
import { useHasMounted } from '../hooks/useHasMounted';
|
|
11
|
+
import { m as motion } from 'framer-motion';
|
|
13
12
|
import { Box } from '../layout/Box';
|
|
13
|
+
import { defaultProgressTimingConfig } from './Stepper';
|
|
14
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
export const DefaultStepperProgressVertical = /*#__PURE__*/memo(function DefaultStepperProgressVertical(_ref) {
|
|
16
16
|
let {
|
|
@@ -26,7 +26,7 @@ export const DefaultStepperProgressVertical = /*#__PURE__*/memo(function Default
|
|
|
26
26
|
className,
|
|
27
27
|
style,
|
|
28
28
|
activeStepLabelElement,
|
|
29
|
-
|
|
29
|
+
progressTimingConfig = defaultProgressTimingConfig,
|
|
30
30
|
animate = true,
|
|
31
31
|
disableAnimateOnMount,
|
|
32
32
|
background = 'bgLine',
|
|
@@ -40,47 +40,46 @@ export const DefaultStepperProgressVertical = /*#__PURE__*/memo(function Default
|
|
|
40
40
|
progress
|
|
41
41
|
} = _ref,
|
|
42
42
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
43
|
-
const hasMounted = useHasMounted();
|
|
44
43
|
const containerRef = useRef(null);
|
|
45
|
-
const [
|
|
44
|
+
const [fillHeight, setFillHeight] = useState(0);
|
|
45
|
+
const [hasReceivedFillHeight, setHasReceivedFillHeight] = useState(false);
|
|
46
46
|
const isStepGroupActive = active || isDescendentActive;
|
|
47
47
|
const isLastStep = flatStepIds[flatStepIds.length - 1] === step.id;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
});
|
|
53
|
-
observer.observe(containerRef.current);
|
|
54
|
-
return () => observer.disconnect();
|
|
55
|
-
}, []);
|
|
56
|
-
const getFillHeight = useCallback(() => {
|
|
57
|
-
var _step$subSteps, _containerRef$current, _containerRef$current2;
|
|
48
|
+
const recalculateFillHeight = useCallback(() => {
|
|
49
|
+
var _step$subSteps;
|
|
50
|
+
const container = containerRef.current;
|
|
51
|
+
if (!container) return;
|
|
58
52
|
const hasSubSteps = Boolean((_step$subSteps = step.subSteps) === null || _step$subSteps === void 0 ? void 0 : _step$subSteps.length);
|
|
59
|
-
const containerRect =
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (hasSubSteps && isDescendentActive) {
|
|
53
|
+
const containerRect = container.getBoundingClientRect();
|
|
54
|
+
let height;
|
|
55
|
+
if (complete || visited && !isStepGroupActive || !hasSubSteps && active) {
|
|
56
|
+
height = containerRect.height;
|
|
57
|
+
} else if (hasSubSteps && isDescendentActive) {
|
|
65
58
|
var _activeStepLabelEleme, _step$subSteps2;
|
|
66
59
|
const activeStepLabelRect = (_activeStepLabelEleme = activeStepLabelElement === null || activeStepLabelElement === void 0 ? void 0 : activeStepLabelElement.getBoundingClientRect()) !== null && _activeStepLabelEleme !== void 0 ? _activeStepLabelEleme : defaultRect;
|
|
67
60
|
const lastSubstep = (_step$subSteps2 = step.subSteps) === null || _step$subSteps2 === void 0 ? void 0 : _step$subSteps2[step.subSteps.length - 1];
|
|
68
61
|
const isLastSubstepActive = activeStepId === (lastSubstep === null || lastSubstep === void 0 ? void 0 : lastSubstep.id);
|
|
69
62
|
const activeStepLabelBottom = activeStepLabelRect.y + activeStepLabelRect.height;
|
|
70
63
|
const halfLabelHeight = isLastSubstepActive ? 0 : 0.5 * activeStepLabelRect.height;
|
|
71
|
-
|
|
64
|
+
height = activeStepLabelBottom - containerRect.y - halfLabelHeight;
|
|
65
|
+
} else {
|
|
66
|
+
height = 0;
|
|
72
67
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
68
|
+
setFillHeight(height);
|
|
69
|
+
if (height) setHasReceivedFillHeight(true);
|
|
70
|
+
}, [step.subSteps, complete, visited, isStepGroupActive, active, isDescendentActive, activeStepLabelElement, activeStepId]);
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
const container = containerRef.current;
|
|
73
|
+
if (!container) return;
|
|
74
|
+
const observer = new window.ResizeObserver(recalculateFillHeight);
|
|
75
|
+
observer.observe(container);
|
|
76
|
+
return () => observer.disconnect();
|
|
77
|
+
}, [recalculateFillHeight]);
|
|
78
|
+
const animatedHeight = progress * fillHeight;
|
|
79
|
+
const transition = useMemo(() => animate ? progressTimingConfig : {
|
|
80
|
+
type: 'tween',
|
|
81
|
+
duration: 0
|
|
82
|
+
}, [animate, progressTimingConfig]);
|
|
84
83
|
if (depth > 0 || isLastStep) return null;
|
|
85
84
|
return /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread({
|
|
86
85
|
ref: containerRef,
|
|
@@ -98,13 +97,26 @@ export const DefaultStepperProgressVertical = /*#__PURE__*/memo(function Default
|
|
|
98
97
|
}, props), {}, {
|
|
99
98
|
children: /*#__PURE__*/_jsx(Box, {
|
|
100
99
|
color: complete ? completeFill : active ? activeFill : isDescendentActive ? descendentActiveFill : visited ? visitedFill : defaultFill,
|
|
101
|
-
children: /*#__PURE__*/_jsx(
|
|
100
|
+
children: disableAnimateOnMount && !hasReceivedFillHeight ? /*#__PURE__*/_jsx("div", {
|
|
102
101
|
style: {
|
|
103
102
|
position: 'absolute',
|
|
104
103
|
width: '100%',
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
height: animatedHeight,
|
|
105
|
+
backgroundColor: 'currentColor'
|
|
107
106
|
}
|
|
107
|
+
}) : /*#__PURE__*/_jsx(motion.div, {
|
|
108
|
+
animate: {
|
|
109
|
+
height: animatedHeight
|
|
110
|
+
},
|
|
111
|
+
initial: {
|
|
112
|
+
height: disableAnimateOnMount ? animatedHeight : 0
|
|
113
|
+
},
|
|
114
|
+
style: {
|
|
115
|
+
position: 'absolute',
|
|
116
|
+
width: '100%',
|
|
117
|
+
backgroundColor: 'currentColor'
|
|
118
|
+
},
|
|
119
|
+
transition: transition
|
|
108
120
|
})
|
|
109
121
|
})
|
|
110
122
|
}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["step", "parentStep", "activeStepId", "depth", "active", "visited", "flatStepIds", "complete", "isDescendentActive", "className", "style", "completedStepAccessibilityLabel", "styles", "classNames", "progress", "activeStepLabelElement", "setActiveStepLabelElement", "
|
|
1
|
+
const _excluded = ["step", "parentStep", "activeStepId", "depth", "active", "visited", "flatStepIds", "complete", "isDescendentActive", "className", "style", "completedStepAccessibilityLabel", "styles", "classNames", "progress", "activeStepLabelElement", "setActiveStepLabelElement", "progressTimingConfig", "animate", "disableAnimateOnMount", "StepperStepComponent", "StepperLabelComponent", "StepperProgressComponent", "StepperSubstepContainerComponent", "StepperIconComponent"];
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -34,7 +34,7 @@ export const DefaultStepperStepHorizontal = /*#__PURE__*/memo(function DefaultSt
|
|
|
34
34
|
progress,
|
|
35
35
|
activeStepLabelElement,
|
|
36
36
|
setActiveStepLabelElement,
|
|
37
|
-
|
|
37
|
+
progressTimingConfig,
|
|
38
38
|
animate,
|
|
39
39
|
disableAnimateOnMount,
|
|
40
40
|
StepperStepComponent = DefaultStepperStepHorizontal,
|
|
@@ -100,7 +100,7 @@ export const DefaultStepperStepHorizontal = /*#__PURE__*/memo(function DefaultSt
|
|
|
100
100
|
isDescendentActive: isDescendentActive,
|
|
101
101
|
parentStep: parentStep,
|
|
102
102
|
progress: progress,
|
|
103
|
-
|
|
103
|
+
progressTimingConfig: progressTimingConfig,
|
|
104
104
|
step: step,
|
|
105
105
|
style: styles === null || styles === void 0 ? void 0 : styles.progress,
|
|
106
106
|
visited: visited
|
|
@@ -112,9 +112,11 @@ export const DefaultStepperStepHorizontal = /*#__PURE__*/memo(function DefaultSt
|
|
|
112
112
|
complete: complete,
|
|
113
113
|
completedStepAccessibilityLabel: completedStepAccessibilityLabel,
|
|
114
114
|
depth: depth,
|
|
115
|
+
disableAnimateOnMount: disableAnimateOnMount,
|
|
115
116
|
flatStepIds: flatStepIds,
|
|
116
117
|
isDescendentActive: isDescendentActive,
|
|
117
118
|
parentStep: parentStep,
|
|
119
|
+
progressTimingConfig: progressTimingConfig,
|
|
118
120
|
setActiveStepLabelElement: setActiveStepLabelElement,
|
|
119
121
|
step: step,
|
|
120
122
|
style: styles === null || styles === void 0 ? void 0 : styles.label,
|
|
@@ -157,7 +159,7 @@ export const DefaultStepperStepHorizontal = /*#__PURE__*/memo(function DefaultSt
|
|
|
157
159
|
isDescendentActive: isDescendentActive,
|
|
158
160
|
parentStep: step,
|
|
159
161
|
progress: progress,
|
|
160
|
-
|
|
162
|
+
progressTimingConfig: progressTimingConfig,
|
|
161
163
|
setActiveStepLabelElement: setActiveStepLabelElement,
|
|
162
164
|
step: subStep,
|
|
163
165
|
styles: styles,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["step", "parentStep", "activeStepId", "depth", "active", "visited", "flatStepIds", "complete", "isDescendentActive", "className", "style", "completedStepAccessibilityLabel", "styles", "classNames", "progress", "activeStepLabelElement", "setActiveStepLabelElement", "
|
|
1
|
+
const _excluded = ["step", "parentStep", "activeStepId", "depth", "active", "visited", "flatStepIds", "complete", "isDescendentActive", "className", "style", "completedStepAccessibilityLabel", "styles", "classNames", "progress", "activeStepLabelElement", "setActiveStepLabelElement", "progressTimingConfig", "animate", "disableAnimateOnMount", "StepperStepComponent", "StepperLabelComponent", "StepperProgressComponent", "StepperIconComponent", "StepperSubstepContainerComponent"];
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -35,7 +35,7 @@ export const DefaultStepperStepVertical = /*#__PURE__*/memo(function DefaultStep
|
|
|
35
35
|
progress,
|
|
36
36
|
activeStepLabelElement,
|
|
37
37
|
setActiveStepLabelElement,
|
|
38
|
-
|
|
38
|
+
progressTimingConfig,
|
|
39
39
|
animate,
|
|
40
40
|
disableAnimateOnMount,
|
|
41
41
|
StepperStepComponent = DefaultStepperStepVertical,
|
|
@@ -99,7 +99,7 @@ export const DefaultStepperStepVertical = /*#__PURE__*/memo(function DefaultStep
|
|
|
99
99
|
isDescendentActive: isDescendentActive,
|
|
100
100
|
parentStep: parentStep,
|
|
101
101
|
progress: progress,
|
|
102
|
-
|
|
102
|
+
progressTimingConfig: progressTimingConfig,
|
|
103
103
|
step: step,
|
|
104
104
|
style: styles === null || styles === void 0 ? void 0 : styles.progress,
|
|
105
105
|
visited: visited
|
|
@@ -135,7 +135,7 @@ export const DefaultStepperStepVertical = /*#__PURE__*/memo(function DefaultStep
|
|
|
135
135
|
step: step,
|
|
136
136
|
style: styles === null || styles === void 0 ? void 0 : styles.substepContainer,
|
|
137
137
|
visited: visited,
|
|
138
|
-
children: step.subSteps.map(
|
|
138
|
+
children: step.subSteps.map(subStep => {
|
|
139
139
|
var _subStep$Component;
|
|
140
140
|
const RenderedStepComponent = (_subStep$Component = subStep.Component) !== null && _subStep$Component !== void 0 ? _subStep$Component : StepperStepComponent;
|
|
141
141
|
const isDescendentActive = activeStepId ? containsStep({
|
|
@@ -161,7 +161,7 @@ export const DefaultStepperStepVertical = /*#__PURE__*/memo(function DefaultStep
|
|
|
161
161
|
isDescendentActive: isDescendentActive,
|
|
162
162
|
parentStep: step,
|
|
163
163
|
progress: progress,
|
|
164
|
-
|
|
164
|
+
progressTimingConfig: progressTimingConfig,
|
|
165
165
|
setActiveStepLabelElement: setActiveStepLabelElement,
|
|
166
166
|
step: subStep,
|
|
167
167
|
styles: styles,
|
package/esm/stepper/Stepper.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["direction", "activeStepId", "steps", "complete", "style", "className", "completedStepAccessibilityLabel", "styles", "classNames", "gap", "accessibilityLabel", "StepperStepComponent", "StepperSubstepContainerComponent", "StepperLabelComponent", "StepperProgressComponent", "StepperIconComponent", "StepperHeaderComponent", "
|
|
1
|
+
const _excluded = ["direction", "activeStepId", "steps", "complete", "style", "className", "completedStepAccessibilityLabel", "styles", "classNames", "gap", "accessibilityLabel", "StepperStepComponent", "StepperSubstepContainerComponent", "StepperLabelComponent", "StepperProgressComponent", "StepperIconComponent", "StepperHeaderComponent", "progressTimingConfig", "animate", "disableAnimateOnMount"],
|
|
2
2
|
_excluded2 = ["root"],
|
|
3
3
|
_excluded3 = ["root"];
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -8,13 +8,11 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
8
8
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
9
9
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
10
10
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
11
|
-
import React, { forwardRef, memo, useEffect, useMemo, useState } from 'react';
|
|
12
|
-
import {
|
|
11
|
+
import React, { forwardRef, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
12
|
+
import { curves, durations } from '@coinbase/cds-common/motion/tokens';
|
|
13
13
|
import { containsStep, flattenSteps, isStepVisited } from '@coinbase/cds-common/stepper/utils';
|
|
14
|
-
import { useSprings } from '@react-spring/web';
|
|
15
14
|
import { cx } from '../cx';
|
|
16
15
|
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
17
|
-
import { useHasMounted } from '../hooks/useHasMounted';
|
|
18
16
|
import { Box } from '../layout/Box';
|
|
19
17
|
import { VStack } from '../layout/VStack';
|
|
20
18
|
import { DefaultStepperHeaderHorizontal } from './DefaultStepperHeaderHorizontal';
|
|
@@ -39,18 +37,30 @@ import { DefaultStepperSubstepContainerVertical } from './DefaultStepperSubstepC
|
|
|
39
37
|
// ------------ STEPPER COMPONENT PROPS ------------
|
|
40
38
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
41
39
|
export const stepperDefaultElement = 'div';
|
|
40
|
+
const cascadeStaggerMs = durations.moderate2;
|
|
42
41
|
export const horizontalStepGap = {
|
|
43
42
|
phone: 0.5,
|
|
44
43
|
tablet: 1,
|
|
45
44
|
desktop: 1
|
|
46
45
|
};
|
|
46
|
+
|
|
47
|
+
/** Default progress transition: tween with CDS duration (seconds) and global curve. */
|
|
48
|
+
export const defaultProgressTimingConfig = {
|
|
49
|
+
type: 'tween',
|
|
50
|
+
duration: durations.slow2 / 1000,
|
|
51
|
+
ease: curves.global
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Use {@link defaultProgressTimingConfig}. Retained for migration only; Stepper no longer uses react-spring for progress. This will be removed in a future major release.
|
|
56
|
+
* @deprecationExpectedRemoval v10
|
|
57
|
+
*/
|
|
47
58
|
export const defaultProgressSpringConfig = {
|
|
48
59
|
friction: 0,
|
|
49
60
|
tension: 100,
|
|
50
61
|
clamp: true
|
|
51
62
|
};
|
|
52
63
|
const StepperBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
53
|
-
var _usePreviousValue, _usePreviousValue2;
|
|
54
64
|
const mergedProps = useComponentConfig('Stepper', _props);
|
|
55
65
|
const {
|
|
56
66
|
direction,
|
|
@@ -70,12 +80,11 @@ const StepperBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
|
70
80
|
StepperProgressComponent = direction === 'vertical' ? DefaultStepperProgressVertical : DefaultStepperProgressHorizontal,
|
|
71
81
|
StepperIconComponent = direction === 'vertical' ? DefaultStepperIconVertical : null,
|
|
72
82
|
StepperHeaderComponent = direction === 'vertical' ? null : DefaultStepperHeaderHorizontal,
|
|
73
|
-
|
|
83
|
+
progressTimingConfig = defaultProgressTimingConfig,
|
|
74
84
|
animate = true,
|
|
75
85
|
disableAnimateOnMount
|
|
76
86
|
} = mergedProps,
|
|
77
87
|
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
78
|
-
const hasMounted = useHasMounted();
|
|
79
88
|
const flatStepIds = useMemo(() => flattenSteps(steps).map(step => step.id), [steps]);
|
|
80
89
|
|
|
81
90
|
// Derive activeStep from activeStepId
|
|
@@ -120,69 +129,52 @@ const StepperBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
|
120
129
|
targetStepId: activeStepId
|
|
121
130
|
})) : -1;
|
|
122
131
|
}, [activeStepId, steps]);
|
|
123
|
-
const previousComplete = (_usePreviousValue = usePreviousValue(complete)) !== null && _usePreviousValue !== void 0 ? _usePreviousValue : false;
|
|
124
|
-
const previousActiveStepIndex = (_usePreviousValue2 = usePreviousValue(activeStepIndex)) !== null && _usePreviousValue2 !== void 0 ? _usePreviousValue2 : -1;
|
|
125
|
-
const [progressSprings, progressSpringsApi] = useSprings(steps.length, index => ({
|
|
126
|
-
from: {
|
|
127
|
-
progress: complete ? 1 : 0
|
|
128
|
-
},
|
|
129
|
-
config: progressSpringConfig
|
|
130
|
-
}));
|
|
131
|
-
useEffect(() => {
|
|
132
|
-
// update the previous values for next render
|
|
133
|
-
let stepsToAnimate = [];
|
|
134
|
-
let isAnimatingForward = false;
|
|
135
132
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
133
|
+
// the target step index for the cascade animation
|
|
134
|
+
const cascadeTargetIndex = useMemo(() => complete ? steps.length - 1 : activeStepIndex, [complete, steps, activeStepIndex]);
|
|
135
|
+
// reference to the previous cascade targetIndex
|
|
136
|
+
const cascadeTargetIndexRef = useRef(cascadeTargetIndex);
|
|
137
|
+
// the index of the last filled step
|
|
138
|
+
const [filledStepIndex, setFilledStepIndex] = useState(disableAnimateOnMount ? cascadeTargetIndex : -1);
|
|
139
|
+
const filledStepTimeoutRef = useRef(null);
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
if (filledStepTimeoutRef.current) {
|
|
142
|
+
clearTimeout(filledStepTimeoutRef.current);
|
|
143
|
+
filledStepTimeoutRef.current = null;
|
|
144
|
+
}
|
|
145
|
+
if (!animate) {
|
|
146
|
+
if (filledStepIndex !== cascadeTargetIndex) setFilledStepIndex(cascadeTargetIndex);
|
|
147
|
+
} else if (cascadeTargetIndex < filledStepIndex) {
|
|
148
|
+
if (cascadeTargetIndexRef.current !== cascadeTargetIndex) {
|
|
149
|
+
setFilledStepIndex(prev => prev - 1);
|
|
150
|
+
cascadeTargetIndexRef.current = cascadeTargetIndex;
|
|
146
151
|
} else {
|
|
147
|
-
|
|
148
|
-
stepsToAnimate = Array.from({
|
|
149
|
-
length: steps.length - activeStepIndex - 1
|
|
150
|
-
}, (_, i) => steps.length - 1 - i);
|
|
151
|
-
isAnimatingForward = false;
|
|
152
|
+
filledStepTimeoutRef.current = setTimeout(() => setFilledStepIndex(prev => prev - 1), cascadeStaggerMs);
|
|
152
153
|
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
if (activeStepIndex > previousActiveStepIndex) {
|
|
158
|
-
// Forward: animate from previousActiveStepIndex+1 to activeStepIndex
|
|
159
|
-
stepsToAnimate = Array.from({
|
|
160
|
-
length: activeStepIndex - previousActiveStepIndex
|
|
161
|
-
}, (_, i) => previousActiveStepIndex + 1 + i);
|
|
162
|
-
isAnimatingForward = true;
|
|
154
|
+
} else if (cascadeTargetIndex > filledStepIndex) {
|
|
155
|
+
if (cascadeTargetIndexRef.current !== cascadeTargetIndex) {
|
|
156
|
+
setFilledStepIndex(prev => prev + 1);
|
|
157
|
+
cascadeTargetIndexRef.current = cascadeTargetIndex;
|
|
163
158
|
} else {
|
|
164
|
-
|
|
165
|
-
stepsToAnimate = Array.from({
|
|
166
|
-
length: previousActiveStepIndex - activeStepIndex
|
|
167
|
-
}, (_, i) => previousActiveStepIndex - i);
|
|
168
|
-
isAnimatingForward = false;
|
|
159
|
+
filledStepTimeoutRef.current = setTimeout(() => setFilledStepIndex(prev => prev + 1), cascadeStaggerMs);
|
|
169
160
|
}
|
|
170
161
|
}
|
|
171
|
-
|
|
172
|
-
if (
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
progress: isAnimatingForward ? 1 : 0,
|
|
177
|
-
config: progressSpringConfig,
|
|
178
|
-
onRest: animateNextStep,
|
|
179
|
-
immediate: !animate || disableAnimateOnMount && !hasMounted
|
|
180
|
-
} : {});
|
|
162
|
+
return () => {
|
|
163
|
+
if (filledStepTimeoutRef.current) {
|
|
164
|
+
clearTimeout(filledStepTimeoutRef.current);
|
|
165
|
+
filledStepTimeoutRef.current = null;
|
|
166
|
+
}
|
|
181
167
|
};
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
168
|
+
}, [animate, cascadeTargetIndex, filledStepIndex]);
|
|
169
|
+
const getStepProgress = useCallback(index => {
|
|
170
|
+
if (!animate) {
|
|
171
|
+
// if animation is disabled, return 0 if the step index is less than the active step index, otherwise return 1
|
|
172
|
+
if (filledStepIndex < 0) return 0;
|
|
173
|
+
return index <= activeStepIndex ? 1 : 0;
|
|
174
|
+
}
|
|
175
|
+
if (filledStepIndex < 0) return 0;
|
|
176
|
+
return index <= filledStepIndex ? 1 : 0;
|
|
177
|
+
}, [animate, activeStepIndex, filledStepIndex]);
|
|
186
178
|
return /*#__PURE__*/_jsxs(VStack, _objectSpread(_objectSpread({
|
|
187
179
|
ref: ref,
|
|
188
180
|
as: stepperDefaultElement,
|
|
@@ -193,6 +185,7 @@ const StepperBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
|
193
185
|
activeStep: activeStep,
|
|
194
186
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.header,
|
|
195
187
|
complete: complete,
|
|
188
|
+
disableAnimateOnMount: disableAnimateOnMount,
|
|
196
189
|
flatStepIds: flatStepIds,
|
|
197
190
|
style: styles === null || styles === void 0 ? void 0 : styles.header
|
|
198
191
|
}), /*#__PURE__*/_jsx(Box, {
|
|
@@ -225,8 +218,8 @@ const StepperBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
|
225
218
|
flatStepIds: flatStepIds,
|
|
226
219
|
isDescendentActive: isDescendentActive,
|
|
227
220
|
parentStep: null,
|
|
228
|
-
progress:
|
|
229
|
-
|
|
221
|
+
progress: getStepProgress(index),
|
|
222
|
+
progressTimingConfig: progressTimingConfig,
|
|
230
223
|
setActiveStepLabelElement: setActiveStepLabelElement,
|
|
231
224
|
step: step,
|
|
232
225
|
styles: stepStyles,
|
package/esm/styles/styleProps.js
CHANGED
|
@@ -107,6 +107,9 @@ export const dynamicPixelProps = {
|
|
|
107
107
|
right: 1,
|
|
108
108
|
flexBasis: 1
|
|
109
109
|
};
|
|
110
|
+
|
|
111
|
+
/** Position-related style props using CSS types. Use this instead of common's PositionStyles for web. */
|
|
112
|
+
|
|
110
113
|
export const getStyles = (styleProps, inlineStyle) => {
|
|
111
114
|
const style = {};
|
|
112
115
|
let className = '';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer cds{.baseCss-b17wmk8f{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-decoration:none;text-decoration:none;background-color:var(--
|
|
1
|
+
@layer cds{.baseCss-b17wmk8f{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-text-decoration:none;text-decoration:none;background-color:var(--inter-bg);border-color:var(--inter-borderColor);}.baseCss-b17wmk8f::-moz-focus-inner{border:0;padding:0;margin:0;}.baseCss-b17wmk8f:hover{background-color:var(--inter-hover-bg);border-color:var(--inter-hover-borderColor);}.baseCss-b17wmk8f:hover > *{opacity:var(--inter-hover-opacity);}.baseCss-b17wmk8f:active,.baseCss-b17wmk8f[aria-pressed='true']{background-color:var(--inter-press-bg);border-color:var(--inter-press-borderColor);}.baseCss-b17wmk8f:active > *,.baseCss-b17wmk8f[aria-pressed='true'] > *{opacity:var(--inter-press-opacity);}.baseCss-b17wmk8f:disabled,.baseCss-b17wmk8f[aria-disabled='true']{opacity:0.5;cursor:default;pointer-events:none;touch-action:none;background-color:var(--inter-disable-bg);border-color:var(--inter-disable-borderColor);}.baseCss-b17wmk8f:focus{outline:none;}.baseCss-b17wmk8f:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--color-bgPrimary);}
|
|
2
2
|
.blockCss-b1ytinjt{display:block;width:100%;}
|
|
3
3
|
.transparentActiveCss-t10ei5ro:active{background-color:var(--color-transparent);border-color:var(--color-transparent);}
|
|
4
4
|
.transparentWhileInactiveCss-te5q23s{background-color:var(--color-transparent);border-color:var(--color-transparent);}.transparentWhileInactiveCss-te5q23s:disabled,.transparentWhileInactiveCss-te5q23s[aria-disabled='true']{background-color:var(--color-transparent);border-color:var(--color-transparent);}}
|
|
@@ -10,6 +10,7 @@ import React, { forwardRef, useMemo } from 'react';
|
|
|
10
10
|
import { getBlendedColor } from '@coinbase/cds-common/color/getBlendedColor';
|
|
11
11
|
import { accessibleOpacityDisabled, opacityDisabled, opacityHovered, opacityPressed } from '@coinbase/cds-common/tokens/interactable';
|
|
12
12
|
import { cx } from '../cx';
|
|
13
|
+
import { useResolveResponsiveProp } from '../hooks/useResolveResponsiveProp';
|
|
13
14
|
import { useTheme } from '../hooks/useTheme';
|
|
14
15
|
import { Box } from '../layout/Box';
|
|
15
16
|
import { interactableBackground, interactableBorderColor, interactableDisabledBackground, interactableDisabledBorderColor, interactableHoveredBackground, interactableHoveredBorderColor, interactableHoveredOpacity, interactablePressedBackground, interactablePressedBorderColor, interactablePressedOpacity } from './interactableCSSProperties';
|
|
@@ -59,12 +60,13 @@ export const Interactable = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
59
60
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
60
61
|
const Component = as !== null && as !== void 0 ? as : interactableDefaultElement;
|
|
61
62
|
const theme = useTheme();
|
|
63
|
+
const resolvedBorderColor = useResolveResponsiveProp(borderColor);
|
|
62
64
|
const interactableStyle = useMemo(() => _objectSpread(_objectSpread({}, getInteractableStyles({
|
|
63
65
|
theme,
|
|
64
66
|
background,
|
|
65
67
|
blendStyles,
|
|
66
|
-
borderColor
|
|
67
|
-
})), style), [style, background, theme, blendStyles,
|
|
68
|
+
borderColor: resolvedBorderColor
|
|
69
|
+
})), style), [style, background, theme, blendStyles, resolvedBorderColor]);
|
|
68
70
|
return /*#__PURE__*/_jsx(Box, _objectSpread({
|
|
69
71
|
ref: ref,
|
|
70
72
|
"aria-busy": loading,
|
package/esm/system/Pressable.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
@layer cds{.scaledDownCss-s1o6alxd{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);}.scaledDownCss-s1o6alxd:active,.scaledDownCss-s1o6alxd[data-active='true']{-webkit-transform:scale(0.98);-ms-transform:scale(0.98);transform:scale(0.98);}
|
|
2
|
-
.baseCss-b1nrmodp[data-active='true']{background-color:var(--
|
|
2
|
+
.baseCss-b1nrmodp[data-active='true']{background-color:var(--inter-press-bg);}.baseCss-b1nrmodp[data-active='true'] > *{opacity:var(--inter-press-opacity);}.baseCss-b1nrmodp[data-loading='true']{opacity:1;background-color:var(--inter-press-bg);}.baseCss-b1nrmodp[data-loading='true'] > *{opacity:var(--inter-press-opacity);}
|
|
3
3
|
.transparentActiveCss-t14zsnbw[data-active='true']{background-color:var(--color-transparent);}}
|