@razorpay/blade 11.37.0 → 11.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (520) hide show
  1. package/build/lib/native/components/Accordion/Accordion.js +2 -1
  2. package/build/lib/native/components/Accordion/Accordion.js.map +1 -1
  3. package/build/lib/native/components/Accordion/AccordionItem.js +3 -1
  4. package/build/lib/native/components/Accordion/AccordionItem.js.map +1 -1
  5. package/build/lib/native/components/Accordion/AccordionItemBody.js +3 -2
  6. package/build/lib/native/components/Accordion/AccordionItemBody.js.map +1 -1
  7. package/build/lib/native/components/Accordion/AccordionItemHeader.js +3 -2
  8. package/build/lib/native/components/Accordion/AccordionItemHeader.js.map +1 -1
  9. package/build/lib/native/components/ActionList/ActionList.js +3 -1
  10. package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
  11. package/build/lib/native/components/ActionList/ActionListItem.js +3 -2
  12. package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
  13. package/build/lib/native/components/Alert/Alert.js +2 -1
  14. package/build/lib/native/components/Alert/Alert.js.map +1 -1
  15. package/build/lib/native/components/Amount/Amount.js +2 -1
  16. package/build/lib/native/components/Amount/Amount.js.map +1 -1
  17. package/build/lib/native/components/Badge/Badge.js +2 -1
  18. package/build/lib/native/components/Badge/Badge.js.map +1 -1
  19. package/build/lib/native/components/BaseHeaderFooter/BaseFooter.js +3 -1
  20. package/build/lib/native/components/BaseHeaderFooter/BaseFooter.js.map +1 -1
  21. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +3 -2
  22. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  23. package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  24. package/build/lib/native/components/Box/Box.js +2 -1
  25. package/build/lib/native/components/Box/Box.js.map +1 -1
  26. package/build/lib/native/components/Button/BaseButton/BaseButton.js +2 -1
  27. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  28. package/build/lib/native/components/Button/Button/Button.js +2 -1
  29. package/build/lib/native/components/Button/Button/Button.js.map +1 -1
  30. package/build/lib/native/components/Button/IconButton/IconButton.js +3 -1
  31. package/build/lib/native/components/Button/IconButton/IconButton.js.map +1 -1
  32. package/build/lib/native/components/Card/Card.js +2 -1
  33. package/build/lib/native/components/Card/Card.js.map +1 -1
  34. package/build/lib/native/components/Card/CardFooter.js +3 -2
  35. package/build/lib/native/components/Card/CardFooter.js.map +1 -1
  36. package/build/lib/native/components/Card/CardHeader.js +3 -2
  37. package/build/lib/native/components/Card/CardHeader.js.map +1 -1
  38. package/build/lib/native/components/Checkbox/Checkbox.js +3 -2
  39. package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
  40. package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js +2 -1
  41. package/build/lib/native/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
  42. package/build/lib/native/components/Chip/Chip.js +2 -1
  43. package/build/lib/native/components/Chip/Chip.js.map +1 -1
  44. package/build/lib/native/components/Chip/ChipGroup.js +2 -1
  45. package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
  46. package/build/lib/native/components/Collapsible/Collapsible.js +2 -1
  47. package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
  48. package/build/lib/native/components/Collapsible/CollapsibleBody.js +3 -1
  49. package/build/lib/native/components/Collapsible/CollapsibleBody.js.map +1 -1
  50. package/build/lib/native/components/Collapsible/CollapsibleButton.js +3 -1
  51. package/build/lib/native/components/Collapsible/CollapsibleButton.js.map +1 -1
  52. package/build/lib/native/components/Collapsible/CollapsibleLink.js +2 -1
  53. package/build/lib/native/components/Collapsible/CollapsibleLink.js.map +1 -1
  54. package/build/lib/native/components/Counter/Counter.js +2 -1
  55. package/build/lib/native/components/Counter/Counter.js.map +1 -1
  56. package/build/lib/native/components/Dropdown/Dropdown.js +2 -1
  57. package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
  58. package/build/lib/native/components/Dropdown/DropdownButton.js +1 -1
  59. package/build/lib/native/components/Dropdown/DropdownButton.js.map +1 -1
  60. package/build/lib/native/components/Dropdown/DropdownHeaderFooter.js +3 -1
  61. package/build/lib/native/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
  62. package/build/lib/native/components/Dropdown/DropdownLink.js +2 -1
  63. package/build/lib/native/components/Dropdown/DropdownLink.js.map +1 -1
  64. package/build/lib/native/components/Form/Selector/SelectorGroupField.js +3 -1
  65. package/build/lib/native/components/Form/Selector/SelectorGroupField.js.map +1 -1
  66. package/build/lib/native/components/Indicator/Indicator.js +2 -1
  67. package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
  68. package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
  69. package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
  70. package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +2 -1
  71. package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
  72. package/build/lib/native/components/Input/DropdownInputTriggers/SelectInput.js +2 -1
  73. package/build/lib/native/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
  74. package/build/lib/native/components/Input/OTPInput/OTPInput.js +2 -1
  75. package/build/lib/native/components/Input/OTPInput/OTPInput.js.map +1 -1
  76. package/build/lib/native/components/Input/PasswordInput/PasswordInput.js +1 -1
  77. package/build/lib/native/components/Input/PasswordInput/PasswordInput.js.map +1 -1
  78. package/build/lib/native/components/Input/SearchInput/SearchInput.js +1 -1
  79. package/build/lib/native/components/Input/SearchInput/SearchInput.js.map +1 -1
  80. package/build/lib/native/components/Input/TextArea/TextArea.js +1 -1
  81. package/build/lib/native/components/Input/TextArea/TextArea.js.map +1 -1
  82. package/build/lib/native/components/Input/TextInput/TextInput.js +1 -1
  83. package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
  84. package/build/lib/native/components/Link/BaseLink/BaseLink.js +2 -1
  85. package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
  86. package/build/lib/native/components/Link/Link/Link.js +2 -1
  87. package/build/lib/native/components/Link/Link/Link.js.map +1 -1
  88. package/build/lib/native/components/ProgressBar/ProgressBar.js +2 -1
  89. package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
  90. package/build/lib/native/components/Radio/Radio.js +2 -1
  91. package/build/lib/native/components/Radio/Radio.js.map +1 -1
  92. package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js +2 -1
  93. package/build/lib/native/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
  94. package/build/lib/native/components/StepGroup/tokens.js +1 -1
  95. package/build/lib/native/components/StepGroup/tokens.js.map +1 -1
  96. package/build/lib/native/components/Switch/Switch.js +2 -1
  97. package/build/lib/native/components/Switch/Switch.js.map +1 -1
  98. package/build/lib/native/components/Tag/Tag.js +2 -1
  99. package/build/lib/native/components/Tag/Tag.js.map +1 -1
  100. package/build/lib/native/tokens/global/size.js +1 -1
  101. package/build/lib/native/tokens/global/size.js.map +1 -1
  102. package/build/lib/native/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js +7 -0
  103. package/build/lib/native/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js.map +1 -0
  104. package/build/lib/web/development/components/Accordion/Accordion.js +5 -3
  105. package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
  106. package/build/lib/web/development/components/Accordion/AccordionButton.web.js +8 -3
  107. package/build/lib/web/development/components/Accordion/AccordionButton.web.js.map +1 -1
  108. package/build/lib/web/development/components/Accordion/AccordionItem.js +8 -3
  109. package/build/lib/web/development/components/Accordion/AccordionItem.js.map +1 -1
  110. package/build/lib/web/development/components/Accordion/AccordionItemBody.js +8 -3
  111. package/build/lib/web/development/components/Accordion/AccordionItemBody.js.map +1 -1
  112. package/build/lib/web/development/components/Accordion/AccordionItemHeader.js +10 -4
  113. package/build/lib/web/development/components/Accordion/AccordionItemHeader.js.map +1 -1
  114. package/build/lib/web/development/components/ActionList/ActionList.js +9 -4
  115. package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
  116. package/build/lib/web/development/components/ActionList/ActionListBox.web.js +8 -3
  117. package/build/lib/web/development/components/ActionList/ActionListBox.web.js.map +1 -1
  118. package/build/lib/web/development/components/ActionList/ActionListItem.js +10 -5
  119. package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
  120. package/build/lib/web/development/components/Alert/Alert.js +5 -3
  121. package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
  122. package/build/lib/web/development/components/Amount/Amount.js +5 -8
  123. package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
  124. package/build/lib/web/development/components/Avatar/Avatar.web.js +5 -3
  125. package/build/lib/web/development/components/Avatar/Avatar.web.js.map +1 -1
  126. package/build/lib/web/development/components/Avatar/AvatarGroup.web.js +5 -3
  127. package/build/lib/web/development/components/Avatar/AvatarGroup.web.js.map +1 -1
  128. package/build/lib/web/development/components/Badge/Badge.js +5 -3
  129. package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
  130. package/build/lib/web/development/components/BaseHeaderFooter/BaseFooter.js +8 -3
  131. package/build/lib/web/development/components/BaseHeaderFooter/BaseFooter.js.map +1 -1
  132. package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +8 -3
  133. package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  134. package/build/lib/web/development/components/BottomNav/BottomNav.web.js +12 -8
  135. package/build/lib/web/development/components/BottomNav/BottomNav.web.js.map +1 -1
  136. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +9 -3
  137. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
  138. package/build/lib/web/development/components/BottomSheet/BottomSheetBody.web.js +8 -3
  139. package/build/lib/web/development/components/BottomSheet/BottomSheetBody.web.js.map +1 -1
  140. package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js +8 -3
  141. package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js.map +1 -1
  142. package/build/lib/web/development/components/BottomSheet/BottomSheetHeader.web.js +8 -3
  143. package/build/lib/web/development/components/BottomSheet/BottomSheetHeader.web.js.map +1 -1
  144. package/build/lib/web/development/components/Box/BaseBox/BaseBox.web.js +4 -2
  145. package/build/lib/web/development/components/Box/BaseBox/BaseBox.web.js.map +1 -1
  146. package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  147. package/build/lib/web/development/components/Box/Box.js +4 -2
  148. package/build/lib/web/development/components/Box/Box.js.map +1 -1
  149. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +6 -4
  150. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  151. package/build/lib/web/development/components/Breadcrumb/BreadcrumbItem.web.js +13 -4
  152. package/build/lib/web/development/components/Breadcrumb/BreadcrumbItem.web.js.map +1 -1
  153. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +4 -2
  154. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  155. package/build/lib/web/development/components/Button/Button/Button.js +4 -2
  156. package/build/lib/web/development/components/Button/Button/Button.js.map +1 -1
  157. package/build/lib/web/development/components/Button/IconButton/IconButton.js +11 -5
  158. package/build/lib/web/development/components/Button/IconButton/IconButton.js.map +1 -1
  159. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +8 -3
  160. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  161. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +5 -3
  162. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  163. package/build/lib/web/development/components/Card/Card.js +11 -7
  164. package/build/lib/web/development/components/Card/Card.js.map +1 -1
  165. package/build/lib/web/development/components/Card/CardFooter.js +22 -11
  166. package/build/lib/web/development/components/Card/CardFooter.js.map +1 -1
  167. package/build/lib/web/development/components/Card/CardHeader.js +13 -6
  168. package/build/lib/web/development/components/Card/CardHeader.js.map +1 -1
  169. package/build/lib/web/development/components/Carousel/Carousel.web.js +5 -3
  170. package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
  171. package/build/lib/web/development/components/Carousel/CarouselItem.web.js +9 -3
  172. package/build/lib/web/development/components/Carousel/CarouselItem.web.js.map +1 -1
  173. package/build/lib/web/development/components/Checkbox/Checkbox.js +6 -4
  174. package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
  175. package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js +8 -5
  176. package/build/lib/web/development/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
  177. package/build/lib/web/development/components/Chip/Chip.js +5 -3
  178. package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
  179. package/build/lib/web/development/components/Chip/ChipGroup.js +8 -5
  180. package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
  181. package/build/lib/web/development/components/Collapsible/Collapsible.js +5 -3
  182. package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
  183. package/build/lib/web/development/components/Collapsible/CollapsibleBody.js +8 -3
  184. package/build/lib/web/development/components/Collapsible/CollapsibleBody.js.map +1 -1
  185. package/build/lib/web/development/components/Collapsible/CollapsibleButton.js +13 -4
  186. package/build/lib/web/development/components/Collapsible/CollapsibleButton.js.map +1 -1
  187. package/build/lib/web/development/components/Collapsible/CollapsibleLink.js +5 -3
  188. package/build/lib/web/development/components/Collapsible/CollapsibleLink.js.map +1 -1
  189. package/build/lib/web/development/components/Counter/Counter.js +5 -3
  190. package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
  191. package/build/lib/web/development/components/DatePicker/DateInput.web.js +11 -7
  192. package/build/lib/web/development/components/DatePicker/DateInput.web.js.map +1 -1
  193. package/build/lib/web/development/components/DatePicker/DatePicker.web.js +4 -2
  194. package/build/lib/web/development/components/DatePicker/DatePicker.web.js.map +1 -1
  195. package/build/lib/web/development/components/Drawer/Drawer.web.js +8 -3
  196. package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
  197. package/build/lib/web/development/components/Drawer/DrawerSubcomponents.web.js +11 -3
  198. package/build/lib/web/development/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
  199. package/build/lib/web/development/components/Dropdown/Dropdown.js +5 -3
  200. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  201. package/build/lib/web/development/components/Dropdown/DropdownButton.js +2 -2
  202. package/build/lib/web/development/components/Dropdown/DropdownButton.js.map +1 -1
  203. package/build/lib/web/development/components/Dropdown/DropdownHeaderFooter.js +8 -3
  204. package/build/lib/web/development/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
  205. package/build/lib/web/development/components/Dropdown/DropdownLink.js +5 -3
  206. package/build/lib/web/development/components/Dropdown/DropdownLink.js.map +1 -1
  207. package/build/lib/web/development/components/FileUpload/FileUpload.web.js +6 -4
  208. package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
  209. package/build/lib/web/development/components/Form/Selector/SelectorGroupField.js +8 -3
  210. package/build/lib/web/development/components/Form/Selector/SelectorGroupField.js.map +1 -1
  211. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +8 -3
  212. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
  213. package/build/lib/web/development/components/Indicator/Indicator.js +5 -3
  214. package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
  215. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +6 -4
  216. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
  217. package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +5 -2
  218. package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
  219. package/build/lib/web/development/components/Input/DropdownInputTriggers/SelectInput.js +5 -3
  220. package/build/lib/web/development/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
  221. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js +6 -4
  222. package/build/lib/web/development/components/Input/OTPInput/OTPInput.js.map +1 -1
  223. package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js +2 -2
  224. package/build/lib/web/development/components/Input/PasswordInput/PasswordInput.js.map +1 -1
  225. package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +2 -2
  226. package/build/lib/web/development/components/Input/PhoneNumberInput/PhoneNumberInput.web.js.map +1 -1
  227. package/build/lib/web/development/components/Input/SearchInput/SearchInput.js +2 -2
  228. package/build/lib/web/development/components/Input/SearchInput/SearchInput.js.map +1 -1
  229. package/build/lib/web/development/components/Input/TextArea/TextArea.js +2 -2
  230. package/build/lib/web/development/components/Input/TextArea/TextArea.js.map +1 -1
  231. package/build/lib/web/development/components/Input/TextInput/TextInput.js +2 -2
  232. package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
  233. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +5 -3
  234. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
  235. package/build/lib/web/development/components/Link/Link/Link.js +4 -2
  236. package/build/lib/web/development/components/Link/Link/Link.js.map +1 -1
  237. package/build/lib/web/development/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js +18 -8
  238. package/build/lib/web/development/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js.map +1 -1
  239. package/build/lib/web/development/components/Modal/Modal.web.js +10 -4
  240. package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
  241. package/build/lib/web/development/components/Modal/ModalBody.web.js +9 -3
  242. package/build/lib/web/development/components/Modal/ModalBody.web.js.map +1 -1
  243. package/build/lib/web/development/components/Modal/ModalFooter.web.js +7 -2
  244. package/build/lib/web/development/components/Modal/ModalFooter.web.js.map +1 -1
  245. package/build/lib/web/development/components/Modal/ModalHeader.web.js +14 -6
  246. package/build/lib/web/development/components/Modal/ModalHeader.web.js.map +1 -1
  247. package/build/lib/web/development/components/Popover/Popover.web.js +8 -3
  248. package/build/lib/web/development/components/Popover/Popover.web.js.map +1 -1
  249. package/build/lib/web/development/components/Popover/PopoverInteractiveWrapper.web.js.map +1 -1
  250. package/build/lib/web/development/components/ProgressBar/ProgressBar.js +5 -3
  251. package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
  252. package/build/lib/web/development/components/Radio/Radio.js +6 -4
  253. package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
  254. package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js +8 -5
  255. package/build/lib/web/development/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
  256. package/build/lib/web/development/components/SideNav/SideNav.web.js +5 -3
  257. package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
  258. package/build/lib/web/development/components/SideNav/SideNavItems/SideNavItem.web.js +13 -4
  259. package/build/lib/web/development/components/SideNav/SideNavItems/SideNavItem.web.js.map +1 -1
  260. package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js +10 -4
  261. package/build/lib/web/development/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -1
  262. package/build/lib/web/development/components/SideNav/SideNavSection.web.js +10 -4
  263. package/build/lib/web/development/components/SideNav/SideNavSection.web.js.map +1 -1
  264. package/build/lib/web/development/components/StepGroup/StepGroup.web.js +5 -3
  265. package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
  266. package/build/lib/web/development/components/StepGroup/StepItem.web.js +13 -7
  267. package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
  268. package/build/lib/web/development/components/StepGroup/StepLine.web.js +79 -42
  269. package/build/lib/web/development/components/StepGroup/StepLine.web.js.map +1 -1
  270. package/build/lib/web/development/components/StepGroup/tokens.js +6 -6
  271. package/build/lib/web/development/components/StepGroup/tokens.js.map +1 -1
  272. package/build/lib/web/development/components/Switch/Switch.js +5 -3
  273. package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
  274. package/build/lib/web/development/components/Table/Table.web.js +9 -7
  275. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  276. package/build/lib/web/development/components/Table/TableBody.web.js +18 -9
  277. package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
  278. package/build/lib/web/development/components/Table/TableFooter.web.js +18 -9
  279. package/build/lib/web/development/components/Table/TableFooter.web.js.map +1 -1
  280. package/build/lib/web/development/components/Table/TableHeader.web.js +18 -9
  281. package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
  282. package/build/lib/web/development/components/Table/TablePagination.web.js +10 -4
  283. package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
  284. package/build/lib/web/development/components/Table/TableToolbar.web.js +13 -8
  285. package/build/lib/web/development/components/Table/TableToolbar.web.js.map +1 -1
  286. package/build/lib/web/development/components/Tabs/TabItem.web.js +9 -5
  287. package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
  288. package/build/lib/web/development/components/Tabs/TabList.web.js +5 -3
  289. package/build/lib/web/development/components/Tabs/TabList.web.js.map +1 -1
  290. package/build/lib/web/development/components/Tabs/TabPanel.web.js +10 -5
  291. package/build/lib/web/development/components/Tabs/TabPanel.web.js.map +1 -1
  292. package/build/lib/web/development/components/Tabs/Tabs.web.js +8 -3
  293. package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
  294. package/build/lib/web/development/components/Tag/Tag.js +6 -4
  295. package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
  296. package/build/lib/web/development/components/Toast/ToastContainer.web.js +8 -3
  297. package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
  298. package/build/lib/web/development/components/Tooltip/Tooltip.web.js +8 -3
  299. package/build/lib/web/development/components/Tooltip/Tooltip.web.js.map +1 -1
  300. package/build/lib/web/development/components/TopNav/TabNav/TabNav.web.js +6 -3
  301. package/build/lib/web/development/components/TopNav/TabNav/TabNav.web.js.map +1 -1
  302. package/build/lib/web/development/components/TopNav/TopNav.web.js +8 -5
  303. package/build/lib/web/development/components/TopNav/TopNav.web.js.map +1 -1
  304. package/build/lib/web/development/tokens/global/size.js +3 -1
  305. package/build/lib/web/development/tokens/global/size.js.map +1 -1
  306. package/build/lib/web/development/utils/makeAnalyticsAttribute/index.js +2 -0
  307. package/build/lib/web/development/utils/makeAnalyticsAttribute/index.js.map +1 -0
  308. package/build/lib/web/development/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js +20 -0
  309. package/build/lib/web/development/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js.map +1 -0
  310. package/build/lib/web/production/components/Accordion/Accordion.js +5 -3
  311. package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
  312. package/build/lib/web/production/components/Accordion/AccordionButton.web.js +8 -3
  313. package/build/lib/web/production/components/Accordion/AccordionButton.web.js.map +1 -1
  314. package/build/lib/web/production/components/Accordion/AccordionItem.js +8 -3
  315. package/build/lib/web/production/components/Accordion/AccordionItem.js.map +1 -1
  316. package/build/lib/web/production/components/Accordion/AccordionItemBody.js +8 -3
  317. package/build/lib/web/production/components/Accordion/AccordionItemBody.js.map +1 -1
  318. package/build/lib/web/production/components/Accordion/AccordionItemHeader.js +10 -4
  319. package/build/lib/web/production/components/Accordion/AccordionItemHeader.js.map +1 -1
  320. package/build/lib/web/production/components/ActionList/ActionList.js +9 -4
  321. package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
  322. package/build/lib/web/production/components/ActionList/ActionListBox.web.js +8 -3
  323. package/build/lib/web/production/components/ActionList/ActionListBox.web.js.map +1 -1
  324. package/build/lib/web/production/components/ActionList/ActionListItem.js +10 -5
  325. package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
  326. package/build/lib/web/production/components/Alert/Alert.js +5 -3
  327. package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
  328. package/build/lib/web/production/components/Amount/Amount.js +5 -8
  329. package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
  330. package/build/lib/web/production/components/Avatar/Avatar.web.js +5 -3
  331. package/build/lib/web/production/components/Avatar/Avatar.web.js.map +1 -1
  332. package/build/lib/web/production/components/Avatar/AvatarGroup.web.js +5 -3
  333. package/build/lib/web/production/components/Avatar/AvatarGroup.web.js.map +1 -1
  334. package/build/lib/web/production/components/Badge/Badge.js +5 -3
  335. package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
  336. package/build/lib/web/production/components/BaseHeaderFooter/BaseFooter.js +8 -3
  337. package/build/lib/web/production/components/BaseHeaderFooter/BaseFooter.js.map +1 -1
  338. package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +8 -3
  339. package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  340. package/build/lib/web/production/components/BottomNav/BottomNav.web.js +12 -8
  341. package/build/lib/web/production/components/BottomNav/BottomNav.web.js.map +1 -1
  342. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +9 -3
  343. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
  344. package/build/lib/web/production/components/BottomSheet/BottomSheetBody.web.js +8 -3
  345. package/build/lib/web/production/components/BottomSheet/BottomSheetBody.web.js.map +1 -1
  346. package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js +8 -3
  347. package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js.map +1 -1
  348. package/build/lib/web/production/components/BottomSheet/BottomSheetHeader.web.js +8 -3
  349. package/build/lib/web/production/components/BottomSheet/BottomSheetHeader.web.js.map +1 -1
  350. package/build/lib/web/production/components/Box/BaseBox/BaseBox.web.js +4 -2
  351. package/build/lib/web/production/components/Box/BaseBox/BaseBox.web.js.map +1 -1
  352. package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  353. package/build/lib/web/production/components/Box/Box.js +4 -2
  354. package/build/lib/web/production/components/Box/Box.js.map +1 -1
  355. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +6 -4
  356. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  357. package/build/lib/web/production/components/Breadcrumb/BreadcrumbItem.web.js +13 -4
  358. package/build/lib/web/production/components/Breadcrumb/BreadcrumbItem.web.js.map +1 -1
  359. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +4 -2
  360. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  361. package/build/lib/web/production/components/Button/Button/Button.js +4 -2
  362. package/build/lib/web/production/components/Button/Button/Button.js.map +1 -1
  363. package/build/lib/web/production/components/Button/IconButton/IconButton.js +11 -5
  364. package/build/lib/web/production/components/Button/IconButton/IconButton.js.map +1 -1
  365. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +8 -3
  366. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  367. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +5 -3
  368. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  369. package/build/lib/web/production/components/Card/Card.js +11 -7
  370. package/build/lib/web/production/components/Card/Card.js.map +1 -1
  371. package/build/lib/web/production/components/Card/CardFooter.js +22 -11
  372. package/build/lib/web/production/components/Card/CardFooter.js.map +1 -1
  373. package/build/lib/web/production/components/Card/CardHeader.js +13 -6
  374. package/build/lib/web/production/components/Card/CardHeader.js.map +1 -1
  375. package/build/lib/web/production/components/Carousel/Carousel.web.js +5 -3
  376. package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
  377. package/build/lib/web/production/components/Carousel/CarouselItem.web.js +9 -3
  378. package/build/lib/web/production/components/Carousel/CarouselItem.web.js.map +1 -1
  379. package/build/lib/web/production/components/Checkbox/Checkbox.js +6 -4
  380. package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
  381. package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js +8 -5
  382. package/build/lib/web/production/components/Checkbox/CheckboxGroup/CheckboxGroup.js.map +1 -1
  383. package/build/lib/web/production/components/Chip/Chip.js +5 -3
  384. package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
  385. package/build/lib/web/production/components/Chip/ChipGroup.js +8 -5
  386. package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
  387. package/build/lib/web/production/components/Collapsible/Collapsible.js +5 -3
  388. package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
  389. package/build/lib/web/production/components/Collapsible/CollapsibleBody.js +8 -3
  390. package/build/lib/web/production/components/Collapsible/CollapsibleBody.js.map +1 -1
  391. package/build/lib/web/production/components/Collapsible/CollapsibleButton.js +13 -4
  392. package/build/lib/web/production/components/Collapsible/CollapsibleButton.js.map +1 -1
  393. package/build/lib/web/production/components/Collapsible/CollapsibleLink.js +5 -3
  394. package/build/lib/web/production/components/Collapsible/CollapsibleLink.js.map +1 -1
  395. package/build/lib/web/production/components/Counter/Counter.js +5 -3
  396. package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
  397. package/build/lib/web/production/components/DatePicker/DateInput.web.js +11 -7
  398. package/build/lib/web/production/components/DatePicker/DateInput.web.js.map +1 -1
  399. package/build/lib/web/production/components/DatePicker/DatePicker.web.js +4 -2
  400. package/build/lib/web/production/components/DatePicker/DatePicker.web.js.map +1 -1
  401. package/build/lib/web/production/components/Drawer/Drawer.web.js +8 -3
  402. package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
  403. package/build/lib/web/production/components/Drawer/DrawerSubcomponents.web.js +11 -3
  404. package/build/lib/web/production/components/Drawer/DrawerSubcomponents.web.js.map +1 -1
  405. package/build/lib/web/production/components/Dropdown/Dropdown.js +5 -3
  406. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  407. package/build/lib/web/production/components/Dropdown/DropdownButton.js +2 -2
  408. package/build/lib/web/production/components/Dropdown/DropdownButton.js.map +1 -1
  409. package/build/lib/web/production/components/Dropdown/DropdownHeaderFooter.js +8 -3
  410. package/build/lib/web/production/components/Dropdown/DropdownHeaderFooter.js.map +1 -1
  411. package/build/lib/web/production/components/Dropdown/DropdownLink.js +5 -3
  412. package/build/lib/web/production/components/Dropdown/DropdownLink.js.map +1 -1
  413. package/build/lib/web/production/components/FileUpload/FileUpload.web.js +6 -4
  414. package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
  415. package/build/lib/web/production/components/Form/Selector/SelectorGroupField.js +8 -3
  416. package/build/lib/web/production/components/Form/Selector/SelectorGroupField.js.map +1 -1
  417. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +8 -3
  418. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
  419. package/build/lib/web/production/components/Indicator/Indicator.js +5 -3
  420. package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
  421. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +6 -4
  422. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
  423. package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +5 -2
  424. package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
  425. package/build/lib/web/production/components/Input/DropdownInputTriggers/SelectInput.js +5 -3
  426. package/build/lib/web/production/components/Input/DropdownInputTriggers/SelectInput.js.map +1 -1
  427. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js +6 -4
  428. package/build/lib/web/production/components/Input/OTPInput/OTPInput.js.map +1 -1
  429. package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js +2 -2
  430. package/build/lib/web/production/components/Input/PasswordInput/PasswordInput.js.map +1 -1
  431. package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js +2 -2
  432. package/build/lib/web/production/components/Input/PhoneNumberInput/PhoneNumberInput.web.js.map +1 -1
  433. package/build/lib/web/production/components/Input/SearchInput/SearchInput.js +2 -2
  434. package/build/lib/web/production/components/Input/SearchInput/SearchInput.js.map +1 -1
  435. package/build/lib/web/production/components/Input/TextArea/TextArea.js +2 -2
  436. package/build/lib/web/production/components/Input/TextArea/TextArea.js.map +1 -1
  437. package/build/lib/web/production/components/Input/TextInput/TextInput.js +2 -2
  438. package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
  439. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +5 -3
  440. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
  441. package/build/lib/web/production/components/Link/Link/Link.js +4 -2
  442. package/build/lib/web/production/components/Link/Link/Link.js.map +1 -1
  443. package/build/lib/web/production/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js +18 -8
  444. package/build/lib/web/production/components/Menu/VisualSubComponents/MenuHeaderFooter.web.js.map +1 -1
  445. package/build/lib/web/production/components/Modal/Modal.web.js +10 -4
  446. package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
  447. package/build/lib/web/production/components/Modal/ModalBody.web.js +9 -3
  448. package/build/lib/web/production/components/Modal/ModalBody.web.js.map +1 -1
  449. package/build/lib/web/production/components/Modal/ModalFooter.web.js +7 -2
  450. package/build/lib/web/production/components/Modal/ModalFooter.web.js.map +1 -1
  451. package/build/lib/web/production/components/Modal/ModalHeader.web.js +14 -6
  452. package/build/lib/web/production/components/Modal/ModalHeader.web.js.map +1 -1
  453. package/build/lib/web/production/components/Popover/Popover.web.js +8 -3
  454. package/build/lib/web/production/components/Popover/Popover.web.js.map +1 -1
  455. package/build/lib/web/production/components/Popover/PopoverInteractiveWrapper.web.js.map +1 -1
  456. package/build/lib/web/production/components/ProgressBar/ProgressBar.js +5 -3
  457. package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
  458. package/build/lib/web/production/components/Radio/Radio.js +6 -4
  459. package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
  460. package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js +8 -5
  461. package/build/lib/web/production/components/Radio/RadioGroup/RadioGroup.js.map +1 -1
  462. package/build/lib/web/production/components/SideNav/SideNav.web.js +5 -3
  463. package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
  464. package/build/lib/web/production/components/SideNav/SideNavItems/SideNavItem.web.js +13 -4
  465. package/build/lib/web/production/components/SideNav/SideNavItems/SideNavItem.web.js.map +1 -1
  466. package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js +10 -4
  467. package/build/lib/web/production/components/SideNav/SideNavItems/SideNavLink.web.js.map +1 -1
  468. package/build/lib/web/production/components/SideNav/SideNavSection.web.js +10 -4
  469. package/build/lib/web/production/components/SideNav/SideNavSection.web.js.map +1 -1
  470. package/build/lib/web/production/components/StepGroup/StepGroup.web.js +5 -3
  471. package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
  472. package/build/lib/web/production/components/StepGroup/StepItem.web.js +13 -7
  473. package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
  474. package/build/lib/web/production/components/StepGroup/StepLine.web.js +79 -42
  475. package/build/lib/web/production/components/StepGroup/StepLine.web.js.map +1 -1
  476. package/build/lib/web/production/components/StepGroup/tokens.js +6 -6
  477. package/build/lib/web/production/components/StepGroup/tokens.js.map +1 -1
  478. package/build/lib/web/production/components/Switch/Switch.js +5 -3
  479. package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
  480. package/build/lib/web/production/components/Table/Table.web.js +9 -7
  481. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  482. package/build/lib/web/production/components/Table/TableBody.web.js +18 -9
  483. package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
  484. package/build/lib/web/production/components/Table/TableFooter.web.js +18 -9
  485. package/build/lib/web/production/components/Table/TableFooter.web.js.map +1 -1
  486. package/build/lib/web/production/components/Table/TableHeader.web.js +18 -9
  487. package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
  488. package/build/lib/web/production/components/Table/TablePagination.web.js +10 -4
  489. package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
  490. package/build/lib/web/production/components/Table/TableToolbar.web.js +13 -8
  491. package/build/lib/web/production/components/Table/TableToolbar.web.js.map +1 -1
  492. package/build/lib/web/production/components/Tabs/TabItem.web.js +9 -5
  493. package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
  494. package/build/lib/web/production/components/Tabs/TabList.web.js +5 -3
  495. package/build/lib/web/production/components/Tabs/TabList.web.js.map +1 -1
  496. package/build/lib/web/production/components/Tabs/TabPanel.web.js +10 -5
  497. package/build/lib/web/production/components/Tabs/TabPanel.web.js.map +1 -1
  498. package/build/lib/web/production/components/Tabs/Tabs.web.js +8 -3
  499. package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
  500. package/build/lib/web/production/components/Tag/Tag.js +6 -4
  501. package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
  502. package/build/lib/web/production/components/Toast/ToastContainer.web.js +8 -3
  503. package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
  504. package/build/lib/web/production/components/Tooltip/Tooltip.web.js +8 -3
  505. package/build/lib/web/production/components/Tooltip/Tooltip.web.js.map +1 -1
  506. package/build/lib/web/production/components/TopNav/TabNav/TabNav.web.js +6 -3
  507. package/build/lib/web/production/components/TopNav/TabNav/TabNav.web.js.map +1 -1
  508. package/build/lib/web/production/components/TopNav/TopNav.web.js +8 -5
  509. package/build/lib/web/production/components/TopNav/TopNav.web.js.map +1 -1
  510. package/build/lib/web/production/tokens/global/size.js +3 -1
  511. package/build/lib/web/production/tokens/global/size.js.map +1 -1
  512. package/build/lib/web/production/utils/makeAnalyticsAttribute/index.js +2 -0
  513. package/build/lib/web/production/utils/makeAnalyticsAttribute/index.js.map +1 -0
  514. package/build/lib/web/production/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js +20 -0
  515. package/build/lib/web/production/utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js.map +1 -0
  516. package/build/types/components/index.d.ts +221 -189
  517. package/build/types/components/index.native.d.ts +145 -131
  518. package/build/types/tokens/index.d.ts +3 -1
  519. package/build/types/tokens/index.native.d.ts +3 -1
  520. package/package.json +3 -3
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
3
  import React__default from 'react';
3
4
  import styled from 'styled-components';
4
5
  import { componentIds } from './componentIds.js';
@@ -20,6 +21,7 @@ import { dropdownComponentIds } from '../Dropdown/dropdownComponentIds.js';
20
21
  import '../BaseMenu/index.js';
21
22
  import '../Checkbox/index.js';
22
23
  import '../Avatar/index.js';
24
+ import '../../utils/makeAnalyticsAttribute/index.js';
23
25
  import { jsxs, jsx } from 'react/jsx-runtime';
24
26
  import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
25
27
  import { makeSize } from '../../utils/makeSize/makeSize.js';
@@ -27,6 +29,7 @@ import { isReactNative } from '../../utils/platform/isReactNative.js';
27
29
  import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
28
30
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
29
31
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
32
+ import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
30
33
  import { Text } from '../Typography/Text/Text.js';
31
34
  import { Divider } from '../Divider/Divider.js';
32
35
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
@@ -39,6 +42,7 @@ import { BaseMenuItem } from '../BaseMenu/BaseMenuItem/BaseMenuItem.js';
39
42
  import { Checkbox } from '../Checkbox/Checkbox.js';
40
43
  import { castWebType } from '../../utils/platform/castUtils.js';
41
44
 
45
+ var _excluded = ["title", "children", "testID", "_hideDivider", "_sectionChildValues"];
42
46
  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
47
  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
48
  var StyledActionListSectionTitle = /*#__PURE__*/styled(BaseBox).withConfig({
@@ -55,7 +59,8 @@ var _ActionListSection = function _ActionListSection(_ref) {
55
59
  children = _ref.children,
56
60
  testID = _ref.testID,
57
61
  _hideDivider = _ref._hideDivider,
58
- _sectionChildValues = _ref._sectionChildValues;
62
+ _sectionChildValues = _ref._sectionChildValues,
63
+ rest = _objectWithoutProperties(_ref, _excluded);
59
64
  var _useDropdown = useDropdown(),
60
65
  hasAutoCompleteInBottomSheetHeader = _useDropdown.hasAutoCompleteInBottomSheetHeader,
61
66
  dropdownTriggerer = _useDropdown.dropdownTriggerer,
@@ -72,13 +77,13 @@ var _ActionListSection = function _ActionListSection(_ref) {
72
77
  }, [_sectionChildValues, hasAutoComplete, filteredValues]);
73
78
  var showDividerInRN = !(_hideDivider && isReactNative());
74
79
  var showDividerInAutoComplete = hasAutoComplete ? isSectionVisible && filteredValues.length > 1 : true;
75
- return /*#__PURE__*/jsxs(BaseBox, _objectSpread(_objectSpread(_objectSpread({}, makeAccessible({
80
+ return /*#__PURE__*/jsxs(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, makeAccessible({
76
81
  role: getActionListSectionRole(),
77
82
  label: title
78
83
  })), metaAttribute({
79
84
  name: MetaConstants.ActionListSection,
80
85
  testID: testID
81
- })), {}, {
86
+ })), makeAnalyticsAttribute(rest)), {}, {
82
87
  children: [isSectionVisible ? /*#__PURE__*/jsx(StyledActionListSectionTitle, _objectSpread(_objectSpread({}, makeAccessible({
83
88
  hidden: true
84
89
  })), {}, {
@@ -244,7 +249,7 @@ var _ActionListItem = function _ActionListItem(props) {
244
249
  return (
245
250
  /*#__PURE__*/
246
251
  // We use this context to change the color of subcomponents like ActionListItemIcon, ActionListItemText, etc
247
- jsx(BaseMenuItem, _objectSpread(_objectSpread(_objectSpread({
252
+ jsx(BaseMenuItem, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
248
253
  isVisible: hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true,
249
254
  as: !isReactNative() ? renderOnWebAs : undefined,
250
255
  id: "".concat(dropdownBaseId, "-").concat(props._index),
@@ -282,7 +287,7 @@ var _ActionListItem = function _ActionListItem(props) {
282
287
  event: castWebType(e)
283
288
  });
284
289
  }
285
- })), metaAttribute({
290
+ })), makeAnalyticsAttribute(_objectSpread({}, props))), metaAttribute({
286
291
  name: MetaConstants.ActionListItem,
287
292
  testID: props.testID
288
293
  })), {}, {
@@ -1 +1 @@
1
- {"version":3,"file":"ActionListItem.js","sources":["../../../../../../src/components/ActionList/ActionListItem.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TouchableOpacity } from 'react-native';\nimport { componentIds } from './componentIds';\nimport { validateActionListItemProps, getNormalTextColor } from './actionListUtils';\nimport { getActionListItemRole, getActionListSectionRole } from './getA11yRoles';\nimport { Divider } from '~components/Divider';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport type { Platform } from '~utils';\nimport { castWebType, isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport type { BadgeProps } from '~components/Badge';\nimport { Badge } from '~components/Badge';\nimport { Box } from '~components/Box';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { BaseMenuItem, useBaseMenuItem } from '~components/BaseMenu';\nimport { Checkbox } from '~components/Checkbox';\nimport type { AvatarProps } from '~components/Avatar/types';\nimport { Avatar } from '~components/Avatar';\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 _ActionListItemAvatar = (avatarProps: Omit<AvatarProps, 'size' | ''>): React.ReactElement => {\n return <Avatar size=\"xsmall\" {...avatarProps} />;\n};\n\nconst ActionListItemAvatar = assignWithoutSideEffects(_ActionListItemAvatar, {\n componentId: componentIds.ActionListItemAvatar,\n});\n\nconst _ActionListItemBadge = (props: BadgeProps): React.ReactElement => {\n return <Badge size=\"medium\" marginLeft=\"spacing.3\" {...props} />;\n};\n\nconst ActionListItemBadge = assignWithoutSideEffects(_ActionListItemBadge, {\n componentId: componentIds.ActionListItemBadge,\n});\n\nconst _ActionListItemText = ({\n children,\n}: {\n children: StringChildrenType;\n}): React.ReactElement => {\n const { isDisabled } = useBaseMenuItem();\n\n return (\n <Text variant=\"caption\" color={getNormalTextColor(isDisabled, { isMuted: true })}>\n {children}\n </Text>\n );\n};\n\nconst ActionListItemText = assignWithoutSideEffects(_ActionListItemText, {\n componentId: componentIds.ActionListItemText,\n});\n\ntype ClickHandlerType = (e: React.MouseEvent<HTMLButtonElement>) => void;\n\nconst makeActionListItemClickable = (\n clickHandler: ClickHandlerType,\n): { onPress?: (e: React.TouchEvent<TouchableOpacity>) => void; onClick?: ClickHandlerType } => {\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: ignoring ReactNative press type for the peace of mind\n return { onPress: clickHandler };\n }\n\n return {\n onClick: clickHandler,\n };\n};\n\n/**\n * ### ActionListItem\n *\n * Creates option inside `ActionList`.\n *\n * #### Usage\n *\n * ```jsx\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}\n * />\n * </ActionList>\n * ```\n */\nconst _ActionListItem = (props: ActionListItemProps): React.ReactElement => {\n const {\n activeIndex,\n dropdownBaseId,\n onOptionClick,\n selectedIndices,\n setShouldIgnoreBlurAnimation,\n selectionType,\n dropdownTriggerer,\n isKeydownPressed,\n filteredValues,\n hasAutoCompleteInBottomSheetHeader,\n } = useDropdown();\n\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const renderOnWebAs = props.href ? 'a' : 'button';\n\n /**\n * In SelectInput, returns the isSelected according to selected indexes in the state\n *\n * In Other Triggers (Menu Usecase), returns `props.isSelected` since passing the\n * isSelected prop explicitly is the only way to select item in menu\n */\n const getIsSelected = (): boolean | undefined => {\n if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput || hasAutoComplete) {\n if (typeof props._index === 'number') {\n return selectedIndices.includes(props._index);\n }\n\n return undefined;\n }\n\n return props.isSelected;\n };\n\n const isSelected = getIsSelected();\n\n React.useEffect(() => {\n validateActionListItemProps({\n leading: props.leading,\n trailing: props.trailing,\n titleSuffix: props.titleSuffix,\n });\n }, [props.leading, props.trailing, props.titleSuffix]);\n\n React.useEffect(() => {\n if (__DEV__) {\n if (\n dropdownTriggerer === dropdownComponentIds.triggers.SelectInput &&\n props.intent === 'negative'\n ) {\n throwBladeError({\n message:\n 'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',\n moduleName: 'ActionListItem',\n });\n }\n }\n }, [props.intent, dropdownTriggerer]);\n\n 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 ActionListItemAvatar,\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","_ActionListItemAvatar","avatarProps","Avatar","ActionListItemAvatar","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref4","_useBaseMenuItem2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","selectionType","isKeydownPressed","renderOnWebAs","href","getIsSelected","SelectInput","_index","isSelected","useEffect","validateActionListItemProps","leading","trailing","titleSuffix","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":";;;;;;;;;;;;;;;;;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,KAAC,CAAC,CAAA,EAAA,EAAA,EAAA;MAC/E6H,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,YAAYjG,EAAAA,KAAK,CAACqH,KAAM;MACxB,YAAYrH,EAAAA,KAAK,CAACwG,MAAO;AACzBN,MAAAA,aAAa,EAAEA,aAAc;MAC7BpD,KAAK,EAAE9C,KAAK,CAAC+G,MAAO;AACpBZ,MAAAA,gBAAgB,EAAEA,gBAAAA;KACnB,CAAA,CAAA;AAAC,IAAA;AAEN,CAAC,CAAA;AAEKkC,IAAAA,cAAc,gBAAGhF,wBAAwB,eAAC/B,cAAK,CAACkH,IAAI,CAAC7C,eAAe,CAAC,EAAE;EAC3E5F,WAAW,EAAEuD,YAAY,CAAC+E,cAAc;EACxCvI,WAAW,EAAEwD,YAAY,CAAC+E,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 { DataAnalyticsAttribute, StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport type { BadgeProps } from '~components/Badge';\nimport { Badge } from '~components/Badge';\nimport { Box } from '~components/Box';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { BaseMenuItem, useBaseMenuItem } from '~components/BaseMenu';\nimport { Checkbox } from '~components/Checkbox';\nimport type { AvatarProps } from '~components/Avatar/types';\nimport { Avatar } from '~components/Avatar';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListItemProps = {\n title: string;\n description?: string;\n onClick?: (clickProps: {\n name: string;\n value?: boolean;\n event: Platform.Select<{\n web: React.MouseEvent;\n native: React.TouchEvent<TouchableOpacity>;\n }>;\n }) => void;\n /**\n * value that you get from `onChange` event on SelectInput or in form submissions.\n */\n value: string;\n /**\n * Link to open when item is clicked.\n */\n href?: string;\n /**\n * HTML target of the link\n */\n target?: string;\n /**\n * Item that goes on left-side of item.\n *\n * Valid elements - `<ActionListItemIcon />`, `<ActionListItemAsset />`\n *\n * Will be overriden in multiselect\n */\n leading?: React.ReactNode;\n /**\n * Item that goes on right-side of item.\n *\n * Valid elements - `<ActionListItemText />`, `<ActionListItemIcon />`\n */\n trailing?: React.ReactNode;\n /**\n * Item that goes immediately next to the title.\n *\n * Valid elements - `<ActionListItemBadge />`, `<ActionListItemBadgeGroup />`\n *\n */\n titleSuffix?: React.ReactElement;\n isDisabled?: boolean;\n intent?: Extract<FeedbackColors, 'negative'>;\n /**\n * Can be used in combination of `onClick` to highlight item as selected in Button Triggers.\n *\n * When trigger is SelectInput, Use `value` prop on SelectInput instead to make dropdown controlled.\n */\n isSelected?: boolean;\n /**\n * Internally passed from ActionList. No need to pass it explicitly\n *\n * @private\n */\n _index?: number;\n} & TestID &\n DataAnalyticsAttribute;\n\nconst StyledActionListSectionTitle = styled(BaseBox)((props) => ({\n // @TODO: replace this styled-component with new layout box when we have padding shorthand\n padding: makeSize(props.theme.spacing[3]),\n}));\n\ntype ActionListSectionProps = {\n title: string;\n children: React.ReactNode[] | React.ReactNode;\n /**\n * Internally used to hide the divider on final item in React Native.\n *\n * Should not be used by consumers (also won't work on web)\n *\n * @private\n */\n _hideDivider?: boolean;\n /**\n * Internally used to hide / show section in AutoComplete\n *\n * @private\n */\n _sectionChildValues?: string[];\n} & TestID &\n DataAnalyticsAttribute;\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\n ...rest\n}: ActionListSectionProps): React.ReactElement => {\n const { hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, filteredValues } = useDropdown();\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const isSectionVisible = React.useMemo(() => {\n if (hasAutoComplete) {\n const visibleActionListItemInSection = _sectionChildValues?.find((actionItemValue) =>\n filteredValues.includes(actionItemValue),\n );\n\n return Boolean(visibleActionListItemInSection);\n }\n\n return true;\n }, [_sectionChildValues, hasAutoComplete, filteredValues]);\n\n const showDividerInRN = !(_hideDivider && isReactNative());\n const showDividerInAutoComplete = hasAutoComplete\n ? isSectionVisible && filteredValues.length > 1\n : true;\n\n return (\n <BaseBox\n {...makeAccessible({\n role: getActionListSectionRole(),\n label: title,\n })}\n {...metaAttribute({ name: MetaConstants.ActionListSection, testID })}\n {...makeAnalyticsAttribute(rest as Record<string, unknown>)}\n >\n {/* We're announcing title as group label so we can hide this */}\n {isSectionVisible ? (\n <StyledActionListSectionTitle {...makeAccessible({ hidden: true })}>\n <Text color=\"surface.text.gray.muted\" size=\"small\" weight=\"semibold\">\n {title}\n </Text>\n </StyledActionListSectionTitle>\n ) : null}\n <BaseBox\n {...makeAccessible({\n // On web, we just wrap it in another listbox to announce item count properly for particular group.\n // On React Native, we ignore it since `menu` + `group` role will take care of accessibility\n role: isReactNative() ? undefined : 'listbox',\n })}\n >\n {children}\n </BaseBox>\n {showDividerInAutoComplete && showDividerInRN ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" />\n ) : null}\n </BaseBox>\n );\n};\n\nconst ActionListSection = assignWithoutSideEffects(_ActionListSection, {\n componentId: componentIds.ActionListSection,\n});\n\nconst _ActionListItemIcon = ({ icon }: { icon: IconComponent }): React.ReactElement => {\n const Icon = icon;\n const { color, isDisabled } = useBaseMenuItem();\n const iconState = isDisabled ? 'disabled' : 'muted';\n return (\n <Icon\n color={\n color === 'negative'\n ? 'feedback.icon.negative.intense'\n : `interactive.icon.gray.${iconState}`\n }\n size=\"medium\"\n />\n );\n};\n\nconst ActionListItemIcon = assignWithoutSideEffects(_ActionListItemIcon, {\n componentId: componentIds.ActionListItemIcon,\n});\n\nconst _ActionListItemBadgeGroup = ({\n children,\n}: {\n children: React.ReactElement[] | React.ReactElement;\n}): React.ReactElement => {\n return (\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n {children}\n </Box>\n );\n};\n\nconst ActionListItemBadgeGroup = assignWithoutSideEffects(_ActionListItemBadgeGroup, {\n componentId: componentIds.ActionListItemBadgeGroup,\n});\n\nconst _ActionListItemAvatar = (avatarProps: Omit<AvatarProps, 'size' | ''>): React.ReactElement => {\n return <Avatar size=\"xsmall\" {...avatarProps} />;\n};\n\nconst ActionListItemAvatar = assignWithoutSideEffects(_ActionListItemAvatar, {\n componentId: componentIds.ActionListItemAvatar,\n});\n\nconst _ActionListItemBadge = (props: BadgeProps): React.ReactElement => {\n return <Badge size=\"medium\" marginLeft=\"spacing.3\" {...props} />;\n};\n\nconst ActionListItemBadge = assignWithoutSideEffects(_ActionListItemBadge, {\n componentId: componentIds.ActionListItemBadge,\n});\n\nconst _ActionListItemText = ({\n children,\n}: {\n children: StringChildrenType;\n}): React.ReactElement => {\n const { isDisabled } = useBaseMenuItem();\n\n return (\n <Text variant=\"caption\" color={getNormalTextColor(isDisabled, { isMuted: true })}>\n {children}\n </Text>\n );\n};\n\nconst ActionListItemText = assignWithoutSideEffects(_ActionListItemText, {\n componentId: componentIds.ActionListItemText,\n});\n\ntype ClickHandlerType = (e: React.MouseEvent<HTMLButtonElement>) => void;\n\nconst makeActionListItemClickable = (\n clickHandler: ClickHandlerType,\n): { onPress?: (e: React.TouchEvent<TouchableOpacity>) => void; onClick?: ClickHandlerType } => {\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: ignoring ReactNative press type for the peace of mind\n return { onPress: clickHandler };\n }\n\n return {\n onClick: clickHandler,\n };\n};\n\n/**\n * ### ActionListItem\n *\n * Creates option inside `ActionList`.\n *\n * #### Usage\n *\n * ```jsx\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}\n * />\n * </ActionList>\n * ```\n */\nconst _ActionListItem = (props: ActionListItemProps): React.ReactElement => {\n const {\n activeIndex,\n dropdownBaseId,\n onOptionClick,\n selectedIndices,\n setShouldIgnoreBlurAnimation,\n selectionType,\n dropdownTriggerer,\n isKeydownPressed,\n filteredValues,\n hasAutoCompleteInBottomSheetHeader,\n } = useDropdown();\n\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const renderOnWebAs = props.href ? 'a' : 'button';\n\n /**\n * In SelectInput, returns the isSelected according to selected indexes in the state\n *\n * In Other Triggers (Menu Usecase), returns `props.isSelected` since passing the\n * isSelected prop explicitly is the only way to select item in menu\n */\n const getIsSelected = (): boolean | undefined => {\n if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput || hasAutoComplete) {\n if (typeof props._index === 'number') {\n return selectedIndices.includes(props._index);\n }\n\n return undefined;\n }\n\n return props.isSelected;\n };\n\n const isSelected = getIsSelected();\n\n React.useEffect(() => {\n validateActionListItemProps({\n leading: props.leading,\n trailing: props.trailing,\n titleSuffix: props.titleSuffix,\n });\n }, [props.leading, props.trailing, props.titleSuffix]);\n\n React.useEffect(() => {\n if (__DEV__) {\n if (\n dropdownTriggerer === dropdownComponentIds.triggers.SelectInput &&\n props.intent === 'negative'\n ) {\n throwBladeError({\n message:\n 'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',\n moduleName: 'ActionListItem',\n });\n }\n }\n }, [props.intent, dropdownTriggerer]);\n\n 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 {...makeAnalyticsAttribute({ ...props })}\n {...metaAttribute({ name: MetaConstants.ActionListItem, testID: props.testID })}\n onMouseDown={() => {\n // We want to keep focus on Dropdown's trigger while option is being clicked\n // So We set this flag that ignores the blur animation to avoid the flicker between focus out + focus in\n setShouldIgnoreBlurAnimation(true);\n }}\n onMouseUp={() => {\n // (Contd from above comment...) We set this flag back to false since blur of SelectInput is done calling by this time\n setShouldIgnoreBlurAnimation(false);\n }}\n data-value={props.value}\n data-index={props._index}\n selectionType={selectionType}\n color={props.intent}\n isKeydownPressed={isKeydownPressed}\n />\n );\n};\n\nconst ActionListItem = assignWithoutSideEffects(React.memo(_ActionListItem), {\n componentId: componentIds.ActionListItem,\n displayName: componentIds.ActionListItem,\n});\n\nexport type { ActionListItemProps, ActionListSectionProps };\nexport {\n ActionListItem,\n ActionListItemIcon,\n ActionListItemText,\n ActionListItemAvatar,\n ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n};\n"],"names":["StyledActionListSectionTitle","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSize","theme","spacing","_ActionListSection","_ref","title","children","testID","_hideDivider","_sectionChildValues","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","React","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","_objectSpread","makeAccessible","role","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","makeAnalyticsAttribute","_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","_ActionListItemAvatar","avatarProps","Avatar","ActionListItemAvatar","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref4","_useBaseMenuItem2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","selectionType","isKeydownPressed","renderOnWebAs","href","getIsSelected","SelectInput","_index","isSelected","useEffect","validateActionListItemProps","leading","trailing","titleSuffix","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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4FA,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;AAqBH,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAO0B;AAAA,EAAA,IANhDC,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;AAChBC,IAAAA,IAAI,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,YAAA,GAAkFC,WAAW,EAAE;IAAvFC,kCAAkC,GAAAF,YAAA,CAAlCE,kCAAkC;IAAEC,iBAAiB,GAAAH,YAAA,CA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ACxC3I,WAAW,EAAE4D,YAAY,CAAC+E,cAAAA;AAC5B,CAAC;;;;"}
@@ -14,6 +14,7 @@ import '../Button/BaseButton/index.js';
14
14
  import '../Link/BaseLink/index.js';
15
15
  import '../BladeProvider/index.js';
16
16
  import '../../utils/makeAccessible/index.js';
17
+ import '../../utils/makeAnalyticsAttribute/index.js';
17
18
  import { jsx, jsxs } from 'react/jsx-runtime';
18
19
  import { getPlatformType } from '../../utils/getPlatformType/getPlatformType.js';
19
20
  import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
@@ -33,6 +34,7 @@ import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js
33
34
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
34
35
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
35
36
  import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
37
+ import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
36
38
 
37
39
  var _excluded = ["description", "title", "isDismissible", "onDismiss", "emphasis", "isFullWidth", "color", "actions", "testID", "icon"];
38
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; }
@@ -63,7 +65,7 @@ var Alert = function Alert(_ref) {
63
65
  actions = _ref.actions,
64
66
  testID = _ref.testID,
65
67
  icon = _ref.icon,
66
- styledProps = _objectWithoutProperties(_ref, _excluded);
68
+ rest = _objectWithoutProperties(_ref, _excluded);
67
69
  var _useTheme = useTheme(),
68
70
  theme = _useTheme.theme;
69
71
  var _useBreakpoint = useBreakpoint({
@@ -202,10 +204,10 @@ var Alert = function Alert(_ref) {
202
204
  if (!isVisible) {
203
205
  return null;
204
206
  }
205
- return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, a11yProps), metaAttribute({
207
+ return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, a11yProps), metaAttribute({
206
208
  name: MetaConstants.Alert,
207
209
  testID: testID
208
- })), getStyledProps(styledProps)), {}, {
210
+ })), getStyledProps(rest)), makeAnalyticsAttribute(rest)), {}, {
209
211
  children: /*#__PURE__*/jsxs(StyledAlert, {
210
212
  color: color,
211
213
  emphasis: emphasis,
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","sources":["../../../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import type { ReactChild, ReactElement } from 'react';\nimport { Fragment, useState } from 'react';\n\nimport { StyledAlert } from './StyledAlert';\nimport type { IconComponent } from '~components/Icons';\nimport {\n AlertOctagonIcon,\n AlertTriangleIcon,\n CheckCircleIcon,\n CloseIcon,\n InfoIcon,\n} from '~components/Icons';\nimport { castNativeType, castWebType, useBreakpoint, getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { IconButton } from '~components/Button/IconButton';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport BaseButton from '~components/Button/BaseButton';\nimport { BaseLink } from '~components/Link/BaseLink';\nimport type { FeedbackColors, SubtleOrIntense } from '~tokens/theme/theme';\nimport { useTheme } from '~components/BladeProvider';\nimport type { DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype PrimaryAction = {\n text: string;\n onClick: () => void;\n};\n\ntype SecondaryActionButton = {\n text: string;\n onClick: () => void;\n};\n\ntype SecondaryActionLinkButton = {\n text: string;\n href: string;\n onClick?: () => void;\n target?: string;\n /**\n * When `target` is set to `_blank` this is automatically set to `noopener noreferrer`\n */\n rel?: string;\n};\n\ntype SecondaryAction = SecondaryActionButton | SecondaryActionLinkButton;\n\ntype AlertProps = {\n /**\n * Body content, pass text or JSX. Avoid passing components except `Link` to customize the content.\n */\n description: ReactChild;\n\n /**\n * A brief heading\n */\n title?: string;\n\n /**\n * Shows a dismiss button\n *\n * @default true\n */\n isDismissible?: boolean;\n\n /**\n * A callback when the dismiss button is clicked\n */\n onDismiss?: () => void;\n\n /**\n * Can be used to render custom icon\n */\n icon?: IconComponent;\n\n /**\n * Can be set to `high` for a more prominent look. Not to be confused with a11y emphasis.\n *\n * @default subtle\n */\n emphasis?: SubtleOrIntense;\n\n /**\n * Makes the Alert span the entire container width, instead of the default max width of `584px`.\n * This also makes the alert borderless, useful for creating full bleed layouts.\n *\n * @default false\n */\n isFullWidth?: boolean;\n\n /**\n * Sets the color tone\n */\n color?: FeedbackColors;\n\n /**\n * Renders a primary action button and a secondary action link button\n */\n actions?: {\n /**\n * Renders a button (should **always** be present if `secondary` action is being used)\n */\n primary?: PrimaryAction;\n /**\n * Renders a Link button\n */\n secondary?: SecondaryAction;\n };\n} & TestID &\n StyledPropsBlade;\n\nconst isReactNative = getPlatformType() === 'react-native';\n\n// Need extra wrappers on React Native only for alignment\nconst CloseButtonWrapper = isReactNative ? BaseBox : Fragment;\n\nconst intentIconMap = {\n positive: CheckCircleIcon,\n negative: AlertOctagonIcon,\n information: InfoIcon,\n neutral: InfoIcon,\n notice: AlertTriangleIcon,\n};\n\nconst Alert = ({\n description,\n title,\n isDismissible = true,\n onDismiss,\n emphasis = 'subtle',\n isFullWidth = false,\n color = 'neutral',\n actions,\n testID,\n icon,\n ...styledProps\n}: AlertProps): ReactElement | null => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const [isVisible, setIsVisible] = useState(true);\n\n const isDesktop = matchedDeviceType === 'desktop';\n const isMobile = !isDesktop;\n\n const Icon = icon ?? intentIconMap[color];\n let iconOffset: DotNotationSpacingStringToken = 'spacing.1';\n\n // certain special cases below needs special care for near perfect alignment\n if (isReactNative) {\n if (isFullWidth && !title) {\n iconOffset = 'spacing.1';\n } else if (!isFullWidth && !title) {\n iconOffset = 'spacing.0';\n } else if (!isFullWidth && title) {\n iconOffset = 'spacing.2';\n }\n } else if (isMobile) {\n if (!isFullWidth && title) {\n iconOffset = 'spacing.2';\n } else if (isFullWidth && !title) {\n iconOffset = 'spacing.2';\n }\n } else if (isFullWidth) {\n iconOffset = 'spacing.1';\n }\n\n const shouldCenterAlign = isFullWidth && !title;\n let alignment: 'center' | 'flex-start' = 'flex-start';\n if (!isFullWidth) alignment = 'flex-start';\n if (shouldCenterAlign) alignment = 'center';\n\n const leadingIcon = (\n <BaseBox display=\"flex\" alignSelf={alignment} marginTop={iconOffset}>\n <Icon\n color={\n emphasis === 'intense'\n ? 'surface.icon.staticWhite.normal'\n : `feedback.icon.${color}.${emphasis === 'subtle' ? 'intense' : 'subtle'}`\n }\n size=\"medium\"\n />\n </BaseBox>\n );\n\n const textColor =\n emphasis === 'intense' ? 'surface.text.staticWhite.normal' : 'surface.text.gray.subtle';\n const _title = title ? (\n <BaseBox marginBottom=\"spacing.2\">\n <Text color={textColor} size=\"medium\" weight=\"semibold\">\n {title}\n </Text>\n </BaseBox>\n ) : null;\n\n const _description = (\n <BaseBox marginTop={title || isReactNative ? 'spacing.0' : 'spacing.1'}>\n <Text color={textColor} size=\"small\">\n {description}\n </Text>\n </BaseBox>\n );\n\n const primaryAction = actions?.primary ? (\n <BaseBox\n marginRight=\"spacing.5\"\n display={isReactNative ? castNativeType('flex') : castWebType('inline-flex')}\n >\n <BaseButton\n size=\"small\"\n onClick={actions.primary.onClick}\n color={emphasis === 'intense' ? 'white' : color}\n variant=\"secondary\"\n >\n {actions.primary.text}\n </BaseButton>\n </BaseBox>\n ) : null;\n\n const secondaryActionParams: Partial<SecondaryActionLinkButton> | null = actions?.secondary\n ? {\n onClick: actions.secondary.onClick,\n }\n : null;\n\n /**\n * TS assumes only common properties to be present for `SecondaryAction` union type\n * We add a type guard that checks if href is present on secondary action:\n * - If yes, then TS can assume it to be `SecondaryActionLinkButton` (href being a required property)\n * - If no, then it would be `SecondaryActionButton` (and link properties wouldn't be needed)\n */\n if (actions?.secondary && secondaryActionParams && 'href' in actions.secondary) {\n secondaryActionParams.href = actions.secondary.href;\n secondaryActionParams.target = actions.secondary.target;\n secondaryActionParams.rel = actions.secondary.rel;\n }\n\n const secondaryAction = actions?.secondary ? (\n <BaseBox marginRight=\"spacing.4\" display={(isReactNative ? 'flex' : 'inline-flex') as never}>\n <BaseLink\n size=\"small\"\n color={emphasis === 'intense' ? 'white' : color}\n {...secondaryActionParams}\n >\n {actions.secondary.text}\n </BaseLink>\n </BaseBox>\n ) : null;\n\n // For certain cases we wish to render actions inline with text content\n const showActionsHorizontal = isFullWidth && isDesktop;\n\n const actionsHorizontal =\n showActionsHorizontal && (primaryAction || secondaryAction) ? (\n <BaseBox flexDirection=\"row\" alignItems=\"center\">\n {primaryAction}\n {secondaryAction}\n </BaseBox>\n ) : null;\n\n const actionsVertical =\n !showActionsHorizontal && (primaryAction || secondaryAction) ? (\n <BaseBox marginTop=\"spacing.4\" flexDirection=\"row\" alignItems=\"center\">\n {primaryAction}\n {secondaryAction}\n </BaseBox>\n ) : null;\n\n const onClickDismiss = (): void => {\n if (onDismiss) {\n onDismiss();\n }\n setIsVisible(false);\n };\n const closeButton = isDismissible ? (\n <CloseButtonWrapper>\n <IconButton\n accessibilityLabel=\"Dismiss alert\"\n onClick={onClickDismiss}\n emphasis={emphasis === 'intense' ? 'subtle' : 'intense'}\n size=\"large\"\n icon={CloseIcon}\n />\n </CloseButtonWrapper>\n ) : null;\n\n const a11yProps = makeAccessible({\n // React Native doesn't has status as role\n role: isReactNative || color === 'negative' || color === 'notice' ? 'alert' : 'status',\n // override the implicit live region of role `alert`\n ...(color === 'notice' && { liveRegion: 'polite' }),\n });\n\n if (!isVisible) {\n return null;\n }\n\n return (\n <BaseBox\n {...a11yProps}\n {...metaAttribute({ name: MetaConstants.Alert, testID })}\n {...getStyledProps(styledProps)}\n >\n <StyledAlert\n color={color}\n emphasis={emphasis}\n isFullWidth={isFullWidth}\n isDesktop={isDesktop}\n textAlign={'left' as never}\n >\n {leadingIcon}\n <BaseBox\n flex={1}\n paddingLeft={isFullWidth ? 'spacing.4' : 'spacing.3'}\n paddingRight={showActionsHorizontal ? 'spacing.4' : 'spacing.2'}\n >\n {_title}\n {_description}\n {actionsVertical}\n </BaseBox>\n {actionsHorizontal}\n {closeButton}\n </StyledAlert>\n </BaseBox>\n );\n};\n\nexport type { AlertProps };\nexport { Alert };\n"],"names":["isReactNative","getPlatformType","CloseButtonWrapper","BaseBox","Fragment","intentIconMap","positive","CheckCircleIcon","negative","AlertOctagonIcon","information","InfoIcon","neutral","notice","AlertTriangleIcon","Alert","_ref","description","title","_ref$isDismissible","isDismissible","onDismiss","_ref$emphasis","emphasis","_ref$isFullWidth","isFullWidth","_ref$color","color","actions","testID","icon","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","_useState","useState","_useState2","_slicedToArray","isVisible","setIsVisible","isDesktop","isMobile","Icon","iconOffset","shouldCenterAlign","alignment","leadingIcon","_jsx","display","alignSelf","marginTop","children","concat","size","textColor","_title","marginBottom","Text","weight","_description","primaryAction","primary","marginRight","castNativeType","castWebType","BaseButton","onClick","variant","text","secondaryActionParams","secondary","href","target","rel","secondaryAction","BaseLink","_objectSpread","showActionsHorizontal","actionsHorizontal","_jsxs","flexDirection","alignItems","actionsVertical","onClickDismiss","closeButton","IconButton","accessibilityLabel","CloseIcon","a11yProps","makeAccessible","role","liveRegion","metaAttribute","name","MetaConstants","getStyledProps","StyledAlert","textAlign","flex","paddingLeft","paddingRight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiHA,IAAMA,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;;AAE1D;AACA,IAAMC,kBAAkB,GAAGF,aAAa,GAAGG,OAAO,GAAGC,QAAQ,CAAA;AAE7D,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AAEC,IAAI,EAAEC,aAAa,CAACtF,KAAK;AAAEc,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EACpDyE,cAAc,CAACvE,WAAW,CAAC,CAAA,EAAA,EAAA,EAAA;IAAA2B,QAAA,eAE/B4B,IAAA,CAACiB,WAAW,EAAA;AACV5E,MAAAA,KAAK,EAAEA,KAAM;AACbJ,MAAAA,QAAQ,EAAEA,QAAS;AACnBE,MAAAA,WAAW,EAAEA,WAAY;AACzBsB,MAAAA,SAAS,EAAEA,SAAU;AACrByD,MAAAA,SAAS,EAAE,MAAgB;AAAA9C,MAAAA,QAAA,EAE1BL,CAAAA,WAAW,eACZiC,IAAA,CAACnF,OAAO,EAAA;AACNsG,QAAAA,IAAI,EAAE,CAAE;AACRC,QAAAA,WAAW,EAAEjF,WAAW,GAAG,WAAW,GAAG,WAAY;AACrDkF,QAAAA,YAAY,EAAEvB,qBAAqB,GAAG,WAAW,GAAG,WAAY;AAAA1B,QAAAA,QAAA,EAE/DI,CAAAA,MAAM,EACNI,YAAY,EACZuB,eAAe,CAAA;AAAA,OACT,CAAC,EACTJ,iBAAiB,EACjBM,WAAW,CAAA;KACD,CAAA;AAAC,GAAA,CACP,CAAC,CAAA;AAEd;;;;"}
1
+ {"version":3,"file":"Alert.js","sources":["../../../../../../src/components/Alert/Alert.tsx"],"sourcesContent":["import type { ReactChild, ReactElement } from 'react';\nimport { Fragment, useState } from 'react';\n\nimport { StyledAlert } from './StyledAlert';\nimport type { IconComponent } from '~components/Icons';\nimport {\n AlertOctagonIcon,\n AlertTriangleIcon,\n CheckCircleIcon,\n CloseIcon,\n InfoIcon,\n} from '~components/Icons';\nimport { castNativeType, castWebType, useBreakpoint, getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { IconButton } from '~components/Button/IconButton';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport BaseButton from '~components/Button/BaseButton';\nimport { BaseLink } from '~components/Link/BaseLink';\nimport type { FeedbackColors, SubtleOrIntense } from '~tokens/theme/theme';\nimport { useTheme } from '~components/BladeProvider';\nimport type { DataAnalyticsAttribute, DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype PrimaryAction = {\n text: string;\n onClick: () => void;\n};\n\ntype SecondaryActionButton = {\n text: string;\n onClick: () => void;\n};\n\ntype SecondaryActionLinkButton = {\n text: string;\n href: string;\n onClick?: () => void;\n target?: string;\n /**\n * When `target` is set to `_blank` this is automatically set to `noopener noreferrer`\n */\n rel?: string;\n};\n\ntype SecondaryAction = SecondaryActionButton | SecondaryActionLinkButton;\n\ntype AlertProps = {\n /**\n * Body content, pass text or JSX. Avoid passing components except `Link` to customize the content.\n */\n description: ReactChild;\n\n /**\n * A brief heading\n */\n title?: string;\n\n /**\n * Shows a dismiss button\n *\n * @default true\n */\n isDismissible?: boolean;\n\n /**\n * A callback when the dismiss button is clicked\n */\n onDismiss?: () => void;\n\n /**\n * Can be used to render custom icon\n */\n icon?: IconComponent;\n\n /**\n * Can be set to `high` for a more prominent look. Not to be confused with a11y emphasis.\n *\n * @default subtle\n */\n emphasis?: SubtleOrIntense;\n\n /**\n * Makes the Alert span the entire container width, instead of the default max width of `584px`.\n * This also makes the alert borderless, useful for creating full bleed layouts.\n *\n * @default false\n */\n isFullWidth?: boolean;\n\n /**\n * Sets the color tone\n */\n color?: FeedbackColors;\n\n /**\n * Renders a primary action button and a secondary action link button\n */\n actions?: {\n /**\n * Renders a button (should **always** be present if `secondary` action is being used)\n */\n primary?: PrimaryAction;\n /**\n * Renders a Link button\n */\n secondary?: SecondaryAction;\n };\n} & TestID &\n StyledPropsBlade &\n DataAnalyticsAttribute;\n\nconst isReactNative = getPlatformType() === 'react-native';\n\n// Need extra wrappers on React Native only for alignment\nconst CloseButtonWrapper = isReactNative ? BaseBox : Fragment;\n\nconst intentIconMap = {\n positive: CheckCircleIcon,\n negative: AlertOctagonIcon,\n information: InfoIcon,\n neutral: InfoIcon,\n notice: AlertTriangleIcon,\n};\n\nconst Alert = ({\n description,\n title,\n isDismissible = true,\n onDismiss,\n emphasis = 'subtle',\n isFullWidth = false,\n color = 'neutral',\n actions,\n testID,\n icon,\n ...rest\n}: AlertProps): ReactElement | null => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const [isVisible, setIsVisible] = useState(true);\n\n const isDesktop = matchedDeviceType === 'desktop';\n const isMobile = !isDesktop;\n\n const Icon = icon ?? intentIconMap[color];\n let iconOffset: DotNotationSpacingStringToken = 'spacing.1';\n\n // certain special cases below needs special care for near perfect alignment\n if (isReactNative) {\n if (isFullWidth && !title) {\n iconOffset = 'spacing.1';\n } else if (!isFullWidth && !title) {\n iconOffset = 'spacing.0';\n } else if (!isFullWidth && title) {\n iconOffset = 'spacing.2';\n }\n } else if (isMobile) {\n if (!isFullWidth && title) {\n iconOffset = 'spacing.2';\n } else if (isFullWidth && !title) {\n iconOffset = 'spacing.2';\n }\n } else if (isFullWidth) {\n iconOffset = 'spacing.1';\n }\n\n const shouldCenterAlign = isFullWidth && !title;\n let alignment: 'center' | 'flex-start' = 'flex-start';\n if (!isFullWidth) alignment = 'flex-start';\n if (shouldCenterAlign) alignment = 'center';\n\n const leadingIcon = (\n <BaseBox display=\"flex\" alignSelf={alignment} marginTop={iconOffset}>\n <Icon\n color={\n emphasis === 'intense'\n ? 'surface.icon.staticWhite.normal'\n : `feedback.icon.${color}.${emphasis === 'subtle' ? 'intense' : 'subtle'}`\n }\n size=\"medium\"\n />\n </BaseBox>\n );\n\n const textColor =\n emphasis === 'intense' ? 'surface.text.staticWhite.normal' : 'surface.text.gray.subtle';\n const _title = title ? (\n <BaseBox marginBottom=\"spacing.2\">\n <Text color={textColor} size=\"medium\" weight=\"semibold\">\n {title}\n </Text>\n </BaseBox>\n ) : null;\n\n const _description = (\n <BaseBox marginTop={title || isReactNative ? 'spacing.0' : 'spacing.1'}>\n <Text color={textColor} size=\"small\">\n {description}\n </Text>\n </BaseBox>\n );\n\n const primaryAction = actions?.primary ? (\n <BaseBox\n marginRight=\"spacing.5\"\n display={isReactNative ? castNativeType('flex') : castWebType('inline-flex')}\n >\n <BaseButton\n size=\"small\"\n onClick={actions.primary.onClick}\n color={emphasis === 'intense' ? 'white' : color}\n variant=\"secondary\"\n >\n {actions.primary.text}\n </BaseButton>\n </BaseBox>\n ) : null;\n\n const secondaryActionParams: Partial<SecondaryActionLinkButton> | null = actions?.secondary\n ? {\n onClick: actions.secondary.onClick,\n }\n : null;\n\n /**\n * TS assumes only common properties to be present for `SecondaryAction` union type\n * We add a type guard that checks if href is present on secondary action:\n * - If yes, then TS can assume it to be `SecondaryActionLinkButton` (href being a required property)\n * - If no, then it would be `SecondaryActionButton` (and link properties wouldn't be needed)\n */\n if (actions?.secondary && secondaryActionParams && 'href' in actions.secondary) {\n secondaryActionParams.href = actions.secondary.href;\n secondaryActionParams.target = actions.secondary.target;\n secondaryActionParams.rel = actions.secondary.rel;\n }\n\n const secondaryAction = actions?.secondary ? (\n <BaseBox marginRight=\"spacing.4\" display={(isReactNative ? 'flex' : 'inline-flex') as never}>\n <BaseLink\n size=\"small\"\n color={emphasis === 'intense' ? 'white' : color}\n {...secondaryActionParams}\n >\n {actions.secondary.text}\n </BaseLink>\n </BaseBox>\n ) : null;\n\n // For certain cases we wish to render actions inline with text content\n const showActionsHorizontal = isFullWidth && isDesktop;\n\n const actionsHorizontal =\n showActionsHorizontal && (primaryAction || secondaryAction) ? (\n <BaseBox flexDirection=\"row\" alignItems=\"center\">\n {primaryAction}\n {secondaryAction}\n </BaseBox>\n ) : null;\n\n const actionsVertical =\n !showActionsHorizontal && (primaryAction || secondaryAction) ? (\n <BaseBox marginTop=\"spacing.4\" flexDirection=\"row\" alignItems=\"center\">\n {primaryAction}\n {secondaryAction}\n </BaseBox>\n ) : null;\n\n const onClickDismiss = (): void => {\n if (onDismiss) {\n onDismiss();\n }\n setIsVisible(false);\n };\n const closeButton = isDismissible ? (\n <CloseButtonWrapper>\n <IconButton\n accessibilityLabel=\"Dismiss alert\"\n onClick={onClickDismiss}\n emphasis={emphasis === 'intense' ? 'subtle' : 'intense'}\n size=\"large\"\n icon={CloseIcon}\n />\n </CloseButtonWrapper>\n ) : null;\n\n const a11yProps = makeAccessible({\n // React Native doesn't has status as role\n role: isReactNative || color === 'negative' || color === 'notice' ? 'alert' : 'status',\n // override the implicit live region of role `alert`\n ...(color === 'notice' && { liveRegion: 'polite' }),\n });\n\n if (!isVisible) {\n return null;\n }\n\n return (\n <BaseBox\n {...a11yProps}\n {...metaAttribute({ name: MetaConstants.Alert, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <StyledAlert\n color={color}\n emphasis={emphasis}\n isFullWidth={isFullWidth}\n isDesktop={isDesktop}\n textAlign={'left' as never}\n >\n {leadingIcon}\n <BaseBox\n flex={1}\n paddingLeft={isFullWidth ? 'spacing.4' : 'spacing.3'}\n paddingRight={showActionsHorizontal ? 'spacing.4' : 'spacing.2'}\n >\n {_title}\n {_description}\n {actionsVertical}\n </BaseBox>\n {actionsHorizontal}\n {closeButton}\n </StyledAlert>\n </BaseBox>\n );\n};\n\nexport type { AlertProps };\nexport { Alert };\n"],"names":["isReactNative","getPlatformType","CloseButtonWrapper","BaseBox","Fragment","intentIconMap","positive","CheckCircleIcon","negative","AlertOctagonIcon","information","InfoIcon","neutral","notice","AlertTriangleIcon","Alert","_ref","description","title","_ref$isDismissible","isDismissible","onDismiss","_ref$emphasis","emphasis","_ref$isFullWidth","isFullWidth","_ref$color","color","actions","testID","icon","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","_useState","useState","_useState2","_slicedToArray","isVisible","setIsVisible","isDesktop","isMobile","Icon","iconOffset","shouldCenterAlign","alignment","leadingIcon","_jsx","display","alignSelf","marginTop","children","concat","size","textColor","_title","marginBottom","Text","weight","_description","primaryAction","primary","marginRight","castNativeType","castWebType","BaseButton","onClick","variant","text","secondaryActionParams","secondary","href","target","rel","secondaryAction","BaseLink","_objectSpread","showActionsHorizontal","actionsHorizontal","_jsxs","flexDirection","alignItems","actionsVertical","onClickDismiss","closeButton","IconButton","accessibilityLabel","CloseIcon","a11yProps","makeAccessible","role","liveRegion","metaAttribute","name","MetaConstants","getStyledProps","makeAnalyticsAttribute","StyledAlert","textAlign","flex","paddingLeft","paddingRight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmHA,IAAMA,aAAa,GAAGC,eAAe,EAAE,KAAK,cAAc,CAAA;;AAE1D;AACA,IAAMC,kBAAkB,GAAGF,aAAa,GAAGG,OAAO,GAAGC,QAAQ,CAAA;AAE7D,IAAMC,aAAa,GAAG;AACpBC,EAAAA,QAAQ,EAAEC,eAAe;AACzBC,EAAAA,QAAQ,EAAEC,gBAAgB;AAC1BC,EAAAA,WAAW,EAAEC,QAAQ;AACrBC,EAAAA,OAAO,EAAED,QAAQ;AACjBE,EAAAA,MAAM,EAAEC,iBAAAA;AACV,CAAC,CAAA;AAED,IAAMC,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EAY4B;AAAA,EAAA,IAXrCC,WAAW,GAAAD,IAAA,CAAXC,WAAW;IACXC,KAAK,GAAAF,IAAA,CAALE,KAAK;IAAAC,kBAAA,GAAAH,IAAA,CACLI,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,kBAAA;IACpBE,SAAS,GAAAL,IAAA,CAATK,SAAS;IAAAC,aAAA,GAAAN,IAAA,CACTO,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,QAAQ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,WAAW,GAAG,WAAY;AAAA1B,QAAAA,QAAA,EAE/DI,CAAAA,MAAM,EACNI,YAAY,EACZuB,eAAe,CAAA;AAAA,OACT,CAAC,EACTJ,iBAAiB,EACjBM,WAAW,CAAA;KACD,CAAA;AAAC,GAAA,CACP,CAAC,CAAA;AAEd;;;;"}
@@ -13,6 +13,7 @@ import { objectKeysWithType } from '../../utils/objectKeysWithType.js';
13
13
  import '../Typography/BaseText/index.js';
14
14
  import '../Typography/index.js';
15
15
  import '../../tokens/global/index.js';
16
+ import '../../utils/makeAnalyticsAttribute/index.js';
16
17
  import { jsxs, jsx } from 'react/jsx-runtime';
17
18
  import { getPlatformType } from '../../utils/getPlatformType/getPlatformType.js';
18
19
  import { Text } from '../Typography/Text/Text.js';
@@ -23,16 +24,12 @@ import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
23
24
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
24
25
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
25
26
  import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
27
+ import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
26
28
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
27
29
 
28
30
  var _excluded = ["value", "suffix", "type", "size", "weight", "isAffixSubtle", "isStrikethrough", "color", "currencyIndicator", "currency", "testID"];
29
31
  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; }
30
32
  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; }
31
- /**
32
- * Pollyfill function to get around the node 18 error
33
- *
34
- * This function is maintained by i18nify team. Reach out to them for any change regarding this.
35
- */
36
33
  var stripTrailingZerosFromParts = function stripTrailingZerosFromParts(parts) {
37
34
  var decimalPart = parts.rawParts.filter(function (_ref) {
38
35
  var type = _ref.type;
@@ -205,7 +202,7 @@ var _Amount = function _Amount(_ref8) {
205
202
  _ref8$currency = _ref8.currency,
206
203
  currency = _ref8$currency === void 0 ? 'INR' : _ref8$currency,
207
204
  testID = _ref8.testID,
208
- styledProps = _objectWithoutProperties(_ref8, _excluded);
205
+ rest = _objectWithoutProperties(_ref8, _excluded);
209
206
  if (false) {
210
207
  if (typeof value !== 'number') {
211
208
  throwBladeError({
@@ -257,13 +254,13 @@ var _Amount = function _Amount(_ref8) {
257
254
  var currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;
258
255
  var currencyFontSize = isAffixSubtle ? subtleFontSizes[type][size] : normalAmountSizes[type][size];
259
256
  var isReactNative = getPlatformType() === 'react-native';
260
- return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({
257
+ return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
261
258
  display: isReactNative ? 'flex' : 'inline-flex',
262
259
  flexDirection: "row"
263
260
  }, metaAttribute({
264
261
  name: MetaConstants.Amount,
265
262
  testID: testID
266
- })), getStyledProps(styledProps)), {}, {
263
+ })), getStyledProps(rest)), makeAnalyticsAttribute(rest)), {}, {
267
264
  children: /*#__PURE__*/jsxs(BaseBox, {
268
265
  display: isReactNative ? 'flex' : 'inline-flex',
269
266
  alignItems: "baseline",
@@ -1 +1 @@
1
- {"version":3,"file":"Amount.js","sources":["../../../../../../src/components/Amount/Amount.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React from 'react';\nimport type { CurrencyCodeType } from '@razorpay/i18nify-js/currency';\nimport { formatNumberByParts } from '@razorpay/i18nify-js/currency';\nimport type { AmountTypeProps } from './amountTokens';\nimport { normalAmountSizes, subtleFontSizes, amountLineHeights } from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport { objectKeysWithType } from '~utils/objectKeysWithType';\nimport { BaseText } from '~components/Typography/BaseText';\nimport { Text } from '~components/Typography';\nimport { opacity } from '~tokens/global';\nimport type { FontFamily } from '~tokens/global';\n\n/**\n * Pollyfill function to get around the node 18 error\n *\n * This function is maintained by i18nify team. Reach out to them for any change regarding this.\n */\nconst stripTrailingZerosFromParts = (\n parts: ReturnType<typeof formatNumberByParts>,\n): ReturnType<typeof formatNumberByParts> => {\n const decimalPart = parts.rawParts\n .filter(({ type }) => type === 'fraction')\n .map(({ value }) => value)\n .join('');\n\n const hasFraction = parts.rawParts.some(({ type }) => type === 'fraction');\n\n if (hasFraction && /^0+$/.test(decimalPart)) {\n delete parts.decimal;\n delete parts.fraction;\n parts.rawParts = parts.rawParts.filter(({ type }) => type !== 'decimal' && type !== 'fraction');\n }\n\n return parts;\n};\n\n/**\n * Wrapper that uses pollyfill of i18nify team\n */\nconst pollyfilledFormatNumberByParts: typeof formatNumberByParts = (value, options) => {\n const parts = formatNumberByParts(value, options);\n\n if (options?.intlOptions?.trailingZeroDisplay === 'stripIfInteger') {\n return stripTrailingZerosFromParts(parts);\n }\n\n return parts;\n};\n\ntype AmountCommonProps = {\n /**\n * The value to be rendered within the component.\n *\n */\n value: number;\n /**\n * Sets the color of the amount.\n *\n * @default undefined\n */\n color?: BaseTextProps['color'];\n /**\n * Indicates what the suffix of amount should be\n *\n * @default 'decimals'\n */\n suffix?: 'decimals' | 'none' | 'humanize';\n /**\n * Makes the currency indicator(currency symbol/code) and decimal digits small and faded\n *\n * @default true\n */\n isAffixSubtle?: true | false;\n /**\n * Determines the visual representation of the currency, choose between displaying the currency symbol or code.\n *\n * Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.\n *\n * @default 'currency-symbol'\n */\n currencyIndicator?: 'currency-symbol' | 'currency-code';\n /**\n * The currency of the amount. Note that this component\n * only displays the provided value in the specified currency, it does not perform any currency conversion.\n *\n * @default 'INR'\n * */\n currency?: CurrencyCodeType;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n} & TestID &\n StyledPropsBlade;\n\ntype ColorProps = {\n amountValueColor: BaseTextProps['color'];\n};\n\ntype AmountProps = AmountTypeProps & AmountCommonProps;\n\nconst getTextColorProps = ({ color }: { color: AmountProps['color'] }): ColorProps => {\n const props: ColorProps = {\n amountValueColor: 'surface.text.gray.normal',\n };\n if (!color) return props;\n props.amountValueColor = color;\n return props;\n};\n\ntype AmountType = Partial<ReturnType<typeof formatNumberByParts>>;\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n amount: AmountType;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n amount,\n size = 'medium',\n type = 'body',\n weight = 'regular',\n amountValueColor,\n isAffixSubtle,\n suffix,\n}: AmountValue): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n const affixFontSize = isAffixSubtle ? subtleFontSizes[type][size] : normalAmountSizes[type][size];\n const numberFontFamily: keyof FontFamily = type === 'body' ? 'text' : 'heading';\n if (suffix === 'decimals' && isAffixSubtle) {\n // Native does not support alignItems of Text inside a div, instead we need to wrap is in a Text\n const AmountWrapper = isReactNative ? Text : React.Fragment;\n\n return (\n <AmountWrapper>\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n fontFamily={numberFontFamily}\n as={isReactNative ? undefined : 'span'}\n >\n {amount.integer}\n </BaseText>\n <BaseText\n fontWeight={weight}\n fontSize={affixFontSize}\n fontFamily={numberFontFamily}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n >\n {amount.decimal}\n {amount.fraction}\n </BaseText>\n </AmountWrapper>\n );\n }\n\n return (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n fontFamily={numberFontFamily}\n color={amountValueColor}\n lineHeight={amountLineHeights[type][size]}\n >\n {amount.integer}\n {amount.decimal}\n {amount.fraction}\n {amount.compact}\n </BaseText>\n );\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n currency: AmountProps['currency'];\n};\n\n/**\n * Returns a parsed object based on the suffix passed in parameters\n * === Logic ===\n * value = 12500.45 \n * if suffix === 'decimals' => {\n \"integer\": \"12,500\",\n \"decimal\": \".\",\n \"fraction\": \"45\",\n \"compact\": \"K\",\n \"isPrefixSymbol\": false,\n \"rawParts\": [{\"type\": \"integer\",\"value\": \"12\"},{\"type\": \"group\",\"value\": \",\"},{\"type\": \"integer\",\"value\": \"500\"},{\"type\": \"decimal\",\"value\": \".\"},{\"type\": \"fraction\",\"value\": \"45\"}]\n}\n * @returns {AmountType}\n */\nexport const getAmountByParts = ({\n suffix,\n value,\n currency,\n}: FormatAmountWithSuffixType): AmountType => {\n try {\n switch (suffix) {\n case 'decimals': {\n const options = {\n intlOptions: {\n maximumFractionDigits: 2,\n minimumFractionDigits: 2,\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n case 'humanize': {\n const options = {\n intlOptions: {\n notation: 'compact',\n maximumFractionDigits: 2,\n trailingZeroDisplay: 'stripIfInteger',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n\n default: {\n const options = {\n intlOptions: {\n maximumFractionDigits: 0,\n roundingMode: 'floor',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n }\n } catch (err: unknown) {\n return {\n integer: `${value}`,\n currency,\n };\n }\n};\n\nconst _Amount = ({\n value,\n suffix = 'decimals',\n type = 'body',\n size = 'medium',\n weight = 'regular',\n isAffixSubtle = true,\n isStrikethrough = false,\n color,\n currencyIndicator = 'currency-symbol',\n currency = 'INR',\n testID,\n ...styledProps\n}: AmountProps): ReactElement => {\n if (__DEV__) {\n if (typeof value !== 'number') {\n throwBladeError({\n message: '`value` prop must be of type `number` for Amount.',\n moduleName: 'Amount',\n });\n }\n // @ts-expect-error neutral color should throw error\n if (color === 'neutral') {\n throwBladeError({\n message: '`neutral` color is not supported.',\n moduleName: 'Amount',\n });\n }\n\n const bodySizes = objectKeysWithType(normalAmountSizes.body);\n if ((type === 'body' || !type) && !bodySizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"body\"`,\n moduleName: 'Amount',\n });\n }\n\n const displaySizes = objectKeysWithType(normalAmountSizes.display);\n if (type === 'display' && !displaySizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"display\"`,\n moduleName: 'Amount',\n });\n }\n\n const headingSizes = objectKeysWithType(normalAmountSizes.heading);\n if (type === 'heading' && !headingSizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"heading\"`,\n moduleName: 'Amount',\n });\n }\n }\n\n const { amountValueColor } = getTextColorProps({\n color,\n });\n\n const renderedValue = getAmountByParts({ suffix, value, currency });\n const isPrefixSymbol = renderedValue.isPrefixSymbol ?? true;\n const currencySymbol = renderedValue.currency ?? currency;\n\n const currencyPosition = isPrefixSymbol ? 'left' : 'right';\n const currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;\n\n const currencyFontSize = isAffixSubtle\n ? subtleFontSizes[type][size]\n : normalAmountSizes[type][size];\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {renderedValue.minusSign ? (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n marginX=\"spacing.2\"\n >\n {renderedValue.minusSign}\n </BaseText>\n ) : null}\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n amount={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n currency={currency}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: the borderBottomColor error below is thrown here as well\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore- intentionally setting the border color to the color prop for this hacky strikethrough\n borderBottomColor={amountValueColor}\n borderBottomWidth={type === 'body' ? 'thin' : 'thicker'}\n borderBottomStyle=\"solid\"\n position=\"absolute\"\n width=\"100%\"\n top=\"50%\"\n />\n )}\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst Amount = assignWithoutSideEffects(_Amount, {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["stripTrailingZerosFromParts","parts","decimalPart","rawParts","filter","_ref","type","map","_ref2","value","join","hasFraction","some","_ref3","test","decimal","fraction","_ref4","pollyfilledFormatNumberByParts","options","_options$intlOptions","formatNumberByParts","intlOptions","trailingZeroDisplay","getTextColorProps","_ref5","color","props","amountValueColor","AmountValue","_ref6","amount","_ref6$size","size","_ref6$type","_ref6$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","integer","opacity","compact","getAmountByParts","_ref7","currency","maximumFractionDigits","minimumFractionDigits","notation","roundingMode","err","concat","_Amount","_ref8","_renderedValue$isPref","_renderedValue$curren","_ref8$suffix","_ref8$type","_ref8$size","_ref8$weight","_ref8$isAffixSubtle","_ref8$isStrikethrough","isStrikethrough","_ref8$currencyIndicat","currencyIndicator","_ref8$currency","testID","styledProps","_objectWithoutProperties","_excluded","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","_getTextColorProps","renderedValue","isPrefixSymbol","currencySymbol","currencyPosition","currencySymbolOrCode","currencyFontSize","BaseBox","_objectSpread","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","alignItems","position","minusSign","marginX","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;AACA;AACA;AACA,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAC/BC,KAA6C,EACF;EAC3C,IAAMC,WAAW,GAAGD,KAAK,CAACE,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tB,QAAAA,IAAI,EAAEA,IAAK;AACX8B,QAAAA,MAAM,EAAEA,MAAO;AACfH,QAAAA,IAAI,EAAEA,IAAK;AACXI,QAAAA,aAAa,EAAEA,aAAc;AAC7BC,QAAAA,MAAM,EAAEA,MAAO;AACf2B,QAAAA,QAAQ,EAAEA,QAAAA;OACX,CAAC,EACDwC,gBAAgB,KAAK,OAAO,iBAC3BtD,GAAA,CAACC,QAAQ,EAAA;AACPqE,QAAAA,UAAU,EAAC,WAAW;AACtBnE,QAAAA,UAAU,EAAElB,MAAO;AACnBiB,QAAAA,QAAQ,EAAEsD,gBAAiB;AAC3BjF,QAAAA,KAAK,EAAEE,gBAAiB;AACxB8B,QAAAA,EAAE,EAAEnB,aAAa,GAAGoB,SAAS,GAAG,MAAO;QACvCE,OAAO,EAAExB,aAAa,GAAGwB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAE;AAAAX,QAAAA,QAAA,EAEzCwD,oBAAAA;OACO,CACX,EACAxB,eAAe;AAAA;AACd;AACA;AACA/B,MAAAA,GAAA,CAACyD,OAAAA;AACC;AACA;AAAA,QAAA;AACAc,QAAAA,iBAAiB,EAAE9F,gBAAiB;AACpC+F,QAAAA,iBAAiB,EAAErH,IAAI,KAAK,MAAM,GAAG,MAAM,GAAG,SAAU;AACxDsH,QAAAA,iBAAiB,EAAC,OAAO;AACzBP,QAAAA,QAAQ,EAAC,UAAU;AACnBQ,QAAAA,KAAK,EAAC,MAAM;AACZC,QAAAA,GAAG,EAAC,KAAA;AAAK,OACV,CACF,CAAA;KACM,CAAA;AAAC,GAAA,CACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMZ,MAAM,gBAAGa,wBAAwB,CAACvD,OAAO,EAAE;AAC/CwD,EAAAA,WAAW,EAAE,QAAQ;AACrBC,EAAAA,WAAW,EAAE,QAAA;AACf,CAAC;;;;"}
1
+ {"version":3,"file":"Amount.js","sources":["../../../../../../src/components/Amount/Amount.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React from 'react';\nimport type { CurrencyCodeType } from '@razorpay/i18nify-js/currency';\nimport { formatNumberByParts } from '@razorpay/i18nify-js/currency';\nimport type { AmountTypeProps } from './amountTokens';\nimport { normalAmountSizes, subtleFontSizes, amountLineHeights } from './amountTokens';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport { objectKeysWithType } from '~utils/objectKeysWithType';\nimport { BaseText } from '~components/Typography/BaseText';\nimport { Text } from '~components/Typography';\nimport { opacity } from '~tokens/global';\nimport type { FontFamily } from '~tokens/global';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\n/**\n * Pollyfill function to get around the node 18 error\n *\n * This function is maintained by i18nify team. Reach out to them for any change regarding this.\n */\nconst stripTrailingZerosFromParts = (\n parts: ReturnType<typeof formatNumberByParts>,\n): ReturnType<typeof formatNumberByParts> => {\n const decimalPart = parts.rawParts\n .filter(({ type }) => type === 'fraction')\n .map(({ value }) => value)\n .join('');\n\n const hasFraction = parts.rawParts.some(({ type }) => type === 'fraction');\n\n if (hasFraction && /^0+$/.test(decimalPart)) {\n delete parts.decimal;\n delete parts.fraction;\n parts.rawParts = parts.rawParts.filter(({ type }) => type !== 'decimal' && type !== 'fraction');\n }\n\n return parts;\n};\n\n/**\n * Wrapper that uses pollyfill of i18nify team\n */\nconst pollyfilledFormatNumberByParts: typeof formatNumberByParts = (value, options) => {\n const parts = formatNumberByParts(value, options);\n\n if (options?.intlOptions?.trailingZeroDisplay === 'stripIfInteger') {\n return stripTrailingZerosFromParts(parts);\n }\n\n return parts;\n};\n\ntype AmountCommonProps = {\n /**\n * The value to be rendered within the component.\n *\n */\n value: number;\n /**\n * Sets the color of the amount.\n *\n * @default undefined\n */\n color?: BaseTextProps['color'];\n /**\n * Indicates what the suffix of amount should be\n *\n * @default 'decimals'\n */\n suffix?: 'decimals' | 'none' | 'humanize';\n /**\n * Makes the currency indicator(currency symbol/code) and decimal digits small and faded\n *\n * @default true\n */\n isAffixSubtle?: true | false;\n /**\n * Determines the visual representation of the currency, choose between displaying the currency symbol or code.\n *\n * Note: Currency symbol and code is determined by the locale set in user's browser or set via @razorpay/i18nify-react library.\n *\n * @default 'currency-symbol'\n */\n currencyIndicator?: 'currency-symbol' | 'currency-code';\n /**\n * The currency of the amount. Note that this component\n * only displays the provided value in the specified currency, it does not perform any currency conversion.\n *\n * @default 'INR'\n * */\n currency?: CurrencyCodeType;\n /**\n * If true, the amount text will have a line through it.\n *\n * @default false\n */\n isStrikethrough?: boolean;\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\ntype ColorProps = {\n amountValueColor: BaseTextProps['color'];\n};\n\ntype AmountProps = AmountTypeProps & AmountCommonProps;\n\nconst getTextColorProps = ({ color }: { color: AmountProps['color'] }): ColorProps => {\n const props: ColorProps = {\n amountValueColor: 'surface.text.gray.normal',\n };\n if (!color) return props;\n props.amountValueColor = color;\n return props;\n};\n\ntype AmountType = Partial<ReturnType<typeof formatNumberByParts>>;\n\ninterface AmountValue extends Omit<AmountProps, 'value'> {\n amountValueColor: BaseTextProps['color'];\n amount: AmountType;\n size: Exclude<AmountProps['size'], undefined>;\n}\n\nconst AmountValue = ({\n amount,\n size = 'medium',\n type = 'body',\n weight = 'regular',\n amountValueColor,\n isAffixSubtle,\n suffix,\n}: AmountValue): ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n const affixFontSize = isAffixSubtle ? subtleFontSizes[type][size] : normalAmountSizes[type][size];\n const numberFontFamily: keyof FontFamily = type === 'body' ? 'text' : 'heading';\n if (suffix === 'decimals' && isAffixSubtle) {\n // Native does not support alignItems of Text inside a div, instead we need to wrap is in a Text\n const AmountWrapper = isReactNative ? Text : React.Fragment;\n\n return (\n <AmountWrapper>\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n fontFamily={numberFontFamily}\n as={isReactNative ? undefined : 'span'}\n >\n {amount.integer}\n </BaseText>\n <BaseText\n fontWeight={weight}\n fontSize={affixFontSize}\n fontFamily={numberFontFamily}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n >\n {amount.decimal}\n {amount.fraction}\n </BaseText>\n </AmountWrapper>\n );\n }\n\n return (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n fontFamily={numberFontFamily}\n color={amountValueColor}\n lineHeight={amountLineHeights[type][size]}\n >\n {amount.integer}\n {amount.decimal}\n {amount.fraction}\n {amount.compact}\n </BaseText>\n );\n};\n\ntype FormatAmountWithSuffixType = {\n suffix: AmountProps['suffix'];\n value: number;\n currency: AmountProps['currency'];\n};\n\n/**\n * Returns a parsed object based on the suffix passed in parameters\n * === Logic ===\n * value = 12500.45 \n * if suffix === 'decimals' => {\n \"integer\": \"12,500\",\n \"decimal\": \".\",\n \"fraction\": \"45\",\n \"compact\": \"K\",\n \"isPrefixSymbol\": false,\n \"rawParts\": [{\"type\": \"integer\",\"value\": \"12\"},{\"type\": \"group\",\"value\": \",\"},{\"type\": \"integer\",\"value\": \"500\"},{\"type\": \"decimal\",\"value\": \".\"},{\"type\": \"fraction\",\"value\": \"45\"}]\n}\n * @returns {AmountType}\n */\nexport const getAmountByParts = ({\n suffix,\n value,\n currency,\n}: FormatAmountWithSuffixType): AmountType => {\n try {\n switch (suffix) {\n case 'decimals': {\n const options = {\n intlOptions: {\n maximumFractionDigits: 2,\n minimumFractionDigits: 2,\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n case 'humanize': {\n const options = {\n intlOptions: {\n notation: 'compact',\n maximumFractionDigits: 2,\n trailingZeroDisplay: 'stripIfInteger',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n\n default: {\n const options = {\n intlOptions: {\n maximumFractionDigits: 0,\n roundingMode: 'floor',\n },\n currency,\n } as const;\n return pollyfilledFormatNumberByParts(value, options);\n }\n }\n } catch (err: unknown) {\n return {\n integer: `${value}`,\n currency,\n };\n }\n};\n\nconst _Amount = ({\n value,\n suffix = 'decimals',\n type = 'body',\n size = 'medium',\n weight = 'regular',\n isAffixSubtle = true,\n isStrikethrough = false,\n color,\n currencyIndicator = 'currency-symbol',\n currency = 'INR',\n testID,\n ...rest\n}: AmountProps): ReactElement => {\n if (__DEV__) {\n if (typeof value !== 'number') {\n throwBladeError({\n message: '`value` prop must be of type `number` for Amount.',\n moduleName: 'Amount',\n });\n }\n // @ts-expect-error neutral color should throw error\n if (color === 'neutral') {\n throwBladeError({\n message: '`neutral` color is not supported.',\n moduleName: 'Amount',\n });\n }\n\n const bodySizes = objectKeysWithType(normalAmountSizes.body);\n if ((type === 'body' || !type) && !bodySizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"body\"`,\n moduleName: 'Amount',\n });\n }\n\n const displaySizes = objectKeysWithType(normalAmountSizes.display);\n if (type === 'display' && !displaySizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"display\"`,\n moduleName: 'Amount',\n });\n }\n\n const headingSizes = objectKeysWithType(normalAmountSizes.heading);\n if (type === 'heading' && !headingSizes.includes(size)) {\n throwBladeError({\n message: `size=\"${size}\" is not allowed with type=\"heading\"`,\n moduleName: 'Amount',\n });\n }\n }\n\n const { amountValueColor } = getTextColorProps({\n color,\n });\n\n const renderedValue = getAmountByParts({ suffix, value, currency });\n const isPrefixSymbol = renderedValue.isPrefixSymbol ?? true;\n const currencySymbol = renderedValue.currency ?? currency;\n\n const currencyPosition = isPrefixSymbol ? 'left' : 'right';\n const currencySymbolOrCode = currencyIndicator === 'currency-symbol' ? currencySymbol : currency;\n\n const currencyFontSize = isAffixSubtle\n ? subtleFontSizes[type][size]\n : normalAmountSizes[type][size];\n const isReactNative = getPlatformType() === 'react-native';\n\n return (\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n flexDirection=\"row\"\n {...metaAttribute({ name: MetaConstants.Amount, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n display={(isReactNative ? 'flex' : 'inline-flex') as never}\n alignItems=\"baseline\"\n flexDirection=\"row\"\n position=\"relative\"\n >\n {renderedValue.minusSign ? (\n <BaseText\n fontSize={normalAmountSizes[type][size]}\n fontWeight={weight}\n lineHeight={amountLineHeights[type][size]}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n marginX=\"spacing.2\"\n >\n {renderedValue.minusSign}\n </BaseText>\n ) : null}\n {currencyPosition === 'left' && (\n <BaseText\n marginRight=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n <AmountValue\n amount={renderedValue}\n amountValueColor={amountValueColor}\n type={type}\n weight={weight}\n size={size}\n isAffixSubtle={isAffixSubtle}\n suffix={suffix}\n currency={currency}\n />\n {currencyPosition === 'right' && (\n <BaseText\n marginLeft=\"spacing.1\"\n fontWeight={weight}\n fontSize={currencyFontSize}\n color={amountValueColor}\n as={isReactNative ? undefined : 'span'}\n opacity={isAffixSubtle ? opacity[800] : 1}\n >\n {currencySymbolOrCode}\n </BaseText>\n )}\n {isStrikethrough && (\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: the borderBottomColor error below is thrown here as well\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore- intentionally setting the border color to the color prop for this hacky strikethrough\n borderBottomColor={amountValueColor}\n borderBottomWidth={type === 'body' ? 'thin' : 'thicker'}\n borderBottomStyle=\"solid\"\n position=\"absolute\"\n width=\"100%\"\n top=\"50%\"\n />\n )}\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst Amount = assignWithoutSideEffects(_Amount, {\n displayName: 'Amount',\n componentId: 'Amount',\n});\n\nexport type { AmountProps };\nexport { Amount };\n"],"names":["stripTrailingZerosFromParts","parts","decimalPart","rawParts","filter","_ref","type","map","_ref2","value","join","hasFraction","some","_ref3","test","decimal","fraction","_ref4","pollyfilledFormatNumberByParts","options","_options$intlOptions","formatNumberByParts","intlOptions","trailingZeroDisplay","getTextColorProps","_ref5","color","props","amountValueColor","AmountValue","_ref6","amount","_ref6$size","size","_ref6$type","_ref6$weight","weight","isAffixSubtle","suffix","isReactNative","getPlatformType","affixFontSize","subtleFontSizes","normalAmountSizes","numberFontFamily","AmountWrapper","Text","React","Fragment","_jsxs","children","_jsx","BaseText","fontSize","fontWeight","lineHeight","amountLineHeights","fontFamily","as","undefined","integer","opacity","compact","getAmountByParts","_ref7","currency","maximumFractionDigits","minimumFractionDigits","notation","roundingMode","err","concat","_Amount","_ref8","_renderedValue$isPref","_renderedValue$curren","_ref8$suffix","_ref8$type","_ref8$size","_ref8$weight","_ref8$isAffixSubtle","_ref8$isStrikethrough","isStrikethrough","_ref8$currencyIndicat","currencyIndicator","_ref8$currency","testID","rest","_objectWithoutProperties","_excluded","throwBladeError","message","moduleName","bodySizes","objectKeysWithType","body","includes","displaySizes","display","headingSizes","heading","_getTextColorProps","renderedValue","isPrefixSymbol","currencySymbol","currencyPosition","currencySymbolOrCode","currencyFontSize","BaseBox","_objectSpread","flexDirection","metaAttribute","name","MetaConstants","Amount","getStyledProps","makeAnalyticsAttribute","alignItems","position","minusSign","marginX","marginRight","marginLeft","borderBottomColor","borderBottomWidth","borderBottomStyle","width","top","assignWithoutSideEffects","displayName","componentId"],"mappings":";;;;;;;;;;;;;;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,CAACxD,OAAO,EAAE;AAC/CyD,EAAAA,WAAW,EAAE,QAAQ;AACrBC,EAAAA,WAAW,EAAE,QAAA;AACf,CAAC;;;;"}
@@ -12,6 +12,7 @@ import '../../utils/logger/index.js';
12
12
  import '../Icons/index.js';
13
13
  import '../Box/BaseBox/index.js';
14
14
  import '../../utils/isValidAllowedChildren/index.js';
15
+ import '../../utils/makeAnalyticsAttribute/index.js';
15
16
  import { jsx, jsxs } from 'react/jsx-runtime';
16
17
  import { throwBladeError } from '../../utils/logger/logger.js';
17
18
  import { getComponentId } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
@@ -19,6 +20,7 @@ import UserIcon from '../Icons/UserIcon/UserIcon.js';
19
20
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
20
21
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
21
22
  import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
23
+ import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
22
24
  import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
23
25
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
24
26
 
@@ -65,7 +67,7 @@ var _Avatar = function _Avatar(_ref, ref) {
65
67
  onPointerEnter = _ref.onPointerEnter,
66
68
  onTouchStart = _ref.onTouchStart,
67
69
  onTouchEnd = _ref.onTouchEnd,
68
- styledProps = _objectWithoutProperties(_ref, _excluded);
70
+ rest = _objectWithoutProperties(_ref, _excluded);
69
71
  if (false) {
70
72
  if (src && !alt && !name) {
71
73
  throwBladeError({
@@ -127,10 +129,10 @@ var _Avatar = function _Avatar(_ref, ref) {
127
129
  }));
128
130
  };
129
131
  var isSquare = variant === 'square';
130
- return /*#__PURE__*/jsx(StyledAvatar, _objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
132
+ return /*#__PURE__*/jsx(StyledAvatar, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
131
133
  name: MetaConstants.Avatar,
132
134
  testID: testID
133
- })), getStyledProps(styledProps)), {}, {
135
+ })), getStyledProps(rest)), makeAnalyticsAttribute(rest)), {}, {
134
136
  backgroundColor: "surface.background.gray.intense",
135
137
  variant: variant,
136
138
  size: avatarSize,