@razorpay/blade 11.21.8 → 11.22.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 (165) hide show
  1. package/build/lib/native/components/ActionList/ActionListItem.js +12 -12
  2. package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
  3. package/build/lib/native/components/BaseHeaderFooter/BaseFooter.js +1 -1
  4. package/build/lib/native/components/BaseHeaderFooter/BaseFooter.js.map +1 -1
  5. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +1 -1
  6. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  7. package/build/lib/native/components/BaseMenu/BaseMenuContext.js +6 -0
  8. package/build/lib/native/components/BaseMenu/BaseMenuContext.js.map +1 -0
  9. package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +22 -0
  10. package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -0
  11. package/build/lib/native/components/BaseMenu/BaseMenuItem/StyledMenuItemContainer.native.js +12 -0
  12. package/build/lib/native/components/BaseMenu/BaseMenuItem/StyledMenuItemContainer.native.js.map +1 -0
  13. package/build/lib/native/components/BaseMenu/BaseMenuItem/getBaseMenuItemStyles.js +12 -0
  14. package/build/lib/native/components/BaseMenu/BaseMenuItem/getBaseMenuItemStyles.js.map +1 -0
  15. package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
  16. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  17. package/build/lib/native/components/Button/Button/Button.js +1 -1
  18. package/build/lib/native/components/Button/Button/Button.js.map +1 -1
  19. package/build/lib/native/components/Link/BaseLink/BaseLink.js +1 -1
  20. package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
  21. package/build/lib/native/components/Link/Link/Link.js +1 -1
  22. package/build/lib/native/components/Link/Link/Link.js.map +1 -1
  23. package/build/lib/native/components/Menu/Menu.native.js +17 -0
  24. package/build/lib/native/components/Menu/Menu.native.js.map +1 -0
  25. package/build/lib/native/components/Menu/MenuItem.native.js +17 -0
  26. package/build/lib/native/components/Menu/MenuItem.native.js.map +1 -0
  27. package/build/lib/native/components/Menu/MenuOverlay.native.js +17 -0
  28. package/build/lib/native/components/Menu/MenuOverlay.native.js.map +1 -0
  29. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js +17 -0
  30. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js.map +1 -0
  31. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js +17 -0
  32. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js.map +1 -0
  33. package/build/lib/native/components/index.js +5 -0
  34. package/build/lib/native/components/index.js.map +1 -1
  35. package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
  36. package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
  37. package/build/lib/web/development/components/ActionList/ActionListItem.js +43 -118
  38. package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
  39. package/build/lib/web/development/components/Avatar/Avatar.web.js +29 -6
  40. package/build/lib/web/development/components/Avatar/Avatar.web.js.map +1 -1
  41. package/build/lib/web/development/components/Avatar/AvatarButton.js +25 -3
  42. package/build/lib/web/development/components/Avatar/AvatarButton.js.map +1 -1
  43. package/build/lib/web/development/components/BaseHeaderFooter/BaseFooter.js +2 -1
  44. package/build/lib/web/development/components/BaseHeaderFooter/BaseFooter.js.map +1 -1
  45. package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +4 -0
  46. package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  47. package/build/lib/web/development/components/BaseMenu/BaseMenuContext.js +10 -0
  48. package/build/lib/web/development/components/BaseMenu/BaseMenuContext.js.map +1 -0
  49. package/build/lib/web/development/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +124 -0
  50. package/build/lib/web/development/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -0
  51. package/build/lib/web/development/components/BaseMenu/BaseMenuItem/StyledMenuItemContainer.web.js +41 -0
  52. package/build/lib/web/development/components/BaseMenu/BaseMenuItem/StyledMenuItemContainer.web.js.map +1 -0
  53. package/build/lib/web/development/components/{ActionList/styles/getBaseActionListItemStyles.js → BaseMenu/BaseMenuItem/getBaseMenuItemStyles.js} +10 -9
  54. package/build/lib/web/development/components/BaseMenu/BaseMenuItem/getBaseMenuItemStyles.js.map +1 -0
  55. package/build/lib/web/development/components/BaseMenu/index.js +3 -0
  56. package/build/lib/web/development/components/BaseMenu/index.js.map +1 -0
  57. package/build/lib/web/development/components/BaseMenu/tokens.js +8 -0
  58. package/build/lib/web/development/components/BaseMenu/tokens.js.map +1 -0
  59. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +16 -7
  60. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  61. package/build/lib/web/development/components/Button/Button/Button.js +8 -2
  62. package/build/lib/web/development/components/Button/Button/Button.js.map +1 -1
  63. package/build/lib/web/development/components/DatePicker/QuickSelection/QuickSelectionItem.web.js +6 -27
  64. package/build/lib/web/development/components/DatePicker/QuickSelection/QuickSelectionItem.web.js.map +1 -1
  65. package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js +3 -2
  66. package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js.map +1 -1
  67. package/build/lib/web/development/components/FileUpload/FileUpload.web.js +35 -19
  68. package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
  69. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +5 -1
  70. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
  71. package/build/lib/web/development/components/Link/Link/Link.js +6 -2
  72. package/build/lib/web/development/components/Link/Link/Link.js.map +1 -1
  73. package/build/lib/web/development/components/Menu/Menu.web.js +99 -0
  74. package/build/lib/web/development/components/Menu/Menu.web.js.map +1 -0
  75. package/build/lib/web/development/components/Menu/MenuItem.web.js +63 -0
  76. package/build/lib/web/development/components/Menu/MenuItem.web.js.map +1 -0
  77. package/build/lib/web/development/components/Menu/MenuOverlay.web.js +59 -0
  78. package/build/lib/web/development/components/Menu/MenuOverlay.web.js.map +1 -0
  79. package/build/lib/web/development/components/Menu/VisualSubComponents/MenuDivider.web.js +18 -0
  80. package/build/lib/web/development/components/Menu/VisualSubComponents/MenuDivider.web.js.map +1 -0
  81. package/build/lib/web/development/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js +65 -0
  82. package/build/lib/web/development/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js.map +1 -0
  83. package/build/lib/web/development/components/Menu/index.js +6 -0
  84. package/build/lib/web/development/components/Menu/index.js.map +1 -0
  85. package/build/lib/web/development/components/Menu/tokens.js +26 -0
  86. package/build/lib/web/development/components/Menu/tokens.js.map +1 -0
  87. package/build/lib/web/development/components/Menu/useMenu.js +178 -0
  88. package/build/lib/web/development/components/Menu/useMenu.js.map +1 -0
  89. package/build/lib/web/development/components/Tooltip/Tooltip.web.js +1 -3
  90. package/build/lib/web/development/components/Tooltip/Tooltip.web.js.map +1 -1
  91. package/build/lib/web/development/components/index.js +6 -0
  92. package/build/lib/web/development/components/index.js.map +1 -1
  93. package/build/lib/web/development/utils/metaAttribute/metaConstants.js +3 -0
  94. package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
  95. package/build/lib/web/production/components/ActionList/ActionListItem.js +43 -118
  96. package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
  97. package/build/lib/web/production/components/Avatar/Avatar.web.js +29 -6
  98. package/build/lib/web/production/components/Avatar/Avatar.web.js.map +1 -1
  99. package/build/lib/web/production/components/Avatar/AvatarButton.js +25 -3
  100. package/build/lib/web/production/components/Avatar/AvatarButton.js.map +1 -1
  101. package/build/lib/web/production/components/BaseHeaderFooter/BaseFooter.js +2 -1
  102. package/build/lib/web/production/components/BaseHeaderFooter/BaseFooter.js.map +1 -1
  103. package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +4 -0
  104. package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  105. package/build/lib/web/production/components/BaseMenu/BaseMenuContext.js +10 -0
  106. package/build/lib/web/production/components/BaseMenu/BaseMenuContext.js.map +1 -0
  107. package/build/lib/web/production/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +124 -0
  108. package/build/lib/web/production/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -0
  109. package/build/lib/web/production/components/BaseMenu/BaseMenuItem/StyledMenuItemContainer.web.js +41 -0
  110. package/build/lib/web/production/components/BaseMenu/BaseMenuItem/StyledMenuItemContainer.web.js.map +1 -0
  111. package/build/lib/web/production/components/{ActionList/styles/getBaseActionListItemStyles.js → BaseMenu/BaseMenuItem/getBaseMenuItemStyles.js} +10 -9
  112. package/build/lib/web/production/components/BaseMenu/BaseMenuItem/getBaseMenuItemStyles.js.map +1 -0
  113. package/build/lib/web/production/components/BaseMenu/index.js +3 -0
  114. package/build/lib/web/production/components/BaseMenu/index.js.map +1 -0
  115. package/build/lib/web/production/components/BaseMenu/tokens.js +8 -0
  116. package/build/lib/web/production/components/BaseMenu/tokens.js.map +1 -0
  117. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +16 -7
  118. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  119. package/build/lib/web/production/components/Button/Button/Button.js +8 -2
  120. package/build/lib/web/production/components/Button/Button/Button.js.map +1 -1
  121. package/build/lib/web/production/components/DatePicker/QuickSelection/QuickSelectionItem.web.js +6 -27
  122. package/build/lib/web/production/components/DatePicker/QuickSelection/QuickSelectionItem.web.js.map +1 -1
  123. package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js +3 -2
  124. package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js.map +1 -1
  125. package/build/lib/web/production/components/FileUpload/FileUpload.web.js +35 -19
  126. package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
  127. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +5 -1
  128. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
  129. package/build/lib/web/production/components/Link/Link/Link.js +6 -2
  130. package/build/lib/web/production/components/Link/Link/Link.js.map +1 -1
  131. package/build/lib/web/production/components/Menu/Menu.web.js +99 -0
  132. package/build/lib/web/production/components/Menu/Menu.web.js.map +1 -0
  133. package/build/lib/web/production/components/Menu/MenuItem.web.js +63 -0
  134. package/build/lib/web/production/components/Menu/MenuItem.web.js.map +1 -0
  135. package/build/lib/web/production/components/Menu/MenuOverlay.web.js +59 -0
  136. package/build/lib/web/production/components/Menu/MenuOverlay.web.js.map +1 -0
  137. package/build/lib/web/production/components/Menu/VisualSubComponents/MenuDivider.web.js +18 -0
  138. package/build/lib/web/production/components/Menu/VisualSubComponents/MenuDivider.web.js.map +1 -0
  139. package/build/lib/web/production/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js +65 -0
  140. package/build/lib/web/production/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js.map +1 -0
  141. package/build/lib/web/production/components/Menu/index.js +6 -0
  142. package/build/lib/web/production/components/Menu/index.js.map +1 -0
  143. package/build/lib/web/production/components/Menu/tokens.js +26 -0
  144. package/build/lib/web/production/components/Menu/tokens.js.map +1 -0
  145. package/build/lib/web/production/components/Menu/useMenu.js +178 -0
  146. package/build/lib/web/production/components/Menu/useMenu.js.map +1 -0
  147. package/build/lib/web/production/components/Tooltip/Tooltip.web.js +1 -3
  148. package/build/lib/web/production/components/Tooltip/Tooltip.web.js.map +1 -1
  149. package/build/lib/web/production/components/index.js +6 -0
  150. package/build/lib/web/production/components/index.js.map +1 -1
  151. package/build/lib/web/production/utils/metaAttribute/metaConstants.js +3 -0
  152. package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
  153. package/build/types/components/index.d.ts +755 -3
  154. package/build/types/components/index.native.d.ts +170 -2
  155. package/package.json +1 -1
  156. package/build/lib/native/components/ActionList/styles/StyledActionListItem.native.js +0 -8
  157. package/build/lib/native/components/ActionList/styles/StyledActionListItem.native.js.map +0 -1
  158. package/build/lib/native/components/ActionList/styles/getBaseActionListItemStyles.js +0 -11
  159. package/build/lib/native/components/ActionList/styles/getBaseActionListItemStyles.js.map +0 -1
  160. package/build/lib/web/development/components/ActionList/styles/StyledActionListItem.web.js +0 -33
  161. package/build/lib/web/development/components/ActionList/styles/StyledActionListItem.web.js.map +0 -1
  162. package/build/lib/web/development/components/ActionList/styles/getBaseActionListItemStyles.js.map +0 -1
  163. package/build/lib/web/production/components/ActionList/styles/StyledActionListItem.web.js +0 -33
  164. package/build/lib/web/production/components/ActionList/styles/StyledActionListItem.web.js.map +0 -1
  165. package/build/lib/web/production/components/ActionList/styles/getBaseActionListItemStyles.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.web.js","sources":["../../../../../../src/components/Tooltip/Tooltip.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport {\n shift,\n FloatingPortal,\n arrow,\n flip,\n offset,\n useDelayGroup,\n useDelayGroupContext,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useRole,\n useTransitionStyles,\n autoUpdate,\n} from '@floating-ui/react';\nimport React from 'react';\nimport type { TooltipProps } from './types';\nimport { TooltipContent } from './TooltipContent';\nimport { ARROW_HEIGHT, ARROW_WIDTH } from './constants';\nimport { TooltipContext } from './TooltipContext';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { size } from '~tokens/global';\nimport { useId } from '~utils/useId';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { mergeProps } from '~utils/mergeProps';\nimport { PopupArrow } from '~components/PopupArrow';\nimport { getFloatingPlacementParts } from '~utils/getFloatingPlacementParts';\nimport { componentZIndices } from '~utils/componentZIndices';\n\nconst Tooltip = ({\n title,\n content,\n children,\n placement = 'top',\n onOpenChange,\n zIndex = componentZIndices.tooltip,\n}: TooltipProps): React.ReactElement => {\n const { theme } = useTheme();\n const id = useId();\n const [isOpen, setIsOpen] = React.useState(false);\n const arrowRef = React.useRef<SVGSVGElement>(null);\n\n const GAP = theme.spacing[2];\n const [side] = getFloatingPlacementParts(placement);\n const isHorizontal = side === 'left' || side === 'right';\n const isOppositeAxis = side === 'right' || side === 'bottom';\n\n const { refs, floatingStyles, context } = useFloating({\n placement,\n open: isOpen,\n strategy: 'fixed',\n onOpenChange: (open) => {\n setIsOpen(open);\n onOpenChange?.({ isOpen: open });\n },\n middleware: [\n shift({ crossAxis: false, padding: GAP }),\n flip({ padding: GAP }),\n offset(GAP + ARROW_HEIGHT),\n arrow({\n element: arrowRef,\n padding: isHorizontal ? 0 : ARROW_WIDTH,\n }),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const animationOffset = isOppositeAxis ? -size[4] : size[4];\n const { isMounted, styles } = useTransitionStyles(context, {\n duration: theme.motion.duration.quick,\n initial: {\n opacity: 0,\n transform: `translate${isHorizontal ? 'X' : 'Y'}(${animationOffset}px)`,\n },\n });\n\n useDelayGroup(context, { id });\n const { delay } = useDelayGroupContext();\n const hover = useHover(context, {\n delay,\n move: false,\n });\n const focus = useFocus(context);\n const role = useRole(context, { role: 'tooltip' });\n const { getReferenceProps, getFloatingProps } = useInteractions([role, hover, focus]);\n\n return (\n <TooltipContext.Provider value={true}>\n {/* Cloning the trigger children to enhance it with ref and event handler */}\n {React.cloneElement(children, {\n ref: refs.setReference,\n ...makeAccessible({ label: content }),\n ...mergeProps(children.props, getReferenceProps()),\n })}\n {isMounted && (\n <FloatingPortal>\n <BaseBox\n ref={refs.setFloating}\n style={floatingStyles}\n pointerEvents=\"none\"\n // TODO: Tokenize zIndex values\n zIndex={zIndex}\n {...getFloatingProps()}\n {...metaAttribute({ name: MetaConstants.Tooltip })}\n >\n <TooltipContent\n title={title}\n style={styles}\n arrow={\n <PopupArrow\n ref={arrowRef}\n context={context}\n width={ARROW_WIDTH}\n height={ARROW_HEIGHT}\n fillColor={theme.colors.popup.background.intense}\n strokeColor={theme.colors.popup.border.intense}\n />\n }\n >\n {content}\n </TooltipContent>\n </BaseBox>\n </FloatingPortal>\n )}\n </TooltipContext.Provider>\n );\n};\n\nexport { Tooltip };\n"],"names":["Tooltip","_ref","title","content","children","_ref$placement","placement","onOpenChange","_ref$zIndex","zIndex","componentZIndices","tooltip","_useTheme","useTheme","theme","id","useId","_React$useState","React","useState","_React$useState2","_slicedToArray","isOpen","setIsOpen","arrowRef","useRef","GAP","spacing","_getFloatingPlacement","getFloatingPlacementParts","_getFloatingPlacement2","side","isHorizontal","isOppositeAxis","_useFloating","useFloating","open","strategy","middleware","shift","crossAxis","padding","flip","offset","ARROW_HEIGHT","arrow","element","ARROW_WIDTH","whileElementsMounted","autoUpdate","refs","floatingStyles","context","animationOffset","size","_useTransitionStyles","useTransitionStyles","duration","motion","quick","initial","opacity","transform","concat","isMounted","styles","useDelayGroup","_useDelayGroupContext","useDelayGroupContext","delay","hover","useHover","move","focus","useFocus","role","useRole","_useInteractions","useInteractions","getReferenceProps","getFloatingProps","_jsxs","TooltipContext","Provider","value","cloneElement","_objectSpread","ref","setReference","makeAccessible","label","mergeProps","props","_jsx","FloatingPortal","BaseBox","setFloating","style","pointerEvents","metaAttribute","name","MetaConstants","TooltipContent","PopupArrow","width","height","fillColor","colors","popup","background","intense","strokeColor","border"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAMA,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAO2B;AAAA,EAAA,IANtCC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,cAAA;IACjBE,aAAY,G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S,iBACR6B,GAAA,CAACC,cAAc,EAAA;MAAA1F,QAAA,eACbyF,GAAA,CAACE,OAAO,EAAAT,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;QACNC,GAAG,EAAErC,IAAI,CAAC8C,WAAY;AACtBC,QAAAA,KAAK,EAAE9C,cAAe;AACtB+C,QAAAA,aAAa,EAAC,MAAA;AACd;AAAA;AACAzF,QAAAA,MAAM,EAAEA,MAAAA;AAAO,OAAA,EACXuE,gBAAgB,EAAE,CAAA,EAClBmB,aAAa,CAAC;QAAEC,IAAI,EAAEC,aAAa,CAACrG,OAAAA;AAAQ,OAAC,CAAC,CAAA,EAAA,EAAA,EAAA;QAAAI,QAAA,eAElDyF,GAAA,CAACS,cAAc,EAAA;AACbpG,UAAAA,KAAK,EAAEA,KAAM;AACb+F,UAAAA,KAAK,EAAEhC,MAAO;UACdpB,KAAK,eACHgD,GAAA,CAACU,UAAU,EAAA;AACThB,YAAAA,GAAG,EAAE/D,QAAS;AACd4B,YAAAA,OAAO,EAAEA,OAAQ;AACjBoD,YAAAA,KAAK,EAAEzD,WAAY;AACnB0D,YAAAA,MAAM,EAAE7D,YAAa;YACrB8D,SAAS,EAAE5F,KAAK,CAAC6F,MAAM,CAACC,KAAK,CAACC,UAAU,CAACC,OAAQ;YACjDC,WAAW,EAAEjG,KAAK,CAAC6F,MAAM,CAACC,KAAK,CAACI,MAAM,CAACF,OAAAA;AAAQ,WAChD,CACF;AAAA1G,UAAAA,QAAA,EAEAD,OAAAA;SACa,CAAA;OACT,CAAA,CAAA;AAAC,KACI,CACjB,CAAA;AAAA,GACsB,CAAC,CAAA;AAE9B;;;;"}
1
+ {"version":3,"file":"Tooltip.web.js","sources":["../../../../../../src/components/Tooltip/Tooltip.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport {\n shift,\n FloatingPortal,\n arrow,\n flip,\n offset,\n useDelayGroup,\n useDelayGroupContext,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useRole,\n useTransitionStyles,\n autoUpdate,\n} from '@floating-ui/react';\nimport React from 'react';\nimport type { TooltipProps } from './types';\nimport { TooltipContent } from './TooltipContent';\nimport { ARROW_HEIGHT, ARROW_WIDTH } from './constants';\nimport { TooltipContext } from './TooltipContext';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { size } from '~tokens/global';\nimport { useId } from '~utils/useId';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { mergeProps } from '~utils/mergeProps';\nimport { PopupArrow } from '~components/PopupArrow';\nimport { getFloatingPlacementParts } from '~utils/getFloatingPlacementParts';\nimport { componentZIndices } from '~utils/componentZIndices';\n\nconst Tooltip = ({\n title,\n content,\n children,\n placement = 'top',\n onOpenChange,\n zIndex = componentZIndices.tooltip,\n}: TooltipProps): React.ReactElement => {\n const { theme } = useTheme();\n const id = useId();\n const [isOpen, setIsOpen] = React.useState(false);\n const arrowRef = React.useRef<SVGSVGElement>(null);\n\n const GAP = theme.spacing[2];\n const [side] = getFloatingPlacementParts(placement);\n const isHorizontal = side === 'left' || side === 'right';\n const isOppositeAxis = side === 'right' || side === 'bottom';\n\n const { refs, floatingStyles, context } = useFloating({\n placement,\n open: isOpen,\n strategy: 'fixed',\n onOpenChange: (open) => {\n setIsOpen(open);\n onOpenChange?.({ isOpen: open });\n },\n middleware: [\n shift({ crossAxis: false, padding: GAP }),\n flip({ padding: GAP }),\n offset(GAP + ARROW_HEIGHT),\n arrow({\n element: arrowRef,\n padding: isHorizontal ? 0 : ARROW_WIDTH,\n }),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const animationOffset = isOppositeAxis ? -size[4] : size[4];\n const { isMounted, styles } = useTransitionStyles(context, {\n duration: theme.motion.duration.quick,\n initial: {\n opacity: 0,\n transform: `translate${isHorizontal ? 'X' : 'Y'}(${animationOffset}px)`,\n },\n });\n\n useDelayGroup(context, { id });\n const { delay } = useDelayGroupContext();\n const hover = useHover(context, {\n delay,\n move: false,\n });\n const focus = useFocus(context);\n const role = useRole(context, { role: 'tooltip' });\n const { getReferenceProps, getFloatingProps } = useInteractions([role, hover, focus]);\n\n return (\n <TooltipContext.Provider value={true}>\n {React.cloneElement(children, {\n ref: refs.setReference,\n ...makeAccessible({ label: content }),\n ...mergeProps(children.props, getReferenceProps()),\n })}\n {isMounted && (\n <FloatingPortal>\n <BaseBox\n ref={refs.setFloating}\n style={floatingStyles}\n pointerEvents=\"none\"\n zIndex={zIndex}\n {...getFloatingProps()}\n {...metaAttribute({ name: MetaConstants.Tooltip })}\n >\n <TooltipContent\n title={title}\n style={styles}\n arrow={\n <PopupArrow\n ref={arrowRef}\n context={context}\n width={ARROW_WIDTH}\n height={ARROW_HEIGHT}\n fillColor={theme.colors.popup.background.intense}\n strokeColor={theme.colors.popup.border.intense}\n />\n }\n >\n {content}\n </TooltipContent>\n </BaseBox>\n </FloatingPortal>\n )}\n </TooltipContext.Provider>\n );\n};\n\nexport { Tooltip };\n"],"names":["Tooltip","_ref","title","content","children","_ref$placement","placement","onOpenChange","_ref$zIndex","zIndex","componentZIndices","tooltip","_useTheme","useTheme","theme","id","useId","_React$useState","React","useState","_React$useState2","_slicedToArray","isOpen","setIsOpen","arrowRef","useRef","GAP","spacing","_getFloatingPlacement","getFloatingPlacementParts","_getFloatingPlacement2","side","isHorizontal","isOppositeAxis","_useFloating","useFloating","open","strategy","middleware","shift","crossAxis","padding","flip","offset","ARROW_HEIGHT","arrow","element","ARROW_WIDTH","whileElementsMounted","autoUpdate","refs","floatingStyles","context","animationOffset","size","_useTransitionStyles","useTransitionStyles","duration","motion","quick","initial","opacity","transform","concat","isMounted","styles","useDelayGroup","_useDelayGroupContext","useDelayGroupContext","delay","hover","useHover","move","focus","useFocus","role","useRole","_useInteractions","useInteractions","getReferenceProps","getFloatingProps","_jsxs","TooltipContext","Provider","value","cloneElement","_objectSpread","ref","setReference","makeAccessible","label","mergeProps","props","_jsx","FloatingPortal","BaseBox","setFloating","style","pointerEvents","metaAttribute","name","MetaConstants","TooltipContent","PopupArrow","width","height","fillColor","colors","popup","background","intense","strokeColor","border"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAMA,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAO2B;AAAA,EAAA,IANtCC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IACPC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAAC,cAAA,GAAAJ,IAAA,CACRK,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,cAAA;IACjBE,aAAY,GAAAN,IAAA,CAAZM,YAAY;IAAAC,WAAA,GAAAP,IAAA,CACZQ,MAAM;AAANA,IAAAA,MAAM,GAAAD,WAAA,KAAA,KAAA,CAAA,GAAGE,iBAAiB,CAACC,OAAO,GAAAH,WAAA,CAAA;AAElC,EAAA,IAAAI,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;AACb,EAAA,IAAMC,EAAE,GAAGC,KAAK,EAAE,CAAA;AAClB,EAAA,IAAAC,eAAA,GAA4BC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;IAAAC,gBAAA,GAAAC,cAAA,CAAAJ,eAAA,EAAA,CAAA,CAAA;AAA1CK,IAAAA,MAAM,GAAAF,gBAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,SAAS,GAAAH,gBAAA,CAAA,CAAA,CAAA,CAAA;AACxB,EAAA,IAAMI,QAAQ,GAAGN,cAAK,CAACO,MAAM,CAAgB,IAAI,CAAC,CAAA;AAElD,EAAA,IAAMC,GAAG,GAAGZ,KAAK,CAACa,OAAO,CAAC,CAAC,CAAC,CAAA;AAC5B,EAAA,IAAAC,qBAAA,GAAeC,yBAAyB,CAACvB,SAAS,CAAC;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,CAACC,UAAU,CAACC,OAAQ;YACjDC,WAAW,EAAEjG,KAAK,CAAC6F,MAAM,CAACC,KAAK,CAACI,MAAM,CAACF,OAAAA;AAAQ,WAChD,CACF;AAAA1G,UAAAA,QAAA,EAEAD,OAAAA;SACa,CAAA;OACT,CAAA,CAAA;AAAC,KACI,CACjB,CAAA;AAAA,GACsB,CAAC,CAAA;AAE9B;;;;"}
@@ -35,6 +35,7 @@ import './Link/index.js';
35
35
  import './List/index.js';
36
36
  import './LiveAnnouncer/index.web.js';
37
37
  import './Modal/index.js';
38
+ import './Menu/index.js';
38
39
  import './Popover/index.js';
39
40
  import './ProgressBar/index.js';
40
41
  import './Radio/index.js';
@@ -465,6 +466,11 @@ export { Modal } from './Modal/Modal.web.js';
465
466
  export { ModalBody } from './Modal/ModalBody.web.js';
466
467
  export { ModalHeader } from './Modal/ModalHeader.web.js';
467
468
  export { ModalFooter } from './Modal/ModalFooter.web.js';
469
+ export { Menu } from './Menu/Menu.web.js';
470
+ export { MenuItem } from './Menu/MenuItem.web.js';
471
+ export { MenuOverlay } from './Menu/MenuOverlay.web.js';
472
+ export { MenuDivider } from './Menu/VisualSubComponents/MenuDivider.web.js';
473
+ export { MenuFooter, MenuHeader } from './Menu/VisualSubComponents/MenuHeaderFooter.web.js';
468
474
  export { Popover } from './Popover/Popover.web.js';
469
475
  export { PopoverInteractiveWrapper } from './Popover/PopoverInteractiveWrapper.web.js';
470
476
  export { ProgressBar } from './ProgressBar/ProgressBar.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -103,6 +103,9 @@ var MetaConstants = {
103
103
  CollapsibleBody: 'collapsible-body',
104
104
  CollapsibleButton: 'collapsible-button',
105
105
  CollapsibleLink: 'collapsible-link',
106
+ Menu: 'menu',
107
+ MenuHeader: 'menu-header',
108
+ MenuFooter: 'menu-footer',
106
109
  Modal: 'modal',
107
110
  ModalBody: 'modal-body',
108
111
  ModalHeader: 'modal-header',
@@ -1 +1 @@
1
- {"version":3,"file":"metaConstants.js","sources":["../../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Avatar: 'avatar',\n AvatarGroup: 'avatar-group',\n Badge: 'badge',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n Carousel: 'carousel',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n DatePicker: 'datepicker',\n Calendar: 'calendar',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n Icon: 'icon',\n IconButton: 'icon-button',\n Indicator: 'indicator',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n SearchInput: 'search-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SideNav: 'sidenav',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n StepGroup: 'step-group',\n StepItem: 'step-item',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Avatar","AvatarGroup","Badge","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","Carousel","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","DatePicker","Calendar","FileUpload","FileUploadItem","FileUploadLabel","Icon","IconButton","Indicator","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","OTPInput","PasswordInput","SearchInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SideNav","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton","StepGroup","StepItem"],"mappings":"AAAO,IAAMA,aAAa,GAAG;AAC3BC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,eAAe,EAAE,kBAAkB;AACnCC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,mBAAmB,EAAE,uBAAuB;AAC5CC,EAAAA,iBAAiB,EAAE,qBAAqB;AACxCC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,cAAc,EAAE,kBAAkB;AAClCC,EAAAA,iBAAiB,EAAE,qBAAqB;AACxCC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,M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","sources":["../../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Avatar: 'avatar',\n AvatarGroup: 'avatar-group',\n Badge: 'badge',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n Carousel: 'carousel',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n DatePicker: 'datepicker',\n Calendar: 'calendar',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n Icon: 'icon',\n IconButton: 'icon-button',\n Indicator: 'indicator',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n SearchInput: 'search-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n PhoneNumberInput: 'phone-number-input',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SideNav: 'sidenav',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Menu: 'menu',\n MenuHeader: 'menu-header',\n MenuFooter: 'menu-footer',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n StepGroup: 'step-group',\n StepItem: 'step-item',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Avatar","AvatarGroup","Badge","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","Carousel","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","DatePicker","Calendar","FileUpload","FileUploadItem","FileUploadLabel","Icon","IconButton","Indicator","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","OTPInput","PasswordInput","SearchInput","TextArea","TextInput","PhoneNumberInput","Toast","ToastContainer","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SideNav","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Menu","MenuHeader","MenuFooter","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton","StepGroup","StepItem"],"mappings":"AAAO,IAAMA,aAAa,GAAG;AAC3BC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,eAAe,EAAE,kBAAkB;AACnCC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,mBAAmB,EAAE,uBAAuB;AAC5CC,EAAAA,iBAAiB,EAAE,qBAAqB;AACxCC,EAAAA,UAAU,EAAE,aAAa;AACzBC,EAAAA,cAAc,EAAE,kBAAkB;AAClCC,EAAAA,iBAAiB,EAAE,qBAAqB;AACxCC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,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ACvBC,EAAAA,QAAQ,EAAE,WAAA;AACZ;;;;"}
@@ -1,19 +1,15 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import React__default from 'react';
3
3
  import styled from 'styled-components';
4
- import { StyledActionListItem } from './styles/StyledActionListItem.web.js';
5
4
  import { componentIds } from './componentIds.js';
6
5
  import { getNormalTextColor, validateActionListItemProps } from './actionListUtils.js';
7
- import { getActionListSectionRole, isRoleMenu, getActionListItemRole } from './getA11yRoles.js';
6
+ import { getActionListSectionRole, getActionListItemRole } from './getA11yRoles.js';
8
7
  import '../Divider/index.js';
9
8
  import '../Box/BaseBox/index.js';
10
9
  import { useDropdown } from '../Dropdown/useDropdown.js';
11
10
  import '../Typography/index.js';
12
11
  import '../../utils/index.js';
13
12
  import '../../utils/metaAttribute/index.js';
14
- import '../Checkbox/index.js';
15
- import '../../tokens/global/index.js';
16
- import '../BladeProvider/index.js';
17
13
  import '../../utils/assignWithoutSideEffects/index.js';
18
14
  import '../../utils/makeSize/index.js';
19
15
  import '../../utils/makeAccessible/index.js';
@@ -21,7 +17,9 @@ import '../../utils/logger/index.js';
21
17
  import '../Badge/index.js';
22
18
  import '../Box/index.js';
23
19
  import { dropdownComponentIds } from '../Dropdown/dropdownComponentIds.js';
24
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
20
+ import '../BaseMenu/index.js';
21
+ import '../Checkbox/index.js';
22
+ import { jsxs, jsx } from 'react/jsx-runtime';
25
23
  import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
26
24
  import { makeSize } from '../../utils/makeSize/makeSize.js';
27
25
  import { isReactNative } from '../../utils/platform/isReactNative.js';
@@ -31,17 +29,16 @@ import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
31
29
  import { Text } from '../Typography/Text/Text.js';
32
30
  import { Divider } from '../Divider/Divider.js';
33
31
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
32
+ import { useBaseMenuItem } from '../BaseMenu/BaseMenuContext.js';
34
33
  import { Box } from '../Box/Box.js';
35
34
  import { Badge } from '../Badge/Badge.js';
36
- import { size } from '../../tokens/global/size.js';
37
- import { Checkbox } from '../Checkbox/Checkbox.js';
38
- import useTheme from '../BladeProvider/useTheme.js';
39
35
  import { throwBladeError } from '../../utils/logger/logger.js';
36
+ import { BaseMenuItem } from '../BaseMenu/BaseMenuItem/BaseMenuItem.js';
37
+ import { Checkbox } from '../Checkbox/Checkbox.js';
40
38
  import { castWebType } from '../../utils/platform/castUtils.js';
41
39
 
42
40
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
43
41
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
44
- var ActionListItemContext = /*#__PURE__*/React__default.createContext({});
45
42
  var StyledActionListSectionTitle = /*#__PURE__*/styled(BaseBox).withConfig({
46
43
  displayName: "ActionListItem__StyledActionListSectionTitle",
47
44
  componentId: "m6qdwa-0"
@@ -107,12 +104,12 @@ var ActionListSection = /*#__PURE__*/assignWithoutSideEffects(_ActionListSection
107
104
  var _ActionListItemIcon = function _ActionListItemIcon(_ref2) {
108
105
  var icon = _ref2.icon;
109
106
  var Icon = icon;
110
- var _React$useContext = React__default.useContext(ActionListItemContext),
111
- intent = _React$useContext.intent,
112
- isDisabled = _React$useContext.isDisabled;
107
+ var _useBaseMenuItem = useBaseMenuItem(),
108
+ color = _useBaseMenuItem.color,
109
+ isDisabled = _useBaseMenuItem.isDisabled;
113
110
  var iconState = isDisabled ? 'disabled' : 'muted';
114
111
  return /*#__PURE__*/jsx(Icon, {
115
- color: intent === 'negative' ? 'feedback.icon.negative.intense' : "interactive.icon.gray.".concat(iconState),
112
+ color: color === 'negative' ? 'feedback.icon.negative.intense' : "interactive.icon.gray.".concat(iconState),
116
113
  size: "medium"
117
114
  });
118
115
  };
@@ -142,8 +139,8 @@ var ActionListItemBadge = /*#__PURE__*/assignWithoutSideEffects(_ActionListItemB
142
139
  });
143
140
  var _ActionListItemText = function _ActionListItemText(_ref4) {
144
141
  var children = _ref4.children;
145
- var _React$useContext2 = React__default.useContext(ActionListItemContext),
146
- isDisabled = _React$useContext2.isDisabled;
142
+ var _useBaseMenuItem2 = useBaseMenuItem(),
143
+ isDisabled = _useBaseMenuItem2.isDisabled;
147
144
  return /*#__PURE__*/jsx(Text, {
148
145
  variant: "caption",
149
146
  color: getNormalTextColor(isDisabled, {
@@ -167,71 +164,6 @@ var makeActionListItemClickable = function makeActionListItemClickable(clickHand
167
164
  onClick: clickHandler
168
165
  };
169
166
  };
170
- var _ActionListItemBody = function _ActionListItemBody(_ref5) {
171
- var selectionType = _ref5.selectionType,
172
- intent = _ref5.intent,
173
- description = _ref5.description,
174
- isDisabled = _ref5.isDisabled,
175
- leading = _ref5.leading,
176
- trailing = _ref5.trailing,
177
- title = _ref5.title,
178
- titleSuffix = _ref5.titleSuffix,
179
- isSelected = _ref5.isSelected;
180
- return /*#__PURE__*/jsxs(Fragment, {
181
- children: [/*#__PURE__*/jsxs(BaseBox, {
182
- display: "flex",
183
- justifyContent: "center",
184
- flexDirection: "row",
185
- alignItems: "center",
186
- maxHeight: isReactNative() ? undefined : makeSize(size[20]),
187
- children: [/*#__PURE__*/jsx(BaseBox, {
188
- display: "flex",
189
- justifyContent: "center",
190
- alignItems: "center",
191
- children: selectionType === 'multiple' ?
192
- /*#__PURE__*/
193
- // 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
194
- jsx(BaseBox, _objectSpread(_objectSpread({
195
- pointerEvents: "none",
196
- paddingRight: "spacing.2"
197
- }, makeAccessible({
198
- hidden: true
199
- })), {}, {
200
- children: /*#__PURE__*/jsx(Checkbox, {
201
- isChecked: isSelected,
202
- tabIndex: -1,
203
- isDisabled: isDisabled,
204
- children: null
205
- })
206
- })) : leading
207
- }), /*#__PURE__*/jsxs(BaseBox, {
208
- paddingLeft: selectionType === 'multiple' || !leading ? 'spacing.0' : 'spacing.3',
209
- paddingRight: "spacing.3",
210
- display: "flex",
211
- alignItems: "center",
212
- flexDirection: "row",
213
- children: [/*#__PURE__*/jsx(Text, {
214
- truncateAfterLines: 1,
215
- color: intent === 'negative' ? 'feedback.text.negative.intense' : getNormalTextColor(isDisabled),
216
- children: title
217
- }), titleSuffix]
218
- }), /*#__PURE__*/jsx(BaseBox, {
219
- marginLeft: "auto",
220
- children: trailing
221
- })]
222
- }), /*#__PURE__*/jsx(BaseBox, {
223
- paddingLeft: leading || selectionType === 'multiple' ? 'spacing.7' : undefined,
224
- children: description ? /*#__PURE__*/jsx(Text, {
225
- color: getNormalTextColor(isDisabled, {
226
- isMuted: true
227
- }),
228
- size: "small",
229
- children: description
230
- }) : null
231
- })]
232
- });
233
- };
234
- var ActionListItemBody = /*#__PURE__*/React__default.memo(_ActionListItemBody);
235
167
 
236
168
  /**
237
169
  * ### ActionListItem
@@ -263,9 +195,6 @@ var _ActionListItem = function _ActionListItem(props) {
263
195
  isKeydownPressed = _useDropdown2.isKeydownPressed,
264
196
  filteredValues = _useDropdown2.filteredValues,
265
197
  hasAutoCompleteInBottomSheetHeader = _useDropdown2.hasAutoCompleteInBottomSheetHeader;
266
- var _useTheme = useTheme(),
267
- platform = _useTheme.platform;
268
- var isMobile = platform === 'onMobile';
269
198
  var hasAutoComplete = hasAutoCompleteInBottomSheetHeader || dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;
270
199
  var renderOnWebAs = props.href ? 'a' : 'button';
271
200
 
@@ -302,26 +231,38 @@ var _ActionListItem = function _ActionListItem(props) {
302
231
  }
303
232
  }
304
233
  }, [props.intent, dropdownTriggerer]);
305
- return /*#__PURE__*/jsx(ActionListItemContext.Provider, {
306
- value: {
307
- intent: props.intent,
308
- isDisabled: props.isDisabled
309
- },
310
- children: /*#__PURE__*/jsx(StyledActionListItem, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
234
+ return (
235
+ /*#__PURE__*/
236
+ // We use this context to change the color of subcomponents like ActionListItemIcon, ActionListItemText, etc
237
+ jsx(BaseMenuItem, _objectSpread(_objectSpread(_objectSpread({
311
238
  isVisible: hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true,
312
239
  as: !isReactNative() ? renderOnWebAs : undefined,
313
240
  id: "".concat(dropdownBaseId, "-").concat(props._index),
314
- type: "button",
315
241
  tabIndex: -1,
242
+ title: props.title,
243
+ description: props.description,
244
+ leading: selectionType === 'multiple' ? /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread({
245
+ pointerEvents: "none"
246
+ // 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
247
+ }, makeAccessible({
248
+ hidden: true
249
+ })), {}, {
250
+ children: /*#__PURE__*/jsx(Checkbox, {
251
+ isChecked: isSelected,
252
+ tabIndex: -1,
253
+ isDisabled: props.isDisabled,
254
+ children: null
255
+ })
256
+ })) : props.leading,
257
+ trailing: props.trailing,
258
+ titleSuffix: props.titleSuffix,
316
259
  href: props.href,
317
260
  target: props.target,
318
- className: activeIndex === props._index ? 'active-focus' : ''
319
- }, makeAccessible({
320
- selected: isSelected,
321
- current: isRoleMenu(dropdownTriggerer) ? isSelected : undefined,
322
- role: getActionListItemRole(dropdownTriggerer, props.href),
323
- disabled: props.isDisabled
324
- })), makeActionListItemClickable(function (e) {
261
+ className: activeIndex === props._index ? 'active-focus' : '',
262
+ isSelected: isSelected,
263
+ isDisabled: props.isDisabled,
264
+ role: getActionListItemRole(dropdownTriggerer, props.href)
265
+ }, makeActionListItemClickable(function (e) {
325
266
  if (typeof props._index === 'number') {
326
267
  var _props$onClick;
327
268
  onOptionClick(e, props._index);
@@ -345,28 +286,12 @@ var _ActionListItem = function _ActionListItem(props) {
345
286
  setShouldIgnoreBlurAnimation(false);
346
287
  },
347
288
  "data-value": props.value,
348
- "data-index": props._index
349
- // Custom props for changes in styles
350
- ,
289
+ "data-index": props._index,
351
290
  selectionType: selectionType,
352
- hasDescription: Boolean(props.description),
353
- intent: props.intent,
354
- isSelected: isSelected,
355
- isKeydownPressed: isKeydownPressed,
356
- isMobile: isMobile,
357
- children: /*#__PURE__*/jsx(ActionListItemBody, {
358
- selectionType: selectionType,
359
- intent: props.intent,
360
- description: props.description,
361
- isDisabled: props.isDisabled,
362
- leading: props.leading,
363
- trailing: props.trailing,
364
- title: props.title,
365
- titleSuffix: props.titleSuffix,
366
- isSelected: isSelected
367
- })
291
+ color: props.intent,
292
+ isKeydownPressed: isKeydownPressed
368
293
  }))
369
- });
294
+ );
370
295
  };
371
296
  var ActionListItem = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.memo(_ActionListItem), {
372
297
  componentId: componentIds.ActionListItem,
@@ -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 { StyledActionListItem } from './styles/StyledActionListItem';\nimport { componentIds } from './componentIds';\nimport type { StyledActionListItemProps } from './styles/getBaseActionListItemStyles';\nimport { validateActionListItemProps, getNormalTextColor } from './actionListUtils';\nimport { getActionListItemRole, getActionListSectionRole, isRoleMenu } 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 { Checkbox } from '~components/Checkbox';\nimport { size } from '~tokens/global';\nimport type { DropdownProps } from '~components/Dropdown';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport { useTheme } from '~components/BladeProvider';\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';\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\nconst ActionListItemContext = React.createContext<{\n intent?: ActionListItemProps['intent'];\n isDisabled?: ActionListItemProps['isDisabled'];\n}>({});\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;\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\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 >\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 { intent, isDisabled } = React.useContext(ActionListItemContext);\n const iconState = isDisabled ? 'disabled' : 'muted';\n return (\n <Icon\n color={\n intent === '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 _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 } = React.useContext(ActionListItemContext);\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?: StyledActionListItemProps['onPress']; 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\nconst _ActionListItemBody = ({\n selectionType,\n intent,\n description,\n isDisabled,\n leading,\n trailing,\n title,\n titleSuffix,\n isSelected,\n}: Pick<\n ActionListItemProps,\n 'intent' | 'isDisabled' | 'description' | 'trailing' | 'leading' | 'title' | 'titleSuffix'\n> & {\n selectionType: DropdownProps['selectionType'];\n isSelected?: boolean;\n}): React.ReactElement => {\n return (\n <>\n <BaseBox\n display=\"flex\"\n justifyContent=\"center\"\n flexDirection=\"row\"\n alignItems=\"center\"\n maxHeight={isReactNative() ? undefined : makeSize(size[20])}\n >\n <BaseBox display=\"flex\" justifyContent=\"center\" alignItems=\"center\">\n {selectionType === 'multiple' ? (\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 <BaseBox\n pointerEvents=\"none\"\n paddingRight=\"spacing.2\"\n {...makeAccessible({\n hidden: true,\n })}\n >\n <Checkbox isChecked={isSelected} tabIndex={-1} isDisabled={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 leading\n )}\n </BaseBox>\n <BaseBox\n paddingLeft={selectionType === 'multiple' || !leading ? 'spacing.0' : 'spacing.3'}\n paddingRight=\"spacing.3\"\n display=\"flex\"\n alignItems=\"center\"\n flexDirection=\"row\"\n >\n <Text\n truncateAfterLines={1}\n color={\n intent === 'negative'\n ? 'feedback.text.negative.intense'\n : getNormalTextColor(isDisabled)\n }\n >\n {title}\n </Text>\n {titleSuffix}\n </BaseBox>\n <BaseBox marginLeft=\"auto\">{trailing}</BaseBox>\n </BaseBox>\n <BaseBox paddingLeft={leading || selectionType === 'multiple' ? 'spacing.7' : undefined}>\n {description ? (\n <Text color={getNormalTextColor(isDisabled, { isMuted: true })} size=\"small\">\n {description}\n </Text>\n ) : null}\n </BaseBox>\n </>\n );\n};\n\nconst ActionListItemBody = React.memo(_ActionListItemBody);\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 { platform } = useTheme();\n const isMobile = platform === 'onMobile';\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 return (\n <ActionListItemContext.Provider value={{ intent: props.intent, isDisabled: props.isDisabled }}>\n <StyledActionListItem\n isVisible={hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true}\n as={!isReactNative() ? renderOnWebAs : undefined}\n id={`${dropdownBaseId}-${props._index}`}\n type=\"button\"\n tabIndex={-1}\n href={props.href}\n target={props.target}\n className={activeIndex === props._index ? 'active-focus' : ''}\n {...makeAccessible({\n selected: isSelected,\n current: isRoleMenu(dropdownTriggerer) ? isSelected : undefined,\n role: getActionListItemRole(dropdownTriggerer, props.href),\n disabled: props.isDisabled,\n })}\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 {...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 // Custom props for changes in styles\n selectionType={selectionType}\n hasDescription={Boolean(props.description)}\n intent={props.intent}\n isSelected={isSelected}\n isKeydownPressed={isKeydownPressed}\n isMobile={isMobile}\n >\n <ActionListItemBody\n selectionType={selectionType}\n intent={props.intent}\n description={props.description}\n isDisabled={props.isDisabled}\n leading={props.leading}\n trailing={props.trailing}\n title={props.title}\n titleSuffix={props.titleSuffix}\n isSelected={isSelected}\n />\n </StyledActionListItem>\n </ActionListItemContext.Provider>\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 ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n};\n"],"names":["ActionListItemContext","React","createContext","StyledActionListSectionTitle","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSize","theme","spacing","_ActionListSection","_ref","title","children","testID","_hideDivider","_sectionChildValues","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","_objectSpread","makeAccessible","role","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","_jsx","hidden","Text","color","size","weight","undefined","Divider","marginX","marginY","assignWithoutSideEffects","componentIds","_ActionListItemIcon","_ref2","icon","Icon","_React$useContext","useContext","intent","isDisabled","iconState","concat","ActionListItemIcon","_ActionListItemBadgeGroup","_ref3","Box","display","alignItems","flexDirection","ActionListItemBadgeGroup","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref4","_React$useContext2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItemBody","_ref5","selectionType","description","leading","trailing","titleSuffix","isSelected","_Fragment","justifyContent","maxHeight","pointerEvents","paddingRight","Checkbox","isChecked","tabIndex","paddingLeft","truncateAfterLines","ActionListItemBody","memo","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","isKeydownPressed","_useTheme","useTheme","platform","isMobile","renderOnWebAs","href","getIsSelected","SelectInput","_index","useEffect","validateActionListItemProps","throwBladeError","message","moduleName","Provider","value","StyledActionListItem","isVisible","as","id","type","target","className","selected","current","isRoleMenu","getActionListItemRole","disabled","e","_props$onClick","call","event","castWebType","ActionListItem","onMouseDown","onMouseUp","hasDescription"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4FA,IAAMA,qBAAqB,gBAAGC,cAAK,CAACC,aAAa,CAG9C,EAAE,CAAC,CAAA;AAEN,IAAMC,4BAA4B,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAAC,UAACC,KAAK,EAAA;EAAA,OAAM;AAC/D;IACAC,OAAO,EAAEC,QAAQ,CAACF,KAAK,CAACG,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAAA;GACzC,CAAA;AAAA,CAAC,CAAC,CAAA;AAoBH,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAM0B;AAAA,EAAA,IALhDC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,mBAAmB,GAAAL,IAAA,CAAnBK,mBAAmB,CAAA;AAEnB,EAAA,IAAAC,YAAA,GAAkFC,WAAW,EAAE;IAAvFC,kCAAkC,GAAAF,YAAA,CAAlCE,kCAAkC;IAAEC,iBAAiB,GAAAH,YAAA,CAAjBG,iBAAiB;IAAEC,cAAc,GAAAJ,YAAA,CAAdI,cAAc,CAAA;EAC7E,IAAMC,eAAe,GACnBH,kCAAkC,IAClCC,iB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ErC,CAAC,CAAA;AAEKsD,IAAAA,cAAc,gBAAGhG,wBAAwB,eAAC5D,cAAK,CAACkH,IAAI,CAACC,eAAe,CAAC,EAAE;EAC3E5G,WAAW,EAAEsD,YAAY,CAAC+F,cAAc;EACxCtJ,WAAW,EAAEuD,YAAY,CAAC+F,cAAAA;AAC5B,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 { 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';\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\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;\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\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 >\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 _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 return (\n // We use this context to change the color of subcomponents like ActionListItemIcon, ActionListItemText, etc\n <BaseMenuItem\n isVisible={hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true}\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 {...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 ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n};\n"],"names":["StyledActionListSectionTitle","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSize","theme","spacing","_ActionListSection","_ref","title","children","testID","_hideDivider","_sectionChildValues","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","React","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","_objectSpread","makeAccessible","role","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","_jsx","hidden","Text","color","size","weight","undefined","Divider","marginX","marginY","assignWithoutSideEffects","componentIds","_ActionListItemIcon","_ref2","icon","Icon","_useBaseMenuItem","useBaseMenuItem","isDisabled","iconState","concat","ActionListItemIcon","_ActionListItemBadgeGroup","_ref3","Box","display","alignItems","flexDirection","ActionListItemBadgeGroup","_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","intent","throwBladeError","message","moduleName","BaseMenuItem","isVisible","value","as","id","tabIndex","description","pointerEvents","Checkbox","isChecked","target","className","getActionListItemRole","e","_props$onClick","call","event","castWebType","ActionListItem","onMouseDown","onMouseUp","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,IAAMA,4BAA4B,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAAC,UAACC,KAAK,EAAA;EAAA,OAAM;AAC/D;IACAC,OAAO,EAAEC,QAAQ,CAACF,KAAK,CAACG,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAAA;GACzC,CAAA;AAAA,CAAC,CAAC,CAAA;AAoBH,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAM0B;AAAA,EAAA,IALhDC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACRC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,YAAY,GAA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AAbA,cAAA,CAAAC,IAAA,CAAA9H,KAAK,EAAW;UAAEwC,IAAI,EAAExC,KAAK,CAACiH,KAAK;AAAEA,UAAAA,KAAK,EAAEZ,UAAU;UAAE0B,KAAK,EAAEC,WAAW,CAACJ,CAAC,CAAA;AAAE,SAAC,CAAC,CAAA;AAClF,OAAA;KACD,CAAC,CACErF,EAAAA,aAAa,CAAC;MAAEC,IAAI,EAAEC,aAAa,CAACwF,cAAc;MAAExH,MAAM,EAAET,KAAK,CAACS,MAAAA;AAAO,KAAC,CAAC,CAAA,EAAA,EAAA,EAAA;MAC/EyH,WAAW,EAAE,SAAAA,WAAAA,GAAM;AACjB;AACA;QACArC,4BAA4B,CAAC,IAAI,CAAC,CAAA;OAClC;MACFsC,SAAS,EAAE,SAAAA,SAAAA,GAAM;AACf;QACAtC,4BAA4B,CAAC,KAAK,CAAC,CAAA;OACnC;MACF,YAAY7F,EAAAA,KAAK,CAACiH,KAAM;MACxB,YAAYjH,EAAAA,KAAK,CAACoG,MAAO;AACzBN,MAAAA,aAAa,EAAEA,aAAc;MAC7BhD,KAAK,EAAE9C,KAAK,CAAC2G,MAAO;AACpBZ,MAAAA,gBAAgB,EAAEA,gBAAAA;KACnB,CAAA,CAAA;AAAC,IAAA;AAEN,CAAC,CAAA;AAEKkC,IAAAA,cAAc,gBAAG5E,wBAAwB,eAAC/B,cAAK,CAAC8G,IAAI,CAAC7C,eAAe,CAAC,EAAE;EAC3ExF,WAAW,EAAEuD,YAAY,CAAC2E,cAAc;EACxCnI,WAAW,EAAEwD,YAAY,CAAC2E,cAAAA;AAC5B,CAAC;;;;"}
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import 'react';
3
+ import React__default from 'react';
4
4
  import { StyledAvatar } from './StyledAvatar.js';
5
5
  import { useAvatarGroupContext } from './AvatarGroupContext.js';
6
6
  import { AvatarButton } from './AvatarButton.js';
@@ -17,7 +17,7 @@ import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
17
17
  import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
18
18
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
19
19
 
20
- var _excluded = ["name", "color", "size", "variant", "icon", "href", "target", "rel", "src", "alt", "srcSet", "crossOrigin", "referrerPolicy", "testID"];
20
+ var _excluded = ["name", "color", "size", "variant", "icon", "href", "target", "rel", "src", "alt", "srcSet", "crossOrigin", "referrerPolicy", "testID", "onBlur", "onFocus", "onClick", "onMouseLeave", "onMouseMove", "onMouseDown", "onPointerDown", "onPointerEnter", "onTouchStart", "onTouchEnd"];
21
21
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
22
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
23
  var getInitials = function getInitials(name) {
@@ -28,7 +28,7 @@ var getInitials = function getInitials(name) {
28
28
  }
29
29
  return names[0][0] + names[names.length - 1][0];
30
30
  };
31
- var _Avatar = function _Avatar(_ref) {
31
+ var _Avatar = function _Avatar(_ref, ref) {
32
32
  var _groupProps$size;
33
33
  var name = _ref.name,
34
34
  _ref$color = _ref.color,
@@ -47,6 +47,16 @@ var _Avatar = function _Avatar(_ref) {
47
47
  crossOrigin = _ref.crossOrigin,
48
48
  referrerPolicy = _ref.referrerPolicy,
49
49
  testID = _ref.testID,
50
+ onBlur = _ref.onBlur,
51
+ onFocus = _ref.onFocus,
52
+ onClick = _ref.onClick,
53
+ onMouseLeave = _ref.onMouseLeave,
54
+ onMouseMove = _ref.onMouseMove,
55
+ onMouseDown = _ref.onMouseDown,
56
+ onPointerDown = _ref.onPointerDown,
57
+ onPointerEnter = _ref.onPointerEnter,
58
+ onTouchStart = _ref.onTouchStart,
59
+ onTouchEnd = _ref.onTouchEnd,
50
60
  styledProps = _objectWithoutProperties(_ref, _excluded);
51
61
  if (false) {
52
62
  if (src && !alt && !name) {
@@ -64,11 +74,22 @@ var _Avatar = function _Avatar(_ref) {
64
74
  size: avatarSize,
65
75
  href: href,
66
76
  target: target,
67
- rel: rel
77
+ rel: rel,
78
+ onBlur: onBlur,
79
+ onFocus: onFocus,
80
+ onClick: onClick,
81
+ onMouseLeave: onMouseLeave,
82
+ onMouseMove: onMouseMove,
83
+ onMouseDown: onMouseDown,
84
+ onPointerDown: onPointerDown,
85
+ onPointerEnter: onPointerEnter,
86
+ onTouchStart: onTouchStart,
87
+ onTouchEnd: onTouchEnd
68
88
  };
69
89
  var getChildrenToRender = function getChildrenToRender() {
70
90
  if (src) {
71
91
  return /*#__PURE__*/jsx(AvatarButton, _objectSpread(_objectSpread({}, commonButtonProps), {}, {
92
+ ref: ref,
72
93
  imgProps: {
73
94
  src: src,
74
95
  alt: alt !== null && alt !== void 0 ? alt : name,
@@ -79,7 +100,9 @@ var _Avatar = function _Avatar(_ref) {
79
100
  }));
80
101
  }
81
102
  if (name && !src) {
82
- return /*#__PURE__*/jsx(AvatarButton, _objectSpread(_objectSpread({}, commonButtonProps), {}, {
103
+ return /*#__PURE__*/jsx(AvatarButton, _objectSpread(_objectSpread({
104
+ ref: ref
105
+ }, commonButtonProps), {}, {
83
106
  children: getInitials(name)
84
107
  }));
85
108
  }
@@ -116,7 +139,7 @@ var _Avatar = function _Avatar(_ref) {
116
139
  * Checkout {@link https://blade.razorpay.com/?path=/docs/components-avatar-avatar Avatar Documentation}
117
140
  *
118
141
  */
119
- var Avatar = /*#__PURE__*/assignWithoutSideEffects(_Avatar, {
142
+ var Avatar = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.forwardRef(_Avatar), {
120
143
  displayName: 'Avatar',
121
144
  componentId: 'Avatar'
122
145
  });