@razorpay/blade 10.23.5 → 11.1.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/AccordionButton.native.js +2 -3
- package/build/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionItem.js +1 -1
- package/build/lib/native/components/Accordion/AccordionItem.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 +2 -3
- package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListBox.native.js +4 -1
- package/build/lib/native/components/ActionList/ActionListBox.native.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListItem.js +1 -2
- package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js +1 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js.map +1 -1
- package/build/lib/native/components/ActionList/actionListUtils.js +1 -1
- package/build/lib/native/components/ActionList/actionListUtils.js.map +1 -1
- package/build/lib/native/components/ActionList/styles/StyledActionListItem.native.js +1 -1
- package/build/lib/native/components/ActionList/styles/StyledActionListItem.native.js.map +1 -1
- package/build/lib/native/components/Alert/Alert.js +1 -3
- package/build/lib/native/components/Alert/Alert.js.map +1 -1
- package/build/lib/native/components/Alert/styles.js +1 -1
- package/build/lib/native/components/Alert/styles.js.map +1 -1
- package/build/lib/native/components/Amount/Amount.js +7 -3
- package/build/lib/native/components/Amount/Amount.js.map +1 -1
- package/build/lib/native/components/Amount/amountTokens.js +2 -2
- package/build/lib/native/components/Amount/amountTokens.js.map +1 -1
- package/build/lib/native/components/Badge/Badge.js +3 -2
- package/build/lib/native/components/Badge/Badge.js.map +1 -1
- package/build/lib/native/components/Badge/badgeTokens.js +4 -2
- package/build/lib/native/components/Badge/badgeTokens.js.map +1 -1
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +1 -2
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheet.native.js +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheet.native.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetBackdrop.native.js +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetBackdrop.native.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetCommon.js +2 -2
- package/build/lib/native/components/BottomSheet/BottomSheetCommon.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetFooter.native.js +2 -9
- package/build/lib/native/components/BottomSheet/BottomSheetFooter.native.js.map +1 -1
- package/build/lib/native/components/BottomSheet/getBottomSheetGrabHandleStyles.js +1 -1
- package/build/lib/native/components/BottomSheet/getBottomSheetGrabHandleStyles.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js +1 -1
- package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +2 -2
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js +1 -1
- package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/buttonTokens.js +2 -2
- package/build/lib/native/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/getStyledBaseButtonStyles.js +1 -1
- package/build/lib/native/components/Button/BaseButton/getStyledBaseButtonStyles.js.map +1 -1
- package/build/lib/native/components/Button/Button/Button.js +1 -1
- package/build/lib/native/components/Button/Button/Button.js.map +1 -1
- package/build/lib/native/components/Button/IconButton/IconButton.js +1 -1
- package/build/lib/native/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/native/components/Button/IconButton/StyledIconButton.native.js +1 -1
- package/build/lib/native/components/Button/IconButton/StyledIconButton.native.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 +1 -1
- package/build/lib/native/components/Card/CardFooter.js.map +1 -1
- package/build/lib/native/components/Card/CardHeader.js +3 -3
- 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/Card/CardSurface.native.js +1 -1
- package/build/lib/native/components/Card/CardSurface.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Carousel.native.js +2 -1
- package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
- package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js +2 -1
- package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/StyledNavigationButton.native.js +7 -1
- package/build/lib/native/components/Carousel/NavigationButton/StyledNavigationButton.native.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js +2 -1
- package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js +1 -1
- package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js.map +1 -1
- package/build/lib/native/components/Checkbox/checkboxTokens.js +1 -1
- package/build/lib/native/components/Checkbox/checkboxTokens.js.map +1 -1
- package/build/lib/native/components/Chip/AnimatedChip.native.js +1 -1
- package/build/lib/native/components/Chip/AnimatedChip.native.js.map +1 -1
- package/build/lib/native/components/Chip/Chip.js +1 -1
- package/build/lib/native/components/Chip/Chip.js.map +1 -1
- package/build/lib/native/components/Chip/ChipGroup.js +1 -1
- 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/Chip/getAnimatedChipStyles.js +1 -1
- package/build/lib/native/components/Chip/getAnimatedChipStyles.js.map +1 -1
- package/build/lib/native/components/Chip/useChipGroup.js +1 -1
- package/build/lib/native/components/Chip/useChipGroup.js.map +1 -1
- package/build/lib/native/components/Counter/Counter.js +3 -3
- package/build/lib/native/components/Counter/Counter.js.map +1 -1
- package/build/lib/native/components/Counter/counterTokens.js +2 -2
- package/build/lib/native/components/Counter/counterTokens.js.map +1 -1
- package/build/lib/native/components/Divider/Divider.js +1 -1
- package/build/lib/native/components/Divider/Divider.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Dropdown/StyledDropdownOverlay.js +1 -1
- package/build/lib/native/components/Dropdown/StyledDropdownOverlay.js.map +1 -1
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +1 -1
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/native/components/Form/FormHint.js +2 -2
- package/build/lib/native/components/Form/FormHint.js.map +1 -1
- package/build/lib/native/components/Form/FormLabel.js +2 -2
- package/build/lib/native/components/Form/FormLabel.js.map +1 -1
- package/build/lib/native/components/Form/Selector/SelectorSupportText.js +4 -2
- package/build/lib/native/components/Form/Selector/SelectorSupportText.js.map +1 -1
- package/build/lib/native/components/Form/Selector/SelectorTitle.js +2 -2
- package/build/lib/native/components/Form/Selector/SelectorTitle.js.map +1 -1
- package/build/lib/native/components/Icons/useIconProps/useIconProps.js +1 -1
- package/build/lib/native/components/Icons/useIconProps/useIconProps.js.map +1 -1
- package/build/lib/native/components/Indicator/Indicator.js +1 -1
- 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/BaseInputAnimatedBorder.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputAnimatedBorder.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
- package/build/lib/native/components/Link/BaseLink/BaseLink.js +3 -3
- package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/native/components/Link/BaseLink/StyledBaseLink.native.js +1 -1
- package/build/lib/native/components/Link/BaseLink/StyledBaseLink.native.js.map +1 -1
- package/build/lib/native/components/Link/Link/Link.js +1 -1
- package/build/lib/native/components/Link/Link/Link.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 +1 -1
- package/build/lib/native/components/List/ListItem.js.map +1 -1
- package/build/lib/native/components/List/ListItemIcons.js +4 -1
- package/build/lib/native/components/List/ListItemIcons.js.map +1 -1
- package/build/lib/native/components/Popover/Popover.native.js +1 -1
- package/build/lib/native/components/Popover/Popover.native.js.map +1 -1
- package/build/lib/native/components/Popover/PopoverContent.js +2 -3
- package/build/lib/native/components/Popover/PopoverContent.js.map +1 -1
- package/build/lib/native/components/Popover/getPopoverContentWrapperStyles.js +1 -1
- package/build/lib/native/components/Popover/getPopoverContentWrapperStyles.js.map +1 -1
- package/build/lib/native/components/ProgressBar/ProgressBar.js +14 -18
- package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/native/components/Radio/Radio.js +1 -1
- package/build/lib/native/components/Radio/Radio.js.map +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIcon.js +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIcon.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/Radio/radioTokens.js +1 -1
- package/build/lib/native/components/Radio/radioTokens.js.map +1 -1
- package/build/lib/native/components/Skeleton/PulseAnimation.native.js +1 -2
- package/build/lib/native/components/Skeleton/PulseAnimation.native.js.map +1 -1
- package/build/lib/native/components/Skeleton/Skeleton.js +1 -1
- package/build/lib/native/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/native/components/Spinner/Spinner/Spinner.js +1 -1
- package/build/lib/native/components/Spinner/Spinner/Spinner.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/Tabs/TabIndicator.native.js +1 -1
- package/build/lib/native/components/Tabs/TabIndicator.native.js.map +1 -1
- package/build/lib/native/components/Tabs/Tabs.native.js +3 -2
- package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
- package/build/lib/native/components/Tabs/tabTokens.js +2 -2
- package/build/lib/native/components/Tabs/tabTokens.js.map +1 -1
- package/build/lib/native/components/Tag/Tag.js +1 -1
- package/build/lib/native/components/Tag/Tag.js.map +1 -1
- package/build/lib/native/components/Tooltip/Tooltip.native.js +1 -1
- package/build/lib/native/components/Tooltip/Tooltip.native.js.map +1 -1
- package/build/lib/native/components/Tooltip/TooltipContent.js +1 -1
- package/build/lib/native/components/Tooltip/TooltipContent.js.map +1 -1
- package/build/lib/native/components/Tooltip/getTooltipContentWrapperStyles.js +1 -1
- package/build/lib/native/components/Tooltip/getTooltipContentWrapperStyles.js.map +1 -1
- package/build/lib/native/components/Typography/BaseText/BaseText.native.js +1 -1
- package/build/lib/native/components/Typography/BaseText/BaseText.native.js.map +1 -1
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js +2 -1
- package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.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 +1 -1
- package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/native/components/Typography/Heading/Heading.js +1 -2
- package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/native/components/Typography/Text/Text.js +1 -1
- package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/native/components/Typography/Text/getTextStyles.js +1 -1
- package/build/lib/native/components/Typography/Text/getTextStyles.js.map +1 -1
- package/build/lib/native/components/index.js +37 -38
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/global/border.js +1 -1
- package/build/lib/native/tokens/global/border.js.map +1 -1
- package/build/lib/native/tokens/global/colors.js +1 -1
- package/build/lib/native/tokens/global/colors.js.map +1 -1
- package/build/lib/native/tokens/global/elevation/elevation.native.js +1 -1
- package/build/lib/native/tokens/global/elevation/elevation.native.js.map +1 -1
- package/build/lib/native/tokens/global/fontFamily/fontFamily.native.js +1 -1
- package/build/lib/native/tokens/global/fontFamily/fontFamily.native.js.map +1 -1
- package/build/lib/native/tokens/global/motion.js.map +1 -1
- package/build/lib/native/tokens/global/opacity.js +1 -1
- package/build/lib/native/tokens/global/opacity.js.map +1 -1
- package/build/lib/native/tokens/global/typography.js +1 -1
- package/build/lib/native/tokens/global/typography.js.map +1 -1
- package/build/lib/native/tokens/index.js +1 -2
- package/build/lib/native/tokens/index.js.map +1 -1
- package/build/lib/native/tokens/theme/bladeTheme.js +13 -0
- package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -0
- package/build/lib/native/tokens/theme/createTheme.js +2 -2
- package/build/lib/native/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/native/tokens/theme/overrideTheme.js +3 -3
- package/build/lib/native/tokens/theme/overrideTheme.js.map +1 -1
- package/build/lib/native/tokens/theme/theme.js.map +1 -1
- package/build/lib/native/utils/getFocusRingStyles/getFocusRingStyles.native.js +4 -0
- package/build/lib/native/utils/getFocusRingStyles/getFocusRingStyles.native.js.map +1 -0
- package/build/lib/native/utils/lodashButBetter/get.js.map +1 -1
- package/build/lib/native/utils/lodashButBetter/isEmpty.js.map +1 -1
- package/build/lib/native/utils/makeLetterSpacing/makeLetterSpacing.js +4 -0
- package/build/lib/native/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -0
- package/build/lib/native/utils/objectKeysWithType.js +4 -0
- package/build/lib/native/utils/objectKeysWithType.js.map +1 -0
- package/build/lib/native/utils/useInteraction.js +1 -1
- package/build/lib/native/utils/useInteraction.js.map +1 -1
- package/build/lib/web/development/components/Accordion/AccordionButton.web.js +8 -6
- package/build/lib/web/development/components/Accordion/AccordionButton.web.js.map +1 -1
- package/build/lib/web/development/components/Accordion/AccordionItem.js +1 -1
- package/build/lib/web/development/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/web/development/components/Accordion/StyledAccordionButton.web.js +10 -11
- package/build/lib/web/development/components/Accordion/StyledAccordionButton.web.js.map +1 -1
- package/build/lib/web/development/components/Accordion/commonStyles.js +3 -6
- package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionList.js +21 -48
- package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionListItem.js +6 -12
- package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionListNoResults.js +3 -3
- package/build/lib/web/development/components/ActionList/ActionListNoResults.js.map +1 -1
- package/build/lib/web/development/components/ActionList/actionListUtils.js +3 -3
- package/build/lib/web/development/components/ActionList/actionListUtils.js.map +1 -1
- package/build/lib/web/development/components/ActionList/index.js +1 -1
- package/build/lib/web/development/components/ActionList/styles/StyledActionListItem.web.js +6 -3
- package/build/lib/web/development/components/ActionList/styles/StyledActionListItem.web.js.map +1 -1
- package/build/lib/web/development/components/Alert/Alert.js +36 -52
- package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/development/components/Alert/styles.js +3 -7
- package/build/lib/web/development/components/Alert/styles.js.map +1 -1
- package/build/lib/web/development/components/Amount/Amount.js +141 -76
- package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/development/components/Amount/amountTokens.js +67 -34
- package/build/lib/web/development/components/Amount/amountTokens.js.map +1 -1
- package/build/lib/web/development/components/Badge/Badge.js +26 -35
- package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/development/components/Badge/badgeTokens.js +7 -5
- package/build/lib/web/development/components/Badge/badgeTokens.js.map +1 -1
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +7 -7
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +3 -3
- package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +1 -5
- package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetCommon.js +1 -5
- package/build/lib/web/development/components/BottomSheet/BottomSheetCommon.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js +1 -5
- package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js.map +1 -1
- package/build/lib/web/development/components/BottomSheet/getBottomSheetGrabHandleStyles.js +1 -1
- package/build/lib/web/development/components/BottomSheet/getBottomSheetGrabHandleStyles.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js +15 -4
- package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/development/components/Box/BaseBox/getResponsiveValue.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/Button/BaseButton/BaseButton.js +103 -91
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/StyledBaseButton.web.js +4 -4
- package/build/lib/web/development/components/Button/BaseButton/StyledBaseButton.web.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js +113 -6
- package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/getStyledBaseButtonStyles.js +2 -1
- package/build/lib/web/development/components/Button/BaseButton/getStyledBaseButtonStyles.js.map +1 -1
- package/build/lib/web/development/components/Button/Button/Button.js +1 -1
- package/build/lib/web/development/components/Button/Button/Button.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/IconButton.js +3 -3
- package/build/lib/web/development/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +15 -14
- package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/development/components/Card/Card.js +8 -5
- package/build/lib/web/development/components/Card/Card.js.map +1 -1
- package/build/lib/web/development/components/Card/CardFooter.js +13 -9
- package/build/lib/web/development/components/Card/CardFooter.js.map +1 -1
- package/build/lib/web/development/components/Card/CardHeader.js +28 -15
- package/build/lib/web/development/components/Card/CardHeader.js.map +1 -1
- package/build/lib/web/development/components/Card/CardRoot.web.js +2 -2
- package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/development/components/Card/CardSurface.web.js +2 -5
- package/build/lib/web/development/components/Card/CardSurface.web.js.map +1 -1
- package/build/lib/web/development/components/Card/index.js +1 -1
- package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +9 -9
- package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/web/development/components/Carousel/NavigationButton/NavigationButton.js +2 -2
- package/build/lib/web/development/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
- package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +23 -30
- package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -3
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/Checkbox/checkboxTokens.js +17 -16
- package/build/lib/web/development/components/Checkbox/checkboxTokens.js.map +1 -1
- package/build/lib/web/development/components/Chip/AnimatedChip.web.js +2 -2
- package/build/lib/web/development/components/Chip/AnimatedChip.web.js.map +1 -1
- package/build/lib/web/development/components/Chip/Chip.js +6 -11
- package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/development/components/Chip/ChipGroup.js +3 -5
- package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/web/development/components/Chip/StyledChipWrapper.web.js +2 -2
- package/build/lib/web/development/components/Chip/StyledChipWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Chip/chipTokens.js +38 -38
- package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/web/development/components/Chip/getAnimatedChipStyles.js +1 -1
- package/build/lib/web/development/components/Chip/getAnimatedChipStyles.js.map +1 -1
- package/build/lib/web/development/components/Chip/useChipGroup.js +1 -3
- package/build/lib/web/development/components/Chip/useChipGroup.js.map +1 -1
- package/build/lib/web/development/components/Counter/Counter.js +25 -44
- package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/development/components/Counter/counterTokens.js +5 -5
- package/build/lib/web/development/components/Counter/counterTokens.js.map +1 -1
- package/build/lib/web/development/components/Divider/Divider.js +6 -8
- package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +1 -5
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/StyledDropdownOverlay.js +2 -2
- package/build/lib/web/development/components/Dropdown/StyledDropdownOverlay.js.map +1 -1
- package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js +1 -1
- package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/web/development/components/Form/FormHint.js +11 -13
- package/build/lib/web/development/components/Form/FormHint.js.map +1 -1
- package/build/lib/web/development/components/Form/FormLabel.js +9 -17
- package/build/lib/web/development/components/Form/FormLabel.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +5 -5
- package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorSupportText.js +16 -11
- package/build/lib/web/development/components/Form/Selector/SelectorSupportText.js.map +1 -1
- package/build/lib/web/development/components/Form/Selector/SelectorTitle.js +5 -16
- package/build/lib/web/development/components/Form/Selector/SelectorTitle.js.map +1 -1
- package/build/lib/web/development/components/Icons/_Svg/Circle/Circle.web.js +4 -2
- package/build/lib/web/development/components/Icons/_Svg/Circle/Circle.web.js.map +1 -1
- package/build/lib/web/development/components/Icons/_Svg/Rect/Rect.web.js +4 -2
- package/build/lib/web/development/components/Icons/_Svg/Rect/Rect.web.js.map +1 -1
- package/build/lib/web/development/components/Icons/_Svg/Svg/Svg.web.js +4 -2
- package/build/lib/web/development/components/Icons/_Svg/Svg/Svg.web.js.map +1 -1
- package/build/lib/web/development/components/Icons/useIconProps/useIconProps.js +1 -1
- package/build/lib/web/development/components/Icons/useIconProps/useIconProps.js.map +1 -1
- package/build/lib/web/development/components/Indicator/Indicator.js +9 -16
- 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/BaseInputAnimatedBorder.web.js +2 -2
- package/build/lib/web/development/components/Input/BaseInput/BaseInputAnimatedBorder.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +4 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +4 -6
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +3 -4
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +11 -12
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/Chevron.js +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +20 -32
- package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/development/components/Link/Link/Link.js +1 -1
- package/build/lib/web/development/components/Link/Link/Link.js.map +1 -1
- package/build/lib/web/development/components/List/List.js +1 -3
- package/build/lib/web/development/components/List/List.js.map +1 -1
- package/build/lib/web/development/components/List/ListItem.js +3 -3
- package/build/lib/web/development/components/List/ListItem.js.map +1 -1
- package/build/lib/web/development/components/List/ListItemIcons.js +11 -7
- package/build/lib/web/development/components/List/ListItemIcons.js.map +1 -1
- package/build/lib/web/development/components/Modal/Modal.web.js +1 -1
- package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalBackdrop.js +1 -1
- package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
- package/build/lib/web/development/components/Modal/ModalHeader.web.js +1 -5
- package/build/lib/web/development/components/Modal/ModalHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Popover/Popover.web.js +2 -2
- package/build/lib/web/development/components/Popover/Popover.web.js.map +1 -1
- package/build/lib/web/development/components/Popover/PopoverContent.js +4 -5
- package/build/lib/web/development/components/Popover/PopoverContent.js.map +1 -1
- package/build/lib/web/development/components/Popover/PopoverInteractiveWrapper.web.js +5 -5
- package/build/lib/web/development/components/Popover/PopoverInteractiveWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Popover/getPopoverContentWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Popover/getPopoverContentWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js +9 -13
- package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/development/components/Radio/Radio.js +1 -0
- package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIcon.js +2 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIcon.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/Radio/radioTokens.js +23 -22
- package/build/lib/web/development/components/Radio/radioTokens.js.map +1 -1
- package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js +4 -7
- package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js.map +1 -1
- package/build/lib/web/development/components/Skeleton/Skeleton.js +3 -6
- package/build/lib/web/development/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +9 -14
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +2 -5
- package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js +1 -1
- package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.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/SpotlightPopoverTour/TourPopover.web.js +2 -2
- package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
- package/build/lib/web/development/components/Switch/switchTokens.js +10 -10
- package/build/lib/web/development/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/web/development/components/Table/Table.web.js +17 -9
- package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +14 -12
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableContext.js +4 -2
- package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
- package/build/lib/web/development/components/Table/TableFooter.web.js +7 -7
- package/build/lib/web/development/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableHeader.web.js +18 -16
- package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TablePagination.web.js +24 -8
- package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableToolbar.web.js +4 -3
- package/build/lib/web/development/components/Table/TableToolbar.web.js.map +1 -1
- package/build/lib/web/development/components/Table/tokens.js +41 -43
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabIndicator.web.js +7 -6
- package/build/lib/web/development/components/Tabs/TabIndicator.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabItem.web.js +17 -14
- package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/TabList.web.js +7 -5
- package/build/lib/web/development/components/Tabs/TabList.web.js.map +1 -1
- package/build/lib/web/development/components/Tabs/tabTokens.js +38 -41
- package/build/lib/web/development/components/Tabs/tabTokens.js.map +1 -1
- package/build/lib/web/development/components/Tag/Tag.js +7 -5
- package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/development/components/Tooltip/Tooltip.web.js +6 -13
- package/build/lib/web/development/components/Tooltip/Tooltip.web.js.map +1 -1
- package/build/lib/web/development/components/Tooltip/TooltipContent.js +3 -4
- package/build/lib/web/development/components/Tooltip/TooltipContent.js.map +1 -1
- package/build/lib/web/development/components/Tooltip/getTooltipContentWrapperStyles.js +2 -2
- package/build/lib/web/development/components/Tooltip/getTooltipContentWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/Typography/BaseText/BaseText.web.js +10 -2
- package/build/lib/web/development/components/Typography/BaseText/BaseText.web.js.map +1 -1
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js +10 -2
- package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/development/components/Typography/Code/Code.js +3 -3
- package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/web/development/components/Typography/Display/Display.js +23 -25
- package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/web/development/components/Typography/Heading/Heading.js +30 -61
- package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/web/development/components/Typography/Text/Text.js +26 -24
- package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/development/components/Typography/Text/getTextStyles.js +3 -5
- package/build/lib/web/development/components/Typography/Text/getTextStyles.js.map +1 -1
- package/build/lib/web/development/components/Typography/index.js +0 -1
- package/build/lib/web/development/components/Typography/index.js.map +1 -1
- package/build/lib/web/development/components/index.js +56 -57
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/global/border.js +3 -0
- package/build/lib/web/development/tokens/global/border.js.map +1 -1
- package/build/lib/web/development/tokens/global/colors.js +227 -250
- package/build/lib/web/development/tokens/global/colors.js.map +1 -1
- package/build/lib/web/development/tokens/global/elevation/elevation.web.js +6 -6
- package/build/lib/web/development/tokens/global/elevation/elevation.web.js.map +1 -1
- package/build/lib/web/development/tokens/global/fontFamily/fontFamily.web.js +3 -2
- package/build/lib/web/development/tokens/global/fontFamily/fontFamily.web.js.map +1 -1
- package/build/lib/web/development/tokens/global/motion.js.map +1 -1
- package/build/lib/web/development/tokens/global/opacity.js +12 -9
- package/build/lib/web/development/tokens/global/opacity.js.map +1 -1
- package/build/lib/web/development/tokens/global/typography.js +37 -40
- package/build/lib/web/development/tokens/global/typography.js.map +1 -1
- package/build/lib/web/development/tokens/index.js +1 -2
- package/build/lib/web/development/tokens/index.js.map +1 -1
- package/build/lib/web/development/tokens/theme/bladeTheme.js +925 -0
- package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -0
- package/build/lib/web/development/tokens/theme/createTheme.js +123 -177
- package/build/lib/web/development/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/development/tokens/theme/index.js +1 -2
- package/build/lib/web/development/tokens/theme/index.js.map +1 -1
- package/build/lib/web/development/tokens/theme/overrideTheme.js +4 -4
- package/build/lib/web/development/tokens/theme/overrideTheme.js.map +1 -1
- package/build/lib/web/development/tokens/theme/theme.js +1 -7
- package/build/lib/web/development/tokens/theme/theme.js.map +1 -1
- package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +26 -0
- package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -0
- package/build/lib/web/development/utils/getFocusRingStyles/index.js +2 -0
- package/build/lib/web/development/utils/lodashButBetter/get.js +8 -0
- package/build/lib/web/development/utils/lodashButBetter/get.js.map +1 -1
- package/build/lib/web/development/utils/lodashButBetter/isEmpty.js.map +1 -1
- package/build/lib/web/development/utils/makeLetterSpacing/index.js +2 -0
- package/build/lib/web/development/utils/makeLetterSpacing/makeLetterSpacing.js +7 -0
- package/build/lib/web/development/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -0
- package/build/lib/web/development/utils/objectKeysWithType.js +7 -0
- package/build/lib/web/development/utils/objectKeysWithType.js.map +1 -0
- package/build/lib/web/development/utils/useInteraction.js +3 -3
- package/build/lib/web/development/utils/useInteraction.js.map +1 -1
- package/build/lib/web/production/components/Accordion/AccordionButton.web.js +8 -6
- package/build/lib/web/production/components/Accordion/AccordionButton.web.js.map +1 -1
- package/build/lib/web/production/components/Accordion/AccordionItem.js +1 -1
- package/build/lib/web/production/components/Accordion/AccordionItem.js.map +1 -1
- package/build/lib/web/production/components/Accordion/StyledAccordionButton.web.js +10 -11
- package/build/lib/web/production/components/Accordion/StyledAccordionButton.web.js.map +1 -1
- package/build/lib/web/production/components/Accordion/commonStyles.js +3 -6
- package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionList.js +21 -48
- package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionListItem.js +6 -12
- package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionListNoResults.js +3 -3
- package/build/lib/web/production/components/ActionList/ActionListNoResults.js.map +1 -1
- package/build/lib/web/production/components/ActionList/actionListUtils.js +3 -3
- package/build/lib/web/production/components/ActionList/actionListUtils.js.map +1 -1
- package/build/lib/web/production/components/ActionList/index.js +1 -1
- package/build/lib/web/production/components/ActionList/styles/StyledActionListItem.web.js +6 -3
- package/build/lib/web/production/components/ActionList/styles/StyledActionListItem.web.js.map +1 -1
- package/build/lib/web/production/components/Alert/Alert.js +36 -52
- package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
- package/build/lib/web/production/components/Alert/styles.js +3 -7
- package/build/lib/web/production/components/Alert/styles.js.map +1 -1
- package/build/lib/web/production/components/Amount/Amount.js +141 -76
- package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
- package/build/lib/web/production/components/Amount/amountTokens.js +67 -34
- package/build/lib/web/production/components/Amount/amountTokens.js.map +1 -1
- package/build/lib/web/production/components/Badge/Badge.js +26 -35
- package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/production/components/Badge/badgeTokens.js +7 -5
- package/build/lib/web/production/components/Badge/badgeTokens.js.map +1 -1
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +7 -7
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +3 -3
- package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +1 -5
- package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetCommon.js +1 -5
- package/build/lib/web/production/components/BottomSheet/BottomSheetCommon.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js +1 -5
- package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js.map +1 -1
- package/build/lib/web/production/components/BottomSheet/getBottomSheetGrabHandleStyles.js +1 -1
- package/build/lib/web/production/components/BottomSheet/getBottomSheetGrabHandleStyles.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js +15 -4
- package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
- package/build/lib/web/production/components/Box/BaseBox/getResponsiveValue.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/Button/BaseButton/BaseButton.js +103 -91
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/StyledBaseButton.web.js +4 -4
- package/build/lib/web/production/components/Button/BaseButton/StyledBaseButton.web.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js +113 -6
- package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/getStyledBaseButtonStyles.js +2 -1
- package/build/lib/web/production/components/Button/BaseButton/getStyledBaseButtonStyles.js.map +1 -1
- package/build/lib/web/production/components/Button/Button/Button.js +1 -1
- package/build/lib/web/production/components/Button/Button/Button.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/IconButton.js +3 -3
- package/build/lib/web/production/components/Button/IconButton/IconButton.js.map +1 -1
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +15 -14
- package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
- package/build/lib/web/production/components/Card/Card.js +8 -5
- package/build/lib/web/production/components/Card/Card.js.map +1 -1
- package/build/lib/web/production/components/Card/CardFooter.js +13 -9
- package/build/lib/web/production/components/Card/CardFooter.js.map +1 -1
- package/build/lib/web/production/components/Card/CardHeader.js +28 -15
- package/build/lib/web/production/components/Card/CardHeader.js.map +1 -1
- package/build/lib/web/production/components/Card/CardRoot.web.js +2 -2
- package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
- package/build/lib/web/production/components/Card/CardSurface.web.js +2 -5
- package/build/lib/web/production/components/Card/CardSurface.web.js.map +1 -1
- package/build/lib/web/production/components/Card/index.js +1 -1
- package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
- package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +9 -9
- package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
- package/build/lib/web/production/components/Carousel/NavigationButton/NavigationButton.js +2 -2
- package/build/lib/web/production/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
- package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +23 -30
- package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -3
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/Checkbox/checkboxTokens.js +17 -16
- package/build/lib/web/production/components/Checkbox/checkboxTokens.js.map +1 -1
- package/build/lib/web/production/components/Chip/AnimatedChip.web.js +2 -2
- package/build/lib/web/production/components/Chip/AnimatedChip.web.js.map +1 -1
- package/build/lib/web/production/components/Chip/Chip.js +6 -11
- package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
- package/build/lib/web/production/components/Chip/ChipGroup.js +3 -5
- package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
- package/build/lib/web/production/components/Chip/StyledChipWrapper.web.js +2 -2
- package/build/lib/web/production/components/Chip/StyledChipWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Chip/chipTokens.js +38 -38
- package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
- package/build/lib/web/production/components/Chip/getAnimatedChipStyles.js +1 -1
- package/build/lib/web/production/components/Chip/getAnimatedChipStyles.js.map +1 -1
- package/build/lib/web/production/components/Chip/useChipGroup.js +1 -3
- package/build/lib/web/production/components/Chip/useChipGroup.js.map +1 -1
- package/build/lib/web/production/components/Counter/Counter.js +25 -44
- package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
- package/build/lib/web/production/components/Counter/counterTokens.js +5 -5
- package/build/lib/web/production/components/Counter/counterTokens.js.map +1 -1
- package/build/lib/web/production/components/Divider/Divider.js +6 -8
- package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +1 -5
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/StyledDropdownOverlay.js +2 -2
- package/build/lib/web/production/components/Dropdown/StyledDropdownOverlay.js.map +1 -1
- package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js +1 -1
- package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/web/production/components/Form/FormHint.js +11 -13
- package/build/lib/web/production/components/Form/FormHint.js.map +1 -1
- package/build/lib/web/production/components/Form/FormLabel.js +9 -17
- package/build/lib/web/production/components/Form/FormLabel.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +5 -5
- package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorSupportText.js +16 -11
- package/build/lib/web/production/components/Form/Selector/SelectorSupportText.js.map +1 -1
- package/build/lib/web/production/components/Form/Selector/SelectorTitle.js +5 -16
- package/build/lib/web/production/components/Form/Selector/SelectorTitle.js.map +1 -1
- package/build/lib/web/production/components/Icons/_Svg/Circle/Circle.web.js +4 -2
- package/build/lib/web/production/components/Icons/_Svg/Circle/Circle.web.js.map +1 -1
- package/build/lib/web/production/components/Icons/_Svg/Rect/Rect.web.js +4 -2
- package/build/lib/web/production/components/Icons/_Svg/Rect/Rect.web.js.map +1 -1
- package/build/lib/web/production/components/Icons/_Svg/Svg/Svg.web.js +4 -2
- package/build/lib/web/production/components/Icons/_Svg/Svg/Svg.web.js.map +1 -1
- package/build/lib/web/production/components/Icons/useIconProps/useIconProps.js +1 -1
- package/build/lib/web/production/components/Icons/useIconProps/useIconProps.js.map +1 -1
- package/build/lib/web/production/components/Indicator/Indicator.js +9 -16
- 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/BaseInputAnimatedBorder.web.js +2 -2
- package/build/lib/web/production/components/Input/BaseInput/BaseInputAnimatedBorder.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +4 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +4 -6
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +3 -4
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +11 -12
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/Chevron.js +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +20 -32
- package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
- package/build/lib/web/production/components/Link/Link/Link.js +1 -1
- package/build/lib/web/production/components/Link/Link/Link.js.map +1 -1
- package/build/lib/web/production/components/List/List.js +1 -3
- package/build/lib/web/production/components/List/List.js.map +1 -1
- package/build/lib/web/production/components/List/ListItem.js +3 -3
- package/build/lib/web/production/components/List/ListItem.js.map +1 -1
- package/build/lib/web/production/components/List/ListItemIcons.js +11 -7
- package/build/lib/web/production/components/List/ListItemIcons.js.map +1 -1
- package/build/lib/web/production/components/Modal/Modal.web.js +1 -1
- package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalBackdrop.js +1 -1
- package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
- package/build/lib/web/production/components/Modal/ModalHeader.web.js +1 -5
- package/build/lib/web/production/components/Modal/ModalHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Popover/Popover.web.js +2 -2
- package/build/lib/web/production/components/Popover/Popover.web.js.map +1 -1
- package/build/lib/web/production/components/Popover/PopoverContent.js +4 -5
- package/build/lib/web/production/components/Popover/PopoverContent.js.map +1 -1
- package/build/lib/web/production/components/Popover/PopoverInteractiveWrapper.web.js +5 -5
- package/build/lib/web/production/components/Popover/PopoverInteractiveWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Popover/getPopoverContentWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Popover/getPopoverContentWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js +9 -13
- package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
- package/build/lib/web/production/components/Radio/Radio.js +1 -0
- package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIcon.js +2 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIcon.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/Radio/radioTokens.js +23 -22
- package/build/lib/web/production/components/Radio/radioTokens.js.map +1 -1
- package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js +4 -7
- package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js.map +1 -1
- package/build/lib/web/production/components/Skeleton/Skeleton.js +3 -6
- package/build/lib/web/production/components/Skeleton/Skeleton.js.map +1 -1
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +9 -14
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +2 -5
- package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js +1 -1
- package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.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/SpotlightPopoverTour/TourPopover.web.js +2 -2
- package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
- package/build/lib/web/production/components/Switch/switchTokens.js +10 -10
- package/build/lib/web/production/components/Switch/switchTokens.js.map +1 -1
- package/build/lib/web/production/components/Table/Table.web.js +17 -9
- package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +14 -12
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableContext.js +4 -2
- package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
- package/build/lib/web/production/components/Table/TableFooter.web.js +7 -7
- package/build/lib/web/production/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableHeader.web.js +18 -16
- package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TablePagination.web.js +24 -8
- package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableToolbar.web.js +4 -3
- package/build/lib/web/production/components/Table/TableToolbar.web.js.map +1 -1
- package/build/lib/web/production/components/Table/tokens.js +41 -43
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabIndicator.web.js +7 -6
- package/build/lib/web/production/components/Tabs/TabIndicator.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabItem.web.js +17 -14
- package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/TabList.web.js +7 -5
- package/build/lib/web/production/components/Tabs/TabList.web.js.map +1 -1
- package/build/lib/web/production/components/Tabs/tabTokens.js +38 -41
- package/build/lib/web/production/components/Tabs/tabTokens.js.map +1 -1
- package/build/lib/web/production/components/Tag/Tag.js +7 -5
- package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
- package/build/lib/web/production/components/Tooltip/Tooltip.web.js +6 -13
- package/build/lib/web/production/components/Tooltip/Tooltip.web.js.map +1 -1
- package/build/lib/web/production/components/Tooltip/TooltipContent.js +3 -4
- package/build/lib/web/production/components/Tooltip/TooltipContent.js.map +1 -1
- package/build/lib/web/production/components/Tooltip/getTooltipContentWrapperStyles.js +2 -2
- package/build/lib/web/production/components/Tooltip/getTooltipContentWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/Typography/BaseText/BaseText.web.js +10 -2
- package/build/lib/web/production/components/Typography/BaseText/BaseText.web.js.map +1 -1
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js +10 -2
- package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
- package/build/lib/web/production/components/Typography/Code/Code.js +3 -3
- package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
- package/build/lib/web/production/components/Typography/Display/Display.js +23 -25
- package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
- package/build/lib/web/production/components/Typography/Heading/Heading.js +30 -61
- package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
- package/build/lib/web/production/components/Typography/Text/Text.js +26 -24
- package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/production/components/Typography/Text/getTextStyles.js +3 -5
- package/build/lib/web/production/components/Typography/Text/getTextStyles.js.map +1 -1
- package/build/lib/web/production/components/Typography/index.js +0 -1
- package/build/lib/web/production/components/Typography/index.js.map +1 -1
- package/build/lib/web/production/components/index.js +56 -57
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/global/border.js +3 -0
- package/build/lib/web/production/tokens/global/border.js.map +1 -1
- package/build/lib/web/production/tokens/global/colors.js +227 -250
- package/build/lib/web/production/tokens/global/colors.js.map +1 -1
- package/build/lib/web/production/tokens/global/elevation/elevation.web.js +6 -6
- package/build/lib/web/production/tokens/global/elevation/elevation.web.js.map +1 -1
- package/build/lib/web/production/tokens/global/fontFamily/fontFamily.web.js +3 -2
- package/build/lib/web/production/tokens/global/fontFamily/fontFamily.web.js.map +1 -1
- package/build/lib/web/production/tokens/global/motion.js.map +1 -1
- package/build/lib/web/production/tokens/global/opacity.js +12 -9
- package/build/lib/web/production/tokens/global/opacity.js.map +1 -1
- package/build/lib/web/production/tokens/global/typography.js +37 -40
- package/build/lib/web/production/tokens/global/typography.js.map +1 -1
- package/build/lib/web/production/tokens/index.js +1 -2
- package/build/lib/web/production/tokens/index.js.map +1 -1
- package/build/lib/web/production/tokens/theme/bladeTheme.js +925 -0
- package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -0
- package/build/lib/web/production/tokens/theme/createTheme.js +123 -177
- package/build/lib/web/production/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/production/tokens/theme/index.js +1 -2
- package/build/lib/web/production/tokens/theme/index.js.map +1 -1
- package/build/lib/web/production/tokens/theme/overrideTheme.js +4 -4
- package/build/lib/web/production/tokens/theme/overrideTheme.js.map +1 -1
- package/build/lib/web/production/tokens/theme/theme.js +1 -7
- package/build/lib/web/production/tokens/theme/theme.js.map +1 -1
- package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +26 -0
- package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -0
- package/build/lib/web/production/utils/getFocusRingStyles/index.js +2 -0
- package/build/lib/web/production/utils/getFocusRingStyles/index.js.map +1 -0
- package/build/lib/web/production/utils/lodashButBetter/get.js +8 -0
- package/build/lib/web/production/utils/lodashButBetter/get.js.map +1 -1
- package/build/lib/web/production/utils/lodashButBetter/isEmpty.js.map +1 -1
- package/build/lib/web/production/utils/makeLetterSpacing/index.js +2 -0
- package/build/lib/web/production/utils/makeLetterSpacing/index.js.map +1 -0
- package/build/lib/web/production/utils/makeLetterSpacing/makeLetterSpacing.js +7 -0
- package/build/lib/web/production/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -0
- package/build/lib/web/production/utils/objectKeysWithType.js +7 -0
- package/build/lib/web/production/utils/objectKeysWithType.js.map +1 -0
- package/build/lib/web/production/utils/useInteraction.js +3 -3
- package/build/lib/web/production/utils/useInteraction.js.map +1 -1
- package/build/types/components/index.d.ts +6040 -6171
- package/build/types/components/index.native.d.ts +4687 -4818
- package/build/types/tokens/index.d.ts +135 -182
- package/build/types/tokens/index.native.d.ts +135 -182
- package/build/types/utils/index.d.ts +94 -154
- package/build/types/utils/index.native.d.ts +94 -154
- package/codemods/brand-refresh/transformers/__tests__/migrate-actionlist.test.ts +88 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-amount.test.ts +186 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-badge.test.ts +32 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-card.test.ts +180 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-colors.test.ts +172 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-contrast-intent-variant.test.ts +206 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-divider.test.ts +24 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-dropdown.test.ts +282 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-table.test.ts +182 -0
- package/codemods/brand-refresh/transformers/__tests__/migrate-typography.test.ts +432 -0
- package/codemods/brand-refresh/transformers/colorTokensMapping.json +624 -0
- package/codemods/brand-refresh/transformers/index.ts +224 -0
- package/codemods/brand-refresh/transformers/migrate-actionlist-and-table.ts +32 -0
- package/codemods/brand-refresh/transformers/migrate-amount.ts +173 -0
- package/codemods/brand-refresh/transformers/migrate-badge.ts +28 -0
- package/codemods/brand-refresh/transformers/migrate-card.ts +43 -0
- package/codemods/brand-refresh/transformers/migrate-contrast-intent-color-props.ts +298 -0
- package/codemods/brand-refresh/transformers/migrate-divider.ts +38 -0
- package/codemods/brand-refresh/transformers/migrate-dropdown.ts +81 -0
- package/codemods/brand-refresh/transformers/migrate-typography.ts +342 -0
- package/codemods/brand-refresh/transformers/utils.ts +7 -0
- package/fonts/blade-fonts-react-native.zip +0 -0
- package/fonts/inter-variable/inter-cyrillic-extra.woff2 +0 -0
- package/fonts/inter-variable/inter-cyrillic.woff2 +0 -0
- package/fonts/inter-variable/inter-greek-extra.woff2 +0 -0
- package/fonts/inter-variable/inter-greek.woff2 +0 -0
- package/fonts/inter-variable/inter-latin-blade-extra.woff2 +0 -0
- package/fonts/inter-variable/inter-latin-blade.woff2 +0 -0
- package/fonts/inter-variable/inter-vietnamese.woff2 +0 -0
- package/fonts/tasa-orbiter.woff2 +0 -0
- package/fonts.css +82 -0
- package/package.json +10 -4
- package/build/css/bankingThemeDarkDesktop.css +0 -751
- package/build/css/bankingThemeDarkMobile.css +0 -751
- package/build/css/bankingThemeLightDesktop.css +0 -751
- package/build/css/bankingThemeLightMobile.css +0 -751
- package/build/css/paymentThemeDarkDesktop.css +0 -751
- package/build/css/paymentThemeDarkMobile.css +0 -751
- package/build/css/paymentThemeLightDesktop.css +0 -751
- package/build/css/paymentThemeLightMobile.css +0 -751
- package/build/lib/native/components/Typography/Title/Title.js +0 -17
- package/build/lib/native/components/Typography/Title/Title.js.map +0 -1
- package/build/lib/native/tokens/theme/bankingTheme.js +0 -12
- package/build/lib/native/tokens/theme/bankingTheme.js.map +0 -1
- package/build/lib/native/tokens/theme/paymentTheme.js +0 -12
- package/build/lib/native/tokens/theme/paymentTheme.js.map +0 -1
- package/build/lib/web/development/components/Typography/Title/Title.js +0 -96
- package/build/lib/web/development/components/Typography/Title/Title.js.map +0 -1
- package/build/lib/web/development/components/Typography/Title/index.js +0 -2
- package/build/lib/web/development/tokens/theme/bankingTheme.js +0 -3086
- package/build/lib/web/development/tokens/theme/bankingTheme.js.map +0 -1
- package/build/lib/web/development/tokens/theme/paymentTheme.js +0 -3086
- package/build/lib/web/development/tokens/theme/paymentTheme.js.map +0 -1
- package/build/lib/web/production/components/Typography/Title/Title.js +0 -96
- package/build/lib/web/production/components/Typography/Title/Title.js.map +0 -1
- package/build/lib/web/production/components/Typography/Title/index.js +0 -2
- package/build/lib/web/production/tokens/theme/bankingTheme.js +0 -3086
- package/build/lib/web/production/tokens/theme/bankingTheme.js.map +0 -1
- package/build/lib/web/production/tokens/theme/paymentTheme.js +0 -3086
- package/build/lib/web/production/tokens/theme/paymentTheme.js.map +0 -1
- /package/build/lib/web/development/{components/Typography/Title → utils/getFocusRingStyles}/index.js.map +0 -0
- /package/build/lib/web/{production/components/Typography/Title → development/utils/makeLetterSpacing}/index.js.map +0 -0
|
@@ -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 { textColor } 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';\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 ({ route, focused }) => {\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\n size={iconSizeMap[size]}\n color={\n selectedState === 'selected'\n ? 'brand.primary.500'\n : 'surface.action.icon.default.lowContrast'\n }\n />\n ) : null}\n <Text\n color={textColor[selectedState].default}\n size={size === 'medium' ? 'medium' : 'large'}\n weight=\"bold\"\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) => (\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.surface.border.normal.lowContrast,\n backgroundColor: theme.colors.surface.background.level2.lowContrast,\n padding: theme.spacing[2],\n }\n : {\n shadowOpacity: 0,\n shadowColor: 'transparent',\n backgroundColor: 'transparent',\n ...(variant !== 'borderless' && {\n borderBottomColor: theme.colors.surface.border.normal.lowContrast,\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","Text","textColor","default","weight","renderTabBar","TabBar","TabList","android_ripple","borderless","scrollEnabled","tabStyle","padding","margin","minHeight","style","shadowOpacity","shadowColor","borderRadius","border","radius","small","borderWidth","thick","borderColor","colors","surface","normal","lowContrast","backgroundColor","background","level2","spacing","borderBottomColor","borderBottomWidth","thin","renderIndicator","TabIndicator","renderLabel","renderBadge","Divider","left","orientation","top","TabsContext","Provider","TabView","navigationState","renderScene","SafeSceneMap","onIndexChange","idx","lazy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,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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,kBAAkB,CAAEO,QAAQ,CAAEkB,cAAc,CAC/C,CAAC,CAED,OACEO,GAAA,CAACyD,WAAW,CAACC,QAAQ,CAAA,CAACrH,KAAK,CAAEiD,YAAa,CAAApE,QAAA,CACxC8E,GAAA,CAAC2D,OAAO,CAAA,CACNC,eAAe,CAAE,CACflH,KAAK,CAAEoC,UAAU,CACjB7B,MAAM,CAANA,MACF,CAAE,CACF4G,WAAW,CAAEC,YAAY,CAACxF,MAAM,CAAE,CAClC4C,YAAY,CAAEA,YAAa,CAC3B6C,aAAa,CAAE,SAAAA,aAACC,CAAAA,GAAG,CAAK,CACtBjF,QAAQ,CAACiF,GAAG,CAAC,CACf,CAAE,CACFrJ,aAAa,CAAEA,aAAc,CAC7BsJ,IAAI,CAAE/F,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 ({ route, focused }) => {\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) => (\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,CAC7E,GAAI,CAACF,OAAO,EAAI,CAACH,cAAK,CAACO,cAAc,CAACJ,OAAO,CAAC,CAAE,CAC9C,UAAUK,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,SAAKC,cAAc,CAACD,KAAK,CAAC,GAAK,UAAU,CAAC,CAAA,CAAA,CACvDO,MAAM,CAAC,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kE,MAAM,CAAEW,UAAU,CAAC,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,CAAA,CACH,CAAC,CACH,CAAA,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,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,4 +1,4 @@
|
|
|
1
|
-
var paddingY={bordered:{horizontal:{desktop:{medium:'spacing.5',large:'spacing.4'},mobile:{medium:'spacing.3',large:'spacing.3'}},vertical:{desktop:{medium:'spacing.2',large:'spacing.2'},mobile:{medium:'spacing.2',large:'spacing.2'}}},filled:{horizontal:{desktop:{medium:'spacing.3',large:'spacing.3'},mobile:{medium:'spacing.2',large:'spacing.2'}},vertical:{desktop:{medium:'spacing.4',large:'spacing.4'},mobile:{medium:'spacing.3',large:'spacing.3'}}}};var paddingX={bordered:{horizontal:{desktop:{medium:'spacing.0',large:'spacing.0'},mobile:{medium:'spacing.0',large:'spacing.0'}},vertical:{desktop:{medium:'spacing.4',large:'spacing.4'},mobile:{medium:'spacing.4',large:'spacing.4'}}},filled:{horizontal:{desktop:{medium:'spacing.3',large:'spacing.3'},mobile:{medium:'spacing.2',large:'spacing.2'}},vertical:{desktop:{medium:'spacing.4',large:'spacing.4'},mobile:{medium:'spacing.3',large:'spacing.3'}}}};var textColor={selected:{default:'
|
|
1
|
+
var paddingY={bordered:{horizontal:{desktop:{medium:'spacing.5',large:'spacing.4'},mobile:{medium:'spacing.3',large:'spacing.3'}},vertical:{desktop:{medium:'spacing.2',large:'spacing.2'},mobile:{medium:'spacing.2',large:'spacing.2'}}},filled:{horizontal:{desktop:{medium:'spacing.3',large:'spacing.3'},mobile:{medium:'spacing.2',large:'spacing.2'}},vertical:{desktop:{medium:'spacing.4',large:'spacing.4'},mobile:{medium:'spacing.3',large:'spacing.3'}}}};var paddingX={bordered:{horizontal:{desktop:{medium:'spacing.0',large:'spacing.0'},mobile:{medium:'spacing.0',large:'spacing.0'}},vertical:{desktop:{medium:'spacing.4',large:'spacing.4'},mobile:{medium:'spacing.4',large:'spacing.4'}}},filled:{horizontal:{desktop:{medium:'spacing.3',large:'spacing.3'},mobile:{medium:'spacing.2',large:'spacing.2'}},vertical:{desktop:{medium:'spacing.4',large:'spacing.4'},mobile:{medium:'spacing.3',large:'spacing.3'}}}};var trackColor='surface.border.gray.muted';var textColor={selected:{default:'interactive.text.primary.subtle',highlighted:'interactive.text.primary.normal',disabled:'interactive.text.primary.normal'},unselected:{default:'interactive.text.gray.muted',highlighted:'interactive.text.gray.subtle',disabled:'interactive.text.gray.disabled'}};var iconColor={unselected:{default:'interactive.icon.gray.muted',highlighted:'interactive.icon.gray.subtle',disabled:'interactive.icon.gray.disabled'},selected:{default:'interactive.icon.primary.subtle',highlighted:'interactive.icon.primary.normal',disabled:'interactive.icon.primary.disabled'}};
|
|
2
2
|
|
|
3
|
-
export { paddingX, paddingY, textColor };
|
|
3
|
+
export { iconColor, paddingX, paddingY, textColor, trackColor };
|
|
4
4
|
//# sourceMappingURL=tabTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabTokens.js","sources":["../../../../../src/components/Tabs/tabTokens.ts"],"sourcesContent":["import type { TabsProps } from './types';\nimport type { DotNotationSpacingStringToken } from '~utils/types';\nimport type { DeviceType } from '~utils';\n\ntype TabSizes = NonNullable<TabsProps['size']>;\ntype TabVariants = Exclude<NonNullable<TabsProps['variant']>, 'borderless'>;\ntype TabOrientation = 'horizontal' | 'vertical';\n\ntype TabItemPadding = Record<\n TabVariants,\n Record<TabOrientation, Record<DeviceType, Record<TabSizes, DotNotationSpacingStringToken>>>\n>;\n\nconst paddingY: TabItemPadding = {\n bordered: {\n horizontal: {\n desktop: {\n medium: 'spacing.5',\n large: 'spacing.4',\n },\n mobile: {\n medium: 'spacing.3',\n large: 'spacing.3',\n },\n },\n vertical: {\n desktop: {\n medium: 'spacing.2',\n large: 'spacing.2',\n },\n mobile: {\n medium: 'spacing.2',\n large: 'spacing.2',\n },\n },\n },\n filled: {\n horizontal: {\n desktop: {\n medium: 'spacing.3',\n large: 'spacing.3',\n },\n mobile: {\n medium: 'spacing.2',\n large: 'spacing.2',\n },\n },\n vertical: {\n desktop: {\n medium: 'spacing.4',\n large: 'spacing.4',\n },\n mobile: {\n medium: 'spacing.3',\n large: 'spacing.3',\n },\n },\n },\n};\n\nconst paddingX: TabItemPadding = {\n bordered: {\n horizontal: {\n desktop: {\n medium: 'spacing.0',\n large: 'spacing.0',\n },\n mobile: {\n medium: 'spacing.0',\n large: 'spacing.0',\n },\n },\n vertical: {\n desktop: {\n medium: 'spacing.4',\n large: 'spacing.4',\n },\n mobile: {\n medium: 'spacing.4',\n large: 'spacing.4',\n },\n },\n },\n filled: {\n horizontal: {\n desktop: {\n medium: 'spacing.3',\n large: 'spacing.3',\n },\n mobile: {\n medium: 'spacing.2',\n large: 'spacing.2',\n },\n },\n vertical: {\n desktop: {\n medium: 'spacing.4',\n large: 'spacing.4',\n },\n mobile: {\n medium: 'spacing.3',\n large: 'spacing.3',\n },\n },\n },\n};\n\nconst textColor = {\n selected: {\n default: '
|
|
1
|
+
{"version":3,"file":"tabTokens.js","sources":["../../../../../src/components/Tabs/tabTokens.ts"],"sourcesContent":["import type { TabsProps } from './types';\nimport type { DotNotationSpacingStringToken } from '~utils/types';\nimport type { DeviceType } from '~utils';\n\ntype TabSizes = NonNullable<TabsProps['size']>;\ntype TabVariants = Exclude<NonNullable<TabsProps['variant']>, 'borderless'>;\ntype TabOrientation = 'horizontal' | 'vertical';\n\ntype TabItemPadding = Record<\n TabVariants,\n Record<TabOrientation, Record<DeviceType, Record<TabSizes, DotNotationSpacingStringToken>>>\n>;\n\nconst paddingY: TabItemPadding = {\n bordered: {\n horizontal: {\n desktop: {\n medium: 'spacing.5',\n large: 'spacing.4',\n },\n mobile: {\n medium: 'spacing.3',\n large: 'spacing.3',\n },\n },\n vertical: {\n desktop: {\n medium: 'spacing.2',\n large: 'spacing.2',\n },\n mobile: {\n medium: 'spacing.2',\n large: 'spacing.2',\n },\n },\n },\n filled: {\n horizontal: {\n desktop: {\n medium: 'spacing.3',\n large: 'spacing.3',\n },\n mobile: {\n medium: 'spacing.2',\n large: 'spacing.2',\n },\n },\n vertical: {\n desktop: {\n medium: 'spacing.4',\n large: 'spacing.4',\n },\n mobile: {\n medium: 'spacing.3',\n large: 'spacing.3',\n },\n },\n },\n};\n\nconst paddingX: TabItemPadding = {\n bordered: {\n horizontal: {\n desktop: {\n medium: 'spacing.0',\n large: 'spacing.0',\n },\n mobile: {\n medium: 'spacing.0',\n large: 'spacing.0',\n },\n },\n vertical: {\n desktop: {\n medium: 'spacing.4',\n large: 'spacing.4',\n },\n mobile: {\n medium: 'spacing.4',\n large: 'spacing.4',\n },\n },\n },\n filled: {\n horizontal: {\n desktop: {\n medium: 'spacing.3',\n large: 'spacing.3',\n },\n mobile: {\n medium: 'spacing.2',\n large: 'spacing.2',\n },\n },\n vertical: {\n desktop: {\n medium: 'spacing.4',\n large: 'spacing.4',\n },\n mobile: {\n medium: 'spacing.3',\n large: 'spacing.3',\n },\n },\n },\n};\n\nconst trackColor = 'surface.border.gray.muted';\nconst textColor = {\n selected: {\n default: 'interactive.text.primary.subtle',\n highlighted: 'interactive.text.primary.normal',\n disabled: 'interactive.text.primary.normal',\n },\n unselected: {\n default: 'interactive.text.gray.muted',\n highlighted: 'interactive.text.gray.subtle',\n disabled: 'interactive.text.gray.disabled',\n },\n} as const;\n\nconst backgroundColor = {\n unselected: {\n bordered: {\n default: 'colors.transparent',\n highlighted: 'colors.transparent',\n disabled: 'colors.transparent',\n },\n borderless: {\n default: 'colors.transparent',\n highlighted: 'colors.transparent',\n disabled: 'colors.transparent',\n },\n filled: {\n default: 'colors.transparent',\n highlighted: 'colors.interactive.background.gray.default',\n disabled: 'colors.transparent',\n },\n },\n selected: {\n bordered: {\n default: 'colors.transparent',\n highlighted: 'colors.transparent',\n disabled: 'colors.transparent',\n },\n borderless: {\n default: 'colors.transparent',\n highlighted: 'colors.transparent',\n disabled: 'colors.transparent',\n },\n filled: {\n default: 'colors.interactive.background.primary.faded',\n highlighted: 'colors.interactive.background.primary.faded',\n disabled: 'colors.transparent',\n },\n },\n} as const;\n\nconst iconColor = {\n unselected: {\n default: 'interactive.icon.gray.muted',\n highlighted: 'interactive.icon.gray.subtle',\n disabled: 'interactive.icon.gray.disabled',\n },\n selected: {\n default: 'interactive.icon.primary.subtle',\n highlighted: 'interactive.icon.primary.normal',\n disabled: 'interactive.icon.primary.disabled',\n },\n} as const;\n\nexport { backgroundColor, textColor, iconColor, trackColor, paddingY, paddingX };\n"],"names":["paddingY","bordered","horizontal","desktop","medium","large","mobile","vertical","filled","paddingX","trackColor","textColor","selected","default","highlighted","disabled","unselected","iconColor"],"mappings":"AAaM,IAAAA,QAAwB,CAAG,CAC/BC,QAAQ,CAAE,CACRC,UAAU,CAAE,CACVC,OAAO,CAAE,CACPC,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CAAC,CACDC,MAAM,CAAE,CACNF,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CACF,CAAC,CACDE,QAAQ,CAAE,CACRJ,OAAO,CAAE,CACPC,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CAAC,CACDC,MAAM,CAAE,CACNF,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CACF,CACF,CAAC,CACDG,MAAM,CAAE,CACNN,UAAU,CAAE,CACVC,OAAO,CAAE,CACPC,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CAAC,CACDC,MAAM,CAAE,CACNF,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CACF,CAAC,CACDE,QAAQ,CAAE,CACRJ,OAAO,CAAE,CACPC,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CAAC,CACDC,MAAM,CAAE,CACNF,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CACF,CACF,CACF,EAEM,IAAAI,QAAwB,CAAG,CAC/BR,QAAQ,CAAE,CACRC,UAAU,CAAE,CACVC,OAAO,CAAE,CACPC,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CAAC,CACDC,MAAM,CAAE,CACNF,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CACF,CAAC,CACDE,QAAQ,CAAE,CACRJ,OAAO,CAAE,CACPC,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CAAC,CACDC,MAAM,CAAE,CACNF,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CACF,CACF,CAAC,CACDG,MAAM,CAAE,CACNN,UAAU,CAAE,CACVC,OAAO,CAAE,CACPC,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CAAC,CACDC,MAAM,CAAE,CACNF,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CACF,CAAC,CACDE,QAAQ,CAAE,CACRJ,OAAO,CAAE,CACPC,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CAAC,CACDC,MAAM,CAAE,CACNF,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,CACF,CACF,CACF,EAEM,IAAAK,UAAU,CAAG,4BACb,IAAAC,SAAS,CAAG,CAChBC,QAAQ,CAAE,CACRC,OAAO,CAAE,iCAAiC,CAC1CC,WAAW,CAAE,iCAAiC,CAC9CC,QAAQ,CAAE,iCACZ,CAAC,CACDC,UAAU,CAAE,CACVH,OAAO,CAAE,6BAA6B,CACtCC,WAAW,CAAE,8BAA8B,CAC3CC,QAAQ,CAAE,gCACZ,CACF,EAuCM,IAAAE,SAAS,CAAG,CAChBD,UAAU,CAAE,CACVH,OAAO,CAAE,6BAA6B,CACtCC,WAAW,CAAE,8BAA8B,CAC3CC,QAAQ,CAAE,gCACZ,CAAC,CACDH,QAAQ,CAAE,CACRC,OAAO,CAAE,iCAAiC,CAC1CC,WAAW,CAAE,iCAAiC,CAC9CC,QAAQ,CAAE,mCACZ,CACF;;;;"}
|
|
@@ -27,7 +27,7 @@ import '../Typography/Code/Code.js';
|
|
|
27
27
|
import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
|
|
28
28
|
import { useIsMobile } from '../../utils/useIsMobile.js';
|
|
29
29
|
|
|
30
|
-
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.
|
|
30
|
+
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){var _ref$size=_ref.size,size$1=_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,styledProps=_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$1==='large'){return 'medium';}return 'small';},[isMobile,size$1]);return jsx(BaseBox,Object.assign({display:isReactNative()?'flex':'inline-flex'},getStyledProps(styledProps),metaAttribute({name:MetaConstants.Tag,testID:testID}),{children:jsxs(FocussableTag,{display:isReactNative()?'flex':'inline-flex',alignSelf:isReactNative()?'center':undefined,flexDirection:"row",flexWrap:"nowrap",backgroundColor:backgroundColor,borderRadius:"max",padding:size$1==='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",alignItems:"center",maxWidth:makeSize(size['100']),children:jsx(Text,{truncateAfterLines:1,marginRight:"spacing.2",color:textColor,size:assetSize,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();}})})]})}));};
|
|
31
31
|
|
|
32
32
|
export { Tag };
|
|
33
33
|
//# 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';\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.
|
|
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';\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\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 = ({\n size = 'medium',\n icon: Icon,\n onDismiss,\n children,\n isDisabled,\n testID,\n _isVirtuallyFocused,\n _isTagInsideInput,\n ...styledProps\n}: TagProps): 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 display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.Tag, testID })}\n >\n <FocussableTag\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n alignSelf={isReactNative() ? 'center' : undefined}\n flexDirection=\"row\"\n flexWrap=\"nowrap\"\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\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n maxWidth={makeSize(globalSizeTokens['100'])}\n >\n <Text truncateAfterLines={1} marginRight=\"spacing.2\" color={textColor} size={assetSize}>\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\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$size","size","Icon","icon","onDismiss","children","isDisabled","testID","_isTagInsideInput","styledProps","_objectWithoutProperties","_excluded","isMobile","useIsMobile","textColor","iconColor","backgroundColor","mediumPadding","base","m","largePadding","assetSize","React","useMemo","_jsx","Object","assign","display","getStyledProps","metaAttribute","name","MetaConstants","_jsxs","alignSelf","undefined","flexDirection","flexWrap","borderRadius","padding","Box","alignItems","color","marginRight","maxWidth","Text","truncateAfterLines","justifyContent","IconButton","CloseIcon","accessibilityLabel","_tabIndex","onClick","e","stopPropagation"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,MAAA,CAAA,MAAA,CAAA,WAAA,CAAA,UAAA,CAAA,YAAA,CAAA,QAAA,CAAA,qBAAA,CAAA,mBAAA,CAAA,CAeA,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,CAAA,EAAEC,QAAQ,CAACC,IAAgB,CAAC,GAAG,CAAC,CAAE,UAC1CL,KAAK,CAACM,KAAK,CAACC,MAAM,CAACC,OAAO,CAACC,UAAU,CAACC,IAAI,CAACC,MAC5C,CAAA,CAAC,CACFC,SAAS,CAAG,CAAkBZ,gBAAAA,EAAAA,KAAK,CAACM,KAAK,CAACC,MAAM,CAACM,WAAW,CAACJ,UAAU,CAACK,OAAO,CAACC,KAAM,CAAA,CACxF,CAAC,CACH,CAEA,OAAO,EAAE,CACX,CACF,CAAC,CA6BK,IAAAC,GAAG,CAAG,SAANA,GAAGA,CAAAC,IAAA,CAUkC,CAAAC,IAAAA,SAAA,CAAAD,IAAA,CATzCE,IAAI,CAAJA,MAAI,CAAAD,SAAA,GAAG,KAAA,CAAA,CAAA,Q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A,CACpFA,QAAQ,CACL,CAAC,CACJ,CAAC,CAGNmB,GAAA,CAACe,GAAG,EAACZ,OAAO,CAAC,MAAM,CAACQ,aAAa,CAAC,KAAK,CAACK,UAAU,CAAC,QAAQ,CAACM,cAAc,CAAC,QAAQ,CAAAzC,QAAA,CACjFmB,GAAA,CAACuB,UAAU,CACT9C,CAAAA,IAAI,CAAEoB,SAAU,CAChBlB,IAAI,CAAE6C,SAAU,CAChBC,kBAAkB,CAAG,CAAA,MAAA,EAAQ5C,QAAS,CAAM,IAAA,CAAA,CAC5CC,UAAU,CAAEA,UAAW,CACvB4C,SAAS,CAAE1C,iBAAiB,CAAG,CAAC,CAAC,CAAG0B,SAAU,CAC9CiB,OAAO,CAAE,SAAAA,OAAAA,CAACC,CAAC,CAAK,CAEd,GAAI5C,iBAAiB,CAAE,CACrB4C,CAAC,CAACC,eAAe,EAAE,CACrB,CACAjD,SAAS,EAAE,CACb,CAAE,CACH,CAAC,CACC,CAAC,CACO,CAAA,CAAC,EACT,CAAC,CAEd;;;;"}
|
|
@@ -17,7 +17,7 @@ import { mergeProps } from '../../utils/mergeProps.js';
|
|
|
17
17
|
import { PopupArrow } from '../PopupArrow/PopupArrow.native.js';
|
|
18
18
|
import { getFloatingPlacementParts } from '../../utils/getFloatingPlacementParts.js';
|
|
19
19
|
|
|
20
|
-
var Tooltip=function Tooltip(_ref){var title=_ref.title,content=_ref.content,children=_ref.children,_ref$placement=_ref.placement,placement=_ref$placement===void 0?'left':_ref$placement,onOpenChange=_ref.onOpenChange,_ref$zIndex=_ref.zIndex,zIndex=_ref$zIndex===void 0?tooltipZIndex:_ref$zIndex;var _useTheme=useTheme(),theme=_useTheme.theme;var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isOpen=_React$useState2[0],setIsOpen=_React$useState2[1];var gap=theme.spacing[2];var _getFloatingPlacement=getFloatingPlacementParts(placement),_getFloatingPlacement2=_slicedToArray(_getFloatingPlacement,1),side=_getFloatingPlacement2[0];var isHorizontal=side==='left'||side==='right';var arrowRef=React__default.useRef();var context=useFloating({sameScrollView:false,placement:placement,middleware:[shift({crossAxis:false,padding:gap}),flip({padding:gap}),offset(gap+ARROW_HEIGHT),arrow({element:arrowRef,padding:isHorizontal?0:ARROW_WIDTH})]});var refs=context.refs,floatingStyles=context.floatingStyles;var handleOpen=React__default.useCallback(function(){setIsOpen(true);onOpenChange==null?void 0:onOpenChange({isOpen:true});},[onOpenChange]);var handleClose=React__default.useCallback(function(){setIsOpen(false);onOpenChange==null?void 0:onOpenChange({isOpen:false});},[onOpenChange]);var _React$useState3=React__default.useState(function(){return isOpen;}),_React$useState4=_slicedToArray(_React$useState3,2),isVisible=_React$useState4[0],setIsVisible=_React$useState4[1];React__default.useEffect(function(){var id=setTimeout(function(){if(!isOpen){setIsVisible(false);}},theme.motion.duration.gentle);if(isOpen){setIsVisible(true);}return function(){return clearTimeout(id);};},[isOpen]);return jsxs(TooltipContext.Provider,{value:true,children:[React__default.cloneElement(children,Object.assign({},mergeProps({onTouchEnd:children.props.onTouchEnd},{onTouchEnd:handleOpen}),{ref:refs.setReference})),jsx(Modal,{accessibilityLabel:content,collapsable:false,transparent:true,visible:isVisible,children:jsx(TouchableOpacity,Object.assign({style:{flexShrink:0,flex:1},onPress:handleClose,activeOpacity:1,testID:"tooltip-modal-backdrop"},metaAttribute({name:MetaConstants.Tooltip}),{children:jsx(TooltipContent,{title:title,isVisible:isOpen,ref:refs.setFloating,side:side,style:Object.assign({},floatingStyles,{left:floatingStyles.left||-200,top:floatingStyles.top||-200,zIndex:zIndex}),arrow:jsx(PopupArrow,{ref:arrowRef,context:context,width:ARROW_WIDTH,height:ARROW_HEIGHT,fillColor:theme.colors.
|
|
20
|
+
var Tooltip=function Tooltip(_ref){var title=_ref.title,content=_ref.content,children=_ref.children,_ref$placement=_ref.placement,placement=_ref$placement===void 0?'left':_ref$placement,onOpenChange=_ref.onOpenChange,_ref$zIndex=_ref.zIndex,zIndex=_ref$zIndex===void 0?tooltipZIndex:_ref$zIndex;var _useTheme=useTheme(),theme=_useTheme.theme;var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isOpen=_React$useState2[0],setIsOpen=_React$useState2[1];var gap=theme.spacing[2];var _getFloatingPlacement=getFloatingPlacementParts(placement),_getFloatingPlacement2=_slicedToArray(_getFloatingPlacement,1),side=_getFloatingPlacement2[0];var isHorizontal=side==='left'||side==='right';var arrowRef=React__default.useRef();var context=useFloating({sameScrollView:false,placement:placement,middleware:[shift({crossAxis:false,padding:gap}),flip({padding:gap}),offset(gap+ARROW_HEIGHT),arrow({element:arrowRef,padding:isHorizontal?0:ARROW_WIDTH})]});var refs=context.refs,floatingStyles=context.floatingStyles;var handleOpen=React__default.useCallback(function(){setIsOpen(true);onOpenChange==null?void 0:onOpenChange({isOpen:true});},[onOpenChange]);var handleClose=React__default.useCallback(function(){setIsOpen(false);onOpenChange==null?void 0:onOpenChange({isOpen:false});},[onOpenChange]);var _React$useState3=React__default.useState(function(){return isOpen;}),_React$useState4=_slicedToArray(_React$useState3,2),isVisible=_React$useState4[0],setIsVisible=_React$useState4[1];React__default.useEffect(function(){var id=setTimeout(function(){if(!isOpen){setIsVisible(false);}},theme.motion.duration.gentle);if(isOpen){setIsVisible(true);}return function(){return clearTimeout(id);};},[isOpen]);return jsxs(TooltipContext.Provider,{value:true,children:[React__default.cloneElement(children,Object.assign({},mergeProps({onTouchEnd:children.props.onTouchEnd},{onTouchEnd:handleOpen}),{ref:refs.setReference})),jsx(Modal,{accessibilityLabel:content,collapsable:false,transparent:true,visible:isVisible,children:jsx(TouchableOpacity,Object.assign({style:{flexShrink:0,flex:1},onPress:handleClose,activeOpacity:1,testID:"tooltip-modal-backdrop"},metaAttribute({name:MetaConstants.Tooltip}),{children:jsx(TooltipContent,{title:title,isVisible:isOpen,ref:refs.setFloating,side:side,style:Object.assign({},floatingStyles,{left:floatingStyles.left||-200,top:floatingStyles.top||-200,zIndex:zIndex}),arrow:jsx(PopupArrow,{ref:arrowRef,context:context,width:ARROW_WIDTH,height:ARROW_HEIGHT,fillColor:theme.colors.popup.background.intense,strokeColor:theme.colors.popup.border.intense}),children:content})}))})]});};
|
|
21
21
|
|
|
22
22
|
export { Tooltip };
|
|
23
23
|
//# sourceMappingURL=Tooltip.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.native.js","sources":["../../../../../src/components/Tooltip/Tooltip.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport { arrow, shift, useFloating, flip, offset } from '@floating-ui/react-native';\nimport React from 'react';\nimport { Modal, TouchableOpacity } from 'react-native';\nimport { TooltipContent } from './TooltipContent';\nimport type { TooltipProps } from './types';\nimport { ARROW_HEIGHT, ARROW_WIDTH, tooltipZIndex } from './constants';\nimport { TooltipContext } from './TooltipContext';\nimport { useTheme } from '~components/BladeProvider';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { mergeProps } from '~utils/mergeProps';\nimport { PopupArrow } from '~components/PopupArrow';\nimport { getFloatingPlacementParts } from '~utils/getFloatingPlacementParts';\n\nconst Tooltip = ({\n title,\n content,\n children,\n placement = 'left',\n onOpenChange,\n zIndex = tooltipZIndex,\n}: TooltipProps): React.ReactElement => {\n const { theme } = useTheme();\n const [isOpen, setIsOpen] = React.useState(false);\n\n const gap = theme.spacing[2];\n const [side] = getFloatingPlacementParts(placement);\n const isHorizontal = side === 'left' || side === 'right';\n const arrowRef = React.useRef();\n const context = useFloating({\n sameScrollView: false,\n placement,\n middleware: [\n shift({ crossAxis: false, padding: gap }),\n flip({ padding: gap }),\n offset(gap + ARROW_HEIGHT),\n arrow({\n element: arrowRef,\n padding: isHorizontal ? 0 : ARROW_WIDTH,\n }),\n ],\n });\n\n const { refs, floatingStyles } = context;\n\n const handleOpen = React.useCallback(() => {\n setIsOpen(true);\n onOpenChange?.({ isOpen: true });\n }, [onOpenChange]);\n\n const handleClose = React.useCallback(() => {\n setIsOpen(false);\n onOpenChange?.({ isOpen: false });\n }, [onOpenChange]);\n\n // wait for animation to finish before unmounting modal\n const [isVisible, setIsVisible] = React.useState(() => isOpen);\n React.useEffect(() => {\n const id = setTimeout(() => {\n if (!isOpen) {\n setIsVisible(false);\n }\n }, theme.motion.duration.gentle);\n\n if (isOpen) {\n setIsVisible(true);\n }\n return () => clearTimeout(id);\n }, [isOpen]);\n\n return (\n <TooltipContext.Provider value={true}>\n {/* Cloning the trigger children to enhance it with ref and event handler */}\n {React.cloneElement(children, {\n ...mergeProps(\n {\n onTouchEnd: children.props.onTouchEnd,\n },\n { onTouchEnd: handleOpen },\n ),\n ref: refs.setReference,\n })}\n <Modal accessibilityLabel={content} collapsable={false} transparent visible={isVisible}>\n <TouchableOpacity\n style={{\n flexShrink: 0,\n flex: 1,\n }}\n onPress={handleClose}\n activeOpacity={1}\n testID=\"tooltip-modal-backdrop\"\n {...metaAttribute({ name: MetaConstants.Tooltip })}\n >\n <TooltipContent\n title={title}\n isVisible={isOpen}\n ref={refs.setFloating}\n side={side}\n style={{\n ...floatingStyles,\n // To avoid flash of floating ui content at top, this only happens in RN <70\n // if the position is zero move the floating element outside of the viewport\n // this happens because measure is async and it takes few miliseconds to calculate the positions.\n left: floatingStyles.left || -200,\n top: floatingStyles.top || -200,\n // TODO: Tokenize zIndex values\n zIndex,\n }}\n arrow={\n <PopupArrow\n ref={arrowRef as never}\n context={context}\n width={ARROW_WIDTH}\n height={ARROW_HEIGHT}\n fillColor={theme.colors.
|
|
1
|
+
{"version":3,"file":"Tooltip.native.js","sources":["../../../../../src/components/Tooltip/Tooltip.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport { arrow, shift, useFloating, flip, offset } from '@floating-ui/react-native';\nimport React from 'react';\nimport { Modal, TouchableOpacity } from 'react-native';\nimport { TooltipContent } from './TooltipContent';\nimport type { TooltipProps } from './types';\nimport { ARROW_HEIGHT, ARROW_WIDTH, tooltipZIndex } from './constants';\nimport { TooltipContext } from './TooltipContext';\nimport { useTheme } from '~components/BladeProvider';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { mergeProps } from '~utils/mergeProps';\nimport { PopupArrow } from '~components/PopupArrow';\nimport { getFloatingPlacementParts } from '~utils/getFloatingPlacementParts';\n\nconst Tooltip = ({\n title,\n content,\n children,\n placement = 'left',\n onOpenChange,\n zIndex = tooltipZIndex,\n}: TooltipProps): React.ReactElement => {\n const { theme } = useTheme();\n const [isOpen, setIsOpen] = React.useState(false);\n\n const gap = theme.spacing[2];\n const [side] = getFloatingPlacementParts(placement);\n const isHorizontal = side === 'left' || side === 'right';\n const arrowRef = React.useRef();\n const context = useFloating({\n sameScrollView: false,\n placement,\n middleware: [\n shift({ crossAxis: false, padding: gap }),\n flip({ padding: gap }),\n offset(gap + ARROW_HEIGHT),\n arrow({\n element: arrowRef,\n padding: isHorizontal ? 0 : ARROW_WIDTH,\n }),\n ],\n });\n\n const { refs, floatingStyles } = context;\n\n const handleOpen = React.useCallback(() => {\n setIsOpen(true);\n onOpenChange?.({ isOpen: true });\n }, [onOpenChange]);\n\n const handleClose = React.useCallback(() => {\n setIsOpen(false);\n onOpenChange?.({ isOpen: false });\n }, [onOpenChange]);\n\n // wait for animation to finish before unmounting modal\n const [isVisible, setIsVisible] = React.useState(() => isOpen);\n React.useEffect(() => {\n const id = setTimeout(() => {\n if (!isOpen) {\n setIsVisible(false);\n }\n }, theme.motion.duration.gentle);\n\n if (isOpen) {\n setIsVisible(true);\n }\n return () => clearTimeout(id);\n }, [isOpen]);\n\n return (\n <TooltipContext.Provider value={true}>\n {/* Cloning the trigger children to enhance it with ref and event handler */}\n {React.cloneElement(children, {\n ...mergeProps(\n {\n onTouchEnd: children.props.onTouchEnd,\n },\n { onTouchEnd: handleOpen },\n ),\n ref: refs.setReference,\n })}\n <Modal accessibilityLabel={content} collapsable={false} transparent visible={isVisible}>\n <TouchableOpacity\n style={{\n flexShrink: 0,\n flex: 1,\n }}\n onPress={handleClose}\n activeOpacity={1}\n testID=\"tooltip-modal-backdrop\"\n {...metaAttribute({ name: MetaConstants.Tooltip })}\n >\n <TooltipContent\n title={title}\n isVisible={isOpen}\n ref={refs.setFloating}\n side={side}\n style={{\n ...floatingStyles,\n // To avoid flash of floating ui content at top, this only happens in RN <70\n // if the position is zero move the floating element outside of the viewport\n // this happens because measure is async and it takes few miliseconds to calculate the positions.\n left: floatingStyles.left || -200,\n top: floatingStyles.top || -200,\n // TODO: Tokenize zIndex values\n zIndex,\n }}\n arrow={\n <PopupArrow\n ref={arrowRef as never}\n context={context}\n width={ARROW_WIDTH}\n height={ARROW_HEIGHT}\n fillColor={theme.colors.popup.background.intense}\n strokeColor={theme.colors.popup.border.intense}\n />\n }\n >\n {content}\n </TooltipContent>\n </TouchableOpacity>\n </Modal>\n </TooltipContext.Provider>\n );\n};\n\nexport { Tooltip };\n"],"names":["Tooltip","_ref","title","content","children","_ref$placement","placement","onOpenChange","_ref$zIndex","zIndex","tooltipZIndex","_useTheme","useTheme","theme","_React$useState","React","useState","_React$useState2","_slicedToArray","isOpen","setIsOpen","gap","spacing","_getFloatingPlacement","getFloatingPlacementParts","_getFloatingPlacement2","side","isHorizontal","arrowRef","useRef","context","useFloating","sameScrollView","middleware","shift","crossAxis","padding","flip","offset","ARROW_HEIGHT","arrow","element","ARROW_WIDTH","refs","floatingStyles","handleOpen","useCallback","handleClose","_React$useState3","_React$useState4","isVisible","setIsVisible","useEffect","id","setTimeout","motion","duration","gentle","clearTimeout","_jsxs","TooltipContext","Provider","value","cloneElement","Object","assign","mergeProps","onTouchEnd","props","ref","setReference","_jsx","Modal","accessibilityLabel","collapsable","transparent","visible","TouchableOpacity","style","flexShrink","flex","onPress","activeOpacity","testID","metaAttribute","name","MetaConstants","TooltipContent","setFloating","left","top","PopupArrow","width","height","fillColor","colors","popup","background","intense","strokeColor","border"],"mappings":";;;;;;;;;;;;;;;;;;;AAcM,IAAAA,OAAO,CAAG,SAAVA,OAAOA,C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AAG,CACjCC,GAAG,CAAE9C,cAAc,CAAC8C,GAAG,EAAI,CAAC,GAAG,CAE/BjF,MAAM,CAANA,MAAM,CACN,CAAA,CACF+B,KAAK,CACH+B,GAAA,CAACoB,UAAU,EACTtB,GAAG,CAAEzC,QAAkB,CACvBE,OAAO,CAAEA,OAAQ,CACjB8D,KAAK,CAAElD,WAAY,CACnBmD,MAAM,CAAEtD,YAAa,CACrBuD,SAAS,CAAEjF,KAAK,CAACkF,MAAM,CAACC,KAAK,CAACC,UAAU,CAACC,OAAQ,CACjDC,WAAW,CAAEtF,KAAK,CAACkF,MAAM,CAACC,KAAK,CAACI,MAAM,CAACF,OAAQ,CAChD,CACF,CAAA9F,QAAA,CAEAD,OAAO,CACM,CAAC,CAAA,CACD,CAAC,CACd,CAAC,CACe,CAAA,CAAC,CAE9B;;;;"}
|
|
@@ -14,7 +14,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
14
14
|
import { Text } from '../Typography/Text/Text.js';
|
|
15
15
|
import '../Typography/Code/Code.js';
|
|
16
16
|
|
|
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,{
|
|
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
|
|
|
19
19
|
export { TooltipContent };
|
|
20
20
|
//# sourceMappingURL=TooltipContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipContent.js","sources":["../../../../../src/components/Tooltip/TooltipContent.tsx"],"sourcesContent":["import React from 'react';\nimport { TooltipContentWrapper } from './TooltipContentWrapper';\nimport type { TooltipContentProps } from './types';\nimport { Text } from '~components/Typography';\nimport { isReactNative, makeSize } from '~utils';\nimport { size } from '~tokens/global';\n\nconst TooltipContent = React.forwardRef<HTMLDivElement, TooltipContentProps>(\n ({ children, title, arrow, side, style, isVisible }, ref) => {\n return (\n <TooltipContentWrapper\n position={isReactNative() ? 'absolute' : 'relative'}\n paddingTop=\"spacing.3\"\n paddingBottom=\"spacing.3\"\n paddingLeft=\"spacing.4\"\n paddingRight=\"spacing.4\"\n maxWidth={makeSize(size[200])}\n ref={ref as never}\n styles={style}\n side={side}\n isVisible={isVisible}\n >\n {title ? (\n <Text
|
|
1
|
+
{"version":3,"file":"TooltipContent.js","sources":["../../../../../src/components/Tooltip/TooltipContent.tsx"],"sourcesContent":["import React from 'react';\nimport { TooltipContentWrapper } from './TooltipContentWrapper';\nimport type { TooltipContentProps } from './types';\nimport { Text } from '~components/Typography';\nimport { isReactNative, makeSize } from '~utils';\nimport { size } from '~tokens/global';\n\nconst TooltipContent = React.forwardRef<HTMLDivElement, TooltipContentProps>(\n ({ children, title, arrow, side, style, isVisible }, ref) => {\n return (\n <TooltipContentWrapper\n position={isReactNative() ? 'absolute' : 'relative'}\n paddingTop=\"spacing.3\"\n paddingBottom=\"spacing.3\"\n paddingLeft=\"spacing.4\"\n paddingRight=\"spacing.4\"\n maxWidth={makeSize(size[200])}\n ref={ref as never}\n styles={style}\n side={side}\n isVisible={isVisible}\n >\n {title ? (\n <Text weight=\"semibold\" size=\"medium\" color=\"surface.text.staticWhite.normal\">\n {title}\n </Text>\n ) : null}\n <Text\n variant=\"body\"\n size=\"small\"\n weight=\"regular\"\n color=\"surface.text.staticWhite.subtle\"\n wordBreak=\"break-word\"\n >\n {children}\n </Text>\n {arrow}\n </TooltipContentWrapper>\n );\n },\n);\n\nexport { TooltipContent };\n"],"names":["TooltipContent","React","forwardRef","_ref","ref","children","title","arrow","side","style","isVisible","_jsxs","TooltipContentWrapper","position","isReactNative","paddingTop","paddingBottom","paddingLeft","paddingRight","maxWidth","makeSize","size","styles","_jsx","Text","weight","color","variant","wordBreak"],"mappings":";;;;;;;;;;;;;;;;AAOM,IAAAA,cAAc,CAAGC,cAAK,CAACC,UAAU,CACrC,SAAAC,IAAA,CAAqDC,GAAG,CAAK,CAAA,IAA1DC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAEC,KAAK,CAAAH,IAAA,CAALG,KAAK,CAAEC,KAAK,CAAAJ,IAAA,CAALI,KAAK,CAAEC,IAAI,CAAAL,IAAA,CAAJK,IAAI,CAAEC,KAAK,CAAAN,IAAA,CAALM,KAAK,CAAEC,SAAS,CAAAP,IAAA,CAATO,SAAS,CAC/C,OACEC,IAAA,CAACC,qBAAqB,CACpBC,CAAAA,QAAQ,CAAEC,aAAa,EAAE,CAAG,UAAU,CAAG,UAAW,CACpDC,UAAU,CAAC,WAAW,CACtBC,aAAa,CAAC,WAAW,CACzBC,WAAW,CAAC,WAAW,CACvBC,YAAY,CAAC,WAAW,CACxBC,QAAQ,CAAEC,QAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,CAAE,CAC9BjB,GAAG,CAAEA,GAAa,CAClBkB,MAAM,CAAEb,KAAM,CACdD,IAAI,CAAEA,IAAK,CACXE,SAAS,CAAEA,SAAU,CAAAL,QAAA,CAEpBC,CAAAA,KAAK,CACJiB,GAAA,CAACC,IAAI,CAACC,CAAAA,MAAM,CAAC,UAAU,CAACJ,IAAI,CAAC,QAAQ,CAACK,KAAK,CAAC,iCAAiC,CAAArB,QAAA,CAC1EC,KAAK,CACF,CAAC,CACL,IAAI,CACRiB,GAAA,CAACC,IAAI,CAAA,CACHG,OAAO,CAAC,MAAM,CACdN,IAAI,CAAC,OAAO,CACZI,MAAM,CAAC,SAAS,CAChBC,KAAK,CAAC,iCAAiC,CACvCE,SAAS,CAAC,YAAY,CAAAvB,QAAA,CAErBA,QAAQ,CACL,CAAC,CACNE,KAAK,CACe,CAAA,CAAC,CAE5B,CACF;;;;"}
|
|
@@ -6,7 +6,7 @@ import { castWebType } from '../../utils/platform/castUtils.js';
|
|
|
6
6
|
import { makeBorderSize } from '../../utils/makeBorderSize/makeBorderSize.js';
|
|
7
7
|
import '../BladeProvider/useTheme.js';
|
|
8
8
|
|
|
9
|
-
var getTooltipContentWrapperStyles=function getTooltipContentWrapperStyles(_ref){var theme=_ref.theme,styles=_ref.styles;return Object.assign({backgroundColor:theme.colors.
|
|
9
|
+
var getTooltipContentWrapperStyles=function getTooltipContentWrapperStyles(_ref){var theme=_ref.theme,styles=_ref.styles;return Object.assign({backgroundColor:theme.colors.popup.background.intense,borderWidth:makeBorderSize(theme.border.width.thin),borderRadius:makeBorderSize(theme.border.radius.medium),borderColor:theme.colors.popup.border.intense,borderStyle:'solid',boxShadow:isReactNative()?undefined:castWebType(theme.elevation.lowRaised)},styles);};
|
|
10
10
|
|
|
11
11
|
export { getTooltipContentWrapperStyles };
|
|
12
12
|
//# sourceMappingURL=getTooltipContentWrapperStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTooltipContentWrapperStyles.js","sources":["../../../../../src/components/Tooltip/getTooltipContentWrapperStyles.ts"],"sourcesContent":["import type React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeBorderSize, castWebType, isReactNative } from '~utils';\n\nconst getTooltipContentWrapperStyles = ({\n theme,\n styles,\n}: {\n theme: Theme;\n styles: React.CSSProperties;\n}): CSSObject => {\n return {\n backgroundColor: theme.colors.
|
|
1
|
+
{"version":3,"file":"getTooltipContentWrapperStyles.js","sources":["../../../../../src/components/Tooltip/getTooltipContentWrapperStyles.ts"],"sourcesContent":["import type React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeBorderSize, castWebType, isReactNative } from '~utils';\n\nconst getTooltipContentWrapperStyles = ({\n theme,\n styles,\n}: {\n theme: Theme;\n styles: React.CSSProperties;\n}): CSSObject => {\n return {\n backgroundColor: theme.colors.popup.background.intense,\n borderWidth: makeBorderSize(theme.border.width.thin),\n borderRadius: makeBorderSize(theme.border.radius.medium),\n borderColor: theme.colors.popup.border.intense,\n borderStyle: 'solid',\n boxShadow: isReactNative() ? undefined : castWebType(theme.elevation.lowRaised),\n ...styles,\n };\n};\n\nexport { getTooltipContentWrapperStyles };\n"],"names":["getTooltipContentWrapperStyles","_ref","theme","styles","Object","assign","backgroundColor","colors","popup","background","intense","borderWidth","makeBorderSize","border","width","thin","borderRadius","radius","medium","borderColor","borderStyle","boxShadow","isReactNative","undefined","castWebType","elevation","lowRaised"],"mappings":";;;;;;;;AAKM,IAAAA,8BAA8B,CAAG,SAAjCA,8BAA8BA,CAAAC,IAAA,CAMnB,CAAA,IALfC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,MAAM,CAAAF,IAAA,CAANE,MAAM,CAKN,OAAAC,MAAA,CAAAC,MAAA,CACEC,CAAAA,eAAe,CAAEJ,KAAK,CAACK,MAAM,CAACC,KAAK,CAACC,UAAU,CAACC,OAAO,CACtDC,WAAW,CAAEC,cAAc,CAACV,KAAK,CAACW,MAAM,CAACC,KAAK,CAACC,IAAI,CAAC,CACpDC,YAAY,CAAEJ,cAAc,CAACV,KAAK,CAACW,MAAM,CAACI,MAAM,CAACC,MAAM,CAAC,CACxDC,WAAW,CAAEjB,KAAK,CAACK,MAAM,CAACC,KAAK,CAACK,MAAM,CAACH,OAAO,CAC9CU,WAAW,CAAE,OAAO,CACpBC,SAAS,CAAEC,aAAa,EAAE,CAAGC,SAAS,CAAGC,WAAW,CAACtB,KAAK,CAACuB,SAAS,CAACC,SAAS,CAAC,CAC5EvB,CAAAA,MAAM,CAEb,CAAA;;;;"}
|
|
@@ -8,7 +8,7 @@ import { useStyledProps } from '../../Box/styledProps/useStyledProps.js';
|
|
|
8
8
|
import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.native.js';
|
|
9
9
|
import { jsx } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
|
-
var _excluded=["color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","textAlign","as"],_excluded2=["id","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","lineHeight","textAlign","children","truncateAfterLines","className","style","accessibilityProps","componentName","testID"];var StyledBaseText=styled.Text(function(_ref){var color=_ref.color,fontFamily=_ref.fontFamily,fontSize=_ref.fontSize,fontWeight=_ref.fontWeight,fontStyle=_ref.fontStyle,textDecorationLine=_ref.textDecorationLine,numberOfLines=_ref.numberOfLines,lineHeight=_ref.lineHeight,textAlign=_ref.textAlign;_ref.as;var props=_objectWithoutProperties(_ref,_excluded);var styledPropsCSSObject=useStyledProps(props);return Object.assign({},getBaseTextStyles({color:color,fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,numberOfLines:numberOfLines,lineHeight:lineHeight,textAlign:textAlign,theme:props.theme}),styledPropsCSSObject);});var BaseText=function BaseText(_ref2){var id=_ref2.id,color=_ref2.color,fontFamily=_ref2.fontFamily,fontSize=_ref2.fontSize,fontWeight=_ref2.fontWeight,fontStyle=_ref2.fontStyle,textDecorationLine=_ref2.textDecorationLine,lineHeight=_ref2.lineHeight,textAlign=_ref2.textAlign,children=_ref2.children,truncateAfterLines=_ref2.truncateAfterLines,className=_ref2.className,style=_ref2.style,_ref2$accessibilityPr=_ref2.accessibilityProps,accessibilityProps=_ref2$accessibilityPr===void 0?{}:_ref2$accessibilityPr,_ref2$componentName=_ref2.componentName,componentName=_ref2$componentName===void 0?MetaConstants.BaseText:_ref2$componentName,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded2);return jsx(StyledBaseText,Object.assign({},getStyledProps(styledProps),{color:color,fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,lineHeight:lineHeight,as:undefined,textAlign:textAlign,numberOfLines:truncateAfterLines,className:className,style:style,id:id},makeAccessible(accessibilityProps),metaAttribute({name:componentName,testID:testID}),{children:children}));};
|
|
11
|
+
var _excluded=["color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","letterSpacing","textAlign","as","opacity"],_excluded2=["id","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","lineHeight","textAlign","children","truncateAfterLines","opacity","className","style","accessibilityProps","componentName","testID"];var StyledBaseText=styled.Text(function(_ref){var color=_ref.color,fontFamily=_ref.fontFamily,fontSize=_ref.fontSize,fontWeight=_ref.fontWeight,fontStyle=_ref.fontStyle,textDecorationLine=_ref.textDecorationLine,numberOfLines=_ref.numberOfLines,lineHeight=_ref.lineHeight,letterSpacing=_ref.letterSpacing,textAlign=_ref.textAlign;_ref.as;var opacity=_ref.opacity,props=_objectWithoutProperties(_ref,_excluded);var styledPropsCSSObject=useStyledProps(props);return Object.assign({},getBaseTextStyles({color:color,fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,numberOfLines:numberOfLines,lineHeight:lineHeight,letterSpacing:letterSpacing,textAlign:textAlign,opacity:opacity,theme:props.theme}),styledPropsCSSObject);});var BaseText=function BaseText(_ref2){var id=_ref2.id,color=_ref2.color,fontFamily=_ref2.fontFamily,fontSize=_ref2.fontSize,fontWeight=_ref2.fontWeight,fontStyle=_ref2.fontStyle,textDecorationLine=_ref2.textDecorationLine,lineHeight=_ref2.lineHeight,textAlign=_ref2.textAlign,children=_ref2.children,truncateAfterLines=_ref2.truncateAfterLines,opacity=_ref2.opacity,className=_ref2.className,style=_ref2.style,_ref2$accessibilityPr=_ref2.accessibilityProps,accessibilityProps=_ref2$accessibilityPr===void 0?{}:_ref2$accessibilityPr,_ref2$componentName=_ref2.componentName,componentName=_ref2$componentName===void 0?MetaConstants.BaseText:_ref2$componentName,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded2);return jsx(StyledBaseText,Object.assign({},getStyledProps(styledProps),{color:color,fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,lineHeight:lineHeight,as:undefined,textAlign:textAlign,numberOfLines:truncateAfterLines,opacity:opacity,className:className,style:style,id:id},makeAccessible(accessibilityProps),metaAttribute({name:componentName,testID:testID}),{children:children}));};
|
|
12
12
|
|
|
13
13
|
export { BaseText };
|
|
14
14
|
//# sourceMappingURL=BaseText.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseText.native.js","sources":["../../../../../../src/components/Typography/BaseText/BaseText.native.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport styled from 'styled-components/native';\nimport getBaseTextStyles from './getBaseTextStyles';\nimport type { BaseTextProps, StyledBaseTextProps } from './types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps, useStyledProps } from '~components/Box/styledProps';\nimport { makeAccessible } from '~utils/makeAccessible';\n\nconst StyledBaseText = styled.Text<StyledBaseTextProps>(\n ({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n textAlign,\n as,\n ...props\n }) => {\n const styledPropsCSSObject = useStyledProps(props);\n\n return {\n ...getBaseTextStyles({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n textAlign,\n theme: props.theme,\n }),\n ...styledPropsCSSObject,\n };\n },\n);\n\nexport const BaseText = ({\n id,\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n lineHeight,\n textAlign,\n children,\n truncateAfterLines,\n className,\n style,\n accessibilityProps = {},\n componentName = MetaConstants.BaseText,\n testID,\n ...styledProps\n}: BaseTextProps): ReactElement => {\n return (\n <StyledBaseText\n {...getStyledProps(styledProps)}\n color={color}\n fontFamily={fontFamily}\n fontSize={fontSize}\n fontWeight={fontWeight}\n fontStyle={fontStyle}\n textDecorationLine={textDecorationLine}\n lineHeight={lineHeight}\n as={undefined}\n textAlign={textAlign}\n numberOfLines={truncateAfterLines}\n className={className}\n style={style}\n id={id}\n {...makeAccessible(accessibilityProps)}\n {...metaAttribute({ name: componentName, testID })}\n >\n {children}\n </StyledBaseText>\n );\n};\n"],"names":["StyledBaseText","styled","Text","_ref","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","textAlign","as","props","_objectWithoutProperties","_excluded","styledPropsCSSObject","useStyledProps","Object","assign","getBaseTextStyles","theme","BaseText","_ref2","id","children","truncateAfterLines","className","style","_ref2$accessibilityPr","accessibilityProps","_ref2$componentName","componentName","MetaConstants","testID","styledProps","_excluded2","_jsx","getStyledProps","undefined","makeAccessible","metaAttribute","name"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"BaseText.native.js","sources":["../../../../../../src/components/Typography/BaseText/BaseText.native.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport styled from 'styled-components/native';\nimport getBaseTextStyles from './getBaseTextStyles';\nimport type { BaseTextProps, StyledBaseTextProps } from './types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps, useStyledProps } from '~components/Box/styledProps';\nimport { makeAccessible } from '~utils/makeAccessible';\n\nconst StyledBaseText = styled.Text<StyledBaseTextProps>(\n ({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n letterSpacing,\n textAlign,\n as,\n opacity,\n ...props\n }) => {\n const styledPropsCSSObject = useStyledProps(props);\n\n return {\n ...getBaseTextStyles({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n letterSpacing,\n textAlign,\n opacity,\n theme: props.theme,\n }),\n ...styledPropsCSSObject,\n };\n },\n);\n\nexport const BaseText = ({\n id,\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n lineHeight,\n textAlign,\n children,\n truncateAfterLines,\n opacity,\n className,\n style,\n accessibilityProps = {},\n componentName = MetaConstants.BaseText,\n testID,\n ...styledProps\n}: BaseTextProps): ReactElement => {\n return (\n <StyledBaseText\n {...getStyledProps(styledProps)}\n color={color}\n fontFamily={fontFamily}\n fontSize={fontSize}\n fontWeight={fontWeight}\n fontStyle={fontStyle}\n textDecorationLine={textDecorationLine}\n lineHeight={lineHeight}\n as={undefined}\n textAlign={textAlign}\n numberOfLines={truncateAfterLines}\n opacity={opacity}\n className={className}\n style={style}\n id={id}\n {...makeAccessible(accessibilityProps)}\n {...metaAttribute({ name: componentName, testID })}\n >\n {children}\n </StyledBaseText>\n );\n};\n"],"names":["StyledBaseText","styled","Text","_ref","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","letterSpacing","textAlign","as","opacity","props","_objectWithoutProperties","_excluded","styledPropsCSSObject","useStyledProps","Object","assign","getBaseTextStyles","theme","BaseText","_ref2","id","children","truncateAfterLines","className","style","_ref2$accessibilityPr","accessibilityProps","_ref2$componentName","componentName","MetaConstants","testID","styledProps","_excluded2","_jsx","getStyledProps","undefined","makeAccessible","metaAttribute","name"],"mappings":";;;;;;;;;;2YAQA,IAAMA,cAAc,CAAGC,MAAM,CAACC,IAAI,CAChC,SAAAC,IAAA,CAcM,CAbJ,IAAAC,KAAK,CAAAD,IAAA,CAAL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kBAAkB,CAAC,CAClCW,aAAa,CAAC,CAAEC,IAAI,CAAEV,aAAa,CAAEE,MAAM,CAANA,MAAO,CAAC,CAAC,CAAAT,CAAAA,QAAA,CAEjDA,QAAQ,CAAA,CACK,CAAC,CAErB;;;;"}
|
|
@@ -5,8 +5,9 @@ import '@babel/runtime/helpers/slicedToArray';
|
|
|
5
5
|
import 'react';
|
|
6
6
|
import { isReactNative } from '../../../utils/platform/isReactNative.js';
|
|
7
7
|
import '../../BladeProvider/useTheme.js';
|
|
8
|
+
import { makeLetterSpacing } from '../../../utils/makeLetterSpacing/makeLetterSpacing.js';
|
|
8
9
|
|
|
9
|
-
var getBaseTextStyles=function getBaseTextStyles(_ref){var _ref$color=_ref.color,color=_ref$color===void 0?'surface.text.normal
|
|
10
|
+
var getBaseTextStyles=function getBaseTextStyles(_ref){var _ref$color=_ref.color,color=_ref$color===void 0?'surface.text.gray.normal':_ref$color,_ref$fontFamily=_ref.fontFamily,fontFamily=_ref$fontFamily===void 0?'text':_ref$fontFamily,_ref$fontSize=_ref.fontSize,fontSize=_ref$fontSize===void 0?200:_ref$fontSize,_ref$fontWeight=_ref.fontWeight,fontWeight=_ref$fontWeight===void 0?'regular':_ref$fontWeight,_ref$fontStyle=_ref.fontStyle,fontStyle=_ref$fontStyle===void 0?'normal':_ref$fontStyle,_ref$textDecorationLi=_ref.textDecorationLine,textDecorationLine=_ref$textDecorationLi===void 0?'none':_ref$textDecorationLi,numberOfLines=_ref.numberOfLines,wordBreak=_ref.wordBreak,_ref$lineHeight=_ref.lineHeight,lineHeight=_ref$lineHeight===void 0?100:_ref$lineHeight,_ref$letterSpacing=_ref.letterSpacing,letterSpacing=_ref$letterSpacing===void 0?100:_ref$letterSpacing,textAlign=_ref.textAlign,opacity=_ref.opacity,theme=_ref.theme;var textColor=getIn(theme.colors,color);var themeFontFamily=theme.typography.fonts.family[fontFamily];var themeFontSize=makeTypographySize(theme.typography.fonts.size[fontSize]);var themeFontWeight=theme.typography.fonts.weight[fontWeight];var themeLineHeight=makeTypographySize(theme.typography.lineHeights[lineHeight]);var themeLetterSpacing=makeLetterSpacing(theme.typography.letterSpacings[letterSpacing],theme.typography.fonts.size[fontSize]);var truncateStyles={};var wordBreakStyles={};if(numberOfLines!==undefined){if(isReactNative()){truncateStyles={};}else {truncateStyles={overflow:'hidden',display:'-webkit-box','line-clamp':`${numberOfLines}`,'-webkit-line-clamp':`${numberOfLines}`,'-webkit-box-orient':'vertical'};}}if(wordBreak!==undefined){if(isReactNative()){wordBreakStyles={};}else {wordBreakStyles={wordBreak:wordBreak};}}return Object.assign({color:textColor,fontFamily:themeFontFamily,fontSize:themeFontSize,fontWeight:themeFontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine},textDecorationLine!=='none'&&{textDecorationColor:textColor},{lineHeight:themeLineHeight,letterSpacing:themeLetterSpacing,textAlign:textAlign,margin:0,padding:0,opacity:opacity},truncateStyles,wordBreakStyles);};
|
|
10
11
|
|
|
11
12
|
export { getBaseTextStyles as default };
|
|
12
13
|
//# sourceMappingURL=getBaseTextStyles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getBaseTextStyles.js","sources":["../../../../../../src/components/Typography/BaseText/getBaseTextStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\nimport type { StyledBaseTextProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { isReactNative } from '~utils';\n\nconst getBaseTextStyles = ({\n color = 'surface.text.normal
|
|
1
|
+
{"version":3,"file":"getBaseTextStyles.js","sources":["../../../../../../src/components/Typography/BaseText/getBaseTextStyles.ts"],"sourcesContent":["import type { CSSObject } from 'styled-components';\nimport type { StyledBaseTextProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { isReactNative } from '~utils';\nimport { makeLetterSpacing } from '~utils/makeLetterSpacing';\n\nconst getBaseTextStyles = ({\n color = 'surface.text.gray.normal',\n fontFamily = 'text',\n fontSize = 200,\n fontWeight = 'regular',\n fontStyle = 'normal',\n textDecorationLine = 'none',\n numberOfLines,\n wordBreak,\n lineHeight = 100,\n letterSpacing = 100,\n textAlign,\n opacity,\n theme,\n}: StyledBaseTextProps): CSSObject => {\n const textColor = getIn(theme.colors, color);\n const themeFontFamily = theme.typography.fonts.family[fontFamily];\n const themeFontSize = makeTypographySize(theme.typography.fonts.size[fontSize]);\n const themeFontWeight = theme.typography.fonts.weight[fontWeight];\n const themeLineHeight = makeTypographySize(theme.typography.lineHeights[lineHeight]);\n const themeLetterSpacing = makeLetterSpacing(\n theme.typography.letterSpacings[letterSpacing],\n theme.typography.fonts.size[fontSize],\n );\n let truncateStyles: CSSObject = {};\n let wordBreakStyles: CSSObject = {};\n if (numberOfLines !== undefined) {\n if (isReactNative()) {\n truncateStyles = {};\n } else {\n truncateStyles = {\n overflow: 'hidden',\n display: '-webkit-box',\n 'line-clamp': `${numberOfLines}`,\n '-webkit-line-clamp': `${numberOfLines}`,\n '-webkit-box-orient': 'vertical',\n };\n }\n }\n if (wordBreak !== undefined) {\n if (isReactNative()) {\n wordBreakStyles = {};\n } else {\n wordBreakStyles = {\n wordBreak,\n };\n }\n }\n\n return {\n color: textColor,\n fontFamily: themeFontFamily,\n fontSize: themeFontSize,\n fontWeight: themeFontWeight,\n fontStyle,\n textDecorationLine,\n ...(textDecorationLine !== 'none' && {\n textDecorationColor: textColor,\n }),\n lineHeight: themeLineHeight,\n letterSpacing: themeLetterSpacing,\n textAlign,\n margin: 0,\n padding: 0,\n opacity,\n ...truncateStyles,\n ...wordBreakStyles,\n };\n};\n\nexport default getBaseTextStyles;\n"],"names":["getBaseTextStyles","_ref","_ref$color","color","_ref$fontFamily","fontFamily","_ref$fontSize","fontSize","_ref$fontWeight","fontWeight","_ref$fontStyle","fontStyle","_ref$textDecorationLi","textDecorationLine","numberOfLines","wordBreak","_ref$lineHeight","lineHeight","_ref$letterSpacing","letterSpacing","textAlign","opacity","theme","textColor","getIn","colors","themeFontFamily","typography","fonts","family","themeFontSize","makeTypographySize","size","themeFontWeight","weight","themeLineHeight","lineHeights","themeLetterSpacing","makeLetterSpacing","letterSpacings","truncateStyles","wordBreakStyles","undefined","isReactNative","overflow","display","Object","assign","textDecorationColor","margin","padding"],"mappings":";;;;;;;;;AAOM,IAAAA,iBAAiB,CAAG,SAApBA,iBAAiBA,CAAAC,IAAA,CAce,CAAA,IAAAC,UAAA,CAAAD,IAAA,CAbpCE,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAG,KAAA,CAAA,CAAA,0BAA0B,CAAAA,UAAA,CAAAE,eAAA,CAAAH,IAAA,CAClCI,UAAU,CAAVA,UAAU,CAAAD,eAAA,GAAG,KAAA,CAAA,CAAA,MAAM,CAAAA,eAAA,CAAAE,aAAA,CAAAL,IAAA,CACnBM,QAAQ,CAARA,QAAQ,CAAAD,aAAA,GAAA,KAAA,CAAA,CAAG,GAAG,CAAAA,aAAA,CAAAE,eAAA,CAAAP,IAAA,CACdQ,UAAU,CAAVA,UAAU,CAAAD,eAAA,GAAA,KAAA,CAAA,CAAG,SAAS,CAAAA,eAAA,CAAAE,cAAA,CAAAT,IAAA,CACtBU,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAA,KAAA,CAAA,CAAG,QAAQ,CAAAA,cAAA,CAAAE,qBAAA,CAAAX,IAAA,CACpBY,kBAAkB,CAAlBA,kBAAkB,CAAAD,qBAAA,GAAA,KAAA,CAAA,CAAG,MAAM,CAAAA,qBAAA,CAC3BE,aAAa,CAAAb,IAAA,CAAba,aAAa,CACbC,SAAS,CAAAd,IAAA,CAATc,SAAS,CAAAC,eAAA,CAAAf,IAAA,CACTgB,UAAU,CAAVA,UAAU,CAAAD,eAAA,GAAG,KAAA,CAAA,CAAA,GAAG,CAAAA,eAAA,CAAAE,kBAAA,CAAAjB,IAAA,CAChBkB,aAAa,CAAbA,aAAa,CAAAD,kBAAA,GAAG,KAAA,CAAA,CAA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C,aAAa,EAAE,CAAE,CACnBF,eAAe,CAAG,EAAE,CACtB,CAAC,KAAM,CACLA,eAAe,CAAG,CAChB1B,SAAS,CAATA,SACF,CAAC,CACH,CACF,CAEA,OAAA+B,MAAA,CAAAC,MAAA,EACE5C,KAAK,CAAEoB,SAAS,CAChBlB,UAAU,CAAEqB,eAAe,CAC3BnB,QAAQ,CAAEuB,aAAa,CACvBrB,UAAU,CAAEwB,eAAe,CAC3BtB,SAAS,CAATA,SAAS,CACTE,kBAAkB,CAAlBA,kBAAkB,CAAA,CACdA,kBAAkB,GAAK,MAAM,EAAI,CACnCmC,mBAAmB,CAAEzB,SACvB,CAAC,EACDN,UAAU,CAAEkB,eAAe,CAC3BhB,aAAa,CAAEkB,kBAAkB,CACjCjB,SAAS,CAATA,SAAS,CACT6B,MAAM,CAAE,CAAC,CACTC,OAAO,CAAE,CAAC,CACV7B,OAAO,CAAPA,OAAO,CACJmB,CAAAA,cAAc,CACdC,eAAe,EAEtB;;;;"}
|
|
@@ -17,7 +17,7 @@ import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.native
|
|
|
17
17
|
import { MetaConstants } from '../../../utils/metaAttribute/metaConstants.js';
|
|
18
18
|
import { jsx } from 'react/jsx-runtime';
|
|
19
19
|
|
|
20
|
-
var _excluded=["children","size","weight","isHighlighted","color","testID"];var platformType=getPlatformType();var isPlatformWeb=platformType==='browser'||platformType==='node';var getCodeFontSizeAndLineHeight=function getCodeFontSizeAndLineHeight(size){switch(size){case'medium':return {fontSize:75,lineHeight:75};case'small':return {fontSize:25,lineHeight:25};default:if(__DEV__){throwBladeError({moduleName:'Code',message:`Unexpected size: ${size}`});}return undefined;}};var CodeContainer=styled(BaseBox)(function(props){var padding=`${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;return {padding:padding,backgroundColor:props.isHighlighted?props.theme.colors.
|
|
20
|
+
var _excluded=["children","size","weight","isHighlighted","color","testID"];var platformType=getPlatformType();var isPlatformWeb=platformType==='browser'||platformType==='node';var getCodeFontSizeAndLineHeight=function getCodeFontSizeAndLineHeight(size){switch(size){case'medium':return {fontSize:75,lineHeight:75};case'small':return {fontSize:25,lineHeight:25};default:if(__DEV__){throwBladeError({moduleName:'Code',message:`Unexpected size: ${size}`});}return undefined;}};var CodeContainer=styled(BaseBox)(function(props){var padding=`${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;return {padding:padding,backgroundColor:props.isHighlighted?props.theme.colors.feedback.background.neutral.subtle:undefined,borderRadius:props.theme.border.radius.medium,display:isPlatformWeb?'inline-block':'flex',alignSelf:isPlatformWeb?undefined:'center',verticalAlign:'middle',lineHeight:makeTypographySize(props.theme.typography.lineHeights[0])};});var getCodeColor=function getCodeColor(_ref){var isHighlighted=_ref.isHighlighted,color=_ref.color;if(isHighlighted){if(__DEV__){if(color){throwBladeError({moduleName:'Code',message:'`color` prop cannot be used without `isHighlighted={false}`'});}}return 'surface.text.gray.subtle';}if(color){return color;}return 'surface.text.gray.normal';};var Code=function Code(_ref2){var children=_ref2.children,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'regular':_ref2$weight,_ref2$isHighlighted=_ref2.isHighlighted,isHighlighted=_ref2$isHighlighted===void 0?true:_ref2$isHighlighted,color=_ref2.color,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded);var _ref3=getCodeFontSizeAndLineHeight(size),fontSize=_ref3.fontSize,lineHeight=_ref3.lineHeight;var codeTextColor=React__default.useMemo(function(){return getCodeColor({isHighlighted:isHighlighted,color:color});},[isHighlighted,color]);return jsx(CodeContainer,Object.assign({size:size,isHighlighted:isHighlighted,as:isPlatformWeb?'span':undefined},metaAttribute({name:MetaConstants.Code,testID:testID}),getStyledProps(styledProps),{children:jsx(BaseText,{color:codeTextColor,fontFamily:"code",fontSize:fontSize,fontWeight:weight,as:isPlatformWeb?'code':undefined,lineHeight:lineHeight,children:children})}));};
|
|
21
21
|
|
|
22
22
|
export { Code };
|
|
23
23
|
//# sourceMappingURL=Code.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Code.js","sources":["../../../../../../src/components/Typography/Code/Code.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FontSize, Typography } from '~tokens/global';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { throwBladeError } from '~utils/logger';\n\ntype CodeCommonProps = {\n /**\n * Sets the color of the Heading component.\n */\n children: StringChildrenType;\n /**\n * Decides the fontSize and padding of Code\n *\n * @default small\n */\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n weight?: 'regular' | 'bold'
|
|
1
|
+
{"version":3,"file":"Code.js","sources":["../../../../../../src/components/Typography/Code/Code.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FontSize, Typography } from '~tokens/global';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { throwBladeError } from '~utils/logger';\n\ntype CodeCommonProps = {\n /**\n * Sets the color of the Heading component.\n */\n children: StringChildrenType;\n /**\n * Decides the fontSize and padding of Code\n *\n * @default small\n */\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'bold'>;\n isHighlighted?: boolean;\n color?: BaseTextProps['color'];\n} & TestID &\n StyledPropsBlade;\n\ntype CodeHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted?: true;\n /**\n * color prop can only be added when `isHighlighted` is set to `false`\n */\n color?: undefined;\n};\n\ntype CodeNonHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted: false;\n /**\n * color prop to set color of text when `isHighlighted` is set to false\n */\n color?: BaseTextProps['color'];\n};\n\nexport type CodeProps = CodeHighlightedProps | CodeNonHighlightedProps;\n\ntype CodeContainerProps = {\n size: CodeProps['size'];\n isHighlighted: CodeProps['isHighlighted'];\n};\n\nconst platformType = getPlatformType();\nconst isPlatformWeb = platformType === 'browser' || platformType === 'node';\n\nconst getCodeFontSizeAndLineHeight = (\n size: CodeProps['size'],\n): { fontSize: keyof FontSize; lineHeight: keyof Typography['lineHeights'] } | undefined => {\n switch (size) {\n case 'medium':\n return { fontSize: 75, lineHeight: 75 };\n case 'small':\n return { fontSize: 25, lineHeight: 25 };\n default:\n if (__DEV__) {\n throwBladeError({\n moduleName: 'Code',\n message: `Unexpected size: ${size}`,\n });\n }\n return undefined;\n }\n};\n\nconst CodeContainer = styled(BaseBox)<CodeContainerProps>((props) => {\n const padding = `${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;\n return {\n padding,\n backgroundColor: props.isHighlighted\n ? props.theme.colors.feedback.background.neutral.subtle\n : undefined,\n borderRadius: props.theme.border.radius.medium,\n display: isPlatformWeb ? 'inline-block' : 'flex',\n alignSelf: isPlatformWeb ? undefined : 'center',\n verticalAlign: 'middle',\n lineHeight: makeTypographySize(props.theme.typography.lineHeights[0]),\n };\n});\n\nconst getCodeColor = ({\n isHighlighted,\n color,\n}: Pick<CodeProps, 'isHighlighted' | 'color'>): CodeProps['color'] => {\n if (isHighlighted) {\n if (__DEV__) {\n if (color) {\n throwBladeError({\n moduleName: 'Code',\n message: '`color` prop cannot be used without `isHighlighted={false}`',\n });\n }\n }\n\n return 'surface.text.gray.subtle';\n }\n\n if (color) {\n return color;\n }\n\n return 'surface.text.gray.normal';\n};\n/**\n * Code component can be used for displaying token, variable names, or inlined code snippets.\n *\n * ## Usage\n *\n * ### In Web\n * In web, you can use it inside `Text` component or individually. The component is set to display `inline-block`\n *\n * ```tsx\n * <Text>\n * Lorem ipsum <Code>SENTRY_TOKEN</Code> normal text\n * </Text>\n * ```\n *\n * ### In React Native\n *\n * In React Native, you would have to align it using flex to make sure the Code and the surrounding text is correctly aligned\n *\n * ```tsx\n * <Box flexWrap=\"wrap\" flexDirection=\"row\" alignItems=\"flex-start\">\n * <Text>Lorem ipsum </Text>\n * <Code>SENTRY_TOKEN</Code>\n * <Text> normal text</Text>\n * </Box>\n * ```\n */\nconst Code = ({\n children,\n size = 'small',\n weight = 'regular',\n isHighlighted = true,\n color,\n testID,\n ...styledProps\n}: CodeProps): React.ReactElement => {\n const { fontSize, lineHeight } = getCodeFontSizeAndLineHeight(size)!;\n const codeTextColor = React.useMemo<CodeProps['color']>(\n () => getCodeColor({ isHighlighted, color }),\n [isHighlighted, color],\n );\n\n return (\n <CodeContainer\n size={size}\n isHighlighted={isHighlighted}\n as={isPlatformWeb ? 'span' : undefined}\n {...metaAttribute({ name: MetaConstants.Code, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseText\n color={codeTextColor}\n fontFamily=\"code\"\n fontSize={fontSize}\n fontWeight={weight}\n as={isPlatformWeb ? 'code' : undefined}\n lineHeight={lineHeight}\n >\n {children}\n </BaseText>\n </CodeContainer>\n );\n};\n\nexport { Code };\n"],"names":["platformType","getPlatformType","isPlatformWeb","getCodeFontSizeAndLineHeight","size","fontSize","lineHeight","__DEV__","throwBladeError","moduleName","message","undefined","CodeContainer","styled","BaseBox","props","padding","makeSpace","theme","spacing","backgroundColor","isHighlighted","colors","feedback","background","neutral","subtle","borderRadius","border","radius","medium","display","alignSelf","verticalAlign","makeTypographySize","typography","lineHeights","getCodeColor","_ref","color","Code","_ref2","children","_ref2$size","_ref2$weight","weight","_ref2$isHighlighted","testID","styledProps","_objectWithoutProperties","_excluded","_ref3","codeTextColor","React","useMemo","_jsx","Object","assign","as","metaAttribute","name","MetaConstants","getStyledProps","BaseText","fontFamily","fontWeight"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,UAAA,CAAA,MAAA,CAAA,QAAA,CAAA,eAAA,CAAA,OAAA,CAAA,QAAA,CAAA,CAiEA,IAAMA,YAAY,CAAGC,eAAe,EAAE,CACtC,IAAMC,aAAa,CAAGF,YAAY,GAAK,SAAS,EAAIA,YAAY,GAAK,MAAM,CAE3E,IAAMG,4BAA4B,CAAG,SAA/BA,4BAA4BA,CAChCC,IAAuB,CACmE,CAC1F,OAAQA,IAAI,EACV,IAAK,QAAQ,CACX,OAAO,CAAEC,QAAQ,CAAE,EAAE,CAAEC,UAAU,CAAE,EAAG,CAAC,CACzC,IAAK,OAAO,CACV,OAAO,CAAED,QAAQ,CAAE,EAAE,CAAEC,UAAU,CAAE,EAAG,CAAC,CACzC,QACE,GAAIC,OAAO,CAAE,CACXC,eAAe,CAAC,CACdC,UAAU,CAAE,MAAM,CAClBC,OAAO,CAAG,CAAmBN,iBAAAA,EAAAA,IAAK,CACpC,CAAA,CAAC,CAAC,CACJ,CACA,OAAOO,SAAS,CACpB,CACF,CAAC,CAED,IAAMC,aAAa,CAAGC,MAAM,CAACC,OAAO,CAAC,CAAqB,SAACC,KAAK,CAAK,CACnE,IAAMC,OAAO,CAAI,CAAA,EAAEC,SAAS,CAACF,KAAK,CAACG,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAAE,CAAGF,CAAAA,EAAAA,SAAS,CAACF,KA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U,CACvCL,UAAU,CAAEA,UAAW,CAAAoC,QAAA,CAEtBA,QAAQ,CACD,CAAC,CAAA,CACE,CAAC,CAEpB;;;;"}
|
|
@@ -11,7 +11,7 @@ import 'react';
|
|
|
11
11
|
import '../../BladeProvider/useTheme.js';
|
|
12
12
|
import { jsx } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
|
-
var _excluded=["as","size","
|
|
14
|
+
var _excluded=["as","size","weight","color","children","testID","textAlign","textDecorationLine"];var validAsValues=['span','h1','h2','h3','h4','h5','h6'];var getProps=function getProps(_ref){var as=_ref.as,size=_ref.size,weight=_ref.weight,color=_ref.color,testID=_ref.testID;var isPlatformWeb=getPlatformType()==='browser'||getPlatformType()==='node';var letterSpacing=weight==='medium'||weight==='regular'?50:100;var props={color:color,fontSize:800,fontWeight:weight,fontStyle:'normal',lineHeight:800,fontFamily:'heading',accessibilityProps:isPlatformWeb?{}:{role:'heading'},componentName:'display',testID:testID,letterSpacing:letterSpacing};if(size==='small'){props.fontSize=800;props.lineHeight=800;}else if(size==='medium'){props.fontSize=900;props.lineHeight=900;}else if(size==='large'){props.fontSize=1000;props.lineHeight=1000;}else if(size==='xlarge'){props.fontSize=1100;props.lineHeight=1100;}props.as=isPlatformWeb?'h1':undefined;props.as=as||props.as;return props;};var Display=function Display(_ref2){var as=_ref2.as,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'semibold':_ref2$weight,_ref2$color=_ref2.color,color=_ref2$color===void 0?'surface.text.gray.normal':_ref2$color,children=_ref2.children,testID=_ref2.testID,textAlign=_ref2.textAlign,textDecorationLine=_ref2.textDecorationLine,styledProps=_objectWithoutProperties(_ref2,_excluded);useValidateAsProp({componentName:'Display',as:as,validAsValues:validAsValues});var props=getProps({as:as,size:size,color:color,weight:weight,testID:testID});return jsx(BaseText,Object.assign({},props,{textAlign:textAlign,textDecorationLine:textDecorationLine},getStyledProps(styledProps),{children:children}));};
|
|
15
15
|
|
|
16
16
|
export { Display };
|
|
17
17
|
//# sourceMappingURL=Display.js.map
|