@razorpay/blade 12.96.6 → 12.97.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.
Files changed (27) hide show
  1. package/build/lib/native/components/Amount/Amount.js +1 -1
  2. package/build/lib/native/components/Amount/Amount.js.map +1 -1
  3. package/build/lib/web/development/_virtual/cloneDeep.js +1 -1
  4. package/build/lib/web/development/_virtual/cloneDeep3.js +1 -1
  5. package/build/lib/web/development/_virtual/flatten.js +1 -1
  6. package/build/lib/web/development/_virtual/flatten3.js +1 -1
  7. package/build/lib/web/development/components/Amount/Amount.js +7 -4
  8. package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
  9. package/build/lib/web/development/node_modules/es-toolkit/dist/array/flatten.js +1 -1
  10. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/array/flatten.js +1 -1
  11. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
  12. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
  13. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/object/omit.js +2 -2
  14. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matches.js +2 -2
  15. package/build/lib/web/development/node_modules/es-toolkit/dist/compat/predicate/matchesProperty.js +2 -2
  16. package/build/lib/web/development/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
  17. package/build/lib/web/production/_virtual/flatten.js +1 -1
  18. package/build/lib/web/production/_virtual/flatten3.js +1 -1
  19. package/build/lib/web/production/components/Amount/Amount.js +7 -4
  20. package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
  21. package/build/lib/web/production/node_modules/es-toolkit/dist/array/flatten.js +1 -1
  22. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/array/flatten.js +1 -1
  23. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/array/sortBy.js +2 -2
  24. package/build/lib/web/production/node_modules/es-toolkit/dist/compat/object/omit.js +2 -2
  25. package/build/types/components/index.d.ts +4 -1
  26. package/build/types/components/index.native.d.ts +4 -1
  27. package/package.json +1 -1
@@ -29,7 +29,7 @@ import 'react-native-gesture-handler';
29
29
  import '../BottomSheet/BottomSheetStack.js';
30
30
  import { jsx, jsxs } from 'react/jsx-runtime';
31
31
 
32
- var _excluded=["value","suffix","type","size","weight","isAffixSubtle","isStrikethrough","color","currencyIndicator","currency","fractionDigits","testID"];var stripTrailingZerosFromParts=function stripTrailingZerosFromParts(parts){var decimalPart=parts.rawParts.filter(function(_ref){var type=_ref.type;return type==='fraction';}).map(function(_ref2){var value=_ref2.value;return value;}).join('');var hasFraction=parts.rawParts.some(function(_ref3){var type=_ref3.type;return type==='fraction';});if(hasFraction&&/^0+$/.test(decimalPart)){delete parts.decimal;delete parts.fraction;parts.rawParts=parts.rawParts.filter(function(_ref4){var type=_ref4.type;return type!=='decimal'&&type!=='fraction';});}return parts;};var pollyfilledFormatNumberByParts=function pollyfilledFormatNumberByParts(value,options){var _options$intlOptions;var parts=formatNumberByParts(value,options);if((options==null?void 0:(_options$intlOptions=options.intlOptions)==null?void 0:_options$intlOptions.trailingZeroDisplay)==='stripIfInteger'){return stripTrailingZerosFromParts(parts);}return parts;};var getTextColorProps=function getTextColorProps(_ref5){var color=_ref5.color;var props={amountValueColor:'surface.text.gray.normal'};if(!color)return props;props.amountValueColor=color;return props;};var AmountValue=function AmountValue(_ref6){var amount=_ref6.amount,_ref6$size=_ref6.size,size=_ref6$size===void 0?'medium':_ref6$size,_ref6$type=_ref6.type,type=_ref6$type===void 0?'body':_ref6$type,_ref6$weight=_ref6.weight,weight=_ref6$weight===void 0?'regular':_ref6$weight,amountValueColor=_ref6.amountValueColor,isAffixSubtle=_ref6.isAffixSubtle,suffix=_ref6.suffix;var isReactNative=getPlatformType()==='react-native';var affixFontSize=isAffixSubtle?subtleFontSizes[type][size]:normalAmountSizes[type][size];var numberFontFamily=type==='body'?'text':'heading';if(suffix==='decimals'&&isAffixSubtle){var AmountWrapper=isReactNative?Text:React__default.Fragment;return jsxs(AmountWrapper,{children:[jsx(BaseText,{fontSize:normalAmountSizes[type][size],fontWeight:weight,lineHeight:amountLineHeights[type][size],color:amountValueColor,fontFamily:numberFontFamily,as:isReactNative?undefined:'span',children:amount.integer}),jsxs(BaseText,{fontWeight:weight,fontSize:affixFontSize,fontFamily:numberFontFamily,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[800]:1,children:[amount.decimal,amount.fraction]})]});}return jsxs(BaseText,{fontSize:normalAmountSizes[type][size],fontWeight:weight,fontFamily:numberFontFamily,color:amountValueColor,lineHeight:amountLineHeights[type][size],children:[amount.integer,amount.decimal,amount.fraction,amount.compact]});};var getAmountByParts=function getAmountByParts(_ref7){var suffix=_ref7.suffix,value=_ref7.value,currency=_ref7.currency,_ref7$fractionDigits=_ref7.fractionDigits,fractionDigits=_ref7$fractionDigits===void 0?2:_ref7$fractionDigits;try{switch(suffix){case'decimals':{var options={intlOptions:{maximumFractionDigits:fractionDigits,minimumFractionDigits:fractionDigits},currency:currency};return pollyfilledFormatNumberByParts(value,options);}case'humanize':{var _options={intlOptions:{notation:'compact',maximumFractionDigits:2,trailingZeroDisplay:'stripIfInteger'},currency:currency};return pollyfilledFormatNumberByParts(value,_options);}default:{var _options2={intlOptions:{maximumFractionDigits:0,roundingMode:'floor'},currency:currency};return pollyfilledFormatNumberByParts(value,_options2);}}}catch(err){return {integer:`${value}`,currency:currency};}};var _Amount=function _Amount(_ref8,ref){var _renderedValue$isPref,_renderedValue$curren;var value=_ref8.value,_ref8$suffix=_ref8.suffix,suffix=_ref8$suffix===void 0?'decimals':_ref8$suffix,_ref8$type=_ref8.type,type=_ref8$type===void 0?'body':_ref8$type,_ref8$size=_ref8.size,size=_ref8$size===void 0?'medium':_ref8$size,_ref8$weight=_ref8.weight,weight=_ref8$weight===void 0?'regular':_ref8$weight,_ref8$isAffixSubtle=_ref8.isAffixSubtle,isAffixSubtle=_ref8$isAffixSubtle===void 0?true:_ref8$isAffixSubtle,_ref8$isStrikethrough=_ref8.isStrikethrough,isStrikethrough=_ref8$isStrikethrough===void 0?false:_ref8$isStrikethrough,color=_ref8.color,_ref8$currencyIndicat=_ref8.currencyIndicator,currencyIndicator=_ref8$currencyIndicat===void 0?'currency-symbol':_ref8$currencyIndicat,_ref8$currency=_ref8.currency,currency=_ref8$currency===void 0?'INR':_ref8$currency,_ref8$fractionDigits=_ref8.fractionDigits,fractionDigits=_ref8$fractionDigits===void 0?2:_ref8$fractionDigits,testID=_ref8.testID,rest=_objectWithoutProperties(_ref8,_excluded);if(__DEV__){if(typeof value!=='number'){throwBladeError({message:'`value` prop must be of type `number` for Amount.',moduleName:'Amount'});}if(color==='neutral'){throwBladeError({message:'`neutral` color is not supported.',moduleName:'Amount'});}var bodySizes=objectKeysWithType(normalAmountSizes.body);if((type==='body'||!type)&&!bodySizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="body"`,moduleName:'Amount'});}var displaySizes=objectKeysWithType(normalAmountSizes.display);if(type==='display'&&!displaySizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="display"`,moduleName:'Amount'});}var headingSizes=objectKeysWithType(normalAmountSizes.heading);if(type==='heading'&&!headingSizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="heading"`,moduleName:'Amount'});}}var _getTextColorProps=getTextColorProps({color:color}),amountValueColor=_getTextColorProps.amountValueColor;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isDesktop=matchedDeviceType==='desktop';var renderedValue=getAmountByParts({suffix:suffix,value:value,currency:currency,fractionDigits:fractionDigits});var isPrefixSymbol=(_renderedValue$isPref=renderedValue.isPrefixSymbol)!=null?_renderedValue$isPref:true;var currencySymbol=(_renderedValue$curren=renderedValue.currency)!=null?_renderedValue$curren:currency;var currencyPosition=isPrefixSymbol?'left':'right';var currencySymbolOrCode=currencyIndicator==='currency-symbol'?currencySymbol:currency;var getCurrencyFontProps=function getCurrencyFontProps(){if(isAffixSubtle){return {fontSize:subtleFontSizes[type][size],style:undefined};}if(type==='body'){return {fontSize:normalAmountSizes[type][size],style:undefined};}var hardcodedSize=currencyHardcodedSizes[type][size];return {fontSize:normalAmountSizes[type][size],style:hardcodedSize?{fontSize:`${hardcodedSize[isDesktop?'desktop':'mobile']}px`}:undefined};};var currencyFontProps=getCurrencyFontProps();var isReactNative=getPlatformType()==='react-native';return jsx(BaseBox,Object.assign({ref:ref,display:isReactNative?'flex':'inline-flex',flexDirection:"row"},metaAttribute({name:MetaConstants.Amount,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsxs(BaseBox,{display:isReactNative?'flex':'inline-flex',alignItems:"baseline",flexDirection:"row",position:"relative",children:[renderedValue.minusSign?jsx(BaseText,{fontSize:normalAmountSizes[type][size],fontWeight:weight,lineHeight:amountLineHeights[type][size],color:amountValueColor,as:isReactNative?undefined:'span',marginX:"spacing.2",children:renderedValue.minusSign}):null,currencyPosition==='left'&&jsx(BaseText,{marginRight:"spacing.1",fontWeight:weight,fontSize:currencyFontProps.fontSize,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[800]:1,style:currencyFontProps.style,children:currencySymbolOrCode}),jsx(AmountValue,{amount:renderedValue,amountValueColor:amountValueColor,type:type,weight:weight,size:size,isAffixSubtle:isAffixSubtle,suffix:suffix,currency:currency}),currencyPosition==='right'&&jsx(BaseText,{marginLeft:"spacing.1",fontWeight:weight,fontSize:currencyFontProps.fontSize,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[800]:1,style:currencyFontProps.style,children:currencySymbolOrCode}),isStrikethrough&&jsx(BaseBox,{borderBottomColor:amountValueColor,borderBottomWidth:type==='body'?'thin':'thicker',borderBottomStyle:"solid",position:"absolute",width:"100%",top:"50%"})]})}));};var Amount=assignWithoutSideEffects(React__default.forwardRef(_Amount),{displayName:'Amount',componentId:'Amount'});
32
+ var _excluded=["value","suffix","type","size","weight","isAffixSubtle","isStrikethrough","color","currencyIndicator","currency","fractionDigits","testID"];var stripTrailingZerosFromParts=function stripTrailingZerosFromParts(parts){var decimalPart=parts.rawParts.filter(function(_ref){var type=_ref.type;return type==='fraction';}).map(function(_ref2){var value=_ref2.value;return value;}).join('');var hasFraction=parts.rawParts.some(function(_ref3){var type=_ref3.type;return type==='fraction';});if(hasFraction&&/^0+$/.test(decimalPart)){delete parts.decimal;delete parts.fraction;parts.rawParts=parts.rawParts.filter(function(_ref4){var type=_ref4.type;return type!=='decimal'&&type!=='fraction';});}return parts;};var pollyfilledFormatNumberByParts=function pollyfilledFormatNumberByParts(value,options){var _options$intlOptions;var parts=formatNumberByParts(value,options);if((options==null?void 0:(_options$intlOptions=options.intlOptions)==null?void 0:_options$intlOptions.trailingZeroDisplay)==='stripIfInteger'){return stripTrailingZerosFromParts(parts);}return parts;};var getTextColorProps=function getTextColorProps(_ref5){var color=_ref5.color;var props={amountValueColor:'surface.text.gray.normal'};if(!color)return props;props.amountValueColor=color;return props;};var AmountValue=function AmountValue(_ref6){var amount=_ref6.amount,_ref6$size=_ref6.size,size=_ref6$size===void 0?'medium':_ref6$size,_ref6$type=_ref6.type,type=_ref6$type===void 0?'body':_ref6$type,_ref6$weight=_ref6.weight,weight=_ref6$weight===void 0?'regular':_ref6$weight,amountValueColor=_ref6.amountValueColor,isAffixSubtle=_ref6.isAffixSubtle,suffix=_ref6.suffix;var isReactNative=getPlatformType()==='react-native';var affixFontSize=isAffixSubtle?subtleFontSizes[type][size]:normalAmountSizes[type][size];var numberFontFamily=type==='body'?'text':'heading';if(suffix==='decimals'&&isAffixSubtle){var AmountWrapper=isReactNative?Text:React__default.Fragment;return jsxs(AmountWrapper,{children:[jsx(BaseText,{fontSize:normalAmountSizes[type][size],fontWeight:weight,lineHeight:amountLineHeights[type][size],color:amountValueColor,fontFamily:numberFontFamily,as:isReactNative?undefined:'span',children:amount.integer}),jsxs(BaseText,{fontWeight:weight,fontSize:affixFontSize,fontFamily:numberFontFamily,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[800]:1,children:[amount.decimal,amount.fraction]})]});}return jsxs(BaseText,{fontSize:normalAmountSizes[type][size],fontWeight:weight,fontFamily:numberFontFamily,color:amountValueColor,lineHeight:amountLineHeights[type][size],children:[amount.integer,amount.decimal,amount.fraction,amount.compact]});};var getAmountByParts=function getAmountByParts(_ref7){var suffix=_ref7.suffix,value=_ref7.value,currency=_ref7.currency,_ref7$fractionDigits=_ref7.fractionDigits,fractionDigits=_ref7$fractionDigits===void 0?2:_ref7$fractionDigits;try{switch(suffix){case'decimals':{var intlOptions=fractionDigits==='auto'?{style:'currency'}:{maximumFractionDigits:fractionDigits,minimumFractionDigits:fractionDigits};var options={intlOptions:intlOptions,currency:currency};return pollyfilledFormatNumberByParts(value,options);}case'humanize':{var _options={intlOptions:{notation:'compact',maximumFractionDigits:2,trailingZeroDisplay:'stripIfInteger'},currency:currency};return pollyfilledFormatNumberByParts(value,_options);}default:{var _options2={intlOptions:{maximumFractionDigits:0,roundingMode:'floor'},currency:currency};return pollyfilledFormatNumberByParts(value,_options2);}}}catch(err){return {integer:`${value}`,currency:currency};}};var _Amount=function _Amount(_ref8,ref){var _renderedValue$isPref,_renderedValue$curren;var value=_ref8.value,_ref8$suffix=_ref8.suffix,suffix=_ref8$suffix===void 0?'decimals':_ref8$suffix,_ref8$type=_ref8.type,type=_ref8$type===void 0?'body':_ref8$type,_ref8$size=_ref8.size,size=_ref8$size===void 0?'medium':_ref8$size,_ref8$weight=_ref8.weight,weight=_ref8$weight===void 0?'regular':_ref8$weight,_ref8$isAffixSubtle=_ref8.isAffixSubtle,isAffixSubtle=_ref8$isAffixSubtle===void 0?true:_ref8$isAffixSubtle,_ref8$isStrikethrough=_ref8.isStrikethrough,isStrikethrough=_ref8$isStrikethrough===void 0?false:_ref8$isStrikethrough,color=_ref8.color,_ref8$currencyIndicat=_ref8.currencyIndicator,currencyIndicator=_ref8$currencyIndicat===void 0?'currency-symbol':_ref8$currencyIndicat,_ref8$currency=_ref8.currency,currency=_ref8$currency===void 0?'INR':_ref8$currency,_ref8$fractionDigits=_ref8.fractionDigits,fractionDigits=_ref8$fractionDigits===void 0?2:_ref8$fractionDigits,testID=_ref8.testID,rest=_objectWithoutProperties(_ref8,_excluded);if(__DEV__){if(typeof value!=='number'){throwBladeError({message:'`value` prop must be of type `number` for Amount.',moduleName:'Amount'});}if(color==='neutral'){throwBladeError({message:'`neutral` color is not supported.',moduleName:'Amount'});}var bodySizes=objectKeysWithType(normalAmountSizes.body);if((type==='body'||!type)&&!bodySizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="body"`,moduleName:'Amount'});}var displaySizes=objectKeysWithType(normalAmountSizes.display);if(type==='display'&&!displaySizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="display"`,moduleName:'Amount'});}var headingSizes=objectKeysWithType(normalAmountSizes.heading);if(type==='heading'&&!headingSizes.includes(size)){throwBladeError({message:`size="${size}" is not allowed with type="heading"`,moduleName:'Amount'});}}var _getTextColorProps=getTextColorProps({color:color}),amountValueColor=_getTextColorProps.amountValueColor;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isDesktop=matchedDeviceType==='desktop';var renderedValue=getAmountByParts({suffix:suffix,value:value,currency:currency,fractionDigits:fractionDigits});var isPrefixSymbol=(_renderedValue$isPref=renderedValue.isPrefixSymbol)!=null?_renderedValue$isPref:true;var currencySymbol=(_renderedValue$curren=renderedValue.currency)!=null?_renderedValue$curren:currency;var currencyPosition=isPrefixSymbol?'left':'right';var currencySymbolOrCode=currencyIndicator==='currency-symbol'?currencySymbol:currency;var getCurrencyFontProps=function getCurrencyFontProps(){if(isAffixSubtle){return {fontSize:subtleFontSizes[type][size],style:undefined};}if(type==='body'){return {fontSize:normalAmountSizes[type][size],style:undefined};}var hardcodedSize=currencyHardcodedSizes[type][size];return {fontSize:normalAmountSizes[type][size],style:hardcodedSize?{fontSize:`${hardcodedSize[isDesktop?'desktop':'mobile']}px`}:undefined};};var currencyFontProps=getCurrencyFontProps();var isReactNative=getPlatformType()==='react-native';return jsx(BaseBox,Object.assign({ref:ref,display:isReactNative?'flex':'inline-flex',flexDirection:"row"},metaAttribute({name:MetaConstants.Amount,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsxs(BaseBox,{display:isReactNative?'flex':'inline-flex',alignItems:"baseline",flexDirection:"row",position:"relative",children:[renderedValue.minusSign?jsx(BaseText,{fontSize:normalAmountSizes[type][size],fontWeight:weight,lineHeight:amountLineHeights[type][size],color:amountValueColor,as:isReactNative?undefined:'span',marginX:"spacing.2",children:renderedValue.minusSign}):null,currencyPosition==='left'&&jsx(BaseText,{marginRight:"spacing.1",fontWeight:weight,fontSize:currencyFontProps.fontSize,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[800]:1,style:currencyFontProps.style,children:currencySymbolOrCode}),jsx(AmountValue,{amount:renderedValue,amountValueColor:amountValueColor,type:type,weight:weight,size:size,isAffixSubtle:isAffixSubtle,suffix:suffix,currency:currency}),currencyPosition==='right'&&jsx(BaseText,{marginLeft:"spacing.1",fontWeight:weight,fontSize:currencyFontProps.fontSize,color:amountValueColor,as:isReactNative?undefined:'span',opacity:isAffixSubtle?opacity[800]:1,style:currencyFontProps.style,children:currencySymbolOrCode}),isStrikethrough&&jsx(BaseBox,{borderBottomColor:amountValueColor,borderBottomWidth:type==='body'?'thin':'thicker',borderBottomStyle:"solid",position:"absolute",width:"100%",top:"50%"})]})}));};var Amount=assignWithoutSideEffects(React__default.forwardRef(_Amount),{displayName:'Amount',componentId:'Amount'});
33
33
 
34
34
  export { Amount, getAmountByParts };
35
35
  //# sourceMappingURL=Amount.js.map
@@ -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 { CurrencyCodeType } from '@razorpay/i18nify-js/currency';\nimport { formatNumberByParts } from '@razorpay/i18nify-js/currency';\nimport type { AmountTypeProps } from './amountTokens';\nimport {\n normalAmountSizes,\n subtleFontSizes,\n currencyHardcodedSizes,\n amountLineHeights,\n} from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, BladeElementRef, 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, FontSize } from '~tokens/global';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useTheme } from '~components/BladeProvider';\nimport { useBreakpoint } from '~utils/useBreakpoint';\n\n/**\n * Pollyfill function to get around the node 18 error\n *\n * This function is maintained by i18nify team. Reach out to them for any change regarding this.\n */\nconst stripTrailingZerosFromParts = (\n parts: ReturnType<typeof formatNumberByParts>,\n): ReturnType<typeof formatNumberByParts> => {\n const decimalPart = parts.rawParts\n .filter(({ type }) => type === 'fraction')\n .map(({ value }) => value)\n .join('');\n\n const hasFraction = parts.rawParts.some(({ type }) => type === 'fraction');\n\n if (hasFraction && /^0+$/.test(decimalPart)) {\n delete parts.decimal;\n delete parts.fraction;\n parts.rawParts = parts.rawParts.filter(({ type }) => type !== 'decimal' && type !== 'fraction');\n }\n\n return parts;\n};\n\n/**\n * Wrapper that uses pollyfill of i18nify team\n */\nconst pollyfilledFormatNumberByParts: typeof formatNumberByParts = (value, options) => {\n const parts = formatNumberByParts(value, options);\n\n if (options?.intlOptions?.trailingZeroDisplay === 'stripIfInteger') {\n return stripTrailingZerosFromParts(parts);\n }\n\n return parts;\n};\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 * Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.\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?: CurrencyCodeType;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n /**\n * Controls the number of decimal places to display when suffix is 'decimals'.\n *\n * @default 2\n */\n fractionDigits?: number;\n} & TestID &\n DataAnalyticsAttribute &\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\ntype AmountType = Partial<ReturnType<typeof formatNumberByParts>>;\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n amount: AmountType;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n amount,\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 // 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 {amount.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[800] : 1}\n >\n {amount.decimal}\n {amount.fraction}\n </BaseText>\n </AmountWrapper>\n );\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 {amount.integer}\n {amount.decimal}\n {amount.fraction}\n {amount.compact}\n </BaseText>\n );\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n currency: AmountProps['currency'];\n fractionDigits?: number;\n};\n\n/**\n * Returns a parsed object based on the suffix passed in parameters\n * === Logic ===\n * value = 12500.45 \n * if suffix === 'decimals' => {\n \"integer\": \"12,500\",\n \"decimal\": \".\",\n \"fraction\": \"45\",\n \"compact\": \"K\",\n \"isPrefixSymbol\": false,\n \"rawParts\": [{\"type\": \"integer\",\"value\": \"12\"},{\"type\": \"group\",\"value\": \",\"},{\"type\": \"integer\",\"value\": \"500\"},{\"type\": \"decimal\",\"value\": \".\"},{\"type\": \"fraction\",\"value\": \"45\"}]\n}\n * @returns {AmountType}\n */\nexport const getAmountByParts = ({\n suffix,\n value,\n currency,\n fractionDigits = 2,\n}: FormatAmountWithSuffixType): AmountType => {\n try {\n switch (suffix) {\n case 'decimals': {\n const options = {\n intlOptions: {\n maximumFractionDigits: fractionDigits,\n minimumFractionDigits: fractionDigits,\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n case 'humanize': {\n const options = {\n intlOptions: {\n notation: 'compact',\n maximumFractionDigits: 2,\n trailingZeroDisplay: 'stripIfInteger',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n\n default: {\n const options = {\n intlOptions: {\n maximumFractionDigits: 0,\n roundingMode: 'floor',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n }\n } catch (err: unknown) {\n return {\n integer: `${value}`,\n currency,\n };\n }\n};\n\nconst _Amount = (\n {\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 fractionDigits = 2,\n testID,\n ...rest\n }: AmountProps,\n ref: React.Ref<BladeElementRef>,\n): 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 { amountValueColor } = getTextColorProps({\n color,\n });\n\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isDesktop = matchedDeviceType === 'desktop';\n\n const renderedValue = getAmountByParts({ suffix, value, currency, fractionDigits });\n const isPrefixSymbol = renderedValue.isPrefixSymbol ?? true;\n const currencySymbol = renderedValue.currency ?? currency;\n\n const currencyPosition = isPrefixSymbol ? 'left' : 'right';\n const currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;\n\n // Get currency font size - use subtle sizes when isAffixSubtle.\n // For non-subtle, body uses corresponding body token sizes while heading/display use hardcoded sizes.\n const getCurrencyFontProps = (): {\n fontSize: keyof FontSize | undefined;\n style: { fontSize: string } | undefined;\n } => {\n if (isAffixSubtle) {\n return {\n fontSize: subtleFontSizes[type][size],\n style: undefined,\n };\n }\n\n if (type === 'body') {\n return {\n fontSize: normalAmountSizes[type][size],\n style: undefined,\n };\n }\n\n const hardcodedSize = currencyHardcodedSizes[type][size];\n return {\n fontSize: normalAmountSizes[type][size], // Fallback for token-based rendering\n style: hardcodedSize\n ? { fontSize: `${hardcodedSize[isDesktop ? 'desktop' : 'mobile']}px` }\n : undefined,\n };\n };\n\n const currencyFontProps = getCurrencyFontProps();\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {renderedValue.minusSign ? (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n marginX=\"spacing.2\"\n >\n {renderedValue.minusSign}\n </BaseText>\n ) : null}\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n amount={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n currency={currency}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: the borderBottomColor error below is thrown here as well\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore- 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(React.forwardRef(_Amount), {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["stripTrailingZerosFromParts","parts","decimalPart","rawParts","filter","_ref","type","map","_ref2","value","join","hasFraction","some","_ref3","test","decimal","fraction","_ref4","pollyfilledFormatNumberByParts","options","_options$intlOptions","formatNumberByParts","intlOptions","trailingZeroDisplay","getTextColorProps","_ref5","color","props","amountValueColor","AmountValue","_ref6","amount","_ref6$size","size","_ref6$type","_ref6$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","integer","opacity","compact","getAmountByParts","_ref7","currency","_ref7$fractionDigits","fractionDigits","maximumFractionDigits","minimumFractionDigits","notation","roundingMode","err","_Amount","_ref8","ref","_renderedValue$isPref","_renderedValue$curren","_ref8$suffix","_ref8$type","_ref8$size","_ref8$weight","_ref8$isAffixSubtle","_ref8$isStrikethrough","isStrikethrough","_ref8$currencyIndicat","currencyIndicator","_ref8$currency","_ref8$fractionDigits","testID","rest","_objectWithoutProperties","_excluded","__DEV__","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","_getTextColorProps","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isDesktop","renderedValue","isPrefixSymbol","currencySymbol","currencyPosition","currencySymbolOrCode","getCurrencyFontProps","style","hardcodedSize","currencyHardcodedSizes","currencyFontProps","BaseBox","Object","assign","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","makeAnalyticsAttribute","alignItems","position","minusSign","marginX","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2JAkCA,IAAMA,2BAA2B,CAAG,SAA9BA,2BAA2BA,CAC/BC,KAA6C,CACF,CAC3C,IAAMC,WAAW,CAAGD,KAAK,CAACE,QAAQ,CAC/BC,MAAM,CAAC,SAAAC,IAAA,CAAG,CAAA,IAAAC,IAAI,CAAAD,IAAA,CAAJC,IAAI,C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,OAAO,CAAA,CAGNgB,iBAAiB,CAAEhH,gBAAiB,CACpCiH,iBAAiB,CAAEvI,IAAI,GAAK,MAAM,CAAG,MAAM,CAAG,SAAU,CACxDwI,iBAAiB,CAAC,OAAO,CACzBP,QAAQ,CAAC,UAAU,CACnBQ,KAAK,CAAC,MAAM,CACZC,GAAG,CAAC,KAAK,CACV,CACF,CACM,CAAA,CAAC,CACH,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAb,MAAM,CAAGc,wBAAwB,CAAClG,cAAK,CAACmG,UAAU,CAACzE,OAAO,CAAC,CAAE,CACjE0E,WAAW,CAAE,QAAQ,CACrBC,WAAW,CAAE,QACf,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 { CurrencyCodeType } from '@razorpay/i18nify-js/currency';\nimport { formatNumberByParts } from '@razorpay/i18nify-js/currency';\nimport type { AmountTypeProps } from './amountTokens';\nimport {\n normalAmountSizes,\n subtleFontSizes,\n currencyHardcodedSizes,\n amountLineHeights,\n} from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, BladeElementRef, 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, FontSize } from '~tokens/global';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useTheme } from '~components/BladeProvider';\nimport { useBreakpoint } from '~utils/useBreakpoint';\n\n/**\n * Pollyfill function to get around the node 18 error\n *\n * This function is maintained by i18nify team. Reach out to them for any change regarding this.\n */\nconst stripTrailingZerosFromParts = (\n parts: ReturnType<typeof formatNumberByParts>,\n): ReturnType<typeof formatNumberByParts> => {\n const decimalPart = parts.rawParts\n .filter(({ type }) => type === 'fraction')\n .map(({ value }) => value)\n .join('');\n\n const hasFraction = parts.rawParts.some(({ type }) => type === 'fraction');\n\n if (hasFraction && /^0+$/.test(decimalPart)) {\n delete parts.decimal;\n delete parts.fraction;\n parts.rawParts = parts.rawParts.filter(({ type }) => type !== 'decimal' && type !== 'fraction');\n }\n\n return parts;\n};\n\n/**\n * Wrapper that uses pollyfill of i18nify team\n */\nconst pollyfilledFormatNumberByParts: typeof formatNumberByParts = (value, options) => {\n const parts = formatNumberByParts(value, options);\n\n if (options?.intlOptions?.trailingZeroDisplay === 'stripIfInteger') {\n return stripTrailingZerosFromParts(parts);\n }\n\n return parts;\n};\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 * Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.\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?: CurrencyCodeType;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n /**\n * Controls the number of decimal places to display when suffix is 'decimals'.\n *\n * Set to `'auto'` to automatically determine decimal places based on the currency\n * (e.g. JPY → 0 decimals, INR → 2 decimals, KWD → 3 decimals).\n *\n * @default 2\n */\n fractionDigits?: number | 'auto';\n} & TestID &\n DataAnalyticsAttribute &\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\ntype AmountType = Partial<ReturnType<typeof formatNumberByParts>>;\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n amount: AmountType;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n amount,\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 // 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 {amount.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[800] : 1}\n >\n {amount.decimal}\n {amount.fraction}\n </BaseText>\n </AmountWrapper>\n );\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 {amount.integer}\n {amount.decimal}\n {amount.fraction}\n {amount.compact}\n </BaseText>\n );\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n currency: AmountProps['currency'];\n fractionDigits?: number | 'auto';\n};\n\n/**\n * Returns a parsed object based on the suffix passed in parameters\n * === Logic ===\n * value = 12500.45 \n * if suffix === 'decimals' => {\n \"integer\": \"12,500\",\n \"decimal\": \".\",\n \"fraction\": \"45\",\n \"compact\": \"K\",\n \"isPrefixSymbol\": false,\n \"rawParts\": [{\"type\": \"integer\",\"value\": \"12\"},{\"type\": \"group\",\"value\": \",\"},{\"type\": \"integer\",\"value\": \"500\"},{\"type\": \"decimal\",\"value\": \".\"},{\"type\": \"fraction\",\"value\": \"45\"}]\n}\n * @returns {AmountType}\n */\nexport const getAmountByParts = ({\n suffix,\n value,\n currency,\n fractionDigits = 2,\n}: FormatAmountWithSuffixType): AmountType => {\n try {\n switch (suffix) {\n case 'decimals': {\n const intlOptions =\n fractionDigits === 'auto'\n ? { style: 'currency' }\n : {\n maximumFractionDigits: fractionDigits,\n minimumFractionDigits: fractionDigits,\n };\n const options = {\n intlOptions,\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n case 'humanize': {\n const options = {\n intlOptions: {\n notation: 'compact',\n maximumFractionDigits: 2,\n trailingZeroDisplay: 'stripIfInteger',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n\n default: {\n const options = {\n intlOptions: {\n maximumFractionDigits: 0,\n roundingMode: 'floor',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n }\n } catch (err: unknown) {\n return {\n integer: `${value}`,\n currency,\n };\n }\n};\n\nconst _Amount = (\n {\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 fractionDigits = 2,\n testID,\n ...rest\n }: AmountProps,\n ref: React.Ref<BladeElementRef>,\n): 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 { amountValueColor } = getTextColorProps({\n color,\n });\n\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isDesktop = matchedDeviceType === 'desktop';\n\n const renderedValue = getAmountByParts({ suffix, value, currency, fractionDigits });\n const isPrefixSymbol = renderedValue.isPrefixSymbol ?? true;\n const currencySymbol = renderedValue.currency ?? currency;\n\n const currencyPosition = isPrefixSymbol ? 'left' : 'right';\n const currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;\n\n // Get currency font size - use subtle sizes when isAffixSubtle.\n // For non-subtle, body uses corresponding body token sizes while heading/display use hardcoded sizes.\n const getCurrencyFontProps = (): {\n fontSize: keyof FontSize | undefined;\n style: { fontSize: string } | undefined;\n } => {\n if (isAffixSubtle) {\n return {\n fontSize: subtleFontSizes[type][size],\n style: undefined,\n };\n }\n\n if (type === 'body') {\n return {\n fontSize: normalAmountSizes[type][size],\n style: undefined,\n };\n }\n\n const hardcodedSize = currencyHardcodedSizes[type][size];\n return {\n fontSize: normalAmountSizes[type][size], // Fallback for token-based rendering\n style: hardcodedSize\n ? { fontSize: `${hardcodedSize[isDesktop ? 'desktop' : 'mobile']}px` }\n : undefined,\n };\n };\n\n const currencyFontProps = getCurrencyFontProps();\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {renderedValue.minusSign ? (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n marginX=\"spacing.2\"\n >\n {renderedValue.minusSign}\n </BaseText>\n ) : null}\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n amount={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n currency={currency}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: the borderBottomColor error below is thrown here as well\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore- 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(React.forwardRef(_Amount), {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["stripTrailingZerosFromParts","parts","decimalPart","rawParts","filter","_ref","type","map","_ref2","value","join","hasFraction","some","_ref3","test","decimal","fraction","_ref4","pollyfilledFormatNumberByParts","options","_options$intlOptions","formatNumberByParts","intlOptions","trailingZeroDisplay","getTextColorProps","_ref5","color","props","amountValueColor","AmountValue","_ref6","amount","_ref6$size","size","_ref6$type","_ref6$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","integer","opacity","compact","getAmountByParts","_ref7","currency","_ref7$fractionDigits","fractionDigits","style","maximumFractionDigits","minimumFractionDigits","notation","roundingMode","err","_Amount","_ref8","ref","_renderedValue$isPref","_renderedValue$curren","_ref8$suffix","_ref8$type","_ref8$size","_ref8$weight","_ref8$isAffixSubtle","_ref8$isStrikethrough","isStrikethrough","_ref8$currencyIndicat","currencyIndicator","_ref8$currency","_ref8$fractionDigits","testID","rest","_objectWithoutProperties","_excluded","__DEV__","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","_getTextColorProps","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isDesktop","renderedValue","isPrefixSymbol","currencySymbol","currencyPosition","currencySymbolOrCode","getCurrencyFontProps","hardcodedSize","currencyHardcodedSizes","currencyFontProps","BaseBox","Object","assign","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","makeAnalyticsAttribute","alignItems","position","minusSign","marginX","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2JAkCA,IAAMA,2BAA2B,CAAG,SAA9BA,2BAA2BA,CAC/BC,KAA6C,CACF,CAC3C,IAAMC,WAAW,CAAGD,KAAK,CAACE,QAAQ,CAC/BC,MAAM,CAAC,SAAAC,IAAA,CAAA,CAAA,IAAGC,IAAI,CAAAD,IAAA,CAAJC,IAAI,CAAA,OAAOA,IAAI,GAAK,UAAU,CAAA,CAAA,CAAC,CACzCC,GAAG,CAAC,SAAAC,KAAA,CAAG,CAAA,IAAAC,KAAK,CAAAD,KAAA,CAALC,KAAK,CAAO,OAAAA,KAAK,CAAA,CAAA,CAAC,CACzBC,IAAI,CAAC,EAAE,CAAC,CAEX,IAAMC,WAAW,CAAGV,KAAK,CAACE,QAAQ,CAACS,IAAI,CAAC,SAAAC,KAAA,CAAA,CAAA,IAAGP,IAAI,CAAAO,KAAA,CAAJP,IAAI,CAAA,OAAOA,IAAI,GAAK,UAAU,GAAC,CAE1E,GAAIK,WAAW,EAAI,MAAM,CAACG,IAAI,CAACZ,WAAW,CAAC,CAAE,CAC3C,OAAOD,KAAK,CAACc,OAAO,CACpB,OAAOd,KAAK,CAACe,QAAQ,CACrBf,KAAK,CAACE,QAAQ,CAAGF,KAAK,CAACE,QAAQ,CAACC,MAAM,CAAC,SAAAa,KAAA,CAAA,CAAA,IAAGX,IAAI,CAAAW,KAAA,C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CAAEA,IAAK,CACX8B,MAAM,CAAEA,MAAO,CACfH,IAAI,CAAEA,IAAK,CACXI,aAAa,CAAEA,aAAc,CAC7BC,MAAM,CAAEA,MAAO,CACf2B,QAAQ,CAAEA,QAAS,CACpB,CAAC,CACDqD,gBAAgB,GAAK,OAAO,EAC3BnE,GAAA,CAACC,QAAQ,CAAA,CACPuF,UAAU,CAAC,WAAW,CACtBrF,UAAU,CAAElB,MAAO,CACnBiB,QAAQ,CAAEsE,iBAAiB,CAACtE,QAAS,CACrC3B,KAAK,CAAEE,gBAAiB,CACxB8B,EAAE,CAAEnB,aAAa,CAAGoB,SAAS,CAAG,MAAO,CACvCE,OAAO,CAAExB,aAAa,CAAGwB,OAAO,CAAC,GAAG,CAAC,CAAG,CAAE,CAC1CO,KAAK,CAAEuD,iBAAiB,CAACvD,KAAM,CAAAlB,QAAA,CAE9BqE,oBAAoB,CACb,CACX,CACAlC,eAAe,EAGdlC,GAAA,CAACyE,OAAO,CAGNgB,CAAAA,iBAAiB,CAAEhH,gBAAiB,CACpCiH,iBAAiB,CAAEvI,IAAI,GAAK,MAAM,CAAG,MAAM,CAAG,SAAU,CACxDwI,iBAAiB,CAAC,OAAO,CACzBP,QAAQ,CAAC,UAAU,CACnBQ,KAAK,CAAC,MAAM,CACZC,GAAG,CAAC,KAAK,CACV,CACF,CAAA,CACM,CAAC,CAAA,CACH,CAAC,CAEd,CAAC,CAEK,IAAAb,MAAM,CAAGc,wBAAwB,CAAClG,cAAK,CAACmG,UAAU,CAACxE,OAAO,CAAC,CAAE,CACjEyE,WAAW,CAAE,QAAQ,CACrBC,WAAW,CAAE,QACf,CAAC;;;;"}
@@ -1,2 +1,2 @@
1
- import '../node_modules/es-toolkit/dist/compat/object/cloneDeep.js';
1
+ import '../node_modules/es-toolkit/dist/object/cloneDeep.js';
2
2
  //# sourceMappingURL=cloneDeep.js.map
@@ -1,2 +1,2 @@
1
- import '../node_modules/es-toolkit/dist/object/cloneDeep.js';
1
+ import '../node_modules/es-toolkit/dist/compat/object/cloneDeep.js';
2
2
  //# sourceMappingURL=cloneDeep3.js.map
@@ -1,2 +1,2 @@
1
- import '../node_modules/es-toolkit/dist/compat/array/flatten.js';
1
+ import '../node_modules/es-toolkit/dist/array/flatten.js';
2
2
  //# sourceMappingURL=flatten.js.map
@@ -1,2 +1,2 @@
1
- import '../node_modules/es-toolkit/dist/array/flatten.js';
1
+ import '../node_modules/es-toolkit/dist/compat/array/flatten.js';
2
2
  //# sourceMappingURL=flatten3.js.map
@@ -147,11 +147,14 @@ var getAmountByParts = function getAmountByParts(_ref7) {
147
147
  switch (suffix) {
148
148
  case 'decimals':
149
149
  {
150
+ var intlOptions = fractionDigits === 'auto' ? {
151
+ style: 'currency'
152
+ } : {
153
+ maximumFractionDigits: fractionDigits,
154
+ minimumFractionDigits: fractionDigits
155
+ };
150
156
  var options = {
151
- intlOptions: {
152
- maximumFractionDigits: fractionDigits,
153
- minimumFractionDigits: fractionDigits
154
- },
157
+ intlOptions: intlOptions,
155
158
  currency: currency
156
159
  };
157
160
  return pollyfilledFormatNumberByParts(value, options);
@@ -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 { CurrencyCodeType } from '@razorpay/i18nify-js/currency';\nimport { formatNumberByParts } from '@razorpay/i18nify-js/currency';\nimport type { AmountTypeProps } from './amountTokens';\nimport {\n normalAmountSizes,\n subtleFontSizes,\n currencyHardcodedSizes,\n amountLineHeights,\n} from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, BladeElementRef, 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, FontSize } from '~tokens/global';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useTheme } from '~components/BladeProvider';\nimport { useBreakpoint } from '~utils/useBreakpoint';\n\n/**\n * Pollyfill function to get around the node 18 error\n *\n * This function is maintained by i18nify team. Reach out to them for any change regarding this.\n */\nconst stripTrailingZerosFromParts = (\n parts: ReturnType<typeof formatNumberByParts>,\n): ReturnType<typeof formatNumberByParts> => {\n const decimalPart = parts.rawParts\n .filter(({ type }) => type === 'fraction')\n .map(({ value }) => value)\n .join('');\n\n const hasFraction = parts.rawParts.some(({ type }) => type === 'fraction');\n\n if (hasFraction && /^0+$/.test(decimalPart)) {\n delete parts.decimal;\n delete parts.fraction;\n parts.rawParts = parts.rawParts.filter(({ type }) => type !== 'decimal' && type !== 'fraction');\n }\n\n return parts;\n};\n\n/**\n * Wrapper that uses pollyfill of i18nify team\n */\nconst pollyfilledFormatNumberByParts: typeof formatNumberByParts = (value, options) => {\n const parts = formatNumberByParts(value, options);\n\n if (options?.intlOptions?.trailingZeroDisplay === 'stripIfInteger') {\n return stripTrailingZerosFromParts(parts);\n }\n\n return parts;\n};\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 * Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.\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?: CurrencyCodeType;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n /**\n * Controls the number of decimal places to display when suffix is 'decimals'.\n *\n * @default 2\n */\n fractionDigits?: number;\n} & TestID &\n DataAnalyticsAttribute &\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\ntype AmountType = Partial<ReturnType<typeof formatNumberByParts>>;\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n amount: AmountType;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n amount,\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 // 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 {amount.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[800] : 1}\n >\n {amount.decimal}\n {amount.fraction}\n </BaseText>\n </AmountWrapper>\n );\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 {amount.integer}\n {amount.decimal}\n {amount.fraction}\n {amount.compact}\n </BaseText>\n );\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n currency: AmountProps['currency'];\n fractionDigits?: number;\n};\n\n/**\n * Returns a parsed object based on the suffix passed in parameters\n * === Logic ===\n * value = 12500.45 \n * if suffix === 'decimals' => {\n \"integer\": \"12,500\",\n \"decimal\": \".\",\n \"fraction\": \"45\",\n \"compact\": \"K\",\n \"isPrefixSymbol\": false,\n \"rawParts\": [{\"type\": \"integer\",\"value\": \"12\"},{\"type\": \"group\",\"value\": \",\"},{\"type\": \"integer\",\"value\": \"500\"},{\"type\": \"decimal\",\"value\": \".\"},{\"type\": \"fraction\",\"value\": \"45\"}]\n}\n * @returns {AmountType}\n */\nexport const getAmountByParts = ({\n suffix,\n value,\n currency,\n fractionDigits = 2,\n}: FormatAmountWithSuffixType): AmountType => {\n try {\n switch (suffix) {\n case 'decimals': {\n const options = {\n intlOptions: {\n maximumFractionDigits: fractionDigits,\n minimumFractionDigits: fractionDigits,\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n case 'humanize': {\n const options = {\n intlOptions: {\n notation: 'compact',\n maximumFractionDigits: 2,\n trailingZeroDisplay: 'stripIfInteger',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n\n default: {\n const options = {\n intlOptions: {\n maximumFractionDigits: 0,\n roundingMode: 'floor',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n }\n } catch (err: unknown) {\n return {\n integer: `${value}`,\n currency,\n };\n }\n};\n\nconst _Amount = (\n {\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 fractionDigits = 2,\n testID,\n ...rest\n }: AmountProps,\n ref: React.Ref<BladeElementRef>,\n): 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 { amountValueColor } = getTextColorProps({\n color,\n });\n\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isDesktop = matchedDeviceType === 'desktop';\n\n const renderedValue = getAmountByParts({ suffix, value, currency, fractionDigits });\n const isPrefixSymbol = renderedValue.isPrefixSymbol ?? true;\n const currencySymbol = renderedValue.currency ?? currency;\n\n const currencyPosition = isPrefixSymbol ? 'left' : 'right';\n const currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;\n\n // Get currency font size - use subtle sizes when isAffixSubtle.\n // For non-subtle, body uses corresponding body token sizes while heading/display use hardcoded sizes.\n const getCurrencyFontProps = (): {\n fontSize: keyof FontSize | undefined;\n style: { fontSize: string } | undefined;\n } => {\n if (isAffixSubtle) {\n return {\n fontSize: subtleFontSizes[type][size],\n style: undefined,\n };\n }\n\n if (type === 'body') {\n return {\n fontSize: normalAmountSizes[type][size],\n style: undefined,\n };\n }\n\n const hardcodedSize = currencyHardcodedSizes[type][size];\n return {\n fontSize: normalAmountSizes[type][size], // Fallback for token-based rendering\n style: hardcodedSize\n ? { fontSize: `${hardcodedSize[isDesktop ? 'desktop' : 'mobile']}px` }\n : undefined,\n };\n };\n\n const currencyFontProps = getCurrencyFontProps();\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {renderedValue.minusSign ? (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n marginX=\"spacing.2\"\n >\n {renderedValue.minusSign}\n </BaseText>\n ) : null}\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n amount={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n currency={currency}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: the borderBottomColor error below is thrown here as well\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore- 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(React.forwardRef(_Amount), {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["stripTrailingZerosFromParts","parts","decimalPart","rawParts","filter","_ref","type","map","_ref2","value","join","hasFraction","some","_ref3","test","decimal","fraction","_ref4","pollyfilledFormatNumberByParts","options","_options$intlOptions","formatNumberByParts","intlOptions","trailingZeroDisplay","getTextColorProps","_ref5","color","props","amountValueColor","AmountValue","_ref6","amount","_ref6$size","size","_ref6$type","_ref6$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","integer","opacity","compact","getAmountByParts","_ref7","currency","_ref7$fractionDigits","fractionDigits","maximumFractionDigits","minimumFractionDigits","notation","roundingMode","err","concat","_Amount","_ref8","ref","_renderedValue$isPref","_renderedValue$curren","_ref8$suffix","_ref8$type","_ref8$size","_ref8$weight","_ref8$isAffixSubtle","_ref8$isStrikethrough","isStrikethrough","_ref8$currencyIndicat","currencyIndicator","_ref8$currency","_ref8$fractionDigits","testID","rest","_objectWithoutProperties","_excluded","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","_getTextColorProps","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isDesktop","renderedValue","isPrefixSymbol","currencySymbol","currencyPosition","currencySymbolOrCode","getCurrencyFontProps","style","hardcodedSize","currencyHardcodedSizes","currencyFontProps","BaseBox","_objectSpread","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","makeAnalyticsAttribute","alignItems","position","minusSign","marginX","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAC/BC,KAA6C,EACF;EAC3C,IAAMC,WAAW,GAAGD,KAAK,CAACE,QAAQ,CAC/BC,MAAM,CAAC,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,IAAI,GAAAD,IAAA,CAAJC,IAAI,CAAA;IAAA,OAAOA,IAAI,KAAK,UAAU,CAAA;AAAA,GAAA,CAAC,CACzCC,GAAG,CAAC,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,KAAK,GAAAD,KAAA,CAALC,KAAK,CAAA;AAAA,IAAA,OAAOA,KAAK,CAAA;AAAA,GAAA,CAAC,CACzBC,IAAI,CAAC,EAAE,CAAC,CAAA;EAEX,IAAMC,WAAW,GAAGV,KAAK,CAACE,QAAQ,CAACS,IAAI,CAAC,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGP,IAAI,GAAAO,KAAA,CAAJP,IAAI,CAAA;IAAA,OAAOA,IAAI,KAAK,UAAU,CAAA;GAAC,CAAA,CAAA;EAE1E,IAAIK,WAAW,IAAI,MAAM,CAACG,IAAI,CAACZ,WAAW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,EAAEE,gBAAiB;AACxB8B,QAAAA,EAAE,EAAEnB,aAAa,GAAGoB,SAAS,GAAG,MAAO;QACvCE,OAAO,EAAExB,aAAa,GAAGwB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAE;QAC1C2D,KAAK,EAAEG,iBAAiB,CAACH,KAAM;AAAAtE,QAAAA,QAAA,EAE9BoE,oBAAAA;OACO,CACX,EACAjC,eAAe;AAAA;AACd;AACA;AACAlC,MAAAA,GAAA,CAACyE,OAAAA;AACC;AACA;AAAA,QAAA;AACAe,QAAAA,iBAAiB,EAAE/G,gBAAiB;AACpCgH,QAAAA,iBAAiB,EAAEtI,IAAI,KAAK,MAAM,GAAG,MAAM,GAAG,SAAU;AACxDuI,QAAAA,iBAAiB,EAAC,OAAO;AACzBP,QAAAA,QAAQ,EAAC,UAAU;AACnBQ,QAAAA,KAAK,EAAC,MAAM;AACZC,QAAAA,GAAG,EAAC,KAAA;AAAK,OACV,CACF,CAAA;KACM,CAAA;AAAC,GAAA,CACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAEKb,IAAAA,MAAM,gBAAGc,wBAAwB,cAACjG,cAAK,CAACkG,UAAU,CAACvE,OAAO,CAAC,EAAE;AACjEwE,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 { CurrencyCodeType } from '@razorpay/i18nify-js/currency';\nimport { formatNumberByParts } from '@razorpay/i18nify-js/currency';\nimport type { AmountTypeProps } from './amountTokens';\nimport {\n normalAmountSizes,\n subtleFontSizes,\n currencyHardcodedSizes,\n amountLineHeights,\n} from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, BladeElementRef, 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, FontSize } from '~tokens/global';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useTheme } from '~components/BladeProvider';\nimport { useBreakpoint } from '~utils/useBreakpoint';\n\n/**\n * Pollyfill function to get around the node 18 error\n *\n * This function is maintained by i18nify team. Reach out to them for any change regarding this.\n */\nconst stripTrailingZerosFromParts = (\n parts: ReturnType<typeof formatNumberByParts>,\n): ReturnType<typeof formatNumberByParts> => {\n const decimalPart = parts.rawParts\n .filter(({ type }) => type === 'fraction')\n .map(({ value }) => value)\n .join('');\n\n const hasFraction = parts.rawParts.some(({ type }) => type === 'fraction');\n\n if (hasFraction && /^0+$/.test(decimalPart)) {\n delete parts.decimal;\n delete parts.fraction;\n parts.rawParts = parts.rawParts.filter(({ type }) => type !== 'decimal' && type !== 'fraction');\n }\n\n return parts;\n};\n\n/**\n * Wrapper that uses pollyfill of i18nify team\n */\nconst pollyfilledFormatNumberByParts: typeof formatNumberByParts = (value, options) => {\n const parts = formatNumberByParts(value, options);\n\n if (options?.intlOptions?.trailingZeroDisplay === 'stripIfInteger') {\n return stripTrailingZerosFromParts(parts);\n }\n\n return parts;\n};\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 * Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.\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?: CurrencyCodeType;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n /**\n * Controls the number of decimal places to display when suffix is 'decimals'.\n *\n * Set to `'auto'` to automatically determine decimal places based on the currency\n * (e.g. JPY → 0 decimals, INR → 2 decimals, KWD → 3 decimals).\n *\n * @default 2\n */\n fractionDigits?: number | 'auto';\n} & TestID &\n DataAnalyticsAttribute &\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\ntype AmountType = Partial<ReturnType<typeof formatNumberByParts>>;\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n amount: AmountType;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n amount,\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 // 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 {amount.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[800] : 1}\n >\n {amount.decimal}\n {amount.fraction}\n </BaseText>\n </AmountWrapper>\n );\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 {amount.integer}\n {amount.decimal}\n {amount.fraction}\n {amount.compact}\n </BaseText>\n );\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n currency: AmountProps['currency'];\n fractionDigits?: number | 'auto';\n};\n\n/**\n * Returns a parsed object based on the suffix passed in parameters\n * === Logic ===\n * value = 12500.45 \n * if suffix === 'decimals' => {\n \"integer\": \"12,500\",\n \"decimal\": \".\",\n \"fraction\": \"45\",\n \"compact\": \"K\",\n \"isPrefixSymbol\": false,\n \"rawParts\": [{\"type\": \"integer\",\"value\": \"12\"},{\"type\": \"group\",\"value\": \",\"},{\"type\": \"integer\",\"value\": \"500\"},{\"type\": \"decimal\",\"value\": \".\"},{\"type\": \"fraction\",\"value\": \"45\"}]\n}\n * @returns {AmountType}\n */\nexport const getAmountByParts = ({\n suffix,\n value,\n currency,\n fractionDigits = 2,\n}: FormatAmountWithSuffixType): AmountType => {\n try {\n switch (suffix) {\n case 'decimals': {\n const intlOptions =\n fractionDigits === 'auto'\n ? { style: 'currency' }\n : {\n maximumFractionDigits: fractionDigits,\n minimumFractionDigits: fractionDigits,\n };\n const options = {\n intlOptions,\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n case 'humanize': {\n const options = {\n intlOptions: {\n notation: 'compact',\n maximumFractionDigits: 2,\n trailingZeroDisplay: 'stripIfInteger',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n\n default: {\n const options = {\n intlOptions: {\n maximumFractionDigits: 0,\n roundingMode: 'floor',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n }\n } catch (err: unknown) {\n return {\n integer: `${value}`,\n currency,\n };\n }\n};\n\nconst _Amount = (\n {\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 fractionDigits = 2,\n testID,\n ...rest\n }: AmountProps,\n ref: React.Ref<BladeElementRef>,\n): 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 { amountValueColor } = getTextColorProps({\n color,\n });\n\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isDesktop = matchedDeviceType === 'desktop';\n\n const renderedValue = getAmountByParts({ suffix, value, currency, fractionDigits });\n const isPrefixSymbol = renderedValue.isPrefixSymbol ?? true;\n const currencySymbol = renderedValue.currency ?? currency;\n\n const currencyPosition = isPrefixSymbol ? 'left' : 'right';\n const currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;\n\n // Get currency font size - use subtle sizes when isAffixSubtle.\n // For non-subtle, body uses corresponding body token sizes while heading/display use hardcoded sizes.\n const getCurrencyFontProps = (): {\n fontSize: keyof FontSize | undefined;\n style: { fontSize: string } | undefined;\n } => {\n if (isAffixSubtle) {\n return {\n fontSize: subtleFontSizes[type][size],\n style: undefined,\n };\n }\n\n if (type === 'body') {\n return {\n fontSize: normalAmountSizes[type][size],\n style: undefined,\n };\n }\n\n const hardcodedSize = currencyHardcodedSizes[type][size];\n return {\n fontSize: normalAmountSizes[type][size], // Fallback for token-based rendering\n style: hardcodedSize\n ? { fontSize: `${hardcodedSize[isDesktop ? 'desktop' : 'mobile']}px` }\n : undefined,\n };\n };\n\n const currencyFontProps = getCurrencyFontProps();\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {renderedValue.minusSign ? (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n marginX=\"spacing.2\"\n >\n {renderedValue.minusSign}\n </BaseText>\n ) : null}\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n amount={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n currency={currency}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: the borderBottomColor error below is thrown here as well\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore- 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(React.forwardRef(_Amount), {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["stripTrailingZerosFromParts","parts","decimalPart","rawParts","filter","_ref","type","map","_ref2","value","join","hasFraction","some","_ref3","test","decimal","fraction","_ref4","pollyfilledFormatNumberByParts","options","_options$intlOptions","formatNumberByParts","intlOptions","trailingZeroDisplay","getTextColorProps","_ref5","color","props","amountValueColor","AmountValue","_ref6","amount","_ref6$size","size","_ref6$type","_ref6$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","integer","opacity","compact","getAmountByParts","_ref7","currency","_ref7$fractionDigits","fractionDigits","style","maximumFractionDigits","minimumFractionDigits","notation","roundingMode","err","concat","_Amount","_ref8","ref","_renderedValue$isPref","_renderedValue$curren","_ref8$suffix","_ref8$type","_ref8$size","_ref8$weight","_ref8$isAffixSubtle","_ref8$isStrikethrough","isStrikethrough","_ref8$currencyIndicat","currencyIndicator","_ref8$currency","_ref8$fractionDigits","testID","rest","_objectWithoutProperties","_excluded","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","_getTextColorProps","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isDesktop","renderedValue","isPrefixSymbol","currencySymbol","currencyPosition","currencySymbolOrCode","getCurrencyFontProps","hardcodedSize","currencyHardcodedSizes","currencyFontProps","BaseBox","_objectSpread","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","makeAnalyticsAttribute","alignItems","position","minusSign","marginX","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAC/BC,KAA6C,EACF;EAC3C,IAAMC,WAAW,GAAGD,KAAK,CAACE,QAAQ,CAC/BC,MAAM,CAAC,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,IAAI,GAAAD,IAAA,CAAJC,IAAI,CAAA;IAAA,OAAOA,IAAI,KAAK,UAAU,CAAA;AAAA,GAAA,CAAC,CACzCC,GAAG,CAAC,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,KAAK,GAAAD,KAAA,CAALC,KAAK,CAAA;AAAA,IAAA,OAAOA,KAAK,CAAA;AAAA,GAAA,CAAC,CACzBC,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-1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../_virtual/_commonjsHelpers.js';
2
- import { __exports as flatten$1 } from '../../../../_virtual/flatten4.js';
2
+ import { __exports as flatten$1 } from '../../../../_virtual/flatten2.js';
3
3
 
4
4
  (function (exports) {
5
5
  'use strict';
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
2
- import { __exports as flatten$1 } from '../../../../../_virtual/flatten2.js';
2
+ import { __exports as flatten$1 } from '../../../../../_virtual/flatten4.js';
3
3
  import '../../../../../_virtual/isArrayLike.js';
4
4
  import { __exports as isArrayLike } from '../../../../../_virtual/isArrayLike2.js';
5
5
 
@@ -1,10 +1,10 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
2
2
  import { __exports as sortBy$1 } from '../../../../../_virtual/sortBy2.js';
3
3
  import '../../../../../_virtual/orderBy.js';
4
- import '../../../../../_virtual/flatten3.js';
4
+ import '../../../../../_virtual/flatten.js';
5
5
  import '../../../../../_virtual/isIterateeCall.js';
6
6
  import { __exports as orderBy } from '../../../../../_virtual/orderBy2.js';
7
- import { __exports as flatten } from '../../../../../_virtual/flatten4.js';
7
+ import { __exports as flatten } from '../../../../../_virtual/flatten2.js';
8
8
  import { __exports as isIterateeCall } from '../../../../../_virtual/isIterateeCall2.js';
9
9
 
10
10
  (function (exports) {
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
2
- import { __exports as cloneDeep$1 } from '../../../../../_virtual/cloneDeep2.js';
2
+ import { __exports as cloneDeep$1 } from '../../../../../_virtual/cloneDeep4.js';
3
3
  import '../../../../../_virtual/cloneDeepWith.js';
4
4
  import { __exports as cloneDeepWith } from '../../../../../_virtual/cloneDeepWith2.js';
5
5
 
@@ -5,14 +5,14 @@ import '../../../../../_virtual/keysIn.js';
5
5
  import '../../../../../_virtual/unset.js';
6
6
  import '../../../../../_virtual/getSymbolsIn.js';
7
7
  import '../../../../../_virtual/isDeepKey.js';
8
- import '../../../../../_virtual/flatten.js';
8
+ import '../../../../../_virtual/flatten3.js';
9
9
  import '../../../../../_virtual/isPlainObject.js';
10
10
  import { __exports as cloneDeepWith } from '../../../../../_virtual/cloneDeepWith2.js';
11
11
  import { __exports as keysIn } from '../../../../../_virtual/keysIn2.js';
12
12
  import { __exports as unset } from '../../../../../_virtual/unset2.js';
13
13
  import { __exports as getSymbolsIn } from '../../../../../_virtual/getSymbolsIn2.js';
14
14
  import { __exports as isDeepKey } from '../../../../../_virtual/isDeepKey2.js';
15
- import { __exports as flatten } from '../../../../../_virtual/flatten2.js';
15
+ import { __exports as flatten } from '../../../../../_virtual/flatten4.js';
16
16
  import { __exports as isPlainObject } from '../../../../../_virtual/isPlainObject2.js';
17
17
 
18
18
  (function (exports) {
@@ -1,9 +1,9 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
2
2
  import { __exports as matches$1 } from '../../../../../_virtual/matches2.js';
3
3
  import '../../../../../_virtual/isMatch.js';
4
- import '../../../../../_virtual/cloneDeep3.js';
4
+ import '../../../../../_virtual/cloneDeep.js';
5
5
  import { __exports as isMatch } from '../../../../../_virtual/isMatch2.js';
6
- import { __exports as cloneDeep } from '../../../../../_virtual/cloneDeep4.js';
6
+ import { __exports as cloneDeep } from '../../../../../_virtual/cloneDeep2.js';
7
7
 
8
8
  (function (exports) {
9
9
  'use strict';
@@ -2,12 +2,12 @@ import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelper
2
2
  import { __exports as matchesProperty$1 } from '../../../../../_virtual/matchesProperty2.js';
3
3
  import '../../../../../_virtual/isMatch.js';
4
4
  import '../../../../../_virtual/toKey.js';
5
- import '../../../../../_virtual/cloneDeep.js';
5
+ import '../../../../../_virtual/cloneDeep3.js';
6
6
  import '../../../../../_virtual/get.js';
7
7
  import '../../../../../_virtual/has.js';
8
8
  import { __exports as isMatch } from '../../../../../_virtual/isMatch2.js';
9
9
  import { __exports as toKey } from '../../../../../_virtual/toKey2.js';
10
- import { __exports as cloneDeep } from '../../../../../_virtual/cloneDeep2.js';
10
+ import { __exports as cloneDeep } from '../../../../../_virtual/cloneDeep4.js';
11
11
  import { __exports as get } from '../../../../../_virtual/get2.js';
12
12
  import { __exports as has } from '../../../../../_virtual/has2.js';
13
13
 
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../_virtual/_commonjsHelpers.js';
2
- import { __exports as cloneDeep$1 } from '../../../../_virtual/cloneDeep4.js';
2
+ import { __exports as cloneDeep$1 } from '../../../../_virtual/cloneDeep2.js';
3
3
  import '../../../../_virtual/cloneDeepWith3.js';
4
4
  import { __exports as cloneDeepWith } from '../../../../_virtual/cloneDeepWith4.js';
5
5
 
@@ -1,2 +1,2 @@
1
- import '../node_modules/es-toolkit/dist/compat/array/flatten.js';
1
+ import '../node_modules/es-toolkit/dist/array/flatten.js';
2
2
  //# sourceMappingURL=flatten.js.map
@@ -1,2 +1,2 @@
1
- import '../node_modules/es-toolkit/dist/array/flatten.js';
1
+ import '../node_modules/es-toolkit/dist/compat/array/flatten.js';
2
2
  //# sourceMappingURL=flatten3.js.map
@@ -147,11 +147,14 @@ var getAmountByParts = function getAmountByParts(_ref7) {
147
147
  switch (suffix) {
148
148
  case 'decimals':
149
149
  {
150
+ var intlOptions = fractionDigits === 'auto' ? {
151
+ style: 'currency'
152
+ } : {
153
+ maximumFractionDigits: fractionDigits,
154
+ minimumFractionDigits: fractionDigits
155
+ };
150
156
  var options = {
151
- intlOptions: {
152
- maximumFractionDigits: fractionDigits,
153
- minimumFractionDigits: fractionDigits
154
- },
157
+ intlOptions: intlOptions,
155
158
  currency: currency
156
159
  };
157
160
  return pollyfilledFormatNumberByParts(value, options);
@@ -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 { CurrencyCodeType } from '@razorpay/i18nify-js/currency';\nimport { formatNumberByParts } from '@razorpay/i18nify-js/currency';\nimport type { AmountTypeProps } from './amountTokens';\nimport {\n normalAmountSizes,\n subtleFontSizes,\n currencyHardcodedSizes,\n amountLineHeights,\n} from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, BladeElementRef, 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, FontSize } from '~tokens/global';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useTheme } from '~components/BladeProvider';\nimport { useBreakpoint } from '~utils/useBreakpoint';\n\n/**\n * Pollyfill function to get around the node 18 error\n *\n * This function is maintained by i18nify team. Reach out to them for any change regarding this.\n */\nconst stripTrailingZerosFromParts = (\n parts: ReturnType<typeof formatNumberByParts>,\n): ReturnType<typeof formatNumberByParts> => {\n const decimalPart = parts.rawParts\n .filter(({ type }) => type === 'fraction')\n .map(({ value }) => value)\n .join('');\n\n const hasFraction = parts.rawParts.some(({ type }) => type === 'fraction');\n\n if (hasFraction && /^0+$/.test(decimalPart)) {\n delete parts.decimal;\n delete parts.fraction;\n parts.rawParts = parts.rawParts.filter(({ type }) => type !== 'decimal' && type !== 'fraction');\n }\n\n return parts;\n};\n\n/**\n * Wrapper that uses pollyfill of i18nify team\n */\nconst pollyfilledFormatNumberByParts: typeof formatNumberByParts = (value, options) => {\n const parts = formatNumberByParts(value, options);\n\n if (options?.intlOptions?.trailingZeroDisplay === 'stripIfInteger') {\n return stripTrailingZerosFromParts(parts);\n }\n\n return parts;\n};\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 * Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.\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?: CurrencyCodeType;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n /**\n * Controls the number of decimal places to display when suffix is 'decimals'.\n *\n * @default 2\n */\n fractionDigits?: number;\n} & TestID &\n DataAnalyticsAttribute &\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\ntype AmountType = Partial<ReturnType<typeof formatNumberByParts>>;\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n amount: AmountType;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n amount,\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 // 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 {amount.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[800] : 1}\n >\n {amount.decimal}\n {amount.fraction}\n </BaseText>\n </AmountWrapper>\n );\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 {amount.integer}\n {amount.decimal}\n {amount.fraction}\n {amount.compact}\n </BaseText>\n );\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n currency: AmountProps['currency'];\n fractionDigits?: number;\n};\n\n/**\n * Returns a parsed object based on the suffix passed in parameters\n * === Logic ===\n * value = 12500.45 \n * if suffix === 'decimals' => {\n \"integer\": \"12,500\",\n \"decimal\": \".\",\n \"fraction\": \"45\",\n \"compact\": \"K\",\n \"isPrefixSymbol\": false,\n \"rawParts\": [{\"type\": \"integer\",\"value\": \"12\"},{\"type\": \"group\",\"value\": \",\"},{\"type\": \"integer\",\"value\": \"500\"},{\"type\": \"decimal\",\"value\": \".\"},{\"type\": \"fraction\",\"value\": \"45\"}]\n}\n * @returns {AmountType}\n */\nexport const getAmountByParts = ({\n suffix,\n value,\n currency,\n fractionDigits = 2,\n}: FormatAmountWithSuffixType): AmountType => {\n try {\n switch (suffix) {\n case 'decimals': {\n const options = {\n intlOptions: {\n maximumFractionDigits: fractionDigits,\n minimumFractionDigits: fractionDigits,\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n case 'humanize': {\n const options = {\n intlOptions: {\n notation: 'compact',\n maximumFractionDigits: 2,\n trailingZeroDisplay: 'stripIfInteger',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n\n default: {\n const options = {\n intlOptions: {\n maximumFractionDigits: 0,\n roundingMode: 'floor',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n }\n } catch (err: unknown) {\n return {\n integer: `${value}`,\n currency,\n };\n }\n};\n\nconst _Amount = (\n {\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 fractionDigits = 2,\n testID,\n ...rest\n }: AmountProps,\n ref: React.Ref<BladeElementRef>,\n): 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 { amountValueColor } = getTextColorProps({\n color,\n });\n\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isDesktop = matchedDeviceType === 'desktop';\n\n const renderedValue = getAmountByParts({ suffix, value, currency, fractionDigits });\n const isPrefixSymbol = renderedValue.isPrefixSymbol ?? true;\n const currencySymbol = renderedValue.currency ?? currency;\n\n const currencyPosition = isPrefixSymbol ? 'left' : 'right';\n const currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;\n\n // Get currency font size - use subtle sizes when isAffixSubtle.\n // For non-subtle, body uses corresponding body token sizes while heading/display use hardcoded sizes.\n const getCurrencyFontProps = (): {\n fontSize: keyof FontSize | undefined;\n style: { fontSize: string } | undefined;\n } => {\n if (isAffixSubtle) {\n return {\n fontSize: subtleFontSizes[type][size],\n style: undefined,\n };\n }\n\n if (type === 'body') {\n return {\n fontSize: normalAmountSizes[type][size],\n style: undefined,\n };\n }\n\n const hardcodedSize = currencyHardcodedSizes[type][size];\n return {\n fontSize: normalAmountSizes[type][size], // Fallback for token-based rendering\n style: hardcodedSize\n ? { fontSize: `${hardcodedSize[isDesktop ? 'desktop' : 'mobile']}px` }\n : undefined,\n };\n };\n\n const currencyFontProps = getCurrencyFontProps();\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {renderedValue.minusSign ? (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n marginX=\"spacing.2\"\n >\n {renderedValue.minusSign}\n </BaseText>\n ) : null}\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n amount={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n currency={currency}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: the borderBottomColor error below is thrown here as well\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore- 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(React.forwardRef(_Amount), {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["stripTrailingZerosFromParts","parts","decimalPart","rawParts","filter","_ref","type","map","_ref2","value","join","hasFraction","some","_ref3","test","decimal","fraction","_ref4","pollyfilledFormatNumberByParts","options","_options$intlOptions","formatNumberByParts","intlOptions","trailingZeroDisplay","getTextColorProps","_ref5","color","props","amountValueColor","AmountValue","_ref6","amount","_ref6$size","size","_ref6$type","_ref6$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","integer","opacity","compact","getAmountByParts","_ref7","currency","_ref7$fractionDigits","fractionDigits","maximumFractionDigits","minimumFractionDigits","notation","roundingMode","err","concat","_Amount","_ref8","ref","_renderedValue$isPref","_renderedValue$curren","_ref8$suffix","_ref8$type","_ref8$size","_ref8$weight","_ref8$isAffixSubtle","_ref8$isStrikethrough","isStrikethrough","_ref8$currencyIndicat","currencyIndicator","_ref8$currency","_ref8$fractionDigits","testID","rest","_objectWithoutProperties","_excluded","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","_getTextColorProps","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isDesktop","renderedValue","isPrefixSymbol","currencySymbol","currencyPosition","currencySymbolOrCode","getCurrencyFontProps","style","hardcodedSize","currencyHardcodedSizes","currencyFontProps","BaseBox","_objectSpread","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","makeAnalyticsAttribute","alignItems","position","minusSign","marginX","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAC/BC,KAA6C,EACF;EAC3C,IAAMC,WAAW,GAAGD,KAAK,CAACE,QAAQ,CAC/BC,MAAM,CAAC,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,IAAI,GAAAD,IAAA,CAAJC,IAAI,CAAA;IAAA,OAAOA,IAAI,KAAK,UAAU,CAAA;AA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rBC,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 { CurrencyCodeType } from '@razorpay/i18nify-js/currency';\nimport { formatNumberByParts } from '@razorpay/i18nify-js/currency';\nimport type { AmountTypeProps } from './amountTokens';\nimport {\n normalAmountSizes,\n subtleFontSizes,\n currencyHardcodedSizes,\n amountLineHeights,\n} from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, BladeElementRef, 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, FontSize } from '~tokens/global';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useTheme } from '~components/BladeProvider';\nimport { useBreakpoint } from '~utils/useBreakpoint';\n\n/**\n * Pollyfill function to get around the node 18 error\n *\n * This function is maintained by i18nify team. Reach out to them for any change regarding this.\n */\nconst stripTrailingZerosFromParts = (\n parts: ReturnType<typeof formatNumberByParts>,\n): ReturnType<typeof formatNumberByParts> => {\n const decimalPart = parts.rawParts\n .filter(({ type }) => type === 'fraction')\n .map(({ value }) => value)\n .join('');\n\n const hasFraction = parts.rawParts.some(({ type }) => type === 'fraction');\n\n if (hasFraction && /^0+$/.test(decimalPart)) {\n delete parts.decimal;\n delete parts.fraction;\n parts.rawParts = parts.rawParts.filter(({ type }) => type !== 'decimal' && type !== 'fraction');\n }\n\n return parts;\n};\n\n/**\n * Wrapper that uses pollyfill of i18nify team\n */\nconst pollyfilledFormatNumberByParts: typeof formatNumberByParts = (value, options) => {\n const parts = formatNumberByParts(value, options);\n\n if (options?.intlOptions?.trailingZeroDisplay === 'stripIfInteger') {\n return stripTrailingZerosFromParts(parts);\n }\n\n return parts;\n};\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 * Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.\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?: CurrencyCodeType;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n /**\n * Controls the number of decimal places to display when suffix is 'decimals'.\n *\n * Set to `'auto'` to automatically determine decimal places based on the currency\n * (e.g. JPY → 0 decimals, INR → 2 decimals, KWD → 3 decimals).\n *\n * @default 2\n */\n fractionDigits?: number | 'auto';\n} & TestID &\n DataAnalyticsAttribute &\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\ntype AmountType = Partial<ReturnType<typeof formatNumberByParts>>;\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n amount: AmountType;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n amount,\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 // 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 {amount.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[800] : 1}\n >\n {amount.decimal}\n {amount.fraction}\n </BaseText>\n </AmountWrapper>\n );\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 {amount.integer}\n {amount.decimal}\n {amount.fraction}\n {amount.compact}\n </BaseText>\n );\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n currency: AmountProps['currency'];\n fractionDigits?: number | 'auto';\n};\n\n/**\n * Returns a parsed object based on the suffix passed in parameters\n * === Logic ===\n * value = 12500.45 \n * if suffix === 'decimals' => {\n \"integer\": \"12,500\",\n \"decimal\": \".\",\n \"fraction\": \"45\",\n \"compact\": \"K\",\n \"isPrefixSymbol\": false,\n \"rawParts\": [{\"type\": \"integer\",\"value\": \"12\"},{\"type\": \"group\",\"value\": \",\"},{\"type\": \"integer\",\"value\": \"500\"},{\"type\": \"decimal\",\"value\": \".\"},{\"type\": \"fraction\",\"value\": \"45\"}]\n}\n * @returns {AmountType}\n */\nexport const getAmountByParts = ({\n suffix,\n value,\n currency,\n fractionDigits = 2,\n}: FormatAmountWithSuffixType): AmountType => {\n try {\n switch (suffix) {\n case 'decimals': {\n const intlOptions =\n fractionDigits === 'auto'\n ? { style: 'currency' }\n : {\n maximumFractionDigits: fractionDigits,\n minimumFractionDigits: fractionDigits,\n };\n const options = {\n intlOptions,\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n case 'humanize': {\n const options = {\n intlOptions: {\n notation: 'compact',\n maximumFractionDigits: 2,\n trailingZeroDisplay: 'stripIfInteger',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n\n default: {\n const options = {\n intlOptions: {\n maximumFractionDigits: 0,\n roundingMode: 'floor',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n }\n } catch (err: unknown) {\n return {\n integer: `${value}`,\n currency,\n };\n }\n};\n\nconst _Amount = (\n {\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 fractionDigits = 2,\n testID,\n ...rest\n }: AmountProps,\n ref: React.Ref<BladeElementRef>,\n): 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 { amountValueColor } = getTextColorProps({\n color,\n });\n\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isDesktop = matchedDeviceType === 'desktop';\n\n const renderedValue = getAmountByParts({ suffix, value, currency, fractionDigits });\n const isPrefixSymbol = renderedValue.isPrefixSymbol ?? true;\n const currencySymbol = renderedValue.currency ?? currency;\n\n const currencyPosition = isPrefixSymbol ? 'left' : 'right';\n const currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;\n\n // Get currency font size - use subtle sizes when isAffixSubtle.\n // For non-subtle, body uses corresponding body token sizes while heading/display use hardcoded sizes.\n const getCurrencyFontProps = (): {\n fontSize: keyof FontSize | undefined;\n style: { fontSize: string } | undefined;\n } => {\n if (isAffixSubtle) {\n return {\n fontSize: subtleFontSizes[type][size],\n style: undefined,\n };\n }\n\n if (type === 'body') {\n return {\n fontSize: normalAmountSizes[type][size],\n style: undefined,\n };\n }\n\n const hardcodedSize = currencyHardcodedSizes[type][size];\n return {\n fontSize: normalAmountSizes[type][size], // Fallback for token-based rendering\n style: hardcodedSize\n ? { fontSize: `${hardcodedSize[isDesktop ? 'desktop' : 'mobile']}px` }\n : undefined,\n };\n };\n\n const currencyFontProps = getCurrencyFontProps();\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {renderedValue.minusSign ? (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n marginX=\"spacing.2\"\n >\n {renderedValue.minusSign}\n </BaseText>\n ) : null}\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n amount={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n currency={currency}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontProps.fontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n style={currencyFontProps.style}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: the borderBottomColor error below is thrown here as well\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore- 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(React.forwardRef(_Amount), {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["stripTrailingZerosFromParts","parts","decimalPart","rawParts","filter","_ref","type","map","_ref2","value","join","hasFraction","some","_ref3","test","decimal","fraction","_ref4","pollyfilledFormatNumberByParts","options","_options$intlOptions","formatNumberByParts","intlOptions","trailingZeroDisplay","getTextColorProps","_ref5","color","props","amountValueColor","AmountValue","_ref6","amount","_ref6$size","size","_ref6$type","_ref6$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","integer","opacity","compact","getAmountByParts","_ref7","currency","_ref7$fractionDigits","fractionDigits","style","maximumFractionDigits","minimumFractionDigits","notation","roundingMode","err","concat","_Amount","_ref8","ref","_renderedValue$isPref","_renderedValue$curren","_ref8$suffix","_ref8$type","_ref8$size","_ref8$weight","_ref8$isAffixSubtle","_ref8$isStrikethrough","isStrikethrough","_ref8$currencyIndicat","currencyIndicator","_ref8$currency","_ref8$fractionDigits","testID","rest","_objectWithoutProperties","_excluded","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","_getTextColorProps","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isDesktop","renderedValue","isPrefixSymbol","currencySymbol","currencyPosition","currencySymbolOrCode","getCurrencyFontProps","hardcodedSize","currencyHardcodedSizes","currencyFontProps","BaseBox","_objectSpread","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","makeAnalyticsAttribute","alignItems","position","minusSign","marginX","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;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BAAiB,EAAEtI,IAAI,KAAK,MAAM,GAAG,MAAM,GAAG,SAAU;AACxDuI,QAAAA,iBAAiB,EAAC,OAAO;AACzBP,QAAAA,QAAQ,EAAC,UAAU;AACnBQ,QAAAA,KAAK,EAAC,MAAM;AACZC,QAAAA,GAAG,EAAC,KAAA;AAAK,OACV,CACF,CAAA;KACM,CAAA;AAAC,GAAA,CACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAEKb,IAAAA,MAAM,gBAAGc,wBAAwB,cAACjG,cAAK,CAACkG,UAAU,CAACtE,OAAO,CAAC,EAAE;AACjEuE,EAAAA,WAAW,EAAE,QAAQ;AACrBC,EAAAA,WAAW,EAAE,QAAA;AACf,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../_virtual/_commonjsHelpers.js';
2
- import { __exports as flatten$1 } from '../../../../_virtual/flatten4.js';
2
+ import { __exports as flatten$1 } from '../../../../_virtual/flatten2.js';
3
3
 
4
4
  (function (exports) {
5
5
  'use strict';
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
2
- import { __exports as flatten$1 } from '../../../../../_virtual/flatten2.js';
2
+ import { __exports as flatten$1 } from '../../../../../_virtual/flatten4.js';
3
3
  import '../../../../../_virtual/isArrayLike.js';
4
4
  import { __exports as isArrayLike } from '../../../../../_virtual/isArrayLike2.js';
5
5
 
@@ -1,10 +1,10 @@
1
1
  import { getDefaultExportFromCjs } from '../../../../../_virtual/_commonjsHelpers.js';
2
2
  import { __exports as sortBy$1 } from '../../../../../_virtual/sortBy2.js';
3
3
  import '../../../../../_virtual/orderBy.js';
4
- import '../../../../../_virtual/flatten3.js';
4
+ import '../../../../../_virtual/flatten.js';
5
5
  import '../../../../../_virtual/isIterateeCall.js';
6
6
  import { __exports as orderBy } from '../../../../../_virtual/orderBy2.js';
7
- import { __exports as flatten } from '../../../../../_virtual/flatten4.js';
7
+ import { __exports as flatten } from '../../../../../_virtual/flatten2.js';
8
8
  import { __exports as isIterateeCall } from '../../../../../_virtual/isIterateeCall2.js';
9
9
 
10
10
  (function (exports) {
@@ -5,14 +5,14 @@ import '../../../../../_virtual/keysIn.js';
5
5
  import '../../../../../_virtual/unset.js';
6
6
  import '../../../../../_virtual/getSymbolsIn.js';
7
7
  import '../../../../../_virtual/isDeepKey.js';
8
- import '../../../../../_virtual/flatten.js';
8
+ import '../../../../../_virtual/flatten3.js';
9
9
  import '../../../../../_virtual/isPlainObject.js';
10
10
  import { __exports as cloneDeepWith } from '../../../../../_virtual/cloneDeepWith2.js';
11
11
  import { __exports as keysIn } from '../../../../../_virtual/keysIn2.js';
12
12
  import { __exports as unset } from '../../../../../_virtual/unset2.js';
13
13
  import { __exports as getSymbolsIn } from '../../../../../_virtual/getSymbolsIn2.js';
14
14
  import { __exports as isDeepKey } from '../../../../../_virtual/isDeepKey2.js';
15
- import { __exports as flatten } from '../../../../../_virtual/flatten2.js';
15
+ import { __exports as flatten } from '../../../../../_virtual/flatten4.js';
16
16
  import { __exports as isPlainObject } from '../../../../../_virtual/isPlainObject2.js';
17
17
 
18
18
  (function (exports) {
@@ -6804,9 +6804,12 @@ type AmountCommonProps = {
6804
6804
  /**
6805
6805
  * Controls the number of decimal places to display when suffix is 'decimals'.
6806
6806
  *
6807
+ * Set to `'auto'` to automatically determine decimal places based on the currency
6808
+ * (e.g. JPY → 0 decimals, INR → 2 decimals, KWD → 3 decimals).
6809
+ *
6807
6810
  * @default 2
6808
6811
  */
6809
- fractionDigits?: number;
6812
+ fractionDigits?: number | 'auto';
6810
6813
  } & TestID & DataAnalyticsAttribute & StyledPropsBlade;
6811
6814
  type AmountProps = AmountTypeProps & AmountCommonProps;
6812
6815
  declare const Amount: React__default.ForwardRefExoticComponent<AmountProps & React__default.RefAttributes<BladeElementRef>>;
@@ -5923,9 +5923,12 @@ type AmountCommonProps = {
5923
5923
  /**
5924
5924
  * Controls the number of decimal places to display when suffix is 'decimals'.
5925
5925
  *
5926
+ * Set to `'auto'` to automatically determine decimal places based on the currency
5927
+ * (e.g. JPY → 0 decimals, INR → 2 decimals, KWD → 3 decimals).
5928
+ *
5926
5929
  * @default 2
5927
5930
  */
5928
- fractionDigits?: number;
5931
+ fractionDigits?: number | 'auto';
5929
5932
  } & TestID & DataAnalyticsAttribute & StyledPropsBlade;
5930
5933
  type AmountProps = AmountTypeProps & AmountCommonProps;
5931
5934
  declare const Amount: react__default.ForwardRefExoticComponent<AmountProps & react__default.RefAttributes<BladeElementRef>>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@razorpay/blade",
3
3
  "description": "The Design System that powers Razorpay",
4
- "version": "12.96.6",
4
+ "version": "12.97.0",
5
5
  "license": "MIT",
6
6
  "engines": {
7
7
  "node": ">=18.12.1"