@razorpay/blade 11.38.1 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/native/components/Accordion/Accordion.js +2 -2
- package/build/lib/native/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionButton.native.js +8 -10
- package/build/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionItemBody.js +7 -8
- package/build/lib/native/components/Accordion/AccordionItemBody.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionItemHeader.js +3 -8
- package/build/lib/native/components/Accordion/AccordionItemHeader.js.map +1 -1
- package/build/lib/native/components/Accordion/commonStyles.js +1 -1
- package/build/lib/native/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionList.js +1 -1
- package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListItem.js +9 -8
- package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js +2 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js.map +1 -1
- package/build/lib/native/components/Alert/Alert.js +4 -3
- package/build/lib/native/components/Alert/Alert.js.map +1 -1
- package/build/lib/native/components/Amount/Amount.js +4 -2
- package/build/lib/native/components/Amount/Amount.js.map +1 -1
- package/build/lib/native/components/Badge/Badge.js +10 -9
- package/build/lib/native/components/Badge/Badge.js.map +1 -1
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +11 -10
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +8 -6
- package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/native/components/BottomNav/BottomNav.native.js +4 -10
- package/build/lib/native/components/BottomNav/BottomNav.native.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/native/components/Box/Box.js +1 -1
- package/build/lib/native/components/Box/Box.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Card/Card.js +1 -1
- package/build/lib/native/components/Card/Card.js.map +1 -1
- package/build/lib/native/components/Card/CardFooter.js +4 -8
- package/build/lib/native/components/Card/CardFooter.js.map +1 -1
- package/build/lib/native/components/Card/CardHeader.js +5 -9
- package/build/lib/native/components/Card/CardHeader.js.map +1 -1
- package/build/lib/native/components/Card/CardRoot.native.js +1 -1
- package/build/lib/native/components/Card/CardRoot.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Carousel.native.js +1 -1
- package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js +1 -1
- package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
- package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/native/components/Checkbox/Checkbox.js +6 -4
- package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js.map +1 -1
- package/build/lib/native/components/Chip/Chip.js +5 -3
- package/build/lib/native/components/Chip/Chip.js.map +1 -1
- package/build/lib/native/components/Chip/ChipGroup.js +4 -3
- package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/native/components/Chip/chipTokens.js +1 -1
- package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/native/components/Collapsible/Collapsible.js +2 -2
- package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/native/components/Collapsible/commonStyles.js +1 -1
- package/build/lib/native/components/Collapsible/commonStyles.js.map +1 -1
- package/build/lib/native/components/Counter/Counter.js +13 -12
- package/build/lib/native/components/Counter/Counter.js.map +1 -1
- package/build/lib/native/components/Divider/Divider.js +2 -2
- package/build/lib/native/components/Divider/Divider.js.map +1 -1
- package/build/lib/native/components/Drawer/Drawer.native.js +4 -10
- package/build/lib/native/components/Drawer/Drawer.native.js.map +1 -1
- package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js +4 -9
- package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +2 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Fade/Fade.native.js +11 -0
- package/build/lib/native/components/Fade/Fade.native.js.map +1 -0
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +3 -9
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/native/components/Form/FormLabel.js +10 -10
- package/build/lib/native/components/Icons/RayIcon/RayIcon.js +12 -0
- package/build/lib/native/components/Icons/RayIcon/RayIcon.js.map +1 -0
- package/build/lib/native/components/Indicator/Indicator.js +7 -6
- package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +3 -3
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +8 -10
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +9 -8
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/native/components/Link/BaseLink/BaseLink.js +1 -1
- package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/native/components/List/List.js +1 -1
- package/build/lib/native/components/List/List.js.map +1 -1
- package/build/lib/native/components/List/ListItem.js +8 -10
- package/build/lib/native/components/List/ListItem.js.map +1 -1
- package/build/lib/native/components/List/ListItemCode.js +3 -9
- package/build/lib/native/components/List/ListItemCode.js.map +1 -1
- package/build/lib/native/components/List/ListItemText.js +3 -8
- package/build/lib/native/components/List/ListItemText.js.map +1 -1
- package/build/lib/native/components/Menu/Menu.native.js +4 -10
- package/build/lib/native/components/Menu/Menu.native.js.map +1 -1
- package/build/lib/native/components/Menu/MenuItem.native.js +4 -10
- package/build/lib/native/components/Menu/MenuItem.native.js.map +1 -1
- package/build/lib/native/components/Menu/MenuOverlay.native.js +4 -10
- package/build/lib/native/components/Menu/MenuOverlay.native.js.map +1 -1
- package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js +4 -10
- package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js.map +1 -1
- package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js +4 -10
- package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js.map +1 -1
- package/build/lib/native/components/Modal/Modal.native.js +4 -9
- package/build/lib/native/components/Modal/Modal.native.js.map +1 -1
- package/build/lib/native/components/Modal/ModalBody.native.js +3 -8
- package/build/lib/native/components/Modal/ModalBody.native.js.map +1 -1
- package/build/lib/native/components/Modal/ModalFooter.native.js +3 -8
- package/build/lib/native/components/Modal/ModalFooter.native.js.map +1 -1
- package/build/lib/native/components/Modal/ModalHeader.native.js +3 -8
- package/build/lib/native/components/Modal/ModalHeader.native.js.map +1 -1
- package/build/lib/native/components/Morph/Morph.native.js +11 -0
- package/build/lib/native/components/Morph/Morph.native.js.map +1 -0
- package/build/lib/native/components/Move/Move.native.js +11 -0
- package/build/lib/native/components/Move/Move.native.js.map +1 -0
- package/build/lib/native/components/Popover/PopoverContent.js +6 -8
- package/build/lib/native/components/Popover/PopoverContent.js.map +1 -1
- package/build/lib/native/components/Popover/PopoverContentWrapper.native.js +1 -1
- package/build/lib/native/components/Popover/PopoverContentWrapper.native.js.map +1 -1
- package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js +7 -9
- package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
- package/build/lib/native/components/ProgressBar/CircularProgressLabel.js +3 -8
- package/build/lib/native/components/ProgressBar/CircularProgressLabel.js.map +1 -1
- package/build/lib/native/components/ProgressBar/ProgressBar.js +2 -2
- package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/native/components/Radio/Radio.js +2 -1
- package/build/lib/native/components/Radio/Radio.js.map +1 -1
- package/build/lib/native/components/Radio/RadioIcon/Fade.native.js +1 -1
- package/build/lib/native/components/Radio/RadioIcon/Fade.native.js.map +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/native/components/Scale/Scale.native.js +11 -0
- package/build/lib/native/components/Scale/Scale.native.js.map +1 -0
- package/build/lib/native/components/SideNav/SideNav.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNav.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavBody.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavBody.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavFooter.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavFooter.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavLevel.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavLevel.native.js.map +1 -1
- package/build/lib/native/components/SideNav/SideNavSection.native.js +4 -10
- package/build/lib/native/components/SideNav/SideNavSection.native.js.map +1 -1
- package/build/lib/native/components/SideNav/tokens.js.map +1 -1
- package/build/lib/native/components/Skeleton/PulseAnimation.native.js +1 -1
- package/build/lib/native/components/Skeleton/PulseAnimation.native.js.map +1 -1
- package/build/lib/native/components/Skeleton/Skeleton.js +2 -2
- package/build/lib/native/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/native/components/Slide/Slide.native.js +11 -0
- package/build/lib/native/components/Slide/Slide.native.js.map +1 -0
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +4 -3
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
- package/build/lib/native/components/Spinner/Spinner/Spinner.js +2 -1
- package/build/lib/native/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/native/components/StepGroup/StepGroup.native.js +4 -10
- package/build/lib/native/components/StepGroup/StepGroup.native.js.map +1 -1
- package/build/lib/native/components/StepGroup/StepItem.native.js +4 -10
- package/build/lib/native/components/StepGroup/StepItem.native.js.map +1 -1
- package/build/lib/native/components/Switch/Switch.js +2 -1
- package/build/lib/native/components/Switch/Switch.js.map +1 -1
- package/build/lib/native/components/Switch/getTrackStyles.js +1 -1
- package/build/lib/native/components/Switch/getTrackStyles.js.map +1 -1
- package/build/lib/native/components/Switch/switchTokens.js +1 -1
- package/build/lib/native/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/native/components/Table/Table.native.js +4 -9
- package/build/lib/native/components/Table/Table.native.js.map +1 -1
- package/build/lib/native/components/Table/TableBody.native.js +3 -8
- package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
- package/build/lib/native/components/Table/TableEditableCell.native.js +3 -9
- package/build/lib/native/components/Table/TableEditableCell.native.js.map +1 -1
- package/build/lib/native/components/Table/TableFooter.native.js +3 -8
- package/build/lib/native/components/Table/TableFooter.native.js.map +1 -1
- package/build/lib/native/components/Table/TableHeader.native.js +3 -8
- package/build/lib/native/components/Table/TableHeader.native.js.map +1 -1
- package/build/lib/native/components/Table/TablePagination.native.js +3 -8
- package/build/lib/native/components/Table/TablePagination.native.js.map +1 -1
- package/build/lib/native/components/Table/TableToolbar.native.js +3 -8
- package/build/lib/native/components/Table/TableToolbar.native.js.map +1 -1
- package/build/lib/native/components/Table/tokens.js.map +1 -1
- package/build/lib/native/components/Tabs/Tabs.native.js +6 -8
- package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
- package/build/lib/native/components/Tag/AnimatedTag.native.js +1 -1
- package/build/lib/native/components/Tag/AnimatedTag.native.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js +3 -2
- package/build/lib/native/components/Tag/Tag.js.map +1 -1
- package/build/lib/native/components/Tooltip/TooltipContent.js +8 -8
- package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js +1 -1
- package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js.map +1 -1
- package/build/lib/native/components/TopNav/TabNav/TabNav.native.js +4 -10
- package/build/lib/native/components/TopNav/TabNav/TabNav.native.js.map +1 -1
- package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js +4 -10
- package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js.map +1 -1
- package/build/lib/native/components/TopNav/TopNav.native.js +4 -10
- package/build/lib/native/components/TopNav/TopNav.native.js.map +1 -1
- package/build/lib/native/components/Typography/Code/Code.js +1 -1
- package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/native/components/Typography/Display/Display.js +2 -2
- package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/native/components/Typography/Heading/Heading.js +2 -2
- package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/native/components/Typography/Text/Text.js +2 -2
- package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/native/components/index.js +6 -0
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/global/motion.js +1 -1
- package/build/lib/native/tokens/global/motion.js.map +1 -1
- package/build/lib/native/utils/getMotionRefs.js +4 -0
- package/build/lib/native/utils/getMotionRefs.js.map +1 -0
- package/build/lib/web/development/components/Accordion/Accordion.js +6 -3
- package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/web/development/components/Accordion/commonStyles.js +1 -1
- package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionList.js +3 -0
- package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/development/components/Alert/Alert.js +6 -3
- package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/development/components/Amount/Amount.js +3 -2
- package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
- package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
- package/build/lib/web/development/components/Badge/Badge.js +4 -2
- package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/development/components/BaseMotion/BaseMotion.js +123 -0
- package/build/lib/web/development/components/BaseMotion/BaseMotion.js.map +1 -0
- package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js +60 -0
- package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js.map +1 -0
- package/build/lib/web/development/components/BaseMotion/index.js +3 -0
- package/build/lib/web/development/components/BaseMotion/index.js.map +1 -0
- package/build/lib/web/development/components/BaseMotion/types.js +2 -0
- package/build/lib/web/development/components/BaseMotion/types.js.map +1 -0
- package/build/lib/web/development/components/BottomNav/BottomNav.web.js +4 -2
- package/build/lib/web/development/components/BottomNav/BottomNav.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/development/components/Box/Box.js +2 -2
- package/build/lib/web/development/components/Box/Box.js.map +1 -1
- package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +3 -1
- package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +1 -1
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +3 -2
- package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/development/components/Card/Card.js +3 -1
- package/build/lib/web/development/components/Card/Card.js.map +1 -1
- package/build/lib/web/development/components/Card/CardRoot.web.js +6 -4
- package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Carousel.web.js +6 -3
- package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
- package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
- package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/Checkbox.js +13 -3
- package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
- package/build/lib/web/development/components/Chip/Chip.js +11 -2
- package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/development/components/Chip/ChipGroup.js +5 -2
- package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/web/development/components/Chip/chipTokens.js +1 -1
- package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/Collapsible.js +6 -3
- package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/web/development/components/Collapsible/commonStyles.js +2 -2
- package/build/lib/web/development/components/Collapsible/commonStyles.js.map +1 -1
- package/build/lib/web/development/components/Counter/Counter.js +4 -2
- package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/development/components/Divider/Divider.js +4 -2
- package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/development/components/Drawer/Drawer.web.js +4 -4
- package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -3
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Fade/Fade.web.js +62 -0
- package/build/lib/web/development/components/Fade/Fade.web.js.map +1 -0
- package/build/lib/web/development/components/Fade/index.js +2 -0
- package/build/lib/web/development/components/Fade/index.js.map +1 -0
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js +11 -2
- package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/development/components/FileUpload/fileUploadTokens.js +1 -1
- package/build/lib/web/development/components/FileUpload/fileUploadTokens.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/development/components/Icons/RayIcon/RayIcon.js +37 -0
- package/build/lib/web/development/components/Icons/RayIcon/RayIcon.js.map +1 -0
- package/build/lib/web/development/components/Icons/RayIcon/index.js +2 -0
- package/build/lib/web/development/components/Icons/RayIcon/index.js.map +1 -0
- package/build/lib/web/development/components/Icons/index.js +1 -0
- package/build/lib/web/development/components/Icons/index.js.map +1 -1
- package/build/lib/web/development/components/Indicator/Indicator.js +4 -2
- package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +21 -7
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +1 -1
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/development/components/List/List.js +5 -3
- package/build/lib/web/development/components/List/List.js.map +1 -1
- package/build/lib/web/development/components/Modal/Modal.web.js +2 -2
- package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalBackdrop.js +2 -2
- package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
- package/build/lib/web/development/components/Morph/Morph.web.js +48 -0
- package/build/lib/web/development/components/Morph/Morph.web.js.map +1 -0
- package/build/lib/web/development/components/Morph/index.js +2 -0
- package/build/lib/web/development/components/Morph/index.js.map +1 -0
- package/build/lib/web/development/components/Move/Move.web.js +66 -0
- package/build/lib/web/development/components/Move/Move.web.js.map +1 -0
- package/build/lib/web/development/components/Move/index.js +2 -0
- package/build/lib/web/development/components/Move/index.js.map +1 -0
- package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js +1 -1
- package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js +8 -4
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/development/components/Radio/Radio.js +13 -3
- package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js +3 -3
- package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/Scale/Scale.web.js +47 -0
- package/build/lib/web/development/components/Scale/Scale.web.js.map +1 -0
- package/build/lib/web/development/components/Scale/index.js +2 -0
- package/build/lib/web/development/components/Scale/index.js.map +1 -0
- package/build/lib/web/development/components/SideNav/SideNav.web.js +7 -5
- package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
- package/build/lib/web/development/components/SideNav/tokens.js +1 -1
- package/build/lib/web/development/components/SideNav/tokens.js.map +1 -1
- package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js +1 -1
- package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js.map +1 -1
- package/build/lib/web/development/components/Skeleton/Skeleton.js +4 -1
- package/build/lib/web/development/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/web/development/components/Slide/Slide.web.js +119 -0
- package/build/lib/web/development/components/Slide/Slide.web.js.map +1 -0
- package/build/lib/web/development/components/Slide/index.js +2 -0
- package/build/lib/web/development/components/Slide/index.js.map +1 -0
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
- package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
- package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +4 -1
- package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
- package/build/lib/web/development/components/Stagger/StaggerProvider.js +13 -0
- package/build/lib/web/development/components/Stagger/StaggerProvider.js.map +1 -0
- package/build/lib/web/development/components/StepGroup/StepGroup.web.js +5 -3
- package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
- package/build/lib/web/development/components/StepGroup/StepItem.web.js +1 -1
- package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
- package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js +1 -1
- package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
- package/build/lib/web/development/components/Switch/Switch.js +13 -3
- package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
- package/build/lib/web/development/components/Switch/getTrackStyles.js +1 -1
- package/build/lib/web/development/components/Switch/getTrackStyles.js.map +1 -1
- package/build/lib/web/development/components/Switch/switchTokens.js +6 -6
- package/build/lib/web/development/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/web/development/components/Table/Table.web.js +4 -2
- package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/development/components/Table/tokens.js +2 -2
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabIndicator.web.js +1 -1
- package/build/lib/web/development/components/Tabs/TabIndicator.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabItem.web.js +2 -2
- package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/Tabs.web.js +34 -1
- package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js +2 -2
- package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/development/components/Tag/Tag.js +31 -29
- package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
- package/build/lib/web/development/components/Toast/Toast.web.js.map +1 -1
- package/build/lib/web/development/components/Toast/ToastContainer.web.js +1 -1
- package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
- package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js +2 -2
- package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
- package/build/lib/web/development/components/TopNav/TopNav.web.js +4 -2
- package/build/lib/web/development/components/TopNav/TopNav.web.js.map +1 -1
- package/build/lib/web/development/components/Typography/Code/Code.js +30 -27
- package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/web/development/components/Typography/Display/Display.js +6 -2
- package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/web/development/components/Typography/Heading/Heading.js +4 -1
- package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/web/development/components/Typography/Text/Text.js +6 -10
- package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/development/components/index.js +11 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/global/motion.js +22 -28
- package/build/lib/web/development/tokens/global/motion.js.map +1 -1
- package/build/lib/web/development/utils/cssBezierToArray.js +12 -0
- package/build/lib/web/development/utils/cssBezierToArray.js.map +1 -0
- package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
- package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
- package/build/lib/web/development/utils/getMotionRefs.js +86 -0
- package/build/lib/web/development/utils/getMotionRefs.js.map +1 -0
- package/build/lib/web/development/utils/msToSeconds.js +6 -0
- package/build/lib/web/development/utils/msToSeconds.js.map +1 -0
- package/build/lib/web/production/components/Accordion/Accordion.js +6 -3
- package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
- package/build/lib/web/production/components/Accordion/commonStyles.js +1 -1
- package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionList.js +3 -0
- package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/production/components/Alert/Alert.js +6 -3
- package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/production/components/Amount/Amount.js +3 -2
- package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
- package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
- package/build/lib/web/production/components/Badge/Badge.js +4 -2
- package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/production/components/BaseMotion/BaseMotion.js +123 -0
- package/build/lib/web/production/components/BaseMotion/BaseMotion.js.map +1 -0
- package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js +60 -0
- package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js.map +1 -0
- package/build/lib/web/production/components/BaseMotion/index.js +3 -0
- package/build/lib/web/production/components/BaseMotion/index.js.map +1 -0
- package/build/lib/web/production/components/BaseMotion/types.js +2 -0
- package/build/lib/web/production/components/BaseMotion/types.js.map +1 -0
- package/build/lib/web/production/components/BottomNav/BottomNav.web.js +4 -2
- package/build/lib/web/production/components/BottomNav/BottomNav.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/web/production/components/Box/Box.js +2 -2
- package/build/lib/web/production/components/Box/Box.js.map +1 -1
- package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +3 -1
- package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +1 -1
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +3 -2
- package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
- package/build/lib/web/production/components/Card/Card.js +3 -1
- package/build/lib/web/production/components/Card/Card.js.map +1 -1
- package/build/lib/web/production/components/Card/CardRoot.web.js +6 -4
- package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Carousel.web.js +6 -3
- package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
- package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
- package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/Checkbox.js +13 -3
- package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
- package/build/lib/web/production/components/Chip/Chip.js +11 -2
- package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/production/components/Chip/ChipGroup.js +5 -2
- package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/web/production/components/Chip/chipTokens.js +1 -1
- package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/Collapsible.js +6 -3
- package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
- package/build/lib/web/production/components/Collapsible/commonStyles.js +2 -2
- package/build/lib/web/production/components/Collapsible/commonStyles.js.map +1 -1
- package/build/lib/web/production/components/Counter/Counter.js +4 -2
- package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/production/components/Divider/Divider.js +4 -2
- package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/production/components/Drawer/Drawer.web.js +4 -4
- package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -3
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Fade/Fade.web.js +62 -0
- package/build/lib/web/production/components/Fade/Fade.web.js.map +1 -0
- package/build/lib/web/production/components/Fade/index.js +2 -0
- package/build/lib/web/production/components/Fade/index.js.map +1 -0
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js +11 -2
- package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
- package/build/lib/web/production/components/FileUpload/fileUploadTokens.js +1 -1
- package/build/lib/web/production/components/FileUpload/fileUploadTokens.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/production/components/Icons/RayIcon/RayIcon.js +37 -0
- package/build/lib/web/production/components/Icons/RayIcon/RayIcon.js.map +1 -0
- package/build/lib/web/production/components/Icons/RayIcon/index.js +2 -0
- package/build/lib/web/production/components/Icons/RayIcon/index.js.map +1 -0
- package/build/lib/web/production/components/Icons/index.js +1 -0
- package/build/lib/web/production/components/Icons/index.js.map +1 -1
- package/build/lib/web/production/components/Indicator/Indicator.js +4 -2
- package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +21 -7
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +1 -1
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/production/components/List/List.js +5 -3
- package/build/lib/web/production/components/List/List.js.map +1 -1
- package/build/lib/web/production/components/Modal/Modal.web.js +2 -2
- package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalBackdrop.js +2 -2
- package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
- package/build/lib/web/production/components/Morph/Morph.web.js +48 -0
- package/build/lib/web/production/components/Morph/Morph.web.js.map +1 -0
- package/build/lib/web/production/components/Morph/index.js +2 -0
- package/build/lib/web/production/components/Morph/index.js.map +1 -0
- package/build/lib/web/production/components/Move/Move.web.js +66 -0
- package/build/lib/web/production/components/Move/Move.web.js.map +1 -0
- package/build/lib/web/production/components/Move/index.js +2 -0
- package/build/lib/web/production/components/Move/index.js.map +1 -0
- package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js +1 -1
- package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js +8 -4
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/production/components/Radio/Radio.js +13 -3
- package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js +3 -3
- package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/Scale/Scale.web.js +47 -0
- package/build/lib/web/production/components/Scale/Scale.web.js.map +1 -0
- package/build/lib/web/production/components/Scale/index.js +2 -0
- package/build/lib/web/production/components/Scale/index.js.map +1 -0
- package/build/lib/web/production/components/SideNav/SideNav.web.js +7 -5
- package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
- package/build/lib/web/production/components/SideNav/tokens.js +1 -1
- package/build/lib/web/production/components/SideNav/tokens.js.map +1 -1
- package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js +1 -1
- package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js.map +1 -1
- package/build/lib/web/production/components/Skeleton/Skeleton.js +4 -1
- package/build/lib/web/production/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/web/production/components/Slide/Slide.web.js +119 -0
- package/build/lib/web/production/components/Slide/Slide.web.js.map +1 -0
- package/build/lib/web/production/components/Slide/index.js +2 -0
- package/build/lib/web/production/components/Slide/index.js.map +1 -0
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
- package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
- package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +4 -1
- package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
- package/build/lib/web/production/components/Stagger/StaggerProvider.js +13 -0
- package/build/lib/web/production/components/Stagger/StaggerProvider.js.map +1 -0
- package/build/lib/web/production/components/StepGroup/StepGroup.web.js +5 -3
- package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
- package/build/lib/web/production/components/StepGroup/StepItem.web.js +1 -1
- package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
- package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js +1 -1
- package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
- package/build/lib/web/production/components/Switch/Switch.js +13 -3
- package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
- package/build/lib/web/production/components/Switch/getTrackStyles.js +1 -1
- package/build/lib/web/production/components/Switch/getTrackStyles.js.map +1 -1
- package/build/lib/web/production/components/Switch/switchTokens.js +6 -6
- package/build/lib/web/production/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/web/production/components/Table/Table.web.js +4 -2
- package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/production/components/Table/tokens.js +2 -2
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabIndicator.web.js +1 -1
- package/build/lib/web/production/components/Tabs/TabIndicator.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabItem.web.js +2 -2
- package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/Tabs.web.js +34 -1
- package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js +2 -2
- package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
- package/build/lib/web/production/components/Tag/Tag.js +31 -29
- package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
- package/build/lib/web/production/components/Toast/Toast.web.js.map +1 -1
- package/build/lib/web/production/components/Toast/ToastContainer.web.js +1 -1
- package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
- package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js +2 -2
- package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
- package/build/lib/web/production/components/TopNav/TopNav.web.js +4 -2
- package/build/lib/web/production/components/TopNav/TopNav.web.js.map +1 -1
- package/build/lib/web/production/components/Typography/Code/Code.js +30 -27
- package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/web/production/components/Typography/Display/Display.js +6 -2
- package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/web/production/components/Typography/Heading/Heading.js +4 -1
- package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/web/production/components/Typography/Text/Text.js +6 -10
- package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/production/components/index.js +11 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/global/motion.js +22 -28
- package/build/lib/web/production/tokens/global/motion.js.map +1 -1
- package/build/lib/web/production/utils/cssBezierToArray.js +12 -0
- package/build/lib/web/production/utils/cssBezierToArray.js.map +1 -0
- package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
- package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
- package/build/lib/web/production/utils/getMotionRefs.js +86 -0
- package/build/lib/web/production/utils/getMotionRefs.js.map +1 -0
- package/build/lib/web/production/utils/msToSeconds.js +6 -0
- package/build/lib/web/production/utils/msToSeconds.js.map +1 -0
- package/build/types/components/index.d.ts +17969 -5488
- package/build/types/components/index.native.d.ts +7924 -2157
- package/build/types/tokens/index.d.ts +103 -93
- package/build/types/tokens/index.native.d.ts +103 -93
- package/build/types/utils/index.d.ts +84 -71
- package/build/types/utils/index.native.d.ts +84 -71
- package/codemods/migrate-motion-tokens/transformers/__tests__/migrate-motion-tokens.test.ts +130 -0
- package/codemods/migrate-motion-tokens/transformers/index.ts +1 -0
- package/codemods/migrate-motion-tokens/transformers/migrate-motion.ts +24 -0
- package/codemods/migrate-motion-tokens/transformers/motionTokenMapping.json +11 -0
- package/package.json +3 -1
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '
|
|
3
|
-
import '../Typography/BaseText/BaseText.native.js';
|
|
4
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
5
|
-
import 'react-native';
|
|
6
|
-
import '../../tokens/global/typography.js';
|
|
7
|
-
import '../../tokens/global/motion.js';
|
|
8
|
-
import '../BladeProvider/useTheme.js';
|
|
9
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '../Typography/Heading/Heading.js';
|
|
10
3
|
import { Text } from '../Typography/Text/Text.js';
|
|
11
4
|
import '../Typography/Code/Code.js';
|
|
5
|
+
import '../Typography/Display/Display.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
12
7
|
|
|
13
8
|
var TableHeader=function TableHeader(props){return jsx(Text,{children:"Table Component is not available for Native mobile apps."});};var TableHeaderRow=function TableHeaderRow(props){return jsx(Text,{children:"Table Component is not available for Native mobile apps."});};var TableHeaderCell=function TableHeaderCell(props){return jsx(Text,{children:"Table Component is not available for Native mobile apps."});};
|
|
14
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.native.js","sources":["../../../../../src/components/Table/TableHeader.native.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport type { TableHeaderCellProps, TableHeaderProps, TableHeaderRowProps } from './types';\nimport { Text } from '~components/Typography';\n\nconst TableHeader = (props: TableHeaderProps): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nconst TableHeaderRow = (props: TableHeaderRowProps): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nconst TableHeaderCell = (props: TableHeaderCellProps): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TableHeader, TableHeaderRow, TableHeaderCell };\n"],"names":["TableHeader","props","_jsx","Text","children","TableHeaderRow","TableHeaderCell"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableHeader.native.js","sources":["../../../../../src/components/Table/TableHeader.native.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport type { TableHeaderCellProps, TableHeaderProps, TableHeaderRowProps } from './types';\nimport { Text } from '~components/Typography';\n\nconst TableHeader = (props: TableHeaderProps): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nconst TableHeaderRow = (props: TableHeaderRowProps): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nconst TableHeaderCell = (props: TableHeaderCellProps): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TableHeader, TableHeaderRow, TableHeaderCell };\n"],"names":["TableHeader","props","_jsx","Text","children","TableHeaderRow","TableHeaderCell"],"mappings":";;;;;;;AAMM,IAAAA,WAAW,CAAG,SAAdA,WAAWA,CAAIC,KAAuB,CAAyB,CACnE,OAAOC,GAAA,CAACC,IAAI,CAAAC,CAAAA,QAAA,CAAC,0DAAwD,CAAM,CAAC,CAC9E,EAEM,IAAAC,cAAc,CAAG,SAAjBA,cAAcA,CAAIJ,KAA0B,CAAyB,CACzE,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,0DAAwD,CAAM,CAAC,CAC9E,EAEM,IAAAE,eAAe,CAAG,SAAlBA,eAAeA,CAAIL,KAA2B,CAAyB,CAC3E,OAAOC,GAAA,CAACC,IAAI,EAAAC,QAAA,CAAC,0DAAwD,CAAM,CAAC,CAC9E;;;;"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '
|
|
3
|
-
import '../Typography/BaseText/BaseText.native.js';
|
|
4
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
5
|
-
import 'react-native';
|
|
6
|
-
import '../../tokens/global/typography.js';
|
|
7
|
-
import '../../tokens/global/motion.js';
|
|
8
|
-
import '../BladeProvider/useTheme.js';
|
|
9
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '../Typography/Heading/Heading.js';
|
|
10
3
|
import { Text } from '../Typography/Text/Text.js';
|
|
11
4
|
import '../Typography/Code/Code.js';
|
|
5
|
+
import '../Typography/Display/Display.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
12
7
|
|
|
13
8
|
var TablePagination=function TablePagination(props){return jsx(Text,{children:"Table Component is not available for Native mobile apps."});};
|
|
14
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePagination.native.js","sources":["../../../../../src/components/Table/TablePagination.native.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport { Text } from '~components/Typography';\n\ntype TablePaginationProps = unknown;\n\nconst TablePagination = (props: TablePaginationProps): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TablePagination };\n"],"names":["TablePagination","props","_jsx","Text","children"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TablePagination.native.js","sources":["../../../../../src/components/Table/TablePagination.native.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport { Text } from '~components/Typography';\n\ntype TablePaginationProps = unknown;\n\nconst TablePagination = (props: TablePaginationProps): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TablePagination };\n"],"names":["TablePagination","props","_jsx","Text","children"],"mappings":";;;;;;;AAOM,IAAAA,eAAe,CAAG,SAAlBA,eAAeA,CAAIC,KAA2B,CAAyB,CAC3E,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,0DAAwD,CAAM,CAAC,CAC9E;;;;"}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '
|
|
3
|
-
import '../Typography/BaseText/BaseText.native.js';
|
|
4
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
5
|
-
import 'react-native';
|
|
6
|
-
import '../../tokens/global/typography.js';
|
|
7
|
-
import '../../tokens/global/motion.js';
|
|
8
|
-
import '../BladeProvider/useTheme.js';
|
|
9
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import '../Typography/Heading/Heading.js';
|
|
10
3
|
import { Text } from '../Typography/Text/Text.js';
|
|
11
4
|
import '../Typography/Code/Code.js';
|
|
5
|
+
import '../Typography/Display/Display.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
12
7
|
|
|
13
8
|
var TableToolbar=function TableToolbar(props){return jsx(Text,{children:"Table Component is not available for Native mobile apps."});};var TableToolbarActions=function TableToolbarActions(props){return jsx(Text,{children:"Table Component is not available for Native mobile apps."});};
|
|
14
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableToolbar.native.js","sources":["../../../../../src/components/Table/TableToolbar.native.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport { Text } from '~components/Typography';\n\nconst TableToolbar = (props: unknown): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nconst TableToolbarActions = (props: unknown): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TableToolbar, TableToolbarActions };\n"],"names":["TableToolbar","props","_jsx","Text","children","TableToolbarActions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableToolbar.native.js","sources":["../../../../../src/components/Table/TableToolbar.native.tsx"],"sourcesContent":["/* eslint-disable react/no-unused-prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport { Text } from '~components/Typography';\n\nconst TableToolbar = (props: unknown): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nconst TableToolbarActions = (props: unknown): React.ReactElement => {\n return <Text>Table Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TableToolbar, TableToolbarActions };\n"],"names":["TableToolbar","props","_jsx","Text","children","TableToolbarActions"],"mappings":";;;;;;;AAKM,IAAAA,YAAY,CAAG,SAAfA,YAAYA,CAAIC,KAAc,CAAyB,CAC3D,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,0DAAwD,CAAM,CAAC,CAC9E,EAEM,IAAAC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIJ,KAAc,CAAyB,CAClE,OAAOC,GAAA,CAACC,IAAI,CAAAC,CAAAA,QAAA,CAAC,0DAAwD,CAAM,CAAC,CAC9E;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'interactive.background.gray.default',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.default',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.faded',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.faded',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard
|
|
1
|
+
{"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'interactive.background.gray.default',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.default',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.faded',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.faded',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tablePagination = {\n padding: 'spacing.4',\n pageSelectionButton: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.highlighted',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n padding: 'spacing.2',\n borderRadius: 'small',\n focusRingColor: 'surface.border.primary.muted',\n textColor: 'surface.text.gray.subtle',\n textColorSelected: 'surface.text.primary.normal',\n height: size['32'],\n width: size['32'],\n },\n defaultPageSize: 10,\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'medium',\n normal: 'large',\n comfortable: 'medium',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nconst classes = {\n HOVER_ACTIONS: 'hover-actions',\n HOVER_ACTIONS_LAYER2: 'hover-actions-layer-2',\n HOVER_ACTIONS_LAYER3: 'hover-actions-layer-3',\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n classes,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;;;;;;;;;;;;;AAyHM,IAAAA,yCAAyC,CAAG,CAChDC,OAAO,CAAE,QAAQ,CACjBC,MAAM,CAAE,OAAO,CACfC,WAAW,CAAE,QACf,EAEM,IAAAC,qCAAqC,CAAG,CAC5CC,IAAI,CAAEC,SAAS,CACfC,OAAO,CAAEC,SAAS,CAClBC,KAAK,CAAEC,eACT,EAEM,IAAAC,mCAAmC,CAAG,CAC1CR,WAAW,CAAE,KAAK,CAClBD,MAAM,CAAE,IAAI,CACZD,OAAO,CAAE,IACX;;;;"}
|
|
@@ -10,26 +10,24 @@ import { useTabsItemPropRestriction, iconSizeMap } from './utils.js';
|
|
|
10
10
|
import { TabIndicator } from './TabIndicator.native.js';
|
|
11
11
|
import { SafeSceneMap } from './SafeSceneMap.native.js';
|
|
12
12
|
import { getComponentId } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
|
|
13
|
-
import '
|
|
14
|
-
import '../Typography/BaseText/BaseText.native.js';
|
|
15
|
-
import getIn from '../../utils/lodashButBetter/get.js';
|
|
16
|
-
import '../../tokens/global/typography.js';
|
|
17
|
-
import '../../tokens/global/motion.js';
|
|
18
|
-
import useTheme from '../BladeProvider/useTheme.js';
|
|
19
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
|
+
import '../Typography/Heading/Heading.js';
|
|
20
14
|
import { Text } from '../Typography/Text/Text.js';
|
|
21
15
|
import '../Typography/Code/Code.js';
|
|
16
|
+
import '../Typography/Display/Display.js';
|
|
22
17
|
import { Box } from '../Box/Box.js';
|
|
23
18
|
import 'styled-components/native';
|
|
24
19
|
import '@gorhom/portal';
|
|
25
20
|
import 'react-native-gesture-handler';
|
|
21
|
+
import useTheme from '../BladeProvider/useTheme.js';
|
|
26
22
|
import '../BottomSheet/BottomSheetStack.js';
|
|
23
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
27
24
|
import { useControllableState } from '../../utils/useControllable.js';
|
|
28
25
|
import { Divider } from '../Divider/Divider.js';
|
|
29
26
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js';
|
|
30
27
|
import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
28
|
+
import getIn from '../../utils/lodashButBetter/get.js';
|
|
31
29
|
|
|
32
|
-
var initialLayout={height:0,width:Dimensions.get('window').width};var getTabs=function getTabs(node){var children=React__default.Children.toArray(node);var tabList=children.find(function(child){return getComponentId(child)==='TabList';});if(!tabList||!React__default.isValidElement(tabList)){throw new Error('TabList is required');}return tabList.props.children;};var getTabPanels=function getTabPanels(node){var children=React__default.Children.toArray(node);return children.filter(function(child){return getComponentId(child)==='TabPanel';}).reduce(function(prev,curr){return Object.assign({},prev,_defineProperty({},curr.props.value,function(){return curr.props.children;}));},{});};var getRoutes=function getRoutes(tabs){return tabs.map(function(TabComponent,index){return {index:index,title:TabComponent.props.children,key:TabComponent.props.value,value:TabComponent.props.value,leading:TabComponent.props.leading,trailing:TabComponent.props.trailing};});};var getRouteIndexFromValue=function getRouteIndexFromValue(_ref){var value=_ref.value,routes=_ref.routes;return routes.findIndex(function(route){return route.value===value;});};var getRouteValueFromIndex=function getRouteValueFromIndex(_ref2){var _routes$find;var index=_ref2.index,routes=_ref2.routes;return (_routes$find=routes.find(function(route){return route.index===index;}))==null?void 0:_routes$find.value;};var
|
|
30
|
+
var initialLayout={height:0,width:Dimensions.get('window').width};var getTabs=function getTabs(node){var children=React__default.Children.toArray(node);var tabList=children.find(function(child){return getComponentId(child)==='TabList';});if(!tabList||!React__default.isValidElement(tabList)){throw new Error('TabList is required');}return tabList.props.children;};var getTabPanels=function getTabPanels(node){var children=React__default.Children.toArray(node);return children.filter(function(child){return getComponentId(child)==='TabPanel';}).reduce(function(prev,curr){return Object.assign({},prev,_defineProperty({},curr.props.value,function(){return curr.props.children;}));},{});};var getRoutes=function getRoutes(tabs){return tabs.map(function(TabComponent,index){return {index:index,title:TabComponent.props.children,key:TabComponent.props.value,value:TabComponent.props.value,leading:TabComponent.props.leading,trailing:TabComponent.props.trailing};});};var getRouteIndexFromValue=function getRouteIndexFromValue(_ref){var value=_ref.value,routes=_ref.routes;return routes.findIndex(function(route){return route.value===value;});};var getRouteValueFromIndex=function getRouteValueFromIndex(_ref2){var _routes$find;var index=_ref2.index,routes=_ref2.routes;return (_routes$find=routes.find(function(route){return route.index===index;}))==null?void 0:_routes$find.value;};var _Tabs=function _Tabs(_ref3){var children=_ref3.children,defaultValue=_ref3.defaultValue,value=_ref3.value,_onChange=_ref3.onChange,_ref3$size=_ref3.size,size=_ref3$size===void 0?'medium':_ref3$size,_ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'bordered':_ref3$variant,_ref3$isFullWidthTabI=_ref3.isFullWidthTabItem,isFullWidthTabItem=_ref3$isFullWidthTabI===void 0?false:_ref3$isFullWidthTabI,_ref3$isLazy=_ref3.isLazy,isLazy=_ref3$isLazy===void 0?false:_ref3$isLazy;var _useTheme=useTheme(),theme=_useTheme.theme;var tabs=getTabs(children);var panels=getTabPanels(children);var routes=getRoutes(tabs);var isFilled=variant==='filled';var _useControllableState=useControllableState({defaultValue:defaultValue,value:value,onChange:function onChange(value){_onChange==null?void 0:_onChange(value);}}),_useControllableState2=_slicedToArray(_useControllableState,2),selectedValue=_useControllableState2[0],setSelectedValue=_useControllableState2[1];var routeIndex=getRouteIndexFromValue({value:selectedValue,routes:routes});var setIndex=React__default.useCallback(function(index){var skipUpdate=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var value=getRouteValueFromIndex({index:index,routes:routes});setSelectedValue(function(){return value;},skipUpdate);},[routes,setSelectedValue]);var isVertical=false;var contextValue={baseId:'',selectedValue:selectedValue,isVertical:isVertical,size:size,variant:variant,isFullWidthTabItem:isFullWidthTabItem};React__default.useLayoutEffect(function(){if(selectedValue)return;setIndex(0,true);},[selectedValue,setIndex]);var renderTabLabel=React__default.useCallback(function(_ref4){var route=_ref4.route,focused=_ref4.focused;var title=route.title,Leading=route.leading,trailing=route.trailing;var selectedState=focused?'selected':'unselected';var validatedTrailingComponent=useTabsItemPropRestriction(trailing,size);return jsx(StyledTabButton,Object.assign({size:size,variant:variant,isFullWidthTabItem:!isFullWidthTabItem&&!isFilled},metaAttribute({name:MetaConstants.TabItem}),{children:jsxs(Box,{display:"flex",alignItems:"center",flexDirection:"row",gap:"spacing.3",children:[Leading?jsx(Leading,{size:iconSizeMap[size],color:iconColor[selectedState].default}):null,jsx(Text,{color:textColor[selectedState].default,size:size==='medium'?'medium':'large',weight:"semibold",children:title}),validatedTrailingComponent]})}));},[isFullWidthTabItem,isFilled,size,variant]);var renderTabBar=React__default.useCallback(function(props){return jsx(TabBar,Object.assign({},props,metaAttribute({name:MetaConstants.TabList}),{gap:0,android_ripple:{borderless:true,color:'transparent'},scrollEnabled:!isFullWidthTabItem&&!isFilled,tabStyle:{padding:0,margin:0,minHeight:0},style:Object.assign({},isFilled?{shadowOpacity:0,shadowColor:'transparent',borderRadius:theme.border.radius.small,borderWidth:theme.border.width.thick,borderColor:theme.colors.interactive.border.gray.faded,backgroundColor:theme.colors.surface.background.gray.intense,padding:theme.spacing[2]}:Object.assign({shadowOpacity:0,shadowColor:'transparent',backgroundColor:'transparent'},variant!=='borderless'&&{borderBottomColor:getIn(theme.colors,trackColor),borderBottomWidth:theme.border.width.thin})),renderIndicator:TabIndicator,renderLabel:renderTabLabel,renderBadge:function renderBadge(){if(!isFilled)return null;if(routeIndex===0){return null;}return jsx(Divider,{left:"1px",height:"20px",variant:"normal",orientation:"vertical",top:size==='large'?'6px':'4px'});}}));},[isFullWidthTabItem,isFilled,renderTabLabel]);return jsx(TabsContext.Provider,{value:contextValue,children:jsx(TabView,{navigationState:{index:routeIndex,routes:routes},renderScene:SafeSceneMap(panels),renderTabBar:renderTabBar,onIndexChange:function onIndexChange(idx){setIndex(idx);},initialLayout:initialLayout,lazy:isLazy})});};var Tabs=React__default.forwardRef(_Tabs);
|
|
33
31
|
|
|
34
32
|
export { Tabs };
|
|
35
33
|
//# sourceMappingURL=Tabs.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.native.js","sources":["../../../../../src/components/Tabs/Tabs.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */\n/* eslint-disable babel/new-cap */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport React from 'react';\nimport { TabBar, TabView } from 'react-native-tab-view';\nimport { Dimensions } from 'react-native';\nimport type { TabsProps } from './types';\nimport { TabsContext } from './TabsContext';\nimport { StyledTabButton } from './TabItem.native';\nimport { iconColor, textColor, trackColor } from './tabTokens';\nimport { iconSizeMap, useTabsItemPropRestriction } from './utils';\nimport { TabIndicator } from './TabIndicator';\nimport { SafeSceneMap } from './SafeSceneMap.native';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { Text } from '~components/Typography';\nimport { Box } from '~components/Box';\nimport { useTheme } from '~components/BladeProvider';\nimport { useControllableState } from '~utils/useControllable';\nimport { Divider } from '~components/Divider';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport getIn from '~utils/lodashButBetter/get';\n\nconst initialLayout = {\n height: 0,\n width: Dimensions.get('window').width,\n};\n\nconst getTabs = (node: React.ReactNode): React.ReactElement[] => {\n const children = React.Children.toArray(node);\n const tabList = children.find((child) => getComponentId(child) === 'TabList');\n if (!tabList || !React.isValidElement(tabList)) {\n throw new Error('TabList is required');\n }\n\n return tabList.props.children;\n};\n\nconst getTabPanels = (node: React.ReactNode): Record<string, () => React.ReactElement> => {\n const children = React.Children.toArray(node) as React.ReactElement[];\n return children\n .filter((child) => getComponentId(child) === 'TabPanel')\n .reduce((prev, curr) => {\n return { ...prev, [curr.props.value]: () => curr.props.children };\n }, {});\n};\n\nconst getRoutes = (tabs: React.ReactElement[]) => {\n return tabs.map((TabComponent, index) => ({\n index,\n title: TabComponent.props.children,\n key: TabComponent.props.value,\n value: TabComponent.props.value,\n leading: TabComponent.props.leading,\n trailing: TabComponent.props.trailing,\n }));\n};\n\ntype Route = {\n value?: string;\n index?: number;\n};\n\nconst getRouteIndexFromValue = ({ value, routes }: { value?: string; routes: Route[] }) =>\n routes.findIndex((route) => route.value === value);\n\nconst getRouteValueFromIndex = ({ index, routes }: { index?: number; routes: Route[] }) =>\n routes.find((route) => route.index === index)?.value!;\n\nconst Tabs = ({\n children,\n defaultValue,\n value,\n onChange,\n size = 'medium',\n variant = 'bordered',\n isFullWidthTabItem = false,\n isLazy = false,\n}: TabsProps): React.ReactElement => {\n const { theme } = useTheme();\n const tabs = getTabs(children);\n const panels = getTabPanels(children);\n const routes = getRoutes(tabs);\n const isFilled = variant === 'filled';\n\n const [selectedValue, setSelectedValue] = useControllableState({\n defaultValue,\n value,\n onChange: (value) => {\n onChange?.(value);\n },\n });\n\n const routeIndex = getRouteIndexFromValue({\n value: selectedValue,\n routes,\n });\n\n const setIndex = React.useCallback(\n (index: number, skipUpdate = false) => {\n const value = getRouteValueFromIndex({ index, routes });\n // If skipUpdate is true, useControlledState will not call the onChange callback\n // This is useful when we want to set the initial value\n setSelectedValue(() => value, skipUpdate);\n },\n [routes, setSelectedValue],\n );\n\n // In mobile we can't have vertical tabs because of the lack of screen space\n // So we always set it to false\n const isVertical = false;\n const contextValue = {\n baseId: '',\n selectedValue,\n isVertical,\n size,\n variant,\n isFullWidthTabItem,\n };\n\n // Set initial value\n React.useLayoutEffect(() => {\n if (selectedValue) return;\n setIndex(0, true);\n }, [selectedValue, setIndex]);\n\n const renderTabLabel = React.useCallback(\n ({\n route,\n focused,\n }: {\n route: { title: string; leading?: React.ComponentType<any>; trailing?: React.ReactNode };\n focused: boolean;\n }) => {\n const { title, leading: Leading, trailing } = route;\n const selectedState = focused ? 'selected' : 'unselected';\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const validatedTrailingComponent = useTabsItemPropRestriction(trailing, size);\n\n return (\n <StyledTabButton\n size={size}\n variant={variant}\n isFullWidthTabItem={!isFullWidthTabItem && !isFilled}\n {...metaAttribute({ name: MetaConstants.TabItem })}\n >\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\" gap=\"spacing.3\">\n {Leading ? (\n <Leading size={iconSizeMap[size]} color={iconColor[selectedState].default} />\n ) : null}\n <Text\n color={textColor[selectedState].default}\n size={size === 'medium' ? 'medium' : 'large'}\n weight=\"semibold\"\n >\n {title}\n </Text>\n {validatedTrailingComponent}\n </Box>\n </StyledTabButton>\n );\n },\n [isFullWidthTabItem, isFilled, size, variant],\n );\n\n const renderTabBar = React.useCallback(\n (props: any) => (\n <TabBar\n {...props}\n {...metaAttribute({ name: MetaConstants.TabList })}\n gap={0}\n android_ripple={{ borderless: true, color: 'transparent' }}\n scrollEnabled={!isFullWidthTabItem && !isFilled}\n tabStyle={{\n padding: 0,\n margin: 0,\n minHeight: 0,\n }}\n style={{\n ...(isFilled\n ? {\n shadowOpacity: 0,\n shadowColor: 'transparent',\n borderRadius: theme.border.radius.small,\n borderWidth: theme.border.width.thick,\n borderColor: theme.colors.interactive.border.gray.faded,\n backgroundColor: theme.colors.surface.background.gray.intense,\n padding: theme.spacing[2],\n }\n : {\n shadowOpacity: 0,\n shadowColor: 'transparent',\n backgroundColor: 'transparent',\n ...(variant !== 'borderless' && {\n borderBottomColor: getIn(theme.colors, trackColor),\n borderBottomWidth: theme.border.width.thin,\n }),\n }),\n }}\n renderIndicator={TabIndicator}\n renderLabel={renderTabLabel}\n // This is a bit hacky, but this is the only way to put a divider between tabs\n // Since there is no way to use tablist.map() to render the tabs\n renderBadge={() => {\n if (!isFilled) return null;\n if (routeIndex === 0) {\n return null;\n }\n return (\n <Divider\n left=\"1px\"\n height=\"20px\"\n variant=\"normal\"\n orientation=\"vertical\"\n // again, hacky but no way to get exact height of the tabbar\n // Since we already know the height of large,medium size tabs, I just hardcode it here.\n top={size === 'large' ? '6px' : '4px'}\n />\n );\n }}\n />\n ),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isFullWidthTabItem, isFilled, renderTabLabel],\n );\n\n return (\n <TabsContext.Provider value={contextValue}>\n <TabView\n navigationState={{\n index: routeIndex,\n routes,\n }}\n renderScene={SafeSceneMap(panels)}\n renderTabBar={renderTabBar}\n onIndexChange={(idx) => {\n setIndex(idx);\n }}\n initialLayout={initialLayout}\n lazy={isLazy}\n />\n </TabsContext.Provider>\n );\n};\n\nexport { Tabs };\n"],"names":["initialLayout","height","width","Dimensions","get","getTabs","node","children","React","Children","toArray","tabList","find","child","getComponentId","isValidElement","Error","props","getTabPanels","filter","reduce","prev","curr","Object","assign","_defineProperty","value","getRoutes","tabs","map","TabComponent","index","title","key","leading","trailing","getRouteIndexFromValue","_ref","routes","findIndex","route","getRouteValueFromIndex","_ref2","_routes$find","Tabs","_ref3","defaultValue","onChange","_ref3$size","size","_ref3$variant","variant","_ref3$isFullWidthTabI","isFullWidthTabItem","_ref3$isLazy","isLazy","_useTheme","useTheme","theme","panels","isFilled","_useControllableState","useControllableState","_useControllableState2","_slicedToArray","selectedValue","setSelectedValue","routeIndex","setIndex","useCallback","skipUpdate","arguments","length","undefined","isVertical","contextValue","baseId","useLayoutEffect","renderTabLabel","_ref4","focused","Leading","selectedState","validatedTrailingComponent","useTabsItemPropRestriction","_jsx","StyledTabButton","metaAttribute","name","MetaConstants","TabItem","_jsxs","Box","display","alignItems","flexDirection","gap","iconSizeMap","color","iconColor","default","Text","textColor","weight","renderTabBar","TabBar","TabList","android_ripple","borderless","scrollEnabled","tabStyle","padding","margin","minHeight","style","shadowOpacity","shadowColor","borderRadius","border","radius","small","borderWidth","thick","borderColor","colors","interactive","gray","faded","backgroundColor","surface","background","intense","spacing","borderBottomColor","getIn","trackColor","borderBottomWidth","thin","renderIndicator","TabIndicator","renderLabel","renderBadge","Divider","left","orientation","top","TabsContext","Provider","TabView","navigationState","renderScene","SafeSceneMap","onIndexChange","idx","lazy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAMA,aAAa,CAAG,CACpBC,MAAM,CAAE,CAAC,CACTC,KAAK,CAAEC,UAAU,CAACC,GAAG,CAAC,QAAQ,CAAC,CAACF,KAClC,CAAC,CAED,IAAMG,OAAO,CAAG,SAAVA,OAAOA,CAAIC,IAAqB,CAA2B,CAC/D,IAAMC,QAAQ,CAAGC,cAAK,CAACC,QAAQ,CAACC,OAAO,CAACJ,IAAI,CAAC,CAC7C,IAAMK,OAAO,CAAGJ,QAAQ,CAACK,IAAI,CAAC,SAACC,KAAK,CAAA,CAAA,OAAKC,cAAc,CAACD,KAAK,CAAC,GAAK,SAAS,GAAC,CA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AAEoC,UAAU,CACjB7B,MAAM,CAANA,MACF,CAAE,CACFgH,WAAW,CAAEC,YAAY,CAAC5F,MAAM,CAAE,CAClC6C,YAAY,CAAEA,YAAa,CAC3BgD,aAAa,CAAE,SAAAA,aAACC,CAAAA,GAAG,CAAK,CACtBrF,QAAQ,CAACqF,GAAG,CAAC,CACf,CAAE,CACFzJ,aAAa,CAAEA,aAAc,CAC7B0J,IAAI,CAAEnG,MAAO,CACd,CAAC,CACkB,CAAC,CAE3B;;;;"}
|
|
1
|
+
{"version":3,"file":"Tabs.native.js","sources":["../../../../../src/components/Tabs/Tabs.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */\n/* eslint-disable babel/new-cap */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport React from 'react';\nimport { TabBar, TabView } from 'react-native-tab-view';\nimport { Dimensions } from 'react-native';\nimport type { TabsProps } from './types';\nimport { TabsContext } from './TabsContext';\nimport { StyledTabButton } from './TabItem.native';\nimport { iconColor, textColor, trackColor } from './tabTokens';\nimport { iconSizeMap, useTabsItemPropRestriction } from './utils';\nimport { TabIndicator } from './TabIndicator';\nimport { SafeSceneMap } from './SafeSceneMap.native';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { Text } from '~components/Typography';\nimport { Box } from '~components/Box';\nimport { useTheme } from '~components/BladeProvider';\nimport { useControllableState } from '~utils/useControllable';\nimport { Divider } from '~components/Divider';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport getIn from '~utils/lodashButBetter/get';\n\nconst initialLayout = {\n height: 0,\n width: Dimensions.get('window').width,\n};\n\nconst getTabs = (node: React.ReactNode): React.ReactElement[] => {\n const children = React.Children.toArray(node);\n const tabList = children.find((child) => getComponentId(child) === 'TabList');\n if (!tabList || !React.isValidElement(tabList)) {\n throw new Error('TabList is required');\n }\n\n return tabList.props.children;\n};\n\nconst getTabPanels = (node: React.ReactNode): Record<string, () => React.ReactElement> => {\n const children = React.Children.toArray(node) as React.ReactElement[];\n return children\n .filter((child) => getComponentId(child) === 'TabPanel')\n .reduce((prev, curr) => {\n return { ...prev, [curr.props.value]: () => curr.props.children };\n }, {});\n};\n\nconst getRoutes = (tabs: React.ReactElement[]) => {\n return tabs.map((TabComponent, index) => ({\n index,\n title: TabComponent.props.children,\n key: TabComponent.props.value,\n value: TabComponent.props.value,\n leading: TabComponent.props.leading,\n trailing: TabComponent.props.trailing,\n }));\n};\n\ntype Route = {\n value?: string;\n index?: number;\n};\n\nconst getRouteIndexFromValue = ({ value, routes }: { value?: string; routes: Route[] }) =>\n routes.findIndex((route) => route.value === value);\n\nconst getRouteValueFromIndex = ({ index, routes }: { index?: number; routes: Route[] }) =>\n routes.find((route) => route.index === index)?.value!;\n\nconst _Tabs = ({\n children,\n defaultValue,\n value,\n onChange,\n size = 'medium',\n variant = 'bordered',\n isFullWidthTabItem = false,\n isLazy = false,\n}: TabsProps): React.ReactElement => {\n const { theme } = useTheme();\n const tabs = getTabs(children);\n const panels = getTabPanels(children);\n const routes = getRoutes(tabs);\n const isFilled = variant === 'filled';\n\n const [selectedValue, setSelectedValue] = useControllableState({\n defaultValue,\n value,\n onChange: (value) => {\n onChange?.(value);\n },\n });\n\n const routeIndex = getRouteIndexFromValue({\n value: selectedValue,\n routes,\n });\n\n const setIndex = React.useCallback(\n (index: number, skipUpdate = false) => {\n const value = getRouteValueFromIndex({ index, routes });\n // If skipUpdate is true, useControlledState will not call the onChange callback\n // This is useful when we want to set the initial value\n setSelectedValue(() => value, skipUpdate);\n },\n [routes, setSelectedValue],\n );\n\n // In mobile we can't have vertical tabs because of the lack of screen space\n // So we always set it to false\n const isVertical = false;\n const contextValue = {\n baseId: '',\n selectedValue,\n isVertical,\n size,\n variant,\n isFullWidthTabItem,\n };\n\n // Set initial value\n React.useLayoutEffect(() => {\n if (selectedValue) return;\n setIndex(0, true);\n }, [selectedValue, setIndex]);\n\n const renderTabLabel = React.useCallback(\n ({\n route,\n focused,\n }: {\n route: { title: string; leading?: React.ComponentType<any>; trailing?: React.ReactNode };\n focused: boolean;\n }) => {\n const { title, leading: Leading, trailing } = route;\n const selectedState = focused ? 'selected' : 'unselected';\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const validatedTrailingComponent = useTabsItemPropRestriction(trailing, size);\n\n return (\n <StyledTabButton\n size={size}\n variant={variant}\n isFullWidthTabItem={!isFullWidthTabItem && !isFilled}\n {...metaAttribute({ name: MetaConstants.TabItem })}\n >\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\" gap=\"spacing.3\">\n {Leading ? (\n <Leading size={iconSizeMap[size]} color={iconColor[selectedState].default} />\n ) : null}\n <Text\n color={textColor[selectedState].default}\n size={size === 'medium' ? 'medium' : 'large'}\n weight=\"semibold\"\n >\n {title}\n </Text>\n {validatedTrailingComponent}\n </Box>\n </StyledTabButton>\n );\n },\n [isFullWidthTabItem, isFilled, size, variant],\n );\n\n const renderTabBar = React.useCallback(\n (props: any) => (\n <TabBar\n {...props}\n {...metaAttribute({ name: MetaConstants.TabList })}\n gap={0}\n android_ripple={{ borderless: true, color: 'transparent' }}\n scrollEnabled={!isFullWidthTabItem && !isFilled}\n tabStyle={{\n padding: 0,\n margin: 0,\n minHeight: 0,\n }}\n style={{\n ...(isFilled\n ? {\n shadowOpacity: 0,\n shadowColor: 'transparent',\n borderRadius: theme.border.radius.small,\n borderWidth: theme.border.width.thick,\n borderColor: theme.colors.interactive.border.gray.faded,\n backgroundColor: theme.colors.surface.background.gray.intense,\n padding: theme.spacing[2],\n }\n : {\n shadowOpacity: 0,\n shadowColor: 'transparent',\n backgroundColor: 'transparent',\n ...(variant !== 'borderless' && {\n borderBottomColor: getIn(theme.colors, trackColor),\n borderBottomWidth: theme.border.width.thin,\n }),\n }),\n }}\n renderIndicator={TabIndicator}\n renderLabel={renderTabLabel}\n // This is a bit hacky, but this is the only way to put a divider between tabs\n // Since there is no way to use tablist.map() to render the tabs\n renderBadge={() => {\n if (!isFilled) return null;\n if (routeIndex === 0) {\n return null;\n }\n return (\n <Divider\n left=\"1px\"\n height=\"20px\"\n variant=\"normal\"\n orientation=\"vertical\"\n // again, hacky but no way to get exact height of the tabbar\n // Since we already know the height of large,medium size tabs, I just hardcode it here.\n top={size === 'large' ? '6px' : '4px'}\n />\n );\n }}\n />\n ),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [isFullWidthTabItem, isFilled, renderTabLabel],\n );\n\n return (\n <TabsContext.Provider value={contextValue}>\n <TabView\n navigationState={{\n index: routeIndex,\n routes,\n }}\n renderScene={SafeSceneMap(panels)}\n renderTabBar={renderTabBar}\n onIndexChange={(idx) => {\n setIndex(idx);\n }}\n initialLayout={initialLayout}\n lazy={isLazy}\n />\n </TabsContext.Provider>\n );\n};\n\nconst Tabs = React.forwardRef(_Tabs);\n\nexport { Tabs };\n"],"names":["initialLayout","height","width","Dimensions","get","getTabs","node","children","React","Children","toArray","tabList","find","child","getComponentId","isValidElement","Error","props","getTabPanels","filter","reduce","prev","curr","Object","assign","_defineProperty","value","getRoutes","tabs","map","TabComponent","index","title","key","leading","trailing","getRouteIndexFromValue","_ref","routes","findIndex","route","getRouteValueFromIndex","_ref2","_routes$find","_Tabs","_ref3","defaultValue","onChange","_ref3$size","size","_ref3$variant","variant","_ref3$isFullWidthTabI","isFullWidthTabItem","_ref3$isLazy","isLazy","_useTheme","useTheme","theme","panels","isFilled","_useControllableState","useControllableState","_useControllableState2","_slicedToArray","selectedValue","setSelectedValue","routeIndex","setIndex","useCallback","skipUpdate","arguments","length","undefined","isVertical","contextValue","baseId","useLayoutEffect","renderTabLabel","_ref4","focused","Leading","selectedState","validatedTrailingComponent","useTabsItemPropRestriction","_jsx","StyledTabButton","metaAttribute","name","MetaConstants","TabItem","_jsxs","Box","display","alignItems","flexDirection","gap","iconSizeMap","color","iconColor","default","Text","textColor","weight","renderTabBar","TabBar","TabList","android_ripple","borderless","scrollEnabled","tabStyle","padding","margin","minHeight","style","shadowOpacity","shadowColor","borderRadius","border","radius","small","borderWidth","thick","borderColor","colors","interactive","gray","faded","backgroundColor","surface","background","intense","spacing","borderBottomColor","getIn","trackColor","borderBottomWidth","thin","renderIndicator","TabIndicator","renderLabel","renderBadge","Divider","left","orientation","top","TabsContext","Provider","TabView","navigationState","renderScene","SafeSceneMap","onIndexChange","idx","lazy","Tabs","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAMA,aAAa,CAAG,CACpBC,MAAM,CAAE,CAAC,CACTC,KAAK,CAAEC,UAAU,CAACC,GAAG,CAAC,QAAQ,CAAC,CAACF,KAClC,CAAC,CAED,IAAMG,OAAO,CAAG,SAAVA,OAAOA,CAAIC,IAAqB,CAA2B,CAC/D,IAAMC,QAAQ,CAAGC,cAAK,CAACC,QAAQ,CAACC,OAAO,CAACJ,IAAI,CAAC,CAC7C,IAAMK,OAAO,CAAGJ,QAAQ,CAACK,IAAI,CAAC,SAACC,KAAK,CAAK,CAAA,OAAAC,cAAc,CAACD,KAAK,CAAC,GAAK,SAAS,CAAA,CAAA,CAAC,CAC7E,GAAI,CAACF,OAAO,EAAI,CAACH,cAAK,CAACO,cAAc,CAACJ,OAAO,CAAC,CAAE,CAC9C,MAAM,IAAIK,KAAK,CAAC,qBAAqB,CAAC,CACxC,CAEA,OAAOL,OAAO,CAACM,KAAK,CAACV,QAAQ,CAC/B,CAAC,CAED,IAAMW,YAAY,CAAG,SAAfA,YAAYA,CAAIZ,IAAqB,CAA+C,CACxF,IAAMC,QAAQ,CAAGC,cAAK,CAACC,QAAQ,CAACC,OAAO,CAACJ,IAAI,CAAyB,CACrE,OAAOC,QAAQ,CACZY,MAAM,CAAC,SAACN,KAAK,CAAA,CAAA,OAAKC,cAAc,CAACD,KAAK,CAAC,GAAK,UAAU,CAAA,CAAA,CAAC,CACvDO,MAAM,CAAC,SAACC,IAAI,CAAEC,IAAI,CAAK,CACtB,OAAAC,MAAA,CAAAC,MAAA,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AAC,CAClDC,iBAAiB,CAAE9E,KAAK,CAAC4D,MAAM,CAACpH,KAAK,CAACuI,IACxC,CAAC,CACF,CACL,CACFC,eAAe,CAAEC,YAAa,CAC9BC,WAAW,CAAE9D,cAAe,CAG5B+D,WAAW,CAAE,SAAAA,aAAM,CACjB,GAAI,CAACjF,QAAQ,CAAE,OAAW,IAAA,CAC1B,GAAIO,UAAU,GAAK,CAAC,CAAE,CACpB,OAAO,IAAI,CACb,CACA,OACEkB,GAAA,CAACyD,OAAO,EACNC,IAAI,CAAC,KAAK,CACV9I,MAAM,CAAC,MAAM,CACbkD,OAAO,CAAC,QAAQ,CAChB6F,WAAW,CAAC,UAAU,CAGtBC,GAAG,CAAEhG,IAAI,GAAK,OAAO,CAAG,KAAK,CAAG,KAAM,CACvC,CAAC,CAEN,CAAE,EACH,CAAC,CAAA,CACH,CAED,CAACI,kBAAkB,CAAEO,QAAQ,CAAEkB,cAAc,CAC/C,CAAC,CAED,OACEO,GAAA,CAAC6D,WAAW,CAACC,QAAQ,CAAA,CAACzH,KAAK,CAAEiD,YAAa,CAAApE,QAAA,CACxC8E,GAAA,CAAC+D,OAAO,CAAA,CACNC,eAAe,CAAE,CACftH,KAAK,CAAEoC,UAAU,CACjB7B,MAAM,CAANA,MACF,CAAE,CACFgH,WAAW,CAAEC,YAAY,CAAC5F,MAAM,CAAE,CAClC6C,YAAY,CAAEA,YAAa,CAC3BgD,aAAa,CAAE,SAAAA,cAACC,GAAG,CAAK,CACtBrF,QAAQ,CAACqF,GAAG,CAAC,CACf,CAAE,CACFzJ,aAAa,CAAEA,aAAc,CAC7B0J,IAAI,CAAEnG,MAAO,CACd,CAAC,CACkB,CAAC,CAE3B,CAAC,CAEK,IAAAoG,IAAI,CAAGnJ,cAAK,CAACoJ,UAAU,CAAChH,KAAK;;;;"}
|
|
@@ -13,7 +13,7 @@ import 'react-native-gesture-handler';
|
|
|
13
13
|
import '../BottomSheet/BottomSheetStack.js';
|
|
14
14
|
import { jsx } from 'react/jsx-runtime';
|
|
15
15
|
|
|
16
|
-
var useAnimatedTag=function useAnimatedTag(onAnimationEndCallback){var maxWidth=useSharedValue(TAG_MAX_WIDTH_START);var opacity=useSharedValue(TAG_OPACITY_START);var _useTheme=useTheme(),theme=_useTheme.theme;var entering=new Keyframe({0:{opacity:TAG_OPACITY_END},100:{opacity:TAG_OPACITY_START,easing:theme.motion.easing.exit
|
|
16
|
+
var useAnimatedTag=function useAnimatedTag(onAnimationEndCallback){var maxWidth=useSharedValue(TAG_MAX_WIDTH_START);var opacity=useSharedValue(TAG_OPACITY_START);var _useTheme=useTheme(),theme=_useTheme.theme;var entering=new Keyframe({0:{opacity:TAG_OPACITY_END},100:{opacity:TAG_OPACITY_START,easing:theme.motion.easing.exit}}).duration(makeMotionTime(theme.motion.duration.xquick));var animate=function animate(){maxWidth.value=withTiming(TAG_MAX_WIDTH_END,{duration:makeMotionTime(theme.motion.duration.xquick),easing:castNativeType(theme.motion.easing.exit)},function(isComplete){if(isComplete){runOnJS(onAnimationEndCallback)();}});opacity.value=withTiming(TAG_OPACITY_END,{duration:makeMotionTime(theme.motion.duration.xquick),easing:Easing.out(Easing.exp)});};var animatedStyle=useAnimatedStyle(function(){return {maxWidth:maxWidth.value,opacity:opacity.value};});return {animate:animate,animatedStyle:animatedStyle,entering:entering};};var AnimatedTag=function AnimatedTag(_ref){var children=_ref.children,currentTagIndex=_ref.currentTagIndex,activeTagIndex=_ref.activeTagIndex,onDismiss=_ref.onDismiss,tagsLength=_ref.tagsLength,isDisabled=_ref.isDisabled;var onAnimationEnd=function onAnimationEnd(){onDismiss({tagIndex:currentTagIndex,tagName:children});};var prevSelectionsLength=React__default.useRef();var _useAnimatedTag=useAnimatedTag(onAnimationEnd),animate=_useAnimatedTag.animate,animatedStyle=_useAnimatedTag.animatedStyle,entering=_useAnimatedTag.entering;var isTagRemoved=prevSelectionsLength.current?prevSelectionsLength.current>tagsLength:false;return jsx(Animated.View,{style:animatedStyle,entering:isTagRemoved?undefined:entering,children:jsx(Tag,{_isVirtuallyFocused:currentTagIndex===activeTagIndex,_isTagInsideInput:true,onDismiss:function onDismiss(){animate();},marginRight:"spacing.3",marginY:"spacing.2",isDisabled:isDisabled,children:children})});};
|
|
17
17
|
|
|
18
18
|
export { AnimatedTag };
|
|
19
19
|
//# sourceMappingURL=AnimatedTag.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedTag.native.js","sources":["../../../../../src/components/Tag/AnimatedTag.native.tsx"],"sourcesContent":["import React from 'react';\nimport type { EasingFn } from 'react-native-reanimated';\nimport Animated, {\n Easing,\n useSharedValue,\n withTiming,\n useAnimatedStyle,\n runOnJS,\n Keyframe,\n} from 'react-native-reanimated';\nimport type { ReanimatedKeyframe } from 'react-native-reanimated/lib/typescript/reanimated2/layoutReanimation/animationBuilder/Keyframe';\nimport { Tag } from './Tag';\nimport {\n TAG_MAX_WIDTH_END,\n TAG_MAX_WIDTH_START,\n TAG_OPACITY_END,\n TAG_OPACITY_START,\n} from './tagAnimationConfig';\nimport type { AnimatedTagProps } from './types';\nimport { castNativeType, makeMotionTime } from '~utils';\nimport { useTheme } from '~components/BladeProvider';\n\nconst useAnimatedTag = (\n onAnimationEndCallback: () => void,\n): {\n entering: ReanimatedKeyframe;\n animate: () => void;\n animatedStyle: {\n maxWidth: `${number}%`;\n opacity: number;\n };\n} => {\n const maxWidth = useSharedValue(TAG_MAX_WIDTH_START); // Initial max-width value\n const opacity = useSharedValue(TAG_OPACITY_START); // Initial opacity value\n const { theme } = useTheme();\n\n const entering = new Keyframe({\n 0: {\n opacity: TAG_OPACITY_END,\n },\n 100: {\n opacity: TAG_OPACITY_START,\n easing: (theme.motion.easing.exit
|
|
1
|
+
{"version":3,"file":"AnimatedTag.native.js","sources":["../../../../../src/components/Tag/AnimatedTag.native.tsx"],"sourcesContent":["import React from 'react';\nimport type { EasingFn } from 'react-native-reanimated';\nimport Animated, {\n Easing,\n useSharedValue,\n withTiming,\n useAnimatedStyle,\n runOnJS,\n Keyframe,\n} from 'react-native-reanimated';\nimport type { ReanimatedKeyframe } from 'react-native-reanimated/lib/typescript/reanimated2/layoutReanimation/animationBuilder/Keyframe';\nimport { Tag } from './Tag';\nimport {\n TAG_MAX_WIDTH_END,\n TAG_MAX_WIDTH_START,\n TAG_OPACITY_END,\n TAG_OPACITY_START,\n} from './tagAnimationConfig';\nimport type { AnimatedTagProps } from './types';\nimport { castNativeType, makeMotionTime } from '~utils';\nimport { useTheme } from '~components/BladeProvider';\n\nconst useAnimatedTag = (\n onAnimationEndCallback: () => void,\n): {\n entering: ReanimatedKeyframe;\n animate: () => void;\n animatedStyle: {\n maxWidth: `${number}%`;\n opacity: number;\n };\n} => {\n const maxWidth = useSharedValue(TAG_MAX_WIDTH_START); // Initial max-width value\n const opacity = useSharedValue(TAG_OPACITY_START); // Initial opacity value\n const { theme } = useTheme();\n\n const entering = new Keyframe({\n 0: {\n opacity: TAG_OPACITY_END,\n },\n 100: {\n opacity: TAG_OPACITY_START,\n easing: (theme.motion.easing.exit as unknown) as EasingFn,\n },\n }).duration(makeMotionTime(theme.motion.duration.xquick));\n\n const animate = (): void => {\n maxWidth.value = withTiming(\n TAG_MAX_WIDTH_END,\n {\n duration: makeMotionTime(theme.motion.duration.xquick),\n easing: castNativeType(theme.motion.easing.exit),\n },\n (isComplete) => {\n if (isComplete) {\n runOnJS(onAnimationEndCallback)();\n }\n },\n );\n opacity.value = withTiming(TAG_OPACITY_END, {\n duration: makeMotionTime(theme.motion.duration.xquick),\n easing: Easing.out(Easing.exp),\n });\n };\n\n const animatedStyle = useAnimatedStyle(() => {\n return {\n maxWidth: maxWidth.value,\n opacity: opacity.value,\n };\n });\n\n return { animate, animatedStyle, entering };\n};\n\nconst AnimatedTag = ({\n children,\n currentTagIndex,\n activeTagIndex,\n onDismiss,\n tagsLength,\n isDisabled,\n}: AnimatedTagProps): React.ReactElement => {\n const onAnimationEnd = (): void => {\n onDismiss({ tagIndex: currentTagIndex, tagName: children });\n };\n\n const prevSelectionsLength = React.useRef<number>();\n const { animate, animatedStyle, entering } = useAnimatedTag(onAnimationEnd);\n\n const isTagRemoved = prevSelectionsLength.current\n ? prevSelectionsLength.current > tagsLength\n : false;\n\n return (\n <Animated.View style={animatedStyle} entering={isTagRemoved ? undefined : entering}>\n <Tag\n _isVirtuallyFocused={currentTagIndex === activeTagIndex}\n _isTagInsideInput={true}\n onDismiss={() => {\n animate();\n }}\n marginRight=\"spacing.3\"\n marginY=\"spacing.2\"\n isDisabled={isDisabled}\n >\n {children}\n </Tag>\n </Animated.View>\n );\n};\n\nexport { AnimatedTag };\n"],"names":["useAnimatedTag","onAnimationEndCallback","maxWidth","useSharedValue","TAG_MAX_WIDTH_START","opacity","TAG_OPACITY_START","_useTheme","useTheme","theme","entering","Keyframe","TAG_OPACITY_END","easing","motion","exit","duration","makeMotionTime","xquick","animate","value","withTiming","TAG_MAX_WIDTH_END","castNativeType","isComplete","runOnJS","Easing","out","exp","animatedStyle","useAnimatedStyle","AnimatedTag","_ref","children","currentTagIndex","activeTagIndex","onDismiss","tagsLength","isDisabled","onAnimationEnd","tagIndex","tagName","prevSelectionsLength","React","useRef","_useAnimatedTag","isTagRemoved","current","_jsx","Animated","View","style","undefined","Tag","_isVirtuallyFocused","_isTagInsideInput","marginRight","marginY"],"mappings":";;;;;;;;;;;;;;;AAsBA,IAAMA,cAAc,CAAG,SAAjBA,cAAcA,CAClBC,sBAAkC,CAQ/B,CACH,IAAMC,QAAQ,CAAGC,cAAc,CAACC,mBAAmB,CAAC,CACpD,IAAMC,OAAO,CAAGF,cAAc,CAACG,iBAAiB,CAAC,CACjD,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CAEb,IAAMC,QAAQ,CAAG,IAAIC,QAAQ,CAAC,CAC5B,CAAC,CAAE,CACDN,OAAO,CAAEO,eACX,CAAC,CACD,GAAG,CAAE,CACHP,OAAO,CAAEC,iBAAiB,CA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AA,CAAdG,cAAc,CACdC,SAAS,CAAAJ,IAAA,CAATI,SAAS,CACTC,UAAU,CAAAL,IAAA,CAAVK,UAAU,CACVC,UAAU,CAAAN,IAAA,CAAVM,UAAU,CAEV,IAAMC,cAAc,CAAG,SAAjBA,cAAcA,EAAe,CACjCH,SAAS,CAAC,CAAEI,QAAQ,CAAEN,eAAe,CAAEO,OAAO,CAAER,QAAS,CAAC,CAAC,CAC7D,CAAC,CAED,IAAMS,oBAAoB,CAAGC,cAAK,CAACC,MAAM,EAAU,CACnD,IAAAC,eAAA,CAA6C7C,cAAc,CAACuC,cAAc,CAAC,CAAnEpB,OAAO,CAAA0B,eAAA,CAAP1B,OAAO,CAAEU,aAAa,CAAAgB,eAAA,CAAbhB,aAAa,CAAEnB,QAAQ,CAAAmC,eAAA,CAARnC,QAAQ,CAExC,IAAMoC,YAAY,CAAGJ,oBAAoB,CAACK,OAAO,CAC7CL,oBAAoB,CAACK,OAAO,CAAGV,UAAU,CACzC,KAAK,CAET,OACEW,GAAA,CAACC,QAAQ,CAACC,IAAI,CAAA,CAACC,KAAK,CAAEtB,aAAc,CAACnB,QAAQ,CAAEoC,YAAY,CAAGM,SAAS,CAAG1C,QAAS,CAAAuB,QAAA,CACjFe,GAAA,CAACK,GAAG,CACFC,CAAAA,mBAAmB,CAAEpB,eAAe,GAAKC,cAAe,CACxDoB,iBAAiB,CAAE,IAAK,CACxBnB,SAAS,CAAE,SAAAA,SAAAA,EAAM,CACfjB,OAAO,EAAE,CACX,CAAE,CACFqC,WAAW,CAAC,WAAW,CACvBC,OAAO,CAAC,WAAW,CACnBnB,UAAU,CAAEA,UAAW,CAAAL,QAAA,CAEtBA,QAAQ,CACN,CAAC,CACO,CAAC,CAEpB;;;;"}
|
|
@@ -21,14 +21,15 @@ import '@gorhom/portal';
|
|
|
21
21
|
import 'react-native-gesture-handler';
|
|
22
22
|
import '../BottomSheet/BottomSheetStack.js';
|
|
23
23
|
import CloseIcon from '../Icons/CloseIcon/CloseIcon.js';
|
|
24
|
-
import '../Typography/
|
|
24
|
+
import '../Typography/Heading/Heading.js';
|
|
25
25
|
import { Text } from '../Typography/Text/Text.js';
|
|
26
26
|
import '../Typography/Code/Code.js';
|
|
27
|
+
import '../Typography/Display/Display.js';
|
|
27
28
|
import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
|
|
28
29
|
import { useIsMobile } from '../../utils/useIsMobile.js';
|
|
29
30
|
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
30
31
|
|
|
31
|
-
var _excluded=["size","icon","onDismiss","children","isDisabled","testID","_isVirtuallyFocused","_isTagInsideInput"];var FocussableTag=styled(BaseBox)(function(props){if(props._isVirtuallyFocused&&!isReactNative()){return {outline:`${makeSize(size['1'])} solid ${props.theme.colors.surface.background.gray.subtle}`,boxShadow:`0px 0px 0px 4px ${props.theme.colors.interactive.background.primary.faded}`};}return {};});var
|
|
32
|
+
var _excluded=["size","icon","onDismiss","children","isDisabled","testID","_isVirtuallyFocused","_isTagInsideInput"];var FocussableTag=styled(BaseBox)(function(props){if(props._isVirtuallyFocused&&!isReactNative()){return {outline:`${makeSize(size['1'])} solid ${props.theme.colors.surface.background.gray.subtle}`,boxShadow:`0px 0px 0px 4px ${props.theme.colors.interactive.background.primary.faded}`};}return {};});var _Tag=function _Tag(_ref,ref){var _ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,Icon=_ref.icon,onDismiss=_ref.onDismiss,children=_ref.children,isDisabled=_ref.isDisabled,testID=_ref.testID,_isVirtuallyFocused=_ref._isVirtuallyFocused,_isTagInsideInput=_ref._isTagInsideInput,rest=_objectWithoutProperties(_ref,_excluded);var isMobile=useIsMobile();var textColor=isDisabled?'interactive.text.gray.disabled':'interactive.text.gray.subtle';var iconColor=isDisabled?'interactive.icon.gray.disabled':'interactive.icon.gray.muted';var backgroundColor=isDisabled?'interactive.background.gray.disabled':'interactive.background.gray.default';var mediumPadding={base:['spacing.2','spacing.3','spacing.2','spacing.4'],m:['spacing.1','spacing.2','spacing.1','spacing.3']};var largePadding={base:['spacing.2','spacing.3','spacing.2','spacing.4'],m:['spacing.2','spacing.3','spacing.2','spacing.4']};var assetSize=React__default.useMemo(function(){if(isMobile&&size==='large'){return 'medium';}return 'small';},[isMobile,size]);return jsx(BaseBox,Object.assign({ref:ref,display:isReactNative()?'flex':'inline-flex'},getStyledProps(rest),metaAttribute({name:MetaConstants.Tag,testID:testID}),makeAnalyticsAttribute(rest),{children:jsxs(FocussableTag,{display:isReactNative()?'flex':'inline-flex',alignSelf:isReactNative()?'center':undefined,flexDirection:"row",flexWrap:"nowrap",flexShrink:0,backgroundColor:backgroundColor,borderRadius:"max",padding:size==='medium'?mediumPadding:largePadding,_isVirtuallyFocused:_isVirtuallyFocused,children:[Icon?jsx(Box,{display:"flex",flexDirection:"row",alignItems:"center",children:jsx(Icon,{color:iconColor,size:assetSize,marginRight:"spacing.2"})}):null,jsx(Box,{display:"flex",flexDirection:"row",children:jsx(Text,{textAlign:"center",truncateAfterLines:1,marginRight:"spacing.2",color:textColor,size:"small",children:children})}),jsx(Box,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",children:jsx(IconButton,{size:assetSize,icon:CloseIcon,accessibilityLabel:`Close ${children} tag`,isDisabled:isDisabled,_tabIndex:_isTagInsideInput?-1:undefined,onClick:function onClick(e){if(_isTagInsideInput){e.stopPropagation();}onDismiss();}})})]})}));};var Tag=React__default.forwardRef(_Tag);
|
|
32
33
|
|
|
33
34
|
export { Tag };
|
|
34
35
|
//# sourceMappingURL=Tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport type { TagProps } from './types';\nimport { Box } from '~components/Box';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { IconButton } from '~components/Button/IconButton';\nimport { CloseIcon } from '~components/Icons';\nimport { Text } from '~components/Typography';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { isReactNative, makeSize } from '~utils';\nimport { size as globalSizeTokens } from '~tokens/global';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { PaddingProps } from '~components/Box/BaseBox/types/spacingTypes';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst FocussableTag = styled(BaseBox)<{ _isVirtuallyFocused: TagProps['_isVirtuallyFocused'] }>(\n (props) => {\n if (props._isVirtuallyFocused && !isReactNative()) {\n return {\n outline: `${makeSize(globalSizeTokens['1'])} solid ${\n props.theme.colors.surface.background.gray.subtle\n }`,\n boxShadow: `0px 0px 0px 4px ${props.theme.colors.interactive.background.primary.faded}`,\n };\n }\n\n return {};\n },\n);\n\
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport type { TagProps } from './types';\nimport { Box } from '~components/Box';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { IconButton } from '~components/Button/IconButton';\nimport { CloseIcon } from '~components/Icons';\nimport { Text } from '~components/Typography';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { isReactNative, makeSize } from '~utils';\nimport { size as globalSizeTokens } from '~tokens/global';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { PaddingProps } from '~components/Box/BaseBox/types/spacingTypes';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport type { BladeElementRef } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst FocussableTag = styled(BaseBox)<{ _isVirtuallyFocused: TagProps['_isVirtuallyFocused'] }>(\n (props) => {\n if (props._isVirtuallyFocused && !isReactNative()) {\n return {\n outline: `${makeSize(globalSizeTokens['1'])} solid ${\n props.theme.colors.surface.background.gray.subtle\n }`,\n boxShadow: `0px 0px 0px 4px ${props.theme.colors.interactive.background.primary.faded}`,\n };\n }\n\n return {};\n },\n);\n\nconst _Tag = (\n {\n size = 'medium',\n icon: Icon,\n onDismiss,\n children,\n isDisabled,\n testID,\n _isVirtuallyFocused,\n _isTagInsideInput,\n ...rest\n }: TagProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement | null => {\n const isMobile = useIsMobile();\n\n const textColor = isDisabled ? 'interactive.text.gray.disabled' : 'interactive.text.gray.subtle';\n const iconColor = isDisabled ? 'interactive.icon.gray.disabled' : 'interactive.icon.gray.muted';\n const backgroundColor = isDisabled\n ? 'interactive.background.gray.disabled'\n : 'interactive.background.gray.default';\n\n const mediumPadding: PaddingProps['padding'] = {\n base: ['spacing.2', 'spacing.3', 'spacing.2', 'spacing.4'],\n m: ['spacing.1', 'spacing.2', 'spacing.1', 'spacing.3'],\n };\n\n const largePadding: PaddingProps['padding'] = {\n base: ['spacing.2', 'spacing.3', 'spacing.2', 'spacing.4'],\n m: ['spacing.2', 'spacing.3', 'spacing.2', 'spacing.4'],\n };\n\n const assetSize = React.useMemo((): 'small' | 'medium' => {\n if (isMobile && size === 'large') {\n return 'medium';\n }\n\n return 'small';\n }, [isMobile, size]);\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.Tag, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n <FocussableTag\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n alignSelf={isReactNative() ? 'center' : undefined}\n flexDirection=\"row\"\n flexWrap=\"nowrap\"\n flexShrink={0}\n backgroundColor={backgroundColor}\n borderRadius=\"max\"\n padding={size === 'medium' ? mediumPadding : largePadding}\n _isVirtuallyFocused={_isVirtuallyFocused}\n >\n {/* Leading Icon */}\n {Icon ? (\n <Box display=\"flex\" flexDirection=\"row\" alignItems=\"center\">\n <Icon color={iconColor} size={assetSize} marginRight=\"spacing.2\" />\n </Box>\n ) : null}\n\n {/* Tag Text */}\n <Box display=\"flex\" flexDirection=\"row\">\n <Text\n textAlign=\"center\"\n truncateAfterLines={1}\n marginRight=\"spacing.2\"\n color={textColor}\n size=\"small\"\n >\n {children}\n </Text>\n </Box>\n\n {/* Dismiss Icon */}\n <Box display=\"flex\" flexDirection=\"row\" alignItems=\"center\" justifyContent=\"center\">\n <IconButton\n size={assetSize}\n icon={CloseIcon}\n accessibilityLabel={`Close ${children} tag`}\n isDisabled={isDisabled}\n _tabIndex={_isTagInsideInput ? -1 : undefined}\n onClick={(e) => {\n // Inside tag input, we stop propagation to avoid opening dropdown on click of close on tag\n if (_isTagInsideInput) {\n e.stopPropagation();\n }\n onDismiss();\n }}\n />\n </Box>\n </FocussableTag>\n </BaseBox>\n );\n};\n\n/**\n * ## Tags\n *\n * Tag component can be used to display selected items on UI.\n *\n * ### Usage\n *\n * ***Note:*** _Make sure to handle state when using Tag_\n *\n * ```jsx\n * const [showTag, setShowTag] = React.useState(true);\n *\n * // ...\n *\n * {showTag && (\n * <Tag\n * icon={CheckIcon}\n * onDismiss={() => setShowTag(false)}\n * >\n * Transactions\n * </Tag>\n * )}\n * ```\n *\n * Checkout [Tags Documentation](https://blade.razorpay.com/?path=/story/components-tag--default) for more info.\n *\n */\nconst Tag = React.forwardRef(_Tag);\n\nexport { Tag };\n"],"names":["FocussableTag","styled","BaseBox","props","_isVirtuallyFocused","isReactNative","outline","makeSize","globalSizeTokens","theme","colors","surface","background","gray","subtle","boxShadow","interactive","primary","faded","_Tag","_ref","ref","_ref$size","size","Icon","icon","onDismiss","children","isDisabled","testID","_isTagInsideInput","rest","_objectWithoutProperties","_excluded","isMobile","useIsMobile","textColor","iconColor","backgroundColor","mediumPadding","base","m","largePadding","assetSize","React","useMemo","_jsx","Object","assign","display","getStyledProps","metaAttribute","name","MetaConstants","Tag","makeAnalyticsAttribute","_jsxs","alignSelf","undefined","flexDirection","flexWrap","flexShrink","borderRadius","padding","Box","alignItems","color","marginRight","Text","textAlign","truncateAfterLines","justifyContent","IconButton","CloseIcon","accessibilityLabel","_tabIndex","onClick","e","stopPropagation","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,MAAA,CAAA,MAAA,CAAA,WAAA,CAAA,UAAA,CAAA,YAAA,CAAA,QAAA,CAAA,qBAAA,CAAA,mBAAA,CAAA,CAiBA,IAAMA,aAAa,CAAGC,MAAM,CAACC,OAAO,CAAC,CACnC,SAACC,KAAK,CAAK,CACT,GAAIA,KAAK,CAACC,mBAAmB,EAAI,CAACC,aAAa,EAAE,CAAE,CACjD,OAAO,CACLC,OAAO,CAAG,CAAEC,EAAAA,QAAQ,CAACC,IAAgB,CAAC,GAAG,CAAC,CAAE,CAAA,OAAA,EAC1CL,KAAK,CAACM,KAAK,CAACC,MAAM,CAACC,OAAO,CAACC,UAAU,CAACC,IAAI,CAACC,MAC5C,CAAC,CAAA,CACFC,SAAS,CAAG,CAAA,gBAAA,EAAkBZ,KAAK,CAACM,KAAK,CAACC,MAAM,CAACM,WAAW,CAACJ,UAAU,CAACK,OAAO,CAACC,KAAM,CACxF,CAAA,CAAC,CACH,CAEA,OAAO,EAAE,CACX,CACF,CAAC,CAED,IAAMC,IAAI,CAAG,SAAPA,IAAIA,CAAAC,IAAA,CAYRC,GAA+B,CACD,CAAA,IAAAC,SAAA,CAAAF,IAAA,CAX5BG,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,SAAA,CACTE,IAAI,CAAAJ,IAAA,CAAVK,IAAI,CACJC,SAAS,CAAAN,IAAA,CAATM,SAAS,CACTC,QAAQ,CAAAP,IAAA,CAARO,QAAQ,CACRC,UAAU,CAAAR,IAAA,CAAVQ,UAAU,CACVC,MAAM,CAAAT,IAAA,CAANS,MAAM,CACNzB,mBAAmB,CAAAgB,IAAA,CAAnBhB,mBAAmB,CACnB0B,iBAAiB,CAAAV,IAAA,CAAjB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,CAChBC,kBAAkB,CAAG,SAAQ/C,QAAS,CAAA,IAAA,CAAM,CAC5CC,UAAU,CAAEA,UAAW,CACvB+C,SAAS,CAAE7C,iBAAiB,CAAG,CAAC,CAAC,CAAG4B,SAAU,CAC9CkB,OAAO,CAAE,SAAAA,OAAAA,CAACC,CAAC,CAAK,CAEd,GAAI/C,iBAAiB,CAAE,CACrB+C,CAAC,CAACC,eAAe,EAAE,CACrB,CACApD,SAAS,EAAE,CACb,CAAE,CACH,CAAC,CACC,CAAC,CACO,CAAA,CAAC,EACT,CAAC,CAEd,CAAC,CA6BK,IAAA4B,GAAG,CAAGV,cAAK,CAACmC,UAAU,CAAC5D,IAAI;;;;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { TooltipContentWrapper } from './TooltipContentWrapper.native.js';
|
|
3
|
-
import '
|
|
4
|
-
import '../Typography/
|
|
5
|
-
import '
|
|
3
|
+
import '../Typography/Heading/Heading.js';
|
|
4
|
+
import { Text } from '../Typography/Text/Text.js';
|
|
5
|
+
import '../Typography/Code/Code.js';
|
|
6
|
+
import '../Typography/Display/Display.js';
|
|
6
7
|
import 'react-native';
|
|
7
|
-
import '
|
|
8
|
-
import '../../tokens/global/motion.js';
|
|
9
|
-
import { size } from '../../tokens/global/size.js';
|
|
8
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
10
9
|
import { isReactNative } from '../../utils/platform/isReactNative.js';
|
|
11
10
|
import { makeSize } from '../../utils/makeSize/makeSize.js';
|
|
12
11
|
import '../BladeProvider/useTheme.js';
|
|
12
|
+
import '../../tokens/global/typography.js';
|
|
13
|
+
import '../../tokens/global/motion.js';
|
|
14
|
+
import { size } from '../../tokens/global/size.js';
|
|
13
15
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
14
|
-
import { Text } from '../Typography/Text/Text.js';
|
|
15
|
-
import '../Typography/Code/Code.js';
|
|
16
16
|
|
|
17
17
|
var TooltipContent=React__default.forwardRef(function(_ref,ref){var children=_ref.children,title=_ref.title,arrow=_ref.arrow,side=_ref.side,style=_ref.style,isVisible=_ref.isVisible;return jsxs(TooltipContentWrapper,{position:isReactNative()?'absolute':'relative',paddingTop:"spacing.3",paddingBottom:"spacing.3",paddingLeft:"spacing.4",paddingRight:"spacing.4",maxWidth:makeSize(size[200]),ref:ref,styles:style,side:side,isVisible:isVisible,children:[title?jsx(Text,{weight:"semibold",size:"medium",color:"surface.text.staticWhite.normal",children:title}):null,jsx(Text,{variant:"body",size:"small",weight:"regular",color:"surface.text.staticWhite.subtle",wordBreak:"break-word",children:children}),arrow]});});
|
|
18
18
|
|
|
@@ -17,7 +17,7 @@ import '../../tokens/global/typography.js';
|
|
|
17
17
|
import '../../tokens/global/motion.js';
|
|
18
18
|
import { size } from '../../tokens/global/size.js';
|
|
19
19
|
|
|
20
|
-
var _excluded=["children","styles","side","isVisible"];var StyledTooltipContentWrapper=styled(BaseBox)(function(_ref){var theme=_ref.theme,styles=_ref.styles;return getTooltipContentWrapperStyles({theme:theme,styles:styles});});var TooltipContentWrapper=React__default.forwardRef(function(_ref2,ref){var children=_ref2.children,styles=_ref2.styles,side=_ref2.side,isVisible=_ref2.isVisible,props=_objectWithoutProperties(_ref2,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var isOppositeAxis=side==='right'||side==='bottom';var isHorizontal=side==='left'||side==='right';var offset=isOppositeAxis?-size[4]:size[4];var translate=useSharedValue(offset);var opacity=useSharedValue(0);var easing=theme.motion.easing.entrance
|
|
20
|
+
var _excluded=["children","styles","side","isVisible"];var StyledTooltipContentWrapper=styled(BaseBox)(function(_ref){var theme=_ref.theme,styles=_ref.styles;return getTooltipContentWrapperStyles({theme:theme,styles:styles});});var TooltipContentWrapper=React__default.forwardRef(function(_ref2,ref){var children=_ref2.children,styles=_ref2.styles,side=_ref2.side,isVisible=_ref2.isVisible,props=_objectWithoutProperties(_ref2,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var isOppositeAxis=side==='right'||side==='bottom';var isHorizontal=side==='left'||side==='right';var offset=isOppositeAxis?-size[4]:size[4];var translate=useSharedValue(offset);var opacity=useSharedValue(0);var easing=theme.motion.easing.entrance;var duration=theme.motion.duration.quick;React__default.useEffect(function(){var timings={easing:easing,duration:duration};opacity.value=withDelay(duration,withTiming(isVisible?1:0,timings));translate.value=withDelay(duration,withTiming(isVisible?0:offset,timings));},[isVisible]);var animatedStyles=useAnimatedStyle(function(){var transform=isHorizontal?'translateX':'translateY';return {opacity:opacity.value,transform:[_defineProperty({},transform,translate.value)]};},[isVisible]);return jsx(Animated.View,{style:animatedStyles,children:jsx(StyledTooltipContentWrapper,Object.assign({styles:styles,style:castNativeType(theme.elevation.lowRaised),elevation:20,ref:ref,collapse:false},props,{children:children}))});});
|
|
21
21
|
|
|
22
22
|
export { TooltipContentWrapper };
|
|
23
23
|
//# sourceMappingURL=TooltipContentWrapper.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipContentWrapper.native.js","sources":["../../../../../src/components/Tooltip/TooltipContentWrapper.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport type { CSSProperties } from 'react';\nimport styled from 'styled-components/native';\nimport type { EasingFn } from 'react-native-reanimated';\nimport Animated, {\n useAnimatedStyle,\n useSharedValue,\n withDelay,\n withTiming,\n} from 'react-native-reanimated';\nimport React from 'react';\nimport type { View } from 'react-native';\nimport { getTooltipContentWrapperStyles } from './getTooltipContentWrapperStyles';\nimport type { TooltipContentWrapperProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { size } from '~tokens/global';\nimport { castNativeType } from '~utils';\n\nconst StyledTooltipContentWrapper = styled(BaseBox)<{ collapse?: boolean; styles: CSSProperties }>(\n ({ theme, styles }) => {\n return getTooltipContentWrapperStyles({ theme, styles });\n },\n);\n\nconst TooltipContentWrapper = React.forwardRef<View, TooltipContentWrapperProps>(\n ({ children, styles, side, isVisible, ...props }, ref) => {\n const { theme } = useTheme();\n\n const isOppositeAxis = side === 'right' || side === 'bottom';\n const isHorizontal = side === 'left' || side === 'right';\n const offset = isOppositeAxis ? -size[4] : size[4];\n\n const translate = useSharedValue(offset);\n const opacity = useSharedValue(0);\n\n const easing = (theme.motion.easing.entrance
|
|
1
|
+
{"version":3,"file":"TooltipContentWrapper.native.js","sources":["../../../../../src/components/Tooltip/TooltipContentWrapper.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport type { CSSProperties } from 'react';\nimport styled from 'styled-components/native';\nimport type { EasingFn } from 'react-native-reanimated';\nimport Animated, {\n useAnimatedStyle,\n useSharedValue,\n withDelay,\n withTiming,\n} from 'react-native-reanimated';\nimport React from 'react';\nimport type { View } from 'react-native';\nimport { getTooltipContentWrapperStyles } from './getTooltipContentWrapperStyles';\nimport type { TooltipContentWrapperProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { size } from '~tokens/global';\nimport { castNativeType } from '~utils';\n\nconst StyledTooltipContentWrapper = styled(BaseBox)<{ collapse?: boolean; styles: CSSProperties }>(\n ({ theme, styles }) => {\n return getTooltipContentWrapperStyles({ theme, styles });\n },\n);\n\nconst TooltipContentWrapper = React.forwardRef<View, TooltipContentWrapperProps>(\n ({ children, styles, side, isVisible, ...props }, ref) => {\n const { theme } = useTheme();\n\n const isOppositeAxis = side === 'right' || side === 'bottom';\n const isHorizontal = side === 'left' || side === 'right';\n const offset = isOppositeAxis ? -size[4] : size[4];\n\n const translate = useSharedValue(offset);\n const opacity = useSharedValue(0);\n\n const easing = (theme.motion.easing.entrance as unknown) as EasingFn;\n const duration = theme.motion.duration.quick;\n\n React.useEffect(() => {\n const timings = { easing, duration };\n opacity.value = withDelay(duration, withTiming(isVisible ? 1 : 0, timings));\n translate.value = withDelay(duration, withTiming(isVisible ? 0 : offset, timings));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isVisible]);\n\n // @ts-expect-error types aren't liking the dynamic object prop `[transform]`\n const animatedStyles = useAnimatedStyle(() => {\n const transform = isHorizontal ? 'translateX' : 'translateY';\n return {\n opacity: opacity.value,\n transform: [{ [transform]: translate.value }],\n };\n }, [isVisible]);\n\n return (\n <Animated.View style={animatedStyles}>\n <StyledTooltipContentWrapper\n styles={styles}\n // Shadow styles need to be passed directly through native style prop\n // Cannot be done via styled components\n style={castNativeType(theme.elevation.lowRaised)}\n elevation={20}\n ref={ref as never}\n collapse={false}\n // if I don't assert this TS throws error\n // I think because of the intersection type in TooltipContentWrapperProps\n {...(props as any)}\n >\n {children}\n </StyledTooltipContentWrapper>\n </Animated.View>\n );\n },\n);\n\nexport { TooltipContentWrapper };\n"],"names":["StyledTooltipContentWrapper","styled","BaseBox","_ref","theme","styles","getTooltipContentWrapperStyles","TooltipContentWrapper","React","forwardRef","_ref2","ref","children","side","isVisible","props","_objectWithoutProperties","_excluded","_useTheme","useTheme","isOppositeAxis","isHorizontal","offset","size","translate","useSharedValue","opacity","easing","motion","entrance","duration","quick","useEffect","timings","value","withDelay","withTiming","animatedStyles","useAnimatedStyle","transform","_defineProperty","_jsx","Animated","View","style","Object","assign","castNativeType","elevation","lowRaised","collapse"],"mappings":";;;;;;;;;;;;;;;;;;;uDAoBA,IAAMA,2BAA2B,CAAGC,MAAM,CAACC,OAAO,CAAC,CACjD,SAAAC,IAAA,CAAuB,CAApB,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,MAAM,CAAAF,IAAA,CAANE,MAAM,CACd,OAAOC,8BAA8B,CAAC,CAAEF,KAAK,CAALA,KAAK,CAAEC,MAAM,CAANA,MAAO,CAAC,CAAC,CAC1D,CACF,CAAC,CAEK,IAAAE,qBAAqB,CAAGC,cAAK,CAACC,UAAU,CAC5C,SAAAC,KAAA,CAAkDC,GAA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CAAC,CAGf,IAAMuB,cAAc,CAAGC,gBAAgB,CAAC,UAAM,CAC5C,IAAMC,SAAS,CAAGlB,YAAY,CAAG,YAAY,CAAG,YAAY,CAC5D,OAAO,CACLK,OAAO,CAAEA,OAAO,CAACQ,KAAK,CACtBK,SAAS,CAAE,CAAAC,eAAA,CAAA,EAAA,CAAID,SAAS,CAAGf,SAAS,CAACU,KAAK,EAC5C,CAAC,CACH,CAAC,CAAE,CAACpB,SAAS,CAAC,CAAC,CAEf,OACE2B,GAAA,CAACC,QAAQ,CAACC,IAAI,CAACC,CAAAA,KAAK,CAAEP,cAAe,CAAAzB,QAAA,CACnC6B,GAAA,CAACzC,2BAA2B,CAAA6C,MAAA,CAAAC,MAAA,CAAA,CAC1BzC,MAAM,CAAEA,MAAO,CAGfuC,KAAK,CAAEG,cAAc,CAAC3C,KAAK,CAAC4C,SAAS,CAACC,SAAS,CAAE,CACjDD,SAAS,CAAE,EAAG,CACdrC,GAAG,CAAEA,GAAa,CAClBuC,QAAQ,CAAE,KAAM,CAGXnC,CAAAA,KAAK,CAAAH,CAAAA,QAAA,CAETA,QAAQ,CAAA,CACkB,CAAC,CACjB,CAAC,CAEpB,CACF;;;;"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import '../../Typography/BaseText/BaseText.native.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import { throwBladeError } from '../../../utils/logger/logger.js';
|
|
5
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
6
|
-
import 'react-native';
|
|
7
|
-
import '../../../tokens/global/typography.js';
|
|
8
|
-
import '../../../tokens/global/motion.js';
|
|
9
|
-
import '../../BladeProvider/useTheme.js';
|
|
10
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
import '../../Typography/Heading/Heading.js';
|
|
11
2
|
import { Text } from '../../Typography/Text/Text.js';
|
|
12
3
|
import '../../Typography/Code/Code.js';
|
|
4
|
+
import '../../Typography/Display/Display.js';
|
|
5
|
+
import { throwBladeError } from '../../../utils/logger/logger.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
7
|
|
|
14
8
|
var TabNav=function TabNav(_props){throwBladeError({message:'TabNav is not yet implemented for native',moduleName:'TabNav'});return jsx(Text,{children:"TabNav Component is not available for Native mobile apps."});};
|
|
15
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabNav.native.js","sources":["../../../../../../src/components/TopNav/TabNav/TabNav.native.tsx"],"sourcesContent":["import { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst TabNav = (_props: never): React.ReactElement => {\n throwBladeError({\n message: 'TabNav is not yet implemented for native',\n moduleName: 'TabNav',\n });\n\n return <Text>TabNav Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TabNav };\n"],"names":["TabNav","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabNav.native.js","sources":["../../../../../../src/components/TopNav/TabNav/TabNav.native.tsx"],"sourcesContent":["import { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst TabNav = (_props: never): React.ReactElement => {\n throwBladeError({\n message: 'TabNav is not yet implemented for native',\n moduleName: 'TabNav',\n });\n\n return <Text>TabNav Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TabNav };\n"],"names":["TabNav","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;AAGM,IAAAA,MAAM,CAAG,SAATA,MAAMA,CAAIC,MAAa,CAAyB,CACpDC,eAAe,CAAC,CACdC,OAAO,CAAE,0CAA0C,CACnDC,UAAU,CAAE,QACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,2DAAyD,CAAM,CAAC,CAC/E;;;;"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import '../../Typography/BaseText/BaseText.native.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import { throwBladeError } from '../../../utils/logger/logger.js';
|
|
5
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
6
|
-
import 'react-native';
|
|
7
|
-
import '../../../tokens/global/typography.js';
|
|
8
|
-
import '../../../tokens/global/motion.js';
|
|
9
|
-
import '../../BladeProvider/useTheme.js';
|
|
10
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
import '../../Typography/Heading/Heading.js';
|
|
11
2
|
import { Text } from '../../Typography/Text/Text.js';
|
|
12
3
|
import '../../Typography/Code/Code.js';
|
|
4
|
+
import '../../Typography/Display/Display.js';
|
|
5
|
+
import { throwBladeError } from '../../../utils/logger/logger.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
7
|
|
|
14
8
|
var TabNavItem=function TabNavItem(_props){throwBladeError({message:'TabNavItem is not yet implemented for native',moduleName:'TabNavItem'});return jsx(Text,{children:"TabNavItem Component is not available for Native mobile apps."});};
|
|
15
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabNavItem.native.js","sources":["../../../../../../src/components/TopNav/TabNav/TabNavItem.native.tsx"],"sourcesContent":["import { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst TabNavItem = (_props: never): React.ReactElement => {\n throwBladeError({\n message: 'TabNavItem is not yet implemented for native',\n moduleName: 'TabNavItem',\n });\n\n return <Text>TabNavItem Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TabNavItem };\n"],"names":["TabNavItem","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabNavItem.native.js","sources":["../../../../../../src/components/TopNav/TabNav/TabNavItem.native.tsx"],"sourcesContent":["import { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst TabNavItem = (_props: never): React.ReactElement => {\n throwBladeError({\n message: 'TabNavItem is not yet implemented for native',\n moduleName: 'TabNavItem',\n });\n\n return <Text>TabNavItem Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TabNavItem };\n"],"names":["TabNavItem","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;AAGM,IAAAA,UAAU,CAAG,SAAbA,UAAUA,CAAIC,MAAa,CAAyB,CACxDC,eAAe,CAAC,CACdC,OAAO,CAAE,8CAA8C,CACvDC,UAAU,CAAE,YACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,+DAA6D,CAAM,CAAC,CACnF;;;;"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import '../Typography/BaseText/BaseText.native.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import { throwBladeError } from '../../utils/logger/logger.js';
|
|
5
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
6
|
-
import 'react-native';
|
|
7
|
-
import '../../tokens/global/typography.js';
|
|
8
|
-
import '../../tokens/global/motion.js';
|
|
9
|
-
import '../BladeProvider/useTheme.js';
|
|
10
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
import '../Typography/Heading/Heading.js';
|
|
11
2
|
import { Text } from '../Typography/Text/Text.js';
|
|
12
3
|
import '../Typography/Code/Code.js';
|
|
4
|
+
import '../Typography/Display/Display.js';
|
|
5
|
+
import { throwBladeError } from '../../utils/logger/logger.js';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
13
7
|
|
|
14
8
|
var TopNav=function TopNav(_props){throwBladeError({message:'TopNav is not yet implemented for native',moduleName:'TopNav'});return jsx(Text,{children:"TopNav Component is not available for Native mobile apps."});};
|
|
15
9
|
|