@razorpay/blade 7.2.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  import _extends from '@babel/runtime/helpers/extends';
2
2
  import * as React from 'react';
3
3
  import React__default, { useMemo, useCallback, useState, useEffect, useRef, createContext, useContext, Fragment as Fragment$1 } from 'react';
4
+ import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
4
5
  import { Appearance, Platform, View, SectionList, TouchableOpacity, Image, Pressable, AccessibilityInfo, Linking, Dimensions, Keyboard, findNodeHandle } from 'react-native';
5
6
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
6
- import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
7
7
  import Animated, { Easing, Keyframe, useSharedValue, useAnimatedStyle, withTiming, withRepeat, cancelAnimation, interpolate, withSequence, withDelay } from 'react-native-reanimated';
8
8
  import styled, { ThemeProvider } from 'styled-components/native';
9
9
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
@@ -1866,9 +1866,9 @@ var getNative$1 = _getNative,
1866
1866
  root$2 = _root;
1867
1867
 
1868
1868
  /* Built-in method references that are verified to be native. */
1869
- var Set$1 = getNative$1(root$2, 'Set');
1869
+ var Set$2 = getNative$1(root$2, 'Set');
1870
1870
 
1871
- var _Set = Set$1;
1871
+ var _Set = Set$2;
1872
1872
 
1873
1873
  var getNative = _getNative,
1874
1874
  root$1 = _root;
@@ -1881,7 +1881,7 @@ var _WeakMap = WeakMap$1;
1881
1881
  var DataView = _DataView,
1882
1882
  Map = _Map,
1883
1883
  Promise$1 = _Promise,
1884
- Set = _Set,
1884
+ Set$1 = _Set,
1885
1885
  WeakMap = _WeakMap,
1886
1886
  baseGetTag$2 = _baseGetTag,
1887
1887
  toSource = _toSource;
@@ -1899,7 +1899,7 @@ var dataViewTag = '[object DataView]';
1899
1899
  var dataViewCtorString = toSource(DataView),
1900
1900
  mapCtorString = toSource(Map),
1901
1901
  promiseCtorString = toSource(Promise$1),
1902
- setCtorString = toSource(Set),
1902
+ setCtorString = toSource(Set$1),
1903
1903
  weakMapCtorString = toSource(WeakMap);
1904
1904
 
1905
1905
  /**
@@ -1915,7 +1915,7 @@ var getTag$1 = baseGetTag$2;
1915
1915
  if ((DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
1916
1916
  (Map && getTag$1(new Map) != mapTag$1) ||
1917
1917
  (Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag) ||
1918
- (Set && getTag$1(new Set) != setTag$1) ||
1918
+ (Set$1 && getTag$1(new Set$1) != setTag$1) ||
1919
1919
  (WeakMap && getTag$1(new WeakMap) != weakMapTag)) {
1920
1920
  getTag$1 = function(value) {
1921
1921
  var result = baseGetTag$2(value),
@@ -2044,10 +2044,10 @@ var nodeUtil = _nodeUtil.exports;
2044
2044
  /* Node.js helper references. */
2045
2045
  nodeUtil && nodeUtil.isSet;
2046
2046
 
2047
- var metaAttribute=function metaAttribute(_ref){var testID=_ref.testID;return _extends({},testID?{testID:testID}:{});};
2048
-
2049
2047
  var MetaConstants={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',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',VisuallyHidden:'visually-hidden'};
2050
2048
 
2049
+ var metaAttribute=function metaAttribute(_ref){var testID=_ref.testID,name=_ref.name;return _extends({},name?_defineProperty$1({},"data-"+MetaConstants.Component,name):{},testID?{testID:testID}:{});};
2050
+
2051
2051
  var getColorScheme=function getColorScheme(){var colorScheme=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'light';if(colorScheme==='light'||colorScheme==='dark'){return colorScheme;}if(colorScheme==='system'){var _Appearance$getColorS;return (_Appearance$getColorS=Appearance.getColorScheme())!=null?_Appearance$getColorS:'light';}return 'light';};
2052
2052
 
2053
2053
  var baseGetTag$1 = _baseGetTag,
@@ -3233,11 +3233,11 @@ var castWebType=function castWebType(value){return value;};var castNativeType=fu
3233
3233
 
3234
3234
  var assignWithoutSideEffects=function assignWithoutSideEffects(component,sourceObj){return _extends(component,sourceObj);};
3235
3235
 
3236
- var isRoleMenu=function isRoleMenu(dropdownTriggerer){return isReactNative$4()||dropdownTriggerer!=='SelectInput';};var getActionListContainerRole=function getActionListContainerRole(hasFooterAction,dropdownTriggerer){if(hasFooterAction){return 'dialog';}if(isRoleMenu(dropdownTriggerer)){return 'menu';}return 'listbox';};var getActionListSectionRole=function getActionListSectionRole(){if(isReactNative$4()){return undefined;}return 'group';};var getActionListFooterRole=function getActionListFooterRole(){if(isReactNative$4()){return undefined;}return 'group';};var getSeparatorRole=function getSeparatorRole(){if(isReactNative$4()){return undefined;}return 'separator';};var getActionListItemWrapperRole=function getActionListItemWrapperRole(hasFooterAction,dropdownTriggerer){if(isRoleMenu(dropdownTriggerer)){return 'menu';}if(hasFooterAction){return 'listbox';}return undefined;};var getActionListItemRole=function getActionListItemRole(dropdownTriggerer,href,selectionType){if(href){return 'link';}if(isRoleMenu(dropdownTriggerer)){if(selectionType==='multiple'){return 'menuitemcheckbox';}return 'menuitem';}return 'option';};
3236
+ var isRoleMenu=function isRoleMenu(dropdownTriggerer){return isReactNative$4()||dropdownTriggerer!=='SelectInput';};var getActionListContainerRole=function getActionListContainerRole(hasFooterAction,dropdownTriggerer){if(hasFooterAction){return 'dialog';}if(isRoleMenu(dropdownTriggerer)){return 'menu';}return 'listbox';};var getActionListSectionRole=function getActionListSectionRole(){if(isReactNative$4()){return undefined;}return 'group';};var getActionListFooterRole=function getActionListFooterRole(){if(isReactNative$4()){return undefined;}return 'group';};var getSeparatorRole=function getSeparatorRole(){if(isReactNative$4()){return undefined;}return 'separator';};var getActionListItemWrapperRole=function getActionListItemWrapperRole(hasFooterAction,dropdownTriggerer){if(isRoleMenu(dropdownTriggerer)){return undefined;}if(hasFooterAction){return 'listbox';}return undefined;};var getActionListItemRole=function getActionListItemRole(dropdownTriggerer,href,selectionType){if(href){return 'link';}if(isRoleMenu(dropdownTriggerer)){if(selectionType==='multiple'){return 'menuitemcheckbox';}return 'menuitem';}return 'option';};
3237
3237
 
3238
3238
  var componentIds$1={ActionList:'ActionList',ActionListHeader:'ActionListHeader',ActionListHeaderIcon:'ActionListHeaderIcon',ActionListFooter:'ActionListFooter',ActionListFooterIcon:'ActionListFooterIcon',ActionListItem:'ActionListItem',ActionListItemAsset:'ActionListItemAsset',ActionListItemIcon:'ActionListItemIcon',ActionListItemText:'ActionListItemText',ActionListSection:'ActionListSection'};
3239
3239
 
3240
- var getActionListSectionPosition=function getActionListSectionPosition(children){var childComponentIdArray=React__default.Children.toArray(children).map(function(child){return getComponentId(child);});var lastActionListSectionIndex=childComponentIdArray.lastIndexOf(componentIds$1.ActionListSection);var isActionListItemPresentAfterSection=childComponentIdArray.slice(lastActionListSectionIndex).includes(componentIds$1.ActionListItem);return {isActionListItemPresentAfterSection:isActionListItemPresentAfterSection,lastActionListSectionIndex:lastActionListSectionIndex};};var actionListAllowedChildren=[componentIds$1.ActionListFooter,componentIds$1.ActionListHeader,componentIds$1.ActionListItem,componentIds$1.ActionListSection];var getActionListProperties=function getActionListProperties(children){var sectionData=[];var currentSection=null;var actionListOptions=[];var defaultSelectedIndices=[];var actionListHeaderChild=null;var actionListFooterChild=null;var getActionListItemWithId=function getActionListItemWithId(child,hideDivider){if(React__default.isValidElement(child)&&!child.props.isDisabled){actionListOptions.push({title:child.props.title,value:child.props.value,href:child.props.href});var currentIndex=actionListOptions.length-1;var foundSection=sectionData.find(function(v){return v.title===currentSection;});if(foundSection){foundSection==null?void 0:foundSection.data.push(_extends({},child.props,{_index:currentIndex}));}else {sectionData.push({title:currentSection,hideDivider:hideDivider,data:[_extends({},child.props,{_index:currentIndex})]});}if(child.props.isDefaultSelected){defaultSelectedIndices.push(currentIndex);}var clonedChild=React__default.cloneElement(child,{_index:currentIndex});return clonedChild;}return child;};var isActionListItemPresentAfterSection;var lastActionListSectionIndex;if(isReactNative$4()){var _getActionListSection=getActionListSectionPosition(children);isActionListItemPresentAfterSection=_getActionListSection.isActionListItemPresentAfterSection;lastActionListSectionIndex=_getActionListSection.lastActionListSectionIndex;}var childrenWithId=React__default.Children.map(children,function(child,index){if(React__default.isValidElement(child)){if(isValidAllowedChildren(child,componentIds$1.ActionListHeader)){actionListHeaderChild=child;return null;}if(isValidAllowedChildren(child,componentIds$1.ActionListFooter)){actionListFooterChild=child;return null;}if(isValidAllowedChildren(child,componentIds$1.ActionListSection)){var shouldHideDivider=index===lastActionListSectionIndex&&!isActionListItemPresentAfterSection;return React__default.cloneElement(child,{children:React__default.Children.map(child.props.children,function(childInSection){currentSection=child.props.title;if(isValidAllowedChildren(childInSection,componentIds$1.ActionListItem)){return getActionListItemWithId(childInSection,shouldHideDivider);}return childInSection;}),_hideDivider:isReactNative$4()?shouldHideDivider:undefined});}if(isValidAllowedChildren(child,componentIds$1.ActionListItem)){return getActionListItemWithId(child,true);}throw new Error("[ActionList]: Only "+actionListAllowedChildren.join(', ')+" supported inside ActionList");}return child;});return {sectionData:sectionData,childrenWithId:childrenWithId,actionListFooterChild:actionListFooterChild,actionListHeaderChild:actionListHeaderChild,actionListOptions:actionListOptions,defaultSelectedIndices:defaultSelectedIndices};};var validateActionListItemProps=function validateActionListItemProps(_ref){var leading=_ref.leading,trailing=_ref.trailing;React__default.Children.map(trailing,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemText)){throw new Error("[ActionListItem]: Only "+componentIds$1.ActionListItemIcon+" and "+componentIds$1.ActionListItemText+" are allowed in trailing prop");}});React__default.Children.map(leading,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemText)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemAsset)){throw new Error("[ActionListItem]: Only "+componentIds$1.ActionListItemIcon+", "+componentIds$1.ActionListItemAsset+", and "+componentIds$1.ActionListItemText+" are allowed in leading prop");}});};var getNormalTextColor=function getNormalTextColor(isDisabled){var _ref2=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},isMuted=_ref2.isMuted;if(isDisabled){return 'surface.text.placeholder.lowContrast';}if(isMuted){return 'surface.text.muted.lowContrast';}return 'surface.text.normal.lowContrast';};
3240
+ var getActionListSectionPosition=function getActionListSectionPosition(children){var childComponentIdArray=React__default.Children.toArray(children).map(function(child){return getComponentId(child);});var lastActionListSectionIndex=childComponentIdArray.lastIndexOf(componentIds$1.ActionListSection);var isActionListItemPresentAfterSection=childComponentIdArray.slice(lastActionListSectionIndex).includes(componentIds$1.ActionListItem);return {isActionListItemPresentAfterSection:isActionListItemPresentAfterSection,lastActionListSectionIndex:lastActionListSectionIndex};};var actionListAllowedChildren=[componentIds$1.ActionListFooter,componentIds$1.ActionListHeader,componentIds$1.ActionListItem,componentIds$1.ActionListSection];var getActionListProperties=function getActionListProperties(children){var sectionData=[];var currentSection=null;var actionListOptions=[];var actionListHeaderChild=null;var actionListFooterChild=null;var getActionListItemWithId=function getActionListItemWithId(child,hideDivider){if(React__default.isValidElement(child)&&!child.props.isDisabled){actionListOptions.push({title:child.props.title,value:child.props.value,onClickTrigger:function onClickTrigger(value){var _child$props$isSelect;var anchorLink=child.props.href;child.props.onClick==null?void 0:child.props.onClick({name:child.props.value,value:(_child$props$isSelect=child.props.isSelected)!=null?_child$props$isSelect:value});if(anchorLink&&!isReactNative$4()){var _child$props$target;var target=(_child$props$target=child.props.target)!=null?_child$props$target:'_self';window.open(anchorLink,target);if(window.top){window.top.open(anchorLink,target);}}}});var currentIndex=actionListOptions.length-1;var foundSection=sectionData.find(function(v){return v.title===currentSection;});if(foundSection){foundSection==null?void 0:foundSection.data.push(_extends({},child.props,{_index:currentIndex}));}else {sectionData.push({title:currentSection,hideDivider:hideDivider,data:[_extends({},child.props,{_index:currentIndex})]});}var clonedChild=React__default.cloneElement(child,{_index:currentIndex});return clonedChild;}return child;};var isActionListItemPresentAfterSection;var lastActionListSectionIndex;if(isReactNative$4()){var _getActionListSection=getActionListSectionPosition(children);isActionListItemPresentAfterSection=_getActionListSection.isActionListItemPresentAfterSection;lastActionListSectionIndex=_getActionListSection.lastActionListSectionIndex;}var childrenWithId=React__default.Children.map(children,function(child,index){if(React__default.isValidElement(child)){if(isValidAllowedChildren(child,componentIds$1.ActionListHeader)){actionListHeaderChild=child;return null;}if(isValidAllowedChildren(child,componentIds$1.ActionListFooter)){actionListFooterChild=child;return null;}if(isValidAllowedChildren(child,componentIds$1.ActionListSection)){var shouldHideDivider=index===lastActionListSectionIndex&&!isActionListItemPresentAfterSection;return React__default.cloneElement(child,{children:React__default.Children.map(child.props.children,function(childInSection){currentSection=child.props.title;if(isValidAllowedChildren(childInSection,componentIds$1.ActionListItem)){return getActionListItemWithId(childInSection,shouldHideDivider);}return childInSection;}),_hideDivider:isReactNative$4()?shouldHideDivider:undefined});}if(isValidAllowedChildren(child,componentIds$1.ActionListItem)){return getActionListItemWithId(child,true);}throw new Error("[ActionList]: Only "+actionListAllowedChildren.join(', ')+" supported inside ActionList");}return child;});return {sectionData:sectionData,childrenWithId:childrenWithId,actionListFooterChild:actionListFooterChild,actionListHeaderChild:actionListHeaderChild,actionListOptions:actionListOptions};};var validateActionListItemProps=function validateActionListItemProps(_ref){var leading=_ref.leading,trailing=_ref.trailing;React__default.Children.map(trailing,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemText)){throw new Error("[ActionListItem]: Only "+componentIds$1.ActionListItemIcon+" and "+componentIds$1.ActionListItemText+" are allowed in trailing prop");}});React__default.Children.map(leading,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemText)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemAsset)){throw new Error("[ActionListItem]: Only "+componentIds$1.ActionListItemIcon+", "+componentIds$1.ActionListItemAsset+", and "+componentIds$1.ActionListItemText+" are allowed in leading prop");}});};var getNormalTextColor=function getNormalTextColor(isDisabled){var _ref2=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},isMuted=_ref2.isMuted;if(isDisabled){return 'surface.text.placeholder.lowContrast';}if(isMuted){return 'surface.text.muted.lowContrast';}return 'surface.text.normal.lowContrast';};
3241
3241
 
3242
3242
  var getBaseActionListStyles=function getBaseActionListStyles(props){var theme=props.theme,_props$surfaceLevel=props.surfaceLevel,surfaceLevel=_props$surfaceLevel===void 0?2:_props$surfaceLevel,isInBottomSheet=props.isInBottomSheet;var shadowColor=theme.shadows.color.level[1];var elevation200=makeSize(theme.shadows.offsetX.level[1])+" "+makeSize(0)+" "+makeSize(theme.shadows.blurRadius.level[1])+" 0px "+shadowColor+", "+makeSize(theme.shadows.offsetX.level[1])+" "+makeSize(theme.shadows.offsetY.level[2])+" "+makeSize(theme.shadows.blurRadius.level[2])+" 0px "+shadowColor;var backgroundColor=theme.colors.surface.background["level"+surfaceLevel].lowContrast;return {backgroundColor:backgroundColor,borderWidth:isInBottomSheet?undefined:theme.border.width.thin,borderColor:theme.colors.surface.border.normal.lowContrast,borderRadius:makeSize(theme.border.radius.medium),boxShadow:isInBottomSheet||isReactNative$4()?undefined:elevation200};};
3243
3243
 
@@ -3257,11 +3257,11 @@ var getBaseActionListItemStyles=function getBaseActionListItemStyles(props){retu
3257
3257
 
3258
3258
  var StyledActionListItem=styled(TouchableOpacity)(function(props){return _extends({},getBaseActionListItemStyles(props),{backgroundColor:props.isSelected&&props.selectionType==='single'?props.theme.colors.brand.primary[300]:undefined});});
3259
3259
 
3260
- var componentIds={DropdownOverlay:'DropdownOverlay',Dropdown:'Dropdown'};var SelectActions={Close:'Close',CloseSelect:'CloseSelect',First:'First',Last:'Last',Next:'Next',Open:'Open',PageDown:'PageDown',PageUp:'PageUp',Previous:'Previous',Select:'Select',Type:'Type'};function filterOptions(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var filter=arguments.length>1?arguments[1]:undefined;var exclude=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];return options.filter(function(option){var matches=option.toLowerCase().startsWith(filter.toLowerCase());return matches&&!exclude.includes(option);});}function getActionFromKey(e,isOpen){if(!e){return undefined;}var altKey=e.altKey,ctrlKey=e.ctrlKey,metaKey=e.metaKey;var key='';if('key'in e){key=e.key;}var openKeys=['ArrowDown','ArrowUp','Enter',' '];if(!key)return undefined;if(!isOpen&&key&&openKeys.includes(key)){return SelectActions.Open;}if(key==='Home'){return SelectActions.First;}if(key==='End'){return SelectActions.Last;}if(key==='Backspace'||key==='Clear'||key.length===1&&key!==' '&&!altKey&&!ctrlKey&&!metaKey){return SelectActions.Type;}if(isOpen){if(key==='ArrowUp'&&altKey){return SelectActions.CloseSelect;}else if(key==='ArrowDown'&&!altKey){return SelectActions.Next;}else if(key==='ArrowUp'){return SelectActions.Previous;}else if(key==='PageUp'){return SelectActions.PageUp;}else if(key==='PageDown'){return SelectActions.PageDown;}else if(key==='Escape'){return SelectActions.Close;}else if(key==='Enter'||key===' '){return SelectActions.CloseSelect;}}return undefined;}function getIndexByLetter(options,filter){var startIndex=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var orderedOptions=[].concat(_toConsumableArray(options.slice(startIndex)),_toConsumableArray(options.slice(0,startIndex)));var firstMatch=filterOptions(orderedOptions,filter)[0];var allSameLetter=function allSameLetter(array){return array.every(function(letter){return letter===array[0];});};if(firstMatch){return options.indexOf(firstMatch);}else if(allSameLetter(filter.split(''))){var matches=filterOptions(orderedOptions,filter[0]);return options.indexOf(matches[0]);}else {return -1;}}function getUpdatedIndex(currentIndex,maxIndex,action){var pageSize=10;switch(action){case SelectActions.First:return 0;case SelectActions.Last:return maxIndex;case SelectActions.Previous:return Math.max(0,currentIndex-1);case SelectActions.Next:return Math.min(maxIndex,currentIndex+1);case SelectActions.PageUp:return Math.max(0,currentIndex-pageSize);case SelectActions.PageDown:return Math.min(maxIndex,currentIndex+pageSize);default:return currentIndex;}}function isElementVisibleOnScreen(element){var bounding=element.getBoundingClientRect();return bounding.top>=0&&bounding.left>=0&&bounding.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&bounding.right<=(window.innerWidth||document.documentElement.clientWidth);}function isScrollable(element){return element&&element.clientHeight<element.scrollHeight;}var performAction=function performAction(action,e,actions){var event=e.event;switch(action){case SelectActions.Last:case SelectActions.First:actions.setIsOpen(true);case SelectActions.Next:case SelectActions.Previous:case SelectActions.PageUp:case SelectActions.PageDown:event.preventDefault();actions.onOptionChange(action);return true;case SelectActions.CloseSelect:event.preventDefault();actions.selectCurrentOption();return true;case SelectActions.Close:event.preventDefault();actions.setIsOpen(false);return true;case SelectActions.Type:actions.onComboType(event.key,action);return true;case SelectActions.Open:event.preventDefault();actions.setIsOpen(true);return true;}return false;};var ensureScrollVisiblity=function ensureScrollVisiblity(newActiveIndex,containerElement,options){if(containerElement){if(isScrollable(containerElement)){var optionEl=containerElement.querySelectorAll('[role="option"]');if(newActiveIndex>=0&&optionEl[newActiveIndex].dataset.value===options[newActiveIndex]){var activeElement=optionEl[newActiveIndex];var bodyRect=containerElement.getBoundingClientRect().top;var elementRect=activeElement.getBoundingClientRect().top;var elementPosition=elementRect-bodyRect;var offsetPosition=elementPosition;containerElement.scrollTo({top:offsetPosition});if(!isElementVisibleOnScreen(optionEl[newActiveIndex])){activeElement.scrollIntoView({behavior:'smooth'});}}}}};var makeInputValue=function makeInputValue(selectedIndices,options){if(options.length===0){return '';}return selectedIndices.map(function(selectedIndex){var _options$selectedInde;return (_options$selectedInde=options[selectedIndex])==null?void 0:_options$selectedInde.value;}).join(', ');};var makeInputDisplayValue=function makeInputDisplayValue(selectedIndices,options){if(options.length===0||selectedIndices.length===0){return '';}if(selectedIndices.length===1){return options[selectedIndices[0]].title;}return selectedIndices.length+" items selected";};
3260
+ var componentIds={DropdownOverlay:'DropdownOverlay',Dropdown:'Dropdown',triggers:{SelectInput:'SelectInput',DropdownButton:'DropdownButton'}};var SelectActions={Close:'Close',CloseSelect:'CloseSelect',First:'First',Last:'Last',Next:'Next',Open:'Open',PageDown:'PageDown',PageUp:'PageUp',Previous:'Previous',Select:'Select',Type:'Type'};function filterOptions(){var options=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var filter=arguments.length>1?arguments[1]:undefined;var exclude=arguments.length>2&&arguments[2]!==undefined?arguments[2]:[];return options.filter(function(option){var matches=option.toLowerCase().startsWith(filter.toLowerCase());return matches&&!exclude.includes(option);});}function getActionFromKey(e,isOpen){if(!e){return undefined;}var altKey=e.altKey,ctrlKey=e.ctrlKey,metaKey=e.metaKey;var key='';if('key'in e){key=e.key;}var openKeys=['ArrowDown','ArrowUp','Enter',' '];if(!key)return undefined;if(!isOpen&&key&&openKeys.includes(key)){return SelectActions.Open;}if(key==='Home'){return SelectActions.First;}if(key==='End'){return SelectActions.Last;}if(key==='Backspace'||key==='Clear'||key.length===1&&key!==' '&&!altKey&&!ctrlKey&&!metaKey){return SelectActions.Type;}if(isOpen){if(key==='ArrowUp'&&altKey){return SelectActions.CloseSelect;}else if(key==='ArrowDown'&&!altKey){return SelectActions.Next;}else if(key==='ArrowUp'){return SelectActions.Previous;}else if(key==='PageUp'){return SelectActions.PageUp;}else if(key==='PageDown'){return SelectActions.PageDown;}else if(key==='Escape'){return SelectActions.Close;}else if(key==='Enter'||key===' '){return SelectActions.CloseSelect;}}return undefined;}function getIndexByLetter(options,filter){var startIndex=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var orderedOptions=[].concat(_toConsumableArray(options.slice(startIndex)),_toConsumableArray(options.slice(0,startIndex)));var firstMatch=filterOptions(orderedOptions,filter)[0];var allSameLetter=function allSameLetter(array){return array.every(function(letter){return letter===array[0];});};if(firstMatch){return options.indexOf(firstMatch);}else if(allSameLetter(filter.split(''))){var matches=filterOptions(orderedOptions,filter[0]);return options.indexOf(matches[0]);}else {return -1;}}function getUpdatedIndex(currentIndex,maxIndex,action){var pageSize=10;switch(action){case SelectActions.First:return 0;case SelectActions.Last:return maxIndex;case SelectActions.Previous:return Math.max(0,currentIndex-1);case SelectActions.Next:return Math.min(maxIndex,currentIndex+1);case SelectActions.PageUp:return Math.max(0,currentIndex-pageSize);case SelectActions.PageDown:return Math.min(maxIndex,currentIndex+pageSize);default:return currentIndex;}}function isElementVisibleOnScreen(element){var bounding=element.getBoundingClientRect();return bounding.top>=0&&bounding.left>=0&&bounding.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&bounding.right<=(window.innerWidth||document.documentElement.clientWidth);}function isScrollable(element){return element&&element.clientHeight<element.scrollHeight;}var performAction=function performAction(action,payload,actions){var event=payload.event;switch(action){case SelectActions.Last:case SelectActions.First:actions.setIsOpen(true);case SelectActions.Next:case SelectActions.Previous:case SelectActions.PageUp:case SelectActions.PageDown:event.preventDefault();actions.onOptionChange(action);return true;case SelectActions.CloseSelect:event.preventDefault();actions.selectCurrentOption();return true;case SelectActions.Close:event.preventDefault();actions.close();return true;case SelectActions.Type:actions.onComboType(event.key,action);return true;case SelectActions.Open:event.preventDefault();actions.setIsOpen(true);return true;}return false;};var ensureScrollVisiblity=function ensureScrollVisiblity(newActiveIndex,containerElement,options){if(containerElement){if(isScrollable(containerElement)){var optionEl=containerElement.querySelectorAll('[role="option"]');if(newActiveIndex>=0&&optionEl[newActiveIndex].dataset.value===options[newActiveIndex]){var activeElement=optionEl[newActiveIndex];var bodyRect=containerElement.getBoundingClientRect().top;var elementRect=activeElement.getBoundingClientRect().top;var elementPosition=elementRect-bodyRect;var offsetPosition=elementPosition;containerElement.scrollTo({top:offsetPosition});if(!isElementVisibleOnScreen(optionEl[newActiveIndex])){activeElement.scrollIntoView({behavior:'smooth'});}}}}};var makeInputValue=function makeInputValue(selectedIndices,options){if(options.length===0){return '';}return selectedIndices.map(function(selectedIndex){var _options$selectedInde;return (_options$selectedInde=options[selectedIndex])==null?void 0:_options$selectedInde.value;}).join(', ');};var makeInputDisplayValue=function makeInputDisplayValue(selectedIndices,options){if(options.length===0||selectedIndices.length===0){return '';}if(selectedIndices.length===1){return options[selectedIndices[0]].title;}return selectedIndices.length+" items selected";};
3261
3261
 
3262
3262
  var BottomSheetContext=React__default.createContext({headerHeight:0,contentHeight:0,footerHeight:0,setContentHeight:function setContentHeight(){},setHeaderHeight:function setHeaderHeight(){},setFooterHeight:function setFooterHeight(){},close:function close(){},scrollRef:null,bind:null,isOpen:false,positionY:0,isInBottomSheet:false,defaultInitialFocusRef:{current:null}});var useBottomSheetContext=function useBottomSheetContext(){var state=React__default.useContext(BottomSheetContext);return state;};var BottomSheetAndDropdownGlueContext=React__default.createContext(null);var useBottomSheetAndDropdownGlue=function useBottomSheetAndDropdownGlue(){var state=React__default.useContext(BottomSheetAndDropdownGlueContext);return state;};
3263
3263
 
3264
- var _excluded$4O=["isOpen","setIsOpen","selectedIndices","setSelectedIndices","activeIndex","setActiveIndex","shouldIgnoreBlur","setShouldIgnoreBlur","isKeydownPressed","setIsKeydownPressed","options","selectionType"];var noop=function noop(){};var DropdownContext=React__default.createContext({isOpen:false,setIsOpen:noop,selectedIndices:[],setSelectedIndices:noop,options:[],setOptions:noop,activeIndex:-1,setActiveIndex:noop,shouldIgnoreBlur:false,setShouldIgnoreBlur:noop,shouldIgnoreBlurAnimation:false,setShouldIgnoreBlurAnimation:noop,hasFooterAction:false,setHasFooterAction:noop,hasLabelOnLeft:false,setHasLabelOnLeft:noop,isKeydownPressed:false,setIsKeydownPressed:noop,dropdownBaseId:'',actionListItemRef:{current:null},triggererRef:{current:null}});var searchTimeout;var searchString='';var useDropdown=function useDropdown(){var _React$useContext=React__default.useContext(DropdownContext),isOpen=_React$useContext.isOpen,setIsOpen=_React$useContext.setIsOpen,selectedIndices=_React$useContext.selectedIndices,setSelectedIndices=_React$useContext.setSelectedIndices,activeIndex=_React$useContext.activeIndex,setActiveIndex=_React$useContext.setActiveIndex,shouldIgnoreBlur=_React$useContext.shouldIgnoreBlur,setShouldIgnoreBlur=_React$useContext.setShouldIgnoreBlur,isKeydownPressed=_React$useContext.isKeydownPressed,setIsKeydownPressed=_React$useContext.setIsKeydownPressed,options=_React$useContext.options,selectionType=_React$useContext.selectionType,rest=_objectWithoutProperties(_React$useContext,_excluded$4O);var bottomSheetAndDropdownGlue=useBottomSheetAndDropdownGlue();var selectOption=function selectOption(index){var properties=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{closeOnSelection:true};if(index<0||index>options.length-1){return;}if(selectionType==='multiple'){if(selectedIndices.includes(index)){var existingItemIndex=selectedIndices.indexOf(index);setSelectedIndices([].concat(_toConsumableArray(selectedIndices.slice(0,existingItemIndex)),_toConsumableArray(selectedIndices.slice(existingItemIndex+1))));}else {setSelectedIndices([].concat(_toConsumableArray(selectedIndices),[index]));}}else {setSelectedIndices([index]);}if(activeIndex!==index){setActiveIndex(index);}if(properties!=null&&properties.closeOnSelection&&selectionType!=='multiple'){setIsOpen(false);}};var onTriggerClick=function onTriggerClick(){setIsOpen(!isOpen);};var onTriggerBlur=function onTriggerBlur(_ref){var name=_ref.name,value=_ref.value,onBlurCallback=_ref.onBlurCallback;if(rest.hasFooterAction){setActiveIndex(-1);}if(bottomSheetAndDropdownGlue!=null&&bottomSheetAndDropdownGlue.dropdownHasBottomSheet){setShouldIgnoreBlur(true);return;}if(shouldIgnoreBlur){setShouldIgnoreBlur(false);return;}onBlurCallback==null?void 0:onBlurCallback({name:name,value:value});if(isOpen){if(selectionType!=='multiple'){selectOption(activeIndex);}if(!(bottomSheetAndDropdownGlue!=null&&bottomSheetAndDropdownGlue.dropdownHasBottomSheet)){setIsOpen(false);}}};var onOptionChange=function onOptionChange(actionType,index){var max=options.length-1;var newIndex=index!=null?index:activeIndex;setActiveIndex(getUpdatedIndex(newIndex,max,actionType));var optionValues=options.map(function(option){return option.value;});ensureScrollVisiblity(newIndex,rest.actionListItemRef.current,optionValues);};var onOptionClick=function onOptionClick(e,index){var actionType=getActionFromKey(e,isOpen);if(typeof actionType==='number'){onOptionChange(actionType,index);}selectOption(index);if(!isReactNative$4()){var _rest$triggererRef$cu;(_rest$triggererRef$cu=rest.triggererRef.current)==null?void 0:_rest$triggererRef$cu.focus();}};var onComboType=function onComboType(letter,actionType){setIsOpen(true);if(typeof searchTimeout==='number'){window.clearTimeout(searchTimeout);}searchTimeout=window.setTimeout(function(){searchString='';},500);searchString=searchString+letter;var optionTitles=options.map(function(option){return option.title;});var searchIndex=getIndexByLetter(optionTitles,searchString,activeIndex+1);if(searchIndex>=0){onOptionChange(actionType,searchIndex);}else {window.clearTimeout(searchTimeout);searchString='';}};var onTriggerKeydown=function onTriggerKeydown(e){if(e.event.key==='Tab'&&rest.hasFooterAction){setShouldIgnoreBlur(true);}if(bottomSheetAndDropdownGlue!=null&&bottomSheetAndDropdownGlue.dropdownHasBottomSheet){setShouldIgnoreBlur(true);}if(!isKeydownPressed&&![' ','Enter','Escape','Meta'].includes(e.event.key)){setIsKeydownPressed(true);}var actionType=getActionFromKey(e.event,isOpen);if(actionType){performAction(actionType,e,{setIsOpen:setIsOpen,onOptionChange:onOptionChange,onComboType:onComboType,selectCurrentOption:function selectCurrentOption(){var _options$activeIndex;selectOption(activeIndex);if(rest.hasFooterAction&&!isReactNative$4()){var _rest$triggererRef$cu2;(_rest$triggererRef$cu2=rest.triggererRef.current)==null?void 0:_rest$triggererRef$cu2.focus();}var anchorLink=(_options$activeIndex=options[activeIndex])==null?void 0:_options$activeIndex.href;if(anchorLink){window.location.href=anchorLink;if(window.top){window.top.location.href=anchorLink;}}}});}};return _extends({isOpen:isOpen,setIsOpen:setIsOpen,selectedIndices:selectedIndices,setSelectedIndices:setSelectedIndices,onTriggerClick:onTriggerClick,onTriggerKeydown:onTriggerKeydown,onTriggerBlur:onTriggerBlur,onOptionClick:onOptionClick,activeIndex:activeIndex,setActiveIndex:setActiveIndex,shouldIgnoreBlur:shouldIgnoreBlur,setShouldIgnoreBlur:setShouldIgnoreBlur,isKeydownPressed:isKeydownPressed,setIsKeydownPressed:setIsKeydownPressed,options:options,value:makeInputValue(selectedIndices,options),displayValue:makeInputDisplayValue(selectedIndices,options),selectionType:selectionType},rest);};
3264
+ var _excluded$4O=["isOpen","setIsOpen","close","selectedIndices","setSelectedIndices","activeIndex","setActiveIndex","shouldIgnoreBlur","setShouldIgnoreBlur","isKeydownPressed","setIsKeydownPressed","options","selectionType","changeCallbackTriggerer","setChangeCallbackTriggerer","isControlled","setControlledValueIndices"];var noop=function noop(){};var DropdownContext=React__default.createContext({isOpen:false,setIsOpen:noop,close:noop,selectedIndices:[],setSelectedIndices:noop,controlledValueIndices:[],setControlledValueIndices:noop,options:[],setOptions:noop,activeIndex:-1,setActiveIndex:noop,shouldIgnoreBlur:false,setShouldIgnoreBlur:noop,shouldIgnoreBlurAnimation:false,setShouldIgnoreBlurAnimation:noop,hasFooterAction:false,setHasFooterAction:noop,hasLabelOnLeft:false,setHasLabelOnLeft:noop,isKeydownPressed:false,setIsKeydownPressed:noop,changeCallbackTriggerer:0,setChangeCallbackTriggerer:noop,isControlled:false,setIsControlled:noop,dropdownBaseId:'',actionListItemRef:{current:null},triggererRef:{current:null}});var searchTimeout;var searchString='';var useDropdown=function useDropdown(){var _React$useContext=React__default.useContext(DropdownContext),isOpen=_React$useContext.isOpen,setIsOpen=_React$useContext.setIsOpen,close=_React$useContext.close,selectedIndices=_React$useContext.selectedIndices,setSelectedIndices=_React$useContext.setSelectedIndices,activeIndex=_React$useContext.activeIndex,setActiveIndex=_React$useContext.setActiveIndex,shouldIgnoreBlur=_React$useContext.shouldIgnoreBlur,setShouldIgnoreBlur=_React$useContext.setShouldIgnoreBlur,isKeydownPressed=_React$useContext.isKeydownPressed,setIsKeydownPressed=_React$useContext.setIsKeydownPressed,options=_React$useContext.options,selectionType=_React$useContext.selectionType,changeCallbackTriggerer=_React$useContext.changeCallbackTriggerer,setChangeCallbackTriggerer=_React$useContext.setChangeCallbackTriggerer,isControlled=_React$useContext.isControlled,setControlledValueIndices=_React$useContext.setControlledValueIndices,rest=_objectWithoutProperties(_React$useContext,_excluded$4O);var bottomSheetAndDropdownGlue=useBottomSheetAndDropdownGlue();var setIndices=function setIndices(indices){if(isControlled){setControlledValueIndices(indices);}else {setSelectedIndices(indices);}};var selectOption=function selectOption(index){var properties=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{closeOnSelection:true};var isSelected=false;if(index<0||index>options.length-1){return isSelected;}if(selectionType==='multiple'){if(selectedIndices.includes(index)){var existingItemIndex=selectedIndices.indexOf(index);setIndices([].concat(_toConsumableArray(selectedIndices.slice(0,existingItemIndex)),_toConsumableArray(selectedIndices.slice(existingItemIndex+1))));isSelected=false;}else {setIndices([].concat(_toConsumableArray(selectedIndices),[index]));isSelected=true;}}else {setIndices([index]);isSelected=true;}setChangeCallbackTriggerer(changeCallbackTriggerer+1);if(activeIndex!==index){setActiveIndex(index);}if(properties!=null&&properties.closeOnSelection&&selectionType!=='multiple'){close();}return isSelected;};var onTriggerClick=function onTriggerClick(){if(isOpen){close();}else {setIsOpen(true);}};var onTriggerBlur=function onTriggerBlur(_ref){var name=_ref.name,value=_ref.value,onBlurCallback=_ref.onBlurCallback;if(rest.hasFooterAction){setActiveIndex(-1);}if(bottomSheetAndDropdownGlue!=null&&bottomSheetAndDropdownGlue.dropdownHasBottomSheet){setShouldIgnoreBlur(true);return;}if(shouldIgnoreBlur){setShouldIgnoreBlur(false);return;}onBlurCallback==null?void 0:onBlurCallback({name:name,value:value});if(isOpen){if(selectionType!=='multiple'){selectOption(activeIndex);}if(!(bottomSheetAndDropdownGlue!=null&&bottomSheetAndDropdownGlue.dropdownHasBottomSheet)){close();}}};var onOptionChange=function onOptionChange(actionType,index){var max=options.length-1;var newIndex=index!=null?index:activeIndex;setActiveIndex(getUpdatedIndex(newIndex,max,actionType));var optionValues=options.map(function(option){return option.value;});ensureScrollVisiblity(newIndex,rest.actionListItemRef.current,optionValues);};var onOptionClick=function onOptionClick(e,index){var actionType=getActionFromKey(e,isOpen);if(typeof actionType==='number'){onOptionChange(actionType,index);}selectOption(index);if(!isReactNative$4()){var _rest$triggererRef$cu;(_rest$triggererRef$cu=rest.triggererRef.current)==null?void 0:_rest$triggererRef$cu.focus();}};var onComboType=function onComboType(letter,actionType){setIsOpen(true);if(typeof searchTimeout==='number'){window.clearTimeout(searchTimeout);}searchTimeout=window.setTimeout(function(){searchString='';},500);searchString=searchString+letter;var optionTitles=options.map(function(option){return option.title;});var searchIndex=getIndexByLetter(optionTitles,searchString,activeIndex+1);if(searchIndex>=0){onOptionChange(actionType,searchIndex);}else {window.clearTimeout(searchTimeout);searchString='';}};var onTriggerKeydown=function onTriggerKeydown(e){if(e.event.key==='Tab'&&rest.hasFooterAction){setShouldIgnoreBlur(true);}if(bottomSheetAndDropdownGlue!=null&&bottomSheetAndDropdownGlue.dropdownHasBottomSheet){setShouldIgnoreBlur(true);}if(!isKeydownPressed&&![' ','Enter','Escape','Meta'].includes(e.event.key)){setIsKeydownPressed(true);}var actionType=getActionFromKey(e.event,isOpen);if(actionType){performAction(actionType,e,{setIsOpen:setIsOpen,close:close,onOptionChange:onOptionChange,onComboType:onComboType,selectCurrentOption:function selectCurrentOption(){var _options$activeIndex$,_options$activeIndex;var isSelected=selectOption(activeIndex);if(rest.hasFooterAction&&!isReactNative$4()){var _rest$triggererRef$cu2;(_rest$triggererRef$cu2=rest.triggererRef.current)==null?void 0:_rest$triggererRef$cu2.focus();}(_options$activeIndex$=(_options$activeIndex=options[activeIndex]).onClickTrigger)==null?void 0:_options$activeIndex$.call(_options$activeIndex,isSelected);}});}};return _extends({isOpen:isOpen,setIsOpen:setIsOpen,close:close,selectedIndices:selectedIndices,setSelectedIndices:setSelectedIndices,setControlledValueIndices:setControlledValueIndices,onTriggerClick:onTriggerClick,onTriggerKeydown:onTriggerKeydown,onTriggerBlur:onTriggerBlur,onOptionClick:onOptionClick,activeIndex:activeIndex,setActiveIndex:setActiveIndex,shouldIgnoreBlur:shouldIgnoreBlur,setShouldIgnoreBlur:setShouldIgnoreBlur,isKeydownPressed:isKeydownPressed,setIsKeydownPressed:setIsKeydownPressed,changeCallbackTriggerer:changeCallbackTriggerer,setChangeCallbackTriggerer:setChangeCallbackTriggerer,isControlled:isControlled,options:options,value:makeInputValue(selectedIndices,options),displayValue:makeInputDisplayValue(selectedIndices,options),selectionType:selectionType},rest);};
3265
3265
 
3266
3266
  var getBaseTextStyles=function getBaseTextStyles(_ref){var _ref$color=_ref.color,color=_ref$color===void 0?'surface.text.normal.lowContrast':_ref$color,_ref$fontFamily=_ref.fontFamily,fontFamily=_ref$fontFamily===void 0?'text':_ref$fontFamily,_ref$fontSize=_ref.fontSize,fontSize=_ref$fontSize===void 0?200:_ref$fontSize,_ref$fontWeight=_ref.fontWeight,fontWeight=_ref$fontWeight===void 0?'regular':_ref$fontWeight,_ref$fontStyle=_ref.fontStyle,fontStyle=_ref$fontStyle===void 0?'normal':_ref$fontStyle,_ref$textDecorationLi=_ref.textDecorationLine,textDecorationLine=_ref$textDecorationLi===void 0?'none':_ref$textDecorationLi,_ref$lineHeight=_ref.lineHeight,lineHeight=_ref$lineHeight===void 0?100:_ref$lineHeight,textAlign=_ref.textAlign,theme=_ref.theme;var textColor=get_1(theme.colors,color);var themeFontFamily=theme.typography.fonts.family[fontFamily];var themeFontSize=makeTypographySize(theme.typography.fonts.size[fontSize]);var themeFontWeight=theme.typography.fonts.weight[fontWeight];var themeLineHeight=makeTypographySize(theme.typography.lineHeights[lineHeight]);return {color:textColor,fontFamily:themeFontFamily,fontSize:themeFontSize,fontWeight:themeFontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,lineHeight:themeLineHeight,textAlign:textAlign,margin:0,padding:0};};
3267
3267
 
@@ -3919,15 +3919,15 @@ var SelectorGroupField=function SelectorGroupField(_ref){var children=_ref.child
3919
3919
 
3920
3920
  var _excluded$r=["children","label","helpText","isDisabled","necessityIndicator","labelPosition","validationState","errorText","name","defaultValue","onChange","value","size","testID"];var CheckboxGroup=function CheckboxGroup(_ref){var children=_ref.children,label=_ref.label,helpText=_ref.helpText,isDisabled=_ref.isDisabled,_ref$necessityIndicat=_ref.necessityIndicator,necessityIndicator=_ref$necessityIndicat===void 0?'none':_ref$necessityIndicat,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,validationState=_ref.validationState,errorText=_ref.errorText,name=_ref.name,defaultValue=_ref.defaultValue,onChange=_ref.onChange,value=_ref.value,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$r);var _useCheckboxGroup=useCheckboxGroup({defaultValue:defaultValue,onChange:onChange,value:value,isDisabled:isDisabled,name:name,labelPosition:labelPosition,validationState:validationState,size:size}),contextValue=_useCheckboxGroup.contextValue,ids=_useCheckboxGroup.ids;var _useTheme=useTheme(),theme=_useTheme.theme;var showError=validationState==='error'&&errorText;var showHelpText=!showError&&helpText;var accessibilityText=","+(showError?errorText:'')+" "+(showHelpText?helpText:'');var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var gap=checkboxSizes.group.gap[size][matchedDeviceType];var childCount=React__default.Children.count(children);return jsx(CheckboxGroupProvider,{value:contextValue,children:jsx(BaseBox,_extends({},getStyledProps(styledProps),{children:jsxs(SelectorGroupField,{position:labelPosition,labelledBy:ids.labelId,componentName:"checkbox-group",testID:testID,children:[jsx(FormLabel,{as:"span",necessityIndicator:necessityIndicator,position:labelPosition,id:ids.labelId,accessibilityText:accessibilityText,children:label}),jsxs(BaseBox,{children:[jsx(BaseBox,{display:"flex",flexDirection:"column",children:React__default.Children.map(children,function(child,index){return jsx(BaseBox,{marginBottom:index===childCount-1?makeSize(0):gap,children:child},index);})}),jsx(FormHint,{errorText:errorText,helpText:helpText,type:validationState==='error'?'error':'help'})]})]})}))});};
3921
3921
 
3922
- var ActionListItemContext=React__default.createContext({});var StyledSectionDivider=styled(BaseBox)(function(props){return {height:makeSize(size[1]),backgroundColor:props.theme.colors.surface.border.normal.lowContrast,margin:makeSize(props.theme.spacing[1])+" "+makeSize(props.theme.spacing[3])};});var ActionListSectionDivider=function ActionListSectionDivider(){return jsx(StyledSectionDivider,_extends({},makeAccessible({role:getSeparatorRole()})));};var StyledActionListSectionTitle=styled(BaseBox)(function(props){return {padding:makeSize(props.theme.spacing[3])};});var _ActionListSection=function _ActionListSection(_ref){var title=_ref.title,children=_ref.children,testID=_ref.testID,_hideDivider=_ref._hideDivider;var _useActionListContext=useActionListContext(),surfaceLevel=_useActionListContext.surfaceLevel;return jsxs(BaseBox,_extends({},makeAccessible({role:getActionListSectionRole(),label:title}),{backgroundColor:"surface.background.level"+surfaceLevel+".lowContrast"},metaAttribute({name:MetaConstants.ActionListSection,testID:testID}),{children:[jsx(StyledActionListSectionTitle,_extends({},makeAccessible({hidden:true}),{children:jsx(Text,{color:"surface.text.muted.lowContrast",size:"small",weight:"bold",children:title})})),jsx(BaseBox,_extends({},makeAccessible({role:isReactNative$4()?undefined:'listbox'}),{children:children})),_hideDivider&&isReactNative$4()?null:jsx(ActionListSectionDivider,{})]}));};var ActionListSection=assignWithoutSideEffects(_ActionListSection,{componentId:componentIds$1.ActionListSection});var _ActionListItemIcon=function _ActionListItemIcon(_ref2){var icon=_ref2.icon;var Icon=icon;var _React$useContext=React__default.useContext(ActionListItemContext),intent=_React$useContext.intent,isDisabled=_React$useContext.isDisabled;return jsx(Icon,{color:intent==='negative'?'feedback.icon.negative.lowContrast':getNormalTextColor(isDisabled,{isMuted:true}),size:"medium"});};var ActionListItemIcon=assignWithoutSideEffects(_ActionListItemIcon,{componentId:componentIds$1.ActionListItemIcon});var _ActionListItemText=function _ActionListItemText(_ref3){var children=_ref3.children;var _React$useContext2=React__default.useContext(ActionListItemContext),isDisabled=_React$useContext2.isDisabled;return jsx(Text,{variant:"caption",color:getNormalTextColor(isDisabled,{isMuted:true}),children:children});};var ActionListItemText=assignWithoutSideEffects(_ActionListItemText,{componentId:componentIds$1.ActionListItemText});var ActionListCheckboxWrapper=styled(BaseBox)(function(_props){return {pointerEvents:'none'};});var makeActionListItemClickable=function makeActionListItemClickable(clickHandler){if(isReactNative$4()){return {onPress:clickHandler};}return {onClick:clickHandler};};var _ActionListItemBody=function _ActionListItemBody(_ref4){var selectionType=_ref4.selectionType,intent=_ref4.intent,description=_ref4.description,isDisabled=_ref4.isDisabled,leading=_ref4.leading,trailing=_ref4.trailing,title=_ref4.title,isSelected=_ref4.isSelected;return jsxs(Fragment,{children:[jsxs(BaseBox,{display:"flex",justifyContent:"center",flexDirection:"row",alignItems:"center",maxHeight:isReactNative$4()?undefined:makeSize(size[20]),children:[jsx(BaseBox,{display:"flex",justifyContent:"center",alignItems:"center",children:selectionType==='multiple'?jsx(ActionListCheckboxWrapper,_extends({hasDescription:Boolean(description)},makeAccessible({hidden:true}),{children:jsx(Checkbox,{isChecked:isSelected,tabIndex:-1,isDisabled:isDisabled,children:null})})):leading}),jsx(BaseBox,{paddingLeft:selectionType==='multiple'||!leading?'spacing.0':'spacing.3',paddingRight:"spacing.3",children:jsx(Text,{truncateAfterLines:1,color:intent==='negative'?'feedback.text.negative.lowContrast':getNormalTextColor(isDisabled),children:title})}),jsx(BaseBox,{marginLeft:"auto",children:trailing})]}),jsx(BaseBox,{paddingLeft:leading||selectionType==='multiple'?'spacing.7':undefined,children:description?jsx(Text,{color:getNormalTextColor(isDisabled,{isMuted:true}),size:"small",children:description}):null})]});};var ActionListItemBody=React__default.memo(_ActionListItemBody);var _ActionListItem=function _ActionListItem(props){var _useDropdown=useDropdown(),activeIndex=_useDropdown.activeIndex,dropdownBaseId=_useDropdown.dropdownBaseId,onOptionClick=_useDropdown.onOptionClick,selectedIndices=_useDropdown.selectedIndices,setShouldIgnoreBlur=_useDropdown.setShouldIgnoreBlur,setShouldIgnoreBlurAnimation=_useDropdown.setShouldIgnoreBlurAnimation,selectionType=_useDropdown.selectionType,dropdownTriggerer=_useDropdown.dropdownTriggerer,isKeydownPressed=_useDropdown.isKeydownPressed;var _useTheme=useTheme(),platform=_useTheme.platform;var isMobile=platform==='onMobile';var renderOnWebAs=props.href?'a':'button';var isSelected=typeof props._index==='number'?selectedIndices.includes(props._index):props.isDefaultSelected;React__default.useEffect(function(){validateActionListItemProps({leading:props.leading,trailing:props.trailing});},[props.leading,props.trailing]);React__default.useEffect(function(){if(dropdownTriggerer==='SelectInput'&&props.intent==='negative'){throw new Error('[ActionListItem]: negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger');}},[props.intent,dropdownTriggerer]);return jsx(ActionListItemContext.Provider,{value:{intent:props.intent,isDisabled:props.isDisabled},children:jsx(StyledActionListItem,_extends({as:!isReactNative$4()?renderOnWebAs:undefined,id:dropdownBaseId+"-"+props._index,type:"button",tabIndex:-1,href:props.href,className:activeIndex===props._index?'active-focus':''},makeAccessible({selected:isSelected,current:isRoleMenu(dropdownTriggerer)?isSelected:undefined,role:getActionListItemRole(dropdownTriggerer,props.href),disabled:props.isDisabled}),makeActionListItemClickable(function(e){if(typeof props._index==='number'){onOptionClick(e,props._index);}props.onClick==null?void 0:props.onClick({name:props.value,value:isSelected});}),metaAttribute({name:MetaConstants.ActionListItem,testID:props.testID}),{onMouseDown:function onMouseDown(){setShouldIgnoreBlur(true);setShouldIgnoreBlurAnimation(true);},onMouseUp:function onMouseUp(){setShouldIgnoreBlurAnimation(false);},"data-value":props.value,"data-index":props._index,selectionType:selectionType,hasDescription:Boolean(props.description),intent:props.intent,isSelected:isSelected,isKeydownPressed:isKeydownPressed,isMobile:isMobile,children:jsx(ActionListItemBody,{selectionType:selectionType,intent:props.intent,description:props.description,isDisabled:props.isDisabled,leading:props.leading,trailing:props.trailing,title:props.title,isSelected:isSelected})}))});};var ActionListItem=assignWithoutSideEffects(React__default.memo(_ActionListItem),{componentId:componentIds$1.ActionListItem});
3922
+ var ActionListItemContext=React__default.createContext({});var StyledSectionDivider=styled(BaseBox)(function(props){return {height:makeSize(size[1]),backgroundColor:props.theme.colors.surface.border.normal.lowContrast,margin:makeSize(props.theme.spacing[1])+" "+makeSize(props.theme.spacing[3])};});var ActionListSectionDivider=function ActionListSectionDivider(){return jsx(StyledSectionDivider,_extends({},makeAccessible({role:getSeparatorRole()})));};var StyledActionListSectionTitle=styled(BaseBox)(function(props){return {padding:makeSize(props.theme.spacing[3])};});var _ActionListSection=function _ActionListSection(_ref){var title=_ref.title,children=_ref.children,testID=_ref.testID,_hideDivider=_ref._hideDivider;var _useActionListContext=useActionListContext(),surfaceLevel=_useActionListContext.surfaceLevel;return jsxs(BaseBox,_extends({},makeAccessible({role:getActionListSectionRole(),label:title}),{backgroundColor:"surface.background.level"+surfaceLevel+".lowContrast"},metaAttribute({name:MetaConstants.ActionListSection,testID:testID}),{children:[jsx(StyledActionListSectionTitle,_extends({},makeAccessible({hidden:true}),{children:jsx(Text,{color:"surface.text.muted.lowContrast",size:"small",weight:"bold",children:title})})),jsx(BaseBox,_extends({},makeAccessible({role:isReactNative$4()?undefined:'listbox'}),{children:children})),_hideDivider&&isReactNative$4()?null:jsx(ActionListSectionDivider,{})]}));};var ActionListSection=assignWithoutSideEffects(_ActionListSection,{componentId:componentIds$1.ActionListSection});var _ActionListItemIcon=function _ActionListItemIcon(_ref2){var icon=_ref2.icon;var Icon=icon;var _React$useContext=React__default.useContext(ActionListItemContext),intent=_React$useContext.intent,isDisabled=_React$useContext.isDisabled;return jsx(Icon,{color:intent==='negative'?'feedback.icon.negative.lowContrast':getNormalTextColor(isDisabled,{isMuted:true}),size:"medium"});};var ActionListItemIcon=assignWithoutSideEffects(_ActionListItemIcon,{componentId:componentIds$1.ActionListItemIcon});var _ActionListItemText=function _ActionListItemText(_ref3){var children=_ref3.children;var _React$useContext2=React__default.useContext(ActionListItemContext),isDisabled=_React$useContext2.isDisabled;return jsx(Text,{variant:"caption",color:getNormalTextColor(isDisabled,{isMuted:true}),children:children});};var ActionListItemText=assignWithoutSideEffects(_ActionListItemText,{componentId:componentIds$1.ActionListItemText});var ActionListCheckboxWrapper=styled(BaseBox)(function(_props){return {pointerEvents:'none'};});var makeActionListItemClickable=function makeActionListItemClickable(clickHandler){if(isReactNative$4()){return {onPress:clickHandler};}return {onClick:clickHandler};};var _ActionListItemBody=function _ActionListItemBody(_ref4){var selectionType=_ref4.selectionType,intent=_ref4.intent,description=_ref4.description,isDisabled=_ref4.isDisabled,leading=_ref4.leading,trailing=_ref4.trailing,title=_ref4.title,isSelected=_ref4.isSelected;return jsxs(Fragment,{children:[jsxs(BaseBox,{display:"flex",justifyContent:"center",flexDirection:"row",alignItems:"center",maxHeight:isReactNative$4()?undefined:makeSize(size[20]),children:[jsx(BaseBox,{display:"flex",justifyContent:"center",alignItems:"center",children:selectionType==='multiple'?jsx(ActionListCheckboxWrapper,_extends({hasDescription:Boolean(description)},makeAccessible({hidden:true}),{children:jsx(Checkbox,{isChecked:isSelected,tabIndex:-1,isDisabled:isDisabled,children:null})})):leading}),jsx(BaseBox,{paddingLeft:selectionType==='multiple'||!leading?'spacing.0':'spacing.3',paddingRight:"spacing.3",children:jsx(Text,{truncateAfterLines:1,color:intent==='negative'?'feedback.text.negative.lowContrast':getNormalTextColor(isDisabled),children:title})}),jsx(BaseBox,{marginLeft:"auto",children:trailing})]}),jsx(BaseBox,{paddingLeft:leading||selectionType==='multiple'?'spacing.7':undefined,children:description?jsx(Text,{color:getNormalTextColor(isDisabled,{isMuted:true}),size:"small",children:description}):null})]});};var ActionListItemBody=React__default.memo(_ActionListItemBody);var _ActionListItem=function _ActionListItem(props){var _useDropdown=useDropdown(),activeIndex=_useDropdown.activeIndex,dropdownBaseId=_useDropdown.dropdownBaseId,onOptionClick=_useDropdown.onOptionClick,selectedIndices=_useDropdown.selectedIndices,setShouldIgnoreBlur=_useDropdown.setShouldIgnoreBlur,setShouldIgnoreBlurAnimation=_useDropdown.setShouldIgnoreBlurAnimation,selectionType=_useDropdown.selectionType,dropdownTriggerer=_useDropdown.dropdownTriggerer,isKeydownPressed=_useDropdown.isKeydownPressed;var _useTheme=useTheme(),platform=_useTheme.platform;var isMobile=platform==='onMobile';var renderOnWebAs=props.href?'a':'button';var getIsSelected=function getIsSelected(){if(dropdownTriggerer==='SelectInput'){if(typeof props._index==='number'){return selectedIndices.includes(props._index);}return undefined;}return props.isSelected;};var isSelected=getIsSelected();React__default.useEffect(function(){validateActionListItemProps({leading:props.leading,trailing:props.trailing});},[props.leading,props.trailing]);React__default.useEffect(function(){if(dropdownTriggerer==='SelectInput'&&props.intent==='negative'){throw new Error('[ActionListItem]: negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger');}},[props.intent,dropdownTriggerer]);return jsx(ActionListItemContext.Provider,{value:{intent:props.intent,isDisabled:props.isDisabled},children:jsx(StyledActionListItem,_extends({as:!isReactNative$4()?renderOnWebAs:undefined,id:dropdownBaseId+"-"+props._index,type:"button",tabIndex:-1,href:props.href,target:props.target,className:activeIndex===props._index?'active-focus':''},makeAccessible({selected:isSelected,current:isRoleMenu(dropdownTriggerer)?isSelected:undefined,role:getActionListItemRole(dropdownTriggerer,props.href),disabled:props.isDisabled}),makeActionListItemClickable(function(e){if(typeof props._index==='number'){onOptionClick(e,props._index);props.onClick==null?void 0:props.onClick({name:props.value,value:isSelected});}}),metaAttribute({name:MetaConstants.ActionListItem,testID:props.testID}),{onMouseDown:function onMouseDown(){setShouldIgnoreBlur(true);setShouldIgnoreBlurAnimation(true);},onMouseUp:function onMouseUp(){setShouldIgnoreBlurAnimation(false);},"data-value":props.value,"data-index":props._index,selectionType:selectionType,hasDescription:Boolean(props.description),intent:props.intent,isSelected:isSelected,isKeydownPressed:isKeydownPressed,isMobile:isMobile,children:jsx(ActionListItemBody,{selectionType:selectionType,intent:props.intent,description:props.description,isDisabled:props.isDisabled,leading:props.leading,trailing:props.trailing,title:props.title,isSelected:isSelected})}))});};var ActionListItem=assignWithoutSideEffects(React__default.memo(_ActionListItem),{componentId:componentIds$1.ActionListItem,displayName:componentIds$1.ActionListItem});
3923
3923
 
3924
3924
  var _ActionListBox=React__default.forwardRef(function(_ref,ref){var sectionData=_ref.sectionData,actionListItemWrapperRole=_ref.actionListItemWrapperRole,isMultiSelectable=_ref.isMultiSelectable,isInBottomSheet=_ref.isInBottomSheet;var _useBottomSheetContex=useBottomSheetContext(),footerHeight=_useBottomSheetContex.footerHeight,setContentHeight=_useBottomSheetContex.setContentHeight;var renderActionListItem=React__default.useCallback(function(_ref2){var item=_ref2.item;return jsx(ActionListItem,_extends({},item));},[]);var renderActionListSectionHeader=React__default.useCallback(function(_ref3){var title=_ref3.section.title;if(!title)return null;return jsx(ActionListSection,{title:title,_hideDivider:true,children:undefined});},[]);var renderActionListSectionDivider=React__default.useCallback(function(_ref4){var _ref4$section=_ref4.section,title=_ref4$section.title,hideDivider=_ref4$section.hideDivider;if(!title)return null;if(hideDivider)return null;return jsx(ActionListSectionDivider,{});},[]);return jsx(StyledListBoxWrapper,_extends({as:isInBottomSheet?BottomSheetSectionList:SectionList,isInBottomSheet:Boolean(isInBottomSheet),marginBottom:footerHeight,sections:sectionData,windowSize:5,keyExtractor:function keyExtractor(item){return item.value;},stickySectionHeadersEnabled:false,renderSectionHeader:renderActionListSectionHeader,renderSectionFooter:renderActionListSectionDivider,renderItem:renderActionListItem,ref:ref,onContentSizeChange:function onContentSizeChange(_width,height){setContentHeight(height);}},makeAccessible({role:actionListItemWrapperRole,multiSelectable:actionListItemWrapperRole==='listbox'?isMultiSelectable:undefined})));});var ActionListBox=assignWithoutSideEffects(_ActionListBox,{displayName:'ActionListBox'});
3925
3925
 
3926
- var ActionListContext=React__default.createContext({surfaceLevel:2});var useActionListContext=function useActionListContext(){var context=React__default.useContext(ActionListContext);if(!context){throw new Error('[Blade ActionList]: useActionListContext has to be called inside ActionListContext.Provider');}return context;};var _ActionList=function _ActionList(_ref){var children=_ref.children,_ref$surfaceLevel=_ref.surfaceLevel,surfaceLevel=_ref$surfaceLevel===void 0?2:_ref$surfaceLevel,testID=_ref.testID;var _useDropdown=useDropdown(),setOptions=_useDropdown.setOptions,actionListItemRef=_useDropdown.actionListItemRef,selectionType=_useDropdown.selectionType,dropdownBaseId=_useDropdown.dropdownBaseId,setSelectedIndices=_useDropdown.setSelectedIndices,dropdownTriggerer=_useDropdown.dropdownTriggerer,hasFooterAction=_useDropdown.hasFooterAction;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBottomSheetContex=useBottomSheetContext(),isInBottomSheet=_useBottomSheetContex.isInBottomSheet;var _React$useMemo=React__default.useMemo(function(){return getActionListProperties(children);},[children]),sectionData=_React$useMemo.sectionData,childrenWithId=_React$useMemo.childrenWithId,actionListOptions=_React$useMemo.actionListOptions,defaultSelectedIndices=_React$useMemo.defaultSelectedIndices,actionListHeaderChild=_React$useMemo.actionListHeaderChild,actionListFooterChild=_React$useMemo.actionListFooterChild;React__default.useEffect(function(){setOptions(actionListOptions);},[actionListOptions]);React__default.useEffect(function(){setSelectedIndices(defaultSelectedIndices);},[]);var actionListContainerRole=getActionListContainerRole(hasFooterAction,dropdownTriggerer);var actionListItemWrapperRole=getActionListItemWrapperRole(hasFooterAction,dropdownTriggerer);var isMultiSelectable=selectionType==='multiple';var actionListContextValue=React__default.useMemo(function(){return {surfaceLevel:surfaceLevel};},[surfaceLevel]);return jsx(ActionListContext.Provider,{value:actionListContextValue,children:isInBottomSheet?jsx(ActionListBox,{isInBottomSheet:isInBottomSheet,actionListItemWrapperRole:actionListItemWrapperRole,childrenWithId:childrenWithId,sectionData:sectionData,isMultiSelectable:isMultiSelectable,ref:actionListItemRef}):jsxs(StyledActionList,_extends({isInBottomSheet:isInBottomSheet,surfaceLevel:surfaceLevel,elevation:isInBottomSheet?undefined:theme.shadows.androidElevation.level[2],id:dropdownBaseId+"-actionlist"},makeAccessible({role:actionListContainerRole,multiSelectable:actionListContainerRole==='listbox'?isMultiSelectable:undefined,labelledBy:dropdownBaseId+"-label"}),metaAttribute({name:MetaConstants.ActionList,testID:testID}),{children:[actionListHeaderChild,jsx(ActionListBox,{isInBottomSheet:isInBottomSheet,actionListItemWrapperRole:actionListItemWrapperRole,childrenWithId:childrenWithId,sectionData:sectionData,isMultiSelectable:isMultiSelectable,ref:actionListItemRef}),actionListFooterChild]}))});};var ActionList=assignWithoutSideEffects(React__default.memo(_ActionList),{componentId:componentIds$1.ActionList,displayName:'ActionList'});
3926
+ var ActionListContext=React__default.createContext({surfaceLevel:2});var useActionListContext=function useActionListContext(){var context=React__default.useContext(ActionListContext);if(!context){throw new Error('[Blade ActionList]: useActionListContext has to be called inside ActionListContext.Provider');}return context;};var _ActionList=function _ActionList(_ref){var children=_ref.children,_ref$surfaceLevel=_ref.surfaceLevel,surfaceLevel=_ref$surfaceLevel===void 0?2:_ref$surfaceLevel,testID=_ref.testID;var _useDropdown=useDropdown(),setOptions=_useDropdown.setOptions,actionListItemRef=_useDropdown.actionListItemRef,selectionType=_useDropdown.selectionType,dropdownBaseId=_useDropdown.dropdownBaseId,dropdownTriggerer=_useDropdown.dropdownTriggerer,hasFooterAction=_useDropdown.hasFooterAction;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBottomSheetContex=useBottomSheetContext(),isInBottomSheet=_useBottomSheetContex.isInBottomSheet;var _React$useMemo=React__default.useMemo(function(){return getActionListProperties(children);},[children]),sectionData=_React$useMemo.sectionData,childrenWithId=_React$useMemo.childrenWithId,actionListOptions=_React$useMemo.actionListOptions,actionListHeaderChild=_React$useMemo.actionListHeaderChild,actionListFooterChild=_React$useMemo.actionListFooterChild;React__default.useEffect(function(){setOptions(actionListOptions);},[actionListOptions]);var actionListContainerRole=getActionListContainerRole(hasFooterAction,dropdownTriggerer);var actionListItemWrapperRole=getActionListItemWrapperRole(hasFooterAction,dropdownTriggerer);var isMultiSelectable=selectionType==='multiple';var actionListContextValue=React__default.useMemo(function(){return {surfaceLevel:surfaceLevel};},[surfaceLevel]);return jsx(ActionListContext.Provider,{value:actionListContextValue,children:isInBottomSheet?jsx(ActionListBox,{isInBottomSheet:isInBottomSheet,actionListItemWrapperRole:actionListItemWrapperRole,childrenWithId:childrenWithId,sectionData:sectionData,isMultiSelectable:isMultiSelectable,ref:actionListItemRef}):jsxs(StyledActionList,_extends({isInBottomSheet:isInBottomSheet,surfaceLevel:surfaceLevel,elevation:isInBottomSheet?undefined:theme.shadows.androidElevation.level[2],id:dropdownBaseId+"-actionlist"},makeAccessible({role:actionListContainerRole,multiSelectable:actionListContainerRole==='listbox'?isMultiSelectable:undefined,labelledBy:dropdownBaseId+"-label"}),metaAttribute({name:MetaConstants.ActionList,testID:testID}),{children:[actionListHeaderChild,jsx(ActionListBox,{isInBottomSheet:isInBottomSheet,actionListItemWrapperRole:actionListItemWrapperRole,childrenWithId:childrenWithId,sectionData:sectionData,isMultiSelectable:isMultiSelectable,ref:actionListItemRef}),actionListFooterChild]}))});};var ActionList=assignWithoutSideEffects(React__default.memo(_ActionList),{componentId:componentIds$1.ActionList,displayName:'ActionList'});
3927
3927
 
3928
3928
  var StyledActionListHeader=styled(BaseBox)(function(props){return {display:'flex',flexDirection:'row',alignItems:'center',padding:makeSize(props.theme.spacing[3])+" "+makeSize(props.theme.spacing[5]),backgroundColor:props.theme.colors.brand.gray.a50.lowContrast};});var _ActionListHeader=function _ActionListHeader(props){React__default.useEffect(function(){React__default.Children.map(props.leading,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListHeaderIcon)){throw new Error("[ActionListHeader]: Only "+componentIds$1.ActionListHeaderIcon+" is allowed in leading prop");}});},[props.leading]);return jsxs(StyledActionListHeader,_extends({},metaAttribute({name:MetaConstants.ActionListHeader,testID:props.testID}),{children:[jsx(BaseBox,{children:props.leading}),jsx(BaseBox,{paddingLeft:"spacing.3",paddingRight:"spacing.3",children:jsx(Text,{variant:"caption",color:"surface.text.subdued.lowContrast",children:props.title})})]}));};var ActionListHeader=assignWithoutSideEffects(_ActionListHeader,{componentId:componentIds$1.ActionListHeader});var _ActionListHeaderIcon=function _ActionListHeaderIcon(_ref){var icon=_ref.icon;var Icon=icon;return jsx(Icon,{color:"surface.text.muted.lowContrast",size:"small"});};var ActionListHeaderIcon=assignWithoutSideEffects(_ActionListHeaderIcon,{componentId:componentIds$1.ActionListHeaderIcon});
3929
3929
 
3930
- var StyledActionListFooter=styled(BaseBox)(function(props){return {display:'flex',flexDirection:'row',alignItems:'center',padding:makeSize(props.theme.spacing[3])+" "+makeSize(props.theme.spacing[5]),backgroundColor:props.theme.colors.brand.gray.a50.lowContrast};});var _ActionListFooter=function _ActionListFooter(props){var footerRef=React__default.useRef(null);var _useDropdown=useDropdown(),setShouldIgnoreBlur=_useDropdown.setShouldIgnoreBlur,setHasFooterAction=_useDropdown.setHasFooterAction,onTriggerKeydown=_useDropdown.onTriggerKeydown,activeIndex=_useDropdown.activeIndex,setIsOpen=_useDropdown.setIsOpen,selectionType=_useDropdown.selectionType;var bottomSheetAndDropdownGlue=useBottomSheetAndDropdownGlue();React__default.useEffect(function(){React__default.Children.map(props.leading,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListFooterIcon)){throw new Error("[ActionListFooter]: Only "+componentIds$1.ActionListFooterIcon+" is allowed in leading prop");}});},[props.leading]);React__default.useEffect(function(){var _footerRef$current;if(!isReactNative$4()&&(_footerRef$current=footerRef.current)!=null&&_footerRef$current.querySelector('button, a')){setHasFooterAction(true);}},[setHasFooterAction,props.trailing]);var isOnlyActionButton=!props.title&&!props.leading&&props.trailing;return jsxs(StyledActionListFooter,_extends({ref:footerRef,onMouseDown:function onMouseDown(){if(selectionType==='multiple'){setShouldIgnoreBlur(true);}},onKeyDown:function onKeyDown(e){var nativeEvent=e.nativeEvent;var shouldIgnoreDropdownKeydown=(nativeEvent.key===' '||nativeEvent.key==='Enter')&&activeIndex<0;if(shouldIgnoreDropdownKeydown){if(selectionType==='single'&&!(bottomSheetAndDropdownGlue!=null&&bottomSheetAndDropdownGlue.dropdownHasBottomSheet)){setIsOpen(false);}return;}onTriggerKeydown==null?void 0:onTriggerKeydown({event:e.nativeEvent});},onBlur:function onBlur(e){var nextItem=e.relatedTarget;var nextItemRole=nextItem==null?void 0:nextItem.getAttribute('role');if(nextItemRole!=='combobox'&&nextItemRole!=='option'&&!(bottomSheetAndDropdownGlue!=null&&bottomSheetAndDropdownGlue.dropdownHasBottomSheet)){setIsOpen(false);}}},makeAccessible({role:getActionListFooterRole(),label:props.title}),metaAttribute({name:MetaConstants.ActionListFooter,testID:props.testID}),{children:[props.leading?jsx(BaseBox,{children:props.leading}):null,props.title?jsx(BaseBox,{flex:1,paddingLeft:"spacing.3",paddingRight:"spacing.3",children:jsx(Text,{variant:"caption",color:"surface.text.subdued.lowContrast",children:props.title})}):null,props.trailing?jsx(BaseBox,{display:"flex",alignItems:"center",marginLeft:isOnlyActionButton?undefined:'auto',width:isOnlyActionButton?'100%':undefined,children:props.trailing}):null]}));};var ActionListFooter=assignWithoutSideEffects(_ActionListFooter,{componentId:componentIds$1.ActionListFooter});var _ActionListFooterIcon=function _ActionListFooterIcon(_ref){var icon=_ref.icon;var Icon=icon;return jsx(Icon,{color:"surface.text.muted.lowContrast",size:"small"});};var ActionListFooterIcon=assignWithoutSideEffects(_ActionListFooterIcon,{componentId:componentIds$1.ActionListFooterIcon});
3930
+ var StyledActionListFooter=styled(BaseBox)(function(props){return {display:'flex',flexDirection:'row',alignItems:'center',padding:makeSize(props.theme.spacing[3])+" "+makeSize(props.theme.spacing[5]),backgroundColor:props.theme.colors.brand.gray.a50.lowContrast};});var _ActionListFooter=function _ActionListFooter(props){var footerRef=React__default.useRef(null);var _useDropdown=useDropdown(),setShouldIgnoreBlur=_useDropdown.setShouldIgnoreBlur,setHasFooterAction=_useDropdown.setHasFooterAction,onTriggerKeydown=_useDropdown.onTriggerKeydown,activeIndex=_useDropdown.activeIndex,close=_useDropdown.close,selectionType=_useDropdown.selectionType;var bottomSheetAndDropdownGlue=useBottomSheetAndDropdownGlue();React__default.useEffect(function(){React__default.Children.map(props.leading,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListFooterIcon)){throw new Error("[ActionListFooter]: Only "+componentIds$1.ActionListFooterIcon+" is allowed in leading prop");}});},[props.leading]);React__default.useEffect(function(){var _footerRef$current;if(!isReactNative$4()&&(_footerRef$current=footerRef.current)!=null&&_footerRef$current.querySelector('button, a')){setHasFooterAction(true);}},[setHasFooterAction,props.trailing]);var isOnlyActionButton=!props.title&&!props.leading&&props.trailing;return jsxs(StyledActionListFooter,_extends({ref:footerRef,onMouseDown:function onMouseDown(){if(selectionType==='multiple'){setShouldIgnoreBlur(true);}},onKeyDown:function onKeyDown(e){var nativeEvent=e.nativeEvent;var shouldIgnoreDropdownKeydown=(nativeEvent.key===' '||nativeEvent.key==='Enter')&&activeIndex<0;if(shouldIgnoreDropdownKeydown){if(selectionType==='single'&&!(bottomSheetAndDropdownGlue!=null&&bottomSheetAndDropdownGlue.dropdownHasBottomSheet)){close();}return;}onTriggerKeydown==null?void 0:onTriggerKeydown({event:e.nativeEvent});},onBlur:function onBlur(e){var nextItem=e.relatedTarget;var nextItemRole=nextItem==null?void 0:nextItem.getAttribute('role');if(nextItemRole!=='combobox'&&nextItemRole!=='option'&&!(bottomSheetAndDropdownGlue!=null&&bottomSheetAndDropdownGlue.dropdownHasBottomSheet)){close();}}},makeAccessible({role:getActionListFooterRole(),label:props.title}),metaAttribute({name:MetaConstants.ActionListFooter,testID:props.testID}),{children:[props.leading?jsx(BaseBox,{children:props.leading}):null,props.title?jsx(BaseBox,{flex:1,paddingLeft:"spacing.3",paddingRight:"spacing.3",children:jsx(Text,{variant:"caption",color:"surface.text.subdued.lowContrast",children:props.title})}):null,props.trailing?jsx(BaseBox,{display:"flex",alignItems:"center",marginLeft:isOnlyActionButton?undefined:'auto',width:isOnlyActionButton?'100%':undefined,children:props.trailing}):null]}));};var ActionListFooter=assignWithoutSideEffects(_ActionListFooter,{componentId:componentIds$1.ActionListFooter});var _ActionListFooterIcon=function _ActionListFooterIcon(_ref){var icon=_ref.icon;var Icon=icon;return jsx(Icon,{color:"surface.text.muted.lowContrast",size:"small"});};var ActionListFooterIcon=assignWithoutSideEffects(_ActionListFooterIcon,{componentId:componentIds$1.ActionListFooterIcon});
3931
3931
 
3932
3932
  var _ActionListItemAsset=function _ActionListItemAsset(props){var source=typeof props.src==='string'?{uri:props.src}:props.src;return jsx(Image,{source:source,style:{width:size[16],height:size[12]},accessibilityIgnoresInvertColors:true,alt:props.alt});};var ActionListItemAsset=assignWithoutSideEffects(_ActionListItemAsset,{componentId:componentIds$1.ActionListItemAsset});
3933
3933
 
@@ -3943,7 +3943,7 @@ var _IconButton=function _IconButton(_ref,ref){var icon=_ref.icon,onClick=_ref.o
3943
3943
 
3944
3944
  var getBaseButtonStyles=function getBaseButtonStyles(_ref){var defaultBorderColor=_ref.defaultBorderColor,minHeight=_ref.minHeight,buttonPaddingTop=_ref.buttonPaddingTop,buttonPaddingBottom=_ref.buttonPaddingBottom,buttonPaddingLeft=_ref.buttonPaddingLeft,buttonPaddingRight=_ref.buttonPaddingRight,defaultBackgroundColor=_ref.defaultBackgroundColor,disabled=_ref.disabled,isFullWidth=_ref.isFullWidth,borderWidth=_ref.borderWidth,borderRadius=_ref.borderRadius;return {minHeight:minHeight,width:isFullWidth?'100%':'auto',cursor:disabled?'not-allowed':'pointer',backgroundColor:defaultBackgroundColor,borderColor:defaultBorderColor,borderWidth:borderWidth,borderRadius:borderRadius,borderStyle:'solid',paddingTop:buttonPaddingTop,paddingBottom:buttonPaddingBottom,paddingLeft:buttonPaddingLeft,paddingRight:buttonPaddingRight};};
3945
3945
 
3946
- var _excluded$q=["onClick","children","minHeight","buttonPaddingTop","buttonPaddingBottom","buttonPaddingLeft","buttonPaddingRight","isFullWidth","disabled","defaultBackgroundColor","defaultBorderColor","hoverBackgroundColor","activeBackgroundColor","focusBackgroundColor","focusRingColor","hoverBorderColor","activeBorderColor","focusBorderColor","borderWidth","borderRadius","motionDuration","motionEasing","isLoading","accessibilityProps","testID"];var StyledPressable=styled(Animated.createAnimatedComponent(Pressable))(function(props){var styledPropsCSSObject=useStyledProps(props);return _extends({},getBaseButtonStyles(props),{alignSelf:'center'},styledPropsCSSObject);});var _StyledBaseButton=function _StyledBaseButton(_ref,ref){var onClick=_ref.onClick,_children=_ref.children,minHeight=_ref.minHeight,buttonPaddingTop=_ref.buttonPaddingTop,buttonPaddingBottom=_ref.buttonPaddingBottom,buttonPaddingLeft=_ref.buttonPaddingLeft,buttonPaddingRight=_ref.buttonPaddingRight,isFullWidth=_ref.isFullWidth,disabled=_ref.disabled,defaultBackgroundColor=_ref.defaultBackgroundColor,defaultBorderColor=_ref.defaultBorderColor,hoverBackgroundColor=_ref.hoverBackgroundColor,activeBackgroundColor=_ref.activeBackgroundColor,focusBackgroundColor=_ref.focusBackgroundColor,focusRingColor=_ref.focusRingColor,hoverBorderColor=_ref.hoverBorderColor,activeBorderColor=_ref.activeBorderColor,focusBorderColor=_ref.focusBorderColor,borderWidth=_ref.borderWidth,borderRadius=_ref.borderRadius,motionDuration=_ref.motionDuration,motionEasing=_ref.motionEasing,isLoading=_ref.isLoading,accessibilityProps=_ref.accessibilityProps,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$q);var _useTheme=useTheme(),theme=_useTheme.theme;var isPressed=useSharedValue(false);var duration=get_1(theme.motion,motionDuration);var easing=get_1(theme.motion,motionEasing);var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){return {backgroundColor:withTiming(isPressed.value?activeBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing}),borderColor:withTiming(isPressed.value?activeBorderColor:defaultBorderColor,{duration:duration,easing:easing})};};_f._closure={withTiming:withTiming,isPressed:isPressed,activeBackgroundColor:activeBackgroundColor,defaultBackgroundColor:defaultBackgroundColor,duration:duration,easing:easing,activeBorderColor:activeBorderColor,defaultBorderColor:defaultBorderColor};_f.asString="function _f(){const{withTiming,isPressed,activeBackgroundColor,defaultBackgroundColor,duration,easing,activeBorderColor,defaultBorderColor}=jsThis._closure;{return{backgroundColor:withTiming(isPressed.value?activeBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing}),borderColor:withTiming(isPressed.value?activeBorderColor:defaultBorderColor,{duration:duration,easing:easing})};}}";_f.__workletHash=6870832376373;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Button/BaseButton/StyledBaseButton.native.tsx (60:42)";_f.__optimalization=2;return _f;}());return jsx(StyledPressable,_extends({},styledProps,accessibilityProps,{ref:ref,isLoading:isLoading,onPress:onClick,style:animatedStyles,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,isFullWidth:isFullWidth,disabled:disabled,defaultBackgroundColor:defaultBackgroundColor,defaultBorderColor:defaultBorderColor,hoverBackgroundColor:hoverBackgroundColor,activeBackgroundColor:activeBackgroundColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,activeBorderColor:activeBorderColor,focusBorderColor:focusBorderColor,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing,testID:testID,children:function children(_ref2){var pressed=_ref2.pressed;isPressed.value=pressed;return _children;}}));};var StyledBaseButton=assignWithoutSideEffects(React__default.forwardRef(_StyledBaseButton),{displayName:'StyledBaseButton'});
3946
+ var _excluded$q=["onClick","onBlur","children","minHeight","buttonPaddingTop","buttonPaddingBottom","buttonPaddingLeft","buttonPaddingRight","isFullWidth","disabled","defaultBackgroundColor","defaultBorderColor","hoverBackgroundColor","activeBackgroundColor","focusBackgroundColor","focusRingColor","hoverBorderColor","activeBorderColor","focusBorderColor","borderWidth","borderRadius","motionDuration","motionEasing","isLoading","accessibilityProps","testID"];var StyledPressable=styled(Animated.createAnimatedComponent(Pressable))(function(props){var styledPropsCSSObject=useStyledProps(props);return _extends({},getBaseButtonStyles(props),{alignSelf:'center'},styledPropsCSSObject);});var _StyledBaseButton=function _StyledBaseButton(_ref,ref){var onClick=_ref.onClick;_ref.onBlur;var _children=_ref.children,minHeight=_ref.minHeight,buttonPaddingTop=_ref.buttonPaddingTop,buttonPaddingBottom=_ref.buttonPaddingBottom,buttonPaddingLeft=_ref.buttonPaddingLeft,buttonPaddingRight=_ref.buttonPaddingRight,isFullWidth=_ref.isFullWidth,disabled=_ref.disabled,defaultBackgroundColor=_ref.defaultBackgroundColor,defaultBorderColor=_ref.defaultBorderColor,hoverBackgroundColor=_ref.hoverBackgroundColor,activeBackgroundColor=_ref.activeBackgroundColor,focusBackgroundColor=_ref.focusBackgroundColor,focusRingColor=_ref.focusRingColor,hoverBorderColor=_ref.hoverBorderColor,activeBorderColor=_ref.activeBorderColor,focusBorderColor=_ref.focusBorderColor,borderWidth=_ref.borderWidth,borderRadius=_ref.borderRadius,motionDuration=_ref.motionDuration,motionEasing=_ref.motionEasing,isLoading=_ref.isLoading,accessibilityProps=_ref.accessibilityProps,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$q);var _useTheme=useTheme(),theme=_useTheme.theme;var isPressed=useSharedValue(false);var duration=get_1(theme.motion,motionDuration);var easing=get_1(theme.motion,motionEasing);var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){return {backgroundColor:withTiming(isPressed.value?activeBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing}),borderColor:withTiming(isPressed.value?activeBorderColor:defaultBorderColor,{duration:duration,easing:easing})};};_f._closure={withTiming:withTiming,isPressed:isPressed,activeBackgroundColor:activeBackgroundColor,defaultBackgroundColor:defaultBackgroundColor,duration:duration,easing:easing,activeBorderColor:activeBorderColor,defaultBorderColor:defaultBorderColor};_f.asString="function _f(){const{withTiming,isPressed,activeBackgroundColor,defaultBackgroundColor,duration,easing,activeBorderColor,defaultBorderColor}=jsThis._closure;{return{backgroundColor:withTiming(isPressed.value?activeBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing}),borderColor:withTiming(isPressed.value?activeBorderColor:defaultBorderColor,{duration:duration,easing:easing})};}}";_f.__workletHash=6870832376373;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Button/BaseButton/StyledBaseButton.native.tsx (61:42)";_f.__optimalization=2;return _f;}());return jsx(StyledPressable,_extends({},styledProps,accessibilityProps,{ref:ref,isLoading:isLoading,onPress:onClick,style:animatedStyles,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,isFullWidth:isFullWidth,disabled:disabled,defaultBackgroundColor:defaultBackgroundColor,defaultBorderColor:defaultBorderColor,hoverBackgroundColor:hoverBackgroundColor,activeBackgroundColor:activeBackgroundColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,activeBorderColor:activeBorderColor,focusBorderColor:focusBorderColor,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing,testID:testID,children:function children(_ref2){var pressed=_ref2.pressed;isPressed.value=pressed;return _children;}}));};var StyledBaseButton=assignWithoutSideEffects(React__default.forwardRef(_StyledBaseButton),{displayName:'StyledBaseButton'});
3947
3947
 
3948
3948
  var typography={fonts:{size:{xsmall:75,small:75,medium:100,large:200}},lineHeights:{xsmall:50,small:50,medium:100,large:300}};var minHeight={xsmall:size[28],small:size[32],medium:size[36],large:size[48]};var buttonPadding={xsmall:{top:0,bottom:0,left:3,right:3},small:{top:0,bottom:0,left:4,right:4},medium:{top:0,bottom:0,left:6,right:6},large:{top:0,bottom:0,left:6,right:6}};var buttonIconOnlyPadding={xsmall:{top:0,bottom:0,left:4,right:4},small:{top:0,bottom:0,left:3,right:3},medium:{top:0,bottom:0,left:3,right:3},large:{top:0,bottom:0,left:4,right:4}};var buttonSizeToIconSizeMap={xsmall:'small',small:'small',medium:'medium',large:'medium'};var buttonIconOnlySizeToIconSizeMap={xsmall:'medium',small:'medium',medium:'large',large:'xlarge'};var buttonSizeToSpinnerSizeMap={xsmall:'medium',small:'large',medium:'large',large:'xlarge'};var textPadding={xsmall:2,small:2,medium:3,large:3};
3949
3949
 
@@ -3959,7 +3959,7 @@ var _excluded$p=["label","labelPosition","accessibilityLabel","contrast","intent
3959
3959
 
3960
3960
  var getStringFromReactText=function getStringFromReactText(childReactText){if(isEmpty_1(childReactText)){return undefined;}if(Array.isArray(childReactText)){return childReactText.join('');}return String(childReactText);};
3961
3961
 
3962
- var _excluded$o=["variant","intent","contrast","size","icon","iconPosition","isDisabled","isFullWidth","isLoading","onClick","type","children","accessibilityLabel","testID"];var getColorToken$1=function getColorToken(_ref){var property=_ref.property,variant=_ref.variant,state=_ref.state,contrast=_ref.contrast,intent=_ref.intent;if(intent&&contrast){return "feedback."+intent+".action."+property+".primary."+state+"."+contrast+"Contrast";}return "action."+property+"."+variant+"."+state;};var getProps$1=function getProps(_ref2){var buttonTypographyTokens=_ref2.buttonTypographyTokens,children=_ref2.children,isDisabled=_ref2.isDisabled,size=_ref2.size,theme=_ref2.theme,variant=_ref2.variant,intent=_ref2.intent,contrast=_ref2.contrast,hasIcon=_ref2.hasIcon;var isIconOnly=hasIcon&&(!children||(children==null?void 0:children.trim().length)===0);var props={iconSize:isIconOnly?buttonIconOnlySizeToIconSizeMap[size]:buttonSizeToIconSizeMap[size],spinnerSize:buttonSizeToSpinnerSizeMap[size],fontSize:buttonTypographyTokens.fonts.size[size],lineHeight:buttonTypographyTokens.lineHeights[size],minHeight:makeSize(minHeight[size]),iconPadding:hasIcon&&children!=null&&children.trim()?"spacing."+textPadding[size]:undefined,iconColor:getColorToken$1({property:'icon',variant:variant,contrast:contrast,intent:intent,state:'default'}),textColor:getColorToken$1({property:'text',variant:variant,contrast:contrast,intent:intent,state:'default'}),buttonPaddingTop:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].top]):makeSpace(theme.spacing[buttonPadding[size].top]),buttonPaddingBottom:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].bottom]):makeSpace(theme.spacing[buttonPadding[size].bottom]),buttonPaddingLeft:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].left]):makeSpace(theme.spacing[buttonPadding[size].left]),buttonPaddingRight:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].right]):makeSpace(theme.spacing[buttonPadding[size].right]),text:size==='xsmall'?children==null?void 0:children.trim().toUpperCase():children==null?void 0:children.trim(),defaultBackgroundColor:get_1(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'default'})),defaultBorderColor:get_1(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'default'})),hoverBackgroundColor:get_1(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'hover'})),hoverBorderColor:get_1(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'hover'})),activeBackgroundColor:get_1(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'active'})),activeBorderColor:get_1(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'active'})),focusBackgroundColor:get_1(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'focus'})),focusBorderColor:get_1(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'focus'})),focusRingColor:get_1(theme.colors,'brand.primary.400'),borderWidth:makeBorderSize(theme.border.width.thin),borderRadius:makeBorderSize(theme.border.radius.small),motionDuration:'duration.xquick',motionEasing:'easing.standard.effective'};if(isDisabled){var disabledBackgroundColor=get_1(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'disabled'}));var disabledBorderColor=get_1(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'disabled'}));props.iconColor=getColorToken$1({property:'icon',variant:variant,contrast:contrast,intent:intent,state:'disabled'});props.textColor=getColorToken$1({property:'text',variant:variant,contrast:contrast,intent:intent,state:'disabled'});props.defaultBackgroundColor=disabledBackgroundColor;props.defaultBorderColor=disabledBorderColor;props.hoverBackgroundColor=disabledBackgroundColor;props.hoverBorderColor=disabledBorderColor;props.activeBackgroundColor=disabledBackgroundColor;props.activeBorderColor=disabledBorderColor;props.focusBackgroundColor=disabledBackgroundColor;props.focusBorderColor=disabledBorderColor;}return props;};var ButtonContent=styled(BaseBox)(function(_ref3){var isHidden=_ref3.isHidden;return {opacity:isHidden?0:1};});var _BaseButton=function _BaseButton(_ref4,ref){var _ref4$variant=_ref4.variant,variant=_ref4$variant===void 0?'primary':_ref4$variant,intent=_ref4.intent,_ref4$contrast=_ref4.contrast,contrast=_ref4$contrast===void 0?'low':_ref4$contrast,_ref4$size=_ref4.size,size=_ref4$size===void 0?'medium':_ref4$size,Icon=_ref4.icon,_ref4$iconPosition=_ref4.iconPosition,iconPosition=_ref4$iconPosition===void 0?'left':_ref4$iconPosition,_ref4$isDisabled=_ref4.isDisabled,isDisabled=_ref4$isDisabled===void 0?false:_ref4$isDisabled,_ref4$isFullWidth=_ref4.isFullWidth,isFullWidth=_ref4$isFullWidth===void 0?false:_ref4$isFullWidth,_ref4$isLoading=_ref4.isLoading,isLoading=_ref4$isLoading===void 0?false:_ref4$isLoading,onClick=_ref4.onClick,_ref4$type=_ref4.type,type=_ref4$type===void 0?'button':_ref4$type,children=_ref4.children,accessibilityLabel=_ref4.accessibilityLabel,testID=_ref4.testID,styledProps=_objectWithoutProperties(_ref4,_excluded$o);var childrenString=getStringFromReactText(children);var buttonRef=useBladeInnerRef(ref);var disabled=isLoading||isDisabled;var _useTheme=useTheme(),theme=_useTheme.theme;if(!Icon&&!(childrenString!=null&&childrenString.trim())){throw new Error("[Blade: BaseButton]: At least one of icon or text is required to render a button.");}var prevLoading=usePrevious(isLoading);React__default.useEffect(function(){if(isLoading)announce('Started loading');if(!isLoading&&prevLoading)announce('Stopped loading');},[isLoading,prevLoading]);var _getProps=getProps$1({buttonTypographyTokens:typography,children:childrenString,isDisabled:disabled,size:size,variant:variant,theme:theme,intent:intent,contrast:contrast,hasIcon:Boolean(Icon)}),activeBorderColor=_getProps.activeBorderColor,activeBackgroundColor=_getProps.activeBackgroundColor,defaultBorderColor=_getProps.defaultBorderColor,defaultBackgroundColor=_getProps.defaultBackgroundColor,minHeight=_getProps.minHeight,buttonPaddingTop=_getProps.buttonPaddingTop,buttonPaddingBottom=_getProps.buttonPaddingBottom,buttonPaddingLeft=_getProps.buttonPaddingLeft,buttonPaddingRight=_getProps.buttonPaddingRight,focusBorderColor=_getProps.focusBorderColor,focusBackgroundColor=_getProps.focusBackgroundColor,focusRingColor=_getProps.focusRingColor,fontSize=_getProps.fontSize,hoverBorderColor=_getProps.hoverBorderColor,hoverBackgroundColor=_getProps.hoverBackgroundColor,iconColor=_getProps.iconColor,iconSize=_getProps.iconSize,iconPadding=_getProps.iconPadding,spinnerSize=_getProps.spinnerSize,lineHeight=_getProps.lineHeight,text=_getProps.text,textColor=_getProps.textColor,borderWidth=_getProps.borderWidth,borderRadius=_getProps.borderRadius,motionDuration=_getProps.motionDuration,motionEasing=_getProps.motionEasing;return jsxs(StyledBaseButton,_extends({ref:buttonRef,accessibilityProps:_extends({},makeAccessible({role:'button',label:accessibilityLabel})),isLoading:isLoading,disabled:disabled,activeBorderColor:activeBorderColor,activeBackgroundColor:activeBackgroundColor,defaultBorderColor:defaultBorderColor,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,defaultBackgroundColor:defaultBackgroundColor,focusBorderColor:focusBorderColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,hoverBackgroundColor:hoverBackgroundColor,isFullWidth:isFullWidth,onClick:onClick,type:type,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing},metaAttribute({name:MetaConstants.Button,testID:testID}),styledProps,{children:[isLoading?jsx(BaseBox,{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"0px",left:"0px",bottom:"0px",right:"0px",children:jsx(BaseSpinner,{accessibilityLabel:"Loading",size:spinnerSize,intent:intent,contrast:contrast})}):null,jsxs(ButtonContent,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",flex:1,isHidden:isLoading,children:[Icon&&iconPosition=='left'?jsx(BaseBox,{paddingRight:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null,text?jsx(BaseText,{lineHeight:lineHeight,fontSize:fontSize,fontWeight:"bold",textAlign:"center",color:textColor,children:text}):null,Icon&&iconPosition=='right'?jsx(BaseBox,{paddingLeft:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null]})]}));};var BaseButton=assignWithoutSideEffects(React__default.forwardRef(_BaseButton),{displayName:'BaseButton'});
3962
+ var _excluded$o=["variant","intent","contrast","size","icon","iconPosition","isDisabled","isFullWidth","isLoading","onClick","onBlur","onKeyDown","type","children","accessibilityLabel","testID"];var getColorToken$1=function getColorToken(_ref){var property=_ref.property,variant=_ref.variant,state=_ref.state,contrast=_ref.contrast,intent=_ref.intent;if(intent&&contrast){return "feedback."+intent+".action."+property+".primary."+state+"."+contrast+"Contrast";}return "action."+property+"."+variant+"."+state;};var getProps$1=function getProps(_ref2){var buttonTypographyTokens=_ref2.buttonTypographyTokens,children=_ref2.children,isDisabled=_ref2.isDisabled,size=_ref2.size,theme=_ref2.theme,variant=_ref2.variant,intent=_ref2.intent,contrast=_ref2.contrast,hasIcon=_ref2.hasIcon;var isIconOnly=hasIcon&&(!children||(children==null?void 0:children.trim().length)===0);var props={iconSize:isIconOnly?buttonIconOnlySizeToIconSizeMap[size]:buttonSizeToIconSizeMap[size],spinnerSize:buttonSizeToSpinnerSizeMap[size],fontSize:buttonTypographyTokens.fonts.size[size],lineHeight:buttonTypographyTokens.lineHeights[size],minHeight:makeSize(minHeight[size]),iconPadding:hasIcon&&children!=null&&children.trim()?"spacing."+textPadding[size]:undefined,iconColor:getColorToken$1({property:'icon',variant:variant,contrast:contrast,intent:intent,state:'default'}),textColor:getColorToken$1({property:'text',variant:variant,contrast:contrast,intent:intent,state:'default'}),buttonPaddingTop:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].top]):makeSpace(theme.spacing[buttonPadding[size].top]),buttonPaddingBottom:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].bottom]):makeSpace(theme.spacing[buttonPadding[size].bottom]),buttonPaddingLeft:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].left]):makeSpace(theme.spacing[buttonPadding[size].left]),buttonPaddingRight:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].right]):makeSpace(theme.spacing[buttonPadding[size].right]),text:size==='xsmall'?children==null?void 0:children.trim().toUpperCase():children==null?void 0:children.trim(),defaultBackgroundColor:get_1(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'default'})),defaultBorderColor:get_1(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'default'})),hoverBackgroundColor:get_1(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'hover'})),hoverBorderColor:get_1(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'hover'})),activeBackgroundColor:get_1(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'active'})),activeBorderColor:get_1(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'active'})),focusBackgroundColor:get_1(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'focus'})),focusBorderColor:get_1(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'focus'})),focusRingColor:get_1(theme.colors,'brand.primary.400'),borderWidth:makeBorderSize(theme.border.width.thin),borderRadius:makeBorderSize(theme.border.radius.small),motionDuration:'duration.xquick',motionEasing:'easing.standard.effective'};if(isDisabled){var disabledBackgroundColor=get_1(theme.colors,getColorToken$1({property:'background',variant:variant,contrast:contrast,intent:intent,state:'disabled'}));var disabledBorderColor=get_1(theme.colors,getColorToken$1({property:'border',variant:variant,contrast:contrast,intent:intent,state:'disabled'}));props.iconColor=getColorToken$1({property:'icon',variant:variant,contrast:contrast,intent:intent,state:'disabled'});props.textColor=getColorToken$1({property:'text',variant:variant,contrast:contrast,intent:intent,state:'disabled'});props.defaultBackgroundColor=disabledBackgroundColor;props.defaultBorderColor=disabledBorderColor;props.hoverBackgroundColor=disabledBackgroundColor;props.hoverBorderColor=disabledBorderColor;props.activeBackgroundColor=disabledBackgroundColor;props.activeBorderColor=disabledBorderColor;props.focusBackgroundColor=disabledBackgroundColor;props.focusBorderColor=disabledBorderColor;}return props;};var ButtonContent=styled(BaseBox)(function(_ref3){var isHidden=_ref3.isHidden;return {opacity:isHidden?0:1};});var _BaseButton=function _BaseButton(_ref4,ref){var _ref4$variant=_ref4.variant,variant=_ref4$variant===void 0?'primary':_ref4$variant,intent=_ref4.intent,_ref4$contrast=_ref4.contrast,contrast=_ref4$contrast===void 0?'low':_ref4$contrast,_ref4$size=_ref4.size,size=_ref4$size===void 0?'medium':_ref4$size,Icon=_ref4.icon,_ref4$iconPosition=_ref4.iconPosition,iconPosition=_ref4$iconPosition===void 0?'left':_ref4$iconPosition,_ref4$isDisabled=_ref4.isDisabled,isDisabled=_ref4$isDisabled===void 0?false:_ref4$isDisabled,_ref4$isFullWidth=_ref4.isFullWidth,isFullWidth=_ref4$isFullWidth===void 0?false:_ref4$isFullWidth,_ref4$isLoading=_ref4.isLoading,isLoading=_ref4$isLoading===void 0?false:_ref4$isLoading,onClick=_ref4.onClick,onBlur=_ref4.onBlur,onKeyDown=_ref4.onKeyDown,_ref4$type=_ref4.type,type=_ref4$type===void 0?'button':_ref4$type,children=_ref4.children,accessibilityLabel=_ref4.accessibilityLabel,testID=_ref4.testID,styledProps=_objectWithoutProperties(_ref4,_excluded$o);var childrenString=getStringFromReactText(children);var buttonRef=useBladeInnerRef(ref);var disabled=isLoading||isDisabled;var _useTheme=useTheme(),theme=_useTheme.theme;if(!Icon&&!(childrenString!=null&&childrenString.trim())){throw new Error("[Blade: BaseButton]: At least one of icon or text is required to render a button.");}var prevLoading=usePrevious(isLoading);React__default.useEffect(function(){if(isLoading)announce('Started loading');if(!isLoading&&prevLoading)announce('Stopped loading');},[isLoading,prevLoading]);var _getProps=getProps$1({buttonTypographyTokens:typography,children:childrenString,isDisabled:disabled,size:size,variant:variant,theme:theme,intent:intent,contrast:contrast,hasIcon:Boolean(Icon)}),activeBorderColor=_getProps.activeBorderColor,activeBackgroundColor=_getProps.activeBackgroundColor,defaultBorderColor=_getProps.defaultBorderColor,defaultBackgroundColor=_getProps.defaultBackgroundColor,minHeight=_getProps.minHeight,buttonPaddingTop=_getProps.buttonPaddingTop,buttonPaddingBottom=_getProps.buttonPaddingBottom,buttonPaddingLeft=_getProps.buttonPaddingLeft,buttonPaddingRight=_getProps.buttonPaddingRight,focusBorderColor=_getProps.focusBorderColor,focusBackgroundColor=_getProps.focusBackgroundColor,focusRingColor=_getProps.focusRingColor,fontSize=_getProps.fontSize,hoverBorderColor=_getProps.hoverBorderColor,hoverBackgroundColor=_getProps.hoverBackgroundColor,iconColor=_getProps.iconColor,iconSize=_getProps.iconSize,iconPadding=_getProps.iconPadding,spinnerSize=_getProps.spinnerSize,lineHeight=_getProps.lineHeight,text=_getProps.text,textColor=_getProps.textColor,borderWidth=_getProps.borderWidth,borderRadius=_getProps.borderRadius,motionDuration=_getProps.motionDuration,motionEasing=_getProps.motionEasing;return jsxs(StyledBaseButton,_extends({ref:buttonRef,accessibilityProps:_extends({},makeAccessible({role:'button',label:accessibilityLabel})),isLoading:isLoading,disabled:disabled,activeBorderColor:activeBorderColor,activeBackgroundColor:activeBackgroundColor,defaultBorderColor:defaultBorderColor,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,defaultBackgroundColor:defaultBackgroundColor,focusBorderColor:focusBorderColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,hoverBackgroundColor:hoverBackgroundColor,isFullWidth:isFullWidth,onClick:onClick,onBlur:onBlur,onKeyDown:onKeyDown,type:type,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing},metaAttribute({name:MetaConstants.Button,testID:testID}),styledProps,{children:[isLoading?jsx(BaseBox,{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"0px",left:"0px",bottom:"0px",right:"0px",children:jsx(BaseSpinner,{accessibilityLabel:"Loading",size:spinnerSize,intent:intent,contrast:contrast})}):null,jsxs(ButtonContent,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",flex:1,isHidden:isLoading,children:[Icon&&iconPosition=='left'?jsx(BaseBox,{paddingRight:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null,text?jsx(BaseText,{lineHeight:lineHeight,fontSize:fontSize,fontWeight:"bold",textAlign:"center",color:textColor,children:text}):null,Icon&&iconPosition=='right'?jsx(BaseBox,{paddingLeft:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null]})]}));};var BaseButton=assignWithoutSideEffects(React__default.forwardRef(_BaseButton),{displayName:'BaseButton'});
3963
3963
 
3964
3964
  var getStyledLinkStyles=function getStyledLinkStyles(_ref){var cursor=_ref.cursor;return {padding:0,backgroundColor:'transparent',outline:'none',textDecoration:'none',border:'none',cursor:cursor};};
3965
3965
 
@@ -4011,9 +4011,9 @@ var useIsMobile=function useIsMobile(){var _useTheme=useTheme(),theme=_useTheme.
4011
4011
 
4012
4012
  var ComponentIds$1={BottomSheet:'BottomSheet',BottomSheetHeader:'BottomSheetHeader',BottomSheetFooter:'BottomSheetFooter',BottomSheetBody:'BottomSheetBody',BottomSheetGrabHandle:'BottomSheetGrabHandle'};
4013
4013
 
4014
- var _excluded$f=["children","selectionType"];var _Dropdown=function _Dropdown(_ref){var children=_ref.children,_ref$selectionType=_ref.selectionType,selectionType=_ref$selectionType===void 0?'single':_ref$selectionType,styledProps=_objectWithoutProperties(_ref,_excluded$f);var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isOpen=_React$useState2[0],setIsOpen=_React$useState2[1];var _React$useState3=React__default.useState([]),_React$useState4=_slicedToArray(_React$useState3,2),options=_React$useState4[0],setOptions=_React$useState4[1];var _React$useState5=React__default.useState([]),_React$useState6=_slicedToArray(_React$useState5,2),selectedIndices=_React$useState6[0],setSelectedIndices=_React$useState6[1];var _React$useState7=React__default.useState(-1),_React$useState8=_slicedToArray(_React$useState7,2),activeIndex=_React$useState8[0],setActiveIndex=_React$useState8[1];var _React$useState9=React__default.useState(false),_React$useState10=_slicedToArray(_React$useState9,2),shouldIgnoreBlur=_React$useState10[0],setShouldIgnoreBlur=_React$useState10[1];var _React$useState11=React__default.useState(false),_React$useState12=_slicedToArray(_React$useState11,2),shouldIgnoreBlurAnimation=_React$useState12[0],setShouldIgnoreBlurAnimation=_React$useState12[1];var triggererRef=React__default.useRef(null);var actionListItemRef=React__default.useRef(null);var _React$useState13=React__default.useState(false),_React$useState14=_slicedToArray(_React$useState13,2),hasFooterAction=_React$useState14[0],setHasFooterAction=_React$useState14[1];var _React$useState15=React__default.useState(false),_React$useState16=_slicedToArray(_React$useState15,2),hasLabelOnLeft=_React$useState16[0],setHasLabelOnLeft=_React$useState16[1];var _React$useState17=React__default.useState(false),_React$useState18=_slicedToArray(_React$useState17,2),isKeydownPressed=_React$useState18[0],setIsKeydownPressed=_React$useState18[1];var _React$useState19=React__default.useState(false),_React$useState20=_slicedToArray(_React$useState19,2),dropdownHasBottomSheet=_React$useState20[0],setDropdownHasBottomSheet=_React$useState20[1];var dropdownBaseId=useId('dropdown');var dropdownTriggerer=React__default.useRef();React__default.Children.map(children,function(child){if(React__default.isValidElement(child)){if(!isValidAllowedChildren(child,'SelectInput')&&!isValidAllowedChildren(child,componentIds.DropdownOverlay)&&!isValidAllowedChildren(child,ComponentIds$1.BottomSheet)){throw new Error("[Dropdown]: Dropdown can only have `SelectInput` and `DropdownOverlay` as children\n\n Check out: https://blade.razorpay.com/?path=/story/components-dropdown");}if(isValidAllowedChildren(child,'SelectInput')){dropdownTriggerer.current='SelectInput';}}});var contextValue=React__default.useMemo(function(){return {isOpen:isOpen,setIsOpen:setIsOpen,selectedIndices:selectedIndices,setSelectedIndices:setSelectedIndices,options:options,setOptions:setOptions,activeIndex:activeIndex,setActiveIndex:setActiveIndex,shouldIgnoreBlur:shouldIgnoreBlur,setShouldIgnoreBlur:setShouldIgnoreBlur,shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,setShouldIgnoreBlurAnimation:setShouldIgnoreBlurAnimation,isKeydownPressed:isKeydownPressed,setIsKeydownPressed:setIsKeydownPressed,dropdownBaseId:dropdownBaseId,triggererRef:triggererRef,actionListItemRef:actionListItemRef,selectionType:selectionType,hasFooterAction:hasFooterAction,setHasFooterAction:setHasFooterAction,hasLabelOnLeft:hasLabelOnLeft,setHasLabelOnLeft:setHasLabelOnLeft,dropdownTriggerer:dropdownTriggerer.current};},[isOpen,selectedIndices,options,activeIndex,shouldIgnoreBlur,shouldIgnoreBlurAnimation,selectionType,hasFooterAction,hasLabelOnLeft,isKeydownPressed]);var onBottomSheetDismiss=React__default.useCallback(function(){setIsOpen(false);},[]);var BottomSheetAndDropdownGlueContextValue=React__default.useMemo(function(){return {isOpen:isOpen,dropdownHasBottomSheet:dropdownHasBottomSheet,setDropdownHasBottomSheet:setDropdownHasBottomSheet,onBottomSheetDismiss:onBottomSheetDismiss};},[dropdownHasBottomSheet,isOpen,onBottomSheetDismiss]);return jsx(BottomSheetAndDropdownGlueContext.Provider,{value:BottomSheetAndDropdownGlueContextValue,children:jsx(DropdownContext.Provider,{value:contextValue,children:jsx(BaseBox,_extends({position:"relative"},getStyledProps(styledProps),{children:children}))})});};var Dropdown=assignWithoutSideEffects(_Dropdown,{componentId:componentIds.Dropdown});
4014
+ var _excluded$f=["children","selectionType","onDismiss"];var _Dropdown=function _Dropdown(_ref){var children=_ref.children,_ref$selectionType=_ref.selectionType,selectionType=_ref$selectionType===void 0?'single':_ref$selectionType,onDismiss=_ref.onDismiss,styledProps=_objectWithoutProperties(_ref,_excluded$f);var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isOpen=_React$useState2[0],setIsOpen=_React$useState2[1];var _React$useState3=React__default.useState([]),_React$useState4=_slicedToArray(_React$useState3,2),options=_React$useState4[0],setOptions=_React$useState4[1];var _React$useState5=React__default.useState([]),_React$useState6=_slicedToArray(_React$useState5,2),selectedIndices=_React$useState6[0],setSelectedIndices=_React$useState6[1];var _React$useState7=React__default.useState([]),_React$useState8=_slicedToArray(_React$useState7,2),controlledValueIndices=_React$useState8[0],setControlledValueIndices=_React$useState8[1];var _React$useState9=React__default.useState(-1),_React$useState10=_slicedToArray(_React$useState9,2),activeIndex=_React$useState10[0],setActiveIndex=_React$useState10[1];var _React$useState11=React__default.useState(false),_React$useState12=_slicedToArray(_React$useState11,2),shouldIgnoreBlur=_React$useState12[0],setShouldIgnoreBlur=_React$useState12[1];var _React$useState13=React__default.useState(false),_React$useState14=_slicedToArray(_React$useState13,2),shouldIgnoreBlurAnimation=_React$useState14[0],setShouldIgnoreBlurAnimation=_React$useState14[1];var triggererRef=React__default.useRef(null);var actionListItemRef=React__default.useRef(null);var _React$useState15=React__default.useState(false),_React$useState16=_slicedToArray(_React$useState15,2),hasFooterAction=_React$useState16[0],setHasFooterAction=_React$useState16[1];var _React$useState17=React__default.useState(false),_React$useState18=_slicedToArray(_React$useState17,2),hasLabelOnLeft=_React$useState18[0],setHasLabelOnLeft=_React$useState18[1];var _React$useState19=React__default.useState(false),_React$useState20=_slicedToArray(_React$useState19,2),isKeydownPressed=_React$useState20[0],setIsKeydownPressed=_React$useState20[1];var _React$useState21=React__default.useState(0),_React$useState22=_slicedToArray(_React$useState21,2),changeCallbackTriggerer=_React$useState22[0],setChangeCallbackTriggerer=_React$useState22[1];var _React$useState23=React__default.useState(false),_React$useState24=_slicedToArray(_React$useState23,2),isControlled=_React$useState24[0],setIsControlled=_React$useState24[1];var _React$useState25=React__default.useState(false),_React$useState26=_slicedToArray(_React$useState25,2),dropdownHasBottomSheet=_React$useState26[0],setDropdownHasBottomSheet=_React$useState26[1];var dropdownBaseId=useId('dropdown');var dropdownTriggerer=React__default.useRef();var close=React__default.useCallback(function(){setIsOpen(false);onDismiss==null?void 0:onDismiss();},[onDismiss]);React__default.Children.map(children,function(child){if(React__default.isValidElement(child)){if(!isValidAllowedChildren(child,componentIds.triggers.SelectInput)&&!isValidAllowedChildren(child,componentIds.triggers.DropdownButton)&&!isValidAllowedChildren(child,componentIds.DropdownOverlay)&&!isValidAllowedChildren(child,ComponentIds$1.BottomSheet)){throw new Error("[Dropdown]: Dropdown can only have `SelectInput` and `DropdownOverlay` as children\n\n Check out: https://blade.razorpay.com/?path=/story/components-dropdown");}if(isValidAllowedChildren(child,componentIds.triggers.SelectInput)){dropdownTriggerer.current='SelectInput';}if(isValidAllowedChildren(child,componentIds.triggers.DropdownButton)){dropdownTriggerer.current='DropdownButton';}}});var contextValue=React__default.useMemo(function(){return {isOpen:isOpen,setIsOpen:setIsOpen,close:close,selectedIndices:selectedIndices,setSelectedIndices:setSelectedIndices,controlledValueIndices:controlledValueIndices,setControlledValueIndices:setControlledValueIndices,options:options,setOptions:setOptions,activeIndex:activeIndex,setActiveIndex:setActiveIndex,shouldIgnoreBlur:shouldIgnoreBlur,setShouldIgnoreBlur:setShouldIgnoreBlur,shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,setShouldIgnoreBlurAnimation:setShouldIgnoreBlurAnimation,isKeydownPressed:isKeydownPressed,setIsKeydownPressed:setIsKeydownPressed,dropdownBaseId:dropdownBaseId,triggererRef:triggererRef,actionListItemRef:actionListItemRef,selectionType:selectionType,hasFooterAction:hasFooterAction,setHasFooterAction:setHasFooterAction,hasLabelOnLeft:hasLabelOnLeft,setHasLabelOnLeft:setHasLabelOnLeft,dropdownTriggerer:dropdownTriggerer.current,changeCallbackTriggerer:changeCallbackTriggerer,setChangeCallbackTriggerer:setChangeCallbackTriggerer,isControlled:isControlled,setIsControlled:setIsControlled};},[isOpen,selectedIndices,controlledValueIndices,options,activeIndex,shouldIgnoreBlur,shouldIgnoreBlurAnimation,selectionType,hasFooterAction,hasLabelOnLeft,isKeydownPressed,changeCallbackTriggerer,isControlled]);var BottomSheetAndDropdownGlueContextValue=React__default.useMemo(function(){return {isOpen:isOpen,dropdownHasBottomSheet:dropdownHasBottomSheet,setDropdownHasBottomSheet:setDropdownHasBottomSheet,onBottomSheetDismiss:close};},[dropdownHasBottomSheet,isOpen,close]);return jsx(BottomSheetAndDropdownGlueContext.Provider,{value:BottomSheetAndDropdownGlueContextValue,children:jsx(DropdownContext.Provider,{value:contextValue,children:jsx(BaseBox,_extends({position:"relative"},getStyledProps(styledProps),{children:children}))})});};var Dropdown=assignWithoutSideEffects(_Dropdown,{componentId:componentIds.Dropdown});
4015
4015
 
4016
- var StyledDropdownOverlay=styled(BaseBox)(function(props){return {transform:"translateY("+makeSize(props.theme.spacing[3])+")"};});var StyledCloseableArea=styled(Pressable)(function(props){return {position:'static',height:'100%',width:'100%',display:props.display};});var _DropdownOverlay=function _DropdownOverlay(_ref){var children=_ref.children,testID=_ref.testID;var _useDropdown=useDropdown(),isOpen=_useDropdown.isOpen,setIsOpen=_useDropdown.setIsOpen;return jsx(BaseBox,{position:"relative",children:jsx(StyledCloseableArea,{display:isOpen?'flex':'none',onPress:function onPress(){setIsOpen(false);},testID:"closeable-area",children:jsx(StyledDropdownOverlay,_extends({display:isOpen?'flex':'none',position:"absolute",width:"100%",testID:"dropdown-overlay"},metaAttribute({name:MetaConstants.DropdownOverlay,testID:testID}),{children:children}))})});};var DropdownOverlay=assignWithoutSideEffects(_DropdownOverlay,{componentId:componentIds.DropdownOverlay});
4016
+ var StyledDropdownOverlay=styled(BaseBox)(function(props){return {transform:"translateY("+makeSize(props.theme.spacing[3])+")"};});var StyledCloseableArea=styled(Pressable)(function(props){return {position:'static',height:'100%',width:'100%',display:props.display};});var _DropdownOverlay=function _DropdownOverlay(_ref){var children=_ref.children,testID=_ref.testID;var _useDropdown=useDropdown(),isOpen=_useDropdown.isOpen,close=_useDropdown.close;return jsx(BaseBox,{position:"relative",children:jsx(StyledCloseableArea,{display:isOpen?'flex':'none',onPress:function onPress(){close();},testID:"closeable-area",children:jsx(StyledDropdownOverlay,_extends({display:isOpen?'flex':'none',position:"absolute",width:"100%",testID:"dropdown-overlay"},metaAttribute({name:MetaConstants.DropdownOverlay,testID:testID}),{children:children}))})});};var DropdownOverlay=assignWithoutSideEffects(_DropdownOverlay,{componentId:componentIds.DropdownOverlay});
4017
4017
 
4018
4018
  var getVisualContainerStyles=function getVisualContainerStyles(){return {display:'flex',flexDirection:'row',alignItems:'center'};};var getPrefixStyles=function getPrefixStyles(_ref){var hasLeadingIcon=_ref.hasLeadingIcon,hasPrefix=_ref.hasPrefix;if(hasPrefix&&hasLeadingIcon){return {paddingLeft:'spacing.2'};}if(hasPrefix&&!hasLeadingIcon){return {paddingLeft:'spacing.4'};}return {paddingLeft:'spacing.0'};};var getInteractionElementStyles=function getInteractionElementStyles(_ref2){var hasTrailingIcon=_ref2.hasTrailingIcon,hasInteractionElement=_ref2.hasInteractionElement,hasSuffix=_ref2.hasSuffix;if(hasInteractionElement&&(hasSuffix||hasTrailingIcon)){return {paddingRight:'spacing.2'};}if(hasInteractionElement&&!hasSuffix&&!hasTrailingIcon){return {paddingRight:'spacing.4'};}return {paddingRight:'spacing.0'};};var getSuffixStyles=function getSuffixStyles(_ref3){var hasTrailingIcon=_ref3.hasTrailingIcon,hasSuffix=_ref3.hasSuffix;if(hasSuffix&&hasTrailingIcon){return {paddingRight:'spacing.2'};}if(hasSuffix&&!hasTrailingIcon){return {paddingRight:'spacing.4'};}return {paddingRight:'spacing.0'};};var getInputVisualsToBeRendered=function getInputVisualsToBeRendered(_ref4){var leadingIcon=_ref4.leadingIcon,prefix=_ref4.prefix,interactionElement=_ref4.interactionElement,suffix=_ref4.suffix,trailingIcon=_ref4.trailingIcon;return {hasLeadingIcon:Boolean(leadingIcon),hasPrefix:Boolean(prefix),hasInteractionElement:Boolean(interactionElement),hasSuffix:Boolean(suffix),hasTrailingIcon:Boolean(trailingIcon)};};var BaseInputVisuals=function BaseInputVisuals(_ref5){var LeadingIcon=_ref5.leadingIcon,prefix=_ref5.prefix,interactionElement=_ref5.interactionElement,suffix=_ref5.suffix,TrailingIcon=_ref5.trailingIcon,isDisabled=_ref5.isDisabled;var _getInputVisualsToBeR=getInputVisualsToBeRendered({leadingIcon:LeadingIcon,prefix:prefix,interactionElement:interactionElement,suffix:suffix,trailingIcon:TrailingIcon}),hasLeadingIcon=_getInputVisualsToBeR.hasLeadingIcon,hasPrefix=_getInputVisualsToBeR.hasPrefix,hasInteractionElement=_getInputVisualsToBeR.hasInteractionElement,hasSuffix=_getInputVisualsToBeR.hasSuffix,hasTrailingIcon=_getInputVisualsToBeR.hasTrailingIcon;var hasLeadingVisuals=hasLeadingIcon||hasPrefix;var hasTrailingVisuals=hasInteractionElement||hasSuffix||hasTrailingIcon;if(hasLeadingVisuals){return jsxs(BaseBox,_extends({},getVisualContainerStyles(),{children:[LeadingIcon?jsx(BaseBox,{paddingLeft:"spacing.4",display:"flex",children:jsx(LeadingIcon,{size:"medium",color:isDisabled?'surface.text.placeholder.lowContrast':'surface.text.subtle.lowContrast'})}):null,hasPrefix?jsx(BaseBox,_extends({},getPrefixStyles({hasLeadingIcon:hasLeadingIcon,hasPrefix:hasPrefix}),{children:jsx(Text,{size:"medium",variant:"body",weight:"regular",contrast:"low",type:isDisabled?'placeholder':'subtle',children:prefix})})):null]}));}if(hasTrailingVisuals){return jsxs(BaseBox,_extends({},getVisualContainerStyles(),{children:[hasInteractionElement?jsx(BaseBox,_extends({},getInteractionElementStyles({hasTrailingIcon:hasTrailingIcon,hasInteractionElement:hasInteractionElement,hasSuffix:hasSuffix}),{display:"flex",children:interactionElement})):null,hasSuffix?jsx(BaseBox,_extends({},getSuffixStyles({hasTrailingIcon:hasTrailingIcon,hasSuffix:hasSuffix}),{children:jsx(Text,{size:"medium",variant:"body",weight:"regular",contrast:"low",type:isDisabled?'placeholder':'subtle',children:suffix})})):null,TrailingIcon?jsx(BaseBox,{paddingRight:"spacing.4",display:"flex",children:jsx(TrailingIcon,{size:"medium",color:isDisabled?'surface.text.placeholder.lowContrast':'surface.text.subtle.lowContrast'})}):null]}));}return null;};
4019
4019
 
@@ -4043,7 +4043,7 @@ var _excluded$7=["autoFocus","errorText","helpText","isDisabled","keyboardReturn
4043
4043
 
4044
4044
  var StyledChevronIconContainer=styled(TouchableOpacity)(function(_props){return {display:'flex',justifyContent:'center'};});var SelectChevronIcon=function SelectChevronIcon(props){var Icon=props.icon;return jsx(StyledChevronIconContainer,{accessibilityLabel:"Chevron Icon",onPress:props.onClick,children:jsx(Icon,{color:"surface.text.normal.lowContrast",size:"medium"})});};
4045
4045
 
4046
- var _excluded$6=["icon","onChange","placeholder","onBlur"];var _SelectInput=function _SelectInput(props,ref){var _props$label;var _useDropdown=useDropdown(),isOpen=_useDropdown.isOpen,value=_useDropdown.value,displayValue=_useDropdown.displayValue,onTriggerClick=_useDropdown.onTriggerClick,onTriggerKeydown=_useDropdown.onTriggerKeydown,onTriggerBlur=_useDropdown.onTriggerBlur,dropdownBaseId=_useDropdown.dropdownBaseId,activeIndex=_useDropdown.activeIndex,triggererRef=_useDropdown.triggererRef,hasFooterAction=_useDropdown.hasFooterAction,dropdownTriggerer=_useDropdown.dropdownTriggerer,shouldIgnoreBlurAnimation=_useDropdown.shouldIgnoreBlurAnimation,setHasLabelOnLeft=_useDropdown.setHasLabelOnLeft;var inputRef=useBladeInnerRef(ref);var icon=props.icon,onChange=props.onChange,_props$placeholder=props.placeholder,placeholder=_props$placeholder===void 0?'Select Option':_props$placeholder,_onBlur=props.onBlur,baseInputProps=_objectWithoutProperties(props,_excluded$6);React__default.useEffect(function(){onChange==null?void 0:onChange({name:props.name,values:value.split(', ')});},[value,props.name]);React__default.useEffect(function(){setHasLabelOnLeft(props.labelPosition==='left');},[props.labelPosition,setHasLabelOnLeft]);return jsxs(BaseBox,{position:"relative",children:[!isReactNative$4()?jsx(VisuallyHidden,{children:jsx("input",{ref:inputRef,tabIndex:-1,required:props.isRequired,name:props.name,value:value,onChange:function onChange(){},"aria-hidden":true})}):null,jsx(BaseInput,_extends({},baseInputProps,{as:"button",hideLabelText:((_props$label=props.label)==null?void 0:_props$label.length)===0,componentName:MetaConstants.SelectInput,ref:!isReactNative$4()?triggererRef:null,textAlign:"left",value:displayValue,placeholder:placeholder,id:dropdownBaseId+"-trigger",labelId:dropdownBaseId+"-label",leadingIcon:icon,hasPopup:getActionListContainerRole(hasFooterAction,dropdownTriggerer),isPopupExpanded:isOpen,onClick:function onClick(e){onTriggerClick();props==null?void 0:props.onClick==null?void 0:props.onClick(e);},onKeyDown:onTriggerKeydown,onBlur:function onBlur(_ref){var name=_ref.name;onTriggerBlur==null?void 0:onTriggerBlur({name:name,value:value,onBlurCallback:_onBlur});},activeDescendant:activeIndex>=0?dropdownBaseId+"-"+activeIndex:undefined,popupId:dropdownBaseId+"-actionlist",shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,interactionElement:jsx(SelectChevronIcon,{onClick:function onClick(){if(!isReactNative$4()){var _triggererRef$current2;(_triggererRef$current2=triggererRef.current)==null?void 0:_triggererRef$current2.focus();}onTriggerClick();},icon:isOpen?ChevronUpIcon:ChevronDownIcon}),testID:props.testID}))]});};var SelectInput=assignWithoutSideEffects(React__default.forwardRef(_SelectInput),{componentId:'SelectInput'});
4046
+ var _excluded$6=["icon","onChange","defaultValue","placeholder","onBlur"];var _SelectInput=function _SelectInput(props,ref){var _props$label;var _useDropdown=useDropdown(),isOpen=_useDropdown.isOpen,value=_useDropdown.value,displayValue=_useDropdown.displayValue,onTriggerClick=_useDropdown.onTriggerClick,onTriggerKeydown=_useDropdown.onTriggerKeydown,onTriggerBlur=_useDropdown.onTriggerBlur,dropdownBaseId=_useDropdown.dropdownBaseId,activeIndex=_useDropdown.activeIndex,triggererRef=_useDropdown.triggererRef,hasFooterAction=_useDropdown.hasFooterAction,dropdownTriggerer=_useDropdown.dropdownTriggerer,shouldIgnoreBlurAnimation=_useDropdown.shouldIgnoreBlurAnimation,setHasLabelOnLeft=_useDropdown.setHasLabelOnLeft,setSelectedIndices=_useDropdown.setSelectedIndices,controlledValueIndices=_useDropdown.controlledValueIndices,options=_useDropdown.options,changeCallbackTriggerer=_useDropdown.changeCallbackTriggerer,isControlled=_useDropdown.isControlled,setIsControlled=_useDropdown.setIsControlled,selectionType=_useDropdown.selectionType,selectedIndices=_useDropdown.selectedIndices;var inputRef=useBladeInnerRef(ref);var icon=props.icon;props.onChange;props.defaultValue;var _props$placeholder=props.placeholder,placeholder=_props$placeholder===void 0?'Select Option':_props$placeholder,_onBlur=props.onBlur,baseInputProps=_objectWithoutProperties(props,_excluded$6);var getValuesArrayFromIndices=function getValuesArrayFromIndices(){var indices=[];if(isControlled){indices=controlledValueIndices;}else {indices=selectedIndices;}return indices.map(function(selectionIndex){return options[selectionIndex].value;});};var isFirstRenderRef=React__default.useRef(true);var selectValues=function selectValues(valuesToSelect){if(options.length>0){if(typeof valuesToSelect==='string'){var selectedItemIndex=options.findIndex(function(option){return option.value===valuesToSelect;});if(selectedItemIndex>=0){setSelectedIndices([selectedItemIndex]);}}else {var uniqueValues=Array.from(new Set(valuesToSelect));var userValues=selectionType==='single'?[valuesToSelect==null?void 0:valuesToSelect[0]]:uniqueValues;var selectedItemIndices=userValues.map(function(optionValue){return options.findIndex(function(option){return option.value===optionValue;});}).filter(function(value){return value>=0;});setSelectedIndices(selectedItemIndices);}}};React__default.useEffect(function(){if(options.length>0&&props.defaultValue){selectValues(props.defaultValue);}},[options.length]);React__default.useEffect(function(){if(options.length>0&&props.value){if(!isControlled){setIsControlled(true);}selectValues(props.value);}},[props.value,options]);React__default.useEffect(function(){if(isFirstRenderRef.current){isFirstRenderRef.current=false;return;}if(props.onChange&&!isFirstRenderRef.current){props.onChange({name:props.name,values:getValuesArrayFromIndices()});}},[changeCallbackTriggerer]);React__default.useEffect(function(){setHasLabelOnLeft(props.labelPosition==='left');},[props.labelPosition,setHasLabelOnLeft]);return jsxs(BaseBox,{position:"relative",children:[!isReactNative$4()?jsx(VisuallyHidden,{children:jsx("input",{ref:inputRef,tabIndex:-1,required:props.isRequired,name:props.name,value:value,onChange:function onChange(){},"aria-hidden":true})}):null,jsx(BaseInput,_extends({},baseInputProps,{as:"button",hideLabelText:((_props$label=props.label)==null?void 0:_props$label.length)===0,componentName:MetaConstants.SelectInput,ref:!isReactNative$4()?triggererRef:null,textAlign:"left",value:displayValue,placeholder:placeholder,id:dropdownBaseId+"-trigger",labelId:dropdownBaseId+"-label",leadingIcon:icon,hasPopup:getActionListContainerRole(hasFooterAction,dropdownTriggerer),isPopupExpanded:isOpen,onClick:function onClick(e){onTriggerClick();props==null?void 0:props.onClick==null?void 0:props.onClick(e);},onKeyDown:onTriggerKeydown,onBlur:function onBlur(_ref){var name=_ref.name;onTriggerBlur==null?void 0:onTriggerBlur({name:name,value:value,onBlurCallback:_onBlur});},activeDescendant:activeIndex>=0?dropdownBaseId+"-"+activeIndex:undefined,popupId:dropdownBaseId+"-actionlist",shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,interactionElement:jsx(SelectChevronIcon,{onClick:function onClick(){if(!isReactNative$4()){var _triggererRef$current2;(_triggererRef$current2=triggererRef.current)==null?void 0:_triggererRef$current2.focus();}onTriggerClick();},icon:isOpen?ChevronUpIcon:ChevronDownIcon}),testID:props.testID}))]});};var SelectInput=assignWithoutSideEffects(React__default.forwardRef(_SelectInput),{componentId:componentIds.triggers.SelectInput});
4047
4047
 
4048
4048
  var _excluded$5=["accessibilityLabel","children","size","intent","testID"];var Indicator=function Indicator(_ref){var accessibilityLabel=_ref.accessibilityLabel,children=_ref.children,_ref$size=_ref.size,size$1=_ref$size===void 0?'medium':_ref$size,_ref$intent=_ref.intent,intent=_ref$intent===void 0?'neutral':_ref$intent,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$5);var _useTheme=useTheme(),theme=_useTheme.theme;var childrenString=getStringFromReactText(children);var fillColor=theme.colors.feedback.background[intent].highContrast;var strokeColor=theme.colors.brand.gray.a100.highContrast;var getDimension=useCallback(function(){switch(size$1){case'small':return {svgSize:size[6],textSize:'small'};case'large':return {svgSize:size[10],textSize:'medium'};default:return {svgSize:size[8],textSize:'medium'};}},[size$1]);var dimensions=getDimension();var isReactNative=getPlatformType()==='react-native';var isWeb=!isReactNative;var a11yProps=makeAccessible(_extends({label:accessibilityLabel!=null?accessibilityLabel:childrenString},isWeb&&{role:'status'}));return jsxs(BaseBox,_extends({display:"flex",flexDirection:"row",alignItems:"center"},a11yProps,metaAttribute({name:MetaConstants.Indicator,testID:testID}),getStyledProps(styledProps),{children:[jsxs(Svg,{width:String(dimensions.svgSize),height:String(dimensions.svgSize),viewBox:"0 0 10 10",fill:"none",children:[jsx(Circle,{cx:"5",cy:"5",r:"5",fill:fillColor}),jsx(Circle,{cx:"5",cy:"5",r:"4.75",stroke:strokeColor,strokeWidth:"0.5"})]}),jsx(BaseBox,{marginLeft:"spacing.2",children:jsx(Text,{contrast:"low",type:"subtle",size:dimensions.textSize,children:children})})]}));};
4049
4049