@razorpay/blade 10.4.2 → 10.4.4

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.
@@ -2714,11 +2714,11 @@ var CardContext=React__default.createContext(null);var useVerifyInsideCard=funct
2714
2714
 
2715
2715
  var LinkOverlay=function LinkOverlay(_props){return jsx(Fragment,{});};
2716
2716
 
2717
- var CARD_SCALE_DOWN_VALUE=0.95;
2717
+ var CARD_SCALE_DOWN_VALUE=0.95;var CARD_LINK_OVERLAY_ID='card-link-overlay';
2718
2718
 
2719
2719
  var _excluded$z=["isSelected"],_excluded2=["children","onClick","isSelected","shouldScaleOnHover","href","as","accessibilityLabel"];var StyledCardRoot=styled(BaseBox)(function(_ref){var isSelected=_ref.isSelected,props=_objectWithoutProperties(_ref,_excluded$z);var selectedColor=isSelected?props.theme.colors.brand.primary[500]:'transparent';return {border:`${props.theme.border.width.thicker}px solid ${selectedColor}`};});var AnimatedPressable=Animated$1.createAnimatedComponent(Pressable);var openURL=function(){var _ref2=_asyncToGenerator(function*(href){try{var canOpen=yield Linking.canOpenURL(href);if(canOpen){yield Linking.openURL(href);}}catch(_unused){if(__DEV__){logger({type:'warn',message:`Could not open the link "href=${href}"`,moduleName:'BaseButton'});}}});return function openURL(_x){return _ref2.apply(this,arguments);};}();var _worklet_379115366763_init_data={code:"function anonymous(){const{withTiming,isPressed,CARD_SCALE_DOWN_VALUE,duration,easing}=this._closure;return{transform:[{scale:withTiming(isPressed?CARD_SCALE_DOWN_VALUE:1,{duration:duration,easing:easing})}]};}",location:"/home/runner/work/blade/blade/packages/blade/src/components/Card/CardRoot.native.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AAoDkC,SAAAA,SAAMA,CAAA,QAAAC,UAAA,CAAAC,SAAA,CAAAC,qBAAA,CAAAC,QAAA,CAAAC,MAAA,OAAAC,QAAA,CACpC,MAAO,CACLC,SAAS,CAAE,CACT,CAEEC,KAAK,CAAEP,UAAU,CAACC,SAAS,CAAGC,qBAAqB,CAAG,CAAC,CAAE,CAAEC,QAAQ,CAARA,QAAQ,CAAEC,aAAO,CAAC,CAC/E,CAAC,CAEL,CAAC,CACH\",\"names\":[\"anonymous\",\"withTiming\",\"isPressed\",\"CARD_SCALE_DOWN_VALUE\",\"duration\",\"easing\",\"_closure\",\"transform\",\"scale\"],\"sources\":[\"/home/runner/work/blade/blade/packages/blade/src/components/Card/CardRoot.native.tsx\"]}",version:"3.4.1"};var CardRoot=function CardRoot(_ref3){var children=_ref3.children,onClick=_ref3.onClick,isSelected=_ref3.isSelected,shouldScaleOnHover=_ref3.shouldScaleOnHover,href=_ref3.href;_ref3.as;var accessibilityLabel=_ref3.accessibilityLabel,props=_objectWithoutProperties(_ref3,_excluded2);var _useTheme=useTheme(),theme=_useTheme.theme;var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isPressed=_React$useState2[0],setIsPressed=_React$useState2[1];var duration=castNativeType(makeMotionTime(theme.motion.duration.xquick));var easing=castNativeType(theme.motion.easing.standard.effective);var styles=useAnimatedStyle(function(){var _e=[new global.Error(),-6,-27];var _f=function _f(){return {transform:[{scale:withTiming(isPressed?CARD_SCALE_DOWN_VALUE:1,{duration:duration,easing:easing})}]};};_f._closure={withTiming:withTiming,isPressed:isPressed,CARD_SCALE_DOWN_VALUE:CARD_SCALE_DOWN_VALUE,duration:duration,easing:easing};_f.__initData=_worklet_379115366763_init_data;_f.__workletHash=379115366763;_f.__stackDetails=_e;return _f;}(),[isPressed]);if(onClick||shouldScaleOnHover||href){return jsx(AnimatedPressable,Object.assign({},makeAccessible({role:href?'link':undefined,label:accessibilityLabel,selected:isSelected}),{style:styles,onPressIn:function onPressIn(){if(onClick){onClick();}setIsPressed(true);},onPressOut:function onPressOut(){if(href){void openURL(href);}setIsPressed(false);},children:jsx(StyledCardRoot,Object.assign({as:undefined,isSelected:isSelected},props,{children:children}))}));}return jsx(StyledCardRoot,Object.assign({as:undefined,isSelected:isSelected},props,{children:children}));};
2720
2720
 
2721
- var _excluded$y=["children","surfaceLevel","elevation","testID","padding","width","height","onClick","isSelected","accessibilityLabel","shouldScaleOnHover","onHover","href","target","rel","as"];var ComponentIds$1={CardHeader:'CardHeader',CardHeaderTrailing:'CardHeaderTrailing',CardHeaderLeading:'CardHeaderLeading',CardFooter:'CardFooter',CardFooterTrailing:'CardFooterTrailing',CardFooterLeading:'CardFooterLeading',CardBody:'CardBody',CardHeaderIcon:'CardHeaderIcon',CardHeaderCounter:'CardHeaderCounter',CardHeaderBadge:'CardHeaderBadge',CardHeaderText:'CardHeaderText',CardHeaderLink:'CardHeaderLink',CardHeaderIconButton:'CardHeaderIconButton'};var Card=function Card(_ref){var children=_ref.children,_ref$surfaceLevel=_ref.surfaceLevel,surfaceLevel=_ref$surfaceLevel===void 0?2:_ref$surfaceLevel,_ref$elevation=_ref.elevation,elevation=_ref$elevation===void 0?'lowRaised':_ref$elevation,testID=_ref.testID,_ref$padding=_ref.padding,padding=_ref$padding===void 0?'spacing.7':_ref$padding,width=_ref.width,height=_ref.height,onClick=_ref.onClick,_ref$isSelected=_ref.isSelected,isSelected=_ref$isSelected===void 0?false:_ref$isSelected,accessibilityLabel=_ref.accessibilityLabel,_ref$shouldScaleOnHov=_ref.shouldScaleOnHover,shouldScaleOnHover=_ref$shouldScaleOnHov===void 0?false:_ref$shouldScaleOnHov,onHover=_ref.onHover,href=_ref.href,target=_ref.target,rel=_ref.rel,as=_ref.as,styledProps=_objectWithoutProperties(_ref,_excluded$y);var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isFocused=_React$useState2[0],setIsFocused=_React$useState2[1];useVerifyAllowedComponents(children,'Card',[ComponentIds$1.CardHeader,ComponentIds$1.CardBody,ComponentIds$1.CardFooter]);var linkOverlayProps=Object.assign({},metaAttribute({name:'card-link-overlay'}),makeAccessible({label:accessibilityLabel,pressed:isSelected}),{onFocus:function onFocus(){setIsFocused(true);},onBlur:function onBlur(){setIsFocused(false);}});var defaultRel=target&&target==='_blank'?'noreferrer noopener':undefined;return jsx(CardProvider,{children:jsx(CardRoot,Object.assign({as:as,onMouseEnter:onHover,shouldScaleOnHover:shouldScaleOnHover,isSelected:isSelected,isFocused:isFocused,borderRadius:"medium",onClick:isReactNative$4()?onClick:undefined,width:width,height:height,href:href,accessibilityLabel:accessibilityLabel},metaAttribute({name:MetaConstants.Card,testID:testID}),getStyledProps(styledProps),{children:jsxs(CardSurface,{height:height,padding:padding,borderRadius:"medium",surfaceLevel:surfaceLevel,elevation:elevation,textAlign:'left',children:[href?jsx(LinkOverlay,Object.assign({onClick:onClick,href:href,target:target,rel:rel!=null?rel:defaultRel},linkOverlayProps)):null,!href&&onClick?jsx(LinkOverlay,Object.assign({as:"button",onClick:onClick},linkOverlayProps)):null,children]})}))});};var _CardBody=function _CardBody(_ref2){var height=_ref2.height,children=_ref2.children,testID=_ref2.testID;useVerifyInsideCard('CardBody');return jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.CardBody,testID:testID}),{height:height,children:children}));};var CardBody=assignWithoutSideEffects(_CardBody,{componentId:ComponentIds$1.CardBody});
2721
+ var _excluded$y=["children","surfaceLevel","elevation","testID","padding","width","height","onClick","isSelected","accessibilityLabel","shouldScaleOnHover","onHover","href","target","rel","as"];var ComponentIds$1={CardHeader:'CardHeader',CardHeaderTrailing:'CardHeaderTrailing',CardHeaderLeading:'CardHeaderLeading',CardFooter:'CardFooter',CardFooterTrailing:'CardFooterTrailing',CardFooterLeading:'CardFooterLeading',CardBody:'CardBody',CardHeaderIcon:'CardHeaderIcon',CardHeaderCounter:'CardHeaderCounter',CardHeaderBadge:'CardHeaderBadge',CardHeaderText:'CardHeaderText',CardHeaderLink:'CardHeaderLink',CardHeaderIconButton:'CardHeaderIconButton'};var Card=function Card(_ref){var children=_ref.children,_ref$surfaceLevel=_ref.surfaceLevel,surfaceLevel=_ref$surfaceLevel===void 0?2:_ref$surfaceLevel,_ref$elevation=_ref.elevation,elevation=_ref$elevation===void 0?'lowRaised':_ref$elevation,testID=_ref.testID,_ref$padding=_ref.padding,padding=_ref$padding===void 0?'spacing.7':_ref$padding,width=_ref.width,height=_ref.height,onClick=_ref.onClick,_ref$isSelected=_ref.isSelected,isSelected=_ref$isSelected===void 0?false:_ref$isSelected,accessibilityLabel=_ref.accessibilityLabel,_ref$shouldScaleOnHov=_ref.shouldScaleOnHover,shouldScaleOnHover=_ref$shouldScaleOnHov===void 0?false:_ref$shouldScaleOnHov,onHover=_ref.onHover,href=_ref.href,target=_ref.target,rel=_ref.rel,as=_ref.as,styledProps=_objectWithoutProperties(_ref,_excluded$y);var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isFocused=_React$useState2[0],setIsFocused=_React$useState2[1];useVerifyAllowedComponents(children,'Card',[ComponentIds$1.CardHeader,ComponentIds$1.CardBody,ComponentIds$1.CardFooter]);var linkOverlayProps=Object.assign({},metaAttribute({name:CARD_LINK_OVERLAY_ID}),makeAccessible({label:accessibilityLabel,pressed:isSelected}),{onFocus:function onFocus(){setIsFocused(true);},onBlur:function onBlur(){setIsFocused(false);}});var defaultRel=target&&target==='_blank'?'noreferrer noopener':undefined;return jsx(CardProvider,{children:jsx(CardRoot,Object.assign({as:as,onMouseEnter:onHover,shouldScaleOnHover:shouldScaleOnHover,isSelected:isSelected,isFocused:isFocused,borderRadius:"medium",onClick:isReactNative$4()?onClick:undefined,width:width,height:height,href:href,accessibilityLabel:accessibilityLabel},metaAttribute({name:MetaConstants.Card,testID:testID}),getStyledProps(styledProps),{children:jsxs(CardSurface,{height:height,padding:padding,borderRadius:"medium",surfaceLevel:surfaceLevel,elevation:elevation,textAlign:'left',children:[href?jsx(LinkOverlay,Object.assign({onClick:onClick,href:href,target:target,rel:rel!=null?rel:defaultRel},linkOverlayProps)):null,!href&&onClick?jsx(LinkOverlay,Object.assign({as:"button",onClick:onClick},linkOverlayProps)):null,children]})}))});};var _CardBody=function _CardBody(_ref2){var height=_ref2.height,children=_ref2.children,testID=_ref2.testID;useVerifyInsideCard('CardBody');return jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.CardBody,testID:testID}),{height:height,children:children}));};var CardBody=assignWithoutSideEffects(_CardBody,{componentId:ComponentIds$1.CardBody});
2722
2722
 
2723
2723
  var _excluded$x=["children","icon","iconPosition","isDisabled","onClick","variant","href","target","rel","accessibilityLabel","size","testID","hitSlop","htmlTitle","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd"];var _Link=function _Link(_ref,ref){var children=_ref.children,icon=_ref.icon,_ref$iconPosition=_ref.iconPosition,iconPosition=_ref$iconPosition===void 0?'left':_ref$iconPosition,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,onClick=_ref.onClick,_ref$variant=_ref.variant,variant=_ref$variant===void 0?'anchor':_ref$variant,href=_ref.href,target=_ref.target,rel=_ref.rel,accessibilityLabel=_ref.accessibilityLabel,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,testID=_ref.testID,hitSlop=_ref.hitSlop,htmlTitle=_ref.htmlTitle,onBlur=_ref.onBlur,onFocus=_ref.onFocus,onMouseLeave=_ref.onMouseLeave,onMouseMove=_ref.onMouseMove,onPointerDown=_ref.onPointerDown,onPointerEnter=_ref.onPointerEnter,onTouchStart=_ref.onTouchStart,onTouchEnd=_ref.onTouchEnd,rest=_objectWithoutProperties(_ref,_excluded$x);return jsx(BaseLink,Object.assign({},icon?{icon:icon,children:children}:{children:children},variant==='anchor'?{variant:variant,href:href,target:target,rel:rel}:{variant:variant,isDisabled:isDisabled},{ref:ref,iconPosition:iconPosition,onClick:onClick,accessibilityProps:{label:accessibilityLabel,describedBy:rest['aria-describedby']},size:size,testID:testID,hitSlop:hitSlop,htmlTitle:htmlTitle,onBlur:onBlur,onFocus:onFocus,onMouseLeave:onMouseLeave,onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onTouchStart:onTouchStart,onTouchEnd:onTouchEnd},getStyledProps(rest)));};var Link=assignWithoutSideEffects(React__default.forwardRef(_Link),{displayName:'Link',componentId:'Link'});
2724
2724
 
@@ -3121,7 +3121,7 @@ var _excluded$4=["contrast","width","maxWidth","minWidth","height","maxHeight","
3121
3121
 
3122
3122
  var affixFontSizes={'body-small':75,'body-small-bold':75,'body-medium':75,'body-medium-bold':75,'heading-small':75,'heading-small-bold':75,'heading-large':100,'heading-large-bold':100,'title-small':300,'title-medium':400};var amountFontSizes={'body-small':75,'body-small-bold':75,'body-medium':100,'body-medium-bold':100,'heading-small':200,'heading-small-bold':200,'heading-large':400,'heading-large-bold':400,'title-small':600,'title-medium':700};var amountLineHeights={'body-small':50,'body-small-bold':50,'body-medium':100,'body-medium-bold':100,'heading-small':300,'heading-small-bold':300,'heading-large':400,'heading-large-bold':400,'title-small':500,'title-medium':600};var currencyPrefixMapping={AED:{'currency-symbol':'د.إ','currency-code':'AED'},ALL:{'currency-symbol':'Lek','currency-code':'ALL'},AMD:{'currency-symbol':'֏','currency-code':'AMD'},ARS:{'currency-symbol':'ARS','currency-code':'ARS'},AUD:{'currency-symbol':'A$','currency-code':'AUD'},AWG:{'currency-symbol':'Afl.','currency-code':'AWG'},BBD:{'currency-symbol':'$','currency-code':'BBD'},BDT:{'currency-symbol':'৳','currency-code':'BDT'},BMD:{'currency-symbol':'$','currency-code':'BMD'},BND:{'currency-symbol':'BND','currency-code':'BND'},BOB:{'currency-symbol':'Bs','currency-code':'BOB'},BSD:{'currency-symbol':'B$','currency-code':'BSD'},BWP:{'currency-symbol':'P','currency-code':'BWP'},BZD:{'currency-symbol':'BZ$','currency-code':'BZD'},CAD:{'currency-symbol':'C$','currency-code':'CAD'},CHF:{'currency-symbol':'CHf','currency-code':'CHF'},CNY:{'currency-symbol':'¥','currency-code':'CNY'},COP:{'currency-symbol':'COL$','currency-code':'COP'},CRC:{'currency-symbol':'₡','currency-code':'CRC'},CUP:{'currency-symbol':'$MN','currency-code':'CUP'},CZK:{'currency-symbol':'Kč','currency-code':'CZK'},DKK:{'currency-symbol':'DKK','currency-code':'DKK'},DOP:{'currency-symbol':'RD$','currency-code':'DOP'},DZD:{'currency-symbol':'د.ج','currency-code':'DZD'},EGP:{'currency-symbol':'E£','currency-code':'EGP'},ETB:{'currency-symbol':'ብር','currency-code':'ETB'},EUR:{'currency-symbol':'€','currency-code':'EUR'},FJD:{'currency-symbol':'FJ$','currency-code':'FJD'},GBP:{'currency-symbol':'£','currency-code':'GBP'},GHS:{'currency-symbol':'GH₵','currency-code':'GHS'},GIP:{'currency-symbol':'GIP','currency-code':'GIP'},GMD:{'currency-symbol':'D','currency-code':'GMD'},GTQ:{'currency-symbol':'Q','currency-code':'GTQ'},GYD:{'currency-symbol':'G$','currency-code':'GYD'},HKD:{'currency-symbol':'HK$','currency-code':'HKD'},HNL:{'currency-symbol':'HNL','currency-code':'HNL'},HRK:{'currency-symbol':'kn','currency-code':'HRK'},HTG:{'currency-symbol':'G','currency-code':'HTG'},HUF:{'currency-symbol':'Ft','currency-code':'HUF'},IDR:{'currency-symbol':'Rp','currency-code':'IDR'},ILS:{'currency-symbol':'₪','currency-code':'ILS'},INR:{'currency-symbol':'₹','currency-code':'INR'},JMD:{'currency-symbol':'J$','currency-code':'JMD'},KES:{'currency-symbol':'Ksh','currency-code':'KES'},KGS:{'currency-symbol':'Лв','currency-code':'KGS'},KHR:{'currency-symbol':'៛','currency-code':'KHR'},KYD:{'currency-symbol':'CI$','currency-code':'KYD'},KZT:{'currency-symbol':'₸','currency-code':'KZT'},LAK:{'currency-symbol':'₭','currency-code':'LAK'},LKR:{'currency-symbol':'රු','currency-code':'LKR'},LRD:{'currency-symbol':'L$','currency-code':'LRD'},LSL:{'currency-symbol':'LSL','currency-code':'LSL'},MAD:{'currency-symbol':'د.م.','currency-code':'MAD'},MDL:{'currency-symbol':'MDL','currency-code':'MDL'},MKD:{'currency-symbol':'ден','currency-code':'MKD'},MMK:{'currency-symbol':'MMK','currency-code':'MMK'},MNT:{'currency-symbol':'₮','currency-code':'MNT'},MOP:{'currency-symbol':'MOP$','currency-code':'MOP'},MUR:{'currency-symbol':'₨','currency-code':'MUR'},MVR:{'currency-symbol':'Rf','currency-code':'MVR'},MWK:{'currency-symbol':'MK','currency-code':'MWK'},MXN:{'currency-symbol':'Mex$','currency-code':'MXN'},MYR:{'currency-symbol':'RM','currency-code':'MYR'},NAD:{'currency-symbol':'N$','currency-code':'NAD'},NGN:{'currency-symbol':'₦','currency-code':'NGN'},NIO:{'currency-symbol':'NIO','currency-code':'NIO'},NOK:{'currency-symbol':'NOK','currency-code':'NOK'},NPR:{'currency-symbol':'रू','currency-code':'NPR'},NZD:{'currency-symbol':'NZ$','currency-code':'NZD'},PEN:{'currency-symbol':'S/','currency-code':'PEN'},PGK:{'currency-symbol':'PGK','currency-code':'PGK'},PHP:{'currency-symbol':'₱','currency-code':'PHP'},PKR:{'currency-symbol':'₨','currency-code':'PKR'},QAR:{'currency-symbol':'QR','currency-code':'QAR'},RUB:{'currency-symbol':'₽','currency-code':'RUB'},SAR:{'currency-symbol':'SR','currency-code':'SAR'},SCR:{'currency-symbol':'SRe','currency-code':'SCR'},SEK:{'currency-symbol':'SEK','currency-code':'SEK'},SGD:{'currency-symbol':'S$','currency-code':'SGD'},SLL:{'currency-symbol':'Le','currency-code':'SLL'},SOS:{'currency-symbol':'Sh.so.','currency-code':'SOS'},SSP:{'currency-symbol':'SS£','currency-code':'SSP'},SVC:{'currency-symbol':'₡','currency-code':'SVC'},SZL:{'currency-symbol':'E','currency-code':'SZL'},THB:{'currency-symbol':'฿','currency-code':'THB'},TTD:{'currency-symbol':'TT$','currency-code':'TTD'},TZS:{'currency-symbol':'Sh','currency-code':'TZS'},USD:{'currency-symbol':'$','currency-code':'USD'},UYU:{'currency-symbol':'$U','currency-code':'UYU'},UZS:{'currency-symbol':"so'm",'currency-code':'UZS'},YER:{'currency-symbol':'﷼','currency-code':'YER'},ZAR:{'currency-symbol':'R','currency-code':'ZAR'},KWD:{'currency-symbol':'د.ك','currency-code':'KWD'},BHD:{'currency-symbol':'د.ب.','currency-code':'BHD'},OMR:{'currency-symbol':'ر.ع.','currency-code':'OMR'}};var getCurrencyAbbreviations=function getCurrencyAbbreviations(currency){if(currency==='INR'){return [{value:1e7,symbol:'Cr'},{value:1e5,symbol:'L'},{value:1e3,symbol:'k'}];}return [{value:1e9,symbol:'B'},{value:1e6,symbol:'M'},{value:1e3,symbol:'K'}];};
3123
3123
 
3124
- var _excluded$3=["value","suffix","size","isAffixSubtle","intent","prefix","testID","currency"];var getTextColorProps=function getTextColorProps(_ref){var intent=_ref.intent;var props={amountValueColor:'surface.text.normal.lowContrast',affixColor:'surface.text.muted.lowContrast'};if(!intent)return props;props.amountValueColor=`feedback.text.${intent}.lowContrast`;props.affixColor=`feedback.text.${intent}.lowContrast`;return props;};var AmountValue=function AmountValue(_ref2){var value=_ref2.value,size=_ref2.size,amountValueColor=_ref2.amountValueColor,isAffixSubtle=_ref2.isAffixSubtle,suffix=_ref2.suffix,affixColor=_ref2.affixColor;var affixFontWeight=isAffixSubtle?'regular':'bold';var isReactNative=getPlatformType()==='react-native';var affixFontSize=isAffixSubtle?affixFontSizes[size]:amountFontSizes[size];var valueForWeight=size.includes('bold')||size.startsWith('title')?'bold':'regular';if(suffix==='decimals'&&isAffixSubtle){var integer=value.split('.')[0];var decimal=value.split('.')[1];var AmountWrapper=getPlatformType()==='react-native'?BaseText:React__default.Fragment;return jsxs(AmountWrapper,{children:[jsxs(BaseText,{fontSize:amountFontSizes[size],fontWeight:valueForWeight,lineHeight:amountLineHeights[size],color:amountValueColor,as:isReactNative?undefined:'span',children:[integer,"."]}),jsx(BaseText,{marginLeft:"spacing.1",fontWeight:affixFontWeight,fontSize:affixFontSize,color:affixColor,as:isReactNative?undefined:'span',children:decimal||'00'})]});}return jsx(BaseText,{fontSize:amountFontSizes[size],fontWeight:valueForWeight,color:amountValueColor,lineHeight:amountLineHeights[size],children:value});};var getFlooredFixed=function getFlooredFixed(value,decimalPlaces){var factor=100**decimalPlaces;var roundedValue=Math.floor(value*factor)/factor;return Number(roundedValue.toFixed(decimalPlaces));};var addCommas=function addCommas(amountValue,currency){var decimalPlaces=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var locale=currency==='INR'?'en-IN':'en-US';return amountValue.toLocaleString(locale,{minimumFractionDigits:decimalPlaces});};var getHumanizedAmount=function getHumanizedAmount(amountValue,currency){var abbreviations=getCurrencyAbbreviations(currency);var abbreviation=abbreviations.find(function(abbr){return amountValue>=abbr.value;});if(abbreviation){amountValue=amountValue/abbreviation.value;var formattedAmountValue=getFlooredFixed(amountValue,2);return addCommas(formattedAmountValue,currency)+abbreviation.symbol;}else {return amountValue.toString();}};var formatAmountWithSuffix=function formatAmountWithSuffix(_ref3){var suffix=_ref3.suffix,value=_ref3.value,currency=_ref3.currency;switch(suffix){case'decimals':{var decimalNumber=getFlooredFixed(value,2);return addCommas(decimalNumber,currency,2);}case'humanize':{return getHumanizedAmount(value,currency);}case'none':{return addCommas(getFlooredFixed(value,0),currency);}default:return addCommas(getFlooredFixed(value,0),currency);}};var getCurrencyWeight=function getCurrencyWeight(isAffixSubtle,size){if(isAffixSubtle||size.startsWith('bold'))return 'bold';return 'regular';};var _Amount=function _Amount(_ref4){var value=_ref4.value,_ref4$suffix=_ref4.suffix,suffix=_ref4$suffix===void 0?'decimals':_ref4$suffix,_ref4$size=_ref4.size,size=_ref4$size===void 0?'body-medium':_ref4$size,_ref4$isAffixSubtle=_ref4.isAffixSubtle,isAffixSubtle=_ref4$isAffixSubtle===void 0?true:_ref4$isAffixSubtle,intent=_ref4.intent,_ref4$prefix=_ref4.prefix,prefix=_ref4$prefix===void 0?'currency-symbol':_ref4$prefix,testID=_ref4.testID,_ref4$currency=_ref4.currency,currency=_ref4$currency===void 0?'INR':_ref4$currency,styledProps=_objectWithoutProperties(_ref4,_excluded$3);if(__DEV__){if(typeof value!=='number'){throwBladeError({message:'`value` prop must be of type `number` for Amount.',moduleName:'Amount'});}if(intent==='neutral'){throwBladeError({message:'`neutral` intent is not supported.',moduleName:'Amount'});}}var currencyPrefix=currencyPrefixMapping[currency][prefix];var renderedValue=formatAmountWithSuffix({suffix:suffix,value:value,currency:currency});var _getTextColorProps=getTextColorProps({intent:intent}),amountValueColor=_getTextColorProps.amountValueColor,affixColor=_getTextColorProps.affixColor;var currencyColor=isAffixSubtle?affixColor:amountValueColor;var currencyFontSize=isAffixSubtle?affixFontSizes[size]:amountFontSizes[size];var currencyWeight=getCurrencyWeight(isAffixSubtle,size);var isReactNative=getPlatformType()==='react-native';return jsx(BaseBox,Object.assign({display:isReactNative?castNativeType('flex'):castWebType('inline-flex')},metaAttribute({name:MetaConstants.Amount,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,{paddingLeft:"spacing.2",paddingRight:"spacing.2",display:isReactNative?castNativeType('flex'):castWebType('inline-flex'),alignItems:"baseline",flexDirection:"row",children:[jsx(BaseText,{marginRight:"spacing.1",fontWeight:currencyWeight,fontSize:currencyFontSize,color:currencyColor,as:isReactNative?undefined:'span',children:currencyPrefix}),jsx(AmountValue,{value:renderedValue,amountValueColor:amountValueColor,size:size,isAffixSubtle:isAffixSubtle,suffix:suffix,affixColor:affixColor})]})}));};var Amount=assignWithoutSideEffects(_Amount,{displayName:'Amount',componentId:'Amount'});
3124
+ var _excluded$3=["value","suffix","size","isAffixSubtle","intent","prefix","testID","currency"];var getTextColorProps=function getTextColorProps(_ref){var intent=_ref.intent;var props={amountValueColor:'surface.text.normal.lowContrast',affixColor:'surface.text.muted.lowContrast'};if(!intent)return props;props.amountValueColor=`feedback.text.${intent}.lowContrast`;props.affixColor=`feedback.text.${intent}.lowContrast`;return props;};var AmountValue=function AmountValue(_ref2){var value=_ref2.value,size=_ref2.size,amountValueColor=_ref2.amountValueColor,isAffixSubtle=_ref2.isAffixSubtle,suffix=_ref2.suffix,affixColor=_ref2.affixColor;var affixFontWeight=isAffixSubtle?'regular':'bold';var isReactNative=getPlatformType()==='react-native';var affixFontSize=isAffixSubtle?affixFontSizes[size]:amountFontSizes[size];var valueForWeight=size.includes('bold')||size.startsWith('title')?'bold':'regular';if(suffix==='decimals'&&isAffixSubtle){var integer=value.split('.')[0];var decimal=value.split('.')[1];var AmountWrapper=getPlatformType()==='react-native'?BaseText:React__default.Fragment;return jsxs(AmountWrapper,{children:[jsxs(BaseText,{fontSize:amountFontSizes[size],fontWeight:valueForWeight,lineHeight:amountLineHeights[size],color:amountValueColor,as:isReactNative?undefined:'span',children:[integer,"."]}),jsx(BaseText,{marginLeft:"spacing.1",fontWeight:affixFontWeight,fontSize:affixFontSize,color:affixColor,as:isReactNative?undefined:'span',children:decimal||'00'})]});}return jsx(BaseText,{fontSize:amountFontSizes[size],fontWeight:valueForWeight,color:amountValueColor,lineHeight:amountLineHeights[size],children:value});};var getFlooredFixed=function getFlooredFixed(value,decimalPlaces){var factor=100**decimalPlaces;var roundedValue=Math.floor(value*factor)/factor;return Number(roundedValue.toFixed(decimalPlaces));};var addCommas=function addCommas(amountValue,currency){var decimalPlaces=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var locale=currency==='INR'?'en-IN':'en-US';return amountValue.toLocaleString(locale,{minimumFractionDigits:decimalPlaces});};var getHumanizedAmount=function getHumanizedAmount(amountValue,currency){var abbreviations=getCurrencyAbbreviations(currency);var abbreviation=abbreviations.find(function(abbr){return amountValue>=abbr.value;});if(abbreviation){amountValue=amountValue/abbreviation.value;var formattedAmountValue=getFlooredFixed(amountValue,2);return addCommas(formattedAmountValue,currency)+abbreviation.symbol;}else {return amountValue.toString();}};var formatAmountWithSuffix=function formatAmountWithSuffix(_ref3){var suffix=_ref3.suffix,value=_ref3.value,currency=_ref3.currency;switch(suffix){case'decimals':{var decimalNumber=getFlooredFixed(value,2);return addCommas(decimalNumber,currency,2);}case'humanize':{return getHumanizedAmount(value,currency);}case'none':{return addCommas(getFlooredFixed(value,0),currency);}default:return addCommas(getFlooredFixed(value,0),currency);}};var getCurrencyWeight=function getCurrencyWeight(isAffixSubtle,size){if(isAffixSubtle||size.startsWith('bold'))return 'bold';return 'regular';};var _Amount=function _Amount(_ref4){var value=_ref4.value,_ref4$suffix=_ref4.suffix,suffix=_ref4$suffix===void 0?'decimals':_ref4$suffix,_ref4$size=_ref4.size,size=_ref4$size===void 0?'body-medium':_ref4$size,_ref4$isAffixSubtle=_ref4.isAffixSubtle,isAffixSubtle=_ref4$isAffixSubtle===void 0?true:_ref4$isAffixSubtle,intent=_ref4.intent,_ref4$prefix=_ref4.prefix,prefix=_ref4$prefix===void 0?'currency-symbol':_ref4$prefix,testID=_ref4.testID,_ref4$currency=_ref4.currency,currency=_ref4$currency===void 0?'INR':_ref4$currency,styledProps=_objectWithoutProperties(_ref4,_excluded$3);if(__DEV__){if(typeof value!=='number'){throwBladeError({message:'`value` prop must be of type `number` for Amount.',moduleName:'Amount'});}if(intent==='neutral'){throwBladeError({message:'`neutral` intent is not supported.',moduleName:'Amount'});}}var currencyPrefix=currencyPrefixMapping[currency][prefix];var renderedValue=formatAmountWithSuffix({suffix:suffix,value:value,currency:currency});var _getTextColorProps=getTextColorProps({intent:intent}),amountValueColor=_getTextColorProps.amountValueColor,affixColor=_getTextColorProps.affixColor;var currencyColor=isAffixSubtle?affixColor:amountValueColor;var currencyFontSize=isAffixSubtle?affixFontSizes[size]:amountFontSizes[size];var currencyWeight=getCurrencyWeight(isAffixSubtle,size);var isReactNative=getPlatformType()==='react-native';return jsx(BaseBox,Object.assign({display:isReactNative?'flex':'inline-flex'},metaAttribute({name:MetaConstants.Amount,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,{display:isReactNative?'flex':'inline-flex',alignItems:"baseline",flexDirection:"row",children:[jsx(BaseText,{marginRight:"spacing.1",fontWeight:currencyWeight,fontSize:currencyFontSize,color:currencyColor,as:isReactNative?undefined:'span',children:currencyPrefix}),jsx(AmountValue,{value:renderedValue,amountValueColor:amountValueColor,size:size,isAffixSubtle:isAffixSubtle,suffix:suffix,affixColor:affixColor})]})}));};var Amount=assignWithoutSideEffects(_Amount,{displayName:'Amount',componentId:'Amount'});
3125
3125
 
3126
3126
  var BottomSheetEmptyHeader=React__default.forwardRef(function(_ref,ref){var onClickCapture=_ref.onClickCapture,onKeyDown=_ref.onKeyDown,onKeyUp=_ref.onKeyUp,onLostPointerCapture=_ref.onLostPointerCapture,onPointerCancel=_ref.onPointerCancel,onPointerDown=_ref.onPointerDown,onPointerMove=_ref.onPointerMove,onPointerUp=_ref.onPointerUp;var _useBottomSheetContex=useBottomSheetContext(),close=_useBottomSheetContex.close,isHeaderFloating=_useBottomSheetContex.isHeaderFloating;var _useTheme=useTheme(),theme=_useTheme.theme;var webOnlyEventHandlers=isReactNative$4()?{}:{onClickCapture:onClickCapture,onKeyDown:onKeyDown,onKeyUp:onKeyUp,onLostPointerCapture:onLostPointerCapture,onPointerCancel:onPointerCancel,onPointerDown:onPointerDown,onPointerMove:onPointerMove,onPointerUp:onPointerUp};var topOffset=isHeaderFloating?'spacing.5':undefined;if(isReactNative$4()){topOffset='spacing.0';}return jsx(BaseBox,Object.assign({position:isHeaderFloating?'absolute':'relative',height:makeSize(size[8]),touchAction:"none",top:topOffset,right:"spacing.0"},webOnlyEventHandlers,{children:jsx(BaseBox,{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:isHeaderFloating?'spacing.0':makeSpace(-size[4]),right:"spacing.5",width:makeSize(size[28]),height:makeSize(size[28]),flexShrink:0,backgroundColor:theme.colors.surface.background.level2.lowContrast,borderRadius:"max",zIndex:100,children:jsx(IconButton,{ref:ref,size:"large",icon:CloseIcon,accessibilityLabel:"Close",onClick:close})})}));});
3127
3127