@razorpay/blade 12.18.0 → 12.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/build/lib/native/components/ActionList/ActionListItem.js +4 -4
  2. package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
  3. package/build/lib/native/components/ActionList/componentIds.js +1 -1
  4. package/build/lib/native/components/ActionList/componentIds.js.map +1 -1
  5. package/build/lib/native/components/BaseMenu/BaseMenuItem/tokens.js.map +1 -1
  6. package/build/lib/native/components/index.js +1 -1
  7. package/build/lib/web/development/components/ActionList/ActionListBox.web.js +170 -36
  8. package/build/lib/web/development/components/ActionList/ActionListBox.web.js.map +1 -1
  9. package/build/lib/web/development/components/ActionList/ActionListItem.js +48 -29
  10. package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
  11. package/build/lib/web/development/components/ActionList/componentIds.js +2 -1
  12. package/build/lib/web/development/components/ActionList/componentIds.js.map +1 -1
  13. package/build/lib/web/development/components/ActionList/index.js +1 -1
  14. package/build/lib/web/development/components/BaseMenu/BaseMenuItem/tokens.js +8 -2
  15. package/build/lib/web/development/components/BaseMenu/BaseMenuItem/tokens.js.map +1 -1
  16. package/build/lib/web/development/components/index.js +1 -1
  17. package/build/lib/web/production/components/ActionList/ActionListBox.web.js +170 -36
  18. package/build/lib/web/production/components/ActionList/ActionListBox.web.js.map +1 -1
  19. package/build/lib/web/production/components/ActionList/ActionListItem.js +48 -29
  20. package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
  21. package/build/lib/web/production/components/ActionList/componentIds.js +2 -1
  22. package/build/lib/web/production/components/ActionList/componentIds.js.map +1 -1
  23. package/build/lib/web/production/components/ActionList/index.js +1 -1
  24. package/build/lib/web/production/components/BaseMenu/BaseMenuItem/tokens.js +8 -2
  25. package/build/lib/web/production/components/BaseMenu/BaseMenuItem/tokens.js.map +1 -1
  26. package/build/lib/web/production/components/index.js +1 -1
  27. package/build/types/components/index.d.ts +19 -3
  28. package/build/types/components/index.native.d.ts +19 -3
  29. package/package.json +1 -1
@@ -3,7 +3,7 @@ import React__default from 'react';
3
3
  import styled from 'styled-components/native';
4
4
  import { componentIds } from './componentIds.js';
5
5
  import { validateActionListItemProps, getNormalTextColor } from './actionListUtils.js';
6
- import { getActionListItemRole, getActionListSectionRole } from './getA11yRoles.js';
6
+ import { getActionListSectionRole, getActionListItemRole } from './getA11yRoles.js';
7
7
  import { Divider } from '../Divider/Divider.js';
8
8
  import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
9
9
  import { useDropdown } from '../Dropdown/useDropdown.js';
@@ -35,14 +35,14 @@ import '../../utils/useCallbackRef.js';
35
35
  import '@gorhom/portal';
36
36
  import 'react-native-gesture-handler';
37
37
  import '../BottomSheet/BottomSheetStack.js';
38
- import { jsx, jsxs } from 'react/jsx-runtime';
38
+ import { jsxs, jsx } from 'react/jsx-runtime';
39
39
  import 'react-native-svg';
40
40
  import '../Icons/_Svg/Svg/Svg.native.js';
41
41
  import '../VisuallyHidden/VisuallyHidden.native.js';
42
42
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
43
43
  import { Avatar } from '../Avatar/Avatar.native.js';
44
44
 
45
- var _excluded=["title","children","testID","_hideDivider","_sectionChildValues"];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,_sectionChildValues=_ref._sectionChildValues,rest=_objectWithoutProperties(_ref,_excluded);var _useDropdown=useDropdown(),hasAutoCompleteInBottomSheetHeader=_useDropdown.hasAutoCompleteInBottomSheetHeader,dropdownTriggerer=_useDropdown.dropdownTriggerer,filteredValues=_useDropdown.filteredValues;var hasAutoComplete=hasAutoCompleteInBottomSheetHeader||dropdownTriggerer===dropdownComponentIds.triggers.AutoComplete;var isSectionVisible=React__default.useMemo(function(){if(hasAutoComplete){var visibleActionListItemInSection=_sectionChildValues==null?void 0:_sectionChildValues.find(function(actionItemValue){return filteredValues.includes(actionItemValue);});return Boolean(visibleActionListItemInSection);}return true;},[_sectionChildValues,hasAutoComplete,filteredValues]);var showDividerInRN=!(_hideDivider&&isReactNative());var showDividerInAutoComplete=hasAutoComplete?isSectionVisible&&filteredValues.length>1:true;return jsxs(BaseBox,Object.assign({},makeAccessible({role:getActionListSectionRole(),label:title}),metaAttribute({name:MetaConstants.ActionListSection,testID:testID}),makeAnalyticsAttribute(rest),{children:[isSectionVisible?jsx(StyledActionListSectionTitle,Object.assign({},makeAccessible({hidden:true}),{children:jsx(Text,{color:"surface.text.gray.muted",size:"small",weight:"semibold",children:title})})):null,jsx(BaseBox,Object.assign({},makeAccessible({role:isReactNative()?undefined:'listbox'}),{children:children})),showDividerInAutoComplete&&showDividerInRN?jsx(Divider,{marginX:"spacing.3",marginY:"spacing.1"}):null]}));};var ActionListSection=assignWithoutSideEffects(_ActionListSection,{componentId:componentIds.ActionListSection});var _ActionListItemIcon=function _ActionListItemIcon(_ref2){var icon=_ref2.icon;var Icon=icon;var _useBaseMenuItem=useBaseMenuItem(),color=_useBaseMenuItem.color,isDisabled=_useBaseMenuItem.isDisabled;var iconState=isDisabled?'disabled':'muted';return jsx(Icon,{color:color==='negative'?'feedback.icon.negative.intense':`interactive.icon.gray.${iconState}`,size:"medium"});};var ActionListItemIcon=assignWithoutSideEffects(_ActionListItemIcon,{componentId:componentIds.ActionListItemIcon});var _ActionListItemBadgeGroup=function _ActionListItemBadgeGroup(_ref3){var children=_ref3.children;return jsx(Box,{display:"flex",alignItems:"center",flexDirection:"row",children:children});};var ActionListItemBadgeGroup=assignWithoutSideEffects(_ActionListItemBadgeGroup,{componentId:componentIds.ActionListItemBadgeGroup});var _ActionListItemAvatar=function _ActionListItemAvatar(avatarProps){return jsx(Avatar,Object.assign({size:"xsmall"},avatarProps));};var ActionListItemAvatar=assignWithoutSideEffects(_ActionListItemAvatar,{componentId:componentIds.ActionListItemAvatar});var _ActionListItemBadge=function _ActionListItemBadge(props){return jsx(Badge,Object.assign({size:"medium",marginLeft:"spacing.3"},props));};var ActionListItemBadge=assignWithoutSideEffects(_ActionListItemBadge,{componentId:componentIds.ActionListItemBadge});var _ActionListItemText=function _ActionListItemText(_ref4){var children=_ref4.children;var _useBaseMenuItem2=useBaseMenuItem(),isDisabled=_useBaseMenuItem2.isDisabled;return jsx(Text,{variant:"caption",color:getNormalTextColor(isDisabled,{isMuted:true}),children:children});};var ActionListItemText=assignWithoutSideEffects(_ActionListItemText,{componentId:componentIds.ActionListItemText});var makeActionListItemClickable=function makeActionListItemClickable(clickHandler){if(isReactNative()){return {onPress:clickHandler};}return {onClick:clickHandler};};var _ActionListItem=function _ActionListItem(props){var _useDropdown2=useDropdown(),activeIndex=_useDropdown2.activeIndex,dropdownBaseId=_useDropdown2.dropdownBaseId,onOptionClick=_useDropdown2.onOptionClick,selectedIndices=_useDropdown2.selectedIndices,setShouldIgnoreBlurAnimation=_useDropdown2.setShouldIgnoreBlurAnimation,selectionType=_useDropdown2.selectionType,dropdownTriggerer=_useDropdown2.dropdownTriggerer,isKeydownPressed=_useDropdown2.isKeydownPressed,filteredValues=_useDropdown2.filteredValues,hasAutoCompleteInBottomSheetHeader=_useDropdown2.hasAutoCompleteInBottomSheetHeader;var hasAutoComplete=hasAutoCompleteInBottomSheetHeader||dropdownTriggerer===dropdownComponentIds.triggers.AutoComplete;var renderOnWebAs=props.href?'a':'button';var getIsSelected=function getIsSelected(){if(dropdownTriggerer===dropdownComponentIds.triggers.SelectInput||hasAutoComplete){if(typeof props._index==='number'){return selectedIndices.includes(props._index);}return undefined;}return props.isSelected;};var isSelected=getIsSelected();React__default.useEffect(function(){validateActionListItemProps({leading:props.leading,trailing:props.trailing,titleSuffix:props.titleSuffix});},[props.leading,props.trailing,props.titleSuffix]);React__default.useEffect(function(){if(__DEV__){if(dropdownTriggerer===dropdownComponentIds.triggers.SelectInput&&props.intent==='negative'){throwBladeError({message:'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',moduleName:'ActionListItem'});}}},[props.intent,dropdownTriggerer]);var isVisible=hasAutoComplete&&filteredValues?filteredValues.includes(props.value):true;return jsx(BaseMenuItem,Object.assign({isVisible:isVisible,as:!isReactNative()?renderOnWebAs:undefined,id:`${dropdownBaseId}-${props._index}`,tabIndex:-1,title:props.title,description:props.description,leading:selectionType==='multiple'?jsx(BaseBox,Object.assign({pointerEvents:"none"},makeAccessible({hidden:true}),{children:jsx(Checkbox,{isChecked:isSelected,tabIndex:-1,isDisabled:props.isDisabled,children:null})})):props.leading,trailing:props.trailing,titleSuffix:props.titleSuffix,href:props.href,target:props.target,className:activeIndex===props._index?'active-focus':'',isSelected:isSelected,isDisabled:props.isDisabled,role:getActionListItemRole(dropdownTriggerer,props.href)},makeActionListItemClickable(function(e){if(typeof props._index==='number'){onOptionClick(e,props._index);props.onClick==null?void 0:props.onClick({name:props.value,value:isSelected,event:castWebType(e)});}}),makeAnalyticsAttribute(Object.assign({},props)),metaAttribute({name:MetaConstants.ActionListItem,testID:props.testID}),{onMouseDown:function onMouseDown(){setShouldIgnoreBlurAnimation(true);},onMouseUp:function onMouseUp(){setShouldIgnoreBlurAnimation(false);},"data-value":props.value,"data-index":props._index,selectionType:selectionType,color:props.intent,isKeydownPressed:isKeydownPressed}));};var ActionListItem=assignWithoutSideEffects(React__default.memo(_ActionListItem),{componentId:componentIds.ActionListItem,displayName:componentIds.ActionListItem});
45
+ var _excluded=["title","children","testID","_hideDivider","_sectionChildValues"];var StyledActionListSectionTitle=styled(BaseBox)(function(props){return {padding:makeSize(props.theme.spacing[3])};});var _ActionListSectionTitle=function _ActionListSectionTitle(_ref){var title=_ref.title,_ref$isInsideVirtuali=_ref.isInsideVirtualizedList,isInsideVirtualizedList=_ref$isInsideVirtuali===void 0?false:_ref$isInsideVirtuali;return jsx(StyledActionListSectionTitle,Object.assign({},makeAccessible({hidden:!isInsideVirtualizedList,role:isInsideVirtualizedList?'heading':undefined}),{children:jsx(Text,{color:"surface.text.gray.muted",size:"small",weight:"semibold",children:title})}));};var ActionListSectionTitle=assignWithoutSideEffects(_ActionListSectionTitle,{componentId:componentIds.ActionListSectionTitle});var _ActionListSection=function _ActionListSection(_ref2){var title=_ref2.title,children=_ref2.children,testID=_ref2.testID,_hideDivider=_ref2._hideDivider,_sectionChildValues=_ref2._sectionChildValues,rest=_objectWithoutProperties(_ref2,_excluded);var _useDropdown=useDropdown(),hasAutoCompleteInBottomSheetHeader=_useDropdown.hasAutoCompleteInBottomSheetHeader,dropdownTriggerer=_useDropdown.dropdownTriggerer,filteredValues=_useDropdown.filteredValues;var hasAutoComplete=hasAutoCompleteInBottomSheetHeader||dropdownTriggerer===dropdownComponentIds.triggers.AutoComplete;var isSectionVisible=React__default.useMemo(function(){if(hasAutoComplete){var visibleActionListItemInSection=_sectionChildValues==null?void 0:_sectionChildValues.find(function(actionItemValue){return filteredValues.includes(actionItemValue);});return Boolean(visibleActionListItemInSection);}return true;},[_sectionChildValues,hasAutoComplete,filteredValues]);var showDividerInRN=!(_hideDivider&&isReactNative());var showDividerInAutoComplete=hasAutoComplete?isSectionVisible&&filteredValues.length>1:true;return jsxs(BaseBox,Object.assign({},makeAccessible({role:getActionListSectionRole(),label:title}),metaAttribute({name:MetaConstants.ActionListSection,testID:testID}),makeAnalyticsAttribute(rest),{children:[isSectionVisible?jsx(ActionListSectionTitle,{title:title}):null,jsx(BaseBox,Object.assign({},makeAccessible({role:isReactNative()?undefined:'listbox'}),{children:children})),showDividerInAutoComplete&&showDividerInRN?jsx(Divider,{marginX:"spacing.3",marginY:"spacing.1"}):null]}));};var ActionListSection=assignWithoutSideEffects(React__default.memo(_ActionListSection),{componentId:componentIds.ActionListSection});var _ActionListItemIcon=function _ActionListItemIcon(_ref3){var icon=_ref3.icon;var Icon=icon;var _useBaseMenuItem=useBaseMenuItem(),color=_useBaseMenuItem.color,isDisabled=_useBaseMenuItem.isDisabled;var iconState=isDisabled?'disabled':'muted';return jsx(Icon,{color:color==='negative'?'feedback.icon.negative.intense':`interactive.icon.gray.${iconState}`,size:"medium"});};var ActionListItemIcon=assignWithoutSideEffects(_ActionListItemIcon,{componentId:componentIds.ActionListItemIcon});var _ActionListItemBadgeGroup=function _ActionListItemBadgeGroup(_ref4){var children=_ref4.children;return jsx(Box,{display:"flex",alignItems:"center",flexDirection:"row",children:children});};var ActionListItemBadgeGroup=assignWithoutSideEffects(_ActionListItemBadgeGroup,{componentId:componentIds.ActionListItemBadgeGroup});var _ActionListItemAvatar=function _ActionListItemAvatar(avatarProps){return jsx(Avatar,Object.assign({size:"xsmall"},avatarProps));};var ActionListItemAvatar=assignWithoutSideEffects(_ActionListItemAvatar,{componentId:componentIds.ActionListItemAvatar});var _ActionListItemBadge=function _ActionListItemBadge(props){return jsx(Badge,Object.assign({size:"medium",marginLeft:"spacing.3"},props));};var ActionListItemBadge=assignWithoutSideEffects(_ActionListItemBadge,{componentId:componentIds.ActionListItemBadge});var _ActionListItemText=function _ActionListItemText(_ref5){var children=_ref5.children;var _useBaseMenuItem2=useBaseMenuItem(),isDisabled=_useBaseMenuItem2.isDisabled;return jsx(Text,{variant:"caption",color:getNormalTextColor(isDisabled,{isMuted:true}),children:children});};var ActionListItemText=assignWithoutSideEffects(_ActionListItemText,{componentId:componentIds.ActionListItemText});var makeActionListItemClickable=function makeActionListItemClickable(clickHandler){if(isReactNative()){return {onPress:clickHandler};}return {onClick:clickHandler};};var _ActionListItem=function _ActionListItem(props){var _useDropdown2=useDropdown(),activeIndex=_useDropdown2.activeIndex,dropdownBaseId=_useDropdown2.dropdownBaseId,onOptionClick=_useDropdown2.onOptionClick,selectedIndices=_useDropdown2.selectedIndices,setShouldIgnoreBlurAnimation=_useDropdown2.setShouldIgnoreBlurAnimation,selectionType=_useDropdown2.selectionType,dropdownTriggerer=_useDropdown2.dropdownTriggerer,isKeydownPressed=_useDropdown2.isKeydownPressed,filteredValues=_useDropdown2.filteredValues,hasAutoCompleteInBottomSheetHeader=_useDropdown2.hasAutoCompleteInBottomSheetHeader;React__default.useEffect(function(){if(activeIndex===props._index&&props._virtualizedIndex!==undefined){props._onVirtualizedFocus==null?void 0:props._onVirtualizedFocus(props._virtualizedIndex);}},[activeIndex]);var hasAutoComplete=hasAutoCompleteInBottomSheetHeader||dropdownTriggerer===dropdownComponentIds.triggers.AutoComplete;var renderOnWebAs=props.href?'a':'button';var getIsSelected=function getIsSelected(){if(dropdownTriggerer===dropdownComponentIds.triggers.SelectInput||hasAutoComplete){if(typeof props._index==='number'){return selectedIndices.includes(props._index);}return undefined;}return props.isSelected;};var isSelected=getIsSelected();React__default.useEffect(function(){validateActionListItemProps({leading:props.leading,trailing:props.trailing,titleSuffix:props.titleSuffix});},[props.leading,props.trailing,props.titleSuffix]);React__default.useEffect(function(){if(__DEV__){if(dropdownTriggerer===dropdownComponentIds.triggers.SelectInput&&props.intent==='negative'){throwBladeError({message:'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',moduleName:'ActionListItem'});}}},[props.intent,dropdownTriggerer]);var isVisible=hasAutoComplete&&filteredValues?filteredValues.includes(props.value):true;return jsx(BaseMenuItem,Object.assign({isVisible:isVisible,as:!isReactNative()?renderOnWebAs:undefined,id:`${dropdownBaseId}-${props._index}`,tabIndex:-1,title:props.title,description:props.description,leading:selectionType==='multiple'?jsx(BaseBox,Object.assign({pointerEvents:"none"},makeAccessible({hidden:true}),{children:jsx(Checkbox,{isChecked:isSelected,tabIndex:-1,isDisabled:props.isDisabled,children:null})})):props.leading,trailing:props.trailing,titleSuffix:props.titleSuffix,href:props.href,target:props.target,className:activeIndex===props._index?'active-focus':'',isSelected:isSelected,isDisabled:props.isDisabled,role:getActionListItemRole(dropdownTriggerer,props.href)},makeActionListItemClickable(function(e){if(typeof props._index==='number'){onOptionClick(e,props._index);props.onClick==null?void 0:props.onClick({name:props.value,value:isSelected,event:castWebType(e)});}}),makeAnalyticsAttribute(Object.assign({},props)),metaAttribute({name:MetaConstants.ActionListItem,testID:props.testID}),{onMouseDown:function onMouseDown(){setShouldIgnoreBlurAnimation(true);},onMouseUp:function onMouseUp(){setShouldIgnoreBlurAnimation(false);},"data-value":props.value,"data-index":props._index,selectionType:selectionType,color:props.intent,isKeydownPressed:isKeydownPressed}));};var ActionListItem=assignWithoutSideEffects(React__default.memo(_ActionListItem),{componentId:componentIds.ActionListItem,displayName:componentIds.ActionListItem});
46
46
 
47
- export { ActionListItem, ActionListItemAvatar, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection };
47
+ export { ActionListItem, ActionListItemAvatar, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection, ActionListSectionTitle };
48
48
  //# sourceMappingURL=ActionListItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionListItem.js","sources":["../../../../../src/components/ActionList/ActionListItem.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TouchableOpacity } from 'react-native';\nimport { componentIds } from './componentIds';\nimport { validateActionListItemProps, getNormalTextColor } from './actionListUtils';\nimport { getActionListItemRole, getActionListSectionRole } from './getA11yRoles';\nimport { Divider } from '~components/Divider';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport type { Platform } from '~utils';\nimport { castWebType, isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DataAnalyticsAttribute, StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport type { BadgeProps } from '~components/Badge';\nimport { Badge } from '~components/Badge';\nimport { Box } from '~components/Box';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { BaseMenuItem, useBaseMenuItem } from '~components/BaseMenu';\nimport { Checkbox } from '~components/Checkbox';\nimport type { AvatarProps } from '~components/Avatar/types';\nimport { Avatar } from '~components/Avatar';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListItemProps = {\n title: string;\n description?: string;\n onClick?: (clickProps: {\n name: string;\n value?: boolean;\n event: Platform.Select<{\n web: React.MouseEvent;\n native: React.TouchEvent<TouchableOpacity>;\n }>;\n }) => void;\n /**\n * value that you get from `onChange` event on SelectInput or in form submissions.\n */\n value: string;\n /**\n * Link to open when item is clicked.\n */\n href?: string;\n /**\n * HTML target of the link\n */\n target?: string;\n /**\n * Item that goes on left-side of item.\n *\n * Valid elements - `<ActionListItemIcon />`, `<ActionListItemAsset />`\n *\n * Will be overriden in multiselect\n */\n leading?: React.ReactNode;\n /**\n * Item that goes on right-side of item.\n *\n * Valid elements - `<ActionListItemText />`, `<ActionListItemIcon />`\n */\n trailing?: React.ReactNode;\n /**\n * Item that goes immediately next to the title.\n *\n * Valid elements - `<ActionListItemBadge />`, `<ActionListItemBadgeGroup />`\n *\n */\n titleSuffix?: React.ReactElement;\n isDisabled?: boolean;\n intent?: Extract<FeedbackColors, 'negative'>;\n /**\n * Can be used in combination of `onClick` to highlight item as selected in Button Triggers.\n *\n * When trigger is SelectInput, Use `value` prop on SelectInput instead to make dropdown controlled.\n */\n isSelected?: boolean;\n /**\n * Internally passed from ActionList. No need to pass it explicitly\n *\n * @private\n */\n _index?: number;\n} & TestID &\n DataAnalyticsAttribute;\n\nconst StyledActionListSectionTitle = styled(BaseBox)((props) => ({\n // @TODO: replace this styled-component with new layout box when we have padding shorthand\n padding: makeSize(props.theme.spacing[3]),\n}));\n\ntype ActionListSectionProps = {\n title: string;\n children: React.ReactNode[] | React.ReactNode;\n /**\n * Internally used to hide the divider on final item in React Native.\n *\n * Should not be used by consumers (also won't work on web)\n *\n * @private\n */\n _hideDivider?: boolean;\n /**\n * Internally used to hide / show section in AutoComplete\n *\n * @private\n */\n _sectionChildValues?: string[];\n} & TestID &\n DataAnalyticsAttribute;\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\n ...rest\n}: ActionListSectionProps): React.ReactElement => {\n const { hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, filteredValues } = useDropdown();\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const isSectionVisible = React.useMemo(() => {\n if (hasAutoComplete) {\n const visibleActionListItemInSection = _sectionChildValues?.find((actionItemValue) =>\n filteredValues.includes(actionItemValue),\n );\n\n return Boolean(visibleActionListItemInSection);\n }\n\n return true;\n }, [_sectionChildValues, hasAutoComplete, filteredValues]);\n\n const showDividerInRN = !(_hideDivider && isReactNative());\n const showDividerInAutoComplete = hasAutoComplete\n ? isSectionVisible && filteredValues.length > 1\n : true;\n\n return (\n <BaseBox\n {...makeAccessible({\n role: getActionListSectionRole(),\n label: title,\n })}\n {...metaAttribute({ name: MetaConstants.ActionListSection, testID })}\n {...makeAnalyticsAttribute(rest as Record<string, unknown>)}\n >\n {/* We're announcing title as group label so we can hide this */}\n {isSectionVisible ? (\n <StyledActionListSectionTitle {...makeAccessible({ hidden: true })}>\n <Text color=\"surface.text.gray.muted\" size=\"small\" weight=\"semibold\">\n {title}\n </Text>\n </StyledActionListSectionTitle>\n ) : null}\n <BaseBox\n {...makeAccessible({\n // On web, we just wrap it in another listbox to announce item count properly for particular group.\n // On React Native, we ignore it since `menu` + `group` role will take care of accessibility\n role: isReactNative() ? undefined : 'listbox',\n })}\n >\n {children}\n </BaseBox>\n {showDividerInAutoComplete && showDividerInRN ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" />\n ) : null}\n </BaseBox>\n );\n};\n\nconst ActionListSection = assignWithoutSideEffects(_ActionListSection, {\n componentId: componentIds.ActionListSection,\n});\n\nconst _ActionListItemIcon = ({ icon }: { icon: IconComponent }): React.ReactElement => {\n const Icon = icon;\n const { color, isDisabled } = useBaseMenuItem();\n const iconState = isDisabled ? 'disabled' : 'muted';\n return (\n <Icon\n color={\n color === 'negative'\n ? 'feedback.icon.negative.intense'\n : `interactive.icon.gray.${iconState}`\n }\n size=\"medium\"\n />\n );\n};\n\nconst ActionListItemIcon = assignWithoutSideEffects(_ActionListItemIcon, {\n componentId: componentIds.ActionListItemIcon,\n});\n\nconst _ActionListItemBadgeGroup = ({\n children,\n}: {\n children: React.ReactElement[] | React.ReactElement;\n}): React.ReactElement => {\n return (\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n {children}\n </Box>\n );\n};\n\nconst ActionListItemBadgeGroup = assignWithoutSideEffects(_ActionListItemBadgeGroup, {\n componentId: componentIds.ActionListItemBadgeGroup,\n});\n\nconst _ActionListItemAvatar = (avatarProps: Omit<AvatarProps, 'size' | ''>): React.ReactElement => {\n return <Avatar size=\"xsmall\" {...avatarProps} />;\n};\n\nconst ActionListItemAvatar = assignWithoutSideEffects(_ActionListItemAvatar, {\n componentId: componentIds.ActionListItemAvatar,\n});\n\nconst _ActionListItemBadge = (props: BadgeProps): React.ReactElement => {\n return <Badge size=\"medium\" marginLeft=\"spacing.3\" {...props} />;\n};\n\nconst ActionListItemBadge = assignWithoutSideEffects(_ActionListItemBadge, {\n componentId: componentIds.ActionListItemBadge,\n});\n\nconst _ActionListItemText = ({\n children,\n}: {\n children: StringChildrenType;\n}): React.ReactElement => {\n const { isDisabled } = useBaseMenuItem();\n\n return (\n <Text variant=\"caption\" color={getNormalTextColor(isDisabled, { isMuted: true })}>\n {children}\n </Text>\n );\n};\n\nconst ActionListItemText = assignWithoutSideEffects(_ActionListItemText, {\n componentId: componentIds.ActionListItemText,\n});\n\ntype ClickHandlerType = (e: React.MouseEvent<HTMLButtonElement>) => void;\n\nconst makeActionListItemClickable = (\n clickHandler: ClickHandlerType,\n): { onPress?: (e: React.TouchEvent<TouchableOpacity>) => void; onClick?: ClickHandlerType } => {\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: ignoring ReactNative press type for the peace of mind\n return { onPress: clickHandler };\n }\n\n return {\n onClick: clickHandler,\n };\n};\n\n/**\n * ### ActionListItem\n *\n * Creates option inside `ActionList`.\n *\n * #### Usage\n *\n * ```jsx\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}\n * />\n * </ActionList>\n * ```\n */\nconst _ActionListItem = (props: ActionListItemProps): React.ReactElement => {\n const {\n activeIndex,\n dropdownBaseId,\n onOptionClick,\n selectedIndices,\n setShouldIgnoreBlurAnimation,\n selectionType,\n dropdownTriggerer,\n isKeydownPressed,\n filteredValues,\n hasAutoCompleteInBottomSheetHeader,\n } = useDropdown();\n\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const renderOnWebAs = props.href ? 'a' : 'button';\n\n /**\n * In SelectInput, returns the isSelected according to selected indexes in the state\n *\n * In Other Triggers (Menu Usecase), returns `props.isSelected` since passing the\n * isSelected prop explicitly is the only way to select item in menu\n */\n const getIsSelected = (): boolean | undefined => {\n if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput || hasAutoComplete) {\n if (typeof props._index === 'number') {\n return selectedIndices.includes(props._index);\n }\n\n return undefined;\n }\n\n return props.isSelected;\n };\n\n const isSelected = getIsSelected();\n\n React.useEffect(() => {\n validateActionListItemProps({\n leading: props.leading,\n trailing: props.trailing,\n titleSuffix: props.titleSuffix,\n });\n }, [props.leading, props.trailing, props.titleSuffix]);\n\n React.useEffect(() => {\n if (__DEV__) {\n if (\n dropdownTriggerer === dropdownComponentIds.triggers.SelectInput &&\n props.intent === 'negative'\n ) {\n throwBladeError({\n message:\n 'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',\n moduleName: 'ActionListItem',\n });\n }\n }\n }, [props.intent, dropdownTriggerer]);\n\n const isVisible = hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true;\n\n return (\n <BaseMenuItem\n isVisible={isVisible}\n as={!isReactNative() ? renderOnWebAs : undefined}\n id={`${dropdownBaseId}-${props._index}`}\n tabIndex={-1}\n title={props.title}\n description={props.description}\n leading={\n selectionType === 'multiple' ? (\n <BaseBox\n pointerEvents=\"none\"\n // Adding aria-hidden because the listbox item in multiselect in itself explains the behaviour so announcing checkbox is unneccesary and just a nice UI tweak for us\n {...makeAccessible({\n hidden: true,\n })}\n >\n <Checkbox isChecked={isSelected} tabIndex={-1} isDisabled={props.isDisabled}>\n {/* \n Checkbox requires children. Didn't want to make it optional because its helpful for consumers\n But for this case in particular, we just want to use Text separately so that we can control spacing and color and keep it consistent with non-multiselect dropdowns\n */}\n {null}\n </Checkbox>\n </BaseBox>\n ) : (\n props.leading\n )\n }\n trailing={props.trailing}\n titleSuffix={props.titleSuffix}\n href={props.href}\n target={props.target}\n className={activeIndex === props._index ? 'active-focus' : ''}\n isSelected={isSelected}\n isDisabled={props.isDisabled}\n role={getActionListItemRole(dropdownTriggerer, props.href)}\n {...makeActionListItemClickable((e: React.MouseEvent<HTMLButtonElement>): void => {\n if (typeof props._index === 'number') {\n onOptionClick(e, props._index);\n props.onClick?.({ name: props.value, value: isSelected, event: castWebType(e) });\n }\n })}\n {...makeAnalyticsAttribute({ ...props })}\n {...metaAttribute({ name: MetaConstants.ActionListItem, testID: props.testID })}\n onMouseDown={() => {\n // We want to keep focus on Dropdown's trigger while option is being clicked\n // So We set this flag that ignores the blur animation to avoid the flicker between focus out + focus in\n setShouldIgnoreBlurAnimation(true);\n }}\n onMouseUp={() => {\n // (Contd from above comment...) We set this flag back to false since blur of SelectInput is done calling by this time\n setShouldIgnoreBlurAnimation(false);\n }}\n data-value={props.value}\n data-index={props._index}\n selectionType={selectionType}\n color={props.intent}\n isKeydownPressed={isKeydownPressed}\n />\n );\n};\n\nconst ActionListItem = assignWithoutSideEffects(React.memo(_ActionListItem), {\n componentId: componentIds.ActionListItem,\n displayName: componentIds.ActionListItem,\n});\n\nexport type { ActionListItemProps, ActionListSectionProps };\nexport {\n ActionListItem,\n ActionListItemIcon,\n ActionListItemText,\n ActionListItemAvatar,\n ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n};\n"],"names":["StyledActionListSectionTitle","styled","BaseBox","props","padding","makeSize","theme","spacing","_ActionListSection","_ref","title","children","testID","_hideDivider","_sectionChildValues","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","React","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","Object","assign","makeAccessible","role","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","makeAnalyticsAttribute","_jsx","hidden","Text","color","size","weight","undefined","Divider","marginX","marginY","assignWithoutSideEffects","componentId","componentIds","_ActionListItemIcon","_ref2","icon","Icon","_useBaseMenuItem","useBaseMenuItem","isDisabled","iconState","ActionListItemIcon","_ActionListItemBadgeGroup","_ref3","Box","display","alignItems","flexDirection","ActionListItemBadgeGroup","_ActionListItemAvatar","avatarProps","Avatar","ActionListItemAvatar","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref4","_useBaseMenuItem2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","selectionType","isKeydownPressed","renderOnWebAs","href","getIsSelected","SelectInput","_index","isSelected","useEffect","validateActionListItemProps","leading","trailing","titleSuffix","__DEV__","intent","throwBladeError","message","moduleName","isVisible","value","BaseMenuItem","as","id","tabIndex","description","pointerEvents","Checkbox","isChecked","target","className","getActionListItemRole","e","event","castWebType","ActionListItem","onMouseDown","onMouseUp","memo","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,UAAA,CAAA,QAAA,CAAA,cAAA,CAAA,qBAAA,CAAA,CA2FA,IAAMA,4BAA4B,CAAGC,MAAM,CAACC,OAAO,CAAC,CAAC,SAACC,KAAK,SAAM,CAE/DC,OAAO,CAAEC,QAAQ,CAACF,KAAK,CAACG,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAC1C,CAAC,CAAA,CAAC,CAAC,CAqBH,IAAMC,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAAC,IAAA,CAO0B,KANhDC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CACRC,MAAM,CAAAH,IAAA,CAANG,MAAM,CACNC,YAAY,CAAAJ,IAAA,CAAZI,YAAY,CACZC,mBAAmB,CAAAL,IAAA,CAAnBK,mBAAmB,CAChBC,IAAI,CAAAC,wBAAA,CAAAP,IAAA,CAAAQ,SAAA,CAAA,CAEP,IAAAC,YAAA,CAAkFC,WAAW,EAAE,CAAvFC,kCAAkC,CAAAF,YAAA,CAAlCE,kCAAkC,CAAEC,iBAAiB,CAAAH,YAAA,CAAjBG,iBAAiB,CAAEC,cAAc,CAAAJ,YAAA,CAAdI,cAAc,CAC7E,IAAMC,eAAe,CACnBH,kCAAkC,EAClCC,iBAAiB,GAAKG,oBAAoB,CAACC,QAAQ,CAACC,YAAY,CAElE,IAAMC,gBAAgB,CAAGC,cAAK,CAACC,OAAO,CAAC,UAAM,CAC3C,GAAIN,eAAe,CAAE,CACnB,IAAMO,8BAA8B,C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AAC,MAAA,CAAA,EAAA,CAAMtC,KAAK,CAAE,CAAC,CACpC2C,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAAC4F,cAAc,CAAEhI,MAAM,CAAET,KAAK,CAACS,MAAO,CAAC,CAAC,EAC/EiI,WAAW,CAAE,SAAAA,WAAA,EAAM,CAGjBpC,4BAA4B,CAAC,IAAI,CAAC,CACpC,CAAE,CACFqC,SAAS,CAAE,SAAAA,WAAM,CAEfrC,4BAA4B,CAAC,KAAK,CAAC,CACrC,CAAE,CACF,YAAYtG,CAAAA,KAAK,CAAC0H,KAAM,CACxB,YAAY1H,CAAAA,KAAK,CAAC6G,MAAO,CACzBN,aAAa,CAAEA,aAAc,CAC7BpD,KAAK,CAAEnD,KAAK,CAACqH,MAAO,CACpBb,gBAAgB,CAAEA,gBAAiB,CACpC,CAAA,CAAC,CAEN,CAAC,CAEK,IAAAiC,cAAc,CAAG/E,wBAAwB,CAACjC,cAAK,CAACmH,IAAI,CAAC5C,eAAe,CAAC,CAAE,CAC3ErC,WAAW,CAAEC,YAAY,CAAC6E,cAAc,CACxCI,WAAW,CAAEjF,YAAY,CAAC6E,cAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"ActionListItem.js","sources":["../../../../../src/components/ActionList/ActionListItem.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TouchableOpacity } from 'react-native';\nimport { componentIds } from './componentIds';\nimport { validateActionListItemProps, getNormalTextColor } from './actionListUtils';\nimport { getActionListItemRole, getActionListSectionRole } from './getA11yRoles';\nimport { Divider } from '~components/Divider';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport type { Platform } from '~utils';\nimport { castWebType, isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DataAnalyticsAttribute, StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport type { BadgeProps } from '~components/Badge';\nimport { Badge } from '~components/Badge';\nimport { Box } from '~components/Box';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { BaseMenuItem, useBaseMenuItem } from '~components/BaseMenu';\nimport { Checkbox } from '~components/Checkbox';\nimport type { AvatarProps } from '~components/Avatar/types';\nimport { Avatar } from '~components/Avatar';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListItemProps = {\n title: string;\n description?: string;\n onClick?: (clickProps: {\n name: string;\n value?: boolean;\n event: Platform.Select<{\n web: React.MouseEvent;\n native: React.TouchEvent<TouchableOpacity>;\n }>;\n }) => void;\n /**\n * value that you get from `onChange` event on SelectInput or in form submissions.\n */\n value: string;\n /**\n * Link to open when item is clicked.\n */\n href?: string;\n /**\n * HTML target of the link\n */\n target?: string;\n /**\n * Item that goes on left-side of item.\n *\n * Valid elements - `<ActionListItemIcon />`, `<ActionListItemAsset />`\n *\n * Will be overriden in multiselect\n */\n leading?: React.ReactNode;\n /**\n * Item that goes on right-side of item.\n *\n * Valid elements - `<ActionListItemText />`, `<ActionListItemIcon />`\n */\n trailing?: React.ReactNode;\n /**\n * Item that goes immediately next to the title.\n *\n * Valid elements - `<ActionListItemBadge />`, `<ActionListItemBadgeGroup />`\n *\n */\n titleSuffix?: React.ReactElement;\n isDisabled?: boolean;\n intent?: Extract<FeedbackColors, 'negative'>;\n /**\n * Can be used in combination of `onClick` to highlight item as selected in Button Triggers.\n *\n * When trigger is SelectInput, Use `value` prop on SelectInput instead to make dropdown controlled.\n */\n isSelected?: boolean;\n /**\n * Internally passed from ActionList. No need to pass it explicitly\n *\n * @private\n */\n _index?: number;\n /**\n * Internally used to pass index for virtualized lists\n *\n * @private\n */\n _virtualizedIndex?: number;\n /**\n * Internally used to focus on virtualized list\n *\n * @private\n */\n _onVirtualizedFocus?: (_virtuazedIndex: number) => void;\n} & TestID &\n DataAnalyticsAttribute;\n\nconst StyledActionListSectionTitle = styled(BaseBox)((props) => ({\n // @TODO: replace this styled-component with new layout box when we have padding shorthand\n padding: makeSize(props.theme.spacing[3]),\n}));\n\ntype ActionListSectionProps = {\n title: string;\n children: React.ReactNode[] | React.ReactNode;\n /**\n * Internally used to hide the divider on final item in React Native\n *\n * Should not be used by consumers (also won't work on web)\n *\n * @private\n */\n _hideDivider?: boolean;\n /**\n * Internally used to hide / show section in AutoComplete\n *\n * @private\n */\n _sectionChildValues?: string[];\n} & TestID &\n DataAnalyticsAttribute;\n\nconst _ActionListSectionTitle = ({\n title,\n isInsideVirtualizedList = false,\n}: {\n title: string;\n isInsideVirtualizedList?: boolean;\n}): React.ReactElement => {\n return (\n <StyledActionListSectionTitle\n {...makeAccessible({\n hidden: !isInsideVirtualizedList,\n role: isInsideVirtualizedList ? 'heading' : undefined,\n })}\n >\n <Text color=\"surface.text.gray.muted\" size=\"small\" weight=\"semibold\">\n {title}\n </Text>\n </StyledActionListSectionTitle>\n );\n};\n\nconst ActionListSectionTitle = assignWithoutSideEffects(_ActionListSectionTitle, {\n componentId: componentIds.ActionListSectionTitle,\n});\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\n ...rest\n}: ActionListSectionProps): React.ReactElement => {\n const { hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, filteredValues } = useDropdown();\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const isSectionVisible = React.useMemo(() => {\n if (hasAutoComplete) {\n const visibleActionListItemInSection = _sectionChildValues?.find((actionItemValue) =>\n filteredValues.includes(actionItemValue),\n );\n\n return Boolean(visibleActionListItemInSection);\n }\n\n return true;\n }, [_sectionChildValues, hasAutoComplete, filteredValues]);\n\n const showDividerInRN = !(_hideDivider && isReactNative());\n const showDividerInAutoComplete = hasAutoComplete\n ? isSectionVisible && filteredValues.length > 1\n : true;\n\n return (\n <BaseBox\n {...makeAccessible({\n role: getActionListSectionRole(),\n label: title,\n })}\n {...metaAttribute({ name: MetaConstants.ActionListSection, testID })}\n {...makeAnalyticsAttribute(rest as Record<string, unknown>)}\n >\n {/* We're announcing title as group label so we can hide this */}\n {isSectionVisible ? <ActionListSectionTitle title={title} /> : null}\n\n <BaseBox\n {...makeAccessible({\n // On web, we just wrap it in another listbox to announce item count properly for particular group.\n // On React Native, we ignore it since `menu` + `group` role will take care of accessibility\n role: isReactNative() ? undefined : 'listbox',\n })}\n >\n {children}\n </BaseBox>\n {showDividerInAutoComplete && showDividerInRN ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" />\n ) : null}\n </BaseBox>\n );\n};\n\nconst ActionListSection = assignWithoutSideEffects(React.memo(_ActionListSection), {\n componentId: componentIds.ActionListSection,\n});\n\nconst _ActionListItemIcon = ({ icon }: { icon: IconComponent }): React.ReactElement => {\n const Icon = icon;\n const { color, isDisabled } = useBaseMenuItem();\n const iconState = isDisabled ? 'disabled' : 'muted';\n return (\n <Icon\n color={\n color === 'negative'\n ? 'feedback.icon.negative.intense'\n : `interactive.icon.gray.${iconState}`\n }\n size=\"medium\"\n />\n );\n};\n\nconst ActionListItemIcon = assignWithoutSideEffects(_ActionListItemIcon, {\n componentId: componentIds.ActionListItemIcon,\n});\n\nconst _ActionListItemBadgeGroup = ({\n children,\n}: {\n children: React.ReactElement[] | React.ReactElement;\n}): React.ReactElement => {\n return (\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n {children}\n </Box>\n );\n};\n\nconst ActionListItemBadgeGroup = assignWithoutSideEffects(_ActionListItemBadgeGroup, {\n componentId: componentIds.ActionListItemBadgeGroup,\n});\n\nconst _ActionListItemAvatar = (avatarProps: Omit<AvatarProps, 'size' | ''>): React.ReactElement => {\n return <Avatar size=\"xsmall\" {...avatarProps} />;\n};\n\nconst ActionListItemAvatar = assignWithoutSideEffects(_ActionListItemAvatar, {\n componentId: componentIds.ActionListItemAvatar,\n});\n\nconst _ActionListItemBadge = (props: BadgeProps): React.ReactElement => {\n return <Badge size=\"medium\" marginLeft=\"spacing.3\" {...props} />;\n};\n\nconst ActionListItemBadge = assignWithoutSideEffects(_ActionListItemBadge, {\n componentId: componentIds.ActionListItemBadge,\n});\n\nconst _ActionListItemText = ({\n children,\n}: {\n children: StringChildrenType;\n}): React.ReactElement => {\n const { isDisabled } = useBaseMenuItem();\n\n return (\n <Text variant=\"caption\" color={getNormalTextColor(isDisabled, { isMuted: true })}>\n {children}\n </Text>\n );\n};\n\nconst ActionListItemText = assignWithoutSideEffects(_ActionListItemText, {\n componentId: componentIds.ActionListItemText,\n});\n\ntype ClickHandlerType = (e: React.MouseEvent<HTMLButtonElement>) => void;\n\nconst makeActionListItemClickable = (\n clickHandler: ClickHandlerType,\n): { onPress?: (e: React.TouchEvent<TouchableOpacity>) => void; onClick?: ClickHandlerType } => {\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: ignoring ReactNative press type for the peace of mind\n return { onPress: clickHandler };\n }\n\n return {\n onClick: clickHandler,\n };\n};\n\n/**\n * ### ActionListItem\n *\n * Creates option inside `ActionList`.\n *\n * #### Usage\n *\n * ```jsx\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}\n * />\n * </ActionList>\n * ```\n */\nconst _ActionListItem = (props: ActionListItemProps): React.ReactElement => {\n const {\n activeIndex,\n dropdownBaseId,\n onOptionClick,\n selectedIndices,\n setShouldIgnoreBlurAnimation,\n selectionType,\n dropdownTriggerer,\n isKeydownPressed,\n filteredValues,\n hasAutoCompleteInBottomSheetHeader,\n } = useDropdown();\n\n React.useEffect(() => {\n if (activeIndex === props._index && props._virtualizedIndex !== undefined) {\n props._onVirtualizedFocus?.(props._virtualizedIndex as number);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeIndex]);\n\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const renderOnWebAs = props.href ? 'a' : 'button';\n\n /**\n * In SelectInput, returns the isSelected according to selected indexes in the state\n *\n * In Other Triggers (Menu Usecase), returns `props.isSelected` since passing the\n * isSelected prop explicitly is the only way to select item in menu\n */\n const getIsSelected = (): boolean | undefined => {\n if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput || hasAutoComplete) {\n if (typeof props._index === 'number') {\n return selectedIndices.includes(props._index);\n }\n\n return undefined;\n }\n\n return props.isSelected;\n };\n\n const isSelected = getIsSelected();\n\n React.useEffect(() => {\n validateActionListItemProps({\n leading: props.leading,\n trailing: props.trailing,\n titleSuffix: props.titleSuffix,\n });\n }, [props.leading, props.trailing, props.titleSuffix]);\n\n React.useEffect(() => {\n if (__DEV__) {\n if (\n dropdownTriggerer === dropdownComponentIds.triggers.SelectInput &&\n props.intent === 'negative'\n ) {\n throwBladeError({\n message:\n 'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',\n moduleName: 'ActionListItem',\n });\n }\n }\n }, [props.intent, dropdownTriggerer]);\n\n const isVisible = hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true;\n\n return (\n <BaseMenuItem\n isVisible={isVisible}\n as={!isReactNative() ? renderOnWebAs : undefined}\n id={`${dropdownBaseId}-${props._index}`}\n tabIndex={-1}\n title={props.title}\n description={props.description}\n leading={\n selectionType === 'multiple' ? (\n <BaseBox\n pointerEvents=\"none\"\n // Adding aria-hidden because the listbox item in multiselect in itself explains the behaviour so announcing checkbox is unneccesary and just a nice UI tweak for us\n {...makeAccessible({\n hidden: true,\n })}\n >\n <Checkbox isChecked={isSelected} tabIndex={-1} isDisabled={props.isDisabled}>\n {/* \n Checkbox requires children. Didn't want to make it optional because its helpful for consumers\n But for this case in particular, we just want to use Text separately so that we can control spacing and color and keep it consistent with non-multiselect dropdowns\n */}\n {null}\n </Checkbox>\n </BaseBox>\n ) : (\n props.leading\n )\n }\n trailing={props.trailing}\n titleSuffix={props.titleSuffix}\n href={props.href}\n target={props.target}\n className={activeIndex === props._index ? 'active-focus' : ''}\n isSelected={isSelected}\n isDisabled={props.isDisabled}\n role={getActionListItemRole(dropdownTriggerer, props.href)}\n {...makeActionListItemClickable((e: React.MouseEvent<HTMLButtonElement>): void => {\n if (typeof props._index === 'number') {\n onOptionClick(e, props._index);\n props.onClick?.({ name: props.value, value: isSelected, event: castWebType(e) });\n }\n })}\n {...makeAnalyticsAttribute({ ...props })}\n {...metaAttribute({ name: MetaConstants.ActionListItem, testID: props.testID })}\n onMouseDown={() => {\n // We want to keep focus on Dropdown's trigger while option is being clicked\n // So We set this flag that ignores the blur animation to avoid the flicker between focus out + focus in\n setShouldIgnoreBlurAnimation(true);\n }}\n onMouseUp={() => {\n // (Contd from above comment...) We set this flag back to false since blur of SelectInput is done calling by this time\n setShouldIgnoreBlurAnimation(false);\n }}\n data-value={props.value}\n data-index={props._index}\n selectionType={selectionType}\n color={props.intent}\n isKeydownPressed={isKeydownPressed}\n />\n );\n};\n\nconst ActionListItem = assignWithoutSideEffects(React.memo(_ActionListItem), {\n componentId: componentIds.ActionListItem,\n displayName: componentIds.ActionListItem,\n});\n\nexport type { ActionListItemProps, ActionListSectionProps };\nexport {\n ActionListItem,\n ActionListItemIcon,\n ActionListItemText,\n ActionListItemAvatar,\n ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n ActionListSectionTitle,\n};\n"],"names":["StyledActionListSectionTitle","styled","BaseBox","props","padding","makeSize","theme","spacing","_ActionListSectionTitle","_ref","title","_ref$isInsideVirtuali","isInsideVirtualizedList","_jsx","Object","assign","makeAccessible","hidden","role","undefined","children","Text","color","size","weight","ActionListSectionTitle","assignWithoutSideEffects","componentId","componentIds","_ActionListSection","_ref2","testID","_hideDivider","_sectionChildValues","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","React","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","makeAnalyticsAttribute","Divider","marginX","marginY","memo","_ActionListItemIcon","_ref3","icon","Icon","_useBaseMenuItem","useBaseMenuItem","isDisabled","iconState","ActionListItemIcon","_ActionListItemBadgeGroup","_ref4","Box","display","alignItems","flexDirection","ActionListItemBadgeGroup","_ActionListItemAvatar","avatarProps","Avatar","ActionListItemAvatar","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref5","_useBaseMenuItem2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","selectionType","isKeydownPressed","useEffect","_index","_virtualizedIndex","_onVirtualizedFocus","renderOnWebAs","href","getIsSelected","SelectInput","isSelected","validateActionListItemProps","leading","trailing","titleSuffix","__DEV__","intent","throwBladeError","message","moduleName","isVisible","value","BaseMenuItem","as","id","tabIndex","description","pointerEvents","Checkbox","isChecked","target","className","getActionListItemRole","e","event","castWebType","ActionListItem","onMouseDown","onMouseUp","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAwGA,IAAMA,4BAA4B,CAAGC,MAAM,CAACC,OAAO,CAAC,CAAC,SAACC,KAAK,SAAM,CAE/DC,OAAO,CAAEC,QAAQ,CAACF,KAAK,CAACG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AACgH,MAAM,GAAK,QAAQ,CAAE,CACpCN,aAAa,CAACoC,CAAC,CAAE9I,KAAK,CAACgH,MAAM,CAAC,CAC9BhH,KAAK,CAACqG,OAAO,EAAA,IAAA,CAAA,KAAA,CAAA,CAAbrG,KAAK,CAACqG,OAAO,CAAG,CAAE1C,IAAI,CAAE3D,KAAK,CAACkI,KAAK,CAAEA,KAAK,CAAEX,UAAU,CAAEwB,KAAK,CAAEC,WAAW,CAACF,CAAC,CAAE,CAAC,CAAC,CAClF,CACF,CAAC,CAAC,CACEhF,sBAAsB,CAAAnD,MAAA,CAAAC,MAAA,CAAMZ,EAAAA,CAAAA,KAAK,CAAE,CAAC,CACpC0D,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACqF,cAAc,CAAErH,MAAM,CAAE5B,KAAK,CAAC4B,MAAO,CAAC,CAAC,EAC/EsH,WAAW,CAAE,SAAAA,WAAA,EAAM,CAGjBtC,4BAA4B,CAAC,IAAI,CAAC,CACpC,CAAE,CACFuC,SAAS,CAAE,SAAAA,SAAAA,EAAM,CAEfvC,4BAA4B,CAAC,KAAK,CAAC,CACrC,CAAE,CACF,YAAA,CAAY5G,KAAK,CAACkI,KAAM,CACxB,YAAYlI,CAAAA,KAAK,CAACgH,MAAO,CACzBH,aAAa,CAAEA,aAAc,CAC7B1F,KAAK,CAAEnB,KAAK,CAAC6H,MAAO,CACpBf,gBAAgB,CAAEA,gBAAiB,EACpC,CAAC,CAEN,CAAC,CAEK,IAAAmC,cAAc,CAAG1H,wBAAwB,CAACqB,cAAK,CAACsB,IAAI,CAACoC,eAAe,CAAC,CAAE,CAC3E9E,WAAW,CAAEC,YAAY,CAACwH,cAAc,CACxCG,WAAW,CAAE3H,YAAY,CAACwH,cAC5B,CAAC;;;;"}
@@ -1,4 +1,4 @@
1
- var componentIds={ActionList:'ActionList',ActionListItem:'ActionListItem',ActionListItemBadge:'ActionListItemBadge',ActionListItemBadgeGroup:'ActionListItemBadgeGroup',ActionListItemAsset:'ActionListItemAsset',ActionListItemIcon:'ActionListItemIcon',ActionListItemAvatar:'ActionListItemAvatar',ActionListItemText:'ActionListItemText',ActionListSection:'ActionListSection'};
1
+ var componentIds={ActionList:'ActionList',ActionListItem:'ActionListItem',ActionListItemBadge:'ActionListItemBadge',ActionListItemBadgeGroup:'ActionListItemBadgeGroup',ActionListItemAsset:'ActionListItemAsset',ActionListItemIcon:'ActionListItemIcon',ActionListItemAvatar:'ActionListItemAvatar',ActionListItemText:'ActionListItemText',ActionListSection:'ActionListSection',ActionListSectionTitle:'ActionListSectionTitle'};
2
2
 
3
3
  export { componentIds };
4
4
  //# sourceMappingURL=componentIds.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"componentIds.js","sources":["../../../../../src/components/ActionList/componentIds.ts"],"sourcesContent":["export const componentIds = {\n ActionList: 'ActionList',\n ActionListItem: 'ActionListItem',\n ActionListItemBadge: 'ActionListItemBadge',\n ActionListItemBadgeGroup: 'ActionListItemBadgeGroup',\n ActionListItemAsset: 'ActionListItemAsset',\n ActionListItemIcon: 'ActionListItemIcon',\n ActionListItemAvatar: 'ActionListItemAvatar',\n ActionListItemText: 'ActionListItemText',\n ActionListSection: 'ActionListSection',\n};\n"],"names":["componentIds","ActionList","ActionListItem","ActionListItemBadge","ActionListItemBadgeGroup","ActionListItemAsset","ActionListItemIcon","ActionListItemAvatar","ActionListItemText","ActionListSection"],"mappings":"AAAa,IAAAA,YAAY,CAAG,CAC1BC,UAAU,CAAE,YAAY,CACxBC,cAAc,CAAE,gBAAgB,CAChCC,mBAAmB,CAAE,qBAAqB,CAC1CC,wBAAwB,CAAE,0BAA0B,CACpDC,mBAAmB,CAAE,qBAAqB,CAC1CC,kBAAkB,CAAE,oBAAoB,CACxCC,oBAAoB,CAAE,sBAAsB,CAC5CC,kBAAkB,CAAE,oBAAoB,CACxCC,iBAAiB,CAAE,mBACrB;;;;"}
1
+ {"version":3,"file":"componentIds.js","sources":["../../../../../src/components/ActionList/componentIds.ts"],"sourcesContent":["export const componentIds = {\n ActionList: 'ActionList',\n ActionListItem: 'ActionListItem',\n ActionListItemBadge: 'ActionListItemBadge',\n ActionListItemBadgeGroup: 'ActionListItemBadgeGroup',\n ActionListItemAsset: 'ActionListItemAsset',\n ActionListItemIcon: 'ActionListItemIcon',\n ActionListItemAvatar: 'ActionListItemAvatar',\n ActionListItemText: 'ActionListItemText',\n ActionListSection: 'ActionListSection',\n ActionListSectionTitle: 'ActionListSectionTitle',\n};\n"],"names":["componentIds","ActionList","ActionListItem","ActionListItemBadge","ActionListItemBadgeGroup","ActionListItemAsset","ActionListItemIcon","ActionListItemAvatar","ActionListItemText","ActionListSection","ActionListSectionTitle"],"mappings":"AAAa,IAAAA,YAAY,CAAG,CAC1BC,UAAU,CAAE,YAAY,CACxBC,cAAc,CAAE,gBAAgB,CAChCC,mBAAmB,CAAE,qBAAqB,CAC1CC,wBAAwB,CAAE,0BAA0B,CACpDC,mBAAmB,CAAE,qBAAqB,CAC1CC,kBAAkB,CAAE,oBAAoB,CACxCC,oBAAoB,CAAE,sBAAsB,CAC5CC,kBAAkB,CAAE,oBAAoB,CACxCC,iBAAiB,CAAE,mBAAmB,CACtCC,sBAAsB,CAAE,wBAC1B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sources":["../../../../../../src/components/BaseMenu/BaseMenuItem/tokens.ts"],"sourcesContent":["import type { Theme } from '~components/BladeProvider';\nimport { size } from '~tokens/global';\n\nconst itemFirstRowHeight = size[20];\n\nconst getItemPadding = (\n theme: Theme,\n): {\n itemPaddingMobile: 4;\n itemPaddingDesktop: 8;\n} => {\n return {\n itemPaddingMobile: theme.spacing[2],\n itemPaddingDesktop: theme.spacing[3],\n };\n};\n\nconst getItemMargin = (theme: Theme): number => {\n return theme.spacing[1];\n};\n\nconst getItemHeight = (\n theme: Theme,\n): {\n itemHeightMobile: number;\n itemHeightDesktop: number;\n} => {\n return {\n itemHeightMobile:\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n itemFirstRowHeight + getItemPadding(theme).itemPaddingMobile * 2 + getItemMargin(theme) * 2,\n itemHeightDesktop:\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n itemFirstRowHeight + getItemPadding(theme).itemPaddingDesktop * 2 + getItemMargin(theme) * 2,\n };\n};\n\nexport { itemFirstRowHeight, getItemPadding, getItemMargin, getItemHeight };\n"],"names":["itemFirstRowHeight","size","getItemMargin","theme","spacing"],"mappings":";;;;AAGM,IAAAA,kBAAkB,CAAGC,IAAI,CAAC,EAAE,EAc5B,IAAAC,aAAa,CAAG,SAAhBA,aAAaA,CAAIC,KAAY,CAAa,CAC9C,OAAOA,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CACzB;;;;"}
1
+ {"version":3,"file":"tokens.js","sources":["../../../../../../src/components/BaseMenu/BaseMenuItem/tokens.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport type { Theme } from '~components/BladeProvider';\nimport { size } from '~tokens/global';\n\nconst itemFirstRowHeight = size[20];\nconst actionListItemPadding = 8;\nconst dividerYMargin = 1;\nconst actionListSectionTitleHeight = size[18] + actionListItemPadding * 2;\nconst actionListDividerHeight = size[1] + dividerYMargin * 2;\n\nconst getItemPadding = (\n theme: Theme,\n): {\n itemPaddingMobile: 4;\n itemPaddingDesktop: 8;\n} => {\n return {\n itemPaddingMobile: theme.spacing[2],\n itemPaddingDesktop: theme.spacing[3],\n };\n};\n\nconst getItemMargin = (theme: Theme): number => {\n return theme.spacing[1];\n};\n\nconst getActionListItemHeight = (\n theme: Theme,\n): {\n itemHeightMobile: number;\n itemHeightDesktop: number;\n} => {\n return {\n itemHeightMobile:\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n itemFirstRowHeight + getItemPadding(theme).itemPaddingMobile * 2 + getItemMargin(theme) * 2,\n itemHeightDesktop:\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n itemFirstRowHeight + getItemPadding(theme).itemPaddingDesktop * 2 + getItemMargin(theme) * 2,\n };\n};\n\nexport {\n actionListSectionTitleHeight,\n actionListDividerHeight,\n itemFirstRowHeight,\n getItemPadding,\n getItemMargin,\n getActionListItemHeight,\n};\n"],"names":["itemFirstRowHeight","size","getItemMargin","theme","spacing"],"mappings":";;;;AAIM,IAAAA,kBAAkB,CAAGC,IAAI,CAAC,EAAE,EAkB5B,IAAAC,aAAa,CAAG,SAAhBA,aAAaA,CAAIC,KAAY,CAAa,CAC9C,OAAOA,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CACzB;;;;"}
@@ -3,7 +3,7 @@ export { AccordionItemHeader } from './Accordion/AccordionItemHeader.js';
3
3
  export { AccordionItemBody } from './Accordion/AccordionItemBody.js';
4
4
  export { AccordionItem } from './Accordion/AccordionItem.js';
5
5
  export { ActionList } from './ActionList/ActionList.js';
6
- export { ActionListItem, ActionListItemAvatar, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection } from './ActionList/ActionListItem.js';
6
+ export { ActionListItem, ActionListItemAvatar, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection, ActionListSectionTitle } from './ActionList/ActionListItem.js';
7
7
  export { ActionListItemAsset } from './ActionList/ActionListItemAsset.native.js';
8
8
  export { Alert } from './Alert/Alert.js';
9
9
  export { Amount } from './Amount/Amount.js';
@@ -1,22 +1,30 @@
1
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
1
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
4
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import React__default from 'react';
4
- import { FixedSizeList } from 'react-window';
5
+ import React__default, { useCallback } from 'react';
6
+ import { VariableSizeList } from 'react-window';
5
7
  import { StyledListBoxWrapper } from './styles/StyledListBoxWrapper.web.js';
6
8
  import { getActionListPadding, actionListMaxHeight } from './styles/getBaseListBoxWrapperStyles.js';
9
+ import { componentIds } from './componentIds.js';
10
+ import { ActionListSectionTitle } from './ActionListItem.js';
7
11
  import { useBottomSheetContext } from '../BottomSheet/BottomSheetContext.js';
8
12
  import '../../utils/assignWithoutSideEffects/index.js';
9
13
  import '../../utils/makeAccessible/index.js';
10
14
  import '../../utils/makeAnalyticsAttribute/index.js';
11
15
  import { useIsMobile } from '../../utils/useIsMobile.js';
12
- import { getItemHeight } from '../BaseMenu/BaseMenuItem/tokens.js';
16
+ import { actionListSectionTitleHeight, actionListDividerHeight, getActionListItemHeight } from '../BaseMenu/BaseMenuItem/tokens.js';
13
17
  import '../../utils/index.js';
14
18
  import { useDropdown } from '../Dropdown/useDropdown.js';
15
19
  import { dropdownComponentIds } from '../Dropdown/dropdownComponentIds.js';
20
+ import '../../utils/isValidAllowedChildren/index.js';
21
+ import '../Divider/index.js';
16
22
  import { jsx } from 'react/jsx-runtime';
17
23
  import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
18
24
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
19
25
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
26
+ import { getComponentId } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
27
+ import { Divider } from '../Divider/Divider.js';
20
28
  import useTheme from '../BladeProvider/useTheme.js';
21
29
 
22
30
  var _excluded = ["childrenWithId", "actionListItemWrapperRole", "isMultiSelectable"],
@@ -44,18 +52,52 @@ var ActionListBox = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__d
44
52
  displayName: 'ActionListBox'
45
53
  });
46
54
 
55
+ /**
56
+ * get the height of the item based on the componentId
57
+ */
58
+ var getItemHeight = function getItemHeight(_ref2) {
59
+ var _itemData$index;
60
+ var index = _ref2.index,
61
+ itemData = _ref2.itemData,
62
+ actionListItemHeight = _ref2.actionListItemHeight;
63
+ if (getComponentId(itemData[index]) === componentIds.ActionListItem) {
64
+ return actionListItemHeight;
65
+ }
66
+ if (getComponentId(itemData[index]) === componentIds.ActionListSectionTitle) {
67
+ return actionListSectionTitleHeight;
68
+ }
69
+ // @ts-expect-error: key does exist
70
+ if ((_itemData$index = itemData[index]) !== null && _itemData$index !== void 0 && _itemData$index.key.includes('divider')) {
71
+ return actionListDividerHeight;
72
+ }
73
+ return 0;
74
+ };
75
+
47
76
  /**
48
77
  * Returns the height of item and height of container based on theme and device
49
78
  */
50
- var getVirtualItemParams = function getVirtualItemParams(_ref2) {
51
- var theme = _ref2.theme,
52
- isMobile = _ref2.isMobile;
53
- var itemHeightResponsive = getItemHeight(theme);
79
+ var getVirtualItemParams = function getVirtualItemParams(_ref3) {
80
+ var theme = _ref3.theme,
81
+ isMobile = _ref3.isMobile,
82
+ itemCount = _ref3.itemCount,
83
+ itemData = _ref3.itemData;
84
+ var itemHeightResponsive = getActionListItemHeight(theme);
54
85
  var actionListPadding = getActionListPadding(theme);
86
+ var actionListItemHeight = isMobile ? itemHeightResponsive.itemHeightMobile : itemHeightResponsive.itemHeightDesktop;
87
+ var shouldCalculateMinimumHeight = itemCount <= 10;
55
88
  var actionListBoxHeight = actionListMaxHeight - actionListPadding * 2;
89
+ var actionListBoxMinHeight = shouldCalculateMinimumHeight ? itemData.reduce(function (acc, _, index) {
90
+ var itemHeight = getItemHeight({
91
+ index: index,
92
+ itemData: itemData,
93
+ actionListItemHeight: actionListItemHeight
94
+ });
95
+ return acc + itemHeight;
96
+ }, 0) : actionListBoxHeight;
97
+ var finalActionListBoxHeight = Math.min(actionListBoxHeight, actionListBoxMinHeight);
56
98
  return {
57
- itemHeight: isMobile ? itemHeightResponsive.itemHeightMobile : itemHeightResponsive.itemHeightDesktop,
58
- actionListBoxHeight: actionListBoxHeight
99
+ actionListItemHeight: actionListItemHeight,
100
+ actionListBoxHeight: finalActionListBoxHeight
59
101
  };
60
102
  };
61
103
 
@@ -74,11 +116,34 @@ var useFilteredItems = function useFilteredItems(children) {
74
116
  if (!hasAutoComplete) {
75
117
  return childrenArray;
76
118
  }
77
-
78
- // @ts-expect-error: props does exist
79
- var filteredItems = childrenArray.filter(function (item) {
80
- return filteredValues.includes(item.props.value);
81
- });
119
+ var filteredItems = childrenArray.reduce(function (acc, item, index) {
120
+ if (getComponentId(item) === componentIds.ActionListSection) {
121
+ var sectionTitle = /*#__PURE__*/jsx(ActionListSectionTitle, {
122
+ // @ts-expect-error: props does exist
123
+ title: item === null || item === void 0 ? void 0 : item.props.title,
124
+ isInsideVirtualizedList: true
125
+ }, index);
126
+ // @ts-expect-error: props does exist
127
+ var sectionChildren = item === null || item === void 0 ? void 0 : item.props.children;
128
+ var divider = index !== childrenArray.length - 1 ? /*#__PURE__*/jsx(Divider, {
129
+ marginX: "spacing.3",
130
+ marginY: "spacing.1"
131
+ }, "divider-".concat(index)) : null;
132
+ var filteredSectionChildren = sectionChildren.filter(function (item) {
133
+ return filteredValues.includes(item.props.value);
134
+ });
135
+ if (filteredSectionChildren.length !== 0) {
136
+ acc.push.apply(acc, [sectionTitle].concat(_toConsumableArray(filteredSectionChildren), [divider]));
137
+ }
138
+ } else {
139
+ // @ts-expect-error: props does exist
140
+ var value = item === null || item === void 0 ? void 0 : item.props.value;
141
+ if (filteredValues.includes(value)) {
142
+ acc.push(item);
143
+ }
144
+ }
145
+ return acc;
146
+ }, []);
82
147
  return filteredItems;
83
148
  }, [filteredValues, hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, childrenArray]);
84
149
  return {
@@ -86,20 +151,45 @@ var useFilteredItems = function useFilteredItems(children) {
86
151
  itemCount: items.length
87
152
  };
88
153
  };
89
- var VirtualListItem = function VirtualListItem(_ref3) {
90
- var index = _ref3.index,
91
- style = _ref3.style,
92
- data = _ref3.data;
154
+ var VirtualListItem = /*#__PURE__*/React__default.memo(function (_ref4) {
155
+ var index = _ref4.index,
156
+ style = _ref4.style,
157
+ data = _ref4.data,
158
+ onVirtualizedFocus = _ref4.onVirtualizedFocus;
159
+ var currentItem = data[index];
160
+ if ( /*#__PURE__*/React__default.isValidElement(currentItem) && getComponentId(currentItem) === componentIds.ActionListItem) {
161
+ // Clone the element passed via `data` and add the `_virtualizedIndex` prop
162
+ var elementWithIndex = /*#__PURE__*/React__default.cloneElement(currentItem, {
163
+ _virtualizedIndex: index,
164
+ _onVirtualizedFocus: onVirtualizedFocus
165
+ });
166
+ return /*#__PURE__*/jsx("div", {
167
+ style: style,
168
+ children: elementWithIndex
169
+ });
170
+ }
93
171
  return /*#__PURE__*/jsx("div", {
94
172
  style: style,
95
173
  children: data[index]
96
174
  });
97
- };
98
- var _ActionListVirtualizedBox = /*#__PURE__*/React__default.forwardRef(function (_ref4, ref) {
99
- var childrenWithId = _ref4.childrenWithId,
100
- actionListItemWrapperRole = _ref4.actionListItemWrapperRole,
101
- isMultiSelectable = _ref4.isMultiSelectable,
102
- rest = _objectWithoutProperties(_ref4, _excluded2);
175
+ }, function (prevProps, nextProps) {
176
+ // Custom comparison function to determine if component should update
177
+ return prevProps.index === nextProps.index && prevProps.style === nextProps.style && prevProps.data[prevProps.index] === nextProps.data[nextProps.index];
178
+ });
179
+ var _ActionListVirtualizedBox = /*#__PURE__*/React__default.forwardRef(function (_ref5, ref) {
180
+ var childrenWithId = _ref5.childrenWithId,
181
+ actionListItemWrapperRole = _ref5.actionListItemWrapperRole,
182
+ isMultiSelectable = _ref5.isMultiSelectable,
183
+ rest = _objectWithoutProperties(_ref5, _excluded2);
184
+ var virtualizedListRef = React__default.useRef(null);
185
+ var _React$useState = React__default.useState(0),
186
+ _React$useState2 = _slicedToArray(_React$useState, 2),
187
+ visibleStartIndex = _React$useState2[0],
188
+ setVisibleStartIndex = _React$useState2[1];
189
+ var _React$useState3 = React__default.useState(0),
190
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
191
+ visibleStopIndex = _React$useState4[0],
192
+ setVisibleStopIndex = _React$useState4[1];
103
193
  var items = React__default.Children.toArray(childrenWithId); // Convert children to an array
104
194
  var _useBottomSheetContex2 = useBottomSheetContext(),
105
195
  isInBottomSheet = _useBottomSheetContex2.isInBottomSheet;
@@ -112,33 +202,77 @@ var _ActionListVirtualizedBox = /*#__PURE__*/React__default.forwardRef(function
112
202
  var _React$useMemo = React__default.useMemo(function () {
113
203
  return getVirtualItemParams({
114
204
  theme: theme,
115
- isMobile: isMobile
205
+ isMobile: isMobile,
206
+ itemCount: itemCount,
207
+ itemData: itemData
116
208
  });
117
209
  },
118
210
  // eslint-disable-next-line react-hooks/exhaustive-deps
119
- [theme.name, isMobile]),
120
- itemHeight = _React$useMemo.itemHeight,
211
+ [theme.name, isMobile, itemCount, itemData]),
212
+ actionListItemHeight = _React$useMemo.actionListItemHeight,
121
213
  actionListBoxHeight = _React$useMemo.actionListBoxHeight;
214
+ React__default.useEffect(function () {
215
+ var _virtualizedListRef$c, _virtualizedListRef$c2;
216
+ virtualizedListRef === null || virtualizedListRef === void 0 ? void 0 : (_virtualizedListRef$c = virtualizedListRef.current) === null || _virtualizedListRef$c === void 0 ? void 0 : _virtualizedListRef$c.resetAfterIndex(0);
217
+ virtualizedListRef === null || virtualizedListRef === void 0 ? void 0 : (_virtualizedListRef$c2 = virtualizedListRef.current) === null || _virtualizedListRef$c2 === void 0 ? void 0 : _virtualizedListRef$c2.scrollToItem(0);
218
+ }, [itemCount]);
122
219
  return /*#__PURE__*/jsx(StyledListBoxWrapper, _objectSpread(_objectSpread(_objectSpread({
123
- isInBottomSheet: isInBottomSheet,
220
+ isInBottomSheet: isInBottomSheet
221
+ // in case of virtualized list, we only render visible items. so css will hide divider for every last item visible. instead of hiding the last divider of the list.
222
+ ,
124
223
  ref: ref
125
224
  }, makeAccessible({
126
225
  role: actionListItemWrapperRole,
127
226
  multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined
128
227
  })), makeAnalyticsAttribute(rest)), {}, {
129
- children: itemCount < 10 ? childrenWithId : /*#__PURE__*/jsx(FixedSizeList, {
228
+ children: /*#__PURE__*/jsx(VariableSizeList, {
229
+ ref: virtualizedListRef,
130
230
  height: actionListBoxHeight,
131
231
  width: "100%",
132
- itemSize: itemHeight,
232
+ itemSize: function itemSize(index) {
233
+ return getItemHeight({
234
+ index: index,
235
+ itemData: itemData,
236
+ actionListItemHeight: actionListItemHeight
237
+ });
238
+ },
133
239
  itemCount: itemCount,
134
- itemData: itemData
135
- // @ts-expect-error: props does exist
136
- ,
240
+ itemData: itemData,
137
241
  itemKey: function itemKey(index) {
138
- var _itemData$index;
139
- return (_itemData$index = itemData[index]) === null || _itemData$index === void 0 ? void 0 : _itemData$index.props.value;
242
+ var _ref6, _itemData$index$props, _itemData$index2, _itemData$index3, _itemData$index4;
243
+ return (// @ts-expect-error: props does exist
244
+ (_ref6 = (_itemData$index$props = (_itemData$index2 = itemData[index]) === null || _itemData$index2 === void 0 ? void 0 : _itemData$index2.props.value) !== null && _itemData$index$props !== void 0 ? _itemData$index$props : // @ts-expect-error: props does exist
245
+ (_itemData$index3 = itemData[index]) === null || _itemData$index3 === void 0 ? void 0 : _itemData$index3.props.title) !== null && _ref6 !== void 0 ? _ref6 : // @ts-expect-error: props does exist
246
+ (_itemData$index4 = itemData[index]) === null || _itemData$index4 === void 0 ? void 0 : _itemData$index4.props.key
247
+ );
248
+ },
249
+ onItemsRendered: function onItemsRendered(_ref7) {
250
+ var visibleStartIndex = _ref7.visibleStartIndex,
251
+ visibleStopIndex = _ref7.visibleStopIndex;
252
+ setVisibleStartIndex(visibleStartIndex);
253
+ setVisibleStopIndex(visibleStopIndex);
140
254
  },
141
- children: VirtualListItem
255
+ children: useCallback(function (_ref8) {
256
+ var index = _ref8.index,
257
+ style = _ref8.style,
258
+ data = _ref8.data;
259
+ return /*#__PURE__*/jsx(VirtualListItem, {
260
+ index: index,
261
+ style: style,
262
+ data: data,
263
+ onVirtualizedFocus: function onVirtualizedFocus(index) {
264
+ var _virtualizedListRef$c3, _virtualizedListRef$c4;
265
+ // We need scroll Direction to determine the index to focus
266
+ var scrollDirection = Math.round((visibleStartIndex + visibleStopIndex) / 2) > index ? 'top' : 'bottom';
267
+ virtualizedListRef === null || virtualizedListRef === void 0 ? void 0 : (_virtualizedListRef$c3 = virtualizedListRef.current) === null || _virtualizedListRef$c3 === void 0 ? void 0 : _virtualizedListRef$c3.resetAfterIndex(0);
268
+ /**
269
+ * we are scrolling to the item which is 3 items away from the current item.
270
+ * since we can have 2 item sectoin header and divider which are not focusable.
271
+ */
272
+ virtualizedListRef === null || virtualizedListRef === void 0 ? void 0 : (_virtualizedListRef$c4 = virtualizedListRef.current) === null || _virtualizedListRef$c4 === void 0 ? void 0 : _virtualizedListRef$c4.scrollToItem(index + (scrollDirection === 'top' ? -3 : 3), 'smart');
273
+ }
274
+ });
275
+ }, [visibleStartIndex, visibleStopIndex])
142
276
  })
143
277
  }));
144
278
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ActionListBox.web.js","sources":["../../../../../../src/components/ActionList/ActionListBox.web.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React from 'react';\nimport { FixedSizeList as VirtualizedList } from 'react-window';\nimport { StyledListBoxWrapper } from './styles/StyledListBoxWrapper';\nimport type { SectionData } from './actionListUtils';\nimport { actionListMaxHeight, getActionListPadding } from './styles/getBaseListBoxWrapperStyles';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport { getItemHeight } from '~components/BaseMenu/BaseMenuItem/tokens';\nimport { useTheme } from '~utils';\nimport type { Theme } from '~components/BladeProvider';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\n\ntype ActionListBoxProps = {\n childrenWithId?: React.ReactNode[] | null;\n sectionData: SectionData;\n actionListItemWrapperRole: 'listbox' | 'menu' | undefined;\n isMultiSelectable: boolean;\n isInBottomSheet: boolean;\n} & DataAnalyticsAttribute;\n\nconst _ActionListBox = React.forwardRef<HTMLDivElement, ActionListBoxProps>(\n ({ childrenWithId, actionListItemWrapperRole, isMultiSelectable, ...rest }, ref) => {\n const { isInBottomSheet } = useBottomSheetContext();\n\n return (\n <StyledListBoxWrapper\n isInBottomSheet={isInBottomSheet}\n ref={ref}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n {childrenWithId}\n </StyledListBoxWrapper>\n );\n },\n);\n\nconst ActionListBox = assignWithoutSideEffects(React.memo(_ActionListBox), {\n displayName: 'ActionListBox',\n});\n\n/**\n * Returns the height of item and height of container based on theme and device\n */\nconst getVirtualItemParams = ({\n theme,\n isMobile,\n}: {\n theme: Theme;\n isMobile: boolean;\n}): {\n itemHeight: number;\n actionListBoxHeight: number;\n} => {\n const itemHeightResponsive = getItemHeight(theme);\n const actionListPadding = getActionListPadding(theme);\n const actionListBoxHeight = actionListMaxHeight - actionListPadding * 2;\n\n return {\n itemHeight: isMobile\n ? itemHeightResponsive.itemHeightMobile\n : itemHeightResponsive.itemHeightDesktop,\n actionListBoxHeight,\n };\n};\n\n/**\n * Takes the children (ActionListItem) and returns the filtered items based on `filteredValues` state\n */\nconst useFilteredItems = (\n children: React.ReactNode[],\n): {\n itemData: React.ReactNode[];\n itemCount: number;\n} => {\n const childrenArray = React.Children.toArray(children); // Convert children to an array\n\n const { filteredValues, hasAutoCompleteInBottomSheetHeader, dropdownTriggerer } = useDropdown();\n\n const items = React.useMemo(() => {\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n if (!hasAutoComplete) {\n return childrenArray;\n }\n\n // @ts-expect-error: props does exist\n const filteredItems = childrenArray.filter((item) => filteredValues.includes(item.props.value));\n return filteredItems;\n }, [filteredValues, hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, childrenArray]);\n\n return {\n itemData: items,\n itemCount: items.length,\n };\n};\n\nconst VirtualListItem = ({\n index,\n style,\n data,\n}: {\n index: number;\n style: React.CSSProperties;\n data: React.ReactNode[];\n}): React.ReactElement => {\n return <div style={style}>{data[index]}</div>;\n};\n\nconst _ActionListVirtualizedBox = React.forwardRef<HTMLDivElement, ActionListBoxProps>(\n ({ childrenWithId, actionListItemWrapperRole, isMultiSelectable, ...rest }, ref) => {\n const items = React.Children.toArray(childrenWithId); // Convert children to an array\n const { isInBottomSheet } = useBottomSheetContext();\n const { itemData, itemCount } = useFilteredItems(items);\n\n const isMobile = useIsMobile();\n const { theme } = useTheme();\n const { itemHeight, actionListBoxHeight } = React.useMemo(\n () => getVirtualItemParams({ theme, isMobile }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [theme.name, isMobile],\n );\n\n return (\n <StyledListBoxWrapper\n isInBottomSheet={isInBottomSheet}\n ref={ref}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n {itemCount < 10 ? (\n childrenWithId\n ) : (\n <VirtualizedList\n height={actionListBoxHeight}\n width=\"100%\"\n itemSize={itemHeight}\n itemCount={itemCount}\n itemData={itemData}\n // @ts-expect-error: props does exist\n itemKey={(index) => itemData[index]?.props.value}\n >\n {VirtualListItem}\n </VirtualizedList>\n )}\n </StyledListBoxWrapper>\n );\n },\n);\n\nconst ActionListVirtualizedBox = assignWithoutSideEffects(React.memo(_ActionListVirtualizedBox), {\n displayName: 'ActionListVirtualizedBox',\n});\n\nexport { ActionListBox, ActionListVirtualizedBox };\n"],"names":["_ActionListBox","React","forwardRef","_ref","ref","childrenWithId","actionListItemWrapperRole","isMultiSelectable","rest","_objectWithoutProperties","_excluded","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_jsx","StyledListBoxWrapper","_objectSpread","makeAccessible","role","multiSelectable","undefined","makeAnalyticsAttribute","children","ActionListBox","assignWithoutSideEffects","memo","displayName","getVirtualItemParams","_ref2","theme","isMobile","itemHeightResponsive","getItemHeight","actionListPadding","getActionListPadding","actionListBoxHeight","actionListMaxHeight","itemHeight","itemHeightMobile","itemHeightDesktop","useFilteredItems","childrenArray","Children","toArray","_useDropdown","useDropdown","filteredValues","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","items","useMemo","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","filteredItems","filter","item","includes","props","value","itemData","itemCount","length","VirtualListItem","_ref3","index","style","data","_ActionListVirtualizedBox","_ref4","_excluded2","_useBottomSheetContex2","_useFilteredItems","useIsMobile","_useTheme","useTheme","_React$useMemo","name","VirtualizedList","height","width","itemSize","itemKey","_itemData$index","ActionListVirtualizedBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAMA,cAAc,gBAAGC,cAAK,CAACC,UAAU,CACrC,UAAAC,IAAA,EAA4EC,GAAG,EAAK;AAAA,EAAA,IAAjFC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IAAEC,yBAAyB,GAAAH,IAAA,CAAzBG,yBAAyB;IAAEC,iBAAiB,GAAAJ,IAAA,CAAjBI,iBAAiB;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA,CAAA,CAAA;AACtE,EAAA,IAAAC,qBAAA,GAA4BC,qBAAqB,EAAE;IAA3CC,eAAe,GAAAF,qBAAA,CAAfE,eAAe,CAAA;EAEvB,oBACEC,GAAA,CAACC,oBAAoB,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACnBH,IAAAA,eAAe,EAAEA,eAAgB;AACjCT,IAAAA,GAAG,EAAEA,GAAAA;AAAI,GAAA,EACLa,cAAc,CAAC;AACjBC,IAAAA,IAAI,EAAEZ,yBAAyB;AAC/Ba,IAAAA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AEZ,yBAAyB;AAC/Ba,IAAAA,eAAe,EAAEb,yBAAyB,KAAK,SAAS,GAAGC,iBAAiB,GAAGa,SAAAA;AACjF,GAAC,CAAC,CAAA,EACEC,sBAAsB,CAACb,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAc,QAAA,EAE/BwC,SAAS,GAAG,EAAE,GACbzD,cAAc,gBAEdS,GAAA,CAACiE,aAAe,EAAA;AACdC,MAAAA,MAAM,EAAE7C,mBAAoB;AAC5B8C,MAAAA,KAAK,EAAC,MAAM;AACZC,MAAAA,QAAQ,EAAE7C,UAAW;AACrByB,MAAAA,SAAS,EAAEA,SAAU;AACrBD,MAAAA,QAAQ,EAAEA,QAAAA;AACV;AAAA;MACAsB,OAAO,EAAE,SAAAA,OAAAA,CAACjB,KAAK,EAAA;AAAA,QAAA,IAAAkB,eAAA,CAAA;AAAA,QAAA,OAAA,CAAAA,eAAA,GAAKvB,QAAQ,CAACK,KAAK,CAAC,MAAAkB,IAAAA,IAAAA,eAAA,KAAfA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,eAAA,CAAiBzB,KAAK,CAACC,KAAK,CAAA;OAAC;AAAAtC,MAAAA,QAAA,EAEhD0C,eAAAA;KACc,CAAA;AAClB,GAAA,CACmB,CAAC,CAAA;AAE3B,CACF,CAAC,CAAA;AAEKqB,IAAAA,wBAAwB,gBAAG7D,wBAAwB,eAACvB,cAAK,CAACwB,IAAI,CAAC4C,yBAAyB,CAAC,EAAE;AAC/F3C,EAAAA,WAAW,EAAE,0BAAA;AACf,CAAC;;;;"}
1
+ {"version":3,"file":"ActionListBox.web.js","sources":["../../../../../../src/components/ActionList/ActionListBox.web.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React, { useCallback } from 'react';\nimport type { VariableSizeList } from 'react-window';\nimport { VariableSizeList as VirtualizedList } from 'react-window';\nimport { StyledListBoxWrapper } from './styles/StyledListBoxWrapper';\nimport type { SectionData } from './actionListUtils';\nimport { actionListMaxHeight, getActionListPadding } from './styles/getBaseListBoxWrapperStyles';\nimport { componentIds } from './componentIds';\nimport { ActionListSectionTitle } from './ActionListItem';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useIsMobile } from '~utils/useIsMobile';\nimport {\n actionListSectionTitleHeight,\n actionListDividerHeight,\n getActionListItemHeight,\n} from '~components/BaseMenu/BaseMenuItem/tokens';\nimport { useTheme } from '~utils';\nimport type { Theme } from '~components/BladeProvider';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { Divider } from '~components/Divider';\nimport type { ActionListItemProps } from '~components/ActionList';\n\ntype ActionListBoxProps = {\n childrenWithId?: React.ReactNode[] | null;\n sectionData: SectionData;\n actionListItemWrapperRole: 'listbox' | 'menu' | undefined;\n isMultiSelectable: boolean;\n isInBottomSheet: boolean;\n} & DataAnalyticsAttribute;\n\nconst _ActionListBox = React.forwardRef<HTMLDivElement, ActionListBoxProps>(\n ({ childrenWithId, actionListItemWrapperRole, isMultiSelectable, ...rest }, ref) => {\n const { isInBottomSheet } = useBottomSheetContext();\n\n return (\n <StyledListBoxWrapper\n isInBottomSheet={isInBottomSheet}\n ref={ref}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n {childrenWithId}\n </StyledListBoxWrapper>\n );\n },\n);\n\nconst ActionListBox = assignWithoutSideEffects(React.memo(_ActionListBox), {\n displayName: 'ActionListBox',\n});\n\n/**\n * get the height of the item based on the componentId\n */\nconst getItemHeight = ({\n index,\n itemData,\n actionListItemHeight,\n}: {\n index: number;\n itemData: React.ReactNode[];\n actionListItemHeight: number;\n}): number => {\n if (getComponentId(itemData[index]) === componentIds.ActionListItem) {\n return actionListItemHeight;\n }\n\n if (getComponentId(itemData[index]) === componentIds.ActionListSectionTitle) {\n return actionListSectionTitleHeight;\n }\n // @ts-expect-error: key does exist\n if (itemData[index]?.key.includes('divider')) {\n return actionListDividerHeight;\n }\n return 0;\n};\n\n/**\n * Returns the height of item and height of container based on theme and device\n */\nconst getVirtualItemParams = ({\n theme,\n isMobile,\n itemCount,\n itemData,\n}: {\n theme: Theme;\n isMobile: boolean;\n itemCount: number;\n itemData: React.ReactNode[];\n}): {\n actionListItemHeight: number;\n actionListBoxHeight: number;\n} => {\n const itemHeightResponsive = getActionListItemHeight(theme);\n const actionListPadding = getActionListPadding(theme);\n const actionListItemHeight = isMobile\n ? itemHeightResponsive.itemHeightMobile\n : itemHeightResponsive.itemHeightDesktop;\n const shouldCalculateMinimumHeight = itemCount <= 10;\n const actionListBoxHeight = actionListMaxHeight - actionListPadding * 2;\n const actionListBoxMinHeight = shouldCalculateMinimumHeight\n ? itemData.reduce<number>((acc, _, index) => {\n const itemHeight = getItemHeight({ index, itemData, actionListItemHeight });\n return acc + itemHeight;\n }, 0)\n : actionListBoxHeight;\n const finalActionListBoxHeight = Math.min(actionListBoxHeight, actionListBoxMinHeight);\n\n return {\n actionListItemHeight,\n actionListBoxHeight: finalActionListBoxHeight,\n };\n};\n\n/**\n * Takes the children (ActionListItem) and returns the filtered items based on `filteredValues` state\n */\nconst useFilteredItems = (\n children: React.ReactNode[],\n): {\n itemData: React.ReactNode[];\n itemCount: number;\n} => {\n const childrenArray = React.Children.toArray(children); // Convert children to an array\n\n const { filteredValues, hasAutoCompleteInBottomSheetHeader, dropdownTriggerer } = useDropdown();\n\n const items = React.useMemo(() => {\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n if (!hasAutoComplete) {\n return childrenArray;\n }\n\n const filteredItems = childrenArray.reduce<React.ReactNode[]>((acc, item, index) => {\n if (getComponentId(item) === componentIds.ActionListSection) {\n const sectionTitle = (\n <ActionListSectionTitle\n key={index}\n // @ts-expect-error: props does exist\n title={item?.props.title}\n isInsideVirtualizedList\n />\n );\n // @ts-expect-error: props does exist\n const sectionChildren = item?.props.children;\n\n const divider =\n index !== childrenArray.length - 1 ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" key={`divider-${index}`} />\n ) : null;\n const filteredSectionChildren = sectionChildren.filter(\n (item: { props: { value: string } }) => filteredValues.includes(item.props.value),\n );\n if (filteredSectionChildren.length !== 0) {\n acc.push(sectionTitle, ...filteredSectionChildren, divider);\n }\n } else {\n // @ts-expect-error: props does exist\n const value = item?.props.value;\n if (filteredValues.includes(value)) {\n acc.push(item);\n }\n }\n return acc;\n }, []);\n\n return filteredItems;\n }, [filteredValues, hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, childrenArray]);\n\n return {\n itemData: items,\n itemCount: items.length,\n };\n};\n\nconst VirtualListItem = React.memo(\n ({\n index,\n style,\n data,\n onVirtualizedFocus,\n }: {\n index: number;\n style: React.CSSProperties;\n data: React.ReactNode[];\n onVirtualizedFocus: (index: number) => void;\n }): React.ReactElement | null => {\n const currentItem = data[index];\n\n if (\n React.isValidElement(currentItem) &&\n getComponentId(currentItem) === componentIds.ActionListItem\n ) {\n // Clone the element passed via `data` and add the `_virtualizedIndex` prop\n const elementWithIndex = React.cloneElement(\n currentItem as React.ReactElement<ActionListItemProps>,\n {\n _virtualizedIndex: index,\n _onVirtualizedFocus: onVirtualizedFocus,\n },\n );\n\n return <div style={style}>{elementWithIndex}</div>;\n }\n\n return <div style={style}>{data[index]}</div>;\n },\n (prevProps, nextProps) => {\n // Custom comparison function to determine if component should update\n return (\n prevProps.index === nextProps.index &&\n prevProps.style === nextProps.style &&\n prevProps.data[prevProps.index] === nextProps.data[nextProps.index]\n );\n },\n);\n\nconst _ActionListVirtualizedBox = React.forwardRef<HTMLDivElement, ActionListBoxProps>(\n ({ childrenWithId, actionListItemWrapperRole, isMultiSelectable, ...rest }, ref) => {\n const virtualizedListRef = React.useRef<VariableSizeList>(null);\n const [visibleStartIndex, setVisibleStartIndex] = React.useState(0);\n const [visibleStopIndex, setVisibleStopIndex] = React.useState(0);\n const items = React.Children.toArray(childrenWithId); // Convert children to an array\n const { isInBottomSheet } = useBottomSheetContext();\n const { itemData, itemCount } = useFilteredItems(items);\n\n const isMobile = useIsMobile();\n const { theme } = useTheme();\n const { actionListItemHeight, actionListBoxHeight } = React.useMemo(\n () => getVirtualItemParams({ theme, isMobile, itemCount, itemData }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [theme.name, isMobile, itemCount, itemData],\n );\n React.useEffect(() => {\n virtualizedListRef?.current?.resetAfterIndex(0);\n virtualizedListRef?.current?.scrollToItem(0);\n }, [itemCount]);\n\n return (\n <StyledListBoxWrapper\n isInBottomSheet={isInBottomSheet}\n // in case of virtualized list, we only render visible items. so css will hide divider for every last item visible. instead of hiding the last divider of the list.\n ref={ref}\n {...makeAccessible({\n role: actionListItemWrapperRole,\n multiSelectable: actionListItemWrapperRole === 'listbox' ? isMultiSelectable : undefined,\n })}\n {...makeAnalyticsAttribute(rest)}\n >\n <VirtualizedList<React.ReactNode[]>\n ref={virtualizedListRef}\n height={actionListBoxHeight}\n width=\"100%\"\n itemSize={(index) => getItemHeight({ index, itemData, actionListItemHeight })}\n itemCount={itemCount}\n itemData={itemData}\n itemKey={(index) =>\n // @ts-expect-error: props does exist\n itemData[index]?.props.value ??\n // @ts-expect-error: props does exist\n itemData[index]?.props.title ??\n // @ts-expect-error: props does exist\n itemData[index]?.props.key\n }\n onItemsRendered={({ visibleStartIndex, visibleStopIndex }) => {\n setVisibleStartIndex(visibleStartIndex);\n setVisibleStopIndex(visibleStopIndex);\n }}\n >\n {useCallback(\n ({ index, style, data }) => {\n return (\n <VirtualListItem\n index={index}\n style={style}\n data={data}\n onVirtualizedFocus={(index) => {\n // We need scroll Direction to determine the index to focus\n const scrollDirection =\n Math.round((visibleStartIndex + visibleStopIndex) / 2) > index\n ? 'top'\n : 'bottom';\n virtualizedListRef?.current?.resetAfterIndex(0);\n /**\n * we are scrolling to the item which is 3 items away from the current item.\n * since we can have 2 item sectoin header and divider which are not focusable.\n */\n virtualizedListRef?.current?.scrollToItem(\n index + (scrollDirection === 'top' ? -3 : 3),\n 'smart',\n );\n }}\n />\n );\n },\n [visibleStartIndex, visibleStopIndex],\n )}\n </VirtualizedList>\n </StyledListBoxWrapper>\n );\n },\n);\n\nconst ActionListVirtualizedBox = assignWithoutSideEffects(React.memo(_ActionListVirtualizedBox), {\n displayName: 'ActionListVirtualizedBox',\n});\n\nexport { ActionListBox, ActionListVirtualizedBox };\n"],"names":["_ActionListBox","React","forwardRef","_ref","ref","childrenWithId","actionListItemWrapperRole","isMultiSelectable","rest","_objectWithoutProperties","_excluded","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_jsx","StyledListBoxWrapper","_objectSpread","makeAccessible","role","multiSelectable","undefined","makeAnalyticsAttribute","children","ActionListBox","assignWithoutSideEffects","memo","displayName","getItemHeight","_ref2","_itemData$index","index","itemData","actionListItemHeight","getComponentId","componentIds","ActionListItem","ActionListSectionTitle","actionListSectionTitleHeight","key","includes","actionListDividerHeight","getVirtualItemParams","_ref3","theme","isMobile","itemCount","itemHeightResponsive","getActionListItemHeight","actionListPadding","getActionListPadding","itemHeightMobile","itemHeightDesktop","shouldCalculateMinimumHeight","actionListBoxHeight","actionListMaxHeight","actionListBoxMinHeight","reduce","acc","_","itemHeight","finalActionListBoxHeight","Math","min","useFilteredItems","childrenArray","Children","toArray","_useDropdown","useDropdown","filteredValues","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","items","useMemo","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","filteredItems","item","ActionListSection","sectionTitle","title","props","isInsideVirtualizedList","sectionChildren","divider","length","Divider","marginX","marginY","concat","filteredSectionChildren","filter","value","push","apply","_toConsumableArray","VirtualListItem","_ref4","style","data","onVirtualizedFocus","currentItem","isValidElement","elementWithIndex","cloneElement","_virtualizedIndex","_onVirtualizedFocus","prevProps","nextProps","_ActionListVirtualizedBox","_ref5","_excluded2","virtualizedListRef","useRef","_React$useState","useState","_React$useState2","_slicedToArray","visibleStartIndex","setVisibleStartIndex","_React$useState3","_React$useState4","visibleStopIndex","setVisibleStopIndex","_useBottomSheetContex2","_useFilteredItems","useIsMobile","_useTheme","useTheme","_React$useMemo","name","useEffect","_virtualizedListRef$c","_virtualizedListRef$c2","current","resetAfterIndex","scrollToItem","VirtualizedList","height","width","itemSize","itemKey","_ref6","_itemData$index$props","_itemData$index2","_itemData$index3","_itemData$index4","onItemsRendered","_ref7","useCallback","_ref8","_virtualizedListRef$c3","_virtualizedListRef$c4","scrollDirection","round","ActionListVirtualizedBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,IAAMA,cAAc,gBAAGC,cAAK,CAACC,UAAU,CACrC,UAAAC,IAAA,EAA4EC,GAAG,EAAK;AAAA,EAAA,IAAjFC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IAAEC,yBAAyB,GAAAH,IAAA,CAAzBG,yBAAyB;IAAEC,iBAAiB,GAAAJ,IAAA,CAAjBI,iBAAiB;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA,CAAA,CAAA;AACtE,EAAA,IAAAC,qBAAA,GAA4BC,qBAAqB,EAAE;IAA3CC,eAAe,GAAAF,qBAAA,CAAfE,eAAe,CAAA;EAEvB,oBACEC,GAAA,CAACC,oBAAoB,EAAAC,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACnBH,IAAAA,eAAe,EAAEA,eAAgB;AACjCT,IAAAA,GAAG,EAAEA,GAAAA;AAAI,GAAA,EACLa,cAAc,CAAC;AACjBC,IAAAA,IAAI,EAAEZ,y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