@razorpay/blade 10.10.0 → 10.12.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.
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default, { useMemo, useCallback, useState, useEffect, useRef, createContext, useContext, Fragment as Fragment$1, Children, cloneElement, forwardRef } from 'react';
2
+ import React__default, { useMemo, useCallback, useState, useEffect, useRef, createContext, useContext, Fragment as Fragment$1, useImperativeHandle, Children, cloneElement, forwardRef } from 'react';
3
3
  import { Appearance, Platform, SectionList, TouchableOpacity, Animated, View, Image, Pressable, Linking, AccessibilityInfo, ScrollView, TouchableWithoutFeedback, Dimensions, Keyboard, findNodeHandle, StyleSheet, Modal as Modal$1 } from 'react-native';
4
4
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
5
5
  import GorhomBottomSheet, { BottomSheetSectionList, BottomSheetScrollView, BottomSheetBackdrop as BottomSheetBackdrop$1, BottomSheetFooter as BottomSheetFooter$1 } from '@gorhom/bottom-sheet';
@@ -57,11 +57,11 @@ var ThemeContext=createContext({theme:null,colorScheme:'light',platform:'onDeskt
57
57
 
58
58
  var isRoleMenu=function isRoleMenu(dropdownTriggerer){return isReactNative$4()||dropdownTriggerer!==dropdownComponentIds.triggers.SelectInput&&dropdownTriggerer!==dropdownComponentIds.triggers.AutoComplete;};var getActionListContainerRole=function getActionListContainerRole(hasFooterAction,dropdownTriggerer){if(isReactNative$4()){return 'menu';}if(hasFooterAction){return 'dialog';}if(isRoleMenu(dropdownTriggerer)){return 'menu';}return 'listbox';};var getActionListSectionRole=function getActionListSectionRole(){if(isReactNative$4()){return undefined;}return 'group';};var getActionListItemWrapperRole=function getActionListItemWrapperRole(hasFooterAction,dropdownTriggerer){if(isRoleMenu(dropdownTriggerer)){return undefined;}if(hasFooterAction){return 'listbox';}return undefined;};var getActionListItemRole=function getActionListItemRole(dropdownTriggerer,href,selectionType){if(href){return 'link';}if(isRoleMenu(dropdownTriggerer)){if(selectionType==='multiple'){return 'menuitemcheckbox';}return 'menuitem';}return 'option';};
59
59
 
60
- var componentIds={ActionList:'ActionList',ActionListItem:'ActionListItem',ActionListItemAsset:'ActionListItemAsset',ActionListItemIcon:'ActionListItemIcon',ActionListItemText:'ActionListItemText',ActionListSection:'ActionListSection'};
60
+ var componentIds={ActionList:'ActionList',ActionListItem:'ActionListItem',ActionListItemBadge:'ActionListItemBadge',ActionListItemBadgeGroup:'ActionListItemBadgeGroup',ActionListItemAsset:'ActionListItemAsset',ActionListItemIcon:'ActionListItemIcon',ActionListItemText:'ActionListItemText',ActionListSection:'ActionListSection'};
61
61
 
62
62
  var getComponentId=function getComponentId(component){var _component$props,_component$props2,_component$props2$ori,_component$type;if(!React__default.isValidElement(component))return null;if(component!=null&&(_component$props=component.props)!=null&&_component$props.mdxType&&component!=null&&(_component$props2=component.props)!=null&&(_component$props2$ori=_component$props2.originalType)!=null&&_component$props2$ori.componentId){return component.props.originalType.componentId;}return (_component$type=component.type)==null?void 0:_component$type.componentId;};var isValidAllowedChildren=function isValidAllowedChildren(component,id){return getComponentId(component)===id;};
63
63
 
64
- var getActionListSectionPosition=function getActionListSectionPosition(children){var childComponentIdArray=React__default.Children.toArray(children).map(function(child){return getComponentId(child);});var lastActionListSectionIndex=childComponentIdArray.lastIndexOf(componentIds.ActionListSection);var isActionListItemPresentAfterSection=childComponentIdArray.slice(lastActionListSectionIndex).includes(componentIds.ActionListItem);return {isActionListItemPresentAfterSection:isActionListItemPresentAfterSection,lastActionListSectionIndex:lastActionListSectionIndex};};var actionListAllowedChildren=[componentIds.ActionListItem,componentIds.ActionListSection];var getActionListProperties=function getActionListProperties(children){var sectionData=[];var currentSection=null;var actionListOptions=[];var getActionListItemWithId=function getActionListItemWithId(child,hideDivider){if(React__default.isValidElement(child)&&!child.props.isDisabled){actionListOptions.push({title:child.props.title,value:child.props.value,onClickTrigger:function onClickTrigger(value){var _child$props$isSelect;var anchorLink=child.props.href;child.props.onClick==null?void 0:child.props.onClick({name:child.props.value,value:(_child$props$isSelect=child.props.isSelected)!=null?_child$props$isSelect:value});if(anchorLink&&!isReactNative$4()){var _child$props$target;var target=(_child$props$target=child.props.target)!=null?_child$props$target:'_self';window.open(anchorLink,target);if(window.top){window.top.open(anchorLink,target);}}}});var currentIndex=actionListOptions.length-1;var foundSection=sectionData.find(function(v){return v.title===currentSection;});if(foundSection){foundSection==null?void 0:foundSection.data.push(Object.assign({},child.props,{_index:currentIndex}));}else {sectionData.push({title:currentSection,hideDivider:hideDivider,data:[Object.assign({},child.props,{_index:currentIndex})]});}var clonedChild=React__default.cloneElement(child,{_index:currentIndex});return clonedChild;}return child;};var isActionListItemPresentAfterSection;var lastActionListSectionIndex;if(isReactNative$4()){var _getActionListSection=getActionListSectionPosition(children);isActionListItemPresentAfterSection=_getActionListSection.isActionListItemPresentAfterSection;lastActionListSectionIndex=_getActionListSection.lastActionListSectionIndex;}var childrenWithId=React__default.Children.map(children,function(child,index){if(React__default.isValidElement(child)){if(isValidAllowedChildren(child,componentIds.ActionListSection)){var shouldHideDivider=index===lastActionListSectionIndex&&!isActionListItemPresentAfterSection;return React__default.cloneElement(child,{children:React__default.Children.map(child.props.children,function(childInSection){currentSection=child.props.title;if(isValidAllowedChildren(childInSection,componentIds.ActionListItem)){return getActionListItemWithId(childInSection,shouldHideDivider);}return childInSection;}),_hideDivider:isReactNative$4()?shouldHideDivider:undefined});}if(isValidAllowedChildren(child,componentIds.ActionListItem)){return getActionListItemWithId(child,true);}if(__DEV__){throwBladeError({message:`Only ${actionListAllowedChildren.join(', ')} supported inside ActionList`,moduleName:'ActionList'});}}return child;});return {sectionData:sectionData,childrenWithId:childrenWithId,actionListOptions:actionListOptions};};var validateActionListItemProps=function validateActionListItemProps(_ref){var leading=_ref.leading,trailing=_ref.trailing;if(__DEV__){React__default.Children.map(trailing,function(child){if(!isValidAllowedChildren(child,componentIds.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds.ActionListItemText)){throwBladeError({message:`Only ${componentIds.ActionListItemIcon} and ${componentIds.ActionListItemText} are allowed in trailing prop`,moduleName:'ActionListItem'});}});React__default.Children.map(leading,function(child){if(!isValidAllowedChildren(child,componentIds.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds.ActionListItemText)&&!isValidAllowedChildren(child,componentIds.ActionListItemAsset)){throwBladeError({message:`Only ${componentIds.ActionListItemIcon}, ${componentIds.ActionListItemAsset}, and ${componentIds.ActionListItemText} are allowed in leading prop`,moduleName:'ActionListItem'});}});}};var getNormalTextColor=function getNormalTextColor(isDisabled){var _ref2=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},isMuted=_ref2.isMuted;if(isDisabled){return 'surface.text.placeholder.lowContrast';}if(isMuted){return 'surface.text.muted.lowContrast';}return 'surface.text.normal.lowContrast';};
64
+ var getActionListSectionPosition=function getActionListSectionPosition(children){var childComponentIdArray=React__default.Children.toArray(children).map(function(child){return getComponentId(child);});var lastActionListSectionIndex=childComponentIdArray.lastIndexOf(componentIds.ActionListSection);var isActionListItemPresentAfterSection=childComponentIdArray.slice(lastActionListSectionIndex).includes(componentIds.ActionListItem);return {isActionListItemPresentAfterSection:isActionListItemPresentAfterSection,lastActionListSectionIndex:lastActionListSectionIndex};};var actionListAllowedChildren=[componentIds.ActionListItem,componentIds.ActionListSection];var getActionListProperties=function getActionListProperties(children){var sectionData=[];var currentSection=null;var actionListOptions=[];var getActionListItemWithId=function getActionListItemWithId(child,hideDivider){if(React__default.isValidElement(child)&&!child.props.isDisabled){actionListOptions.push({title:child.props.title,value:child.props.value,onClickTrigger:function onClickTrigger(value){var _child$props$isSelect;var anchorLink=child.props.href;child.props.onClick==null?void 0:child.props.onClick({name:child.props.value,value:(_child$props$isSelect=child.props.isSelected)!=null?_child$props$isSelect:value});if(anchorLink&&!isReactNative$4()){var _child$props$target;var target=(_child$props$target=child.props.target)!=null?_child$props$target:'_self';window.open(anchorLink,target);if(window.top){window.top.open(anchorLink,target);}}}});var currentIndex=actionListOptions.length-1;var foundSection=sectionData.find(function(v){return v.title===currentSection;});if(foundSection){foundSection==null?void 0:foundSection.data.push(Object.assign({},child.props,{_index:currentIndex}));}else {sectionData.push({title:currentSection,hideDivider:hideDivider,data:[Object.assign({},child.props,{_index:currentIndex})]});}var clonedChild=React__default.cloneElement(child,{_index:currentIndex});return clonedChild;}return child;};var isActionListItemPresentAfterSection;var lastActionListSectionIndex;if(isReactNative$4()){var _getActionListSection=getActionListSectionPosition(children);isActionListItemPresentAfterSection=_getActionListSection.isActionListItemPresentAfterSection;lastActionListSectionIndex=_getActionListSection.lastActionListSectionIndex;}var childrenWithId=React__default.Children.map(children,function(child,index){if(React__default.isValidElement(child)){if(isValidAllowedChildren(child,componentIds.ActionListSection)){var shouldHideDivider=index===lastActionListSectionIndex&&!isActionListItemPresentAfterSection;return React__default.cloneElement(child,{children:React__default.Children.map(child.props.children,function(childInSection){currentSection=child.props.title;if(isValidAllowedChildren(childInSection,componentIds.ActionListItem)){return getActionListItemWithId(childInSection,shouldHideDivider);}return childInSection;}),_hideDivider:isReactNative$4()?shouldHideDivider:undefined});}if(isValidAllowedChildren(child,componentIds.ActionListItem)){return getActionListItemWithId(child,true);}if(__DEV__){throwBladeError({message:`Only ${actionListAllowedChildren.join(', ')} supported inside ActionList`,moduleName:'ActionList'});}}return child;});return {sectionData:sectionData,childrenWithId:childrenWithId,actionListOptions:actionListOptions};};var validateActionListItemProps=function validateActionListItemProps(_ref){var leading=_ref.leading,trailing=_ref.trailing,titleSuffix=_ref.titleSuffix;if(__DEV__){React__default.Children.map(trailing,function(child){if(!isValidAllowedChildren(child,componentIds.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds.ActionListItemText)){throwBladeError({message:`Only ${componentIds.ActionListItemIcon} and ${componentIds.ActionListItemText} are allowed in trailing prop`,moduleName:'ActionListItem'});}});React__default.Children.map(titleSuffix,function(child){if(!isValidAllowedChildren(child,componentIds.ActionListItemBadge)&&!isValidAllowedChildren(child,componentIds.ActionListItemBadgeGroup)){throwBladeError({message:`Only ${componentIds.ActionListItemBadge} and ${componentIds.ActionListItemBadgeGroup} are allowed in titleSuffix prop`,moduleName:'ActionListItem'});}});React__default.Children.map(leading,function(child){if(!isValidAllowedChildren(child,componentIds.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds.ActionListItemText)&&!isValidAllowedChildren(child,componentIds.ActionListItemAsset)){throwBladeError({message:`Only ${componentIds.ActionListItemIcon}, ${componentIds.ActionListItemAsset}, and ${componentIds.ActionListItemText} are allowed in leading prop`,moduleName:'ActionListItem'});}});}};var getNormalTextColor=function getNormalTextColor(isDisabled){var _ref2=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},isMuted=_ref2.isMuted;if(isDisabled){return 'surface.text.placeholder.lowContrast';}if(isMuted){return 'surface.text.muted.lowContrast';}return 'surface.text.normal.lowContrast';};
65
65
 
66
66
  var breakpoints={base:0,xs:320,s:480,m:768,l:1024,xl:1200};
67
67
 
@@ -1987,7 +1987,7 @@ var isEmpty$1 = /*@__PURE__*/getDefaultExportFromCjs(isEmpty_1);
1987
1987
 
1988
1988
  var getResponsiveValue=function getResponsiveValue(value){var breakpoint=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'base';if(value===undefined||value===null){return undefined;}if(typeof value==='string'||typeof value==='number'||Array.isArray(value)||typeof value===typeof Animated.AnimatedNode){if(breakpoint==='base'){return value;}return undefined;}if(isEmpty$1(value)){return undefined;}var priorityArray=[value.s,value.xs,value.base];return priorityArray.find(function(val){return val!==undefined;});};
1989
1989
 
1990
- var _excluded$56=["base"];var getSpacingValue=function getSpacingValue(spacingValue,theme,breakpoint){if(isEmpty$1(spacingValue)){return undefined;}var responsiveSpacingValue=getResponsiveValue(spacingValue,breakpoint);if(isEmpty$1(responsiveSpacingValue)){return undefined;}if(responsiveSpacingValue==='auto'){return responsiveSpacingValue;}if(Array.isArray(responsiveSpacingValue)){return responsiveSpacingValue.map(function(value){return getSpacingValue(value,theme);}).join(' ');}if(typeof responsiveSpacingValue==='string'&&responsiveSpacingValue.startsWith('spacing.')){var spacingReturnValue=getIn(theme,responsiveSpacingValue);return isEmpty$1(spacingReturnValue)?makeSpace(spacingReturnValue):undefined;}return responsiveSpacingValue;};var getColorValue=function getColorValue(color,theme,breakpoint){var responsiveBackgroundValue=getResponsiveValue(color,breakpoint);var tokenValue=getIn(theme,`colors.${responsiveBackgroundValue}`);return tokenValue!=null?tokenValue:responsiveBackgroundValue;};var getBorderRadiusValue=function getBorderRadiusValue(borderRadius,theme,breakpoint){var responsiveBorderRadiusValue=getResponsiveValue(borderRadius,breakpoint);return isEmpty$1(responsiveBorderRadiusValue)?undefined:makeBorderSize(getIn(theme,`border.radius.${responsiveBorderRadiusValue}`));};var getBorderWidthValue=function getBorderWidthValue(borderWidth,theme,breakpoint){var responsiveBorderWidthValue=getResponsiveValue(borderWidth,breakpoint);return isEmpty$1(responsiveBorderWidthValue)?undefined:makeBorderSize(getIn(theme,`border.width.${responsiveBorderWidthValue}`));};var getElevationValue=function getElevationValue(elevation,theme,breakpoint){var responsiveElevationValue=getResponsiveValue(elevation,breakpoint);return isEmpty$1(responsiveElevationValue)?undefined:getIn(theme,`elevation.${responsiveElevationValue}`);};var getAllProps=function getAllProps(props,breakpoint){var _props$paddingTop,_props$paddingBottom,_props$paddingRight,_props$paddingLeft,_props$marginBottom,_props$marginTop,_props$marginRight,_props$marginLeft;var hasBorder=props.borderBottom||props.borderTop||props.borderLeft||props.borderRight||props.borderBottomColor||props.borderTopColor||props.borderLeftColor||props.borderRightColor||props.borderBottomWidth||props.borderTopWidth||props.borderLeftWidth||props.borderRightWidth||props.borderWidth||props.borderColor;return Object.assign({display:getResponsiveValue(props.display,breakpoint),overflow:getResponsiveValue(props.overflow,breakpoint),overflowX:getResponsiveValue(props.overflowX,breakpoint),overflowY:getResponsiveValue(props.overflowY,breakpoint),textAlign:getResponsiveValue(props.textAlign,breakpoint),whiteSpace:getResponsiveValue(props.whiteSpace,breakpoint),flex:getResponsiveValue(props.flex,breakpoint),flexWrap:getResponsiveValue(props.flexWrap,breakpoint),flexDirection:getResponsiveValue(props.flexDirection,breakpoint),flexGrow:getResponsiveValue(props.flexGrow,breakpoint),flexShrink:getResponsiveValue(props.flexShrink,breakpoint),flexBasis:getResponsiveValue(props.flexBasis,breakpoint),alignItems:getResponsiveValue(props.alignItems,breakpoint),alignContent:getResponsiveValue(props.alignContent,breakpoint),alignSelf:getResponsiveValue(props.alignSelf,breakpoint),justifyItems:getResponsiveValue(props.justifyItems,breakpoint),justifyContent:getResponsiveValue(props.justifyContent,breakpoint),justifySelf:getResponsiveValue(props.justifySelf,breakpoint),placeSelf:getResponsiveValue(props.placeSelf,breakpoint),placeItems:getResponsiveValue(props.placeItems,breakpoint),order:getResponsiveValue(props.order,breakpoint),position:getResponsiveValue(props.position,breakpoint),zIndex:getResponsiveValue(props.zIndex,breakpoint),grid:getResponsiveValue(props.grid,breakpoint),gridColumn:getResponsiveValue(props.gridColumn,breakpoint),gridRow:getResponsiveValue(props.gridRow,breakpoint),gridRowStart:getResponsiveValue(props.gridRowStart,breakpoint),gridRowEnd:getResponsiveValue(props.gridRowEnd,breakpoint),gridArea:getResponsiveValue(props.gridArea,breakpoint),gridAutoFlow:getResponsiveValue(props.gridAutoFlow,breakpoint),gridAutoRows:getResponsiveValue(props.gridAutoRows,breakpoint),gridAutoColumns:getResponsiveValue(props.gridAutoColumns,breakpoint),gridTemplate:getResponsiveValue(props.gridTemplate,breakpoint),gridTemplateAreas:getResponsiveValue(props.gridTemplateAreas,breakpoint),gridTemplateColumns:getResponsiveValue(props.gridTemplateColumns,breakpoint),gridTemplateRows:getResponsiveValue(props.gridTemplateRows,breakpoint),padding:getSpacingValue(props.padding,props.theme,breakpoint),paddingTop:getSpacingValue((_props$paddingTop=props.paddingTop)!=null?_props$paddingTop:props.paddingY,props.theme,breakpoint),paddingBottom:getSpacingValue((_props$paddingBottom=props.paddingBottom)!=null?_props$paddingBottom:props.paddingY,props.theme,breakpoint),paddingRight:getSpacingValue((_props$paddingRight=props.paddingRight)!=null?_props$paddingRight:props.paddingX,props.theme,breakpoint),paddingLeft:getSpacingValue((_props$paddingLeft=props.paddingLeft)!=null?_props$paddingLeft:props.paddingX,props.theme,breakpoint),margin:getSpacingValue(props.margin,props.theme,breakpoint),marginBottom:getSpacingValue((_props$marginBottom=props.marginBottom)!=null?_props$marginBottom:props.marginY,props.theme,breakpoint),marginTop:getSpacingValue((_props$marginTop=props.marginTop)!=null?_props$marginTop:props.marginY,props.theme,breakpoint),marginRight:getSpacingValue((_props$marginRight=props.marginRight)!=null?_props$marginRight:props.marginX,props.theme,breakpoint),marginLeft:getSpacingValue((_props$marginLeft=props.marginLeft)!=null?_props$marginLeft:props.marginX,props.theme,breakpoint),height:getSpacingValue(props.height,props.theme,breakpoint),minHeight:getSpacingValue(props.minHeight,props.theme,breakpoint),maxHeight:getSpacingValue(props.maxHeight,props.theme,breakpoint),width:getSpacingValue(props.width,props.theme,breakpoint),minWidth:getSpacingValue(props.minWidth,props.theme,breakpoint),maxWidth:getSpacingValue(props.maxWidth,props.theme,breakpoint),gap:getSpacingValue(props.gap,props.theme,breakpoint),rowGap:getSpacingValue(props.rowGap,props.theme,breakpoint),columnGap:getSpacingValue(props.columnGap,props.theme,breakpoint),top:getSpacingValue(props.top,props.theme,breakpoint),right:getSpacingValue(props.right,props.theme,breakpoint),bottom:getSpacingValue(props.bottom,props.theme,breakpoint),left:getSpacingValue(props.left,props.theme,breakpoint),backgroundColor:getColorValue(props.backgroundColor,props.theme,breakpoint),backgroundImage:getResponsiveValue(props.backgroundImage,breakpoint),backgroundSize:getResponsiveValue(props.backgroundSize,breakpoint),backgroundPosition:getResponsiveValue(props.backgroundPosition,breakpoint),backgroundOrigin:getResponsiveValue(props.backgroundOrigin,breakpoint),backgroundRepeat:getResponsiveValue(props.backgroundRepeat,breakpoint),borderRadius:getBorderRadiusValue(props.borderRadius,props.theme,breakpoint),lineHeight:getSpacingValue(props.lineHeight,props.theme,breakpoint),border:getResponsiveValue(props.border,breakpoint),borderTop:getResponsiveValue(props.borderTop,breakpoint),borderRight:getResponsiveValue(props.borderRight,breakpoint),borderBottom:getResponsiveValue(props.borderBottom,breakpoint),borderLeft:getResponsiveValue(props.borderLeft,breakpoint),borderWidth:getBorderWidthValue(props.borderWidth,props.theme,breakpoint),borderColor:getColorValue(props.borderColor,props.theme,breakpoint),borderTopWidth:getBorderWidthValue(props.borderTopWidth,props.theme,breakpoint),borderTopColor:getColorValue(props.borderTopColor,props.theme,breakpoint),borderRightWidth:getBorderWidthValue(props.borderRightWidth,props.theme,breakpoint),borderRightColor:getColorValue(props.borderRightColor,props.theme,breakpoint),borderBottomWidth:getBorderWidthValue(props.borderBottomWidth,props.theme,breakpoint),borderBottomColor:getColorValue(props.borderBottomColor,props.theme,breakpoint),borderLeftWidth:getBorderWidthValue(props.borderLeftWidth,props.theme,breakpoint),borderLeftColor:getColorValue(props.borderLeftColor,props.theme,breakpoint),borderTopLeftRadius:getBorderRadiusValue(props.borderTopLeftRadius,props.theme,breakpoint),borderTopRightRadius:getBorderRadiusValue(props.borderTopRightRadius,props.theme,breakpoint),borderBottomRightRadius:getBorderRadiusValue(props.borderBottomRightRadius,props.theme,breakpoint),borderBottomLeftRadius:getBorderRadiusValue(props.borderBottomLeftRadius,props.theme,breakpoint),borderStyle:hasBorder?'solid':undefined,touchAction:getResponsiveValue(props.touchAction,breakpoint),userSelect:getResponsiveValue(props.userSelect,breakpoint),pointerEvents:getResponsiveValue(props.pointerEvents),opacity:getResponsiveValue(props.opacity,breakpoint)},!isReactNative$4()&&{boxShadow:getElevationValue(props.elevation,props.theme,breakpoint)});};var shouldAddBreakpoint=function shouldAddBreakpoint(cssProps){var firstDefinedValue=Object.values(cssProps).find(function(cssValue){return cssValue!==undefined&&cssValue!==null;});return firstDefinedValue!==undefined;};var getAllMediaQueries=function getAllMediaQueries(props){if(isReactNative$4()){return {};}breakpoints.base;var breakpointsWithoutBase=_objectWithoutProperties(breakpoints,_excluded$56);return Object.fromEntries(Object.entries(breakpointsWithoutBase).map(function(_ref){var _ref2=_slicedToArray(_ref,2),breakpointKey=_ref2[0],breakpointValue=_ref2[1];var cssPropsForCurrentBreakpoint=getAllProps(props,breakpointKey);if(!shouldAddBreakpoint(cssPropsForCurrentBreakpoint)){return [];}var mediaQuery=`@media ${getMediaQuery({min:breakpointValue})}`;return [mediaQuery,cssPropsForCurrentBreakpoint];}));};var getBaseBoxStyles=function getBaseBoxStyles(props){return Object.assign({},getAllProps(props),getAllMediaQueries(props));};
1990
+ var _excluded$56=["base"];var getSpacingValue=function getSpacingValue(spacingValue,theme,breakpoint){if(isEmpty$1(spacingValue)){return undefined;}var responsiveSpacingValue=getResponsiveValue(spacingValue,breakpoint);if(isEmpty$1(responsiveSpacingValue)){return undefined;}if(responsiveSpacingValue==='auto'){return responsiveSpacingValue;}if(Array.isArray(responsiveSpacingValue)){return responsiveSpacingValue.map(function(value){return getSpacingValue(value,theme);}).join(' ');}if(typeof responsiveSpacingValue==='string'&&responsiveSpacingValue.startsWith('spacing.')){var spacingReturnValue=getIn(theme,responsiveSpacingValue);return isEmpty$1(spacingReturnValue)?makeSpace(spacingReturnValue):undefined;}return responsiveSpacingValue;};var getColorValue=function getColorValue(color,theme,breakpoint){var responsiveBackgroundValue=getResponsiveValue(color,breakpoint);var tokenValue=getIn(theme,`colors.${responsiveBackgroundValue}`);return tokenValue!=null?tokenValue:responsiveBackgroundValue;};var getBorderRadiusValue=function getBorderRadiusValue(borderRadius,theme,breakpoint){var responsiveBorderRadiusValue=getResponsiveValue(borderRadius,breakpoint);return isEmpty$1(responsiveBorderRadiusValue)?undefined:makeBorderSize(getIn(theme,`border.radius.${responsiveBorderRadiusValue}`));};var getBorderWidthValue=function getBorderWidthValue(borderWidth,theme,breakpoint){var responsiveBorderWidthValue=getResponsiveValue(borderWidth,breakpoint);return isEmpty$1(responsiveBorderWidthValue)?undefined:makeBorderSize(getIn(theme,`border.width.${responsiveBorderWidthValue}`));};var getElevationValue=function getElevationValue(elevation,theme,breakpoint){var responsiveElevationValue=getResponsiveValue(elevation,breakpoint);return isEmpty$1(responsiveElevationValue)?undefined:getIn(theme,`elevation.${responsiveElevationValue}`);};var getAllProps=function getAllProps(props,breakpoint){var _props$paddingTop,_props$paddingBottom,_props$paddingRight,_props$paddingLeft,_props$marginBottom,_props$marginTop,_props$marginRight,_props$marginLeft;var hasBorder=props.borderWidth||props.borderColor;var hasBorderRight=props.borderRight||props.borderRightColor||props.borderRightWidth;var hasBorderLeft=props.borderLeft||props.borderLeftColor||props.borderLeftWidth;var hasBorderTop=props.borderTop||props.borderTopColor||props.borderTopWidth;var hasBorderBottom=props.borderBottom||props.borderBottomColor||props.borderBottomWidth;return Object.assign({display:getResponsiveValue(props.display,breakpoint),overflow:getResponsiveValue(props.overflow,breakpoint),overflowX:getResponsiveValue(props.overflowX,breakpoint),overflowY:getResponsiveValue(props.overflowY,breakpoint),textAlign:getResponsiveValue(props.textAlign,breakpoint),whiteSpace:getResponsiveValue(props.whiteSpace,breakpoint),flex:getResponsiveValue(props.flex,breakpoint),flexWrap:getResponsiveValue(props.flexWrap,breakpoint),flexDirection:getResponsiveValue(props.flexDirection,breakpoint),flexGrow:getResponsiveValue(props.flexGrow,breakpoint),flexShrink:getResponsiveValue(props.flexShrink,breakpoint),flexBasis:getResponsiveValue(props.flexBasis,breakpoint),alignItems:getResponsiveValue(props.alignItems,breakpoint),alignContent:getResponsiveValue(props.alignContent,breakpoint),alignSelf:getResponsiveValue(props.alignSelf,breakpoint),justifyItems:getResponsiveValue(props.justifyItems,breakpoint),justifyContent:getResponsiveValue(props.justifyContent,breakpoint),justifySelf:getResponsiveValue(props.justifySelf,breakpoint),placeSelf:getResponsiveValue(props.placeSelf,breakpoint),placeItems:getResponsiveValue(props.placeItems,breakpoint),order:getResponsiveValue(props.order,breakpoint),position:getResponsiveValue(props.position,breakpoint),zIndex:getResponsiveValue(props.zIndex,breakpoint),grid:getResponsiveValue(props.grid,breakpoint),gridColumn:getResponsiveValue(props.gridColumn,breakpoint),gridRow:getResponsiveValue(props.gridRow,breakpoint),gridRowStart:getResponsiveValue(props.gridRowStart,breakpoint),gridRowEnd:getResponsiveValue(props.gridRowEnd,breakpoint),gridArea:getResponsiveValue(props.gridArea,breakpoint),gridAutoFlow:getResponsiveValue(props.gridAutoFlow,breakpoint),gridAutoRows:getResponsiveValue(props.gridAutoRows,breakpoint),gridAutoColumns:getResponsiveValue(props.gridAutoColumns,breakpoint),gridTemplate:getResponsiveValue(props.gridTemplate,breakpoint),gridTemplateAreas:getResponsiveValue(props.gridTemplateAreas,breakpoint),gridTemplateColumns:getResponsiveValue(props.gridTemplateColumns,breakpoint),gridTemplateRows:getResponsiveValue(props.gridTemplateRows,breakpoint),padding:getSpacingValue(props.padding,props.theme,breakpoint),paddingTop:getSpacingValue((_props$paddingTop=props.paddingTop)!=null?_props$paddingTop:props.paddingY,props.theme,breakpoint),paddingBottom:getSpacingValue((_props$paddingBottom=props.paddingBottom)!=null?_props$paddingBottom:props.paddingY,props.theme,breakpoint),paddingRight:getSpacingValue((_props$paddingRight=props.paddingRight)!=null?_props$paddingRight:props.paddingX,props.theme,breakpoint),paddingLeft:getSpacingValue((_props$paddingLeft=props.paddingLeft)!=null?_props$paddingLeft:props.paddingX,props.theme,breakpoint),margin:getSpacingValue(props.margin,props.theme,breakpoint),marginBottom:getSpacingValue((_props$marginBottom=props.marginBottom)!=null?_props$marginBottom:props.marginY,props.theme,breakpoint),marginTop:getSpacingValue((_props$marginTop=props.marginTop)!=null?_props$marginTop:props.marginY,props.theme,breakpoint),marginRight:getSpacingValue((_props$marginRight=props.marginRight)!=null?_props$marginRight:props.marginX,props.theme,breakpoint),marginLeft:getSpacingValue((_props$marginLeft=props.marginLeft)!=null?_props$marginLeft:props.marginX,props.theme,breakpoint),height:getSpacingValue(props.height,props.theme,breakpoint),minHeight:getSpacingValue(props.minHeight,props.theme,breakpoint),maxHeight:getSpacingValue(props.maxHeight,props.theme,breakpoint),width:getSpacingValue(props.width,props.theme,breakpoint),minWidth:getSpacingValue(props.minWidth,props.theme,breakpoint),maxWidth:getSpacingValue(props.maxWidth,props.theme,breakpoint),gap:getSpacingValue(props.gap,props.theme,breakpoint),rowGap:getSpacingValue(props.rowGap,props.theme,breakpoint),columnGap:getSpacingValue(props.columnGap,props.theme,breakpoint),top:getSpacingValue(props.top,props.theme,breakpoint),right:getSpacingValue(props.right,props.theme,breakpoint),bottom:getSpacingValue(props.bottom,props.theme,breakpoint),left:getSpacingValue(props.left,props.theme,breakpoint),backgroundColor:getColorValue(props.backgroundColor,props.theme,breakpoint),backgroundImage:getResponsiveValue(props.backgroundImage,breakpoint),backgroundSize:getResponsiveValue(props.backgroundSize,breakpoint),backgroundPosition:getResponsiveValue(props.backgroundPosition,breakpoint),backgroundOrigin:getResponsiveValue(props.backgroundOrigin,breakpoint),backgroundRepeat:getResponsiveValue(props.backgroundRepeat,breakpoint),borderRadius:getBorderRadiusValue(props.borderRadius,props.theme,breakpoint),lineHeight:getSpacingValue(props.lineHeight,props.theme,breakpoint),border:getResponsiveValue(props.border,breakpoint),borderTop:getResponsiveValue(props.borderTop,breakpoint),borderRight:getResponsiveValue(props.borderRight,breakpoint),borderBottom:getResponsiveValue(props.borderBottom,breakpoint),borderLeft:getResponsiveValue(props.borderLeft,breakpoint),borderWidth:getBorderWidthValue(props.borderWidth,props.theme,breakpoint),borderColor:getColorValue(props.borderColor,props.theme,breakpoint),borderTopWidth:getBorderWidthValue(props.borderTopWidth,props.theme,breakpoint),borderTopColor:getColorValue(props.borderTopColor,props.theme,breakpoint),borderRightWidth:getBorderWidthValue(props.borderRightWidth,props.theme,breakpoint),borderRightColor:getColorValue(props.borderRightColor,props.theme,breakpoint),borderBottomWidth:getBorderWidthValue(props.borderBottomWidth,props.theme,breakpoint),borderBottomColor:getColorValue(props.borderBottomColor,props.theme,breakpoint),borderLeftWidth:getBorderWidthValue(props.borderLeftWidth,props.theme,breakpoint),borderLeftColor:getColorValue(props.borderLeftColor,props.theme,breakpoint),borderTopLeftRadius:getBorderRadiusValue(props.borderTopLeftRadius,props.theme,breakpoint),borderTopRightRadius:getBorderRadiusValue(props.borderTopRightRadius,props.theme,breakpoint),borderBottomRightRadius:getBorderRadiusValue(props.borderBottomRightRadius,props.theme,breakpoint),borderBottomLeftRadius:getBorderRadiusValue(props.borderBottomLeftRadius,props.theme,breakpoint),borderStyle:hasBorder?'solid':undefined},!hasBorder&&{borderTopStyle:hasBorderTop?'solid':undefined,borderBottomStyle:hasBorderBottom?'solid':undefined,borderLeftStyle:hasBorderLeft?'solid':undefined,borderRightStyle:hasBorderRight?'solid':undefined},{touchAction:getResponsiveValue(props.touchAction,breakpoint),userSelect:getResponsiveValue(props.userSelect,breakpoint),pointerEvents:getResponsiveValue(props.pointerEvents),opacity:getResponsiveValue(props.opacity,breakpoint)},!isReactNative$4()&&{boxShadow:getElevationValue(props.elevation,props.theme,breakpoint)});};var shouldAddBreakpoint=function shouldAddBreakpoint(cssProps){var firstDefinedValue=Object.values(cssProps).find(function(cssValue){return cssValue!==undefined&&cssValue!==null;});return firstDefinedValue!==undefined;};var getAllMediaQueries=function getAllMediaQueries(props){if(isReactNative$4()){return {};}breakpoints.base;var breakpointsWithoutBase=_objectWithoutProperties(breakpoints,_excluded$56);return Object.fromEntries(Object.entries(breakpointsWithoutBase).map(function(_ref){var _ref2=_slicedToArray(_ref,2),breakpointKey=_ref2[0],breakpointValue=_ref2[1];var cssPropsForCurrentBreakpoint=getAllProps(props,breakpointKey);if(!shouldAddBreakpoint(cssPropsForCurrentBreakpoint)){return [];}var mediaQuery=`@media ${getMediaQuery({min:breakpointValue})}`;return [mediaQuery,cssPropsForCurrentBreakpoint];}));};var getBaseBoxStyles=function getBaseBoxStyles(props){return Object.assign({},getAllProps(props),getAllMediaQueries(props));};
1991
1991
 
1992
1992
  var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',ActionList:'action-list',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',AutoComplete:'autocomplete',Badge:'badge',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',Carousel:'carousel',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Chip:'chip',ChipGroup:'chip-group',ChipLabel:'chip-label',Code:'code',Component:'blade-component',Counter:'counter',Display:'display',Divider:'divider',Dropdown:'dropdown',DropdownOverlay:'dropdown-overlay',DropdownFooter:'dropdown-footer',DropdownHeader:'dropdown-header',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',ListItemCode:'list-item-code',ListItemLink:'list-item-link',ListItemText:'list-item-text',OTPInput:'otp-input',PasswordInput:'password-input',TextArea:'textarea',TextInput:'textinput',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',RadioLabel:'radio-label',SkipNav:'skipnav',Spinner:'spinner',SelectInput:'select-input',Tag:'tag',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',Popover:'popover',PopoverInteractiveWrapper:'popover-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',BottomSheetGrabHandle:'bottomsheet-grab-handle',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',Collapsible:'collapsible',CollapsibleBody:'collapsible-body',CollapsibleButton:'collapsible-button',CollapsibleLink:'collapsible-link',Modal:'modal',ModalBody:'modal-body',ModalHeader:'modal-header',ModalFooter:'modal-footer',ModalBackdrop:'modal-backdrop',ModalScrollOverlay:'modal-scroll-overlay',VisuallyHidden:'visually-hidden',FormLabel:'form-label',Switch:'switch',SwitchLabel:'switch-label',StyledBaseInput:'styled-base-input',Skeleton:'skeleton'};
1993
1993
 
@@ -2670,16 +2670,26 @@ var SelectorGroupField=function SelectorGroupField(_ref){var children=_ref.child
2670
2670
 
2671
2671
  var _excluded$I=["children","label","helpText","isDisabled","isRequired","necessityIndicator","labelPosition","validationState","errorText","name","defaultValue","onChange","value","size","testID"];var CheckboxGroup=function CheckboxGroup(_ref){var children=_ref.children,label=_ref.label,helpText=_ref.helpText,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,_ref$isRequired=_ref.isRequired,isRequired=_ref$isRequired===void 0?false:_ref$isRequired,_ref$necessityIndicat=_ref.necessityIndicator,necessityIndicator=_ref$necessityIndicat===void 0?'none':_ref$necessityIndicat,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,validationState=_ref.validationState,errorText=_ref.errorText,name=_ref.name,defaultValue=_ref.defaultValue,onChange=_ref.onChange,value=_ref.value,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$I);var _useCheckboxGroup=useCheckboxGroup({defaultValue:defaultValue,onChange:onChange,value:value,isDisabled:isDisabled,necessityIndicator:necessityIndicator,isRequired:isRequired,name:name,labelPosition:labelPosition,validationState:validationState,size:size}),contextValue=_useCheckboxGroup.contextValue,ids=_useCheckboxGroup.ids;var _useTheme=useTheme(),theme=_useTheme.theme;var showError=validationState==='error'&&errorText;var showHelpText=!showError&&helpText;var accessibilityText=`,${showError?errorText:''} ${showHelpText?helpText:''}`;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var gap=checkboxSizes.group.gap[size][matchedDeviceType];var childCount=React__default.Children.count(children);return jsx(CheckboxGroupProvider,{value:contextValue,children:jsx(BaseBox,Object.assign({},getStyledProps(styledProps),{children:jsxs(SelectorGroupField,{position:labelPosition,labelledBy:ids.labelId,componentName:"checkbox-group",testID:testID,children:[jsx(FormLabel,{as:"span",necessityIndicator:necessityIndicator,position:labelPosition,id:ids.labelId,accessibilityText:accessibilityText,children:label}),jsxs(BaseBox,{children:[jsx(BaseBox,{display:"flex",flexDirection:"column",children:React__default.Children.map(children,function(child,index){return jsx(BaseBox,{marginBottom:index===childCount-1?makeSize(0):gap,children:child},index);})}),jsx(FormHint,{errorText:errorText,helpText:helpText,type:validationState==='error'?'error':'help'})]})]})}))});};
2672
2672
 
2673
- var ActionListItemContext=React__default.createContext({});var StyledActionListSectionTitle=styled(BaseBox)(function(props){return {padding:makeSize(props.theme.spacing[3])};});var _ActionListSection=function _ActionListSection(_ref){var title=_ref.title,children=_ref.children,testID=_ref.testID,_hideDivider=_ref._hideDivider;var _useActionListContext=useActionListContext(),surfaceLevel=_useActionListContext.surfaceLevel;return jsxs(BaseBox,Object.assign({},makeAccessible({role:getActionListSectionRole(),label:title}),{backgroundColor:`surface.background.level${surfaceLevel}.lowContrast`},metaAttribute({name:MetaConstants.ActionListSection,testID:testID}),{children:[jsx(StyledActionListSectionTitle,Object.assign({},makeAccessible({hidden:true}),{children:jsx(Text,{color:"surface.text.muted.lowContrast",size:"small",weight:"bold",children:title})})),jsx(BaseBox,Object.assign({},makeAccessible({role:isReactNative$4()?undefined:'listbox'}),{children:children})),_hideDivider&&isReactNative$4()?null:jsx(Divider,{marginX:"spacing.3",marginY:"spacing.1"})]}));};var ActionListSection=assignWithoutSideEffects(_ActionListSection,{componentId:componentIds.ActionListSection});var _ActionListItemIcon=function _ActionListItemIcon(_ref2){var icon=_ref2.icon;var Icon=icon;var _React$useContext=React__default.useContext(ActionListItemContext),intent=_React$useContext.intent,isDisabled=_React$useContext.isDisabled;return jsx(Icon,{color:intent==='negative'?'feedback.icon.negative.lowContrast':getNormalTextColor(isDisabled,{isMuted:true}),size:"medium"});};var ActionListItemIcon=assignWithoutSideEffects(_ActionListItemIcon,{componentId:componentIds.ActionListItemIcon});var _ActionListItemText=function _ActionListItemText(_ref3){var children=_ref3.children;var _React$useContext2=React__default.useContext(ActionListItemContext),isDisabled=_React$useContext2.isDisabled;return jsx(Text,{variant:"caption",color:getNormalTextColor(isDisabled,{isMuted:true}),children:children});};var ActionListItemText=assignWithoutSideEffects(_ActionListItemText,{componentId:componentIds.ActionListItemText});var ActionListCheckboxWrapper=styled(BaseBox)(function(_props){return {pointerEvents:'none'};});var makeActionListItemClickable=function makeActionListItemClickable(clickHandler){if(isReactNative$4()){return {onPress:clickHandler};}return {onClick:clickHandler};};var _ActionListItemBody=function _ActionListItemBody(_ref4){var selectionType=_ref4.selectionType,intent=_ref4.intent,description=_ref4.description,isDisabled=_ref4.isDisabled,leading=_ref4.leading,trailing=_ref4.trailing,title=_ref4.title,isSelected=_ref4.isSelected;return jsxs(Fragment,{children:[jsxs(BaseBox,{display:"flex",justifyContent:"center",flexDirection:"row",alignItems:"center",maxHeight:isReactNative$4()?undefined:makeSize(size[20]),children:[jsx(BaseBox,{display:"flex",justifyContent:"center",alignItems:"center",children:selectionType==='multiple'?jsx(ActionListCheckboxWrapper,Object.assign({hasDescription:Boolean(description)},makeAccessible({hidden:true}),{children:jsx(Checkbox,{isChecked:isSelected,tabIndex:-1,isDisabled:isDisabled,children:null})})):leading}),jsx(BaseBox,{paddingLeft:selectionType==='multiple'||!leading?'spacing.0':'spacing.3',paddingRight:"spacing.3",children:jsx(Text,{truncateAfterLines:1,color:intent==='negative'?'feedback.text.negative.lowContrast':getNormalTextColor(isDisabled),children:title})}),jsx(BaseBox,{marginLeft:"auto",children:trailing})]}),jsx(BaseBox,{paddingLeft:leading||selectionType==='multiple'?'spacing.7':undefined,children:description?jsx(Text,{color:getNormalTextColor(isDisabled,{isMuted:true}),size:"small",children:description}):null})]});};var ActionListItemBody=React__default.memo(_ActionListItemBody);var _ActionListItem=function _ActionListItem(props){var _useDropdown=useDropdown(),activeIndex=_useDropdown.activeIndex,dropdownBaseId=_useDropdown.dropdownBaseId,onOptionClick=_useDropdown.onOptionClick,selectedIndices=_useDropdown.selectedIndices,setShouldIgnoreBlurAnimation=_useDropdown.setShouldIgnoreBlurAnimation,selectionType=_useDropdown.selectionType,dropdownTriggerer=_useDropdown.dropdownTriggerer,isKeydownPressed=_useDropdown.isKeydownPressed,filteredValues=_useDropdown.filteredValues,hasAutoCompleteInBottomSheetHeader=_useDropdown.hasAutoCompleteInBottomSheetHeader;var _useTheme=useTheme(),platform=_useTheme.platform;var isMobile=platform==='onMobile';var hasAutoComplete=hasAutoCompleteInBottomSheetHeader||dropdownTriggerer===dropdownComponentIds.triggers.AutoComplete;var renderOnWebAs=props.href?'a':'button';var getIsSelected=function getIsSelected(){if(dropdownTriggerer===dropdownComponentIds.triggers.SelectInput||hasAutoComplete){if(typeof props._index==='number'){return selectedIndices.includes(props._index);}return undefined;}return props.isSelected;};var isSelected=getIsSelected();React__default.useEffect(function(){validateActionListItemProps({leading:props.leading,trailing:props.trailing});},[props.leading,props.trailing]);React__default.useEffect(function(){if(__DEV__){if(dropdownTriggerer===dropdownComponentIds.triggers.SelectInput&&props.intent==='negative'){throwBladeError({message:'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',moduleName:'ActionListItem'});}}},[props.intent,dropdownTriggerer]);return jsx(ActionListItemContext.Provider,{value:{intent:props.intent,isDisabled:props.isDisabled},children:jsx(StyledActionListItem,Object.assign({isVisible:hasAutoComplete&&filteredValues?filteredValues.includes(props.value):true,as:!isReactNative$4()?renderOnWebAs:undefined,id:`${dropdownBaseId}-${props._index}`,type:"button",tabIndex:-1,href:props.href,target:props.target,className:activeIndex===props._index?'active-focus':''},makeAccessible({selected:isSelected,current:isRoleMenu(dropdownTriggerer)?isSelected:undefined,role:getActionListItemRole(dropdownTriggerer,props.href),disabled:props.isDisabled}),makeActionListItemClickable(function(e){if(typeof props._index==='number'){onOptionClick(e,props._index);props.onClick==null?void 0:props.onClick({name:props.value,value:isSelected});}}),metaAttribute({name:MetaConstants.ActionListItem,testID:props.testID}),{onMouseDown:function onMouseDown(){setShouldIgnoreBlurAnimation(true);},onMouseUp:function onMouseUp(){setShouldIgnoreBlurAnimation(false);},"data-value":props.value,"data-index":props._index,selectionType:selectionType,hasDescription:Boolean(props.description),intent:props.intent,isSelected:isSelected,isKeydownPressed:isKeydownPressed,isMobile:isMobile,children:jsx(ActionListItemBody,{selectionType:selectionType,intent:props.intent,description:props.description,isDisabled:props.isDisabled,leading:props.leading,trailing:props.trailing,title:props.title,isSelected:isSelected})}))});};var ActionListItem=assignWithoutSideEffects(React__default.memo(_ActionListItem),{componentId:componentIds.ActionListItem,displayName:componentIds.ActionListItem});
2673
+ var getStyledBadgeStyles=function getStyledBadgeStyles(_ref){var theme=_ref.theme,backgroundColor=_ref.backgroundColor;return {backgroundColor:getIn(theme.colors,backgroundColor),borderRadius:makeBorderSize(theme.border.radius.max),display:'flex',flexWrap:'nowrap'};};
2674
2674
 
2675
- var BottomSheetContext=React__default.createContext({headerHeight:0,contentHeight:0,footerHeight:0,isHeaderFloating:false,setContentHeight:function setContentHeight(){},setHeaderHeight:function setHeaderHeight(){},setFooterHeight:function setFooterHeight(){},setHasBodyPadding:function setHasBodyPadding(){},setIsHeaderEmpty:function setIsHeaderEmpty(){},close:function close(){},scrollRef:null,bind:null,isOpen:false,positionY:0,isInBottomSheet:false,defaultInitialFocusRef:{current:null}});var useBottomSheetContext=function useBottomSheetContext(){var state=React__default.useContext(BottomSheetContext);return state;};var BottomSheetAndDropdownGlueContext=React__default.createContext(null);var useBottomSheetAndDropdownGlue=function useBottomSheetAndDropdownGlue(){var state=React__default.useContext(BottomSheetAndDropdownGlueContext);return state;};
2675
+ var StyledBadge=styled(BaseBox)(function(props){return Object.assign({},getStyledBadgeStyles(props),{alignSelf:'center'});});
2676
2676
 
2677
- var _ActionListBox=React__default.forwardRef(function(_ref,ref){var sectionData=_ref.sectionData,actionListItemWrapperRole=_ref.actionListItemWrapperRole,isMultiSelectable=_ref.isMultiSelectable,isInBottomSheet=_ref.isInBottomSheet;var _useBottomSheetContex=useBottomSheetContext(),footerHeight=_useBottomSheetContex.footerHeight,setContentHeight=_useBottomSheetContex.setContentHeight;var renderActionListItem=React__default.useCallback(function(_ref2){var item=_ref2.item;return jsx(ActionListItem,Object.assign({},item));},[]);var renderActionListSectionHeader=React__default.useCallback(function(_ref3){var title=_ref3.section.title;if(!title)return null;return jsx(ActionListSection,{title:title,_hideDivider:true,children:undefined});},[]);var renderActionListSectionDivider=React__default.useCallback(function(_ref4){var _ref4$section=_ref4.section,title=_ref4$section.title,hideDivider=_ref4$section.hideDivider;if(!title)return null;if(hideDivider)return null;return jsx(Divider,{});},[]);return jsx(StyledListBoxWrapper,Object.assign({as:isInBottomSheet?BottomSheetSectionList:SectionList,isInBottomSheet:Boolean(isInBottomSheet),marginBottom:footerHeight,sections:sectionData,windowSize:5,keyExtractor:function keyExtractor(item){return item.value;},stickySectionHeadersEnabled:false,renderSectionHeader:renderActionListSectionHeader,renderSectionFooter:renderActionListSectionDivider,renderItem:renderActionListItem,ref:ref,onContentSizeChange:function onContentSizeChange(_width,height){setContentHeight(height);}},makeAccessible({role:actionListItemWrapperRole,multiSelectable:actionListItemWrapperRole==='listbox'?isMultiSelectable:undefined})));});var ActionListBox=assignWithoutSideEffects(_ActionListBox,{displayName:'ActionListBox'});
2677
+ var verticalPadding$1={small:'spacing.0',medium:'spacing.1',large:'spacing.2'};var horizontalPadding$1={small:'spacing.3',medium:'spacing.3',large:'spacing.4'};var iconPadding={small:'spacing.1',medium:'spacing.2',large:'spacing.2'};var iconSize={small:'xsmall',medium:'small',large:'small'};
2678
+
2679
+ var getStringFromReactText=function getStringFromReactText(childReactText){if(isEmpty$1(childReactText)){return undefined;}if(Array.isArray(childReactText)){return childReactText.join('');}return String(childReactText);};
2680
+
2681
+ var _excluded$H=["children","contrast","fontWeight","icon","size","variant","testID"];var isFeedbackVariant$1=function isFeedbackVariant(variant){var feedbackVariants=['information','negative','neutral','notice','positive'];return feedbackVariants.includes(variant);};var getColorProps$1=function getColorProps(_ref){var variant=_ref.variant,contrast=_ref.contrast;var props={iconColor:'feedback.icon.neutral.lowContrast',textColor:'feedback.text.neutral.lowContrast',backgroundColor:'feedback.background.neutral.lowContrast'};if(isFeedbackVariant$1(variant)){props.iconColor=`feedback.icon.${variant}.${contrast}Contrast`;props.textColor=`feedback.text.${variant}.${contrast}Contrast`;props.backgroundColor=`feedback.background.${variant}.${contrast}Contrast`;}else {props.iconColor=`badge.icon.${variant}.${contrast}Contrast`;props.textColor=`badge.text.${variant}.${contrast}Contrast`;props.backgroundColor=`badge.background.${variant}.${contrast}Contrast`;}return props;};var _Badge=function _Badge(_ref2){var children=_ref2.children,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,_ref2$fontWeight=_ref2.fontWeight,fontWeight=_ref2$fontWeight===void 0?'regular':_ref2$fontWeight,Icon=_ref2.icon,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'neutral':_ref2$variant,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded$H);var childrenString=getStringFromReactText(children);if(__DEV__){if(!(childrenString!=null&&childrenString.trim())){throwBladeError({message:'Text as children is required for Badge.',moduleName:'Badge'});}}var _getColorProps=getColorProps$1({variant:variant,contrast:contrast}),backgroundColor=_getColorProps.backgroundColor,iconColor=_getColorProps.iconColor,textColor=_getColorProps.textColor;var badgeTextSizes={small:{variant:'body',size:'xsmall'},medium:{variant:'body',size:'small'},large:{variant:'body',size:'small'}};return jsx(BaseBox,Object.assign({display:isReactNative$4()?'flex':'inline-flex'},metaAttribute({name:MetaConstants.Badge,testID:testID}),getStyledProps(styledProps),{children:jsx(StyledBadge,{backgroundColor:backgroundColor,size:size,textAlign:'left',children:jsxs(BaseBox,{paddingRight:horizontalPadding$1[size],paddingLeft:horizontalPadding$1[size],paddingTop:verticalPadding$1[size],paddingBottom:verticalPadding$1[size],display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",overflow:"hidden",children:[Icon?jsx(BaseBox,{paddingRight:Boolean(Icon)?iconPadding[size]:'spacing.0',display:"flex",children:jsx(Icon,{color:iconColor,size:iconSize[size]})}):null,jsx(Text,Object.assign({},badgeTextSizes[size],{type:"normal",weight:fontWeight,truncateAfterLines:1,color:textColor,children:children}))]})})}));};var Badge=assignWithoutSideEffects(_Badge,{displayName:'Badge',componentId:'Badge'});
2678
2682
 
2679
2683
  var validBoxAsValues=['div','section','footer','header','main','aside','nav','span','label'];
2680
2684
 
2681
2685
  var validateBackgroundString=function validateBackgroundString(stringBackgroundColorValue){if(__DEV__){if(!stringBackgroundColorValue.startsWith('surface.background')&&!stringBackgroundColorValue.startsWith('brand.')&&stringBackgroundColorValue!=='transparent'){throwBladeError({message:`Oops! Currently you can only use \`transparent\`, \`surface.background.*\`, and \`brand.*\` tokens with backgroundColor property but we received \`${stringBackgroundColorValue}\` instead.\n\n Do you have a usecase of using other values? Create an issue on https://github.com/razorpay/blade repo to let us know and we can discuss ✨`,moduleName:'Box'});}}};var validateBackgroundProp=function validateBackgroundProp(responsiveBackgroundColor){if(__DEV__){if(responsiveBackgroundColor){if(typeof responsiveBackgroundColor==='string'){validateBackgroundString(responsiveBackgroundColor);return;}Object.values(responsiveBackgroundColor).forEach(function(backgroundColor){if(typeof backgroundColor==='string'){validateBackgroundString(backgroundColor);}});}}};var makeBoxProps=function makeBoxProps(props){return {display:props.display,overflow:props.overflow,overflowX:props.overflowX,overflowY:props.overflowY,whiteSpace:props.whiteSpace,height:props.height,minHeight:props.minHeight,maxHeight:props.maxHeight,width:props.width,minWidth:props.minWidth,maxWidth:props.maxWidth,textAlign:props.textAlign,flex:props.flex,flexWrap:props.flexWrap,flexDirection:props.flexDirection,flexGrow:props.flexGrow,flexShrink:props.flexShrink,flexBasis:props.flexBasis,alignItems:props.alignItems,alignContent:props.alignContent,alignSelf:props.alignSelf,justifyItems:props.justifyItems,justifyContent:props.justifyContent,justifySelf:props.justifySelf,placeSelf:props.placeSelf,placeItems:props.placeItems,order:props.order,grid:props.grid,gridColumn:props.gridColumn,gridRow:props.gridRow,gridRowStart:props.gridRowStart,gridRowEnd:props.gridRowEnd,gridColumnStart:props.gridColumnStart,gridColumnEnd:props.gridColumnEnd,gridArea:props.gridArea,gridAutoFlow:props.gridAutoFlow,gridAutoRows:props.gridAutoRows,gridAutoColumns:props.gridAutoColumns,gridTemplate:props.gridTemplate,gridTemplateAreas:props.gridTemplateAreas,gridTemplateColumns:props.gridTemplateColumns,gridTemplateRows:props.gridTemplateRows,padding:props.padding,paddingTop:props.paddingTop,paddingBottom:props.paddingBottom,paddingRight:props.paddingRight,paddingLeft:props.paddingLeft,paddingX:props.paddingX,paddingY:props.paddingY,margin:props.margin,marginBottom:props.marginBottom,marginTop:props.marginTop,marginRight:props.marginRight,marginLeft:props.marginLeft,marginX:props.marginX,marginY:props.marginY,gap:props.gap,rowGap:props.rowGap,columnGap:props.columnGap,position:props.position,zIndex:props.zIndex,top:props.top,right:props.right,bottom:props.bottom,left:props.left,backgroundColor:props.backgroundColor,backgroundImage:props.backgroundImage,backgroundSize:props.backgroundSize,backgroundPosition:props.backgroundPosition,backgroundOrigin:props.backgroundOrigin,backgroundRepeat:props.backgroundRepeat,elevation:props.elevation,borderWidth:props.borderWidth,borderColor:props.borderColor,borderTopWidth:props.borderTopWidth,borderTopColor:props.borderTopColor,borderRightWidth:props.borderRightWidth,borderRightColor:props.borderRightColor,borderBottomWidth:props.borderBottomWidth,borderBottomColor:props.borderBottomColor,borderLeftWidth:props.borderLeftWidth,borderLeftColor:props.borderLeftColor,borderRadius:props.borderRadius,borderTopLeftRadius:props.borderTopLeftRadius,borderTopRightRadius:props.borderTopRightRadius,borderBottomRightRadius:props.borderBottomRightRadius,borderBottomLeftRadius:props.borderBottomLeftRadius,onMouseEnter:props.onMouseEnter,onMouseLeave:props.onMouseLeave,onMouseOver:props.onMouseOver,onScroll:props.onScroll,draggable:props.draggable,onDragStart:props.onDragStart,onDragEnd:props.onDragEnd,onDragEnter:props.onDragEnter,onDragLeave:props.onDragLeave,onDragOver:props.onDragOver,onDrop:props.onDrop,pointerEvents:props.pointerEvents,children:props.children,tabIndex:props.tabIndex,as:isReactNative$4()?undefined:props.as};};var _Box=function _Box(props,ref){React__default.useEffect(function(){if(__DEV__){validateBackgroundProp(props.backgroundColor);}},[props.backgroundColor]);React__default.useEffect(function(){if(__DEV__){if(props.as){if(isReactNative$4()){throwBladeError({message:'`as` prop is not supported on React Native',moduleName:'Box'});}if(!validBoxAsValues.includes(props.as)){throwBladeError({message:`Invalid \`as\` prop value - ${props.as}. Only ${validBoxAsValues.join(', ')} are valid values`,moduleName:'Box'});}}}},[props.as]);return jsx(BaseBox,Object.assign({ref:ref,id:props.id},metaAttribute({name:MetaConstants.Box,testID:props.testID}),makeBoxProps(props)));};var Box=assignWithoutSideEffects(React__default.forwardRef(_Box),{displayName:'Box'});
2682
2686
 
2687
+ var ActionListItemContext=React__default.createContext({});var StyledActionListSectionTitle=styled(BaseBox)(function(props){return {padding:makeSize(props.theme.spacing[3])};});var _ActionListSection=function _ActionListSection(_ref){var title=_ref.title,children=_ref.children,testID=_ref.testID,_hideDivider=_ref._hideDivider;var _useActionListContext=useActionListContext(),surfaceLevel=_useActionListContext.surfaceLevel;return jsxs(BaseBox,Object.assign({},makeAccessible({role:getActionListSectionRole(),label:title}),{backgroundColor:`surface.background.level${surfaceLevel}.lowContrast`},metaAttribute({name:MetaConstants.ActionListSection,testID:testID}),{children:[jsx(StyledActionListSectionTitle,Object.assign({},makeAccessible({hidden:true}),{children:jsx(Text,{color:"surface.text.muted.lowContrast",size:"small",weight:"bold",children:title})})),jsx(BaseBox,Object.assign({},makeAccessible({role:isReactNative$4()?undefined:'listbox'}),{children:children})),_hideDivider&&isReactNative$4()?null:jsx(Divider,{marginX:"spacing.3",marginY:"spacing.1"})]}));};var ActionListSection=assignWithoutSideEffects(_ActionListSection,{componentId:componentIds.ActionListSection});var _ActionListItemIcon=function _ActionListItemIcon(_ref2){var icon=_ref2.icon;var Icon=icon;var _React$useContext=React__default.useContext(ActionListItemContext),intent=_React$useContext.intent,isDisabled=_React$useContext.isDisabled;return jsx(Icon,{color:intent==='negative'?'feedback.icon.negative.lowContrast':getNormalTextColor(isDisabled,{isMuted:true}),size:"medium"});};var ActionListItemIcon=assignWithoutSideEffects(_ActionListItemIcon,{componentId:componentIds.ActionListItemIcon});var _ActionListItemBadgeGroup=function _ActionListItemBadgeGroup(_ref3){var children=_ref3.children;return jsx(Box,{display:"flex",alignItems:"center",flexDirection:"row",children:children});};var ActionListItemBadgeGroup=assignWithoutSideEffects(_ActionListItemBadgeGroup,{componentId:componentIds.ActionListItemBadgeGroup});var _ActionListItemBadge=function _ActionListItemBadge(props){return jsx(Badge,Object.assign({size:"medium",marginLeft:"spacing.3"},props));};var ActionListItemBadge=assignWithoutSideEffects(_ActionListItemBadge,{componentId:componentIds.ActionListItemBadge});var _ActionListItemText=function _ActionListItemText(_ref4){var children=_ref4.children;var _React$useContext2=React__default.useContext(ActionListItemContext),isDisabled=_React$useContext2.isDisabled;return jsx(Text,{variant:"caption",color:getNormalTextColor(isDisabled,{isMuted:true}),children:children});};var ActionListItemText=assignWithoutSideEffects(_ActionListItemText,{componentId:componentIds.ActionListItemText});var ActionListCheckboxWrapper=styled(BaseBox)(function(_props){return {pointerEvents:'none'};});var makeActionListItemClickable=function makeActionListItemClickable(clickHandler){if(isReactNative$4()){return {onPress:clickHandler};}return {onClick:clickHandler};};var _ActionListItemBody=function _ActionListItemBody(_ref5){var selectionType=_ref5.selectionType,intent=_ref5.intent,description=_ref5.description,isDisabled=_ref5.isDisabled,leading=_ref5.leading,trailing=_ref5.trailing,title=_ref5.title,titleSuffix=_ref5.titleSuffix,isSelected=_ref5.isSelected;return jsxs(Fragment,{children:[jsxs(BaseBox,{display:"flex",justifyContent:"center",flexDirection:"row",alignItems:"center",maxHeight:isReactNative$4()?undefined:makeSize(size[20]),children:[jsx(BaseBox,{display:"flex",justifyContent:"center",alignItems:"center",children:selectionType==='multiple'?jsx(ActionListCheckboxWrapper,Object.assign({hasDescription:Boolean(description)},makeAccessible({hidden:true}),{children:jsx(Checkbox,{isChecked:isSelected,tabIndex:-1,isDisabled:isDisabled,children:null})})):leading}),jsxs(BaseBox,{paddingLeft:selectionType==='multiple'||!leading?'spacing.0':'spacing.3',paddingRight:"spacing.3",display:"flex",alignItems:"center",flexDirection:"row",children:[jsx(Text,{truncateAfterLines:1,color:intent==='negative'?'feedback.text.negative.lowContrast':getNormalTextColor(isDisabled),children:title}),titleSuffix]}),jsx(BaseBox,{marginLeft:"auto",children:trailing})]}),jsx(BaseBox,{paddingLeft:leading||selectionType==='multiple'?'spacing.7':undefined,children:description?jsx(Text,{color:getNormalTextColor(isDisabled,{isMuted:true}),size:"small",children:description}):null})]});};var ActionListItemBody=React__default.memo(_ActionListItemBody);var _ActionListItem=function _ActionListItem(props){var _useDropdown=useDropdown(),activeIndex=_useDropdown.activeIndex,dropdownBaseId=_useDropdown.dropdownBaseId,onOptionClick=_useDropdown.onOptionClick,selectedIndices=_useDropdown.selectedIndices,setShouldIgnoreBlurAnimation=_useDropdown.setShouldIgnoreBlurAnimation,selectionType=_useDropdown.selectionType,dropdownTriggerer=_useDropdown.dropdownTriggerer,isKeydownPressed=_useDropdown.isKeydownPressed,filteredValues=_useDropdown.filteredValues,hasAutoCompleteInBottomSheetHeader=_useDropdown.hasAutoCompleteInBottomSheetHeader;var _useTheme=useTheme(),platform=_useTheme.platform;var isMobile=platform==='onMobile';var hasAutoComplete=hasAutoCompleteInBottomSheetHeader||dropdownTriggerer===dropdownComponentIds.triggers.AutoComplete;var renderOnWebAs=props.href?'a':'button';var getIsSelected=function getIsSelected(){if(dropdownTriggerer===dropdownComponentIds.triggers.SelectInput||hasAutoComplete){if(typeof props._index==='number'){return selectedIndices.includes(props._index);}return undefined;}return props.isSelected;};var isSelected=getIsSelected();React__default.useEffect(function(){validateActionListItemProps({leading:props.leading,trailing:props.trailing,titleSuffix:props.titleSuffix});},[props.leading,props.trailing,props.titleSuffix]);React__default.useEffect(function(){if(__DEV__){if(dropdownTriggerer===dropdownComponentIds.triggers.SelectInput&&props.intent==='negative'){throwBladeError({message:'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',moduleName:'ActionListItem'});}}},[props.intent,dropdownTriggerer]);return jsx(ActionListItemContext.Provider,{value:{intent:props.intent,isDisabled:props.isDisabled},children:jsx(StyledActionListItem,Object.assign({isVisible:hasAutoComplete&&filteredValues?filteredValues.includes(props.value):true,as:!isReactNative$4()?renderOnWebAs:undefined,id:`${dropdownBaseId}-${props._index}`,type:"button",tabIndex:-1,href:props.href,target:props.target,className:activeIndex===props._index?'active-focus':''},makeAccessible({selected:isSelected,current:isRoleMenu(dropdownTriggerer)?isSelected:undefined,role:getActionListItemRole(dropdownTriggerer,props.href),disabled:props.isDisabled}),makeActionListItemClickable(function(e){if(typeof props._index==='number'){onOptionClick(e,props._index);props.onClick==null?void 0:props.onClick({name:props.value,value:isSelected});}}),metaAttribute({name:MetaConstants.ActionListItem,testID:props.testID}),{onMouseDown:function onMouseDown(){setShouldIgnoreBlurAnimation(true);},onMouseUp:function onMouseUp(){setShouldIgnoreBlurAnimation(false);},"data-value":props.value,"data-index":props._index,selectionType:selectionType,hasDescription:Boolean(props.description),intent:props.intent,isSelected:isSelected,isKeydownPressed:isKeydownPressed,isMobile:isMobile,children:jsx(ActionListItemBody,{selectionType:selectionType,intent:props.intent,description:props.description,isDisabled:props.isDisabled,leading:props.leading,trailing:props.trailing,title:props.title,titleSuffix:props.titleSuffix,isSelected:isSelected})}))});};var ActionListItem=assignWithoutSideEffects(React__default.memo(_ActionListItem),{componentId:componentIds.ActionListItem,displayName:componentIds.ActionListItem});
2688
+
2689
+ var BottomSheetContext=React__default.createContext({headerHeight:0,contentHeight:0,footerHeight:0,isHeaderFloating:false,setContentHeight:function setContentHeight(){},setHeaderHeight:function setHeaderHeight(){},setFooterHeight:function setFooterHeight(){},setHasBodyPadding:function setHasBodyPadding(){},setIsHeaderEmpty:function setIsHeaderEmpty(){},close:function close(){},scrollRef:null,bind:null,isOpen:false,positionY:0,isInBottomSheet:false,defaultInitialFocusRef:{current:null}});var useBottomSheetContext=function useBottomSheetContext(){var state=React__default.useContext(BottomSheetContext);return state;};var BottomSheetAndDropdownGlueContext=React__default.createContext(null);var useBottomSheetAndDropdownGlue=function useBottomSheetAndDropdownGlue(){var state=React__default.useContext(BottomSheetAndDropdownGlueContext);return state;};
2690
+
2691
+ var _ActionListBox=React__default.forwardRef(function(_ref,ref){var sectionData=_ref.sectionData,actionListItemWrapperRole=_ref.actionListItemWrapperRole,isMultiSelectable=_ref.isMultiSelectable,isInBottomSheet=_ref.isInBottomSheet;var _useBottomSheetContex=useBottomSheetContext(),footerHeight=_useBottomSheetContex.footerHeight,setContentHeight=_useBottomSheetContex.setContentHeight;var renderActionListItem=React__default.useCallback(function(_ref2){var item=_ref2.item;return jsx(ActionListItem,Object.assign({},item));},[]);var renderActionListSectionHeader=React__default.useCallback(function(_ref3){var title=_ref3.section.title;if(!title)return null;return jsx(ActionListSection,{title:title,_hideDivider:true,children:undefined});},[]);var renderActionListSectionDivider=React__default.useCallback(function(_ref4){var _ref4$section=_ref4.section,title=_ref4$section.title,hideDivider=_ref4$section.hideDivider;if(!title)return null;if(hideDivider)return null;return jsx(Divider,{});},[]);return jsx(StyledListBoxWrapper,Object.assign({as:isInBottomSheet?BottomSheetSectionList:SectionList,isInBottomSheet:Boolean(isInBottomSheet),marginBottom:footerHeight,sections:sectionData,windowSize:5,keyExtractor:function keyExtractor(item){return item.value;},stickySectionHeadersEnabled:false,renderSectionHeader:renderActionListSectionHeader,renderSectionFooter:renderActionListSectionDivider,renderItem:renderActionListItem,ref:ref,onContentSizeChange:function onContentSizeChange(_width,height){setContentHeight(height);}},makeAccessible({role:actionListItemWrapperRole,multiSelectable:actionListItemWrapperRole==='listbox'?isMultiSelectable:undefined})));});var ActionListBox=assignWithoutSideEffects(_ActionListBox,{displayName:'ActionListBox'});
2692
+
2683
2693
  var ActionListNoResults=function ActionListNoResults(){return jsxs(Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"spacing.5",children:[jsx(SearchIcon,{size:"xlarge",color:"surface.text.normal.lowContrast"}),jsx(Text,{marginTop:"spacing.5",weight:"bold",children:"No Search Result Found"}),jsx(Text,{marginTop:"spacing.3",size:"small",type:"subtle",children:"Try searching for a different value"})]});};
2684
2694
 
2685
2695
  var ActionListContext=React__default.createContext({surfaceLevel:2});var useActionListContext=function useActionListContext(){var context=React__default.useContext(ActionListContext);if(__DEV__){if(!context){throwBladeError({message:'useActionListContext has to be called inside ActionListContext.Provider',moduleName:'ActionList'});}}return context;};var _ActionList=function _ActionList(_ref){var children=_ref.children,_ref$surfaceLevel=_ref.surfaceLevel,surfaceLevel=_ref$surfaceLevel===void 0?2:_ref$surfaceLevel,testID=_ref.testID;var _useDropdown=useDropdown(),setOptions=_useDropdown.setOptions,actionListItemRef=_useDropdown.actionListItemRef,selectionType=_useDropdown.selectionType,dropdownBaseId=_useDropdown.dropdownBaseId,dropdownTriggerer=_useDropdown.dropdownTriggerer,hasFooterAction=_useDropdown.hasFooterAction,filteredValues=_useDropdown.filteredValues;var _useBottomSheetContex=useBottomSheetContext(),isInBottomSheet=_useBottomSheetContex.isInBottomSheet;var _React$useMemo=React__default.useMemo(function(){return getActionListProperties(children);},[children]),sectionData=_React$useMemo.sectionData,childrenWithId=_React$useMemo.childrenWithId,actionListOptions=_React$useMemo.actionListOptions;React__default.useEffect(function(){setOptions(actionListOptions);},[actionListOptions]);var actionListContextValue=React__default.useMemo(function(){return {surfaceLevel:surfaceLevel};},[surfaceLevel]);if(filteredValues.length<=0&&dropdownTriggerer===dropdownComponentIds.triggers.AutoComplete){return jsx(ActionListNoResults,{});}var actionListContainerRole=getActionListContainerRole(hasFooterAction,dropdownTriggerer);var actionListItemWrapperRole=getActionListItemWrapperRole(hasFooterAction,dropdownTriggerer);var isMultiSelectable=selectionType==='multiple';return jsx(ActionListContext.Provider,{value:actionListContextValue,children:isInBottomSheet?jsx(ActionListBox,{isInBottomSheet:isInBottomSheet,actionListItemWrapperRole:actionListItemWrapperRole,childrenWithId:childrenWithId,sectionData:sectionData,isMultiSelectable:isMultiSelectable,ref:actionListItemRef}):jsx(BaseBox,Object.assign({id:`${dropdownBaseId}-actionlist`},makeAccessible({role:actionListContainerRole,multiSelectable:actionListContainerRole==='listbox'?isMultiSelectable:undefined,labelledBy:`${dropdownBaseId}-label`}),metaAttribute({name:MetaConstants.ActionList,testID:testID}),{children:jsx(ActionListBox,{isInBottomSheet:isInBottomSheet,actionListItemWrapperRole:actionListItemWrapperRole,childrenWithId:childrenWithId,sectionData:sectionData,isMultiSelectable:isMultiSelectable,ref:actionListItemRef})}))});};var ActionList=assignWithoutSideEffects(React__default.memo(_ActionList),{displayName:componentIds.ActionList,componentId:componentIds.ActionList});
@@ -2696,7 +2706,7 @@ var _IconButton=function _IconButton(_ref,ref){var icon=_ref.icon,onClick=_ref.o
2696
2706
 
2697
2707
  var getBaseButtonStyles=function getBaseButtonStyles(_ref){var defaultBorderColor=_ref.defaultBorderColor,minHeight=_ref.minHeight,buttonPaddingTop=_ref.buttonPaddingTop,buttonPaddingBottom=_ref.buttonPaddingBottom,buttonPaddingLeft=_ref.buttonPaddingLeft,buttonPaddingRight=_ref.buttonPaddingRight,defaultBackgroundColor=_ref.defaultBackgroundColor,disabled=_ref.disabled,isFullWidth=_ref.isFullWidth,borderWidth=_ref.borderWidth,borderRadius=_ref.borderRadius;return {minHeight:minHeight,width:isFullWidth?'100%':'auto',cursor:disabled?'not-allowed':'pointer',backgroundColor:defaultBackgroundColor,borderColor:defaultBorderColor,borderWidth:borderWidth,borderRadius:borderRadius,borderStyle:'solid',paddingTop:buttonPaddingTop,paddingBottom:buttonPaddingBottom,paddingLeft:buttonPaddingLeft,paddingRight:buttonPaddingRight,justifyContent:'center',alignItems:'center',textDecoration:'none'};};
2698
2708
 
2699
- var _excluded$H=["onClick","href","onBlur","onKeyDown","children","minHeight","buttonPaddingTop","buttonPaddingBottom","buttonPaddingLeft","buttonPaddingRight","isFullWidth","disabled","defaultBackgroundColor","defaultBorderColor","hoverBackgroundColor","activeBackgroundColor","focusBackgroundColor","focusRingColor","hoverBorderColor","activeBorderColor","focusBorderColor","borderWidth","borderRadius","motionDuration","motionEasing","isLoading","accessibilityProps","testID","onTouchStart","onTouchEnd","onPointerEnter","onPointerDown","onFocus"];var StyledPressable$3=styled(Animated$1.createAnimatedComponent(Pressable))(function(props){var styledPropsCSSObject=useStyledProps(props);return Object.assign({},getBaseButtonStyles(props),{alignSelf:'center',display:'flex'},styledPropsCSSObject);});var openURL$2=function(){var _ref=_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 _ref.apply(this,arguments);};}();var _worklet_273135029952_init_data={code:"function anonymous(){const{withTiming,isPressed,activeBackgroundColor,defaultBackgroundColor,duration,easing,activeBorderColor,defaultBorderColor}=this._closure;return{backgroundColor:withTiming(isPressed.value?activeBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing}),borderColor:withTiming(isPressed.value?activeBorderColor:defaultBorderColor,{duration:duration,easing:easing})};}",location:"/home/runner/work/blade/blade/packages/blade/src/components/Button/BaseButton/StyledBaseButton.native.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AAuF0C,SAAAA,SAAMA,CAAA,QAAAC,UAAA,CAAAC,SAAA,CAAAC,qBAAA,CAAAC,sBAAA,CAAAC,QAAA,CAAAC,MAAA,CAAAC,iBAAA,CAAAC,kBAAA,OAAAC,QAAA,CAC5C,MAAO,CACLC,eAAe,CAAET,UAAU,CACzBC,SAAS,CAACS,KAAK,CAAGR,qBAAqB,CAAGC,sBAAsB,CAChE,CACEC,QAAQ,CAARA,QAAQ,CACRC,aACF,CAAC,CACF,CACDM,WAAW,CAAEX,UAAU,CAACC,SAAS,CAACS,KAAK,CAAGJ,iBAAiB,CAAGC,kBAAkB,CAAE,CAChFH,QAAQ,CAARA,QAAQ,CACRC,aACF,CAAC,CACH,CAAC,CACH\",\"names\":[\"anonymous\",\"withTiming\",\"isPressed\",\"activeBackgroundColor\",\"defaultBackgroundColor\",\"duration\",\"easing\",\"activeBorderColor\",\"defaultBorderColor\",\"_closure\",\"backgroundColor\",\"value\",\"borderColor\"],\"sources\":[\"/home/runner/work/blade/blade/packages/blade/src/components/Button/BaseButton/StyledBaseButton.native.tsx\"]}",version:"3.4.1"};var _StyledBaseButton=function _StyledBaseButton(_ref2,ref){var onClick=_ref2.onClick,href=_ref2.href;_ref2.onBlur;_ref2.onKeyDown;var _children=_ref2.children,minHeight=_ref2.minHeight,buttonPaddingTop=_ref2.buttonPaddingTop,buttonPaddingBottom=_ref2.buttonPaddingBottom,buttonPaddingLeft=_ref2.buttonPaddingLeft,buttonPaddingRight=_ref2.buttonPaddingRight,isFullWidth=_ref2.isFullWidth,disabled=_ref2.disabled,defaultBackgroundColor=_ref2.defaultBackgroundColor,defaultBorderColor=_ref2.defaultBorderColor,hoverBackgroundColor=_ref2.hoverBackgroundColor,activeBackgroundColor=_ref2.activeBackgroundColor,focusBackgroundColor=_ref2.focusBackgroundColor,focusRingColor=_ref2.focusRingColor,hoverBorderColor=_ref2.hoverBorderColor,activeBorderColor=_ref2.activeBorderColor,focusBorderColor=_ref2.focusBorderColor,borderWidth=_ref2.borderWidth,borderRadius=_ref2.borderRadius,motionDuration=_ref2.motionDuration,motionEasing=_ref2.motionEasing,isLoading=_ref2.isLoading,accessibilityProps=_ref2.accessibilityProps,testID=_ref2.testID,onTouchStart=_ref2.onTouchStart,onTouchEnd=_ref2.onTouchEnd,onPointerEnter=_ref2.onPointerEnter,onPointerDown=_ref2.onPointerDown,onFocus=_ref2.onFocus,styledProps=_objectWithoutProperties(_ref2,_excluded$H);var _useTheme=useTheme(),theme=_useTheme.theme;var isPressed=useSharedValue(false);var duration=getIn(theme.motion,motionDuration);var easing=getIn(theme.motion,motionEasing);var animatedStyles=useAnimatedStyle(function(){var _e=[new global.Error(),-9,-27];var _f=function _f(){return {backgroundColor:withTiming(isPressed.value?activeBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing}),borderColor:withTiming(isPressed.value?activeBorderColor:defaultBorderColor,{duration:duration,easing:easing})};};_f._closure={withTiming:withTiming,isPressed:isPressed,activeBackgroundColor:activeBackgroundColor,defaultBackgroundColor:defaultBackgroundColor,duration:duration,easing:easing,activeBorderColor:activeBorderColor,defaultBorderColor:defaultBorderColor};_f.__initData=_worklet_273135029952_init_data;_f.__workletHash=273135029952;_f.__stackDetails=_e;return _f;}());var handleOnPress=function handleOnPress(event){if(href){void openURL$2(href);}if(onClick){onClick(event);}};return jsx(StyledPressable$3,Object.assign({},styledProps,accessibilityProps,{ref:ref,role:"button",onTouchStart:castNativeType(onTouchStart),onTouchEnd:castNativeType(onTouchEnd),onPointerEnter:castNativeType(onPointerEnter),onPointerDown:castNativeType(onPointerDown),onFocus:castNativeType(onFocus),isLoading:isLoading,onPress:handleOnPress,style:animatedStyles,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,isFullWidth:isFullWidth,disabled:disabled,defaultBackgroundColor:defaultBackgroundColor,defaultBorderColor:defaultBorderColor,hoverBackgroundColor:hoverBackgroundColor,activeBackgroundColor:activeBackgroundColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,activeBorderColor:activeBorderColor,focusBorderColor:focusBorderColor,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing,testID:testID,children:function children(_ref3){var pressed=_ref3.pressed;isPressed.value=pressed;return _children;}}));};var StyledBaseButton=assignWithoutSideEffects(React__default.forwardRef(_StyledBaseButton),{displayName:'StyledBaseButton'});
2709
+ var _excluded$G=["onClick","href","onBlur","onKeyDown","children","minHeight","buttonPaddingTop","buttonPaddingBottom","buttonPaddingLeft","buttonPaddingRight","isFullWidth","disabled","defaultBackgroundColor","defaultBorderColor","hoverBackgroundColor","activeBackgroundColor","focusBackgroundColor","focusRingColor","hoverBorderColor","activeBorderColor","focusBorderColor","borderWidth","borderRadius","motionDuration","motionEasing","isLoading","accessibilityProps","testID","onTouchStart","onTouchEnd","onPointerEnter","onPointerDown","onFocus"];var StyledPressable$3=styled(Animated$1.createAnimatedComponent(Pressable))(function(props){var styledPropsCSSObject=useStyledProps(props);return Object.assign({},getBaseButtonStyles(props),{alignSelf:'center',display:'flex'},styledPropsCSSObject);});var openURL$2=function(){var _ref=_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 _ref.apply(this,arguments);};}();var _worklet_273135029952_init_data={code:"function anonymous(){const{withTiming,isPressed,activeBackgroundColor,defaultBackgroundColor,duration,easing,activeBorderColor,defaultBorderColor}=this._closure;return{backgroundColor:withTiming(isPressed.value?activeBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing}),borderColor:withTiming(isPressed.value?activeBorderColor:defaultBorderColor,{duration:duration,easing:easing})};}",location:"/home/runner/work/blade/blade/packages/blade/src/components/Button/BaseButton/StyledBaseButton.native.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AAuF0C,SAAAA,SAAMA,CAAA,QAAAC,UAAA,CAAAC,SAAA,CAAAC,qBAAA,CAAAC,sBAAA,CAAAC,QAAA,CAAAC,MAAA,CAAAC,iBAAA,CAAAC,kBAAA,OAAAC,QAAA,CAC5C,MAAO,CACLC,eAAe,CAAET,UAAU,CACzBC,SAAS,CAACS,KAAK,CAAGR,qBAAqB,CAAGC,sBAAsB,CAChE,CACEC,QAAQ,CAARA,QAAQ,CACRC,aACF,CAAC,CACF,CACDM,WAAW,CAAEX,UAAU,CAACC,SAAS,CAACS,KAAK,CAAGJ,iBAAiB,CAAGC,kBAAkB,CAAE,CAChFH,QAAQ,CAARA,QAAQ,CACRC,aACF,CAAC,CACH,CAAC,CACH\",\"names\":[\"anonymous\",\"withTiming\",\"isPressed\",\"activeBackgroundColor\",\"defaultBackgroundColor\",\"duration\",\"easing\",\"activeBorderColor\",\"defaultBorderColor\",\"_closure\",\"backgroundColor\",\"value\",\"borderColor\"],\"sources\":[\"/home/runner/work/blade/blade/packages/blade/src/components/Button/BaseButton/StyledBaseButton.native.tsx\"]}",version:"3.4.1"};var _StyledBaseButton=function _StyledBaseButton(_ref2,ref){var onClick=_ref2.onClick,href=_ref2.href;_ref2.onBlur;_ref2.onKeyDown;var _children=_ref2.children,minHeight=_ref2.minHeight,buttonPaddingTop=_ref2.buttonPaddingTop,buttonPaddingBottom=_ref2.buttonPaddingBottom,buttonPaddingLeft=_ref2.buttonPaddingLeft,buttonPaddingRight=_ref2.buttonPaddingRight,isFullWidth=_ref2.isFullWidth,disabled=_ref2.disabled,defaultBackgroundColor=_ref2.defaultBackgroundColor,defaultBorderColor=_ref2.defaultBorderColor,hoverBackgroundColor=_ref2.hoverBackgroundColor,activeBackgroundColor=_ref2.activeBackgroundColor,focusBackgroundColor=_ref2.focusBackgroundColor,focusRingColor=_ref2.focusRingColor,hoverBorderColor=_ref2.hoverBorderColor,activeBorderColor=_ref2.activeBorderColor,focusBorderColor=_ref2.focusBorderColor,borderWidth=_ref2.borderWidth,borderRadius=_ref2.borderRadius,motionDuration=_ref2.motionDuration,motionEasing=_ref2.motionEasing,isLoading=_ref2.isLoading,accessibilityProps=_ref2.accessibilityProps,testID=_ref2.testID,onTouchStart=_ref2.onTouchStart,onTouchEnd=_ref2.onTouchEnd,onPointerEnter=_ref2.onPointerEnter,onPointerDown=_ref2.onPointerDown,onFocus=_ref2.onFocus,styledProps=_objectWithoutProperties(_ref2,_excluded$G);var _useTheme=useTheme(),theme=_useTheme.theme;var isPressed=useSharedValue(false);var duration=getIn(theme.motion,motionDuration);var easing=getIn(theme.motion,motionEasing);var animatedStyles=useAnimatedStyle(function(){var _e=[new global.Error(),-9,-27];var _f=function _f(){return {backgroundColor:withTiming(isPressed.value?activeBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing}),borderColor:withTiming(isPressed.value?activeBorderColor:defaultBorderColor,{duration:duration,easing:easing})};};_f._closure={withTiming:withTiming,isPressed:isPressed,activeBackgroundColor:activeBackgroundColor,defaultBackgroundColor:defaultBackgroundColor,duration:duration,easing:easing,activeBorderColor:activeBorderColor,defaultBorderColor:defaultBorderColor};_f.__initData=_worklet_273135029952_init_data;_f.__workletHash=273135029952;_f.__stackDetails=_e;return _f;}());var handleOnPress=function handleOnPress(event){if(href){void openURL$2(href);}if(onClick){onClick(event);}};return jsx(StyledPressable$3,Object.assign({},styledProps,accessibilityProps,{ref:ref,role:"button",onTouchStart:castNativeType(onTouchStart),onTouchEnd:castNativeType(onTouchEnd),onPointerEnter:castNativeType(onPointerEnter),onPointerDown:castNativeType(onPointerDown),onFocus:castNativeType(onFocus),isLoading:isLoading,onPress:handleOnPress,style:animatedStyles,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,isFullWidth:isFullWidth,disabled:disabled,defaultBackgroundColor:defaultBackgroundColor,defaultBorderColor:defaultBorderColor,hoverBackgroundColor:hoverBackgroundColor,activeBackgroundColor:activeBackgroundColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,activeBorderColor:activeBorderColor,focusBorderColor:focusBorderColor,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing,testID:testID,children:function children(_ref3){var pressed=_ref3.pressed;isPressed.value=pressed;return _children;}}));};var StyledBaseButton=assignWithoutSideEffects(React__default.forwardRef(_StyledBaseButton),{displayName:'StyledBaseButton'});
2700
2710
 
2701
2711
  var typography={fonts:{size:{xsmall:75,small:75,medium:100,large:200}},lineHeights:{xsmall:50,small:50,medium:100,large:300}};var minHeight={xsmall:size[28],small:size[32],medium:size[36],large:size[48]};var buttonPadding={xsmall:{top:0,bottom:0,left:3,right:3},small:{top:0,bottom:0,left:4,right:4},medium:{top:0,bottom:0,left:6,right:6},large:{top:0,bottom:0,left:6,right:6}};var buttonIconOnlyPadding={xsmall:{top:0,bottom:0,left:4,right:4},small:{top:0,bottom:0,left:3,right:3},medium:{top:0,bottom:0,left:3,right:3},large:{top:0,bottom:0,left:4,right:4}};var buttonSizeToIconSizeMap={xsmall:'small',small:'small',medium:'medium',large:'medium'};var buttonIconOnlySizeToIconSizeMap={xsmall:'medium',small:'medium',medium:'large',large:'xlarge'};var buttonSizeToSpinnerSizeMap={xsmall:'medium',small:'large',medium:'large',large:'xlarge'};var textPadding={xsmall:2,small:2,medium:3,large:3};
2702
2712
 
@@ -2708,11 +2718,9 @@ var SpinnerIcon=function SpinnerIcon(_ref){var dimensions=_ref.dimensions,color=
2708
2718
 
2709
2719
  var _worklet_5517220837954_init_data={code:"function anonymous(){const{rotation}=this._closure;return{transform:[{rotateZ:rotation.value+\"deg\"}]};}",location:"/home/runner/work/blade/blade/packages/blade/src/components/Spinner/BaseSpinner/SpinningBox.native.tsx",sourceMap:"{\"version\":3,\"mappings\":\"AAsB0C,SAAAA,SAAMA,CAAA,QAAAC,QAAA,OAAAC,QAAA,CAC5C,MAAO,CACLC,SAAS,CAAE,CACT,CACEC,OAAO,CAAKH,QAAQ,CAACI,KAAM,MAC7B,CAAC,CAEL,CAAC,CACH\",\"names\":[\"anonymous\",\"rotation\",\"_closure\",\"transform\",\"rotateZ\",\"value\"],\"sources\":[\"/home/runner/work/blade/blade/packages/blade/src/components/Spinner/BaseSpinner/SpinningBox.native.tsx\"]}",version:"3.4.1"};var SpinningBox=function SpinningBox(_ref){var children=_ref.children;var _useTheme=useTheme(),theme=_useTheme.theme;var duration=castNativeType(makeMotionTime(getIn(theme.motion,motion.duration)));var easing=getIn(theme.motion,motion.easing);var rotation=useSharedValue(0);var animatedStyles=useAnimatedStyle(function(){var _e=[new global.Error(),-2,-27];var _f=function _f(){return {transform:[{rotateZ:`${rotation.value}deg`}]};};_f._closure={rotation:rotation};_f.__initData=_worklet_5517220837954_init_data;_f.__workletHash=5517220837954;_f.__stackDetails=_e;return _f;}(),[rotation.value]);React__default.useEffect(function(){rotation.value=withRepeat(withTiming(360,{duration:duration,easing:easing}),-1);return function(){cancelAnimation(rotation);};},[duration,easing,rotation]);return jsx(BaseBox,{alignSelf:"center",children:jsx(Animated$1.View,{style:animatedStyles,children:children})});};
2710
2720
 
2711
- var _excluded$G=["label","labelPosition","accessibilityLabel","contrast","intent","size","testID"];var getColor=function getColor(_ref){var contrast=_ref.contrast,intent=_ref.intent,theme=_ref.theme;if(intent){return getIn(theme.colors,`feedback.${intent}.action.icon.primary.disabled.${contrast}Contrast`);}else if(contrast=='low'){return getIn(theme.colors,'brand.gray.700.lowContrast');}else {return getIn(theme.colors,'brand.gray.700.highContrast');}};var BaseSpinner=function BaseSpinner(_ref2){var label=_ref2.label,_ref2$labelPosition=_ref2.labelPosition,labelPosition=_ref2$labelPosition===void 0?'right':_ref2$labelPosition,accessibilityLabel=_ref2.accessibilityLabel,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,intent=_ref2.intent,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded$G);var _useTheme=useTheme(),theme=_useTheme.theme;return jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.Spinner,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,Object.assign({display:"flex",alignItems:"center",flexDirection:labelPosition==='right'?'row':'column'},makeAccessible({label:accessibilityLabel,role:'progressbar'}),{children:[jsx(SpinningBox,{children:jsx(SpinnerIcon,{dimensions:makeSize(dimensions[size]),color:getColor({contrast:contrast,intent:intent,theme:theme})})}),label&&label.trim().length>0?jsx(BaseBox,{marginLeft:labelPosition==='right'?'spacing.3':'spacing.0',marginTop:labelPosition==='bottom'?'spacing.3':'spacing.0',children:jsx(Text,{variant:"body",weight:"regular",type:"subdued",size:"small",contrast:contrast,children:label})}):null]}))}));};
2712
-
2713
- var getStringFromReactText=function getStringFromReactText(childReactText){if(isEmpty$1(childReactText)){return undefined;}if(Array.isArray(childReactText)){return childReactText.join('');}return String(childReactText);};
2721
+ var _excluded$F=["label","labelPosition","accessibilityLabel","contrast","intent","size","testID"];var getColor=function getColor(_ref){var contrast=_ref.contrast,intent=_ref.intent,theme=_ref.theme;if(intent){return getIn(theme.colors,`feedback.${intent}.action.icon.primary.disabled.${contrast}Contrast`);}else if(contrast=='low'){return getIn(theme.colors,'brand.gray.700.lowContrast');}else {return getIn(theme.colors,'brand.gray.700.highContrast');}};var BaseSpinner=function BaseSpinner(_ref2){var label=_ref2.label,_ref2$labelPosition=_ref2.labelPosition,labelPosition=_ref2$labelPosition===void 0?'right':_ref2$labelPosition,accessibilityLabel=_ref2.accessibilityLabel,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,intent=_ref2.intent,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded$F);var _useTheme=useTheme(),theme=_useTheme.theme;return jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.Spinner,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,Object.assign({display:"flex",alignItems:"center",flexDirection:labelPosition==='right'?'row':'column'},makeAccessible({label:accessibilityLabel,role:'progressbar'}),{children:[jsx(SpinningBox,{children:jsx(SpinnerIcon,{dimensions:makeSize(dimensions[size]),color:getColor({contrast:contrast,intent:intent,theme:theme})})}),label&&label.trim().length>0?jsx(BaseBox,{marginLeft:labelPosition==='right'?'spacing.3':'spacing.0',marginTop:labelPosition==='bottom'?'spacing.3':'spacing.0',children:jsx(Text,{variant:"body",weight:"regular",type:"subdued",size:"small",contrast:contrast,children:label})}):null]}))}));};
2714
2722
 
2715
- var _excluded$F=["href","target","rel","variant","intent","contrast","size","icon","iconPosition","isDisabled","isFullWidth","isLoading","onClick","onBlur","onKeyDown","type","children","testID","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","accessibilityProps","onTouchEnd","onTouchStart"];var getRenderElement=function getRenderElement(href){if(isReactNative$4()){return undefined;}if(href){return 'a';}return 'button';};var getColorToken$1=function getColorToken(_ref){var property=_ref.property,variant=_ref.variant,state=_ref.state,contrast=_ref.contrast,intent=_ref.intent;if(intent&&contrast){return `feedback.${intent}.action.${property}.primary.${state}.${contrast}Contrast`;}return `action.${property}.${variant}.${state}`;};var getProps$1=function getProps(_ref2){var buttonTypographyTokens=_ref2.buttonTypographyTokens,children=_ref2.children,isDisabled=_ref2.isDisabled,size=_ref2.size,theme=_ref2.theme,variant=_ref2.variant,intent=_ref2.intent,contrast=_ref2.contrast,hasIcon=_ref2.hasIcon;var isIconOnly=hasIcon&&(!children||(children==null?void 0:children.trim().length)===0);var props={iconSize:isIconOnly?buttonIconOnlySizeToIconSizeMap[size]:buttonSizeToIconSizeMap[size],spinnerSize:buttonSizeToSpinnerSizeMap[size],fontSize:buttonTypographyTokens.fonts.size[size],lineHeight:buttonTypographyTokens.lineHeights[size],minHeight:makeSize(minHeight[size]),iconPadding:hasIcon&&children!=null&&children.trim()?`spacing.${textPadding[size]}`:undefined,iconColor:getColorToken$1({property:'icon',variant:variant,contrast:contrast,intent:intent,state:'default'}),textColor:getColorToken$1({property:'text',variant:variant,contrast:contrast,intent:intent,state:'default'}),buttonPaddingTop:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].top]):makeSpace(theme.spacing[buttonPadding[size].top]),buttonPaddingBottom:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].bottom]):makeSpace(theme.spacing[buttonPadding[size].bottom]),buttonPaddingLeft:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].left]):makeSpace(theme.spacing[buttonPadding[size].left]),buttonPaddingRight:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].right]):makeSpace(theme.spacing[buttonPadding[size].right]),text:size==='xsmall'?children==null?void 0:children.trim().toUpperCase():children==null?void 0:children.trim(),defaultBackgroundColor:getIn(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'default'})),defaultBorderColor:getIn(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'default'})),hoverBackgroundColor:getIn(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'hover'})),hoverBorderColor:getIn(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'hover'})),activeBackgroundColor:getIn(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'active'})),activeBorderColor:getIn(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'active'})),focusBackgroundColor:getIn(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'focus'})),focusBorderColor:getIn(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'focus'})),focusRingColor:getIn(theme.colors,'brand.primary.400'),borderWidth:makeBorderSize(theme.border.width.thin),borderRadius:makeBorderSize(theme.border.radius.small),motionDuration:'duration.xquick',motionEasing:'easing.standard.effective'};if(isDisabled){var disabledBackgroundColor=getIn(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'disabled'}));var disabledBorderColor=getIn(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'disabled'}));props.iconColor=getColorToken$1({property:'icon',variant:variant,contrast:contrast,intent:intent,state:'disabled'});props.textColor=getColorToken$1({property:'text',variant:variant,contrast:contrast,intent:intent,state:'disabled'});props.defaultBackgroundColor=disabledBackgroundColor;props.defaultBorderColor=disabledBorderColor;props.hoverBackgroundColor=disabledBackgroundColor;props.hoverBorderColor=disabledBorderColor;props.activeBackgroundColor=disabledBackgroundColor;props.activeBorderColor=disabledBorderColor;props.focusBackgroundColor=disabledBackgroundColor;props.focusBorderColor=disabledBorderColor;}return props;};var ButtonContent=styled(BaseBox)(function(_ref3){var isHidden=_ref3.isHidden;return {opacity:isHidden?0:1};});var _BaseButton=function _BaseButton(_ref4,ref){var href=_ref4.href,target=_ref4.target,rel=_ref4.rel,_ref4$variant=_ref4.variant,variant=_ref4$variant===void 0?'primary':_ref4$variant,intent=_ref4.intent,_ref4$contrast=_ref4.contrast,contrast=_ref4$contrast===void 0?'low':_ref4$contrast,_ref4$size=_ref4.size,size=_ref4$size===void 0?'medium':_ref4$size,Icon=_ref4.icon,_ref4$iconPosition=_ref4.iconPosition,iconPosition=_ref4$iconPosition===void 0?'left':_ref4$iconPosition,_ref4$isDisabled=_ref4.isDisabled,isDisabled=_ref4$isDisabled===void 0?false:_ref4$isDisabled,_ref4$isFullWidth=_ref4.isFullWidth,isFullWidth=_ref4$isFullWidth===void 0?false:_ref4$isFullWidth,_ref4$isLoading=_ref4.isLoading,isLoading=_ref4$isLoading===void 0?false:_ref4$isLoading,onClick=_ref4.onClick,onBlur=_ref4.onBlur,onKeyDown=_ref4.onKeyDown,_ref4$type=_ref4.type,type=_ref4$type===void 0?'button':_ref4$type,children=_ref4.children,testID=_ref4.testID,onFocus=_ref4.onFocus,onMouseLeave=_ref4.onMouseLeave,onMouseMove=_ref4.onMouseMove,onPointerDown=_ref4.onPointerDown,onPointerEnter=_ref4.onPointerEnter,accessibilityProps=_ref4.accessibilityProps,onTouchEnd=_ref4.onTouchEnd,onTouchStart=_ref4.onTouchStart,rest=_objectWithoutProperties(_ref4,_excluded$F);var isLink=Boolean(href);var childrenString=getStringFromReactText(children);var disabled=isLoading||isDisabled&&!isLink;var _useTheme=useTheme(),theme=_useTheme.theme;if(__DEV__){if(!Icon&&!(childrenString!=null&&childrenString.trim())){throwBladeError({message:'At least one of icon or text is required to render a button.',moduleName:'BaseButton'});}}var prevLoading=usePrevious(isLoading);React__default.useEffect(function(){if(isLoading)announce('Started loading');if(!isLoading&&prevLoading)announce('Stopped loading');},[isLoading,prevLoading]);var _getProps=getProps$1({buttonTypographyTokens:typography,children:childrenString,isDisabled:disabled,size:size,variant:variant,theme:theme,intent:intent,contrast:contrast,hasIcon:Boolean(Icon)}),activeBorderColor=_getProps.activeBorderColor,activeBackgroundColor=_getProps.activeBackgroundColor,defaultBorderColor=_getProps.defaultBorderColor,defaultBackgroundColor=_getProps.defaultBackgroundColor,minHeight=_getProps.minHeight,buttonPaddingTop=_getProps.buttonPaddingTop,buttonPaddingBottom=_getProps.buttonPaddingBottom,buttonPaddingLeft=_getProps.buttonPaddingLeft,buttonPaddingRight=_getProps.buttonPaddingRight,focusBorderColor=_getProps.focusBorderColor,focusBackgroundColor=_getProps.focusBackgroundColor,focusRingColor=_getProps.focusRingColor,fontSize=_getProps.fontSize,hoverBorderColor=_getProps.hoverBorderColor,hoverBackgroundColor=_getProps.hoverBackgroundColor,iconColor=_getProps.iconColor,iconSize=_getProps.iconSize,iconPadding=_getProps.iconPadding,spinnerSize=_getProps.spinnerSize,lineHeight=_getProps.lineHeight,text=_getProps.text,textColor=_getProps.textColor,borderWidth=_getProps.borderWidth,borderRadius=_getProps.borderRadius,motionDuration=_getProps.motionDuration,motionEasing=_getProps.motionEasing;var renderElement=React__default.useMemo(function(){return getRenderElement(href);},[href]);var defaultRel=target==='_blank'?'noreferrer noopener':undefined;return jsxs(StyledBaseButton,Object.assign({ref:ref,as:renderElement,href:href,target:target,rel:rel!=null?rel:defaultRel,accessibilityProps:Object.assign({},makeAccessible(Object.assign({role:isLink?'link':'button'},accessibilityProps))),isLoading:isLoading,disabled:disabled,activeBorderColor:activeBorderColor,activeBackgroundColor:activeBackgroundColor,defaultBorderColor:defaultBorderColor,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,defaultBackgroundColor:defaultBackgroundColor,focusBorderColor:focusBorderColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,hoverBackgroundColor:hoverBackgroundColor,isFullWidth:isFullWidth,onClick:onClick,onBlur:onBlur,onFocus:onFocus,onMouseLeave:onMouseLeave,onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onKeyDown:onKeyDown,onTouchStart:onTouchStart,onTouchEnd:onTouchEnd,type:type,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing},metaAttribute({name:MetaConstants.Button,testID:testID}),getStyledProps(rest),{children:[isLoading?jsx(BaseBox,{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"0px",left:"0px",bottom:"0px",right:"0px",children:jsx(BaseSpinner,{accessibilityLabel:"Loading",size:spinnerSize,intent:intent,contrast:contrast})}):null,jsxs(ButtonContent,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",flex:1,isHidden:isLoading,children:[Icon&&iconPosition=='left'?jsx(BaseBox,{paddingRight:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null,text?jsx(BaseText,{lineHeight:lineHeight,fontSize:fontSize,fontWeight:"bold",textAlign:"center",color:textColor,children:text}):null,Icon&&iconPosition=='right'?jsx(BaseBox,{paddingLeft:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null]})]}));};var BaseButton=assignWithoutSideEffects(React__default.forwardRef(_BaseButton),{displayName:'BaseButton'});
2723
+ var _excluded$E=["href","target","rel","variant","intent","contrast","size","icon","iconPosition","isDisabled","isFullWidth","isLoading","onClick","onBlur","onKeyDown","type","children","testID","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","accessibilityProps","onTouchEnd","onTouchStart"];var getRenderElement=function getRenderElement(href){if(isReactNative$4()){return undefined;}if(href){return 'a';}return 'button';};var getColorToken$1=function getColorToken(_ref){var property=_ref.property,variant=_ref.variant,state=_ref.state,contrast=_ref.contrast,intent=_ref.intent;if(intent&&contrast){return `feedback.${intent}.action.${property}.primary.${state}.${contrast}Contrast`;}return `action.${property}.${variant}.${state}`;};var getProps$1=function getProps(_ref2){var buttonTypographyTokens=_ref2.buttonTypographyTokens,children=_ref2.children,isDisabled=_ref2.isDisabled,size=_ref2.size,theme=_ref2.theme,variant=_ref2.variant,intent=_ref2.intent,contrast=_ref2.contrast,hasIcon=_ref2.hasIcon;var isIconOnly=hasIcon&&(!children||(children==null?void 0:children.trim().length)===0);var props={iconSize:isIconOnly?buttonIconOnlySizeToIconSizeMap[size]:buttonSizeToIconSizeMap[size],spinnerSize:buttonSizeToSpinnerSizeMap[size],fontSize:buttonTypographyTokens.fonts.size[size],lineHeight:buttonTypographyTokens.lineHeights[size],minHeight:makeSize(minHeight[size]),iconPadding:hasIcon&&children!=null&&children.trim()?`spacing.${textPadding[size]}`:undefined,iconColor:getColorToken$1({property:'icon',variant:variant,contrast:contrast,intent:intent,state:'default'}),textColor:getColorToken$1({property:'text',variant:variant,contrast:contrast,intent:intent,state:'default'}),buttonPaddingTop:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].top]):makeSpace(theme.spacing[buttonPadding[size].top]),buttonPaddingBottom:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].bottom]):makeSpace(theme.spacing[buttonPadding[size].bottom]),buttonPaddingLeft:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].left]):makeSpace(theme.spacing[buttonPadding[size].left]),buttonPaddingRight:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].right]):makeSpace(theme.spacing[buttonPadding[size].right]),text:size==='xsmall'?children==null?void 0:children.trim().toUpperCase():children==null?void 0:children.trim(),defaultBackgroundColor:getIn(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'default'})),defaultBorderColor:getIn(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'default'})),hoverBackgroundColor:getIn(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'hover'})),hoverBorderColor:getIn(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'hover'})),activeBackgroundColor:getIn(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'active'})),activeBorderColor:getIn(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'active'})),focusBackgroundColor:getIn(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'focus'})),focusBorderColor:getIn(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'focus'})),focusRingColor:getIn(theme.colors,'brand.primary.400'),borderWidth:makeBorderSize(theme.border.width.thin),borderRadius:makeBorderSize(theme.border.radius.small),motionDuration:'duration.xquick',motionEasing:'easing.standard.effective'};if(isDisabled){var disabledBackgroundColor=getIn(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'disabled'}));var disabledBorderColor=getIn(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'disabled'}));props.iconColor=getColorToken$1({property:'icon',variant:variant,contrast:contrast,intent:intent,state:'disabled'});props.textColor=getColorToken$1({property:'text',variant:variant,contrast:contrast,intent:intent,state:'disabled'});props.defaultBackgroundColor=disabledBackgroundColor;props.defaultBorderColor=disabledBorderColor;props.hoverBackgroundColor=disabledBackgroundColor;props.hoverBorderColor=disabledBorderColor;props.activeBackgroundColor=disabledBackgroundColor;props.activeBorderColor=disabledBorderColor;props.focusBackgroundColor=disabledBackgroundColor;props.focusBorderColor=disabledBorderColor;}return props;};var ButtonContent=styled(BaseBox)(function(_ref3){var isHidden=_ref3.isHidden;return {opacity:isHidden?0:1};});var _BaseButton=function _BaseButton(_ref4,ref){var href=_ref4.href,target=_ref4.target,rel=_ref4.rel,_ref4$variant=_ref4.variant,variant=_ref4$variant===void 0?'primary':_ref4$variant,intent=_ref4.intent,_ref4$contrast=_ref4.contrast,contrast=_ref4$contrast===void 0?'low':_ref4$contrast,_ref4$size=_ref4.size,size=_ref4$size===void 0?'medium':_ref4$size,Icon=_ref4.icon,_ref4$iconPosition=_ref4.iconPosition,iconPosition=_ref4$iconPosition===void 0?'left':_ref4$iconPosition,_ref4$isDisabled=_ref4.isDisabled,isDisabled=_ref4$isDisabled===void 0?false:_ref4$isDisabled,_ref4$isFullWidth=_ref4.isFullWidth,isFullWidth=_ref4$isFullWidth===void 0?false:_ref4$isFullWidth,_ref4$isLoading=_ref4.isLoading,isLoading=_ref4$isLoading===void 0?false:_ref4$isLoading,onClick=_ref4.onClick,onBlur=_ref4.onBlur,onKeyDown=_ref4.onKeyDown,_ref4$type=_ref4.type,type=_ref4$type===void 0?'button':_ref4$type,children=_ref4.children,testID=_ref4.testID,onFocus=_ref4.onFocus,onMouseLeave=_ref4.onMouseLeave,onMouseMove=_ref4.onMouseMove,onPointerDown=_ref4.onPointerDown,onPointerEnter=_ref4.onPointerEnter,accessibilityProps=_ref4.accessibilityProps,onTouchEnd=_ref4.onTouchEnd,onTouchStart=_ref4.onTouchStart,rest=_objectWithoutProperties(_ref4,_excluded$E);var isLink=Boolean(href);var childrenString=getStringFromReactText(children);var disabled=isLoading||isDisabled&&!isLink;var _useTheme=useTheme(),theme=_useTheme.theme;if(__DEV__){if(!Icon&&!(childrenString!=null&&childrenString.trim())){throwBladeError({message:'At least one of icon or text is required to render a button.',moduleName:'BaseButton'});}}var prevLoading=usePrevious(isLoading);React__default.useEffect(function(){if(isLoading)announce('Started loading');if(!isLoading&&prevLoading)announce('Stopped loading');},[isLoading,prevLoading]);var _getProps=getProps$1({buttonTypographyTokens:typography,children:childrenString,isDisabled:disabled,size:size,variant:variant,theme:theme,intent:intent,contrast:contrast,hasIcon:Boolean(Icon)}),activeBorderColor=_getProps.activeBorderColor,activeBackgroundColor=_getProps.activeBackgroundColor,defaultBorderColor=_getProps.defaultBorderColor,defaultBackgroundColor=_getProps.defaultBackgroundColor,minHeight=_getProps.minHeight,buttonPaddingTop=_getProps.buttonPaddingTop,buttonPaddingBottom=_getProps.buttonPaddingBottom,buttonPaddingLeft=_getProps.buttonPaddingLeft,buttonPaddingRight=_getProps.buttonPaddingRight,focusBorderColor=_getProps.focusBorderColor,focusBackgroundColor=_getProps.focusBackgroundColor,focusRingColor=_getProps.focusRingColor,fontSize=_getProps.fontSize,hoverBorderColor=_getProps.hoverBorderColor,hoverBackgroundColor=_getProps.hoverBackgroundColor,iconColor=_getProps.iconColor,iconSize=_getProps.iconSize,iconPadding=_getProps.iconPadding,spinnerSize=_getProps.spinnerSize,lineHeight=_getProps.lineHeight,text=_getProps.text,textColor=_getProps.textColor,borderWidth=_getProps.borderWidth,borderRadius=_getProps.borderRadius,motionDuration=_getProps.motionDuration,motionEasing=_getProps.motionEasing;var renderElement=React__default.useMemo(function(){return getRenderElement(href);},[href]);var defaultRel=target==='_blank'?'noreferrer noopener':undefined;return jsxs(StyledBaseButton,Object.assign({ref:ref,as:renderElement,href:href,target:target,rel:rel!=null?rel:defaultRel,accessibilityProps:Object.assign({},makeAccessible(Object.assign({role:isLink?'link':'button'},accessibilityProps))),isLoading:isLoading,disabled:disabled,activeBorderColor:activeBorderColor,activeBackgroundColor:activeBackgroundColor,defaultBorderColor:defaultBorderColor,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,defaultBackgroundColor:defaultBackgroundColor,focusBorderColor:focusBorderColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,hoverBackgroundColor:hoverBackgroundColor,isFullWidth:isFullWidth,onClick:onClick,onBlur:onBlur,onFocus:onFocus,onMouseLeave:onMouseLeave,onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onKeyDown:onKeyDown,onTouchStart:onTouchStart,onTouchEnd:onTouchEnd,type:type,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing},metaAttribute({name:MetaConstants.Button,testID:testID}),getStyledProps(rest),{children:[isLoading?jsx(BaseBox,{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"0px",left:"0px",bottom:"0px",right:"0px",children:jsx(BaseSpinner,{accessibilityLabel:"Loading",size:spinnerSize,intent:intent,contrast:contrast})}):null,jsxs(ButtonContent,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",flex:1,isHidden:isLoading,children:[Icon&&iconPosition=='left'?jsx(BaseBox,{paddingRight:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null,text?jsx(BaseText,{lineHeight:lineHeight,fontSize:fontSize,fontWeight:"bold",textAlign:"center",color:textColor,children:text}):null,Icon&&iconPosition=='right'?jsx(BaseBox,{paddingLeft:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null]})]}));};var BaseButton=assignWithoutSideEffects(React__default.forwardRef(_BaseButton),{displayName:'BaseButton'});
2716
2724
 
2717
2725
  var getStyledLinkStyles=function getStyledLinkStyles(_ref){var cursor=_ref.cursor;return {padding:0,backgroundColor:'transparent',outline:'none',textDecoration:'none',border:'none',cursor:cursor};};
2718
2726
 
@@ -2720,17 +2728,9 @@ var StyledNativeLink=styled.Pressable(function(props){var styledPropsCSSObject=u
2720
2728
 
2721
2729
  var useInteraction=function useInteraction(){var _useState=useState('default'),_useState2=_slicedToArray(_useState,2),currentInteraction=_useState2[0],setCurrentInteraction=_useState2[1];var onMouseEnter=function onMouseEnter(){if(currentInteraction!=='active')setCurrentInteraction('hover');};var onMouseLeave=function onMouseLeave(){if(currentInteraction!=='active')setCurrentInteraction('default');};var onFocus=function onFocus(){setCurrentInteraction('active');};var onBlur=function onBlur(){setCurrentInteraction('default');};return {onMouseEnter:onMouseEnter,onMouseLeave:onMouseLeave,onFocus:onFocus,onBlur:onBlur,currentInteraction:currentInteraction,setCurrentInteraction:setCurrentInteraction};};
2722
2730
 
2723
- var _excluded$E=["children","icon","iconPosition","isDisabled","onClick","onKeyDown","variant","href","target","rel","intent","contrast","accessibilityProps","className","style","size","testID","hitSlop","htmlTitle","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd"],_excluded2$1=["currentInteraction","setCurrentInteraction"];var getColorToken=function getColorToken(_ref){var variant=_ref.variant,intent=_ref.intent,contrast=_ref.contrast,element=_ref.element,currentInteraction=_ref.currentInteraction,isDisabled=_ref.isDisabled,isVisited=_ref.isVisited;var state=currentInteraction;if(isDisabled&&variant=='button'){state='disabled';}if(isVisited&&variant=='anchor'&&!intent){state='visited';}if(intent&&state!=='visited'){return `feedback.${intent}.action.${element}.link.${state}.${contrast}Contrast`;}return `action.${element}.link.${state}`;};var getProps=function getProps(_ref2){var theme=_ref2.theme,variant=_ref2.variant,currentInteraction=_ref2.currentInteraction,children=_ref2.children,isDisabled=_ref2.isDisabled,intent=_ref2.intent,contrast=_ref2.contrast,isVisited=_ref2.isVisited,target=_ref2.target,size=_ref2.size;var isButton=variant==='button';var textSizes={fontSize:{xsmall:25,small:75,medium:100,large:200},lineHeight:{xsmall:50,small:50,medium:100,large:300}};var props={as:isButton?'button':'a',textDecorationLine:!isButton&&currentInteraction!=='default'?'underline':'none',iconColor:getColorToken({variant:variant,intent:intent,contrast:contrast,element:'icon',currentInteraction:currentInteraction,isDisabled:isDisabled,isVisited:isVisited}),fontSize:textSizes.fontSize[size],lineHeight:textSizes.lineHeight[size],iconSize:size,iconPadding:children!=null&&children.trim()?'spacing.2':'spacing.0',textColor:getColorToken({variant:variant,intent:intent,contrast:contrast,element:'text',currentInteraction:currentInteraction,isDisabled:isDisabled,isVisited:isVisited}),focusRingColor:getIn(theme.colors,'brand.primary.400'),motionDuration:'duration.2xquick',motionEasing:'easing.standard.effective',cursor:isButton&&isDisabled?'not-allowed':'pointer',disabled:isButton&&isDisabled,role:isButton?'button':'link',defaultRel:target&&target==='_blank'?'noreferrer noopener':undefined,type:isButton?'button':undefined};return props;};var _BaseLink=function _BaseLink(_ref3,ref){var children=_ref3.children,Icon=_ref3.icon,_ref3$iconPosition=_ref3.iconPosition,iconPosition=_ref3$iconPosition===void 0?'left':_ref3$iconPosition,_ref3$isDisabled=_ref3.isDisabled,isDisabled=_ref3$isDisabled===void 0?false:_ref3$isDisabled,onClick=_ref3.onClick,onKeyDown=_ref3.onKeyDown,_ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'anchor':_ref3$variant,href=_ref3.href,target=_ref3.target,rel=_ref3.rel,intent=_ref3.intent,_ref3$contrast=_ref3.contrast,contrast=_ref3$contrast===void 0?'low':_ref3$contrast,accessibilityProps=_ref3.accessibilityProps,className=_ref3.className,style=_ref3.style,_ref3$size=_ref3.size,size=_ref3$size===void 0?'medium':_ref3$size,testID=_ref3.testID,hitSlop=_ref3.hitSlop,htmlTitle=_ref3.htmlTitle,_onBlur=_ref3.onBlur,_onFocus=_ref3.onFocus,_onMouseLeave=_ref3.onMouseLeave,onMouseMove=_ref3.onMouseMove,onPointerDown=_ref3.onPointerDown,onPointerEnter=_ref3.onPointerEnter,onTouchStart=_ref3.onTouchStart,onTouchEnd=_ref3.onTouchEnd,styledProps=_objectWithoutProperties(_ref3,_excluded$E);var _useState=useState(false),_useState2=_slicedToArray(_useState,2),isVisited=_useState2[0],setIsVisited=_useState2[1];var childrenString=getStringFromReactText(children);var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction,syntheticEvents=_objectWithoutProperties(_useInteraction,_excluded2$1);var _useTheme=useTheme(),theme=_useTheme.theme;if(__DEV__){if(!Icon&&!(childrenString!=null&&childrenString.trim())){throwBladeError({message:`At least one of icon or text is required to render a link.`,moduleName:'BaseLink'});}}var _getProps=getProps({theme:theme,variant:variant,currentInteraction:currentInteraction,children:childrenString,isDisabled:isDisabled,intent:intent,contrast:contrast,isVisited:isVisited,target:target,size:size}),as=_getProps.as,textDecorationLine=_getProps.textDecorationLine,iconColor=_getProps.iconColor,iconPadding=_getProps.iconPadding,iconSize=_getProps.iconSize,fontSize=_getProps.fontSize,textColor=_getProps.textColor,focusRingColor=_getProps.focusRingColor,motionDuration=_getProps.motionDuration,motionEasing=_getProps.motionEasing,cursor=_getProps.cursor,disabled=_getProps.disabled,role=_getProps.role,defaultRel=_getProps.defaultRel,type=_getProps.type,lineHeight=_getProps.lineHeight;var handleOnClick=function handleOnClick(event){if(!isVisited&&!intent&&variant==='anchor'){setIsVisited(true);}if(onClick){onClick(event);}};var asProp=isReactNative$4()?undefined:'span';return jsx(StyledLink,Object.assign({ref:ref},metaAttribute({name:MetaConstants.Link,testID:testID}),{accessibilityProps:Object.assign({},makeAccessible(Object.assign({role:role,disabled:disabled},accessibilityProps))),variant:variant,as:as,href:href,target:target,rel:rel!=null?rel:defaultRel,onClick:handleOnClick},syntheticEvents,{onBlur:function onBlur(event){_onBlur==null?void 0:_onBlur(event);syntheticEvents.onBlur();},onFocus:function onFocus(event){_onFocus==null?void 0:_onFocus(event);syntheticEvents.onFocus();},onMouseLeave:function onMouseLeave(event){if(_onMouseLeave){_onMouseLeave(event);}syntheticEvents.onMouseLeave();},onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onTouchStart:onTouchStart,onTouchEnd:onTouchEnd,onKeyDown:onKeyDown,disabled:disabled,type:type,cursor:cursor,focusRingColor:focusRingColor,motionDuration:motionDuration,motionEasing:motionEasing,setCurrentInteraction:setCurrentInteraction},getStyledProps(styledProps),{className:className,style:style,hitSlop:hitSlop,title:htmlTitle,children:jsxs(BaseBox,{as:asProp,display:"flex",flexDirection:"row",className:"content-container",alignItems:"center",children:[Icon&&iconPosition=='left'?jsx(BaseBox,{as:asProp,paddingRight:iconPadding,display:"flex",alignItems:"center",children:jsx(Icon,{color:iconColor,size:iconSize})}):null,jsx(BaseText,{as:asProp,textDecorationLine:textDecorationLine,color:textColor,fontSize:fontSize,lineHeight:lineHeight,textAlign:"center",fontWeight:"bold",children:children}),Icon&&iconPosition=='right'?jsx(BaseBox,{as:asProp,paddingLeft:iconPadding,display:"flex",alignItems:"center",children:jsx(Icon,{color:iconColor,size:iconSize})}):null]})}));};var BaseLink=assignWithoutSideEffects(React__default.forwardRef(_BaseLink),{displayName:'BaseLink',componentId:'BaseLink'});
2724
-
2725
- var _excluded$D=["description","title","isDismissible","onDismiss","contrast","isFullWidth","intent","actions","testID"];var isReactNative$3=getPlatformType()==='react-native';var CloseButtonWrapper=isReactNative$3?BaseBox:Fragment$1;var intentIconMap={positive:CheckCircleIcon,negative:AlertTriangleIcon,information:InfoIcon,neutral:InfoIcon,notice:AlertTriangleIcon$1};var Alert=function Alert(_ref){var description=_ref.description,title=_ref.title,_ref$isDismissible=_ref.isDismissible,isDismissible=_ref$isDismissible===void 0?true:_ref$isDismissible,onDismiss=_ref.onDismiss,_ref$contrast=_ref.contrast,contrast=_ref$contrast===void 0?'low':_ref$contrast,_ref$isFullWidth=_ref.isFullWidth,isFullWidth=_ref$isFullWidth===void 0?false:_ref$isFullWidth,_ref$intent=_ref.intent,intent=_ref$intent===void 0?'neutral':_ref$intent,actions=_ref.actions,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$D);if(__DEV__){if(!(actions!=null&&actions.primary)&&actions!=null&&actions.secondary){throwBladeError({message:'SecondaryAction is allowed only when PrimaryAction is defined.',moduleName:'Alert'});}}var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isDesktop=matchedDeviceType==='desktop';var isMobile=!isDesktop;var _useState=useState(true),_useState2=_slicedToArray(_useState,2),isVisible=_useState2[0],setIsVisible=_useState2[1];var contrastType=`${contrast}Contrast`;var iconSize=isFullWidth?'large':'medium';var textSize=isFullWidth?'medium':'small';var Icon=intentIconMap[intent];var iconOffset='spacing.1';if(isReactNative$3){if(isFullWidth&&!title){iconOffset='spacing.1';}else if(!isFullWidth&&!title){iconOffset='spacing.0';}else if(!isFullWidth&&title){iconOffset='spacing.2';}}else if(isMobile){if(!isFullWidth&&title){iconOffset='spacing.2';}else if(isFullWidth&&!title){iconOffset='spacing.2';}}else if(isFullWidth){iconOffset='spacing.0';}var icon=jsx(BaseBox,{marginTop:iconOffset,display:"flex",children:jsx(Icon,{color:`feedback.icon.${intent}.${contrastType}`,size:iconSize})});var _title=title?jsx(BaseBox,{marginBottom:"spacing.2",children:isFullWidth?jsx(Heading,{type:"subtle",size:"small",contrast:contrast,children:title}):jsx(Text,{type:"subtle",weight:"bold",contrast:contrast,children:title})}):null;var _description=jsx(BaseBox,{marginTop:title||isReactNative$3?'spacing.0':'spacing.1',children:jsx(Text,{type:"subtle",size:textSize,contrast:contrast,children:description})});var primaryAction=actions!=null&&actions.primary?jsx(BaseBox,{marginRight:"spacing.5",display:isReactNative$3?castNativeType('flex'):castWebType('inline-flex'),children:jsx(BaseButton,{size:textSize,onClick:actions.primary.onClick,intent:intent,contrast:contrast,children:actions.primary.text})}):null;var secondaryActionParams=actions!=null&&actions.secondary?{onClick:actions.secondary.onClick}:null;if(actions!=null&&actions.secondary&&secondaryActionParams&&'href'in actions.secondary){secondaryActionParams.href=actions.secondary.href;secondaryActionParams.target=actions.secondary.target;secondaryActionParams.rel=actions.secondary.rel;}var secondaryAction=actions!=null&&actions.secondary?jsx(BaseBox,{marginRight:"spacing.4",display:isReactNative$3?castNativeType('flex'):castWebType('inline-flex'),children:jsx(BaseLink,Object.assign({size:textSize,contrast:contrast,intent:intent},secondaryActionParams,{children:actions.secondary.text}))}):null;var showActionsHorizontal=isFullWidth&&isDesktop;var actionsHorizontal=showActionsHorizontal&&(primaryAction||secondaryAction)?jsxs(BaseBox,{flexDirection:"row",alignItems:"center",children:[primaryAction,secondaryAction]}):null;var actionsVertical=!showActionsHorizontal&&(primaryAction||secondaryAction)?jsxs(BaseBox,{marginTop:"spacing.4",flexDirection:"row",alignItems:"center",children:[primaryAction,secondaryAction]}):null;var onClickDismiss=function onClickDismiss(){if(onDismiss){onDismiss();}setIsVisible(false);};var closeButton=isDismissible?jsx(CloseButtonWrapper,{children:jsx(IconButton,{accessibilityLabel:"Dismiss alert",onClick:onClickDismiss,contrast:contrast,size:iconSize,icon:CloseIcon})}):null;var a11yProps=makeAccessible(Object.assign({role:isReactNative$3||intent==='negative'||intent==='notice'?'alert':'status'},intent==='notice'&&{liveRegion:'polite'}));if(!isVisible){return null;}return jsx(BaseBox,Object.assign({},a11yProps,metaAttribute({name:MetaConstants.Alert,testID:testID}),getStyledProps(styledProps),{children:jsxs(StyledAlert,{intent:intent,contrastType:contrastType,isFullWidth:isFullWidth,isDesktop:isDesktop,textAlign:'left',children:[icon,jsxs(BaseBox,{flex:1,paddingLeft:isFullWidth?'spacing.4':'spacing.3',paddingRight:showActionsHorizontal?'spacing.4':'spacing.2',children:[_title,_description,actionsVertical]}),actionsHorizontal,closeButton]})}));};
2726
-
2727
- var getStyledBadgeStyles=function getStyledBadgeStyles(_ref){var theme=_ref.theme,backgroundColor=_ref.backgroundColor;return {backgroundColor:getIn(theme.colors,backgroundColor),borderRadius:makeBorderSize(theme.border.radius.max),display:'flex',flexWrap:'nowrap'};};
2728
-
2729
- var StyledBadge=styled(BaseBox)(function(props){return Object.assign({},getStyledBadgeStyles(props),{alignSelf:'center'});});
2730
-
2731
- var verticalPadding$1={small:'spacing.0',medium:'spacing.1',large:'spacing.2'};var horizontalPadding$1={small:'spacing.3',medium:'spacing.3',large:'spacing.4'};var iconPadding={small:'spacing.1',medium:'spacing.2',large:'spacing.2'};var iconSize={small:'xsmall',medium:'small',large:'small'};
2731
+ var _excluded$D=["children","icon","iconPosition","isDisabled","onClick","onKeyDown","variant","href","target","rel","intent","contrast","accessibilityProps","className","style","size","testID","hitSlop","htmlTitle","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd"],_excluded2$1=["currentInteraction","setCurrentInteraction"];var getColorToken=function getColorToken(_ref){var variant=_ref.variant,intent=_ref.intent,contrast=_ref.contrast,element=_ref.element,currentInteraction=_ref.currentInteraction,isDisabled=_ref.isDisabled,isVisited=_ref.isVisited;var state=currentInteraction;if(isDisabled&&variant=='button'){state='disabled';}if(isVisited&&variant=='anchor'&&!intent){state='visited';}if(intent&&state!=='visited'){return `feedback.${intent}.action.${element}.link.${state}.${contrast}Contrast`;}return `action.${element}.link.${state}`;};var getProps=function getProps(_ref2){var theme=_ref2.theme,variant=_ref2.variant,currentInteraction=_ref2.currentInteraction,children=_ref2.children,isDisabled=_ref2.isDisabled,intent=_ref2.intent,contrast=_ref2.contrast,isVisited=_ref2.isVisited,target=_ref2.target,size=_ref2.size;var isButton=variant==='button';var textSizes={fontSize:{xsmall:25,small:75,medium:100,large:200},lineHeight:{xsmall:50,small:50,medium:100,large:300}};var props={as:isButton?'button':'a',textDecorationLine:!isButton&&currentInteraction!=='default'?'underline':'none',iconColor:getColorToken({variant:variant,intent:intent,contrast:contrast,element:'icon',currentInteraction:currentInteraction,isDisabled:isDisabled,isVisited:isVisited}),fontSize:textSizes.fontSize[size],lineHeight:textSizes.lineHeight[size],iconSize:size,iconPadding:children!=null&&children.trim()?'spacing.2':'spacing.0',textColor:getColorToken({variant:variant,intent:intent,contrast:contrast,element:'text',currentInteraction:currentInteraction,isDisabled:isDisabled,isVisited:isVisited}),focusRingColor:getIn(theme.colors,'brand.primary.400'),motionDuration:'duration.2xquick',motionEasing:'easing.standard.effective',cursor:isButton&&isDisabled?'not-allowed':'pointer',disabled:isButton&&isDisabled,role:isButton?'button':'link',defaultRel:target&&target==='_blank'?'noreferrer noopener':undefined,type:isButton?'button':undefined};return props;};var _BaseLink=function _BaseLink(_ref3,ref){var children=_ref3.children,Icon=_ref3.icon,_ref3$iconPosition=_ref3.iconPosition,iconPosition=_ref3$iconPosition===void 0?'left':_ref3$iconPosition,_ref3$isDisabled=_ref3.isDisabled,isDisabled=_ref3$isDisabled===void 0?false:_ref3$isDisabled,onClick=_ref3.onClick,onKeyDown=_ref3.onKeyDown,_ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'anchor':_ref3$variant,href=_ref3.href,target=_ref3.target,rel=_ref3.rel,intent=_ref3.intent,_ref3$contrast=_ref3.contrast,contrast=_ref3$contrast===void 0?'low':_ref3$contrast,accessibilityProps=_ref3.accessibilityProps,className=_ref3.className,style=_ref3.style,_ref3$size=_ref3.size,size=_ref3$size===void 0?'medium':_ref3$size,testID=_ref3.testID,hitSlop=_ref3.hitSlop,htmlTitle=_ref3.htmlTitle,_onBlur=_ref3.onBlur,_onFocus=_ref3.onFocus,_onMouseLeave=_ref3.onMouseLeave,onMouseMove=_ref3.onMouseMove,onPointerDown=_ref3.onPointerDown,onPointerEnter=_ref3.onPointerEnter,onTouchStart=_ref3.onTouchStart,onTouchEnd=_ref3.onTouchEnd,styledProps=_objectWithoutProperties(_ref3,_excluded$D);var _useState=useState(false),_useState2=_slicedToArray(_useState,2),isVisited=_useState2[0],setIsVisited=_useState2[1];var childrenString=getStringFromReactText(children);var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction,syntheticEvents=_objectWithoutProperties(_useInteraction,_excluded2$1);var _useTheme=useTheme(),theme=_useTheme.theme;if(__DEV__){if(!Icon&&!(childrenString!=null&&childrenString.trim())){throwBladeError({message:`At least one of icon or text is required to render a link.`,moduleName:'BaseLink'});}}var _getProps=getProps({theme:theme,variant:variant,currentInteraction:currentInteraction,children:childrenString,isDisabled:isDisabled,intent:intent,contrast:contrast,isVisited:isVisited,target:target,size:size}),as=_getProps.as,textDecorationLine=_getProps.textDecorationLine,iconColor=_getProps.iconColor,iconPadding=_getProps.iconPadding,iconSize=_getProps.iconSize,fontSize=_getProps.fontSize,textColor=_getProps.textColor,focusRingColor=_getProps.focusRingColor,motionDuration=_getProps.motionDuration,motionEasing=_getProps.motionEasing,cursor=_getProps.cursor,disabled=_getProps.disabled,role=_getProps.role,defaultRel=_getProps.defaultRel,type=_getProps.type,lineHeight=_getProps.lineHeight;var handleOnClick=function handleOnClick(event){if(!isVisited&&!intent&&variant==='anchor'){setIsVisited(true);}if(onClick){onClick(event);}};var asProp=isReactNative$4()?undefined:'span';return jsx(StyledLink,Object.assign({ref:ref},metaAttribute({name:MetaConstants.Link,testID:testID}),{accessibilityProps:Object.assign({},makeAccessible(Object.assign({role:role,disabled:disabled},accessibilityProps))),variant:variant,as:as,href:href,target:target,rel:rel!=null?rel:defaultRel,onClick:handleOnClick},syntheticEvents,{onBlur:function onBlur(event){_onBlur==null?void 0:_onBlur(event);syntheticEvents.onBlur();},onFocus:function onFocus(event){_onFocus==null?void 0:_onFocus(event);syntheticEvents.onFocus();},onMouseLeave:function onMouseLeave(event){if(_onMouseLeave){_onMouseLeave(event);}syntheticEvents.onMouseLeave();},onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onTouchStart:onTouchStart,onTouchEnd:onTouchEnd,onKeyDown:onKeyDown,disabled:disabled,type:type,cursor:cursor,focusRingColor:focusRingColor,motionDuration:motionDuration,motionEasing:motionEasing,setCurrentInteraction:setCurrentInteraction},getStyledProps(styledProps),{className:className,style:style,hitSlop:hitSlop,title:htmlTitle,children:jsxs(BaseBox,{as:asProp,display:"flex",flexDirection:"row",className:"content-container",alignItems:"center",children:[Icon&&iconPosition=='left'?jsx(BaseBox,{as:asProp,paddingRight:iconPadding,display:"flex",alignItems:"center",children:jsx(Icon,{color:iconColor,size:iconSize})}):null,jsx(BaseText,{as:asProp,textDecorationLine:textDecorationLine,color:textColor,fontSize:fontSize,lineHeight:lineHeight,textAlign:"center",fontWeight:"bold",children:children}),Icon&&iconPosition=='right'?jsx(BaseBox,{as:asProp,paddingLeft:iconPadding,display:"flex",alignItems:"center",children:jsx(Icon,{color:iconColor,size:iconSize})}):null]})}));};var BaseLink=assignWithoutSideEffects(React__default.forwardRef(_BaseLink),{displayName:'BaseLink',componentId:'BaseLink'});
2732
2732
 
2733
- var _excluded$C=["children","contrast","fontWeight","icon","size","variant","testID"];var isFeedbackVariant$1=function isFeedbackVariant(variant){var feedbackVariants=['information','negative','neutral','notice','positive'];return feedbackVariants.includes(variant);};var getColorProps$1=function getColorProps(_ref){var variant=_ref.variant,contrast=_ref.contrast;var props={iconColor:'feedback.icon.neutral.lowContrast',textColor:'feedback.text.neutral.lowContrast',backgroundColor:'feedback.background.neutral.lowContrast'};if(isFeedbackVariant$1(variant)){props.iconColor=`feedback.icon.${variant}.${contrast}Contrast`;props.textColor=`feedback.text.${variant}.${contrast}Contrast`;props.backgroundColor=`feedback.background.${variant}.${contrast}Contrast`;}else {props.iconColor=`badge.icon.${variant}.${contrast}Contrast`;props.textColor=`badge.text.${variant}.${contrast}Contrast`;props.backgroundColor=`badge.background.${variant}.${contrast}Contrast`;}return props;};var _Badge=function _Badge(_ref2){var children=_ref2.children,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,_ref2$fontWeight=_ref2.fontWeight,fontWeight=_ref2$fontWeight===void 0?'regular':_ref2$fontWeight,Icon=_ref2.icon,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'neutral':_ref2$variant,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded$C);var childrenString=getStringFromReactText(children);if(__DEV__){if(!(childrenString!=null&&childrenString.trim())){throwBladeError({message:'Text as children is required for Badge.',moduleName:'Badge'});}}var _getColorProps=getColorProps$1({variant:variant,contrast:contrast}),backgroundColor=_getColorProps.backgroundColor,iconColor=_getColorProps.iconColor,textColor=_getColorProps.textColor;var badgeTextSizes={small:{variant:'body',size:'xsmall'},medium:{variant:'body',size:'small'},large:{variant:'body',size:'small'}};return jsx(BaseBox,Object.assign({display:isReactNative$4()?'flex':'inline-flex'},metaAttribute({name:MetaConstants.Badge,testID:testID}),getStyledProps(styledProps),{children:jsx(StyledBadge,{backgroundColor:backgroundColor,size:size,textAlign:'left',children:jsxs(BaseBox,{paddingRight:horizontalPadding$1[size],paddingLeft:horizontalPadding$1[size],paddingTop:verticalPadding$1[size],paddingBottom:verticalPadding$1[size],display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",overflow:"hidden",children:[Icon?jsx(BaseBox,{paddingRight:Boolean(Icon)?iconPadding[size]:'spacing.0',display:"flex",children:jsx(Icon,{color:iconColor,size:iconSize[size]})}):null,jsx(Text,Object.assign({},badgeTextSizes[size],{type:"normal",weight:fontWeight,truncateAfterLines:1,color:textColor,children:children}))]})})}));};var Badge=assignWithoutSideEffects(_Badge,{displayName:'Badge',componentId:'Badge'});
2733
+ var _excluded$C=["description","title","isDismissible","onDismiss","contrast","isFullWidth","intent","actions","testID"];var isReactNative$3=getPlatformType()==='react-native';var CloseButtonWrapper=isReactNative$3?BaseBox:Fragment$1;var intentIconMap={positive:CheckCircleIcon,negative:AlertTriangleIcon,information:InfoIcon,neutral:InfoIcon,notice:AlertTriangleIcon$1};var Alert=function Alert(_ref){var description=_ref.description,title=_ref.title,_ref$isDismissible=_ref.isDismissible,isDismissible=_ref$isDismissible===void 0?true:_ref$isDismissible,onDismiss=_ref.onDismiss,_ref$contrast=_ref.contrast,contrast=_ref$contrast===void 0?'low':_ref$contrast,_ref$isFullWidth=_ref.isFullWidth,isFullWidth=_ref$isFullWidth===void 0?false:_ref$isFullWidth,_ref$intent=_ref.intent,intent=_ref$intent===void 0?'neutral':_ref$intent,actions=_ref.actions,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$C);if(__DEV__){if(!(actions!=null&&actions.primary)&&actions!=null&&actions.secondary){throwBladeError({message:'SecondaryAction is allowed only when PrimaryAction is defined.',moduleName:'Alert'});}}var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isDesktop=matchedDeviceType==='desktop';var isMobile=!isDesktop;var _useState=useState(true),_useState2=_slicedToArray(_useState,2),isVisible=_useState2[0],setIsVisible=_useState2[1];var contrastType=`${contrast}Contrast`;var iconSize=isFullWidth?'large':'medium';var textSize=isFullWidth?'medium':'small';var Icon=intentIconMap[intent];var iconOffset='spacing.1';if(isReactNative$3){if(isFullWidth&&!title){iconOffset='spacing.1';}else if(!isFullWidth&&!title){iconOffset='spacing.0';}else if(!isFullWidth&&title){iconOffset='spacing.2';}}else if(isMobile){if(!isFullWidth&&title){iconOffset='spacing.2';}else if(isFullWidth&&!title){iconOffset='spacing.2';}}else if(isFullWidth){iconOffset='spacing.0';}var icon=jsx(BaseBox,{marginTop:iconOffset,display:"flex",children:jsx(Icon,{color:`feedback.icon.${intent}.${contrastType}`,size:iconSize})});var _title=title?jsx(BaseBox,{marginBottom:"spacing.2",children:isFullWidth?jsx(Heading,{type:"subtle",size:"small",contrast:contrast,children:title}):jsx(Text,{type:"subtle",weight:"bold",contrast:contrast,children:title})}):null;var _description=jsx(BaseBox,{marginTop:title||isReactNative$3?'spacing.0':'spacing.1',children:jsx(Text,{type:"subtle",size:textSize,contrast:contrast,children:description})});var primaryAction=actions!=null&&actions.primary?jsx(BaseBox,{marginRight:"spacing.5",display:isReactNative$3?castNativeType('flex'):castWebType('inline-flex'),children:jsx(BaseButton,{size:textSize,onClick:actions.primary.onClick,intent:intent,contrast:contrast,children:actions.primary.text})}):null;var secondaryActionParams=actions!=null&&actions.secondary?{onClick:actions.secondary.onClick}:null;if(actions!=null&&actions.secondary&&secondaryActionParams&&'href'in actions.secondary){secondaryActionParams.href=actions.secondary.href;secondaryActionParams.target=actions.secondary.target;secondaryActionParams.rel=actions.secondary.rel;}var secondaryAction=actions!=null&&actions.secondary?jsx(BaseBox,{marginRight:"spacing.4",display:isReactNative$3?castNativeType('flex'):castWebType('inline-flex'),children:jsx(BaseLink,Object.assign({size:textSize,contrast:contrast,intent:intent},secondaryActionParams,{children:actions.secondary.text}))}):null;var showActionsHorizontal=isFullWidth&&isDesktop;var actionsHorizontal=showActionsHorizontal&&(primaryAction||secondaryAction)?jsxs(BaseBox,{flexDirection:"row",alignItems:"center",children:[primaryAction,secondaryAction]}):null;var actionsVertical=!showActionsHorizontal&&(primaryAction||secondaryAction)?jsxs(BaseBox,{marginTop:"spacing.4",flexDirection:"row",alignItems:"center",children:[primaryAction,secondaryAction]}):null;var onClickDismiss=function onClickDismiss(){if(onDismiss){onDismiss();}setIsVisible(false);};var closeButton=isDismissible?jsx(CloseButtonWrapper,{children:jsx(IconButton,{accessibilityLabel:"Dismiss alert",onClick:onClickDismiss,contrast:contrast,size:iconSize,icon:CloseIcon})}):null;var a11yProps=makeAccessible(Object.assign({role:isReactNative$3||intent==='negative'||intent==='notice'?'alert':'status'},intent==='notice'&&{liveRegion:'polite'}));if(!isVisible){return null;}return jsx(BaseBox,Object.assign({},a11yProps,metaAttribute({name:MetaConstants.Alert,testID:testID}),getStyledProps(styledProps),{children:jsxs(StyledAlert,{intent:intent,contrastType:contrastType,isFullWidth:isFullWidth,isDesktop:isDesktop,textAlign:'left',children:[icon,jsxs(BaseBox,{flex:1,paddingLeft:isFullWidth?'spacing.4':'spacing.3',paddingRight:showActionsHorizontal?'spacing.4':'spacing.2',children:[_title,_description,actionsVertical]}),actionsHorizontal,closeButton]})}));};
2734
2734
 
2735
2735
  var _excluded$B=["children","surfaceLevel","elevation","onTouchEnd","onTouchStart","onPointerDown","onPointerEnter","pointerEvents"];var CardSurfaceStyled=styled(BaseBox)(function(_ref){var surfaceLevel=_ref.surfaceLevel,elevation=_ref.elevation,theme=_ref.theme;var backgroundColor=theme.colors.surface.background[`level${surfaceLevel}`].lowContrast;return {width:'100%',display:'flex',flexDirection:'column',borderWidth:elevation==='none'?`${theme.border.width.thin}`:undefined,borderStyle:elevation==='none'?'solid':undefined,borderColor:elevation==='none'?`${theme.colors.surface.border.normal.lowContrast}`:undefined,backgroundColor:backgroundColor};});var CardSurface=function CardSurface(_ref2){var children=_ref2.children,surfaceLevel=_ref2.surfaceLevel,elevation=_ref2.elevation,onTouchEnd=_ref2.onTouchEnd,onTouchStart=_ref2.onTouchStart,onPointerDown=_ref2.onPointerDown,onPointerEnter=_ref2.onPointerEnter,pointerEvents=_ref2.pointerEvents,props=_objectWithoutProperties(_ref2,_excluded$B);return jsx(CardSurfaceStyled,Object.assign({},props,{surfaceLevel:surfaceLevel,elevation:elevation,onPointerEnter:castNativeType(onPointerEnter),onPointerDown:castNativeType(onPointerDown),onTouchStart:castNativeType(onTouchStart),onTouchEnd:castNativeType(onTouchEnd),pointerEvents:castNativeType(pointerEvents),children:children}));};
2736
2736
 
@@ -2806,7 +2806,7 @@ var _excluded$s=["accessibilityLabel","children","isDisabled","name","defaultVal
2806
2806
 
2807
2807
  var ComponentIds={BottomSheet:'BottomSheet',BottomSheetHeader:'BottomSheetHeader',BottomSheetFooter:'BottomSheetFooter',BottomSheetBody:'BottomSheetBody',BottomSheetGrabHandle:'BottomSheetGrabHandle'};
2808
2808
 
2809
- var _excluded$r=["children","selectionType","onDismiss","testID"];var validDropdownChildren=[dropdownComponentIds.triggers.SelectInput,dropdownComponentIds.triggers.DropdownButton,dropdownComponentIds.triggers.DropdownLink,dropdownComponentIds.DropdownOverlay,dropdownComponentIds.triggers.AutoComplete,ComponentIds.BottomSheet];var _Dropdown=function _Dropdown(_ref){var children=_ref.children,_ref$selectionType=_ref.selectionType,selectionType=_ref$selectionType===void 0?'single':_ref$selectionType,onDismiss=_ref.onDismiss,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$r);var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isOpen=_React$useState2[0],setIsOpen=_React$useState2[1];var _React$useState3=React__default.useState([]),_React$useState4=_slicedToArray(_React$useState3,2),options=_React$useState4[0],setOptions=_React$useState4[1];var _React$useState5=React__default.useState([]),_React$useState6=_slicedToArray(_React$useState5,2),filteredValues=_React$useState6[0],setFilteredValues=_React$useState6[1];var _React$useState7=React__default.useState([]),_React$useState8=_slicedToArray(_React$useState7,2),selectedIndices=_React$useState8[0],setSelectedIndices=_React$useState8[1];var _React$useState9=React__default.useState([]),_React$useState10=_slicedToArray(_React$useState9,2),controlledValueIndices=_React$useState10[0],setControlledValueIndices=_React$useState10[1];var _React$useState11=React__default.useState(-1),_React$useState12=_slicedToArray(_React$useState11,2),activeIndex=_React$useState12[0],setActiveIndex=_React$useState12[1];var _React$useState13=React__default.useState(-1),_React$useState14=_slicedToArray(_React$useState13,2),activeTagIndex=_React$useState14[0],setActiveTagIndex=_React$useState14[1];var _React$useState15=React__default.useState(false),_React$useState16=_slicedToArray(_React$useState15,2),shouldIgnoreBlurAnimation=_React$useState16[0],setShouldIgnoreBlurAnimation=_React$useState16[1];var _React$useState17=React__default.useState(false),_React$useState18=_slicedToArray(_React$useState17,2),hasFooterAction=_React$useState18[0],setHasFooterAction=_React$useState18[1];var _React$useState19=React__default.useState(false),_React$useState20=_slicedToArray(_React$useState19,2),hasAutoCompleteInBottomSheetHeader=_React$useState20[0],setHasAutoCompleteInBottomSheetHeader=_React$useState20[1];var _React$useState21=React__default.useState(false),_React$useState22=_slicedToArray(_React$useState21,2),isKeydownPressed=_React$useState22[0],setIsKeydownPressed=_React$useState22[1];var _React$useState23=React__default.useState(0),_React$useState24=_slicedToArray(_React$useState23,2),changeCallbackTriggerer=_React$useState24[0],setChangeCallbackTriggerer=_React$useState24[1];var _React$useState25=React__default.useState(false),_React$useState26=_slicedToArray(_React$useState25,2),isControlled=_React$useState26[0],setIsControlled=_React$useState26[1];var _React$useState27=React__default.useState(false),_React$useState28=_slicedToArray(_React$useState27,2),dropdownHasBottomSheet=_React$useState28[0],setDropdownHasBottomSheet=_React$useState28[1];var triggererWrapperRef=React__default.useRef(null);var triggererRef=React__default.useRef(null);var actionListItemRef=React__default.useRef(null);var dropdownTriggerer=React__default.useRef();var isFirstRenderRef=React__default.useRef(true);var isTagDismissedRef=React__default.useRef({value:false});var visibleTagsCountRef=React__default.useRef({value:0});var dropdownContainerRef=React__default.useRef(null);var dropdownBaseId=useId('dropdown');React__default.useEffect(function(){if(isFirstRenderRef.current){isFirstRenderRef.current=false;return;}if(!isOpen&&onDismiss){onDismiss();}},[isOpen]);var close=React__default.useCallback(function(){setActiveTagIndex(-1);setIsOpen(false);onDismiss==null?void 0:onDismiss();},[onDismiss]);React__default.Children.map(children,function(child){if(React__default.isValidElement(child)){if(__DEV__){var _getComponentId;if(!validDropdownChildren.includes((_getComponentId=getComponentId(child))!=null?_getComponentId:'')){throwBladeError({message:`Dropdown can only have one of following elements as children - \n\n ${validDropdownChildren.join(', ')} \n\n Check out: https://blade.razorpay.com/?path=/story/components-dropdown`,moduleName:'Dropdown'});}}if(isValidAllowedChildren(child,dropdownComponentIds.triggers.SelectInput)){dropdownTriggerer.current='SelectInput';}if(isValidAllowedChildren(child,dropdownComponentIds.triggers.DropdownButton)){dropdownTriggerer.current='DropdownButton';}if(isValidAllowedChildren(child,dropdownComponentIds.triggers.AutoComplete)){dropdownTriggerer.current='AutoComplete';}}});var contextValue=React__default.useMemo(function(){return {isOpen:isOpen,setIsOpen:setIsOpen,close:close,selectedIndices:selectedIndices,setSelectedIndices:setSelectedIndices,controlledValueIndices:controlledValueIndices,setControlledValueIndices:setControlledValueIndices,options:options,setOptions:setOptions,filteredValues:filteredValues,setFilteredValues:setFilteredValues,activeIndex:activeIndex,setActiveIndex:setActiveIndex,activeTagIndex:activeTagIndex,setActiveTagIndex:setActiveTagIndex,visibleTagsCountRef:visibleTagsCountRef,shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,setShouldIgnoreBlurAnimation:setShouldIgnoreBlurAnimation,isKeydownPressed:isKeydownPressed,setIsKeydownPressed:setIsKeydownPressed,dropdownBaseId:dropdownBaseId,triggererRef:triggererRef,triggererWrapperRef:triggererWrapperRef,actionListItemRef:actionListItemRef,selectionType:selectionType,hasFooterAction:hasFooterAction,setHasFooterAction:setHasFooterAction,hasAutoCompleteInBottomSheetHeader:hasAutoCompleteInBottomSheetHeader,setHasAutoCompleteInBottomSheetHeader:setHasAutoCompleteInBottomSheetHeader,dropdownTriggerer:dropdownTriggerer.current,changeCallbackTriggerer:changeCallbackTriggerer,setChangeCallbackTriggerer:setChangeCallbackTriggerer,isControlled:isControlled,setIsControlled:setIsControlled,isTagDismissedRef:isTagDismissedRef};},[isOpen,selectedIndices,controlledValueIndices,options,filteredValues,activeIndex,activeTagIndex,shouldIgnoreBlurAnimation,selectionType,hasFooterAction,isKeydownPressed,changeCallbackTriggerer,isControlled]);var BottomSheetAndDropdownGlueContextValue=React__default.useMemo(function(){return {isOpen:isOpen,dropdownHasBottomSheet:dropdownHasBottomSheet,hasAutoCompleteInBottomSheetHeader:hasAutoCompleteInBottomSheetHeader,setDropdownHasBottomSheet:setDropdownHasBottomSheet,onBottomSheetDismiss:close};},[dropdownHasBottomSheet,hasAutoCompleteInBottomSheetHeader,isOpen,close]);React__default.useEffect(function(){if(!isReactNative$4()){var dropdown=dropdownContainerRef.current;var documentClickHandler=function documentClickHandler(e){var _isTagDismissedRef$cu,_isTagDismissedRef$cu2;var target=e.target;if(!target||!dropdown){return;}if(!dropdown.contains(target)&&!((_isTagDismissedRef$cu=isTagDismissedRef.current)!=null&&_isTagDismissedRef$cu.value)){close();}if((_isTagDismissedRef$cu2=isTagDismissedRef.current)!=null&&_isTagDismissedRef$cu2.value){isTagDismissedRef.current.value=false;}};var documentFocusHandler=function documentFocusHandler(e){var target=e.relatedTarget;setActiveIndex(-1);if(!dropdown||!target){return;}if(!dropdown.contains(target)){close();}};document.addEventListener('click',documentClickHandler);document.addEventListener('focusout',documentFocusHandler);return function(){document.removeEventListener('click',documentClickHandler);document.removeEventListener('focusout',documentFocusHandler);};}return undefined;},[]);return jsx(BottomSheetAndDropdownGlueContext.Provider,{value:BottomSheetAndDropdownGlueContextValue,children:jsx(DropdownContext.Provider,{value:contextValue,children:jsx(BaseBox,Object.assign({ref:dropdownContainerRef},metaAttribute({name:MetaConstants.Dropdown,testID:testID}),getStyledProps(styledProps),{children:jsx(BaseBox,{position:"relative",textAlign:'left',children:children})}))})});};var Dropdown=assignWithoutSideEffects(_Dropdown,{componentId:dropdownComponentIds.Dropdown});
2809
+ var _excluded$r=["children","isOpen","onOpenChange","selectionType","onDismiss","testID"];var validDropdownChildren=[dropdownComponentIds.triggers.SelectInput,dropdownComponentIds.triggers.DropdownButton,dropdownComponentIds.triggers.DropdownLink,dropdownComponentIds.DropdownOverlay,dropdownComponentIds.triggers.AutoComplete,ComponentIds.BottomSheet];var _Dropdown=function _Dropdown(_ref){var children=_ref.children,isOpenControlled=_ref.isOpen,onOpenChange=_ref.onOpenChange,_ref$selectionType=_ref.selectionType,selectionType=_ref$selectionType===void 0?'single':_ref$selectionType,onDismiss=_ref.onDismiss,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$r);var _React$useState=React__default.useState(isOpenControlled!=null?isOpenControlled:false),_React$useState2=_slicedToArray(_React$useState,2),isOpen=_React$useState2[0],setIsOpen=_React$useState2[1];var _React$useState3=React__default.useState([]),_React$useState4=_slicedToArray(_React$useState3,2),options=_React$useState4[0],setOptions=_React$useState4[1];var _React$useState5=React__default.useState([]),_React$useState6=_slicedToArray(_React$useState5,2),filteredValues=_React$useState6[0],setFilteredValues=_React$useState6[1];var _React$useState7=React__default.useState([]),_React$useState8=_slicedToArray(_React$useState7,2),selectedIndices=_React$useState8[0],setSelectedIndices=_React$useState8[1];var _React$useState9=React__default.useState([]),_React$useState10=_slicedToArray(_React$useState9,2),controlledValueIndices=_React$useState10[0],setControlledValueIndices=_React$useState10[1];var _React$useState11=React__default.useState(-1),_React$useState12=_slicedToArray(_React$useState11,2),activeIndex=_React$useState12[0],setActiveIndex=_React$useState12[1];var _React$useState13=React__default.useState(-1),_React$useState14=_slicedToArray(_React$useState13,2),activeTagIndex=_React$useState14[0],setActiveTagIndex=_React$useState14[1];var _React$useState15=React__default.useState(false),_React$useState16=_slicedToArray(_React$useState15,2),shouldIgnoreBlurAnimation=_React$useState16[0],setShouldIgnoreBlurAnimation=_React$useState16[1];var _React$useState17=React__default.useState(false),_React$useState18=_slicedToArray(_React$useState17,2),hasFooterAction=_React$useState18[0],setHasFooterAction=_React$useState18[1];var _React$useState19=React__default.useState(false),_React$useState20=_slicedToArray(_React$useState19,2),hasAutoCompleteInBottomSheetHeader=_React$useState20[0],setHasAutoCompleteInBottomSheetHeader=_React$useState20[1];var _React$useState21=React__default.useState(false),_React$useState22=_slicedToArray(_React$useState21,2),isKeydownPressed=_React$useState22[0],setIsKeydownPressed=_React$useState22[1];var _React$useState23=React__default.useState(0),_React$useState24=_slicedToArray(_React$useState23,2),changeCallbackTriggerer=_React$useState24[0],setChangeCallbackTriggerer=_React$useState24[1];var _React$useState25=React__default.useState(false),_React$useState26=_slicedToArray(_React$useState25,2),isControlled=_React$useState26[0],setIsControlled=_React$useState26[1];var _React$useState27=React__default.useState(false),_React$useState28=_slicedToArray(_React$useState27,2),dropdownHasBottomSheet=_React$useState28[0],setDropdownHasBottomSheet=_React$useState28[1];var triggererWrapperRef=React__default.useRef(null);var triggererRef=React__default.useRef(null);var actionListItemRef=React__default.useRef(null);var dropdownTriggerer=React__default.useRef();var isTagDismissedRef=React__default.useRef({value:false});var visibleTagsCountRef=React__default.useRef({value:0});var dropdownContainerRef=React__default.useRef(null);var dropdownBaseId=useId('dropdown');useDidUpdate(function(){onOpenChange==null?void 0:onOpenChange(isOpen);if(!isOpen){onDismiss==null?void 0:onDismiss();}},[isOpen]);React__default.useEffect(function(){if(isOpenControlled!==undefined){setIsOpen(isOpenControlled);}},[isOpenControlled]);var close=React__default.useCallback(function(){setActiveTagIndex(-1);setIsOpen(false);},[]);React__default.Children.map(children,function(child){if(React__default.isValidElement(child)){if(__DEV__){var _getComponentId;if(!validDropdownChildren.includes((_getComponentId=getComponentId(child))!=null?_getComponentId:'')){throwBladeError({message:`Dropdown can only have one of following elements as children - \n\n ${validDropdownChildren.join(', ')} \n\n Check out: https://blade.razorpay.com/?path=/story/components-dropdown`,moduleName:'Dropdown'});}}if(isValidAllowedChildren(child,dropdownComponentIds.triggers.SelectInput)){dropdownTriggerer.current='SelectInput';}if(isValidAllowedChildren(child,dropdownComponentIds.triggers.DropdownButton)){dropdownTriggerer.current='DropdownButton';}if(isValidAllowedChildren(child,dropdownComponentIds.triggers.AutoComplete)){dropdownTriggerer.current='AutoComplete';}}});var contextValue=React__default.useMemo(function(){return {isOpen:isOpen,setIsOpen:setIsOpen,close:close,selectedIndices:selectedIndices,setSelectedIndices:setSelectedIndices,controlledValueIndices:controlledValueIndices,setControlledValueIndices:setControlledValueIndices,options:options,setOptions:setOptions,filteredValues:filteredValues,setFilteredValues:setFilteredValues,activeIndex:activeIndex,setActiveIndex:setActiveIndex,activeTagIndex:activeTagIndex,setActiveTagIndex:setActiveTagIndex,visibleTagsCountRef:visibleTagsCountRef,shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,setShouldIgnoreBlurAnimation:setShouldIgnoreBlurAnimation,isKeydownPressed:isKeydownPressed,setIsKeydownPressed:setIsKeydownPressed,dropdownBaseId:dropdownBaseId,triggererRef:triggererRef,triggererWrapperRef:triggererWrapperRef,actionListItemRef:actionListItemRef,selectionType:selectionType,hasFooterAction:hasFooterAction,setHasFooterAction:setHasFooterAction,hasAutoCompleteInBottomSheetHeader:hasAutoCompleteInBottomSheetHeader,setHasAutoCompleteInBottomSheetHeader:setHasAutoCompleteInBottomSheetHeader,dropdownTriggerer:dropdownTriggerer.current,changeCallbackTriggerer:changeCallbackTriggerer,setChangeCallbackTriggerer:setChangeCallbackTriggerer,isControlled:isControlled,setIsControlled:setIsControlled,isTagDismissedRef:isTagDismissedRef};},[isOpen,selectedIndices,controlledValueIndices,options,filteredValues,activeIndex,activeTagIndex,shouldIgnoreBlurAnimation,selectionType,hasFooterAction,isKeydownPressed,changeCallbackTriggerer,isControlled]);var BottomSheetAndDropdownGlueContextValue=React__default.useMemo(function(){return {isOpen:isOpen,dropdownHasBottomSheet:dropdownHasBottomSheet,hasAutoCompleteInBottomSheetHeader:hasAutoCompleteInBottomSheetHeader,setDropdownHasBottomSheet:setDropdownHasBottomSheet,onBottomSheetDismiss:close};},[dropdownHasBottomSheet,hasAutoCompleteInBottomSheetHeader,isOpen,close]);React__default.useEffect(function(){if(!isReactNative$4()){var dropdown=dropdownContainerRef.current;var documentClickHandler=function documentClickHandler(e){var _isTagDismissedRef$cu,_isTagDismissedRef$cu2;var target=e.target;if(!target||!dropdown){return;}if(!dropdown.contains(target)&&!((_isTagDismissedRef$cu=isTagDismissedRef.current)!=null&&_isTagDismissedRef$cu.value)){close();}if((_isTagDismissedRef$cu2=isTagDismissedRef.current)!=null&&_isTagDismissedRef$cu2.value){isTagDismissedRef.current.value=false;}};var documentFocusHandler=function documentFocusHandler(e){var target=e.relatedTarget;setActiveIndex(-1);if(!dropdown||!target){return;}if(!dropdown.contains(target)){close();}};document.addEventListener('click',documentClickHandler);document.addEventListener('focusout',documentFocusHandler);return function(){document.removeEventListener('click',documentClickHandler);document.removeEventListener('focusout',documentFocusHandler);};}return undefined;},[]);return jsx(BottomSheetAndDropdownGlueContext.Provider,{value:BottomSheetAndDropdownGlueContextValue,children:jsx(DropdownContext.Provider,{value:contextValue,children:jsx(BaseBox,Object.assign({ref:dropdownContainerRef},metaAttribute({name:MetaConstants.Dropdown,testID:testID}),getStyledProps(styledProps),{children:jsx(BaseBox,{position:"relative",textAlign:'left',children:children})}))})});};var Dropdown=assignWithoutSideEffects(_Dropdown,{componentId:dropdownComponentIds.Dropdown});
2810
2810
 
2811
2811
  var StyledDropdownOverlay=styled(BaseBox)(function(props){var theme=props.theme,isInBottomSheet=props.isInBottomSheet;return {backgroundColor:theme.colors.surface.background.level2.lowContrast,borderWidth:isInBottomSheet?undefined:theme.border.width.thin,borderColor:theme.colors.surface.border.normal.lowContrast,borderStyle:isInBottomSheet?undefined:'solid',borderRadius:makeSize(theme.border.radius.medium)};});
2812
2812
 
@@ -2854,7 +2854,7 @@ var _excluded$i=["label","accessibilityLabel","labelPosition","showRevealButton"
2854
2854
 
2855
2855
  var _excluded$h=["label","accessibilityLabel","labelPosition","necessityIndicator","errorText","helpText","successText","validationState","defaultValue","isDisabled","isRequired","name","onChange","onFocus","onBlur","onSubmit","placeholder","value","maxCharacters","showClearButton","onClearButtonClick","autoFocus","numberOfLines","testID"];var isReactNative$1=function isReactNative(_textInputRef){return getPlatformType()==='react-native';};var _TextArea=function _TextArea(_ref,ref){var label=_ref.label,accessibilityLabel=_ref.accessibilityLabel,labelPosition=_ref.labelPosition,necessityIndicator=_ref.necessityIndicator,errorText=_ref.errorText,helpText=_ref.helpText,successText=_ref.successText,validationState=_ref.validationState,defaultValue=_ref.defaultValue,isDisabled=_ref.isDisabled,isRequired=_ref.isRequired,name=_ref.name,_onChange=_ref.onChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,placeholder=_ref.placeholder,value=_ref.value,maxCharacters=_ref.maxCharacters,showClearButton=_ref.showClearButton,onClearButtonClick=_ref.onClearButtonClick,autoFocus=_ref.autoFocus,_ref$numberOfLines=_ref.numberOfLines,numberOfLines=_ref$numberOfLines===void 0?2:_ref$numberOfLines,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$h);var inputRef=React__default.useRef(null);var mergedRef=useMergeRefs(ref,inputRef);var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),shouldShowClearButton=_React$useState2[0],setShouldShowClearButton=_React$useState2[1];React__default.useEffect(function(){setShouldShowClearButton(Boolean(showClearButton&&((value==null?void 0:value.length)||(defaultValue==null?void 0:defaultValue.length))));},[showClearButton,defaultValue,value]);var renderInteractionElement=function renderInteractionElement(){if(shouldShowClearButton){return jsx(BaseBox,{paddingTop:"spacing.3",marginTop:"spacing.1",children:jsx(IconButton,{icon:CloseIcon,accessibilityLabel:"Clear textarea content",onClick:function onClick(){var _inputRef$current;if(isEmpty$1(value)&&inputRef.current){if(isReactNative$1(inputRef.current)){inputRef.current.clear();inputRef.current.focus();}else if(inputRef.current instanceof HTMLTextAreaElement){inputRef.current.value='';inputRef.current.focus();}}onClearButtonClick==null?void 0:onClearButtonClick();inputRef==null?void 0:(_inputRef$current=inputRef.current)==null?void 0:_inputRef$current.focus();setShouldShowClearButton(false);}})});}return null;};return jsx(BaseInput,Object.assign({as:"textarea",id:"textarea",componentName:MetaConstants.TextArea,autoFocus:autoFocus,ref:mergedRef,label:label,accessibilityLabel:accessibilityLabel,hideLabelText:!Boolean(label),labelPosition:labelPosition,necessityIndicator:necessityIndicator,errorText:errorText,helpText:helpText,successText:successText,validationState:validationState,isDisabled:isDisabled,isRequired:isRequired,name:name,maxCharacters:maxCharacters,placeholder:placeholder,interactionElement:renderInteractionElement(),defaultValue:defaultValue,value:value,numberOfLines:numberOfLines,onChange:function onChange(_ref2){var name=_ref2.name,value=_ref2.value;if(showClearButton&&value!=null&&value.length){setShouldShowClearButton(true);}if(shouldShowClearButton&&!(value!=null&&value.length)){setShouldShowClearButton(false);}_onChange==null?void 0:_onChange({name:name,value:value});},onFocus:onFocus,onBlur:onBlur,onSubmit:onSubmit,trailingFooterSlot:function trailingFooterSlot(value){var _value$length;return maxCharacters?jsx(BaseBox,{marginTop:"spacing.2",marginRight:"spacing.1",children:jsx(CharacterCounter,{currentCount:(_value$length=value==null?void 0:value.length)!=null?_value$length:0,maxCount:maxCharacters})}):null;},testID:testID},styledProps));};var TextArea=assignWithoutSideEffects(React__default.forwardRef(_TextArea),{displayName:'TextArea'});
2856
2856
 
2857
- var _excluded$g=["autoFocus","errorText","helpText","isDisabled","keyboardReturnKeyType","keyboardType","label","accessibilityLabel","labelPosition","name","onChange","onFocus","onBlur","onOTPFilled","otpLength","placeholder","successText","validationState","value","isMasked","autoCompleteSuggestionType","testID"];var isReactNative=getPlatformType()==='react-native';var otpToArray=function otpToArray(code){var _code$split;return (_code$split=code==null?void 0:code.split(''))!=null?_code$split:Array(6).fill('');};var OTPInput=function OTPInput(_ref){var autoFocus=_ref.autoFocus,errorText=_ref.errorText,helpText=_ref.helpText,isDisabled=_ref.isDisabled,keyboardReturnKeyType=_ref.keyboardReturnKeyType,_ref$keyboardType=_ref.keyboardType,keyboardType=_ref$keyboardType===void 0?'decimal':_ref$keyboardType,label=_ref.label,accessibilityLabel=_ref.accessibilityLabel,labelPosition=_ref.labelPosition,name=_ref.name,onChange=_ref.onChange,_onFocus=_ref.onFocus,_onBlur=_ref.onBlur,onOTPFilled=_ref.onOTPFilled,_ref$otpLength=_ref.otpLength,otpLength=_ref$otpLength===void 0?6:_ref$otpLength,placeholder=_ref.placeholder,successText=_ref.successText,validationState=_ref.validationState,inputValue=_ref.value,isMasked=_ref.isMasked,_ref$autoCompleteSugg=_ref.autoCompleteSuggestionType,autoCompleteSuggestionType=_ref$autoCompleteSugg===void 0?'oneTimeCode':_ref$autoCompleteSugg,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$g);var inputRefs=[];var _useState=useState(otpToArray(inputValue)),_useState2=_slicedToArray(_useState,2),otpValue=_useState2[0],setOtpValue=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),inputType=_useState4[0],setInputType=_useState4[1];var isLabelLeftPositioned=labelPosition==='left';var _useFormId=useFormId('otp'),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;useEffect(function(){if(inputValue&&inputValue.length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:inputValue.slice(0,otpLength),name:name});}else if(!inputValue&&otpValue.join('').length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:otpValue.slice(0,otpLength).join(''),name:name});}},[otpValue,otpLength,name,inputValue,onOTPFilled]);useEffect(function(){otpValue.forEach(function(otp,index){if(!isEmpty$1(otp)&&!inputType[index]&&isMasked){var newInputType=Array.from(inputType);newInputType[index]='password';setInputType(newInputType);}if(isEmpty$1(otp)&&inputType[index]){var _newInputType=Array.from(inputType);_newInputType[index]=undefined;setInputType(_newInputType);}});},[otpValue,inputType,isMasked]);var setOtpValueByIndex=function setOtpValueByIndex(_ref2){var value=_ref2.value,index=_ref2.index;var newOtpValue=Array.from(otpValue);newOtpValue[index]=value;setOtpValue(newOtpValue);return newOtpValue.join('');};var focusOnOtpByIndex=function focusOnOtpByIndex(index){var _inputRefs$index,_inputRefs$index$curr;(_inputRefs$index=inputRefs[index])==null?void 0:(_inputRefs$index$curr=_inputRefs$index.current)==null?void 0:_inputRefs$index$curr.focus();if(!isReactNative){var _inputRefs$index2,_inputRefs$index2$cur;(_inputRefs$index2=inputRefs[index])==null?void 0:(_inputRefs$index2$cur=_inputRefs$index2.current)==null?void 0:_inputRefs$index2$cur.select();}};var handleOnChange=function handleOnChange(_ref3){var value=_ref3.value,currentOtpIndex=_ref3.currentOtpIndex;if(value&&value===' '){return;}if(inputValue&&inputValue.length>0){var newOtpValue=Array.from(inputValue);newOtpValue[currentOtpIndex]=value!=null?value:'';setOtpValue(newOtpValue);onChange==null?void 0:onChange({name:name,value:newOtpValue.join('')});}else if(value&&value.trim().length>1){setOtpValue(Array.from(value));onChange==null?void 0:onChange({name:name,value:value.trim().slice(0,otpLength)});}else if(otpValue[currentOtpIndex]!==(value==null?void 0:value.trim())){var _value$trim;var newValue=setOtpValueByIndex({value:(_value$trim=value==null?void 0:value.trim())!=null?_value$trim:'',index:currentOtpIndex});onChange==null?void 0:onChange({name:name,value:newValue});}};var handleOnInput=function handleOnInput(_ref4){var value=_ref4.value,currentOtpIndex=_ref4.currentOtpIndex;if(value&&value.trim().length===1){focusOnOtpByIndex(++currentOtpIndex);}};var handleOnKeyDown=function handleOnKeyDown(_ref5){var key=_ref5.key,code=_ref5.code,event=_ref5.event,currentOtpIndex=_ref5.currentOtpIndex;if(key==='Backspace'||code==='Backspace'||code==='Delete'||key==='Delete'){event.preventDefault==null?void 0:event.preventDefault();handleOnChange({value:'',currentOtpIndex:currentOtpIndex});focusOnOtpByIndex(--currentOtpIndex);}else if(key==='ArrowLeft'||code==='ArrowLeft'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(--currentOtpIndex);}else if(key==='ArrowRight'||code==='ArrowRight'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(++currentOtpIndex);}else if(key===' '||code==='Space'){event.preventDefault==null?void 0:event.preventDefault();}};var getHiddenInput=function getHiddenInput(){if(!isReactNative){var _ref6;return jsx("input",{hidden:true,id:inputId,name:name,value:(_ref6=inputValue!=null?inputValue:otpValue.join(''))!=null?_ref6:'',readOnly:true});}return null;};var getOTPInputFields=function getOTPInputFields(){var inputs=[];var _loop=function _loop(index){var _otpValue$index,_Array$from$index;var currentValue=inputValue?otpToArray(inputValue)[index]||'':otpValue[index]||'';var ref=React__default.createRef();var currentInputType=void 0;if(isMasked){currentInputType=inputValue?'password':inputType[index];}inputRefs.push(ref);inputs.push(jsx(BaseBox,{flex:1,marginLeft:index==0?'spacing.0':'spacing.3',children:jsx(BaseInput,{autoFocus:autoFocus&&index===0,accessibilityLabel:`${index===0?label||accessibilityLabel:''} character ${index+1}`,label:label,hideLabelText:true,id:`${inputId}-${index}`,textAlign:"center",ref:ref,name:name,value:currentValue,maxCharacters:((_otpValue$index=otpValue[index])==null?void 0:_otpValue$index.length)>0?1:undefined,onChange:function onChange(formEvent){return handleOnChange(Object.assign({},formEvent,{currentOtpIndex:index}));},onFocus:function onFocus(formEvent){return _onFocus==null?void 0:_onFocus(Object.assign({},formEvent,{inputIndex:index}));},onBlur:function onBlur(formEvent){return _onBlur==null?void 0:_onBlur(Object.assign({},formEvent,{inputIndex:index}));},onInput:function onInput(formEvent){return handleOnInput(Object.assign({},formEvent,{currentOtpIndex:index}));},onKeyDown:function onKeyDown(keyboardEvent){return handleOnKeyDown(Object.assign({},keyboardEvent,{currentOtpIndex:index}));},isDisabled:isDisabled,placeholder:(_Array$from$index=Array.from(placeholder!=null?placeholder:'')[index])!=null?_Array$from$index:'',isRequired:true,autoCompleteSuggestionType:autoCompleteSuggestionType,keyboardType:keyboardType,keyboardReturnKeyType:keyboardReturnKeyType,validationState:validationState,successText:successText,errorText:errorText,helpText:helpText,hideFormHint:true,type:currentInputType})},`${inputId}-${index}`));};for(var index=0;index<otpLength;index++){_loop(index);}return inputs;};return jsxs(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.OTPInput,testID:testID}),getStyledProps(styledProps),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",children:[Boolean(label)&&jsx(FormLabel,{as:"label",position:labelPosition,htmlFor:inputId,children:label}),jsxs(BaseBox,{display:"flex",flexDirection:"row",children:[getHiddenInput(),getOTPInputFields()]})]}),jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned?136:0),children:jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId})})]}));};
2857
+ var _excluded$g=["autoFocus","errorText","helpText","isDisabled","keyboardReturnKeyType","keyboardType","label","accessibilityLabel","labelPosition","name","onChange","onFocus","onBlur","onOTPFilled","otpLength","placeholder","successText","validationState","value","isMasked","autoCompleteSuggestionType","testID"];var isReactNative=getPlatformType()==='react-native';var otpToArray=function otpToArray(code){var _code$split;return (_code$split=code==null?void 0:code.split(''))!=null?_code$split:Array(6).fill('');};var _OTPInput=function _OTPInput(_ref,incomingRef){var autoFocus=_ref.autoFocus,errorText=_ref.errorText,helpText=_ref.helpText,isDisabled=_ref.isDisabled,keyboardReturnKeyType=_ref.keyboardReturnKeyType,_ref$keyboardType=_ref.keyboardType,keyboardType=_ref$keyboardType===void 0?'decimal':_ref$keyboardType,label=_ref.label,accessibilityLabel=_ref.accessibilityLabel,labelPosition=_ref.labelPosition,name=_ref.name,onChange=_ref.onChange,_onFocus=_ref.onFocus,_onBlur=_ref.onBlur,onOTPFilled=_ref.onOTPFilled,_ref$otpLength=_ref.otpLength,otpLength=_ref$otpLength===void 0?6:_ref$otpLength,placeholder=_ref.placeholder,successText=_ref.successText,validationState=_ref.validationState,inputValue=_ref.value,isMasked=_ref.isMasked,_ref$autoCompleteSugg=_ref.autoCompleteSuggestionType,autoCompleteSuggestionType=_ref$autoCompleteSugg===void 0?'oneTimeCode':_ref$autoCompleteSugg,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$g);var inputRefs=[];var _useState=useState(otpToArray(inputValue)),_useState2=_slicedToArray(_useState,2),otpValue=_useState2[0],setOtpValue=_useState2[1];var _useState3=useState([]),_useState4=_slicedToArray(_useState3,2),inputType=_useState4[0],setInputType=_useState4[1];var isLabelLeftPositioned=labelPosition==='left';var _useFormId=useFormId('otp'),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;useImperativeHandle(incomingRef,function(){return inputRefs.map(function(ref){return ref.current;});},[inputRefs]);useEffect(function(){if(inputValue&&inputValue.length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:inputValue.slice(0,otpLength),name:name});}else if(!inputValue&&otpValue.join('').length>=otpLength){onOTPFilled==null?void 0:onOTPFilled({value:otpValue.slice(0,otpLength).join(''),name:name});}},[otpValue,otpLength,name,inputValue,onOTPFilled]);useEffect(function(){otpValue.forEach(function(otp,index){if(!isEmpty$1(otp)&&!inputType[index]&&isMasked){var newInputType=Array.from(inputType);newInputType[index]='password';setInputType(newInputType);}if(isEmpty$1(otp)&&inputType[index]){var _newInputType=Array.from(inputType);_newInputType[index]=undefined;setInputType(_newInputType);}});},[otpValue,inputType,isMasked]);var setOtpValueByIndex=function setOtpValueByIndex(_ref2){var value=_ref2.value,index=_ref2.index;var newOtpValue=Array.from(otpValue);newOtpValue[index]=value;setOtpValue(newOtpValue);return newOtpValue.join('');};var focusOnOtpByIndex=function focusOnOtpByIndex(index){var _inputRefs$index,_inputRefs$index$curr;(_inputRefs$index=inputRefs[index])==null?void 0:(_inputRefs$index$curr=_inputRefs$index.current)==null?void 0:_inputRefs$index$curr.focus();if(!isReactNative){var _inputRefs$index2,_inputRefs$index2$cur;(_inputRefs$index2=inputRefs[index])==null?void 0:(_inputRefs$index2$cur=_inputRefs$index2.current)==null?void 0:_inputRefs$index2$cur.select();}};var handleOnChange=function handleOnChange(_ref3){var value=_ref3.value,currentOtpIndex=_ref3.currentOtpIndex;if(value&&value===' '){return;}if(inputValue&&inputValue.length>0){var newOtpValue=Array.from(inputValue);newOtpValue[currentOtpIndex]=value!=null?value:'';setOtpValue(newOtpValue);onChange==null?void 0:onChange({name:name,value:newOtpValue.join('')});}else if(value&&value.trim().length>1){setOtpValue(Array.from(value));onChange==null?void 0:onChange({name:name,value:value.trim().slice(0,otpLength)});}else if(otpValue[currentOtpIndex]!==(value==null?void 0:value.trim())){var _value$trim;var newValue=setOtpValueByIndex({value:(_value$trim=value==null?void 0:value.trim())!=null?_value$trim:'',index:currentOtpIndex});onChange==null?void 0:onChange({name:name,value:newValue});}};var handleOnInput=function handleOnInput(_ref4){var value=_ref4.value,currentOtpIndex=_ref4.currentOtpIndex;if(value&&value.trim().length===1){focusOnOtpByIndex(++currentOtpIndex);}};var handleOnKeyDown=function handleOnKeyDown(_ref5){var key=_ref5.key,code=_ref5.code,event=_ref5.event,currentOtpIndex=_ref5.currentOtpIndex;if(key==='Backspace'||code==='Backspace'||code==='Delete'||key==='Delete'){event.preventDefault==null?void 0:event.preventDefault();handleOnChange({value:'',currentOtpIndex:currentOtpIndex});focusOnOtpByIndex(--currentOtpIndex);}else if(key==='ArrowLeft'||code==='ArrowLeft'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(--currentOtpIndex);}else if(key==='ArrowRight'||code==='ArrowRight'){event.preventDefault==null?void 0:event.preventDefault();focusOnOtpByIndex(++currentOtpIndex);}else if(key===' '||code==='Space'){event.preventDefault==null?void 0:event.preventDefault();}};var getHiddenInput=function getHiddenInput(){if(!isReactNative){var _ref6;return jsx("input",{hidden:true,id:inputId,name:name,value:(_ref6=inputValue!=null?inputValue:otpValue.join(''))!=null?_ref6:'',readOnly:true});}return null;};var getOTPInputFields=function getOTPInputFields(){var inputs=[];var _loop=function _loop(index){var _otpValue$index,_Array$from$index;var currentValue=inputValue?otpToArray(inputValue)[index]||'':otpValue[index]||'';var ref=React__default.createRef();var currentInputType=void 0;if(isMasked){currentInputType=inputValue?'password':inputType[index];}inputRefs.push(ref);inputs.push(jsx(BaseBox,{flex:1,marginLeft:index==0?'spacing.0':'spacing.3',children:jsx(BaseInput,{autoFocus:autoFocus&&index===0,accessibilityLabel:`${index===0?label||accessibilityLabel:''} character ${index+1}`,label:label,hideLabelText:true,id:`${inputId}-${index}`,textAlign:"center",ref:ref,name:name,value:currentValue,maxCharacters:((_otpValue$index=otpValue[index])==null?void 0:_otpValue$index.length)>0?1:undefined,onChange:function onChange(formEvent){return handleOnChange(Object.assign({},formEvent,{currentOtpIndex:index}));},onFocus:function onFocus(formEvent){return _onFocus==null?void 0:_onFocus(Object.assign({},formEvent,{inputIndex:index}));},onBlur:function onBlur(formEvent){return _onBlur==null?void 0:_onBlur(Object.assign({},formEvent,{inputIndex:index}));},onInput:function onInput(formEvent){return handleOnInput(Object.assign({},formEvent,{currentOtpIndex:index}));},onKeyDown:function onKeyDown(keyboardEvent){return handleOnKeyDown(Object.assign({},keyboardEvent,{currentOtpIndex:index}));},isDisabled:isDisabled,placeholder:(_Array$from$index=Array.from(placeholder!=null?placeholder:'')[index])!=null?_Array$from$index:'',isRequired:true,autoCompleteSuggestionType:autoCompleteSuggestionType,keyboardType:keyboardType,keyboardReturnKeyType:keyboardReturnKeyType,validationState:validationState,successText:successText,errorText:errorText,helpText:helpText,hideFormHint:true,type:currentInputType})},`${inputId}-${index}`));};for(var index=0;index<otpLength;index++){_loop(index);}return inputs;};return jsxs(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.OTPInput,testID:testID}),getStyledProps(styledProps),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",children:[Boolean(label)&&jsx(FormLabel,{as:"label",position:labelPosition,htmlFor:inputId,children:label}),jsxs(BaseBox,{display:"flex",flexDirection:"row",children:[getHiddenInput(),getOTPInputFields()]})]}),jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned?136:0),children:jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId})})]}));};var OTPInput=React__default.forwardRef(_OTPInput);
2858
2858
 
2859
2859
  var StyledChevronIconContainer=styled(TouchableOpacity)(function(_props){return {display:'flex',justifyContent:'center',margin:'auto'};});var InputChevronIcon=function InputChevronIcon(props){return jsxs(StyledChevronIconContainer,{accessibilityLabel:"Chevron Icon",onPress:props.onClick,children:[jsx(ChevronDownIcon,{display:props.isOpen?'none':'flex',color:"surface.text.normal.lowContrast",size:"medium"}),jsx(ChevronUpIcon,{display:props.isOpen?'flex':'none',color:"surface.text.normal.lowContrast",size:"medium"})]});};
2860
2860
 
@@ -3255,5 +3255,5 @@ var Popover=function Popover(_ref){var content=_ref.content,children=_ref.childr
3255
3255
 
3256
3256
  var StyledPressable=styled(Pressable)(function(){return {alignSelf:'flex-start'};});var PopoverInteractiveWrapper=React__default.forwardRef(function(props,ref){usePopoverContext();return jsx(StyledPressable,Object.assign({ref:ref,collapsable:false},props,{children:props.children}));});
3257
3257
 
3258
- export { Accordion, AccordionItem, ActionList, ActionListItem, ActionListItemAsset, ActionListItemIcon, ActionListItemText, ActionListSection, ActivityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertTriangleIcon as AlertOctagonIcon, AlertOnlyIcon, AlertTriangleIcon$1 as AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, Attachment as AttachmentIcon, AutoComplete, AwardIcon, Badge, BankIcon, BarChartAltIcon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BillIcon, BladeProvider, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetFooter, BottomSheetHeader, Box, BoxIcon, BriefcaseIcon, BulkPayoutsIcon, Button, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, Carousel, CarouselItem, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodepenIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleButton, CollapsibleLink, CommandIcon, CompassIcon, ComponentIds$1 as ComponentIds, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, CustomersIcon, CutIcon, DashboardIcon, DeleteIcon, DiscIcon, Display, Divider, DollarIcon, DollarsIcon, DownloadCloudIcon, DownloadIcon, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropletIcon, EditComposeIcon, EditIcon, EditInlineIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadphonesIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, ImageIcon, InboxIcon, Indicator, InfoIcon, InstagramIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkIcon, List, ListIcon, ListItem, ListItemCode, ListItemLink, ListItemText, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, MenuDotsIcon, MenuIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, Modal, ModalBody, ModalFooter, ModalHeader, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OctagonIcon, OffersIcon, PackageIcon, PaperclipIcon, PasswordInput, PauseCircleIcon, PauseIcon, PaymentButtonsIcon, PaymentLinksIcon, PaymentPagesIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PowerIcon, PrinterIcon, ProgressBar, QRCodeIcon, Radio, RadioGroup, RadioIcon$1 as RadioIcon, RazorpayIcon, RazorpayXIcon, RefreshIcon, RepeatIcon, ReportsIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RoutesIcon, RupeeIcon, RupeesIcon, SaveIcon, ScissorsIcon, SearchIcon, SelectInput, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, Skeleton, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SpeakerIcon, Spinner, SquareIcon, StampIcon, StarIcon, StopCircleIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, TabletIcon, Tag, TagIcon, TargetIcon, Text, TextArea, TextInput, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, Title, ToggleLeftIcon, ToggleRightIcon, Tooltip, TooltipInteractiveWrapper, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VideoIcon, VideoOffIcon, VisuallyHidden, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useActionListContext, useTheme };
3258
+ export { Accordion, AccordionItem, ActionList, ActionListItem, ActionListItemAsset, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection, ActivityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertTriangleIcon as AlertOctagonIcon, AlertOnlyIcon, AlertTriangleIcon$1 as AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, Attachment as AttachmentIcon, AutoComplete, AwardIcon, Badge, BankIcon, BarChartAltIcon, BarChartIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BillIcon, BladeProvider, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetFooter, BottomSheetHeader, Box, BoxIcon, BriefcaseIcon, BulkPayoutsIcon, Button, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, Carousel, CarouselItem, CastIcon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodepenIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleButton, CollapsibleLink, CommandIcon, CompassIcon, ComponentIds$1 as ComponentIds, CopyIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CpuIcon, CreditCardIcon, CropIcon, CrosshairIcon, CustomersIcon, CutIcon, DashboardIcon, DeleteIcon, DiscIcon, Display, Divider, DollarIcon, DollarsIcon, DownloadCloudIcon, DownloadIcon, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropletIcon, EditComposeIcon, EditIcon, EditInlineIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadphonesIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, ImageIcon, InboxIcon, Indicator, InfoIcon, InstagramIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkIcon, List, ListIcon, ListItem, ListItemCode, ListItemLink, ListItemText, LoaderIcon, LockIcon, LogInIcon, LogOutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, MenuDotsIcon, MenuIcon, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, Modal, ModalBody, ModalFooter, ModalHeader, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OctagonIcon, OffersIcon, PackageIcon, PaperclipIcon, PasswordInput, PauseCircleIcon, PauseIcon, PaymentButtonsIcon, PaymentLinksIcon, PaymentPagesIcon, PercentIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneOffIcon, PhoneOutgoingIcon, PieChartIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PowerIcon, PrinterIcon, ProgressBar, QRCodeIcon, Radio, RadioGroup, RadioIcon$1 as RadioIcon, RazorpayIcon, RazorpayXIcon, RefreshIcon, RepeatIcon, ReportsIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RoutesIcon, RupeeIcon, RupeesIcon, SaveIcon, ScissorsIcon, SearchIcon, SelectInput, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingCartIcon, ShuffleIcon, SidebarIcon, Skeleton, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SpeakerIcon, Spinner, SquareIcon, StampIcon, StarIcon, StopCircleIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, TabletIcon, Tag, TagIcon, TargetIcon, Text, TextArea, TextInput, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, Title, ToggleLeftIcon, ToggleRightIcon, Tooltip, TooltipInteractiveWrapper, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UploadCloudIcon, UploadIcon, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VideoIcon, VideoOffIcon, VisuallyHidden, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useActionListContext, useTheme };
3259
3259
  //# sourceMappingURL=index.native.js.map