@razorpay/blade 11.39.0 → 12.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (647) hide show
  1. package/build/lib/native/components/Accordion/Accordion.js +2 -2
  2. package/build/lib/native/components/Accordion/Accordion.js.map +1 -1
  3. package/build/lib/native/components/Accordion/AccordionButton.native.js +8 -10
  4. package/build/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
  5. package/build/lib/native/components/Accordion/AccordionItemBody.js +7 -8
  6. package/build/lib/native/components/Accordion/AccordionItemBody.js.map +1 -1
  7. package/build/lib/native/components/Accordion/AccordionItemHeader.js +3 -8
  8. package/build/lib/native/components/Accordion/AccordionItemHeader.js.map +1 -1
  9. package/build/lib/native/components/Accordion/commonStyles.js +1 -1
  10. package/build/lib/native/components/Accordion/commonStyles.js.map +1 -1
  11. package/build/lib/native/components/ActionList/ActionList.js +1 -1
  12. package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
  13. package/build/lib/native/components/ActionList/ActionListItem.js +9 -8
  14. package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
  15. package/build/lib/native/components/ActionList/ActionListNoResults.js +2 -1
  16. package/build/lib/native/components/ActionList/ActionListNoResults.js.map +1 -1
  17. package/build/lib/native/components/Alert/Alert.js +4 -3
  18. package/build/lib/native/components/Alert/Alert.js.map +1 -1
  19. package/build/lib/native/components/Amount/Amount.js +4 -2
  20. package/build/lib/native/components/Amount/Amount.js.map +1 -1
  21. package/build/lib/native/components/AnimateInteractions/AnimateInteractions.native.js +11 -0
  22. package/build/lib/native/components/AnimateInteractions/AnimateInteractions.native.js.map +1 -0
  23. package/build/lib/native/components/Badge/Badge.js +10 -9
  24. package/build/lib/native/components/Badge/Badge.js.map +1 -1
  25. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +11 -10
  26. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  27. package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +8 -6
  28. package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
  29. package/build/lib/native/components/BottomNav/BottomNav.native.js +4 -10
  30. package/build/lib/native/components/BottomNav/BottomNav.native.js.map +1 -1
  31. package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  32. package/build/lib/native/components/Box/Box.js +1 -1
  33. package/build/lib/native/components/Box/Box.js.map +1 -1
  34. package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
  35. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  36. package/build/lib/native/components/Card/Card.js +1 -1
  37. package/build/lib/native/components/Card/Card.js.map +1 -1
  38. package/build/lib/native/components/Card/CardFooter.js +4 -8
  39. package/build/lib/native/components/Card/CardFooter.js.map +1 -1
  40. package/build/lib/native/components/Card/CardHeader.js +5 -9
  41. package/build/lib/native/components/Card/CardHeader.js.map +1 -1
  42. package/build/lib/native/components/Card/CardRoot.native.js +1 -1
  43. package/build/lib/native/components/Card/CardRoot.native.js.map +1 -1
  44. package/build/lib/native/components/Carousel/Carousel.native.js +1 -1
  45. package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
  46. package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js +1 -1
  47. package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js.map +1 -1
  48. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  49. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  50. package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  51. package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  52. package/build/lib/native/components/Checkbox/Checkbox.js +6 -4
  53. package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
  54. package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js +1 -1
  55. package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js.map +1 -1
  56. package/build/lib/native/components/Chip/Chip.js +5 -3
  57. package/build/lib/native/components/Chip/Chip.js.map +1 -1
  58. package/build/lib/native/components/Chip/ChipGroup.js +4 -3
  59. package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
  60. package/build/lib/native/components/Chip/chipTokens.js +1 -1
  61. package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
  62. package/build/lib/native/components/Collapsible/Collapsible.js +2 -2
  63. package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
  64. package/build/lib/native/components/Collapsible/commonStyles.js +1 -1
  65. package/build/lib/native/components/Collapsible/commonStyles.js.map +1 -1
  66. package/build/lib/native/components/Counter/Counter.js +13 -12
  67. package/build/lib/native/components/Counter/Counter.js.map +1 -1
  68. package/build/lib/native/components/Divider/Divider.js +2 -2
  69. package/build/lib/native/components/Divider/Divider.js.map +1 -1
  70. package/build/lib/native/components/Drawer/Drawer.native.js +4 -10
  71. package/build/lib/native/components/Drawer/Drawer.native.js.map +1 -1
  72. package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js +4 -9
  73. package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js.map +1 -1
  74. package/build/lib/native/components/Dropdown/Dropdown.js +2 -1
  75. package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
  76. package/build/lib/native/components/Fade/Fade.native.js +11 -0
  77. package/build/lib/native/components/Fade/Fade.native.js.map +1 -0
  78. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +3 -9
  79. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  80. package/build/lib/native/components/Form/FormLabel.js +10 -10
  81. package/build/lib/native/components/Indicator/Indicator.js +7 -6
  82. package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
  83. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
  84. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
  85. package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
  86. package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
  87. package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +3 -3
  88. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +8 -10
  89. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  90. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +9 -8
  91. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
  92. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +1 -1
  93. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  94. package/build/lib/native/components/Link/BaseLink/BaseLink.js +1 -1
  95. package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
  96. package/build/lib/native/components/List/List.js +1 -1
  97. package/build/lib/native/components/List/List.js.map +1 -1
  98. package/build/lib/native/components/List/ListItem.js +8 -10
  99. package/build/lib/native/components/List/ListItem.js.map +1 -1
  100. package/build/lib/native/components/List/ListItemCode.js +3 -9
  101. package/build/lib/native/components/List/ListItemCode.js.map +1 -1
  102. package/build/lib/native/components/List/ListItemText.js +3 -8
  103. package/build/lib/native/components/List/ListItemText.js.map +1 -1
  104. package/build/lib/native/components/Menu/Menu.native.js +4 -10
  105. package/build/lib/native/components/Menu/Menu.native.js.map +1 -1
  106. package/build/lib/native/components/Menu/MenuItem.native.js +4 -10
  107. package/build/lib/native/components/Menu/MenuItem.native.js.map +1 -1
  108. package/build/lib/native/components/Menu/MenuOverlay.native.js +4 -10
  109. package/build/lib/native/components/Menu/MenuOverlay.native.js.map +1 -1
  110. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js +4 -10
  111. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js.map +1 -1
  112. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js +4 -10
  113. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js.map +1 -1
  114. package/build/lib/native/components/Modal/Modal.native.js +4 -9
  115. package/build/lib/native/components/Modal/Modal.native.js.map +1 -1
  116. package/build/lib/native/components/Modal/ModalBody.native.js +3 -8
  117. package/build/lib/native/components/Modal/ModalBody.native.js.map +1 -1
  118. package/build/lib/native/components/Modal/ModalFooter.native.js +3 -8
  119. package/build/lib/native/components/Modal/ModalFooter.native.js.map +1 -1
  120. package/build/lib/native/components/Modal/ModalHeader.native.js +3 -8
  121. package/build/lib/native/components/Modal/ModalHeader.native.js.map +1 -1
  122. package/build/lib/native/components/Morph/Morph.native.js +11 -0
  123. package/build/lib/native/components/Morph/Morph.native.js.map +1 -0
  124. package/build/lib/native/components/Move/Move.native.js +11 -0
  125. package/build/lib/native/components/Move/Move.native.js.map +1 -0
  126. package/build/lib/native/components/Popover/PopoverContent.js +6 -8
  127. package/build/lib/native/components/Popover/PopoverContent.js.map +1 -1
  128. package/build/lib/native/components/Popover/PopoverContentWrapper.native.js +1 -1
  129. package/build/lib/native/components/Popover/PopoverContentWrapper.native.js.map +1 -1
  130. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js +7 -9
  131. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
  132. package/build/lib/native/components/ProgressBar/CircularProgressLabel.js +3 -8
  133. package/build/lib/native/components/ProgressBar/CircularProgressLabel.js.map +1 -1
  134. package/build/lib/native/components/ProgressBar/ProgressBar.js +2 -2
  135. package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
  136. package/build/lib/native/components/Radio/Radio.js +2 -1
  137. package/build/lib/native/components/Radio/Radio.js.map +1 -1
  138. package/build/lib/native/components/Radio/RadioIcon/Fade.native.js +1 -1
  139. package/build/lib/native/components/Radio/RadioIcon/Fade.native.js.map +1 -1
  140. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  141. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  142. package/build/lib/native/components/Scale/Scale.native.js +11 -0
  143. package/build/lib/native/components/Scale/Scale.native.js.map +1 -0
  144. package/build/lib/native/components/SideNav/SideNav.native.js +4 -10
  145. package/build/lib/native/components/SideNav/SideNav.native.js.map +1 -1
  146. package/build/lib/native/components/SideNav/SideNavBody.native.js +4 -10
  147. package/build/lib/native/components/SideNav/SideNavBody.native.js.map +1 -1
  148. package/build/lib/native/components/SideNav/SideNavFooter.native.js +4 -10
  149. package/build/lib/native/components/SideNav/SideNavFooter.native.js.map +1 -1
  150. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js +4 -10
  151. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js.map +1 -1
  152. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js +4 -10
  153. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js.map +1 -1
  154. package/build/lib/native/components/SideNav/SideNavLevel.native.js +4 -10
  155. package/build/lib/native/components/SideNav/SideNavLevel.native.js.map +1 -1
  156. package/build/lib/native/components/SideNav/SideNavSection.native.js +4 -10
  157. package/build/lib/native/components/SideNav/SideNavSection.native.js.map +1 -1
  158. package/build/lib/native/components/SideNav/tokens.js.map +1 -1
  159. package/build/lib/native/components/Skeleton/PulseAnimation.native.js +1 -1
  160. package/build/lib/native/components/Skeleton/PulseAnimation.native.js.map +1 -1
  161. package/build/lib/native/components/Skeleton/Skeleton.js +2 -2
  162. package/build/lib/native/components/Skeleton/Skeleton.js.map +1 -1
  163. package/build/lib/native/components/Slide/Slide.native.js +11 -0
  164. package/build/lib/native/components/Slide/Slide.native.js.map +1 -0
  165. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +4 -3
  166. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  167. package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  168. package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  169. package/build/lib/native/components/Spinner/Spinner/Spinner.js +2 -1
  170. package/build/lib/native/components/Spinner/Spinner/Spinner.js.map +1 -1
  171. package/build/lib/native/components/Stagger/Stagger.native.js +11 -0
  172. package/build/lib/native/components/Stagger/Stagger.native.js.map +1 -0
  173. package/build/lib/native/components/StepGroup/StepGroup.native.js +4 -10
  174. package/build/lib/native/components/StepGroup/StepGroup.native.js.map +1 -1
  175. package/build/lib/native/components/StepGroup/StepItem.native.js +4 -10
  176. package/build/lib/native/components/StepGroup/StepItem.native.js.map +1 -1
  177. package/build/lib/native/components/Switch/Switch.js +2 -1
  178. package/build/lib/native/components/Switch/Switch.js.map +1 -1
  179. package/build/lib/native/components/Switch/getTrackStyles.js +1 -1
  180. package/build/lib/native/components/Switch/getTrackStyles.js.map +1 -1
  181. package/build/lib/native/components/Switch/switchTokens.js +1 -1
  182. package/build/lib/native/components/Switch/switchTokens.js.map +1 -1
  183. package/build/lib/native/components/Table/Table.native.js +4 -9
  184. package/build/lib/native/components/Table/Table.native.js.map +1 -1
  185. package/build/lib/native/components/Table/TableBody.native.js +3 -8
  186. package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
  187. package/build/lib/native/components/Table/TableEditableCell.native.js +3 -9
  188. package/build/lib/native/components/Table/TableEditableCell.native.js.map +1 -1
  189. package/build/lib/native/components/Table/TableFooter.native.js +3 -8
  190. package/build/lib/native/components/Table/TableFooter.native.js.map +1 -1
  191. package/build/lib/native/components/Table/TableHeader.native.js +3 -8
  192. package/build/lib/native/components/Table/TableHeader.native.js.map +1 -1
  193. package/build/lib/native/components/Table/TablePagination.native.js +3 -8
  194. package/build/lib/native/components/Table/TablePagination.native.js.map +1 -1
  195. package/build/lib/native/components/Table/TableToolbar.native.js +3 -8
  196. package/build/lib/native/components/Table/TableToolbar.native.js.map +1 -1
  197. package/build/lib/native/components/Table/tokens.js.map +1 -1
  198. package/build/lib/native/components/Tabs/Tabs.native.js +6 -8
  199. package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
  200. package/build/lib/native/components/Tag/AnimatedTag.native.js +1 -1
  201. package/build/lib/native/components/Tag/AnimatedTag.native.js.map +1 -1
  202. package/build/lib/native/components/Tag/Tag.js +3 -2
  203. package/build/lib/native/components/Tag/Tag.js.map +1 -1
  204. package/build/lib/native/components/Tooltip/TooltipContent.js +8 -8
  205. package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js +1 -1
  206. package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js.map +1 -1
  207. package/build/lib/native/components/TopNav/TabNav/TabNav.native.js +4 -10
  208. package/build/lib/native/components/TopNav/TabNav/TabNav.native.js.map +1 -1
  209. package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js +4 -10
  210. package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js.map +1 -1
  211. package/build/lib/native/components/TopNav/TopNav.native.js +4 -10
  212. package/build/lib/native/components/TopNav/TopNav.native.js.map +1 -1
  213. package/build/lib/native/components/Typography/Code/Code.js +1 -1
  214. package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
  215. package/build/lib/native/components/Typography/Display/Display.js +2 -2
  216. package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
  217. package/build/lib/native/components/Typography/Heading/Heading.js +2 -2
  218. package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
  219. package/build/lib/native/components/Typography/Text/Text.js +2 -2
  220. package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
  221. package/build/lib/native/components/index.js +7 -0
  222. package/build/lib/native/components/index.js.map +1 -1
  223. package/build/lib/native/tokens/global/motion.js +1 -1
  224. package/build/lib/native/tokens/global/motion.js.map +1 -1
  225. package/build/lib/native/utils/getMotionRefs.js +4 -0
  226. package/build/lib/native/utils/getMotionRefs.js.map +1 -0
  227. package/build/lib/web/development/components/Accordion/Accordion.js +6 -3
  228. package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
  229. package/build/lib/web/development/components/Accordion/commonStyles.js +1 -1
  230. package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
  231. package/build/lib/web/development/components/ActionList/ActionList.js +3 -0
  232. package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
  233. package/build/lib/web/development/components/Alert/Alert.js +6 -3
  234. package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
  235. package/build/lib/web/development/components/Amount/Amount.js +3 -2
  236. package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
  237. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractions.web.js +37 -0
  238. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractions.web.js.map +1 -0
  239. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
  240. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
  241. package/build/lib/web/development/components/AnimateInteractions/index.js +2 -0
  242. package/build/lib/web/development/components/AnimateInteractions/index.js.map +1 -0
  243. package/build/lib/web/development/components/AnimateInteractions/useFocusWithin.js +30 -0
  244. package/build/lib/web/development/components/AnimateInteractions/useFocusWithin.js.map +1 -0
  245. package/build/lib/web/development/components/Badge/Badge.js +4 -2
  246. package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
  247. package/build/lib/web/development/components/BaseMotion/BaseMotion.js +123 -0
  248. package/build/lib/web/development/components/BaseMotion/BaseMotion.js.map +1 -0
  249. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js +60 -0
  250. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js.map +1 -0
  251. package/build/lib/web/development/components/BaseMotion/index.js +3 -0
  252. package/build/lib/web/development/components/BaseMotion/index.js.map +1 -0
  253. package/build/lib/web/development/components/BaseMotion/types.js +2 -0
  254. package/build/lib/web/development/components/BaseMotion/types.js.map +1 -0
  255. package/build/lib/web/development/components/BottomNav/BottomNav.web.js +4 -2
  256. package/build/lib/web/development/components/BottomNav/BottomNav.web.js.map +1 -1
  257. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +1 -1
  258. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
  259. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
  260. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  261. package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  262. package/build/lib/web/development/components/Box/Box.js +2 -2
  263. package/build/lib/web/development/components/Box/Box.js.map +1 -1
  264. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +3 -1
  265. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  266. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +1 -1
  267. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  268. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +1 -1
  269. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  270. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +3 -2
  271. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  272. package/build/lib/web/development/components/Card/Card.js +3 -1
  273. package/build/lib/web/development/components/Card/Card.js.map +1 -1
  274. package/build/lib/web/development/components/Card/CardRoot.web.js +6 -4
  275. package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
  276. package/build/lib/web/development/components/Carousel/Carousel.web.js +6 -3
  277. package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
  278. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  279. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  280. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  281. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  282. package/build/lib/web/development/components/Checkbox/Checkbox.js +13 -3
  283. package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
  284. package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
  285. package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
  286. package/build/lib/web/development/components/Chip/Chip.js +11 -2
  287. package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
  288. package/build/lib/web/development/components/Chip/ChipGroup.js +5 -2
  289. package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
  290. package/build/lib/web/development/components/Chip/chipTokens.js +1 -1
  291. package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
  292. package/build/lib/web/development/components/Collapsible/Collapsible.js +6 -3
  293. package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
  294. package/build/lib/web/development/components/Collapsible/commonStyles.js +2 -2
  295. package/build/lib/web/development/components/Collapsible/commonStyles.js.map +1 -1
  296. package/build/lib/web/development/components/Counter/Counter.js +4 -2
  297. package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
  298. package/build/lib/web/development/components/Divider/Divider.js +4 -2
  299. package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
  300. package/build/lib/web/development/components/Drawer/Drawer.web.js +4 -4
  301. package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
  302. package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -3
  303. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  304. package/build/lib/web/development/components/Fade/Fade.web.js +62 -0
  305. package/build/lib/web/development/components/Fade/Fade.web.js.map +1 -0
  306. package/build/lib/web/development/components/Fade/index.js +2 -0
  307. package/build/lib/web/development/components/Fade/index.js.map +1 -0
  308. package/build/lib/web/development/components/FileUpload/FileUpload.web.js +11 -2
  309. package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
  310. package/build/lib/web/development/components/FileUpload/fileUploadTokens.js +1 -1
  311. package/build/lib/web/development/components/FileUpload/fileUploadTokens.js.map +1 -1
  312. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +1 -1
  313. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
  314. package/build/lib/web/development/components/Indicator/Indicator.js +4 -2
  315. package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
  316. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  317. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  318. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +21 -7
  319. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
  320. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +2 -2
  321. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  322. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +1 -1
  323. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
  324. package/build/lib/web/development/components/List/List.js +5 -3
  325. package/build/lib/web/development/components/List/List.js.map +1 -1
  326. package/build/lib/web/development/components/Modal/Modal.web.js +2 -2
  327. package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
  328. package/build/lib/web/development/components/Modal/ModalBackdrop.js +2 -2
  329. package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
  330. package/build/lib/web/development/components/Morph/Morph.web.js +48 -0
  331. package/build/lib/web/development/components/Morph/Morph.web.js.map +1 -0
  332. package/build/lib/web/development/components/Morph/index.js +2 -0
  333. package/build/lib/web/development/components/Morph/index.js.map +1 -0
  334. package/build/lib/web/development/components/Move/Move.web.js +66 -0
  335. package/build/lib/web/development/components/Move/Move.web.js.map +1 -0
  336. package/build/lib/web/development/components/Move/index.js +2 -0
  337. package/build/lib/web/development/components/Move/index.js.map +1 -0
  338. package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js +1 -1
  339. package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
  340. package/build/lib/web/development/components/ProgressBar/ProgressBar.js +8 -4
  341. package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
  342. package/build/lib/web/development/components/Radio/Radio.js +13 -3
  343. package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
  344. package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js +3 -3
  345. package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js.map +1 -1
  346. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  347. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  348. package/build/lib/web/development/components/Scale/Scale.web.js +47 -0
  349. package/build/lib/web/development/components/Scale/Scale.web.js.map +1 -0
  350. package/build/lib/web/development/components/Scale/index.js +2 -0
  351. package/build/lib/web/development/components/Scale/index.js.map +1 -0
  352. package/build/lib/web/development/components/SideNav/SideNav.web.js +7 -5
  353. package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
  354. package/build/lib/web/development/components/SideNav/tokens.js +1 -1
  355. package/build/lib/web/development/components/SideNav/tokens.js.map +1 -1
  356. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js +1 -1
  357. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js.map +1 -1
  358. package/build/lib/web/development/components/Skeleton/Skeleton.js +4 -1
  359. package/build/lib/web/development/components/Skeleton/Skeleton.js.map +1 -1
  360. package/build/lib/web/development/components/Slide/Slide.web.js +119 -0
  361. package/build/lib/web/development/components/Slide/Slide.web.js.map +1 -0
  362. package/build/lib/web/development/components/Slide/index.js +2 -0
  363. package/build/lib/web/development/components/Slide/index.js.map +1 -0
  364. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
  365. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  366. package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  367. package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  368. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +4 -1
  369. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
  370. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  371. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  372. package/build/lib/web/development/components/Stagger/Stagger.web.js +73 -0
  373. package/build/lib/web/development/components/Stagger/Stagger.web.js.map +1 -0
  374. package/build/lib/web/development/components/Stagger/StaggerProvider.js +13 -0
  375. package/build/lib/web/development/components/Stagger/StaggerProvider.js.map +1 -0
  376. package/build/lib/web/development/components/Stagger/index.js +2 -0
  377. package/build/lib/web/development/components/Stagger/index.js.map +1 -0
  378. package/build/lib/web/development/components/StepGroup/StepGroup.web.js +5 -3
  379. package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
  380. package/build/lib/web/development/components/StepGroup/StepItem.web.js +1 -1
  381. package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
  382. package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js +1 -1
  383. package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
  384. package/build/lib/web/development/components/Switch/Switch.js +13 -3
  385. package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
  386. package/build/lib/web/development/components/Switch/getTrackStyles.js +1 -1
  387. package/build/lib/web/development/components/Switch/getTrackStyles.js.map +1 -1
  388. package/build/lib/web/development/components/Switch/switchTokens.js +6 -6
  389. package/build/lib/web/development/components/Switch/switchTokens.js.map +1 -1
  390. package/build/lib/web/development/components/Table/Table.web.js +4 -2
  391. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  392. package/build/lib/web/development/components/Table/tokens.js +2 -2
  393. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  394. package/build/lib/web/development/components/Tabs/TabIndicator.web.js +1 -1
  395. package/build/lib/web/development/components/Tabs/TabIndicator.web.js.map +1 -1
  396. package/build/lib/web/development/components/Tabs/TabItem.web.js +2 -2
  397. package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
  398. package/build/lib/web/development/components/Tabs/Tabs.web.js +34 -1
  399. package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
  400. package/build/lib/web/development/components/Tag/AnimatedTag.web.js +2 -2
  401. package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
  402. package/build/lib/web/development/components/Tag/Tag.js +31 -29
  403. package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
  404. package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
  405. package/build/lib/web/development/components/Toast/Toast.web.js.map +1 -1
  406. package/build/lib/web/development/components/Toast/ToastContainer.web.js +1 -1
  407. package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
  408. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  409. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  410. package/build/lib/web/development/components/TopNav/TopNav.web.js +4 -2
  411. package/build/lib/web/development/components/TopNav/TopNav.web.js.map +1 -1
  412. package/build/lib/web/development/components/Typography/Code/Code.js +30 -27
  413. package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
  414. package/build/lib/web/development/components/Typography/Display/Display.js +6 -2
  415. package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
  416. package/build/lib/web/development/components/Typography/Heading/Heading.js +4 -1
  417. package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
  418. package/build/lib/web/development/components/Typography/Text/Text.js +6 -10
  419. package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
  420. package/build/lib/web/development/components/index.js +14 -0
  421. package/build/lib/web/development/components/index.js.map +1 -1
  422. package/build/lib/web/development/tokens/global/motion.js +22 -28
  423. package/build/lib/web/development/tokens/global/motion.js.map +1 -1
  424. package/build/lib/web/development/utils/cssBezierToArray.js +12 -0
  425. package/build/lib/web/development/utils/cssBezierToArray.js.map +1 -0
  426. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
  427. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  428. package/build/lib/web/development/utils/getMotionRefs.js +86 -0
  429. package/build/lib/web/development/utils/getMotionRefs.js.map +1 -0
  430. package/build/lib/web/development/utils/msToSeconds.js +6 -0
  431. package/build/lib/web/development/utils/msToSeconds.js.map +1 -0
  432. package/build/lib/web/production/components/Accordion/Accordion.js +6 -3
  433. package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
  434. package/build/lib/web/production/components/Accordion/commonStyles.js +1 -1
  435. package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
  436. package/build/lib/web/production/components/ActionList/ActionList.js +3 -0
  437. package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
  438. package/build/lib/web/production/components/Alert/Alert.js +6 -3
  439. package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
  440. package/build/lib/web/production/components/Amount/Amount.js +3 -2
  441. package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
  442. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractions.web.js +37 -0
  443. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractions.web.js.map +1 -0
  444. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
  445. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
  446. package/build/lib/web/production/components/AnimateInteractions/index.js +2 -0
  447. package/build/lib/web/production/components/AnimateInteractions/index.js.map +1 -0
  448. package/build/lib/web/production/components/AnimateInteractions/useFocusWithin.js +30 -0
  449. package/build/lib/web/production/components/AnimateInteractions/useFocusWithin.js.map +1 -0
  450. package/build/lib/web/production/components/Badge/Badge.js +4 -2
  451. package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
  452. package/build/lib/web/production/components/BaseMotion/BaseMotion.js +123 -0
  453. package/build/lib/web/production/components/BaseMotion/BaseMotion.js.map +1 -0
  454. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js +60 -0
  455. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js.map +1 -0
  456. package/build/lib/web/production/components/BaseMotion/index.js +3 -0
  457. package/build/lib/web/production/components/BaseMotion/index.js.map +1 -0
  458. package/build/lib/web/production/components/BaseMotion/types.js +2 -0
  459. package/build/lib/web/production/components/BaseMotion/types.js.map +1 -0
  460. package/build/lib/web/production/components/BottomNav/BottomNav.web.js +4 -2
  461. package/build/lib/web/production/components/BottomNav/BottomNav.web.js.map +1 -1
  462. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +1 -1
  463. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
  464. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
  465. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  466. package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  467. package/build/lib/web/production/components/Box/Box.js +2 -2
  468. package/build/lib/web/production/components/Box/Box.js.map +1 -1
  469. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +3 -1
  470. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  471. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +1 -1
  472. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  473. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +1 -1
  474. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  475. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +3 -2
  476. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  477. package/build/lib/web/production/components/Card/Card.js +3 -1
  478. package/build/lib/web/production/components/Card/Card.js.map +1 -1
  479. package/build/lib/web/production/components/Card/CardRoot.web.js +6 -4
  480. package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
  481. package/build/lib/web/production/components/Carousel/Carousel.web.js +6 -3
  482. package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
  483. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  484. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  485. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  486. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  487. package/build/lib/web/production/components/Checkbox/Checkbox.js +13 -3
  488. package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
  489. package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
  490. package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
  491. package/build/lib/web/production/components/Chip/Chip.js +11 -2
  492. package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
  493. package/build/lib/web/production/components/Chip/ChipGroup.js +5 -2
  494. package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
  495. package/build/lib/web/production/components/Chip/chipTokens.js +1 -1
  496. package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
  497. package/build/lib/web/production/components/Collapsible/Collapsible.js +6 -3
  498. package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
  499. package/build/lib/web/production/components/Collapsible/commonStyles.js +2 -2
  500. package/build/lib/web/production/components/Collapsible/commonStyles.js.map +1 -1
  501. package/build/lib/web/production/components/Counter/Counter.js +4 -2
  502. package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
  503. package/build/lib/web/production/components/Divider/Divider.js +4 -2
  504. package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
  505. package/build/lib/web/production/components/Drawer/Drawer.web.js +4 -4
  506. package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
  507. package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -3
  508. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  509. package/build/lib/web/production/components/Fade/Fade.web.js +62 -0
  510. package/build/lib/web/production/components/Fade/Fade.web.js.map +1 -0
  511. package/build/lib/web/production/components/Fade/index.js +2 -0
  512. package/build/lib/web/production/components/Fade/index.js.map +1 -0
  513. package/build/lib/web/production/components/FileUpload/FileUpload.web.js +11 -2
  514. package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
  515. package/build/lib/web/production/components/FileUpload/fileUploadTokens.js +1 -1
  516. package/build/lib/web/production/components/FileUpload/fileUploadTokens.js.map +1 -1
  517. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +1 -1
  518. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
  519. package/build/lib/web/production/components/Indicator/Indicator.js +4 -2
  520. package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
  521. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  522. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  523. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +21 -7
  524. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
  525. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +2 -2
  526. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  527. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +1 -1
  528. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
  529. package/build/lib/web/production/components/List/List.js +5 -3
  530. package/build/lib/web/production/components/List/List.js.map +1 -1
  531. package/build/lib/web/production/components/Modal/Modal.web.js +2 -2
  532. package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
  533. package/build/lib/web/production/components/Modal/ModalBackdrop.js +2 -2
  534. package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
  535. package/build/lib/web/production/components/Morph/Morph.web.js +48 -0
  536. package/build/lib/web/production/components/Morph/Morph.web.js.map +1 -0
  537. package/build/lib/web/production/components/Morph/index.js +2 -0
  538. package/build/lib/web/production/components/Morph/index.js.map +1 -0
  539. package/build/lib/web/production/components/Move/Move.web.js +66 -0
  540. package/build/lib/web/production/components/Move/Move.web.js.map +1 -0
  541. package/build/lib/web/production/components/Move/index.js +2 -0
  542. package/build/lib/web/production/components/Move/index.js.map +1 -0
  543. package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js +1 -1
  544. package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
  545. package/build/lib/web/production/components/ProgressBar/ProgressBar.js +8 -4
  546. package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
  547. package/build/lib/web/production/components/Radio/Radio.js +13 -3
  548. package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
  549. package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js +3 -3
  550. package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js.map +1 -1
  551. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  552. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  553. package/build/lib/web/production/components/Scale/Scale.web.js +47 -0
  554. package/build/lib/web/production/components/Scale/Scale.web.js.map +1 -0
  555. package/build/lib/web/production/components/Scale/index.js +2 -0
  556. package/build/lib/web/production/components/Scale/index.js.map +1 -0
  557. package/build/lib/web/production/components/SideNav/SideNav.web.js +7 -5
  558. package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
  559. package/build/lib/web/production/components/SideNav/tokens.js +1 -1
  560. package/build/lib/web/production/components/SideNav/tokens.js.map +1 -1
  561. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js +1 -1
  562. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js.map +1 -1
  563. package/build/lib/web/production/components/Skeleton/Skeleton.js +4 -1
  564. package/build/lib/web/production/components/Skeleton/Skeleton.js.map +1 -1
  565. package/build/lib/web/production/components/Slide/Slide.web.js +119 -0
  566. package/build/lib/web/production/components/Slide/Slide.web.js.map +1 -0
  567. package/build/lib/web/production/components/Slide/index.js +2 -0
  568. package/build/lib/web/production/components/Slide/index.js.map +1 -0
  569. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
  570. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  571. package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  572. package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  573. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +4 -1
  574. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
  575. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  576. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  577. package/build/lib/web/production/components/Stagger/Stagger.web.js +73 -0
  578. package/build/lib/web/production/components/Stagger/Stagger.web.js.map +1 -0
  579. package/build/lib/web/production/components/Stagger/StaggerProvider.js +13 -0
  580. package/build/lib/web/production/components/Stagger/StaggerProvider.js.map +1 -0
  581. package/build/lib/web/production/components/Stagger/index.js +2 -0
  582. package/build/lib/web/production/components/Stagger/index.js.map +1 -0
  583. package/build/lib/web/production/components/StepGroup/StepGroup.web.js +5 -3
  584. package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
  585. package/build/lib/web/production/components/StepGroup/StepItem.web.js +1 -1
  586. package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
  587. package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js +1 -1
  588. package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
  589. package/build/lib/web/production/components/Switch/Switch.js +13 -3
  590. package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
  591. package/build/lib/web/production/components/Switch/getTrackStyles.js +1 -1
  592. package/build/lib/web/production/components/Switch/getTrackStyles.js.map +1 -1
  593. package/build/lib/web/production/components/Switch/switchTokens.js +6 -6
  594. package/build/lib/web/production/components/Switch/switchTokens.js.map +1 -1
  595. package/build/lib/web/production/components/Table/Table.web.js +4 -2
  596. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  597. package/build/lib/web/production/components/Table/tokens.js +2 -2
  598. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  599. package/build/lib/web/production/components/Tabs/TabIndicator.web.js +1 -1
  600. package/build/lib/web/production/components/Tabs/TabIndicator.web.js.map +1 -1
  601. package/build/lib/web/production/components/Tabs/TabItem.web.js +2 -2
  602. package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
  603. package/build/lib/web/production/components/Tabs/Tabs.web.js +34 -1
  604. package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
  605. package/build/lib/web/production/components/Tag/AnimatedTag.web.js +2 -2
  606. package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
  607. package/build/lib/web/production/components/Tag/Tag.js +31 -29
  608. package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
  609. package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
  610. package/build/lib/web/production/components/Toast/Toast.web.js.map +1 -1
  611. package/build/lib/web/production/components/Toast/ToastContainer.web.js +1 -1
  612. package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
  613. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  614. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  615. package/build/lib/web/production/components/TopNav/TopNav.web.js +4 -2
  616. package/build/lib/web/production/components/TopNav/TopNav.web.js.map +1 -1
  617. package/build/lib/web/production/components/Typography/Code/Code.js +30 -27
  618. package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
  619. package/build/lib/web/production/components/Typography/Display/Display.js +6 -2
  620. package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
  621. package/build/lib/web/production/components/Typography/Heading/Heading.js +4 -1
  622. package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
  623. package/build/lib/web/production/components/Typography/Text/Text.js +6 -10
  624. package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
  625. package/build/lib/web/production/components/index.js +14 -0
  626. package/build/lib/web/production/components/index.js.map +1 -1
  627. package/build/lib/web/production/tokens/global/motion.js +22 -28
  628. package/build/lib/web/production/tokens/global/motion.js.map +1 -1
  629. package/build/lib/web/production/utils/cssBezierToArray.js +12 -0
  630. package/build/lib/web/production/utils/cssBezierToArray.js.map +1 -0
  631. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
  632. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  633. package/build/lib/web/production/utils/getMotionRefs.js +86 -0
  634. package/build/lib/web/production/utils/getMotionRefs.js.map +1 -0
  635. package/build/lib/web/production/utils/msToSeconds.js +6 -0
  636. package/build/lib/web/production/utils/msToSeconds.js.map +1 -0
  637. package/build/types/components/index.d.ts +18052 -5479
  638. package/build/types/components/index.native.d.ts +8077 -2278
  639. package/build/types/tokens/index.d.ts +103 -93
  640. package/build/types/tokens/index.native.d.ts +103 -93
  641. package/build/types/utils/index.d.ts +84 -71
  642. package/build/types/utils/index.native.d.ts +84 -71
  643. package/codemods/migrate-motion-tokens/transformers/__tests__/migrate-motion-tokens.test.ts +130 -0
  644. package/codemods/migrate-motion-tokens/transformers/index.ts +1 -0
  645. package/codemods/migrate-motion-tokens/transformers/migrate-motion.ts +24 -0
  646. package/codemods/migrate-motion-tokens/transformers/motionTokenMapping.json +11 -0
  647. package/package.json +3 -1
@@ -1,6 +1,6 @@
1
1
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import { useState, Children, useCallback, useMemo, cloneElement } from 'react';
3
+ import React__default, { useState, Children, useCallback, useMemo, cloneElement } from 'react';
4
4
  import { AccordionContext } from './AccordionContext.js';
5
5
  import { MAX_WIDTH } from './styles.native.js';
6
6
  import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
@@ -16,7 +16,7 @@ import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
16
16
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
17
17
  import { jsx } from 'react/jsx-runtime';
18
18
 
19
- var _excluded=["defaultExpandedIndex","expandedIndex","onExpandChange","showNumberPrefix","children","variant","size","maxWidth","testID"];var MIN_WIDTH={s:makeSize(size[200]),m:makeSize(size[360]),l:makeSize(size[360])};var getVariantStyles=function getVariantStyles(variant){if(variant==='transparent'){return {};}return {backgroundColor:'surface.background.gray.intense',borderRadius:'medium',borderWidth:'thinner',borderColor:'surface.border.gray.subtle'};};var Accordion=function Accordion(_ref){var defaultExpandedIndex=_ref.defaultExpandedIndex,expandedIndex=_ref.expandedIndex,onExpandChange=_ref.onExpandChange,_ref$showNumberPrefix=_ref.showNumberPrefix,showNumberPrefix=_ref$showNumberPrefix===void 0?false:_ref$showNumberPrefix,children=_ref.children,_ref$variant=_ref.variant,variant=_ref$variant===void 0?'transparent':_ref$variant,_ref$size=_ref.size,size=_ref$size===void 0?'large':_ref$size,maxWidth=_ref.maxWidth,testID=_ref.testID,rest=_objectWithoutProperties(_ref,_excluded);var _useState=useState(defaultExpandedIndex),_useState2=_slicedToArray(_useState,2),expandedAccordionItemIndex=_useState2[0],setExpandedAccordionItemIndex=_useState2[1];var numberOfItems=Children.count(children);var handleExpandChange=useCallback(function(nextExpandedIndex){if(typeof expandedIndex!=='undefined'){onExpandChange==null?void 0:onExpandChange({expandedIndex:nextExpandedIndex});}else {setExpandedAccordionItemIndex(nextExpandedIndex);onExpandChange==null?void 0:onExpandChange({expandedIndex:nextExpandedIndex});}},[onExpandChange,expandedIndex]);var accordionContext=useMemo(function(){return {expandedIndex:expandedIndex!=null?expandedIndex:expandedAccordionItemIndex,defaultExpandedIndex:defaultExpandedIndex,onExpandChange:handleExpandChange,showNumberPrefix:showNumberPrefix,variant:variant,numberOfItems:numberOfItems,size:size};},[expandedAccordionItemIndex,handleExpandChange,expandedIndex,showNumberPrefix,defaultExpandedIndex,variant,numberOfItems,size]);return jsx(AccordionContext.Provider,{value:accordionContext,children:jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.Accordion,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsx(BaseBox,Object.assign({},getVariantStyles(variant),{minWidth:MIN_WIDTH,maxWidth:maxWidth!=null?maxWidth:MAX_WIDTH,width:"100%",children:Children.map(children,function(child,index){return cloneElement(child,{_index:index,key:index});})}))}))});};
19
+ var _excluded=["defaultExpandedIndex","expandedIndex","onExpandChange","showNumberPrefix","children","variant","size","maxWidth","testID"];var MIN_WIDTH={s:makeSize(size[200]),m:makeSize(size[360]),l:makeSize(size[360])};var getVariantStyles=function getVariantStyles(variant){if(variant==='transparent'){return {};}return {backgroundColor:'surface.background.gray.intense',borderRadius:'medium',borderWidth:'thinner',borderColor:'surface.border.gray.subtle'};};var _Accordion=function _Accordion(_ref,ref){var defaultExpandedIndex=_ref.defaultExpandedIndex,expandedIndex=_ref.expandedIndex,onExpandChange=_ref.onExpandChange,_ref$showNumberPrefix=_ref.showNumberPrefix,showNumberPrefix=_ref$showNumberPrefix===void 0?false:_ref$showNumberPrefix,children=_ref.children,_ref$variant=_ref.variant,variant=_ref$variant===void 0?'transparent':_ref$variant,_ref$size=_ref.size,size=_ref$size===void 0?'large':_ref$size,maxWidth=_ref.maxWidth,testID=_ref.testID,rest=_objectWithoutProperties(_ref,_excluded);var _useState=useState(defaultExpandedIndex),_useState2=_slicedToArray(_useState,2),expandedAccordionItemIndex=_useState2[0],setExpandedAccordionItemIndex=_useState2[1];var numberOfItems=Children.count(children);var handleExpandChange=useCallback(function(nextExpandedIndex){if(typeof expandedIndex!=='undefined'){onExpandChange==null?void 0:onExpandChange({expandedIndex:nextExpandedIndex});}else {setExpandedAccordionItemIndex(nextExpandedIndex);onExpandChange==null?void 0:onExpandChange({expandedIndex:nextExpandedIndex});}},[onExpandChange,expandedIndex]);var accordionContext=useMemo(function(){return {expandedIndex:expandedIndex!=null?expandedIndex:expandedAccordionItemIndex,defaultExpandedIndex:defaultExpandedIndex,onExpandChange:handleExpandChange,showNumberPrefix:showNumberPrefix,variant:variant,numberOfItems:numberOfItems,size:size};},[expandedAccordionItemIndex,handleExpandChange,expandedIndex,showNumberPrefix,defaultExpandedIndex,variant,numberOfItems,size]);return jsx(AccordionContext.Provider,{value:accordionContext,children:jsx(BaseBox,Object.assign({ref:ref},metaAttribute({name:MetaConstants.Accordion,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsx(BaseBox,Object.assign({},getVariantStyles(variant),{minWidth:MIN_WIDTH,maxWidth:maxWidth!=null?maxWidth:MAX_WIDTH,width:"100%",children:Children.map(children,function(child,index){return cloneElement(child,{_index:index,key:index});})}))}))});};var Accordion=React__default.forwardRef(_Accordion);
20
20
 
21
21
  export { Accordion };
22
22
  //# sourceMappingURL=Accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","sources":["../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback, useMemo, useState, cloneElement, Children } from 'react';\nimport type { AccordionContextState } from './AccordionContext';\nimport { AccordionContext } from './AccordionContext';\nimport { MAX_WIDTH } from './styles';\nimport type { AccordionProps } from './types';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { size as sizeTokens } from '~tokens/global';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst MIN_WIDTH: BoxProps['minWidth'] = {\n s: makeSize(sizeTokens[200]),\n m: makeSize(sizeTokens[360]),\n l: makeSize(sizeTokens[360]),\n};\n\nconst getVariantStyles = (variant: AccordionProps['variant']): BoxProps => {\n if (variant === 'transparent') {\n return {};\n }\n\n return {\n backgroundColor: 'surface.background.gray.intense',\n borderRadius: 'medium',\n borderWidth: 'thinner',\n borderColor: 'surface.border.gray.subtle',\n };\n};\n\n/**\n * # Accordion\n *\n * An accordion is used to allow users to toggle between different content sections in a compact vertical stack.\n *\n * ## Usage\n *\n * ```jsx\n * <Accordion>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * </Accordion>\n * ```\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs\n *\n */\nconst Accordion = ({\n defaultExpandedIndex,\n expandedIndex,\n onExpandChange,\n showNumberPrefix = false,\n children,\n variant = 'transparent',\n size = 'large',\n maxWidth,\n testID,\n ...rest\n}: AccordionProps): ReactElement => {\n const [expandedAccordionItemIndex, setExpandedAccordionItemIndex] = useState<number | undefined>(\n defaultExpandedIndex,\n );\n\n const numberOfItems = Children.count(children);\n\n const handleExpandChange = useCallback(\n (nextExpandedIndex: number) => {\n if (typeof expandedIndex !== 'undefined') {\n // controlled\n onExpandChange?.({ expandedIndex: nextExpandedIndex });\n } else {\n // uncontrolled\n setExpandedAccordionItemIndex(nextExpandedIndex);\n onExpandChange?.({ expandedIndex: nextExpandedIndex });\n }\n },\n [onExpandChange, expandedIndex],\n );\n\n const accordionContext = useMemo<AccordionContextState>(\n () => ({\n expandedIndex: expandedIndex ?? expandedAccordionItemIndex,\n defaultExpandedIndex,\n onExpandChange: handleExpandChange,\n showNumberPrefix,\n variant,\n numberOfItems,\n size,\n }),\n [\n expandedAccordionItemIndex,\n handleExpandChange,\n expandedIndex,\n showNumberPrefix,\n defaultExpandedIndex,\n variant,\n numberOfItems,\n size,\n ],\n );\n\n return (\n <AccordionContext.Provider value={accordionContext}>\n <BaseBox\n {...metaAttribute({ name: MetaConstants.Accordion, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n {...getVariantStyles(variant)}\n minWidth={MIN_WIDTH}\n maxWidth={maxWidth ?? MAX_WIDTH}\n width=\"100%\"\n >\n {Children.map(children, (child, index) =>\n cloneElement(child, { _index: index, key: index }),\n )}\n </BaseBox>\n </BaseBox>\n </AccordionContext.Provider>\n );\n};\n\nexport { Accordion };\n"],"names":["MIN_WIDTH","s","makeSize","sizeTokens","m","l","getVariantStyles","variant","backgroundColor","borderRadius","borderWidth","borderColor","Accordion","_ref","defaultExpandedIndex","expandedIndex","onExpandChange","_ref$showNumberPrefix","showNumberPrefix","children","_ref$variant","_ref$size","size","maxWidth","testID","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","expandedAccordionItemIndex","setExpandedAccordionItemIndex","numberOfItems","Children","count","handleExpandChange","useCallback","nextExpandedIndex","accordionContext","useMemo","_jsx","AccordionContext","Provider","value","BaseBox","Object","assign","metaAttribute","name","MetaConstants","getStyledProps","makeAnalyticsAttribute","minWidth","MAX_WIDTH","width","map","child","index","cloneElement","_index","key"],"mappings":";;;;;;;;;;;;;;;;;;2IAcA,IAAMA,SAA+B,CAAG,CACtCC,CAAC,CAAEC,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAC,CAC5BC,CAAC,CAAEF,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAC,CAC5BE,CAAC,CAAEH,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAC7B,CAAC,CAED,IAAMG,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAIC,OAAkC,CAAe,CACzE,GAAIA,OAAO,GAAK,aAAa,CAA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,CAAC,CAAA,CAC7B+C,QAAQ,CAAEtD,SAAU,CACpBuB,QAAQ,CAAEA,QAAQ,EAAA,IAAA,CAARA,QAAQ,CAAIgC,SAAU,CAChCC,KAAK,CAAC,MAAM,CAAArC,QAAA,CAEXgB,QAAQ,CAACsB,GAAG,CAACtC,QAAQ,CAAE,SAACuC,KAAK,CAAEC,KAAK,CACnC,CAAA,OAAAC,YAAY,CAACF,KAAK,CAAE,CAAEG,MAAM,CAAEF,KAAK,CAAEG,GAAG,CAAEH,KAAM,CAAC,CAAC,CACpD,CAAA,CAAC,CACM,CAAA,CAAC,CACH,CAAA,CAAC,CACe,CAAC,CAEhC;;;;"}
1
+ {"version":3,"file":"Accordion.js","sources":["../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React, { useCallback, useMemo, useState, cloneElement, Children } from 'react';\nimport type { AccordionContextState } from './AccordionContext';\nimport { AccordionContext } from './AccordionContext';\nimport { MAX_WIDTH } from './styles';\nimport type { AccordionProps } from './types';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { size as sizeTokens } from '~tokens/global';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { BladeElementRef } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst MIN_WIDTH: BoxProps['minWidth'] = {\n s: makeSize(sizeTokens[200]),\n m: makeSize(sizeTokens[360]),\n l: makeSize(sizeTokens[360]),\n};\n\nconst getVariantStyles = (variant: AccordionProps['variant']): BoxProps => {\n if (variant === 'transparent') {\n return {};\n }\n\n return {\n backgroundColor: 'surface.background.gray.intense',\n borderRadius: 'medium',\n borderWidth: 'thinner',\n borderColor: 'surface.border.gray.subtle',\n };\n};\n\n/**\n * # Accordion\n *\n * An accordion is used to allow users to toggle between different content sections in a compact vertical stack.\n *\n * ## Usage\n *\n * ```jsx\n * <Accordion>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * </Accordion>\n * ```\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs\n *\n */\nconst _Accordion = (\n {\n defaultExpandedIndex,\n expandedIndex,\n onExpandChange,\n showNumberPrefix = false,\n children,\n variant = 'transparent',\n size = 'large',\n maxWidth,\n testID,\n ...rest\n }: AccordionProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n const [expandedAccordionItemIndex, setExpandedAccordionItemIndex] = useState<number | undefined>(\n defaultExpandedIndex,\n );\n\n const numberOfItems = Children.count(children);\n\n const handleExpandChange = useCallback(\n (nextExpandedIndex: number) => {\n if (typeof expandedIndex !== 'undefined') {\n // controlled\n onExpandChange?.({ expandedIndex: nextExpandedIndex });\n } else {\n // uncontrolled\n setExpandedAccordionItemIndex(nextExpandedIndex);\n onExpandChange?.({ expandedIndex: nextExpandedIndex });\n }\n },\n [onExpandChange, expandedIndex],\n );\n\n const accordionContext = useMemo<AccordionContextState>(\n () => ({\n expandedIndex: expandedIndex ?? expandedAccordionItemIndex,\n defaultExpandedIndex,\n onExpandChange: handleExpandChange,\n showNumberPrefix,\n variant,\n numberOfItems,\n size,\n }),\n [\n expandedAccordionItemIndex,\n handleExpandChange,\n expandedIndex,\n showNumberPrefix,\n defaultExpandedIndex,\n variant,\n numberOfItems,\n size,\n ],\n );\n\n return (\n <AccordionContext.Provider value={accordionContext}>\n <BaseBox\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Accordion, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n {...getVariantStyles(variant)}\n minWidth={MIN_WIDTH}\n maxWidth={maxWidth ?? MAX_WIDTH}\n width=\"100%\"\n >\n {Children.map(children, (child, index) =>\n cloneElement(child, { _index: index, key: index }),\n )}\n </BaseBox>\n </BaseBox>\n </AccordionContext.Provider>\n );\n};\n\nconst Accordion = React.forwardRef(_Accordion);\n\nexport { Accordion };\n"],"names":["MIN_WIDTH","s","makeSize","sizeTokens","m","l","getVariantStyles","variant","backgroundColor","borderRadius","borderWidth","borderColor","_Accordion","_ref","ref","defaultExpandedIndex","expandedIndex","onExpandChange","_ref$showNumberPrefix","showNumberPrefix","children","_ref$variant","_ref$size","size","maxWidth","testID","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","expandedAccordionItemIndex","setExpandedAccordionItemIndex","numberOfItems","Children","count","handleExpandChange","useCallback","nextExpandedIndex","accordionContext","useMemo","_jsx","AccordionContext","Provider","value","BaseBox","Object","assign","metaAttribute","name","MetaConstants","Accordion","getStyledProps","makeAnalyticsAttribute","minWidth","MAX_WIDTH","width","map","child","index","cloneElement","_index","key","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,sBAAA,CAAA,eAAA,CAAA,gBAAA,CAAA,kBAAA,CAAA,UAAA,CAAA,SAAA,CAAA,MAAA,CAAA,UAAA,CAAA,QAAA,CAAA,CAcA,IAAMA,SAA+B,CAAG,CACtCC,CAAC,CAAEC,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAC,CAC5BC,CAAC,CAAEF,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAC,CAC5BE,CAAC,CAAEH,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAC7B,CAAC,CAED,IAAMG,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAIC,OAAkC,CAAe,CACzE,GAAIA,OAAO,GAAK,aAAa,CAAE,CAC7B,OAAO,EAAE,CACX,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AA,CACF3C,gBAAgB,CAACC,OAAO,CAAC,CAC7BiD,CAAAA,QAAQ,CAAExD,SAAU,CACpBwB,QAAQ,CAAEA,QAAQ,EAAA,IAAA,CAARA,QAAQ,CAAIiC,SAAU,CAChCC,KAAK,CAAC,MAAM,CAAAtC,QAAA,CAEXgB,QAAQ,CAACuB,GAAG,CAACvC,QAAQ,CAAE,SAACwC,KAAK,CAAEC,KAAK,CACnC,CAAA,OAAAC,YAAY,CAACF,KAAK,CAAE,CAAEG,MAAM,CAAEF,KAAK,CAAEG,GAAG,CAAEH,KAAM,CAAC,CAAC,CACpD,CAAA,CAAC,CACM,CAAA,CAAC,CACH,CAAA,CAAC,CACe,CAAC,CAEhC,CAAC,CAEK,IAAAR,SAAS,CAAGY,cAAK,CAACC,UAAU,CAACtD,UAAU;;;;"}
@@ -4,27 +4,25 @@ import { StyledAccordionButton } from './StyledAccordionButton.native.js';
4
4
  import { useAccordion } from './AccordionContext.js';
5
5
  import { getTransitionDuration, getTransitionEasing, getBackgroundColor } from './commonStyles.js';
6
6
  import { AccordionItemHeader } from './AccordionItemHeader.js';
7
- import '@babel/runtime/helpers/objectWithoutProperties';
8
- import '../Typography/BaseText/BaseText.native.js';
9
- import { throwBladeError } from '../../utils/logger/logger.js';
10
- import '@babel/runtime/helpers/slicedToArray';
11
- import 'react-native';
12
- import '../../tokens/global/typography.js';
13
- import '../../tokens/global/motion.js';
14
- import { castNativeType } from '../../utils/platform/castUtils.js';
15
- import useTheme from '../BladeProvider/useTheme.js';
16
- import { jsxs, jsx } from 'react/jsx-runtime';
7
+ import '../Typography/Heading/Heading.js';
17
8
  import { Text } from '../Typography/Text/Text.js';
18
9
  import '../Typography/Code/Code.js';
10
+ import '../Typography/Display/Display.js';
19
11
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
20
12
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js';
21
13
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
14
+ import 'react-native';
15
+ import '@babel/runtime/helpers/slicedToArray';
16
+ import { throwBladeError } from '../../utils/logger/logger.js';
17
+ import { castNativeType } from '../../utils/platform/castUtils.js';
18
+ import useTheme from '../BladeProvider/useTheme.js';
22
19
  import { useCollapsible } from '../Collapsible/CollapsibleContext.js';
23
20
  import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
24
21
  import 'styled-components/native';
25
22
  import '@gorhom/portal';
26
23
  import 'react-native-gesture-handler';
27
24
  import '../BottomSheet/BottomSheetStack.js';
25
+ import { jsxs, jsx } from 'react/jsx-runtime';
28
26
  import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native.js';
29
27
 
30
28
  var _AccordionButton=function _AccordionButton(_ref){var index=_ref.index,Icon=_ref.icon,title=_ref.title,isDeprecatedAPI=_ref.isDeprecatedAPI,isDisabled=_ref.isDisabled,header=_ref.header;var _useCollapsible=useCollapsible(),onExpandChange=_useCollapsible.onExpandChange,isExpanded=_useCollapsible.isExpanded,collapsibleBodyId=_useCollapsible.collapsibleBodyId;var _useAccordion=useAccordion(),showNumberPrefix=_useAccordion.showNumberPrefix,expandedIndex=_useAccordion.expandedIndex;var _useTheme=useTheme(),theme=_useTheme.theme;var toggleCollapse=function toggleCollapse(){return onExpandChange(!isExpanded);};var isItemExpanded=expandedIndex===index;var isPressed=useSharedValue(false);var duration=castNativeType(getTransitionDuration(theme));var easing=castNativeType(getTransitionEasing(theme));var activeBackgroundColor=useSharedValue(getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:true}));var inActiveBackgroundColor=useSharedValue(getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:false}));useEffect(function(){activeBackgroundColor.value=getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:true});inActiveBackgroundColor.value=getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:false});},[isExpanded,activeBackgroundColor,inActiveBackgroundColor,theme]);var animatedStyles=useAnimatedStyle(function(){return {backgroundColor:withTiming(isPressed.value?activeBackgroundColor.value:inActiveBackgroundColor.value,{duration:duration,easing:easing})};});var _showNumberPrefix=typeof index==='number'&&showNumberPrefix;var _index=_showNumberPrefix?jsxs(Text,{size:"large",weight:"semibold",marginRight:"spacing.2",children:[index+1,"."]}):null;var a11yLabel=_showNumberPrefix?`${index+1}. ${title}`:title;var renderChildren=function renderChildren(_ref2){var pressed=_ref2.pressed;isPressed.value=pressed;var _icon=Icon&&jsx(Icon,{size:"medium",color:"surface.icon.gray.normal",marginRight:"spacing.3",marginY:"spacing.2"});if(__DEV__){if(_index&&_icon){throwBladeError({message:"showNumberPrefix and icon shouldn't be used together",moduleName:'Accordion'});}}return jsx(BaseBox,{display:"flex",flexDirection:"row",flex:1,justifyContent:"space-between",alignItems:"center",children:isDeprecatedAPI?jsx(AccordionItemHeader,{title:title,leading:_icon!=null?_icon:_index}):header});};return jsx(StyledAccordionButton,Object.assign({isExpanded:isExpanded,onPress:toggleCollapse,style:animatedStyles,disabled:isDisabled},makeAccessible({role:'button',expanded:isItemExpanded,controls:collapsibleBodyId,label:a11yLabel}),metaAttribute({name:MetaConstants.AccordionButton}),{children:renderChildren}));};var AccordionButton=assignWithoutSideEffects(_AccordionButton,{componentId:MetaConstants.AccordionButton});
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionButton.native.js","sources":["../../../../../src/components/Accordion/AccordionButton.native.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useEffect } from 'react';\nimport type { PressableProps } from 'react-native';\nimport { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport { StyledAccordionButton } from './StyledAccordionButton.native';\nimport type { AccordionButtonProps } from './types';\nimport { useAccordion } from './AccordionContext';\nimport { getBackgroundColor, getTransitionDuration, getTransitionEasing } from './commonStyles';\nimport { AccordionItemHeader } from './AccordionItemHeader';\nimport { Text } from '~components/Typography';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { castNativeType } from '~utils';\nimport { useCollapsible } from '~components/Collapsible/CollapsibleContext';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\n\nconst _AccordionButton = ({\n index,\n icon: Icon,\n title,\n isDeprecatedAPI,\n isDisabled,\n header,\n}: AccordionButtonProps): ReactElement => {\n const { onExpandChange, isExpanded, collapsibleBodyId } = useCollapsible();\n const { showNumberPrefix, expandedIndex } = useAccordion();\n const { theme } = useTheme();\n\n const toggleCollapse = (): void => onExpandChange(!isExpanded);\n const isItemExpanded = expandedIndex === index;\n\n const isPressed = useSharedValue(false);\n\n const duration = castNativeType(getTransitionDuration(theme));\n const easing = castNativeType(getTransitionEasing(theme));\n\n const activeBackgroundColor = useSharedValue(\n getBackgroundColor({ theme, isExpanded, isActive: true }),\n );\n const inActiveBackgroundColor = useSharedValue(\n getBackgroundColor({ theme, isExpanded, isActive: false }),\n );\n\n /**\n * `backgroundColor` is derived from `isExpanded` and pressed state.\n *\n * Since we can't directly access return values from JS functions (`getBackgroundColor`) on UI thread,\n * this effect updates the shared values for active / inactive states which are used by `animatedStyles`.\n */\n useEffect(() => {\n activeBackgroundColor.value = getBackgroundColor({ theme, isExpanded, isActive: true });\n inActiveBackgroundColor.value = getBackgroundColor({ theme, isExpanded, isActive: false });\n }, [isExpanded, activeBackgroundColor, inActiveBackgroundColor, theme]);\n\n const animatedStyles = useAnimatedStyle(() => ({\n backgroundColor: withTiming(\n isPressed.value ? activeBackgroundColor.value : inActiveBackgroundColor.value,\n {\n duration,\n easing,\n },\n ),\n }));\n\n const _showNumberPrefix = typeof index === 'number' && showNumberPrefix;\n\n const _index = _showNumberPrefix ? (\n <Text size=\"large\" weight=\"semibold\" marginRight=\"spacing.2\">\n {index + 1}.\n </Text>\n ) : null;\n\n const a11yLabel = _showNumberPrefix ? `${index + 1}. ${title}` : title;\n\n const renderChildren: PressableProps['children'] = ({ pressed }) => {\n isPressed.value = pressed;\n\n const _icon = Icon && (\n <Icon\n size=\"medium\"\n color=\"surface.icon.gray.normal\"\n marginRight=\"spacing.3\"\n marginY=\"spacing.2\"\n />\n );\n\n if (__DEV__) {\n if (_index && _icon) {\n throwBladeError({\n message: \"showNumberPrefix and icon shouldn't be used together\",\n moduleName: 'Accordion',\n });\n }\n }\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n flex={1}\n justifyContent=\"space-between\"\n alignItems=\"center\"\n >\n {isDeprecatedAPI ? <AccordionItemHeader title={title} leading={_icon ?? _index} /> : header}\n </BaseBox>\n );\n };\n\n return (\n <StyledAccordionButton\n isExpanded={isExpanded}\n onPress={toggleCollapse}\n style={animatedStyles}\n disabled={isDisabled}\n {...makeAccessible({\n role: 'button',\n expanded: isItemExpanded,\n controls: collapsibleBodyId,\n label: a11yLabel,\n })}\n {...metaAttribute({ name: MetaConstants.AccordionButton })}\n >\n {renderChildren}\n </StyledAccordionButton>\n );\n};\n\nconst AccordionButton = assignWithoutSideEffects(_AccordionButton, {\n componentId: MetaConstants.AccordionButton,\n});\n\nexport { AccordionButton };\n"],"names":["_AccordionButton","_ref","index","Icon","icon","title","isDeprecatedAPI","isDisabled","header","_useCollapsible","useCollapsible","onExpandChange","isExpanded","collapsibleBodyId","_useAccordion","useAccordion","showNumberPrefix","expandedIndex","_useTheme","useTheme","theme","toggleCollapse","isItemExpanded","isPressed","useSharedValue","duration","castNativeType","getTransitionDuration","easing","getTransitionEasing","activeBackgroundColor","getBackgroundColor","isActive","inActiveBackgroundColor","useEffect","value","animatedStyles","useAnimatedStyle","backgroundColor","withTiming","_showNumberPrefix","_index","_jsxs","Text","size","weight","marginRight","children","a11yLabel","renderChildren","_ref2","pressed","_icon","_jsx","color","marginY","__DEV__","throwBladeError","message","moduleName","BaseBox","display","flexDirection","flex","justifyContent","alignItems","AccordionItemHeader","leading","StyledAccordionButton","Object","assign","onPress","style","disabled","makeAccessible","role","expanded","controls","label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a,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,eAAgB,CAAC,CAAC,EAAAnC,QAAA,CAEzDE,cAAc,CAAA,CACM,CAAC,CAE5B,CAAC,CAEK,IAAAiC,eAAe,CAAGC,wBAAwB,CAACnF,gBAAgB,CAAE,CACjEoF,WAAW,CAAEH,aAAa,CAACC,eAC7B,CAAC;;;;"}
1
+ {"version":3,"file":"AccordionButton.native.js","sources":["../../../../../src/components/Accordion/AccordionButton.native.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useEffect } from 'react';\nimport type { PressableProps } from 'react-native';\nimport { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport { StyledAccordionButton } from './StyledAccordionButton.native';\nimport type { AccordionButtonProps } from './types';\nimport { useAccordion } from './AccordionContext';\nimport { getBackgroundColor, getTransitionDuration, getTransitionEasing } from './commonStyles';\nimport { AccordionItemHeader } from './AccordionItemHeader';\nimport { Text } from '~components/Typography';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { castNativeType } from '~utils';\nimport { useCollapsible } from '~components/Collapsible/CollapsibleContext';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\n\nconst _AccordionButton = ({\n index,\n icon: Icon,\n title,\n isDeprecatedAPI,\n isDisabled,\n header,\n}: AccordionButtonProps): ReactElement => {\n const { onExpandChange, isExpanded, collapsibleBodyId } = useCollapsible();\n const { showNumberPrefix, expandedIndex } = useAccordion();\n const { theme } = useTheme();\n\n const toggleCollapse = (): void => onExpandChange(!isExpanded);\n const isItemExpanded = expandedIndex === index;\n\n const isPressed = useSharedValue(false);\n\n const duration = castNativeType(getTransitionDuration(theme));\n const easing = castNativeType(getTransitionEasing(theme));\n\n const activeBackgroundColor = useSharedValue(\n getBackgroundColor({ theme, isExpanded, isActive: true }),\n );\n const inActiveBackgroundColor = useSharedValue(\n getBackgroundColor({ theme, isExpanded, isActive: false }),\n );\n\n /**\n * `backgroundColor` is derived from `isExpanded` and pressed state.\n *\n * Since we can't directly access return values from JS functions (`getBackgroundColor`) on UI thread,\n * this effect updates the shared values for active / inactive states which are used by `animatedStyles`.\n */\n useEffect(() => {\n activeBackgroundColor.value = getBackgroundColor({ theme, isExpanded, isActive: true });\n inActiveBackgroundColor.value = getBackgroundColor({ theme, isExpanded, isActive: false });\n }, [isExpanded, activeBackgroundColor, inActiveBackgroundColor, theme]);\n\n const animatedStyles = useAnimatedStyle(() => ({\n backgroundColor: withTiming(\n isPressed.value ? activeBackgroundColor.value : inActiveBackgroundColor.value,\n {\n duration,\n easing,\n },\n ),\n }));\n\n const _showNumberPrefix = typeof index === 'number' && showNumberPrefix;\n\n const _index = _showNumberPrefix ? (\n <Text size=\"large\" weight=\"semibold\" marginRight=\"spacing.2\">\n {index + 1}.\n </Text>\n ) : null;\n\n const a11yLabel = _showNumberPrefix ? `${index + 1}. ${title}` : title;\n\n const renderChildren: PressableProps['children'] = ({ pressed }) => {\n isPressed.value = pressed;\n\n const _icon = Icon && (\n <Icon\n size=\"medium\"\n color=\"surface.icon.gray.normal\"\n marginRight=\"spacing.3\"\n marginY=\"spacing.2\"\n />\n );\n\n if (__DEV__) {\n if (_index && _icon) {\n throwBladeError({\n message: \"showNumberPrefix and icon shouldn't be used together\",\n moduleName: 'Accordion',\n });\n }\n }\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n flex={1}\n justifyContent=\"space-between\"\n alignItems=\"center\"\n >\n {isDeprecatedAPI ? <AccordionItemHeader title={title} leading={_icon ?? _index} /> : header}\n </BaseBox>\n );\n };\n\n return (\n <StyledAccordionButton\n isExpanded={isExpanded}\n onPress={toggleCollapse}\n style={animatedStyles}\n disabled={isDisabled}\n {...makeAccessible({\n role: 'button',\n expanded: isItemExpanded,\n controls: collapsibleBodyId,\n label: a11yLabel,\n })}\n {...metaAttribute({ name: MetaConstants.AccordionButton })}\n >\n {renderChildren}\n </StyledAccordionButton>\n );\n};\n\nconst AccordionButton = assignWithoutSideEffects(_AccordionButton, {\n componentId: MetaConstants.AccordionButton,\n});\n\nexport { AccordionButton };\n"],"names":["_AccordionButton","_ref","index","Icon","icon","title","isDeprecatedAPI","isDisabled","header","_useCollapsible","useCollapsible","onExpandChange","isExpanded","collapsibleBodyId","_useAccordion","useAccordion","showNumberPrefix","expandedIndex","_useTheme","useTheme","theme","toggleCollapse","isItemExpanded","isPressed","useSharedValue","duration","castNativeType","getTransitionDuration","easing","getTransitionEasing","activeBackgroundColor","getBackgroundColor","isActive","inActiveBackgroundColor","useEffect","value","animatedStyles","useAnimatedStyle","backgroundColor","withTiming","_showNumberPrefix","_index","_jsxs","Text","size","weight","marginRight","children","a11yLabel","renderChildren","_ref2","pressed","_icon","_jsx","color","marginY","__DEV__","throwBladeError","message","moduleName","BaseBox","display","flexDirection","flex","justifyContent","alignItems","AccordionItemHeader","leading","StyledAccordionButton","Object","assign","onPress","style","disabled","makeAccessible","role","expanded","controls","label","metaAttribute","name","MetaConstants","AccordionButton","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,CAOoB,CANxC,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACCC,IAAI,CAAAF,IAAA,CAAVG,IAAI,CACJC,KAAK,CAAAJ,IAAA,CAALI,KAAK,CACLC,eAAe,CAAAL,IAAA,CAAfK,eAAe,CACfC,UAAU,CAAAN,IAAA,CAAVM,UAAU,CACVC,MAAM,CAAAP,IAAA,CAANO,MAAM,CAEN,IAAAC,eAAA,CAA0DC,cAAc,EAAE,CAAlEC,cAAc,CAAAF,eAAA,CAAdE,cAAc,CAAEC,UAAU,CAAAH,eAAA,CAAVG,UAAU,CAAEC,iBAAiB,CAAAJ,eAAA,CAAj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,CAAA,CACNC,OAAO,CAAC,MAAM,CACdC,aAAa,CAAC,KAAK,CACnBC,IAAI,CAAE,CAAE,CACRC,cAAc,CAAC,eAAe,CAC9BC,UAAU,CAAC,QAAQ,CAAAlB,QAAA,CAElBzC,eAAe,CAAG+C,GAAA,CAACa,mBAAmB,CAAA,CAAC7D,KAAK,CAAEA,KAAM,CAAC8D,OAAO,CAAEf,KAAK,EAAA,IAAA,CAALA,KAAK,CAAIX,MAAO,CAAE,CAAC,CAAGjC,MAAM,CACpF,CAAC,CAEd,CAAC,CAED,OACE6C,GAAA,CAACe,qBAAqB,CAAAC,MAAA,CAAAC,MAAA,CACpB1D,CAAAA,UAAU,CAAEA,UAAW,CACvB2D,OAAO,CAAElD,cAAe,CACxBmD,KAAK,CAAEpC,cAAe,CACtBqC,QAAQ,CAAElE,UAAW,CAAA,CACjBmE,cAAc,CAAC,CACjBC,IAAI,CAAE,QAAQ,CACdC,QAAQ,CAAEtD,cAAc,CACxBuD,QAAQ,CAAEhE,iBAAiB,CAC3BiE,KAAK,CAAE9B,SACT,CAAC,CAAC,CACE+B,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,eAAgB,CAAC,CAAC,EAAAnC,QAAA,CAEzDE,cAAc,CAAA,CACM,CAAC,CAE5B,CAAC,CAEK,IAAAiC,eAAe,CAAGC,wBAAwB,CAACnF,gBAAgB,CAAE,CACjEoF,WAAW,CAAEH,aAAa,CAACC,eAC7B,CAAC;;;;"}
@@ -2,22 +2,21 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
2
2
  import { useAccordion } from './AccordionContext.js';
3
3
  import { componentIds } from './componentIds.js';
4
4
  import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
5
- import '../Typography/BaseText/BaseText.native.js';
6
- import 'react';
7
- import '@babel/runtime/helpers/slicedToArray';
5
+ import '../Typography/Heading/Heading.js';
6
+ import { Text } from '../Typography/Text/Text.js';
7
+ import '../Typography/Code/Code.js';
8
+ import '../Typography/Display/Display.js';
8
9
  import 'react-native';
9
- import '../../tokens/global/typography.js';
10
- import '../../tokens/global/motion.js';
10
+ import '@babel/runtime/helpers/slicedToArray';
11
+ import 'react';
11
12
  import { isReactNative } from '../../utils/platform/isReactNative.js';
12
13
  import '../BladeProvider/useTheme.js';
13
- import { jsx, jsxs } from 'react/jsx-runtime';
14
- import { Text } from '../Typography/Text/Text.js';
15
- import '../Typography/Code/Code.js';
16
14
  import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native.js';
17
15
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
18
16
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js';
19
17
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
20
18
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
19
+ import { jsx, jsxs } from 'react/jsx-runtime';
21
20
 
22
21
  var _excluded=["children","_description"];var BLANK_SPACE=' ';var reactNativeMultilineTextOverflowFix=jsx(BaseBox,Object.assign({},makeAccessible({hidden:true}),{children:jsx(Text,{children:BLANK_SPACE})}));var descriptionSizeToken={large:'medium',medium:'small'};var _AccordionItemBody=function _AccordionItemBody(_ref){var children=_ref.children,_description=_ref._description,rest=_objectWithoutProperties(_ref,_excluded);var _useAccordion=useAccordion(),size=_useAccordion.size;var childrenElement=typeof children==='string'||typeof children==='number'?jsx(Text,{size:descriptionSizeToken[size],color:"surface.text.gray.subtle",children:children}):children;var descriptionElement=_description&&jsx(Text,{size:descriptionSizeToken[size],color:"surface.text.gray.subtle",children:_description});var collapsibleBodyContent=isReactNative()?jsxs(BaseBox,{marginX:"spacing.5",children:[descriptionElement,jsx(BaseBox,{marginTop:_description&&children?'spacing.5':'spacing.0',children:childrenElement}),reactNativeMultilineTextOverflowFix]}):jsxs(BaseBox,{display:"flex",flexDirection:"column",gap:"spacing.5",marginBottom:"spacing.5",marginX:"spacing.5",children:[descriptionElement,childrenElement]});return jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.AccordionItemBody}),makeAnalyticsAttribute(rest),{children:collapsibleBodyContent}));};var AccordionItemBody=assignWithoutSideEffects(_AccordionItemBody,{componentId:componentIds.AccordionItemBody});
23
22
 
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionItemBody.js","sources":["../../../../../src/components/Accordion/AccordionItemBody.tsx"],"sourcesContent":["import { useAccordion } from './AccordionContext';\nimport { componentIds } from './componentIds';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport { isReactNative } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { DataAnalyticsAttribute, StringChildrenType } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst BLANK_SPACE = ' ';\n\n/**\n * On React Native if the `AccordionItem` has a lengthy description which renders a `Text` spanning multiple lines,\n * it sometimes messes up the layout calculation (it thinks of multiline as a single line before flowing in the UI).\n * And during the expanding / collapsing animation, text reflows causing words to jump around across lines.\n *\n * Rendering a blank `Text` at the end seems to fix all this 🤯\n */\nconst reactNativeMultilineTextOverflowFix = (\n // make this hidden from screen readers\n <BaseBox {...makeAccessible({ hidden: true })}>\n <Text>{BLANK_SPACE}</Text>\n </BaseBox>\n);\n\nconst descriptionSizeToken = {\n large: 'medium',\n medium: 'small',\n} as const;\n\nconst _AccordionItemBody = ({\n children,\n _description,\n ...rest\n}: {\n children?: React.ReactNode | StringChildrenType;\n _description?: string;\n} & DataAnalyticsAttribute): React.ReactElement => {\n const { size } = useAccordion();\n\n const childrenElement =\n typeof children === 'string' || typeof children === 'number' ? (\n <Text size={descriptionSizeToken[size]} color=\"surface.text.gray.subtle\">\n {children}\n </Text>\n ) : (\n children\n );\n\n const descriptionElement = _description && (\n <Text size={descriptionSizeToken[size]} color=\"surface.text.gray.subtle\">\n {_description}\n </Text>\n );\n\n const collapsibleBodyContent = isReactNative() ? (\n <BaseBox marginX=\"spacing.5\">\n {descriptionElement}\n <BaseBox marginTop={_description && children ? 'spacing.5' : 'spacing.0'}>\n {childrenElement}\n </BaseBox>\n {reactNativeMultilineTextOverflowFix}\n </BaseBox>\n ) : (\n <BaseBox\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"spacing.5\"\n marginBottom=\"spacing.5\"\n marginX=\"spacing.5\"\n >\n {descriptionElement}\n {childrenElement}\n </BaseBox>\n );\n\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.AccordionItemBody })}\n {...makeAnalyticsAttribute(rest)}\n >\n {collapsibleBodyContent}\n </BaseBox>\n );\n};\n\nconst AccordionItemBody = assignWithoutSideEffects(_AccordionItemBody, {\n componentId: componentIds.AccordionItemBody,\n});\n\nexport { AccordionItemBody };\n"],"names":["BLANK_SPACE","reactNativeMultilineTextOverflowFix","_jsx","BaseBox","Object","assign","makeAccessible","hidden","children","Text","descriptionSizeToken","large","medium","_AccordionItemBody","_ref","_description","rest","_objectWithoutProperties","_excluded","_useAccordion","useAccordion","size","childrenElement","color","descriptionElement","collapsibleBodyContent","isReactNative","_jsxs","marginX","marginTop","display","flexDirection","gap","marginBottom","metaAttribute","name","MetaConstants","AccordionItemBody","makeAnalyticsAttribute","assignWithoutSideEffects","componentId","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,UAAA,CAAA,cAAA,CAAA,CAWA,IAAMA,WAAW,CAAG,GAAG,CASvB,IAAMC,mCAAmC,CAEvCC,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,IAAKC,cAAc,CAAC,CAAEC,MAAM,CAAE,IAAK,CAAC,CAAC,CAAAC,CAAAA,QAAA,CAC3CN,GAAA,CAACO,IAAI,CAAA,CAAAD,QAAA,CAAER,WAAW,CAAO,CAAC,EACnB,CACV,CAED,IAAMU,oBAAo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ApB,QAAA,EAElBgB,kBAAkB,CAClBF,eAAe,CAAA,CACT,CACV,CAED,OACEpB,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,IACF6B,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,iBAAkB,CAAC,CAAC,CACxDC,sBAAsB,CAACtB,IAAI,CAAC,CAAAR,CAAAA,QAAA,CAE/BiB,sBAAsB,CAAA,CAChB,CAAC,CAEd,CAAC,CAEK,IAAAY,iBAAiB,CAAGE,wBAAwB,CAAC1B,kBAAkB,CAAE,CACrE2B,WAAW,CAAEC,YAAY,CAACJ,iBAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"AccordionItemBody.js","sources":["../../../../../src/components/Accordion/AccordionItemBody.tsx"],"sourcesContent":["import { useAccordion } from './AccordionContext';\nimport { componentIds } from './componentIds';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport { isReactNative } from '~utils';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { DataAnalyticsAttribute, StringChildrenType } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst BLANK_SPACE = ' ';\n\n/**\n * On React Native if the `AccordionItem` has a lengthy description which renders a `Text` spanning multiple lines,\n * it sometimes messes up the layout calculation (it thinks of multiline as a single line before flowing in the UI).\n * And during the expanding / collapsing animation, text reflows causing words to jump around across lines.\n *\n * Rendering a blank `Text` at the end seems to fix all this 🤯\n */\nconst reactNativeMultilineTextOverflowFix = (\n // make this hidden from screen readers\n <BaseBox {...makeAccessible({ hidden: true })}>\n <Text>{BLANK_SPACE}</Text>\n </BaseBox>\n);\n\nconst descriptionSizeToken = {\n large: 'medium',\n medium: 'small',\n} as const;\n\nconst _AccordionItemBody = ({\n children,\n _description,\n ...rest\n}: {\n children?: React.ReactNode | StringChildrenType;\n _description?: string;\n} & DataAnalyticsAttribute): React.ReactElement => {\n const { size } = useAccordion();\n\n const childrenElement =\n typeof children === 'string' || typeof children === 'number' ? (\n <Text size={descriptionSizeToken[size]} color=\"surface.text.gray.subtle\">\n {children}\n </Text>\n ) : (\n children\n );\n\n const descriptionElement = _description && (\n <Text size={descriptionSizeToken[size]} color=\"surface.text.gray.subtle\">\n {_description}\n </Text>\n );\n\n const collapsibleBodyContent = isReactNative() ? (\n <BaseBox marginX=\"spacing.5\">\n {descriptionElement}\n <BaseBox marginTop={_description && children ? 'spacing.5' : 'spacing.0'}>\n {childrenElement}\n </BaseBox>\n {reactNativeMultilineTextOverflowFix}\n </BaseBox>\n ) : (\n <BaseBox\n display=\"flex\"\n flexDirection=\"column\"\n gap=\"spacing.5\"\n marginBottom=\"spacing.5\"\n marginX=\"spacing.5\"\n >\n {descriptionElement}\n {childrenElement}\n </BaseBox>\n );\n\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.AccordionItemBody })}\n {...makeAnalyticsAttribute(rest)}\n >\n {collapsibleBodyContent}\n </BaseBox>\n );\n};\n\nconst AccordionItemBody = assignWithoutSideEffects(_AccordionItemBody, {\n componentId: componentIds.AccordionItemBody,\n});\n\nexport { AccordionItemBody };\n"],"names":["BLANK_SPACE","reactNativeMultilineTextOverflowFix","_jsx","BaseBox","Object","assign","makeAccessible","hidden","children","Text","descriptionSizeToken","large","medium","_AccordionItemBody","_ref","_description","rest","_objectWithoutProperties","_excluded","_useAccordion","useAccordion","size","childrenElement","color","descriptionElement","collapsibleBodyContent","isReactNative","_jsxs","marginX","marginTop","display","flexDirection","gap","marginBottom","metaAttribute","name","MetaConstants","AccordionItemBody","makeAnalyticsAttribute","assignWithoutSideEffects","componentId","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,UAAA,CAAA,cAAA,CAAA,CAWA,IAAMA,WAAW,CAAG,GAAG,CASvB,IAAMC,mCAAmC,CAEvCC,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ACtEc,eAAe,CACT,CAAC,CACTrB,mCAAmC,CAC7B,CAAA,CAAC,CAEV0B,IAAA,CAACxB,OAAO,CAAA,CACN2B,OAAO,CAAC,MAAM,CACdC,aAAa,CAAC,QAAQ,CACtBC,GAAG,CAAC,WAAW,CACfC,YAAY,CAAC,WAAW,CACxBL,OAAO,CAAC,WAAW,CAAApB,QAAA,EAElBgB,kBAAkB,CAClBF,eAAe,CAAA,CACT,CACV,CAED,OACEpB,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,IACF6B,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,iBAAkB,CAAC,CAAC,CACxDC,sBAAsB,CAACtB,IAAI,CAAC,CAAAR,CAAAA,QAAA,CAE/BiB,sBAAsB,CAAA,CAChB,CAAC,CAEd,CAAC,CAEK,IAAAY,iBAAiB,CAAGE,wBAAwB,CAAC1B,kBAAkB,CAAE,CACrE2B,WAAW,CAAEC,YAAY,CAACJ,iBAC5B,CAAC;;;;"}
@@ -2,22 +2,17 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
2
2
  import { useAccordion, useAccordionItemIndex } from './AccordionContext.js';
3
3
  import { componentIds } from './componentIds.js';
4
4
  import { BaseHeader } from '../BaseHeaderFooter/BaseHeader.js';
5
- import '../Typography/BaseText/BaseText.native.js';
6
- import 'react';
7
- import '@babel/runtime/helpers/slicedToArray';
8
- import 'react-native';
9
- import '../../tokens/global/typography.js';
10
- import '../../tokens/global/motion.js';
11
- import '../BladeProvider/useTheme.js';
12
- import { jsx, jsxs } from 'react/jsx-runtime';
5
+ import '../Typography/Heading/Heading.js';
13
6
  import { Text } from '../Typography/Text/Text.js';
14
7
  import '../Typography/Code/Code.js';
8
+ import '../Typography/Display/Display.js';
15
9
  import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
16
10
  import { CollapsibleChevronIcon } from '../Collapsible/CollapsibleChevronIcon.native.js';
17
11
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
18
12
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js';
19
13
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
20
14
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
15
+ import { jsx, jsxs } from 'react/jsx-runtime';
21
16
 
22
17
  var _excluded=["title","subtitle","leading","children","trailing","titleSuffix"];var _AccordionItemHeader=function _AccordionItemHeader(_ref){var title=_ref.title,subtitle=_ref.subtitle,leading=_ref.leading,children=_ref.children,trailing=_ref.trailing,titleSuffix=_ref.titleSuffix,rest=_objectWithoutProperties(_ref,_excluded);var _useAccordion=useAccordion(),size=_useAccordion.size,showNumberPrefix=_useAccordion.showNumberPrefix;var _useAccordionItemInde=useAccordionItemIndex(),index=_useAccordionItemInde.index,isDisabled=_useAccordionItemInde.isDisabled;return jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.AccordionItemHeader}),{flex:"1",children:jsx(BaseHeader,Object.assign({leading:showNumberPrefix&&typeof index==='number'?jsxs(Text,{size:size,weight:"semibold",marginTop:"-2px",as:"span",children:[index+1,"."]}):leading,title:title,subtitle:subtitle,trailing:trailing,titleSuffix:titleSuffix,isDisabled:isDisabled,showBackButton:false,showCloseButton:false,showDivider:false,paddingX:"spacing.5",marginY:"spacing.5",size:size,trailingInteractionElement:jsx(CollapsibleChevronIcon,{color:isDisabled?'interactive.icon.gray.disabled':'interactive.icon.gray.muted',size:"large"})},makeAnalyticsAttribute(rest),{children:children}))}));};var AccordionItemHeader=assignWithoutSideEffects(_AccordionItemHeader,{componentId:componentIds.AccordionItemHeader});
23
18
 
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionItemHeader.js","sources":["../../../../../src/components/Accordion/AccordionItemHeader.tsx"],"sourcesContent":["import { useAccordion, useAccordionItemIndex } from './AccordionContext';\nimport { componentIds } from './componentIds';\nimport type { BaseHeaderProps } from '~components/BaseHeaderFooter/BaseHeader';\nimport { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';\nimport { Text } from '~components/Typography';\nimport BaseBox from '~components/Box/BaseBox';\nimport { CollapsibleChevronIcon } from '~components/Collapsible/CollapsibleChevronIcon';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst _AccordionItemHeader = ({\n title,\n subtitle,\n leading,\n children,\n trailing,\n titleSuffix,\n ...rest\n}: Pick<\n BaseHeaderProps,\n 'title' | 'subtitle' | 'leading' | 'children' | 'trailing' | 'titleSuffix'\n> &\n DataAnalyticsAttribute): React.ReactElement => {\n const { size, showNumberPrefix } = useAccordion();\n const { index, isDisabled } = useAccordionItemIndex();\n\n return (\n <BaseBox {...metaAttribute({ name: MetaConstants.AccordionItemHeader })} flex=\"1\">\n <BaseHeader\n leading={\n showNumberPrefix && typeof index === 'number' ? (\n // we have to add -2px margin to align the number with title of BaseHeader\n <Text size={size} weight=\"semibold\" marginTop=\"-2px\" as=\"span\">\n {index + 1}.\n </Text>\n ) : (\n leading\n )\n }\n title={title}\n subtitle={subtitle}\n trailing={trailing}\n titleSuffix={titleSuffix}\n isDisabled={isDisabled}\n showBackButton={false}\n showCloseButton={false}\n showDivider={false}\n paddingX=\"spacing.5\"\n marginY=\"spacing.5\"\n size={size}\n trailingInteractionElement={\n <CollapsibleChevronIcon\n color={isDisabled ? 'interactive.icon.gray.disabled' : 'interactive.icon.gray.muted'}\n size=\"large\"\n />\n }\n {...makeAnalyticsAttribute(rest)}\n >\n {children}\n </BaseHeader>\n </BaseBox>\n );\n};\n\nconst AccordionItemHeader = assignWithoutSideEffects(_AccordionItemHeader, {\n componentId: componentIds.AccordionItemHeader,\n});\n\nexport { AccordionItemHeader };\n"],"names":["_AccordionItemHeader","_ref","title","subtitle","leading","children","trailing","titleSuffix","rest","_objectWithoutProperties","_excluded","_useAccordion","useAccordion","size","showNumberPrefix","_useAccordionItemInde","useAccordionItemIndex","index","isDisabled","_jsx","BaseBox","Object","assign","metaAttribute","name","MetaConstants","AccordionItemHeader","flex","BaseHeader","_jsxs","Text","weight","marginTop","as","showBackButton","showCloseButton","showDivider","paddingX","marginY","trailingInteractionElement","CollapsibleChevronIcon","color","makeAnalyticsAttribute","assignWithoutSideEffects","componentId","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,UAAA,CAAA,SAAA,CAAA,UAAA,CAAA,UAAA,CAAA,aAAA,CAAA,CAYA,IAAMA,oBAAoB,CAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,CAYuB,CAAA,IAX/CC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CACRC,OAAO,CAAAH,IAAA,CAAPG,OAAO,CACPC,QAAQ,CAAAJ,IAAA,CAARI,QAAQ,CACRC,QAAQ,CAAAL,IAAA,CAARK,QAAQ,CACRC,WAAW,CAAAN,IAAA,CAAXM,WAAW,CACRC,IAAI,CAAAC,wBAAA,CAAAR,IAAA,CAAAS,SAAA,CAMP,CAAA,IAAAC,aAAA,CAAmCC,YAAY,EAAE,CAAzCC,IAAI,CAAAF,aAAA,CAAJE,IAAI,CAAEC,gBAAgB,CAAAH,aAAA,CAAhBG,gBAAgB,CAC9B,IAAAC,qBAAA,CAA8BC,qBAAqB,EAAE,CAA7CC,KAAK,CAAAF,qBAAA,CAALE,KAAK,CAAEC,UAAU,CAAAH,qBAAA,CAAVG,UAAU,CAEzB,OACEC,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,CAAKC,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,mBAAoB,CAAC,CAAC,CAAEC,CAAAA,IAAI,CAAC,GAAG,CAAAtB,QAAA,CAC/Ec,GAAA,CAACS,UAAU,CAAAP,MAAA,CAAAC,MAAA,CACTlB,CAAAA,OAAO,CACLU,gBAAgB,EAAI,OAAOG,KAAK,GAAK,QAAQ,CAE3CY,IAAA,CAACC,IAAI,CAAA,CAACjB,IAAI,CAAEA,IAAK,CAACkB,MAAM,CAAC,UAAU,CAACC,SAAS,CAAC,MAAM,CAACC,EAAE,CAAC,MAAM,CAAA5B,QAAA,CAC3DY,CAAAA,KAAK,CAAG,CAAC,CAAC,GACb,CAAA,CAAM,CAAC,CAEPb,OAEH,CACDF,KAAK,CAAEA,KAAM,CACbC,QAAQ,CAAEA,QAAS,CACnBG,QAAQ,CAAEA,QAAS,CACnBC,WAAW,CAAEA,WAAY,CACzBW,UAAU,CAAEA,UAAW,CACvBgB,cAAc,CAAE,KAAM,CACtBC,eAAe,CAAE,KAAM,CACvBC,WAAW,CAAE,KAAM,CACnBC,QAAQ,CAAC,WAAW,CACpBC,OAAO,CAAC,WAAW,CACnBzB,IAAI,CAAEA,IAAK,CACX0B,0BAA0B,CACxBpB,GAAA,CAACqB,sBAAsB,CAAA,CACrBC,KAAK,CAAEvB,UAAU,CAAG,gCAAgC,CAAG,6BAA8B,CACrFL,IAAI,CAAC,OAAO,CACb,CACF,CAAA,CACG6B,sBAAsB,CAAClC,IAAI,CAAC,CAAA,CAAAH,QAAA,CAE/BA,QAAQ,CACC,CAAA,CAAC,CACN,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAqB,mBAAmB,CAAGiB,wBAAwB,CAAC3C,oBAAoB,CAAE,CACzE4C,WAAW,CAAEC,YAAY,CAACnB,mBAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"AccordionItemHeader.js","sources":["../../../../../src/components/Accordion/AccordionItemHeader.tsx"],"sourcesContent":["import { useAccordion, useAccordionItemIndex } from './AccordionContext';\nimport { componentIds } from './componentIds';\nimport type { BaseHeaderProps } from '~components/BaseHeaderFooter/BaseHeader';\nimport { BaseHeader } from '~components/BaseHeaderFooter/BaseHeader';\nimport { Text } from '~components/Typography';\nimport BaseBox from '~components/Box/BaseBox';\nimport { CollapsibleChevronIcon } from '~components/Collapsible/CollapsibleChevronIcon';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { DataAnalyticsAttribute } from '~utils/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst _AccordionItemHeader = ({\n title,\n subtitle,\n leading,\n children,\n trailing,\n titleSuffix,\n ...rest\n}: Pick<\n BaseHeaderProps,\n 'title' | 'subtitle' | 'leading' | 'children' | 'trailing' | 'titleSuffix'\n> &\n DataAnalyticsAttribute): React.ReactElement => {\n const { size, showNumberPrefix } = useAccordion();\n const { index, isDisabled } = useAccordionItemIndex();\n\n return (\n <BaseBox {...metaAttribute({ name: MetaConstants.AccordionItemHeader })} flex=\"1\">\n <BaseHeader\n leading={\n showNumberPrefix && typeof index === 'number' ? (\n // we have to add -2px margin to align the number with title of BaseHeader\n <Text size={size} weight=\"semibold\" marginTop=\"-2px\" as=\"span\">\n {index + 1}.\n </Text>\n ) : (\n leading\n )\n }\n title={title}\n subtitle={subtitle}\n trailing={trailing}\n titleSuffix={titleSuffix}\n isDisabled={isDisabled}\n showBackButton={false}\n showCloseButton={false}\n showDivider={false}\n paddingX=\"spacing.5\"\n marginY=\"spacing.5\"\n size={size}\n trailingInteractionElement={\n <CollapsibleChevronIcon\n color={isDisabled ? 'interactive.icon.gray.disabled' : 'interactive.icon.gray.muted'}\n size=\"large\"\n />\n }\n {...makeAnalyticsAttribute(rest)}\n >\n {children}\n </BaseHeader>\n </BaseBox>\n );\n};\n\nconst AccordionItemHeader = assignWithoutSideEffects(_AccordionItemHeader, {\n componentId: componentIds.AccordionItemHeader,\n});\n\nexport { AccordionItemHeader };\n"],"names":["_AccordionItemHeader","_ref","title","subtitle","leading","children","trailing","titleSuffix","rest","_objectWithoutProperties","_excluded","_useAccordion","useAccordion","size","showNumberPrefix","_useAccordionItemInde","useAccordionItemIndex","index","isDisabled","_jsx","BaseBox","Object","assign","metaAttribute","name","MetaConstants","AccordionItemHeader","flex","BaseHeader","_jsxs","Text","weight","marginTop","as","showBackButton","showCloseButton","showDivider","paddingX","marginY","trailingInteractionElement","CollapsibleChevronIcon","color","makeAnalyticsAttribute","assignWithoutSideEffects","componentId","componentIds"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,UAAA,CAAA,SAAA,CAAA,UAAA,CAAA,UAAA,CAAA,aAAA,CAAA,CAYA,IAAMA,oBAAoB,CAAG,SAAvBA,oBAAoBA,CAAAC,IAAA,CAYuB,CAAA,IAX/CC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CACRC,OAAO,CAAAH,IAAA,CAAPG,OAAO,CACPC,QAAQ,CAAAJ,IAAA,CAARI,QAAQ,CACRC,QAAQ,CAAAL,IAAA,CAARK,QAAQ,CACRC,WAAW,CAAAN,IAAA,CAAXM,WAAW,CACRC,IAAI,CAAAC,wBAAA,CAAAR,IAAA,CAAAS,SAAA,CAMP,CAAA,IAAAC,aAAA,CAAmCC,YAAY,EAAE,CAAzCC,IAAI,CAAAF,aAAA,CAAJE,IAAI,CAAEC,gBAAgB,CAAAH,aAAA,CAAhBG,gBAAgB,CAC9B,IAAAC,qBAAA,CAA8BC,qBAAqB,EAAE,CAA7CC,KAAK,CAAAF,qBAAA,CAALE,KAAK,CAAEC,UAAU,CAAAH,qBAAA,CAAVG,UAAU,CAEzB,OACEC,GAAA,CAACC,OAAO,CAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,CAAKC,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,mBAAoB,CAAC,CAAC,CAAEC,CAAAA,IAAI,CAAC,GAAG,CAAAtB,QAAA,CAC/Ec,GAAA,CAACS,UAAU,CAAAP,MAAA,CAAAC,MAAA,CACTlB,CAAAA,OAAO,CACLU,gBAAgB,EAAI,OAAOG,KAAK,GAAK,QAAQ,CAE3CY,IAAA,CAACC,IAAI,CAAA,CAACjB,IAAI,CAAEA,IAAK,CAACkB,MAAM,CAAC,UAAU,CAACC,SAAS,CAAC,MAAM,CAACC,EAAE,CAAC,MAAM,CAAA5B,QAAA,CAC3DY,CAAAA,KAAK,CAAG,CAAC,CAAC,GACb,CAAA,CAAM,CAAC,CAEPb,OAEH,CACDF,KAAK,CAAEA,KAAM,CACbC,QAAQ,CAAEA,QAAS,CACnBG,QAAQ,CAAEA,QAAS,CACnBC,WAAW,CAAEA,WAAY,CACzBW,UAAU,CAAEA,UAAW,CACvBgB,cAAc,CAAE,KAAM,CACtBC,eAAe,CAAE,KAAM,CACvBC,WAAW,CAAE,KAAM,CACnBC,QAAQ,CAAC,WAAW,CACpBC,OAAO,CAAC,WAAW,CACnBzB,IAAI,CAAEA,IAAK,CACX0B,0BAA0B,CACxBpB,GAAA,CAACqB,sBAAsB,CAAA,CACrBC,KAAK,CAAEvB,UAAU,CAAG,gCAAgC,CAAG,6BAA8B,CACrFL,IAAI,CAAC,OAAO,CACb,CACF,CAAA,CACG6B,sBAAsB,CAAClC,IAAI,CAAC,CAAA,CAAAH,QAAA,CAE/BA,QAAQ,CACC,CAAA,CAAC,CACN,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAqB,mBAAmB,CAAGiB,wBAAwB,CAAC3C,oBAAoB,CAAE,CACzE4C,WAAW,CAAEC,YAAY,CAACnB,mBAC5B,CAAC;;;;"}
@@ -4,7 +4,7 @@ import 'react';
4
4
  import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.native.js';
5
5
  import '../BladeProvider/useTheme.js';
6
6
 
7
- var getTransitionDuration=function getTransitionDuration(theme){return makeMotionTime(theme.motion.duration['2xquick']);};var getTransitionEasing=function getTransitionEasing(theme){return theme.motion.easing.standard.effective;};var getBackgroundColor=function getBackgroundColor(_ref){var theme=_ref.theme,isExpanded=_ref.isExpanded,isActive=_ref.isActive;var gray=theme.colors.interactive.background.gray;if(isExpanded){if(isActive){return gray.fadedHighlighted;}return gray.faded;}if(isActive){return gray.faded;}return theme.colors.transparent;};var getCommonAccordionButtonStyles=function getCommonAccordionButtonStyles(props){var theme=props.theme;return {padding:theme.spacing[0],display:'flex',flexDirection:'row',alignItems:'center',justifyContent:'space-between'};};
7
+ var getTransitionDuration=function getTransitionDuration(theme){return makeMotionTime(theme.motion.duration['2xquick']);};var getTransitionEasing=function getTransitionEasing(theme){return theme.motion.easing.standard;};var getBackgroundColor=function getBackgroundColor(_ref){var theme=_ref.theme,isExpanded=_ref.isExpanded,isActive=_ref.isActive;var gray=theme.colors.interactive.background.gray;if(isExpanded){if(isActive){return gray.fadedHighlighted;}return gray.faded;}if(isActive){return gray.faded;}return theme.colors.transparent;};var getCommonAccordionButtonStyles=function getCommonAccordionButtonStyles(props){var theme=props.theme;return {padding:theme.spacing[0],display:'flex',flexDirection:'row',alignItems:'center',justifyContent:'space-between'};};
8
8
 
9
9
  export { getBackgroundColor, getCommonAccordionButtonStyles, getTransitionDuration, getTransitionEasing };
10
10
  //# sourceMappingURL=commonStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commonStyles.js","sources":["../../../../../src/components/Accordion/commonStyles.ts"],"sourcesContent":["import type { CSSObject, StyledProps } from 'styled-components';\nimport type { StyledAccordionButtonProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeMotionTime } from '~utils';\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration['2xquick']);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard.effective;\n\nconst getBackgroundColor = ({\n theme,\n isExpanded,\n isActive,\n}: {\n theme: Theme;\n isExpanded: boolean;\n isActive: boolean;\n}): string => {\n const { gray } = theme.colors.interactive.background;\n\n if (isExpanded) {\n if (isActive) {\n return gray.fadedHighlighted;\n }\n\n return gray.faded;\n }\n\n if (isActive) {\n return gray.faded;\n }\n\n return theme.colors.transparent;\n};\n\nconst getCommonAccordionButtonStyles = (\n props: StyledProps<StyledAccordionButtonProps>,\n): CSSObject => {\n const { theme } = props;\n\n return {\n padding: theme.spacing[0],\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n };\n};\n\nexport {\n getTransitionDuration,\n getTransitionEasing,\n getBackgroundColor,\n getCommonAccordionButtonStyles,\n};\n"],"names":["getTransitionDuration","theme","makeMotionTime","motion","duration","getTransitionEasing","easing","standard","effective","getBackgroundColor","_ref","isExpanded","isActive","gray","colors","interactive","background","fadedHighlighted","faded","transparent","getCommonAccordionButtonStyles","props","padding","spacing","display","flexDirection","alignItems","justifyContent"],"mappings":";;;;;;AAMM,IAAAA,qBAAqB,CAAG,SAAxBA,qBAAqBA,CAAIC,KAAY,CAAK,CAAA,OAAAC,cAAc,CAACD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAA,EAG1F,IAAAC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIJ,KAAY,SAAKA,KAAK,CAACE,MAAM,CAACG,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAA,EAE9E,IAAAC,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAAC,IAAA,CAQV,CAPZ,IAAAT,KAAK,CAAAS,IAAA,CAALT,KAAK,CACLU,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAMR,IAAQC,IAAI,CAAKZ,KAAK,CAACa,MAAM,CAACC,WAAW,CAACC,UAAU,CAA5CH,IAAI,CAEZ,GAAIF,UAAU,CAAE,CACd,GAAIC,QAAQ,CAAE,CACZ,OAAOC,IAAI,CAACI,gBAAgB,CAC9B,CAEA,OAAOJ,IAAI,CAACK,KAAK,CACnB,CAEA,GAAIN,QAAQ,CAAE,CACZ,OAAOC,IAAI,CAACK,KAAK,CACnB,CAEA,OAAOjB,KAAK,CAACa,MAAM,CAACK,WAAW,CACjC,EAEM,IAAAC,8BAA8B,CAAG,SAAjCA,8BAA8BA,CAClCC,KAA8C,CAChC,CACd,IAAQpB,KAAK,CAAKoB,KAAK,CAAfpB,KAAK,CAEb,OAAO,CACLqB,OAAO,CAAErB,KAAK,CAACsB,OAAO,CAAC,CAAC,CAAC,CACzBC,OAAO,CAAE,MAAM,CACfC,aAAa,CAAE,KAAK,CACpBC,UAAU,CAAE,QAAQ,CACpBC,cAAc,CAAE,eAClB,CAAC,CACH;;;;"}
1
+ {"version":3,"file":"commonStyles.js","sources":["../../../../../src/components/Accordion/commonStyles.ts"],"sourcesContent":["import type { CSSObject, StyledProps } from 'styled-components';\nimport type { StyledAccordionButtonProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeMotionTime } from '~utils';\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration['2xquick']);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard;\n\nconst getBackgroundColor = ({\n theme,\n isExpanded,\n isActive,\n}: {\n theme: Theme;\n isExpanded: boolean;\n isActive: boolean;\n}): string => {\n const { gray } = theme.colors.interactive.background;\n\n if (isExpanded) {\n if (isActive) {\n return gray.fadedHighlighted;\n }\n\n return gray.faded;\n }\n\n if (isActive) {\n return gray.faded;\n }\n\n return theme.colors.transparent;\n};\n\nconst getCommonAccordionButtonStyles = (\n props: StyledProps<StyledAccordionButtonProps>,\n): CSSObject => {\n const { theme } = props;\n\n return {\n padding: theme.spacing[0],\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n };\n};\n\nexport {\n getTransitionDuration,\n getTransitionEasing,\n getBackgroundColor,\n getCommonAccordionButtonStyles,\n};\n"],"names":["getTransitionDuration","theme","makeMotionTime","motion","duration","getTransitionEasing","easing","standard","getBackgroundColor","_ref","isExpanded","isActive","gray","colors","interactive","background","fadedHighlighted","faded","transparent","getCommonAccordionButtonStyles","props","padding","spacing","display","flexDirection","alignItems","justifyContent"],"mappings":";;;;;;AAMM,IAAAA,qBAAqB,CAAG,SAAxBA,qBAAqBA,CAAIC,KAAY,CAAA,CAAA,OAAKC,cAAc,CAACD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,SAAS,CAAC,CAAC,GAG1F,IAAAC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIJ,KAAY,CAAK,CAAA,OAAAA,KAAK,CAACE,MAAM,CAACG,MAAM,CAACC,QAAQ,CAE1E,EAAM,IAAAC,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAAC,IAAA,CAQV,KAPZR,KAAK,CAAAQ,IAAA,CAALR,KAAK,CACLS,UAAU,CAAAD,IAAA,CAAVC,UAAU,CACVC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAMR,IAAQC,IAAI,CAAKX,KAAK,CAACY,MAAM,CAACC,WAAW,CAACC,UAAU,CAA5CH,IAAI,CAEZ,GAAIF,UAAU,CAAE,CACd,GAAIC,QAAQ,CAAE,CACZ,OAAOC,IAAI,CAACI,gBAAgB,CAC9B,CAEA,OAAOJ,IAAI,CAACK,KAAK,CACnB,CAEA,GAAIN,QAAQ,CAAE,CACZ,OAAOC,IAAI,CAACK,KAAK,CACnB,CAEA,OAAOhB,KAAK,CAACY,MAAM,CAACK,WAAW,CACjC,EAEM,IAAAC,8BAA8B,CAAG,SAAjCA,8BAA8BA,CAClCC,KAA8C,CAChC,CACd,IAAQnB,KAAK,CAAKmB,KAAK,CAAfnB,KAAK,CAEb,OAAO,CACLoB,OAAO,CAAEpB,KAAK,CAACqB,OAAO,CAAC,CAAC,CAAC,CACzBC,OAAO,CAAE,MAAM,CACfC,aAAa,CAAE,KAAK,CACpBC,UAAU,CAAE,QAAQ,CACpBC,cAAc,CAAE,eAClB,CAAC,CACH;;;;"}
@@ -16,7 +16,7 @@ import { dropdownComponentIds } from '../Dropdown/dropdownComponentIds.js';
16
16
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
17
17
  import { jsx } from 'react/jsx-runtime';
18
18
 
19
- var _excluded=["children","testID"];var _ActionList=function _ActionList(_ref){var children=_ref.children,testID=_ref.testID,rest=_objectWithoutProperties(_ref,_excluded);var _useDropdown=useDropdown(),setOptions=_useDropdown.setOptions,actionListItemRef=_useDropdown.actionListItemRef,selectionType=_useDropdown.selectionType,dropdownBaseId=_useDropdown.dropdownBaseId,dropdownTriggerer=_useDropdown.dropdownTriggerer,hasFooterAction=_useDropdown.hasFooterAction,filteredValues=_useDropdown.filteredValues;var _useBottomSheetContex=useBottomSheetContext(),isInBottomSheet=_useBottomSheetContex.isInBottomSheet;var _React$useMemo=React__default.useMemo(function(){return getActionListProperties(children);},[children]),sectionData=_React$useMemo.sectionData,childrenWithId=_React$useMemo.childrenWithId,actionListOptions=_React$useMemo.actionListOptions;React__default.useEffect(function(){setOptions(actionListOptions);},[actionListOptions]);if(filteredValues.length<=0&&dropdownTriggerer===dropdownComponentIds.triggers.AutoComplete){return jsx(ActionListNoResults,{});}var actionListContainerRole=getActionListContainerRole(hasFooterAction,dropdownTriggerer);var actionListItemWrapperRole=getActionListItemWrapperRole(hasFooterAction,dropdownTriggerer);var isMultiSelectable=selectionType==='multiple';return isInBottomSheet?jsx(ActionListBox,Object.assign({isInBottomSheet:isInBottomSheet,actionListItemWrapperRole:actionListItemWrapperRole,childrenWithId:childrenWithId,sectionData:sectionData,isMultiSelectable:isMultiSelectable,ref:actionListItemRef},makeAnalyticsAttribute(rest))):jsx(BaseBox,Object.assign({id:`${dropdownBaseId}-actionlist`},makeAccessible({role:actionListContainerRole,multiSelectable:actionListContainerRole==='listbox'?isMultiSelectable:undefined,labelledBy:`${dropdownBaseId}-label`}),metaAttribute({name:MetaConstants.ActionList,testID:testID}),makeAnalyticsAttribute(rest),{children:jsx(ActionListBox,{isInBottomSheet:isInBottomSheet,actionListItemWrapperRole:actionListItemWrapperRole,childrenWithId:childrenWithId,sectionData:sectionData,isMultiSelectable:isMultiSelectable,ref:actionListItemRef})}));};var ActionList=assignWithoutSideEffects(React__default.memo(_ActionList),{displayName:componentIds.ActionList,componentId:componentIds.ActionList});
19
+ var _excluded=["children","testID"];var _ActionList=function _ActionList(_ref){var children=_ref.children,testID=_ref.testID,rest=_objectWithoutProperties(_ref,_excluded);var _useDropdown=useDropdown(),setOptions=_useDropdown.setOptions,actionListItemRef=_useDropdown.actionListItemRef,selectionType=_useDropdown.selectionType,dropdownBaseId=_useDropdown.dropdownBaseId,dropdownTriggerer=_useDropdown.dropdownTriggerer,hasFooterAction=_useDropdown.hasFooterAction,filteredValues=_useDropdown.filteredValues;var _useBottomSheetContex=useBottomSheetContext(),isInBottomSheet=_useBottomSheetContex.isInBottomSheet;var _React$useMemo=React__default.useMemo(function(){return getActionListProperties(children);},[children]),sectionData=_React$useMemo.sectionData,childrenWithId=_React$useMemo.childrenWithId,actionListOptions=_React$useMemo.actionListOptions;console.log({actionListOptions:actionListOptions});React__default.useEffect(function(){setOptions(actionListOptions);},[actionListOptions]);if(filteredValues.length<=0&&dropdownTriggerer===dropdownComponentIds.triggers.AutoComplete){return jsx(ActionListNoResults,{});}var actionListContainerRole=getActionListContainerRole(hasFooterAction,dropdownTriggerer);var actionListItemWrapperRole=getActionListItemWrapperRole(hasFooterAction,dropdownTriggerer);var isMultiSelectable=selectionType==='multiple';return isInBottomSheet?jsx(ActionListBox,Object.assign({isInBottomSheet:isInBottomSheet,actionListItemWrapperRole:actionListItemWrapperRole,childrenWithId:childrenWithId,sectionData:sectionData,isMultiSelectable:isMultiSelectable,ref:actionListItemRef},makeAnalyticsAttribute(rest))):jsx(BaseBox,Object.assign({id:`${dropdownBaseId}-actionlist`},makeAccessible({role:actionListContainerRole,multiSelectable:actionListContainerRole==='listbox'?isMultiSelectable:undefined,labelledBy:`${dropdownBaseId}-label`}),metaAttribute({name:MetaConstants.ActionList,testID:testID}),makeAnalyticsAttribute(rest),{children:jsx(ActionListBox,{isInBottomSheet:isInBottomSheet,actionListItemWrapperRole:actionListItemWrapperRole,childrenWithId:childrenWithId,sectionData:sectionData,isMultiSelectable:isMultiSelectable,ref:actionListItemRef})}));};var ActionList=assignWithoutSideEffects(React__default.memo(_ActionList),{displayName:componentIds.ActionList,componentId:componentIds.ActionList});
20
20
 
21
21
  export { ActionList };
22
22
  //# sourceMappingURL=ActionList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionList.js","sources":["../../../../../src/components/ActionList/ActionList.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport { getActionListContainerRole, getActionListItemWrapperRole } from './getA11yRoles';\nimport { getActionListProperties } from './actionListUtils';\nimport { ActionListBox } from './ActionListBox';\nimport { componentIds } from './componentIds';\nimport { ActionListNoResults } from './ActionListNoResults';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListProps = {\n children: React.ReactNode[];\n} & TestID &\n DataAnalyticsAttribute;\n\nconst _ActionList = ({ children, testID, ...rest }: ActionListProps): React.ReactElement => {\n const {\n setOptions,\n actionListItemRef,\n selectionType,\n dropdownBaseId,\n dropdownTriggerer,\n hasFooterAction,\n filteredValues,\n } = useDropdown();\n\n const { isInBottomSheet } = useBottomSheetContext();\n\n const { sectionData, childrenWithId, actionListOptions } = React.useMemo(\n () => getActionListProperties(children),\n [children],\n );\n\n React.useEffect(() => {\n setOptions(actionListOptions);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [actionListOptions]);\n\n if (\n filteredValues.length <= 0 &&\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete\n ) {\n return <ActionListNoResults />;\n }\n\n const actionListContainerRole = getActionListContainerRole(hasFooterAction, dropdownTriggerer);\n const actionListItemWrapperRole = getActionListItemWrapperRole(\n hasFooterAction,\n dropdownTriggerer,\n );\n const isMultiSelectable = selectionType === 'multiple';\n\n // If we are inside BottomSheet, we don't render The StyledActionList wrapper\n // This is to ensure:\n // 1. We don't render the box wrapper styles which includes shadows, padding, border etc\n // 2. to ensure GorhomBottomSheetSectionList works as expected, if we add extra wrappers GorhomBottomSheet won't render the content inside\n // NOTE: That this also means inside BottomSheet, ActionList won't render any ActionListHeader or Footer.\n return isInBottomSheet ? (\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n {...makeAnalyticsAttribute(rest)}\n />\n ) : (\n <BaseBox\n id={`${dropdownBaseId}-actionlist`}\n {...makeAccessible({\n role: actionListContainerRole,\n multiSelectable: actionListContainerRole === 'listbox' ? isMultiSelectable : undefined,\n labelledBy: `${dropdownBaseId}-label`,\n })}\n {...metaAttribute({ name: MetaConstants.ActionList, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n />\n </BaseBox>\n );\n};\n\n/**\n * ### ActionList\n *\n * List of multiple actionable items. Can be used as menu items inside `Dropdown`,\n * `BottomSheet` and as selectable items when combined with `SelectInput`\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown>\n * <SelectInput label=\"Select Action\" />\n * <DropdownOverlay>\n * <DropdownHeader title=\"Header Title\" />\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * />\n * <ActionListItem\n * title=\"Pricing\"\n * value=\"pricing\"\n * leading={<ActionListItemAsset src=\"https://flagcdn.com/w20/in.png\" alt=\"India Flag\" />}\n * />\n * </ActionList>\n * <DropdownFooter><Button>Apply</Button></DropdownFooter>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n */\nconst ActionList = assignWithoutSideEffects(React.memo(_ActionList), {\n displayName: componentIds.ActionList,\n componentId: componentIds.ActionList,\n});\n\nexport type { ActionListProps };\nexport { ActionList };\n"],"names":["_ActionList","_ref","children","testID","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","setOptions","actionListItemRef","selectionType","dropdownBaseId","dropdownTriggerer","hasFooterAction","filteredValues","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_React$useMemo","React","useMemo","getActionListProperties","sectionData","childrenWithId","actionListOptions","useEffect","length","dropdownComponentIds","triggers","AutoComplete","_jsx","ActionListNoResults","actionListContainerRole","getActionListContainerRole","actionListItemWrapperRole","getActionListItemWrapperRole","isMultiSelectable","ActionListBox","Object","assign","ref","makeAnalyticsAttribute","BaseBox","id","makeAccessible","role","multiSelectable","undefined","labelledBy","metaAttribute","name","MetaConstants","ActionList","assignWithoutSideEffects","memo","displayName","componentIds","componentId"],"mappings":";;;;;;;;;;;;;;;;;;oCAsBA,IAAMA,WAAW,CAAG,SAAdA,WAAWA,CAAAC,IAAA,CAA2E,KAArEC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,MAAM,CAAAF,IAAA,CAANE,MAAM,CAAKC,IAAI,CAAAC,wBAAA,CAAAJ,IAAA,CAAAK,SAAA,CAC9C,CAAA,IAAAC,YAAA,CAQIC,WAAW,EAAE,CAPfC,UAAU,CAAAF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ACrDX,cAAc,CAAEA,cAAe,CAC/BD,WAAW,CAAEA,WAAY,CACzBc,iBAAiB,CAAEA,iBAAkB,CACrCI,GAAG,CAAE/B,iBAAyB,CAC1BgC,CAAAA,sBAAsB,CAACtC,IAAI,CAAC,CACjC,CAAC,CAEF2B,GAAA,CAACY,OAAO,CAAAJ,MAAA,CAAAC,MAAA,CACNI,CAAAA,EAAE,CAAG,CAAA,EAAEhC,cAAe,CAAa,WAAA,CAAA,CAAA,CAC/BiC,cAAc,CAAC,CACjBC,IAAI,CAAEb,uBAAuB,CAC7Bc,eAAe,CAAEd,uBAAuB,GAAK,SAAS,CAAGI,iBAAiB,CAAGW,SAAS,CACtFC,UAAU,CAAG,CAAA,EAAErC,cAAe,CAAA,MAAA,CAChC,CAAC,CAAC,CACEsC,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,UAAU,CAAElD,MAAM,CAANA,MAAO,CAAC,CAAC,CACzDuC,sBAAsB,CAACtC,IAAI,CAAC,EAAAF,QAAA,CAEhC6B,GAAA,CAACO,aAAa,CAAA,CACZpB,eAAe,CAAEA,eAAgB,CACjCiB,yBAAyB,CAAEA,yBAA0B,CACrDX,cAAc,CAAEA,cAAe,CAC/BD,WAAW,CAAEA,WAAY,CACzBc,iBAAiB,CAAEA,iBAAkB,CACrCI,GAAG,CAAE/B,iBAAyB,CAC/B,CAAC,CACK,CAAA,CACV,CACH,CAAC,CAiCK,IAAA2C,UAAU,CAAGC,wBAAwB,CAAClC,cAAK,CAACmC,IAAI,CAACvD,WAAW,CAAC,CAAE,CACnEwD,WAAW,CAAEC,YAAY,CAACJ,UAAU,CACpCK,WAAW,CAAED,YAAY,CAACJ,UAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"ActionList.js","sources":["../../../../../src/components/ActionList/ActionList.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport { getActionListContainerRole, getActionListItemWrapperRole } from './getA11yRoles';\nimport { getActionListProperties } from './actionListUtils';\nimport { ActionListBox } from './ActionListBox';\nimport { componentIds } from './componentIds';\nimport { ActionListNoResults } from './ActionListNoResults';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport { useBottomSheetContext } from '~components/BottomSheet/BottomSheetContext';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListProps = {\n children: React.ReactNode[];\n} & TestID &\n DataAnalyticsAttribute;\n\nconst _ActionList = ({ children, testID, ...rest }: ActionListProps): React.ReactElement => {\n const {\n setOptions,\n actionListItemRef,\n selectionType,\n dropdownBaseId,\n dropdownTriggerer,\n hasFooterAction,\n filteredValues,\n } = useDropdown();\n\n const { isInBottomSheet } = useBottomSheetContext();\n\n const { sectionData, childrenWithId, actionListOptions } = React.useMemo(\n () => getActionListProperties(children),\n [children],\n );\n\n console.log({ actionListOptions });\n\n React.useEffect(() => {\n setOptions(actionListOptions);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [actionListOptions]);\n\n if (\n filteredValues.length <= 0 &&\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete\n ) {\n return <ActionListNoResults />;\n }\n\n const actionListContainerRole = getActionListContainerRole(hasFooterAction, dropdownTriggerer);\n const actionListItemWrapperRole = getActionListItemWrapperRole(\n hasFooterAction,\n dropdownTriggerer,\n );\n const isMultiSelectable = selectionType === 'multiple';\n\n // If we are inside BottomSheet, we don't render The StyledActionList wrapper\n // This is to ensure:\n // 1. We don't render the box wrapper styles which includes shadows, padding, border etc\n // 2. to ensure GorhomBottomSheetSectionList works as expected, if we add extra wrappers GorhomBottomSheet won't render the content inside\n // NOTE: That this also means inside BottomSheet, ActionList won't render any ActionListHeader or Footer.\n return isInBottomSheet ? (\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n {...makeAnalyticsAttribute(rest)}\n />\n ) : (\n <BaseBox\n id={`${dropdownBaseId}-actionlist`}\n {...makeAccessible({\n role: actionListContainerRole,\n multiSelectable: actionListContainerRole === 'listbox' ? isMultiSelectable : undefined,\n labelledBy: `${dropdownBaseId}-label`,\n })}\n {...metaAttribute({ name: MetaConstants.ActionList, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n <ActionListBox\n isInBottomSheet={isInBottomSheet}\n actionListItemWrapperRole={actionListItemWrapperRole}\n childrenWithId={childrenWithId}\n sectionData={sectionData}\n isMultiSelectable={isMultiSelectable}\n ref={actionListItemRef as any}\n />\n </BaseBox>\n );\n};\n\n/**\n * ### ActionList\n *\n * List of multiple actionable items. Can be used as menu items inside `Dropdown`,\n * `BottomSheet` and as selectable items when combined with `SelectInput`\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown>\n * <SelectInput label=\"Select Action\" />\n * <DropdownOverlay>\n * <DropdownHeader title=\"Header Title\" />\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * />\n * <ActionListItem\n * title=\"Pricing\"\n * value=\"pricing\"\n * leading={<ActionListItemAsset src=\"https://flagcdn.com/w20/in.png\" alt=\"India Flag\" />}\n * />\n * </ActionList>\n * <DropdownFooter><Button>Apply</Button></DropdownFooter>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n */\nconst ActionList = assignWithoutSideEffects(React.memo(_ActionList), {\n displayName: componentIds.ActionList,\n componentId: componentIds.ActionList,\n});\n\nexport type { ActionListProps };\nexport { ActionList };\n"],"names":["_ActionList","_ref","children","testID","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","setOptions","actionListItemRef","selectionType","dropdownBaseId","dropdownTriggerer","hasFooterAction","filteredValues","_useBottomSheetContex","useBottomSheetContext","isInBottomSheet","_React$useMemo","React","useMemo","getActionListProperties","sectionData","childrenWithId","actionListOptions","console","log","useEffect","length","dropdownComponentIds","triggers","AutoComplete","_jsx","ActionListNoResults","actionListContainerRole","getActionListContainerRole","actionListItemWrapperRole","getActionListItemWrapperRole","isMultiSelectable","ActionListBox","Object","assign","ref","makeAnalyticsAttribute","BaseBox","id","makeAccessible","role","multiSelectable","undefined","labelledBy","metaAttribute","name","MetaConstants","ActionList","assignWithoutSideEffects","memo","displayName","componentIds","componentId"],"mappings":";;;;;;;;;;;;;;;;;;oCAsBA,IAAMA,WAAW,CAAG,SAAdA,WAAWA,CAAAC,IAAA,CAA2E,CAArE,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,MAAM,CAAAF,IAAA,CAANE,MAAM,CAAKC,IAAI,CAAAC,wBAAA,CAAAJ,IAAA,CAAAK,SAAA,CAC9C,CAAA,IAAAC,YAAA,CAQIC,WAAW,EAAE,CAPfC,UAAU,CAAAF,YAAA,CAAVE,UAAU,CACVC,iBAAiB,CAAAH,YAAA,CAAjBG,iBAAiB,CACjBC,aAAa,CAAAJ,YAAA,CAAbI,aAAa,CACbC,cAAc,CAAAL,YAAA,CAAdK,cAAc,CACdC,iBAAiB,CAAAN,YAAA,CAAjBM,iBAAiB,CACjBC,eAAe,CAAAP,YAAA,CAAfO,eAAe,CACfC,cAAc,CAAAR,YAAA,CAAdQ,cAAc,CAGhB,IAAAC,qBAAA,CAA4BC,qBAAqB,EAAE,CAA3CC,eAAe,CAAAF,qBAAA,CAAfE,eAAe,CAEvB,IAAAC,cAAA,CAA2DC,cAAK,CAACC,OAAO,CACtE,UAAA,CAAA,OAAMC,uBAAuB,CAACpB,QAAQ,CAAC,CACvC,CAAA,CAAA,CAACA,QAAQ,CACX,CAAC,C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W,SAAS,CACtFC,UAAU,CAAG,CAAA,EAAEvC,cAAe,CAAA,MAAA,CAChC,CAAC,CAAC,CACEwC,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,UAAU,CAAEpD,MAAM,CAANA,MAAO,CAAC,CAAC,CACzDyC,sBAAsB,CAACxC,IAAI,CAAC,CAAAF,CAAAA,QAAA,CAEhC+B,GAAA,CAACO,aAAa,EACZtB,eAAe,CAAEA,eAAgB,CACjCmB,yBAAyB,CAAEA,yBAA0B,CACrDb,cAAc,CAAEA,cAAe,CAC/BD,WAAW,CAAEA,WAAY,CACzBgB,iBAAiB,CAAEA,iBAAkB,CACrCI,GAAG,CAAEjC,iBAAyB,CAC/B,CAAC,CAAA,CACK,CACV,CACH,CAAC,CAiCK,IAAA6C,UAAU,CAAGC,wBAAwB,CAACpC,cAAK,CAACqC,IAAI,CAACzD,WAAW,CAAC,CAAE,CACnE0D,WAAW,CAAEC,YAAY,CAACJ,UAAU,CACpCK,WAAW,CAAED,YAAY,CAACJ,UAC5B,CAAC;;;;"}
@@ -7,19 +7,17 @@ import { getActionListItemRole, getActionListSectionRole } from './getA11yRoles.
7
7
  import { Divider } from '../Divider/Divider.js';
8
8
  import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
9
9
  import { useDropdown } from '../Dropdown/useDropdown.js';
10
- import '../Typography/BaseText/BaseText.native.js';
11
- import { throwBladeError } from '../../utils/logger/logger.js';
12
- import '@babel/runtime/helpers/slicedToArray';
10
+ import '../Typography/Heading/Heading.js';
11
+ import { Text } from '../Typography/Text/Text.js';
12
+ import '../Typography/Code/Code.js';
13
+ import '../Typography/Display/Display.js';
13
14
  import 'react-native';
14
- import '../../tokens/global/typography.js';
15
- import '../../tokens/global/motion.js';
15
+ import '@babel/runtime/helpers/slicedToArray';
16
+ import { throwBladeError } from '../../utils/logger/logger.js';
16
17
  import { isReactNative } from '../../utils/platform/isReactNative.js';
17
18
  import { castWebType } from '../../utils/platform/castUtils.js';
18
19
  import { makeSize } from '../../utils/makeSize/makeSize.js';
19
20
  import '../BladeProvider/useTheme.js';
20
- import { jsx, jsxs } from 'react/jsx-runtime';
21
- import { Text } from '../Typography/Text/Text.js';
22
- import '../Typography/Code/Code.js';
23
21
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js';
24
22
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
25
23
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
@@ -30,10 +28,13 @@ import { dropdownComponentIds } from '../Dropdown/dropdownComponentIds.js';
30
28
  import { BaseMenuItem } from '../BaseMenu/BaseMenuItem/BaseMenuItem.js';
31
29
  import { useBaseMenuItem } from '../BaseMenu/BaseMenuContext.js';
32
30
  import { Checkbox } from '../Checkbox/Checkbox.js';
31
+ import '../../tokens/global/typography.js';
32
+ import '../../tokens/global/motion.js';
33
33
  import '../Checkbox/CheckboxGroup/CheckboxGroupContext.js';
34
34
  import '@gorhom/portal';
35
35
  import 'react-native-gesture-handler';
36
36
  import '../BottomSheet/BottomSheetStack.js';
37
+ import { jsx, jsxs } from 'react/jsx-runtime';
37
38
  import 'react-native-svg';
38
39
  import '../Icons/_Svg/Svg/Svg.native.js';
39
40
  import '../VisuallyHidden/VisuallyHidden.native.js';
@@ -1 +1 @@
1
- {"version":3,"file":"ActionListItem.js","sources":["../../../../../src/components/ActionList/ActionListItem.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TouchableOpacity } from 'react-native';\nimport { componentIds } from './componentIds';\nimport { validateActionListItemProps, getNormalTextColor } from './actionListUtils';\nimport { getActionListItemRole, getActionListSectionRole } from './getA11yRoles';\nimport { Divider } from '~components/Divider';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport type { Platform } from '~utils';\nimport { castWebType, isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DataAnalyticsAttribute, StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport type { BadgeProps } from '~components/Badge';\nimport { Badge } from '~components/Badge';\nimport { Box } from '~components/Box';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { BaseMenuItem, useBaseMenuItem } from '~components/BaseMenu';\nimport { Checkbox } from '~components/Checkbox';\nimport type { AvatarProps } from '~components/Avatar/types';\nimport { Avatar } from '~components/Avatar';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListItemProps = {\n title: string;\n description?: string;\n onClick?: (clickProps: {\n name: string;\n value?: boolean;\n event: Platform.Select<{\n web: React.MouseEvent;\n native: React.TouchEvent<TouchableOpacity>;\n }>;\n }) => void;\n /**\n * value that you get from `onChange` event on SelectInput or in form submissions.\n */\n value: string;\n /**\n * Link to open when item is clicked.\n */\n href?: string;\n /**\n * HTML target of the link\n */\n target?: string;\n /**\n * Item that goes on left-side of item.\n *\n * Valid elements - `<ActionListItemIcon />`, `<ActionListItemAsset />`\n *\n * Will be overriden in multiselect\n */\n leading?: React.ReactNode;\n /**\n * Item that goes on right-side of item.\n *\n * Valid elements - `<ActionListItemText />`, `<ActionListItemIcon />`\n */\n trailing?: React.ReactNode;\n /**\n * Item that goes immediately next to the title.\n *\n * Valid elements - `<ActionListItemBadge />`, `<ActionListItemBadgeGroup />`\n *\n */\n titleSuffix?: React.ReactElement;\n isDisabled?: boolean;\n intent?: Extract<FeedbackColors, 'negative'>;\n /**\n * Can be used in combination of `onClick` to highlight item as selected in Button Triggers.\n *\n * When trigger is SelectInput, Use `value` prop on SelectInput instead to make dropdown controlled.\n */\n isSelected?: boolean;\n /**\n * Internally passed from ActionList. No need to pass it explicitly\n *\n * @private\n */\n _index?: number;\n} & TestID &\n DataAnalyticsAttribute;\n\nconst StyledActionListSectionTitle = styled(BaseBox)((props) => ({\n // @TODO: replace this styled-component with new layout box when we have padding shorthand\n padding: makeSize(props.theme.spacing[3]),\n}));\n\ntype ActionListSectionProps = {\n title: string;\n children: React.ReactNode[] | React.ReactNode;\n /**\n * Internally used to hide the divider on final item in React Native.\n *\n * Should not be used by consumers (also won't work on web)\n *\n * @private\n */\n _hideDivider?: boolean;\n /**\n * Internally used to hide / show section in AutoComplete\n *\n * @private\n */\n _sectionChildValues?: string[];\n} & TestID &\n DataAnalyticsAttribute;\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\n ...rest\n}: ActionListSectionProps): React.ReactElement => {\n const { hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, filteredValues } = useDropdown();\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const isSectionVisible = React.useMemo(() => {\n if (hasAutoComplete) {\n const visibleActionListItemInSection = _sectionChildValues?.find((actionItemValue) =>\n filteredValues.includes(actionItemValue),\n );\n\n return Boolean(visibleActionListItemInSection);\n }\n\n return true;\n }, [_sectionChildValues, hasAutoComplete, filteredValues]);\n\n const showDividerInRN = !(_hideDivider && isReactNative());\n const showDividerInAutoComplete = hasAutoComplete\n ? isSectionVisible && filteredValues.length > 1\n : true;\n\n return (\n <BaseBox\n {...makeAccessible({\n role: getActionListSectionRole(),\n label: title,\n })}\n {...metaAttribute({ name: MetaConstants.ActionListSection, testID })}\n {...makeAnalyticsAttribute(rest as Record<string, unknown>)}\n >\n {/* We're announcing title as group label so we can hide this */}\n {isSectionVisible ? (\n <StyledActionListSectionTitle {...makeAccessible({ hidden: true })}>\n <Text color=\"surface.text.gray.muted\" size=\"small\" weight=\"semibold\">\n {title}\n </Text>\n </StyledActionListSectionTitle>\n ) : null}\n <BaseBox\n {...makeAccessible({\n // On web, we just wrap it in another listbox to announce item count properly for particular group.\n // On React Native, we ignore it since `menu` + `group` role will take care of accessibility\n role: isReactNative() ? undefined : 'listbox',\n })}\n >\n {children}\n </BaseBox>\n {showDividerInAutoComplete && showDividerInRN ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" />\n ) : null}\n </BaseBox>\n );\n};\n\nconst ActionListSection = assignWithoutSideEffects(_ActionListSection, {\n componentId: componentIds.ActionListSection,\n});\n\nconst _ActionListItemIcon = ({ icon }: { icon: IconComponent }): React.ReactElement => {\n const Icon = icon;\n const { color, isDisabled } = useBaseMenuItem();\n const iconState = isDisabled ? 'disabled' : 'muted';\n return (\n <Icon\n color={\n color === 'negative'\n ? 'feedback.icon.negative.intense'\n : `interactive.icon.gray.${iconState}`\n }\n size=\"medium\"\n />\n );\n};\n\nconst ActionListItemIcon = assignWithoutSideEffects(_ActionListItemIcon, {\n componentId: componentIds.ActionListItemIcon,\n});\n\nconst _ActionListItemBadgeGroup = ({\n children,\n}: {\n children: React.ReactElement[] | React.ReactElement;\n}): React.ReactElement => {\n return (\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n {children}\n </Box>\n );\n};\n\nconst ActionListItemBadgeGroup = assignWithoutSideEffects(_ActionListItemBadgeGroup, {\n componentId: componentIds.ActionListItemBadgeGroup,\n});\n\nconst _ActionListItemAvatar = (avatarProps: Omit<AvatarProps, 'size' | ''>): React.ReactElement => {\n return <Avatar size=\"xsmall\" {...avatarProps} />;\n};\n\nconst ActionListItemAvatar = assignWithoutSideEffects(_ActionListItemAvatar, {\n componentId: componentIds.ActionListItemAvatar,\n});\n\nconst _ActionListItemBadge = (props: BadgeProps): React.ReactElement => {\n return <Badge size=\"medium\" marginLeft=\"spacing.3\" {...props} />;\n};\n\nconst ActionListItemBadge = assignWithoutSideEffects(_ActionListItemBadge, {\n componentId: componentIds.ActionListItemBadge,\n});\n\nconst _ActionListItemText = ({\n children,\n}: {\n children: StringChildrenType;\n}): React.ReactElement => {\n const { isDisabled } = useBaseMenuItem();\n\n return (\n <Text variant=\"caption\" color={getNormalTextColor(isDisabled, { isMuted: true })}>\n {children}\n </Text>\n );\n};\n\nconst ActionListItemText = assignWithoutSideEffects(_ActionListItemText, {\n componentId: componentIds.ActionListItemText,\n});\n\ntype ClickHandlerType = (e: React.MouseEvent<HTMLButtonElement>) => void;\n\nconst makeActionListItemClickable = (\n clickHandler: ClickHandlerType,\n): { onPress?: (e: React.TouchEvent<TouchableOpacity>) => void; onClick?: ClickHandlerType } => {\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: ignoring ReactNative press type for the peace of mind\n return { onPress: clickHandler };\n }\n\n return {\n onClick: clickHandler,\n };\n};\n\n/**\n * ### ActionListItem\n *\n * Creates option inside `ActionList`.\n *\n * #### Usage\n *\n * ```jsx\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}\n * />\n * </ActionList>\n * ```\n */\nconst _ActionListItem = (props: ActionListItemProps): React.ReactElement => {\n const {\n activeIndex,\n dropdownBaseId,\n onOptionClick,\n selectedIndices,\n setShouldIgnoreBlurAnimation,\n selectionType,\n dropdownTriggerer,\n isKeydownPressed,\n filteredValues,\n hasAutoCompleteInBottomSheetHeader,\n } = useDropdown();\n\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const renderOnWebAs = props.href ? 'a' : 'button';\n\n /**\n * In SelectInput, returns the isSelected according to selected indexes in the state\n *\n * In Other Triggers (Menu Usecase), returns `props.isSelected` since passing the\n * isSelected prop explicitly is the only way to select item in menu\n */\n const getIsSelected = (): boolean | undefined => {\n if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput || hasAutoComplete) {\n if (typeof props._index === 'number') {\n return selectedIndices.includes(props._index);\n }\n\n return undefined;\n }\n\n return props.isSelected;\n };\n\n const isSelected = getIsSelected();\n\n React.useEffect(() => {\n validateActionListItemProps({\n leading: props.leading,\n trailing: props.trailing,\n titleSuffix: props.titleSuffix,\n });\n }, [props.leading, props.trailing, props.titleSuffix]);\n\n React.useEffect(() => {\n if (__DEV__) {\n if (\n dropdownTriggerer === dropdownComponentIds.triggers.SelectInput &&\n props.intent === 'negative'\n ) {\n throwBladeError({\n message:\n 'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',\n moduleName: 'ActionListItem',\n });\n }\n }\n }, [props.intent, dropdownTriggerer]);\n\n return (\n // We use this context to change the color of subcomponents like ActionListItemIcon, ActionListItemText, etc\n <BaseMenuItem\n isVisible={hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true}\n as={!isReactNative() ? renderOnWebAs : undefined}\n id={`${dropdownBaseId}-${props._index}`}\n tabIndex={-1}\n title={props.title}\n description={props.description}\n leading={\n selectionType === 'multiple' ? (\n <BaseBox\n pointerEvents=\"none\"\n // Adding aria-hidden because the listbox item in multiselect in itself explains the behaviour so announcing checkbox is unneccesary and just a nice UI tweak for us\n {...makeAccessible({\n hidden: true,\n })}\n >\n <Checkbox isChecked={isSelected} tabIndex={-1} isDisabled={props.isDisabled}>\n {/* \n Checkbox requires children. Didn't want to make it optional because its helpful for consumers\n But for this case in particular, we just want to use Text separately so that we can control spacing and color and keep it consistent with non-multiselect dropdowns\n */}\n {null}\n </Checkbox>\n </BaseBox>\n ) : (\n props.leading\n )\n }\n trailing={props.trailing}\n titleSuffix={props.titleSuffix}\n href={props.href}\n target={props.target}\n className={activeIndex === props._index ? 'active-focus' : ''}\n isSelected={isSelected}\n isDisabled={props.isDisabled}\n role={getActionListItemRole(dropdownTriggerer, props.href)}\n {...makeActionListItemClickable((e: React.MouseEvent<HTMLButtonElement>): void => {\n if (typeof props._index === 'number') {\n onOptionClick(e, props._index);\n props.onClick?.({ name: props.value, value: isSelected, event: castWebType(e) });\n }\n })}\n {...makeAnalyticsAttribute({ ...props })}\n {...metaAttribute({ name: MetaConstants.ActionListItem, testID: props.testID })}\n onMouseDown={() => {\n // We want to keep focus on Dropdown's trigger while option is being clicked\n // So We set this flag that ignores the blur animation to avoid the flicker between focus out + focus in\n setShouldIgnoreBlurAnimation(true);\n }}\n onMouseUp={() => {\n // (Contd from above comment...) We set this flag back to false since blur of SelectInput is done calling by this time\n setShouldIgnoreBlurAnimation(false);\n }}\n data-value={props.value}\n data-index={props._index}\n selectionType={selectionType}\n color={props.intent}\n isKeydownPressed={isKeydownPressed}\n />\n );\n};\n\nconst ActionListItem = assignWithoutSideEffects(React.memo(_ActionListItem), {\n componentId: componentIds.ActionListItem,\n displayName: componentIds.ActionListItem,\n});\n\nexport type { ActionListItemProps, ActionListSectionProps };\nexport {\n ActionListItem,\n ActionListItemIcon,\n ActionListItemText,\n ActionListItemAvatar,\n ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n};\n"],"names":["StyledActionListSectionTitle","styled","BaseBox","props","padding","makeSize","theme","spacing","_ActionListSection","_ref","title","children","testID","_hideDivider","_sectionChildValues","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","React","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","Object","assign","makeAccessible","role","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","makeAnalyticsAttribute","_jsx","hidden","Text","color","size","weight","undefined","Divider","marginX","marginY","assignWithoutSideEffects","componentId","componentIds","_ActionListItemIcon","_ref2","icon","Icon","_useBaseMenuItem","useBaseMenuItem","isDisabled","iconState","ActionListItemIcon","_ActionListItemBadgeGroup","_ref3","Box","display","alignItems","flexDirection","ActionListItemBadgeGroup","_ActionListItemAvatar","avatarProps","Avatar","ActionListItemAvatar","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref4","_useBaseMenuItem2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","selectionType","isKeydownPressed","renderOnWebAs","href","getIsSelected","SelectInput","_index","isSelected","useEffect","validateActionListItemProps","leading","trailing","titleSuffix","__DEV__","intent","throwBladeError","message","moduleName","BaseMenuItem","isVisible","value","as","id","tabIndex","description","pointerEvents","Checkbox","isChecked","target","className","getActionListItemRole","e","event","castWebType","ActionListItem","onMouseDown","onMouseUp","memo","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,UAAA,CAAA,QAAA,CAAA,cAAA,CAAA,qBAAA,CAAA,CA2FA,IAAMA,4BAA4B,CAAGC,MAAM,CAACC,OAAO,CAAC,CAAC,SAACC,KAAK,CAAM,CAAA,OAAA,CAE/DC,OAAO,CAAEC,QAAQ,CAACF,KAAK,CAACG,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAC1C,CAAC,EAAC,CAAC,CAqBH,IAAMC,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAAC,IAAA,CAO0B,CANhD,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CACRC,MAAM,CAAAH,IAAA,CAANG,MAAM,CACNC,YAAY,CAAAJ,IAAA,CAAZI,YAAY,CACZC,mBAAmB,CAAAL,IAAA,CAAnBK,mBAAmB,CAChBC,IAAI,CAAAC,wBAAA,CAAAP,IAAA,CAAAQ,SAAA,EAEP,IAAAC,YAAA,CAAkFC,WAAW,EAAE,CAAvFC,kCAA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C,CAAC,CAAEtI,KAAK,CAAC6G,MAAM,CAAC,CAC9B7G,KAAK,CAAC+F,OAAO,cAAb/F,KAAK,CAAC+F,OAAO,CAAG,CAAEnD,IAAI,CAAE5C,KAAK,CAAC2H,KAAK,CAAEA,KAAK,CAAEb,UAAU,CAAEyB,KAAK,CAAEC,WAAW,CAACF,CAAC,CAAE,CAAC,CAAC,CAClF,CACF,CAAC,CAAC,CACEvF,sBAAsB,CAAAV,MAAA,CAAAC,MAAA,CAAA,EAAA,CAAMtC,KAAK,CAAE,CAAC,CACpC2C,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAAC4F,cAAc,CAAEhI,MAAM,CAAET,KAAK,CAACS,MAAO,CAAC,CAAC,EAC/EiI,WAAW,CAAE,SAAAA,WAAA,EAAM,CAGjBpC,4BAA4B,CAAC,IAAI,CAAC,CACpC,CAAE,CACFqC,SAAS,CAAE,SAAAA,WAAM,CAEfrC,4BAA4B,CAAC,KAAK,CAAC,CACrC,CAAE,CACF,YAAYtG,CAAAA,KAAK,CAAC2H,KAAM,CACxB,YAAY3H,CAAAA,KAAK,CAAC6G,MAAO,CACzBN,aAAa,CAAEA,aAAc,CAC7BpD,KAAK,CAAEnD,KAAK,CAACqH,MAAO,CACpBb,gBAAgB,CAAEA,gBAAiB,CACpC,CAAA,CAAC,CAEN,CAAC,CAEK,IAAAiC,cAAc,CAAG/E,wBAAwB,CAACjC,cAAK,CAACmH,IAAI,CAAC5C,eAAe,CAAC,CAAE,CAC3ErC,WAAW,CAAEC,YAAY,CAAC6E,cAAc,CACxCI,WAAW,CAAEjF,YAAY,CAAC6E,cAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"ActionListItem.js","sources":["../../../../../src/components/ActionList/ActionListItem.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TouchableOpacity } from 'react-native';\nimport { componentIds } from './componentIds';\nimport { validateActionListItemProps, getNormalTextColor } from './actionListUtils';\nimport { getActionListItemRole, getActionListSectionRole } from './getA11yRoles';\nimport { Divider } from '~components/Divider';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport type { Platform } from '~utils';\nimport { castWebType, isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DataAnalyticsAttribute, StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport type { BadgeProps } from '~components/Badge';\nimport { Badge } from '~components/Badge';\nimport { Box } from '~components/Box';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { BaseMenuItem, useBaseMenuItem } from '~components/BaseMenu';\nimport { Checkbox } from '~components/Checkbox';\nimport type { AvatarProps } from '~components/Avatar/types';\nimport { Avatar } from '~components/Avatar';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ActionListItemProps = {\n title: string;\n description?: string;\n onClick?: (clickProps: {\n name: string;\n value?: boolean;\n event: Platform.Select<{\n web: React.MouseEvent;\n native: React.TouchEvent<TouchableOpacity>;\n }>;\n }) => void;\n /**\n * value that you get from `onChange` event on SelectInput or in form submissions.\n */\n value: string;\n /**\n * Link to open when item is clicked.\n */\n href?: string;\n /**\n * HTML target of the link\n */\n target?: string;\n /**\n * Item that goes on left-side of item.\n *\n * Valid elements - `<ActionListItemIcon />`, `<ActionListItemAsset />`\n *\n * Will be overriden in multiselect\n */\n leading?: React.ReactNode;\n /**\n * Item that goes on right-side of item.\n *\n * Valid elements - `<ActionListItemText />`, `<ActionListItemIcon />`\n */\n trailing?: React.ReactNode;\n /**\n * Item that goes immediately next to the title.\n *\n * Valid elements - `<ActionListItemBadge />`, `<ActionListItemBadgeGroup />`\n *\n */\n titleSuffix?: React.ReactElement;\n isDisabled?: boolean;\n intent?: Extract<FeedbackColors, 'negative'>;\n /**\n * Can be used in combination of `onClick` to highlight item as selected in Button Triggers.\n *\n * When trigger is SelectInput, Use `value` prop on SelectInput instead to make dropdown controlled.\n */\n isSelected?: boolean;\n /**\n * Internally passed from ActionList. No need to pass it explicitly\n *\n * @private\n */\n _index?: number;\n} & TestID &\n DataAnalyticsAttribute;\n\nconst StyledActionListSectionTitle = styled(BaseBox)((props) => ({\n // @TODO: replace this styled-component with new layout box when we have padding shorthand\n padding: makeSize(props.theme.spacing[3]),\n}));\n\ntype ActionListSectionProps = {\n title: string;\n children: React.ReactNode[] | React.ReactNode;\n /**\n * Internally used to hide the divider on final item in React Native.\n *\n * Should not be used by consumers (also won't work on web)\n *\n * @private\n */\n _hideDivider?: boolean;\n /**\n * Internally used to hide / show section in AutoComplete\n *\n * @private\n */\n _sectionChildValues?: string[];\n} & TestID &\n DataAnalyticsAttribute;\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\n ...rest\n}: ActionListSectionProps): React.ReactElement => {\n const { hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, filteredValues } = useDropdown();\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const isSectionVisible = React.useMemo(() => {\n if (hasAutoComplete) {\n const visibleActionListItemInSection = _sectionChildValues?.find((actionItemValue) =>\n filteredValues.includes(actionItemValue),\n );\n\n return Boolean(visibleActionListItemInSection);\n }\n\n return true;\n }, [_sectionChildValues, hasAutoComplete, filteredValues]);\n\n const showDividerInRN = !(_hideDivider && isReactNative());\n const showDividerInAutoComplete = hasAutoComplete\n ? isSectionVisible && filteredValues.length > 1\n : true;\n\n return (\n <BaseBox\n {...makeAccessible({\n role: getActionListSectionRole(),\n label: title,\n })}\n {...metaAttribute({ name: MetaConstants.ActionListSection, testID })}\n {...makeAnalyticsAttribute(rest as Record<string, unknown>)}\n >\n {/* We're announcing title as group label so we can hide this */}\n {isSectionVisible ? (\n <StyledActionListSectionTitle {...makeAccessible({ hidden: true })}>\n <Text color=\"surface.text.gray.muted\" size=\"small\" weight=\"semibold\">\n {title}\n </Text>\n </StyledActionListSectionTitle>\n ) : null}\n <BaseBox\n {...makeAccessible({\n // On web, we just wrap it in another listbox to announce item count properly for particular group.\n // On React Native, we ignore it since `menu` + `group` role will take care of accessibility\n role: isReactNative() ? undefined : 'listbox',\n })}\n >\n {children}\n </BaseBox>\n {showDividerInAutoComplete && showDividerInRN ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" />\n ) : null}\n </BaseBox>\n );\n};\n\nconst ActionListSection = assignWithoutSideEffects(_ActionListSection, {\n componentId: componentIds.ActionListSection,\n});\n\nconst _ActionListItemIcon = ({ icon }: { icon: IconComponent }): React.ReactElement => {\n const Icon = icon;\n const { color, isDisabled } = useBaseMenuItem();\n const iconState = isDisabled ? 'disabled' : 'muted';\n return (\n <Icon\n color={\n color === 'negative'\n ? 'feedback.icon.negative.intense'\n : `interactive.icon.gray.${iconState}`\n }\n size=\"medium\"\n />\n );\n};\n\nconst ActionListItemIcon = assignWithoutSideEffects(_ActionListItemIcon, {\n componentId: componentIds.ActionListItemIcon,\n});\n\nconst _ActionListItemBadgeGroup = ({\n children,\n}: {\n children: React.ReactElement[] | React.ReactElement;\n}): React.ReactElement => {\n return (\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n {children}\n </Box>\n );\n};\n\nconst ActionListItemBadgeGroup = assignWithoutSideEffects(_ActionListItemBadgeGroup, {\n componentId: componentIds.ActionListItemBadgeGroup,\n});\n\nconst _ActionListItemAvatar = (avatarProps: Omit<AvatarProps, 'size' | ''>): React.ReactElement => {\n return <Avatar size=\"xsmall\" {...avatarProps} />;\n};\n\nconst ActionListItemAvatar = assignWithoutSideEffects(_ActionListItemAvatar, {\n componentId: componentIds.ActionListItemAvatar,\n});\n\nconst _ActionListItemBadge = (props: BadgeProps): React.ReactElement => {\n return <Badge size=\"medium\" marginLeft=\"spacing.3\" {...props} />;\n};\n\nconst ActionListItemBadge = assignWithoutSideEffects(_ActionListItemBadge, {\n componentId: componentIds.ActionListItemBadge,\n});\n\nconst _ActionListItemText = ({\n children,\n}: {\n children: StringChildrenType;\n}): React.ReactElement => {\n const { isDisabled } = useBaseMenuItem();\n\n return (\n <Text variant=\"caption\" color={getNormalTextColor(isDisabled, { isMuted: true })}>\n {children}\n </Text>\n );\n};\n\nconst ActionListItemText = assignWithoutSideEffects(_ActionListItemText, {\n componentId: componentIds.ActionListItemText,\n});\n\ntype ClickHandlerType = (e: React.MouseEvent<HTMLButtonElement>) => void;\n\nconst makeActionListItemClickable = (\n clickHandler: ClickHandlerType,\n): { onPress?: (e: React.TouchEvent<TouchableOpacity>) => void; onClick?: ClickHandlerType } => {\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: ignoring ReactNative press type for the peace of mind\n return { onPress: clickHandler };\n }\n\n return {\n onClick: clickHandler,\n };\n};\n\n/**\n * ### ActionListItem\n *\n * Creates option inside `ActionList`.\n *\n * #### Usage\n *\n * ```jsx\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}\n * />\n * </ActionList>\n * ```\n */\nconst _ActionListItem = (props: ActionListItemProps): React.ReactElement => {\n const {\n activeIndex,\n dropdownBaseId,\n onOptionClick,\n selectedIndices,\n setShouldIgnoreBlurAnimation,\n selectionType,\n dropdownTriggerer,\n isKeydownPressed,\n filteredValues,\n hasAutoCompleteInBottomSheetHeader,\n } = useDropdown();\n\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const renderOnWebAs = props.href ? 'a' : 'button';\n\n /**\n * In SelectInput, returns the isSelected according to selected indexes in the state\n *\n * In Other Triggers (Menu Usecase), returns `props.isSelected` since passing the\n * isSelected prop explicitly is the only way to select item in menu\n */\n const getIsSelected = (): boolean | undefined => {\n if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput || hasAutoComplete) {\n if (typeof props._index === 'number') {\n return selectedIndices.includes(props._index);\n }\n\n return undefined;\n }\n\n return props.isSelected;\n };\n\n const isSelected = getIsSelected();\n\n React.useEffect(() => {\n validateActionListItemProps({\n leading: props.leading,\n trailing: props.trailing,\n titleSuffix: props.titleSuffix,\n });\n }, [props.leading, props.trailing, props.titleSuffix]);\n\n React.useEffect(() => {\n if (__DEV__) {\n if (\n dropdownTriggerer === dropdownComponentIds.triggers.SelectInput &&\n props.intent === 'negative'\n ) {\n throwBladeError({\n message:\n 'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',\n moduleName: 'ActionListItem',\n });\n }\n }\n }, [props.intent, dropdownTriggerer]);\n\n return (\n // We use this context to change the color of subcomponents like ActionListItemIcon, ActionListItemText, etc\n <BaseMenuItem\n isVisible={hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true}\n as={!isReactNative() ? renderOnWebAs : undefined}\n id={`${dropdownBaseId}-${props._index}`}\n tabIndex={-1}\n title={props.title}\n description={props.description}\n leading={\n selectionType === 'multiple' ? (\n <BaseBox\n pointerEvents=\"none\"\n // Adding aria-hidden because the listbox item in multiselect in itself explains the behaviour so announcing checkbox is unneccesary and just a nice UI tweak for us\n {...makeAccessible({\n hidden: true,\n })}\n >\n <Checkbox isChecked={isSelected} tabIndex={-1} isDisabled={props.isDisabled}>\n {/* \n Checkbox requires children. Didn't want to make it optional because its helpful for consumers\n But for this case in particular, we just want to use Text separately so that we can control spacing and color and keep it consistent with non-multiselect dropdowns\n */}\n {null}\n </Checkbox>\n </BaseBox>\n ) : (\n props.leading\n )\n }\n trailing={props.trailing}\n titleSuffix={props.titleSuffix}\n href={props.href}\n target={props.target}\n className={activeIndex === props._index ? 'active-focus' : ''}\n isSelected={isSelected}\n isDisabled={props.isDisabled}\n role={getActionListItemRole(dropdownTriggerer, props.href)}\n {...makeActionListItemClickable((e: React.MouseEvent<HTMLButtonElement>): void => {\n if (typeof props._index === 'number') {\n onOptionClick(e, props._index);\n props.onClick?.({ name: props.value, value: isSelected, event: castWebType(e) });\n }\n })}\n {...makeAnalyticsAttribute({ ...props })}\n {...metaAttribute({ name: MetaConstants.ActionListItem, testID: props.testID })}\n onMouseDown={() => {\n // We want to keep focus on Dropdown's trigger while option is being clicked\n // So We set this flag that ignores the blur animation to avoid the flicker between focus out + focus in\n setShouldIgnoreBlurAnimation(true);\n }}\n onMouseUp={() => {\n // (Contd from above comment...) We set this flag back to false since blur of SelectInput is done calling by this time\n setShouldIgnoreBlurAnimation(false);\n }}\n data-value={props.value}\n data-index={props._index}\n selectionType={selectionType}\n color={props.intent}\n isKeydownPressed={isKeydownPressed}\n />\n );\n};\n\nconst ActionListItem = assignWithoutSideEffects(React.memo(_ActionListItem), {\n componentId: componentIds.ActionListItem,\n displayName: componentIds.ActionListItem,\n});\n\nexport type { ActionListItemProps, ActionListSectionProps };\nexport {\n ActionListItem,\n ActionListItemIcon,\n ActionListItemText,\n ActionListItemAvatar,\n ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n};\n"],"names":["StyledActionListSectionTitle","styled","BaseBox","props","padding","makeSize","theme","spacing","_ActionListSection","_ref","title","children","testID","_hideDivider","_sectionChildValues","rest","_objectWithoutProperties","_excluded","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","React","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","Object","assign","makeAccessible","role","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","makeAnalyticsAttribute","_jsx","hidden","Text","color","size","weight","undefined","Divider","marginX","marginY","assignWithoutSideEffects","componentId","componentIds","_ActionListItemIcon","_ref2","icon","Icon","_useBaseMenuItem","useBaseMenuItem","isDisabled","iconState","ActionListItemIcon","_ActionListItemBadgeGroup","_ref3","Box","display","alignItems","flexDirection","ActionListItemBadgeGroup","_ActionListItemAvatar","avatarProps","Avatar","ActionListItemAvatar","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref4","_useBaseMenuItem2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","selectionType","isKeydownPressed","renderOnWebAs","href","getIsSelected","SelectInput","_index","isSelected","useEffect","validateActionListItemProps","leading","trailing","titleSuffix","__DEV__","intent","throwBladeError","message","moduleName","BaseMenuItem","isVisible","value","as","id","tabIndex","description","pointerEvents","Checkbox","isChecked","target","className","getActionListItemRole","e","event","castWebType","ActionListItem","onMouseDown","onMouseUp","memo","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,OAAA,CAAA,UAAA,CAAA,QAAA,CAAA,cAAA,CAAA,qBAAA,CAAA,CA2FA,IAAMA,4BAA4B,CAAGC,MAAM,CAACC,OAAO,CAAC,CAAC,SAACC,KAAK,CAAM,CAAA,OAAA,CAE/DC,OAAO,CAAEC,QAAQ,CAACF,KAAK,CAACG,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAC1C,CAAC,EAAC,CAAC,CAqBH,IAAMC,kBAAkB,CAAG,SAArBA,kBAAkBA,CAAAC,IAAA,CAO0B,CANhD,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CACRC,MAAM,CAAAH,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}
@@ -15,9 +15,10 @@ import '../BottomSheet/BottomSheetStack.js';
15
15
  import '../../tokens/global/typography.js';
16
16
  import '../../tokens/global/motion.js';
17
17
  import SearchIcon from '../Icons/SearchIcon/SearchIcon.js';
18
- import '../Typography/BaseText/BaseText.native.js';
18
+ import '../Typography/Heading/Heading.js';
19
19
  import { Text } from '../Typography/Text/Text.js';
20
20
  import '../Typography/Code/Code.js';
21
+ import '../Typography/Display/Display.js';
21
22
 
22
23
  var ActionListNoResults=function ActionListNoResults(){return jsxs(Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"spacing.5",children:[jsx(SearchIcon,{size:"xlarge",color:"surface.icon.gray.muted"}),jsx(Text,{marginTop:"spacing.5",weight:"semibold",children:"No Search Result Found"}),jsx(Text,{color:"surface.text.gray.subtle",marginTop:"spacing.3",size:"small",children:"Try searching for a different value"})]});};
23
24