@razorpay/blade 11.37.0 → 11.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.js","sources":["../../../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React from 'react';\nimport { DropdownContext } from './useDropdown';\nimport type { DropdownContextType } from './useDropdown';\nimport type { DropdownProps } from './types';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { useId } from '~utils/useId';\nimport { ComponentIds as bottomSheetComponentIds } from '~components/BottomSheet/componentIds';\nimport { BottomSheetAndDropdownGlueContext } from '~components/BottomSheet/BottomSheetContext';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport BaseBox from '~components/Box/BaseBox';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { throwBladeError } from '~utils/logger';\nimport type { ContainerElementType } from '~utils/types';\nimport { useControllableState } from '~utils/useControllable';\n\nconst validDropdownChildren = [\n // TODO: Remove Box once CountrySelector's button sizing is fixed\n dropdownComponentIds.BaseBox,\n dropdownComponentIds.triggers.SelectInput,\n dropdownComponentIds.triggers.SearchInput,\n dropdownComponentIds.triggers.DropdownButton,\n dropdownComponentIds.triggers.DropdownLink,\n dropdownComponentIds.DropdownOverlay,\n dropdownComponentIds.triggers.AutoComplete,\n bottomSheetComponentIds.BottomSheet,\n];\n\n/**\n * ### Dropdown component\n *\n * Dropdown component is generic component that controls the dropdown functionality.\n * It can be used with multiple triggers and mostly contains ActionList component inside it\n *\n * ---\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown selectionType=\"single\">\n * <SelectInput />\n * <DropdownOverlay>\n * <ActionList>\n * <ActionListItem />\n * <ActionListItem />\n * </ActionList>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select Dropdown Documentation}\n */\nconst _Dropdown = ({\n children,\n isOpen: isOpenControlled,\n onOpenChange,\n selectionType = 'single',\n testID,\n _width,\n ...styledProps\n}: DropdownProps): React.ReactElement => {\n const [options, setOptions] = React.useState<DropdownContextType['options']>([]);\n const [filteredValues, setFilteredValues] = React.useState<string[]>([]);\n const [selectedIndices, setSelectedIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [controlledValueIndices, setControlledValueIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [activeIndex, setActiveIndex] = React.useState(-1);\n const [activeTagIndex, setActiveTagIndex] = React.useState(-1);\n const [shouldIgnoreBlurAnimation, setShouldIgnoreBlurAnimation] = React.useState(false);\n const [hasFooterAction, setHasFooterAction] = React.useState(false);\n const [\n hasAutoCompleteInBottomSheetHeader,\n setHasAutoCompleteInBottomSheetHeader,\n ] = React.useState(false);\n const [isKeydownPressed, setIsKeydownPressed] = React.useState(false);\n const [changeCallbackTriggerer, setChangeCallbackTriggerer] = React.useState<\n DropdownContextType['changeCallbackTriggerer']\n >(0);\n const [isControlled, setIsControlled] = React.useState(false);\n // keep track if dropdown contains bottomsheet\n const [dropdownHasBottomSheet, setDropdownHasBottomSheet] = React.useState(false);\n\n /**\n * In inputs, actual input is smaller than the visible input wrapper.\n * You can set this reference in such cases so floating ui calculations happen correctly\n * */\n const triggererWrapperRef = React.useRef<ContainerElementType>(null);\n const triggererRef = React.useRef<HTMLButtonElement>(null);\n const actionListItemRef = React.useRef<HTMLDivElement>(null);\n const dropdownTriggerer = React.useRef<DropdownContextType['dropdownTriggerer']>();\n const isTagDismissedRef = React.useRef<{ value: boolean } | null>({ value: false });\n const visibleTagsCountRef = React.useRef<{ value: number }>({ value: 0 });\n const dropdownContainerRef = React.useRef<HTMLDivElement>(null);\n\n const dropdownBaseId = useId('dropdown');\n const isDropdownOpenRef = React.useRef(isOpenControlled);\n\n const [isDropdownOpen, setIsDropdownOpen] = useControllableState({\n value: isOpenControlled,\n defaultValue: false,\n onChange: (isOpenControlledValue) => {\n isDropdownOpenRef.current = isOpenControlledValue;\n onOpenChange?.(isOpenControlledValue);\n },\n });\n\n isDropdownOpenRef.current = isDropdownOpen;\n\n const setIsOpen = (isOpenValue: boolean): void => {\n isDropdownOpenRef.current = isOpenValue;\n setIsDropdownOpen(() => isOpenValue);\n };\n\n const close = React.useCallback(() => {\n setActiveTagIndex(-1);\n setIsOpen(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n if (__DEV__) {\n if (!validDropdownChildren.includes(getComponentId(child) ?? '')) {\n throwBladeError({\n message: `Dropdown can only have one of following elements as children - \\n\\n ${validDropdownChildren.join(\n ', ',\n )} \\n\\n Check out: https://blade.razorpay.com/?path=/story/components-dropdown`,\n moduleName: 'Dropdown',\n });\n }\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SelectInput)) {\n dropdownTriggerer.current = 'SelectInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SearchInput)) {\n dropdownTriggerer.current = 'SearchInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.DropdownButton)) {\n dropdownTriggerer.current = 'DropdownButton';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.AutoComplete)) {\n dropdownTriggerer.current = 'AutoComplete';\n }\n }\n });\n\n const contextValue = React.useMemo<DropdownContextType>(\n () => ({\n isOpen: isDropdownOpen,\n setIsOpen,\n close,\n selectedIndices,\n setSelectedIndices,\n controlledValueIndices,\n setControlledValueIndices,\n options,\n setOptions,\n filteredValues,\n setFilteredValues,\n activeIndex,\n setActiveIndex,\n activeTagIndex,\n setActiveTagIndex,\n visibleTagsCountRef,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n isKeydownPressed,\n setIsKeydownPressed,\n dropdownBaseId,\n triggererRef,\n triggererWrapperRef,\n actionListItemRef,\n selectionType,\n hasFooterAction,\n setHasFooterAction,\n hasAutoCompleteInBottomSheetHeader,\n setHasAutoCompleteInBottomSheetHeader,\n dropdownTriggerer: dropdownTriggerer.current,\n changeCallbackTriggerer,\n setChangeCallbackTriggerer,\n isControlled,\n setIsControlled,\n isTagDismissedRef,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n isDropdownOpen,\n isOpenControlled,\n selectedIndices,\n controlledValueIndices,\n options,\n filteredValues,\n activeIndex,\n activeTagIndex,\n shouldIgnoreBlurAnimation,\n selectionType,\n hasFooterAction,\n isKeydownPressed,\n changeCallbackTriggerer,\n isControlled,\n ],\n );\n\n const BottomSheetAndDropdownGlueContextValue = React.useMemo((): BottomSheetAndDropdownGlueContext => {\n return {\n isOpen: isDropdownOpen,\n dropdownHasBottomSheet,\n hasAutoCompleteInBottomSheetHeader,\n setDropdownHasBottomSheet,\n // This is the dismiss function which will be injected into the BottomSheet\n // Basically <BottomSheet onDismiss={onBottomSheetDismiss} />\n onBottomSheetDismiss: close,\n };\n }, [dropdownHasBottomSheet, hasAutoCompleteInBottomSheetHeader, isDropdownOpen, close]);\n\n return (\n <BottomSheetAndDropdownGlueContext.Provider value={BottomSheetAndDropdownGlueContextValue}>\n <DropdownContext.Provider value={contextValue}>\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={dropdownContainerRef as any}\n {...metaAttribute({ name: MetaConstants.Dropdown, testID })}\n {...getStyledProps(styledProps)}\n width={_width}\n >\n <BaseBox position=\"relative\" textAlign={'left' as never}>\n {children}\n </BaseBox>\n </BaseBox>\n </DropdownContext.Provider>\n </BottomSheetAndDropdownGlueContext.Provider>\n );\n};\n\nconst Dropdown = assignWithoutSideEffects(_Dropdown, {\n componentId: dropdownComponentIds.Dropdown,\n});\n\nexport { Dropdown };\n"],"names":["validDropdownChildren","dropdownComponentIds","BaseBox","triggers","SelectInput","SearchInput","DropdownButton","DropdownLink","DropdownOverlay","AutoComplete","bottomSheetComponentIds","BottomSheet","_Dropdown","_ref","children","isOpenControlled","isOpen","onOpenChange","_ref$selectionType","selectionType","testID","_width","styledProps","_objectWithoutProperties","_excluded","_React$useState","React","useState","_React$useState2","_slicedToArray","options","setOptions","_React$useState3","_React$useState4","filteredValues","setFilteredValues","_React$useState5","_React$useState6","selectedIndices","setSelectedIndices","_React$useState7","_React$useState8","controlledValueIndices","setControlledValueIndices","_React$useState9","_React$useState10","activeIndex","setActiveIndex","_React$useState11","_React$useState12","activeTagIndex","setActiveTagIndex","_React$useState13","_React$useState14","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","_React$useState15","_React$useState16","hasFooterAction","setHasFooterAction","_React$useState17","_React$useState18","hasAutoCompleteInBottomSheetHeader","setHasAutoCompleteInBottomSheetHeader","_React$useState19","_React$useState20","isKeydownPressed","setIsKeydownPressed","_React$useState21","_React$useState22","changeCallbackTriggerer","setChangeCallbackTriggerer","_React$useState23","_React$useState24","isControlled","setIsControlled","_React$useState25","_React$useState26","dropdownHasBottomSheet","setDropdownHasBottomSheet","triggererWrapperRef","useRef","triggererRef","actionListItemRef","dropdownTriggerer","isTagDismissedRef","value","visibleTagsCountRef","dropdownContainerRef","dropdownBaseId","useId","isDropdownOpenRef","_useControllableState","useControllableState","defaultValue","onChange","isOpenControlledValue","current","_useControllableState2","isDropdownOpen","setIsDropdownOpen","setIsOpen","isOpenValue","close","useCallback","Children","map","child","isValidElement","__DEV__","_getComponentId","includes","getComponentId","throwBladeError","message","join","moduleName","isValidAllowedChildren","contextValue","useMemo","BottomSheetAndDropdownGlueContextValue","onBottomSheetDismiss","_jsx","BottomSheetAndDropdownGlueContext","Provider","DropdownContext","Object","assign","ref","metaAttribute","name","MetaConstants","Dropdown","getStyledProps","width","position","textAlign","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,UAAA,CAAA,QAAA,CAAA,cAAA,CAAA,eAAA,CAAA,QAAA,CAAA,QAAA,CAAA,CAiBA,IAAMA,qBAAqB,CAAG,CAE5BC,oBAAoB,CAACC,OAAO,CAC5BD,oBAAoB,CAACE,QAAQ,CAACC,WAAW,CACzCH,oBAAo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cesContent":["import React from 'react';\nimport { DropdownContext } from './useDropdown';\nimport type { DropdownContextType } from './useDropdown';\nimport type { DropdownProps } from './types';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { useId } from '~utils/useId';\nimport { ComponentIds as bottomSheetComponentIds } from '~components/BottomSheet/componentIds';\nimport { BottomSheetAndDropdownGlueContext } from '~components/BottomSheet/BottomSheetContext';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport BaseBox from '~components/Box/BaseBox';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { throwBladeError } from '~utils/logger';\nimport type { ContainerElementType } from '~utils/types';\nimport { useControllableState } from '~utils/useControllable';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst validDropdownChildren = [\n // TODO: Remove Box once CountrySelector's button sizing is fixed\n dropdownComponentIds.BaseBox,\n dropdownComponentIds.triggers.SelectInput,\n dropdownComponentIds.triggers.SearchInput,\n dropdownComponentIds.triggers.DropdownButton,\n dropdownComponentIds.triggers.DropdownLink,\n dropdownComponentIds.DropdownOverlay,\n dropdownComponentIds.triggers.AutoComplete,\n bottomSheetComponentIds.BottomSheet,\n];\n\n/**\n * ### Dropdown component\n *\n * Dropdown component is generic component that controls the dropdown functionality.\n * It can be used with multiple triggers and mostly contains ActionList component inside it\n *\n * ---\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown selectionType=\"single\">\n * <SelectInput />\n * <DropdownOverlay>\n * <ActionList>\n * <ActionListItem />\n * <ActionListItem />\n * </ActionList>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select Dropdown Documentation}\n */\nconst _Dropdown = ({\n children,\n isOpen: isOpenControlled,\n onOpenChange,\n selectionType = 'single',\n testID,\n _width,\n ...rest\n}: DropdownProps): React.ReactElement => {\n const [options, setOptions] = React.useState<DropdownContextType['options']>([]);\n const [filteredValues, setFilteredValues] = React.useState<string[]>([]);\n const [selectedIndices, setSelectedIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [controlledValueIndices, setControlledValueIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [activeIndex, setActiveIndex] = React.useState(-1);\n const [activeTagIndex, setActiveTagIndex] = React.useState(-1);\n const [shouldIgnoreBlurAnimation, setShouldIgnoreBlurAnimation] = React.useState(false);\n const [hasFooterAction, setHasFooterAction] = React.useState(false);\n const [\n hasAutoCompleteInBottomSheetHeader,\n setHasAutoCompleteInBottomSheetHeader,\n ] = React.useState(false);\n const [isKeydownPressed, setIsKeydownPressed] = React.useState(false);\n const [changeCallbackTriggerer, setChangeCallbackTriggerer] = React.useState<\n DropdownContextType['changeCallbackTriggerer']\n >(0);\n const [isControlled, setIsControlled] = React.useState(false);\n // keep track if dropdown contains bottomsheet\n const [dropdownHasBottomSheet, setDropdownHasBottomSheet] = React.useState(false);\n\n /**\n * In inputs, actual input is smaller than the visible input wrapper.\n * You can set this reference in such cases so floating ui calculations happen correctly\n * */\n const triggererWrapperRef = React.useRef<ContainerElementType>(null);\n const triggererRef = React.useRef<HTMLButtonElement>(null);\n const actionListItemRef = React.useRef<HTMLDivElement>(null);\n const dropdownTriggerer = React.useRef<DropdownContextType['dropdownTriggerer']>();\n const isTagDismissedRef = React.useRef<{ value: boolean } | null>({ value: false });\n const visibleTagsCountRef = React.useRef<{ value: number }>({ value: 0 });\n const dropdownContainerRef = React.useRef<HTMLDivElement>(null);\n\n const dropdownBaseId = useId('dropdown');\n const isDropdownOpenRef = React.useRef(isOpenControlled);\n\n const [isDropdownOpen, setIsDropdownOpen] = useControllableState({\n value: isOpenControlled,\n defaultValue: false,\n onChange: (isOpenControlledValue) => {\n isDropdownOpenRef.current = isOpenControlledValue;\n onOpenChange?.(isOpenControlledValue);\n },\n });\n\n isDropdownOpenRef.current = isDropdownOpen;\n\n const setIsOpen = (isOpenValue: boolean): void => {\n isDropdownOpenRef.current = isOpenValue;\n setIsDropdownOpen(() => isOpenValue);\n };\n\n const close = React.useCallback(() => {\n setActiveTagIndex(-1);\n setIsOpen(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n if (__DEV__) {\n if (!validDropdownChildren.includes(getComponentId(child) ?? '')) {\n throwBladeError({\n message: `Dropdown can only have one of following elements as children - \\n\\n ${validDropdownChildren.join(\n ', ',\n )} \\n\\n Check out: https://blade.razorpay.com/?path=/story/components-dropdown`,\n moduleName: 'Dropdown',\n });\n }\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SelectInput)) {\n dropdownTriggerer.current = 'SelectInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SearchInput)) {\n dropdownTriggerer.current = 'SearchInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.DropdownButton)) {\n dropdownTriggerer.current = 'DropdownButton';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.AutoComplete)) {\n dropdownTriggerer.current = 'AutoComplete';\n }\n }\n });\n\n const contextValue = React.useMemo<DropdownContextType>(\n () => ({\n isOpen: isDropdownOpen,\n setIsOpen,\n close,\n selectedIndices,\n setSelectedIndices,\n controlledValueIndices,\n setControlledValueIndices,\n options,\n setOptions,\n filteredValues,\n setFilteredValues,\n activeIndex,\n setActiveIndex,\n activeTagIndex,\n setActiveTagIndex,\n visibleTagsCountRef,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n isKeydownPressed,\n setIsKeydownPressed,\n dropdownBaseId,\n triggererRef,\n triggererWrapperRef,\n actionListItemRef,\n selectionType,\n hasFooterAction,\n setHasFooterAction,\n hasAutoCompleteInBottomSheetHeader,\n setHasAutoCompleteInBottomSheetHeader,\n dropdownTriggerer: dropdownTriggerer.current,\n changeCallbackTriggerer,\n setChangeCallbackTriggerer,\n isControlled,\n setIsControlled,\n isTagDismissedRef,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n isDropdownOpen,\n isOpenControlled,\n selectedIndices,\n controlledValueIndices,\n options,\n filteredValues,\n activeIndex,\n activeTagIndex,\n shouldIgnoreBlurAnimation,\n selectionType,\n hasFooterAction,\n isKeydownPressed,\n changeCallbackTriggerer,\n isControlled,\n ],\n );\n\n const BottomSheetAndDropdownGlueContextValue = React.useMemo((): BottomSheetAndDropdownGlueContext => {\n return {\n isOpen: isDropdownOpen,\n dropdownHasBottomSheet,\n hasAutoCompleteInBottomSheetHeader,\n setDropdownHasBottomSheet,\n // This is the dismiss function which will be injected into the BottomSheet\n // Basically <BottomSheet onDismiss={onBottomSheetDismiss} />\n onBottomSheetDismiss: close,\n };\n }, [dropdownHasBottomSheet, hasAutoCompleteInBottomSheetHeader, isDropdownOpen, close]);\n\n return (\n <BottomSheetAndDropdownGlueContext.Provider value={BottomSheetAndDropdownGlueContextValue}>\n <DropdownContext.Provider value={contextValue}>\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={dropdownContainerRef as any}\n {...metaAttribute({ name: MetaConstants.Dropdown, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n width={_width}\n >\n <BaseBox position=\"relative\" textAlign={'left' as never}>\n {children}\n </BaseBox>\n </BaseBox>\n </DropdownContext.Provider>\n </BottomSheetAndDropdownGlueContext.Provider>\n );\n};\n\nconst Dropdown = assignWithoutSideEffects(_Dropdown, {\n componentId: dropdownComponentIds.Dropdown,\n});\n\nexport { Dropdown };\n"],"names":["validDropdownChildren","dropdownComponentIds","BaseBox","triggers","SelectInput","SearchInput","DropdownButton","DropdownLink","DropdownOverlay","AutoComplete","bottomSheetComponentIds","BottomSheet","_Dropdown","_ref","children","isOpenControlled","isOpen","onOpenChange","_ref$selectionType","selectionType","testID","_width","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_React$useState2","_slicedToArray","options","setOptions","_React$useState3","_React$useState4","filteredValues","setFilteredValues","_React$useState5","_React$useState6","selectedIndices","setSelectedIndices","_React$useState7","_React$useState8","controlledValueIndices","setControlledValueIndices","_React$useState9","_React$useState10","activeIndex","setActiveIndex","_React$useState11","_React$useState12","activeTagIndex","setActiveTagIndex","_React$useState13","_React$useState14","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","_React$useState15","_React$useState16","hasFooterAction","setHasFooterAction","_React$useState17","_React$useState18","hasAutoCompleteInBottomSheetHeader","setHasAutoCompleteInBottomSheetHeader","_React$useState19","_React$useState20","isKeydownPressed","setIsKeydownPressed","_React$useState21","_React$useState22","changeCallbackTriggerer","setChangeCallbackTriggerer","_React$useState23","_React$useState24","isControlled","setIsControlled","_React$useState25","_React$useState26","dropdownHasBottomSheet","setDropdownHasBottomSheet","triggererWrapperRef","useRef","triggererRef","actionListItemRef","dropdownTriggerer","isTagDismissedRef","value","visibleTagsCountRef","dropdownContainerRef","dropdownBaseId","useId","isDropdownOpenRef","_useControllableState","useControllableState","defaultValue","onChange","isOpenControlledValue","current","_useControllableState2","isDropdownOpen","setIsDropdownOpen","setIsOpen","isOpenValue","close","useCallback","Children","map","child","isValidElement","__DEV__","_getComponentId","includes","getComponentId","throwBladeError","message","join","moduleName","isValidAllowedChildren","contextValue","useMemo","BottomSheetAndDropdownGlueContextValue","onBottomSheetDismiss","_jsx","BottomSheetAndDropdownGlueContext","Provider","DropdownContext","Object","assign","ref","metaAttribute","name","MetaConstants","Dropdown","getStyledProps","makeAnalyticsAttribute","width","position","textAlign","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,UAAA,CAAA,QAAA,CAAA,cAAA,CAAA,eAAA,CAAA,QAAA,CAAA,QAAA,CAAA,CAkBA,IAAMA,qBAAqB,CAAG,CAE5BC,oBAAoB,CAACC,OAAO,CAC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ContainerRole } from '../ActionList/getA11yRoles.js';
7
7
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
8
8
  import { jsx } from 'react/jsx-runtime';
9
9
 
10
- var _excluded=["children","icon","iconPosition","isDisabled","isFullWidth","isLoading","onClick","onBlur","onKeyDown","size","type","variant","accessibilityLabel","testID"];var _DropdownButton=function _DropdownButton(_ref){var children=_ref.children,icon=_ref.icon,_ref$iconPosition=_ref.iconPosition,iconPosition=_ref$iconPosition===void 0?'left':_ref$iconPosition,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,_ref$isFullWidth=_ref.isFullWidth,isFullWidth=_ref$isFullWidth===void 0?false:_ref$isFullWidth,_ref$isLoading=_ref.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,_onClick=_ref.onClick,_onBlur=_ref.onBlur,_onKeyDown=_ref.onKeyDown,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,_ref$type=_ref.type,type=_ref$type===void 0?'button':_ref$type,_ref$variant=_ref.variant,variant=_ref$variant===void 0?'primary':_ref$variant,accessibilityLabel=_ref.accessibilityLabel,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded);var _useDropdown=useDropdown(),onTriggerClick=_useDropdown.onTriggerClick,onTriggerKeydown=_useDropdown.onTriggerKeydown,dropdownBaseId=_useDropdown.dropdownBaseId,isOpen=_useDropdown.isOpen,activeIndex=_useDropdown.activeIndex,hasFooterAction=_useDropdown.hasFooterAction,triggererRef=_useDropdown.triggererRef;return jsx(BaseButton,Object.assign({},styledProps,icon?{icon:icon,children:children}:{children:children},{iconPosition:iconPosition,isDisabled:isDisabled,isFullWidth:isFullWidth,isLoading:isLoading,size:size,type:type,variant:variant,testID:testID,ref:triggererRef,accessibilityProps:{label:accessibilityLabel,hasPopup:getActionListContainerRole(hasFooterAction,'DropdownButton'),expanded:isOpen,controls:`${dropdownBaseId}-actionlist`,activeDescendant:activeIndex>=0?`${dropdownBaseId}-${activeIndex}`:undefined},onClick:function onClick(e){onTriggerClick();_onClick==null?void 0:_onClick(e);},onBlur:function onBlur(e){_onBlur==null?void 0:_onBlur(e);},onKeyDown:function onKeyDown(e){onTriggerKeydown==null?void 0:onTriggerKeydown({event:e});_onKeyDown==null?void 0:_onKeyDown(e);}}));};var DropdownButton=assignWithoutSideEffects(_DropdownButton,{componentId:dropdownComponentIds.triggers.DropdownButton});
10
+ var _excluded=["children","icon","iconPosition","isDisabled","isFullWidth","isLoading","onClick","onBlur","onKeyDown","size","type","variant","accessibilityLabel","testID"];var _DropdownButton=function _DropdownButton(_ref){var children=_ref.children,icon=_ref.icon,_ref$iconPosition=_ref.iconPosition,iconPosition=_ref$iconPosition===void 0?'left':_ref$iconPosition,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,_ref$isFullWidth=_ref.isFullWidth,isFullWidth=_ref$isFullWidth===void 0?false:_ref$isFullWidth,_ref$isLoading=_ref.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,_onClick=_ref.onClick,_onBlur=_ref.onBlur,_onKeyDown=_ref.onKeyDown,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,_ref$type=_ref.type,type=_ref$type===void 0?'button':_ref$type,_ref$variant=_ref.variant,variant=_ref$variant===void 0?'primary':_ref$variant,accessibilityLabel=_ref.accessibilityLabel,testID=_ref.testID,rest=_objectWithoutProperties(_ref,_excluded);var _useDropdown=useDropdown(),onTriggerClick=_useDropdown.onTriggerClick,onTriggerKeydown=_useDropdown.onTriggerKeydown,dropdownBaseId=_useDropdown.dropdownBaseId,isOpen=_useDropdown.isOpen,activeIndex=_useDropdown.activeIndex,hasFooterAction=_useDropdown.hasFooterAction,triggererRef=_useDropdown.triggererRef;return jsx(BaseButton,Object.assign({},rest,icon?{icon:icon,children:children}:{children:children},{iconPosition:iconPosition,isDisabled:isDisabled,isFullWidth:isFullWidth,isLoading:isLoading,size:size,type:type,variant:variant,testID:testID,ref:triggererRef,accessibilityProps:{label:accessibilityLabel,hasPopup:getActionListContainerRole(hasFooterAction,'DropdownButton'),expanded:isOpen,controls:`${dropdownBaseId}-actionlist`,activeDescendant:activeIndex>=0?`${dropdownBaseId}-${activeIndex}`:undefined},onClick:function onClick(e){onTriggerClick();_onClick==null?void 0:_onClick(e);},onBlur:function onBlur(e){_onBlur==null?void 0:_onBlur(e);},onKeyDown:function onKeyDown(e){onTriggerKeydown==null?void 0:onTriggerKeydown({event:e});_onKeyDown==null?void 0:_onKeyDown(e);}}));};var DropdownButton=assignWithoutSideEffects(_DropdownButton,{componentId:dropdownComponentIds.triggers.DropdownButton});
11
11
 
12
12
  export { DropdownButton };
13
13
  //# sourceMappingURL=DropdownButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownButton.js","sources":["../../../../../src/components/Dropdown/DropdownButton.tsx"],"sourcesContent":["import React from 'react';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport BaseButton from '~components/Button/BaseButton';\nimport type { ButtonProps } from '~components/Button';\nimport { getActionListContainerRole } from '~components/ActionList/getA11yRoles';\nimport type { BaseButtonProps } from '~components/Button/BaseButton/BaseButton';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\ntype DropdownButtonProps = ButtonProps & {\n onBlur?: BaseButtonProps['onBlur'];\n onKeyDown?: BaseButtonProps['onKeyDown'];\n};\n\nconst _DropdownButton = ({\n children,\n icon,\n iconPosition = 'left',\n isDisabled = false,\n isFullWidth = false,\n isLoading = false,\n onClick,\n onBlur,\n onKeyDown,\n size = 'medium',\n type = 'button',\n variant = 'primary',\n accessibilityLabel,\n testID,\n ...styledProps\n}: DropdownButtonProps): React.ReactElement => {\n const {\n onTriggerClick,\n onTriggerKeydown,\n dropdownBaseId,\n isOpen,\n activeIndex,\n hasFooterAction,\n triggererRef,\n } = useDropdown();\n\n return (\n // Using BaseButton here to avoid exporting onBlur and onKeyDown from Button\n // If in future we decide to export onBlur and onKeyDown on Button, this can be replaced with Button\n <BaseButton\n {...styledProps}\n {...(icon ? { icon, children } : { children })}\n iconPosition={iconPosition}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isLoading={isLoading}\n size={size}\n type={type}\n variant={variant}\n testID={testID}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={triggererRef as any}\n accessibilityProps={{\n label: accessibilityLabel,\n hasPopup: getActionListContainerRole(hasFooterAction, 'DropdownButton'),\n expanded: isOpen,\n controls: `${dropdownBaseId}-actionlist`,\n activeDescendant: activeIndex >= 0 ? `${dropdownBaseId}-${activeIndex}` : undefined,\n }}\n onClick={(e) => {\n onTriggerClick();\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onClick?.(e as any);\n }}\n onBlur={(e) => {\n // With button trigger, there is no \"value\" as such. It's just clickable items\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onBlur?.(e as any);\n }}\n onKeyDown={(e) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onTriggerKeydown?.({ event: e as any });\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onKeyDown?.(e as any);\n }}\n />\n );\n};\n\nconst DropdownButton = assignWithoutSideEffects(_DropdownButton, {\n componentId: dropdownComponentIds.triggers.DropdownButton,\n});\n\nexport { DropdownButton };\n"],"names":["_DropdownButton","_ref","children","icon","_ref$iconPosition","iconPosition","_ref$isDisabled","isDisabled","_ref$isFullWidth","isFullWidth","_ref$isLoading","isLoading","onClick","onBlur","onKeyDown","_ref$size","size","_ref$type","type","_ref$variant","variant","accessibilityLabel","testID","styledProps","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","_jsx","BaseButton","Object","assign","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","activeDescendant","undefined","e","event","DropdownButton","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;6KAcA,IAAMA,eAAe,CAAG,SAAlBA,eAAeA,CAAAC,IAAA,CAgB0B,CAf7C,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CAAAC,iBAAA,CAAAH,IAAA,CACJI,YAAY,CAAZA,YAAY,CAAAD,iBAAA,GAAG,KAAA,CAAA,CAAA,MAAM,CAAAA,iBAAA,CAAAE,eAAA,CAAAL,IAAA,CACrBM,UAAU,CAAVA,UAAU,CAAAD,eAAA,GAAG,KAAA,CAAA,CAAA,KAAK,CAAAA,eAAA,CAAAE,gBAAA,CAAAP,IAAA,CAClBQ,WAAW,CAAXA,WAAW,CAAAD,gBAAA,GAAA,KAAA,CAAA,CAAG,KAAK,CAAAA,gBAAA,CAAAE,cAAA,CAAAT,IAAA,CACnBU,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAA,KAAA,CAAA,CAAG,KAAK,CAAAA,cAAA,CACjBE,QAAO,CAAAX,IAAA,CAAPW,OAAO,CACPC,OAAM,CAAAZ,IAAA,CAANY,MAAM,CACNC,UAAS,CAAAb,IAAA,CAATa,SAAS,CAAAC,SAAA,CAAAd,IAAA,CACTe,IAAI,CAAJA,IAAI,CAAAD,SAAA,UAAG,QAAQ,CAAAA,SAAA,CAAAE,SAAA,CAAAhB,IAAA,CACfiB,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,SAAA,CAAAE,YAAA,CAAAlB,IAAA,CACfmB,OAAO,CAAPA,OAAO,CAAAD,YAAA,GAAG,KAAA,CAAA,CA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C,OAAO,CAAE,SAAAA,OAACoC,CAAAA,CAAC,CAAK,CACdpB,cAAc,EAAE,CAGhBhB,QAAO,EAAA,IAAA,CAAA,KAAA,CAAA,CAAPA,QAAO,CAAGoC,CAAQ,CAAC,CACrB,CAAE,CACFnC,MAAM,CAAE,SAAAA,MAACmC,CAAAA,CAAC,CAAK,CAIbnC,OAAM,EAANA,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,OAAM,CAAGmC,CAAQ,CAAC,CACpB,CAAE,CACFlC,SAAS,CAAE,SAAAA,SAAAA,CAACkC,CAAC,CAAK,CAEhBnB,gBAAgB,EAAA,IAAA,CAAA,KAAA,CAAA,CAAhBA,gBAAgB,CAAG,CAAEoB,KAAK,CAAED,CAAS,CAAC,CAAC,CAGvClC,UAAS,EAATA,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,UAAS,CAAGkC,CAAQ,CAAC,CACvB,CAAE,CACH,CAAA,CAAC,CAEN,CAAC,CAEK,IAAAE,cAAc,CAAGC,wBAAwB,CAACnD,eAAe,CAAE,CAC/DoD,WAAW,CAAEC,oBAAoB,CAACC,QAAQ,CAACJ,cAC7C,CAAC;;;;"}
1
+ {"version":3,"file":"DropdownButton.js","sources":["../../../../../src/components/Dropdown/DropdownButton.tsx"],"sourcesContent":["import React from 'react';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport BaseButton from '~components/Button/BaseButton';\nimport type { ButtonProps } from '~components/Button';\nimport { getActionListContainerRole } from '~components/ActionList/getA11yRoles';\nimport type { BaseButtonProps } from '~components/Button/BaseButton/BaseButton';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\ntype DropdownButtonProps = ButtonProps & {\n onBlur?: BaseButtonProps['onBlur'];\n onKeyDown?: BaseButtonProps['onKeyDown'];\n};\n\nconst _DropdownButton = ({\n children,\n icon,\n iconPosition = 'left',\n isDisabled = false,\n isFullWidth = false,\n isLoading = false,\n onClick,\n onBlur,\n onKeyDown,\n size = 'medium',\n type = 'button',\n variant = 'primary',\n accessibilityLabel,\n testID,\n ...rest\n}: DropdownButtonProps): React.ReactElement => {\n const {\n onTriggerClick,\n onTriggerKeydown,\n dropdownBaseId,\n isOpen,\n activeIndex,\n hasFooterAction,\n triggererRef,\n } = useDropdown();\n\n return (\n // Using BaseButton here to avoid exporting onBlur and onKeyDown from Button\n // If in future we decide to export onBlur and onKeyDown on Button, this can be replaced with Button\n <BaseButton\n {...rest}\n {...(icon ? { icon, children } : { children })}\n iconPosition={iconPosition}\n isDisabled={isDisabled}\n isFullWidth={isFullWidth}\n isLoading={isLoading}\n size={size}\n type={type}\n variant={variant}\n testID={testID}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={triggererRef as any}\n accessibilityProps={{\n label: accessibilityLabel,\n hasPopup: getActionListContainerRole(hasFooterAction, 'DropdownButton'),\n expanded: isOpen,\n controls: `${dropdownBaseId}-actionlist`,\n activeDescendant: activeIndex >= 0 ? `${dropdownBaseId}-${activeIndex}` : undefined,\n }}\n onClick={(e) => {\n onTriggerClick();\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onClick?.(e as any);\n }}\n onBlur={(e) => {\n // With button trigger, there is no \"value\" as such. It's just clickable items\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onBlur?.(e as any);\n }}\n onKeyDown={(e) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onTriggerKeydown?.({ event: e as any });\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onKeyDown?.(e as any);\n }}\n />\n );\n};\n\nconst DropdownButton = assignWithoutSideEffects(_DropdownButton, {\n componentId: dropdownComponentIds.triggers.DropdownButton,\n});\n\nexport { DropdownButton };\n"],"names":["_DropdownButton","_ref","children","icon","_ref$iconPosition","iconPosition","_ref$isDisabled","isDisabled","_ref$isFullWidth","isFullWidth","_ref$isLoading","isLoading","onClick","onBlur","onKeyDown","_ref$size","size","_ref$type","type","_ref$variant","variant","accessibilityLabel","testID","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","_jsx","BaseButton","Object","assign","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","activeDescendant","undefined","e","event","DropdownButton","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;6KAcA,IAAMA,eAAe,CAAG,SAAlBA,eAAeA,CAAAC,IAAA,CAgB0B,CAf7C,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CAAAC,iBAAA,CAAAH,IAAA,CACJI,YAAY,CAAZA,YAAY,CAAAD,iBAAA,GAAG,KAAA,CAAA,CAAA,MAAM,CAAAA,iBAAA,CAAAE,eAAA,CAAAL,IAAA,CACrBM,UAAU,CAAVA,UAAU,CAAAD,eAAA,GAAG,KAAA,CAAA,CAAA,KAAK,CAAAA,eAAA,CAAAE,gBAAA,CAAAP,IAAA,CAClBQ,WAAW,CAAXA,WAAW,CAAAD,gBAAA,GAAA,KAAA,CAAA,CAAG,KAAK,CAAAA,gBAAA,CAAAE,cAAA,CAAAT,IAAA,CACnBU,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAA,KAAA,CAAA,CAAG,KAAK,CAAAA,cAAA,CACjBE,QAAO,CAAAX,IAAA,CAAPW,OAAO,CACPC,OAAM,CAAAZ,IAAA,CAANY,MAAM,CACNC,UAAS,CAAAb,IAAA,CAATa,SAAS,CAAAC,SAAA,CAAAd,IAAA,CACTe,IAAI,CAAJA,IAAI,CAAAD,SAAA,UAAG,QAAQ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CAAE,gBAAgB,CAAC,CACvEW,QAAQ,CAAEb,MAAM,CAChBc,QAAQ,CAAG,CAAEf,EAAAA,cAAe,aAAY,CACxCgB,gBAAgB,CAAEd,WAAW,EAAI,CAAC,CAAI,CAAEF,EAAAA,cAAe,IAAGE,WAAY,CAAA,CAAC,CAAGe,SAC5E,CAAE,CACFnC,OAAO,CAAE,SAAAA,OAACoC,CAAAA,CAAC,CAAK,CACdpB,cAAc,EAAE,CAGhBhB,QAAO,EAAA,IAAA,CAAA,KAAA,CAAA,CAAPA,QAAO,CAAGoC,CAAQ,CAAC,CACrB,CAAE,CACFnC,MAAM,CAAE,SAAAA,MAACmC,CAAAA,CAAC,CAAK,CAIbnC,OAAM,EAANA,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,OAAM,CAAGmC,CAAQ,CAAC,CACpB,CAAE,CACFlC,SAAS,CAAE,SAAAA,SAAAA,CAACkC,CAAC,CAAK,CAEhBnB,gBAAgB,EAAA,IAAA,CAAA,KAAA,CAAA,CAAhBA,gBAAgB,CAAG,CAAEoB,KAAK,CAAED,CAAS,CAAC,CAAC,CAGvClC,UAAS,EAATA,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,UAAS,CAAGkC,CAAQ,CAAC,CACvB,CAAE,CACH,CAAA,CAAC,CAEN,CAAC,CAEK,IAAAE,cAAc,CAAGC,wBAAwB,CAACnD,eAAe,CAAE,CAC/DoD,WAAW,CAAEC,oBAAoB,CAACC,QAAQ,CAACJ,cAC7C,CAAC;;;;"}
@@ -1,3 +1,4 @@
1
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
1
2
  import React__default from 'react';
2
3
  import { useDropdown } from './useDropdown.js';
3
4
  import { BaseFooter } from '../BaseHeaderFooter/BaseFooter.js';
@@ -10,9 +11,10 @@ import '../BladeProvider/useTheme.js';
10
11
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
11
12
  import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native.js';
12
13
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
14
+ import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
13
15
  import { jsx } from 'react/jsx-runtime';
14
16
 
15
- var _DropdownHeader=function _DropdownHeader(_ref){var title=_ref.title,subtitle=_ref.subtitle,leading=_ref.leading,titleSuffix=_ref.titleSuffix,trailing=_ref.trailing,testID=_ref.testID;return jsx(BaseBox,Object.assign({flexShrink:0},isReactNative()?{}:{onMouseDown:function onMouseDown(e){e.preventDefault();}},{children:jsx(BaseHeader,{title:title,subtitle:subtitle,leading:leading,trailing:trailing,titleSuffix:titleSuffix,metaComponentName:MetaConstants.DropdownHeader,testID:testID,showBackButton:false,showCloseButton:false})}));};var DropdownHeader=assignWithoutSideEffects(_DropdownHeader,{componentId:'DropdownHeader'});var _DropdownFooter=function _DropdownFooter(_ref2){var children=_ref2.children,testID=_ref2.testID;var _useDropdown=useDropdown(),setHasFooterAction=_useDropdown.setHasFooterAction,isOpen=_useDropdown.isOpen;var footerRef=React__default.useRef(null);React__default.useEffect(function(){setHasFooterAction(true);},[]);return jsx(BaseBox,Object.assign({ref:footerRef},makeAccessible({role:isReactNative()?undefined:'group'}),{children:jsx(BaseFooter,{metaComponentName:MetaConstants.DropdownFooter,testID:testID,children:isOpen?children:null})}));};var DropdownFooter=assignWithoutSideEffects(_DropdownFooter,{componentId:'DropdownFooter'});
17
+ var _excluded=["title","subtitle","leading","titleSuffix","trailing","testID"];var _DropdownHeader=function _DropdownHeader(_ref){var title=_ref.title,subtitle=_ref.subtitle,leading=_ref.leading,titleSuffix=_ref.titleSuffix,trailing=_ref.trailing,testID=_ref.testID,rest=_objectWithoutProperties(_ref,_excluded);return jsx(BaseBox,Object.assign({flexShrink:0},isReactNative()?{}:{onMouseDown:function onMouseDown(e){e.preventDefault();}},{children:jsx(BaseHeader,Object.assign({title:title,subtitle:subtitle,leading:leading,trailing:trailing,titleSuffix:titleSuffix,metaComponentName:MetaConstants.DropdownHeader,testID:testID,showBackButton:false,showCloseButton:false},makeAnalyticsAttribute(rest)))}));};var DropdownHeader=assignWithoutSideEffects(_DropdownHeader,{componentId:'DropdownHeader'});var _DropdownFooter=function _DropdownFooter(_ref2){var children=_ref2.children,testID=_ref2.testID;var _useDropdown=useDropdown(),setHasFooterAction=_useDropdown.setHasFooterAction,isOpen=_useDropdown.isOpen;var footerRef=React__default.useRef(null);React__default.useEffect(function(){setHasFooterAction(true);},[]);return jsx(BaseBox,Object.assign({ref:footerRef},makeAccessible({role:isReactNative()?undefined:'group'}),{children:jsx(BaseFooter,{metaComponentName:MetaConstants.DropdownFooter,testID:testID,children:isOpen?children:null})}));};var DropdownFooter=assignWithoutSideEffects(_DropdownFooter,{componentId:'DropdownFooter'});
16
18
 
17
19
  export { DropdownFooter, DropdownHeader };
18
20
  //# sourceMappingURL=DropdownHeaderFooter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownHeaderFooter.js","sources":["../../../../../src/components/Dropdown/DropdownHeaderFooter.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport React from 'react';\nimport { useDropdown } from './useDropdown';\nimport { BaseFooter } from '~components/BaseHeaderFooter/BaseFooter';\nimport { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';\nimport type { BaseHeaderProps } from '~components/BaseHeaderFooter/BaseHeader';\nimport type { BaseFooterProps } from '~components/BaseHeaderFooter/BaseFooter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { isReactNative } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { MetaConstants } from '~utils/metaAttribute/metaConstants';\n\ntype DropdownHeaderProps = Pick<\n BaseHeaderProps,\n 'title' | 'subtitle' | 'leading' | 'trailing' | 'titleSuffix' | 'testID'\n>;\n\nconst _DropdownHeader = ({\n title,\n subtitle,\n leading,\n titleSuffix,\n trailing,\n testID,\n}: DropdownHeaderProps): React.ReactElement => {\n return (\n <BaseBox\n flexShrink={0}\n {...(isReactNative()\n ? {}\n : {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onMouseDown: (e: any) => {\n // we don't want focus to ever move on header because its static element\n e.preventDefault();\n },\n })}\n >\n <BaseHeader\n title={title}\n subtitle={subtitle}\n leading={leading}\n trailing={trailing}\n titleSuffix={titleSuffix}\n metaComponentName={MetaConstants.DropdownHeader}\n testID={testID}\n // back button\n showBackButton={false}\n // close button\n showCloseButton={false}\n />\n </BaseBox>\n );\n};\n\nconst DropdownHeader = assignWithoutSideEffects(_DropdownHeader, {\n componentId: 'DropdownHeader',\n});\n\ntype DropdownFooter = Pick<BaseFooterProps, 'children' | 'testID'>;\n\nconst _DropdownFooter = ({ children, testID }: DropdownFooter): React.ReactElement => {\n const { setHasFooterAction, isOpen } = useDropdown();\n const footerRef = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n setHasFooterAction(true);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={footerRef as any}\n {...makeAccessible({\n role: isReactNative() ? undefined : 'group',\n })}\n >\n <BaseFooter metaComponentName={MetaConstants.DropdownFooter} testID={testID}>\n {/* We don't want any of the interactive children to get focussed on TAB when dropdown is closed so we remove them from DOM itself */}\n {isOpen ? children : null}\n </BaseFooter>\n </BaseBox>\n );\n};\n\nconst DropdownFooter = assignWithoutSideEffects(_DropdownFooter, {\n componentId: 'DropdownFooter',\n});\n\nexport { DropdownHeader, DropdownFooter };\n"],"names":["_DropdownHeader","_ref","title","subtitle","leading","titleSuffix","trailing","testID","_jsx","BaseBox","Object","assign","flexShrink","isReactNative","onMouseDown","e","preventDefault","children","BaseHeader","metaComponentName","MetaConstants","DropdownHeader","showBackButton","showCloseButton","assignWithoutSideEffects","componentId","_DropdownFooter","_ref2","_useDropdown","useDropdown","setHasFooterAction","isOpen","footerRef","React","useRef","useEffect","ref","makeAccessible","role","undefined","BaseFooter","DropdownFooter"],"mappings":";;;;;;;;;;;;;;AAkBA,IAAMA,eAAe,CAAG,SAAlBA,eAAeA,CAAAC,IAAA,CAO0B,CAN7C,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CACRC,OAAO,CAAAH,IAAA,CAAPG,OAAO,CACPC,WAAW,CAAAJ,IAAA,CAAXI,WAAW,CACXC,QAAQ,CAAAL,IAAA,CAARK,QAAQ,CACRC,MAAM,CAAAN,IAAA,CAANM,MAAM,CAEN,OACEC,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,CACNC,CAAAA,UAAU,CAAE,CAAE,CAAA,CACTC,aAAa,EAAE,CAChB,EAAE,CACF,CAEEC,WAAW,CAAE,SAAAA,WAACC,CAAAA,CAAM,CAAK,CAEvBA,CAAC,CAACC,cAAc,EAAE,CACpB,CACF,CAAC,CAAA,CAAAC,QAAA,CAELT,GAAA,CAACU,UAAU,EACThB,KAAK,CAAEA,KAAM,CACbC,QAAQ,CAAEA,QAAS,CACnBC,OAAO,CAAEA,OAAQ,CACjBE,QAAQ,CAAEA,QAAS,CACnBD,WAAW,CAAEA,WAAY,CACzBc,iBAAiB,CAAEC,aAAa,CAACC,cAAe,CAChDd,MAAM,CAAEA,MAAO,CAEfe,cAAc,CAAE,KAAM,CAEtBC,eAAe,CAAE,KAAM,CACxB,CAAC,CACK,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAF,cAAc,CAAGG,wBAAwB,CAACxB,eAAe,CAAE,CAC/DyB,WAAW,CAAE,gBACf,CAAC,EAID,IAAMC,eAAe,CAAG,SAAlBA,eAAeA,CAAAC,KAAA,CAAiE,CAAA,IAA3DV,QAAQ,CAAAU,KAAA,CAARV,QAAQ,CAAEV,MAAM,CAAAoB,KAAA,CAANpB,MAAM,CACzC,IAAAqB,YAAA,CAAuCC,WAAW,EAAE,CAA5CC,kBAAkB,CAAAF,YAAA,CAAlBE,kBAAkB,CAAEC,MAAM,CAAAH,YAAA,CAANG,MAAM,CAClC,IAAMC,SAAS,CAAGC,cAAK,CAACC,MAAM,CAAiB,IAAI,CAAC,CAEpDD,cAAK,CAACE,SAAS,CAAC,UAAM,CACpBL,kBAAkB,CAAC,IAAI,CAAC,CAE1B,CAAC,CAAE,EAAE,CAAC,CAEN,OACEtB,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,EAENyB,GAAG,CAAEJ,SAAiB,CAClBK,CAAAA,cAAc,CAAC,CACjBC,IAAI,CAAEzB,aAAa,EAAE,CAAG0B,SAAS,CAAG,OACtC,CAAC,CAAC,CAAAtB,CAAAA,QAAA,CAEFT,GAAA,CAACgC,UAAU,CAACrB,CAAAA,iBAAiB,CAAEC,aAAa,CAACqB,cAAe,CAAClC,MAAM,CAAEA,MAAO,CAAAU,QAAA,CAEzEc,MAAM,CAAGd,QAAQ,CAAG,IAAI,CACf,CAAC,EACN,CAAC,CAEd,CAAC,CAEK,IAAAwB,cAAc,CAAGjB,wBAAwB,CAACE,eAAe,CAAE,CAC/DD,WAAW,CAAE,gBACf,CAAC;;;;"}
1
+ {"version":3,"file":"DropdownHeaderFooter.js","sources":["../../../../../src/components/Dropdown/DropdownHeaderFooter.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport React from 'react';\nimport { useDropdown } from './useDropdown';\nimport { BaseFooter } from '~components/BaseHeaderFooter/BaseFooter';\nimport { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';\nimport type { BaseHeaderProps } from '~components/BaseHeaderFooter/BaseHeader';\nimport type { BaseFooterProps } from '~components/BaseHeaderFooter/BaseFooter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { isReactNative } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { MetaConstants } from '~utils/metaAttribute/metaConstants';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype DropdownHeaderProps = Pick<\n BaseHeaderProps,\n | 'title'\n | 'subtitle'\n | 'leading'\n | 'trailing'\n | 'titleSuffix'\n | 'testID'\n | keyof DataAnalyticsAttribute\n>;\n\nconst _DropdownHeader = ({\n title,\n subtitle,\n leading,\n titleSuffix,\n trailing,\n testID,\n ...rest\n}: DropdownHeaderProps): React.ReactElement => {\n return (\n <BaseBox\n flexShrink={0}\n {...(isReactNative()\n ? {}\n : {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onMouseDown: (e: any) => {\n // we don't want focus to ever move on header because its static element\n e.preventDefault();\n },\n })}\n >\n <BaseHeader\n title={title}\n subtitle={subtitle}\n leading={leading}\n trailing={trailing}\n titleSuffix={titleSuffix}\n metaComponentName={MetaConstants.DropdownHeader}\n testID={testID}\n // back button\n showBackButton={false}\n // close button\n showCloseButton={false}\n {...makeAnalyticsAttribute(rest)}\n />\n </BaseBox>\n );\n};\n\nconst DropdownHeader = assignWithoutSideEffects(_DropdownHeader, {\n componentId: 'DropdownHeader',\n});\n\ntype DropdownFooter = Pick<BaseFooterProps, 'children' | 'testID'>;\n\nconst _DropdownFooter = ({ children, testID }: DropdownFooter): React.ReactElement => {\n const { setHasFooterAction, isOpen } = useDropdown();\n const footerRef = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n setHasFooterAction(true);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={footerRef as any}\n {...makeAccessible({\n role: isReactNative() ? undefined : 'group',\n })}\n >\n <BaseFooter metaComponentName={MetaConstants.DropdownFooter} testID={testID}>\n {/* We don't want any of the interactive children to get focussed on TAB when dropdown is closed so we remove them from DOM itself */}\n {isOpen ? children : null}\n </BaseFooter>\n </BaseBox>\n );\n};\n\nconst DropdownFooter = assignWithoutSideEffects(_DropdownFooter, {\n componentId: 'DropdownFooter',\n});\n\nexport { DropdownHeader, DropdownFooter };\n"],"names":["_DropdownHeader","_ref","title","subtitle","leading","titleSuffix","trailing","testID","rest","_objectWithoutProperties","_excluded","_jsx","BaseBox","Object","assign","flexShrink","isReactNative","onMouseDown","e","preventDefault","children","BaseHeader","metaComponentName","MetaConstants","DropdownHeader","showBackButton","showCloseButton","makeAnalyticsAttribute","assignWithoutSideEffects","componentId","_DropdownFooter","_ref2","_useDropdown","useDropdown","setHasFooterAction","isOpen","footerRef","React","useRef","useEffect","ref","makeAccessible","role","undefined","BaseFooter","DropdownFooter"],"mappings":";;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,UAAA,CAAA,SAAA,CAAA,aAAA,CAAA,UAAA,CAAA,QAAA,CAAA,CAyBA,IAAMA,eAAe,CAAG,SAAlBA,eAAeA,CAAAC,IAAA,CAQ0B,CAP7C,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CACRC,OAAO,CAAAH,IAAA,CAAPG,OAAO,CACPC,WAAW,CAAAJ,IAAA,CAAXI,WAAW,CACXC,QAAQ,CAAAL,IAAA,CAARK,QAAQ,CACRC,MAAM,CAAAN,IAAA,CAANM,MAAM,CACHC,IAAI,CAAAC,wBAAA,CAAAR,IAAA,CAAAS,SAAA,CAEP,CAAA,OACEC,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,EACNC,UAAU,CAAE,CAAE,CACTC,CAAAA,aAAa,EAAE,CAChB,EAAE,CACF,CAEEC,WAAW,CAAE,SAAAA,WAAAA,CAACC,CAAM,CAAK,CAEvBA,CAAC,CAACC,cAAc,EAAE,CACpB,CACF,CAAC,CAAAC,CAAAA,QAAA,CAELT,GAAA,CAACU,UAAU,CAAAR,MAAA,CAAAC,MAAA,CAAA,CACTZ,KAAK,CAAEA,KAAM,CACbC,Q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AAC,CAEK,IAAAyB,cAAc,CAAGjB,wBAAwB,CAACE,eAAe,CAAE,CAC/DD,WAAW,CAAE,gBACf,CAAC;;;;"}
@@ -5,9 +5,10 @@ import BaseLink from '../Link/BaseLink/BaseLink.js';
5
5
  import { useDropdown } from './useDropdown.js';
6
6
  import { dropdownComponentIds } from './dropdownComponentIds.js';
7
7
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
8
+ import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
8
9
  import { jsx } from 'react/jsx-runtime';
9
10
 
10
- var _excluded=["children","icon","iconPosition","onClick","onBlur","onKeyDown","isDisabled","href","target","rel","accessibilityLabel","size","testID","hitSlop","htmlTitle"];var _DropdownLink=function _DropdownLink(_ref){var children=_ref.children,icon=_ref.icon,_ref$iconPosition=_ref.iconPosition,iconPosition=_ref$iconPosition===void 0?'left':_ref$iconPosition,_onClick=_ref.onClick,_onBlur=_ref.onBlur,_onKeyDown=_ref.onKeyDown,isDisabled=_ref.isDisabled;_ref.href;_ref.target;_ref.rel;var accessibilityLabel=_ref.accessibilityLabel,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,testID=_ref.testID,hitSlop=_ref.hitSlop,htmlTitle=_ref.htmlTitle,styledProps=_objectWithoutProperties(_ref,_excluded);var _useDropdown=useDropdown(),onTriggerClick=_useDropdown.onTriggerClick,onTriggerKeydown=_useDropdown.onTriggerKeydown,dropdownBaseId=_useDropdown.dropdownBaseId,isOpen=_useDropdown.isOpen,activeIndex=_useDropdown.activeIndex,hasFooterAction=_useDropdown.hasFooterAction,triggererRef=_useDropdown.triggererRef;return jsx(BaseLink,Object.assign({variant:"button"},icon?{icon:icon,children:children}:{children:children},{iconPosition:iconPosition,size:size,testID:testID,hitSlop:hitSlop,htmlTitle:htmlTitle,isDisabled:isDisabled},styledProps,{ref:triggererRef,accessibilityProps:{label:accessibilityLabel,hasPopup:getActionListContainerRole(hasFooterAction,'DropdownButton'),expanded:isOpen,controls:`${dropdownBaseId}-actionlist`,activeDescendant:activeIndex>=0?`${dropdownBaseId}-${activeIndex}`:undefined},onClick:function onClick(e){onTriggerClick();_onClick==null?void 0:_onClick(e);},onBlur:function onBlur(e){_onBlur==null?void 0:_onBlur(e);},onKeyDown:function onKeyDown(e){onTriggerKeydown==null?void 0:onTriggerKeydown({event:e});_onKeyDown==null?void 0:_onKeyDown(e);}}));};var DropdownLink=assignWithoutSideEffects(_DropdownLink,{componentId:dropdownComponentIds.triggers.DropdownLink});
11
+ var _excluded=["children","icon","iconPosition","onClick","onBlur","onKeyDown","isDisabled","href","target","rel","accessibilityLabel","size","testID","hitSlop","htmlTitle"];var _DropdownLink=function _DropdownLink(_ref){var children=_ref.children,icon=_ref.icon,_ref$iconPosition=_ref.iconPosition,iconPosition=_ref$iconPosition===void 0?'left':_ref$iconPosition,_onClick=_ref.onClick,_onBlur=_ref.onBlur,_onKeyDown=_ref.onKeyDown,isDisabled=_ref.isDisabled;_ref.href;_ref.target;_ref.rel;var accessibilityLabel=_ref.accessibilityLabel,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,testID=_ref.testID,hitSlop=_ref.hitSlop,htmlTitle=_ref.htmlTitle,props=_objectWithoutProperties(_ref,_excluded);var _useDropdown=useDropdown(),onTriggerClick=_useDropdown.onTriggerClick,onTriggerKeydown=_useDropdown.onTriggerKeydown,dropdownBaseId=_useDropdown.dropdownBaseId,isOpen=_useDropdown.isOpen,activeIndex=_useDropdown.activeIndex,hasFooterAction=_useDropdown.hasFooterAction,triggererRef=_useDropdown.triggererRef;return jsx(BaseLink,Object.assign({variant:"button"},icon?{icon:icon,children:children}:{children:children},{iconPosition:iconPosition,size:size,testID:testID,hitSlop:hitSlop,htmlTitle:htmlTitle,isDisabled:isDisabled},props,makeAnalyticsAttribute(props),{ref:triggererRef,accessibilityProps:{label:accessibilityLabel,hasPopup:getActionListContainerRole(hasFooterAction,'DropdownButton'),expanded:isOpen,controls:`${dropdownBaseId}-actionlist`,activeDescendant:activeIndex>=0?`${dropdownBaseId}-${activeIndex}`:undefined},onClick:function onClick(e){onTriggerClick();_onClick==null?void 0:_onClick(e);},onBlur:function onBlur(e){_onBlur==null?void 0:_onBlur(e);},onKeyDown:function onKeyDown(e){onTriggerKeydown==null?void 0:onTriggerKeydown({event:e});_onKeyDown==null?void 0:_onKeyDown(e);}}));};var DropdownLink=assignWithoutSideEffects(_DropdownLink,{componentId:dropdownComponentIds.triggers.DropdownLink});
11
12
 
12
13
  export { DropdownLink };
13
14
  //# sourceMappingURL=DropdownLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownLink.js","sources":["../../../../../src/components/Dropdown/DropdownLink.tsx"],"sourcesContent":["import React from 'react';\nimport { getActionListContainerRole } from '../ActionList/getA11yRoles';\nimport { BaseLink } from '../Link/BaseLink';\nimport type { BaseLinkProps } from '../Link/BaseLink';\nimport type { LinkButtonVariantProps } from '../Link';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { assignWithoutSideEffects } from '~src/utils/assignWithoutSideEffects';\n\ntype DropdownLinkProps = LinkButtonVariantProps & {\n onBlur?: BaseLinkProps['onBlur'];\n onKeyDown?: BaseLinkProps['onKeyDown'];\n};\n\nconst _DropdownLink = ({\n children,\n icon,\n iconPosition = 'left',\n onClick,\n onBlur,\n onKeyDown,\n isDisabled,\n href,\n target,\n rel,\n accessibilityLabel,\n size = 'medium',\n testID,\n hitSlop,\n htmlTitle,\n ...styledProps\n}: DropdownLinkProps): React.ReactElement => {\n const {\n onTriggerClick,\n onTriggerKeydown,\n dropdownBaseId,\n isOpen,\n activeIndex,\n hasFooterAction,\n triggererRef,\n } = useDropdown();\n\n return (\n // Using BaseButton here to avoid exporting onBlur and onKeyDown from Button\n // If in future we decide to export onBlur and onKeyDown on Button, this can be replaced with Button\n <BaseLink\n variant=\"button\"\n {...(icon ? { icon, children } : { children })}\n iconPosition={iconPosition}\n size={size}\n testID={testID}\n hitSlop={hitSlop}\n htmlTitle={htmlTitle}\n isDisabled={isDisabled}\n {...styledProps}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={triggererRef as any}\n accessibilityProps={{\n label: accessibilityLabel,\n hasPopup: getActionListContainerRole(hasFooterAction, 'DropdownButton'),\n expanded: isOpen,\n controls: `${dropdownBaseId}-actionlist`,\n activeDescendant: activeIndex >= 0 ? `${dropdownBaseId}-${activeIndex}` : undefined,\n }}\n onClick={(e) => {\n onTriggerClick();\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onClick?.(e as any);\n }}\n onBlur={(e) => {\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onBlur?.(e as any);\n }}\n onKeyDown={(e) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onTriggerKeydown?.({ event: e as any });\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onKeyDown?.(e as any);\n }}\n />\n );\n};\n\nconst DropdownLink = assignWithoutSideEffects(_DropdownLink, {\n componentId: dropdownComponentIds.triggers.DropdownLink,\n});\n\nexport { DropdownLink };\n"],"names":["_DropdownLink","_ref","children","icon","_ref$iconPosition","iconPosition","onClick","onBlur","onKeyDown","isDisabled","href","target","rel","accessibilityLabel","_ref$size","size","testID","hitSlop","htmlTitle","styledProps","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","_jsx","BaseLink","Object","assign","variant","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","activeDescendant","undefined","e","event","DropdownLink","assignWithoutSideEffects","componentId","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,CAAC,CAEK,IAAAE,YAAY,CAAGC,wBAAwB,CAAChD,aAAa,CAAE,CAC3DiD,WAAW,CAAEC,oBAAoB,CAACC,QAAQ,CAACJ,YAC7C,CAAC;;;;"}
1
+ {"version":3,"file":"DropdownLink.js","sources":["../../../../../src/components/Dropdown/DropdownLink.tsx"],"sourcesContent":["import React from 'react';\nimport { getActionListContainerRole } from '../ActionList/getA11yRoles';\nimport { BaseLink } from '../Link/BaseLink';\nimport type { BaseLinkProps } from '../Link/BaseLink';\nimport type { LinkButtonVariantProps } from '../Link';\nimport { useDropdown } from './useDropdown';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { assignWithoutSideEffects } from '~src/utils/assignWithoutSideEffects';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype DropdownLinkProps = LinkButtonVariantProps & {\n onBlur?: BaseLinkProps['onBlur'];\n onKeyDown?: BaseLinkProps['onKeyDown'];\n};\n\nconst _DropdownLink = ({\n children,\n icon,\n iconPosition = 'left',\n onClick,\n onBlur,\n onKeyDown,\n isDisabled,\n href,\n target,\n rel,\n accessibilityLabel,\n size = 'medium',\n testID,\n hitSlop,\n htmlTitle,\n ...props\n}: DropdownLinkProps): React.ReactElement => {\n const {\n onTriggerClick,\n onTriggerKeydown,\n dropdownBaseId,\n isOpen,\n activeIndex,\n hasFooterAction,\n triggererRef,\n } = useDropdown();\n\n return (\n // Using BaseButton here to avoid exporting onBlur and onKeyDown from Button\n // If in future we decide to export onBlur and onKeyDown on Button, this can be replaced with Button\n <BaseLink\n variant=\"button\"\n {...(icon ? { icon, children } : { children })}\n iconPosition={iconPosition}\n size={size}\n testID={testID}\n hitSlop={hitSlop}\n htmlTitle={htmlTitle}\n isDisabled={isDisabled}\n {...props}\n {...makeAnalyticsAttribute(props)}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={triggererRef as any}\n accessibilityProps={{\n label: accessibilityLabel,\n hasPopup: getActionListContainerRole(hasFooterAction, 'DropdownButton'),\n expanded: isOpen,\n controls: `${dropdownBaseId}-actionlist`,\n activeDescendant: activeIndex >= 0 ? `${dropdownBaseId}-${activeIndex}` : undefined,\n }}\n onClick={(e) => {\n onTriggerClick();\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onClick?.(e as any);\n }}\n onBlur={(e) => {\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onBlur?.(e as any);\n }}\n onKeyDown={(e) => {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onTriggerKeydown?.({ event: e as any });\n // Setting it for web fails it on native typecheck and vice versa\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n onKeyDown?.(e as any);\n }}\n />\n );\n};\n\nconst DropdownLink = assignWithoutSideEffects(_DropdownLink, {\n componentId: dropdownComponentIds.triggers.DropdownLink,\n});\n\nexport { DropdownLink };\n"],"names":["_DropdownLink","_ref","children","icon","_ref$iconPosition","iconPosition","onClick","onBlur","onKeyDown","isDisabled","href","target","rel","accessibilityLabel","_ref$size","size","testID","hitSlop","htmlTitle","props","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","onTriggerClick","onTriggerKeydown","dropdownBaseId","isOpen","activeIndex","hasFooterAction","triggererRef","_jsx","BaseLink","Object","assign","variant","makeAnalyticsAttribute","ref","accessibilityProps","label","hasPopup","getActionListContainerRole","expanded","controls","activeDescendant","undefined","e","event","DropdownLink","assignWithoutSideEffects","componentId","dropdownComponentIds","triggers"],"mappings":";;;;;;;;;;8KAeA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAiB0B,CAhB3C,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CA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perties';
1
2
  import 'react';
2
3
  import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.native.js';
3
4
  import { BaseBox } from '../../Box/BaseBox/BaseBox.native.js';
@@ -6,9 +7,10 @@ import 'react-native';
6
7
  import { getPlatformType } from '../../../utils/getPlatformType/getPlatformType.js';
7
8
  import '@babel/runtime/helpers/slicedToArray';
8
9
  import '../../BladeProvider/useTheme.js';
10
+ import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
9
11
  import { jsx } from 'react/jsx-runtime';
10
12
 
11
- var SelectorGroupField=function SelectorGroupField(_ref){var children=_ref.children,labelledBy=_ref.labelledBy,position=_ref.position,_ref$accessibilityRol=_ref.accessibilityRole,accessibilityRole=_ref$accessibilityRol===void 0?'group':_ref$accessibilityRol,componentName=_ref.componentName,testID=_ref.testID;var isReactNative=getPlatformType()==='react-native';var labelPosition=position==='top'?'column':'row';if(isReactNative)labelPosition='column';var role=accessibilityRole==='group'&&isReactNative?undefined:accessibilityRole;return jsx(BaseBox,Object.assign({display:"flex",flexDirection:labelPosition},makeAccessible({role:role,labelledBy:labelledBy}),metaAttribute({name:componentName,testID:testID}),{children:children}));};
13
+ var _excluded=["children","labelledBy","position","accessibilityRole","componentName","testID"];var SelectorGroupField=function SelectorGroupField(_ref){var children=_ref.children,labelledBy=_ref.labelledBy,position=_ref.position,_ref$accessibilityRol=_ref.accessibilityRole,accessibilityRole=_ref$accessibilityRol===void 0?'group':_ref$accessibilityRol,componentName=_ref.componentName,testID=_ref.testID,props=_objectWithoutProperties(_ref,_excluded);var isReactNative=getPlatformType()==='react-native';var labelPosition=position==='top'?'column':'row';if(isReactNative)labelPosition='column';var role=accessibilityRole==='group'&&isReactNative?undefined:accessibilityRole;return jsx(BaseBox,Object.assign({display:"flex",flexDirection:labelPosition},makeAccessible({role:role,labelledBy:labelledBy}),metaAttribute({name:componentName,testID:testID}),makeAnalyticsAttribute(props),{children:children}));};
12
14
 
13
15
  export { SelectorGroupField };
14
16
  //# sourceMappingURL=SelectorGroupField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectorGroupField.js","sources":["../../../../../../src/components/Form/Selector/SelectorGroupField.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { TestID } from '~utils/types';\nimport type { AriaRoles } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { getPlatformType } from '~utils';\n\ntype SelectorGroupFieldProps = {\n children: React.ReactNode;\n labelledBy: string;\n position?: 'top' | 'left';\n accessibilityRole?: AriaRoles;\n componentName: 'checkbox-group' | 'radio-group' | 'chip-group';\n} & TestID;\n\nconst SelectorGroupField = ({\n children,\n labelledBy,\n position,\n accessibilityRole = 'group',\n componentName,\n testID,\n}: SelectorGroupFieldProps): React.ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n let labelPosition: CSSObject['flexDirection'] = position === 'top' ? 'column' : 'row';\n if (isReactNative) labelPosition = 'column';\n const role = accessibilityRole === 'group' && isReactNative ? undefined : accessibilityRole;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={labelPosition}\n {...makeAccessible({\n role,\n labelledBy,\n })}\n {...metaAttribute({ name: componentName, testID })}\n >\n {children}\n </BaseBox>\n );\n};\n\nexport { SelectorGroupField };\n"],"names":["SelectorGroupField","_ref","children","labelledBy","position","_ref$accessibilityRol","accessibilityRole","componentName","testID","isReactNative","getPlatformType","labelPosition","role","undefined","_jsx","BaseBox","Object","assign","display","flexDirection","makeAccessible","metaAttribute","name"],"mappings":";;;;;;;;;;AAiBM,IAAAA,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAAC,IAAA,CAO2B,KANjDC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,UAAU,CAAAF,IAAA,CAAVE,UAAU,CACVC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAAAC,qBAAA,CAAAJ,IAAA,CACRK,iBAAiB,CAAjBA,iBAAiB,CAAAD,qBAAA,GAAG,KAAA,CAAA,CAAA,OAAO,CAAAA,qBAAA,CAC3BE,aAAa,CAAAN,IAAA,CAAbM,aAAa,CACbC,MAAM,CAAAP,IAAA,CAANO,MAAM,CAEN,IAAMC,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAC1D,IAAIC,aAAyC,CAAGP,QAAQ,GAAK,KAAK,CAAG,QAAQ,CAAG,KAAK,CACrF,GAAIK,aAAa,CAAEE,aAAa,CAAG,QAAQ,CAC3C,IAAMC,IAAI,CAAGN,iBAAiB,GAAK,OAAO,EAAIG,aAAa,CAAGI,SAAS,CAAGP,iBAAiB,CAE3F,OACEQ,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,CAAA,CACNC,OAAO,CAAC,MAAM,CACdC,aAAa,CAAER,aAAc,CAAA,CACzBS,cAAc,CAAC,CACjBR,IAAI,CAAJA,IAAI,CACJT,UAAU,CAAVA,UACF,CAAC,CAAC,CACEkB,aAAa,CAAC,CAAEC,IAAI,CAAEf,aAAa,CAAEC,MAAM,CAANA,MAAO,CAAC,CAAC,EAAAN,QAAA,CAEjDA,QAAQ,CACF,CAAA,CAAC,CAEd;;;;"}
1
+ {"version":3,"file":"SelectorGroupField.js","sources":["../../../../../../src/components/Form/Selector/SelectorGroupField.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport { metaAttribute } from '~utils/metaAttribute';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport type { AriaRoles } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { getPlatformType } from '~utils';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype SelectorGroupFieldProps = {\n children: React.ReactNode;\n labelledBy: string;\n position?: 'top' | 'left';\n accessibilityRole?: AriaRoles;\n componentName: 'checkbox-group' | 'radio-group' | 'chip-group';\n} & TestID &\n DataAnalyticsAttribute;\n\nconst SelectorGroupField = ({\n children,\n labelledBy,\n position,\n accessibilityRole = 'group',\n componentName,\n testID,\n ...props\n}: SelectorGroupFieldProps): React.ReactElement => {\n const isReactNative = getPlatformType() === 'react-native';\n let labelPosition: CSSObject['flexDirection'] = position === 'top' ? 'column' : 'row';\n if (isReactNative) labelPosition = 'column';\n const role = accessibilityRole === 'group' && isReactNative ? undefined : accessibilityRole;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={labelPosition}\n {...makeAccessible({\n role,\n labelledBy,\n })}\n {...metaAttribute({ name: componentName, testID })}\n {...makeAnalyticsAttribute(props)}\n >\n {children}\n </BaseBox>\n );\n};\n\nexport { SelectorGroupField };\n"],"names":["SelectorGroupField","_ref","children","labelledBy","position","_ref$accessibilityRol","accessibilityRole","componentName","testID","props","_objectWithoutProperties","_excluded","isReactNative","getPlatformType","labelPosition","role","undefined","_jsx","BaseBox","Object","assign","display","flexDirection","makeAccessible","metaAttribute","name","makeAnalyticsAttribute"],"mappings":";;;;;;;;;;;;gGAmBM,IAAAA,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAAC,IAAA,CAQ2B,CAAA,IAPjDC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,UAAU,CAAAF,IAAA,CAAVE,UAAU,CACVC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAAAC,qBAAA,CAAAJ,IAAA,CACRK,iBAAiB,CAAjBA,iBAAiB,CAAAD,qBAAA,GAAG,KAAA,CAAA,CAAA,OAAO,CAAAA,qBAAA,CAC3BE,aAAa,CAAAN,IAAA,CAAbM,aAAa,CACbC,MAAM,CAAAP,IAAA,CAANO,MAAM,CACHC,KAAK,CAAAC,wBAAA,CAAAT,IAAA,CAAAU,SAAA,CAER,CAAA,IAAMC,aAAa,CAAGC,eAAe,EAAE,GAAK,cAAc,CAC1D,IAAIC,aAAyC,CAAGV,QAAQ,GAAK,KAAK,CAAG,QAAQ,CAAG,KAAK,CACrF,GAAIQ,aAAa,CAAEE,aAAa,CAAG,QAAQ,CAC3C,IAAMC,IAAI,CAAGT,iBAAiB,GAAK,OAAO,EAAIM,aAAa,CAAGI,SAAS,CAAGV,iBAAiB,CAE3F,OACEW,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,CACNC,CAAAA,OAAO,CAAC,MAAM,CACdC,aAAa,CAAER,aAAc,EACzBS,cAAc,CAAC,CACjBR,IAAI,CAAJA,IAAI,CACJZ,UAAU,CAAVA,UACF,CAAC,CAAC,CACEqB,aAAa,CAAC,CAAEC,IAAI,CAAElB,aAAa,CAAEC,MAAM,CAANA,MAAO,CAAC,CAAC,CAC9CkB,sBAAsB,CAACjB,KAAK,CAAC,CAAAP,CAAAA,QAAA,CAEhCA,QAAQ,CAAA,CACF,CAAC,CAEd;;;;"}
@@ -25,8 +25,9 @@ import '../Typography/Code/Code.js';
25
25
  import { getStringFromReactText } from '../../utils/getStringChildren/getStringChildren.js';
26
26
  import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native.js';
27
27
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
28
+ import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
28
29
 
29
- var _excluded=["accessibilityLabel","children","size","color","emphasis","testID"];var _Indicator=function _Indicator(_ref){var accessibilityLabel=_ref.accessibilityLabel,children=_ref.children,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,_ref$color=_ref.color,color=_ref$color===void 0?'neutral':_ref$color,_ref$emphasis=_ref.emphasis,emphasis=_ref$emphasis===void 0?'subtle':_ref$emphasis,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var childrenString=getStringFromReactText(children);var isIntense=emphasis==='intense';var isPrimary=color==='primary';var fillColorOuter=isPrimary?theme.colors.surface.background.primary.subtle:theme.colors.feedback.background[color].subtle;var fillColorInner=isPrimary?theme.colors.surface.icon.primary.normal:theme.colors.feedback.icon[color].intense;var isWeb=!isReactNative();var a11yProps=makeAccessible(Object.assign({label:accessibilityLabel!=null?accessibilityLabel:childrenString},isWeb&&{role:'status'}));var svgSize=isIntense?indicatorDotSizes[emphasis][size].outer:indicatorDotSizes[emphasis][size].inner;return jsx(BaseBox,Object.assign({display:isWeb?'inline-flex':'flex'},a11yProps,metaAttribute({name:MetaConstants.Indicator,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsx(Svg,{width:String(svgSize),height:String(svgSize),viewBox:"0 0 10 10",fill:"none",children:isIntense?jsxs(Fragment,{children:[jsx(Circle,{cx:"5",cy:"5",r:"5",fill:fillColorOuter}),jsx(Circle,{cx:"5",cy:"5",r:"2.5",fill:fillColorInner})]}):jsx(Circle,{cx:"5",cy:"5",r:"5",fill:fillColorInner})}),jsx(BaseBox,{marginLeft:childrenString?'spacing.2':'spacing.0',children:jsx(Text,{weight:"medium",color:"surface.text.gray.subtle",textAlign:"left",size:textSizeMapping[size],children:children})})]})}));};var Indicator=assignWithoutSideEffects(_Indicator,{componentId:'Indicator'});
30
+ var _excluded=["accessibilityLabel","children","size","color","emphasis","testID"];var _Indicator=function _Indicator(_ref){var accessibilityLabel=_ref.accessibilityLabel,children=_ref.children,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,_ref$color=_ref.color,color=_ref$color===void 0?'neutral':_ref$color,_ref$emphasis=_ref.emphasis,emphasis=_ref$emphasis===void 0?'subtle':_ref$emphasis,testID=_ref.testID,rest=_objectWithoutProperties(_ref,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var childrenString=getStringFromReactText(children);var isIntense=emphasis==='intense';var isPrimary=color==='primary';var fillColorOuter=isPrimary?theme.colors.surface.background.primary.subtle:theme.colors.feedback.background[color].subtle;var fillColorInner=isPrimary?theme.colors.surface.icon.primary.normal:theme.colors.feedback.icon[color].intense;var isWeb=!isReactNative();var a11yProps=makeAccessible(Object.assign({label:accessibilityLabel!=null?accessibilityLabel:childrenString},isWeb&&{role:'status'}));var svgSize=isIntense?indicatorDotSizes[emphasis][size].outer:indicatorDotSizes[emphasis][size].inner;return jsx(BaseBox,Object.assign({display:isWeb?'inline-flex':'flex'},a11yProps,metaAttribute({name:MetaConstants.Indicator,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsxs(BaseBox,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsx(Svg,{width:String(svgSize),height:String(svgSize),viewBox:"0 0 10 10",fill:"none",children:isIntense?jsxs(Fragment,{children:[jsx(Circle,{cx:"5",cy:"5",r:"5",fill:fillColorOuter}),jsx(Circle,{cx:"5",cy:"5",r:"2.5",fill:fillColorInner})]}):jsx(Circle,{cx:"5",cy:"5",r:"5",fill:fillColorInner})}),jsx(BaseBox,{marginLeft:childrenString?'spacing.2':'spacing.0',children:jsx(Text,{weight:"medium",color:"surface.text.gray.subtle",textAlign:"left",size:textSizeMapping[size],children:children})})]})}));};var Indicator=assignWithoutSideEffects(_Indicator,{componentId:'Indicator'});
30
31
 
31
32
  export { Indicator };
32
33
  //# sourceMappingURL=Indicator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Indicator.js","sources":["../../../../../src/components/Indicator/Indicator.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { indicatorDotSizes, textSizeMapping } from './indicatorTokens';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport Svg from '~components/Icons/_Svg';\nimport Circle from '~components/Icons/_Svg/Circle';\nimport { Text } from '~components/Typography';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\ntype IndicatorProps = {\n /**\n * Sets the color tone\n *\n * @default neutral\n */\n color?: FeedbackColors | 'primary';\n\n /**\n * Sets the emphasis of the indicator\n *\n * If set to intense it will show a background circle\n *\n * @default subtle\n */\n emphasis?: 'subtle' | 'intense';\n\n /**\n * Size of the indicator\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * A text label to show alongside the indicator dot\n */\n children?: StringChildrenType;\n /**\n * a11y label for screen readers\n */\n accessibilityLabel?: string;\n} & TestID &\n StyledPropsBlade;\n\nconst _Indicator = ({\n accessibilityLabel,\n children,\n size = 'medium',\n color = 'neutral',\n emphasis = 'subtle',\n testID,\n ...styledProps\n}: IndicatorProps): ReactElement => {\n const { theme } = useTheme();\n const childrenString = getStringFromReactText(children);\n const isIntense = emphasis === 'intense';\n const isPrimary = color === 'primary';\n\n const fillColorOuter = isPrimary\n ? theme.colors.surface.background.primary.subtle\n : theme.colors.feedback.background[color].subtle;\n const fillColorInner = isPrimary\n ? theme.colors.surface.icon.primary.normal\n : theme.colors.feedback.icon[color].intense;\n\n const isWeb = !isReactNative();\n const a11yProps = makeAccessible({\n label: accessibilityLabel ?? childrenString,\n ...(isWeb && { role: 'status' }),\n });\n\n const svgSize = isIntense\n ? indicatorDotSizes[emphasis][size].outer\n : indicatorDotSizes[emphasis][size].inner;\n\n return (\n <BaseBox\n display={(isWeb ? 'inline-flex' : 'flex') as never}\n {...a11yProps}\n {...metaAttribute({ name: MetaConstants.Indicator, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox display=\"flex\" flexDirection=\"row\" alignItems=\"center\">\n <Svg width={String(svgSize)} height={String(svgSize)} viewBox=\"0 0 10 10\" fill=\"none\">\n {isIntense ? (\n <>\n <Circle cx=\"5\" cy=\"5\" r=\"5\" fill={fillColorOuter} />\n <Circle cx=\"5\" cy=\"5\" r=\"2.5\" fill={fillColorInner} />\n </>\n ) : (\n <Circle cx=\"5\" cy=\"5\" r=\"5\" fill={fillColorInner} />\n )}\n </Svg>\n <BaseBox marginLeft={childrenString ? 'spacing.2' : 'spacing.0'}>\n <Text\n weight=\"medium\"\n color=\"surface.text.gray.subtle\"\n textAlign=\"left\"\n size={textSizeMapping[size]}\n >\n {children}\n </Text>\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst Indicator = assignWithoutSideEffects(_Indicator, {\n componentId: 'Indicator',\n});\n\nexport type { IndicatorProps };\nexport { Indicator };\n"],"names":["_Indicator","_ref","accessibilityLabel","children","_ref$size","size","_ref$color","color","_ref$emphasis","emphasis","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","childrenString","getStringFromReactText","isIntense","isPrimary","fillColorOuter","colors","surface","background","primary","subtle","feedback","fillColorInner","icon","normal","intense","isWeb","isReactNative","a11yProps","makeAccessible","Object","assign","label","role","svgSize","indicatorDotSizes","outer","inner","_jsx","BaseBox","display","metaAttribute","name","MetaConstants","Indicator","getStyledProps","_jsxs","flexDirection","alignItems","Svg","width","String","height","viewBox","fill","_Fragment","Circle","cx","cy","r","marginLeft","Text","weight","textAlign","textSizeMapping","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,oBAAA,CAAA,UAAA,CAAA,MAAA,CAAA,OAAA,CAAA,UAAA,CAAA,QAAA,CAAA,CAkDA,IAAMA,UAAU,CAAG,SAAbA,UAAUA,CAAAC,IAAA,CAQoB,CAAA,IAPlCC,kBAAkB,CAAAD,IAAA,CAAlBC,kBAAkB,CAClBC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAAC,SAAA,CAAAH,IAAA,CACRI,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,SAAA,CAAAE,UAAA,CAAA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B,GAAA,CAACC,OAAO,CAAA,CAACqB,UAAU,CAAEjD,cAAc,CAAG,WAAW,CAAG,WAAY,CAAAd,QAAA,CAC9DyC,GAAA,CAACuB,IAAI,CAAA,CACHC,MAAM,CAAC,QAAQ,CACf7D,KAAK,CAAC,0BAA0B,CAChC8D,SAAS,CAAC,MAAM,CAChBhE,IAAI,CAAEiE,eAAe,CAACjE,IAAI,CAAE,CAAAF,QAAA,CAE3BA,QAAQ,CACL,CAAC,CACA,CAAC,CAAA,CACH,CAAC,CAAA,CACH,CAAC,CAEd,CAAC,CAEK,IAAA+C,SAAS,CAAGqB,wBAAwB,CAACvE,UAAU,CAAE,CACrDwE,WAAW,CAAE,WACf,CAAC;;;;"}
1
+ {"version":3,"file":"Indicator.js","sources":["../../../../../src/components/Indicator/Indicator.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { indicatorDotSizes, textSizeMapping } from './indicatorTokens';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport Svg from '~components/Icons/_Svg';\nimport Circle from '~components/Icons/_Svg/Circle';\nimport { Text } from '~components/Typography';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport type { DataAnalyticsAttribute, StringChildrenType, TestID } from '~utils/types';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype IndicatorProps = {\n /**\n * Sets the color tone\n *\n * @default neutral\n */\n color?: FeedbackColors | 'primary';\n\n /**\n * Sets the emphasis of the indicator\n *\n * If set to intense it will show a background circle\n *\n * @default subtle\n */\n emphasis?: 'subtle' | 'intense';\n\n /**\n * Size of the indicator\n *\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * A text label to show alongside the indicator dot\n */\n children?: StringChildrenType;\n /**\n * a11y label for screen readers\n */\n accessibilityLabel?: string;\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst _Indicator = ({\n accessibilityLabel,\n children,\n size = 'medium',\n color = 'neutral',\n emphasis = 'subtle',\n testID,\n ...rest\n}: IndicatorProps): ReactElement => {\n const { theme } = useTheme();\n const childrenString = getStringFromReactText(children);\n const isIntense = emphasis === 'intense';\n const isPrimary = color === 'primary';\n\n const fillColorOuter = isPrimary\n ? theme.colors.surface.background.primary.subtle\n : theme.colors.feedback.background[color].subtle;\n const fillColorInner = isPrimary\n ? theme.colors.surface.icon.primary.normal\n : theme.colors.feedback.icon[color].intense;\n\n const isWeb = !isReactNative();\n const a11yProps = makeAccessible({\n label: accessibilityLabel ?? childrenString,\n ...(isWeb && { role: 'status' }),\n });\n\n const svgSize = isIntense\n ? indicatorDotSizes[emphasis][size].outer\n : indicatorDotSizes[emphasis][size].inner;\n\n return (\n <BaseBox\n display={(isWeb ? 'inline-flex' : 'flex') as never}\n {...a11yProps}\n {...metaAttribute({ name: MetaConstants.Indicator, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox display=\"flex\" flexDirection=\"row\" alignItems=\"center\">\n <Svg width={String(svgSize)} height={String(svgSize)} viewBox=\"0 0 10 10\" fill=\"none\">\n {isIntense ? (\n <>\n <Circle cx=\"5\" cy=\"5\" r=\"5\" fill={fillColorOuter} />\n <Circle cx=\"5\" cy=\"5\" r=\"2.5\" fill={fillColorInner} />\n </>\n ) : (\n <Circle cx=\"5\" cy=\"5\" r=\"5\" fill={fillColorInner} />\n )}\n </Svg>\n <BaseBox marginLeft={childrenString ? 'spacing.2' : 'spacing.0'}>\n <Text\n weight=\"medium\"\n color=\"surface.text.gray.subtle\"\n textAlign=\"left\"\n size={textSizeMapping[size]}\n >\n {children}\n </Text>\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst Indicator = assignWithoutSideEffects(_Indicator, {\n componentId: 'Indicator',\n});\n\nexport type { IndicatorProps };\nexport { Indicator };\n"],"names":["_Indicator","_ref","accessibilityLabel","children","_ref$size","size","_ref$color","color","_ref$emphasis","emphasis","testID","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","childrenString","getStringFromReactText","isIntense","isPrimary","fillColorOuter","colors","surface","background","primary","subtle","feedback","fillColorInner","icon","normal","intense","isWeb","isReactNative","a11yProps","makeAccessible","Object","assign","label","role","svgSize","indicatorDotSizes","outer","inner","_jsx","BaseBox","display","metaAttribute","name","MetaConstants","Indicator","getStyledProps","makeAnalyticsAttribute","_jsxs","flexDirection","alignItems","Svg","width","String","height","viewBox","fill","_Fragment","Circle","cx","cy","r","marginLeft","Text","weight","textAlign","textSizeMapping","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,oBAAA,CAAA,UAAA,CAAA,MAAA,CAAA,OAAA,CAAA,UAAA,CAAA,QAAA,CAAA,CAoDA,IAAMA,UAAU,CAAG,SAAbA,UAAUA,CAAAC,IAAA,CAQoB,CAAA,IAPlCC,kBAAkB,CAAAD,IAAA,CAAlBC,kBAAkB,CAClBC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAAC,SAAA,CAAAH,IAAA,CACRI,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAA,KAAA,CAAA,CAAG,QAAQ,CAAAA,SAAA,CAAAE,UAAA,CAAAL,IAAA,CACfM,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAG,KAAA,CAAA,CAAA,SAAS,CAAAA,UAAA,CAAAE,aAAA,CAAAP,IAAA,CACjBQ,QAAQ,CAARA,QAAQ,CAAAD,aAAA,GAAA,KAAA,CAAA,CAAG,QAAQ,CAAAA,aAAA,CACnBE,MAAM,CAAAT,IAAA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,CAAC,MAAM,CAChBjE,IAAI,CAAEkE,eAAe,CAAClE,IAAI,CAAE,CAAAF,QAAA,CAE3BA,QAAQ,CACL,CAAC,CACA,CAAC,CAAA,CACH,CAAC,CAAA,CACH,CAAC,CAEd,CAAC,CAEK,IAAA+C,SAAS,CAAGsB,wBAAwB,CAACxE,UAAU,CAAE,CACrDyE,WAAW,CAAE,WACf,CAAC;;;;"}
@@ -37,8 +37,9 @@ import { announce } from '../../LiveAnnouncer/LiveAnnouncer.native.js';
37
37
  import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
38
38
  import { getFocusRingStyles } from '../../../utils/getFocusRingStyles/getFocusRingStyles.native.js';
39
39
  import { useMergeRefs } from '../../../utils/useMergeRefs.js';
40
+ import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
40
41
 
41
- var _excluded=["as","label","labelPosition","placeholder","type","defaultValue","tags","showAllTags","activeTagIndex","setActiveTagIndex","name","value","onFocus","onChange","onInput","onBlur","onSubmit","onClick","onKeyDown","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","onTrailingInteractionElementClick","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","size","trailingButton","valueComponentType","isTableInputCell","showHintsAsTooltip"];var autoCompleteSuggestionTypeValues=['none','on','name','email','username','password','newPassword','oneTimeCode','telephone','postalCode','countryName','creditCardNumber','creditCardCSC','creditCardExpiry','creditCardExpiryMonth','creditCardExpiryYear'];var useTags=function useTags(tags,activeTagIndex,setActiveTagIndex){var visibleTagsCountRef=React__default.useRef(0);React__default.useEffect(function(){if(tags&&activeTagIndex>=0&&activeTagIndex<tags.length){var _tags$activeTagIndex,_tags$activeTagIndex$;var tagTitle=(_tags$activeTagIndex=tags[activeTagIndex])==null?void 0:(_tags$activeTagIndex$=_tags$activeTagIndex.props)==null?void 0:_tags$activeTagIndex$.children;if(tagTitle){announce(`Close ${tagTitle} Tag`);}}},[activeTagIndex,tags==null?void 0:tags.length]);var onTagLeft=function onTagLeft(){if(activeTagIndex<0){setActiveTagIndex==null?void 0:setActiveTagIndex(visibleTagsCountRef.current-1);}if(activeTagIndex>0){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex-1);}};var onTagRight=function onTagRight(){if(activeTagIndex<visibleTagsCountRef.current-1){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex+1);}};var onTagRemove=function onTagRemove(){if(activeTagIndex>=0&&activeTagIndex<visibleTagsCountRef.current&&tags){tags[activeTagIndex].props.onDismiss({tagIndex:activeTagIndex});}};var onInputKeydownTagHandler=function onInputKeydownTagHandler(key){if(tags&&tags.length>0){if(key==='ArrowRight'){onTagRight();}if(key==='ArrowLeft'){onTagLeft();}if(key==='Backspace'){onTagRemove();}}};return {onInputKeydownTagHandler:onInputKeydownTagHandler,visibleTagsCountRef:visibleTagsCountRef};};var useInput=function useInput(_ref){var value=_ref.value,defaultValue=_ref.defaultValue,onClick=_ref.onClick,onFocus=_ref.onFocus,onChange=_ref.onChange,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,onInput=_ref.onInput,onKeyDown=_ref.onKeyDown,onInputKeydownTagHandler=_ref.onInputKeydownTagHandler;if(__DEV__){if(value&&defaultValue){throwBladeError({message:`Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,moduleName:'Input'});}}var _React$useState=React__default.useState(defaultValue!=null?defaultValue:value),_React$useState2=_slicedToArray(_React$useState,2),inputValue=_React$useState2[0],setInputValue=_React$useState2[1];var handleOnFocus=React__default.useCallback(function(_ref2){var name=_ref2.name,value=_ref2.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value;_value=(_value$target$value=value==null?void 0:value.target.value)!=null?_value$target$value:'';}onFocus==null?void 0:onFocus({name:name,value:_value});},[onFocus]);var handleOnClick=React__default.useCallback(function(_ref3){var name=_ref3.name,value=_ref3.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$currentTarget$;_value=(_value$currentTarget$=value==null?void 0:value.currentTarget.value)!=null?_value$currentTarget$:'';}onClick==null?void 0:onClick({name:name,value:_value});},[onClick]);var handleOnSubmit=React__default.useCallback(function(_ref4){var name=_ref4.name,value=_ref4.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value2;_value=(_value$target$value2=value==null?void 0:value.target.value)!=null?_value$target$value2:'';}if(isReactNative()){onSubmit==null?void 0:onSubmit({name:name,value:_value});}},[onSubmit]);var handleOnBlur=React__default.useCallback(function(_ref5){var name=_ref5.name,value=_ref5.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value3;_value=(_value$target$value3=value==null?void 0:value.target.value)!=null?_value$target$value3:'';}onBlur==null?void 0:onBlur({name:name,value:_value});},[onBlur]);var handleOnChange=React__default.useCallback(function(_ref6){var name=_ref6.name,value=_ref6.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value4;_value=(_value$target$value4=value==null?void 0:value.target.value)!=null?_value$target$value4:'';}onChange==null?void 0:onChange({name:name,value:_value});setInputValue(_value);},[onChange]);var handleOnInput=React__default.useCallback(function(_ref7){var name=_ref7.name,value=_ref7.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value5;_value=(_value$target$value5=value==null?void 0:value.target.value)!=null?_value$target$value5:'';}onInput==null?void 0:onInput({name:name,value:_value});},[onInput]);var handleOnKeyDown=React__default.useCallback(function(_ref8){var name=_ref8.name,key=_ref8.key,code=_ref8.code,event=_ref8.event;onInputKeydownTagHandler(key);onKeyDown==null?void 0:onKeyDown({name:name,key:key,code:code,event:event});},[onKeyDown]);return {handleOnFocus:handleOnFocus,handleOnClick:handleOnClick,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,inputValue:inputValue};};var getHintType=function getHintType(_ref9){var validationState=_ref9.validationState,hasHelpText=_ref9.hasHelpText;if(validationState==='error'){return 'error';}if(validationState==='success'){return 'success';}if(hasHelpText){return 'help';}return 'help';};var getDescribedByElementId=function getDescribedByElementId(_ref10){var validationState=_ref10.validationState,hasErrorText=_ref10.hasErrorText,hasSuccessText=_ref10.hasSuccessText,hasHelpText=_ref10.hasHelpText,errorTextId=_ref10.errorTextId,successTextId=_ref10.successTextId,helpTextId=_ref10.helpTextId;if(validationState==='error'&&hasErrorText){return errorTextId;}if(validationState==='success'&&hasSuccessText){return successTextId;}if(hasHelpText){return helpTextId;}return '';};var FocusRingWrapper=styled(BaseBox)(function(_ref11){var theme=_ref11.theme,currentInteraction=_ref11.currentInteraction,isTableInputCell=_ref11.isTableInputCell;return {borderRadius:makeBorderSize(isTableInputCell?theme.border.radius.none:theme.border.radius.medium),width:'100%','&:focus-within':!isTableInputCell?Object.assign({},getFocusRingStyles(),{transitionDuration:castWebType(makeMotionTime(getIn(theme.motion.duration,baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].duration))),transitionTimingFunction:castWebType(getIn(theme.motion.easing,baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].easing))}):{}};});var _BaseInput=function _BaseInput(_ref12,ref){var _ref12$as=_ref12.as,as=_ref12$as===void 0?'input':_ref12$as,label=_ref12.label,_ref12$labelPosition=_ref12.labelPosition,labelPosition=_ref12$labelPosition===void 0?'top':_ref12$labelPosition,placeholder=_ref12.placeholder,_ref12$type=_ref12.type,type=_ref12$type===void 0?'text':_ref12$type,defaultValue=_ref12.defaultValue,tags=_ref12.tags,_ref12$showAllTags=_ref12.showAllTags,showAllTags=_ref12$showAllTags===void 0?false:_ref12$showAllTags,_ref12$activeTagIndex=_ref12.activeTagIndex,activeTagIndex=_ref12$activeTagIndex===void 0?-1:_ref12$activeTagIndex,setActiveTagIndex=_ref12.setActiveTagIndex,name=_ref12.name,value=_ref12.value,onFocus=_ref12.onFocus,onChange=_ref12.onChange,onInput=_ref12.onInput,onBlur=_ref12.onBlur,onSubmit=_ref12.onSubmit,onClick=_ref12.onClick,onKeyDown=_ref12.onKeyDown,isDisabled=_ref12.isDisabled,necessityIndicator=_ref12.necessityIndicator,validationState=_ref12.validationState,errorText=_ref12.errorText,helpText=_ref12.helpText,successText=_ref12.successText,isRequired=_ref12.isRequired,leadingIcon=_ref12.leadingIcon,prefix=_ref12.prefix,trailingInteractionElement=_ref12.trailingInteractionElement,onTrailingInteractionElementClick=_ref12.onTrailingInteractionElementClick,leadingInteractionElement=_ref12.leadingInteractionElement,suffix=_ref12.suffix,trailingIcon=_ref12.trailingIcon,maxCharacters=_ref12.maxCharacters,textAlign=_ref12.textAlign,autoFocus=_ref12.autoFocus,keyboardReturnKeyType=_ref12.keyboardReturnKeyType,keyboardType=_ref12.keyboardType,autoCompleteSuggestionType=_ref12.autoCompleteSuggestionType,trailingHeaderSlot=_ref12.trailingHeaderSlot,trailingFooterSlot=_ref12.trailingFooterSlot,numberOfLines=_ref12.numberOfLines,id=_ref12.id,componentName=_ref12.componentName,accessibilityLabel=_ref12.accessibilityLabel,labelId=_ref12.labelId,activeDescendant=_ref12.activeDescendant,hideLabelText=_ref12.hideLabelText,hideFormHint=_ref12.hideFormHint,hasPopup=_ref12.hasPopup,popupId=_ref12.popupId,isPopupExpanded=_ref12.isPopupExpanded,maxTagRows=_ref12.maxTagRows,shouldIgnoreBlurAnimation=_ref12.shouldIgnoreBlurAnimation,setShouldIgnoreBlurAnimation=_ref12.setShouldIgnoreBlurAnimation,autoCapitalize=_ref12.autoCapitalize,setInputWrapperRef=_ref12.setInputWrapperRef,testID=_ref12.testID,isDropdownTrigger=_ref12.isDropdownTrigger,isLabelInsideInput=_ref12.isLabelInsideInput,_ref12$size=_ref12.size,size=_ref12$size===void 0?'medium':_ref12$size,trailingButton=_ref12.trailingButton,_ref12$valueComponent=_ref12.valueComponentType,valueComponentType=_ref12$valueComponent===void 0?'text':_ref12$valueComponent,_ref12$isTableInputCe=_ref12.isTableInputCell,isTableInputCell=_ref12$isTableInputCe===void 0?false:_ref12$isTableInputCe,_ref12$showHintsAsToo=_ref12.showHintsAsTooltip,showHintsAsTooltip=_ref12$showHintsAsToo===void 0?false:_ref12$showHintsAsToo,styledProps=_objectWithoutProperties(_ref12,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var inputRef=React__default.useRef(null);var mergedInputRef=useMergeRefs(ref,inputRef);var inputWrapperRef=React__default.useRef(null);var _useTags=useTags(tags,activeTagIndex,setActiveTagIndex),onInputKeydownTagHandler=_useTags.onInputKeydownTagHandler,visibleTagsCountRef=_useTags.visibleTagsCountRef;var _React$useState3=React__default.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),showAllTagsWithAnimation=_React$useState4[0],setShowAllTagsWithAnimation=_React$useState4[1];var isReactNative=getPlatformType()==='react-native';React__default.useEffect(function(){if(showAllTags){setShowAllTagsWithAnimation(true);}else if(maxTagRows!=='expandable'){setShowAllTagsWithAnimation(false);}},[showAllTags,maxTagRows]);var _useInput=useInput({defaultValue:defaultValue,value:value,onFocus:onFocus,onClick:onClick,onChange:onChange,onBlur:onBlur,onSubmit:onSubmit,onInput:onInput,onKeyDown:onKeyDown,onInputKeydownTagHandler:onInputKeydownTagHandler}),handleOnFocus=_useInput.handleOnFocus,handleOnChange=_useInput.handleOnChange,handleOnClick=_useInput.handleOnClick,handleOnBlur=_useInput.handleOnBlur,handleOnSubmit=_useInput.handleOnSubmit,handleOnInput=_useInput.handleOnInput,handleOnKeyDown=_useInput.handleOnKeyDown,inputValue=_useInput.inputValue;var _useFormId=useFormId(id),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isLabelLeftPositioned=labelPosition==='left'&&matchedDeviceType==='desktop';var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction;var _isRequired=isRequired||necessityIndicator==='required';var accessibilityProps=makeAccessible({required:Boolean(_isRequired),disabled:Boolean(isDisabled),invalid:Boolean(validationState==='error'),describedBy:getDescribedByElementId({validationState:validationState,hasErrorText:Boolean(errorText),hasSuccessText:Boolean(successText),hasHelpText:Boolean(helpText),errorTextId:errorTextId,successTextId:successTextId,helpTextId:helpTextId}),label:accessibilityLabel,hasPopup:hasPopup,expanded:hasPopup?isPopupExpanded:undefined,controls:hasPopup?popupId:undefined,role:hasPopup?'combobox':undefined,activeDescendant:activeDescendant});var willRenderHintText=Boolean(helpText)||validationState==='success'&&Boolean(successText)||validationState==='error'&&Boolean(errorText);if(__DEV__){if(autoCompleteSuggestionType&&!autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)){throwBladeError({message:`Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(', ')} but received ${autoCompleteSuggestionType}`,moduleName:'Input'});}}var isTextArea=as==='textarea';return jsxs(BaseBox,Object.assign({},metaAttribute({name:componentName,testID:testID}),getStyledProps(styledProps),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',justifyContent:isLabelLeftPositioned?'center':undefined,alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",width:"100%",children:[!hideLabelText&&!isLabelInsideInput&&label&&jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'column':'row',justifyContent:"space-between",alignSelf:isTextArea?'flex-start':undefined,marginY:isTextArea&&isLabelLeftPositioned?'spacing.3':'spacing.0',children:[jsx(FormLabel,{as:"label",necessityIndicator:necessityIndicator,position:labelPosition,id:labelId,htmlFor:inputId,size:size,children:label}),trailingHeaderSlot==null?void 0:trailingHeaderSlot(value!=null?value:inputValue)]}),jsx(FocusRingWrapper,{currentInteraction:currentInteraction,isTableInputCell:isTableInputCell,children:jsxs(BaseInputWrapper,{isDropdownTrigger:isDropdownTrigger,isTextArea:isTextArea,isDisabled:isDisabled,validationState:validationState,currentInteraction:currentInteraction,isLabelLeftPositioned:isLabelLeftPositioned,showAllTags:showAllTags,setShowAllTagsWithAnimation:setShowAllTagsWithAnimation,ref:function ref(refNode){if(refNode){setInputWrapperRef==null?void 0:setInputWrapperRef(refNode);inputWrapperRef.current=refNode;}},maxTagRows:maxTagRows,size:size,numberOfLines:numberOfLines,onClick:function onClick(){if(!isReactNative){var _inputRef$current;(_inputRef$current=inputRef.current)==null?void 0:_inputRef$current.focus();}},isTableInputCell:isTableInputCell,children:[jsx(BaseInputVisuals,{size:size,leadingIcon:leadingIcon,prefix:prefix,isDisabled:isDisabled,leadingInteractionElement:leadingInteractionElement}),jsx(BaseInputTagSlot,{renderAs:as,tags:tags,isDisabled:isDisabled,showAllTags:showAllTagsWithAnimation,setFocusOnInput:function setFocusOnInput(){if(ref&&!isReactNative&&'current'in ref){var _ref$current;(_ref$current=ref.current)==null?void 0:_ref$current.focus();}},labelPrefix:isLabelInsideInput?label:undefined,isDropdownTrigger:isDropdownTrigger,visibleTagsCountRef:visibleTagsCountRef,handleOnInputClick:function handleOnInputClick(e){handleOnClick({name:name,value:isReactNative?value:e});},setShouldIgnoreBlurAnimation:setShouldIgnoreBlurAnimation,maxTagRows:maxTagRows,inputWrapperRef:inputWrapperRef,size:size,numberOfLines:numberOfLines,isTextArea:isTextArea,children:jsx(StyledBaseInput,Object.assign({as:as,id:inputId,ref:mergedInputRef,name:name,type:type,defaultValue:defaultValue,value:value,placeholder:placeholder,isDisabled:isDisabled,validationState:validationState,isRequired:_isRequired,handleOnFocus:handleOnFocus,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,handleOnClick:handleOnClick,leadingIcon:leadingIcon,prefix:prefix,trailingInteractionElement:trailingInteractionElement,leadingInteractionElement:leadingInteractionElement,suffix:suffix,trailingIcon:trailingIcon,maxCharacters:maxCharacters,textAlign:textAlign,autoFocus:autoFocus,keyboardReturnKeyType:keyboardReturnKeyType,keyboardType:keyboardType,autoCompleteSuggestionType:autoCompleteSuggestionType,accessibilityProps:accessibilityProps,currentInteraction:currentInteraction,setCurrentInteraction:setCurrentInteraction,numberOfLines:numberOfLines,isTextArea:isTextArea||maxTagRows==='multiple'||maxTagRows==='expandable',hasPopup:hasPopup,hasTags:!!(tags&&tags.length>0),shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,autoCapitalize:autoCapitalize,isDropdownTrigger:isDropdownTrigger,$size:size,valueComponentType:valueComponentType,isTableInputCell:isTableInputCell},metaAttribute({name:MetaConstants.StyledBaseInput})))}),jsx(BaseInputVisuals,{trailingInteractionElement:trailingInteractionElement,onTrailingInteractionElementClick:onTrailingInteractionElementClick,suffix:suffix,trailingIcon:trailingIcon,isDisabled:isDisabled,validationState:validationState,trailingButton:trailingButton,size:size,errorText:errorText,successText:successText,showHintsAsTooltip:showHintsAsTooltip})]})})]}),hideFormHint||showHintsAsTooltip?null:jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned&&!hideLabelText?formHintLeftLabelMarginLeft[size]:0),children:jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:willRenderHintText?'space-between':'flex-end',children:[jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId,size:size}),trailingFooterSlot==null?void 0:trailingFooterSlot(value!=null?value:inputValue)]})})]}));};var BaseInputWithRef=React__default.forwardRef(_BaseInput);var BaseInput=assignWithoutSideEffects(BaseInputWithRef,{displayName:'BaseInput'});
42
+ var _excluded=["as","label","labelPosition","placeholder","type","defaultValue","tags","showAllTags","activeTagIndex","setActiveTagIndex","name","value","onFocus","onChange","onInput","onBlur","onSubmit","onClick","onKeyDown","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","onTrailingInteractionElementClick","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","size","trailingButton","valueComponentType","isTableInputCell","showHintsAsTooltip"];var autoCompleteSuggestionTypeValues=['none','on','name','email','username','password','newPassword','oneTimeCode','telephone','postalCode','countryName','creditCardNumber','creditCardCSC','creditCardExpiry','creditCardExpiryMonth','creditCardExpiryYear'];var useTags=function useTags(tags,activeTagIndex,setActiveTagIndex){var visibleTagsCountRef=React__default.useRef(0);React__default.useEffect(function(){if(tags&&activeTagIndex>=0&&activeTagIndex<tags.length){var _tags$activeTagIndex,_tags$activeTagIndex$;var tagTitle=(_tags$activeTagIndex=tags[activeTagIndex])==null?void 0:(_tags$activeTagIndex$=_tags$activeTagIndex.props)==null?void 0:_tags$activeTagIndex$.children;if(tagTitle){announce(`Close ${tagTitle} Tag`);}}},[activeTagIndex,tags==null?void 0:tags.length]);var onTagLeft=function onTagLeft(){if(activeTagIndex<0){setActiveTagIndex==null?void 0:setActiveTagIndex(visibleTagsCountRef.current-1);}if(activeTagIndex>0){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex-1);}};var onTagRight=function onTagRight(){if(activeTagIndex<visibleTagsCountRef.current-1){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex+1);}};var onTagRemove=function onTagRemove(){if(activeTagIndex>=0&&activeTagIndex<visibleTagsCountRef.current&&tags){tags[activeTagIndex].props.onDismiss({tagIndex:activeTagIndex});}};var onInputKeydownTagHandler=function onInputKeydownTagHandler(key){if(tags&&tags.length>0){if(key==='ArrowRight'){onTagRight();}if(key==='ArrowLeft'){onTagLeft();}if(key==='Backspace'){onTagRemove();}}};return {onInputKeydownTagHandler:onInputKeydownTagHandler,visibleTagsCountRef:visibleTagsCountRef};};var useInput=function useInput(_ref){var value=_ref.value,defaultValue=_ref.defaultValue,onClick=_ref.onClick,onFocus=_ref.onFocus,onChange=_ref.onChange,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,onInput=_ref.onInput,onKeyDown=_ref.onKeyDown,onInputKeydownTagHandler=_ref.onInputKeydownTagHandler;if(__DEV__){if(value&&defaultValue){throwBladeError({message:`Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,moduleName:'Input'});}}var _React$useState=React__default.useState(defaultValue!=null?defaultValue:value),_React$useState2=_slicedToArray(_React$useState,2),inputValue=_React$useState2[0],setInputValue=_React$useState2[1];var handleOnFocus=React__default.useCallback(function(_ref2){var name=_ref2.name,value=_ref2.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value;_value=(_value$target$value=value==null?void 0:value.target.value)!=null?_value$target$value:'';}onFocus==null?void 0:onFocus({name:name,value:_value});},[onFocus]);var handleOnClick=React__default.useCallback(function(_ref3){var name=_ref3.name,value=_ref3.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$currentTarget$;_value=(_value$currentTarget$=value==null?void 0:value.currentTarget.value)!=null?_value$currentTarget$:'';}onClick==null?void 0:onClick({name:name,value:_value});},[onClick]);var handleOnSubmit=React__default.useCallback(function(_ref4){var name=_ref4.name,value=_ref4.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value2;_value=(_value$target$value2=value==null?void 0:value.target.value)!=null?_value$target$value2:'';}if(isReactNative()){onSubmit==null?void 0:onSubmit({name:name,value:_value});}},[onSubmit]);var handleOnBlur=React__default.useCallback(function(_ref5){var name=_ref5.name,value=_ref5.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value3;_value=(_value$target$value3=value==null?void 0:value.target.value)!=null?_value$target$value3:'';}onBlur==null?void 0:onBlur({name:name,value:_value});},[onBlur]);var handleOnChange=React__default.useCallback(function(_ref6){var name=_ref6.name,value=_ref6.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value4;_value=(_value$target$value4=value==null?void 0:value.target.value)!=null?_value$target$value4:'';}onChange==null?void 0:onChange({name:name,value:_value});setInputValue(_value);},[onChange]);var handleOnInput=React__default.useCallback(function(_ref7){var name=_ref7.name,value=_ref7.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value5;_value=(_value$target$value5=value==null?void 0:value.target.value)!=null?_value$target$value5:'';}onInput==null?void 0:onInput({name:name,value:_value});},[onInput]);var handleOnKeyDown=React__default.useCallback(function(_ref8){var name=_ref8.name,key=_ref8.key,code=_ref8.code,event=_ref8.event;onInputKeydownTagHandler(key);onKeyDown==null?void 0:onKeyDown({name:name,key:key,code:code,event:event});},[onKeyDown]);return {handleOnFocus:handleOnFocus,handleOnClick:handleOnClick,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,inputValue:inputValue};};var getHintType=function getHintType(_ref9){var validationState=_ref9.validationState,hasHelpText=_ref9.hasHelpText;if(validationState==='error'){return 'error';}if(validationState==='success'){return 'success';}if(hasHelpText){return 'help';}return 'help';};var getDescribedByElementId=function getDescribedByElementId(_ref10){var validationState=_ref10.validationState,hasErrorText=_ref10.hasErrorText,hasSuccessText=_ref10.hasSuccessText,hasHelpText=_ref10.hasHelpText,errorTextId=_ref10.errorTextId,successTextId=_ref10.successTextId,helpTextId=_ref10.helpTextId;if(validationState==='error'&&hasErrorText){return errorTextId;}if(validationState==='success'&&hasSuccessText){return successTextId;}if(hasHelpText){return helpTextId;}return '';};var FocusRingWrapper=styled(BaseBox)(function(_ref11){var theme=_ref11.theme,currentInteraction=_ref11.currentInteraction,isTableInputCell=_ref11.isTableInputCell;return {borderRadius:makeBorderSize(isTableInputCell?theme.border.radius.none:theme.border.radius.medium),width:'100%','&:focus-within':!isTableInputCell?Object.assign({},getFocusRingStyles(),{transitionDuration:castWebType(makeMotionTime(getIn(theme.motion.duration,baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].duration))),transitionTimingFunction:castWebType(getIn(theme.motion.easing,baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].easing))}):{}};});var _BaseInput=function _BaseInput(_ref12,ref){var _ref12$as=_ref12.as,as=_ref12$as===void 0?'input':_ref12$as,label=_ref12.label,_ref12$labelPosition=_ref12.labelPosition,labelPosition=_ref12$labelPosition===void 0?'top':_ref12$labelPosition,placeholder=_ref12.placeholder,_ref12$type=_ref12.type,type=_ref12$type===void 0?'text':_ref12$type,defaultValue=_ref12.defaultValue,tags=_ref12.tags,_ref12$showAllTags=_ref12.showAllTags,showAllTags=_ref12$showAllTags===void 0?false:_ref12$showAllTags,_ref12$activeTagIndex=_ref12.activeTagIndex,activeTagIndex=_ref12$activeTagIndex===void 0?-1:_ref12$activeTagIndex,setActiveTagIndex=_ref12.setActiveTagIndex,name=_ref12.name,value=_ref12.value,onFocus=_ref12.onFocus,onChange=_ref12.onChange,onInput=_ref12.onInput,onBlur=_ref12.onBlur,onSubmit=_ref12.onSubmit,onClick=_ref12.onClick,onKeyDown=_ref12.onKeyDown,isDisabled=_ref12.isDisabled,necessityIndicator=_ref12.necessityIndicator,validationState=_ref12.validationState,errorText=_ref12.errorText,helpText=_ref12.helpText,successText=_ref12.successText,isRequired=_ref12.isRequired,leadingIcon=_ref12.leadingIcon,prefix=_ref12.prefix,trailingInteractionElement=_ref12.trailingInteractionElement,onTrailingInteractionElementClick=_ref12.onTrailingInteractionElementClick,leadingInteractionElement=_ref12.leadingInteractionElement,suffix=_ref12.suffix,trailingIcon=_ref12.trailingIcon,maxCharacters=_ref12.maxCharacters,textAlign=_ref12.textAlign,autoFocus=_ref12.autoFocus,keyboardReturnKeyType=_ref12.keyboardReturnKeyType,keyboardType=_ref12.keyboardType,autoCompleteSuggestionType=_ref12.autoCompleteSuggestionType,trailingHeaderSlot=_ref12.trailingHeaderSlot,trailingFooterSlot=_ref12.trailingFooterSlot,numberOfLines=_ref12.numberOfLines,id=_ref12.id,componentName=_ref12.componentName,accessibilityLabel=_ref12.accessibilityLabel,labelId=_ref12.labelId,activeDescendant=_ref12.activeDescendant,hideLabelText=_ref12.hideLabelText,hideFormHint=_ref12.hideFormHint,hasPopup=_ref12.hasPopup,popupId=_ref12.popupId,isPopupExpanded=_ref12.isPopupExpanded,maxTagRows=_ref12.maxTagRows,shouldIgnoreBlurAnimation=_ref12.shouldIgnoreBlurAnimation,setShouldIgnoreBlurAnimation=_ref12.setShouldIgnoreBlurAnimation,autoCapitalize=_ref12.autoCapitalize,setInputWrapperRef=_ref12.setInputWrapperRef,testID=_ref12.testID,isDropdownTrigger=_ref12.isDropdownTrigger,isLabelInsideInput=_ref12.isLabelInsideInput,_ref12$size=_ref12.size,size=_ref12$size===void 0?'medium':_ref12$size,trailingButton=_ref12.trailingButton,_ref12$valueComponent=_ref12.valueComponentType,valueComponentType=_ref12$valueComponent===void 0?'text':_ref12$valueComponent,_ref12$isTableInputCe=_ref12.isTableInputCell,isTableInputCell=_ref12$isTableInputCe===void 0?false:_ref12$isTableInputCe,_ref12$showHintsAsToo=_ref12.showHintsAsTooltip,showHintsAsTooltip=_ref12$showHintsAsToo===void 0?false:_ref12$showHintsAsToo,rest=_objectWithoutProperties(_ref12,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var inputRef=React__default.useRef(null);var mergedInputRef=useMergeRefs(ref,inputRef);var inputWrapperRef=React__default.useRef(null);var _useTags=useTags(tags,activeTagIndex,setActiveTagIndex),onInputKeydownTagHandler=_useTags.onInputKeydownTagHandler,visibleTagsCountRef=_useTags.visibleTagsCountRef;var _React$useState3=React__default.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),showAllTagsWithAnimation=_React$useState4[0],setShowAllTagsWithAnimation=_React$useState4[1];var isReactNative=getPlatformType()==='react-native';React__default.useEffect(function(){if(showAllTags){setShowAllTagsWithAnimation(true);}else if(maxTagRows!=='expandable'){setShowAllTagsWithAnimation(false);}},[showAllTags,maxTagRows]);var _useInput=useInput({defaultValue:defaultValue,value:value,onFocus:onFocus,onClick:onClick,onChange:onChange,onBlur:onBlur,onSubmit:onSubmit,onInput:onInput,onKeyDown:onKeyDown,onInputKeydownTagHandler:onInputKeydownTagHandler}),handleOnFocus=_useInput.handleOnFocus,handleOnChange=_useInput.handleOnChange,handleOnClick=_useInput.handleOnClick,handleOnBlur=_useInput.handleOnBlur,handleOnSubmit=_useInput.handleOnSubmit,handleOnInput=_useInput.handleOnInput,handleOnKeyDown=_useInput.handleOnKeyDown,inputValue=_useInput.inputValue;var _useFormId=useFormId(id),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isLabelLeftPositioned=labelPosition==='left'&&matchedDeviceType==='desktop';var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction;var _isRequired=isRequired||necessityIndicator==='required';var accessibilityProps=makeAccessible({required:Boolean(_isRequired),disabled:Boolean(isDisabled),invalid:Boolean(validationState==='error'),describedBy:getDescribedByElementId({validationState:validationState,hasErrorText:Boolean(errorText),hasSuccessText:Boolean(successText),hasHelpText:Boolean(helpText),errorTextId:errorTextId,successTextId:successTextId,helpTextId:helpTextId}),label:accessibilityLabel,hasPopup:hasPopup,expanded:hasPopup?isPopupExpanded:undefined,controls:hasPopup?popupId:undefined,role:hasPopup?'combobox':undefined,activeDescendant:activeDescendant});var willRenderHintText=Boolean(helpText)||validationState==='success'&&Boolean(successText)||validationState==='error'&&Boolean(errorText);if(__DEV__){if(autoCompleteSuggestionType&&!autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)){throwBladeError({message:`Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(', ')} but received ${autoCompleteSuggestionType}`,moduleName:'Input'});}}var isTextArea=as==='textarea';return jsxs(BaseBox,Object.assign({},metaAttribute({name:componentName,testID:testID}),getStyledProps(rest),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',justifyContent:isLabelLeftPositioned?'center':undefined,alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",width:"100%",children:[!hideLabelText&&!isLabelInsideInput&&label&&jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'column':'row',justifyContent:"space-between",alignSelf:isTextArea?'flex-start':undefined,marginY:isTextArea&&isLabelLeftPositioned?'spacing.3':'spacing.0',children:[jsx(FormLabel,{as:"label",necessityIndicator:necessityIndicator,position:labelPosition,id:labelId,htmlFor:inputId,size:size,children:label}),trailingHeaderSlot==null?void 0:trailingHeaderSlot(value!=null?value:inputValue)]}),jsx(FocusRingWrapper,{currentInteraction:currentInteraction,isTableInputCell:isTableInputCell,children:jsxs(BaseInputWrapper,{isDropdownTrigger:isDropdownTrigger,isTextArea:isTextArea,isDisabled:isDisabled,validationState:validationState,currentInteraction:currentInteraction,isLabelLeftPositioned:isLabelLeftPositioned,showAllTags:showAllTags,setShowAllTagsWithAnimation:setShowAllTagsWithAnimation,ref:function ref(refNode){if(refNode){setInputWrapperRef==null?void 0:setInputWrapperRef(refNode);inputWrapperRef.current=refNode;}},maxTagRows:maxTagRows,size:size,numberOfLines:numberOfLines,onClick:function onClick(){if(!isReactNative){var _inputRef$current;(_inputRef$current=inputRef.current)==null?void 0:_inputRef$current.focus();}},isTableInputCell:isTableInputCell,children:[jsx(BaseInputVisuals,{size:size,leadingIcon:leadingIcon,prefix:prefix,isDisabled:isDisabled,leadingInteractionElement:leadingInteractionElement}),jsx(BaseInputTagSlot,{renderAs:as,tags:tags,isDisabled:isDisabled,showAllTags:showAllTagsWithAnimation,setFocusOnInput:function setFocusOnInput(){if(ref&&!isReactNative&&'current'in ref){var _ref$current;(_ref$current=ref.current)==null?void 0:_ref$current.focus();}},labelPrefix:isLabelInsideInput?label:undefined,isDropdownTrigger:isDropdownTrigger,visibleTagsCountRef:visibleTagsCountRef,handleOnInputClick:function handleOnInputClick(e){handleOnClick({name:name,value:isReactNative?value:e});},setShouldIgnoreBlurAnimation:setShouldIgnoreBlurAnimation,maxTagRows:maxTagRows,inputWrapperRef:inputWrapperRef,size:size,numberOfLines:numberOfLines,isTextArea:isTextArea,children:jsx(StyledBaseInput,Object.assign({as:as,id:inputId,ref:mergedInputRef,name:name,type:type,defaultValue:defaultValue,value:value,placeholder:placeholder,isDisabled:isDisabled,validationState:validationState,isRequired:_isRequired,handleOnFocus:handleOnFocus,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,handleOnClick:handleOnClick,leadingIcon:leadingIcon,prefix:prefix,trailingInteractionElement:trailingInteractionElement,leadingInteractionElement:leadingInteractionElement,suffix:suffix,trailingIcon:trailingIcon,maxCharacters:maxCharacters,textAlign:textAlign,autoFocus:autoFocus,keyboardReturnKeyType:keyboardReturnKeyType,keyboardType:keyboardType,autoCompleteSuggestionType:autoCompleteSuggestionType,accessibilityProps:accessibilityProps,currentInteraction:currentInteraction,setCurrentInteraction:setCurrentInteraction,numberOfLines:numberOfLines,isTextArea:isTextArea||maxTagRows==='multiple'||maxTagRows==='expandable',hasPopup:hasPopup,hasTags:!!(tags&&tags.length>0),shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,autoCapitalize:autoCapitalize,isDropdownTrigger:isDropdownTrigger,$size:size,valueComponentType:valueComponentType,isTableInputCell:isTableInputCell},metaAttribute({name:MetaConstants.StyledBaseInput}),makeAnalyticsAttribute(rest)))}),jsx(BaseInputVisuals,{trailingInteractionElement:trailingInteractionElement,onTrailingInteractionElementClick:onTrailingInteractionElementClick,suffix:suffix,trailingIcon:trailingIcon,isDisabled:isDisabled,validationState:validationState,trailingButton:trailingButton,size:size,errorText:errorText,successText:successText,showHintsAsTooltip:showHintsAsTooltip})]})})]}),hideFormHint||showHintsAsTooltip?null:jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned&&!hideLabelText?formHintLeftLabelMarginLeft[size]:0),children:jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:willRenderHintText?'space-between':'flex-end',children:[jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId,size:size}),trailingFooterSlot==null?void 0:trailingFooterSlot(value!=null?value:inputValue)]})})]}));};var BaseInputWithRef=React__default.forwardRef(_BaseInput);var BaseInput=assignWithoutSideEffects(BaseInputWithRef,{displayName:'BaseInput'});
42
43
 
43
44
  export { BaseInput, getHintType };
44
45
  //# sourceMappingURL=BaseInput.js.map