@razorpay/blade 10.23.4 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/native/components/Accordion/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 +9 -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 +2 -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 +6 -5
- 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 +2 -2
- 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 +9 -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 +2 -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 +6 -5
- 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 +2 -2
- 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 +6005 -6169
- package/build/types/components/index.native.d.ts +4653 -4817
- 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,17 +1,22 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import '../Typography/BaseText/index.js';
|
|
4
|
+
import { subtleFontSizes, normalAmountSizes, amountLineHeights, getCurrencyAbbreviations, currencyIndicatorMapping, currencyPositionMapping } from './amountTokens.js';
|
|
6
5
|
import '../Box/BaseBox/index.js';
|
|
7
6
|
import '../../utils/index.js';
|
|
8
7
|
import '../../utils/metaAttribute/index.js';
|
|
9
8
|
import '../Box/styledProps/index.js';
|
|
10
9
|
import '../../utils/assignWithoutSideEffects/index.js';
|
|
11
10
|
import '../../utils/logger/index.js';
|
|
11
|
+
import { objectKeysWithType } from '../../utils/objectKeysWithType.js';
|
|
12
|
+
import '../Typography/BaseText/index.js';
|
|
13
|
+
import '../Typography/index.js';
|
|
14
|
+
import '../../tokens/global/index.js';
|
|
12
15
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
13
16
|
import { getPlatformType } from '../../utils/getPlatformType/getPlatformType.js';
|
|
17
|
+
import { Text } from '../Typography/Text/Text.js';
|
|
14
18
|
import { BaseText } from '../Typography/BaseText/BaseText.web.js';
|
|
19
|
+
import { opacity } from '../../tokens/global/opacity.js';
|
|
15
20
|
import { throwBladeError } from '../../utils/logger/logger.js';
|
|
16
21
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
17
22
|
import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
|
|
@@ -19,60 +24,64 @@ import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
|
|
|
19
24
|
import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
|
|
20
25
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
21
26
|
|
|
22
|
-
var _excluded = ["value", "suffix", "size", "isAffixSubtle", "
|
|
27
|
+
var _excluded = ["value", "suffix", "type", "size", "weight", "isAffixSubtle", "isStrikethrough", "color", "currencyIndicator", "currency", "testID"];
|
|
23
28
|
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; }
|
|
24
29
|
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; }
|
|
25
30
|
var getTextColorProps = function getTextColorProps(_ref) {
|
|
26
|
-
var
|
|
31
|
+
var color = _ref.color;
|
|
27
32
|
var props = {
|
|
28
|
-
amountValueColor: 'surface.text.normal
|
|
29
|
-
affixColor: 'surface.text.muted.lowContrast'
|
|
33
|
+
amountValueColor: 'surface.text.gray.normal'
|
|
30
34
|
};
|
|
31
|
-
if (!
|
|
32
|
-
props.amountValueColor =
|
|
33
|
-
props.affixColor = "feedback.text.".concat(intent, ".lowContrast");
|
|
35
|
+
if (!color) return props;
|
|
36
|
+
props.amountValueColor = color;
|
|
34
37
|
return props;
|
|
35
38
|
};
|
|
36
39
|
var AmountValue = function AmountValue(_ref2) {
|
|
37
40
|
var value = _ref2.value,
|
|
38
|
-
size = _ref2.size,
|
|
41
|
+
_ref2$size = _ref2.size,
|
|
42
|
+
size = _ref2$size === void 0 ? 'medium' : _ref2$size,
|
|
43
|
+
_ref2$type = _ref2.type,
|
|
44
|
+
type = _ref2$type === void 0 ? 'body' : _ref2$type,
|
|
45
|
+
_ref2$weight = _ref2.weight,
|
|
46
|
+
weight = _ref2$weight === void 0 ? 'regular' : _ref2$weight,
|
|
39
47
|
amountValueColor = _ref2.amountValueColor,
|
|
40
48
|
isAffixSubtle = _ref2.isAffixSubtle,
|
|
41
|
-
suffix = _ref2.suffix
|
|
42
|
-
affixColor = _ref2.affixColor;
|
|
43
|
-
var affixFontWeight = isAffixSubtle ? 'regular' : 'bold';
|
|
49
|
+
suffix = _ref2.suffix;
|
|
44
50
|
var isReactNative = getPlatformType() === 'react-native';
|
|
45
|
-
var affixFontSize = isAffixSubtle ?
|
|
46
|
-
var
|
|
51
|
+
var affixFontSize = isAffixSubtle ? subtleFontSizes[type][size] : normalAmountSizes[type][size];
|
|
52
|
+
var numberFontFamily = type === 'body' ? 'text' : 'heading';
|
|
47
53
|
if (suffix === 'decimals' && isAffixSubtle) {
|
|
48
54
|
var integer = value.split('.')[0];
|
|
49
55
|
var decimal = value.split('.')[1];
|
|
50
56
|
|
|
51
|
-
// Native does not support alignItems of Text inside a div,
|
|
52
|
-
var AmountWrapper =
|
|
57
|
+
// Native does not support alignItems of Text inside a div, instead we need to wrap is in a Text
|
|
58
|
+
var AmountWrapper = isReactNative ? Text : React__default.Fragment;
|
|
53
59
|
return /*#__PURE__*/jsxs(AmountWrapper, {
|
|
54
|
-
children: [/*#__PURE__*/
|
|
55
|
-
fontSize:
|
|
56
|
-
fontWeight:
|
|
57
|
-
lineHeight: amountLineHeights[size],
|
|
60
|
+
children: [/*#__PURE__*/jsx(BaseText, {
|
|
61
|
+
fontSize: normalAmountSizes[type][size],
|
|
62
|
+
fontWeight: weight,
|
|
63
|
+
lineHeight: amountLineHeights[type][size],
|
|
58
64
|
color: amountValueColor,
|
|
65
|
+
fontFamily: numberFontFamily,
|
|
59
66
|
as: isReactNative ? undefined : 'span',
|
|
60
|
-
children:
|
|
61
|
-
}), /*#__PURE__*/
|
|
62
|
-
|
|
63
|
-
fontWeight: affixFontWeight,
|
|
67
|
+
children: integer
|
|
68
|
+
}), /*#__PURE__*/jsxs(BaseText, {
|
|
69
|
+
fontWeight: weight,
|
|
64
70
|
fontSize: affixFontSize,
|
|
65
|
-
|
|
71
|
+
fontFamily: numberFontFamily,
|
|
72
|
+
color: amountValueColor,
|
|
66
73
|
as: isReactNative ? undefined : 'span',
|
|
67
|
-
|
|
74
|
+
opacity: isAffixSubtle ? opacity[8] : 1,
|
|
75
|
+
children: [".", decimal || '00']
|
|
68
76
|
})]
|
|
69
77
|
});
|
|
70
78
|
}
|
|
71
79
|
return /*#__PURE__*/jsx(BaseText, {
|
|
72
|
-
fontSize:
|
|
73
|
-
fontWeight:
|
|
80
|
+
fontSize: normalAmountSizes[type][size],
|
|
81
|
+
fontWeight: weight,
|
|
82
|
+
fontFamily: numberFontFamily,
|
|
74
83
|
color: amountValueColor,
|
|
75
|
-
lineHeight: amountLineHeights[size],
|
|
84
|
+
lineHeight: amountLineHeights[type][size],
|
|
76
85
|
children: value
|
|
77
86
|
});
|
|
78
87
|
};
|
|
@@ -98,7 +107,12 @@ var addCommas = function addCommas(amountValue, currency) {
|
|
|
98
107
|
* ie: for INR 2000 => 2K
|
|
99
108
|
* for MYR 2000000 => 2M
|
|
100
109
|
*/
|
|
101
|
-
var getHumanizedAmount = function getHumanizedAmount(
|
|
110
|
+
var getHumanizedAmount = function getHumanizedAmount(_ref3) {
|
|
111
|
+
var value = _ref3.value,
|
|
112
|
+
currency = _ref3.currency,
|
|
113
|
+
_ref3$denominationPos = _ref3.denominationPosition,
|
|
114
|
+
denominationPosition = _ref3$denominationPos === void 0 ? 'right' : _ref3$denominationPos;
|
|
115
|
+
var amountValue = value;
|
|
102
116
|
var abbreviations = getCurrencyAbbreviations(currency);
|
|
103
117
|
var abbreviation = abbreviations.find(function (abbr) {
|
|
104
118
|
return amountValue >= abbr.value;
|
|
@@ -106,15 +120,18 @@ var getHumanizedAmount = function getHumanizedAmount(amountValue, currency) {
|
|
|
106
120
|
if (abbreviation) {
|
|
107
121
|
amountValue = amountValue / abbreviation.value;
|
|
108
122
|
var formattedAmountValue = getFlooredFixed(amountValue, 2);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
123
|
+
if (denominationPosition === 'right') {
|
|
124
|
+
return "".concat(addCommas(formattedAmountValue, currency)).concat(abbreviation.symbol);
|
|
125
|
+
}
|
|
126
|
+
return "".concat(abbreviation.symbol).concat(addCommas(formattedAmountValue, currency));
|
|
112
127
|
}
|
|
128
|
+
return amountValue.toString();
|
|
113
129
|
};
|
|
114
|
-
var formatAmountWithSuffix = function formatAmountWithSuffix(
|
|
115
|
-
var suffix =
|
|
116
|
-
value =
|
|
117
|
-
currency =
|
|
130
|
+
var formatAmountWithSuffix = function formatAmountWithSuffix(_ref4) {
|
|
131
|
+
var suffix = _ref4.suffix,
|
|
132
|
+
value = _ref4.value,
|
|
133
|
+
currency = _ref4.currency,
|
|
134
|
+
denominationPosition = _ref4.denominationPosition;
|
|
118
135
|
switch (suffix) {
|
|
119
136
|
case 'decimals':
|
|
120
137
|
{
|
|
@@ -123,7 +140,11 @@ var formatAmountWithSuffix = function formatAmountWithSuffix(_ref3) {
|
|
|
123
140
|
}
|
|
124
141
|
case 'humanize':
|
|
125
142
|
{
|
|
126
|
-
return getHumanizedAmount(
|
|
143
|
+
return getHumanizedAmount({
|
|
144
|
+
value: value,
|
|
145
|
+
currency: currency,
|
|
146
|
+
denominationPosition: denominationPosition
|
|
147
|
+
});
|
|
127
148
|
}
|
|
128
149
|
case 'none':
|
|
129
150
|
{
|
|
@@ -133,25 +154,27 @@ var formatAmountWithSuffix = function formatAmountWithSuffix(_ref3) {
|
|
|
133
154
|
return addCommas(getFlooredFixed(value, 0), currency);
|
|
134
155
|
}
|
|
135
156
|
};
|
|
136
|
-
var
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
isAffixSubtle =
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
currency =
|
|
154
|
-
|
|
157
|
+
var _Amount = function _Amount(_ref5) {
|
|
158
|
+
var value = _ref5.value,
|
|
159
|
+
_ref5$suffix = _ref5.suffix,
|
|
160
|
+
suffix = _ref5$suffix === void 0 ? 'decimals' : _ref5$suffix,
|
|
161
|
+
_ref5$type = _ref5.type,
|
|
162
|
+
type = _ref5$type === void 0 ? 'body' : _ref5$type,
|
|
163
|
+
_ref5$size = _ref5.size,
|
|
164
|
+
size = _ref5$size === void 0 ? 'medium' : _ref5$size,
|
|
165
|
+
_ref5$weight = _ref5.weight,
|
|
166
|
+
weight = _ref5$weight === void 0 ? 'regular' : _ref5$weight,
|
|
167
|
+
_ref5$isAffixSubtle = _ref5.isAffixSubtle,
|
|
168
|
+
isAffixSubtle = _ref5$isAffixSubtle === void 0 ? true : _ref5$isAffixSubtle,
|
|
169
|
+
_ref5$isStrikethrough = _ref5.isStrikethrough,
|
|
170
|
+
isStrikethrough = _ref5$isStrikethrough === void 0 ? false : _ref5$isStrikethrough,
|
|
171
|
+
color = _ref5.color,
|
|
172
|
+
_ref5$currencyIndicat = _ref5.currencyIndicator,
|
|
173
|
+
currencyIndicator = _ref5$currencyIndicat === void 0 ? 'currency-symbol' : _ref5$currencyIndicat,
|
|
174
|
+
_ref5$currency = _ref5.currency,
|
|
175
|
+
currency = _ref5$currency === void 0 ? 'INR' : _ref5$currency,
|
|
176
|
+
testID = _ref5.testID,
|
|
177
|
+
styledProps = _objectWithoutProperties(_ref5, _excluded);
|
|
155
178
|
if (false) {
|
|
156
179
|
if (typeof value !== 'number') {
|
|
157
180
|
throwBladeError({
|
|
@@ -159,31 +182,53 @@ var _Amount = function _Amount(_ref4) {
|
|
|
159
182
|
moduleName: 'Amount'
|
|
160
183
|
});
|
|
161
184
|
}
|
|
162
|
-
// @ts-expect-error neutral
|
|
163
|
-
if (
|
|
185
|
+
// @ts-expect-error neutral color should throw error
|
|
186
|
+
if (color === 'neutral') {
|
|
164
187
|
throwBladeError({
|
|
165
|
-
message: '`neutral`
|
|
188
|
+
message: '`neutral` color is not supported.',
|
|
189
|
+
moduleName: 'Amount'
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
var bodySizes = objectKeysWithType(normalAmountSizes.body);
|
|
193
|
+
if ((type === 'body' || !type) && !bodySizes.includes(size)) {
|
|
194
|
+
throwBladeError({
|
|
195
|
+
message: "size=\"".concat(size, "\" is not allowed with type=\"body\""),
|
|
196
|
+
moduleName: 'Amount'
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
var displaySizes = objectKeysWithType(normalAmountSizes.display);
|
|
200
|
+
if (type === 'display' && !displaySizes.includes(size)) {
|
|
201
|
+
throwBladeError({
|
|
202
|
+
message: "size=\"".concat(size, "\" is not allowed with type=\"display\""),
|
|
203
|
+
moduleName: 'Amount'
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
var headingSizes = objectKeysWithType(normalAmountSizes.heading);
|
|
207
|
+
if (type === 'heading' && !headingSizes.includes(size)) {
|
|
208
|
+
throwBladeError({
|
|
209
|
+
message: "size=\"".concat(size, "\" is not allowed with type=\"heading\""),
|
|
166
210
|
moduleName: 'Amount'
|
|
167
211
|
});
|
|
168
212
|
}
|
|
169
213
|
}
|
|
170
|
-
var
|
|
214
|
+
var currencySymbolOrCode = currencyIndicatorMapping[currency][currencyIndicator];
|
|
215
|
+
var currencyPosition = currencyPositionMapping[currency] || 'left';
|
|
216
|
+
var denominationPosition = currencyPosition === 'left' ? 'right' : 'left';
|
|
171
217
|
var renderedValue = formatAmountWithSuffix({
|
|
172
218
|
suffix: suffix,
|
|
173
219
|
value: value,
|
|
174
|
-
currency: currency
|
|
220
|
+
currency: currency,
|
|
221
|
+
denominationPosition: denominationPosition
|
|
175
222
|
});
|
|
176
223
|
var _getTextColorProps = getTextColorProps({
|
|
177
|
-
|
|
224
|
+
color: color
|
|
178
225
|
}),
|
|
179
|
-
amountValueColor = _getTextColorProps.amountValueColor
|
|
180
|
-
|
|
181
|
-
var currencyColor = isAffixSubtle ? affixColor : amountValueColor;
|
|
182
|
-
var currencyFontSize = isAffixSubtle ? affixFontSizes[size] : amountFontSizes[size];
|
|
183
|
-
var currencyWeight = getCurrencyWeight(isAffixSubtle, size);
|
|
226
|
+
amountValueColor = _getTextColorProps.amountValueColor;
|
|
227
|
+
var currencyFontSize = isAffixSubtle ? subtleFontSizes[type][size] : normalAmountSizes[type][size];
|
|
184
228
|
var isReactNative = getPlatformType() === 'react-native';
|
|
185
229
|
return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({
|
|
186
|
-
display: isReactNative ? 'flex' : 'inline-flex'
|
|
230
|
+
display: isReactNative ? 'flex' : 'inline-flex',
|
|
231
|
+
flexDirection: "row"
|
|
187
232
|
}, metaAttribute({
|
|
188
233
|
name: MetaConstants.Amount,
|
|
189
234
|
testID: testID
|
|
@@ -192,20 +237,40 @@ var _Amount = function _Amount(_ref4) {
|
|
|
192
237
|
display: isReactNative ? 'flex' : 'inline-flex',
|
|
193
238
|
alignItems: "baseline",
|
|
194
239
|
flexDirection: "row",
|
|
195
|
-
|
|
240
|
+
position: "relative",
|
|
241
|
+
children: [currencyPosition === 'left' && /*#__PURE__*/jsx(BaseText, {
|
|
196
242
|
marginRight: "spacing.1",
|
|
197
|
-
fontWeight:
|
|
243
|
+
fontWeight: weight,
|
|
198
244
|
fontSize: currencyFontSize,
|
|
199
|
-
color:
|
|
245
|
+
color: amountValueColor,
|
|
200
246
|
as: isReactNative ? undefined : 'span',
|
|
201
|
-
|
|
247
|
+
opacity: isAffixSubtle ? opacity[8] : 1,
|
|
248
|
+
children: currencySymbolOrCode
|
|
202
249
|
}), /*#__PURE__*/jsx(AmountValue, {
|
|
203
250
|
value: renderedValue,
|
|
204
251
|
amountValueColor: amountValueColor,
|
|
252
|
+
type: type,
|
|
253
|
+
weight: weight,
|
|
205
254
|
size: size,
|
|
206
255
|
isAffixSubtle: isAffixSubtle,
|
|
207
|
-
suffix: suffix
|
|
208
|
-
|
|
256
|
+
suffix: suffix
|
|
257
|
+
}), currencyPosition === 'right' && /*#__PURE__*/jsx(BaseText, {
|
|
258
|
+
marginLeft: "spacing.1",
|
|
259
|
+
fontWeight: weight,
|
|
260
|
+
fontSize: currencyFontSize,
|
|
261
|
+
color: amountValueColor,
|
|
262
|
+
as: isReactNative ? undefined : 'span',
|
|
263
|
+
opacity: isAffixSubtle ? opacity[8] : 1,
|
|
264
|
+
children: currencySymbolOrCode
|
|
265
|
+
}), isStrikethrough && /*#__PURE__*/jsx(BaseBox
|
|
266
|
+
// @ts-expect-error - intentionally setting the border color to the color prop for this hacky strikethrough
|
|
267
|
+
, {
|
|
268
|
+
borderBottomColor: amountValueColor,
|
|
269
|
+
borderBottomWidth: type === 'body' ? 'thin' : 'thicker',
|
|
270
|
+
borderBottomStyle: "solid",
|
|
271
|
+
position: "absolute",
|
|
272
|
+
width: "100%",
|
|
273
|
+
top: "50%"
|
|
209
274
|
})]
|
|
210
275
|
})
|
|
211
276
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Amount.js","sources":["../../../../../../src/components/Amount/Amount.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React from 'react';\nimport type { Currency } from './amountTokens';\nimport {\n amountFontSizes,\n getCurrencyAbbreviations,\n currencyPrefixMapping,\n affixFontSizes,\n amountLineHeights,\n} from './amountTokens';\nimport { BaseText } from '~components/Typography/BaseText';\nimport type { Feedback } from '~tokens/theme/theme';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\n\ntype AmountProps = {\n /**\n * The value to be rendered within the component.\n *\n */\n value: number;\n /**\n * Sets the intent of the amount.\n *\n * @default undefined\n */\n intent?: Exclude<Feedback, 'neutral'>;\n /**\n * Sets the size of the amount.\n *\n * @default 'body-medium'\n */\n size?:\n | 'body-medium-bold'\n | 'body-small'\n | 'body-small-bold'\n | 'body-medium'\n | 'body-medium-bold'\n | 'heading-small'\n | 'heading-small-bold'\n | 'heading-large'\n | 'heading-large-bold'\n | 'title-small'\n | 'title-medium';\n /**\n * Indicates what the suffix of amount should be\n *\n * @default 'decimals'\n */\n suffix?: 'decimals' | 'none' | 'humanize';\n /**\n * Makes the prefix symbol and decimal digits small and faded\n *\n * @default true\n */\n isAffixSubtle?: true | false;\n /**\n * Prefix to be shown before the amount value. The prefix can be either a currency symbol or a currency code.\n *\n * @default 'currency-symbol'\n */\n prefix?: 'currency-symbol' | 'currency-code';\n /**\n * The currency of the amount. Note that this component\n * only displays the provided value in the specified currency, it does not perform any currency conversion.\n *\n * @default 'INR'\n * */\n currency?: Currency;\n} & TestID &\n StyledPropsBlade;\n\ntype ColorProps = {\n amountValueColor: BaseTextProps['color'];\n affixColor: BaseTextProps['color'];\n};\n\nconst getTextColorProps = ({ intent }: { intent: AmountProps['intent'] }): ColorProps => {\n const props: ColorProps = {\n amountValueColor: 'surface.text.normal.lowContrast',\n affixColor: 'surface.text.muted.lowContrast',\n };\n if (!intent) return props;\n props.amountValueColor = `feedback.text.${intent}.lowContrast`;\n props.affixColor = `feedback.text.${intent}.lowContrast`;\n return props;\n};\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n affixColor: BaseTextProps['color'];\n amountValueColor: BaseTextProps['color'];\n value: string;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n value,\n size,\n amountValueColor,\n isAffixSubtle,\n suffix,\n affixColor,\n}: AmountValue): ReactElement => {\n const affixFontWeight = isAffixSubtle ? 'regular' : 'bold';\n const isReactNative = getPlatformType() === 'react-native';\n const affixFontSize = isAffixSubtle ? affixFontSizes[size] : amountFontSizes[size];\n const valueForWeight = size.includes('bold') || size.startsWith('title') ? 'bold' : 'regular';\n if (suffix === 'decimals' && isAffixSubtle) {\n const integer = value.split('.')[0];\n const decimal = value.split('.')[1];\n\n // Native does not support alignItems of Text inside a div, insted we need to wrap is in a Text\n const AmountWrapper = getPlatformType() === 'react-native' ? BaseText : React.Fragment;\n\n return (\n <AmountWrapper>\n <BaseText\n fontSize={amountFontSizes[size]}\n fontWeight={valueForWeight}\n lineHeight={amountLineHeights[size]}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n >\n {integer}.\n </BaseText>\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={affixFontWeight}\n fontSize={affixFontSize}\n color={affixColor}\n as={isReactNative ? undefined : 'span'}\n >\n {decimal || '00'}\n </BaseText>\n </AmountWrapper>\n );\n }\n return (\n <BaseText\n fontSize={amountFontSizes[size]}\n fontWeight={valueForWeight}\n color={amountValueColor}\n lineHeight={amountLineHeights[size]}\n >\n {value}\n </BaseText>\n );\n};\n\n// This function rounds a number to a specified number of decimal places\n// and floors the result.\nexport const getFlooredFixed = (value: number, decimalPlaces: number): number => {\n const factor = 100 ** decimalPlaces;\n const roundedValue = Math.floor(value * factor) / factor;\n return Number(roundedValue.toFixed(decimalPlaces));\n};\n\nexport const addCommas = (amountValue: number, currency: Currency, decimalPlaces = 0): string => {\n // If the currency is 'INR', set the locale to 'en-IN' (Indian English).\n // Otherwise, set the locale to 'en-US' (U.S. English).\n const locale = currency === 'INR' ? 'en-IN' : 'en-US';\n return amountValue.toLocaleString(locale, { minimumFractionDigits: decimalPlaces });\n};\n/**\n * This function returns the humanized amount\n * ie: for INR 2000 => 2K\n * for MYR 2000000 => 2M\n */\nexport const getHumanizedAmount = (amountValue: number, currency: Currency): string => {\n const abbreviations = getCurrencyAbbreviations(currency);\n\n const abbreviation = abbreviations.find((abbr) => amountValue >= abbr.value);\n if (abbreviation) {\n amountValue = amountValue / abbreviation.value;\n const formattedAmountValue = getFlooredFixed(amountValue, 2);\n return addCommas(formattedAmountValue, currency) + abbreviation.symbol;\n } else {\n return amountValue.toString();\n }\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n currency: Currency;\n};\n\nexport const formatAmountWithSuffix = ({\n suffix,\n value,\n currency,\n}: FormatAmountWithSuffixType): string => {\n switch (suffix) {\n case 'decimals': {\n const decimalNumber = getFlooredFixed(value, 2);\n return addCommas(decimalNumber, currency, 2);\n }\n case 'humanize': {\n return getHumanizedAmount(value, currency);\n }\n case 'none': {\n return addCommas(getFlooredFixed(value, 0), currency);\n }\n default:\n return addCommas(getFlooredFixed(value, 0), currency);\n }\n};\n\nconst getCurrencyWeight = (\n isAffixSubtle: NonNullable<AmountProps['isAffixSubtle']>,\n size: NonNullable<AmountProps['size']>,\n): 'bold' | 'regular' => {\n if (isAffixSubtle || size.startsWith('bold')) return 'bold';\n return 'regular';\n};\n\nconst _Amount = ({\n value,\n suffix = 'decimals',\n size = 'body-medium',\n isAffixSubtle = true,\n intent,\n prefix = 'currency-symbol',\n testID,\n currency = 'INR',\n ...styledProps\n}: AmountProps): ReactElement => {\n if (__DEV__) {\n if (typeof value !== 'number') {\n throwBladeError({\n message: '`value` prop must be of type `number` for Amount.',\n moduleName: 'Amount',\n });\n }\n // @ts-expect-error neutral intent should throw error\n if (intent === 'neutral') {\n throwBladeError({\n message: '`neutral` intent is not supported.',\n moduleName: 'Amount',\n });\n }\n }\n\n const currencyPrefix = currencyPrefixMapping[currency][prefix];\n const renderedValue = formatAmountWithSuffix({ suffix, value, currency });\n const { amountValueColor, affixColor } = getTextColorProps({\n intent,\n });\n\n const currencyColor = isAffixSubtle ? affixColor : amountValueColor;\n const currencyFontSize = isAffixSubtle ? affixFontSizes[size] : amountFontSizes[size];\n const currencyWeight = getCurrencyWeight(isAffixSubtle, size);\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n >\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={currencyWeight}\n fontSize={currencyFontSize}\n color={currencyColor}\n as={isReactNative ? undefined : 'span'}\n >\n {currencyPrefix}\n </BaseText>\n <AmountValue\n value={renderedValue}\n amountValueColor={amountValueColor}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n affixColor={affixColor}\n />\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst Amount = assignWithoutSideEffects(_Amount, {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["getTextColorProps","_ref","intent","props","amountValueColor","affixColor","concat","AmountValue","_ref2","value","size","isAffixSubtle","suffix","affixFontWeight","isReactNative","getPlatformType","affixFontSize","affixFontSizes","amountFontSizes","valueForWeight","includes","startsWith","integer","split","decimal","AmountWrapper","BaseText","React","Fragment","_jsxs","children","fontSize","fontWeight","lineHeight","amountLineHeights","color","as","undefined","_jsx","marginLeft","getFlooredFixed","decimalPlaces","factor","Math","pow","roundedValue","floor","Number","toFixed","addCommas","amountValue","currency","arguments","length","locale","toLocaleString","minimumFractionDigits","getHumanizedAmount","abbreviations","getCurrencyAbbreviations","abbreviation","find","abbr","formattedAmountValue","symbol","toString","formatAmountWithSuffix","_ref3","decimalNumber","getCurrencyWeight","_Amount","_ref4","_ref4$suffix","_ref4$size","_ref4$isAffixSubtle","_ref4$prefix","prefix","testID","_ref4$currency","styledProps","_objectWithoutProperties","_excluded","throwBladeError","message","moduleName","currencyPrefix","currencyPrefixMapping","renderedValue","_getTextColorProps","currencyColor","currencyFontSize","currencyWeight","BaseBox","_objectSpread","display","metaAttribute","name","MetaConstants","Amount","getStyledProps","alignItems","flexDirection","marginRight","assignWithoutSideEffects","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAoFA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAAkE;AAAA,EAAA,IAA5DC,MAAM,GAAAD,IAA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AAA,EAAA;IAAAjD,QAAA,eAE/BD,IAAA,CAAC+D,OAAO,EAAA;AACNE,MAAAA,OAAO,EAAGhF,aAAa,GAAG,MAAM,GAAG,aAAwB;AAC3DsF,MAAAA,UAAU,EAAC,UAAU;AACrBC,MAAAA,aAAa,EAAC,KAAK;MAAAvE,QAAA,EAAA,cAEnBQ,GAAA,CAACZ,QAAQ,EAAA;AACP4E,QAAAA,WAAW,EAAC,WAAW;AACvBtE,QAAAA,UAAU,EAAE2D,cAAe;AAC3B5D,QAAAA,QAAQ,EAAE2D,gBAAiB;AAC3BvD,QAAAA,KAAK,EAAEsD,aAAc;AACrBrD,QAAAA,EAAE,EAAEtB,aAAa,GAAGuB,SAAS,GAAG,MAAO;AAAAP,QAAAA,QAAA,EAEtCuD,cAAAA;AAAc,OACP,CAAC,eACX/C,GAAA,CAAC/B,WAAW,EAAA;AACVE,QAAAA,KAAK,EAAE8E,aAAc;AACrBnF,QAAAA,gBAAgB,EAAEA,gBAAiB;AACnCM,QAAAA,IAAI,EAAEA,IAAK;AACXC,QAAAA,aAAa,EAAEA,aAAc;AAC7BC,QAAAA,MAAM,EAAEA,MAAO;AACfP,QAAAA,UAAU,EAAEA,UAAAA;AAAW,OACxB,CAAC,CAAA;KACK,CAAA;AAAC,GAAA,CACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAM6F,MAAM,gBAAGK,wBAAwB,CAACjC,OAAO,EAAE;AAC/CkC,EAAAA,WAAW,EAAE,QAAQ;AACrBC,EAAAA,WAAW,EAAE,QAAA;AACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"Amount.js","sources":["../../../../../../src/components/Amount/Amount.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React from 'react';\nimport type { AmountTypeProps, Currency } from './amountTokens';\nimport {\n normalAmountSizes,\n getCurrencyAbbreviations,\n currencyIndicatorMapping,\n subtleFontSizes,\n amountLineHeights,\n currencyPositionMapping,\n} from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport { objectKeysWithType } from '~utils/objectKeysWithType';\nimport { BaseText } from '~components/Typography/BaseText';\nimport { Text } from '~components/Typography';\nimport { opacity } from '~tokens/global';\nimport type { FontFamily } from '~tokens/global';\n\ntype AmountCommonProps = {\n /**\n * The value to be rendered within the component.\n *\n */\n value: number;\n /**\n * Sets the color of the amount.\n *\n * @default undefined\n */\n color?: BaseTextProps['color'];\n /**\n * Indicates what the suffix of amount should be\n *\n * @default 'decimals'\n */\n suffix?: 'decimals' | 'none' | 'humanize';\n /**\n * Makes the currency indicator(currency symbol/code) and decimal digits small and faded\n *\n * @default true\n */\n isAffixSubtle?: true | false;\n /**\n * Determines the visual representation of the currency, choose between displaying the currency symbol or code.\n *\n * @default 'currency-symbol'\n */\n currencyIndicator?: 'currency-symbol' | 'currency-code';\n /**\n * The currency of the amount. Note that this component\n * only displays the provided value in the specified currency, it does not perform any currency conversion.\n *\n * @default 'INR'\n * */\n currency?: Currency;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n} & TestID &\n StyledPropsBlade;\n\ntype ColorProps = {\n amountValueColor: BaseTextProps['color'];\n};\n\ntype AmountProps = AmountTypeProps & AmountCommonProps;\n\nconst getTextColorProps = ({ color }: { color: AmountProps['color'] }): ColorProps => {\n const props: ColorProps = {\n amountValueColor: 'surface.text.gray.normal',\n };\n if (!color) return props;\n props.amountValueColor = color;\n return props;\n};\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n value: string;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n value,\n size = 'medium',\n type = 'body',\n weight = 'regular',\n amountValueColor,\n isAffixSubtle,\n suffix,\n}: AmountValue): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n const affixFontSize = isAffixSubtle ? subtleFontSizes[type][size] : normalAmountSizes[type][size];\n const numberFontFamily: keyof FontFamily = type === 'body' ? 'text' : 'heading';\n if (suffix === 'decimals' && isAffixSubtle) {\n const integer = value.split('.')[0];\n const decimal = value.split('.')[1];\n\n // Native does not support alignItems of Text inside a div, instead we need to wrap is in a Text\n const AmountWrapper = isReactNative ? Text : React.Fragment;\n\n return (\n <AmountWrapper>\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n fontFamily={numberFontFamily}\n as={isReactNative ? undefined : 'span'}\n >\n {integer}\n </BaseText>\n <BaseText\n fontWeight={weight}\n fontSize={affixFontSize}\n fontFamily={numberFontFamily}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[8] : 1}\n >\n .{decimal || '00'}\n </BaseText>\n </AmountWrapper>\n );\n }\n return (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n fontFamily={numberFontFamily}\n color={amountValueColor}\n lineHeight={amountLineHeights[type][size]}\n >\n {value}\n </BaseText>\n );\n};\n\n// This function rounds a number to a specified number of decimal places\n// and floors the result.\nexport const getFlooredFixed = (value: number, decimalPlaces: number): number => {\n const factor = 100 ** decimalPlaces;\n const roundedValue = Math.floor(value * factor) / factor;\n return Number(roundedValue.toFixed(decimalPlaces));\n};\n\nexport const addCommas = (amountValue: number, currency: Currency, decimalPlaces = 0): string => {\n // If the currency is 'INR', set the locale to 'en-IN' (Indian English).\n // Otherwise, set the locale to 'en-US' (U.S. English).\n const locale = currency === 'INR' ? 'en-IN' : 'en-US';\n return amountValue.toLocaleString(locale, { minimumFractionDigits: decimalPlaces });\n};\n/**\n * This function returns the humanized amount\n * ie: for INR 2000 => 2K\n * for MYR 2000000 => 2M\n */\nexport const getHumanizedAmount = ({\n value,\n currency,\n denominationPosition = 'right',\n}: {\n value: number;\n currency: Currency;\n denominationPosition?: 'left' | 'right';\n}): string => {\n let amountValue = value;\n const abbreviations = getCurrencyAbbreviations(currency);\n const abbreviation = abbreviations.find((abbr) => amountValue >= abbr.value);\n\n if (abbreviation) {\n amountValue = amountValue / abbreviation.value;\n const formattedAmountValue = getFlooredFixed(amountValue, 2);\n\n if (denominationPosition === 'right') {\n return `${addCommas(formattedAmountValue, currency)}${abbreviation.symbol}`;\n }\n\n return `${abbreviation.symbol}${addCommas(formattedAmountValue, currency)}`;\n }\n\n return amountValue.toString();\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n currency: Currency;\n denominationPosition?: 'left' | 'right';\n};\n\nexport const formatAmountWithSuffix = ({\n suffix,\n value,\n currency,\n denominationPosition,\n}: FormatAmountWithSuffixType): string => {\n switch (suffix) {\n case 'decimals': {\n const decimalNumber = getFlooredFixed(value, 2);\n return addCommas(decimalNumber, currency, 2);\n }\n case 'humanize': {\n return getHumanizedAmount({ value, currency, denominationPosition });\n }\n case 'none': {\n return addCommas(getFlooredFixed(value, 0), currency);\n }\n default:\n return addCommas(getFlooredFixed(value, 0), currency);\n }\n};\n\nconst _Amount = ({\n value,\n suffix = 'decimals',\n type = 'body',\n size = 'medium',\n weight = 'regular',\n isAffixSubtle = true,\n isStrikethrough = false,\n color,\n currencyIndicator = 'currency-symbol',\n currency = 'INR',\n testID,\n ...styledProps\n}: AmountProps): ReactElement => {\n if (__DEV__) {\n if (typeof value !== 'number') {\n throwBladeError({\n message: '`value` prop must be of type `number` for Amount.',\n moduleName: 'Amount',\n });\n }\n // @ts-expect-error neutral color should throw error\n if (color === 'neutral') {\n throwBladeError({\n message: '`neutral` color is not supported.',\n moduleName: 'Amount',\n });\n }\n\n const bodySizes = objectKeysWithType(normalAmountSizes.body);\n if ((type === 'body' || !type) && !bodySizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"body\"`,\n moduleName: 'Amount',\n });\n }\n\n const displaySizes = objectKeysWithType(normalAmountSizes.display);\n if (type === 'display' && !displaySizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"display\"`,\n moduleName: 'Amount',\n });\n }\n\n const headingSizes = objectKeysWithType(normalAmountSizes.heading);\n if (type === 'heading' && !headingSizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"heading\"`,\n moduleName: 'Amount',\n });\n }\n }\n\n const currencySymbolOrCode = currencyIndicatorMapping[currency][currencyIndicator];\n const currencyPosition = currencyPositionMapping[currency] || 'left';\n const denominationPosition = currencyPosition === 'left' ? 'right' : 'left';\n const renderedValue = formatAmountWithSuffix({ suffix, value, currency, denominationPosition });\n const { amountValueColor } = getTextColorProps({\n color,\n });\n\n const currencyFontSize = isAffixSubtle\n ? subtleFontSizes[type][size]\n : normalAmountSizes[type][size];\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[8] : 1}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n value={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[8] : 1}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n <BaseBox\n // @ts-expect-error - intentionally setting the border color to the color prop for this hacky strikethrough\n borderBottomColor={amountValueColor}\n borderBottomWidth={type === 'body' ? 'thin' : 'thicker'}\n borderBottomStyle=\"solid\"\n position=\"absolute\"\n width=\"100%\"\n top=\"50%\"\n />\n )}\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst Amount = assignWithoutSideEffects(_Amount, {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["getTextColorProps","_ref","color","props","amountValueColor","AmountValue","_ref2","value","_ref2$size","size","_ref2$type","type","_ref2$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","integer","split","decimal","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","opacity","getFlooredFixed","decimalPlaces","factor","Math","pow","roundedValue","floor","Number","toFixed","addCommas","amountValue","currency","arguments","length","locale","toLocaleString","minimumFractionDigits","getHumanizedAmount","_ref3","_ref3$denominationPos","denominationPosition","abbreviations","getCurrencyAbbreviations","abbreviation","find","abbr","formattedAmountValue","concat","symbol","toString","formatAmountWithSuffix","_ref4","decimalNumber","_Amount","_ref5","_ref5$suffix","_ref5$type","_ref5$size","_ref5$weight","_ref5$isAffixSubtle","_ref5$isStrikethrough","isStrikethrough","_ref5$currencyIndicat","currencyIndicator","_ref5$currency","testID","styledProps","_objectWithoutProperties","_excluded","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","currencySymbolOrCode","currencyIndicatorMapping","currencyPosition","currencyPositionMapping","renderedValue","_getTextColorProps","currencyFontSize","BaseBox","_objectSpread","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","alignItems","position","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAAC,IAAA,EAA+D;AAAA,EAAA,IAAzDC,KAAK,GAAAD,IAAA,CAALC,KAAK,CAAA;AAChC,EAAA,IAAMC,KAAiB,GAAG;AACxBC,IAAAA,gBAAgB,EAAE,0BAAA;GACnB,CAAA;AACD,EAAA,IAAI,CAACF,KAAK,EAAE,OAAOC,KAAK,CAAA;EACxBA,KAAK,CAACC,gBAAgB,GAAGF,KAAK,CAAA;AAC9B,EAAA,OAAOC,KAAK,CAAA;AACd,CAAC,CAAA;AAQD,IAAME,WAAW,GAAG,SAAdA,WAAWA,CAAAC,KAAA,EAQgB;AAAA,EAAA,IAP/BC,KAAK,GAAAD,KAAA,CAALC,KAAK;IAAAC,UAAA,GAAAF,KAAA,CACLG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,UAAA;IAAAE,UAAA,GAAAJ,KAAA,CACfK,IAAI;AAAJA,IAAAA,IAAI,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,UAAA;IAAAE,YAAA,GAAAN,KAAA,CACbO,MAAM;AAANA,IAAAA,MAAM,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,YAAA;IAClBR,gBAAgB,GAAAE,KAAA,CAAhBF,gBAAgB;IAChBU,aAAa,GAAAR,KAAA,CAAbQ,aAAa;IACbC,MAAM,GAAAT,KAAA,CAANS,MAAM,CAAA;AAEN,EAAA,IAAMC,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC1D,EAAA,IAAMC,aAAa,GAAGJ,aAAa,GAAG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,GAAG,CAAE;AAAAV,QAAAA,QAAA,EAEvCuE,oBAAAA;AAAoB,OACb,CACX,EACAnB,eAAe,iBACdnD,GAAA,CAAC6E,OAAAA;AACC;AAAA,QAAA;AACAY,QAAAA,iBAAiB,EAAEpH,gBAAiB;AACpCqH,QAAAA,iBAAiB,EAAE9G,IAAI,KAAK,MAAM,GAAG,MAAM,GAAG,SAAU;AACxD+G,QAAAA,iBAAiB,EAAC,OAAO;AACzBL,QAAAA,QAAQ,EAAC,UAAU;AACnBM,QAAAA,KAAK,EAAC,MAAM;AACZC,QAAAA,GAAG,EAAC,KAAA;AAAK,OACV,CACF,CAAA;KACM,CAAA;AAAC,GAAA,CACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMV,MAAM,gBAAGW,wBAAwB,CAACnD,OAAO,EAAE;AAC/CoD,EAAAA,WAAW,EAAE,QAAQ;AACrBC,EAAAA,WAAW,EAAE,QAAA;AACf,CAAC;;;;"}
|
|
@@ -1,42 +1,69 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
var normalAmountSizes = {
|
|
2
|
+
body: {
|
|
3
|
+
xsmall: 25,
|
|
4
|
+
small: 75,
|
|
5
|
+
medium: 100,
|
|
6
|
+
large: 200
|
|
7
|
+
},
|
|
8
|
+
heading: {
|
|
9
|
+
small: 300,
|
|
10
|
+
medium: 400,
|
|
11
|
+
large: 500,
|
|
12
|
+
xlarge: 600,
|
|
13
|
+
'2xlarge': 700
|
|
14
|
+
},
|
|
15
|
+
display: {
|
|
16
|
+
small: 800,
|
|
17
|
+
medium: 900,
|
|
18
|
+
large: 1000,
|
|
19
|
+
xlarge: 1100
|
|
20
|
+
}
|
|
12
21
|
};
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
var subtleFontSizes = {
|
|
23
|
+
body: {
|
|
24
|
+
xsmall: normalAmountSizes.body.xsmall,
|
|
25
|
+
small: normalAmountSizes.body.xsmall,
|
|
26
|
+
medium: normalAmountSizes.body.xsmall,
|
|
27
|
+
large: normalAmountSizes.body.small
|
|
28
|
+
},
|
|
29
|
+
heading: {
|
|
30
|
+
small: normalAmountSizes.body.small,
|
|
31
|
+
medium: normalAmountSizes.body.medium,
|
|
32
|
+
large: normalAmountSizes.body.large,
|
|
33
|
+
xlarge: normalAmountSizes.heading.medium,
|
|
34
|
+
'2xlarge': normalAmountSizes.heading.large
|
|
35
|
+
},
|
|
36
|
+
display: {
|
|
37
|
+
small: normalAmountSizes.heading.xlarge,
|
|
38
|
+
medium: normalAmountSizes.heading['2xlarge'],
|
|
39
|
+
large: normalAmountSizes.heading['2xlarge'],
|
|
40
|
+
xlarge: normalAmountSizes.display.small
|
|
41
|
+
}
|
|
24
42
|
};
|
|
25
43
|
var amountLineHeights = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
body: {
|
|
45
|
+
xsmall: 25,
|
|
46
|
+
small: 75,
|
|
47
|
+
medium: 100,
|
|
48
|
+
large: 200
|
|
49
|
+
},
|
|
50
|
+
heading: {
|
|
51
|
+
small: 300,
|
|
52
|
+
medium: 400,
|
|
53
|
+
large: 500,
|
|
54
|
+
xlarge: 600,
|
|
55
|
+
'2xlarge': 700
|
|
56
|
+
},
|
|
57
|
+
display: {
|
|
58
|
+
small: 800,
|
|
59
|
+
medium: 900,
|
|
60
|
+
large: 1000,
|
|
61
|
+
xlarge: 1100
|
|
62
|
+
}
|
|
36
63
|
};
|
|
37
64
|
|
|
38
65
|
// All the supported currency codes are taken from Razorpay's Merchant Dashboard codebase
|
|
39
|
-
var
|
|
66
|
+
var currencyIndicatorMapping = {
|
|
40
67
|
AED: {
|
|
41
68
|
'currency-symbol': 'د.إ',
|
|
42
69
|
'currency-code': 'AED'
|
|
@@ -442,6 +469,12 @@ var getCurrencyAbbreviations = function getCurrencyAbbreviations(currency) {
|
|
|
442
469
|
symbol: 'K'
|
|
443
470
|
}];
|
|
444
471
|
};
|
|
472
|
+
var currencyPositionMapping = {
|
|
473
|
+
DZD: 'right',
|
|
474
|
+
BHD: 'right',
|
|
475
|
+
OMR: 'right',
|
|
476
|
+
KWD: 'right'
|
|
477
|
+
};
|
|
445
478
|
|
|
446
|
-
export {
|
|
479
|
+
export { amountLineHeights, currencyIndicatorMapping, currencyPositionMapping, getCurrencyAbbreviations, normalAmountSizes, subtleFontSizes };
|
|
447
480
|
//# sourceMappingURL=amountTokens.js.map
|