@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabNavItem.web.js","sources":["../../../../../../../src/components/TopNav/TabNav/TabNavItem.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable consistent-return */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TabNavItemProps } from './types';\nimport { useTabNavContext } from './TabNavContext';\nimport { MIXED_BG_COLOR } from './utils';\nimport BaseBox from '~components/Box/BaseBox';\nimport getTextStyles from '~components/Typography/Text/getTextStyles';\nimport { makeBorderSize, makeMotionTime, makeSize, makeSpace } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { size } from '~tokens/global';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\n\nconst StyledTabNavItem = styled.a<{ $isActive?: boolean }>(({ theme, $isActive }) => {\n return {\n ...getTextStyles({\n theme,\n size: 'medium',\n weight: 'medium',\n color: $isActive ? 'interactive.text.gray.normal' : 'interactive.text.gray.subtle',\n }),\n flex: 1,\n display: 'flex',\n gap: makeSpace(theme.spacing[2]),\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n textDecoration: 'none',\n whiteSpace: 'nowrap',\n paddingTop: makeSpace(theme.spacing[3]),\n paddingBottom: makeSpace(theme.spacing[3]),\n paddingLeft: makeSpace(theme.spacing[4]),\n paddingRight: makeSpace(theme.spacing[4]),\n borderRadius: makeBorderSize(theme.border.radius.medium),\n // reset button styles\n border: 'none',\n background: 'none',\n '&[aria-expanded=\"true\"]': $isActive\n ? {}\n : {\n backgroundColor: theme.colors.interactive.background.gray.default,\n },\n '&:hover': $isActive\n ? {}\n : {\n backgroundColor: theme.colors.interactive.background.gray.default,\n },\n };\n});\n\nconst StyledTabNavItemWrapper = styled(BaseBox)<{\n isActive?: boolean;\n}>(({ theme, isActive }) => {\n const dividerHiderStyle = {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n width: makeSize(size[1]),\n height: makeSize(size[16]),\n backgroundColor: MIXED_BG_COLOR,\n } as const;\n\n return {\n position: 'relative',\n flexShrink: 0,\n padding: `${makeSpace(theme.spacing[2])} ${makeSpace(theme.spacing[1])}`,\n backgroundColor: isActive ? theme.colors.surface.background.gray.intense : 'transparent',\n borderColor: isActive ? theme.colors.surface.border.gray.muted : 'transparent',\n borderStyle: 'solid',\n borderWidth: makeBorderSize(theme.border.width.thin),\n borderBottomWidth: 0,\n borderTopLeftRadius: makeBorderSize(theme.border.radius.medium),\n borderTopRightRadius: makeBorderSize(theme.border.radius.medium),\n transition: `${makeMotionTime(theme.motion.duration.moderate)} ${\n theme.motion.easing.standard.effective\n }`,\n transitionProperty: 'background',\n\n // Hide the left and right divider by overlaying them with a pseudo element as same color as the background\n ...(isActive\n ? {\n ':before, :after': dividerHiderStyle,\n ':before': {\n left: -2,\n },\n ':after': {\n right: -2,\n },\n }\n : {}),\n };\n});\n\nconst SelectedBar = styled(BaseBox)<{ isActive?: boolean }>(({ theme, isActive }) => {\n return {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n height: makeSpace(theme.spacing[1]),\n borderTopLeftRadius: makeBorderSize(theme.border.radius.medium),\n borderTopRightRadius: makeBorderSize(theme.border.radius.medium),\n backgroundColor: theme.colors.interactive.icon.gray.normal,\n pointerEvents: 'none',\n // Animation\n opacity: isActive ? 1 : 0,\n transition: `${makeMotionTime(theme.motion.duration.moderate)} ${\n theme.motion.easing.standard.effective\n }`,\n transitionProperty: 'opacity',\n };\n});\n\nconst _TabNavItem: React.ForwardRefRenderFunction<HTMLAnchorElement, TabNavItemProps> = (\n {\n as,\n title,\n isActive,\n icon: Icon,\n trailing,\n accessibilityLabel,\n href,\n target,\n // @ts-expect-error - This prop is only used internally\n __isInsideTabNavItems,\n // @ts-expect-error - This prop is only used internally\n __index,\n ...props\n },\n ref,\n): React.ReactElement => {\n const { setControlledItems } = useTabNavContext();\n const bodyRef = React.useRef<HTMLDivElement>(null);\n\n // Update the controlledItems with the tabWidth and offsetX\n useIsomorphicLayoutEffect(() => {\n if (!bodyRef.current) return;\n if (!__isInsideTabNavItems) return;\n setControlledItems((prev) => {\n return prev.map((item, index) => {\n if (index !== __index) return item;\n const bounds = bodyRef?.current?.getBoundingClientRect()!;\n const tabWidth = bounds.width;\n const offsetX = bounds.right;\n return {\n ...item,\n tabWidth,\n offsetX,\n };\n });\n });\n }, [__isInsideTabNavItems, __index, setControlledItems]);\n\n return (\n <StyledTabNavItemWrapper\n ref={bodyRef}\n isActive={isActive}\n {...metaAttribute({ name: MetaConstants.TabNavItem })}\n >\n <SelectedBar isActive={isActive} />\n <StyledTabNavItem\n ref={ref}\n as={as ?? (href ? 'a' : 'button')}\n to={href}\n href={as ? undefined : href}\n target={target}\n $isActive={isActive}\n {...props}\n {...makeAccessible({ label: accessibilityLabel, current: isActive })}\n >\n {Icon ? (\n <Icon\n size=\"large\"\n color={isActive ? 'interactive.icon.gray.normal' : 'surface.icon.gray.subtle'}\n />\n ) : null}\n {title}\n {trailing ? trailing : null}\n </StyledTabNavItem>\n </StyledTabNavItemWrapper>\n );\n};\n\nconst TabNavItem = assignWithoutSideEffects(React.forwardRef(_TabNavItem), {\n displayName: 'TabNavItem',\n});\n\nexport { TabNavItem };\n"],"names":["StyledTabNavItem","styled","a","withConfig","displayName","componentId","_ref","theme","$isActive","_objectSpread","getTextStyles","size","weight","color","flex","display","gap","makeSpace","spacing","alignItems","justifyContent","height","textDecoration","whiteSpace","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","makeBorderSize","border","radius","medium","background","backgroundColor","colors","interactive","gray","StyledTabNavItemWrapper","BaseBox","_ref2","isActive","dividerHiderStyle","content","position","top","transform","width","makeSize","MIXED_BG_COLOR","flexShrink","padding","concat","surface","intense","borderColor","muted","borderStyle","borderWidth","thin","borderBottomWidth","borderTopLeftRadius","borderTopRightRadius","transition","makeMotionTime","motion","duration","moderate","easing","standard","effective","transitionProperty","left","right","SelectedBar","_ref3","icon","normal","pointerEvents","opacity","_TabNavItem","_ref4","ref","as","title","Icon","trailing","accessibilityLabel","href","target","__isInsideTabNavItems","__index","props","_objectWithoutProperties","_excluded","_useTabNavContext","useTabNavContext","setControlledItems","bodyRef","React","useRef","useIsomorphicLayoutEffect","current","prev","map","item","index","_bodyRef$current","bounds","getBoundingClientRect","tabWidth","offsetX","_jsxs","metaAttribute","name","MetaConstants","TabNavItem","children","_jsx","to","undefined","makeAccessible","label","assignWithoutSideEffects","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAMA,gBAAgB,gBAAGC,MAAM,CAACC,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,iCAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAA0B,CAAA,CAAA,UAAAC,IAAA,EAA0B;AAAA,EAAA,IAAvBC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS,CAAA;AAC5E,EAAA,OAAAC,aAAA,CAAAA,aAAA,CAAA,EAAA,EACKC,aAAa,CAAC;AACfH,IAAAA,KAAK,EAALA,KAAK;AACLI,IAAAA,IAAI,EAAE,QAAQ;AACdC,IAAAA,MAAM,EAAE,QAAQ;AAChBC,IAAAA,KAAK,EAAEL,SAAS,GAAG,8BAA8B,GAAG,8BAAA;AACtD,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFM,IAAAA,IAAI,EAAE,CAAC;AACPC,IAAAA,OAAO,EAAE,MAAM;IACfC,GAAG,EAAEC,SAAS,CAACV,KAAK,CAACW,OAAO,CAAC,CAAC,CAAC,CAAC;AAChCC,IAAAA,UAAU,EAAE,QAAQ;AACpBC,IAAAA,cAAc,EAAE,QAAQ;AACxBC,IAAAA,MAAM,EAAE,MAAM;AACdC,IAAAA,cAAc,EAAE,MAAM;AACtBC,IAAAA,UAAU,EAAE,QAAQ;IACpBC,UAAU,EAAEP,SAAS,CAACV,KAAK,CAACW,OAAO,CAAC,CAAC,CAAC,CAAC;IACvCO,aAAa,EAAER,SAAS,CAACV,KAAK,CAACW,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1CQ,WAAW,EAAET,SAAS,CAACV,KAAK,CAACW,OAAO,CAAC,CAAC,CAAC,CAAC;IACxCS,YAAY,EAAEV,SAAS,CAACV,KAAK,CAAC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C,MAAAA,MAAM,EAAEA,MAAO;AACfjF,MAAAA,SAAS,EAAEiC,QAAAA;KACPmD,EAAAA,KAAK,CACL6B,EAAAA,cAAc,CAAC;AAAEC,MAAAA,KAAK,EAAEnC,kBAAkB;AAAEe,MAAAA,OAAO,EAAE7D,QAAAA;AAAS,KAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAA4E,MAAAA,QAAA,EAEnEhC,CAAAA,IAAI,gBACHiC,GAAA,CAACjC,IAAI,EAAA;AACH1E,QAAAA,IAAI,EAAC,OAAO;AACZE,QAAAA,KAAK,EAAE4B,QAAQ,GAAG,8BAA8B,GAAG,0BAAA;OACpD,CAAC,GACA,IAAI,EACP2C,KAAK,EACLE,QAAQ,GAAGA,QAAQ,GAAG,IAAI,CAAA;AAAA,KAAA,CACX,CAAC,CAAA;AAAA,GAAA,CACI,CAAC,CAAA;AAE9B,CAAC,CAAA;AAEK8B,IAAAA,UAAU,gBAAGO,wBAAwB,eAACxB,cAAK,CAACyB,UAAU,CAAC5C,WAAW,CAAC,EAAE;AACzE5E,EAAAA,WAAW,EAAE,YAAA;AACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TabNavItem.web.js","sources":["../../../../../../../src/components/TopNav/TabNav/TabNavItem.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable consistent-return */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TabNavItemProps } from './types';\nimport { useTabNavContext } from './TabNavContext';\nimport { MIXED_BG_COLOR } from './utils';\nimport BaseBox from '~components/Box/BaseBox';\nimport getTextStyles from '~components/Typography/Text/getTextStyles';\nimport { makeBorderSize, makeMotionTime, makeSize, makeSpace } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { size } from '~tokens/global';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useIsomorphicLayoutEffect } from '~utils/useIsomorphicLayoutEffect';\n\nconst StyledTabNavItem = styled.a<{ $isActive?: boolean }>(({ theme, $isActive }) => {\n return {\n ...getTextStyles({\n theme,\n size: 'medium',\n weight: 'medium',\n color: $isActive ? 'interactive.text.gray.normal' : 'interactive.text.gray.subtle',\n }),\n flex: 1,\n display: 'flex',\n gap: makeSpace(theme.spacing[2]),\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n textDecoration: 'none',\n whiteSpace: 'nowrap',\n paddingTop: makeSpace(theme.spacing[3]),\n paddingBottom: makeSpace(theme.spacing[3]),\n paddingLeft: makeSpace(theme.spacing[4]),\n paddingRight: makeSpace(theme.spacing[4]),\n borderRadius: makeBorderSize(theme.border.radius.medium),\n // reset button styles\n border: 'none',\n background: 'none',\n '&[aria-expanded=\"true\"]': $isActive\n ? {}\n : {\n backgroundColor: theme.colors.interactive.background.gray.default,\n },\n '&:hover': $isActive\n ? {}\n : {\n backgroundColor: theme.colors.interactive.background.gray.default,\n },\n };\n});\n\nconst StyledTabNavItemWrapper = styled(BaseBox)<{\n isActive?: boolean;\n}>(({ theme, isActive }) => {\n const dividerHiderStyle = {\n content: '\"\"',\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n width: makeSize(size[1]),\n height: makeSize(size[16]),\n backgroundColor: MIXED_BG_COLOR,\n } as const;\n\n return {\n position: 'relative',\n flexShrink: 0,\n padding: `${makeSpace(theme.spacing[2])} ${makeSpace(theme.spacing[1])}`,\n backgroundColor: isActive ? theme.colors.surface.background.gray.intense : 'transparent',\n borderColor: isActive ? theme.colors.surface.border.gray.muted : 'transparent',\n borderStyle: 'solid',\n borderWidth: makeBorderSize(theme.border.width.thin),\n borderBottomWidth: 0,\n borderTopLeftRadius: makeBorderSize(theme.border.radius.medium),\n borderTopRightRadius: makeBorderSize(theme.border.radius.medium),\n transition: `${makeMotionTime(theme.motion.duration.moderate)} ${theme.motion.easing.standard}`,\n transitionProperty: 'background',\n\n // Hide the left and right divider by overlaying them with a pseudo element as same color as the background\n ...(isActive\n ? {\n ':before, :after': dividerHiderStyle,\n ':before': {\n left: -2,\n },\n ':after': {\n right: -2,\n },\n }\n : {}),\n };\n});\n\nconst SelectedBar = styled(BaseBox)<{ isActive?: boolean }>(({ theme, isActive }) => {\n return {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n height: makeSpace(theme.spacing[1]),\n borderTopLeftRadius: makeBorderSize(theme.border.radius.medium),\n borderTopRightRadius: makeBorderSize(theme.border.radius.medium),\n backgroundColor: theme.colors.interactive.icon.gray.normal,\n pointerEvents: 'none',\n // Animation\n opacity: isActive ? 1 : 0,\n transition: `${makeMotionTime(theme.motion.duration.moderate)} ${theme.motion.easing.standard}`,\n transitionProperty: 'opacity',\n };\n});\n\nconst _TabNavItem: React.ForwardRefRenderFunction<HTMLAnchorElement, TabNavItemProps> = (\n {\n as,\n title,\n isActive,\n icon: Icon,\n trailing,\n accessibilityLabel,\n href,\n target,\n // @ts-expect-error - This prop is only used internally\n __isInsideTabNavItems,\n // @ts-expect-error - This prop is only used internally\n __index,\n ...props\n },\n ref,\n): React.ReactElement => {\n const { setControlledItems } = useTabNavContext();\n const bodyRef = React.useRef<HTMLDivElement>(null);\n\n // Update the controlledItems with the tabWidth and offsetX\n useIsomorphicLayoutEffect(() => {\n if (!bodyRef.current) return;\n if (!__isInsideTabNavItems) return;\n setControlledItems((prev) => {\n return prev.map((item, index) => {\n if (index !== __index) return item;\n const bounds = bodyRef?.current?.getBoundingClientRect()!;\n const tabWidth = bounds.width;\n const offsetX = bounds.right;\n return {\n ...item,\n tabWidth,\n offsetX,\n };\n });\n });\n }, [__isInsideTabNavItems, __index, setControlledItems]);\n\n return (\n <StyledTabNavItemWrapper\n ref={bodyRef}\n isActive={isActive}\n {...metaAttribute({ name: MetaConstants.TabNavItem })}\n >\n <SelectedBar isActive={isActive} />\n <StyledTabNavItem\n ref={ref}\n as={as ?? (href ? 'a' : 'button')}\n to={href}\n href={as ? undefined : href}\n target={target}\n $isActive={isActive}\n {...props}\n {...makeAccessible({ label: accessibilityLabel, current: isActive })}\n >\n {Icon ? (\n <Icon\n size=\"large\"\n color={isActive ? 'interactive.icon.gray.normal' : 'surface.icon.gray.subtle'}\n />\n ) : null}\n {title}\n {trailing ? trailing : null}\n </StyledTabNavItem>\n </StyledTabNavItemWrapper>\n );\n};\n\nconst TabNavItem = assignWithoutSideEffects(React.forwardRef(_TabNavItem), {\n displayName: 'TabNavItem',\n});\n\nexport { TabNavItem };\n"],"names":["StyledTabNavItem","styled","a","withConfig","displayName","componentId","_ref","theme","$isActive","_objectSpread","getTextStyles","size","weight","color","flex","display","gap","makeSpace","spacing","alignItems","justifyContent","height","textDecoration","whiteSpace","paddingTop","paddingBottom","paddingLeft","paddingRight","borderRadius","makeBorderSize","border","radius","medium","background","backgroundColor","colors","interactive","gray","StyledTabNavItemWrapper","BaseBox","_ref2","isActive","dividerHiderStyle","content","position","top","transform","width","makeSize","MIXED_BG_COLOR","flexShrink","padding","concat","surface","intense","borderColor","muted","borderStyle","borderWidth","thin","borderBottomWidth","borderTopLeftRadius","borderTopRightRadius","transition","makeMotionTime","motion","duration","moderate","easing","standard","transitionProperty","left","right","SelectedBar","_ref3","icon","normal","pointerEvents","opacity","_TabNavItem","_ref4","ref","as","title","Icon","trailing","accessibilityLabel","href","target","__isInsideTabNavItems","__index","props","_objectWithoutProperties","_excluded","_useTabNavContext","useTabNavContext","setControlledItems","bodyRef","React","useRef","useIsomorphicLayoutEffect","current","prev","map","item","index","_bodyRef$current","bounds","getBoundingClientRect","tabWidth","offsetX","_jsxs","metaAttribute","name","MetaConstants","TabNavItem","children","_jsx","to","undefined","makeAccessible","label","assignWithoutSideEffects","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,IAAMA,gBAAgB,gBAAGC,MAAM,CAACC,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,iCAAA;EAAAC,W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IAAI,gBACHiC,GAAA,CAACjC,IAAI,EAAA;AACHzE,QAAAA,IAAI,EAAC,OAAO;AACZE,QAAAA,KAAK,EAAE4B,QAAQ,GAAG,8BAA8B,GAAG,0BAAA;OACpD,CAAC,GACA,IAAI,EACP0C,KAAK,EACLE,QAAQ,GAAGA,QAAQ,GAAG,IAAI,CAAA;AAAA,KAAA,CACX,CAAC,CAAA;AAAA,GAAA,CACI,CAAC,CAAA;AAE9B,CAAC,CAAA;AAEK8B,IAAAA,UAAU,gBAAGO,wBAAwB,eAACxB,cAAK,CAACyB,UAAU,CAAC5C,WAAW,CAAC,EAAE;AACzE3E,EAAAA,WAAW,EAAE,YAAA;AACf,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import 'react';
|
|
3
|
+
import React__default from 'react';
|
|
4
4
|
import '../Box/index.js';
|
|
5
5
|
import '../Box/BaseBox/index.js';
|
|
6
6
|
import { SIDE_NAV_EXPANDED_L1_WIDTH_BASE, SIDE_NAV_EXPANDED_L1_WIDTH_XL } from '../SideNav/tokens.js';
|
|
@@ -23,10 +23,11 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
23
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
24
|
var TOP_NAV_HEIGHT = size[56];
|
|
25
25
|
var CONTENT_RIGHT_GAP = size[80];
|
|
26
|
-
var
|
|
26
|
+
var _TopNav = function _TopNav(_ref, ref) {
|
|
27
27
|
var children = _ref.children,
|
|
28
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
29
|
return /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
30
|
+
ref: ref,
|
|
30
31
|
display: "grid",
|
|
31
32
|
gridTemplateColumns: "auto minmax(0, 1fr) auto",
|
|
32
33
|
alignItems: "center",
|
|
@@ -50,6 +51,7 @@ var TopNav = function TopNav(_ref) {
|
|
|
50
51
|
children: children
|
|
51
52
|
}));
|
|
52
53
|
};
|
|
54
|
+
var TopNav = /*#__PURE__*/React__default.forwardRef(_TopNav);
|
|
53
55
|
var TopNavBrand = function TopNavBrand(_ref2) {
|
|
54
56
|
var children = _ref2.children;
|
|
55
57
|
return /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopNav.web.js","sources":["../../../../../../src/components/TopNav/TopNav.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { BoxProps } from '~components/Box';\nimport { Box } from '~components/Box';\nimport BaseBox from '~components/Box/BaseBox';\nimport {\n SIDE_NAV_EXPANDED_L1_WIDTH_XL,\n SIDE_NAV_EXPANDED_L1_WIDTH_BASE,\n} from '~components/SideNav/tokens';\nimport { size } from '~tokens/global';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst TOP_NAV_HEIGHT = size[56];\nconst CONTENT_RIGHT_GAP = size[80];\n\ntype TopNavProps = {\n children: React.ReactNode;\n} & Pick<\n BoxProps,\n | 'padding'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingX'\n | 'paddingY'\n | 'backgroundColor'\n | 'position'\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'width'\n | 'zIndex'\n | keyof DataAnalyticsAttribute\n> &\n TestID &\n StyledPropsBlade;\n\nconst
|
|
1
|
+
{"version":3,"file":"TopNav.web.js","sources":["../../../../../../src/components/TopNav/TopNav.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { BoxProps } from '~components/Box';\nimport { Box } from '~components/Box';\nimport BaseBox from '~components/Box/BaseBox';\nimport {\n SIDE_NAV_EXPANDED_L1_WIDTH_XL,\n SIDE_NAV_EXPANDED_L1_WIDTH_BASE,\n} from '~components/SideNav/tokens';\nimport { size } from '~tokens/global';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport type { DataAnalyticsAttribute, BladeElementRef, TestID } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst TOP_NAV_HEIGHT = size[56];\nconst CONTENT_RIGHT_GAP = size[80];\n\ntype TopNavProps = {\n children: React.ReactNode;\n} & Pick<\n BoxProps,\n | 'padding'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingX'\n | 'paddingY'\n | 'backgroundColor'\n | 'position'\n | 'top'\n | 'bottom'\n | 'left'\n | 'right'\n | 'width'\n | 'zIndex'\n | keyof DataAnalyticsAttribute\n> &\n TestID &\n StyledPropsBlade;\n\nconst _TopNav = (\n { children, ...rest }: TopNavProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n return (\n <Box\n ref={ref as never}\n display=\"grid\"\n gridTemplateColumns=\"auto minmax(0, 1fr) auto\"\n alignItems=\"center\"\n position=\"sticky\"\n top=\"0px\"\n width=\"100%\"\n paddingY={{ base: 'spacing.3', m: 'spacing.0' }}\n paddingX={{ base: 'spacing.4', m: 'spacing.3' }}\n height={makeSize(TOP_NAV_HEIGHT)}\n zIndex={componentZIndices.topnav}\n {...rest}\n {...metaAttribute({ name: MetaConstants.TopNav, testID: rest.testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n {children}\n </Box>\n );\n};\n\nconst TopNav = React.forwardRef(_TopNav);\n\nconst TopNavBrand = ({ children }: { children: React.ReactNode }): React.ReactElement => {\n return (\n <Box\n flexDirection=\"row\"\n marginTop=\"spacing.4\"\n width={{\n base: makeSize(SIDE_NAV_EXPANDED_L1_WIDTH_BASE),\n xl: makeSize(SIDE_NAV_EXPANDED_L1_WIDTH_XL),\n }}\n {...metaAttribute({ name: MetaConstants.TopNavBrand })}\n >\n <BaseBox width=\"100%\" textAlign=\"center\">\n {children}\n </BaseBox>\n </Box>\n );\n};\n\nconst TopNavContent = ({ children }: { children: React.ReactNode }): React.ReactElement => {\n return (\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n alignSelf=\"end\"\n paddingRight={{ base: 'spacing.0', m: makeSize(CONTENT_RIGHT_GAP) }}\n {...metaAttribute({ name: MetaConstants.TopNavContent })}\n >\n {children}\n </BaseBox>\n );\n};\n\nconst TopNavActions = ({ children }: { children: React.ReactNode }): React.ReactElement => {\n return (\n <BaseBox\n alignSelf=\"end\"\n display=\"flex\"\n gap=\"spacing.3\"\n alignItems=\"center\"\n marginTop=\"spacing.1\"\n padding=\"spacing.3\"\n backgroundColor=\"surface.background.gray.intense\"\n borderTopLeftRadius=\"medium\"\n borderTopRightRadius=\"medium\"\n {...metaAttribute({ name: MetaConstants.TopNavActions })}\n >\n {children}\n </BaseBox>\n );\n};\n\nexport { TopNav, TopNavBrand, TopNavContent, TopNavActions };\nexport type { TopNavProps };\n"],"names":["TOP_NAV_HEIGHT","size","CONTENT_RIGHT_GAP","_TopNav","_ref","ref","children","rest","_objectWithoutProperties","_excluded","_jsx","Box","_objectSpread","display","gridTemplateColumns","alignItems","position","top","width","paddingY","base","m","paddingX","height","makeSize","zIndex","componentZIndices","topnav","metaAttribute","name","MetaConstants","TopNav","testID","makeAnalyticsAttribute","React","forwardRef","TopNavBrand","_ref2","flexDirection","marginTop","SIDE_NAV_EXPANDED_L1_WIDTH_BASE","xl","SIDE_NAV_EXPANDED_L1_WIDTH_XL","BaseBox","textAlign","TopNavContent","_ref3","alignSelf","paddingRight","TopNavActions","_ref4","gap","padding","backgroundColor","borderTopLeftRadius","borderTopRightRadius"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAMA,cAAc,GAAGC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC/B,IAAMC,iBAAiB,GAAGD,IAAI,CAAC,EAAE,CAAC,CAAA;AA0BlC,IAAME,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAEXC,GAA+B,EACR;AAAA,EAAA,IAFrBC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;EAGnB,oBACEC,GAAA,CAACC,GAAG,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACFP,IAAAA,GAAG,EAAEA,GAAa;AAClBQ,IAAAA,OAAO,EAAC,MAAM;AACdC,IAAAA,mBAAmB,EAAC,0BAA0B;AAC9CC,IAAAA,UAAU,EAAC,QAAQ;AACnBC,IAAAA,QAAQ,EAAC,QAAQ;AACjBC,IAAAA,GAAG,EAAC,KAAK;AACTC,IAAAA,KAAK,EAAC,MAAM;AACZC,IAAAA,QAAQ,EAAE;AAAEC,MAAAA,IAAI,EAAE,WAAW;AAAEC,MAAAA,CAAC,EAAE,WAAA;KAAc;AAChDC,IAAAA,QAAQ,EAAE;AAAEF,MAAAA,IAAI,EAAE,WAAW;AAAEC,MAAAA,CAAC,EAAE,WAAA;KAAc;AAChDE,IAAAA,MAAM,EAAEC,QAAQ,CAACxB,cAAc,CAAE;IACjCyB,MAAM,EAAEC,iBAAiB,CAACC,MAAAA;GACtBpB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83
|
return 'surface.text.gray.normal';
|
|
84
84
|
};
|
|
85
|
-
|
|
86
|
-
* Code component can be used for displaying token, variable names, or inlined code snippets.
|
|
87
|
-
*
|
|
88
|
-
* ## Usage
|
|
89
|
-
*
|
|
90
|
-
* ### In Web
|
|
91
|
-
* In web, you can use it inside `Text` component or individually. The component is set to display `inline-block`
|
|
92
|
-
*
|
|
93
|
-
* ```tsx
|
|
94
|
-
* <Text>
|
|
95
|
-
* Lorem ipsum <Code>SENTRY_TOKEN</Code> normal text
|
|
96
|
-
* </Text>
|
|
97
|
-
* ```
|
|
98
|
-
*
|
|
99
|
-
* ### In React Native
|
|
100
|
-
*
|
|
101
|
-
* In React Native, you would have to align it using flex to make sure the Code and the surrounding text is correctly aligned
|
|
102
|
-
*
|
|
103
|
-
* ```tsx
|
|
104
|
-
* <Box flexWrap="wrap" flexDirection="row" alignItems="flex-start">
|
|
105
|
-
* <Text>Lorem ipsum </Text>
|
|
106
|
-
* <Code>SENTRY_TOKEN</Code>
|
|
107
|
-
* <Text> normal text</Text>
|
|
108
|
-
* </Box>
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
var Code = function Code(_ref2) {
|
|
85
|
+
var _Code = function _Code(_ref2, ref) {
|
|
112
86
|
var children = _ref2.children,
|
|
113
87
|
_ref2$size = _ref2.size,
|
|
114
88
|
size = _ref2$size === void 0 ? 'small' : _ref2$size,
|
|
@@ -129,6 +103,7 @@ var Code = function Code(_ref2) {
|
|
|
129
103
|
});
|
|
130
104
|
}, [isHighlighted, color]);
|
|
131
105
|
return /*#__PURE__*/jsx(CodeContainer, _objectSpread(_objectSpread(_objectSpread({
|
|
106
|
+
ref: ref,
|
|
132
107
|
size: size,
|
|
133
108
|
isHighlighted: isHighlighted,
|
|
134
109
|
as: isPlatformWeb ? 'span' : undefined
|
|
@@ -148,5 +123,33 @@ var Code = function Code(_ref2) {
|
|
|
148
123
|
}));
|
|
149
124
|
};
|
|
150
125
|
|
|
126
|
+
/**
|
|
127
|
+
* Code component can be used for displaying token, variable names, or inlined code snippets.
|
|
128
|
+
*
|
|
129
|
+
* ## Usage
|
|
130
|
+
*
|
|
131
|
+
* ### In Web
|
|
132
|
+
* In web, you can use it inside `Text` component or individually. The component is set to display `inline-block`
|
|
133
|
+
*
|
|
134
|
+
* ```tsx
|
|
135
|
+
* <Text>
|
|
136
|
+
* Lorem ipsum <Code>SENTRY_TOKEN</Code> normal text
|
|
137
|
+
* </Text>
|
|
138
|
+
* ```
|
|
139
|
+
*
|
|
140
|
+
* ### In React Native
|
|
141
|
+
*
|
|
142
|
+
* In React Native, you would have to align it using flex to make sure the Code and the surrounding text is correctly aligned
|
|
143
|
+
*
|
|
144
|
+
* ```tsx
|
|
145
|
+
* <Box flexWrap="wrap" flexDirection="row" alignItems="flex-start">
|
|
146
|
+
* <Text>Lorem ipsum </Text>
|
|
147
|
+
* <Code>SENTRY_TOKEN</Code>
|
|
148
|
+
* <Text> normal text</Text>
|
|
149
|
+
* </Box>
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
var Code = /*#__PURE__*/React__default.forwardRef(_Code);
|
|
153
|
+
|
|
151
154
|
export { Code };
|
|
152
155
|
//# sourceMappingURL=Code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Code.js","sources":["../../../../../../../src/components/Typography/Code/Code.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FontSize, Typography } from '~tokens/global';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { throwBladeError } from '~utils/logger';\n\ntype CodeCommonProps = {\n /**\n * Sets the color of the Heading component.\n */\n children: StringChildrenType;\n /**\n * Decides the fontSize and padding of Code\n *\n * @default small\n */\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'bold'>;\n isHighlighted?: boolean;\n color?: BaseTextProps['color'];\n} & TestID &\n StyledPropsBlade;\n\ntype CodeHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted?: true;\n /**\n * color prop can only be added when `isHighlighted` is set to `false`\n */\n color?: undefined;\n};\n\ntype CodeNonHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted: false;\n /**\n * color prop to set color of text when `isHighlighted` is set to false\n */\n color?: BaseTextProps['color'];\n};\n\nexport type CodeProps = CodeHighlightedProps | CodeNonHighlightedProps;\n\ntype CodeContainerProps = {\n size: CodeProps['size'];\n isHighlighted: CodeProps['isHighlighted'];\n};\n\nconst platformType = getPlatformType();\nconst isPlatformWeb = platformType === 'browser' || platformType === 'node';\n\nconst getCodeFontSizeAndLineHeight = (\n size: CodeProps['size'],\n): { fontSize: keyof FontSize; lineHeight: keyof Typography['lineHeights'] } | undefined => {\n switch (size) {\n case 'medium':\n return { fontSize: 75, lineHeight: 75 };\n case 'small':\n return { fontSize: 25, lineHeight: 25 };\n default:\n if (__DEV__) {\n throwBladeError({\n moduleName: 'Code',\n message: `Unexpected size: ${size}`,\n });\n }\n return undefined;\n }\n};\n\nconst CodeContainer = styled(BaseBox)<CodeContainerProps>((props) => {\n const padding = `${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;\n return {\n padding,\n backgroundColor: props.isHighlighted\n ? props.theme.colors.feedback.background.neutral.subtle\n : undefined,\n borderRadius: props.theme.border.radius.medium,\n display: isPlatformWeb ? 'inline-block' : 'flex',\n alignSelf: isPlatformWeb ? undefined : 'center',\n verticalAlign: 'middle',\n lineHeight: makeTypographySize(props.theme.typography.lineHeights[0]),\n };\n});\n\nconst getCodeColor = ({\n isHighlighted,\n color,\n}: Pick<CodeProps, 'isHighlighted' | 'color'>): CodeProps['color'] => {\n if (isHighlighted) {\n if (__DEV__) {\n if (color) {\n throwBladeError({\n moduleName: 'Code',\n message: '`color` prop cannot be used without `isHighlighted={false}`',\n });\n }\n }\n\n return 'surface.text.gray.subtle';\n }\n\n if (color) {\n return color;\n }\n\n return 'surface.text.gray.normal';\n};\n/**\n * Code component can be used for displaying token, variable names, or inlined code snippets.\n *\n * ## Usage\n *\n * ### In Web\n * In web, you can use it inside `Text` component or individually. The component is set to display `inline-block`\n *\n * ```tsx\n * <Text>\n * Lorem ipsum <Code>SENTRY_TOKEN</Code> normal text\n * </Text>\n * ```\n *\n * ### In React Native\n *\n * In React Native, you would have to align it using flex to make sure the Code and the surrounding text is correctly aligned\n *\n * ```tsx\n * <Box flexWrap=\"wrap\" flexDirection=\"row\" alignItems=\"flex-start\">\n * <Text>Lorem ipsum </Text>\n * <Code>SENTRY_TOKEN</Code>\n * <Text> normal text</Text>\n * </Box>\n * ```\n */\nconst Code = ({\n children,\n size = 'small',\n weight = 'regular',\n isHighlighted = true,\n color,\n testID,\n ...styledProps\n}: CodeProps): React.ReactElement => {\n const { fontSize, lineHeight } = getCodeFontSizeAndLineHeight(size)!;\n const codeTextColor = React.useMemo<CodeProps['color']>(\n () => getCodeColor({ isHighlighted, color }),\n [isHighlighted, color],\n );\n\n return (\n <CodeContainer\n size={size}\n isHighlighted={isHighlighted}\n as={isPlatformWeb ? 'span' : undefined}\n {...metaAttribute({ name: MetaConstants.Code, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseText\n color={codeTextColor}\n fontFamily=\"code\"\n fontSize={fontSize}\n fontWeight={weight}\n as={isPlatformWeb ? 'code' : undefined}\n lineHeight={lineHeight}\n >\n {children}\n </BaseText>\n </CodeContainer>\n );\n};\n\nexport { Code };\n"],"names":["platformType","getPlatformType","isPlatformWeb","getCodeFontSizeAndLineHeight","size","fontSize","lineHeight","throwBladeError","moduleName","message","concat","undefined","CodeContainer","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSpace","theme","spacing","backgroundColor","isHighlighted","colors","feedback","background","neutral","subtle","borderRadius","border","radius","medium","display","alignSelf","verticalAlign","makeTypographySize","typography","lineHeights","getCodeColor","_ref","color","Code","_ref2","children","_ref2$size","_ref2$weight","weight","_ref2$isHighlighted","testID","styledProps","_objectWithoutProperties","_excluded","_ref3","codeTextColor","React","useMemo","_jsx","_objectSpread","as","metaAttribute","name","MetaConstants","getStyledProps","BaseText","fontFamily","fontWeight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,IAAMA,YAAY,GAAGC,eAAe,EAAE,CAAA;AACtC,IAAMC,aAAa,GAAGF,YAAY,KAAK,SAAS,IAAIA,YAAY,KAAK,MAAM,CAAA;AAE3E,IAAMG,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAChCC,IAAuB,EACmE;AAC1F,EAAA,QAAQA,IAAI;AACV,IAAA,KAAK,QAAQ;MACX,OAAO;AAAEC,QAAAA,QAAQ,EAAE,EAAE;AAAEC,QAAAA,UAAU,EAAE,EAAA;OAAI,CAAA;AACzC,IAAA,KAAK,OAAO;MACV,OAAO;AAAED,QAAAA,QAAQ,EAAE,EAAE;AAAEC,QAAAA,UAAU,EAAE,EAAA;OAAI,CAAA;AACzC,IAAA;AACE,MAAA,IAAI,KAAO,EAAE;AACXC,QAAAA,eAAe,CAAC;AACdC,UAAAA,UAAU,EAAE,MAAM;UAClBC,OAAO,EAAA,mBAAA,CAAAC,MAAA,CAAsBN,IAAI,CAAA;AACnC,SAAC,CAAC,CAAA;AACJ,OAAA;AACA,MAAA,OAAOO,SAAS,CAAA;AACpB,GAAA;AACF,CAAC,CAAA;AAED,IAAMC,aAAa,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,q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Aa,EAAbA,aAAa;AAAEkB,MAAAA,KAAK,EAALA,KAAAA;AAAM,KAAC,CAAC,CAAA;AAAA,GAAA,EAC5C,CAAClB,aAAa,EAAEkB,KAAK,CACvB,CAAC,CAAA;EAED,oBACEgB,GAAA,CAAC9C,aAAa,EAAA+C,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACZvD,IAAAA,IAAI,EAAEA,IAAK;AACXoB,IAAAA,aAAa,EAAEA,aAAc;AAC7BoC,IAAAA,EAAE,EAAE1D,aAAa,GAAG,MAAM,GAAGS,SAAAA;AAAU,GAAA,EACnCkD,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACpB,IAAI;AAAEO,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EACnDc,cAAc,CAACb,WAAW,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAN,QAAA,eAE/Ba,GAAA,CAACO,QAAQ,EAAA;AACPvB,MAAAA,KAAK,EAAEa,aAAc;AACrBW,MAAAA,UAAU,EAAC,MAAM;AACjB7D,MAAAA,QAAQ,EAAEA,QAAS;AACnB8D,MAAAA,UAAU,EAAEnB,MAAO;AACnBY,MAAAA,EAAE,EAAE1D,aAAa,GAAG,MAAM,GAAGS,SAAU;AACvCL,MAAAA,UAAU,EAAEA,UAAW;AAAAuC,MAAAA,QAAA,EAEtBA,QAAAA;KACO,CAAA;AAAC,GAAA,CACE,CAAC,CAAA;AAEpB;;;;"}
|
|
1
|
+
{"version":3,"file":"Code.js","sources":["../../../../../../../src/components/Typography/Code/Code.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FontSize, Typography } from '~tokens/global';\nimport type { BladeElementRef, StringChildrenType, TestID } from '~utils/types';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { throwBladeError } from '~utils/logger';\n\ntype CodeCommonProps = {\n /**\n * Sets the color of the Heading component.\n */\n children: StringChildrenType;\n /**\n * Decides the fontSize and padding of Code\n *\n * @default small\n */\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'bold'>;\n isHighlighted?: boolean;\n color?: BaseTextProps['color'];\n} & TestID &\n StyledPropsBlade;\n\ntype CodeHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted?: true;\n /**\n * color prop can only be added when `isHighlighted` is set to `false`\n */\n color?: undefined;\n};\n\ntype CodeNonHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted: false;\n /**\n * color prop to set color of text when `isHighlighted` is set to false\n */\n color?: BaseTextProps['color'];\n};\n\nexport type CodeProps = CodeHighlightedProps | CodeNonHighlightedProps;\n\ntype CodeContainerProps = {\n size: CodeProps['size'];\n isHighlighted: CodeProps['isHighlighted'];\n};\n\nconst platformType = getPlatformType();\nconst isPlatformWeb = platformType === 'browser' || platformType === 'node';\n\nconst getCodeFontSizeAndLineHeight = (\n size: CodeProps['size'],\n): { fontSize: keyof FontSize; lineHeight: keyof Typography['lineHeights'] } | undefined => {\n switch (size) {\n case 'medium':\n return { fontSize: 75, lineHeight: 75 };\n case 'small':\n return { fontSize: 25, lineHeight: 25 };\n default:\n if (__DEV__) {\n throwBladeError({\n moduleName: 'Code',\n message: `Unexpected size: ${size}`,\n });\n }\n return undefined;\n }\n};\n\nconst CodeContainer = styled(BaseBox)<CodeContainerProps>((props) => {\n const padding = `${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;\n return {\n padding,\n backgroundColor: props.isHighlighted\n ? props.theme.colors.feedback.background.neutral.subtle\n : undefined,\n borderRadius: props.theme.border.radius.medium,\n display: isPlatformWeb ? 'inline-block' : 'flex',\n alignSelf: isPlatformWeb ? undefined : 'center',\n verticalAlign: 'middle',\n lineHeight: makeTypographySize(props.theme.typography.lineHeights[0]),\n };\n});\n\nconst getCodeColor = ({\n isHighlighted,\n color,\n}: Pick<CodeProps, 'isHighlighted' | 'color'>): CodeProps['color'] => {\n if (isHighlighted) {\n if (__DEV__) {\n if (color) {\n throwBladeError({\n moduleName: 'Code',\n message: '`color` prop cannot be used without `isHighlighted={false}`',\n });\n }\n }\n\n return 'surface.text.gray.subtle';\n }\n\n if (color) {\n return color;\n }\n\n return 'surface.text.gray.normal';\n};\n\nconst _Code = (\n {\n children,\n size = 'small',\n weight = 'regular',\n isHighlighted = true,\n color,\n testID,\n ...styledProps\n }: CodeProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const { fontSize, lineHeight } = getCodeFontSizeAndLineHeight(size)!;\n const codeTextColor = React.useMemo<CodeProps['color']>(\n () => getCodeColor({ isHighlighted, color }),\n [isHighlighted, color],\n );\n\n return (\n <CodeContainer\n ref={ref as never}\n size={size}\n isHighlighted={isHighlighted}\n as={isPlatformWeb ? 'span' : undefined}\n {...metaAttribute({ name: MetaConstants.Code, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseText\n color={codeTextColor}\n fontFamily=\"code\"\n fontSize={fontSize}\n fontWeight={weight}\n as={isPlatformWeb ? 'code' : undefined}\n lineHeight={lineHeight}\n >\n {children}\n </BaseText>\n </CodeContainer>\n );\n};\n\n/**\n * Code component can be used for displaying token, variable names, or inlined code snippets.\n *\n * ## Usage\n *\n * ### In Web\n * In web, you can use it inside `Text` component or individually. The component is set to display `inline-block`\n *\n * ```tsx\n * <Text>\n * Lorem ipsum <Code>SENTRY_TOKEN</Code> normal text\n * </Text>\n * ```\n *\n * ### In React Native\n *\n * In React Native, you would have to align it using flex to make sure the Code and the surrounding text is correctly aligned\n *\n * ```tsx\n * <Box flexWrap=\"wrap\" flexDirection=\"row\" alignItems=\"flex-start\">\n * <Text>Lorem ipsum </Text>\n * <Code>SENTRY_TOKEN</Code>\n * <Text> normal text</Text>\n * </Box>\n * ```\n */\nconst Code = React.forwardRef(_Code);\n\nexport { Code };\n"],"names":["platformType","getPlatformType","isPlatformWeb","getCodeFontSizeAndLineHeight","size","fontSize","lineHeight","throwBladeError","moduleName","message","concat","undefined","CodeContainer","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSpace","theme","spacing","backgroundColor","isHighlighted","colors","feedback","background","neutral","subtle","borderRadius","border","radius","medium","display","alignSelf","verticalAlign","makeTypographySize","typography","lineHeights","getCodeColor","_ref","color","_Code","_ref2","ref","children","_ref2$size","_ref2$weight","weight","_ref2$isHighlighted","testID","styledProps","_objectWithoutProperties","_excluded","_ref3","codeTextColor","React","useMemo","_jsx","_objectSpread","as","metaAttribute","name","MetaConstants","Code","getStyledProps","BaseText","fontFamily","fontWeight","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,IAAMA,YAAY,GAAGC,eAAe,EAAE,CAAA;AACtC,IAAMC,aAAa,GAAGF,YAAY,KAAK,SAAS,IAAIA,YAAY,KAAK,MAAM,CAAA;AAE3E,IAAMG,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAChCC,IAAuB,EACmE;AAC1F,EAAA,QAAQA,IAAI;AACV,IAAA,KAAK,QAAQ;MACX,OAAO;AAAEC,QAAAA,QAAQ,EAAE,EAAE;AAAEC,QAAAA,UAAU,EAAE,EAAA;OAAI,CAAA;AACzC,IAAA,KAAK,OAAO;MACV,OAAO;AAAED,QAAAA,QAAQ,EAAE,EAAE;AAAEC,QAAAA,UAAU,EAAE,EAAA;OAAI,CAAA;AACzC,IAAA;AACE,MAAA,IAAI,KAAO,EAAE;AACXC,QAAAA,eAAe,CAAC;AACdC,UAAAA,UAAU,EAAE,MAAM;UAClBC,OAAO,EAAA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CAAC3B,KAAK;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import React__default from 'react';
|
|
3
4
|
import '../BaseText/index.js';
|
|
4
5
|
import { useValidateAsProp } from '../utils.js';
|
|
5
6
|
import '../../Box/styledProps/index.js';
|
|
@@ -53,7 +54,7 @@ var getProps = function getProps(_ref) {
|
|
|
53
54
|
props.as = as || props.as;
|
|
54
55
|
return props;
|
|
55
56
|
};
|
|
56
|
-
var
|
|
57
|
+
var _Display = function _Display(_ref2, ref) {
|
|
57
58
|
var as = _ref2.as,
|
|
58
59
|
_ref2$size = _ref2.size,
|
|
59
60
|
size = _ref2$size === void 0 ? 'small' : _ref2$size,
|
|
@@ -78,13 +79,16 @@ var Display = function Display(_ref2) {
|
|
|
78
79
|
weight: weight,
|
|
79
80
|
testID: testID
|
|
80
81
|
});
|
|
81
|
-
return /*#__PURE__*/jsx(BaseText, _objectSpread(_objectSpread(_objectSpread({
|
|
82
|
+
return /*#__PURE__*/jsx(BaseText, _objectSpread(_objectSpread(_objectSpread({
|
|
83
|
+
ref: ref
|
|
84
|
+
}, props), {}, {
|
|
82
85
|
textAlign: textAlign,
|
|
83
86
|
textDecorationLine: textDecorationLine
|
|
84
87
|
}, getStyledProps(styledProps)), {}, {
|
|
85
88
|
children: children
|
|
86
89
|
}));
|
|
87
90
|
};
|
|
91
|
+
var Display = /*#__PURE__*/React__default.forwardRef(_Display);
|
|
88
92
|
|
|
89
93
|
export { Display };
|
|
90
94
|
//# sourceMappingURL=Display.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Display.js","sources":["../../../../../../../src/components/Typography/Display/Display.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\n\nconst validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type DisplayProps = {\n as?: typeof validAsValues[number];\n /**\n * Overrides the color of the Display component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of title\n */\n color?: BaseTextProps['color'];\n size?: Extract<BaseTextSizes, 'small' | 'medium' | 'large' | 'xlarge'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'medium' | 'semibold'>;\n children: React.ReactNode;\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n} & TestID &\n StyledPropsBlade;\n\nconst getProps = ({\n as,\n size,\n weight,\n color,\n testID,\n}: Pick<DisplayProps, 'as' | 'size' | 'color' | 'weight' | 'testID'>): Omit<\n BaseTextProps,\n 'children'\n> => {\n const isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';\n const letterSpacing = weight === 'medium' || weight === 'regular' ? 50 : 100;\n const props: Omit<BaseTextProps, 'children'> = {\n color,\n fontSize: 800,\n fontWeight: weight,\n fontStyle: 'normal',\n lineHeight: 800,\n fontFamily: 'heading',\n accessibilityProps: isPlatformWeb ? {} : { role: 'heading' },\n componentName: 'display',\n testID,\n letterSpacing,\n };\n\n if (size === 'small') {\n props.fontSize = 800;\n props.lineHeight = 800;\n } else if (size === 'medium') {\n props.fontSize = 900;\n props.lineHeight = 900;\n } else if (size === 'large') {\n props.fontSize = 1000;\n props.lineHeight = 1000;\n } else if (size === 'xlarge') {\n props.fontSize = 1100;\n props.lineHeight = 1100;\n }\n\n props.as = isPlatformWeb ? 'h1' : undefined;\n // override the computed `as` prop if user passed an `as` prop\n props.as = as || props.as;\n return props;\n};\n\
|
|
1
|
+
{"version":3,"file":"Display.js","sources":["../../../../../../../src/components/Typography/Display/Display.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement } from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { BladeElementRef, TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\n\nconst validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type DisplayProps = {\n as?: typeof validAsValues[number];\n /**\n * Overrides the color of the Display component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of title\n */\n color?: BaseTextProps['color'];\n size?: Extract<BaseTextSizes, 'small' | 'medium' | 'large' | 'xlarge'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'medium' | 'semibold'>;\n children: React.ReactNode;\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n} & TestID &\n StyledPropsBlade;\n\nconst getProps = ({\n as,\n size,\n weight,\n color,\n testID,\n}: Pick<DisplayProps, 'as' | 'size' | 'color' | 'weight' | 'testID'>): Omit<\n BaseTextProps,\n 'children'\n> => {\n const isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';\n const letterSpacing = weight === 'medium' || weight === 'regular' ? 50 : 100;\n const props: Omit<BaseTextProps, 'children'> = {\n color,\n fontSize: 800,\n fontWeight: weight,\n fontStyle: 'normal',\n lineHeight: 800,\n fontFamily: 'heading',\n accessibilityProps: isPlatformWeb ? {} : { role: 'heading' },\n componentName: 'display',\n testID,\n letterSpacing,\n };\n\n if (size === 'small') {\n props.fontSize = 800;\n props.lineHeight = 800;\n } else if (size === 'medium') {\n props.fontSize = 900;\n props.lineHeight = 900;\n } else if (size === 'large') {\n props.fontSize = 1000;\n props.lineHeight = 1000;\n } else if (size === 'xlarge') {\n props.fontSize = 1100;\n props.lineHeight = 1100;\n }\n\n props.as = isPlatformWeb ? 'h1' : undefined;\n // override the computed `as` prop if user passed an `as` prop\n props.as = as || props.as;\n return props;\n};\n\nconst _Display = (\n {\n as,\n size = 'small',\n weight = 'semibold',\n color = 'surface.text.gray.normal',\n children,\n testID,\n textAlign,\n textDecorationLine,\n ...styledProps\n }: DisplayProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n useValidateAsProp({ componentName: 'Display', as, validAsValues });\n\n const props = getProps({ as, size, color, weight, testID });\n\n return (\n <BaseText\n ref={ref}\n {...props}\n textAlign={textAlign}\n textDecorationLine={textDecorationLine}\n {...getStyledProps(styledProps)}\n >\n {children}\n </BaseText>\n );\n};\n\nconst Display = React.forwardRef(_Display);\nexport { Display };\n"],"names":["validAsValues","getProps","_ref","as","size","weight","color","testID","isPlatformWeb","getPlatformType","letterSpacing","props","fontSize","fontWeight","fontStyle","lineHeight","fontFamily","accessibilityProps","role","componentName","undefined","_Display","_ref2","ref","_ref2$size","_ref2$weight","_ref2$color","children","textAlign","textDecorationLine","styledProps","_objectWithoutProperties","_excluded","useValidateAsProp","_jsx","BaseText","_objectSpread","getStyledProps","Display","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;AAUA,IAAMA,aAAa,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA;AAiB3E,IAAMC,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAST;AAAA,EAAA,IARHC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IACFC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,MAAM,GAAAL,IAAA,CAANK,MAAM,CAAA;AAKN,EAAA,IAAMC,aAAa,GAAGC,eAAe,EAAE,KAAK,SAAS,IAAIA,eAAe,EAAE,KAAK,MAAM,CAAA;AACrF,EAAA,IAAM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A,CAAA;AACPb,IAAAA,GAAG,EAAEA,GAAAA;AAAI,GAAA,EACLZ,KAAK,CAAA,EAAA,EAAA,EAAA;AACTiB,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,kBAAkB,EAAEA,kBAAAA;GAChBQ,EAAAA,cAAc,CAACP,WAAW,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAH,IAAAA,QAAA,EAE9BA,QAAAA;AAAQ,GAAA,CACD,CAAC,CAAA;AAEf,CAAC,CAAA;AAED,IAAMW,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAACnB,QAAQ;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
+
import React__default from 'react';
|
|
3
4
|
import '../BaseText/index.js';
|
|
4
5
|
import { useValidateAsProp } from '../utils.js';
|
|
5
6
|
import '../../Box/styledProps/index.js';
|
|
@@ -58,7 +59,7 @@ var getHeadingProps = function getHeadingProps(_ref) {
|
|
|
58
59
|
props.as = as || props.as;
|
|
59
60
|
return props;
|
|
60
61
|
};
|
|
61
|
-
var
|
|
62
|
+
var _Heading = function _Heading(_ref2, ref) {
|
|
62
63
|
var as = _ref2.as,
|
|
63
64
|
_ref2$size = _ref2.size,
|
|
64
65
|
size = _ref2$size === void 0 ? 'small' : _ref2$size,
|
|
@@ -84,12 +85,14 @@ var Heading = function Heading(_ref2) {
|
|
|
84
85
|
testID: testID
|
|
85
86
|
});
|
|
86
87
|
return /*#__PURE__*/jsx(BaseText, _objectSpread(_objectSpread(_objectSpread({}, props), {}, {
|
|
88
|
+
ref: ref,
|
|
87
89
|
textAlign: textAlign,
|
|
88
90
|
textDecorationLine: textDecorationLine
|
|
89
91
|
}, getStyledProps(styledProps)), {}, {
|
|
90
92
|
children: children
|
|
91
93
|
}));
|
|
92
94
|
};
|
|
95
|
+
var Heading = /*#__PURE__*/React__default.forwardRef(_Heading);
|
|
93
96
|
|
|
94
97
|
export { Heading, getHeadingProps };
|
|
95
98
|
//# sourceMappingURL=Heading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.js","sources":["../../../../../../../src/components/Typography/Heading/Heading.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport type { ReactElement } from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { isReactNative } from '~utils';\nimport type { TestID } from '~utils/types';\n\nconst validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type HeadingProps = {\n as?: typeof validAsValues[number];\n /**\n * Overrides the color of the Heading component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of heading\n */\n color?: BaseTextProps['color'];\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'semibold'>;\n children: React.ReactNode;\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n size?: Extract<BaseTextSizes, 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge'>;\n} & TestID &\n StyledPropsBlade;\n\nexport const getHeadingProps = ({\n as,\n size,\n weight,\n color,\n testID,\n}: Pick<HeadingProps, 'as' | 'size' | 'weight' | 'color' | 'testID'>): Omit<\n BaseTextProps,\n 'children'\n> => {\n const props: Omit<BaseTextProps, 'children'> = {\n color,\n fontSize: 300,\n fontWeight: weight ?? 'semibold',\n fontStyle: 'normal',\n lineHeight: 300,\n fontFamily: 'heading',\n accessibilityProps: isReactNative() ? { role: 'heading' } : {},\n componentName: 'heading',\n testID,\n };\n\n if (size === 'small') {\n props.fontSize = 300;\n props.lineHeight = 300;\n props.as = 'h6';\n } else if (size === 'medium') {\n props.fontSize = 400;\n props.lineHeight = 400;\n props.as = 'h5';\n } else if (size === 'large') {\n props.fontSize = 500;\n props.lineHeight = 500;\n props.as = 'h4';\n } else if (size === 'xlarge') {\n props.fontSize = 600;\n props.lineHeight = 600;\n props.as = 'h3';\n } else if (size === '2xlarge') {\n props.fontSize = 700;\n props.lineHeight = 700;\n props.as = 'h2';\n }\n\n // override the computed `as` prop if user passed an `as` prop\n props.as = as || props.as;\n return props;\n};\n\
|
|
1
|
+
{"version":3,"file":"Heading.js","sources":["../../../../../../../src/components/Typography/Heading/Heading.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport React from 'react';\nimport type { ReactElement } from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { isReactNative } from '~utils';\nimport type { BladeElementRef, TestID } from '~utils/types';\n\nconst validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type HeadingProps = {\n as?: typeof validAsValues[number];\n /**\n * Overrides the color of the Heading component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of heading\n */\n color?: BaseTextProps['color'];\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'semibold'>;\n children: React.ReactNode;\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n size?: Extract<BaseTextSizes, 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge'>;\n} & TestID &\n StyledPropsBlade;\n\nexport const getHeadingProps = ({\n as,\n size,\n weight,\n color,\n testID,\n}: Pick<HeadingProps, 'as' | 'size' | 'weight' | 'color' | 'testID'>): Omit<\n BaseTextProps,\n 'children'\n> => {\n const props: Omit<BaseTextProps, 'children'> = {\n color,\n fontSize: 300,\n fontWeight: weight ?? 'semibold',\n fontStyle: 'normal',\n lineHeight: 300,\n fontFamily: 'heading',\n accessibilityProps: isReactNative() ? { role: 'heading' } : {},\n componentName: 'heading',\n testID,\n };\n\n if (size === 'small') {\n props.fontSize = 300;\n props.lineHeight = 300;\n props.as = 'h6';\n } else if (size === 'medium') {\n props.fontSize = 400;\n props.lineHeight = 400;\n props.as = 'h5';\n } else if (size === 'large') {\n props.fontSize = 500;\n props.lineHeight = 500;\n props.as = 'h4';\n } else if (size === 'xlarge') {\n props.fontSize = 600;\n props.lineHeight = 600;\n props.as = 'h3';\n } else if (size === '2xlarge') {\n props.fontSize = 700;\n props.lineHeight = 700;\n props.as = 'h2';\n }\n\n // override the computed `as` prop if user passed an `as` prop\n props.as = as || props.as;\n return props;\n};\n\nconst _Heading = (\n {\n as,\n size = 'small',\n weight = 'semibold',\n color = 'surface.text.gray.normal',\n children,\n testID,\n textAlign,\n textDecorationLine,\n ...styledProps\n }: HeadingProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n useValidateAsProp({ componentName: 'Heading', as, validAsValues });\n\n const props = getHeadingProps({ as, size, weight, color, testID });\n\n return (\n <BaseText\n {...props}\n ref={ref}\n textAlign={textAlign}\n textDecorationLine={textDecorationLine}\n {...getStyledProps(styledProps)}\n >\n {children}\n </BaseText>\n );\n};\n\nconst Heading = React.forwardRef(_Heading);\n\nexport { Heading };\n"],"names":["validAsValues","getHeadingProps","_ref","as","size","weight","color","testID","props","fontSize","fontWeight","fontStyle","lineHeight","fontFamily","accessibilityProps","isReactNative","role","componentName","_Heading","_ref2","ref","_ref2$size","_ref2$weight","_ref2$color","children","textAlign","textDecorationLine","styledProps","_objectWithoutProperties","_excluded","useValidateAsProp","_jsx","BaseText","_objectSpread","getStyledProps","Heading","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;AAWA,IAAMA,aAAa,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA;IAiB9DC,e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AU,SAAA,CAAA,CAAA;AAIhBC,EAAAA,iBAAiB,CAAC;AAAEb,IAAAA,aAAa,EAAE,SAAS;AAAEd,IAAAA,EAAE,EAAFA,EAAE;AAAEH,IAAAA,aAAa,EAAbA,aAAAA;AAAc,GAAC,CAAC,CAAA;EAElE,IAAMQ,KAAK,GAAGP,eAAe,CAAC;AAAEE,IAAAA,EAAE,EAAFA,EAAE;AAAEC,IAAAA,IAAI,EAAJA,IAAI;AAAEC,IAAAA,MAAM,EAANA,MAAM;AAAEC,IAAAA,KAAK,EAALA,KAAK;AAAEC,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA;EAElE,oBACEwB,GAAA,CAACC,QAAQ,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA,EAAA,EACHzB,KAAK,CAAA,EAAA,EAAA,EAAA;AACTY,IAAAA,GAAG,EAAEA,GAAI;AACTK,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,kBAAkB,EAAEA,kBAAAA;GAChBQ,EAAAA,cAAc,CAACP,WAAW,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAH,IAAAA,QAAA,EAE9BA,QAAAA;AAAQ,GAAA,CACD,CAAC,CAAA;AAEf,CAAC,CAAA;AAED,IAAMW,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAACnB,QAAQ;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import 'react';
|
|
3
|
+
import React__default from 'react';
|
|
4
4
|
import '../BaseText/index.js';
|
|
5
5
|
import { useValidateAsProp } from '../utils.js';
|
|
6
6
|
import '../../Box/styledProps/index.js';
|
|
@@ -16,12 +16,6 @@ var _excluded = ["as", "variant", "weight", "size", "truncateAfterLines", "child
|
|
|
16
16
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
17
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
18
|
var validAsValues = ['p', 'span', 'div', 'abbr', 'figcaption', 'cite', 'q', 'label'];
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Conditionally changing props based on variant.
|
|
22
|
-
* Overloads or union gives wrong intellisense.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
19
|
var getTextProps = function getTextProps(_ref) {
|
|
26
20
|
var variant = _ref.variant,
|
|
27
21
|
weight = _ref.weight,
|
|
@@ -91,7 +85,7 @@ var getTextProps = function getTextProps(_ref) {
|
|
|
91
85
|
}
|
|
92
86
|
return props;
|
|
93
87
|
};
|
|
94
|
-
var _Text = function _Text(_ref2) {
|
|
88
|
+
var _Text = function _Text(_ref2, ref) {
|
|
95
89
|
var _ref2$as = _ref2.as,
|
|
96
90
|
as = _ref2$as === void 0 ? 'p' : _ref2$as,
|
|
97
91
|
_ref2$variant = _ref2.variant,
|
|
@@ -125,11 +119,13 @@ var _Text = function _Text(_ref2) {
|
|
|
125
119
|
as: as,
|
|
126
120
|
validAsValues: validAsValues
|
|
127
121
|
});
|
|
128
|
-
return /*#__PURE__*/jsx(BaseText, _objectSpread(_objectSpread(_objectSpread({
|
|
122
|
+
return /*#__PURE__*/jsx(BaseText, _objectSpread(_objectSpread(_objectSpread({
|
|
123
|
+
ref: ref
|
|
124
|
+
}, props), getStyledProps(styledProps)), {}, {
|
|
129
125
|
children: children
|
|
130
126
|
}));
|
|
131
127
|
};
|
|
132
|
-
var Text = /*#__PURE__*/assignWithoutSideEffects(_Text, {
|
|
128
|
+
var Text = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.forwardRef(_Text), {
|
|
133
129
|
displayName: 'Text',
|
|
134
130
|
componentId: 'Text'
|
|
135
131
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sources":["../../../../../../../src/components/Typography/Text/Text.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\n\nconst validAsValues = ['p', 'span', 'div', 'abbr', 'figcaption', 'cite', 'q', 'label'] as const;\ntype TextCommonProps = {\n as?: typeof validAsValues[number];\n truncateAfterLines?: number;\n children: React.ReactNode;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'medium' | 'semibold'>;\n /**\n * Overrides the color of the Text component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of text\n */\n color?: BaseTextProps['color'];\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n wordBreak?: BaseTextProps['wordBreak'];\n} & TestID &\n StyledPropsBlade;\n\nexport type TextVariant = 'body' | 'caption';\n\ntype TextBodyVariant = TextCommonProps & {\n variant?: Extract<TextVariant, 'body'>;\n size?: Extract<BaseTextSizes, 'xsmall' | 'small' | 'medium' | 'large'>;\n};\n\ntype TextCaptionVariant = TextCommonProps & {\n variant?: Extract<TextVariant, 'caption'>;\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n};\n\
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../../../../../src/components/Typography/Text/Text.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { BladeElementRef, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\n\nconst validAsValues = ['p', 'span', 'div', 'abbr', 'figcaption', 'cite', 'q', 'label'] as const;\ntype TextCommonProps = {\n as?: typeof validAsValues[number];\n truncateAfterLines?: number;\n children: React.ReactNode;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'medium' | 'semibold'>;\n /**\n * Overrides the color of the Text component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of text\n */\n color?: BaseTextProps['color'];\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n wordBreak?: BaseTextProps['wordBreak'];\n} & TestID &\n StyledPropsBlade;\n\nexport type TextVariant = 'body' | 'caption';\n\ntype TextBodyVariant = TextCommonProps & {\n variant?: Extract<TextVariant, 'body'>;\n size?: Extract<BaseTextSizes, 'xsmall' | 'small' | 'medium' | 'large'>;\n};\n\ntype TextCaptionVariant = TextCommonProps & {\n variant?: Extract<TextVariant, 'caption'>;\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n};\n\nexport type TextProps<T> = T extends { variant: infer Variant }\n ? Variant extends 'caption'\n ? TextCaptionVariant\n : Variant extends 'body'\n ? TextBodyVariant\n : T\n : T;\n\ntype GetTextPropsReturn = Omit<BaseTextProps, 'children'>;\ntype GetTextProps<T extends { variant: TextVariant }> = Pick<\n TextProps<T>,\n 'variant' | 'weight' | 'size' | 'color' | 'testID' | 'textAlign' | 'textDecorationLine'\n>;\n\nconst getTextProps = <T extends { variant: TextVariant }>({\n variant,\n weight,\n size,\n color = 'surface.text.gray.normal',\n testID,\n textAlign,\n textDecorationLine,\n}: GetTextProps<T>): GetTextPropsReturn => {\n const props: GetTextPropsReturn = {\n color,\n fontSize: 100,\n fontWeight: weight ?? 'regular',\n fontStyle: 'normal',\n lineHeight: 100,\n fontFamily: 'text',\n componentName: 'text',\n testID,\n textAlign,\n textDecorationLine,\n };\n\n if (variant === 'caption') {\n // variant of caption can only have size of small\n if (size && size !== 'small' && size !== 'medium') {\n if (__DEV__) {\n throwBladeError({\n moduleName: 'Text',\n message: `size cannot be '${size}' when variant is 'caption'`,\n });\n }\n // Set size as small in case of invalid size\n size = 'small';\n }\n } else if (variant !== 'caption' && !size) {\n size = 'medium';\n }\n\n if (variant === 'body') {\n if (size === 'xsmall') {\n props.fontSize = 25;\n props.lineHeight = 25;\n }\n if (size === 'small') {\n props.fontSize = 75;\n props.lineHeight = 75;\n }\n if (size === 'medium') {\n props.fontSize = 100;\n props.lineHeight = 100;\n }\n if (size === 'large') {\n props.fontSize = 200;\n props.lineHeight = 200;\n }\n }\n if (variant === 'caption') {\n if (size === 'small') {\n props.fontSize = 50;\n props.lineHeight = 50;\n props.fontWeight = 'regular';\n }\n if (size === 'medium') {\n props.fontSize = 100;\n props.lineHeight = 50;\n props.fontWeight = 'regular';\n }\n props.fontStyle = 'italic';\n }\n\n return props;\n};\n\nconst _Text = <T extends { variant: TextVariant }>(\n {\n as = 'p',\n variant = 'body',\n weight = 'regular',\n size,\n truncateAfterLines,\n children,\n color,\n testID,\n textAlign,\n textDecorationLine,\n wordBreak,\n ...styledProps\n }: TextProps<T>,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n const props: Omit<BaseTextProps, 'children'> = {\n as,\n truncateAfterLines,\n wordBreak,\n ...getTextProps({\n variant,\n weight,\n color,\n size,\n testID,\n textAlign,\n textDecorationLine,\n }),\n };\n\n useValidateAsProp({ componentName: 'Text', as, validAsValues });\n\n return (\n <BaseText ref={ref} {...props} {...getStyledProps(styledProps)}>\n {children}\n </BaseText>\n );\n};\n\nconst Text = assignWithoutSideEffects(React.forwardRef(_Text), {\n displayName: 'Text',\n componentId: 'Text',\n});\n\nexport { Text, getTextProps };\n"],"names":["validAsValues","getTextProps","_ref","variant","weight","size","_ref$color","color","testID","textAlign","textDecorationLine","props","fontSize","fontWeight","fontStyle","lineHeight","fontFamily","componentName","throwBladeError","moduleName","message","concat","_Text","_ref2","ref","_ref2$as","as","_ref2$variant","_ref2$weight","truncateAfterLines","children","wordBreak","styledProps","_objectWithoutProperties","_excluded","_objectSpread","useValidateAsProp","_jsx","BaseText","getStyledProps","Text","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;AAYA,IAAMA,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAU,CAAA;AA4C/F,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAQyB;AAAA,EAAA,IAPzCC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAAC,UAAA,GAAAJ,IAAA,CACJK,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,0BAA0B,GAAAA,UAAA;IAClCE,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,SAAS,GAAAP,IAAA,CAATO,SAAS;IACTC,kBAAkB,GAAAR,IAAA,CAAlBQ,kBAAkB,CAAA;AAElB,EAAA,IAAMC,KAAyB,GAAG;AAChCJ,IAAAA,KAAK,EAALA,KAAK;AACLK,IAAAA,QAAQ,EAAE,GAAG;AACbC,IAAAA,UA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AAK,CAAC,EAAE;AAC7DsB,EAAAA,WAAW,EAAE,MAAM;AACnBC,EAAAA,WAAW,EAAE,MAAA;AACf,CAAC;;;;"}
|
|
@@ -22,6 +22,7 @@ import './Divider/index.js';
|
|
|
22
22
|
import './Drawer/index.js';
|
|
23
23
|
import './DatePicker/index.js';
|
|
24
24
|
import './Dropdown/index.js';
|
|
25
|
+
import './Fade/index.js';
|
|
25
26
|
import './FileUpload/index.js';
|
|
26
27
|
import './Icons/index.js';
|
|
27
28
|
import './Indicator/index.js';
|
|
@@ -36,16 +37,20 @@ import './Link/index.js';
|
|
|
36
37
|
import './List/index.js';
|
|
37
38
|
import './LiveAnnouncer/index.web.js';
|
|
38
39
|
import './Modal/index.js';
|
|
40
|
+
import './Move/index.js';
|
|
41
|
+
import './Morph/index.js';
|
|
39
42
|
import './Menu/index.js';
|
|
40
43
|
import './Popover/index.js';
|
|
41
44
|
import './ProgressBar/index.js';
|
|
42
45
|
import './Radio/index.js';
|
|
46
|
+
import './Scale/index.js';
|
|
43
47
|
import './SideNav/index.js';
|
|
44
48
|
import './Skeleton/index.js';
|
|
45
49
|
import './SkipNav/index.web.js';
|
|
46
50
|
import './Spinner/index.js';
|
|
47
51
|
import './SpotlightPopoverTour/index.js';
|
|
48
52
|
import './StepGroup/index.js';
|
|
53
|
+
import './Slide/index.js';
|
|
49
54
|
import './Switch/index.js';
|
|
50
55
|
import './Table/index.js';
|
|
51
56
|
import './Tabs/index.js';
|
|
@@ -105,6 +110,7 @@ export { DropdownOverlay } from './Dropdown/DropdownOverlay.web.js';
|
|
|
105
110
|
export { DropdownButton } from './Dropdown/DropdownButton.js';
|
|
106
111
|
export { DropdownLink } from './Dropdown/DropdownLink.js';
|
|
107
112
|
export { DropdownFooter, DropdownHeader } from './Dropdown/DropdownHeaderFooter.js';
|
|
113
|
+
export { Fade } from './Fade/Fade.web.js';
|
|
108
114
|
export { FileUpload } from './FileUpload/FileUpload.web.js';
|
|
109
115
|
export { default as AcceptPaymentsIcon } from './Icons/AcceptPaymentsIcon/AcceptPaymentsIcon.js';
|
|
110
116
|
export { default as ActivityIcon } from './Icons/ActivityIcon/ActivityIcon.js';
|
|
@@ -490,6 +496,8 @@ export { Modal } from './Modal/Modal.web.js';
|
|
|
490
496
|
export { ModalBody } from './Modal/ModalBody.web.js';
|
|
491
497
|
export { ModalHeader } from './Modal/ModalHeader.web.js';
|
|
492
498
|
export { ModalFooter } from './Modal/ModalFooter.web.js';
|
|
499
|
+
export { Move } from './Move/Move.web.js';
|
|
500
|
+
export { Morph } from './Morph/Morph.web.js';
|
|
493
501
|
export { Menu } from './Menu/Menu.web.js';
|
|
494
502
|
export { MenuItem } from './Menu/MenuItem.web.js';
|
|
495
503
|
export { MenuOverlay } from './Menu/MenuOverlay.web.js';
|
|
@@ -500,6 +508,7 @@ export { PopoverInteractiveWrapper } from './Popover/PopoverInteractiveWrapper.w
|
|
|
500
508
|
export { ProgressBar } from './ProgressBar/ProgressBar.js';
|
|
501
509
|
export { Radio } from './Radio/Radio.js';
|
|
502
510
|
export { RadioGroup } from './Radio/RadioGroup/RadioGroup.js';
|
|
511
|
+
export { Scale } from './Scale/Scale.web.js';
|
|
503
512
|
export { SideNav } from './SideNav/SideNav.web.js';
|
|
504
513
|
export { SideNavLink } from './SideNav/SideNavItems/SideNavLink.web.js';
|
|
505
514
|
export { SideNavLevel } from './SideNav/SideNavLevel.web.js';
|
|
@@ -517,6 +526,7 @@ export { SpotlightPopoverTourStep } from './SpotlightPopoverTour/TourStep.web.js
|
|
|
517
526
|
export { StepGroup } from './StepGroup/StepGroup.web.js';
|
|
518
527
|
export { StepItem } from './StepGroup/StepItem.web.js';
|
|
519
528
|
export { StepItemIcon, StepItemIndicator } from './StepGroup/StepItemMarker.js';
|
|
529
|
+
export { Slide } from './Slide/Slide.web.js';
|
|
520
530
|
export { Switch } from './Switch/Switch.js';
|
|
521
531
|
export { Table } from './Table/Table.web.js';
|
|
522
532
|
export { TableHeader, TableHeaderCell, TableHeaderRow } from './Table/TableHeader.web.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|