@razorpay/blade 11.38.1 → 12.0.0
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/build/lib/native/components/Accordion/Accordion.js +2 -2
- package/build/lib/native/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionButton.native.js +8 -10
- package/build/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionItemBody.js +7 -8
- package/build/lib/native/components/Accordion/AccordionItemBody.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionItemHeader.js +3 -8
- package/build/lib/native/components/Accordion/AccordionItemHeader.js.map +1 -1
- package/build/lib/native/components/Accordion/commonStyles.js +1 -1
- package/build/lib/native/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionList.js +1 -1
- package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListItem.js +9 -8
- package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js +2 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js.map +1 -1
- package/build/lib/native/components/Alert/Alert.js +4 -3
- package/build/lib/native/components/Alert/Alert.js.map +1 -1
- package/build/lib/native/components/Amount/Amount.js +4 -2
- package/build/lib/native/components/Amount/Amount.js.map +1 -1
- package/build/lib/native/components/Badge/Badge.js +10 -9
- package/build/lib/native/components/Badge/Badge.js.map +1 -1
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +11 -10
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +8 -6
- package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/native/components/BottomNav/BottomNav.native.js +4 -10
- package/build/lib/native/components/BottomNav/BottomNav.native.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/native/components/Box/Box.js +1 -1
- package/build/lib/native/components/Box/Box.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Card/Card.js +1 -1
- package/build/lib/native/components/Card/Card.js.map +1 -1
- package/build/lib/native/components/Card/CardFooter.js +4 -8
- package/build/lib/native/components/Card/CardFooter.js.map +1 -1
- package/build/lib/native/components/Card/CardHeader.js +5 -9
- package/build/lib/native/components/Card/CardHeader.js.map +1 -1
- package/build/lib/native/components/Card/CardRoot.native.js +1 -1
- package/build/lib/native/components/Card/CardRoot.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Carousel.native.js +1 -1
- package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js +1 -1
- package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
- package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/native/components/Checkbox/Checkbox.js +6 -4
- package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js.map +1 -1
- package/build/lib/native/components/Chip/Chip.js +5 -3
- package/build/lib/native/components/Chip/Chip.js.map +1 -1
- package/build/lib/native/components/Chip/ChipGroup.js +4 -3
- package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/native/components/Chip/chipTokens.js +1 -1
- package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/native/components/Collapsible/Collapsible.js +2 -2
- package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/native/components/Collapsible/commonStyles.js +1 -1
- package/build/lib/native/components/Collapsible/commonStyles.js.map +1 -1
- package/build/lib/native/components/Counter/Counter.js +13 -12
- package/build/lib/native/components/Counter/Counter.js.map +1 -1
- package/build/lib/native/components/Divider/Divider.js +2 -2
- package/build/lib/native/components/Divider/Divider.js.map +1 -1
- package/build/lib/native/components/Drawer/Drawer.native.js +4 -10
- package/build/lib/native/components/Drawer/Drawer.native.js.map +1 -1
- package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js +4 -9
- package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +2 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Fade/Fade.native.js +11 -0
- package/build/lib/native/components/Fade/Fade.native.js.map +1 -0
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +3 -9
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/native/components/Form/FormLabel.js +10 -10
- package/build/lib/native/components/Icons/RayIcon/RayIcon.js +12 -0
- package/build/lib/native/components/Icons/RayIcon/RayIcon.js.map +1 -0
- package/build/lib/native/components/Indicator/Indicator.js +7 -6
- package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +3 -3
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +8 -10
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +9 -8
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/native/components/Link/BaseLink/BaseLink.js +1 -1
- package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/native/components/List/List.js +1 -1
- package/build/lib/native/components/List/List.js.map +1 -1
- package/build/lib/native/components/List/ListItem.js +8 -10
- package/build/lib/native/components/List/ListItem.js.map +1 -1
- package/build/lib/native/components/List/ListItemCode.js +3 -9
- package/build/lib/native/components/List/ListItemCode.js.map +1 -1
- package/build/lib/native/components/List/ListItemText.js +3 -8
- package/build/lib/native/components/List/ListItemText.js.map +1 -1
- package/build/lib/native/components/Menu/Menu.native.js +4 -10
- package/build/lib/native/components/Menu/Menu.native.js.map +1 -1
- package/build/lib/native/components/Menu/MenuItem.native.js +4 -10
- package/build/lib/native/components/Menu/MenuItem.native.js.map +1 -1
- package/build/lib/native/components/Menu/MenuOverlay.native.js +4 -10
- package/build/lib/native/components/Menu/MenuOverlay.native.js.map +1 -1
- package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js +4 -10
- package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js.map +1 -1
- package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js +4 -10
- package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js.map +1 -1
- package/build/lib/native/components/Modal/Modal.native.js +4 -9
- package/build/lib/native/components/Modal/Modal.native.js.map +1 -1
- package/build/lib/native/components/Modal/ModalBody.native.js +3 -8
- package/build/lib/native/components/Modal/ModalBody.native.js.map +1 -1
- package/build/lib/native/components/Modal/ModalFooter.native.js +3 -8
- package/build/lib/native/components/Modal/ModalFooter.native.js.map +1 -1
- package/build/lib/native/components/Modal/ModalHeader.native.js +3 -8
- package/build/lib/native/components/Modal/ModalHeader.native.js.map +1 -1
- package/build/lib/native/components/Morph/Morph.native.js +11 -0
- package/build/lib/native/components/Morph/Morph.native.js.map +1 -0
- package/build/lib/native/components/Move/Move.native.js +11 -0
- package/build/lib/native/components/Move/Move.native.js.map +1 -0
- package/build/lib/native/components/Popover/PopoverContent.js +6 -8
- package/build/lib/native/components/Popover/PopoverContent.js.map +1 -1
- package/build/lib/native/components/Popover/PopoverContentWrapper.native.js +1 -1
- package/build/lib/native/components/Popover/PopoverContentWrapper.native.js.map +1 -1
- package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js +7 -9
- package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
- package/build/lib/native/components/ProgressBar/CircularProgressLabel.js +3 -8
- package/build/lib/native/components/ProgressBar/CircularProgressLabel.js.map +1 -1
- package/build/lib/native/components/ProgressBar/ProgressBar.js +2 -2
- package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/native/components/Radio/Radio.js +2 -1
- package/build/lib/native/components/Radio/Radio.js.map +1 -1
- package/build/lib/native/components/Radio/RadioIcon/Fade.native.js +1 -1
- package/build/lib/native/components/Radio/RadioIcon/Fade.native.js.map +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/native/components/Scale/Scale.native.js +11 -0
- package/build/lib/native/components/Scale/Scale.native.js.map +1 -0
- package/build/lib/native/components/SideNav/SideNav.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNav.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavBody.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavBody.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavFooter.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavFooter.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavLevel.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavLevel.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavSection.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavSection.native.js.map +1 -1
- package/build/lib/native/components/SideNav/tokens.js.map +1 -1
- package/build/lib/native/components/Skeleton/PulseAnimation.native.js +1 -1
- package/build/lib/native/components/Skeleton/PulseAnimation.native.js.map +1 -1
- package/build/lib/native/components/Skeleton/Skeleton.js +2 -2
- package/build/lib/native/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/native/components/Slide/Slide.native.js +11 -0
- package/build/lib/native/components/Slide/Slide.native.js.map +1 -0
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +4 -3
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
- package/build/lib/native/components/Spinner/Spinner/Spinner.js +2 -1
- package/build/lib/native/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/native/components/StepGroup/StepGroup.native.js +4 -10
- package/build/lib/native/components/StepGroup/StepGroup.native.js.map +1 -1
- package/build/lib/native/components/StepGroup/StepItem.native.js +4 -10
- package/build/lib/native/components/StepGroup/StepItem.native.js.map +1 -1
- package/build/lib/native/components/Switch/Switch.js +2 -1
- package/build/lib/native/components/Switch/Switch.js.map +1 -1
- package/build/lib/native/components/Switch/getTrackStyles.js +1 -1
- package/build/lib/native/components/Switch/getTrackStyles.js.map +1 -1
- package/build/lib/native/components/Switch/switchTokens.js +1 -1
- package/build/lib/native/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/native/components/Table/Table.native.js +4 -9
- package/build/lib/native/components/Table/Table.native.js.map +1 -1
- package/build/lib/native/components/Table/TableBody.native.js +3 -8
- package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
- package/build/lib/native/components/Table/TableEditableCell.native.js +3 -9
- package/build/lib/native/components/Table/TableEditableCell.native.js.map +1 -1
- package/build/lib/native/components/Table/TableFooter.native.js +3 -8
- package/build/lib/native/components/Table/TableFooter.native.js.map +1 -1
- package/build/lib/native/components/Table/TableHeader.native.js +3 -8
- package/build/lib/native/components/Table/TableHeader.native.js.map +1 -1
- package/build/lib/native/components/Table/TablePagination.native.js +3 -8
- package/build/lib/native/components/Table/TablePagination.native.js.map +1 -1
- package/build/lib/native/components/Table/TableToolbar.native.js +3 -8
- package/build/lib/native/components/Table/TableToolbar.native.js.map +1 -1
- package/build/lib/native/components/Table/tokens.js.map +1 -1
- package/build/lib/native/components/Tabs/Tabs.native.js +6 -8
- package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
- package/build/lib/native/components/Tag/AnimatedTag.native.js +1 -1
- package/build/lib/native/components/Tag/AnimatedTag.native.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js +3 -2
- package/build/lib/native/components/Tag/Tag.js.map +1 -1
- package/build/lib/native/components/Tooltip/TooltipContent.js +8 -8
- package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js +1 -1
- package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js.map +1 -1
- package/build/lib/native/components/TopNav/TabNav/TabNav.native.js +4 -10
- package/build/lib/native/components/TopNav/TabNav/TabNav.native.js.map +1 -1
- package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js +4 -10
- package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js.map +1 -1
- package/build/lib/native/components/TopNav/TopNav.native.js +4 -10
- package/build/lib/native/components/TopNav/TopNav.native.js.map +1 -1
- package/build/lib/native/components/Typography/Code/Code.js +1 -1
- package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/native/components/Typography/Display/Display.js +2 -2
- package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/native/components/Typography/Heading/Heading.js +2 -2
- package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/native/components/Typography/Text/Text.js +2 -2
- package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/native/components/index.js +6 -0
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/global/motion.js +1 -1
- package/build/lib/native/tokens/global/motion.js.map +1 -1
- package/build/lib/native/utils/getMotionRefs.js +4 -0
- package/build/lib/native/utils/getMotionRefs.js.map +1 -0
- package/build/lib/web/development/components/Accordion/Accordion.js +6 -3
- package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/web/development/components/Accordion/commonStyles.js +1 -1
- package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionList.js +3 -0
- package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/development/components/Alert/Alert.js +6 -3
- package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/development/components/Amount/Amount.js +3 -2
- package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
- package/build/lib/web/development/components/Badge/Badge.js +4 -2
- package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/development/components/BaseMotion/BaseMotion.js +123 -0
- package/build/lib/web/development/components/BaseMotion/BaseMotion.js.map +1 -0
- package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js +60 -0
- package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js.map +1 -0
- package/build/lib/web/development/components/BaseMotion/index.js +3 -0
- package/build/lib/web/development/components/BaseMotion/index.js.map +1 -0
- package/build/lib/web/development/components/BaseMotion/types.js +2 -0
- package/build/lib/web/development/components/BaseMotion/types.js.map +1 -0
- package/build/lib/web/development/components/BottomNav/BottomNav.web.js +4 -2
- package/build/lib/web/development/components/BottomNav/BottomNav.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/development/components/Box/Box.js +2 -2
- package/build/lib/web/development/components/Box/Box.js.map +1 -1
- package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +3 -1
- package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +1 -1
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +3 -2
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Card/Card.js +3 -1
- package/build/lib/web/development/components/Card/Card.js.map +1 -1
- package/build/lib/web/development/components/Card/CardRoot.web.js +6 -4
- package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Carousel.web.js +6 -3
- package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
- package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
- package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/Checkbox.js +13 -3
- package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
- package/build/lib/web/development/components/Chip/Chip.js +11 -2
- package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/development/components/Chip/ChipGroup.js +5 -2
- package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/web/development/components/Chip/chipTokens.js +1 -1
- package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/Collapsible.js +6 -3
- package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/commonStyles.js +2 -2
- package/build/lib/web/development/components/Collapsible/commonStyles.js.map +1 -1
- package/build/lib/web/development/components/Counter/Counter.js +4 -2
- package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/development/components/Divider/Divider.js +4 -2
- package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/development/components/Drawer/Drawer.web.js +4 -4
- package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -3
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Fade/Fade.web.js +62 -0
- package/build/lib/web/development/components/Fade/Fade.web.js.map +1 -0
- package/build/lib/web/development/components/Fade/index.js +2 -0
- package/build/lib/web/development/components/Fade/index.js.map +1 -0
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js +11 -2
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/fileUploadTokens.js +1 -1
- package/build/lib/web/development/components/FileUpload/fileUploadTokens.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/development/components/Icons/RayIcon/RayIcon.js +37 -0
- package/build/lib/web/development/components/Icons/RayIcon/RayIcon.js.map +1 -0
- package/build/lib/web/development/components/Icons/RayIcon/index.js +2 -0
- package/build/lib/web/development/components/Icons/RayIcon/index.js.map +1 -0
- package/build/lib/web/development/components/Icons/index.js +1 -0
- package/build/lib/web/development/components/Icons/index.js.map +1 -1
- package/build/lib/web/development/components/Indicator/Indicator.js +4 -2
- package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +21 -7
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +1 -1
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/development/components/List/List.js +5 -3
- package/build/lib/web/development/components/List/List.js.map +1 -1
- package/build/lib/web/development/components/Modal/Modal.web.js +2 -2
- package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalBackdrop.js +2 -2
- package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
- package/build/lib/web/development/components/Morph/Morph.web.js +48 -0
- package/build/lib/web/development/components/Morph/Morph.web.js.map +1 -0
- package/build/lib/web/development/components/Morph/index.js +2 -0
- package/build/lib/web/development/components/Morph/index.js.map +1 -0
- package/build/lib/web/development/components/Move/Move.web.js +66 -0
- package/build/lib/web/development/components/Move/Move.web.js.map +1 -0
- package/build/lib/web/development/components/Move/index.js +2 -0
- package/build/lib/web/development/components/Move/index.js.map +1 -0
- package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js +1 -1
- package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js +8 -4
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/development/components/Radio/Radio.js +13 -3
- package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js +3 -3
- package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/Scale/Scale.web.js +47 -0
- package/build/lib/web/development/components/Scale/Scale.web.js.map +1 -0
- package/build/lib/web/development/components/Scale/index.js +2 -0
- package/build/lib/web/development/components/Scale/index.js.map +1 -0
- package/build/lib/web/development/components/SideNav/SideNav.web.js +7 -5
- package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
- package/build/lib/web/development/components/SideNav/tokens.js +1 -1
- package/build/lib/web/development/components/SideNav/tokens.js.map +1 -1
- package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js +1 -1
- package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js.map +1 -1
- package/build/lib/web/development/components/Skeleton/Skeleton.js +4 -1
- package/build/lib/web/development/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/web/development/components/Slide/Slide.web.js +119 -0
- package/build/lib/web/development/components/Slide/Slide.web.js.map +1 -0
- package/build/lib/web/development/components/Slide/index.js +2 -0
- package/build/lib/web/development/components/Slide/index.js.map +1 -0
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
- package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
- package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +4 -1
- package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
- package/build/lib/web/development/components/Stagger/StaggerProvider.js +13 -0
- package/build/lib/web/development/components/Stagger/StaggerProvider.js.map +1 -0
- package/build/lib/web/development/components/StepGroup/StepGroup.web.js +5 -3
- package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/StepItem.web.js +1 -1
- package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
- package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js +1 -1
- package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
- package/build/lib/web/development/components/Switch/Switch.js +13 -3
- package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
- package/build/lib/web/development/components/Switch/getTrackStyles.js +1 -1
- package/build/lib/web/development/components/Switch/getTrackStyles.js.map +1 -1
- package/build/lib/web/development/components/Switch/switchTokens.js +6 -6
- package/build/lib/web/development/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/web/development/components/Table/Table.web.js +4 -2
- package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/development/components/Table/tokens.js +2 -2
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabIndicator.web.js +1 -1
- package/build/lib/web/development/components/Tabs/TabIndicator.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabItem.web.js +2 -2
- package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/Tabs.web.js +34 -1
- package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js +2 -2
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/Tag.js +31 -29
- package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
- package/build/lib/web/development/components/Toast/Toast.web.js.map +1 -1
- package/build/lib/web/development/components/Toast/ToastContainer.web.js +1 -1
- package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
- package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js +2 -2
- package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
- package/build/lib/web/development/components/TopNav/TopNav.web.js +4 -2
- package/build/lib/web/development/components/TopNav/TopNav.web.js.map +1 -1
- package/build/lib/web/development/components/Typography/Code/Code.js +30 -27
- package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/web/development/components/Typography/Display/Display.js +6 -2
- package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/web/development/components/Typography/Heading/Heading.js +4 -1
- package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/web/development/components/Typography/Text/Text.js +6 -10
- package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/development/components/index.js +11 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/global/motion.js +22 -28
- package/build/lib/web/development/tokens/global/motion.js.map +1 -1
- package/build/lib/web/development/utils/cssBezierToArray.js +12 -0
- package/build/lib/web/development/utils/cssBezierToArray.js.map +1 -0
- package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
- package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
- package/build/lib/web/development/utils/getMotionRefs.js +86 -0
- package/build/lib/web/development/utils/getMotionRefs.js.map +1 -0
- package/build/lib/web/development/utils/msToSeconds.js +6 -0
- package/build/lib/web/development/utils/msToSeconds.js.map +1 -0
- package/build/lib/web/production/components/Accordion/Accordion.js +6 -3
- package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/web/production/components/Accordion/commonStyles.js +1 -1
- package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionList.js +3 -0
- package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/production/components/Alert/Alert.js +6 -3
- package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/production/components/Amount/Amount.js +3 -2
- package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
- package/build/lib/web/production/components/Badge/Badge.js +4 -2
- package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/production/components/BaseMotion/BaseMotion.js +123 -0
- package/build/lib/web/production/components/BaseMotion/BaseMotion.js.map +1 -0
- package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js +60 -0
- package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js.map +1 -0
- package/build/lib/web/production/components/BaseMotion/index.js +3 -0
- package/build/lib/web/production/components/BaseMotion/index.js.map +1 -0
- package/build/lib/web/production/components/BaseMotion/types.js +2 -0
- package/build/lib/web/production/components/BaseMotion/types.js.map +1 -0
- package/build/lib/web/production/components/BottomNav/BottomNav.web.js +4 -2
- package/build/lib/web/production/components/BottomNav/BottomNav.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/production/components/Box/Box.js +2 -2
- package/build/lib/web/production/components/Box/Box.js.map +1 -1
- package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +3 -1
- package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +1 -1
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +3 -2
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Card/Card.js +3 -1
- package/build/lib/web/production/components/Card/Card.js.map +1 -1
- package/build/lib/web/production/components/Card/CardRoot.web.js +6 -4
- package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Carousel.web.js +6 -3
- package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
- package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
- package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/Checkbox.js +13 -3
- package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
- package/build/lib/web/production/components/Chip/Chip.js +11 -2
- package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/production/components/Chip/ChipGroup.js +5 -2
- package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/web/production/components/Chip/chipTokens.js +1 -1
- package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/Collapsible.js +6 -3
- package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/commonStyles.js +2 -2
- package/build/lib/web/production/components/Collapsible/commonStyles.js.map +1 -1
- package/build/lib/web/production/components/Counter/Counter.js +4 -2
- package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/production/components/Divider/Divider.js +4 -2
- package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/production/components/Drawer/Drawer.web.js +4 -4
- package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -3
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Fade/Fade.web.js +62 -0
- package/build/lib/web/production/components/Fade/Fade.web.js.map +1 -0
- package/build/lib/web/production/components/Fade/index.js +2 -0
- package/build/lib/web/production/components/Fade/index.js.map +1 -0
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js +11 -2
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/fileUploadTokens.js +1 -1
- package/build/lib/web/production/components/FileUpload/fileUploadTokens.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/production/components/Icons/RayIcon/RayIcon.js +37 -0
- package/build/lib/web/production/components/Icons/RayIcon/RayIcon.js.map +1 -0
- package/build/lib/web/production/components/Icons/RayIcon/index.js +2 -0
- package/build/lib/web/production/components/Icons/RayIcon/index.js.map +1 -0
- package/build/lib/web/production/components/Icons/index.js +1 -0
- package/build/lib/web/production/components/Icons/index.js.map +1 -1
- package/build/lib/web/production/components/Indicator/Indicator.js +4 -2
- package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +21 -7
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +1 -1
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/production/components/List/List.js +5 -3
- package/build/lib/web/production/components/List/List.js.map +1 -1
- package/build/lib/web/production/components/Modal/Modal.web.js +2 -2
- package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalBackdrop.js +2 -2
- package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
- package/build/lib/web/production/components/Morph/Morph.web.js +48 -0
- package/build/lib/web/production/components/Morph/Morph.web.js.map +1 -0
- package/build/lib/web/production/components/Morph/index.js +2 -0
- package/build/lib/web/production/components/Morph/index.js.map +1 -0
- package/build/lib/web/production/components/Move/Move.web.js +66 -0
- package/build/lib/web/production/components/Move/Move.web.js.map +1 -0
- package/build/lib/web/production/components/Move/index.js +2 -0
- package/build/lib/web/production/components/Move/index.js.map +1 -0
- package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js +1 -1
- package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js +8 -4
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/production/components/Radio/Radio.js +13 -3
- package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js +3 -3
- package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/Scale/Scale.web.js +47 -0
- package/build/lib/web/production/components/Scale/Scale.web.js.map +1 -0
- package/build/lib/web/production/components/Scale/index.js +2 -0
- package/build/lib/web/production/components/Scale/index.js.map +1 -0
- package/build/lib/web/production/components/SideNav/SideNav.web.js +7 -5
- package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
- package/build/lib/web/production/components/SideNav/tokens.js +1 -1
- package/build/lib/web/production/components/SideNav/tokens.js.map +1 -1
- package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js +1 -1
- package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js.map +1 -1
- package/build/lib/web/production/components/Skeleton/Skeleton.js +4 -1
- package/build/lib/web/production/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/web/production/components/Slide/Slide.web.js +119 -0
- package/build/lib/web/production/components/Slide/Slide.web.js.map +1 -0
- package/build/lib/web/production/components/Slide/index.js +2 -0
- package/build/lib/web/production/components/Slide/index.js.map +1 -0
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
- package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
- package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +4 -1
- package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
- package/build/lib/web/production/components/Stagger/StaggerProvider.js +13 -0
- package/build/lib/web/production/components/Stagger/StaggerProvider.js.map +1 -0
- package/build/lib/web/production/components/StepGroup/StepGroup.web.js +5 -3
- package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/StepItem.web.js +1 -1
- package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
- package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js +1 -1
- package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
- package/build/lib/web/production/components/Switch/Switch.js +13 -3
- package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
- package/build/lib/web/production/components/Switch/getTrackStyles.js +1 -1
- package/build/lib/web/production/components/Switch/getTrackStyles.js.map +1 -1
- package/build/lib/web/production/components/Switch/switchTokens.js +6 -6
- package/build/lib/web/production/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/web/production/components/Table/Table.web.js +4 -2
- package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/production/components/Table/tokens.js +2 -2
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabIndicator.web.js +1 -1
- package/build/lib/web/production/components/Tabs/TabIndicator.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabItem.web.js +2 -2
- package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/Tabs.web.js +34 -1
- package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js +2 -2
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/Tag.js +31 -29
- package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
- package/build/lib/web/production/components/Toast/Toast.web.js.map +1 -1
- package/build/lib/web/production/components/Toast/ToastContainer.web.js +1 -1
- package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
- package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js +2 -2
- package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
- package/build/lib/web/production/components/TopNav/TopNav.web.js +4 -2
- package/build/lib/web/production/components/TopNav/TopNav.web.js.map +1 -1
- package/build/lib/web/production/components/Typography/Code/Code.js +30 -27
- package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/web/production/components/Typography/Display/Display.js +6 -2
- package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/web/production/components/Typography/Heading/Heading.js +4 -1
- package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/web/production/components/Typography/Text/Text.js +6 -10
- package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/production/components/index.js +11 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/global/motion.js +22 -28
- package/build/lib/web/production/tokens/global/motion.js.map +1 -1
- package/build/lib/web/production/utils/cssBezierToArray.js +12 -0
- package/build/lib/web/production/utils/cssBezierToArray.js.map +1 -0
- package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
- package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
- package/build/lib/web/production/utils/getMotionRefs.js +86 -0
- package/build/lib/web/production/utils/getMotionRefs.js.map +1 -0
- package/build/lib/web/production/utils/msToSeconds.js +6 -0
- package/build/lib/web/production/utils/msToSeconds.js.map +1 -0
- package/build/types/components/index.d.ts +17969 -5488
- package/build/types/components/index.native.d.ts +7924 -2157
- package/build/types/tokens/index.d.ts +103 -93
- package/build/types/tokens/index.native.d.ts +103 -93
- package/build/types/utils/index.d.ts +84 -71
- package/build/types/utils/index.native.d.ts +84 -71
- package/codemods/migrate-motion-tokens/transformers/__tests__/migrate-motion-tokens.test.ts +130 -0
- package/codemods/migrate-motion-tokens/transformers/index.ts +1 -0
- package/codemods/migrate-motion-tokens/transformers/migrate-motion.ts +24 -0
- package/codemods/migrate-motion-tokens/transformers/motionTokenMapping.json +11 -0
- package/package.json +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseLink.js","sources":["../../../../../../../src/components/Link/BaseLink/BaseLink.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/prefer-ts-expect-error */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport type { SyntheticEvent } from 'react';\nimport React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport type { GestureResponderEvent } from 'react-native';\nimport StyledBaseLink from './StyledBaseLink';\nimport getIn from '~utils/lodashButBetter/get';\nimport useInteraction from '~utils/useInteraction';\nimport type { IconColors, IconComponent, IconProps } from '~components/Icons';\nimport type { Theme } from '~components/BladeProvider';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { BaseText } from '~components/Typography/BaseText';\nimport type {\n DotNotationSpacingStringToken,\n StringChildrenType,\n TestID,\n BladeElementRef,\n} from '~utils/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { Platform } from '~utils';\nimport { isReactNative } from '~utils';\nimport type { DurationString, EasingString, FontSize, Typography } from '~tokens/global';\nimport type {\n BaseTextProps,\n BaseTextSizes,\n TextColors,\n} from '~components/Typography/BaseText/types';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { BladeCommonEvents } from '~components/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport type { ActionStates } from '~utils/useInteraction';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype BaseLinkCommonProps = {\n color?: 'primary' | 'white' | 'positive' | 'negative' | 'notice' | 'information' | 'neutral';\n icon?: IconComponent;\n iconPosition?: 'left' | 'right';\n onClick?: (event: SyntheticEvent) => void;\n onBlur?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.FocusEvent<HTMLButtonElement>) => void;\n }>;\n onMouseLeave?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.MouseEvent<HTMLButtonElement>) => void;\n }>;\n onKeyDown?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.KeyboardEvent<HTMLButtonElement>) => void;\n }>;\n accessibilityProps?: Partial<AccessibilityProps>;\n\n /**\n * Sets the size of the link\n *\n * @default medium\n */\n size?: Extract<BaseTextSizes, 'xsmall' | 'small' | 'medium' | 'large'>;\n /**\n * Defines how far your touch can start away from the link. This is a react-native only prop and has no effect on web.\n */\n hitSlop?:\n | {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n }\n | number;\n /**\n * The title of the link which is displayed as a tooltip. This is a web only prop and has no effect on react-native.\n */\n htmlTitle?: string;\n opacity?: number;\n} & TestID &\n StyledPropsBlade &\n Omit<BladeCommonEvents, 'onBlur' | 'onMouseLeave'>;\n\n/*\n Mandatory children prop when icon is not provided\n*/\ntype BaseLinkWithoutIconProps = BaseLinkCommonProps & {\n icon?: undefined;\n children: StringChildrenType;\n};\n\n/*\n Optional children prop when icon is provided\n*/\ntype BaseLinkWithIconProps = BaseLinkCommonProps & {\n icon: IconComponent;\n children?: StringChildrenType;\n};\n\n/*\n BaseLink Props with or without an icon\n*/\ntype BaseLinkPropsWithOrWithoutIcon = BaseLinkWithIconProps | BaseLinkWithoutIconProps;\n\n/*\n BaseLink Props when variant is anchor\n*/\ntype BaseLinkAnchorVariantProps = BaseLinkPropsWithOrWithoutIcon & {\n variant?: 'anchor';\n href?: string;\n target?: string;\n rel?: string;\n isDisabled?: undefined;\n};\n\n/*\n BaseLink Props when variant is button\n*/\ntype BaseLinkButtonVariantProps = BaseLinkPropsWithOrWithoutIcon & {\n variant?: 'button';\n isDisabled?: boolean;\n href?: undefined;\n target?: undefined;\n rel?: undefined;\n};\n\n/*\n BaseLink Props when variant is anchor or button\n*/\nexport type BaseLinkProps = BaseLinkAnchorVariantProps | BaseLinkButtonVariantProps;\n\ntype BaseLinkStyleProps = {\n as: 'a' | 'button';\n textDecorationLine: 'underline' | 'none';\n iconColor: IconProps['color'];\n iconSize: IconProps['size'];\n iconPadding: DotNotationSpacingStringToken;\n textColor: BaseTextProps['color'];\n focusRingColor: string;\n motionDuration: DurationString;\n motionEasing: EasingString;\n cursor: CSSObject['cursor'];\n disabled: boolean;\n role: 'button' | 'link';\n defaultRel: BaseLinkProps['rel'];\n type?: 'button';\n fontSize: BaseTextProps['fontSize'];\n lineHeight: BaseTextProps['lineHeight'];\n};\n\ntype LinkActionStates = ActionStates;\nconst getColorToken = ({\n variant,\n color,\n currentInteraction,\n isDisabled,\n element,\n}: {\n variant: BaseLinkProps['variant'];\n color: BaseLinkProps['color'];\n element: 'icon' | 'text';\n currentInteraction: LinkActionStates;\n isDisabled: boolean;\n}): IconColors | TextColors => {\n let state = currentInteraction;\n const map = {\n default: 'normal',\n hover: 'subtle',\n focus: 'normal',\n disabled: 'disabled',\n } as const;\n\n if (isDisabled && variant == 'button') {\n state = 'disabled';\n }\n\n if (color && color !== 'primary') {\n if (color !== 'white') {\n return `interactive.${element}.${color}.${map[state]}`;\n }\n return `interactive.${element}.staticWhite.${map[state]}`;\n }\n return `interactive.${element}.primary.${map[state]}`;\n};\n\nconst getProps = ({\n theme,\n variant,\n currentInteraction,\n children,\n isDisabled,\n color,\n target,\n size,\n}: {\n theme: Theme;\n variant: NonNullable<BaseLinkProps['variant']>;\n currentInteraction: LinkActionStates;\n children?: string;\n isDisabled: boolean;\n color: BaseLinkProps['color'];\n target: BaseLinkProps['target'];\n size: NonNullable<BaseLinkProps['size']>;\n}): BaseLinkStyleProps => {\n const isButton = variant === 'button';\n const textSizes: {\n fontSize: Record<NonNullable<BaseLinkProps['size']>, keyof FontSize>;\n lineHeight: Record<NonNullable<BaseLinkProps['size']>, keyof Typography['lineHeights']>;\n } = {\n fontSize: {\n xsmall: 25,\n small: 75,\n medium: 100,\n large: 200,\n },\n lineHeight: {\n xsmall: 25,\n small: 75,\n medium: 100,\n large: 200,\n },\n };\n\n const props: BaseLinkStyleProps = {\n as: isButton ? 'button' : 'a',\n textDecorationLine: !isButton && currentInteraction !== 'default' ? 'underline' : 'none',\n iconColor: getColorToken({\n variant,\n color,\n element: 'icon',\n currentInteraction,\n isDisabled,\n }) as IconProps['color'],\n fontSize: textSizes.fontSize[size],\n lineHeight: textSizes.lineHeight[size],\n iconSize: size,\n iconPadding: children?.trim() ? 'spacing.2' : 'spacing.0',\n textColor: getColorToken({\n variant,\n color,\n element: 'text',\n currentInteraction,\n isDisabled,\n }) as BaseTextProps['color'],\n focusRingColor: getIn(theme.colors, 'interactive.background.primary.faded'),\n motionDuration: 'duration.2xquick',\n motionEasing: 'easing.standard.effective',\n cursor: isButton && isDisabled ? 'not-allowed' : 'pointer',\n disabled: isButton && isDisabled,\n role: isButton ? 'button' : 'link',\n defaultRel: target && target === '_blank' ? 'noreferrer noopener' : undefined,\n type: isButton ? 'button' : undefined,\n };\n\n return props;\n};\n\nconst _BaseLink: React.ForwardRefRenderFunction<BladeElementRef, BaseLinkProps> = (\n {\n children,\n icon: Icon,\n iconPosition = 'left',\n isDisabled = false,\n onClick,\n onKeyDown,\n variant = 'anchor',\n href,\n target,\n rel,\n color = 'primary',\n opacity,\n accessibilityProps,\n // @ts-expect-error avoiding exposing to public\n className,\n // @ts-expect-error avoiding exposing to public\n style,\n size = 'medium',\n testID,\n hitSlop,\n htmlTitle,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n onTouchStart,\n onTouchEnd,\n onMouseDown,\n onMouseUp,\n ...rest\n },\n ref,\n) => {\n const childrenString = getStringFromReactText(children);\n const { currentInteraction, setCurrentInteraction, ...syntheticEvents } = useInteraction();\n const { theme } = useTheme();\n if (__DEV__) {\n if (!Icon && !childrenString?.trim()) {\n throwBladeError({\n message: `At least one of icon or text is required to render a link.`,\n moduleName: 'BaseLink',\n });\n }\n }\n const {\n as,\n textDecorationLine,\n iconColor,\n iconPadding,\n iconSize,\n fontSize,\n textColor,\n focusRingColor,\n motionDuration,\n motionEasing,\n cursor,\n disabled,\n role,\n defaultRel,\n type,\n lineHeight,\n } = getProps({\n theme,\n variant,\n currentInteraction,\n children: childrenString,\n isDisabled,\n color,\n target,\n size,\n });\n\n const handleOnClick = (event: SyntheticEvent): void => {\n if (onClick) {\n onClick(event);\n }\n };\n\n const asProp = isReactNative() ? undefined : 'span';\n return (\n <StyledBaseLink\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Link, testID })}\n accessibilityProps={{\n ...makeAccessible({\n role,\n disabled,\n ...accessibilityProps,\n }),\n }}\n variant={variant}\n as={as}\n href={href}\n target={target}\n rel={rel ?? defaultRel}\n onClick={handleOnClick}\n {...syntheticEvents}\n onBlur={(event: any) => {\n onBlur?.(event);\n syntheticEvents.onBlur();\n }}\n onFocus={(event: any) => {\n onFocus?.(event);\n syntheticEvents.onFocus();\n }}\n onMouseLeave={(event: any) => {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n syntheticEvents.onMouseLeave();\n }}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd}\n onKeyDown={onKeyDown}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n disabled={disabled}\n type={type}\n cursor={cursor}\n focusRingColor={focusRingColor}\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n setCurrentInteraction={setCurrentInteraction}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n // @ts-ignore Because we avoided exposing className to public\n className={className}\n style={style}\n hitSlop={hitSlop}\n title={htmlTitle}\n >\n <BaseBox\n as={asProp}\n display=\"flex\"\n flexDirection=\"row\"\n className=\"content-container\"\n alignItems=\"center\"\n opacity={opacity}\n >\n {Icon && iconPosition == 'left' ? (\n <BaseBox as={asProp} paddingRight={iconPadding} display=\"flex\" alignItems=\"center\">\n <Icon color={iconColor} size={iconSize} />\n </BaseBox>\n ) : null}\n <BaseText\n as={asProp}\n textDecorationLine={textDecorationLine}\n color={textColor}\n fontSize={fontSize}\n lineHeight={lineHeight}\n textAlign=\"center\"\n fontWeight=\"medium\"\n >\n {children}\n </BaseText>\n {Icon && iconPosition == 'right' ? (\n <BaseBox as={asProp} paddingLeft={iconPadding} display=\"flex\" alignItems=\"center\">\n <Icon color={iconColor} size={iconSize} />\n </BaseBox>\n ) : null}\n </BaseBox>\n </StyledBaseLink>\n );\n};\n\nconst BaseLink = assignWithoutSideEffects(React.forwardRef(_BaseLink), {\n displayName: 'BaseLink',\n componentId: 'BaseLink',\n});\n\nexport default BaseLink;\n"],"names":["getColorToken","_ref","variant","color","currentInteraction","isDisabled","element","state","map","hover","focus","disabled","concat","getProps","_ref2","theme","children","target","size","isButton","textSizes","fontSize","xsmall","small","medium","large","lineHeight","props","as","textDecorationLine","iconColor","iconSize","iconPadding","trim","textColor","focusRingColor","getIn","colors","motionDuration","motionEasing","cursor","role","defaultRel","undefined","type","_BaseLink","_ref3","ref","Icon","icon","_ref3$iconPosition","iconPosition","_ref3$isDisabled","onClick","onKeyDown","_ref3$variant","href","rel","_ref3$color","opacity","accessibilityProps","className","style","_ref3$size","testID","hitSlop","htmlTitle","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","rest","_objectWithoutProperties","_excluded","childrenString","getStringFromReactText","_useInteraction","useInteraction","setCurrentInteraction","syntheticEvents","_excluded2","_useTheme","useTheme","throwBladeError","message","moduleName","_getProps","handleOnClick","event","asProp","isReactNative","_jsx","StyledBaseLink","_objectSpread","metaAttribute","name","MetaConstants","Link","makeAccessible","getStyledProps","makeAnalyticsAttribute","title","_jsxs","BaseBox","display","flexDirection","alignItems","paddingRight","BaseText","textAlign","fontWeight","paddingLeft","BaseLink","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0JA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAYY;AAAA,EAAA,IAX7BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAClBC,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IACVC,OAAO,GAAAL,IAAA,CAAPK,OAAO,CAAA;EAQP,IAAIC,KAAK,GAAGH,kBAAkB,CAAA;AAC9B,EAAA,IAAMI,GAAG,GAAG;AACV,IAAA,SAAA,EAAS,QAAQ;AACjBC,IAAAA,KAAK,EAAE,QAAQ;AACfC,IAAAA,KAAK,EAAE,QAAQ;AACfC,IAAAA,QAAQ,EAAE,UAAA;GACF,CAAA;AAEV,EAAA,IAAIN,UAAU,IAAIH,OAAO,IAAI,QAAQ,EAAE;AACrCK,IAAAA,KAAK,GAAG,UAAU,CAAA;AACpB,GAAA;AAEA,EAAA,IAAIJ,KAAK,IAAIA,KAAK,KAAK,SAAS,EAAE;IAChC,IAAIA,KAAK,KAAK,OAAO,EAAE;AACrB,MAAA,OAAA,cAAA,CAAAS,MAAA,CAAsBN,OAAO,EAAA,GAAA,CAAA,CAAAM,MAAA,CAAIT,KAAK,EAAA,GAAA,CAAA,CAAAS,MAAA,CAAIJ,GAAG,CAACD,KAAK,CAAC,CAAA,CAAA;AACtD,KAAA;IACA,OAA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ACC,cAAK,CAACC,UAAU,CAAC5E,SAAS,CAAC,EAAE;AACrE6E,EAAAA,WAAW,EAAE,UAAU;AACvBC,EAAAA,WAAW,EAAE,UAAA;AACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"BaseLink.js","sources":["../../../../../../../src/components/Link/BaseLink/BaseLink.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/prefer-ts-expect-error */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport type { SyntheticEvent } from 'react';\nimport React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport type { GestureResponderEvent } from 'react-native';\nimport StyledBaseLink from './StyledBaseLink';\nimport getIn from '~utils/lodashButBetter/get';\nimport useInteraction from '~utils/useInteraction';\nimport type { IconColors, IconComponent, IconProps } from '~components/Icons';\nimport type { Theme } from '~components/BladeProvider';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { BaseText } from '~components/Typography/BaseText';\nimport type {\n DotNotationSpacingStringToken,\n StringChildrenType,\n TestID,\n BladeElementRef,\n} from '~utils/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { Platform } from '~utils';\nimport { isReactNative } from '~utils';\nimport type { DurationString, EasingString, FontSize, Typography } from '~tokens/global';\nimport type {\n BaseTextProps,\n BaseTextSizes,\n TextColors,\n} from '~components/Typography/BaseText/types';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { BladeCommonEvents } from '~components/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport type { ActionStates } from '~utils/useInteraction';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype BaseLinkCommonProps = {\n color?: 'primary' | 'white' | 'positive' | 'negative' | 'notice' | 'information' | 'neutral';\n icon?: IconComponent;\n iconPosition?: 'left' | 'right';\n onClick?: (event: SyntheticEvent) => void;\n onBlur?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.FocusEvent<HTMLButtonElement>) => void;\n }>;\n onMouseLeave?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.MouseEvent<HTMLButtonElement>) => void;\n }>;\n onKeyDown?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.KeyboardEvent<HTMLButtonElement>) => void;\n }>;\n accessibilityProps?: Partial<AccessibilityProps>;\n\n /**\n * Sets the size of the link\n *\n * @default medium\n */\n size?: Extract<BaseTextSizes, 'xsmall' | 'small' | 'medium' | 'large'>;\n /**\n * Defines how far your touch can start away from the link. This is a react-native only prop and has no effect on web.\n */\n hitSlop?:\n | {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n }\n | number;\n /**\n * The title of the link which is displayed as a tooltip. This is a web only prop and has no effect on react-native.\n */\n htmlTitle?: string;\n opacity?: number;\n} & TestID &\n StyledPropsBlade &\n Omit<BladeCommonEvents, 'onBlur' | 'onMouseLeave'>;\n\n/*\n Mandatory children prop when icon is not provided\n*/\ntype BaseLinkWithoutIconProps = BaseLinkCommonProps & {\n icon?: undefined;\n children: StringChildrenType;\n};\n\n/*\n Optional children prop when icon is provided\n*/\ntype BaseLinkWithIconProps = BaseLinkCommonProps & {\n icon: IconComponent;\n children?: StringChildrenType;\n};\n\n/*\n BaseLink Props with or without an icon\n*/\ntype BaseLinkPropsWithOrWithoutIcon = BaseLinkWithIconProps | BaseLinkWithoutIconProps;\n\n/*\n BaseLink Props when variant is anchor\n*/\ntype BaseLinkAnchorVariantProps = BaseLinkPropsWithOrWithoutIcon & {\n variant?: 'anchor';\n href?: string;\n target?: string;\n rel?: string;\n isDisabled?: undefined;\n};\n\n/*\n BaseLink Props when variant is button\n*/\ntype BaseLinkButtonVariantProps = BaseLinkPropsWithOrWithoutIcon & {\n variant?: 'button';\n isDisabled?: boolean;\n href?: undefined;\n target?: undefined;\n rel?: undefined;\n};\n\n/*\n BaseLink Props when variant is anchor or button\n*/\nexport type BaseLinkProps = BaseLinkAnchorVariantProps | BaseLinkButtonVariantProps;\n\ntype BaseLinkStyleProps = {\n as: 'a' | 'button';\n textDecorationLine: 'underline' | 'none';\n iconColor: IconProps['color'];\n iconSize: IconProps['size'];\n iconPadding: DotNotationSpacingStringToken;\n textColor: BaseTextProps['color'];\n focusRingColor: string;\n motionDuration: DurationString;\n motionEasing: EasingString;\n cursor: CSSObject['cursor'];\n disabled: boolean;\n role: 'button' | 'link';\n defaultRel: BaseLinkProps['rel'];\n type?: 'button';\n fontSize: BaseTextProps['fontSize'];\n lineHeight: BaseTextProps['lineHeight'];\n};\n\ntype LinkActionStates = ActionStates;\nconst getColorToken = ({\n variant,\n color,\n currentInteraction,\n isDisabled,\n element,\n}: {\n variant: BaseLinkProps['variant'];\n color: BaseLinkProps['color'];\n element: 'icon' | 'text';\n currentInteraction: LinkActionStates;\n isDisabled: boolean;\n}): IconColors | TextColors => {\n let state = currentInteraction;\n const map = {\n default: 'normal',\n hover: 'subtle',\n focus: 'normal',\n disabled: 'disabled',\n } as const;\n\n if (isDisabled && variant == 'button') {\n state = 'disabled';\n }\n\n if (color && color !== 'primary') {\n if (color !== 'white') {\n return `interactive.${element}.${color}.${map[state]}`;\n }\n return `interactive.${element}.staticWhite.${map[state]}`;\n }\n return `interactive.${element}.primary.${map[state]}`;\n};\n\nconst getProps = ({\n theme,\n variant,\n currentInteraction,\n children,\n isDisabled,\n color,\n target,\n size,\n}: {\n theme: Theme;\n variant: NonNullable<BaseLinkProps['variant']>;\n currentInteraction: LinkActionStates;\n children?: string;\n isDisabled: boolean;\n color: BaseLinkProps['color'];\n target: BaseLinkProps['target'];\n size: NonNullable<BaseLinkProps['size']>;\n}): BaseLinkStyleProps => {\n const isButton = variant === 'button';\n const textSizes: {\n fontSize: Record<NonNullable<BaseLinkProps['size']>, keyof FontSize>;\n lineHeight: Record<NonNullable<BaseLinkProps['size']>, keyof Typography['lineHeights']>;\n } = {\n fontSize: {\n xsmall: 25,\n small: 75,\n medium: 100,\n large: 200,\n },\n lineHeight: {\n xsmall: 25,\n small: 75,\n medium: 100,\n large: 200,\n },\n };\n\n const props: BaseLinkStyleProps = {\n as: isButton ? 'button' : 'a',\n textDecorationLine: !isButton && currentInteraction !== 'default' ? 'underline' : 'none',\n iconColor: getColorToken({\n variant,\n color,\n element: 'icon',\n currentInteraction,\n isDisabled,\n }) as IconProps['color'],\n fontSize: textSizes.fontSize[size],\n lineHeight: textSizes.lineHeight[size],\n iconSize: size,\n iconPadding: children?.trim() ? 'spacing.2' : 'spacing.0',\n textColor: getColorToken({\n variant,\n color,\n element: 'text',\n currentInteraction,\n isDisabled,\n }) as BaseTextProps['color'],\n focusRingColor: getIn(theme.colors, 'interactive.background.primary.faded'),\n motionDuration: 'duration.2xquick',\n motionEasing: 'easing.standard',\n cursor: isButton && isDisabled ? 'not-allowed' : 'pointer',\n disabled: isButton && isDisabled,\n role: isButton ? 'button' : 'link',\n defaultRel: target && target === '_blank' ? 'noreferrer noopener' : undefined,\n type: isButton ? 'button' : undefined,\n };\n\n return props;\n};\n\nconst _BaseLink: React.ForwardRefRenderFunction<BladeElementRef, BaseLinkProps> = (\n {\n children,\n icon: Icon,\n iconPosition = 'left',\n isDisabled = false,\n onClick,\n onKeyDown,\n variant = 'anchor',\n href,\n target,\n rel,\n color = 'primary',\n opacity,\n accessibilityProps,\n // @ts-expect-error avoiding exposing to public\n className,\n // @ts-expect-error avoiding exposing to public\n style,\n size = 'medium',\n testID,\n hitSlop,\n htmlTitle,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n onTouchStart,\n onTouchEnd,\n onMouseDown,\n onMouseUp,\n ...rest\n },\n ref,\n) => {\n const childrenString = getStringFromReactText(children);\n const { currentInteraction, setCurrentInteraction, ...syntheticEvents } = useInteraction();\n const { theme } = useTheme();\n if (__DEV__) {\n if (!Icon && !childrenString?.trim()) {\n throwBladeError({\n message: `At least one of icon or text is required to render a link.`,\n moduleName: 'BaseLink',\n });\n }\n }\n const {\n as,\n textDecorationLine,\n iconColor,\n iconPadding,\n iconSize,\n fontSize,\n textColor,\n focusRingColor,\n motionDuration,\n motionEasing,\n cursor,\n disabled,\n role,\n defaultRel,\n type,\n lineHeight,\n } = getProps({\n theme,\n variant,\n currentInteraction,\n children: childrenString,\n isDisabled,\n color,\n target,\n size,\n });\n\n const handleOnClick = (event: SyntheticEvent): void => {\n if (onClick) {\n onClick(event);\n }\n };\n\n const asProp = isReactNative() ? undefined : 'span';\n return (\n <StyledBaseLink\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Link, testID })}\n accessibilityProps={{\n ...makeAccessible({\n role,\n disabled,\n ...accessibilityProps,\n }),\n }}\n variant={variant}\n as={as}\n href={href}\n target={target}\n rel={rel ?? defaultRel}\n onClick={handleOnClick}\n {...syntheticEvents}\n onBlur={(event: any) => {\n onBlur?.(event);\n syntheticEvents.onBlur();\n }}\n onFocus={(event: any) => {\n onFocus?.(event);\n syntheticEvents.onFocus();\n }}\n onMouseLeave={(event: any) => {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n syntheticEvents.onMouseLeave();\n }}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd}\n onKeyDown={onKeyDown}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n disabled={disabled}\n type={type}\n cursor={cursor}\n focusRingColor={focusRingColor}\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n setCurrentInteraction={setCurrentInteraction}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n // @ts-ignore Because we avoided exposing className to public\n className={className}\n style={style}\n hitSlop={hitSlop}\n title={htmlTitle}\n >\n <BaseBox\n as={asProp}\n display=\"flex\"\n flexDirection=\"row\"\n className=\"content-container\"\n alignItems=\"center\"\n opacity={opacity}\n >\n {Icon && iconPosition == 'left' ? (\n <BaseBox as={asProp} paddingRight={iconPadding} display=\"flex\" alignItems=\"center\">\n <Icon color={iconColor} size={iconSize} />\n </BaseBox>\n ) : null}\n <BaseText\n as={asProp}\n textDecorationLine={textDecorationLine}\n color={textColor}\n fontSize={fontSize}\n lineHeight={lineHeight}\n textAlign=\"center\"\n fontWeight=\"medium\"\n >\n {children}\n </BaseText>\n {Icon && iconPosition == 'right' ? (\n <BaseBox as={asProp} paddingLeft={iconPadding} display=\"flex\" alignItems=\"center\">\n <Icon color={iconColor} size={iconSize} />\n </BaseBox>\n ) : null}\n </BaseBox>\n </StyledBaseLink>\n );\n};\n\nconst BaseLink = assignWithoutSideEffects(React.forwardRef(_BaseLink), {\n displayName: 'BaseLink',\n componentId: 'BaseLink',\n});\n\nexport default BaseLink;\n"],"names":["getColorToken","_ref","variant","color","currentInteraction","isDisabled","element","state","map","hover","focus","disabled","concat","getProps","_ref2","theme","children","target","size","isButton","textSizes","fontSize","xsmall","small","medium","large","lineHeight","props","as","textDecorationLine","iconColor","iconSize","iconPadding","trim","textColor","focusRingColor","getIn","colors","motionDuration","motionEasing","cursor","role","defaultRel","undefined","type","_BaseLink","_ref3","ref","Icon","icon","_ref3$iconPosition","iconPosition","_ref3$isDisabled","onClick","onKeyDown","_ref3$variant","href","rel","_ref3$color","opacity","accessibilityProps","className","style","_ref3$size","testID","hitSlop","htmlTitle","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","rest","_objectWithoutProperties","_excluded","childrenString","getStringFromReactText","_useInteraction","useInteraction","setCurrentInteraction","syntheticEvents","_excluded2","_useTheme","useTheme","throwBladeError","message","moduleName","_getProps","handleOnClick","event","asProp","isReactNative","_jsx","StyledBaseLink","_objectSpread","metaAttribute","name","MetaConstants","Link","makeAccessible","getStyledProps","makeAnalyticsAttribute","title","_jsxs","BaseBox","display","flexDirection","alignItems","paddingRight","BaseText","textAlign","fontWeight","paddingLeft","BaseLink","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0JA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAYY;AAAA,EAAA,IAX7BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAClBC,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IACVC,OAAO,GAAAL,IAAA,CAAPK,OAAO,CAAA;EAQP,IAAIC,KAAK,GAAGH,kBAAkB,CAAA;AAC9B,EAAA,IAAMI,GAAG,GAAG;AACV,IAAA,SAAA,EAAS,QAAQ;AACjBC,IAAAA,KAAK,EAAE,QAAQ;AACfC,IAAAA,KAAK,EAAE,QAAQ;AACfC,IAAAA,QAAQ,EAAE,UAAA;GACF,CAAA;AAEV,EAAA,IAAIN,UAAU,IAAIH,OAAO,IAAI,QAAQ,EAAE;AACrCK,IAAAA,KAAK,GAAG,UAAU,CAAA;AACpB,GAAA;AAEA,EAAA,IAAIJ,KAAK,IAAIA,KAAK,KAAK,SAAS,EAAE;IAChC,IAAIA,KAAK,KAAK,OAAO,EAAE;AACrB,MAAA,OAAA,cAAA,CAAAS,MAAA,CAAsBN,OAAO,EAAA,GAAA,CAAA,CAAAM,MAAA,CAAIT,KAAK,EAAA,GAAA,CAAA,CAAAS,MAAA,CAAIJ,GAAG,CAACD,KAAK,CAAC,CAAA,CAAA;AACtD,KAAA;IACA,OAAAK,cAAAA,CAAAA,MAAA,CAAsBN,OAAO,EAAA,eAAA,CAAA,CAAAM,MAAA,CAAgBJ,GAAG,CAACD,KAAK,CAAC,CAAA,CAAA;AACzD,GAAA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;;;"}
|
|
@@ -69,7 +69,7 @@ var StyledUnorderedList = /*#__PURE__*/styled(UnorderedList).withConfig({
|
|
|
69
69
|
* <List />
|
|
70
70
|
* ```
|
|
71
71
|
*/
|
|
72
|
-
var _List = function _List(_ref3) {
|
|
72
|
+
var _List = function _List(_ref3, ref) {
|
|
73
73
|
var _ref3$variant = _ref3.variant,
|
|
74
74
|
variant = _ref3$variant === void 0 ? 'unordered' : _ref3$variant,
|
|
75
75
|
size = _ref3.size,
|
|
@@ -106,7 +106,9 @@ var _List = function _List(_ref3) {
|
|
|
106
106
|
});
|
|
107
107
|
return /*#__PURE__*/jsx(ListProvider, {
|
|
108
108
|
value: listContextValue,
|
|
109
|
-
children: /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread({
|
|
109
|
+
children: /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread({
|
|
110
|
+
ref: ref
|
|
111
|
+
}, getStyledProps(styledProps)), {}, {
|
|
110
112
|
children: /*#__PURE__*/jsx(ListElement, _objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
|
|
111
113
|
name: MetaConstants.List,
|
|
112
114
|
testID: testID
|
|
@@ -123,7 +125,7 @@ var _List = function _List(_ref3) {
|
|
|
123
125
|
}))
|
|
124
126
|
});
|
|
125
127
|
};
|
|
126
|
-
var List = /*#__PURE__*/assignWithoutSideEffects(_List, {
|
|
128
|
+
var List = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.forwardRef(_List), {
|
|
127
129
|
componentId: MetaConstants.List
|
|
128
130
|
});
|
|
129
131
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sources":["../../../../../../src/components/List/List.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { ListProvider, useListContext } from './ListContext';\nimport { UnorderedList } from './UnorderedList';\nimport { OrderedList } from './OrderedList';\nimport type { ListItemProps } from './ListItem';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { IconComponent, IconProps } from '~components/Icons';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListCommonProps = {\n /**\n * ListItem to be rendered for the List.\n *\n */\n children: React.ReactElement<ListItemProps> | React.ReactElement<ListItemProps>[];\n /**\n * Sets the variant to be rendered for the List.\n *\n * @default 'unordered'\n */\n variant?: 'unordered' | 'ordered' | 'ordered-filled';\n /**\n * Sets the size for the List.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n StyledPropsBlade;\n\ntype ListWithIconProps = ListCommonProps & {\n variant?: 'unordered';\n icon?: IconComponent;\n iconColor?: IconProps['color'];\n};\ntype ListWithoutIconProps = ListCommonProps & {\n variant?: 'ordered' | 'ordered-filled';\n icon?: undefined;\n iconColor?: undefined;\n};\ntype ListProps = ListWithIconProps | ListWithoutIconProps;\n\nconst StyledOrderedList = styled(OrderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\nconst StyledUnorderedList = styled(UnorderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\n/**\n * List Component is used to display a set of related items that are composed of text/links. Each list item begins with a bullet or a number.\n *\n * ## Usage\n *\n * ```tsx\n * <List\n * variant='unordered'\n * size='medium'\n * >\n * <ListItem>\n * Item 1\n * <List>\n * <ListItem>Item 1.1</ListItem>\n * </List>\n * </ListItem>\n * <ListItem>Item 2</ListItem>\n * <List />\n * ```\n */\nconst _List = (
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../../src/components/List/List.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { ListProvider, useListContext } from './ListContext';\nimport { UnorderedList } from './UnorderedList';\nimport { OrderedList } from './OrderedList';\nimport type { ListItemProps } from './ListItem';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { IconComponent, IconProps } from '~components/Icons';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { BladeElementRef, DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListCommonProps = {\n /**\n * ListItem to be rendered for the List.\n *\n */\n children: React.ReactElement<ListItemProps> | React.ReactElement<ListItemProps>[];\n /**\n * Sets the variant to be rendered for the List.\n *\n * @default 'unordered'\n */\n variant?: 'unordered' | 'ordered' | 'ordered-filled';\n /**\n * Sets the size for the List.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n StyledPropsBlade;\n\ntype ListWithIconProps = ListCommonProps & {\n variant?: 'unordered';\n icon?: IconComponent;\n iconColor?: IconProps['color'];\n};\ntype ListWithoutIconProps = ListCommonProps & {\n variant?: 'ordered' | 'ordered-filled';\n icon?: undefined;\n iconColor?: undefined;\n};\ntype ListProps = ListWithIconProps | ListWithoutIconProps;\n\nconst StyledOrderedList = styled(OrderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\nconst StyledUnorderedList = styled(UnorderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\n/**\n * List Component is used to display a set of related items that are composed of text/links. Each list item begins with a bullet or a number.\n *\n * ## Usage\n *\n * ```tsx\n * <List\n * variant='unordered'\n * size='medium'\n * >\n * <ListItem>\n * Item 1\n * <List>\n * <ListItem>Item 1.1</ListItem>\n * </List>\n * </ListItem>\n * <ListItem>Item 2</ListItem>\n * <List />\n * ```\n */\nconst _List = (\n { variant = 'unordered', size, children, icon, testID, iconColor, ...styledProps }: ListProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const ListElement = variant === 'unordered' ? StyledUnorderedList : StyledOrderedList;\n const { level, size: listContextSize } = useListContext();\n const listContextValue = useMemo(\n () => ({\n level: level ? level + 1 : 1,\n size: size ?? listContextSize,\n icon,\n iconColor,\n variant,\n }),\n [icon, iconColor, level, listContextSize, size, variant],\n );\n\n const childrenArray = React.Children.toArray(children);\n const childListItems = childrenArray.filter((child) => {\n if (isValidAllowedChildren(child, MetaConstants.ListItem)) {\n return child;\n }\n if (__DEV__) {\n throwBladeError({\n message: 'You can only pass a ListItem as a child to List.',\n moduleName: 'List',\n });\n }\n return null;\n });\n\n return (\n <ListProvider value={listContextValue}>\n <BaseBox ref={ref as never} {...getStyledProps(styledProps)}>\n <ListElement\n {...metaAttribute({ name: MetaConstants.List, testID })}\n {...makeAccessible({ role: 'list' })} // Role needed for react-native\n >\n {variant === 'unordered'\n ? childListItems\n : childListItems.map(\n (child, index) =>\n React.cloneElement(child as React.ReactElement, { _itemNumber: index + 1 }), // adds _itemNumber for rendering ordered list bullets\n )}\n </ListElement>\n </BaseBox>\n </ListProvider>\n );\n};\n\nconst List = assignWithoutSideEffects(React.forwardRef(_List), { componentId: MetaConstants.List });\n\nexport { List };\nexport type { ListProps };\n"],"names":["StyledOrderedList","styled","OrderedList","withConfig","displayName","componentId","_ref","marginTop","theme","makeSpace","getIn","undefined","StyledUnorderedList","UnorderedList","_ref2","_List","_ref3","ref","_ref3$variant","variant","size","children","icon","testID","iconColor","styledProps","_objectWithoutProperties","_excluded","ListElement","_useListContext","useListContext","level","listContextSize","listContextValue","useMemo","childrenArray","React","Children","toArray","childListItems","filter","child","isValidAllowedChildren","MetaConstants","ListItem","throwBladeError","message","moduleName","_jsx","ListProvider","value","BaseBox","_objectSpread","getStyledProps","metaAttribute","name","List","makeAccessible","role","map","index","cloneElement","_itemNumber","assignWithoutSideEffects","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,IAAMA,iBAAiB,gBAAGC,MAAM,CAACC,WAAW,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,yBAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAC3C,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK,CAAA;EAAA,OAAQ;AACzBD,IAAAA,SAAS,EAAEA,SAAS,GAAGE,SAAS,CAACC,KAAK,CAACF,KAAK,EAAED,SAAS,CAAC,CAAC,GAAGI,SAAAA;GAC7D,CAAA;AAAA,CAAC,CACH,CAAA;AAED,IAAMC,mBAAmB,gBAAGX,MAAM,CAACY,aAAa,CAAC,CAAAV,UAAA,CAAA;EAAAC,WAAA,EAAA,2BAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAC/C,UAAAS,KAAA,EAAA;AAAA,EAAA,IAAGP,SAAS,GAAAO,KAAA,CAATP,SAAS;IAAEC,KAAK,GAAAM,KAAA,CAALN,KAAK,CAAA;EAAA,OAAQ;AACzBD,IAAAA,SAAS,EAAEA,SAAS,GAAGE,SAAS,CAACC,KAAK,CA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,CAChB,UAAClB,KAAK,EAAEmB,KAAK,EAAA;AAAA,UAAA,oBACXxB,cAAK,CAACyB,YAAY,CAACpB,KAAK,EAAwB;YAAEqB,WAAW,EAAEF,KAAK,GAAG,CAAA;AAAE,WAAC,CAAC,CAAA;SAAE;AACjF,SAAA;OACO,CAAA,CAAA;KACN,CAAA,CAAA;AAAC,GACE,CAAC,CAAA;AAEnB,CAAC,CAAA;AAEKJ,IAAAA,IAAI,gBAAGO,wBAAwB,eAAC3B,cAAK,CAAC4B,UAAU,CAACjD,KAAK,CAAC,EAAE;EAAEV,WAAW,EAAEsC,aAAa,CAACa,IAAAA;AAAK,CAAC;;;;"}
|
|
@@ -46,7 +46,7 @@ var ModalContent = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
46
46
|
})(function (_ref) {
|
|
47
47
|
var isVisible = _ref.isVisible,
|
|
48
48
|
theme = _ref.theme;
|
|
49
|
-
return css(["box-shadow:", ";position:fixed;transform:translate(-50%,-50%);opacity:", ";animation:", " ", " ", ";"], theme.elevation.highRaised, isVisible ? 1 : 0, isVisible ? entry : exit, castWebType(makeMotionTime(theme.motion.duration.
|
|
49
|
+
return css(["box-shadow:", ";position:fixed;transform:translate(-50%,-50%);opacity:", ";animation:", " ", " ", ";"], theme.elevation.highRaised, isVisible ? 1 : 0, isVisible ? entry : exit, castWebType(makeMotionTime(theme.motion.duration.moderate)), isVisible ? castWebType(theme.motion.easing.entrance) : castWebType(theme.motion.easing.exit));
|
|
50
50
|
});
|
|
51
51
|
var Modal = function Modal(_ref2) {
|
|
52
52
|
var _ref2$isOpen = _ref2.isOpen,
|
|
@@ -64,7 +64,7 @@ var Modal = function Modal(_ref2) {
|
|
|
64
64
|
theme = _useTheme.theme,
|
|
65
65
|
platform = _useTheme.platform;
|
|
66
66
|
var _usePresence = usePresence(isOpen, {
|
|
67
|
-
transitionDuration: theme.motion.duration.
|
|
67
|
+
transitionDuration: theme.motion.duration.moderate,
|
|
68
68
|
initialEnter: true
|
|
69
69
|
}),
|
|
70
70
|
isMounted = _usePresence.isMounted,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.web.js","sources":["../../../../../../src/components/Modal/Modal.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useEffect } from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nimport { FloatingFocusManager, FloatingPortal, useFloating } from '@floating-ui/react';\nimport usePresence from 'use-presence';\nimport { ModalHeader } from './ModalHeader';\nimport type { ModalHeaderProps } from './ModalHeader';\nimport { ModalFooter } from './ModalFooter';\nimport type { ModalFooterProps } from './ModalFooter';\nimport { ModalBody } from './ModalBody';\nimport type { ModalBodyProps } from './ModalBody';\nimport { ModalContext } from './ModalContext';\nimport { ModalBackdrop } from './ModalBackdrop';\nimport {\n modalBorderRadius,\n modalMaxHeight,\n modalMaxWidth,\n modalMinWidth,\n modalResponsiveScreenGap,\n} from './modalTokens';\nimport type { ModalProps } from './types';\nimport { componentIds } from './constants';\nimport { castWebType, makeMotionTime, makeSize } from '~utils';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { Box } from '~components/Box';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { logger } from '~utils/logger';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { useVerifyAllowedChildren } from '~utils/useVerifyAllowedChildren';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst entry = keyframes`\n from {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.9) translateY(20px);\n }\n to {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1) translateY(0px);\n }\n`;\n\nconst exit = keyframes`\n from {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1) translateY(0px);\n }\n to {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.9) translateY(20px);\n }\n`;\n\nconst ModalContent = styled(BaseBox)<{ isVisible: boolean }>(({ isVisible, theme }) => {\n return css`\n box-shadow: ${theme.elevation.highRaised};\n position: fixed;\n transform: translate(-50%, -50%);\n opacity: ${isVisible ? 1 : 0};\n animation: ${isVisible ? entry : exit}\n ${castWebType(makeMotionTime(theme.motion.duration.xmoderate))}\n ${isVisible\n ? castWebType(theme.motion.easing.entrance.revealing)\n : castWebType(theme.motion.easing.exit.revealing)};\n `;\n});\n\nconst Modal = ({\n isOpen = false,\n children,\n onDismiss,\n initialFocusRef,\n size = 'small',\n accessibilityLabel,\n zIndex = componentZIndices.modal,\n ...rest\n}: ModalProps): React.ReactElement => {\n const { theme, platform } = useTheme();\n const { isMounted, isVisible } = usePresence(isOpen, {\n transitionDuration: theme.motion.duration.xmoderate,\n initialEnter: true,\n });\n\n // Warn consumer if modal is opened on mobile\n useEffect(() => {\n if (__DEV__) {\n if (platform === 'onMobile') {\n logger({\n message: 'Modal is not supported on mobile devices. Please use BottomSheet instead.',\n moduleName: 'Modal',\n type: 'warn',\n });\n }\n }\n }, [platform]);\n\n // required by floating ui to handle focus\n const { refs, context } = useFloating({\n open: isMounted,\n });\n\n const defaultInitialFocusRef = React.useRef<any>(null);\n\n const modalContext = React.useMemo(\n () => ({\n isOpen,\n close: onDismiss,\n defaultInitialFocusRef,\n isVisible,\n }),\n [isOpen, onDismiss, defaultInitialFocusRef, isVisible],\n );\n const handleKeyDown = (event: React.KeyboardEvent): void => {\n // close modal on escape key press\n if (event?.key === 'Escape' || event?.code === 'Escape') {\n onDismiss();\n }\n };\n\n // Only allow ModalHeader, ModalBody and ModalFooter as children\n useVerifyAllowedChildren({\n allowedComponents: [componentIds.ModalHeader, componentIds.ModalBody, componentIds.ModalFooter],\n children,\n componentName: 'Modal',\n });\n\n return (\n <FloatingPortal>\n <ModalContext.Provider value={modalContext}>\n {isMounted ? (\n <FloatingFocusManager\n returnFocus\n initialFocus={initialFocusRef ?? defaultInitialFocusRef}\n context={context}\n modal={true}\n >\n <Box\n zIndex={zIndex}\n position=\"fixed\"\n testID=\"modal-wrapper\"\n {...makeAnalyticsAttribute(rest)}\n >\n <ModalBackdrop />\n <ModalContent\n {...metaAttribute({\n name: MetaConstants.Modal,\n })}\n {...makeAccessible({\n role: 'dialog',\n modal: true,\n label: accessibilityLabel,\n })}\n maxWidth={makeSize(modalMaxWidth[size])}\n minWidth={makeSize(modalMinWidth)}\n maxHeight={modalMaxHeight}\n width={`calc(100vw - ${makeSize(modalResponsiveScreenGap)})`}\n borderRadius={modalBorderRadius}\n backgroundColor=\"popup.background.subtle\"\n position=\"absolute\"\n display=\"flex\"\n flexDirection=\"column\"\n top=\"50%\"\n left=\"50%\"\n onKeyDown={handleKeyDown}\n isVisible={isVisible}\n ref={refs.setFloating}\n >\n {children}\n </ModalContent>\n </Box>\n </FloatingFocusManager>\n ) : null}\n </ModalContext.Provider>\n </FloatingPortal>\n );\n};\n\nexport { Modal, ModalHeader, ModalFooter, ModalBody };\nexport type { ModalProps, ModalHeaderProps, ModalFooterProps, ModalBodyProps };\n"],"names":["entry","keyframes","exit","ModalContent","styled","BaseBox","withConfig","displayName","componentId","_ref","isVisible","theme","css","elevation","highRaised","castWebType","makeMotionTime","motion","duration","xmoderate","easing","entrance","revealing","Modal","_ref2","_ref2$isOpen","isOpen","children","onDismiss","initialFocusRef","_ref2$size","size","accessibilityLabel","_ref2$zIndex","zIndex","componentZIndices","modal","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","platform","_usePresence","usePresence","transitionDuration","initialEnter","isMounted","useEffect","logger","message","moduleName","type","_useFloating","useFloating","open","refs","context","defaultInitialFocusRef","React","useRef","modalContext","useMemo","close","handleKeyDown","event","key","code","useVerifyAllowedChildren","allowedComponents","componentIds","ModalHeader","ModalBody","ModalFooter","componentName","_jsx","FloatingPortal","ModalContext","Provider","value","FloatingFocusManager","returnFocus","initialFocus","_jsxs","Box","_objectSpread","position","testID","makeAnalyticsAttribute","ModalBackdrop","metaAttribute","name","MetaConstants","makeAccessible","role","label","maxWidth","makeSize","modalMaxWidth","minWidth","modalMinWidth","maxHeight","modalMaxHeight","width","concat","modalResponsiveScreenGap","borderRadius","modalBorderRadius","backgroundColor","display","flexDirection","top","left","onKeyDown","ref","setFloating"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAMA,KAAK,gBAAGC,SAAS,CAStB,CAAA,mJAAA,CAAA,CAAA,CAAA;AAED,IAAMC,IAAI,gBAAGD,SAAS,CASrB,CAAA,mJAAA,CAAA,CAAA,CAAA;AAED,IAAME,YAAY,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,wBAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAyB,CAAA,CAAA,UAAAC,IAAA,EAA0B;AAAA,EAAA,IAAvBC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK,CAAA;AAC9E,EAAA,OAAOC,GAAG,CAAA,CAAA,aAAA,EAAA,yDAAA,EAAA,aAAA,EAAA,GAAA,EAAA,GAAA,EAAA,GAAA,CAAA,EACMD,KAAK,CAACE,SAAS,CAACC,UAAU,EAG7BJ,SAAS,GAAG,CAAC,GAAG,CAAC,EACfA,SAAS,GAAGV,KAAK,GAAGE,IAAI,EACjCa,WAAW,CAACC,cAAc,CAACL,KAAK,CAACM,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,CAAC,EAC5DT,SAAS,GACPK,WAAW,CAACJ,KAAK,CAACM,MAAM,CAACG,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,GACnDP,WAAW,CAACJ,KAAK,CAACM,MAAM,CAACG,MAAM,CAAClB,IAAI,CAACoB,SAAS,CAAC,CAAA,CAAA;AAEzD,CAAC,CAAC,CAAA;AAEF,IAAMC,KAAK,GAAG,SAARA,KAAKA,CAAAC,KAAA,EAS2B;AAAA,EAAA,IAAAC,YAAA,GAAAD,KAAA,CARpCE,MAAM;AAAN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,CAACQ,wBAAwB,CAAC,EAAI,GAAA,CAAA;AAC7DC,YAAAA,YAAY,EAAEC,iBAAkB;AAChCC,YAAAA,eAAe,EAAC,yBAAyB;AACzCtB,YAAAA,QAAQ,EAAC,UAAU;AACnBuB,YAAAA,OAAO,EAAC,MAAM;AACdC,YAAAA,aAAa,EAAC,QAAQ;AACtBC,YAAAA,GAAG,EAAC,KAAK;AACTC,YAAAA,IAAI,EAAC,KAAK;AACVC,YAAAA,SAAS,EAAEjD,aAAc;AACzBtD,YAAAA,SAAS,EAAEA,SAAU;YACrBwG,GAAG,EAAE1D,IAAI,CAAC2D,WAAY;AAAAxF,YAAAA,QAAA,EAErBA,QAAAA;AAAQ,WAAA,CACG,CAAC,CAAA;SACZ,CAAA,CAAA;AAAC,OACc,CAAC,GACrB,IAAA;KACiB,CAAA;AAAC,GACV,CAAC,CAAA;AAErB;;;;"}
|
|
1
|
+
{"version":3,"file":"Modal.web.js","sources":["../../../../../../src/components/Modal/Modal.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useEffect } from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nimport { FloatingFocusManager, FloatingPortal, useFloating } from '@floating-ui/react';\nimport usePresence from 'use-presence';\nimport { ModalHeader } from './ModalHeader';\nimport type { ModalHeaderProps } from './ModalHeader';\nimport { ModalFooter } from './ModalFooter';\nimport type { ModalFooterProps } from './ModalFooter';\nimport { ModalBody } from './ModalBody';\nimport type { ModalBodyProps } from './ModalBody';\nimport { ModalContext } from './ModalContext';\nimport { ModalBackdrop } from './ModalBackdrop';\nimport {\n modalBorderRadius,\n modalMaxHeight,\n modalMaxWidth,\n modalMinWidth,\n modalResponsiveScreenGap,\n} from './modalTokens';\nimport type { ModalProps } from './types';\nimport { componentIds } from './constants';\nimport { castWebType, makeMotionTime, makeSize } from '~utils';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { Box } from '~components/Box';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { logger } from '~utils/logger';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { useVerifyAllowedChildren } from '~utils/useVerifyAllowedChildren';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst entry = keyframes`\n from {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.9) translateY(20px);\n }\n to {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1) translateY(0px);\n }\n`;\n\nconst exit = keyframes`\n from {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1) translateY(0px);\n }\n to {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.9) translateY(20px);\n }\n`;\n\nconst ModalContent = styled(BaseBox)<{ isVisible: boolean }>(({ isVisible, theme }) => {\n return css`\n box-shadow: ${theme.elevation.highRaised};\n position: fixed;\n transform: translate(-50%, -50%);\n opacity: ${isVisible ? 1 : 0};\n animation: ${isVisible ? entry : exit}\n ${castWebType(makeMotionTime(theme.motion.duration.moderate))}\n ${isVisible\n ? castWebType(theme.motion.easing.entrance)\n : castWebType(theme.motion.easing.exit)};\n `;\n});\n\nconst Modal = ({\n isOpen = false,\n children,\n onDismiss,\n initialFocusRef,\n size = 'small',\n accessibilityLabel,\n zIndex = componentZIndices.modal,\n ...rest\n}: ModalProps): React.ReactElement => {\n const { theme, platform } = useTheme();\n const { isMounted, isVisible } = usePresence(isOpen, {\n transitionDuration: theme.motion.duration.moderate,\n initialEnter: true,\n });\n\n // Warn consumer if modal is opened on mobile\n useEffect(() => {\n if (__DEV__) {\n if (platform === 'onMobile') {\n logger({\n message: 'Modal is not supported on mobile devices. Please use BottomSheet instead.',\n moduleName: 'Modal',\n type: 'warn',\n });\n }\n }\n }, [platform]);\n\n // required by floating ui to handle focus\n const { refs, context } = useFloating({\n open: isMounted,\n });\n\n const defaultInitialFocusRef = React.useRef<any>(null);\n\n const modalContext = React.useMemo(\n () => ({\n isOpen,\n close: onDismiss,\n defaultInitialFocusRef,\n isVisible,\n }),\n [isOpen, onDismiss, defaultInitialFocusRef, isVisible],\n );\n const handleKeyDown = (event: React.KeyboardEvent): void => {\n // close modal on escape key press\n if (event?.key === 'Escape' || event?.code === 'Escape') {\n onDismiss();\n }\n };\n\n // Only allow ModalHeader, ModalBody and ModalFooter as children\n useVerifyAllowedChildren({\n allowedComponents: [componentIds.ModalHeader, componentIds.ModalBody, componentIds.ModalFooter],\n children,\n componentName: 'Modal',\n });\n\n return (\n <FloatingPortal>\n <ModalContext.Provider value={modalContext}>\n {isMounted ? (\n <FloatingFocusManager\n returnFocus\n initialFocus={initialFocusRef ?? defaultInitialFocusRef}\n context={context}\n modal={true}\n >\n <Box\n zIndex={zIndex}\n position=\"fixed\"\n testID=\"modal-wrapper\"\n {...makeAnalyticsAttribute(rest)}\n >\n <ModalBackdrop />\n <ModalContent\n {...metaAttribute({\n name: MetaConstants.Modal,\n })}\n {...makeAccessible({\n role: 'dialog',\n modal: true,\n label: accessibilityLabel,\n })}\n maxWidth={makeSize(modalMaxWidth[size])}\n minWidth={makeSize(modalMinWidth)}\n maxHeight={modalMaxHeight}\n width={`calc(100vw - ${makeSize(modalResponsiveScreenGap)})`}\n borderRadius={modalBorderRadius}\n backgroundColor=\"popup.background.subtle\"\n position=\"absolute\"\n display=\"flex\"\n flexDirection=\"column\"\n top=\"50%\"\n left=\"50%\"\n onKeyDown={handleKeyDown}\n isVisible={isVisible}\n ref={refs.setFloating}\n >\n {children}\n </ModalContent>\n </Box>\n </FloatingFocusManager>\n ) : null}\n </ModalContext.Provider>\n </FloatingPortal>\n );\n};\n\nexport { Modal, ModalHeader, ModalFooter, ModalBody };\nexport type { ModalProps, ModalHeaderProps, ModalFooterProps, ModalBodyProps };\n"],"names":["entry","keyframes","exit","ModalContent","styled","BaseBox","withConfig","displayName","componentId","_ref","isVisible","theme","css","elevation","highRaised","castWebType","makeMotionTime","motion","duration","moderate","easing","entrance","Modal","_ref2","_ref2$isOpen","isOpen","children","onDismiss","initialFocusRef","_ref2$size","size","accessibilityLabel","_ref2$zIndex","zIndex","componentZIndices","modal","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","platform","_usePresence","usePresence","transitionDuration","initialEnter","isMounted","useEffect","logger","message","moduleName","type","_useFloating","useFloating","open","refs","context","defaultInitialFocusRef","React","useRef","modalContext","useMemo","close","handleKeyDown","event","key","code","useVerifyAllowedChildren","allowedComponents","componentIds","ModalHeader","ModalBody","ModalFooter","componentName","_jsx","FloatingPortal","ModalContext","Provider","value","FloatingFocusManager","returnFocus","initialFocus","_jsxs","Box","_objectSpread","position","testID","makeAnalyticsAttribute","ModalBackdrop","metaAttribute","name","MetaConstants","makeAccessible","role","label","maxWidth","makeSize","modalMaxWidth","minWidth","modalMinWidth","maxHeight","modalMaxHeight","width","concat","modalResponsiveScreenGap","borderRadius","modalBorderRadius","backgroundColor","display","flexDirection","top","left","onKeyDown","ref","setFloating"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAMA,KAAK,gBAAGC,SAAS,CAStB,CAAA,mJAAA,CAAA,CAAA,CAAA;AAED,IAAMC,IAAI,gBAAGD,SAAS,CASrB,CAAA,mJAAA,CAAA,CAAA,CAAA;AAED,IAAME,YAAY,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,wBAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAyB,CAAA,CAAA,UAAAC,IAAA,EAA0B;AAAA,EAAA,IAAvBC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK,CAAA;EAC9E,OAAOC,GAAG,CACMD,CAAAA,aAAAA,EAAAA,yDAAAA,EAAAA,aAAAA,EAAAA,GAAAA,EAAAA,GAAAA,EAAAA,GAAAA,CAAAA,EAAAA,KAAK,CAACE,SAAS,CAACC,UAAU,EAG7BJ,SAAS,G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AA,EACPK,aAAa,CAAC;YAChBC,IAAI,EAAEC,aAAa,CAACrE,KAAAA;WACrB,CAAC,CACEsE,EAAAA,cAAc,CAAC;AACjBC,YAAAA,IAAI,EAAE,QAAQ;AACd1D,YAAAA,KAAK,EAAE,IAAI;AACX2D,YAAAA,KAAK,EAAE/D,kBAAAA;AACT,WAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFgE,YAAAA,QAAQ,EAAEC,QAAQ,CAACC,aAAa,CAACnE,IAAI,CAAC,CAAE;AACxCoE,YAAAA,QAAQ,EAAEF,QAAQ,CAACG,aAAa,CAAE;AAClCC,YAAAA,SAAS,EAAEC,cAAe;AAC1BC,YAAAA,KAAK,kBAAAC,MAAA,CAAkBP,QAAQ,CAACQ,wBAAwB,CAAC,EAAI,GAAA,CAAA;AAC7DC,YAAAA,YAAY,EAAEC,iBAAkB;AAChCC,YAAAA,eAAe,EAAC,yBAAyB;AACzCtB,YAAAA,QAAQ,EAAC,UAAU;AACnBuB,YAAAA,OAAO,EAAC,MAAM;AACdC,YAAAA,aAAa,EAAC,QAAQ;AACtBC,YAAAA,GAAG,EAAC,KAAK;AACTC,YAAAA,IAAI,EAAC,KAAK;AACVC,YAAAA,SAAS,EAAEjD,aAAc;AACzBrD,YAAAA,SAAS,EAAEA,SAAU;YACrBuG,GAAG,EAAE1D,IAAI,CAAC2D,WAAY;AAAAxF,YAAAA,QAAA,EAErBA,QAAAA;AAAQ,WAAA,CACG,CAAC,CAAA;SACZ,CAAA,CAAA;AAAC,OACc,CAAC,GACrB,IAAA;KACiB,CAAA;AAAC,GACV,CAAC,CAAA;AAErB;;;;"}
|
|
@@ -21,8 +21,8 @@ var StyledModalBackdrop = /*#__PURE__*/styled(FloatingOverlay).withConfig({
|
|
|
21
21
|
var _useModalContext = useModalContext(),
|
|
22
22
|
isVisible = _useModalContext.isVisible;
|
|
23
23
|
return {
|
|
24
|
-
transitionDuration: "".concat(makeMotionTime(theme.motion.duration.
|
|
25
|
-
transitionTimingFunction: isVisible ? castWebType(theme.motion.easing.entrance
|
|
24
|
+
transitionDuration: "".concat(makeMotionTime(theme.motion.duration.moderate)),
|
|
25
|
+
transitionTimingFunction: isVisible ? castWebType(theme.motion.easing.entrance) : castWebType(theme.motion.easing.exit),
|
|
26
26
|
transitionProperty: 'opacity',
|
|
27
27
|
opacity: isVisible ? 1 : 0,
|
|
28
28
|
backgroundColor: theme.colors.overlay.background.subtle
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalBackdrop.js","sources":["../../../../../../src/components/Modal/ModalBackdrop.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { FloatingOverlay } from '@floating-ui/react';\nimport { useModalContext } from './ModalContext';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst StyledModalBackdrop = styled(FloatingOverlay)(({ theme }) => {\n const { isVisible } = useModalContext();\n\n return {\n transitionDuration: `${makeMotionTime(theme.motion.duration.
|
|
1
|
+
{"version":3,"file":"ModalBackdrop.js","sources":["../../../../../../src/components/Modal/ModalBackdrop.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { FloatingOverlay } from '@floating-ui/react';\nimport { useModalContext } from './ModalContext';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst StyledModalBackdrop = styled(FloatingOverlay)(({ theme }) => {\n const { isVisible } = useModalContext();\n\n return {\n transitionDuration: `${makeMotionTime(theme.motion.duration.moderate)}`,\n transitionTimingFunction: isVisible\n ? castWebType(theme.motion.easing.entrance)\n : castWebType(theme.motion.easing.exit),\n transitionProperty: 'opacity',\n opacity: isVisible ? 1 : 0,\n backgroundColor: theme.colors.overlay.background.subtle,\n };\n});\n\nconst ModalBackdrop = (): React.ReactElement => {\n const { close } = useModalContext();\n\n return (\n <StyledModalBackdrop\n {...metaAttribute({ name: MetaConstants.ModalBackdrop, testID: MetaConstants.ModalBackdrop })}\n onClick={() => {\n close();\n }}\n lockScroll={true}\n />\n );\n};\n\nexport { ModalBackdrop };\n"],"names":["StyledModalBackdrop","styled","FloatingOverlay","withConfig","displayName","componentId","_ref","theme","_useModalContext","useModalContext","isVisible","transitionDuration","concat","makeMotionTime","motion","duration","moderate","transitionTimingFunction","castWebType","easing","entrance","exit","transitionProperty","opacity","backgroundColor","colors","overlay","background","subtle","ModalBackdrop","_useModalContext2","close","_jsx","_objectSpread","metaAttribute","name","MetaConstants","testID","onClick","lockScroll"],"mappings":";;;;;;;;;;;;;;;AAQA,IAAMA,mBAAmB,gBAAGC,MAAM,CAACC,eAAe,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,oCAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAAC,CAAA,CAAA,UAAAC,IAAA,EAAe;AAAA,EAAA,IAAZC,KAAK,GAAAD,IAAA,CAALC,KAAK,CAAA;AAC1D,EAAA,IAAAC,gBAAA,GAAsBC,eAAe,EAAE;IAA/BC,SAAS,GAAAF,gBAAA,CAATE,SAAS,CAAA;EAEjB,OAAO;AACLC,IAAAA,kBAAkB,EAAAC,EAAAA,CAAAA,MAAA,CAAKC,cAAc,CAACN,KAAK,CAACO,MAAM,CAACC,QAAQ,CAACC,QAAQ,CAAC,CAAE;IACvEC,wBAAwB,EAAEP,SAAS,GAC/BQ,WAAW,CAACX,KAAK,CAACO,MAAM,CAACK,MAAM,CAACC,QAAQ,CAAC,GACzCF,WAAW,CAACX,KAAK,CAACO,MAAM,CAACK,MAAM,CAACE,IAAI,CAAC;AACzCC,IAAAA,kBAAkB,EAAE,SAAS;AAC7BC,IAAAA,OAAO,EAAEb,SAAS,GAAG,CAAC,GAAG,CAAC;IAC1Bc,eAAe,EAAEjB,KAAK,CAACkB,MAAM,CAACC,OAAO,CAACC,UAAU,CAACC,MAAAA;GAClD,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,GAA6B;AAC9C,EAAA,IAAAC,iBAAA,GAAkBrB,eAAe,EAAE;IAA3BsB,KAAK,GAAAD,iBAAA,CAALC,KAAK,CAAA;EAEb,oBACEC,GAAA,CAAChC,mBAAmB,EAAAiC,aAAA,CAAAA,aAAA,CACdC,EAAAA,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACP,aAAa;IAAEQ,MAAM,EAAED,aAAa,CAACP,aAAAA;AAAc,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;IAC7FS,OAAO,EAAE,SAAAA,OAAAA,GAAM;AACbP,MAAAA,KAAK,EAAE,CAAA;KACP;AACFQ,IAAAA,UAAU,EAAE,IAAA;AAAK,GAAA,CAClB,CAAC,CAAA;AAEN;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '../BaseMotion/index.js';
|
|
5
|
+
import { useMemoizedStyles } from '../Box/BaseBox/useMemoizedStyles.web.js';
|
|
6
|
+
import '../../utils/index.js';
|
|
7
|
+
import { cssBezierToArray } from '../../utils/cssBezierToArray.js';
|
|
8
|
+
import { msToSeconds } from '../../utils/msToSeconds.js';
|
|
9
|
+
import { jsx } from 'react/jsx-runtime';
|
|
10
|
+
import useTheme from '../BladeProvider/useTheme.js';
|
|
11
|
+
import { MotionDiv } from '../BaseMotion/BaseMotion.js';
|
|
12
|
+
import { castWebType } from '../../utils/platform/castUtils.js';
|
|
13
|
+
|
|
14
|
+
var _excluded = ["borderRadius", "backgroundColor"];
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
var Morph = function Morph(_ref) {
|
|
18
|
+
var children = _ref.children,
|
|
19
|
+
layoutId = _ref.layoutId;
|
|
20
|
+
// Apart from framer-motion's layout morphing, we also support morph of backgroundColor and borderRadius
|
|
21
|
+
var _children$props = children.props,
|
|
22
|
+
borderRadius = _children$props.borderRadius,
|
|
23
|
+
backgroundColor = _children$props.backgroundColor,
|
|
24
|
+
rest = _objectWithoutProperties(_children$props, _excluded);
|
|
25
|
+
var _useTheme = useTheme(),
|
|
26
|
+
theme = _useTheme.theme;
|
|
27
|
+
var cssProps = useMemoizedStyles({
|
|
28
|
+
borderRadius: borderRadius,
|
|
29
|
+
backgroundColor: backgroundColor,
|
|
30
|
+
theme: theme
|
|
31
|
+
});
|
|
32
|
+
return /*#__PURE__*/jsx(MotionDiv, _objectSpread(_objectSpread({
|
|
33
|
+
as: children.type
|
|
34
|
+
}, rest), {}, {
|
|
35
|
+
layout: true,
|
|
36
|
+
layoutId: layoutId
|
|
37
|
+
// The animations that are not supported by layout animation are animated using `animate` prop here
|
|
38
|
+
,
|
|
39
|
+
animate: cssProps,
|
|
40
|
+
transition: {
|
|
41
|
+
duration: msToSeconds(theme.motion.duration.moderate),
|
|
42
|
+
ease: cssBezierToArray(castWebType(theme.motion.easing.standard))
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { Morph };
|
|
48
|
+
//# sourceMappingURL=Morph.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Morph.web.js","sources":["../../../../../../src/components/Morph/Morph.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { MorphProps } from './types';\nimport { MotionDiv } from '~components/BaseMotion';\nimport { useMemoizedStyles } from '~components/Box/BaseBox/useMemoizedStyles.web';\nimport { castWebType, useTheme } from '~utils';\nimport { cssBezierToArray } from '~utils/cssBezierToArray';\nimport { msToSeconds } from '~utils/msToSeconds';\n\nconst Morph = ({ children, layoutId }: MorphProps): React.ReactElement => {\n // Apart from framer-motion's layout morphing, we also support morph of backgroundColor and borderRadius\n const { borderRadius, backgroundColor, ...rest } = children.props;\n const { theme } = useTheme();\n const cssProps = useMemoizedStyles({ borderRadius, backgroundColor, theme });\n\n return (\n <MotionDiv\n as={children.type}\n {...rest}\n layout\n layoutId={layoutId}\n // The animations that are not supported by layout animation are animated using `animate` prop here\n animate={cssProps}\n transition={{\n duration: msToSeconds(theme.motion.duration.moderate),\n ease: cssBezierToArray(castWebType(theme.motion.easing.standard)),\n }}\n />\n );\n};\n\nexport { Morph };\n"],"names":["Morph","_ref","children","layoutId","_children$props","props","borderRadius","backgroundColor","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","cssProps","useMemoizedStyles","_jsx","MotionDiv","_objectSpread","as","type","layout","animate","transition","duration","msToSeconds","motion","moderate","ease","cssBezierToArray","castWebType","easing","standard"],"mappings":";;;;;;;;;;;;;;;;AAQA,IAAMA,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EAA+D;AAAA,EAAA,IAAzDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ,CAAA;AACjC;AACA,EAAA,IAAAC,eAAA,GAAmDF,QAAQ,CAACG,KAAK;IAAzDC,YAAY,GAAAF,eAAA,CAAZE,YAAY;IAAEC,eAAe,GAAAH,eAAA,CAAfG,eAAe;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAL,eAAA,EAAAM,SAAA,CAAA,CAAA;AAC9C,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;EACb,IAAMC,QAAQ,GAAGC,iBAAiB,CAAC;AAAET,IAAAA,YAAY,EAAZA,YAAY;AAAEC,IAAAA,eAAe,EAAfA,eAAe;AAAEM,IAAAA,KAAK,EAALA,KAAAA;AAAM,GAAC,CAAC,CAAA;AAE5E,EAAA,oBACEG,GAAA,CAACC,SAAS,EAAAC,aAAA,CAAAA,aAAA,CAAA;IACRC,EAAE,EAAEjB,QAAQ,CAACkB,IAAAA;AAAK,GAAA,EACdZ,IAAI,CAAA,EAAA,EAAA,EAAA;IACRa,MAAM,EAAA,IAAA;AACNlB,IAAAA,QAAQ,EAAEA,QAAAA;AACV;AAAA;AACAmB,IAAAA,OAAO,EAAER,QAAS;AAClBS,IAAAA,UAAU,EAAE;MACVC,QAAQ,EAAEC,WAAW,CAACZ,KAAK,CAACa,MAAM,CAACF,QAAQ,CAACG,QAAQ,CAAC;AACrDC,MAAAA,IAAI,EAAEC,gBAAgB,CAACC,WAAW,CAACjB,KAAK,CAACa,MAAM,CAACK,MAAM,CAACC,QAAQ,CAAC,CAAA;AAClE,KAAA;AAAE,GAAA,CACH,CAAC,CAAA;AAEN;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _typeof from '@babel/runtime/helpers/typeof';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '../BaseMotion/index.js';
|
|
5
|
+
import { msToSeconds } from '../../utils/msToSeconds.js';
|
|
6
|
+
import { cssBezierToArray } from '../../utils/cssBezierToArray.js';
|
|
7
|
+
import '../../utils/index.js';
|
|
8
|
+
import { jsx } from 'react/jsx-runtime';
|
|
9
|
+
import useTheme from '../BladeProvider/useTheme.js';
|
|
10
|
+
import { makeSpace } from '../../utils/makeSpace/makeSpace.js';
|
|
11
|
+
import { castWebType } from '../../utils/platform/castUtils.js';
|
|
12
|
+
import { BaseMotionEntryExit } from '../BaseMotion/BaseMotion.js';
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
var Move = function Move(_ref) {
|
|
17
|
+
var children = _ref.children,
|
|
18
|
+
_ref$type = _ref.type,
|
|
19
|
+
type = _ref$type === void 0 ? 'inout' : _ref$type,
|
|
20
|
+
isVisible = _ref.isVisible,
|
|
21
|
+
motionTriggers = _ref.motionTriggers,
|
|
22
|
+
shouldUnmountWhenHidden = _ref.shouldUnmountWhenHidden,
|
|
23
|
+
delay = _ref.delay;
|
|
24
|
+
var _useTheme = useTheme(),
|
|
25
|
+
theme = _useTheme.theme;
|
|
26
|
+
var enterDelay = _typeof(delay) === 'object' ? delay.enter : delay;
|
|
27
|
+
var exitDelay = _typeof(delay) === 'object' ? delay.exit : delay;
|
|
28
|
+
var movePx = makeSpace(theme.spacing[5]);
|
|
29
|
+
var moveVariants = {
|
|
30
|
+
initial: {
|
|
31
|
+
opacity: 0,
|
|
32
|
+
transform: "translateY(".concat(movePx, ")")
|
|
33
|
+
},
|
|
34
|
+
animate: {
|
|
35
|
+
opacity: 1,
|
|
36
|
+
transform: "translateY(".concat(makeSpace(theme.spacing[0]), ")"),
|
|
37
|
+
transition: _objectSpread(_objectSpread({}, enterDelay ? {
|
|
38
|
+
delay: msToSeconds(theme.motion.delay[enterDelay])
|
|
39
|
+
} : {}), {}, {
|
|
40
|
+
duration: msToSeconds(theme.motion.duration.xmoderate),
|
|
41
|
+
ease: cssBezierToArray(castWebType(theme.motion.easing.entrance))
|
|
42
|
+
})
|
|
43
|
+
},
|
|
44
|
+
exit: {
|
|
45
|
+
opacity: 0,
|
|
46
|
+
transform: "translateY(".concat(movePx, ")"),
|
|
47
|
+
transition: _objectSpread(_objectSpread({}, exitDelay ? {
|
|
48
|
+
delay: msToSeconds(theme.motion.delay[exitDelay])
|
|
49
|
+
} : {}), {}, {
|
|
50
|
+
duration: msToSeconds(theme.motion.duration.quick),
|
|
51
|
+
ease: cssBezierToArray(castWebType(theme.motion.easing.exit))
|
|
52
|
+
})
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
return /*#__PURE__*/jsx(BaseMotionEntryExit, {
|
|
56
|
+
motionVariants: moveVariants,
|
|
57
|
+
children: children,
|
|
58
|
+
type: type,
|
|
59
|
+
isVisible: isVisible,
|
|
60
|
+
motionTriggers: motionTriggers,
|
|
61
|
+
shouldUnmountWhenHidden: shouldUnmountWhenHidden
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export { Move };
|
|
66
|
+
//# sourceMappingURL=Move.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Move.web.js","sources":["../../../../../../src/components/Move/Move.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { MoveProps } from './types';\nimport { BaseMotionEntryExit } from '~components/BaseMotion';\nimport type { MotionVariantsType } from '~components/BaseMotion';\nimport { msToSeconds } from '~utils/msToSeconds';\nimport { cssBezierToArray } from '~utils/cssBezierToArray';\nimport { castWebType, makeSpace, useTheme } from '~utils';\n\n/**\n * ## Move\n *\n * Move is one of the motion presets that we expose from blade to help you make components appear / disappear with move\n *\n * ### Usage\n *\n * #### Move in on mount\n *\n * ```jsx\n * <Move>\n * <Card />\n * </Move>\n * ```\n *\n * #### Conditionally move based on state\n *\n * ```jsx\n * <Move isVisible={isVisibleState}>\n * <Card />\n * </Move>\n * ```\n */\nconst Move = ({\n children,\n type = 'inout',\n isVisible,\n motionTriggers,\n shouldUnmountWhenHidden,\n delay,\n}: MoveProps): React.ReactElement => {\n const { theme } = useTheme();\n const enterDelay = typeof delay === 'object' ? delay.enter : delay;\n const exitDelay = typeof delay === 'object' ? delay.exit : delay;\n\n const movePx = makeSpace(theme.spacing[5]);\n\n const moveVariants: MotionVariantsType = {\n initial: {\n opacity: 0,\n transform: `translateY(${movePx})`,\n },\n animate: {\n opacity: 1,\n transform: `translateY(${makeSpace(theme.spacing[0])})`,\n transition: {\n // We have to make sure we don't add delay prop because if we define it, it takes precedence in stagger.\n // Even setting `undefined` would break the stagger\n ...(enterDelay ? { delay: msToSeconds(theme.motion.delay[enterDelay]) } : {}),\n duration: msToSeconds(theme.motion.duration.xmoderate),\n ease: cssBezierToArray(castWebType(theme.motion.easing.entrance)),\n },\n },\n exit: {\n opacity: 0,\n transform: `translateY(${movePx})`,\n transition: {\n ...(exitDelay ? { delay: msToSeconds(theme.motion.delay[exitDelay]) } : {}),\n duration: msToSeconds(theme.motion.duration.quick),\n ease: cssBezierToArray(castWebType(theme.motion.easing.exit)),\n },\n },\n };\n\n return (\n <BaseMotionEntryExit\n motionVariants={moveVariants}\n children={children}\n type={type}\n isVisible={isVisible}\n motionTriggers={motionTriggers}\n shouldUnmountWhenHidden={shouldUnmountWhenHidden}\n />\n );\n};\n\nexport { Move };\n"],"names":["Move","_ref","children","_ref$type","type","isVisible","motionTriggers","shouldUnmountWhenHidden","delay","_useTheme","useTheme","theme","enterDelay","_typeof","enter","exitDelay","exit","movePx","makeSpace","spacing","moveVariants","initial","opacity","transform","concat","animate","transition","_objectSpread","msToSeconds","motion","duration","xmoderate","ease","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cAAc,EAAEA,cAAe;AAC/BC,IAAAA,uBAAuB,EAAEA,uBAAAA;AAAwB,GAClD,CAAC,CAAA;AAEN;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -119,7 +119,7 @@ var CircularProgressBarFilled = function CircularProgressBarFilled(_ref4) {
|
|
|
119
119
|
strokeDashoffset: dashOffset,
|
|
120
120
|
pulseMotionDuration: "duration.2xgentle",
|
|
121
121
|
pulseMotionDelay: "delay.long",
|
|
122
|
-
motionEasing: "easing.
|
|
122
|
+
motionEasing: "easing.emphasized"
|
|
123
123
|
}), showPercentage && size !== 'small' && /*#__PURE__*/jsxs(StyledSVGText, {
|
|
124
124
|
size: circularProgressSizeTokens[size].percentTextSize,
|
|
125
125
|
weight: "semibold",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CircularProgressBar.web.js","sources":["../../../../../../src/components/ProgressBar/CircularProgressBar.web.tsx"],"sourcesContent":["import type { FlattenSimpleInterpolation } from 'styled-components';\nimport styled, { css, keyframes } from 'styled-components';\nimport React from 'react';\nimport type { CircularProgressBarFilledProps } from './types';\nimport {\n pulseAnimation,\n circularProgressSizeTokens,\n getCircularProgressSVGTokens,\n} from './progressBarTokens';\nimport { CircularProgressLabel } from './CircularProgressLabel';\nimport getIn from '~utils/lodashButBetter/get';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType } from '~utils';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport type { TextProps } from '~components/Typography';\nimport { getTextProps } from '~components/Typography';\nimport { Svg, Circle } from '~components/Icons/_Svg';\nimport getBaseTextStyles from '~components/Typography/BaseText/getBaseTextStyles';\n\nconst pulseKeyframes = keyframes`\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.65;\n }\n 100% {\n opacity: 1;\n }\n`;\n\nconst getPulseAnimationStyles = ({\n duration,\n easing,\n progressPercent,\n isMeter,\n}: {\n duration: string;\n easing: string;\n progressPercent: number;\n isMeter: boolean;\n}): FlattenSimpleInterpolation => {\n if (isMeter || progressPercent === 100) {\n return css`\n height: 100%;\n width: 100%;\n transition: stroke-dashoffset ${duration} ${easing};\n `;\n }\n\n return css`\n height: 100%;\n width: 100%;\n opacity: ${pulseAnimation.opacityInitial};\n background-color: ${pulseAnimation.backgroundColor};\n transition: stroke-dashoffset ${duration} ${easing};\n animation: ${pulseKeyframes} ${duration} ${easing} infinite;\n `;\n};\n\nconst StyledSVGText = styled.text<Pick<TextProps<{ variant: 'body' }>, 'size' | 'weight'>>(\n ({ theme, size, weight }) => {\n return {\n ...getBaseTextStyles({\n theme,\n ...getTextProps({ variant: 'body', size, weight }),\n }),\n fill: theme.colors.surface.text.gray.normal,\n };\n },\n);\n\nconst DeterminatePulseAnimation = styled.circle<\n Pick<\n CircularProgressBarFilledProps,\n 'pulseMotionDuration' | 'pulseMotionDelay' | 'motionEasing' | 'progressPercent' | 'isMeter'\n >\n>(({ theme, pulseMotionDuration, motionEasing, progressPercent, isMeter }) => {\n const duration = castWebType(makeMotionTime(getIn(theme.motion, pulseMotionDuration)));\n const easing = castWebType(getIn(theme.motion, motionEasing));\n\n return getPulseAnimationStyles({\n duration,\n easing,\n progressPercent,\n isMeter,\n });\n});\n\nconst CircularProgressBarFilled = ({\n progressPercent,\n fillColor,\n backgroundColor,\n size = 'small',\n label,\n showPercentage = true,\n isMeter,\n}: CircularProgressBarFilledProps): React.ReactElement => {\n const {\n sqSize,\n strokeWidth,\n radius,\n viewBox,\n dashArray,\n dashOffset,\n } = getCircularProgressSVGTokens({ size, progressPercent });\n\n return (\n <BaseBox\n width=\"fit-content\"\n textAlign=\"center\"\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n >\n <Svg width={String(sqSize)} height={String(sqSize)} viewBox={viewBox}>\n <Circle\n fill=\"none\"\n stroke={backgroundColor}\n cx={String(sqSize / 2)}\n cy={String(sqSize / 2)}\n r={String(radius)}\n strokeWidth={`${strokeWidth}px`}\n />\n\n <DeterminatePulseAnimation\n progressPercent={progressPercent}\n isMeter={isMeter}\n fill=\"none\"\n stroke={fillColor}\n cx={sqSize / 2}\n cy={sqSize / 2}\n r={radius}\n strokeWidth={`${strokeWidth}px`}\n // Start progress marker at 12 O'Clock\n transform={`rotate(-90 ${sqSize / 2} ${sqSize / 2})`}\n strokeDasharray={dashArray}\n strokeDashoffset={dashOffset}\n pulseMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.standard.revealing\"\n />\n {showPercentage && size !== 'small' && (\n <StyledSVGText\n size={circularProgressSizeTokens[size].percentTextSize}\n weight=\"semibold\"\n x=\"50%\"\n y=\"50%\"\n textAnchor=\"middle\"\n dy=\".4em\"\n >\n {progressPercent}%\n </StyledSVGText>\n )}\n </Svg>\n\n <CircularProgressLabel\n progressPercent={progressPercent}\n size={size}\n label={label}\n showPercentage={showPercentage}\n />\n </BaseBox>\n );\n};\n\nexport { CircularProgressBarFilled };\n"],"names":["pulseKeyframes","keyframes","getPulseAnimationStyles","_ref","duration","easing","progressPercent","isMeter","css","pulseAnimation","opacityInitial","backgroundColor","StyledSVGText","styled","text","withConfig","displayName","componentId","_ref2","theme","size","weight","_objectSpread","getBaseTextStyles","getTextProps","variant","fill","colors","surface","gray","normal","DeterminatePulseAnimation","circle","_ref3","pulseMotionDuration","motionEasing","castWebType","makeMotionTime","getIn","motion","CircularProgressBarFilled","_ref4","fillColor","_ref4$size","label","_ref4$showPercentage","showPercentage","_getCircularProgressS","getCircularProgressSVGTokens","sqSize","strokeWidth","radius","viewBox","dashArray","dashOffset","_jsxs","BaseBox","width","textAlign","display","flexDirection","alignItems","children","Svg","String","height","_jsx","Circle","stroke","cx","cy","r","concat","transform","strokeDasharray","strokeDashoffset","pulseMotionDelay","circularProgressSizeTokens","percentTextSize","x","y","textAnchor","dy","CircularProgressLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA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,CAAC,CAAC0D,eAAgB;AACvDzD,QAAAA,MAAM,EAAC,UAAU;AACjB0D,QAAAA,CAAC,EAAC,KAAK;AACPC,QAAAA,CAAC,EAAC,KAAK;AACPC,QAAAA,UAAU,EAAC,QAAQ;AACnBC,QAAAA,EAAE,EAAC,MAAM;QAAApB,QAAA,EAAA,CAERxD,eAAe,EAAC,GACnB,CAAA;AAAA,OAAe,CAChB,CAAA;AAAA,KACE,CAAC,eAEN4D,GAAA,CAACiB,qBAAqB,EAAA;AACpB7E,MAAAA,eAAe,EAAEA,eAAgB;AACjCc,MAAAA,IAAI,EAAEA,IAAK;AACXwB,MAAAA,KAAK,EAAEA,KAAM;AACbE,MAAAA,cAAc,EAAEA,cAAAA;AAAe,KAChC,CAAC,CAAA;AAAA,GACK,CAAC,CAAA;AAEd;;;;"}
|
|
1
|
+
{"version":3,"file":"CircularProgressBar.web.js","sources":["../../../../../../src/components/ProgressBar/CircularProgressBar.web.tsx"],"sourcesContent":["import type { FlattenSimpleInterpolation } from 'styled-components';\nimport styled, { css, keyframes } from 'styled-components';\nimport React from 'react';\nimport type { CircularProgressBarFilledProps } from './types';\nimport {\n pulseAnimation,\n circularProgressSizeTokens,\n getCircularProgressSVGTokens,\n} from './progressBarTokens';\nimport { CircularProgressLabel } from './CircularProgressLabel';\nimport getIn from '~utils/lodashButBetter/get';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType } from '~utils';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport type { TextProps } from '~components/Typography';\nimport { getTextProps } from '~components/Typography';\nimport { Svg, Circle } from '~components/Icons/_Svg';\nimport getBaseTextStyles from '~components/Typography/BaseText/getBaseTextStyles';\n\nconst pulseKeyframes = keyframes`\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.65;\n }\n 100% {\n opacity: 1;\n }\n`;\n\nconst getPulseAnimationStyles = ({\n duration,\n easing,\n progressPercent,\n isMeter,\n}: {\n duration: string;\n easing: string;\n progressPercent: number;\n isMeter: boolean;\n}): FlattenSimpleInterpolation => {\n if (isMeter || progressPercent === 100) {\n return css`\n height: 100%;\n width: 100%;\n transition: stroke-dashoffset ${duration} ${easing};\n `;\n }\n\n return css`\n height: 100%;\n width: 100%;\n opacity: ${pulseAnimation.opacityInitial};\n background-color: ${pulseAnimation.backgroundColor};\n transition: stroke-dashoffset ${duration} ${easing};\n animation: ${pulseKeyframes} ${duration} ${easing} infinite;\n `;\n};\n\nconst StyledSVGText = styled.text<Pick<TextProps<{ variant: 'body' }>, 'size' | 'weight'>>(\n ({ theme, size, weight }) => {\n return {\n ...getBaseTextStyles({\n theme,\n ...getTextProps({ variant: 'body', size, weight }),\n }),\n fill: theme.colors.surface.text.gray.normal,\n };\n },\n);\n\nconst DeterminatePulseAnimation = styled.circle<\n Pick<\n CircularProgressBarFilledProps,\n 'pulseMotionDuration' | 'pulseMotionDelay' | 'motionEasing' | 'progressPercent' | 'isMeter'\n >\n>(({ theme, pulseMotionDuration, motionEasing, progressPercent, isMeter }) => {\n const duration = castWebType(makeMotionTime(getIn(theme.motion, pulseMotionDuration)));\n const easing = castWebType(getIn(theme.motion, motionEasing));\n\n return getPulseAnimationStyles({\n duration,\n easing,\n progressPercent,\n isMeter,\n });\n});\n\nconst CircularProgressBarFilled = ({\n progressPercent,\n fillColor,\n backgroundColor,\n size = 'small',\n label,\n showPercentage = true,\n isMeter,\n}: CircularProgressBarFilledProps): React.ReactElement => {\n const {\n sqSize,\n strokeWidth,\n radius,\n viewBox,\n dashArray,\n dashOffset,\n } = getCircularProgressSVGTokens({ size, progressPercent });\n\n return (\n <BaseBox\n width=\"fit-content\"\n textAlign=\"center\"\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n >\n <Svg width={String(sqSize)} height={String(sqSize)} viewBox={viewBox}>\n <Circle\n fill=\"none\"\n stroke={backgroundColor}\n cx={String(sqSize / 2)}\n cy={String(sqSize / 2)}\n r={String(radius)}\n strokeWidth={`${strokeWidth}px`}\n />\n\n <DeterminatePulseAnimation\n progressPercent={progressPercent}\n isMeter={isMeter}\n fill=\"none\"\n stroke={fillColor}\n cx={sqSize / 2}\n cy={sqSize / 2}\n r={radius}\n strokeWidth={`${strokeWidth}px`}\n // Start progress marker at 12 O'Clock\n transform={`rotate(-90 ${sqSize / 2} ${sqSize / 2})`}\n strokeDasharray={dashArray}\n strokeDashoffset={dashOffset}\n pulseMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.emphasized\"\n />\n {showPercentage && size !== 'small' && (\n <StyledSVGText\n size={circularProgressSizeTokens[size].percentTextSize}\n weight=\"semibold\"\n x=\"50%\"\n y=\"50%\"\n textAnchor=\"middle\"\n dy=\".4em\"\n >\n {progressPercent}%\n </StyledSVGText>\n )}\n </Svg>\n\n <CircularProgressLabel\n progressPercent={progressPercent}\n size={size}\n label={label}\n showPercentage={showPercentage}\n />\n </BaseBox>\n );\n};\n\nexport { CircularProgressBarFilled };\n"],"names":["pulseKeyframes","keyframes","getPulseAnimationStyles","_ref","duration","easing","progressPercent","isMeter","css","pulseAnimation","opacityInitial","backgroundColor","StyledSVGText","styled","text","withConfig","displayName","componentId","_ref2","theme","size","weight","_objectSpread","getBaseTextStyles","getTextProps","variant","fill","colors","surface","gray","normal","DeterminatePulseAnimation","circle","_ref3","pulseMotionDuration","motionEasing","castWebType","makeMotionTime","getIn","motion","CircularProgressBarFilled","_ref4","fillColor","_ref4$size","label","_ref4$showPercentage","showPercentage","_getCircularProgressS","getCircularProgressSVGTokens","sqSize","strokeWidth","radius","viewBox","dashArray","dashOffset","_jsxs","BaseBox","width","textAlign","display","flexDirection","alignItems","children","Svg","String","height","_jsx","Circle","stroke","cx","cy","r","concat","transform","strokeDasharray","strokeDashoffset","pulseMotionDelay","circularProgressSizeTokens","percentTextSize","x","y","textAnchor","dy","CircularProgressLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,cAAc,gBAAGC,SAAS,CAU/B,CAAA,kDA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AAC,UAAU;AACjB0D,QAAAA,CAAC,EAAC,KAAK;AACPC,QAAAA,CAAC,EAAC,KAAK;AACPC,QAAAA,UAAU,EAAC,QAAQ;AACnBC,QAAAA,EAAE,EAAC,MAAM;QAAApB,QAAA,EAAA,CAERxD,eAAe,EAAC,GACnB,CAAA;AAAA,OAAe,CAChB,CAAA;AAAA,KACE,CAAC,eAEN4D,GAAA,CAACiB,qBAAqB,EAAA;AACpB7E,MAAAA,eAAe,EAAEA,eAAgB;AACjCc,MAAAA,IAAI,EAAEA,IAAK;AACXwB,MAAAA,KAAK,EAAEA,KAAM;AACbE,MAAAA,cAAc,EAAEA,cAAAA;AAAe,KAChC,CAAC,CAAA;AAAA,GACK,CAAC,CAAA;AAEd;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import React__default from 'react';
|
|
3
4
|
import { ProgressBarFilled } from './ProgressBarFilled.web.js';
|
|
4
5
|
import { CircularProgressBarFilled } from './CircularProgressBar.web.js';
|
|
5
6
|
import clamp from '../../utils/lodashButBetter/clamp.js';
|
|
@@ -36,7 +37,7 @@ var progressBarHeight = {
|
|
|
36
37
|
// Large size isn't available when variant is 'linear'
|
|
37
38
|
large: size[0]
|
|
38
39
|
};
|
|
39
|
-
var
|
|
40
|
+
var _ProgressBar = function _ProgressBar(_ref, ref) {
|
|
40
41
|
var _label$trim;
|
|
41
42
|
var accessibilityLabel = _ref.accessibilityLabel,
|
|
42
43
|
color = _ref.color,
|
|
@@ -117,7 +118,9 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
117
118
|
accessibilityProps.valueMax = undefined;
|
|
118
119
|
accessibilityProps.valueText = undefined;
|
|
119
120
|
}
|
|
120
|
-
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
121
|
+
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
122
|
+
ref: ref
|
|
123
|
+
}, getStyledProps(rest)), metaAttribute({
|
|
121
124
|
name: MetaConstants.ProgressBar,
|
|
122
125
|
testID: testID
|
|
123
126
|
})), makeAnalyticsAttribute(rest)), {}, {
|
|
@@ -165,7 +168,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
165
168
|
pulseMotionDuration: "duration.2xgentle",
|
|
166
169
|
fillMotionDuration: "duration.2xgentle",
|
|
167
170
|
pulseMotionDelay: "delay.long",
|
|
168
|
-
motionEasing: "easing.
|
|
171
|
+
motionEasing: "easing.emphasized"
|
|
169
172
|
}) : /*#__PURE__*/jsx(BaseBox, {
|
|
170
173
|
backgroundColor: unfilledBackgroundColor,
|
|
171
174
|
height: makeSize(progressBarHeight[size]),
|
|
@@ -178,7 +181,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
178
181
|
pulseMotionDuration: "duration.2xgentle",
|
|
179
182
|
indeterminateMotionDuration: "duration.2xgentle",
|
|
180
183
|
pulseMotionDelay: "delay.long",
|
|
181
|
-
motionEasing: "easing.
|
|
184
|
+
motionEasing: "easing.emphasized",
|
|
182
185
|
type: progressType,
|
|
183
186
|
isIndeterminate: isIndeterminate
|
|
184
187
|
})
|
|
@@ -187,6 +190,7 @@ var ProgressBar = function ProgressBar(_ref) {
|
|
|
187
190
|
})
|
|
188
191
|
}));
|
|
189
192
|
};
|
|
193
|
+
var ProgressBar = /*#__PURE__*/React__default.forwardRef(_ProgressBar);
|
|
190
194
|
|
|
191
195
|
export { ProgressBar };
|
|
192
196
|
//# sourceMappingURL=ProgressBar.js.map
|