@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":"Tooltip.web.js","sources":["../../../../../../src/components/Tooltip/Tooltip.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport {\n shift,\n FloatingPortal,\n arrow,\n flip,\n offset,\n useDelayGroup,\n useDelayGroupContext,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useRole,\n useTransitionStyles,\n autoUpdate,\n} from '@floating-ui/react';\nimport React from 'react';\nimport type { TooltipProps } from './types';\nimport { TooltipContent } from './TooltipContent';\nimport { ARROW_HEIGHT, ARROW_WIDTH, tooltipZIndex } from './constants';\nimport { TooltipContext } from './TooltipContext';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { size } from '~tokens/global';\nimport { useId } from '~utils/useId';\nimport { makeAccessible } from '~utils/makeAccessible';\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 = 'top',\n onOpenChange,\n zIndex = tooltipZIndex,\n}: TooltipProps): React.ReactElement => {\n const { theme } = useTheme();\n const id = useId();\n const [isOpen, setIsOpen] = React.useState(false);\n const arrowRef = React.useRef<SVGSVGElement>(null);\n\n const GAP = theme.spacing[2];\n const [side] = getFloatingPlacementParts(placement);\n const isHorizontal = side === 'left' || side === 'right';\n const isOppositeAxis = side === 'right' || side === 'bottom';\n\n const { refs, floatingStyles, context } = useFloating({\n placement,\n open: isOpen,\n strategy: 'fixed',\n onOpenChange: (open) => {\n if (open) {\n setIsOpen(true);\n onOpenChange?.({ isOpen: open });\n } else {\n setIsOpen(false);\n onOpenChange?.({ isOpen: open });\n }\n },\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 whileElementsMounted: autoUpdate,\n });\n\n const animationOffset = isOppositeAxis ? -size[4] : size[4];\n const { isMounted, styles } = useTransitionStyles(context, {\n duration: theme.motion.duration.quick,\n initial: {\n opacity: 0,\n transform: `translate${isHorizontal ? 'X' : 'Y'}(${animationOffset}px)`,\n },\n });\n\n useDelayGroup(context, { id });\n const { delay } = useDelayGroupContext();\n const hover = useHover(context, {\n delay,\n move: false,\n });\n const focus = useFocus(context);\n const role = useRole(context, { role: 'tooltip' });\n const { getReferenceProps, getFloatingProps } = useInteractions([role, hover, focus]);\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 ref: refs.setReference,\n ...makeAccessible({ label: content }),\n ...mergeProps(children.props, getReferenceProps()),\n })}\n {isMounted && (\n <FloatingPortal>\n <BaseBox\n ref={refs.setFloating}\n style={floatingStyles}\n pointerEvents=\"none\"\n // TODO: Tokenize zIndex values\n zIndex={zIndex}\n {...getFloatingProps()}\n {...metaAttribute({ name: MetaConstants.Tooltip })}\n >\n <TooltipContent\n title={title}\n style={styles}\n arrow={\n <PopupArrow\n ref={arrowRef}\n context={context}\n width={ARROW_WIDTH}\n height={ARROW_HEIGHT}\n fillColor={theme.colors.brand.gray[200].highContrast}\n strokeColor={theme.colors.brand.gray[300].highContrast}\n />\n }\n >\n {content}\n </TooltipContent>\n </BaseBox>\n </FloatingPortal>\n )}\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","id","useId","_React$useState","React","useState","_React$useState2","_slicedToArray","isOpen","setIsOpen","arrowRef","useRef","GAP","spacing","_getFloatingPlacement","getFloatingPlacementParts","_getFloatingPlacement2","side","isHorizontal","isOppositeAxis","_useFloating","useFloating","open","strategy","middleware","shift","crossAxis","padding","flip","offset","ARROW_HEIGHT","arrow","element","ARROW_WIDTH","whileElementsMounted","autoUpdate","refs","floatingStyles","context","animationOffset","size","_useTransitionStyles","useTransitionStyles","duration","motion","quick","initial","opacity","transform","concat","isMounted","styles","useDelayGroup","_useDelayGroupContext","useDelayGroupContext","delay","hover","useHover","move","focus","useFocus","role","useRole","_useInteractions","useInteractions","getReferenceProps","getFloatingProps","_jsxs","TooltipContext","Provider","value","cloneElement","_objectSpread","ref","setReference","makeAccessible","label","mergeProps","props","_jsx","FloatingPortal","BaseBox","setFloating","style","pointerEvents","metaAttribute","name","MetaConstants","TooltipContent","PopupArrow","width","height","fillColor","colors","brand","gray","highContrast","strokeColor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAMA,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAO2B;AAAA,EAAA,IANtCC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,cAAA;IACjBE,aAAY,GAAAN,IAAA,CAAZM,YAAY;IAAAC,WAAA,GAAAP,IAAA,CACZQ,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAGE,KAAAA,CAAAA,GAAAA,aAAa,GAAAF,WAAA,CAAA;AAEtB,EAAA,IAAAG,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;AACb,EAAA,IAAMC,EAAE,GAAGC,KAAK,EAAE,CAAA;AAClB,EAAA,IAAAC,eAAA,GAA4BC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;IAAAC,gBAAA,GAAAC,cAAA,CAAAJ,eAAA,EAAA,CAAA,CAAA;AAA1CK,IAAAA,MAAM,GAAAF,gBAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,SAAS,GAAAH,gBAAA,CAAA,CAAA,CAAA,CAAA;AACxB,EAAA,IAAMI,QAAQ,GAAGN,cAAK,CAACO,MAA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QAAEC,IAAI,EAAEC,aAAa,CAACpG,OAAAA;AAAQ,OAAC,CAAC,CAAA,EAAA,EAAA,EAAA;QAAAI,QAAA,eAElDwF,GAAA,CAACS,cAAc,EAAA;AACbnG,UAAAA,KAAK,EAAEA,KAAM;AACb8F,UAAAA,KAAK,EAAEhC,MAAO;UACdpB,KAAK,eACHgD,GAAA,CAACU,UAAU,EAAA;AACThB,YAAAA,GAAG,EAAE/D,QAAS;AACd4B,YAAAA,OAAO,EAAEA,OAAQ;AACjBoD,YAAAA,KAAK,EAAEzD,WAAY;AACnB0D,YAAAA,MAAM,EAAE7D,YAAa;AACrB8D,YAAAA,SAAS,EAAE5F,KAAK,CAAC6F,MAAM,CAACC,KAAK,CAACC,IAAI,CAAC,GAAG,CAAC,CAACC,YAAa;YACrDC,WAAW,EAAEjG,KAAK,CAAC6F,MAAM,CAACC,KAAK,CAACC,IAAI,CAAC,GAAG,CAAC,CAACC,YAAAA;AAAa,WACxD,CACF;AAAAzG,UAAAA,QAAA,EAEAD,OAAAA;SACa,CAAA;OACT,CAAA,CAAA;AAAC,KACI,CACjB,CAAA;AAAA,GACsB,CAAC,CAAA;AAE9B;;;;"}
|
|
1
|
+
{"version":3,"file":"Tooltip.web.js","sources":["../../../../../../src/components/Tooltip/Tooltip.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport {\n shift,\n FloatingPortal,\n arrow,\n flip,\n offset,\n useDelayGroup,\n useDelayGroupContext,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useRole,\n useTransitionStyles,\n autoUpdate,\n} from '@floating-ui/react';\nimport React from 'react';\nimport type { TooltipProps } from './types';\nimport { TooltipContent } from './TooltipContent';\nimport { ARROW_HEIGHT, ARROW_WIDTH, tooltipZIndex } from './constants';\nimport { TooltipContext } from './TooltipContext';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { size } from '~tokens/global';\nimport { useId } from '~utils/useId';\nimport { makeAccessible } from '~utils/makeAccessible';\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 = 'top',\n onOpenChange,\n zIndex = tooltipZIndex,\n}: TooltipProps): React.ReactElement => {\n const { theme } = useTheme();\n const id = useId();\n const [isOpen, setIsOpen] = React.useState(false);\n const arrowRef = React.useRef<SVGSVGElement>(null);\n\n const GAP = theme.spacing[2];\n const [side] = getFloatingPlacementParts(placement);\n const isHorizontal = side === 'left' || side === 'right';\n const isOppositeAxis = side === 'right' || side === 'bottom';\n\n const { refs, floatingStyles, context } = useFloating({\n placement,\n open: isOpen,\n strategy: 'fixed',\n onOpenChange: (open) => {\n setIsOpen(open);\n onOpenChange?.({ isOpen: open });\n },\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 whileElementsMounted: autoUpdate,\n });\n\n const animationOffset = isOppositeAxis ? -size[4] : size[4];\n const { isMounted, styles } = useTransitionStyles(context, {\n duration: theme.motion.duration.quick,\n initial: {\n opacity: 0,\n transform: `translate${isHorizontal ? 'X' : 'Y'}(${animationOffset}px)`,\n },\n });\n\n useDelayGroup(context, { id });\n const { delay } = useDelayGroupContext();\n const hover = useHover(context, {\n delay,\n move: false,\n });\n const focus = useFocus(context);\n const role = useRole(context, { role: 'tooltip' });\n const { getReferenceProps, getFloatingProps } = useInteractions([role, hover, focus]);\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 ref: refs.setReference,\n ...makeAccessible({ label: content }),\n ...mergeProps(children.props, getReferenceProps()),\n })}\n {isMounted && (\n <FloatingPortal>\n <BaseBox\n ref={refs.setFloating}\n style={floatingStyles}\n pointerEvents=\"none\"\n // TODO: Tokenize zIndex values\n zIndex={zIndex}\n {...getFloatingProps()}\n {...metaAttribute({ name: MetaConstants.Tooltip })}\n >\n <TooltipContent\n title={title}\n style={styles}\n arrow={\n <PopupArrow\n ref={arrowRef}\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 </BaseBox>\n </FloatingPortal>\n )}\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","id","useId","_React$useState","React","useState","_React$useState2","_slicedToArray","isOpen","setIsOpen","arrowRef","useRef","GAP","spacing","_getFloatingPlacement","getFloatingPlacementParts","_getFloatingPlacement2","side","isHorizontal","isOppositeAxis","_useFloating","useFloating","open","strategy","middleware","shift","crossAxis","padding","flip","offset","ARROW_HEIGHT","arrow","element","ARROW_WIDTH","whileElementsMounted","autoUpdate","refs","floatingStyles","context","animationOffset","size","_useTransitionStyles","useTransitionStyles","duration","motion","quick","initial","opacity","transform","concat","isMounted","styles","useDelayGroup","_useDelayGroupContext","useDelayGroupContext","delay","hover","useHover","move","focus","useFocus","role","useRole","_useInteractions","useInteractions","getReferenceProps","getFloatingProps","_jsxs","TooltipContext","Provider","value","cloneElement","_objectSpread","ref","setReference","makeAccessible","label","mergeProps","props","_jsx","FloatingPortal","BaseBox","setFloating","style","pointerEvents","metaAttribute","name","MetaConstants","TooltipContent","PopupArrow","width","height","fillColor","colors","popup","background","intense","strokeColor","border"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,IAAMA,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAO2B;AAAA,EAAA,IANtCC,KAAK,GAAAD,IAAA,CAALC,KAAK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,16 +28,15 @@ var TooltipContent = /*#__PURE__*/React__default.forwardRef(function (_ref, ref)
|
|
|
28
28
|
side: side,
|
|
29
29
|
isVisible: isVisible,
|
|
30
30
|
children: [title ? /*#__PURE__*/jsx(Text, {
|
|
31
|
-
|
|
32
|
-
weight: "bold",
|
|
31
|
+
weight: "semibold",
|
|
33
32
|
size: "medium",
|
|
33
|
+
color: "surface.text.staticWhite.normal",
|
|
34
34
|
children: title
|
|
35
35
|
}) : null, /*#__PURE__*/jsx(Text, {
|
|
36
36
|
variant: "body",
|
|
37
37
|
size: "small",
|
|
38
38
|
weight: "regular",
|
|
39
|
-
|
|
40
|
-
color: "feedback.text.neutral.highContrast",
|
|
39
|
+
color: "surface.text.staticWhite.subtle",
|
|
41
40
|
wordBreak: "break-word",
|
|
42
41
|
children: children
|
|
43
42
|
}), arrow]
|
|
@@ -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":";;;;;;;;;;;AAOMA,IAAAA,cAAc,gBAAGC,cAAK,CAACC,UAAU,CACrC,UAAAC,IAAA,EAAqDC,GAAG,EAAK;AAAA,EAAA,IAA1DC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,KAAK,GAAAH,IAAA,CAALG,KAAK;IAAEC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IAAEC,IAAI,GAAAL,IAAA,CAAJK,IAAI;IAAEC,KAAK,GAAAN,IAAA,CAALM,KAAK;IAAEC,SAAS,GAAAP,IAAA,CAATO,SAAS,CAAA;EAC/C,oBACEC,IAAA,CAACC,qBAAqB,EAAA;AACpBC,IAAAA,QAAQ,EAAEC,aAAa,EAAE,GAAG,UAAU,GAAG,UAAW;AACpDC,IAAAA,UAAU,EAAC,WAAW;AACtBC,IAAAA,aAAa,EAAC,WAAW;AACzBC,IAAAA,WAAW,EAAC,WAAW;AACvBC,IAAAA,YAAY,EAAC,WAAW;AACxBC,IAAAA,QAAQ,EAAEC,QAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,CAAE;AAC9BjB,IAAAA,GAAG,EAAEA,GAAa;AAClBkB,IAAAA,MAAM,EAAEb,KAAM;AACdD,IAAAA,IAAI,EAAEA,IAAK;AACXE,IAAAA,SAAS,EAAEA,SAAU;AAAAL,IAAAA,QAAA,EAEpBC,CAAAA,KAAK,gBACJiB,GAAA,CAACC,IAAI,EAAA;AAACC,MAAAA,MAAM,EAAC,UAAU;AAACJ,MAAAA,IAAI,EAAC,QAAQ;AAACK,MAAAA,KAAK,EAAC,iCAAiC;AAAArB,MAAAA,QAAA,EAC1EC,KAAAA;AAAK,KACF,CAAC,GACL,IAAI,eACRiB,GAAA,CAACC,IAAI,EAAA;AACHG,MAAAA,OAAO,EAAC,MAAM;AACdN,MAAAA,IAAI,EAAC,OAAO;AACZI,MAAAA,MAAM,EAAC,SAAS;AAChBC,MAAAA,KAAK,EAAC,iCAAiC;AACvCE,MAAAA,SAAS,EAAC,YAAY;AAAAvB,MAAAA,QAAA,EAErBA,QAAAA;KACG,CAAC,EACNE,KAAK,CAAA;AAAA,GACe,CAAC,CAAA;AAE5B,CACF;;;;"}
|
|
@@ -10,10 +10,10 @@ var getTooltipContentWrapperStyles = function getTooltipContentWrapperStyles(_re
|
|
|
10
10
|
var theme = _ref.theme,
|
|
11
11
|
styles = _ref.styles;
|
|
12
12
|
return _objectSpread({
|
|
13
|
-
backgroundColor: theme.colors.
|
|
13
|
+
backgroundColor: theme.colors.popup.background.intense,
|
|
14
14
|
borderWidth: makeBorderSize(theme.border.width.thin),
|
|
15
15
|
borderRadius: makeBorderSize(theme.border.radius.medium),
|
|
16
|
-
borderColor: theme.colors.
|
|
16
|
+
borderColor: theme.colors.popup.border.intense,
|
|
17
17
|
borderStyle: 'solid',
|
|
18
18
|
boxShadow: isReactNative() ? undefined : castWebType(theme.elevation.lowRaised)
|
|
19
19
|
}, styles);
|
|
@@ -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","_objectSpread","backgroundColor","colors","popup","background","intense","borderWidth","makeBorderSize","border","width","thin","borderRadius","radius","medium","borderColor","borderStyle","boxShadow","isReactNative","undefined","castWebType","elevation","lowRaised"],"mappings":";;;;;;;;AAKA,IAAMA,8BAA8B,GAAG,SAAjCA,8BAA8BA,CAAAC,IAAA,EAMnB;AAAA,EAAA,IALfC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,MAAM,GAAAF,IAAA,CAANE,MAAM,CAAA;AAKN,EAAA,OAAAC,aAAA,CAAA;IACEC,eAAe,EAAEH,KAAK,CAACI,MAAM,CAACC,KAAK,CAACC,UAAU,CAACC,OAAO;IACtDC,WAAW,EAAEC,cAAc,CAACT,KAAK,CAACU,MAAM,CAACC,KAAK,CAACC,IAAI,CAAC;IACpDC,YAAY,EAAEJ,cAAc,CAACT,KAAK,CAACU,MAAM,CAACI,MAAM,CAACC,MAAM,CAAC;IACxDC,WAAW,EAAEhB,KAAK,CAACI,MAAM,CAACC,KAAK,CAACK,MAAM,CAACH,OAAO;AAC9CU,IAAAA,WAAW,EAAE,OAAO;AACpBC,IAAAA,SAAS,EAAEC,aAAa,EAAE,GAAGC,SAAS,GAAGC,WAAW,CAACrB,KAAK,CAACsB,SAAS,CAACC,SAAS,CAAA;AAAC,GAAA,EAC5EtB,MAAM,CAAA,CAAA;AAEb;;;;"}
|
|
@@ -14,8 +14,8 @@ import { getStyledProps } from '../../Box/styledProps/getStyledProps.js';
|
|
|
14
14
|
import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.web.js';
|
|
15
15
|
import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.web.js';
|
|
16
16
|
|
|
17
|
-
var _excluded = ["color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecorationLine", "numberOfLines", "lineHeight", "textAlign", "wordBreak"],
|
|
18
|
-
_excluded2 = ["id", "color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecorationLine", "lineHeight", "as", "textAlign", "children", "truncateAfterLines", "wordBreak", "className", "style", "accessibilityProps", "componentName", "testID"];
|
|
17
|
+
var _excluded = ["color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecorationLine", "numberOfLines", "lineHeight", "letterSpacing", "textAlign", "wordBreak", "opacity"],
|
|
18
|
+
_excluded2 = ["id", "color", "fontFamily", "fontSize", "fontWeight", "fontStyle", "textDecorationLine", "lineHeight", "letterSpacing", "as", "textAlign", "children", "truncateAfterLines", "wordBreak", "opacity", "className", "style", "accessibilityProps", "componentName", "testID"];
|
|
19
19
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20
20
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
21
|
var StyledBaseText = /*#__PURE__*/styled.div.withConfig({
|
|
@@ -30,8 +30,10 @@ var StyledBaseText = /*#__PURE__*/styled.div.withConfig({
|
|
|
30
30
|
textDecorationLine = _ref.textDecorationLine,
|
|
31
31
|
numberOfLines = _ref.numberOfLines,
|
|
32
32
|
lineHeight = _ref.lineHeight,
|
|
33
|
+
letterSpacing = _ref.letterSpacing,
|
|
33
34
|
textAlign = _ref.textAlign,
|
|
34
35
|
wordBreak = _ref.wordBreak,
|
|
36
|
+
opacity = _ref.opacity,
|
|
35
37
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
36
38
|
var styledPropsCSSObject = useStyledProps(props);
|
|
37
39
|
return _objectSpread(_objectSpread({}, getBaseTextStyles({
|
|
@@ -43,8 +45,10 @@ var StyledBaseText = /*#__PURE__*/styled.div.withConfig({
|
|
|
43
45
|
textDecorationLine: textDecorationLine,
|
|
44
46
|
numberOfLines: numberOfLines,
|
|
45
47
|
lineHeight: lineHeight,
|
|
48
|
+
letterSpacing: letterSpacing,
|
|
46
49
|
textAlign: textAlign,
|
|
47
50
|
wordBreak: wordBreak,
|
|
51
|
+
opacity: opacity,
|
|
48
52
|
theme: props.theme
|
|
49
53
|
})), styledPropsCSSObject);
|
|
50
54
|
});
|
|
@@ -57,11 +61,13 @@ var BaseText = function BaseText(_ref2) {
|
|
|
57
61
|
fontStyle = _ref2.fontStyle,
|
|
58
62
|
textDecorationLine = _ref2.textDecorationLine,
|
|
59
63
|
lineHeight = _ref2.lineHeight,
|
|
64
|
+
letterSpacing = _ref2.letterSpacing,
|
|
60
65
|
as = _ref2.as,
|
|
61
66
|
textAlign = _ref2.textAlign,
|
|
62
67
|
children = _ref2.children,
|
|
63
68
|
truncateAfterLines = _ref2.truncateAfterLines,
|
|
64
69
|
wordBreak = _ref2.wordBreak,
|
|
70
|
+
opacity = _ref2.opacity,
|
|
65
71
|
className = _ref2.className,
|
|
66
72
|
style = _ref2.style,
|
|
67
73
|
_ref2$accessibilityPr = _ref2.accessibilityProps,
|
|
@@ -78,10 +84,12 @@ var BaseText = function BaseText(_ref2) {
|
|
|
78
84
|
fontStyle: fontStyle,
|
|
79
85
|
textDecorationLine: textDecorationLine,
|
|
80
86
|
lineHeight: lineHeight,
|
|
87
|
+
letterSpacing: letterSpacing,
|
|
81
88
|
as: as,
|
|
82
89
|
textAlign: textAlign,
|
|
83
90
|
numberOfLines: truncateAfterLines,
|
|
84
91
|
wordBreak: wordBreak,
|
|
92
|
+
opacity: opacity,
|
|
85
93
|
className: className,
|
|
86
94
|
style: style,
|
|
87
95
|
id: id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseText.web.js","sources":["../../../../../../../src/components/Typography/BaseText/BaseText.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement } from 'react';\nimport styled from 'styled-components';\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';\nimport { omitPropsFromHTML } from '~utils/omitPropsFromHTML';\n\nconst StyledBaseText = styled.div.withConfig({\n shouldForwardProp: omitPropsFromHTML,\n displayName: 'StyledBaseText',\n})<StyledBaseTextProps>(\n ({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n textAlign,\n wordBreak,\n ...props\n }) => {\n const styledPropsCSSObject = useStyledProps(props);\n return {\n ...getBaseTextStyles({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n textAlign,\n wordBreak,\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 as,\n textAlign,\n children,\n truncateAfterLines,\n wordBreak,\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={as}\n textAlign={textAlign}\n numberOfLines={truncateAfterLines}\n wordBreak={wordBreak}\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","div","withConfig","shouldForwardProp","omitPropsFromHTML","displayName","_ref","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","textAlign","wordBreak","props","_objectWithoutProperties","_excluded","styledPropsCSSObject","useStyledProps","_objectSpread","getBaseTextStyles","theme","BaseText","_ref2","id","as","children","truncateAfterLines","className","style","_ref2$accessibilityPr","accessibilityProps","_ref2$componentName","componentName","MetaConstants","testID","styledProps","_excluded2","_jsx","getStyledProps","makeAccessible","metaAttribute","name"],"mappings":";;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,cAAc,gBAAGC,MAAM,CAACC,GAAG,CAACC,UAAU,CAAC;AAC3CC,EAAAA,iBAAiB,EAAEC,iBAAiB;AACpCC,EAAAA,WAAW,EAAE,gBAAA;AACf,CAAC,CAAC,CACA,UAAAC,IAAA,
|
|
1
|
+
{"version":3,"file":"BaseText.web.js","sources":["../../../../../../../src/components/Typography/BaseText/BaseText.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement } from 'react';\nimport styled from 'styled-components';\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';\nimport { omitPropsFromHTML } from '~utils/omitPropsFromHTML';\n\nconst StyledBaseText = styled.div.withConfig({\n shouldForwardProp: omitPropsFromHTML,\n displayName: 'StyledBaseText',\n})<StyledBaseTextProps>(\n ({\n color,\n fontFamily,\n fontSize,\n fontWeight,\n fontStyle,\n textDecorationLine,\n numberOfLines,\n lineHeight,\n letterSpacing,\n textAlign,\n wordBreak,\n opacity,\n ...props\n }) => {\n const styledPropsCSSObject = useStyledProps(props);\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 wordBreak,\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 letterSpacing,\n as,\n textAlign,\n children,\n truncateAfterLines,\n wordBreak,\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 letterSpacing={letterSpacing}\n as={as}\n textAlign={textAlign}\n numberOfLines={truncateAfterLines}\n wordBreak={wordBreak}\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","div","withConfig","shouldForwardProp","omitPropsFromHTML","displayName","_ref","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","letterSpacing","textAlign","wordBreak","opacity","props","_objectWithoutProperties","_excluded","styledPropsCSSObject","useStyledProps","_objectSpread","getBaseTextStyles","theme","BaseText","_ref2","id","as","children","truncateAfterLines","className","style","_ref2$accessibilityPr","accessibilityProps","_ref2$componentName","componentName","MetaConstants","testID","styledProps","_excluded2","_jsx","getStyledProps","makeAccessible","metaAttribute","name"],"mappings":";;;;;;;;;;;;;;;;;;;;AAUA,IAAMA,cAAc,gBAAGC,MAAM,CAACC,GAAG,CAACC,UAAU,CAAC;AAC3CC,EAAAA,iBAAiB,EAAEC,iBAAiB;AACpCC,EAAAA,WAAW,EAAE,gBAAA;AACf,CAAC,CAAC,CACA,UAAAC,IAAA,EAcM;AAAA,EAAA,IAbJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IACVC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,UAAU,GAAAJ,IAAA,CAAVI,UAAU;IACVC,SAAS,GAAAL,IAAA,CAATK,SAAS;IACTC,kBAAkB,GAAAN,IAAA,CAAlBM,kBAAkB;IAClBC,aAAa,GAAAP,IAAA,CAAbO,aAAa;IACbC,UAAU,GAAAR,IAAA,CAAVQ,UAAU;I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AAAA,SAAS,EAAEA,SAAU;AACrBH,IAAAA,aAAa,EAAEmB,kBAAmB;AAClCf,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,OAAO,EAAEA,OAAQ;AACjBe,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,KAAK,EAAEA,KAAM;AACbL,IAAAA,EAAE,EAAEA,EAAAA;AAAG,GAAA,EACHgB,cAAc,CAACT,kBAAkB,CAAC,CAAA,EAClCU,aAAa,CAAC;AAAEC,IAAAA,IAAI,EAAET,aAAa;AAAEE,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAT,IAAAA,QAAA,EAEjDA,QAAAA;AAAQ,GAAA,CACK,CAAC,CAAA;AAErB;;;;"}
|
|
@@ -2,14 +2,16 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import getIn from '../../../utils/lodashButBetter/get.js';
|
|
3
3
|
import '../../../utils/makeTypographySize/index.web.js';
|
|
4
4
|
import '../../../utils/index.js';
|
|
5
|
+
import '../../../utils/makeLetterSpacing/index.js';
|
|
5
6
|
import { makeTypographySize } from '../../../utils/makeTypographySize/makeTypographySize.web.js';
|
|
7
|
+
import { makeLetterSpacing } from '../../../utils/makeLetterSpacing/makeLetterSpacing.js';
|
|
6
8
|
import { isReactNative } from '../../../utils/platform/isReactNative.js';
|
|
7
9
|
|
|
8
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
11
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
12
|
var getBaseTextStyles = function getBaseTextStyles(_ref) {
|
|
11
13
|
var _ref$color = _ref.color,
|
|
12
|
-
color = _ref$color === void 0 ? 'surface.text.normal
|
|
14
|
+
color = _ref$color === void 0 ? 'surface.text.gray.normal' : _ref$color,
|
|
13
15
|
_ref$fontFamily = _ref.fontFamily,
|
|
14
16
|
fontFamily = _ref$fontFamily === void 0 ? 'text' : _ref$fontFamily,
|
|
15
17
|
_ref$fontSize = _ref.fontSize,
|
|
@@ -24,13 +26,17 @@ var getBaseTextStyles = function getBaseTextStyles(_ref) {
|
|
|
24
26
|
wordBreak = _ref.wordBreak,
|
|
25
27
|
_ref$lineHeight = _ref.lineHeight,
|
|
26
28
|
lineHeight = _ref$lineHeight === void 0 ? 100 : _ref$lineHeight,
|
|
29
|
+
_ref$letterSpacing = _ref.letterSpacing,
|
|
30
|
+
letterSpacing = _ref$letterSpacing === void 0 ? 100 : _ref$letterSpacing,
|
|
27
31
|
textAlign = _ref.textAlign,
|
|
32
|
+
opacity = _ref.opacity,
|
|
28
33
|
theme = _ref.theme;
|
|
29
34
|
var textColor = getIn(theme.colors, color);
|
|
30
35
|
var themeFontFamily = theme.typography.fonts.family[fontFamily];
|
|
31
36
|
var themeFontSize = makeTypographySize(theme.typography.fonts.size[fontSize]);
|
|
32
37
|
var themeFontWeight = theme.typography.fonts.weight[fontWeight];
|
|
33
38
|
var themeLineHeight = makeTypographySize(theme.typography.lineHeights[lineHeight]);
|
|
39
|
+
var themeLetterSpacing = makeLetterSpacing(theme.typography.letterSpacings[letterSpacing], theme.typography.fonts.size[fontSize]);
|
|
34
40
|
var truncateStyles = {};
|
|
35
41
|
var wordBreakStyles = {};
|
|
36
42
|
if (numberOfLines !== undefined) {
|
|
@@ -66,9 +72,11 @@ var getBaseTextStyles = function getBaseTextStyles(_ref) {
|
|
|
66
72
|
textDecorationColor: textColor
|
|
67
73
|
}), {}, {
|
|
68
74
|
lineHeight: themeLineHeight,
|
|
75
|
+
letterSpacing: themeLetterSpacing,
|
|
69
76
|
textAlign: textAlign,
|
|
70
77
|
margin: 0,
|
|
71
|
-
padding: 0
|
|
78
|
+
padding: 0,
|
|
79
|
+
opacity: opacity
|
|
72
80
|
}, truncateStyles), wordBreakStyles);
|
|
73
81
|
};
|
|
74
82
|
|
|
@@ -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","concat","_objectSpread","textDecorationColor","margin","padding"],"mappings":";;;;;;;;;;;AAOA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAce;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CAbpCE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KA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;AACF,GAAA;AAEA,EAAA,OAAAgC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACE5C,IAAAA,KAAK,EAAEoB,SAAS;AAChBlB,IAAAA,UAAU,EAAEqB,eAAe;AAC3BnB,IAAAA,QAAQ,EAAEuB,aAAa;AACvBrB,IAAAA,UAAU,EAAEwB,eAAe;AAC3BtB,IAAAA,SAAS,EAATA,SAAS;AACTE,IAAAA,kBAAkB,EAAlBA,kBAAAA;GACIA,EAAAA,kBAAkB,KAAK,MAAM,IAAI;AACnCmC,IAAAA,mBAAmB,EAAEzB,SAAAA;GACtB,CAAA,EAAA,EAAA,EAAA;AACDN,IAAAA,UAAU,EAAEkB,eAAe;AAC3BhB,IAAAA,aAAa,EAAEkB,kBAAkB;AACjCjB,IAAAA,SAAS,EAATA,SAAS;AACT6B,IAAAA,MAAM,EAAE,CAAC;AACTC,IAAAA,OAAO,EAAE,CAAC;AACV7B,IAAAA,OAAO,EAAPA,OAAAA;GACGmB,EAAAA,cAAc,GACdC,eAAe,CAAA,CAAA;AAEtB;;;;"}
|
|
@@ -55,7 +55,7 @@ var CodeContainer = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
55
55
|
var padding = "".concat(makeSpace(props.theme.spacing[0]), " ").concat(makeSpace(props.theme.spacing[2]));
|
|
56
56
|
return {
|
|
57
57
|
padding: padding,
|
|
58
|
-
backgroundColor: props.isHighlighted ? props.theme.colors.
|
|
58
|
+
backgroundColor: props.isHighlighted ? props.theme.colors.feedback.background.neutral.subtle : undefined,
|
|
59
59
|
borderRadius: props.theme.border.radius.medium,
|
|
60
60
|
display: isPlatformWeb ? 'inline-block' : 'flex',
|
|
61
61
|
alignSelf: isPlatformWeb ? undefined : 'center',
|
|
@@ -75,12 +75,12 @@ var getCodeColor = function getCodeColor(_ref) {
|
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
return 'surface.text.subtle
|
|
78
|
+
return 'surface.text.gray.subtle';
|
|
79
79
|
}
|
|
80
80
|
if (color) {
|
|
81
81
|
return color;
|
|
82
82
|
}
|
|
83
|
-
return 'surface.text.normal
|
|
83
|
+
return 'surface.text.gray.normal';
|
|
84
84
|
};
|
|
85
85
|
/**
|
|
86
86
|
* Code component can be used for displaying token, variable names, or inlined code snippets.
|
|
@@ -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","throwBladeError","moduleName","message","concat","undefined","CodeContainer","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSpace","theme","spacing","backgroundColor","isHighlighted","colors","feedback","background","neutral","subtle","borderRadius","border","radius","medium","display","alignSelf","verticalAlign","makeTypographySize","typography","lineHeights","getCodeColor","_ref","color","Code","_ref2","children","_ref2$size","_ref2$weight","weight","_ref2$isHighlighted","testID","styledProps","_objectWithoutProperties","_excluded","_ref3","codeTextColor","React","useMemo","_jsx","_objectSpread","as","metaAttribute","name","MetaConstants","getStyledProps","BaseText","fontFamily","fontWeight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,IAAMA,YAAY,GAAGC,eAAe,EAAE,CAAA;AACtC,IAAMC,aAAa,GAAGF,YAAY,KAAK,SAAS,IAAIA,YAAY,KAAK,MAAM,CAAA;AAE3E,IAAMG,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAChCC,IAAuB,EACmE;AAC1F,EAAA,QAAQA,IAAI;AACV,IAAA,KAAK,QAAQ;MACX,OAAO;AAAEC,QAAAA,QAAQ,EAAE,EAAE;AAAEC,QAAAA,UAAU,EAAE,EAAA;OAAI,CAAA;AACzC,IAAA,KAAK,OAAO;MACV,OAAO;AAAED,QAAAA,QAAQ,EAAE,EAAE;AAAEC,QAAAA,UAAU,EAAE,EAAA;OAAI,CAAA;AACzC,IAAA;AACE,MAAA,IAAI,KAAO,EAAE;AACXC,QAAAA,eAAe,CAAC;AACdC,UAAAA,UAAU,EAAE,MAAM;UAClBC,OAAO,EAAA,mBAAA,CAAAC,MAAA,CAAsBN,IAAI,CAAA;AACnC,SAAC,CAAC,CAAA;AACJ,OAAA;AACA,MAAA,OAAOO,SAAS,CAAA;AACpB,GAAA;AACF,CAAC,CAAA;AAED,IAAMC,aAAa,gBAAGC,MAAM,CAACC,O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AAAA,IAAA,OAAMjB,YAAY,CAAC;AAAEhB,MAAAA,aAAa,EAAbA,aAAa;AAAEkB,MAAAA,KAAK,EAALA,KAAAA;AAAM,KAAC,CAAC,CAAA;AAAA,GAAA,EAC5C,CAAClB,aAAa,EAAEkB,KAAK,CACvB,CAAC,CAAA;EAED,oBACEgB,GAAA,CAAC9C,aAAa,EAAA+C,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACZvD,IAAAA,IAAI,EAAEA,IAAK;AACXoB,IAAAA,aAAa,EAAEA,aAAc;AAC7BoC,IAAAA,EAAE,EAAE1D,aAAa,GAAG,MAAM,GAAGS,SAAAA;AAAU,GAAA,EACnCkD,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACpB,IAAI;AAAEO,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EACnDc,cAAc,CAACb,WAAW,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAN,QAAA,eAE/Ba,GAAA,CAACO,QAAQ,EAAA;AACPvB,MAAAA,KAAK,EAAEa,aAAc;AACrBW,MAAAA,UAAU,EAAC,MAAM;AACjB7D,MAAAA,QAAQ,EAAEA,QAAS;AACnB8D,MAAAA,UAAU,EAAEnB,MAAO;AACnBY,MAAAA,EAAE,EAAE1D,aAAa,GAAG,MAAM,GAAGS,SAAU;AACvCL,MAAAA,UAAU,EAAEA,UAAW;AAAAuC,MAAAA,QAAA,EAEtBA,QAAAA;KACO,CAAA;AAAC,GAAA,CACE,CAAC,CAAA;AAEpB;;;;"}
|
|
@@ -9,44 +9,44 @@ import { getPlatformType } from '../../../utils/getPlatformType/getPlatformType.
|
|
|
9
9
|
import { BaseText } from '../BaseText/BaseText.web.js';
|
|
10
10
|
import { getStyledProps } from '../../Box/styledProps/getStyledProps.js';
|
|
11
11
|
|
|
12
|
-
var _excluded = ["as", "size", "
|
|
12
|
+
var _excluded = ["as", "size", "weight", "color", "children", "testID", "textAlign", "textDecorationLine"];
|
|
13
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
15
|
var validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
16
16
|
var getProps = function getProps(_ref) {
|
|
17
17
|
var as = _ref.as,
|
|
18
18
|
size = _ref.size,
|
|
19
|
-
|
|
20
|
-
contrast = _ref.contrast,
|
|
19
|
+
weight = _ref.weight,
|
|
21
20
|
color = _ref.color,
|
|
22
21
|
testID = _ref.testID;
|
|
23
22
|
var isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';
|
|
24
|
-
var
|
|
23
|
+
var letterSpacing = weight === 'medium' || weight === 'regular' ? 50 : 100;
|
|
25
24
|
var props = {
|
|
26
|
-
color: color
|
|
27
|
-
fontSize:
|
|
28
|
-
fontWeight:
|
|
25
|
+
color: color,
|
|
26
|
+
fontSize: 800,
|
|
27
|
+
fontWeight: weight,
|
|
29
28
|
fontStyle: 'normal',
|
|
30
|
-
lineHeight:
|
|
31
|
-
fontFamily: '
|
|
29
|
+
lineHeight: 800,
|
|
30
|
+
fontFamily: 'heading',
|
|
32
31
|
accessibilityProps: isPlatformWeb ? {} : {
|
|
33
32
|
role: 'heading'
|
|
34
33
|
},
|
|
35
34
|
componentName: 'display',
|
|
36
|
-
testID: testID
|
|
35
|
+
testID: testID,
|
|
36
|
+
letterSpacing: letterSpacing
|
|
37
37
|
};
|
|
38
38
|
if (size === 'small') {
|
|
39
|
-
props.fontSize =
|
|
40
|
-
props.lineHeight =
|
|
39
|
+
props.fontSize = 800;
|
|
40
|
+
props.lineHeight = 800;
|
|
41
41
|
} else if (size === 'medium') {
|
|
42
|
-
props.fontSize =
|
|
43
|
-
props.lineHeight =
|
|
42
|
+
props.fontSize = 900;
|
|
43
|
+
props.lineHeight = 900;
|
|
44
44
|
} else if (size === 'large') {
|
|
45
|
-
props.fontSize =
|
|
46
|
-
props.lineHeight =
|
|
45
|
+
props.fontSize = 1000;
|
|
46
|
+
props.lineHeight = 1000;
|
|
47
47
|
} else if (size === 'xlarge') {
|
|
48
|
-
props.fontSize =
|
|
49
|
-
props.lineHeight =
|
|
48
|
+
props.fontSize = 1100;
|
|
49
|
+
props.lineHeight = 1100;
|
|
50
50
|
}
|
|
51
51
|
props.as = isPlatformWeb ? 'h1' : undefined;
|
|
52
52
|
// override the computed `as` prop if user passed an `as` prop
|
|
@@ -57,11 +57,10 @@ var Display = function Display(_ref2) {
|
|
|
57
57
|
var as = _ref2.as,
|
|
58
58
|
_ref2$size = _ref2.size,
|
|
59
59
|
size = _ref2$size === void 0 ? 'small' : _ref2$size,
|
|
60
|
-
_ref2$
|
|
61
|
-
|
|
62
|
-
_ref2$
|
|
63
|
-
|
|
64
|
-
color = _ref2.color,
|
|
60
|
+
_ref2$weight = _ref2.weight,
|
|
61
|
+
weight = _ref2$weight === void 0 ? 'semibold' : _ref2$weight,
|
|
62
|
+
_ref2$color = _ref2.color,
|
|
63
|
+
color = _ref2$color === void 0 ? 'surface.text.gray.normal' : _ref2$color,
|
|
65
64
|
children = _ref2.children,
|
|
66
65
|
testID = _ref2.testID,
|
|
67
66
|
textAlign = _ref2.textAlign,
|
|
@@ -75,9 +74,8 @@ var Display = function Display(_ref2) {
|
|
|
75
74
|
var props = getProps({
|
|
76
75
|
as: as,
|
|
77
76
|
size: size,
|
|
78
|
-
type: type,
|
|
79
|
-
contrast: contrast,
|
|
80
77
|
color: color,
|
|
78
|
+
weight: weight,
|
|
81
79
|
testID: testID
|
|
82
80
|
});
|
|
83
81
|
return /*#__PURE__*/jsx(BaseText, _objectSpread(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Display.js","sources":["../../../../../../../src/components/Typography/Display/Display.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport
|
|
1
|
+
{"version":3,"file":"Display.js","sources":["../../../../../../../src/components/Typography/Display/Display.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\n\nconst validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type DisplayProps = {\n as?: typeof validAsValues[number];\n /**\n * Overrides the color of the Display component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of title\n */\n color?: BaseTextProps['color'];\n size?: Extract<BaseTextSizes, 'small' | 'medium' | 'large' | 'xlarge'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'medium' | 'semibold'>;\n children: React.ReactNode;\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n} & TestID &\n StyledPropsBlade;\n\nconst getProps = ({\n as,\n size,\n weight,\n color,\n testID,\n}: Pick<DisplayProps, 'as' | 'size' | 'color' | 'weight' | 'testID'>): Omit<\n BaseTextProps,\n 'children'\n> => {\n const isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';\n const letterSpacing = weight === 'medium' || weight === 'regular' ? 50 : 100;\n const props: Omit<BaseTextProps, 'children'> = {\n color,\n fontSize: 800,\n fontWeight: weight,\n fontStyle: 'normal',\n lineHeight: 800,\n fontFamily: 'heading',\n accessibilityProps: isPlatformWeb ? {} : { role: 'heading' },\n componentName: 'display',\n testID,\n letterSpacing,\n };\n\n if (size === 'small') {\n props.fontSize = 800;\n props.lineHeight = 800;\n } else if (size === 'medium') {\n props.fontSize = 900;\n props.lineHeight = 900;\n } else if (size === 'large') {\n props.fontSize = 1000;\n props.lineHeight = 1000;\n } else if (size === 'xlarge') {\n props.fontSize = 1100;\n props.lineHeight = 1100;\n }\n\n props.as = isPlatformWeb ? 'h1' : undefined;\n // override the computed `as` prop if user passed an `as` prop\n props.as = as || props.as;\n return props;\n};\n\nexport const Display = ({\n as,\n size = 'small',\n weight = 'semibold',\n color = 'surface.text.gray.normal',\n children,\n testID,\n textAlign,\n textDecorationLine,\n ...styledProps\n}: DisplayProps): ReactElement => {\n useValidateAsProp({ componentName: 'Display', as, validAsValues });\n\n const props = getProps({ as, size, color, weight, testID });\n\n return (\n <BaseText\n {...props}\n textAlign={textAlign}\n textDecorationLine={textDecorationLine}\n {...getStyledProps(styledProps)}\n >\n {children}\n </BaseText>\n );\n};\n"],"names":["validAsValues","getProps","_ref","as","size","weight","color","testID","isPlatformWeb","getPlatformType","letterSpacing","props","fontSize","fontWeight","fontStyle","lineHeight","fontFamily","accessibilityProps","role","componentName","undefined","Display","_ref2","_ref2$size","_ref2$weight","_ref2$color","children","textAlign","textDecorationLine","styledProps","_objectWithoutProperties","_excluded","useValidateAsProp","_jsx","BaseText","_objectSpread","getStyledProps"],"mappings":";;;;;;;;;;;;;;AASA,IAAMA,aAAa,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAA;AAiB3E,IAAMC,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,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