@razorpay/blade 8.12.0 → 8.12.1

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.
@@ -3515,7 +3515,7 @@ type BaseTextProps$1 = {
3515
3515
  * React Native only
3516
3516
  */
3517
3517
  numberOfLines?: number;
3518
- componentName?: 'text' | 'title' | 'heading' | 'code';
3518
+ componentName?: 'base-text' | 'text' | 'title' | 'heading' | 'code';
3519
3519
  } & TestID$1 &
3520
3520
  StyledPropsBlade;
3521
3521
 
@@ -6460,7 +6460,7 @@ declare type BaseTextProps = {
6460
6460
  * React Native only
6461
6461
  */
6462
6462
  numberOfLines?: number;
6463
- componentName?: 'text' | 'title' | 'heading' | 'code';
6463
+ componentName?: 'base-text' | 'text' | 'title' | 'heading' | 'code';
6464
6464
  } & TestID$1 & StyledPropsBlade;
6465
6465
 
6466
6466
  declare const validAsValues$2: readonly ["span", "h1", "h2", "h3", "h4", "h5", "h6"];
@@ -3362,7 +3362,7 @@ type BaseTextProps$1 = {
3362
3362
  * React Native only
3363
3363
  */
3364
3364
  numberOfLines?: number;
3365
- componentName?: 'text' | 'title' | 'heading' | 'code';
3365
+ componentName?: 'base-text' | 'text' | 'title' | 'heading' | 'code';
3366
3366
  } & TestID &
3367
3367
  StyledPropsBlade;
3368
3368
 
@@ -5776,7 +5776,7 @@ declare type BaseTextProps = {
5776
5776
  * React Native only
5777
5777
  */
5778
5778
  numberOfLines?: number;
5779
- componentName?: 'text' | 'title' | 'heading' | 'code';
5779
+ componentName?: 'base-text' | 'text' | 'title' | 'heading' | 'code';
5780
5780
  } & TestID & StyledPropsBlade;
5781
5781
 
5782
5782
  declare const validAsValues$2: readonly ["span", "h1", "h2", "h3", "h4", "h5", "h6"];
@@ -2046,7 +2046,7 @@ var nodeUtil = _nodeUtil.exports;
2046
2046
  /* Node.js helper references. */
2047
2047
  nodeUtil && nodeUtil.isSet;
2048
2048
 
2049
- var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',ActionList:'action-list',ActionListFooter:'action-list-footer',ActionListHeader:'action-list-header',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',Badge:'badge',Box:'box',Button:'button',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',Code:'code',Component:'blade-component',Counter:'counter',DropdownOverlay:'dropdown-overlay',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',OTPInput:'otp-input',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',SkipNav:'skipnav',Spinner:'spinner',SelectInput:'select-input',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',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'};
2049
+ var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',ActionList:'action-list',ActionListFooter:'action-list-footer',ActionListHeader:'action-list-header',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',Badge:'badge',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Code:'code',Component:'blade-component',Counter:'counter',DropdownOverlay:'dropdown-overlay',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',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',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-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'};
2050
2050
 
2051
2051
  var metaAttribute=function metaAttribute(_ref){var testID=_ref.testID,name=_ref.name;return _extends({},name?_defineProperty$1({},"data-"+MetaConstants.Component,name):{},testID?{testID:testID}:{});};
2052
2052
 
@@ -3245,7 +3245,7 @@ var size={0:0,1:1,2:2,3:3,4:4,5:5,6:6,8:8,10:10,12:12,16:16,18:18,20:20,24:24,28
3245
3245
 
3246
3246
  var _excluded$4W=["base"];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)){if(breakpoint==='base'){return value;}return undefined;}if(isEmpty_1(value)){return undefined;}if(isReactNative$4()){var priorityArray=[value.s,value.xs,value.base];return priorityArray.find(function(val){return val!==undefined;});}return value[breakpoint];};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=get_1(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=get_1(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(get_1(theme,"border.radius."+responsiveBorderRadiusValue));};var getBorderWidthValue=function getBorderWidthValue(borderWidth,theme,breakpoint){var responsiveBorderWidthValue=getResponsiveValue(borderWidth,breakpoint);return isEmpty_1(responsiveBorderWidthValue)?undefined:makeBorderSize(get_1(theme,"border.width."+responsiveBorderWidthValue));};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;return {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),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),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),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)};};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$4W);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 _extends({},getAllProps(props),getAllMediaQueries(props));};
3247
3247
 
3248
- var isSupportedOnReactNativeElement=function isSupportedOnReactNativeElement(prop){return !prop.startsWith('padding')&&!prop.startsWith('margin')&&prop!=='flex';};var BaseBox=styled(View).withConfig({shouldForwardProp:function shouldForwardProp(prop,defaultValidator){return isSupportedOnReactNativeElement(prop)&&defaultValidator(prop);}})(function(props){var cssObject=getBaseBoxStyles(props);return cssObject;});
3248
+ var isSupportedOnReactNativeElement=function isSupportedOnReactNativeElement(prop){return !prop.startsWith('padding')&&!prop.startsWith('margin')&&prop!=='flex';};var BaseBox=styled(View).attrs(function(props){return _extends({},metaAttribute({name:props['data-blade-component']||MetaConstants.BaseBox}));}).withConfig({shouldForwardProp:function shouldForwardProp(prop,defaultValidator){return isSupportedOnReactNativeElement(prop)&&defaultValidator(prop);}})(function(props){var cssObject=getBaseBoxStyles(props);return cssObject;});
3249
3249
 
3250
3250
  var ThemeContext=createContext({theme:null,colorScheme:'light',platform:'onDesktop',setColorScheme:function setColorScheme(){return null;}});var useTheme=function useTheme(){var themeContext=useContext(ThemeContext);if(!themeContext.theme){throw new Error("[@razorpay/blade:BladeProvider]: BladeProvider is missing theme");}if(themeContext===undefined){throw new Error("[@razorpay/blade:BladeProvider]: useTheme must be used within BladeProvider");}return themeContext;};
3251
3251
 
@@ -3279,7 +3279,7 @@ var useMemoizedStyles=function useMemoizedStyles(boxProps){return getBaseBoxStyl
3279
3279
 
3280
3280
  var useStyledProps=function useStyledProps(props){var styledPropsStyles=getStyledProps(props);var styledPropsCSSObject=useMemoizedStyles(_extends({},styledPropsStyles,{theme:props.theme}));var styledPropsWithoutUndefined=removeUndefinedStyledProps(styledPropsCSSObject);return styledPropsWithoutUndefined;};
3281
3281
 
3282
- var _excluded$4T=["color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","textAlign","as"],_excluded2$1=["id","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","lineHeight","textAlign","children","truncateAfterLines","className","style","accessibilityProps","componentName","testID"];var StyledBaseText=styled.Text(function(_ref){var color=_ref.color,fontFamily=_ref.fontFamily,fontSize=_ref.fontSize,fontWeight=_ref.fontWeight,fontStyle=_ref.fontStyle,textDecorationLine=_ref.textDecorationLine,numberOfLines=_ref.numberOfLines,lineHeight=_ref.lineHeight,textAlign=_ref.textAlign;_ref.as;var props=_objectWithoutProperties(_ref,_excluded$4T);var styledPropsCSSObject=useStyledProps(props);return _extends({},getBaseTextStyles({color:color,fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,numberOfLines:numberOfLines,lineHeight:lineHeight,textAlign:textAlign,theme:props.theme}),styledPropsCSSObject);});var BaseText=function BaseText(_ref2){var id=_ref2.id,color=_ref2.color,fontFamily=_ref2.fontFamily,fontSize=_ref2.fontSize,fontWeight=_ref2.fontWeight,fontStyle=_ref2.fontStyle,textDecorationLine=_ref2.textDecorationLine,lineHeight=_ref2.lineHeight,textAlign=_ref2.textAlign,children=_ref2.children,truncateAfterLines=_ref2.truncateAfterLines,className=_ref2.className,style=_ref2.style,_ref2$accessibilityPr=_ref2.accessibilityProps,accessibilityProps=_ref2$accessibilityPr===void 0?{}:_ref2$accessibilityPr,componentName=_ref2.componentName,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded2$1);return jsx(StyledBaseText,_extends({},styledProps,{color:color,fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,lineHeight:lineHeight,as:undefined,textAlign:textAlign,numberOfLines:truncateAfterLines,className:className,style:style,id:id},makeAccessible(accessibilityProps),metaAttribute({name:componentName,testID:testID}),{children:children}));};
3282
+ var _excluded$4T=["color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","textAlign","as"],_excluded2$1=["id","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","lineHeight","textAlign","children","truncateAfterLines","className","style","accessibilityProps","componentName","testID"];var StyledBaseText=styled.Text(function(_ref){var color=_ref.color,fontFamily=_ref.fontFamily,fontSize=_ref.fontSize,fontWeight=_ref.fontWeight,fontStyle=_ref.fontStyle,textDecorationLine=_ref.textDecorationLine,numberOfLines=_ref.numberOfLines,lineHeight=_ref.lineHeight,textAlign=_ref.textAlign;_ref.as;var props=_objectWithoutProperties(_ref,_excluded$4T);var styledPropsCSSObject=useStyledProps(props);return _extends({},getBaseTextStyles({color:color,fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,numberOfLines:numberOfLines,lineHeight:lineHeight,textAlign:textAlign,theme:props.theme}),styledPropsCSSObject);});var BaseText=function BaseText(_ref2){var id=_ref2.id,color=_ref2.color,fontFamily=_ref2.fontFamily,fontSize=_ref2.fontSize,fontWeight=_ref2.fontWeight,fontStyle=_ref2.fontStyle,textDecorationLine=_ref2.textDecorationLine,lineHeight=_ref2.lineHeight,textAlign=_ref2.textAlign,children=_ref2.children,truncateAfterLines=_ref2.truncateAfterLines,className=_ref2.className,style=_ref2.style,_ref2$accessibilityPr=_ref2.accessibilityProps,accessibilityProps=_ref2$accessibilityPr===void 0?{}:_ref2$accessibilityPr,_ref2$componentName=_ref2.componentName,componentName=_ref2$componentName===void 0?MetaConstants.BaseText:_ref2$componentName,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded2$1);return jsx(StyledBaseText,_extends({},styledProps,{color:color,fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,lineHeight:lineHeight,as:undefined,textAlign:textAlign,numberOfLines:truncateAfterLines,className:className,style:style,id:id},makeAccessible(accessibilityProps),metaAttribute({name:componentName,testID:testID}),{children:children}));};
3283
3283
 
3284
3284
  var useValidateAsProp=function useValidateAsProp(_ref){var as=_ref.as,componentName=_ref.componentName,validAsValues=_ref.validAsValues;React__default.useEffect(function(){if(as&&!validAsValues.includes(as)){throw new Error("[Blade "+componentName+"]: Invalid `as` prop value - "+as+". Only "+validAsValues.join(', ')+" are accepted");}},[as,componentName,validAsValues]);};
3285
3285
 
@@ -3325,21 +3325,21 @@ var CheckboxIconWrapper=styled.View(function(props){return getCheckboxIconWrappe
3325
3325
 
3326
3326
  var StyledFade$1=styled(Animated.View)(function(_ref){var styles=_ref.styles;return _extends({},styles);});var Fade$1=function Fade(_ref2){var children=_ref2.children,show=_ref2.show,styles=_ref2.styles;var _useTheme=useTheme(),theme=_useTheme.theme;var fadeInEasing=theme.motion.easing.entrance.effective;var fadeOutEasing=theme.motion.easing.exit.effective;var fadeIn=new Keyframe({from:{transform:[{scale:0.6}],opacity:0,easing:fadeInEasing},to:{transform:[{scale:1}],opacity:1,easing:fadeInEasing}}).duration(theme.motion.duration.quick);var fadeOut=new Keyframe({from:{transform:[{scale:1}],opacity:1,easing:fadeOutEasing},to:{transform:[{scale:0.6}],opacity:0,easing:fadeOutEasing}}).duration(theme.motion.duration.quick);return show?jsx(StyledFade$1,{styles:styles,entering:fadeIn,exiting:fadeOut,children:children}):null;};
3327
3327
 
3328
- var ClipPath=function ClipPath(_ref){var children=_ref.children,id=_ref.id;return jsx(ClipPath$1,{id:id,children:children});};
3328
+ var ClipPath=function ClipPath(_ref){var children=_ref.children,id=_ref.id;return jsx(ClipPath$1,_extends({id:id},metaAttribute({name:'svg-clippath'}),{children:children}));};
3329
3329
 
3330
- var Circle=function Circle(_ref){var cx=_ref.cx,cy=_ref.cy,x=_ref.x,y=_ref.y,r=_ref.r,fill=_ref.fill,stroke=_ref.stroke,strokeWidth=_ref.strokeWidth;return jsx(Circle$1,{cx:cx,cy:cy,x:x,y:y,r:r,fill:fill,stroke:stroke,strokeWidth:strokeWidth});};
3330
+ var Circle=function Circle(_ref){var cx=_ref.cx,cy=_ref.cy,x=_ref.x,y=_ref.y,r=_ref.r,fill=_ref.fill,stroke=_ref.stroke,strokeWidth=_ref.strokeWidth;return jsx(Circle$1,_extends({cx:cx,cy:cy,x:x,y:y,r:r,fill:fill,stroke:stroke,strokeWidth:strokeWidth},metaAttribute({name:'svg-circle'})));};
3331
3331
 
3332
- var Defs=function Defs(_ref){var children=_ref.children;return jsx(Defs$1,{children:children});};
3332
+ var Defs=function Defs(_ref){var children=_ref.children;return jsx(Defs$1,_extends({},metaAttribute({name:'svg-defs'}),{children:children}));};
3333
3333
 
3334
- var G=function G(_ref){var clipPath=_ref.clipPath,fill=_ref.fill,children=_ref.children;return jsx(G$1,{clipPath:clipPath,fill:fill,children:children});};
3334
+ var G=function G(_ref){var clipPath=_ref.clipPath,fill=_ref.fill,children=_ref.children;return jsx(G$1,_extends({clipPath:clipPath,fill:fill},metaAttribute({name:'svg-g'}),{children:children}));};
3335
3335
 
3336
- var Path=function Path(_ref){var d=_ref.d,clipPath=_ref.clipPath,clipRule=_ref.clipRule,fill=_ref.fill,fillOpacity=_ref.fillOpacity,fillRule=_ref.fillRule,stroke=_ref.stroke,strokeLinecap=_ref.strokeLinecap,strokeLinejoin=_ref.strokeLinejoin,strokeWidth=_ref.strokeWidth;return jsx(Path$1,{d:d,clipPath:clipPath,clipRule:clipRule,fill:fill,fillOpacity:fillOpacity,fillRule:fillRule,stroke:stroke,strokeLinecap:strokeLinecap,strokeLinejoin:strokeLinejoin,strokeWidth:strokeWidth});};
3336
+ var Path=function Path(_ref){var d=_ref.d,clipPath=_ref.clipPath,clipRule=_ref.clipRule,fill=_ref.fill,fillOpacity=_ref.fillOpacity,fillRule=_ref.fillRule,stroke=_ref.stroke,strokeLinecap=_ref.strokeLinecap,strokeLinejoin=_ref.strokeLinejoin,strokeWidth=_ref.strokeWidth;return jsx(Path$1,_extends({d:d,clipPath:clipPath,clipRule:clipRule,fill:fill,fillOpacity:fillOpacity,fillRule:fillRule,stroke:stroke,strokeLinecap:strokeLinecap,strokeLinejoin:strokeLinejoin,strokeWidth:strokeWidth},metaAttribute({name:'svg-path'})));};
3337
3337
 
3338
- var Rect=function Rect(_ref){var height=_ref.height,width=_ref.width,fill=_ref.fill,rx=_ref.rx,ry=_ref.ry,x=_ref.x,y=_ref.y;return jsx(Rect$1,{height:height,width:width,rx:rx,ry:ry,x:x,y:y,fill:fill});};
3338
+ var Rect=function Rect(_ref){var height=_ref.height,width=_ref.width,fill=_ref.fill,rx=_ref.rx,ry=_ref.ry,x=_ref.x,y=_ref.y;return jsx(Rect$1,_extends({height:height,width:width,rx:rx,ry:ry,x:x,y:y,fill:fill},metaAttribute({name:'svg-rect'})));};
3339
3339
 
3340
- var _excluded$4O=["children","height","viewBox","width","fill"];var StyledSvg$1=styled(Svg$1)(function(props){var styledPropsCSSObject=useStyledProps(props);return styledPropsCSSObject;});var _Svg=function _Svg(_ref,ref){var children=_ref.children,height=_ref.height,viewBox=_ref.viewBox,width=_ref.width,fill=_ref.fill,styledProps=_objectWithoutProperties(_ref,_excluded$4O);return jsx(StyledSvg$1,_extends({},makeAccessible({hidden:true}),{height:height,viewBox:viewBox,width:width,fill:fill,ref:ref},styledProps,{children:children}));};var Svg=React__default.forwardRef(_Svg);
3340
+ var _excluded$4O=["children","height","viewBox","width","fill"];var StyledSvg$1=styled(Svg$1)(function(props){var styledPropsCSSObject=useStyledProps(props);return styledPropsCSSObject;});var _Svg=function _Svg(_ref,ref){var children=_ref.children,height=_ref.height,viewBox=_ref.viewBox,width=_ref.width,fill=_ref.fill,styledProps=_objectWithoutProperties(_ref,_excluded$4O);return jsx(StyledSvg$1,_extends({},makeAccessible({hidden:true}),metaAttribute({name:MetaConstants.Icon}),{height:height,viewBox:viewBox,width:width,fill:fill,ref:ref},styledProps,{children:children}));};var Svg=React__default.forwardRef(_Svg);
3341
3341
 
3342
- var svgSize={small:{width:size[8],height:size[8]},medium:{width:size[12],height:size[12]}};var CheckedIcon$1=function CheckedIcon(_ref){var color=_ref.color,size=_ref.size;var width=makeSpace(svgSize[size].width);var height=makeSpace(svgSize[size].height);return jsx(Svg,{width:width,height:height,viewBox:"0 0 8 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.90237 1.76413C7.03254 1.89431 7.03254 2.10536 6.90237 2.23554L3.2357 5.90221C3.10553 6.03238 2.89447 6.03238 2.7643 5.90221L1.09763 4.23554C0.967456 4.10536 0.967456 3.89431 1.09763 3.76414C1.22781 3.63396 1.43886 3.63396 1.56904 3.76414L3 5.1951L6.43096 1.76413C6.56114 1.63396 6.77219 1.63396 6.90237 1.76413Z",fill:color,stroke:"white",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"})});};var IndeterminateIcon=function IndeterminateIcon(_ref2){var color=_ref2.color,size=_ref2.size;var width=makeSpace(svgSize[size].width);var height=makeSpace(svgSize[size].height);return jsx(Svg,{width:width,height:height,viewBox:"0 0 8 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M1.3335 3.99984C1.3335 3.81574 1.48273 3.6665 1.66683 3.6665H6.3335C6.51759 3.6665 6.66683 3.81574 6.66683 3.99984C6.66683 4.18393 6.51759 4.33317 6.3335 4.33317H1.66683C1.48273 4.33317 1.3335 4.18393 1.3335 3.99984Z",fill:color,stroke:"white",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"})});};var CheckboxIcon=function CheckboxIcon(_ref3){var isChecked=_ref3.isChecked,isIndeterminate=_ref3.isIndeterminate,isDisabled=_ref3.isDisabled,isNegative=_ref3.isNegative,size=_ref3.size;var _useTheme=useTheme(),theme=_useTheme.theme;var defaultIconColor=get_1(theme,'colors.brand.gray.200.lowContrast');var disabledIconColor=get_1(theme,'colors.brand.gray.500.lowContrast');var iconColor=isDisabled?disabledIconColor:defaultIconColor;return jsxs(CheckboxIconWrapper,{size:size,isIndeterminate:isIndeterminate,isDisabled:isDisabled,isNegative:isNegative,isChecked:!!(isChecked||isIndeterminate),children:[jsx(Fade$1,{show:isIndeterminate,styles:{position:'absolute',display:'flex'},children:jsx(IndeterminateIcon,{size:size,color:iconColor})}),jsx(Fade$1,{show:Boolean(isChecked)&&!isIndeterminate,styles:{position:'absolute',display:'flex'},children:isChecked?jsx(CheckedIcon$1,{size:size,color:iconColor}):null})]});};
3342
+ var svgSize={small:{width:size[8],height:size[8]},medium:{width:size[12],height:size[12]}};var CheckedIcon$1=function CheckedIcon(_ref){var color=_ref.color,size=_ref.size;var width=makeSpace(svgSize[size].width);var height=makeSpace(svgSize[size].height);return jsx(Svg,{width:width,height:height,viewBox:"0 0 8 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.90237 1.76413C7.03254 1.89431 7.03254 2.10536 6.90237 2.23554L3.2357 5.90221C3.10553 6.03238 2.89447 6.03238 2.7643 5.90221L1.09763 4.23554C0.967456 4.10536 0.967456 3.89431 1.09763 3.76414C1.22781 3.63396 1.43886 3.63396 1.56904 3.76414L3 5.1951L6.43096 1.76413C6.56114 1.63396 6.77219 1.63396 6.90237 1.76413Z",fill:color,stroke:"white",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"})});};var IndeterminateIcon=function IndeterminateIcon(_ref2){var color=_ref2.color,size=_ref2.size;var width=makeSpace(svgSize[size].width);var height=makeSpace(svgSize[size].height);return jsx(Svg,{width:width,height:height,viewBox:"0 0 8 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M1.3335 3.99984C1.3335 3.81574 1.48273 3.6665 1.66683 3.6665H6.3335C6.51759 3.6665 6.66683 3.81574 6.66683 3.99984C6.66683 4.18393 6.51759 4.33317 6.3335 4.33317H1.66683C1.48273 4.33317 1.3335 4.18393 1.3335 3.99984Z",fill:color,stroke:"white",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"})});};var CheckboxIcon=function CheckboxIcon(_ref3){var isChecked=_ref3.isChecked,isIndeterminate=_ref3.isIndeterminate,isDisabled=_ref3.isDisabled,isNegative=_ref3.isNegative,size=_ref3.size;var _useTheme=useTheme(),theme=_useTheme.theme;var defaultIconColor=get_1(theme,'colors.brand.gray.200.lowContrast');var disabledIconColor=get_1(theme,'colors.brand.gray.500.lowContrast');var iconColor=isDisabled?disabledIconColor:defaultIconColor;return jsxs(CheckboxIconWrapper,_extends({size:size,isIndeterminate:isIndeterminate,isDisabled:isDisabled,isNegative:isNegative,isChecked:!!(isChecked||isIndeterminate)},metaAttribute({name:'checkbox-icon-wrapper'}),{children:[jsx(Fade$1,{show:isIndeterminate,styles:{position:'absolute',display:'flex'},children:jsx(IndeterminateIcon,{size:size,color:iconColor})}),jsx(Fade$1,{show:Boolean(isChecked)&&!isIndeterminate,styles:{position:'absolute',display:'flex'},children:isChecked?jsx(CheckedIcon$1,{size:size,color:iconColor}):null})]}));};
3343
3343
 
3344
3344
  function useControllableState(props){var valueProp=props.value,defaultValue=props.defaultValue,onChange=props.onChange;var _React$useState=React.useState(defaultValue),_React$useState2=_slicedToArray(_React$useState,2),valueState=_React$useState2[0],setValue=_React$useState2[1];var _React$useRef=React.useRef(valueProp!==undefined),isControlled=_React$useRef.current;var value=isControlled&&typeof valueProp!=='undefined'?valueProp:valueState;var updateValue=React.useCallback(function(next){var nextValue=next(value);if(!isControlled)setValue(nextValue);onChange==null?void 0:onChange(nextValue);},[onChange,value]);return [value,updateValue];}
3345
3345
 
@@ -3351,7 +3351,7 @@ var useFormId=function useFormId(prefix){var baseId=useId(prefix);var inputId=us
3351
3351
 
3352
3352
  function setMixed(element,mixed){if(mixed){element.indeterminate=true;}else if(element.indeterminate){element.indeterminate=false;}}var useCheckbox=function useCheckbox(_ref){var _ref$role=_ref.role,role=_ref$role===void 0?'checkbox':_ref$role,isChecked=_ref.isChecked,defaultChecked=_ref.defaultChecked,isIndeterminate=_ref.isIndeterminate,isDisabled=_ref.isDisabled,isRequired=_ref.isRequired,hasError=_ref.hasError,hasHelperText=_ref.hasHelperText,onChange=_ref.onChange,name=_ref.name,value=_ref.value;var inputRef=React__default.useRef(null);var isReactNative=getPlatformType()==='react-native';if(isChecked&&defaultChecked){throw new Error("[Blade useCheckbox] Do not provide both 'isChecked' and 'defaultChecked' to useCheckbox. Consider if you want this component to be controlled or uncontrolled.");}var _useControllableState=useControllableState({value:isChecked,defaultValue:defaultChecked!=null?defaultChecked:false}),_useControllableState2=_slicedToArray(_useControllableState,2),checkboxState=_useControllableState2[0],setCheckboxStateChange=_useControllableState2[1];var handleOnChange=function handleOnChange(event){if(isDisabled){event.stopPropagation();event.preventDefault();return;}setCheckboxStateChange(function(checked){onChange==null?void 0:onChange({isChecked:!checked,event:event,value:value});return !checked;});};React__default.useEffect(function(){var element=inputRef.current;if(!element)return;setMixed(element,isIndeterminate);},[isIndeterminate]);var state={isReactNative:isReactNative,isChecked:checkboxState,setChecked:setCheckboxStateChange};var _useFormId=useFormId('checkbox'),inputId=_useFormId.inputId,errorTextId=_useFormId.errorTextId,helpTextId=_useFormId.helpTextId;var accessibilityProps=makeAccessible(_extends({role:role,required:Boolean(isRequired),invalid:Boolean(hasError),disabled:Boolean(isDisabled),checked:checkboxState},hasError?{errorMessage:errorTextId}:{},hasHelperText?{describedBy:helpTextId}:{}));if(isReactNative){return {state:state,inputProps:_extends({onPress:handleOnChange,name:name,value:value},accessibilityProps)};}return {state:state,ids:{inputId:inputId,errorTextId:errorTextId,helpTextId:helpTextId},inputProps:_extends({ref:inputRef,onChange:handleOnChange,type:'checkbox',name:name,value:value,checked:checkboxState,disabled:isDisabled,required:isRequired},accessibilityProps)};};
3353
3353
 
3354
- var FormHintWrapper=function FormHintWrapper(_ref){var children=_ref.children;return jsx(View,{style:{display:'flex',flexDirection:'row',alignItems:'center'},children:children});};
3354
+ var FormHintWrapper=function FormHintWrapper(_ref){var children=_ref.children;return jsx(BaseBox,{display:"flex",flexDirection:"row",alignItems:"center",children:children});};
3355
3355
 
3356
3356
  var iconSize$1={xsmall:size[8],small:size[12],medium:size[16],large:size[20],xlarge:size[24],'2xlarge':size[32]};function useIconProps(_ref){var size=_ref.size,color=_ref.color;var _useTheme=useTheme(),theme=_useTheme.theme;var height=makeSize(iconSize$1[size]);var width=makeSize(iconSize$1[size]);var iconColor=color==='currentColor'?'currentColor':get_1(theme.colors,color,'');return {height:height,width:width,iconColor:iconColor};}
3357
3357
 
@@ -3903,7 +3903,7 @@ var screenReaderStyles={border:0,clip:'rect(0 0 0 0)',clipPath:'inset(50%)',heig
3903
3903
 
3904
3904
  var StyledVisuallyHidden=styled.View(screenReaderStyles);var VisuallyHidden=function VisuallyHidden(_ref){var children=_ref.children,testID=_ref.testID;return jsx(StyledVisuallyHidden,_extends({},metaAttribute({name:MetaConstants.VisuallyHidden,testID:testID}),{children:children}));};
3905
3905
 
3906
- var FormLabel=function FormLabel(_ref){var _ref$as=_ref.as,as=_ref$as===void 0?'span':_ref$as,_ref$position=_ref.position,position=_ref$position===void 0?'top':_ref$position,_ref$necessityIndicat=_ref.necessityIndicator,necessityIndicator=_ref$necessityIndicat===void 0?'none':_ref$necessityIndicat,accessibilityText=_ref.accessibilityText,children=_ref.children,id=_ref.id,htmlFor=_ref.htmlFor,_ref$contrast=_ref.contrast,contrast=_ref$contrast===void 0?'low':_ref$contrast;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isDesktop=matchedDeviceType==='desktop';var isReactNative=getPlatformType()==='react-native';var necessityLabel=null;var isLabelLeftPositioned=position==='left'&&isDesktop;if(necessityIndicator==='optional'){necessityLabel=jsx(Text,{variant:"caption",weight:"regular",type:"placeholder",children:"(optional)"});}if(necessityIndicator==='required'){necessityLabel=jsx(BaseText,{lineHeight:100,fontFamily:"text",fontStyle:"normal",fontSize:75,fontWeight:"bold",color:"feedback.text.negative.lowContrast",children:"*"});}var computedAccessibilityNode=jsxs(VisuallyHidden,{children:[necessityIndicator!=='none'&&jsx(Text,{children:necessityIndicator}),jsx(Text,{children:accessibilityText})]});var textNode=jsxs(BaseBox,{gap:necessityIndicator==='optional'?'spacing.2':'spacing.0',display:"flex",flexDirection:"row",alignItems:"center",flexWrap:"wrap",children:[jsx(Text,{type:"subdued",variant:"body",contrast:contrast,size:isLabelLeftPositioned?'medium':'small',weight:"bold",children:children}),computedAccessibilityNode,necessityLabel]});if(isReactNative){return jsx(BaseBox,{marginRight:"spacing.5",marginBottom:"spacing.2",children:textNode});}var Component=as;var width=isLabelLeftPositioned&&isDesktop?makeSize(size[120]):'auto';return jsx(Component,{htmlFor:htmlFor,style:{width:width,flexShrink:0,marginRight:makeSpace(theme.spacing[5])},id:id,children:jsx(BaseBox,{marginBottom:isLabelLeftPositioned?'spacing.0':'spacing.2',children:textNode})});};
3906
+ var FormLabel=function FormLabel(_ref){var _ref$as=_ref.as,as=_ref$as===void 0?'span':_ref$as,_ref$position=_ref.position,position=_ref$position===void 0?'top':_ref$position,_ref$necessityIndicat=_ref.necessityIndicator,necessityIndicator=_ref$necessityIndicat===void 0?'none':_ref$necessityIndicat,accessibilityText=_ref.accessibilityText,children=_ref.children,id=_ref.id,htmlFor=_ref.htmlFor,_ref$contrast=_ref.contrast,contrast=_ref$contrast===void 0?'low':_ref$contrast;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isDesktop=matchedDeviceType==='desktop';var isReactNative=getPlatformType()==='react-native';var necessityLabel=null;var isLabelLeftPositioned=position==='left'&&isDesktop;if(necessityIndicator==='optional'){necessityLabel=jsx(Text,{variant:"caption",weight:"regular",type:"placeholder",children:"(optional)"});}if(necessityIndicator==='required'){necessityLabel=jsx(BaseText,{lineHeight:100,fontFamily:"text",fontStyle:"normal",fontSize:75,fontWeight:"bold",color:"feedback.text.negative.lowContrast",children:"*"});}var computedAccessibilityNode=jsxs(VisuallyHidden,{children:[necessityIndicator!=='none'&&jsx(Text,{children:necessityIndicator}),jsx(Text,{children:accessibilityText})]});var textNode=jsxs(BaseBox,{gap:necessityIndicator==='optional'?'spacing.2':'spacing.0',display:"flex",flexDirection:"row",alignItems:"center",flexWrap:"wrap",children:[jsx(Text,{type:"subdued",variant:"body",contrast:contrast,size:isLabelLeftPositioned?'medium':'small',weight:"bold",children:children}),computedAccessibilityNode,necessityLabel]});if(isReactNative){return jsx(BaseBox,{marginRight:"spacing.5",marginBottom:"spacing.2",children:textNode});}var Component=as;var width=isLabelLeftPositioned&&isDesktop?makeSize(size[120]):'auto';return jsx(Component,_extends({htmlFor:htmlFor,style:{width:width,flexShrink:0,marginRight:makeSpace(theme.spacing[5])},id:id},metaAttribute({name:MetaConstants.FormLabel}),{children:jsx(BaseBox,{marginBottom:isLabelLeftPositioned?'spacing.0':'spacing.2',children:textNode})}));};
3907
3907
 
3908
3908
  var StyledSelectorLabel=styled.Pressable(function(_ref){var theme=_ref.theme;return {display:'flex',flexDirection:'row',marginTop:makeSpace(theme.spacing[1]),marginBottom:makeSpace(theme.spacing[1])};});var SelectorLabel=function SelectorLabel(_ref2){var children=_ref2.children,inputProps=_ref2.inputProps,testID=_ref2.testID,onMouseDown=_ref2.onMouseDown,onMouseUp=_ref2.onMouseUp;return jsx(StyledSelectorLabel,_extends({onPressIn:onMouseDown,onPressOut:onMouseUp},inputProps,metaAttribute({testID:testID}),{children:children}));};
3909
3909
 
@@ -3913,7 +3913,7 @@ var SelectorSupportText=function SelectorSupportText(_ref){var children=_ref.chi
3913
3913
 
3914
3914
  var _SelectorInput=function _SelectorInput(_props,_ref){return jsx(Fragment,{});};var SelectorInput=React__default.forwardRef(_SelectorInput);
3915
3915
 
3916
- var _excluded$y=["defaultChecked","validationState","isChecked","isDisabled","isIndeterminate","isRequired","name","onChange","value","children","helpText","errorText","size","tabIndex","testID"];var _Checkbox=function _Checkbox(_ref,ref){var _groupProps$state,_groupProps$size;var defaultChecked=_ref.defaultChecked,validationState=_ref.validationState,isChecked=_ref.isChecked,isDisabled=_ref.isDisabled,isIndeterminate=_ref.isIndeterminate,isRequired=_ref.isRequired,name=_ref.name,onChange=_ref.onChange,value=_ref.value,children=_ref.children,helpText=_ref.helpText,errorText=_ref.errorText,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,tabIndex=_ref.tabIndex,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$y);var groupProps=useCheckboxGroupContext();var hasValidationState=!isUndefined_1(validationState);var hasName=!isUndefined_1(name);var hasDefaultChecked=!isUndefined_1(defaultChecked);var hasIsChecked=!isUndefined_1(isChecked);var hasOnChange=!isUndefined_1(onChange);if((hasValidationState||hasName||hasDefaultChecked||hasIsChecked||hasOnChange)&&!isEmpty_1(groupProps)){var props=[hasValidationState?'validationState':undefined,hasName?'name':undefined,hasDefaultChecked?'defaultChecked':undefined,hasIsChecked?'isChecked':undefined,hasOnChange?'onChange':undefined].filter(Boolean).join(',');throw new Error("[Blade Checkbox]: Cannot set `"+props+"` on <Checkbox /> when it's inside <CheckboxGroup />, Please set it on the <CheckboxGroup /> itself");}if(!value&&!isEmpty_1(groupProps)){throw new Error("[Blade Checkbox]: <CheckboxGroup /> requires that you pass unique \"value\" prop to each <Checkbox />\n <CheckboxGroup>\n <Checkbox value=\"apple\">Apple</Checkbox>\n <Checkbox value=\"mango\">Mango</Checkbox>\n </CheckboxGroup>\n ");}var _validationState=validationState!=null?validationState:groupProps==null?void 0:groupProps.validationState;var _hasError=_validationState==='error';var _isDisabled=isDisabled!=null?isDisabled:groupProps==null?void 0:groupProps.isDisabled;var _name=name!=null?name:groupProps==null?void 0:groupProps.name;var _isChecked=isChecked!=null?isChecked:groupProps==null?void 0:(_groupProps$state=groupProps.state)==null?void 0:_groupProps$state.isChecked(value);var _size=(_groupProps$size=groupProps.size)!=null?_groupProps$size:size;var isSmall=_size==='small';var showSupportingText=validationState!=='error'&&helpText;var handleChange=function handleChange(_ref2){var isChecked=_ref2.isChecked,event=_ref2.event,value=_ref2.value;if(isChecked){var _groupProps$state2;groupProps==null?void 0:(_groupProps$state2=groupProps.state)==null?void 0:_groupProps$state2.addValue(value);}else {var _groupProps$state3;groupProps==null?void 0:(_groupProps$state3=groupProps.state)==null?void 0:_groupProps$state3.removeValue(value);}onChange==null?void 0:onChange({isChecked:isChecked,event:event,value:value});};var _useCheckbox=useCheckbox({defaultChecked:defaultChecked,isChecked:_isChecked,isIndeterminate:isIndeterminate,hasError:_hasError,hasHelperText:Boolean(showSupportingText),isDisabled:_isDisabled,isRequired:isRequired,name:_name,value:value,onChange:handleChange}),state=_useCheckbox.state,ids=_useCheckbox.ids,inputProps=_useCheckbox.inputProps;return jsxs(BaseBox,_extends({},metaAttribute({name:MetaConstants.Checkbox,testID:testID}),getStyledProps(styledProps),{children:[jsx(SelectorLabel,{inputProps:state.isReactNative?inputProps:{},children:jsxs(BaseBox,{display:"flex",flexDirection:"column",children:[jsxs(BaseBox,{display:"flex",alignItems:"center",flexDirection:"row",children:[jsx(SelectorInput,{hoverTokens:checkboxHoverTokens,isChecked:state.isChecked||Boolean(isIndeterminate),isDisabled:_isDisabled,hasError:_hasError,inputProps:inputProps,tabIndex:tabIndex,ref:ref}),jsx(CheckboxIcon,{size:_size,isChecked:state.isChecked,isIndeterminate:isIndeterminate,isDisabled:_isDisabled,isNegative:_hasError}),jsx(SelectorTitle,{size:_size,isDisabled:_isDisabled,children:children})]}),jsx(BaseBox,{marginLeft:isSmall?'spacing.6':'spacing.7',children:showSupportingText&&jsx(SelectorSupportText,{id:ids==null?void 0:ids.helpTextId,children:helpText})})]})}),jsx(FormHint,{errorText:errorText,errorTextId:ids==null?void 0:ids.errorTextId,type:validationState==='error'?'error':'help'})]}));};var Checkbox=assignWithoutSideEffects(React__default.forwardRef(_Checkbox),{displayName:'Checkbox'});
3916
+ var _excluded$y=["defaultChecked","validationState","isChecked","isDisabled","isIndeterminate","isRequired","name","onChange","value","children","helpText","errorText","size","tabIndex","testID"];var _Checkbox=function _Checkbox(_ref,ref){var _groupProps$state,_groupProps$size;var defaultChecked=_ref.defaultChecked,validationState=_ref.validationState,isChecked=_ref.isChecked,isDisabled=_ref.isDisabled,isIndeterminate=_ref.isIndeterminate,isRequired=_ref.isRequired,name=_ref.name,onChange=_ref.onChange,value=_ref.value,children=_ref.children,helpText=_ref.helpText,errorText=_ref.errorText,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,tabIndex=_ref.tabIndex,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$y);var groupProps=useCheckboxGroupContext();var hasValidationState=!isUndefined_1(validationState);var hasName=!isUndefined_1(name);var hasDefaultChecked=!isUndefined_1(defaultChecked);var hasIsChecked=!isUndefined_1(isChecked);var hasOnChange=!isUndefined_1(onChange);if((hasValidationState||hasName||hasDefaultChecked||hasIsChecked||hasOnChange)&&!isEmpty_1(groupProps)){var props=[hasValidationState?'validationState':undefined,hasName?'name':undefined,hasDefaultChecked?'defaultChecked':undefined,hasIsChecked?'isChecked':undefined,hasOnChange?'onChange':undefined].filter(Boolean).join(',');throw new Error("[Blade Checkbox]: Cannot set `"+props+"` on <Checkbox /> when it's inside <CheckboxGroup />, Please set it on the <CheckboxGroup /> itself");}if(!value&&!isEmpty_1(groupProps)){throw new Error("[Blade Checkbox]: <CheckboxGroup /> requires that you pass unique \"value\" prop to each <Checkbox />\n <CheckboxGroup>\n <Checkbox value=\"apple\">Apple</Checkbox>\n <Checkbox value=\"mango\">Mango</Checkbox>\n </CheckboxGroup>\n ");}var _validationState=validationState!=null?validationState:groupProps==null?void 0:groupProps.validationState;var _hasError=_validationState==='error';var _isDisabled=isDisabled!=null?isDisabled:groupProps==null?void 0:groupProps.isDisabled;var _name=name!=null?name:groupProps==null?void 0:groupProps.name;var _isChecked=isChecked!=null?isChecked:groupProps==null?void 0:(_groupProps$state=groupProps.state)==null?void 0:_groupProps$state.isChecked(value);var _size=(_groupProps$size=groupProps.size)!=null?_groupProps$size:size;var isSmall=_size==='small';var showSupportingText=validationState!=='error'&&helpText;var handleChange=function handleChange(_ref2){var isChecked=_ref2.isChecked,event=_ref2.event,value=_ref2.value;if(isChecked){var _groupProps$state2;groupProps==null?void 0:(_groupProps$state2=groupProps.state)==null?void 0:_groupProps$state2.addValue(value);}else {var _groupProps$state3;groupProps==null?void 0:(_groupProps$state3=groupProps.state)==null?void 0:_groupProps$state3.removeValue(value);}onChange==null?void 0:onChange({isChecked:isChecked,event:event,value:value});};var _useCheckbox=useCheckbox({defaultChecked:defaultChecked,isChecked:_isChecked,isIndeterminate:isIndeterminate,hasError:_hasError,hasHelperText:Boolean(showSupportingText),isDisabled:_isDisabled,isRequired:isRequired,name:_name,value:value,onChange:handleChange}),state=_useCheckbox.state,ids=_useCheckbox.ids,inputProps=_useCheckbox.inputProps;return jsxs(BaseBox,_extends({},metaAttribute({name:MetaConstants.Checkbox,testID:testID}),getStyledProps(styledProps),{children:[jsx(SelectorLabel,{componentName:MetaConstants.CheckboxLabel,inputProps:state.isReactNative?inputProps:{},children:jsxs(BaseBox,{display:"flex",flexDirection:"column",children:[jsxs(BaseBox,{display:"flex",alignItems:"center",flexDirection:"row",children:[jsx(SelectorInput,{hoverTokens:checkboxHoverTokens,isChecked:state.isChecked||Boolean(isIndeterminate),isDisabled:_isDisabled,hasError:_hasError,inputProps:inputProps,tabIndex:tabIndex,ref:ref}),jsx(CheckboxIcon,{size:_size,isChecked:state.isChecked,isIndeterminate:isIndeterminate,isDisabled:_isDisabled,isNegative:_hasError}),jsx(SelectorTitle,{size:_size,isDisabled:_isDisabled,children:children})]}),jsx(BaseBox,{marginLeft:isSmall?'spacing.6':'spacing.7',children:showSupportingText&&jsx(SelectorSupportText,{id:ids==null?void 0:ids.helpTextId,children:helpText})})]})}),jsx(FormHint,{errorText:errorText,errorTextId:ids==null?void 0:ids.errorTextId,type:validationState==='error'?'error':'help'})]}));};var Checkbox=assignWithoutSideEffects(React__default.forwardRef(_Checkbox),{displayName:'Checkbox'});
3917
3917
 
3918
3918
  var useCheckboxGroup=function useCheckboxGroup(_ref){var value=_ref.value,defaultValue=_ref.defaultValue,isDisabled=_ref.isDisabled,labelPosition=_ref.labelPosition,_onChange=_ref.onChange,validationState=_ref.validationState,name=_ref.name,size=_ref.size;var _useTheme=useTheme(),platform=_useTheme.platform;var _useFormId=useFormId('checkbox-group'),labelId=_useFormId.labelId;var _useControllableState=useControllableState({value:value,defaultValue:defaultValue||[],onChange:function onChange(values){return _onChange==null?void 0:_onChange({values:values,name:name});}}),_useControllableState2=_slicedToArray(_useControllableState,2),checkedValues=_useControllableState2[0],setValue=_useControllableState2[1];var state=React__default.useMemo(function(){return {value:checkedValues,setValue:function(_setValue){function setValue(_x){return _setValue.apply(this,arguments);}setValue.toString=function(){return _setValue.toString();};return setValue;}(function(value){if(isDisabled){return;}setValue(function(){return value;});}),isChecked:function isChecked(value){return checkedValues.includes(value);},addValue:function addValue(value){if(isDisabled){return;}if(!checkedValues.includes(value)){setValue(function(){return checkedValues.concat(value);});}},removeValue:function removeValue(value){if(isDisabled){return;}if(checkedValues.includes(value)){setValue(function(){return checkedValues.filter(function(existingValue){return existingValue!==value;});});}}};},[checkedValues,isDisabled,setValue]);var contextValue=React__default.useMemo(function(){return {validationState:validationState,isDisabled:isDisabled,labelPosition:platform==='onMobile'?'top':labelPosition,name:name,state:state,size:size};},[validationState,isDisabled,platform,labelPosition,name,state,size]);return {state:state,contextValue:contextValue,ids:{labelId:labelId}};};
3919
3919
 
@@ -4031,7 +4031,7 @@ var BaseInputStyledAnimatedBorder=styled(Animated.View)(function(_ref){var theme
4031
4031
 
4032
4032
  var _excluded$h=["children","validationState","currentInteraction","isLabelLeftPositioned","isTextArea"];var StyledBaseInputWrapper=styled(BaseBox)(function(props){return _extends({},getInputBackgroundAndBorderStyles({theme:props.theme,isFocused:props.currentInteraction==='active',isDisabled:props.isDisabled,validationState:props.validationState}),{'&:hover':getPlatformType()==='react-native'?undefined:_extends({},getInputBackgroundAndBorderStyles({theme:props.theme,isHovered:true,isFocused:props.currentInteraction==='active',isDisabled:props.isDisabled,validationState:props.validationState}),{transitionProperty:'background-color',transitionDuration:castWebType(makeMotionTime(props.theme.motion.duration.xquick)),transitionTimingFunction:castWebType(props.theme.motion.easing.standard.effective)}),':focus-within':getPlatformType()==='react-native'?undefined:_extends({},getInputBackgroundAndBorderStyles({theme:props.theme,isFocused:props.currentInteraction==='active',isDisabled:props.isDisabled,validationState:props.validationState}))});});var BaseInputWrapper=function BaseInputWrapper(_ref){var children=_ref.children,validationState=_ref.validationState,currentInteraction=_ref.currentInteraction;_ref.isLabelLeftPositioned;var isTextArea=_ref.isTextArea,props=_objectWithoutProperties(_ref,_excluded$h);return jsxs(StyledBaseInputWrapper,_extends({display:"flex",flexDirection:"row",width:"100%",alignItems:isTextArea?'flex-start':undefined,validationState:validationState,currentInteraction:currentInteraction,position:"relative"},props,{children:[children,jsx(BaseInputAnimatedBorder,{currentInteraction:currentInteraction,validationState:validationState})]}));};
4033
4033
 
4034
- var _excluded$g=["as","label","labelPosition","placeholder","type","defaultValue","name","value","onFocus","onChange","onInput","onBlur","onSubmit","onClick","onKeyDown","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","leadingIcon","prefix","interactionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","shouldIgnoreBlurAnimation","autoCapitalize","testID"];var autoCompleteSuggestionTypeValues=['none','on','name','email','username','password','newPassword','oneTimeCode','telephone','postalCode','countryName','creditCardNumber','creditCardCSC','creditCardExpiry','creditCardExpiryMonth','creditCardExpiryYear'];var useInput=function useInput(_ref){var value=_ref.value,defaultValue=_ref.defaultValue,onClick=_ref.onClick,onFocus=_ref.onFocus,onChange=_ref.onChange,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,onInput=_ref.onInput,onKeyDown=_ref.onKeyDown;if(value&&defaultValue){throw new Error("[Blade: Input]: Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled");}var _React$useState=React__default.useState(defaultValue!=null?defaultValue:value),_React$useState2=_slicedToArray(_React$useState,2),inputValue=_React$useState2[0],setInputValue=_React$useState2[1];var handleOnFocus=React__default.useCallback(function(_ref2){var name=_ref2.name,value=_ref2.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value;_value=(_value$target$value=value==null?void 0:value.target.value)!=null?_value$target$value:'';}onFocus==null?void 0:onFocus({name:name,value:_value});},[onFocus]);var handleOnClick=React__default.useCallback(function(_ref3){var name=_ref3.name,value=_ref3.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$currentTarget$;_value=(_value$currentTarget$=value==null?void 0:value.currentTarget.value)!=null?_value$currentTarget$:'';}onClick==null?void 0:onClick({name:name,value:_value});},[onClick]);var handleOnSubmit=React__default.useCallback(function(_ref4){var name=_ref4.name,value=_ref4.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value2;_value=(_value$target$value2=value==null?void 0:value.target.value)!=null?_value$target$value2:'';}if(isReactNative$4()){onSubmit==null?void 0:onSubmit({name:name,value:_value});}},[onSubmit]);var handleOnBlur=React__default.useCallback(function(_ref5){var name=_ref5.name,value=_ref5.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value3;_value=(_value$target$value3=value==null?void 0:value.target.value)!=null?_value$target$value3:'';}onBlur==null?void 0:onBlur({name:name,value:_value});},[onBlur]);var handleOnChange=React__default.useCallback(function(_ref6){var name=_ref6.name,value=_ref6.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value4;_value=(_value$target$value4=value==null?void 0:value.target.value)!=null?_value$target$value4:'';}onChange==null?void 0:onChange({name:name,value:_value});setInputValue(_value);},[onChange]);var handleOnInput=React__default.useCallback(function(_ref7){var name=_ref7.name,value=_ref7.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value5;_value=(_value$target$value5=value==null?void 0:value.target.value)!=null?_value$target$value5:'';}onInput==null?void 0:onInput({name:name,value:_value});},[onInput]);var handleOnKeyDown=React__default.useCallback(function(_ref8){var name=_ref8.name,key=_ref8.key,code=_ref8.code,event=_ref8.event;onKeyDown==null?void 0:onKeyDown({name:name,key:key,code:code,event:event});},[onKeyDown]);return {handleOnFocus:handleOnFocus,handleOnClick:handleOnClick,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,inputValue:inputValue};};var getHintType=function getHintType(_ref9){var validationState=_ref9.validationState,hasHelpText=_ref9.hasHelpText;if(validationState==='error'){return 'error';}if(validationState==='success'){return 'success';}if(hasHelpText){return 'help';}return 'help';};var getDescribedByElementId=function getDescribedByElementId(_ref10){var validationState=_ref10.validationState,hasErrorText=_ref10.hasErrorText,hasSuccessText=_ref10.hasSuccessText,hasHelpText=_ref10.hasHelpText,errorTextId=_ref10.errorTextId,successTextId=_ref10.successTextId,helpTextId=_ref10.helpTextId;if(validationState==='error'&&hasErrorText){return errorTextId;}if(validationState==='success'&&hasSuccessText){return successTextId;}if(hasHelpText){return helpTextId;}return '';};var BaseInput=React__default.forwardRef(function(_ref11,ref){var _ref11$as=_ref11.as,as=_ref11$as===void 0?'input':_ref11$as,label=_ref11.label,_ref11$labelPosition=_ref11.labelPosition,labelPosition=_ref11$labelPosition===void 0?'top':_ref11$labelPosition,placeholder=_ref11.placeholder,_ref11$type=_ref11.type,type=_ref11$type===void 0?'text':_ref11$type,defaultValue=_ref11.defaultValue,name=_ref11.name,value=_ref11.value,onFocus=_ref11.onFocus,onChange=_ref11.onChange,onInput=_ref11.onInput,onBlur=_ref11.onBlur,onSubmit=_ref11.onSubmit,onClick=_ref11.onClick,onKeyDown=_ref11.onKeyDown,isDisabled=_ref11.isDisabled,necessityIndicator=_ref11.necessityIndicator,validationState=_ref11.validationState,errorText=_ref11.errorText,helpText=_ref11.helpText,successText=_ref11.successText,isRequired=_ref11.isRequired,leadingIcon=_ref11.leadingIcon,prefix=_ref11.prefix,interactionElement=_ref11.interactionElement,suffix=_ref11.suffix,trailingIcon=_ref11.trailingIcon,maxCharacters=_ref11.maxCharacters,textAlign=_ref11.textAlign,autoFocus=_ref11.autoFocus,keyboardReturnKeyType=_ref11.keyboardReturnKeyType,keyboardType=_ref11.keyboardType,autoCompleteSuggestionType=_ref11.autoCompleteSuggestionType,trailingHeaderSlot=_ref11.trailingHeaderSlot,trailingFooterSlot=_ref11.trailingFooterSlot,numberOfLines=_ref11.numberOfLines,id=_ref11.id,componentName=_ref11.componentName,accessibilityLabel=_ref11.accessibilityLabel,labelId=_ref11.labelId,activeDescendant=_ref11.activeDescendant,hideLabelText=_ref11.hideLabelText,hideFormHint=_ref11.hideFormHint,hasPopup=_ref11.hasPopup,popupId=_ref11.popupId,isPopupExpanded=_ref11.isPopupExpanded,shouldIgnoreBlurAnimation=_ref11.shouldIgnoreBlurAnimation,autoCapitalize=_ref11.autoCapitalize,testID=_ref11.testID,styledProps=_objectWithoutProperties(_ref11,_excluded$g);var _useTheme=useTheme(),theme=_useTheme.theme;var _useInput=useInput({defaultValue:defaultValue,value:value,onFocus:onFocus,onClick:onClick,onChange:onChange,onBlur:onBlur,onSubmit:onSubmit,onInput:onInput,onKeyDown:onKeyDown}),handleOnFocus=_useInput.handleOnFocus,handleOnChange=_useInput.handleOnChange,handleOnClick=_useInput.handleOnClick,handleOnBlur=_useInput.handleOnBlur,handleOnSubmit=_useInput.handleOnSubmit,handleOnInput=_useInput.handleOnInput,handleOnKeyDown=_useInput.handleOnKeyDown,inputValue=_useInput.inputValue;var _useFormId=useFormId(id),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isLabelLeftPositioned=labelPosition==='left'&&matchedDeviceType==='desktop';var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction;var accessibilityProps=makeAccessible({required:Boolean(isRequired),disabled:Boolean(isDisabled),invalid:Boolean(validationState==='error'),describedBy:getDescribedByElementId({validationState:validationState,hasErrorText:Boolean(errorText),hasSuccessText:Boolean(successText),hasHelpText:Boolean(helpText),errorTextId:errorTextId,successTextId:successTextId,helpTextId:helpTextId}),label:accessibilityLabel,hasPopup:hasPopup,expanded:hasPopup?isPopupExpanded:undefined,controls:hasPopup?popupId:undefined,role:hasPopup?'combobox':undefined,activeDescendant:activeDescendant});var willRenderHintText=Boolean(helpText)||Boolean(successText)||Boolean(errorText);if(autoCompleteSuggestionType&&!autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)){throw new Error("[Blade: Input]: Expected autoCompleteSuggestionType to be one of "+autoCompleteSuggestionTypeValues.join(', ')+" but received "+autoCompleteSuggestionType);}var isTextArea=as==='textarea';var isReactNative=getPlatformType()==='react-native';return jsxs(BaseBox,_extends({},metaAttribute({name:componentName,testID:testID}),getStyledProps(styledProps),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',justifyContent:isLabelLeftPositioned?'center':undefined,alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",children:[!hideLabelText&&jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'column':'row',justifyContent:"space-between",alignSelf:isTextArea?'flex-start':undefined,marginTop:isTextArea&&isLabelLeftPositioned?'spacing.3':'spacing.0',marginBottom:isTextArea&&isLabelLeftPositioned?'spacing.3':'spacing.0',children:[jsx(FormLabel,{as:"label",necessityIndicator:necessityIndicator,position:labelPosition,id:labelId,htmlFor:inputId,children:label}),trailingHeaderSlot==null?void 0:trailingHeaderSlot(inputValue)]}),jsxs(BaseInputWrapper,{isTextArea:isTextArea,isDisabled:isDisabled,validationState:validationState,currentInteraction:currentInteraction,isLabelLeftPositioned:isLabelLeftPositioned,children:[jsx(BaseInputVisuals,{leadingIcon:leadingIcon,prefix:prefix,isDisabled:isDisabled}),jsx(StyledBaseInput,{as:isReactNative?undefined:as,id:inputId,ref:ref,name:name,type:type,defaultValue:defaultValue,value:value,placeholder:placeholder,isDisabled:isDisabled,validationState:validationState,isRequired:isRequired,handleOnFocus:handleOnFocus,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,handleOnClick:handleOnClick,leadingIcon:leadingIcon,prefix:prefix,interactionElement:interactionElement,suffix:suffix,trailingIcon:trailingIcon,maxCharacters:maxCharacters,textAlign:textAlign,autoFocus:autoFocus,keyboardReturnKeyType:keyboardReturnKeyType,keyboardType:keyboardType,autoCompleteSuggestionType:autoCompleteSuggestionType,accessibilityProps:accessibilityProps,currentInteraction:currentInteraction,setCurrentInteraction:setCurrentInteraction,numberOfLines:numberOfLines,isTextArea:isTextArea,hasPopup:hasPopup,shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,autoCapitalize:autoCapitalize}),jsx(BaseInputVisuals,{interactionElement:interactionElement,suffix:suffix,trailingIcon:trailingIcon,isDisabled:isDisabled})]})]}),!hideFormHint&&jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned?136:0),children:jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:willRenderHintText?'space-between':'flex-end',children:[jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId}),trailingFooterSlot==null?void 0:trailingFooterSlot(inputValue)]})})]}));});
4034
+ var _excluded$g=["as","label","labelPosition","placeholder","type","defaultValue","name","value","onFocus","onChange","onInput","onBlur","onSubmit","onClick","onKeyDown","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","leadingIcon","prefix","interactionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","shouldIgnoreBlurAnimation","autoCapitalize","testID"];var autoCompleteSuggestionTypeValues=['none','on','name','email','username','password','newPassword','oneTimeCode','telephone','postalCode','countryName','creditCardNumber','creditCardCSC','creditCardExpiry','creditCardExpiryMonth','creditCardExpiryYear'];var useInput=function useInput(_ref){var value=_ref.value,defaultValue=_ref.defaultValue,onClick=_ref.onClick,onFocus=_ref.onFocus,onChange=_ref.onChange,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,onInput=_ref.onInput,onKeyDown=_ref.onKeyDown;if(value&&defaultValue){throw new Error("[Blade: Input]: Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled");}var _React$useState=React__default.useState(defaultValue!=null?defaultValue:value),_React$useState2=_slicedToArray(_React$useState,2),inputValue=_React$useState2[0],setInputValue=_React$useState2[1];var handleOnFocus=React__default.useCallback(function(_ref2){var name=_ref2.name,value=_ref2.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value;_value=(_value$target$value=value==null?void 0:value.target.value)!=null?_value$target$value:'';}onFocus==null?void 0:onFocus({name:name,value:_value});},[onFocus]);var handleOnClick=React__default.useCallback(function(_ref3){var name=_ref3.name,value=_ref3.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$currentTarget$;_value=(_value$currentTarget$=value==null?void 0:value.currentTarget.value)!=null?_value$currentTarget$:'';}onClick==null?void 0:onClick({name:name,value:_value});},[onClick]);var handleOnSubmit=React__default.useCallback(function(_ref4){var name=_ref4.name,value=_ref4.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value2;_value=(_value$target$value2=value==null?void 0:value.target.value)!=null?_value$target$value2:'';}if(isReactNative$4()){onSubmit==null?void 0:onSubmit({name:name,value:_value});}},[onSubmit]);var handleOnBlur=React__default.useCallback(function(_ref5){var name=_ref5.name,value=_ref5.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value3;_value=(_value$target$value3=value==null?void 0:value.target.value)!=null?_value$target$value3:'';}onBlur==null?void 0:onBlur({name:name,value:_value});},[onBlur]);var handleOnChange=React__default.useCallback(function(_ref6){var name=_ref6.name,value=_ref6.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value4;_value=(_value$target$value4=value==null?void 0:value.target.value)!=null?_value$target$value4:'';}onChange==null?void 0:onChange({name:name,value:_value});setInputValue(_value);},[onChange]);var handleOnInput=React__default.useCallback(function(_ref7){var name=_ref7.name,value=_ref7.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value5;_value=(_value$target$value5=value==null?void 0:value.target.value)!=null?_value$target$value5:'';}onInput==null?void 0:onInput({name:name,value:_value});},[onInput]);var handleOnKeyDown=React__default.useCallback(function(_ref8){var name=_ref8.name,key=_ref8.key,code=_ref8.code,event=_ref8.event;onKeyDown==null?void 0:onKeyDown({name:name,key:key,code:code,event:event});},[onKeyDown]);return {handleOnFocus:handleOnFocus,handleOnClick:handleOnClick,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,inputValue:inputValue};};var getHintType=function getHintType(_ref9){var validationState=_ref9.validationState,hasHelpText=_ref9.hasHelpText;if(validationState==='error'){return 'error';}if(validationState==='success'){return 'success';}if(hasHelpText){return 'help';}return 'help';};var getDescribedByElementId=function getDescribedByElementId(_ref10){var validationState=_ref10.validationState,hasErrorText=_ref10.hasErrorText,hasSuccessText=_ref10.hasSuccessText,hasHelpText=_ref10.hasHelpText,errorTextId=_ref10.errorTextId,successTextId=_ref10.successTextId,helpTextId=_ref10.helpTextId;if(validationState==='error'&&hasErrorText){return errorTextId;}if(validationState==='success'&&hasSuccessText){return successTextId;}if(hasHelpText){return helpTextId;}return '';};var BaseInput=React__default.forwardRef(function(_ref11,ref){var _ref11$as=_ref11.as,as=_ref11$as===void 0?'input':_ref11$as,label=_ref11.label,_ref11$labelPosition=_ref11.labelPosition,labelPosition=_ref11$labelPosition===void 0?'top':_ref11$labelPosition,placeholder=_ref11.placeholder,_ref11$type=_ref11.type,type=_ref11$type===void 0?'text':_ref11$type,defaultValue=_ref11.defaultValue,name=_ref11.name,value=_ref11.value,onFocus=_ref11.onFocus,onChange=_ref11.onChange,onInput=_ref11.onInput,onBlur=_ref11.onBlur,onSubmit=_ref11.onSubmit,onClick=_ref11.onClick,onKeyDown=_ref11.onKeyDown,isDisabled=_ref11.isDisabled,necessityIndicator=_ref11.necessityIndicator,validationState=_ref11.validationState,errorText=_ref11.errorText,helpText=_ref11.helpText,successText=_ref11.successText,isRequired=_ref11.isRequired,leadingIcon=_ref11.leadingIcon,prefix=_ref11.prefix,interactionElement=_ref11.interactionElement,suffix=_ref11.suffix,trailingIcon=_ref11.trailingIcon,maxCharacters=_ref11.maxCharacters,textAlign=_ref11.textAlign,autoFocus=_ref11.autoFocus,keyboardReturnKeyType=_ref11.keyboardReturnKeyType,keyboardType=_ref11.keyboardType,autoCompleteSuggestionType=_ref11.autoCompleteSuggestionType,trailingHeaderSlot=_ref11.trailingHeaderSlot,trailingFooterSlot=_ref11.trailingFooterSlot,numberOfLines=_ref11.numberOfLines,id=_ref11.id,componentName=_ref11.componentName,accessibilityLabel=_ref11.accessibilityLabel,labelId=_ref11.labelId,activeDescendant=_ref11.activeDescendant,hideLabelText=_ref11.hideLabelText,hideFormHint=_ref11.hideFormHint,hasPopup=_ref11.hasPopup,popupId=_ref11.popupId,isPopupExpanded=_ref11.isPopupExpanded,shouldIgnoreBlurAnimation=_ref11.shouldIgnoreBlurAnimation,autoCapitalize=_ref11.autoCapitalize,testID=_ref11.testID,styledProps=_objectWithoutProperties(_ref11,_excluded$g);var _useTheme=useTheme(),theme=_useTheme.theme;var _useInput=useInput({defaultValue:defaultValue,value:value,onFocus:onFocus,onClick:onClick,onChange:onChange,onBlur:onBlur,onSubmit:onSubmit,onInput:onInput,onKeyDown:onKeyDown}),handleOnFocus=_useInput.handleOnFocus,handleOnChange=_useInput.handleOnChange,handleOnClick=_useInput.handleOnClick,handleOnBlur=_useInput.handleOnBlur,handleOnSubmit=_useInput.handleOnSubmit,handleOnInput=_useInput.handleOnInput,handleOnKeyDown=_useInput.handleOnKeyDown,inputValue=_useInput.inputValue;var _useFormId=useFormId(id),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isLabelLeftPositioned=labelPosition==='left'&&matchedDeviceType==='desktop';var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction;var accessibilityProps=makeAccessible({required:Boolean(isRequired),disabled:Boolean(isDisabled),invalid:Boolean(validationState==='error'),describedBy:getDescribedByElementId({validationState:validationState,hasErrorText:Boolean(errorText),hasSuccessText:Boolean(successText),hasHelpText:Boolean(helpText),errorTextId:errorTextId,successTextId:successTextId,helpTextId:helpTextId}),label:accessibilityLabel,hasPopup:hasPopup,expanded:hasPopup?isPopupExpanded:undefined,controls:hasPopup?popupId:undefined,role:hasPopup?'combobox':undefined,activeDescendant:activeDescendant});var willRenderHintText=Boolean(helpText)||Boolean(successText)||Boolean(errorText);if(autoCompleteSuggestionType&&!autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)){throw new Error("[Blade: Input]: Expected autoCompleteSuggestionType to be one of "+autoCompleteSuggestionTypeValues.join(', ')+" but received "+autoCompleteSuggestionType);}var isTextArea=as==='textarea';var isReactNative=getPlatformType()==='react-native';return jsxs(BaseBox,_extends({},metaAttribute({name:componentName,testID:testID}),getStyledProps(styledProps),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',justifyContent:isLabelLeftPositioned?'center':undefined,alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",children:[!hideLabelText&&jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'column':'row',justifyContent:"space-between",alignSelf:isTextArea?'flex-start':undefined,marginTop:isTextArea&&isLabelLeftPositioned?'spacing.3':'spacing.0',marginBottom:isTextArea&&isLabelLeftPositioned?'spacing.3':'spacing.0',children:[jsx(FormLabel,{as:"label",necessityIndicator:necessityIndicator,position:labelPosition,id:labelId,htmlFor:inputId,children:label}),trailingHeaderSlot==null?void 0:trailingHeaderSlot(inputValue)]}),jsxs(BaseInputWrapper,{isTextArea:isTextArea,isDisabled:isDisabled,validationState:validationState,currentInteraction:currentInteraction,isLabelLeftPositioned:isLabelLeftPositioned,children:[jsx(BaseInputVisuals,{leadingIcon:leadingIcon,prefix:prefix,isDisabled:isDisabled}),jsx(StyledBaseInput,_extends({as:isReactNative?undefined:as,id:inputId,ref:ref,name:name,type:type,defaultValue:defaultValue,value:value,placeholder:placeholder,isDisabled:isDisabled,validationState:validationState,isRequired:isRequired,handleOnFocus:handleOnFocus,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,handleOnClick:handleOnClick,leadingIcon:leadingIcon,prefix:prefix,interactionElement:interactionElement,suffix:suffix,trailingIcon:trailingIcon,maxCharacters:maxCharacters,textAlign:textAlign,autoFocus:autoFocus,keyboardReturnKeyType:keyboardReturnKeyType,keyboardType:keyboardType,autoCompleteSuggestionType:autoCompleteSuggestionType,accessibilityProps:accessibilityProps,currentInteraction:currentInteraction,setCurrentInteraction:setCurrentInteraction,numberOfLines:numberOfLines,isTextArea:isTextArea,hasPopup:hasPopup,shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,autoCapitalize:autoCapitalize},metaAttribute({name:MetaConstants.StyledBaseInput}))),jsx(BaseInputVisuals,{interactionElement:interactionElement,suffix:suffix,trailingIcon:trailingIcon,isDisabled:isDisabled})]})]}),!hideFormHint&&jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned?136:0),children:jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:willRenderHintText?'space-between':'flex-end',children:[jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId}),trailingFooterSlot==null?void 0:trailingFooterSlot(inputValue)]})})]}));});
4035
4035
 
4036
4036
  var CharacterCounter=function CharacterCounter(_ref){var currentCount=_ref.currentCount,maxCount=_ref.maxCount;return jsxs(Text,{variant:"caption",weight:"regular",type:"muted",children:[currentCount,"/",maxCount]});};
4037
4037
 
@@ -4039,11 +4039,11 @@ var _excluded$f=["label","labelPosition","accessibilityLabel","contrast","size",
4039
4039
 
4040
4040
  var useBladeInnerRef=function useBladeInnerRef(targetRef,_handlers){var innerRef=React__default.useRef(null);React__default.useImperativeHandle(targetRef,function(){return innerRef.current;},[innerRef]);return innerRef;};
4041
4041
 
4042
- var _excluded$e=["label","labelPosition","placeholder","type","defaultValue","name","value","maxCharacters","onChange","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID"];var getKeyboardAndAutocompleteProps=function getKeyboardAndAutocompleteProps(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?'text':_ref$type,keyboardReturnKeyType=_ref.keyboardReturnKeyType,autoCompleteSuggestionType=_ref.autoCompleteSuggestionType,autoCapitalize=_ref.autoCapitalize;var keyboardAndAutocompleteProps={type:type,keyboardType:'text',keyboardReturnKeyType:'default',autoCompleteSuggestionType:'none',autoCapitalize:autoCapitalize};var keyboardConfigMap={text:{keyboardType:'text',keyboardReturnKeyType:'default',autoCompleteSuggestionType:'none',autoCapitalize:undefined},telephone:{keyboardType:'telephone',keyboardReturnKeyType:'done',autoCompleteSuggestionType:'telephone',autoCapitalize:undefined},email:{keyboardType:'email',keyboardReturnKeyType:'done',autoCompleteSuggestionType:'email',autoCapitalize:'none'},url:{keyboardType:'url',keyboardReturnKeyType:'go',autoCompleteSuggestionType:'none',autoCapitalize:'none'},number:{keyboardType:'decimal',keyboardReturnKeyType:'done',autoCompleteSuggestionType:'none',autoCapitalize:undefined},search:{keyboardType:'search',keyboardReturnKeyType:'search',autoCompleteSuggestionType:'none',autoCapitalize:undefined}};var keyboardConfig=keyboardConfigMap[type];keyboardAndAutocompleteProps.keyboardType=keyboardConfig.keyboardType;keyboardAndAutocompleteProps.keyboardReturnKeyType=keyboardReturnKeyType!=null?keyboardReturnKeyType:keyboardConfig.keyboardReturnKeyType;keyboardAndAutocompleteProps.autoCompleteSuggestionType=autoCompleteSuggestionType!=null?autoCompleteSuggestionType:keyboardConfig.autoCompleteSuggestionType;keyboardAndAutocompleteProps.autoCapitalize=keyboardConfig.autoCapitalize;if(type==='number'){keyboardAndAutocompleteProps.type='text';}if(type==='search'){keyboardAndAutocompleteProps.type='text';}return keyboardAndAutocompleteProps;};var isReactNative$2=function isReactNative(_textInputRef){return getPlatformType()==='react-native';};var _TextInput=function _TextInput(_ref2,ref){var label=_ref2.label,_ref2$labelPosition=_ref2.labelPosition,labelPosition=_ref2$labelPosition===void 0?'top':_ref2$labelPosition,placeholder=_ref2.placeholder,_ref2$type=_ref2.type,type=_ref2$type===void 0?'text':_ref2$type,defaultValue=_ref2.defaultValue,name=_ref2.name,value=_ref2.value,maxCharacters=_ref2.maxCharacters,_onChange=_ref2.onChange,onFocus=_ref2.onFocus,onBlur=_ref2.onBlur,onSubmit=_ref2.onSubmit,isDisabled=_ref2.isDisabled,necessityIndicator=_ref2.necessityIndicator,validationState=_ref2.validationState,errorText=_ref2.errorText,helpText=_ref2.helpText,successText=_ref2.successText,isRequired=_ref2.isRequired,icon=_ref2.icon,prefix=_ref2.prefix,showClearButton=_ref2.showClearButton,onClearButtonClick=_ref2.onClearButtonClick,isLoading=_ref2.isLoading,suffix=_ref2.suffix,autoFocus=_ref2.autoFocus,keyboardReturnKeyType=_ref2.keyboardReturnKeyType,autoCompleteSuggestionType=_ref2.autoCompleteSuggestionType,autoCapitalize=_ref2.autoCapitalize,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded$e);var textInputRef=useBladeInnerRef(ref);var _useState=useState(false),_useState2=_slicedToArray(_useState,2),shouldShowClearButton=_useState2[0],setShouldShowClearButton=_useState2[1];React__default.useEffect(function(){setShouldShowClearButton(Boolean(showClearButton&&(defaultValue!=null?defaultValue:value)));},[showClearButton,defaultValue,value]);var renderInteractionElement=function renderInteractionElement(){if(isLoading){return jsx(Spinner,{accessibilityLabel:"Loading Content"});}if(shouldShowClearButton){return jsx(IconButton,{size:"medium",icon:CloseIcon,onClick:function onClick(){var _textInputRef$current;if(isEmpty_1(value)&&textInputRef.current){if(isReactNative$2(textInputRef.current)){textInputRef.current.clear();textInputRef.current.focus();}else if(textInputRef.current instanceof HTMLInputElement){textInputRef.current.value='';textInputRef.current.focus();}}onClearButtonClick==null?void 0:onClearButtonClick();textInputRef==null?void 0:(_textInputRef$current=textInputRef.current)==null?void 0:_textInputRef$current.focus();setShouldShowClearButton(false);},accessibilityLabel:"Clear Input Content"});}return null;};return jsx(BaseInput,_extends({id:"textinput",componentName:"textinput",ref:textInputRef,label:label,labelPosition:labelPosition,placeholder:placeholder,defaultValue:defaultValue,value:value,name:name,maxCharacters:maxCharacters,onChange:function onChange(_ref3){var name=_ref3.name,value=_ref3.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,isDisabled:isDisabled,necessityIndicator:necessityIndicator,isRequired:isRequired,leadingIcon:icon,prefix:prefix,interactionElement:renderInteractionElement(),suffix:suffix,validationState:validationState,errorText:errorText,helpText:helpText,successText:successText,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;},autoFocus:autoFocus,testID:testID},getKeyboardAndAutocompleteProps({type:type,keyboardReturnKeyType:keyboardReturnKeyType,autoCompleteSuggestionType:autoCompleteSuggestionType,autoCapitalize:autoCapitalize}),styledProps));};var TextInput=assignWithoutSideEffects(React__default.forwardRef(_TextInput),{displayName:'TextInput'});
4042
+ var _excluded$e=["label","labelPosition","placeholder","type","defaultValue","name","value","maxCharacters","onChange","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID"];var getKeyboardAndAutocompleteProps=function getKeyboardAndAutocompleteProps(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?'text':_ref$type,keyboardReturnKeyType=_ref.keyboardReturnKeyType,autoCompleteSuggestionType=_ref.autoCompleteSuggestionType,autoCapitalize=_ref.autoCapitalize;var keyboardAndAutocompleteProps={type:type,keyboardType:'text',keyboardReturnKeyType:'default',autoCompleteSuggestionType:'none',autoCapitalize:autoCapitalize};var keyboardConfigMap={text:{keyboardType:'text',keyboardReturnKeyType:'default',autoCompleteSuggestionType:'none',autoCapitalize:undefined},telephone:{keyboardType:'telephone',keyboardReturnKeyType:'done',autoCompleteSuggestionType:'telephone',autoCapitalize:undefined},email:{keyboardType:'email',keyboardReturnKeyType:'done',autoCompleteSuggestionType:'email',autoCapitalize:'none'},url:{keyboardType:'url',keyboardReturnKeyType:'go',autoCompleteSuggestionType:'none',autoCapitalize:'none'},number:{keyboardType:'decimal',keyboardReturnKeyType:'done',autoCompleteSuggestionType:'none',autoCapitalize:undefined},search:{keyboardType:'search',keyboardReturnKeyType:'search',autoCompleteSuggestionType:'none',autoCapitalize:undefined}};var keyboardConfig=keyboardConfigMap[type];keyboardAndAutocompleteProps.keyboardType=keyboardConfig.keyboardType;keyboardAndAutocompleteProps.keyboardReturnKeyType=keyboardReturnKeyType!=null?keyboardReturnKeyType:keyboardConfig.keyboardReturnKeyType;keyboardAndAutocompleteProps.autoCompleteSuggestionType=autoCompleteSuggestionType!=null?autoCompleteSuggestionType:keyboardConfig.autoCompleteSuggestionType;keyboardAndAutocompleteProps.autoCapitalize=keyboardConfig.autoCapitalize;if(type==='number'){keyboardAndAutocompleteProps.type='text';}if(type==='search'){keyboardAndAutocompleteProps.type='text';}return keyboardAndAutocompleteProps;};var isReactNative$2=function isReactNative(_textInputRef){return getPlatformType()==='react-native';};var _TextInput=function _TextInput(_ref2,ref){var label=_ref2.label,_ref2$labelPosition=_ref2.labelPosition,labelPosition=_ref2$labelPosition===void 0?'top':_ref2$labelPosition,placeholder=_ref2.placeholder,_ref2$type=_ref2.type,type=_ref2$type===void 0?'text':_ref2$type,defaultValue=_ref2.defaultValue,name=_ref2.name,value=_ref2.value,maxCharacters=_ref2.maxCharacters,_onChange=_ref2.onChange,onFocus=_ref2.onFocus,onBlur=_ref2.onBlur,onSubmit=_ref2.onSubmit,isDisabled=_ref2.isDisabled,necessityIndicator=_ref2.necessityIndicator,validationState=_ref2.validationState,errorText=_ref2.errorText,helpText=_ref2.helpText,successText=_ref2.successText,isRequired=_ref2.isRequired,icon=_ref2.icon,prefix=_ref2.prefix,showClearButton=_ref2.showClearButton,onClearButtonClick=_ref2.onClearButtonClick,isLoading=_ref2.isLoading,suffix=_ref2.suffix,autoFocus=_ref2.autoFocus,keyboardReturnKeyType=_ref2.keyboardReturnKeyType,autoCompleteSuggestionType=_ref2.autoCompleteSuggestionType,autoCapitalize=_ref2.autoCapitalize,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded$e);var textInputRef=useBladeInnerRef(ref);var _useState=useState(false),_useState2=_slicedToArray(_useState,2),shouldShowClearButton=_useState2[0],setShouldShowClearButton=_useState2[1];React__default.useEffect(function(){setShouldShowClearButton(Boolean(showClearButton&&(defaultValue!=null?defaultValue:value)));},[showClearButton,defaultValue,value]);var renderInteractionElement=function renderInteractionElement(){if(isLoading){return jsx(Spinner,{accessibilityLabel:"Loading Content"});}if(shouldShowClearButton){return jsx(IconButton,{size:"medium",icon:CloseIcon,onClick:function onClick(){var _textInputRef$current;if(isEmpty_1(value)&&textInputRef.current){if(isReactNative$2(textInputRef.current)){textInputRef.current.clear();textInputRef.current.focus();}else if(textInputRef.current instanceof HTMLInputElement){textInputRef.current.value='';textInputRef.current.focus();}}onClearButtonClick==null?void 0:onClearButtonClick();textInputRef==null?void 0:(_textInputRef$current=textInputRef.current)==null?void 0:_textInputRef$current.focus();setShouldShowClearButton(false);},accessibilityLabel:"Clear Input Content"});}return null;};return jsx(BaseInput,_extends({id:"textinput",componentName:MetaConstants.TextInput,ref:textInputRef,label:label,labelPosition:labelPosition,placeholder:placeholder,defaultValue:defaultValue,value:value,name:name,maxCharacters:maxCharacters,onChange:function onChange(_ref3){var name=_ref3.name,value=_ref3.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,isDisabled:isDisabled,necessityIndicator:necessityIndicator,isRequired:isRequired,leadingIcon:icon,prefix:prefix,interactionElement:renderInteractionElement(),suffix:suffix,validationState:validationState,errorText:errorText,helpText:helpText,successText:successText,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;},autoFocus:autoFocus,testID:testID},getKeyboardAndAutocompleteProps({type:type,keyboardReturnKeyType:keyboardReturnKeyType,autoCompleteSuggestionType:autoCompleteSuggestionType,autoCapitalize:autoCapitalize}),styledProps));};var TextInput=assignWithoutSideEffects(React__default.forwardRef(_TextInput),{displayName:'TextInput'});
4043
4043
 
4044
- var _excluded$d=["label","labelPosition","showRevealButton","maxCharacters","validationState","errorText","successText","helpText","isDisabled","defaultValue","placeholder","isRequired","necessityIndicator","value","onChange","onFocus","onBlur","onSubmit","name","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","testID"];var _PasswordInput=function _PasswordInput(_ref,ref){var label=_ref.label,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,_ref$showRevealButton=_ref.showRevealButton,showRevealButton=_ref$showRevealButton===void 0?true:_ref$showRevealButton,maxCharacters=_ref.maxCharacters,validationState=_ref.validationState,errorText=_ref.errorText,successText=_ref.successText,helpText=_ref.helpText,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,defaultValue=_ref.defaultValue,placeholder=_ref.placeholder,_ref$isRequired=_ref.isRequired,isRequired=_ref$isRequired===void 0?false:_ref$isRequired,_ref$necessityIndicat=_ref.necessityIndicator,necessityIndicator=_ref$necessityIndicat===void 0?'none':_ref$necessityIndicat,value=_ref.value,onChange=_ref.onChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,name=_ref.name,_ref$autoFocus=_ref.autoFocus,autoFocus=_ref$autoFocus===void 0?false:_ref$autoFocus,_ref$keyboardReturnKe=_ref.keyboardReturnKeyType,keyboardReturnKeyType=_ref$keyboardReturnKe===void 0?'done':_ref$keyboardReturnKe,autoCompleteSuggestionType=_ref.autoCompleteSuggestionType,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$d);var inputRef=useBladeInnerRef(ref);var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isRevealed=_React$useState2[0],setIsRevealed=_React$useState2[1];var isEnabled=!isDisabled;var isRevealedAndEnabled=isRevealed&&isEnabled;var toggleIsRevealed=function toggleIsRevealed(){return setIsRevealed(function(revealed){return !revealed;});};var accessibilityLabel=isRevealedAndEnabled?'Hide password':'Show password';var type=isRevealedAndEnabled?'text':'password';var revealButtonIcon=isRevealedAndEnabled?EyeOffIcon:EyeIcon;var revealButton=showRevealButton&&!isDisabled?jsx(IconButton,{size:"medium",icon:revealButtonIcon,onClick:toggleIsRevealed,accessibilityLabel:accessibilityLabel}):null;var 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;};return jsx(BaseInput,_extends({ref:inputRef,componentName:"password-input",id:"password-field",label:label,labelPosition:labelPosition,type:type,interactionElement:revealButton,trailingFooterSlot:trailingFooterSlot,maxCharacters:maxCharacters,validationState:validationState,errorText:errorText,successText:successText,helpText:helpText,isDisabled:isDisabled,defaultValue:defaultValue,placeholder:placeholder,isRequired:isRequired,necessityIndicator:necessityIndicator,value:value,onChange:onChange,onBlur:onBlur,onSubmit:onSubmit,onFocus:onFocus,name:name,autoFocus:autoFocus,autoCompleteSuggestionType:autoCompleteSuggestionType,keyboardReturnKeyType:keyboardReturnKeyType,autoCapitalize:"none",testID:testID},styledProps));};var PasswordInput=assignWithoutSideEffects(React__default.forwardRef(_PasswordInput),{displayName:'PasswordInput'});
4044
+ var _excluded$d=["label","labelPosition","showRevealButton","maxCharacters","validationState","errorText","successText","helpText","isDisabled","defaultValue","placeholder","isRequired","necessityIndicator","value","onChange","onFocus","onBlur","onSubmit","name","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","testID"];var _PasswordInput=function _PasswordInput(_ref,ref){var label=_ref.label,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,_ref$showRevealButton=_ref.showRevealButton,showRevealButton=_ref$showRevealButton===void 0?true:_ref$showRevealButton,maxCharacters=_ref.maxCharacters,validationState=_ref.validationState,errorText=_ref.errorText,successText=_ref.successText,helpText=_ref.helpText,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,defaultValue=_ref.defaultValue,placeholder=_ref.placeholder,_ref$isRequired=_ref.isRequired,isRequired=_ref$isRequired===void 0?false:_ref$isRequired,_ref$necessityIndicat=_ref.necessityIndicator,necessityIndicator=_ref$necessityIndicat===void 0?'none':_ref$necessityIndicat,value=_ref.value,onChange=_ref.onChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,name=_ref.name,_ref$autoFocus=_ref.autoFocus,autoFocus=_ref$autoFocus===void 0?false:_ref$autoFocus,_ref$keyboardReturnKe=_ref.keyboardReturnKeyType,keyboardReturnKeyType=_ref$keyboardReturnKe===void 0?'done':_ref$keyboardReturnKe,autoCompleteSuggestionType=_ref.autoCompleteSuggestionType,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$d);var inputRef=useBladeInnerRef(ref);var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isRevealed=_React$useState2[0],setIsRevealed=_React$useState2[1];var isEnabled=!isDisabled;var isRevealedAndEnabled=isRevealed&&isEnabled;var toggleIsRevealed=function toggleIsRevealed(){return setIsRevealed(function(revealed){return !revealed;});};var accessibilityLabel=isRevealedAndEnabled?'Hide password':'Show password';var type=isRevealedAndEnabled?'text':'password';var revealButtonIcon=isRevealedAndEnabled?EyeOffIcon:EyeIcon;var revealButton=showRevealButton&&!isDisabled?jsx(IconButton,{size:"medium",icon:revealButtonIcon,onClick:toggleIsRevealed,accessibilityLabel:accessibilityLabel}):null;var 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;};return jsx(BaseInput,_extends({ref:inputRef,componentName:MetaConstants.PasswordInput,id:"password-field",label:label,labelPosition:labelPosition,type:type,interactionElement:revealButton,trailingFooterSlot:trailingFooterSlot,maxCharacters:maxCharacters,validationState:validationState,errorText:errorText,successText:successText,helpText:helpText,isDisabled:isDisabled,defaultValue:defaultValue,placeholder:placeholder,isRequired:isRequired,necessityIndicator:necessityIndicator,value:value,onChange:onChange,onBlur:onBlur,onSubmit:onSubmit,onFocus:onFocus,name:name,autoFocus:autoFocus,autoCompleteSuggestionType:autoCompleteSuggestionType,keyboardReturnKeyType:keyboardReturnKeyType,autoCapitalize:"none",testID:testID},styledProps));};var PasswordInput=assignWithoutSideEffects(React__default.forwardRef(_PasswordInput),{displayName:'PasswordInput'});
4045
4045
 
4046
- var _excluded$c=["label","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,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$c);var inputRef=useBladeInnerRef(ref);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,_extends({as:"textarea",id:"textarea",componentName:"textarea",autoFocus:autoFocus,ref:inputRef,label: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'});
4046
+ var _excluded$c=["label","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,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$c);var inputRef=useBladeInnerRef(ref);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,_extends({as:"textarea",id:"textarea",componentName:MetaConstants.TextArea,autoFocus:autoFocus,ref:inputRef,label: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'});
4047
4047
 
4048
4048
  var _excluded$b=["autoFocus","errorText","helpText","isDisabled","keyboardReturnKeyType","keyboardType","label","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,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$b);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;var _useTheme=useTheme(),platform=_useTheme.platform;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',maxWidth:platform==='onDesktop'?makeSize(size[36]):makeSize(size[40]),children:jsx(BaseInput,{autoFocus:autoFocus&&index===0,accessibilityLabel:(index===0?label:'')+" 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(_extends({},formEvent,{currentOtpIndex:index}));},onFocus:function onFocus(formEvent){return _onFocus==null?void 0:_onFocus(_extends({},formEvent,{inputIndex:index}));},onBlur:function onBlur(formEvent){return _onBlur==null?void 0:_onBlur(_extends({},formEvent,{inputIndex:index}));},onInput:function onInput(formEvent){return handleOnInput(_extends({},formEvent,{currentOtpIndex:index}));},onKeyDown:function onKeyDown(keyboardEvent){return handleOnKeyDown(_extends({},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,_extends({},metaAttribute({name:MetaConstants.OTPInput,testID:testID}),getStyledProps(styledProps),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",children:[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})})]}));};
4049
4049
 
@@ -4269,11 +4269,11 @@ var RadioIconWrapper=styled.View(function(props){return getRadioIconWrapperStyle
4269
4269
 
4270
4270
  var StyledFade=styled(Animated.View)(function(_ref){var styles=_ref.styles;return _extends({},styles);});var Fade=function Fade(_ref2){var children=_ref2.children,show=_ref2.show,styles=_ref2.styles;var _useTheme=useTheme(),theme=_useTheme.theme;var enterEasing=theme.motion.easing.entrance.effective;var exitEasing=theme.motion.easing.exit.effective;var scaleIn=new Keyframe({from:{transform:[{scale:0.3}],opacity:0,easing:enterEasing},to:{transform:[{scale:1}],opacity:1,easing:enterEasing}}).duration(theme.motion.duration.quick);var fadeOut=new Keyframe({from:{opacity:1,easing:exitEasing},to:{opacity:0,easing:exitEasing}}).duration(theme.motion.duration.quick);return show?jsx(StyledFade,{styles:styles,entering:scaleIn,exiting:fadeOut,children:children}):null;};
4271
4271
 
4272
- var CheckedIcon=function CheckedIcon(_ref){var color=_ref.color,size=_ref.size;var width=radioSizes.icon[size].width;var height=radioSizes.icon[size].height;var radius=radioSizes.icon[size].dotRadius;var viewBox="0 0 "+width+" "+height;var cx=""+width/2;var cy=""+height/2;return jsx(Svg,{width:makeSpace(width),height:makeSpace(height),viewBox:viewBox,fill:"none",children:jsx(Circle,{cx:cx,cy:cy,r:""+radius,fill:color})});};var RadioIcon=function RadioIcon(_ref2){var isChecked=_ref2.isChecked,isDisabled=_ref2.isDisabled,isNegative=_ref2.isNegative,size=_ref2.size;var _useTheme=useTheme(),theme=_useTheme.theme;var checked=Boolean(isChecked);var state=checked?'checked':'unchecked';var variant='default';if(isDisabled)variant='disabled';if(isNegative)variant='negative';var dotColor=get_1(theme,radioIconColors.variants[variant].dot[state]);return jsx(RadioIconWrapper,{size:size,isDisabled:isDisabled,isNegative:isNegative,isChecked:checked,children:jsx(Fade,{show:checked,styles:{position:'absolute',display:'flex'},children:jsx(CheckedIcon,{size:size,color:dotColor})})});};
4272
+ var CheckedIcon=function CheckedIcon(_ref){var color=_ref.color,size=_ref.size;var width=radioSizes.icon[size].width;var height=radioSizes.icon[size].height;var radius=radioSizes.icon[size].dotRadius;var viewBox="0 0 "+width+" "+height;var cx=""+width/2;var cy=""+height/2;return jsx(Svg,{width:makeSpace(width),height:makeSpace(height),viewBox:viewBox,fill:"none",children:jsx(Circle,{cx:cx,cy:cy,r:""+radius,fill:color})});};var RadioIcon=function RadioIcon(_ref2){var isChecked=_ref2.isChecked,isDisabled=_ref2.isDisabled,isNegative=_ref2.isNegative,size=_ref2.size;var _useTheme=useTheme(),theme=_useTheme.theme;var checked=Boolean(isChecked);var state=checked?'checked':'unchecked';var variant='default';if(isDisabled)variant='disabled';if(isNegative)variant='negative';var dotColor=get_1(theme,radioIconColors.variants[variant].dot[state]);return jsx(RadioIconWrapper,_extends({size:size,isDisabled:isDisabled,isNegative:isNegative,isChecked:checked},metaAttribute({name:'radio-icon-wrapper'}),{children:jsx(Fade,{show:checked,styles:{position:'absolute',display:'flex'},children:jsx(CheckedIcon,{size:size,color:dotColor})})}));};
4273
4273
 
4274
4274
  var RadioGroupContext=React__default.createContext({});var RadioGroupProvider=RadioGroupContext.Provider;var useRadioGroupContext=function useRadioGroupContext(){var context=React__default.useContext(RadioGroupContext);return context;};
4275
4275
 
4276
- var _excluded$6=["value","children","helpText","isDisabled","size","testID"];var _Radio=function _Radio(_ref,ref){var _groupProps$state,_groupProps$size;var value=_ref.value,children=_ref.children,helpText=_ref.helpText,isDisabled=_ref.isDisabled,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$6);var groupProps=useRadioGroupContext();var isInsideGroup=!isEmpty_1(groupProps);if(!isInsideGroup){throw new Error('[Blade Radio]: Cannot use <Radio /> outside of <RadioGroup />');}var isChecked=groupProps==null?void 0:(_groupProps$state=groupProps.state)==null?void 0:_groupProps$state.isChecked(value);var defaultChecked=(groupProps==null?void 0:groupProps.defaultValue)===undefined?undefined:(groupProps==null?void 0:groupProps.defaultValue)===value;var validationState=groupProps==null?void 0:groupProps.validationState;var hasError=validationState==='error';var _isDisabled=isDisabled!=null?isDisabled:groupProps==null?void 0:groupProps.isDisabled;var name=groupProps==null?void 0:groupProps.name;var showHelpText=!hasError&&helpText;var isReactNative=getPlatformType()==='react-native';var _size=(_groupProps$size=groupProps.size)!=null?_groupProps$size:size;var isSmall=_size==='small';var handleChange=function handleChange(_ref2){var isChecked=_ref2.isChecked,value=_ref2.value;if(isChecked){var _groupProps$state2;groupProps==null?void 0:(_groupProps$state2=groupProps.state)==null?void 0:_groupProps$state2.setValue(value);}else {var _groupProps$state3;groupProps==null?void 0:(_groupProps$state3=groupProps.state)==null?void 0:_groupProps$state3.removeValue();}};var _useRadio=useRadio({defaultChecked:defaultChecked,isChecked:isChecked,hasError:hasError,isDisabled:_isDisabled,isRequired:groupProps.necessityIndicator==='required',name:name,value:value,onChange:handleChange}),state=_useRadio.state,ids=_useRadio.ids,inputProps=_useRadio.inputProps;return jsx(BaseBox,_extends({},getStyledProps(styledProps),{children:jsx(SelectorLabel,{inputProps:isReactNative?inputProps:{},testID:testID,children:jsxs(BaseBox,{display:"flex",flexDirection:"column",children:[jsxs(BaseBox,{display:"flex",alignItems:"center",flexDirection:"row",children:[jsx(SelectorInput,{hoverTokens:radioHoverTokens,isChecked:state.isChecked,isDisabled:_isDisabled,hasError:hasError,inputProps:inputProps,ref:ref}),jsx(RadioIcon,{size:_size,isChecked:state.isChecked,isDisabled:_isDisabled,isNegative:hasError}),jsx(SelectorTitle,{size:_size,isDisabled:_isDisabled,children:children})]}),jsx(BaseBox,{marginLeft:isSmall?'spacing.6':'spacing.7',children:showHelpText&&jsx(SelectorSupportText,{id:ids==null?void 0:ids.helpTextId,children:helpText})})]})})}));};var Radio=assignWithoutSideEffects(React__default.forwardRef(_Radio),{displayName:'Radio'});
4276
+ var _excluded$6=["value","children","helpText","isDisabled","size","testID"];var _Radio=function _Radio(_ref,ref){var _groupProps$state,_groupProps$size;var value=_ref.value,children=_ref.children,helpText=_ref.helpText,isDisabled=_ref.isDisabled,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$6);var groupProps=useRadioGroupContext();var isInsideGroup=!isEmpty_1(groupProps);if(!isInsideGroup){throw new Error('[Blade Radio]: Cannot use <Radio /> outside of <RadioGroup />');}var isChecked=groupProps==null?void 0:(_groupProps$state=groupProps.state)==null?void 0:_groupProps$state.isChecked(value);var defaultChecked=(groupProps==null?void 0:groupProps.defaultValue)===undefined?undefined:(groupProps==null?void 0:groupProps.defaultValue)===value;var validationState=groupProps==null?void 0:groupProps.validationState;var hasError=validationState==='error';var _isDisabled=isDisabled!=null?isDisabled:groupProps==null?void 0:groupProps.isDisabled;var name=groupProps==null?void 0:groupProps.name;var showHelpText=!hasError&&helpText;var isReactNative=getPlatformType()==='react-native';var _size=(_groupProps$size=groupProps.size)!=null?_groupProps$size:size;var isSmall=_size==='small';var handleChange=function handleChange(_ref2){var isChecked=_ref2.isChecked,value=_ref2.value;if(isChecked){var _groupProps$state2;groupProps==null?void 0:(_groupProps$state2=groupProps.state)==null?void 0:_groupProps$state2.setValue(value);}else {var _groupProps$state3;groupProps==null?void 0:(_groupProps$state3=groupProps.state)==null?void 0:_groupProps$state3.removeValue();}};var _useRadio=useRadio({defaultChecked:defaultChecked,isChecked:isChecked,hasError:hasError,isDisabled:_isDisabled,isRequired:groupProps.necessityIndicator==='required',name:name,value:value,onChange:handleChange}),state=_useRadio.state,ids=_useRadio.ids,inputProps=_useRadio.inputProps;return jsx(BaseBox,_extends({},getStyledProps(styledProps),{children:jsx(SelectorLabel,{componentName:MetaConstants.RadioLabel,inputProps:isReactNative?inputProps:{},testID:testID,children:jsxs(BaseBox,{display:"flex",flexDirection:"column",children:[jsxs(BaseBox,{display:"flex",alignItems:"center",flexDirection:"row",children:[jsx(SelectorInput,{hoverTokens:radioHoverTokens,isChecked:state.isChecked,isDisabled:_isDisabled,hasError:hasError,inputProps:inputProps,ref:ref}),jsx(RadioIcon,{size:_size,isChecked:state.isChecked,isDisabled:_isDisabled,isNegative:hasError}),jsx(SelectorTitle,{size:_size,isDisabled:_isDisabled,children:children})]}),jsx(BaseBox,{marginLeft:isSmall?'spacing.6':'spacing.7',children:showHelpText&&jsx(SelectorSupportText,{id:ids==null?void 0:ids.helpTextId,children:helpText})})]})})}));};var Radio=assignWithoutSideEffects(React__default.forwardRef(_Radio),{displayName:'Radio'});
4277
4277
 
4278
4278
  var useRadioGroup=function useRadioGroup(_ref){var value=_ref.value,defaultValue=_ref.defaultValue,isDisabled=_ref.isDisabled,labelPosition=_ref.labelPosition,_onChange=_ref.onChange,validationState=_ref.validationState,necessityIndicator=_ref.necessityIndicator,name=_ref.name,size=_ref.size;var _useTheme=useTheme(),platform=_useTheme.platform;var idBase=useId('radio-group');var labelId=idBase+"-label";var fallbackName=name!=null?name:idBase;var _useControllableState=useControllableState({value:value,defaultValue:defaultValue,onChange:function onChange(v){return _onChange==null?void 0:_onChange({value:v,name:fallbackName});}}),_useControllableState2=_slicedToArray(_useControllableState,2),checkedValue=_useControllableState2[0],setValue=_useControllableState2[1];var state=React__default.useMemo(function(){return {value:checkedValue,setValue:function(_setValue){function setValue(_x){return _setValue.apply(this,arguments);}setValue.toString=function(){return _setValue.toString();};return setValue;}(function(v){if(isDisabled){return;}setValue(function(){return v;});}),removeValue:function removeValue(){if(isDisabled){return;}setValue(undefined);},isChecked:function isChecked(v){if(isUndefined_1(v)||isUndefined_1(checkedValue))return false;return checkedValue===v;}};},[checkedValue,isDisabled,setValue]);var contextValue=React__default.useMemo(function(){return {necessityIndicator:necessityIndicator,validationState:validationState,isDisabled:isDisabled,labelPosition:platform==='onMobile'?'top':labelPosition,name:fallbackName,state:state,size:size};},[validationState,isDisabled,platform,labelPosition,state,fallbackName,necessityIndicator,size]);return {state:state,contextValue:contextValue,ids:{labelId:labelId}};};
4279
4279
 
@@ -4334,7 +4334,7 @@ var getTrackStyles=function getTrackStyles(_ref){var isChecked=_ref.isChecked,is
4334
4334
 
4335
4335
  var _excluded$4=["children","isChecked"];var StyledSwitchTrack=styled(Animated.View)(function(_ref){var theme=_ref.theme,size=_ref.size,deviceType=_ref.deviceType,isDisabled=_ref.isDisabled,isChecked=_ref.isChecked;return _extends({},getTrackStyles({theme:theme,size:size,deviceType:deviceType,isDisabled:isDisabled,isChecked:isChecked}));});var SwitchTrack=function SwitchTrack(_ref2){var children=_ref2.children,isChecked=_ref2.isChecked,props=_objectWithoutProperties(_ref2,_excluded$4);var _useTheme=useTheme(),theme=_useTheme.theme;var sharedColor=useSharedValue(isChecked?1:0);var easing=get_1(theme,switchMotion.easing.track);var duration=get_1(theme,switchMotion.duration.track);var checkedColor=get_1(theme,switchColors.track.default.background.checked);var uncheckedColor=get_1(theme,switchColors.track.default.background.unchecked);React__default.useEffect(function(){sharedColor.value=withTiming(isChecked?1:0,{duration:duration,easing:easing});},[isChecked]);var colorStyle=useAnimatedStyle(function(){var _f=function _f(){return {backgroundColor:interpolateColor(sharedColor.value,[0,1],[uncheckedColor,checkedColor])};};_f._closure={interpolateColor:interpolateColor,sharedColor:sharedColor,uncheckedColor:uncheckedColor,checkedColor:checkedColor};_f.asString="function _f(){const{interpolateColor,sharedColor,uncheckedColor,checkedColor}=jsThis._closure;{return{backgroundColor:interpolateColor(sharedColor.value,[0,1],[uncheckedColor,checkedColor])};}}";_f.__workletHash=17154787628336;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Switch/SwitchTrack.native.tsx (44:38)";_f.__optimalization=2;return _f;}(),[]);return jsx(StyledSwitchTrack,_extends({isChecked:isChecked},props,{style:colorStyle,children:children}));};
4336
4336
 
4337
- var _Switch=function _Switch(_ref,ref){var defaultChecked=_ref.defaultChecked,isChecked=_ref.isChecked,isDisabled=_ref.isDisabled,name=_ref.name,onChange=_ref.onChange,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,value=_ref.value,accessibilityLabel=_ref.accessibilityLabel,testID=_ref.testID;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isPressed=_React$useState2[0],setIsPressed=_React$useState2[1];var _useCheckbox=useCheckbox({role:'switch',defaultChecked:defaultChecked,isChecked:isChecked,isIndeterminate:false,hasError:false,hasHelperText:false,isDisabled:isDisabled,isRequired:false,name:name,value:value,onChange:onChange}),state=_useCheckbox.state,inputProps=_useCheckbox.inputProps;var handlePointerPressedIn=React__default.useCallback(function(){if(isDisabled)return;setIsPressed(true);},[isDisabled]);var handlePointerPressedOut=React__default.useCallback(function(){if(isDisabled)return;setIsPressed(false);},[isDisabled]);var handleKeyboardPressedIn=React__default.useCallback(function(e){if(isDisabled)return;if(e.key===' '){setIsPressed(true);}},[isDisabled]);var handleKeyboardPressedOut=React__default.useCallback(function(e){if(isDisabled)return;if(e.key===' '){setIsPressed(false);}},[isDisabled]);return jsx(BaseBox,_extends({},metaAttribute({testID:testID,name:'Switch'}),{display:state.isReactNative?'flex':'inline-block',children:jsxs(SelectorLabel,{onTouchStart:handlePointerPressedIn,onTouchEnd:handlePointerPressedOut,onMouseDown:handlePointerPressedIn,onMouseUp:handlePointerPressedOut,onMouseOut:handlePointerPressedOut,onKeyDown:handleKeyboardPressedIn,onKeyUp:handleKeyboardPressedOut,style:{cursor:'pointer'},inputProps:state.isReactNative?_extends({},inputProps,makeAccessible({label:accessibilityLabel})):{},children:[jsx(SelectorInput,{hoverTokens:switchHoverTokens,ref:ref,isChecked:state.isChecked,isDisabled:isDisabled,hasError:false,inputProps:inputProps,accessibilityLabel:accessibilityLabel}),jsx(SwitchTrack,_extends({size:size,deviceType:matchedDeviceType,isDisabled:Boolean(isDisabled),isChecked:state.isChecked},makeAccessible({hidden:true}),{children:jsx(Thumb,{size:size,deviceType:matchedDeviceType,isChecked:state.isChecked,children:jsx(AnimatedThumb,{isPressed:isPressed,isChecked:state.isChecked,isDisabled:isDisabled,size:size,children:jsx(ThumbIcon,{isChecked:state.isChecked,isDisabled:isDisabled,size:size})})})}))]})}));};var Switch=assignWithoutSideEffects(React__default.forwardRef(_Switch),{displayName:'Switch'});
4337
+ var _Switch=function _Switch(_ref,ref){var defaultChecked=_ref.defaultChecked,isChecked=_ref.isChecked,isDisabled=_ref.isDisabled,name=_ref.name,onChange=_ref.onChange,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,value=_ref.value,accessibilityLabel=_ref.accessibilityLabel,testID=_ref.testID;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isPressed=_React$useState2[0],setIsPressed=_React$useState2[1];var _useCheckbox=useCheckbox({role:'switch',defaultChecked:defaultChecked,isChecked:isChecked,isIndeterminate:false,hasError:false,hasHelperText:false,isDisabled:isDisabled,isRequired:false,name:name,value:value,onChange:onChange}),state=_useCheckbox.state,inputProps=_useCheckbox.inputProps;var handlePointerPressedIn=React__default.useCallback(function(){if(isDisabled)return;setIsPressed(true);},[isDisabled]);var handlePointerPressedOut=React__default.useCallback(function(){if(isDisabled)return;setIsPressed(false);},[isDisabled]);var handleKeyboardPressedIn=React__default.useCallback(function(e){if(isDisabled)return;if(e.key===' '){setIsPressed(true);}},[isDisabled]);var handleKeyboardPressedOut=React__default.useCallback(function(e){if(isDisabled)return;if(e.key===' '){setIsPressed(false);}},[isDisabled]);return jsx(BaseBox,_extends({},metaAttribute({testID:testID,name:MetaConstants.Switch}),{display:state.isReactNative?'flex':'inline-block',children:jsxs(SelectorLabel,{componentName:MetaConstants.SwitchLabel,onTouchStart:handlePointerPressedIn,onTouchEnd:handlePointerPressedOut,onMouseDown:handlePointerPressedIn,onMouseUp:handlePointerPressedOut,onMouseOut:handlePointerPressedOut,onKeyDown:handleKeyboardPressedIn,onKeyUp:handleKeyboardPressedOut,style:{cursor:'pointer'},inputProps:state.isReactNative?_extends({},inputProps,makeAccessible({label:accessibilityLabel})):{},children:[jsx(SelectorInput,{hoverTokens:switchHoverTokens,ref:ref,isChecked:state.isChecked,isDisabled:isDisabled,hasError:false,inputProps:inputProps,accessibilityLabel:accessibilityLabel}),jsx(SwitchTrack,_extends({size:size,deviceType:matchedDeviceType,isDisabled:Boolean(isDisabled),isChecked:state.isChecked},makeAccessible({hidden:true}),{children:jsx(Thumb,{size:size,deviceType:matchedDeviceType,isChecked:state.isChecked,children:jsx(AnimatedThumb,{isPressed:isPressed,isChecked:state.isChecked,isDisabled:isDisabled,size:size,children:jsx(ThumbIcon,{isChecked:state.isChecked,isDisabled:isDisabled,size:size})})})}))]})}));};var Switch=assignWithoutSideEffects(React__default.forwardRef(_Switch),{displayName:'Switch'});
4338
4338
 
4339
4339
  var affixFontSizes={'body-small':75,'body-small-bold':75,'body-medium':75,'body-medium-bold':75,'heading-small':75,'heading-small-bold':75,'heading-large':100,'heading-large-bold':100,'title-small':300,'title-medium':400};var amountFontSizes={'body-small':75,'body-small-bold':75,'body-medium':100,'body-medium-bold':100,'heading-small':200,'heading-small-bold':200,'heading-large':400,'heading-large-bold':400,'title-small':600,'title-medium':700};var amountLineHeights={'body-small':50,'body-small-bold':50,'body-medium':100,'body-medium-bold':100,'heading-small':300,'heading-small-bold':300,'heading-large':400,'heading-large-bold':400,'title-small':500,'title-medium':600};var currencyPrefixMapping={INR:{'currency-symbol':'₹','currency-code':'INR'},MYR:{'currency-symbol':'RM','currency-code':'MYR'}};var currencyLocaleMapping={INR:'en-IN',MYR:'en-MY'};var currencyAbbreviationsMapping={INR:[{value:1e7,symbol:'Cr'},{value:1e5,symbol:'L'},{value:1e3,symbol:'k'}],MYR:[{value:1e9,symbol:'B'},{value:1e6,symbol:'M'},{value:1e3,symbol:'K'}]};
4340
4340