@razorpay/blade 11.39.0 → 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/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 +5 -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/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 +10 -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/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 +10 -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 +17967 -5488
- package/build/types/components/index.native.d.ts +7923 -2158
- 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
|
@@ -4,41 +4,35 @@ import { makeBezier } from '../../utils/makeBezier/makeBezier.web.js';
|
|
|
4
4
|
// similar to EasingFactoryFn of `react-native-reanimated`
|
|
5
5
|
|
|
6
6
|
var delay = {
|
|
7
|
-
'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
'2xquick': 80,
|
|
8
|
+
xquick: 160,
|
|
9
|
+
moderate: 280,
|
|
10
|
+
gentle: 480,
|
|
11
|
+
xgentle: 960,
|
|
12
|
+
"long": 2000,
|
|
13
|
+
xlong: 3000,
|
|
14
|
+
'2xlong': 5000
|
|
12
15
|
};
|
|
13
16
|
var duration = {
|
|
14
|
-
'2xquick':
|
|
15
|
-
xquick:
|
|
17
|
+
'2xquick': 80,
|
|
18
|
+
xquick: 160,
|
|
16
19
|
quick: 200,
|
|
17
|
-
moderate:
|
|
18
|
-
xmoderate:
|
|
19
|
-
gentle:
|
|
20
|
-
xgentle:
|
|
21
|
-
'2xgentle':
|
|
20
|
+
moderate: 280,
|
|
21
|
+
xmoderate: 360,
|
|
22
|
+
gentle: 480,
|
|
23
|
+
xgentle: 640,
|
|
24
|
+
'2xgentle': 960
|
|
22
25
|
};
|
|
23
26
|
|
|
24
27
|
/* makeBezier returns a string of `cubic-bezier()` for web & a react-native-reanimated Easing Function of type `EasingFactoryFn` for native */
|
|
25
28
|
var easing = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
attentive: makeBezier(0.5, 0, 0.3, 1.5),
|
|
34
|
-
effective: makeBezier(0, 0, 0.2, 1),
|
|
35
|
-
revealing: makeBezier(0, 0, 0, 1)
|
|
36
|
-
},
|
|
37
|
-
exit: {
|
|
38
|
-
attentive: makeBezier(0.7, 0, 0.5, 1),
|
|
39
|
-
effective: makeBezier(0.17, 0, 1, 1),
|
|
40
|
-
revealing: makeBezier(0.5, 0, 1, 1)
|
|
41
|
-
}
|
|
29
|
+
linear: makeBezier(0, 0, 0, 0),
|
|
30
|
+
entrance: makeBezier(0, 0, 0.2, 1),
|
|
31
|
+
exit: makeBezier(0.17, 0, 1, 1),
|
|
32
|
+
standard: makeBezier(0.3, 0, 0.2, 1),
|
|
33
|
+
emphasized: makeBezier(0.5, 0, 0, 1),
|
|
34
|
+
overshoot: makeBezier(0.5, 0, 0.3, 1.5),
|
|
35
|
+
shake: makeBezier(1, 0.5, 0, 0.5)
|
|
42
36
|
};
|
|
43
37
|
var motion = {
|
|
44
38
|
delay: delay,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion.js","sources":["../../../../../../src/tokens/global/motion.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"motion.js","sources":["../../../../../../src/tokens/global/motion.ts"],"sourcesContent":["import type { Platform } from '~utils';\nimport { makeBezier } from '~utils/makeBezier';\n\ntype Duration = {\n /** `80` milliseconds */\n '2xquick': 80;\n /** `160` milliseconds */\n xquick: 160;\n /** `200` milliseconds */\n quick: 200;\n /** `280` milliseconds */\n moderate: 280;\n /** `360` milliseconds */\n xmoderate: 360;\n /** `480` milliseconds */\n gentle: 480;\n /** `640` milliseconds */\n xgentle: 640;\n /** `960` milliseconds */\n '2xgentle': 960;\n};\n\nexport type Delay = {\n /** `80` milliseconds */\n '2xquick': 80;\n /** `160` milliseconds */\n xquick: 160;\n /** `280` milliseconds */\n moderate: 280;\n /** `480` milliseconds */\n gentle: 480;\n /** `960` milliseconds */\n xgentle: 960;\n /** `2000` milliseconds */\n long: 2000;\n /** `3000` milliseconds */\n xlong: 3000;\n /** `5000` milliseconds */\n '2xlong': 5000;\n};\n\nexport type EasingFactoryFn = { factory: () => (value: number) => number }; // similar to EasingFactoryFn of `react-native-reanimated`\nexport type EasingType<Value extends string> = Platform.Select<{\n web: Value;\n native: EasingFactoryFn;\n}>;\n\ntype Easing = {\n /**\n * Linear Easing\n *\n * Use Case: Marquee, Progress Bar, etc\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n linear: EasingType<'cubic-bezier(0, 0, 0, 0)'>;\n\n /**\n * Entrance Animation Easing\n *\n * Use Case: Entry of modals, drawer, dropdown, etc\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n entrance: EasingType<'cubic-bezier(0, 0, 0.2, 1)'>;\n\n /**\n * Exit Animation Easing\n *\n * Use Case: Exit of modals, drawer, dropdown, etc\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n exit: EasingType<'cubic-bezier(0.17, 0, 1, 1)'>;\n\n /**\n * Standard Easing\n *\n * Use Case: Morph\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n standard: EasingType<'cubic-bezier(0.3, 0, 0.2, 1)'>;\n\n /**\n * Emphasized Easing\n *\n * Use Case: Hover states of interactive items\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n emphasized: EasingType<'cubic-bezier(0.5, 0, 0, 1)'>;\n\n /**\n * Overshoot Easing\n *\n * Use Case: Toast notifications\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n overshoot: EasingType<'cubic-bezier(0.5, 0, 0.3, 1.5)'>;\n\n /**\n * Error Easing\n *\n * Use Case: Error States\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n shake: EasingType<'cubic-bezier(1, 0.5, 0, 0.5)'>;\n};\n\nexport type Motion = Readonly<{\n delay: Delay;\n duration: Duration;\n easing: Easing;\n}>;\n\nexport type EasingString = `easing.${keyof Easing}`;\nexport type DurationString = `duration.${keyof Duration}`;\nexport type DelayString = `delay.${keyof Delay}`;\n\nconst delay: Delay = {\n '2xquick': 80,\n xquick: 160,\n moderate: 280,\n gentle: 480,\n xgentle: 960,\n long: 2000,\n xlong: 3000,\n '2xlong': 5000,\n};\n\nconst duration: Duration = {\n '2xquick': 80,\n xquick: 160,\n quick: 200,\n moderate: 280,\n xmoderate: 360,\n gentle: 480,\n xgentle: 640,\n '2xgentle': 960,\n};\n\n/* makeBezier returns a string of `cubic-bezier()` for web & a react-native-reanimated Easing Function of type `EasingFactoryFn` for native */\nconst easing: Easing = {\n linear: makeBezier(0, 0, 0, 0),\n entrance: makeBezier(0, 0, 0.2, 1),\n exit: makeBezier(0.17, 0, 1, 1),\n standard: makeBezier(0.3, 0, 0.2, 1),\n emphasized: makeBezier(0.5, 0, 0, 1),\n overshoot: makeBezier(0.5, 0, 0.3, 1.5),\n shake: makeBezier(1, 0.5, 0, 0.5),\n};\n\nexport const motion: Motion = {\n delay,\n duration,\n easing,\n};\n"],"names":["delay","xquick","moderate","gentle","xgentle","xlong","duration","quick","xmoderate","easing","linear","makeBezier","entrance","exit","standard","emphasized","overshoot","shake","motion"],"mappings":";;;AAyC4E;;AAiF5E,IAAMA,KAAY,GAAG;AACnB,EAAA,SAAS,EAAE,EAAE;AACbC,EAAAA,MAAM,EAAE,GAAG;AACXC,EAAAA,QAAQ,EAAE,GAAG;AACbC,EAAAA,MAAM,EAAE,GAAG;AACXC,EAAAA,OAAO,EAAE,GAAG;AACZ,EAAA,MAAA,EAAM,IAAI;AACVC,EAAAA,KAAK,EAAE,IAAI;AACX,EAAA,QAAQ,EAAE,IAAA;AACZ,CAAC,CAAA;AAED,IAAMC,QAAkB,GAAG;AACzB,EAAA,SAAS,EAAE,EAAE;AACbL,EAAAA,MAAM,EAAE,GAAG;AACXM,EAAAA,KAAK,EAAE,GAAG;AACVL,EAAAA,QAAQ,EAAE,GAAG;AACbM,EAAAA,SAAS,EAAE,GAAG;AACdL,EAAAA,MAAM,EAAE,GAAG;AACXC,EAAAA,OAAO,EAAE,GAAG;AACZ,EAAA,UAAU,EAAE,GAAA;AACd,CAAC,CAAA;;AAED;AACA,IAAMK,MAAc,GAAG;EACrBC,MAAM,EAAEC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;EAC9BC,QAAQ,EAAED,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;EAClCE,IAAI,EAAEF,UAAU,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;EAC/BG,QAAQ,EAAEH,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;EACpCI,UAAU,EAAEJ,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;EACpCK,SAAS,EAAEL,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;EACvCM,KAAK,EAAEN,UAAU,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,CAAA;AAClC,CAAC,CAAA;AAEM,IAAMO,MAAc,GAAG;AAC5BlB,EAAAA,KAAK,EAALA,KAAK;AACLM,EAAAA,QAAQ,EAARA,QAAQ;AACRG,EAAAA,MAAM,EAANA,MAAAA;AACF;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var cssBezierToArray = function cssBezierToArray(cssCubicBezierString) {
|
|
2
|
+
var indexOfFirstBracket = cssCubicBezierString.indexOf('(');
|
|
3
|
+
var indexOfLastBracket = cssCubicBezierString.lastIndexOf(')');
|
|
4
|
+
var bezierValuesString = cssCubicBezierString.slice(indexOfFirstBracket + 1, indexOfLastBracket);
|
|
5
|
+
var bezierValuesArray = bezierValuesString.split(',').map(function (val) {
|
|
6
|
+
return Number(val);
|
|
7
|
+
});
|
|
8
|
+
return bezierValuesArray;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { cssBezierToArray };
|
|
12
|
+
//# sourceMappingURL=cssBezierToArray.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssBezierToArray.js","sources":["../../../../../src/utils/cssBezierToArray.ts"],"sourcesContent":["const cssBezierToArray = <\n X1 extends number,\n Y1 extends number,\n X2 extends number,\n Y2 extends number\n>(\n cssCubicBezierString: `cubic-bezier(${X1}, ${Y1}, ${X2}, ${Y2})`,\n): [X1, Y1, X2, Y2] => {\n const indexOfFirstBracket = cssCubicBezierString.indexOf('(');\n const indexOfLastBracket = cssCubicBezierString.lastIndexOf(')');\n const bezierValuesString = cssCubicBezierString.slice(\n indexOfFirstBracket + 1,\n indexOfLastBracket,\n );\n const bezierValuesArray = bezierValuesString.split(',').map((val) => Number(val)) as [\n X1,\n Y1,\n X2,\n Y2,\n ];\n return bezierValuesArray;\n};\n\nexport { cssBezierToArray };\n"],"names":["cssBezierToArray","cssCubicBezierString","indexOfFirstBracket","indexOf","indexOfLastBracket","lastIndexOf","bezierValuesString","slice","bezierValuesArray","split","map","val","Number"],"mappings":"AAAA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAMpBC,oBAAgE,EAC3C;AACrB,EAAA,IAAMC,mBAAmB,GAAGD,oBAAoB,CAACE,OAAO,CAAC,GAAG,CAAC,CAAA;AAC7D,EAAA,IAAMC,kBAAkB,GAAGH,oBAAoB,CAACI,WAAW,CAAC,GAAG,CAAC,CAAA;EAChE,IAAMC,kBAAkB,GAAGL,oBAAoB,CAACM,KAAK,CACnDL,mBAAmB,GAAG,CAAC,EACvBE,kBACF,CAAC,CAAA;AACD,EAAA,IAAMI,iBAAiB,GAAGF,kBAAkB,CAACG,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAAC,UAACC,GAAG,EAAA;IAAA,OAAKC,MAAM,CAACD,GAAG,CAAC,CAAA;GAK/E,CAAA,CAAA;AACD,EAAA,OAAOH,iBAAiB,CAAA;AAC1B;;;;"}
|
|
@@ -22,7 +22,7 @@ function getFocusRingStyles(_ref) {
|
|
|
22
22
|
outlineOffset: "".concat(negativeOffset ? '-4px' : '1px').concat(important),
|
|
23
23
|
transitionProperty: 'outline-width',
|
|
24
24
|
transitionDuration: castWebType(makeMotionTime(theme.motion.duration['2xquick'])),
|
|
25
|
-
transitionTimingFunction: castWebType(theme.motion.easing.standard
|
|
25
|
+
transitionTimingFunction: castWebType(theme.motion.easing.standard)
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFocusRingStyles.web.js","sources":["../../../../../../src/utils/getFocusRingStyles/getFocusRingStyles.web.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport type { GetFocusRingArgs } from './types';\nimport { castWebType, makeMotionTime } from '~utils';\n\n/**\n * @param props.theme Blade Theme Object\n * @param props.negativeOffset if set the outline offset will be set to -4px, this is useful\n * in table component where the outline will get cutoff by the table border\n */\nfunction getFocusRingStyles({\n theme,\n negativeOffset = false,\n isImportant = false,\n}: GetFocusRingArgs) {\n const important = `${isImportant ? ' !important' : ''}`;\n return {\n outline: `4px solid ${theme.colors.surface.border.primary.muted}${important}`,\n outlineOffset: `${negativeOffset ? '-4px' : '1px'}${important}`,\n transitionProperty: 'outline-width',\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration['2xquick'])),\n transitionTimingFunction: castWebType(theme.motion.easing.standard
|
|
1
|
+
{"version":3,"file":"getFocusRingStyles.web.js","sources":["../../../../../../src/utils/getFocusRingStyles/getFocusRingStyles.web.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport type { GetFocusRingArgs } from './types';\nimport { castWebType, makeMotionTime } from '~utils';\n\n/**\n * @param props.theme Blade Theme Object\n * @param props.negativeOffset if set the outline offset will be set to -4px, this is useful\n * in table component where the outline will get cutoff by the table border\n */\nfunction getFocusRingStyles({\n theme,\n negativeOffset = false,\n isImportant = false,\n}: GetFocusRingArgs) {\n const important = `${isImportant ? ' !important' : ''}`;\n return {\n outline: `4px solid ${theme.colors.surface.border.primary.muted}${important}`,\n outlineOffset: `${negativeOffset ? '-4px' : '1px'}${important}`,\n transitionProperty: 'outline-width',\n transitionDuration: castWebType(makeMotionTime(theme.motion.duration['2xquick'])),\n transitionTimingFunction: castWebType(theme.motion.easing.standard),\n } as const;\n}\n\nexport { getFocusRingStyles };\n"],"names":["getFocusRingStyles","_ref","theme","_ref$negativeOffset","negativeOffset","_ref$isImportant","isImportant","important","concat","outline","colors","surface","border","primary","muted","outlineOffset","transitionProperty","transitionDuration","castWebType","makeMotionTime","motion","duration","transitionTimingFunction","easing","standard"],"mappings":";;;;AAAA;;;AAIA;AACA;AACA;AACA;AACA;AACA,SAASA,kBAAkBA,CAAAC,IAAA,EAIN;AAAA,EAAA,IAHnBC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAAC,mBAAA,GAAAF,IAAA,CACLG,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,mBAAA;IAAAE,gBAAA,GAAAJ,IAAA,CACtBK,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,gBAAA,CAAA;EAEnB,IAAME,SAAS,MAAAC,MAAA,CAAMF,WAAW,GAAG,aAAa,GAAG,EAAE,CAAE,CAAA;EACvD,OAAO;AACLG,IAAAA,OAAO,eAAAD,MAAA,CAAeN,KAAK,CAACQ,MAAM,CAACC,OAAO,CAACC,MAAM,CAACC,OAAO,CAACC,KAAK,EAAAN,MAAA,CAAGD,SAAS,CAAE;AAC7EQ,IAAAA,aAAa,EAAAP,EAAAA,CAAAA,MAAA,CAAKJ,cAAc,GAAG,MAAM,GAAG,KAAK,CAAAI,CAAAA,MAAA,CAAGD,SAAS,CAAE;AAC/DS,IAAAA,kBAAkB,EAAE,eAAe;AACnCC,IAAAA,kBAAkB,EAAEC,WAAW,CAACC,cAAc,CAACjB,KAAK,CAACkB,MAAM,CAACC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IACjFC,wBAAwB,EAAEJ,WAAW,CAAChB,KAAK,CAACkB,MAAM,CAACG,MAAM,CAACC,QAAQ,CAAA;GACnE,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ## What are `getOuterMotionRef` and `getInnerMotionRef` functions?
|
|
5
|
+
*
|
|
6
|
+
* - Motion react requires refs on outermost element to animate components
|
|
7
|
+
* - But we have certain components like input where we already pass refs on inner elements with certain expectation (e.g. in input to focus on the input)
|
|
8
|
+
*
|
|
9
|
+
* Using these 2 utility functions, we can use 2 refs from same forwardRef. One on outer element and one on inner element
|
|
10
|
+
*
|
|
11
|
+
* ---
|
|
12
|
+
*
|
|
13
|
+
* ### Examples
|
|
14
|
+
*
|
|
15
|
+
* ```jsx
|
|
16
|
+
*
|
|
17
|
+
* const MyComponent = ({ _motionMeta }: MotionMetaProp, ref: React.Ref<BladeElementRef>) => {
|
|
18
|
+
*
|
|
19
|
+
* return (
|
|
20
|
+
* <BaseBox ref={getOuterMotionRef({ _motionMeta, ref })}>
|
|
21
|
+
* <Text>Something something</Text>
|
|
22
|
+
* <BaseInput ref={getInnerMotionRef({ _motionMeta, ref })} />
|
|
23
|
+
* </BaseBox>
|
|
24
|
+
* )
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* ### What does it internally do?
|
|
29
|
+
*
|
|
30
|
+
* - On BaseMotion.tsx, we inject _motionMeta prop with ref that is passed to child.
|
|
31
|
+
* - i.e. we pick the `ref` prop of child, and pass it as `_motionMeta.innerRef`. This way in our components, we have access to both the refs. The motion/react ref that we get from forwardRef, and `_motionMeta.innerRef` (ref that you pass on child component of motion)
|
|
32
|
+
* - Both `getOuterMotionRef` and `getInnerMotionRef` are simple one line utility functions to use the correct ref on correct element.
|
|
33
|
+
*
|
|
34
|
+
* ### When to use this?
|
|
35
|
+
*
|
|
36
|
+
* - When you want to forward ref to component on inner element instead of outer element (e.g. passing down the ref to input in checkbox)
|
|
37
|
+
*/
|
|
38
|
+
var getOuterMotionRef = function getOuterMotionRef(_ref) {
|
|
39
|
+
var _motionMeta = _ref._motionMeta,
|
|
40
|
+
ref = _ref.ref;
|
|
41
|
+
return _motionMeta !== null && _motionMeta !== void 0 && _motionMeta.isEnhanced ? ref : null;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* ## What are `getOuterMotionRef` and `getInnerMotionRef` functions?
|
|
46
|
+
*
|
|
47
|
+
* - Motion react requires refs on outermost element to animate components
|
|
48
|
+
* - But we have certain components like input where we already pass refs on inner elements with certain expectation (e.g. in input to focus on the input)
|
|
49
|
+
*
|
|
50
|
+
* Using these 2 utility functions, we can use 2 refs from same forwardRef. One on outer element and one on inner element
|
|
51
|
+
*
|
|
52
|
+
* ---
|
|
53
|
+
*
|
|
54
|
+
* ### Examples
|
|
55
|
+
*
|
|
56
|
+
* ```jsx
|
|
57
|
+
*
|
|
58
|
+
* const MyComponent = ({ _motionMeta }: MotionMetaProp, ref: React.Ref<BladeElementRef>) => {
|
|
59
|
+
*
|
|
60
|
+
* return (
|
|
61
|
+
* <BaseBox ref={getOuterMotionRef({ _motionMeta, ref })}>
|
|
62
|
+
* <Text>Something something</Text>
|
|
63
|
+
* <BaseInput ref={getInnerMotionRef({ _motionMeta, ref })} />
|
|
64
|
+
* </BaseBox>
|
|
65
|
+
* )
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* ### What does it internally do?
|
|
70
|
+
*
|
|
71
|
+
* - On BaseMotion.tsx, we inject _motionMeta prop with ref that is passed to child.
|
|
72
|
+
* - i.e. we pick the `ref` prop of child, and pass it as `_motionMeta.innerRef`. This way in our components, we have access to both the refs. The motion/react ref that we get from forwardRef, and `_motionMeta.innerRef` (ref that you pass on child component of motion)
|
|
73
|
+
* - Both `getOuterMotionRef` and `getInnerMotionRef` are simple one line utility functions to use the correct ref on correct element.
|
|
74
|
+
*
|
|
75
|
+
* ### When to use this?
|
|
76
|
+
*
|
|
77
|
+
* - When you want to forward ref to component on inner element instead of outer element (e.g. passing down the ref to input in checkbox)
|
|
78
|
+
*/
|
|
79
|
+
var getInnerMotionRef = function getInnerMotionRef(_ref2) {
|
|
80
|
+
var _motionMeta = _ref2._motionMeta,
|
|
81
|
+
ref = _ref2.ref;
|
|
82
|
+
return _motionMeta !== null && _motionMeta !== void 0 && _motionMeta.isEnhanced ? _motionMeta.innerRef : ref;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export { getInnerMotionRef, getOuterMotionRef };
|
|
86
|
+
//# sourceMappingURL=getMotionRefs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMotionRefs.js","sources":["../../../../../src/utils/getMotionRefs.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type React from 'react';\nimport type { BladeElementRef } from './types';\nimport type { MotionMetaProp } from '~components/BaseMotion';\n\ntype MotionRefsType = {\n ref: React.Ref<BladeElementRef>;\n} & MotionMetaProp;\n\n/**\n * ## What are `getOuterMotionRef` and `getInnerMotionRef` functions?\n *\n * - Motion react requires refs on outermost element to animate components\n * - But we have certain components like input where we already pass refs on inner elements with certain expectation (e.g. in input to focus on the input)\n *\n * Using these 2 utility functions, we can use 2 refs from same forwardRef. One on outer element and one on inner element\n *\n * ---\n *\n * ### Examples\n *\n * ```jsx\n *\n * const MyComponent = ({ _motionMeta }: MotionMetaProp, ref: React.Ref<BladeElementRef>) => {\n *\n * return (\n * <BaseBox ref={getOuterMotionRef({ _motionMeta, ref })}>\n * <Text>Something something</Text>\n * <BaseInput ref={getInnerMotionRef({ _motionMeta, ref })} />\n * </BaseBox>\n * )\n * }\n * ```\n *\n * ### What does it internally do?\n *\n * - On BaseMotion.tsx, we inject _motionMeta prop with ref that is passed to child.\n * - i.e. we pick the `ref` prop of child, and pass it as `_motionMeta.innerRef`. This way in our components, we have access to both the refs. The motion/react ref that we get from forwardRef, and `_motionMeta.innerRef` (ref that you pass on child component of motion)\n * - Both `getOuterMotionRef` and `getInnerMotionRef` are simple one line utility functions to use the correct ref on correct element.\n *\n * ### When to use this?\n *\n * - When you want to forward ref to component on inner element instead of outer element (e.g. passing down the ref to input in checkbox)\n */\nconst getOuterMotionRef = ({ _motionMeta, ref }: MotionRefsType): any => {\n return _motionMeta?.isEnhanced ? ref : null;\n};\n\n/**\n * ## What are `getOuterMotionRef` and `getInnerMotionRef` functions?\n *\n * - Motion react requires refs on outermost element to animate components\n * - But we have certain components like input where we already pass refs on inner elements with certain expectation (e.g. in input to focus on the input)\n *\n * Using these 2 utility functions, we can use 2 refs from same forwardRef. One on outer element and one on inner element\n *\n * ---\n *\n * ### Examples\n *\n * ```jsx\n *\n * const MyComponent = ({ _motionMeta }: MotionMetaProp, ref: React.Ref<BladeElementRef>) => {\n *\n * return (\n * <BaseBox ref={getOuterMotionRef({ _motionMeta, ref })}>\n * <Text>Something something</Text>\n * <BaseInput ref={getInnerMotionRef({ _motionMeta, ref })} />\n * </BaseBox>\n * )\n * }\n * ```\n *\n * ### What does it internally do?\n *\n * - On BaseMotion.tsx, we inject _motionMeta prop with ref that is passed to child.\n * - i.e. we pick the `ref` prop of child, and pass it as `_motionMeta.innerRef`. This way in our components, we have access to both the refs. The motion/react ref that we get from forwardRef, and `_motionMeta.innerRef` (ref that you pass on child component of motion)\n * - Both `getOuterMotionRef` and `getInnerMotionRef` are simple one line utility functions to use the correct ref on correct element.\n *\n * ### When to use this?\n *\n * - When you want to forward ref to component on inner element instead of outer element (e.g. passing down the ref to input in checkbox)\n */\nconst getInnerMotionRef = ({ _motionMeta, ref }: MotionRefsType): any => {\n return _motionMeta?.isEnhanced ? _motionMeta.innerRef : ref;\n};\n\nexport { getOuterMotionRef, getInnerMotionRef };\n"],"names":["getOuterMotionRef","_ref","_motionMeta","ref","isEnhanced","getInnerMotionRef","_ref2","innerRef"],"mappings":"AAAA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAAkD;AAAA,EAAA,IAA5CC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IAAEC,GAAG,GAAAF,IAAA,CAAHE,GAAG,CAAA;EAC3C,OAAOD,WAAW,KAAXA,IAAAA,IAAAA,WAAW,KAAXA,KAAAA,CAAAA,IAAAA,WAAW,CAAEE,UAAU,GAAGD,GAAG,GAAG,IAAI,CAAA;AAC7C,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAME,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,KAAA,EAAkD;AAAA,EAAA,IAA5CJ,WAAW,GAAAI,KAAA,CAAXJ,WAAW;IAAEC,GAAG,GAAAG,KAAA,CAAHH,GAAG,CAAA;AAC3C,EAAA,OAAOD,WAAW,KAAA,IAAA,IAAXA,WAAW,KAAA,KAAA,CAAA,IAAXA,WAAW,CAAEE,UAAU,GAAGF,WAAW,CAACK,QAAQ,GAAGJ,GAAG,CAAA;AAC7D;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msToSeconds.js","sources":["../../../../../src/utils/msToSeconds.ts"],"sourcesContent":["const msToSeconds = (durationInMS: number): number => {\n return durationInMS / 1000;\n};\n\nexport { msToSeconds };\n"],"names":["msToSeconds","durationInMS"],"mappings":"AAAA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,YAAoB,EAAa;EACpD,OAAOA,YAAY,GAAG,IAAI,CAAA;AAC5B;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
|
-
import { useState, Children, useCallback, useMemo, cloneElement } from 'react';
|
|
4
|
+
import React__default, { useState, Children, useCallback, useMemo, cloneElement } from 'react';
|
|
5
5
|
import { AccordionContext } from './AccordionContext.js';
|
|
6
6
|
import { MAX_WIDTH } from './styles.web.js';
|
|
7
7
|
import '../Box/BaseBox/index.js';
|
|
@@ -70,7 +70,7 @@ var getVariantStyles = function getVariantStyles(variant) {
|
|
|
70
70
|
* Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs
|
|
71
71
|
*
|
|
72
72
|
*/
|
|
73
|
-
var
|
|
73
|
+
var _Accordion = function _Accordion(_ref, ref) {
|
|
74
74
|
var defaultExpandedIndex = _ref.defaultExpandedIndex,
|
|
75
75
|
expandedIndex = _ref.expandedIndex,
|
|
76
76
|
onExpandChange = _ref.onExpandChange,
|
|
@@ -116,7 +116,9 @@ var Accordion = function Accordion(_ref) {
|
|
|
116
116
|
}, [expandedAccordionItemIndex, handleExpandChange, expandedIndex, showNumberPrefix, defaultExpandedIndex, variant, numberOfItems, size]);
|
|
117
117
|
return /*#__PURE__*/jsx(AccordionContext.Provider, {
|
|
118
118
|
value: accordionContext,
|
|
119
|
-
children: /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
119
|
+
children: /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
120
|
+
ref: ref
|
|
121
|
+
}, metaAttribute({
|
|
120
122
|
name: MetaConstants.Accordion,
|
|
121
123
|
testID: testID
|
|
122
124
|
})), getStyledProps(rest)), makeAnalyticsAttribute(rest)), {}, {
|
|
@@ -134,6 +136,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
134
136
|
}))
|
|
135
137
|
});
|
|
136
138
|
};
|
|
139
|
+
var Accordion = /*#__PURE__*/React__default.forwardRef(_Accordion);
|
|
137
140
|
|
|
138
141
|
export { Accordion };
|
|
139
142
|
//# sourceMappingURL=Accordion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.js","sources":["../../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback, useMemo, useState, cloneElement, Children } from 'react';\nimport type { AccordionContextState } from './AccordionContext';\nimport { AccordionContext } from './AccordionContext';\nimport { MAX_WIDTH } from './styles';\nimport type { AccordionProps } from './types';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { size as sizeTokens } from '~tokens/global';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst MIN_WIDTH: BoxProps['minWidth'] = {\n s: makeSize(sizeTokens[200]),\n m: makeSize(sizeTokens[360]),\n l: makeSize(sizeTokens[360]),\n};\n\nconst getVariantStyles = (variant: AccordionProps['variant']): BoxProps => {\n if (variant === 'transparent') {\n return {};\n }\n\n return {\n backgroundColor: 'surface.background.gray.intense',\n borderRadius: 'medium',\n borderWidth: 'thinner',\n borderColor: 'surface.border.gray.subtle',\n };\n};\n\n/**\n * # Accordion\n *\n * An accordion is used to allow users to toggle between different content sections in a compact vertical stack.\n *\n * ## Usage\n *\n * ```jsx\n * <Accordion>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * </Accordion>\n * ```\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs\n *\n */\nconst
|
|
1
|
+
{"version":3,"file":"Accordion.js","sources":["../../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React, { useCallback, useMemo, useState, cloneElement, Children } from 'react';\nimport type { AccordionContextState } from './AccordionContext';\nimport { AccordionContext } from './AccordionContext';\nimport { MAX_WIDTH } from './styles';\nimport type { AccordionProps } from './types';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { size as sizeTokens } from '~tokens/global';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { BladeElementRef } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst MIN_WIDTH: BoxProps['minWidth'] = {\n s: makeSize(sizeTokens[200]),\n m: makeSize(sizeTokens[360]),\n l: makeSize(sizeTokens[360]),\n};\n\nconst getVariantStyles = (variant: AccordionProps['variant']): BoxProps => {\n if (variant === 'transparent') {\n return {};\n }\n\n return {\n backgroundColor: 'surface.background.gray.intense',\n borderRadius: 'medium',\n borderWidth: 'thinner',\n borderColor: 'surface.border.gray.subtle',\n };\n};\n\n/**\n * # Accordion\n *\n * An accordion is used to allow users to toggle between different content sections in a compact vertical stack.\n *\n * ## Usage\n *\n * ```jsx\n * <Accordion>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * </Accordion>\n * ```\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs\n *\n */\nconst _Accordion = (\n {\n defaultExpandedIndex,\n expandedIndex,\n onExpandChange,\n showNumberPrefix = false,\n children,\n variant = 'transparent',\n size = 'large',\n maxWidth,\n testID,\n ...rest\n }: AccordionProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n const [expandedAccordionItemIndex, setExpandedAccordionItemIndex] = useState<number | undefined>(\n defaultExpandedIndex,\n );\n\n const numberOfItems = Children.count(children);\n\n const handleExpandChange = useCallback(\n (nextExpandedIndex: number) => {\n if (typeof expandedIndex !== 'undefined') {\n // controlled\n onExpandChange?.({ expandedIndex: nextExpandedIndex });\n } else {\n // uncontrolled\n setExpandedAccordionItemIndex(nextExpandedIndex);\n onExpandChange?.({ expandedIndex: nextExpandedIndex });\n }\n },\n [onExpandChange, expandedIndex],\n );\n\n const accordionContext = useMemo<AccordionContextState>(\n () => ({\n expandedIndex: expandedIndex ?? expandedAccordionItemIndex,\n defaultExpandedIndex,\n onExpandChange: handleExpandChange,\n showNumberPrefix,\n variant,\n numberOfItems,\n size,\n }),\n [\n expandedAccordionItemIndex,\n handleExpandChange,\n expandedIndex,\n showNumberPrefix,\n defaultExpandedIndex,\n variant,\n numberOfItems,\n size,\n ],\n );\n\n return (\n <AccordionContext.Provider value={accordionContext}>\n <BaseBox\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Accordion, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n {...getVariantStyles(variant)}\n minWidth={MIN_WIDTH}\n maxWidth={maxWidth ?? MAX_WIDTH}\n width=\"100%\"\n >\n {Children.map(children, (child, index) =>\n cloneElement(child, { _index: index, key: index }),\n )}\n </BaseBox>\n </BaseBox>\n </AccordionContext.Provider>\n );\n};\n\nconst Accordion = React.forwardRef(_Accordion);\n\nexport { Accordion };\n"],"names":["MIN_WIDTH","s","makeSize","sizeTokens","m","l","getVariantStyles","variant","backgroundColor","borderRadius","borderWidth","borderColor","_Accordion","_ref","ref","defaultExpandedIndex","expandedIndex","onExpandChange","_ref$showNumberPrefix","showNumberPrefix","children","_ref$variant","_ref$size","size","maxWidth","testID","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","expandedAccordionItemIndex","setExpandedAccordionItemIndex","numberOfItems","Children","count","handleExpandChange","useCallback","nextExpandedIndex","accordionContext","useMemo","_jsx","AccordionContext","Provider","value","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","Accordion","getStyledProps","makeAnalyticsAttribute","minWidth","MAX_WIDTH","width","map","child","index","cloneElement","_index","key","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAMA,SAA+B,GAAG;AACtCC,EAAAA,CAAC,EAAEC,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAC;AAC5BC,EAAAA,CAAC,EAAEF,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAC;AAC5BE,EAAAA,CAAC,EAAEH,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAA;AAC7B,CAAC,CAAA;AAED,IAAMG,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,OAAkC,EAAe;EACzE,IAAIA,OAAO,KAAK,aAAa,EAAE;AAC7B,IAAA,OAAO,EAAE,CAAA;AACX,GAAA;EAEA,OAAO;AACLC,IAAAA,eAAe,EAAE,iCAAiC;AAClDC,IAAAA,YAAY,EAAE,QAAQ;AACtBC,IAAAA,WAAW,EAAE,SAAS;AACtBC,IAAAA,WAAW,EAAE,4BAAA;GACd,CAAA;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAadC,GAA+B,EACd;AAAA,EAAA,IAZfC,oBAAoB,GAAAF,IAAA,CAApBE,oBAAoB;IACpBC,aAAa,GAAAH,IAAA,CAAbG,aAAa;IACbC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IAAAC,qBAAA,GAAAL,IAAA,CACdM,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;IACxBE,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IAAAC,YAAA,GAAAR,IAAA,C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D,SAAU;AACpBwB,QAAAA,QAAQ,EAAEA,QAAQ,KAAA,IAAA,IAARA,QAAQ,KAARA,KAAAA,CAAAA,GAAAA,QAAQ,GAAIgC,SAAU;AAChCC,QAAAA,KAAK,EAAC,MAAM;QAAArC,QAAA,EAEXgB,QAAQ,CAACsB,GAAG,CAACtC,QAAQ,EAAE,UAACuC,KAAK,EAAEC,KAAK,EAAA;UAAA,oBACnCC,YAAY,CAACF,KAAK,EAAE;AAAEG,YAAAA,MAAM,EAAEF,KAAK;AAAEG,YAAAA,GAAG,EAAEH,KAAAA;AAAM,WAAC,CAAC,CAAA;SACpD,CAAA;OACO,CAAA,CAAA;KACF,CAAA,CAAA;AAAC,GACe,CAAC,CAAA;AAEhC,CAAC,CAAA;AAED,IAAMR,SAAS,gBAAGY,cAAK,CAACC,UAAU,CAACrD,UAAU;;;;"}
|
|
@@ -8,7 +8,7 @@ var getTransitionDuration = function getTransitionDuration(theme) {
|
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
10
10
|
var getTransitionEasing = function getTransitionEasing(theme) {
|
|
11
|
-
return theme.motion.easing.standard
|
|
11
|
+
return theme.motion.easing.standard;
|
|
12
12
|
};
|
|
13
13
|
var getBackgroundColor = function getBackgroundColor(_ref) {
|
|
14
14
|
var theme = _ref.theme,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commonStyles.js","sources":["../../../../../../src/components/Accordion/commonStyles.ts"],"sourcesContent":["import type { CSSObject, StyledProps } from 'styled-components';\nimport type { StyledAccordionButtonProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeMotionTime } from '~utils';\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration['2xquick']);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard
|
|
1
|
+
{"version":3,"file":"commonStyles.js","sources":["../../../../../../src/components/Accordion/commonStyles.ts"],"sourcesContent":["import type { CSSObject, StyledProps } from 'styled-components';\nimport type { StyledAccordionButtonProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeMotionTime } from '~utils';\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration['2xquick']);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard;\n\nconst getBackgroundColor = ({\n theme,\n isExpanded,\n isActive,\n}: {\n theme: Theme;\n isExpanded: boolean;\n isActive: boolean;\n}): string => {\n const { gray } = theme.colors.interactive.background;\n\n if (isExpanded) {\n if (isActive) {\n return gray.fadedHighlighted;\n }\n\n return gray.faded;\n }\n\n if (isActive) {\n return gray.faded;\n }\n\n return theme.colors.transparent;\n};\n\nconst getCommonAccordionButtonStyles = (\n props: StyledProps<StyledAccordionButtonProps>,\n): CSSObject => {\n const { theme } = props;\n\n return {\n padding: theme.spacing[0],\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n };\n};\n\nexport {\n getTransitionDuration,\n getTransitionEasing,\n getBackgroundColor,\n getCommonAccordionButtonStyles,\n};\n"],"names":["getTransitionDuration","theme","makeMotionTime","motion","duration","getTransitionEasing","easing","standard","getBackgroundColor","_ref","isExpanded","isActive","gray","colors","interactive","background","fadedHighlighted","faded","transparent","getCommonAccordionButtonStyles","props","padding","spacing","display","flexDirection","alignItems","justifyContent"],"mappings":";;;AAKA;AACA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIC,KAAY,EAAA;EAAA,OAAKC,cAAc,CAACD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAA;AAAA,EAAA;;AAEhG;AACA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIJ,KAAY,EAAA;AAAA,EAAA,OAAKA,KAAK,CAACE,MAAM,CAACG,MAAM,CAACC,QAAQ,CAAA;AAAA,EAAA;AAE1E,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAQV;AAAA,EAAA,IAPZR,KAAK,GAAAQ,IAAA,CAALR,KAAK;IACLS,UAAU,GAAAD,IAAA,CAAVC,UAAU;IACVC,QAAQ,GAAAF,IAAA,CAARE,QAAQ,CAAA;EAMR,IAAQC,IAAI,GAAKX,KAAK,CAACY,MAAM,CAACC,WAAW,CAACC,UAAU,CAA5CH,IAAI,CAAA;AAEZ,EAAA,IAAIF,UAAU,EAAE;AACd,IAAA,IAAIC,QAAQ,EAAE;MACZ,OAAOC,IAAI,CAACI,gBAAgB,CAAA;AAC9B,KAAA;IAEA,OAAOJ,IAAI,CAACK,KAAK,CAAA;AACnB,GAAA;AAEA,EAAA,IAAIN,QAAQ,EAAE;IACZ,OAAOC,IAAI,CAACK,KAAK,CAAA;AACnB,GAAA;AAEA,EAAA,OAAOhB,KAAK,CAACY,MAAM,CAACK,WAAW,CAAA;AACjC,EAAC;AAED,IAAMC,8BAA8B,GAAG,SAAjCA,8BAA8BA,CAClCC,KAA8C,EAChC;AACd,EAAA,IAAQnB,KAAK,GAAKmB,KAAK,CAAfnB,KAAK,CAAA;EAEb,OAAO;AACLoB,IAAAA,OAAO,EAAEpB,KAAK,CAACqB,OAAO,CAAC,CAAC,CAAC;AACzBC,IAAAA,OAAO,EAAE,MAAM;AACfC,IAAAA,aAAa,EAAE,KAAK;AACpBC,IAAAA,UAAU,EAAE,QAAQ;AACpBC,IAAAA,cAAc,EAAE,eAAA;GACjB,CAAA;AACH;;;;"}
|
|
@@ -45,6 +45,9 @@ var _ActionList = function _ActionList(_ref) {
|
|
|
45
45
|
sectionData = _React$useMemo.sectionData,
|
|
46
46
|
childrenWithId = _React$useMemo.childrenWithId,
|
|
47
47
|
actionListOptions = _React$useMemo.actionListOptions;
|
|
48
|
+
console.log({
|
|
49
|
+
actionListOptions: actionListOptions
|
|
50
|
+
});
|
|
48
51
|
React__default.useEffect(function () {
|
|
49
52
|
setOptions(actionListOptions);
|
|
50
53
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionList.js","sources":["../../../../../../src/components/ActionList/ActionList.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport { getActionListContainerRole, getActionListItemWrapperRole } from './getA11yRoles';\nimport { getActionListProperties } from './actionListUtils';\nimport { ActionListBox } from './ActionListBox';\nimport { componentIds } from './componentIds';\nimport { ActionListNoResults } from './ActionListNoResults';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListProps = {\n children: React.ReactNode[];\n} & TestID &\n DataAnalyticsAttribute;\n\nconst _ActionList = ({ children, testID, ...rest }: ActionListProps): React.ReactElement => {\n const {\n setOptions,\n actionListItemRef,\n selectionType,\n dropdownBaseId,\n dropdownTriggerer,\n hasFooterAction,\n filteredValues,\n } = useDropdown();\n\n const { isInBottomSheet } = useBottomSheetContext();\n\n const { sectionData, childrenWithId, actionListOptions } = React.useMemo(\n () => getActionListProperties(children),\n [children],\n );\n\n React.useEffect(() => {\n setOptions(actionListOptions);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [actionListOptions]);\n\n if (\n filteredValues.length <= 0 &&\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete\n ) {\n return <ActionListNoResults />;\n }\n\n const actionListContainerRole = getActionListContainerRole(hasFooterAction, dropdownTriggerer);\n const actionListItemWrapperRole = getActionListItemWrapperRole(\n hasFooterAction,\n dropdownTriggerer,\n );\n const isMultiSelectable = selectionType === 'multiple';\n\n // If we are inside BottomSheet, we don't render The StyledActionList wrapper\n // This is to ensure:\n // 1. We don't render the box wrapper styles which includes shadows, padding, border etc\n // 2. to ensure GorhomBottomSheetSectionList works as expected, if we add extra wrappers GorhomBottomSheet won't render the content inside\n // NOTE: That this also means inside BottomSheet, ActionList won't render any ActionListHeader or Footer.\n return isInBottomSheet ? (\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n {...makeAnalyticsAttribute(rest)}\n />\n ) : (\n <BaseBox\n id={`${dropdownBaseId}-actionlist`}\n {...makeAccessible({\n role: actionListContainerRole,\n multiSelectable: actionListContainerRole === 'listbox' ? isMultiSelectable : undefined,\n labelledBy: `${dropdownBaseId}-label`,\n })}\n {...metaAttribute({ name: MetaConstants.ActionList, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n />\n </BaseBox>\n );\n};\n\n/**\n * ### ActionList\n *\n * List of multiple actionable items. Can be used as menu items inside `Dropdown`,\n * `BottomSheet` and as selectable items when combined with `SelectInput`\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown>\n * <SelectInput label=\"Select Action\" />\n * <DropdownOverlay>\n * <DropdownHeader title=\"Header Title\" />\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * />\n * <ActionListItem\n * title=\"Pricing\"\n * value=\"pricing\"\n * leading={<ActionListItemAsset src=\"https://flagcdn.com/w20/in.png\" alt=\"India Flag\" />}\n * />\n * </ActionList>\n * <DropdownFooter><Button>Apply</Button></DropdownFooter>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n */\nconst ActionList = assignWithoutSideEffects(React.memo(_ActionList), {\n displayName: componentIds.ActionList,\n componentId: componentIds.ActionList,\n});\n\nexport type { ActionListProps };\nexport { ActionList };\n"],"names":["_ActionList","_ref","children","testID","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","setOptions","actionListItemRef","selectionType","dropdownBaseId","dropdownTriggerer","hasFooterAction","filteredValues","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_React$useMemo","React","useMemo","getActionListProperties","sectionData","childrenWithId","actionListOptions","useEffect","length","dropdownComponentIds","triggers","AutoComplete","_jsx","ActionListNoResults","actionListContainerRole","getActionListContainerRole","actionListItemWrapperRole","getActionListItemWrapperRole","isMultiSelectable","ActionListBox","_objectSpread","ref","makeAnalyticsAttribute","BaseBox","id","concat","makeAccessible","role","multiSelectable","undefined","labelledBy","metaAttribute","name","MetaConstants","ActionList","assignWithoutSideEffects","memo","displayName","componentIds","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAA2E;AAAA,EAAA,IAArEC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAC9C,EAAA,IAAAC,YAAA,GAQIC,WAAW,EAAE;IAPfC,UAAU,GAAAF,YAAA,CAAVE,UAAU;IACVC,iBAAiB,GAAAH,YAAA,CAAjBG,iBAAiB;IACjBC,aAAa,GAAAJ,YAAA,CAAbI,aAAa;IACbC,cAAc,GAAAL,YAAA,CAAdK,cAAc;IACdC,iBAAiB,GAAAN,YAAA,CAAjBM,iBAAiB;IACjBC,eAAe,GAAAP,YAAA,CAAfO,eAAe;IACfC,cAAc,GAAAR,YAAA,CAAdQ,cAAc,CAAA;AAGhB,EAAA,IAAAC,qBAAA,GAA4BC,qBAAqB,EAAE;IAA3CC,eAAe,GAAAF,qBAAA,CAAfE,eAAe,CAAA;AAEvB,EAAA,IAAAC,cAAA,GAA2DC,cAAK,CAACC,OAAO,CACtE,YAAA;MAAA,OAAMC,uBAAuB,CAACpB,QAAQ,CAAC,CAAA;KACvC,EAAA,CAACA,QAAQ,CACX,CAAC;IAHOqB,WAAW,GAAAJ,cAAA,CAAXI,WAAW;IAAEC,cAAc,GAAAL,cAAA,CAAdK,cAAc;IAAEC,iBAAiB,GAAAN,cAAA,CAAjBM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"ActionList.js","sources":["../../../../../../src/components/ActionList/ActionList.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport { getActionListContainerRole, getActionListItemWrapperRole } from './getA11yRoles';\nimport { getActionListProperties } from './actionListUtils';\nimport { ActionListBox } from './ActionListBox';\nimport { componentIds } from './componentIds';\nimport { ActionListNoResults } from './ActionListNoResults';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListProps = {\n children: React.ReactNode[];\n} & TestID &\n DataAnalyticsAttribute;\n\nconst _ActionList = ({ children, testID, ...rest }: ActionListProps): React.ReactElement => {\n const {\n setOptions,\n actionListItemRef,\n selectionType,\n dropdownBaseId,\n dropdownTriggerer,\n hasFooterAction,\n filteredValues,\n } = useDropdown();\n\n const { isInBottomSheet } = useBottomSheetContext();\n\n const { sectionData, childrenWithId, actionListOptions } = React.useMemo(\n () => getActionListProperties(children),\n [children],\n );\n\n console.log({ actionListOptions });\n\n React.useEffect(() => {\n setOptions(actionListOptions);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [actionListOptions]);\n\n if (\n filteredValues.length <= 0 &&\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete\n ) {\n return <ActionListNoResults />;\n }\n\n const actionListContainerRole = getActionListContainerRole(hasFooterAction, dropdownTriggerer);\n const actionListItemWrapperRole = getActionListItemWrapperRole(\n hasFooterAction,\n dropdownTriggerer,\n );\n const isMultiSelectable = selectionType === 'multiple';\n\n // If we are inside BottomSheet, we don't render The StyledActionList wrapper\n // This is to ensure:\n // 1. We don't render the box wrapper styles which includes shadows, padding, border etc\n // 2. to ensure GorhomBottomSheetSectionList works as expected, if we add extra wrappers GorhomBottomSheet won't render the content inside\n // NOTE: That this also means inside BottomSheet, ActionList won't render any ActionListHeader or Footer.\n return isInBottomSheet ? (\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n {...makeAnalyticsAttribute(rest)}\n />\n ) : (\n <BaseBox\n id={`${dropdownBaseId}-actionlist`}\n {...makeAccessible({\n role: actionListContainerRole,\n multiSelectable: actionListContainerRole === 'listbox' ? isMultiSelectable : undefined,\n labelledBy: `${dropdownBaseId}-label`,\n })}\n {...metaAttribute({ name: MetaConstants.ActionList, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n />\n </BaseBox>\n );\n};\n\n/**\n * ### ActionList\n *\n * List of multiple actionable items. Can be used as menu items inside `Dropdown`,\n * `BottomSheet` and as selectable items when combined with `SelectInput`\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown>\n * <SelectInput label=\"Select Action\" />\n * <DropdownOverlay>\n * <DropdownHeader title=\"Header Title\" />\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * />\n * <ActionListItem\n * title=\"Pricing\"\n * value=\"pricing\"\n * leading={<ActionListItemAsset src=\"https://flagcdn.com/w20/in.png\" alt=\"India Flag\" />}\n * />\n * </ActionList>\n * <DropdownFooter><Button>Apply</Button></DropdownFooter>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n */\nconst ActionList = assignWithoutSideEffects(React.memo(_ActionList), {\n displayName: componentIds.ActionList,\n componentId: componentIds.ActionList,\n});\n\nexport type { ActionListProps };\nexport { ActionList };\n"],"names":["_ActionList","_ref","children","testID","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","setOptions","actionListItemRef","selectionType","dropdownBaseId","dropdownTriggerer","hasFooterAction","filteredValues","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_React$useMemo","React","useMemo","getActionListProperties","sectionData","childrenWithId","actionListOptions","console","log","useEffect","length","dropdownComponentIds","triggers","AutoComplete","_jsx","ActionListNoResults","actionListContainerRole","getActionListContainerRole","actionListItemWrapperRole","getActionListItemWrapperRole","isMultiSelectable","ActionListBox","_objectSpread","ref","makeAnalyticsAttribute","BaseBox","id","concat","makeAccessible","role","multiSelectable","undefined","labelledBy","metaAttribute","name","MetaConstants","ActionList","assignWithoutSideEffects","memo","displayName","componentIds","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAMA,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAA2E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I,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAF,QAAA,eAEhC+B,GAAA,CAACO,aAAa,EAAA;AACZtB,MAAAA,eAAe,EAAEA,eAAgB;AACjCmB,MAAAA,yBAAyB,EAAEA,yBAA0B;AACrDb,MAAAA,cAAc,EAAEA,cAAe;AAC/BD,MAAAA,WAAW,EAAEA,WAAY;AACzBgB,MAAAA,iBAAiB,EAAEA,iBAAkB;AACrCG,MAAAA,GAAG,EAAEhC,iBAAAA;KACN,CAAA;AAAC,GAAA,CACK,CACV,CAAA;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACM6C,IAAAA,UAAU,gBAAGC,wBAAwB,eAACpC,cAAK,CAACqC,IAAI,CAACzD,WAAW,CAAC,EAAE;EACnE0D,WAAW,EAAEC,YAAY,CAACJ,UAAU;EACpCK,WAAW,EAAED,YAAY,CAACJ,UAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
|
-
import { Fragment, useState } from 'react';
|
|
4
|
+
import { Fragment, useState, forwardRef } from 'react';
|
|
5
5
|
import { StyledAlert } from './StyledAlert.js';
|
|
6
6
|
import '../Icons/index.js';
|
|
7
7
|
import '../../utils/index.js';
|
|
@@ -50,7 +50,7 @@ var intentIconMap = {
|
|
|
50
50
|
neutral: InfoIcon,
|
|
51
51
|
notice: AlertTriangleIcon
|
|
52
52
|
};
|
|
53
|
-
var
|
|
53
|
+
var _Alert = function _Alert(_ref, ref) {
|
|
54
54
|
var description = _ref.description,
|
|
55
55
|
title = _ref.title,
|
|
56
56
|
_ref$isDismissible = _ref.isDismissible,
|
|
@@ -204,7 +204,9 @@ var Alert = function Alert(_ref) {
|
|
|
204
204
|
if (!isVisible) {
|
|
205
205
|
return null;
|
|
206
206
|
}
|
|
207
|
-
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
207
|
+
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
208
|
+
ref: ref
|
|
209
|
+
}, a11yProps), metaAttribute({
|
|
208
210
|
name: MetaConstants.Alert,
|
|
209
211
|
testID: testID
|
|
210
212
|
})), getStyledProps(rest)), makeAnalyticsAttribute(rest)), {}, {
|
|
@@ -223,6 +225,7 @@ var Alert = function Alert(_ref) {
|
|
|
223
225
|
})
|
|
224
226
|
}));
|
|
225
227
|
};
|
|
228
|
+
var Alert = /*#__PURE__*/forwardRef(_Alert);
|
|
226
229
|
|
|
227
230
|
export { Alert };
|
|
228
231
|
//# sourceMappingURL=Alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../../../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import type { ReactChild, ReactElement } from 'react';\nimport { Fragment, useState } from 'react';\n\nimport { StyledAlert } from './StyledAlert';\nimport type { IconComponent } from '~components/Icons';\nimport {\n AlertOctagonIcon,\n AlertTriangleIcon,\n CheckCircleIcon,\n CloseIcon,\n InfoIcon,\n} from '~components/Icons';\nimport { castNativeType, castWebType, useBreakpoint, getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { IconButton } from '~components/Button/IconButton';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport BaseButton from '~components/Button/BaseButton';\nimport { BaseLink } from '~components/Link/BaseLink';\nimport type { FeedbackColors, SubtleOrIntense } from '~tokens/theme/theme';\nimport { useTheme } from '~components/BladeProvider';\nimport type { DataAnalyticsAttribute, DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype PrimaryAction = {\n text: string;\n onClick: () => void;\n};\n\ntype SecondaryActionButton = {\n text: string;\n onClick: () => void;\n};\n\ntype SecondaryActionLinkButton = {\n text: string;\n href: string;\n onClick?: () => void;\n target?: string;\n /**\n * When `target` is set to `_blank` this is automatically set to `noopener noreferrer`\n */\n rel?: string;\n};\n\ntype SecondaryAction = SecondaryActionButton | SecondaryActionLinkButton;\n\ntype AlertProps = {\n /**\n * Body content, pass text or JSX. Avoid passing components except `Link` to customize the content.\n */\n description: ReactChild;\n\n /**\n * A brief heading\n */\n title?: string;\n\n /**\n * Shows a dismiss button\n *\n * @default true\n */\n isDismissible?: boolean;\n\n /**\n * A callback when the dismiss button is clicked\n */\n onDismiss?: () => void;\n\n /**\n * Can be used to render custom icon\n */\n icon?: IconComponent;\n\n /**\n * Can be set to `high` for a more prominent look. Not to be confused with a11y emphasis.\n *\n * @default subtle\n */\n emphasis?: SubtleOrIntense;\n\n /**\n * Makes the Alert span the entire container width, instead of the default max width of `584px`.\n * This also makes the alert borderless, useful for creating full bleed layouts.\n *\n * @default false\n */\n isFullWidth?: boolean;\n\n /**\n * Sets the color tone\n */\n color?: FeedbackColors;\n\n /**\n * Renders a primary action button and a secondary action link button\n */\n actions?: {\n /**\n * Renders a button (should **always** be present if `secondary` action is being used)\n */\n primary?: PrimaryAction;\n /**\n * Renders a Link button\n */\n secondary?: SecondaryAction;\n };\n} & TestID &\n StyledPropsBlade &\n DataAnalyticsAttribute;\n\nconst isReactNative = getPlatformType() === 'react-native';\n\n// Need extra wrappers on React Native only for alignment\nconst CloseButtonWrapper = isReactNative ? BaseBox : Fragment;\n\nconst intentIconMap = {\n positive: CheckCircleIcon,\n negative: AlertOctagonIcon,\n information: InfoIcon,\n neutral: InfoIcon,\n notice: AlertTriangleIcon,\n};\n\nconst Alert = ({\n description,\n title,\n isDismissible = true,\n onDismiss,\n emphasis = 'subtle',\n isFullWidth = false,\n color = 'neutral',\n actions,\n testID,\n icon,\n ...rest\n}: AlertProps): ReactElement | null => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const [isVisible, setIsVisible] = useState(true);\n\n const isDesktop = matchedDeviceType === 'desktop';\n const isMobile = !isDesktop;\n\n const Icon = icon ?? intentIconMap[color];\n let iconOffset: DotNotationSpacingStringToken = 'spacing.1';\n\n // certain special cases below needs special care for near perfect alignment\n if (isReactNative) {\n if (isFullWidth && !title) {\n iconOffset = 'spacing.1';\n } else if (!isFullWidth && !title) {\n iconOffset = 'spacing.0';\n } else if (!isFullWidth && title) {\n iconOffset = 'spacing.2';\n }\n } else if (isMobile) {\n if (!isFullWidth && title) {\n iconOffset = 'spacing.2';\n } else if (isFullWidth && !title) {\n iconOffset = 'spacing.2';\n }\n } else if (isFullWidth) {\n iconOffset = 'spacing.1';\n }\n\n const shouldCenterAlign = isFullWidth && !title;\n let alignment: 'center' | 'flex-start' = 'flex-start';\n if (!isFullWidth) alignment = 'flex-start';\n if (shouldCenterAlign) alignment = 'center';\n\n const leadingIcon = (\n <BaseBox display=\"flex\" alignSelf={alignment} marginTop={iconOffset}>\n <Icon\n color={\n emphasis === 'intense'\n ? 'surface.icon.staticWhite.normal'\n : `feedback.icon.${color}.${emphasis === 'subtle' ? 'intense' : 'subtle'}`\n }\n size=\"medium\"\n />\n </BaseBox>\n );\n\n const textColor =\n emphasis === 'intense' ? 'surface.text.staticWhite.normal' : 'surface.text.gray.subtle';\n const _title = title ? (\n <BaseBox marginBottom=\"spacing.2\">\n <Text color={textColor} size=\"medium\" weight=\"semibold\">\n {title}\n </Text>\n </BaseBox>\n ) : null;\n\n const _description = (\n <BaseBox marginTop={title || isReactNative ? 'spacing.0' : 'spacing.1'}>\n <Text color={textColor} size=\"small\">\n {description}\n </Text>\n </BaseBox>\n );\n\n const primaryAction = actions?.primary ? (\n <BaseBox\n marginRight=\"spacing.5\"\n display={isReactNative ? castNativeType('flex') : castWebType('inline-flex')}\n >\n <BaseButton\n size=\"small\"\n onClick={actions.primary.onClick}\n color={emphasis === 'intense' ? 'white' : color}\n variant=\"secondary\"\n >\n {actions.primary.text}\n </BaseButton>\n </BaseBox>\n ) : null;\n\n const secondaryActionParams: Partial<SecondaryActionLinkButton> | null = actions?.secondary\n ? {\n onClick: actions.secondary.onClick,\n }\n : null;\n\n /**\n * TS assumes only common properties to be present for `SecondaryAction` union type\n * We add a type guard that checks if href is present on secondary action:\n * - If yes, then TS can assume it to be `SecondaryActionLinkButton` (href being a required property)\n * - If no, then it would be `SecondaryActionButton` (and link properties wouldn't be needed)\n */\n if (actions?.secondary && secondaryActionParams && 'href' in actions.secondary) {\n secondaryActionParams.href = actions.secondary.href;\n secondaryActionParams.target = actions.secondary.target;\n secondaryActionParams.rel = actions.secondary.rel;\n }\n\n const secondaryAction = actions?.secondary ? (\n <BaseBox marginRight=\"spacing.4\" display={(isReactNative ? 'flex' : 'inline-flex') as never}>\n <BaseLink\n size=\"small\"\n color={emphasis === 'intense' ? 'white' : color}\n {...secondaryActionParams}\n >\n {actions.secondary.text}\n </BaseLink>\n </BaseBox>\n ) : null;\n\n // For certain cases we wish to render actions inline with text content\n const showActionsHorizontal = isFullWidth && isDesktop;\n\n const actionsHorizontal =\n showActionsHorizontal && (primaryAction || secondaryAction) ? (\n <BaseBox flexDirection=\"row\" alignItems=\"center\">\n {primaryAction}\n {secondaryAction}\n </BaseBox>\n ) : null;\n\n const actionsVertical =\n !showActionsHorizontal && (primaryAction || secondaryAction) ? (\n <BaseBox marginTop=\"spacing.4\" flexDirection=\"row\" alignItems=\"center\">\n {primaryAction}\n {secondaryAction}\n </BaseBox>\n ) : null;\n\n const onClickDismiss = (): void => {\n if (onDismiss) {\n onDismiss();\n }\n setIsVisible(false);\n };\n const closeButton = isDismissible ? (\n <CloseButtonWrapper>\n <IconButton\n accessibilityLabel=\"Dismiss alert\"\n onClick={onClickDismiss}\n emphasis={emphasis === 'intense' ? 'subtle' : 'intense'}\n size=\"large\"\n icon={CloseIcon}\n />\n </CloseButtonWrapper>\n ) : null;\n\n const a11yProps = makeAccessible({\n // React Native doesn't has status as role\n role: isReactNative || color === 'negative' || color === 'notice' ? 'alert' : 'status',\n // override the implicit live region of role `alert`\n ...(color === 'notice' && { liveRegion: 'polite' }),\n });\n\n if (!isVisible) {\n return null;\n }\n\n return (\n <BaseBox\n {...a11yProps}\n {...metaAttribute({ name: MetaConstants.Alert, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <StyledAlert\n color={color}\n emphasis={emphasis}\n isFullWidth={isFullWidth}\n isDesktop={isDesktop}\n textAlign={'left' as never}\n >\n {leadingIcon}\n <BaseBox\n flex={1}\n paddingLeft={isFullWidth ? 'spacing.4' : 'spacing.3'}\n paddingRight={showActionsHorizontal ? 'spacing.4' : 'spacing.2'}\n >\n {_title}\n {_description}\n {actionsVertical}\n </BaseBox>\n {actionsHorizontal}\n {closeButton}\n </StyledAlert>\n </BaseBox>\n );\n};\n\nexport type { AlertProps };\nexport { Alert };\n"],"names":["isReactNative","getPlatformType","CloseButtonWrapper","BaseBox","Fragment","intentIconMap","positive","CheckCircleIcon","negative","AlertOctagonIcon","information","InfoIcon","neutral","notice","AlertTriangleIcon","Alert","_ref","description","title","_ref$isDismissible","isDismissible","onDismiss","_ref$emphasis","emphasis","_ref$isFullWidth","isFullWidth","_ref$color","color","actions","testID","icon","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","_useState","useState","_useState2","_slicedToArray","isVisible","setIsVisible","isDesktop","isMobile","Icon","iconOffset","shouldCenterAlign","alignment","leadingIcon","_jsx","display","alignSelf","marginTop","children","concat","size","textColor","_title","marginBottom","Text","weight","_description","primaryAction","primary","marginRight","castNativeType","castWebType","BaseButton","onClick","variant","text","secondaryActionParams","secondary","href","target","rel","secondaryAction","BaseLink","_objectSpread","showActionsHorizontal","actionsHorizontal","_jsxs","flexDirection","alignItems","actionsVertical","onClickDismiss","closeButton","IconButton","accessibilityLabel","CloseIcon","a11yProps","makeAccessible","role","liveRegion","metaAttribute","name","MetaConstants","getStyledProps","makeAnalyticsAttribute","StyledAlert","textAlign","flex","paddingLeft","paddingRight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmHA,IAAMA,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;;AAE1D;AACA,IAAMC,kBAAkB,GAAGF,aAAa,GAAGG,OAAO,GAAGC,QAAQ,CAAA;AAE7D,IAAMC,aAAa,GAAG;AACpBC,EAAAA,QAAQ,EAAEC,eAAe;AACzBC,EAAAA,QAAQ,EAAEC,gBAAgB;AAC1BC,EAAAA,WAAW,EAAEC,QAAQ;AACrBC,EAAAA,OAAO,EAAED,QAAQ;AACjBE,EAAAA,MAAM,EAAEC,iBAAAA;AACV,CAAC,CAAA;AAED,IAAMC,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EAY4B;AAAA,EAAA,IAXrCC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IACXC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAAC,kBAAA,GAAAH,IAAA,CACLI,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,kBAAA;IACpBE,SAAS,GAAAL,IAAA,CAATK,SAAS;IAAAC,aAAA,GAAAN,IAAA,CACTO,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,aAAA;IAAAE,gBAAA,GAAAR,IAAA,CACnBS,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KA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;AAAA,OACT,CAAC,EACTJ,iBAAiB,EACjBM,WAAW,CAAA;KACD,CAAA;AAAC,GAAA,CACP,CAAC,CAAA;AAEd;;;;"}
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../../../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import type { ReactChild, ReactElement } from 'react';\nimport React, { Fragment, useState, forwardRef } from 'react';\n\nimport { StyledAlert } from './StyledAlert';\nimport type { IconComponent } from '~components/Icons';\nimport {\n AlertOctagonIcon,\n AlertTriangleIcon,\n CheckCircleIcon,\n CloseIcon,\n InfoIcon,\n} from '~components/Icons';\nimport { castNativeType, castWebType, useBreakpoint, getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { IconButton } from '~components/Button/IconButton';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport BaseButton from '~components/Button/BaseButton';\nimport { BaseLink } from '~components/Link/BaseLink';\nimport type { FeedbackColors, SubtleOrIntense } from '~tokens/theme/theme';\nimport { useTheme } from '~components/BladeProvider';\nimport type {\n DataAnalyticsAttribute,\n BladeElementRef,\n DotNotationSpacingStringToken,\n TestID,\n} from '~utils/types';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype PrimaryAction = {\n text: string;\n onClick: () => void;\n};\n\ntype SecondaryActionButton = {\n text: string;\n onClick: () => void;\n};\n\ntype SecondaryActionLinkButton = {\n text: string;\n href: string;\n onClick?: () => void;\n target?: string;\n /**\n * When `target` is set to `_blank` this is automatically set to `noopener noreferrer`\n */\n rel?: string;\n};\n\ntype SecondaryAction = SecondaryActionButton | SecondaryActionLinkButton;\n\ntype AlertProps = {\n /**\n * Body content, pass text or JSX. Avoid passing components except `Link` to customize the content.\n */\n description: ReactChild;\n\n /**\n * A brief heading\n */\n title?: string;\n\n /**\n * Shows a dismiss button\n *\n * @default true\n */\n isDismissible?: boolean;\n\n /**\n * A callback when the dismiss button is clicked\n */\n onDismiss?: () => void;\n\n /**\n * Can be used to render custom icon\n */\n icon?: IconComponent;\n\n /**\n * Can be set to `high` for a more prominent look. Not to be confused with a11y emphasis.\n *\n * @default subtle\n */\n emphasis?: SubtleOrIntense;\n\n /**\n * Makes the Alert span the entire container width, instead of the default max width of `584px`.\n * This also makes the alert borderless, useful for creating full bleed layouts.\n *\n * @default false\n */\n isFullWidth?: boolean;\n\n /**\n * Sets the color tone\n */\n color?: FeedbackColors;\n\n /**\n * Renders a primary action button and a secondary action link button\n */\n actions?: {\n /**\n * Renders a button (should **always** be present if `secondary` action is being used)\n */\n primary?: PrimaryAction;\n /**\n * Renders a Link button\n */\n secondary?: SecondaryAction;\n };\n} & TestID &\n StyledPropsBlade &\n DataAnalyticsAttribute;\n\nconst isReactNative = getPlatformType() === 'react-native';\n\n// Need extra wrappers on React Native only for alignment\nconst CloseButtonWrapper = isReactNative ? BaseBox : Fragment;\n\nconst intentIconMap = {\n positive: CheckCircleIcon,\n negative: AlertOctagonIcon,\n information: InfoIcon,\n neutral: InfoIcon,\n notice: AlertTriangleIcon,\n};\n\nconst _Alert = (\n {\n description,\n title,\n isDismissible = true,\n onDismiss,\n emphasis = 'subtle',\n isFullWidth = false,\n color = 'neutral',\n actions,\n testID,\n icon,\n ...rest\n }: AlertProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement | null => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const [isVisible, setIsVisible] = useState(true);\n\n const isDesktop = matchedDeviceType === 'desktop';\n const isMobile = !isDesktop;\n\n const Icon = icon ?? intentIconMap[color];\n let iconOffset: DotNotationSpacingStringToken = 'spacing.1';\n\n // certain special cases below needs special care for near perfect alignment\n if (isReactNative) {\n if (isFullWidth && !title) {\n iconOffset = 'spacing.1';\n } else if (!isFullWidth && !title) {\n iconOffset = 'spacing.0';\n } else if (!isFullWidth && title) {\n iconOffset = 'spacing.2';\n }\n } else if (isMobile) {\n if (!isFullWidth && title) {\n iconOffset = 'spacing.2';\n } else if (isFullWidth && !title) {\n iconOffset = 'spacing.2';\n }\n } else if (isFullWidth) {\n iconOffset = 'spacing.1';\n }\n\n const shouldCenterAlign = isFullWidth && !title;\n let alignment: 'center' | 'flex-start' = 'flex-start';\n if (!isFullWidth) alignment = 'flex-start';\n if (shouldCenterAlign) alignment = 'center';\n\n const leadingIcon = (\n <BaseBox display=\"flex\" alignSelf={alignment} marginTop={iconOffset}>\n <Icon\n color={\n emphasis === 'intense'\n ? 'surface.icon.staticWhite.normal'\n : `feedback.icon.${color}.${emphasis === 'subtle' ? 'intense' : 'subtle'}`\n }\n size=\"medium\"\n />\n </BaseBox>\n );\n\n const textColor =\n emphasis === 'intense' ? 'surface.text.staticWhite.normal' : 'surface.text.gray.subtle';\n const _title = title ? (\n <BaseBox marginBottom=\"spacing.2\">\n <Text color={textColor} size=\"medium\" weight=\"semibold\">\n {title}\n </Text>\n </BaseBox>\n ) : null;\n\n const _description = (\n <BaseBox marginTop={title || isReactNative ? 'spacing.0' : 'spacing.1'}>\n <Text color={textColor} size=\"small\">\n {description}\n </Text>\n </BaseBox>\n );\n\n const primaryAction = actions?.primary ? (\n <BaseBox\n marginRight=\"spacing.5\"\n display={isReactNative ? castNativeType('flex') : castWebType('inline-flex')}\n >\n <BaseButton\n size=\"small\"\n onClick={actions.primary.onClick}\n color={emphasis === 'intense' ? 'white' : color}\n variant=\"secondary\"\n >\n {actions.primary.text}\n </BaseButton>\n </BaseBox>\n ) : null;\n\n const secondaryActionParams: Partial<SecondaryActionLinkButton> | null = actions?.secondary\n ? {\n onClick: actions.secondary.onClick,\n }\n : null;\n\n /**\n * TS assumes only common properties to be present for `SecondaryAction` union type\n * We add a type guard that checks if href is present on secondary action:\n * - If yes, then TS can assume it to be `SecondaryActionLinkButton` (href being a required property)\n * - If no, then it would be `SecondaryActionButton` (and link properties wouldn't be needed)\n */\n if (actions?.secondary && secondaryActionParams && 'href' in actions.secondary) {\n secondaryActionParams.href = actions.secondary.href;\n secondaryActionParams.target = actions.secondary.target;\n secondaryActionParams.rel = actions.secondary.rel;\n }\n\n const secondaryAction = actions?.secondary ? (\n <BaseBox marginRight=\"spacing.4\" display={(isReactNative ? 'flex' : 'inline-flex') as never}>\n <BaseLink\n size=\"small\"\n color={emphasis === 'intense' ? 'white' : color}\n {...secondaryActionParams}\n >\n {actions.secondary.text}\n </BaseLink>\n </BaseBox>\n ) : null;\n\n // For certain cases we wish to render actions inline with text content\n const showActionsHorizontal = isFullWidth && isDesktop;\n\n const actionsHorizontal =\n showActionsHorizontal && (primaryAction || secondaryAction) ? (\n <BaseBox flexDirection=\"row\" alignItems=\"center\">\n {primaryAction}\n {secondaryAction}\n </BaseBox>\n ) : null;\n\n const actionsVertical =\n !showActionsHorizontal && (primaryAction || secondaryAction) ? (\n <BaseBox marginTop=\"spacing.4\" flexDirection=\"row\" alignItems=\"center\">\n {primaryAction}\n {secondaryAction}\n </BaseBox>\n ) : null;\n\n const onClickDismiss = (): void => {\n if (onDismiss) {\n onDismiss();\n }\n setIsVisible(false);\n };\n const closeButton = isDismissible ? (\n <CloseButtonWrapper>\n <IconButton\n accessibilityLabel=\"Dismiss alert\"\n onClick={onClickDismiss}\n emphasis={emphasis === 'intense' ? 'subtle' : 'intense'}\n size=\"large\"\n icon={CloseIcon}\n />\n </CloseButtonWrapper>\n ) : null;\n\n const a11yProps = makeAccessible({\n // React Native doesn't has status as role\n role: isReactNative || color === 'negative' || color === 'notice' ? 'alert' : 'status',\n // override the implicit live region of role `alert`\n ...(color === 'notice' && { liveRegion: 'polite' }),\n });\n\n if (!isVisible) {\n return null;\n }\n\n return (\n <BaseBox\n ref={ref as never}\n {...a11yProps}\n {...metaAttribute({ name: MetaConstants.Alert, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <StyledAlert\n color={color}\n emphasis={emphasis}\n isFullWidth={isFullWidth}\n isDesktop={isDesktop}\n textAlign={'left' as never}\n >\n {leadingIcon}\n <BaseBox\n flex={1}\n paddingLeft={isFullWidth ? 'spacing.4' : 'spacing.3'}\n paddingRight={showActionsHorizontal ? 'spacing.4' : 'spacing.2'}\n >\n {_title}\n {_description}\n {actionsVertical}\n </BaseBox>\n {actionsHorizontal}\n {closeButton}\n </StyledAlert>\n </BaseBox>\n );\n};\n\nconst Alert = forwardRef(_Alert);\n\nexport type { AlertProps };\nexport { Alert };\n"],"names":["isReactNative","getPlatformType","CloseButtonWrapper","BaseBox","Fragment","intentIconMap","positive","CheckCircleIcon","negative","AlertOctagonIcon","information","InfoIcon","neutral","notice","AlertTriangleIcon","_Alert","_ref","ref","description","title","_ref$isDismissible","isDismissible","onDismiss","_ref$emphasis","emphasis","_ref$isFullWidth","isFullWidth","_ref$color","color","actions","testID","icon","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","_useState","useState","_useState2","_slicedToArray","isVisible","setIsVisible","isDesktop","isMobile","Icon","iconOffset","shouldCenterAlign","alignment","leadingIcon","_jsx","display","alignSelf","marginTop","children","concat","size","textColor","_title","marginBottom","Text","weight","_description","primaryAction","primary","marginRight","castNativeType","castWebType","BaseButton","onClick","variant","text","secondaryActionParams","secondary","href","target","rel","secondaryAction","BaseLink","_objectSpread","showActionsHorizontal","actionsHorizontal","_jsxs","flexDirection","alignItems","actionsVertical","onClickDismiss","closeButton","IconButton","accessibilityLabel","CloseIcon","a11yProps","makeAccessible","role","liveRegion","metaAttribute","name","MetaConstants","Alert","getStyledProps","makeAnalyticsAttribute","StyledAlert","textAlign","flex","paddingLeft","paddingRight","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHA,IAAMA,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;;AAE1D;AACA,IAAMC,kBAA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