@razorpay/blade 11.39.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (623) 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/Badge/Badge.js +10 -9
  22. package/build/lib/native/components/Badge/Badge.js.map +1 -1
  23. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +11 -10
  24. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  25. package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +8 -6
  26. package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
  27. package/build/lib/native/components/BottomNav/BottomNav.native.js +4 -10
  28. package/build/lib/native/components/BottomNav/BottomNav.native.js.map +1 -1
  29. package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  30. package/build/lib/native/components/Box/Box.js +1 -1
  31. package/build/lib/native/components/Box/Box.js.map +1 -1
  32. package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
  33. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  34. package/build/lib/native/components/Card/Card.js +1 -1
  35. package/build/lib/native/components/Card/Card.js.map +1 -1
  36. package/build/lib/native/components/Card/CardFooter.js +4 -8
  37. package/build/lib/native/components/Card/CardFooter.js.map +1 -1
  38. package/build/lib/native/components/Card/CardHeader.js +5 -9
  39. package/build/lib/native/components/Card/CardHeader.js.map +1 -1
  40. package/build/lib/native/components/Card/CardRoot.native.js +1 -1
  41. package/build/lib/native/components/Card/CardRoot.native.js.map +1 -1
  42. package/build/lib/native/components/Carousel/Carousel.native.js +1 -1
  43. package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
  44. package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js +1 -1
  45. package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js.map +1 -1
  46. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  47. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  48. package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  49. package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  50. package/build/lib/native/components/Checkbox/Checkbox.js +6 -4
  51. package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
  52. package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js +1 -1
  53. package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js.map +1 -1
  54. package/build/lib/native/components/Chip/Chip.js +5 -3
  55. package/build/lib/native/components/Chip/Chip.js.map +1 -1
  56. package/build/lib/native/components/Chip/ChipGroup.js +4 -3
  57. package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
  58. package/build/lib/native/components/Chip/chipTokens.js +1 -1
  59. package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
  60. package/build/lib/native/components/Collapsible/Collapsible.js +2 -2
  61. package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
  62. package/build/lib/native/components/Collapsible/commonStyles.js +1 -1
  63. package/build/lib/native/components/Collapsible/commonStyles.js.map +1 -1
  64. package/build/lib/native/components/Counter/Counter.js +13 -12
  65. package/build/lib/native/components/Counter/Counter.js.map +1 -1
  66. package/build/lib/native/components/Divider/Divider.js +2 -2
  67. package/build/lib/native/components/Divider/Divider.js.map +1 -1
  68. package/build/lib/native/components/Drawer/Drawer.native.js +4 -10
  69. package/build/lib/native/components/Drawer/Drawer.native.js.map +1 -1
  70. package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js +4 -9
  71. package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js.map +1 -1
  72. package/build/lib/native/components/Dropdown/Dropdown.js +2 -1
  73. package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
  74. package/build/lib/native/components/Fade/Fade.native.js +11 -0
  75. package/build/lib/native/components/Fade/Fade.native.js.map +1 -0
  76. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +3 -9
  77. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  78. package/build/lib/native/components/Form/FormLabel.js +10 -10
  79. package/build/lib/native/components/Indicator/Indicator.js +7 -6
  80. package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
  81. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
  82. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
  83. package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
  84. package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
  85. package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +3 -3
  86. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +8 -10
  87. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  88. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +9 -8
  89. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
  90. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +1 -1
  91. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  92. package/build/lib/native/components/Link/BaseLink/BaseLink.js +1 -1
  93. package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
  94. package/build/lib/native/components/List/List.js +1 -1
  95. package/build/lib/native/components/List/List.js.map +1 -1
  96. package/build/lib/native/components/List/ListItem.js +8 -10
  97. package/build/lib/native/components/List/ListItem.js.map +1 -1
  98. package/build/lib/native/components/List/ListItemCode.js +3 -9
  99. package/build/lib/native/components/List/ListItemCode.js.map +1 -1
  100. package/build/lib/native/components/List/ListItemText.js +3 -8
  101. package/build/lib/native/components/List/ListItemText.js.map +1 -1
  102. package/build/lib/native/components/Menu/Menu.native.js +4 -10
  103. package/build/lib/native/components/Menu/Menu.native.js.map +1 -1
  104. package/build/lib/native/components/Menu/MenuItem.native.js +4 -10
  105. package/build/lib/native/components/Menu/MenuItem.native.js.map +1 -1
  106. package/build/lib/native/components/Menu/MenuOverlay.native.js +4 -10
  107. package/build/lib/native/components/Menu/MenuOverlay.native.js.map +1 -1
  108. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js +4 -10
  109. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js.map +1 -1
  110. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js +4 -10
  111. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js.map +1 -1
  112. package/build/lib/native/components/Modal/Modal.native.js +4 -9
  113. package/build/lib/native/components/Modal/Modal.native.js.map +1 -1
  114. package/build/lib/native/components/Modal/ModalBody.native.js +3 -8
  115. package/build/lib/native/components/Modal/ModalBody.native.js.map +1 -1
  116. package/build/lib/native/components/Modal/ModalFooter.native.js +3 -8
  117. package/build/lib/native/components/Modal/ModalFooter.native.js.map +1 -1
  118. package/build/lib/native/components/Modal/ModalHeader.native.js +3 -8
  119. package/build/lib/native/components/Modal/ModalHeader.native.js.map +1 -1
  120. package/build/lib/native/components/Morph/Morph.native.js +11 -0
  121. package/build/lib/native/components/Morph/Morph.native.js.map +1 -0
  122. package/build/lib/native/components/Move/Move.native.js +11 -0
  123. package/build/lib/native/components/Move/Move.native.js.map +1 -0
  124. package/build/lib/native/components/Popover/PopoverContent.js +6 -8
  125. package/build/lib/native/components/Popover/PopoverContent.js.map +1 -1
  126. package/build/lib/native/components/Popover/PopoverContentWrapper.native.js +1 -1
  127. package/build/lib/native/components/Popover/PopoverContentWrapper.native.js.map +1 -1
  128. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js +7 -9
  129. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
  130. package/build/lib/native/components/ProgressBar/CircularProgressLabel.js +3 -8
  131. package/build/lib/native/components/ProgressBar/CircularProgressLabel.js.map +1 -1
  132. package/build/lib/native/components/ProgressBar/ProgressBar.js +2 -2
  133. package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
  134. package/build/lib/native/components/Radio/Radio.js +2 -1
  135. package/build/lib/native/components/Radio/Radio.js.map +1 -1
  136. package/build/lib/native/components/Radio/RadioIcon/Fade.native.js +1 -1
  137. package/build/lib/native/components/Radio/RadioIcon/Fade.native.js.map +1 -1
  138. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  139. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  140. package/build/lib/native/components/Scale/Scale.native.js +11 -0
  141. package/build/lib/native/components/Scale/Scale.native.js.map +1 -0
  142. package/build/lib/native/components/SideNav/SideNav.native.js +4 -10
  143. package/build/lib/native/components/SideNav/SideNav.native.js.map +1 -1
  144. package/build/lib/native/components/SideNav/SideNavBody.native.js +4 -10
  145. package/build/lib/native/components/SideNav/SideNavBody.native.js.map +1 -1
  146. package/build/lib/native/components/SideNav/SideNavFooter.native.js +4 -10
  147. package/build/lib/native/components/SideNav/SideNavFooter.native.js.map +1 -1
  148. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js +4 -10
  149. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js.map +1 -1
  150. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js +4 -10
  151. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js.map +1 -1
  152. package/build/lib/native/components/SideNav/SideNavLevel.native.js +4 -10
  153. package/build/lib/native/components/SideNav/SideNavLevel.native.js.map +1 -1
  154. package/build/lib/native/components/SideNav/SideNavSection.native.js +4 -10
  155. package/build/lib/native/components/SideNav/SideNavSection.native.js.map +1 -1
  156. package/build/lib/native/components/SideNav/tokens.js.map +1 -1
  157. package/build/lib/native/components/Skeleton/PulseAnimation.native.js +1 -1
  158. package/build/lib/native/components/Skeleton/PulseAnimation.native.js.map +1 -1
  159. package/build/lib/native/components/Skeleton/Skeleton.js +2 -2
  160. package/build/lib/native/components/Skeleton/Skeleton.js.map +1 -1
  161. package/build/lib/native/components/Slide/Slide.native.js +11 -0
  162. package/build/lib/native/components/Slide/Slide.native.js.map +1 -0
  163. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +4 -3
  164. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  165. package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  166. package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  167. package/build/lib/native/components/Spinner/Spinner/Spinner.js +2 -1
  168. package/build/lib/native/components/Spinner/Spinner/Spinner.js.map +1 -1
  169. package/build/lib/native/components/StepGroup/StepGroup.native.js +4 -10
  170. package/build/lib/native/components/StepGroup/StepGroup.native.js.map +1 -1
  171. package/build/lib/native/components/StepGroup/StepItem.native.js +4 -10
  172. package/build/lib/native/components/StepGroup/StepItem.native.js.map +1 -1
  173. package/build/lib/native/components/Switch/Switch.js +2 -1
  174. package/build/lib/native/components/Switch/Switch.js.map +1 -1
  175. package/build/lib/native/components/Switch/getTrackStyles.js +1 -1
  176. package/build/lib/native/components/Switch/getTrackStyles.js.map +1 -1
  177. package/build/lib/native/components/Switch/switchTokens.js +1 -1
  178. package/build/lib/native/components/Switch/switchTokens.js.map +1 -1
  179. package/build/lib/native/components/Table/Table.native.js +4 -9
  180. package/build/lib/native/components/Table/Table.native.js.map +1 -1
  181. package/build/lib/native/components/Table/TableBody.native.js +3 -8
  182. package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
  183. package/build/lib/native/components/Table/TableEditableCell.native.js +3 -9
  184. package/build/lib/native/components/Table/TableEditableCell.native.js.map +1 -1
  185. package/build/lib/native/components/Table/TableFooter.native.js +3 -8
  186. package/build/lib/native/components/Table/TableFooter.native.js.map +1 -1
  187. package/build/lib/native/components/Table/TableHeader.native.js +3 -8
  188. package/build/lib/native/components/Table/TableHeader.native.js.map +1 -1
  189. package/build/lib/native/components/Table/TablePagination.native.js +3 -8
  190. package/build/lib/native/components/Table/TablePagination.native.js.map +1 -1
  191. package/build/lib/native/components/Table/TableToolbar.native.js +3 -8
  192. package/build/lib/native/components/Table/TableToolbar.native.js.map +1 -1
  193. package/build/lib/native/components/Table/tokens.js.map +1 -1
  194. package/build/lib/native/components/Tabs/Tabs.native.js +6 -8
  195. package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
  196. package/build/lib/native/components/Tag/AnimatedTag.native.js +1 -1
  197. package/build/lib/native/components/Tag/AnimatedTag.native.js.map +1 -1
  198. package/build/lib/native/components/Tag/Tag.js +3 -2
  199. package/build/lib/native/components/Tag/Tag.js.map +1 -1
  200. package/build/lib/native/components/Tooltip/TooltipContent.js +8 -8
  201. package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js +1 -1
  202. package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js.map +1 -1
  203. package/build/lib/native/components/TopNav/TabNav/TabNav.native.js +4 -10
  204. package/build/lib/native/components/TopNav/TabNav/TabNav.native.js.map +1 -1
  205. package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js +4 -10
  206. package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js.map +1 -1
  207. package/build/lib/native/components/TopNav/TopNav.native.js +4 -10
  208. package/build/lib/native/components/TopNav/TopNav.native.js.map +1 -1
  209. package/build/lib/native/components/Typography/Code/Code.js +1 -1
  210. package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
  211. package/build/lib/native/components/Typography/Display/Display.js +2 -2
  212. package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
  213. package/build/lib/native/components/Typography/Heading/Heading.js +2 -2
  214. package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
  215. package/build/lib/native/components/Typography/Text/Text.js +2 -2
  216. package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
  217. package/build/lib/native/components/index.js +5 -0
  218. package/build/lib/native/components/index.js.map +1 -1
  219. package/build/lib/native/tokens/global/motion.js +1 -1
  220. package/build/lib/native/tokens/global/motion.js.map +1 -1
  221. package/build/lib/native/utils/getMotionRefs.js +4 -0
  222. package/build/lib/native/utils/getMotionRefs.js.map +1 -0
  223. package/build/lib/web/development/components/Accordion/Accordion.js +6 -3
  224. package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
  225. package/build/lib/web/development/components/Accordion/commonStyles.js +1 -1
  226. package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
  227. package/build/lib/web/development/components/ActionList/ActionList.js +3 -0
  228. package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
  229. package/build/lib/web/development/components/Alert/Alert.js +6 -3
  230. package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
  231. package/build/lib/web/development/components/Amount/Amount.js +3 -2
  232. package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
  233. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
  234. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
  235. package/build/lib/web/development/components/Badge/Badge.js +4 -2
  236. package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
  237. package/build/lib/web/development/components/BaseMotion/BaseMotion.js +123 -0
  238. package/build/lib/web/development/components/BaseMotion/BaseMotion.js.map +1 -0
  239. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js +60 -0
  240. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js.map +1 -0
  241. package/build/lib/web/development/components/BaseMotion/index.js +3 -0
  242. package/build/lib/web/development/components/BaseMotion/index.js.map +1 -0
  243. package/build/lib/web/development/components/BaseMotion/types.js +2 -0
  244. package/build/lib/web/development/components/BaseMotion/types.js.map +1 -0
  245. package/build/lib/web/development/components/BottomNav/BottomNav.web.js +4 -2
  246. package/build/lib/web/development/components/BottomNav/BottomNav.web.js.map +1 -1
  247. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +1 -1
  248. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
  249. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
  250. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  251. package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  252. package/build/lib/web/development/components/Box/Box.js +2 -2
  253. package/build/lib/web/development/components/Box/Box.js.map +1 -1
  254. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +3 -1
  255. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  256. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +1 -1
  257. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  258. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +1 -1
  259. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  260. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +3 -2
  261. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  262. package/build/lib/web/development/components/Card/Card.js +3 -1
  263. package/build/lib/web/development/components/Card/Card.js.map +1 -1
  264. package/build/lib/web/development/components/Card/CardRoot.web.js +6 -4
  265. package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
  266. package/build/lib/web/development/components/Carousel/Carousel.web.js +6 -3
  267. package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
  268. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  269. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  270. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  271. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  272. package/build/lib/web/development/components/Checkbox/Checkbox.js +13 -3
  273. package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
  274. package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
  275. package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
  276. package/build/lib/web/development/components/Chip/Chip.js +11 -2
  277. package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
  278. package/build/lib/web/development/components/Chip/ChipGroup.js +5 -2
  279. package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
  280. package/build/lib/web/development/components/Chip/chipTokens.js +1 -1
  281. package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
  282. package/build/lib/web/development/components/Collapsible/Collapsible.js +6 -3
  283. package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
  284. package/build/lib/web/development/components/Collapsible/commonStyles.js +2 -2
  285. package/build/lib/web/development/components/Collapsible/commonStyles.js.map +1 -1
  286. package/build/lib/web/development/components/Counter/Counter.js +4 -2
  287. package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
  288. package/build/lib/web/development/components/Divider/Divider.js +4 -2
  289. package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
  290. package/build/lib/web/development/components/Drawer/Drawer.web.js +4 -4
  291. package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
  292. package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -3
  293. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  294. package/build/lib/web/development/components/Fade/Fade.web.js +62 -0
  295. package/build/lib/web/development/components/Fade/Fade.web.js.map +1 -0
  296. package/build/lib/web/development/components/Fade/index.js +2 -0
  297. package/build/lib/web/development/components/Fade/index.js.map +1 -0
  298. package/build/lib/web/development/components/FileUpload/FileUpload.web.js +11 -2
  299. package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
  300. package/build/lib/web/development/components/FileUpload/fileUploadTokens.js +1 -1
  301. package/build/lib/web/development/components/FileUpload/fileUploadTokens.js.map +1 -1
  302. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +1 -1
  303. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
  304. package/build/lib/web/development/components/Indicator/Indicator.js +4 -2
  305. package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
  306. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  307. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  308. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +21 -7
  309. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
  310. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +2 -2
  311. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  312. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +1 -1
  313. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
  314. package/build/lib/web/development/components/List/List.js +5 -3
  315. package/build/lib/web/development/components/List/List.js.map +1 -1
  316. package/build/lib/web/development/components/Modal/Modal.web.js +2 -2
  317. package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
  318. package/build/lib/web/development/components/Modal/ModalBackdrop.js +2 -2
  319. package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
  320. package/build/lib/web/development/components/Morph/Morph.web.js +48 -0
  321. package/build/lib/web/development/components/Morph/Morph.web.js.map +1 -0
  322. package/build/lib/web/development/components/Morph/index.js +2 -0
  323. package/build/lib/web/development/components/Morph/index.js.map +1 -0
  324. package/build/lib/web/development/components/Move/Move.web.js +66 -0
  325. package/build/lib/web/development/components/Move/Move.web.js.map +1 -0
  326. package/build/lib/web/development/components/Move/index.js +2 -0
  327. package/build/lib/web/development/components/Move/index.js.map +1 -0
  328. package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js +1 -1
  329. package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
  330. package/build/lib/web/development/components/ProgressBar/ProgressBar.js +8 -4
  331. package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
  332. package/build/lib/web/development/components/Radio/Radio.js +13 -3
  333. package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
  334. package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js +3 -3
  335. package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js.map +1 -1
  336. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  337. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  338. package/build/lib/web/development/components/Scale/Scale.web.js +47 -0
  339. package/build/lib/web/development/components/Scale/Scale.web.js.map +1 -0
  340. package/build/lib/web/development/components/Scale/index.js +2 -0
  341. package/build/lib/web/development/components/Scale/index.js.map +1 -0
  342. package/build/lib/web/development/components/SideNav/SideNav.web.js +7 -5
  343. package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
  344. package/build/lib/web/development/components/SideNav/tokens.js +1 -1
  345. package/build/lib/web/development/components/SideNav/tokens.js.map +1 -1
  346. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js +1 -1
  347. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js.map +1 -1
  348. package/build/lib/web/development/components/Skeleton/Skeleton.js +4 -1
  349. package/build/lib/web/development/components/Skeleton/Skeleton.js.map +1 -1
  350. package/build/lib/web/development/components/Slide/Slide.web.js +119 -0
  351. package/build/lib/web/development/components/Slide/Slide.web.js.map +1 -0
  352. package/build/lib/web/development/components/Slide/index.js +2 -0
  353. package/build/lib/web/development/components/Slide/index.js.map +1 -0
  354. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
  355. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  356. package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  357. package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  358. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +4 -1
  359. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
  360. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  361. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  362. package/build/lib/web/development/components/Stagger/StaggerProvider.js +13 -0
  363. package/build/lib/web/development/components/Stagger/StaggerProvider.js.map +1 -0
  364. package/build/lib/web/development/components/StepGroup/StepGroup.web.js +5 -3
  365. package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
  366. package/build/lib/web/development/components/StepGroup/StepItem.web.js +1 -1
  367. package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
  368. package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js +1 -1
  369. package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
  370. package/build/lib/web/development/components/Switch/Switch.js +13 -3
  371. package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
  372. package/build/lib/web/development/components/Switch/getTrackStyles.js +1 -1
  373. package/build/lib/web/development/components/Switch/getTrackStyles.js.map +1 -1
  374. package/build/lib/web/development/components/Switch/switchTokens.js +6 -6
  375. package/build/lib/web/development/components/Switch/switchTokens.js.map +1 -1
  376. package/build/lib/web/development/components/Table/Table.web.js +4 -2
  377. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  378. package/build/lib/web/development/components/Table/tokens.js +2 -2
  379. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  380. package/build/lib/web/development/components/Tabs/TabIndicator.web.js +1 -1
  381. package/build/lib/web/development/components/Tabs/TabIndicator.web.js.map +1 -1
  382. package/build/lib/web/development/components/Tabs/TabItem.web.js +2 -2
  383. package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
  384. package/build/lib/web/development/components/Tabs/Tabs.web.js +34 -1
  385. package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
  386. package/build/lib/web/development/components/Tag/AnimatedTag.web.js +2 -2
  387. package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
  388. package/build/lib/web/development/components/Tag/Tag.js +31 -29
  389. package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
  390. package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
  391. package/build/lib/web/development/components/Toast/Toast.web.js.map +1 -1
  392. package/build/lib/web/development/components/Toast/ToastContainer.web.js +1 -1
  393. package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
  394. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  395. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  396. package/build/lib/web/development/components/TopNav/TopNav.web.js +4 -2
  397. package/build/lib/web/development/components/TopNav/TopNav.web.js.map +1 -1
  398. package/build/lib/web/development/components/Typography/Code/Code.js +30 -27
  399. package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
  400. package/build/lib/web/development/components/Typography/Display/Display.js +6 -2
  401. package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
  402. package/build/lib/web/development/components/Typography/Heading/Heading.js +4 -1
  403. package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
  404. package/build/lib/web/development/components/Typography/Text/Text.js +6 -10
  405. package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
  406. package/build/lib/web/development/components/index.js +10 -0
  407. package/build/lib/web/development/components/index.js.map +1 -1
  408. package/build/lib/web/development/tokens/global/motion.js +22 -28
  409. package/build/lib/web/development/tokens/global/motion.js.map +1 -1
  410. package/build/lib/web/development/utils/cssBezierToArray.js +12 -0
  411. package/build/lib/web/development/utils/cssBezierToArray.js.map +1 -0
  412. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
  413. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  414. package/build/lib/web/development/utils/getMotionRefs.js +86 -0
  415. package/build/lib/web/development/utils/getMotionRefs.js.map +1 -0
  416. package/build/lib/web/development/utils/msToSeconds.js +6 -0
  417. package/build/lib/web/development/utils/msToSeconds.js.map +1 -0
  418. package/build/lib/web/production/components/Accordion/Accordion.js +6 -3
  419. package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
  420. package/build/lib/web/production/components/Accordion/commonStyles.js +1 -1
  421. package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
  422. package/build/lib/web/production/components/ActionList/ActionList.js +3 -0
  423. package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
  424. package/build/lib/web/production/components/Alert/Alert.js +6 -3
  425. package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
  426. package/build/lib/web/production/components/Amount/Amount.js +3 -2
  427. package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
  428. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
  429. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
  430. package/build/lib/web/production/components/Badge/Badge.js +4 -2
  431. package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
  432. package/build/lib/web/production/components/BaseMotion/BaseMotion.js +123 -0
  433. package/build/lib/web/production/components/BaseMotion/BaseMotion.js.map +1 -0
  434. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js +60 -0
  435. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js.map +1 -0
  436. package/build/lib/web/production/components/BaseMotion/index.js +3 -0
  437. package/build/lib/web/production/components/BaseMotion/index.js.map +1 -0
  438. package/build/lib/web/production/components/BaseMotion/types.js +2 -0
  439. package/build/lib/web/production/components/BaseMotion/types.js.map +1 -0
  440. package/build/lib/web/production/components/BottomNav/BottomNav.web.js +4 -2
  441. package/build/lib/web/production/components/BottomNav/BottomNav.web.js.map +1 -1
  442. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +1 -1
  443. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
  444. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
  445. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  446. package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  447. package/build/lib/web/production/components/Box/Box.js +2 -2
  448. package/build/lib/web/production/components/Box/Box.js.map +1 -1
  449. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +3 -1
  450. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  451. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +1 -1
  452. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  453. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +1 -1
  454. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  455. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +3 -2
  456. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  457. package/build/lib/web/production/components/Card/Card.js +3 -1
  458. package/build/lib/web/production/components/Card/Card.js.map +1 -1
  459. package/build/lib/web/production/components/Card/CardRoot.web.js +6 -4
  460. package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
  461. package/build/lib/web/production/components/Carousel/Carousel.web.js +6 -3
  462. package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
  463. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  464. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  465. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  466. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  467. package/build/lib/web/production/components/Checkbox/Checkbox.js +13 -3
  468. package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
  469. package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
  470. package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
  471. package/build/lib/web/production/components/Chip/Chip.js +11 -2
  472. package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
  473. package/build/lib/web/production/components/Chip/ChipGroup.js +5 -2
  474. package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
  475. package/build/lib/web/production/components/Chip/chipTokens.js +1 -1
  476. package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
  477. package/build/lib/web/production/components/Collapsible/Collapsible.js +6 -3
  478. package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
  479. package/build/lib/web/production/components/Collapsible/commonStyles.js +2 -2
  480. package/build/lib/web/production/components/Collapsible/commonStyles.js.map +1 -1
  481. package/build/lib/web/production/components/Counter/Counter.js +4 -2
  482. package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
  483. package/build/lib/web/production/components/Divider/Divider.js +4 -2
  484. package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
  485. package/build/lib/web/production/components/Drawer/Drawer.web.js +4 -4
  486. package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
  487. package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -3
  488. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  489. package/build/lib/web/production/components/Fade/Fade.web.js +62 -0
  490. package/build/lib/web/production/components/Fade/Fade.web.js.map +1 -0
  491. package/build/lib/web/production/components/Fade/index.js +2 -0
  492. package/build/lib/web/production/components/Fade/index.js.map +1 -0
  493. package/build/lib/web/production/components/FileUpload/FileUpload.web.js +11 -2
  494. package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
  495. package/build/lib/web/production/components/FileUpload/fileUploadTokens.js +1 -1
  496. package/build/lib/web/production/components/FileUpload/fileUploadTokens.js.map +1 -1
  497. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +1 -1
  498. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
  499. package/build/lib/web/production/components/Indicator/Indicator.js +4 -2
  500. package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
  501. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  502. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  503. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +21 -7
  504. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
  505. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +2 -2
  506. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  507. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +1 -1
  508. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
  509. package/build/lib/web/production/components/List/List.js +5 -3
  510. package/build/lib/web/production/components/List/List.js.map +1 -1
  511. package/build/lib/web/production/components/Modal/Modal.web.js +2 -2
  512. package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
  513. package/build/lib/web/production/components/Modal/ModalBackdrop.js +2 -2
  514. package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
  515. package/build/lib/web/production/components/Morph/Morph.web.js +48 -0
  516. package/build/lib/web/production/components/Morph/Morph.web.js.map +1 -0
  517. package/build/lib/web/production/components/Morph/index.js +2 -0
  518. package/build/lib/web/production/components/Morph/index.js.map +1 -0
  519. package/build/lib/web/production/components/Move/Move.web.js +66 -0
  520. package/build/lib/web/production/components/Move/Move.web.js.map +1 -0
  521. package/build/lib/web/production/components/Move/index.js +2 -0
  522. package/build/lib/web/production/components/Move/index.js.map +1 -0
  523. package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js +1 -1
  524. package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
  525. package/build/lib/web/production/components/ProgressBar/ProgressBar.js +8 -4
  526. package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
  527. package/build/lib/web/production/components/Radio/Radio.js +13 -3
  528. package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
  529. package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js +3 -3
  530. package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js.map +1 -1
  531. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  532. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  533. package/build/lib/web/production/components/Scale/Scale.web.js +47 -0
  534. package/build/lib/web/production/components/Scale/Scale.web.js.map +1 -0
  535. package/build/lib/web/production/components/Scale/index.js +2 -0
  536. package/build/lib/web/production/components/Scale/index.js.map +1 -0
  537. package/build/lib/web/production/components/SideNav/SideNav.web.js +7 -5
  538. package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
  539. package/build/lib/web/production/components/SideNav/tokens.js +1 -1
  540. package/build/lib/web/production/components/SideNav/tokens.js.map +1 -1
  541. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js +1 -1
  542. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js.map +1 -1
  543. package/build/lib/web/production/components/Skeleton/Skeleton.js +4 -1
  544. package/build/lib/web/production/components/Skeleton/Skeleton.js.map +1 -1
  545. package/build/lib/web/production/components/Slide/Slide.web.js +119 -0
  546. package/build/lib/web/production/components/Slide/Slide.web.js.map +1 -0
  547. package/build/lib/web/production/components/Slide/index.js +2 -0
  548. package/build/lib/web/production/components/Slide/index.js.map +1 -0
  549. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
  550. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  551. package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  552. package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  553. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +4 -1
  554. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
  555. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  556. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  557. package/build/lib/web/production/components/Stagger/StaggerProvider.js +13 -0
  558. package/build/lib/web/production/components/Stagger/StaggerProvider.js.map +1 -0
  559. package/build/lib/web/production/components/StepGroup/StepGroup.web.js +5 -3
  560. package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
  561. package/build/lib/web/production/components/StepGroup/StepItem.web.js +1 -1
  562. package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
  563. package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js +1 -1
  564. package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
  565. package/build/lib/web/production/components/Switch/Switch.js +13 -3
  566. package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
  567. package/build/lib/web/production/components/Switch/getTrackStyles.js +1 -1
  568. package/build/lib/web/production/components/Switch/getTrackStyles.js.map +1 -1
  569. package/build/lib/web/production/components/Switch/switchTokens.js +6 -6
  570. package/build/lib/web/production/components/Switch/switchTokens.js.map +1 -1
  571. package/build/lib/web/production/components/Table/Table.web.js +4 -2
  572. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  573. package/build/lib/web/production/components/Table/tokens.js +2 -2
  574. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  575. package/build/lib/web/production/components/Tabs/TabIndicator.web.js +1 -1
  576. package/build/lib/web/production/components/Tabs/TabIndicator.web.js.map +1 -1
  577. package/build/lib/web/production/components/Tabs/TabItem.web.js +2 -2
  578. package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
  579. package/build/lib/web/production/components/Tabs/Tabs.web.js +34 -1
  580. package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
  581. package/build/lib/web/production/components/Tag/AnimatedTag.web.js +2 -2
  582. package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
  583. package/build/lib/web/production/components/Tag/Tag.js +31 -29
  584. package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
  585. package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
  586. package/build/lib/web/production/components/Toast/Toast.web.js.map +1 -1
  587. package/build/lib/web/production/components/Toast/ToastContainer.web.js +1 -1
  588. package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
  589. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  590. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  591. package/build/lib/web/production/components/TopNav/TopNav.web.js +4 -2
  592. package/build/lib/web/production/components/TopNav/TopNav.web.js.map +1 -1
  593. package/build/lib/web/production/components/Typography/Code/Code.js +30 -27
  594. package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
  595. package/build/lib/web/production/components/Typography/Display/Display.js +6 -2
  596. package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
  597. package/build/lib/web/production/components/Typography/Heading/Heading.js +4 -1
  598. package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
  599. package/build/lib/web/production/components/Typography/Text/Text.js +6 -10
  600. package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
  601. package/build/lib/web/production/components/index.js +10 -0
  602. package/build/lib/web/production/components/index.js.map +1 -1
  603. package/build/lib/web/production/tokens/global/motion.js +22 -28
  604. package/build/lib/web/production/tokens/global/motion.js.map +1 -1
  605. package/build/lib/web/production/utils/cssBezierToArray.js +12 -0
  606. package/build/lib/web/production/utils/cssBezierToArray.js.map +1 -0
  607. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
  608. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  609. package/build/lib/web/production/utils/getMotionRefs.js +86 -0
  610. package/build/lib/web/production/utils/getMotionRefs.js.map +1 -0
  611. package/build/lib/web/production/utils/msToSeconds.js +6 -0
  612. package/build/lib/web/production/utils/msToSeconds.js.map +1 -0
  613. package/build/types/components/index.d.ts +17967 -5488
  614. package/build/types/components/index.native.d.ts +7923 -2158
  615. package/build/types/tokens/index.d.ts +103 -93
  616. package/build/types/tokens/index.native.d.ts +103 -93
  617. package/build/types/utils/index.d.ts +84 -71
  618. package/build/types/utils/index.native.d.ts +84 -71
  619. package/codemods/migrate-motion-tokens/transformers/__tests__/migrate-motion-tokens.test.ts +130 -0
  620. package/codemods/migrate-motion-tokens/transformers/index.ts +1 -0
  621. package/codemods/migrate-motion-tokens/transformers/migrate-motion.ts +24 -0
  622. package/codemods/migrate-motion-tokens/transformers/motionTokenMapping.json +11 -0
  623. package/package.json +3 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Counter.js","sources":["../../../../../../src/components/Counter/Counter.tsx"],"sourcesContent":["import { StyledCounter } from './StyledCounter';\nimport type { StyledCounterProps } from './types';\nimport { counterHeight, horizontalPadding } from './counterTokens';\nimport type { FeedbackColors, SubtleOrIntense } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { isReactNative, makeSize } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nexport type CounterProps = {\n /**\n * Sets the value for the counter.\n */\n value: number;\n /**\n * Sets the max value for the counter.\n * If value exceedes `max` it will render `value+`\n */\n max?: number;\n /**\n * Sets the color of the counter.\n *\n * @default 'neutral'\n */\n color?: FeedbackColors | 'primary';\n /**\n * Sets the contrast of the counter.\n *\n * @default 'subtle'\n */\n emphasis?: SubtleOrIntense;\n /**\n * Sets the size of the counter.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\ntype ColorProps = {\n textColor: BaseTextProps['color'];\n backgroundColor: StyledCounterProps['backgroundColor'];\n};\n\nconst getColorProps = ({\n color = 'neutral',\n emphasis = 'subtle',\n}: {\n color: NonNullable<CounterProps['color']>;\n emphasis: NonNullable<CounterProps['emphasis']>;\n}): ColorProps => {\n const props: ColorProps = {\n textColor: 'feedback.text.neutral.intense',\n backgroundColor: 'feedback.background.neutral.subtle',\n };\n\n if (color === 'primary') {\n // primary color badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `surface.text.primary.normal`;\n props.backgroundColor = `surface.background.primary.${emphasis}`;\n } else {\n // feedback colors badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `feedback.text.${color}.intense`;\n props.backgroundColor = `feedback.background.${color}.${emphasis}`;\n }\n return props;\n};\n\nconst _Counter = ({\n value,\n max,\n color = 'neutral',\n emphasis = 'subtle',\n size = 'medium',\n testID,\n ...rest\n}: CounterProps): React.ReactElement => {\n let content = `${value}`;\n if (max && value > max) {\n content = `${max}+`;\n }\n\n const { platform } = useTheme();\n const { backgroundColor, textColor } = getColorProps({\n color,\n emphasis,\n });\n\n const counterTextSizes = {\n small: {\n variant: 'body',\n size: 'xsmall',\n },\n medium: {\n variant: 'body',\n size: 'small',\n },\n large: {\n variant: 'body',\n size: 'medium',\n },\n } as const;\n\n return (\n <BaseBox\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n {...metaAttribute({ name: MetaConstants.Counter, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <StyledCounter\n minHeight={makeSize(counterHeight[size])}\n backgroundColor={backgroundColor}\n size={size}\n platform={platform}\n >\n <BaseBox\n paddingX={horizontalPadding[size]}\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n overflow=\"hidden\"\n >\n <Text\n {...counterTextSizes[size]}\n textAlign=\"center\"\n weight=\"medium\"\n truncateAfterLines={1}\n color={textColor}\n >\n {content}\n </Text>\n </BaseBox>\n </StyledCounter>\n </BaseBox>\n );\n};\n\nconst Counter = assignWithoutSideEffects(_Counter, {\n displayName: 'Counter',\n componentId: 'Counter',\n});\n\nexport { Counter };\n"],"names":["getColorProps","_ref","_ref$color","color","_ref$emphasis","emphasis","props","textColor","backgroundColor","concat","_Counter","_ref2","value","max","_ref2$color","_ref2$emphasis","_ref2$size","size","testID","rest","_objectWithoutProperties","_excluded","content","_useTheme","useTheme","platform","_getColorProps","counterTextSizes","small","variant","medium","large","_jsx","BaseBox","_objectSpread","display","isReactNative","metaAttribute","name","MetaConstants","Counter","getStyledProps","makeAnalyticsAttribute","children","StyledCounter","minHeight","makeSize","counterHeight","paddingX","horizontalPadding","flexDirection","justifyContent","alignItems","overflow","Text","textAlign","weight","truncateAfterLines","assignWithoutSideEffects","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAMD;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CALhBE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,UAAA;IAAAE,aAAA,GAAAH,IAAA,CACjBI,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,aAAA,CAAA;AAKnB,EAAA,IAAME,KAAiB,GAAG;AACxBC,IAAAA,SAAS,EAAE,+BAA+B;AAC1CC,IAAAA,eAAe,EAAE,oCAAA;GAClB,CAAA;EAED,IAAIL,KAAK,KAAK,SAAS,EAAE;AACvB;AACAG,IAAAA,KAAK,CAACC,SAAS,GACbF,QAAQ,KAAK,SAAS,GAAoE,iCAAA,GAAA,6BAAA,CAAA;AAC5FC,IAAAA,KAAK,CAACE,eAAe,GAAA,6BAAA,CAAAC,MAAA,CAAiCJ,QAAQ,CAAE,CAAA;AAClE,GAAC,MAAM;AACL;IACAC,KAAK,CAACC,SAAS,GACbF,QAAQ,KAAK,SAAS,GAAAI,iCAAAA,GAAAA,gBAAAA,CAAAA,MAAA,CAAwDN,KAAK,EAAU,UAAA,CAAA,CAAA;IAC/FG,KAAK,CAACE,eAAe,GAAA,sBAAA,CAAAC,MAAA,CAA0BN,KAAK,EAAAM,GAAAA,CAAAA,CAAAA,MAAA,CAAIJ,QAAQ,CAAE,CAAA;AACpE,GAAA;AACA,EAAA,OAAOC,KAAK,CAAA;AACd,CAAC,CAAA;AAED,IAAMI,QAAQ,GAAG,SAAXA,QAAQA,CAAAC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,UAAAA,SAAS,EAAC,QAAQ;AAClBC,UAAAA,MAAM,EAAC,QAAQ;AACfC,UAAAA,kBAAkB,EAAE,CAAE;AACtBtD,UAAAA,KAAK,EAAEI,SAAU;AAAAoC,UAAAA,QAAA,EAEhBrB,OAAAA;SACG,CAAA,CAAA;OACC,CAAA;KACI,CAAA;AAAC,GAAA,CACT,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMkB,OAAO,gBAAGkB,wBAAwB,CAAChD,QAAQ,EAAE;AACjDiD,EAAAA,WAAW,EAAE,SAAS;AACtBC,EAAAA,WAAW,EAAE,SAAA;AACf,CAAC;;;;"}
1
+ {"version":3,"file":"Counter.js","sources":["../../../../../../src/components/Counter/Counter.tsx"],"sourcesContent":["import React from 'react';\nimport { StyledCounter } from './StyledCounter';\nimport type { StyledCounterProps } from './types';\nimport { counterHeight, horizontalPadding } from './counterTokens';\nimport type { FeedbackColors, SubtleOrIntense } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { DataAnalyticsAttribute, BladeElementRef, TestID } from '~utils/types';\nimport { isReactNative, makeSize } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nexport type CounterProps = {\n /**\n * Sets the value for the counter.\n */\n value: number;\n /**\n * Sets the max value for the counter.\n * If value exceedes `max` it will render `value+`\n */\n max?: number;\n /**\n * Sets the color of the counter.\n *\n * @default 'neutral'\n */\n color?: FeedbackColors | 'primary';\n /**\n * Sets the contrast of the counter.\n *\n * @default 'subtle'\n */\n emphasis?: SubtleOrIntense;\n /**\n * Sets the size of the counter.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\ntype ColorProps = {\n textColor: BaseTextProps['color'];\n backgroundColor: StyledCounterProps['backgroundColor'];\n};\n\nconst getColorProps = ({\n color = 'neutral',\n emphasis = 'subtle',\n}: {\n color: NonNullable<CounterProps['color']>;\n emphasis: NonNullable<CounterProps['emphasis']>;\n}): ColorProps => {\n const props: ColorProps = {\n textColor: 'feedback.text.neutral.intense',\n backgroundColor: 'feedback.background.neutral.subtle',\n };\n\n if (color === 'primary') {\n // primary color badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `surface.text.primary.normal`;\n props.backgroundColor = `surface.background.primary.${emphasis}`;\n } else {\n // feedback colors badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `feedback.text.${color}.intense`;\n props.backgroundColor = `feedback.background.${color}.${emphasis}`;\n }\n return props;\n};\n\nconst _Counter = (\n {\n value,\n max,\n color = 'neutral',\n emphasis = 'subtle',\n size = 'medium',\n testID,\n ...rest\n }: CounterProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n let content = `${value}`;\n if (max && value > max) {\n content = `${max}+`;\n }\n\n const { platform } = useTheme();\n const { backgroundColor, textColor } = getColorProps({\n color,\n emphasis,\n });\n\n const counterTextSizes = {\n small: {\n variant: 'body',\n size: 'xsmall',\n },\n medium: {\n variant: 'body',\n size: 'small',\n },\n large: {\n variant: 'body',\n size: 'medium',\n },\n } as const;\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n {...metaAttribute({ name: MetaConstants.Counter, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <StyledCounter\n minHeight={makeSize(counterHeight[size])}\n backgroundColor={backgroundColor}\n size={size}\n platform={platform}\n >\n <BaseBox\n paddingX={horizontalPadding[size]}\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n overflow=\"hidden\"\n >\n <Text\n {...counterTextSizes[size]}\n textAlign=\"center\"\n weight=\"medium\"\n truncateAfterLines={1}\n color={textColor}\n >\n {content}\n </Text>\n </BaseBox>\n </StyledCounter>\n </BaseBox>\n );\n};\n\nconst Counter = assignWithoutSideEffects(React.forwardRef(_Counter), {\n displayName: 'Counter',\n componentId: 'Counter',\n});\n\nexport { Counter };\n"],"names":["getColorProps","_ref","_ref$color","color","_ref$emphasis","emphasis","props","textColor","backgroundColor","concat","_Counter","_ref2","ref","value","max","_ref2$color","_ref2$emphasis","_ref2$size","size","testID","rest","_objectWithoutProperties","_excluded","content","_useTheme","useTheme","platform","_getColorProps","counterTextSizes","small","variant","medium","large","_jsx","BaseBox","_objectSpread","display","isReactNative","metaAttribute","name","MetaConstants","Counter","getStyledProps","makeAnalyticsAttribute","children","StyledCounter","minHeight","makeSize","counterHeight","paddingX","horizontalPadding","flexDirection","justifyContent","alignItems","overflow","Text","textAlign","weight","truncateAfterLines","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAMD;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CALhBE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,UAAA;IAAAE,aAAA,GAAAH,IAAA,CACjBI,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,aAAA,CAAA;AAKnB,EAAA,IAAME,KAAiB,GAAG;AACxBC,IAAAA,SAAS,EAAE,+BAA+B;AAC1CC,IAAAA,eAAe,EAAE,oCAAA;GAClB,CAAA;EAED,IAAIL,KAAK,KAAK,SAAS,EAAE;AACvB;AACAG,IAAAA,KAAK,CAACC,SAAS,GACbF,QAAQ,KA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AAQ,CAACC,aAAa,CAAC9B,IAAI,CAAC,CAAE;AACzCV,MAAAA,eAAe,EAAEA,eAAgB;AACjCU,MAAAA,IAAI,EAAEA,IAAK;AACXQ,MAAAA,QAAQ,EAAEA,QAAS;MAAAkB,QAAA,eAEnBX,GAAA,CAACC,OAAO,EAAA;AACNe,QAAAA,QAAQ,EAAEC,iBAAiB,CAAChC,IAAI,CAAE;AAClCkB,QAAAA,OAAO,EAAC,MAAM;AACde,QAAAA,aAAa,EAAC,KAAK;AACnBC,QAAAA,cAAc,EAAC,QAAQ;AACvBC,QAAAA,UAAU,EAAC,QAAQ;AACnBC,QAAAA,QAAQ,EAAC,QAAQ;AAAAV,QAAAA,QAAA,eAEjBX,GAAA,CAACsB,IAAI,EAAApB,aAAA,CAAAA,aAAA,CACCP,EAAAA,EAAAA,gBAAgB,CAACV,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAC1BsC,UAAAA,SAAS,EAAC,QAAQ;AAClBC,UAAAA,MAAM,EAAC,QAAQ;AACfC,UAAAA,kBAAkB,EAAE,CAAE;AACtBvD,UAAAA,KAAK,EAAEI,SAAU;AAAAqC,UAAAA,QAAA,EAEhBrB,OAAAA;SACG,CAAA,CAAA;OACC,CAAA;KACI,CAAA;AAAC,GAAA,CACT,CAAC,CAAA;AAEd,CAAC,CAAA;AAEKkB,IAAAA,OAAO,gBAAGkB,wBAAwB,eAACC,cAAK,CAACC,UAAU,CAACnD,QAAQ,CAAC,EAAE;AACnEoD,EAAAA,WAAW,EAAE,SAAS;AACtBC,EAAAA,WAAW,EAAE,SAAA;AACf,CAAC;;;;"}
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
- import 'react';
3
+ import React__default from 'react';
4
4
  import styled from 'styled-components';
5
5
  import '../Box/BaseBox/index.js';
6
6
  import '../Box/styledProps/index.js';
@@ -40,7 +40,7 @@ var StyledDivider = /*#__PURE__*/styled(BaseBox).withConfig({
40
40
  height: height
41
41
  });
42
42
  });
43
- var Divider = function Divider(_ref2) {
43
+ var _Divider = function _Divider(_ref2, ref) {
44
44
  var _ref2$orientation = _ref2.orientation,
45
45
  orientation = _ref2$orientation === void 0 ? 'horizontal' : _ref2$orientation,
46
46
  _ref2$dividerStyle = _ref2.dividerStyle,
@@ -60,6 +60,7 @@ var Divider = function Divider(_ref2) {
60
60
  role: 'separator'
61
61
  });
62
62
  return /*#__PURE__*/jsx(StyledDivider, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
63
+ ref: ref,
63
64
  borderPosition: borderPosition,
64
65
  isDividerHorizontal: isDividerHorizontal,
65
66
  dividerStyle: dividerStyle,
@@ -71,6 +72,7 @@ var Divider = function Divider(_ref2) {
71
72
  testID: testID
72
73
  })), getStyledProps(styledProps)), accessibilityProps));
73
74
  };
75
+ var Divider = /*#__PURE__*/React__default.forwardRef(_Divider);
74
76
 
75
77
  export { Divider };
76
78
  //# sourceMappingURL=Divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.js","sources":["../../../../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport styled from 'styled-components';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { isReactNative, makeBorderSize } from '~utils';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport type { TestID } from '~utils/types';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype DividerProps = {\n /**\n * Sets the orientation of divider\n *\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Sets the style of divider\n *\n * @default 'solid'\n */\n dividerStyle?: 'solid' | 'dashed';\n /**\n * Sets the variant of divider\n *\n * @default 'normal'\n */\n variant?: 'normal' | 'subtle' | 'muted';\n /**\n * Sets the thickness of divider\n *\n * @default 'thin'\n */\n thickness?: 'thinner' | 'thin' | 'thick' | 'thicker';\n /**\n * Sets the height of divider. Divider uses Flex by default, use height only when parent is not flex.\n *\n */\n height?: CSSObject['height'];\n /**\n * Sets the width of divider. Divider uses Flex by default, use width only when parent is not flex.\n *\n */\n width?: CSSObject['width'];\n} & TestID &\n StyledPropsBlade;\n\nconst StyledDivider = styled(BaseBox)<{\n borderPosition: 'borderBottom' | 'borderLeft';\n dividerStyle: NonNullable<DividerProps['dividerStyle']>;\n thickness: NonNullable<DividerProps['thickness']>;\n height: DividerProps['height'];\n width: DividerProps['width'];\n isDividerHorizontal: boolean;\n}>(({ theme, borderPosition, dividerStyle, thickness, isDividerHorizontal, width, height }) => ({\n borderWidth: 0,\n [`${borderPosition}Style`]: dividerStyle,\n [`${borderPosition}Width`]: makeBorderSize(theme.border.width[thickness]),\n ...(isDividerHorizontal ? { flexGrow: 1, width } : { alignSelf: 'stretch', height }),\n}));\n\nconst Divider = ({\n orientation = 'horizontal',\n dividerStyle = 'solid',\n variant = 'muted',\n thickness = 'thin',\n height,\n width,\n testID,\n ...styledProps\n}: DividerProps): React.ReactElement => {\n const isDividerHorizontal = orientation === 'horizontal';\n const borderPosition = isDividerHorizontal ? 'borderBottom' : 'borderLeft';\n const borderColor = { [`${borderPosition}Color`]: `surface.border.gray.${variant}` };\n const accessibilityProps = isReactNative()\n ? {}\n : makeAccessible({\n role: 'separator',\n });\n\n return (\n <StyledDivider\n borderPosition={borderPosition}\n isDividerHorizontal={isDividerHorizontal}\n dividerStyle={dividerStyle}\n thickness={thickness}\n height={height}\n width={width}\n {...borderColor}\n {...metaAttribute({ name: MetaConstants.Divider, testID })}\n {...getStyledProps(styledProps)}\n {...accessibilityProps}\n />\n );\n};\n\nexport { Divider };\nexport type { DividerProps };\n"],"names":["StyledDivider","styled","BaseBox","withConfig","displayName","componentId","_ref","theme","borderPosition","dividerStyle","thickness","isDividerHorizontal","width","height","_objectSpread","_defineProperty","borderWidth","concat","makeBorderSize","border","flexGrow","alignSelf","Divider","_ref2","_ref2$orientation","orientation","_ref2$dividerStyle","_ref2$variant","variant","_ref2$thickness","testID","styledProps","_objectWithoutProperties","_excluded","borderColor","accessibilityProps","isReactNative","makeAccessible","role","_jsx","metaAttribute","name","MetaConstants","getStyledProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiDA,IAAMA,aAAa,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,wBAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAAA,CAAA,CAOlC,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,cAAc,GAAAF,IAAA,CAAdE,cAAc;IAAEC,YAAY,GAAAH,IAAA,CAAZG,YAAY;IAAEC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAEC,mBAAmB,GAAAL,IAAA,CAAnBK,mBAAmB;IAAEC,KAAK,GAAAN,IAAA,CAALM,KAAK;IAAEC,MAAM,GAAAP,IAAA,CAANO,MAAM,CAAA;AAAA,EAAA,OAAAC,aAAA,CAAAC,eAAA,CAAAA,eAAA,CAAA;AACtFC,IAAAA,WAAW,EAAE,CAAA;GAACC,EAAAA,EAAAA,CAAAA,MAAA,CACVT,cAAc,EAAA,OAAA,CAAA,EAAUC,YAAY,CAAAQ,EAAAA,EAAAA,CAAAA,MAAA,CACpCT,cAAc,EAAUU,OAAAA,CAAAA,EAAAA,cAAc,CAACX,KAAK,CAACY,MAAM,CAACP,KAAK,CAACF,SAAS,CAAC,CAAC,CACrEC,EAAAA,mBAAmB,GAAG;AAAES,IAAAA,QAAQ,EAAE,CAAC;AAAER,IAAAA,KAAK,EAALA,KAAAA;AAAM,GAAC,GAAG;AAAES,IAAAA,SAAS,EAAE,SAAS;AAAER,IAAAA,MAAM,EAANA,MAAAA;GAAQ,CAAA,CAAA;AAAA,CACnF,CAAC,CAAA;AAEH,IAAMS,OAAO,GAAG,S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;AACZN,IAAAA,cAAc,EAAEA,cAAe;AAC/BG,IAAAA,mBAAmB,EAAEA,mBAAoB;AACzCF,IAAAA,YAAY,EAAEA,YAAa;AAC3BC,IAAAA,SAAS,EAAEA,SAAU;AACrBG,IAAAA,MAAM,EAAEA,MAAO;AACfD,IAAAA,KAAK,EAAEA,KAAAA;GACHsB,EAAAA,WAAW,CACXM,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACpB,OAAO;AAAEQ,IAAAA,MAAM,EAANA,MAAAA;GAAQ,CAAC,GACtDa,cAAc,CAACZ,WAAW,CAAC,CAAA,EAC3BI,kBAAkB,CACvB,CAAC,CAAA;AAEN;;;;"}
1
+ {"version":3,"file":"Divider.js","sources":["../../../../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport styled from 'styled-components';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { isReactNative, makeBorderSize } from '~utils';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport type { BladeElementRef, TestID } from '~utils/types';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype DividerProps = {\n /**\n * Sets the orientation of divider\n *\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Sets the style of divider\n *\n * @default 'solid'\n */\n dividerStyle?: 'solid' | 'dashed';\n /**\n * Sets the variant of divider\n *\n * @default 'normal'\n */\n variant?: 'normal' | 'subtle' | 'muted';\n /**\n * Sets the thickness of divider\n *\n * @default 'thin'\n */\n thickness?: 'thinner' | 'thin' | 'thick' | 'thicker';\n /**\n * Sets the height of divider. Divider uses Flex by default, use height only when parent is not flex.\n *\n */\n height?: CSSObject['height'];\n /**\n * Sets the width of divider. Divider uses Flex by default, use width only when parent is not flex.\n *\n */\n width?: CSSObject['width'];\n} & TestID &\n StyledPropsBlade;\n\nconst StyledDivider = styled(BaseBox)<{\n borderPosition: 'borderBottom' | 'borderLeft';\n dividerStyle: NonNullable<DividerProps['dividerStyle']>;\n thickness: NonNullable<DividerProps['thickness']>;\n height: DividerProps['height'];\n width: DividerProps['width'];\n isDividerHorizontal: boolean;\n}>(({ theme, borderPosition, dividerStyle, thickness, isDividerHorizontal, width, height }) => ({\n borderWidth: 0,\n [`${borderPosition}Style`]: dividerStyle,\n [`${borderPosition}Width`]: makeBorderSize(theme.border.width[thickness]),\n ...(isDividerHorizontal ? { flexGrow: 1, width } : { alignSelf: 'stretch', height }),\n}));\n\nconst _Divider = (\n {\n orientation = 'horizontal',\n dividerStyle = 'solid',\n variant = 'muted',\n thickness = 'thin',\n height,\n width,\n testID,\n ...styledProps\n }: DividerProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const isDividerHorizontal = orientation === 'horizontal';\n const borderPosition = isDividerHorizontal ? 'borderBottom' : 'borderLeft';\n const borderColor = { [`${borderPosition}Color`]: `surface.border.gray.${variant}` };\n const accessibilityProps = isReactNative()\n ? {}\n : makeAccessible({\n role: 'separator',\n });\n\n return (\n <StyledDivider\n ref={ref as never}\n borderPosition={borderPosition}\n isDividerHorizontal={isDividerHorizontal}\n dividerStyle={dividerStyle}\n thickness={thickness}\n height={height}\n width={width}\n {...borderColor}\n {...metaAttribute({ name: MetaConstants.Divider, testID })}\n {...getStyledProps(styledProps)}\n {...accessibilityProps}\n />\n );\n};\n\nconst Divider = React.forwardRef(_Divider);\n\nexport { Divider };\nexport type { DividerProps };\n"],"names":["StyledDivider","styled","BaseBox","withConfig","displayName","componentId","_ref","theme","borderPosition","dividerStyle","thickness","isDividerHorizontal","width","height","_objectSpread","_defineProperty","borderWidth","concat","makeBorderSize","border","flexGrow","alignSelf","_Divider","_ref2","ref","_ref2$orientation","orientation","_ref2$dividerStyle","_ref2$variant","variant","_ref2$thickness","testID","styledProps","_objectWithoutProperties","_excluded","borderColor","accessibilityProps","isReactNative","makeAccessible","role","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CF,IAAAA,YAAY,EAAEA,YAAa;AAC3BC,IAAAA,SAAS,EAAEA,SAAU;AACrBG,IAAAA,MAAM,EAAEA,MAAO;AACfD,IAAAA,KAAK,EAAEA,KAAAA;GACHuB,EAAAA,WAAW,CACXM,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACC,OAAO;AAAEb,IAAAA,MAAM,EAANA,MAAAA;GAAQ,CAAC,GACtDc,cAAc,CAACb,WAAW,CAAC,CAAA,EAC3BI,kBAAkB,CACvB,CAAC,CAAA;AAEN,CAAC,CAAA;AAED,IAAMQ,OAAO,gBAAGE,cAAK,CAACC,UAAU,CAACzB,QAAQ;;;;"}
@@ -40,8 +40,8 @@ var AnimatedDrawerContainer = /*#__PURE__*/styled(BaseBox).withConfig({
40
40
  var theme = _ref.theme,
41
41
  isFirstDrawerInStack = _ref.isFirstDrawerInStack,
42
42
  isVisible = _ref.isVisible;
43
- var entranceTransition = "all ".concat(castWebType(castWebType(makeMotionTime(theme.motion.duration.gentle))), " ").concat(castWebType(theme.motion.easing.entrance.revealing));
44
- var exitTransition = "all\n ".concat(castWebType(makeMotionTime(theme.motion.duration.xmoderate)), "\n ").concat(castWebType(theme.motion.easing.exit.revealing));
43
+ var entranceTransition = "all ".concat(castWebType(castWebType(makeMotionTime(theme.motion.duration.xmoderate))), " ").concat(castWebType(theme.motion.easing.entrance));
44
+ var exitTransition = "all\n ".concat(castWebType(makeMotionTime(theme.motion.duration.moderate)), "\n ").concat(castWebType(theme.motion.easing.exit));
45
45
  return {
46
46
  opacity: isVisible ? 1 : 0,
47
47
  transform: isVisible ? isFirstDrawerInStack ? 'translateX(calc(-100% - 16px))' : 'translateX(-100%)' : 'translateX(0%)',
@@ -56,11 +56,11 @@ var DrawerOverlay = /*#__PURE__*/styled(FloatingOverlay).withConfig({
56
56
  var theme = _ref2.theme;
57
57
  return _defineProperty({
58
58
  opacity: 0,
59
- transition: "opacity\n ".concat(makeMotionTime(theme.motion.duration.xmoderate), "\n ").concat(castWebType(theme.motion.easing.exit.revealing)),
59
+ transition: "opacity\n ".concat(makeMotionTime(theme.motion.duration.xmoderate), "\n ").concat(castWebType(theme.motion.easing.exit)),
60
60
  backgroundColor: theme.colors.overlay.background.subtle
61
61
  }, "&.".concat(SHOW_DRAWER), {
62
62
  opacity: 1,
63
- transition: "opacity ".concat(makeMotionTime(theme.motion.duration.gentle), " ").concat(castWebType(theme.motion.easing.entrance.revealing))
63
+ transition: "opacity ".concat(makeMotionTime(theme.motion.duration.gentle), " ").concat(castWebType(theme.motion.easing.entrance))
64
64
  });
65
65
  });
66
66
  var _Drawer = function _Drawer(_ref4) {
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.web.js","sources":["../../../../../../src/components/Drawer/Drawer.web.tsx"],"sourcesContent":["import {\n FloatingFocusManager,\n FloatingOverlay,\n FloatingPortal,\n useFloating,\n} from '@floating-ui/react';\nimport type { CSSProperties } from 'react';\nimport React from 'react';\nimport styled from 'styled-components';\nimport usePresence from 'use-presence';\nimport { drawerComponentIds } from './drawerComponentIds';\nimport { DrawerContext } from './DrawerContext';\nimport type { DrawerProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime, useTheme } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { useDrawerStack } from '~components/Drawer/StackProvider';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useId } from '~utils/useId';\nimport { useVerifyAllowedChildren } from '~utils/useVerifyAllowedChildren';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst SHOW_DRAWER = 'show-drawer';\n\nconst AnimatedDrawerContainer = styled(BaseBox)<{\n isFirstDrawerInStack: boolean;\n isVisible: boolean;\n}>(({ theme, isFirstDrawerInStack, isVisible }) => {\n const entranceTransition: CSSProperties['transition'] = `all ${castWebType(\n castWebType(makeMotionTime(theme.motion.duration.gentle)),\n )} ${castWebType(theme.motion.easing.entrance.revealing)}`;\n\n const exitTransition: CSSProperties['transition'] = `all\n ${castWebType(makeMotionTime(theme.motion.duration.xmoderate))}\n ${castWebType(theme.motion.easing.exit.revealing)}`;\n\n return {\n opacity: isVisible ? 1 : 0,\n transform: isVisible\n ? isFirstDrawerInStack\n ? 'translateX(calc(-100% - 16px))'\n : 'translateX(-100%)'\n : 'translateX(0%)',\n transition: isVisible ? entranceTransition : exitTransition,\n animationFillMode: 'initial',\n };\n});\n\nconst DrawerOverlay = styled(FloatingOverlay)(({ theme }) => {\n return {\n opacity: 0,\n transition: `opacity\n ${makeMotionTime(theme.motion.duration.xmoderate)}\n ${castWebType(theme.motion.easing.exit.revealing)}`,\n backgroundColor: theme.colors.overlay.background.subtle,\n\n [`&.${SHOW_DRAWER}`]: {\n opacity: 1,\n transition: `opacity ${makeMotionTime(theme.motion.duration.gentle)} ${castWebType(\n theme.motion.easing.entrance.revealing,\n )}`,\n },\n };\n});\n\nconst _Drawer = ({\n isOpen,\n onDismiss,\n zIndex = componentZIndices.drawer,\n children,\n accessibilityLabel,\n showOverlay = true,\n initialFocusRef,\n isLazy = true,\n testID,\n ...rest\n}: DrawerProps): React.ReactElement => {\n const closeButtonRef = React.useRef<HTMLDivElement>(null);\n const [zIndexState, setZIndexState] = React.useState<number>(zIndex);\n\n useVerifyAllowedChildren({\n children,\n componentName: 'Drawer',\n allowedComponents: [drawerComponentIds.DrawerHeader, drawerComponentIds.DrawerBody],\n });\n\n const { theme } = useTheme();\n const drawerId = useId('drawer');\n const { drawerStack, addToDrawerStack, removeFromDrawerStack } = useDrawerStack();\n\n const { isMounted, isVisible, isExiting } = usePresence(isOpen, {\n enterTransitionDuration: theme.motion.duration.gentle,\n exitTransitionDuration: theme.motion.duration.xmoderate,\n initialEnter: true,\n });\n\n const { stackingLevel, isFirstDrawerInStack } = React.useMemo(() => {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n const level = Object.keys(drawerStack).indexOf(drawerId) + 1;\n return {\n stackingLevel: level,\n isFirstDrawerInStack: level === 1 && Object.keys(drawerStack).length > 1,\n };\n }, [drawerId, drawerStack]);\n\n const { refs, context } = useFloating({\n open: isMounted,\n });\n\n React.useEffect(() => {\n if (isOpen) {\n addToDrawerStack({ elementId: drawerId, onDismiss });\n } else {\n removeFromDrawerStack({ elementId: drawerId });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen]);\n\n // When z-index is not defined by user, we use default drawer z index and add stackingLevel to ensure\n // new drawer that opens, always opens on top of previous one.\n React.useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n setZIndexState(zIndex + stackingLevel);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMounted]);\n\n const contextValue = React.useMemo(\n () => ({\n close: onDismiss,\n closeButtonRef,\n stackingLevel,\n isExiting,\n }),\n [isExiting, onDismiss, stackingLevel],\n );\n\n return (\n <DrawerContext.Provider value={contextValue}>\n <FloatingPortal>\n {isMounted || !isLazy ? (\n <FloatingFocusManager\n context={context}\n initialFocus={initialFocusRef ?? closeButtonRef}\n returnFocus={true}\n >\n <BaseBox\n display={isLazy ? undefined : isMounted ? 'block' : 'none'}\n position=\"fixed\"\n {...metaAttribute({\n name: MetaConstants.Drawer,\n testID,\n })}\n {...makeAnalyticsAttribute(rest)}\n zIndex={zIndexState}\n >\n {showOverlay || stackingLevel === 2 ? (\n <DrawerOverlay\n onClick={() => {\n onDismiss();\n }}\n className={isVisible ? SHOW_DRAWER : ''}\n lockScroll={true}\n {...metaAttribute({\n testID: 'drawer-overlay',\n })}\n />\n ) : null}\n <AnimatedDrawerContainer\n isVisible={isVisible}\n isFirstDrawerInStack={isFirstDrawerInStack}\n width={{ base: '90%', s: '375px', m: '420px' }}\n {...makeAccessible({\n role: 'dialog',\n modal: true,\n label: accessibilityLabel,\n })}\n position=\"fixed\"\n top=\"spacing.0\"\n left=\"100%\"\n backgroundColor=\"popup.background.subtle\"\n elevation=\"highRaised\"\n height=\"100%\"\n display=\"flex\"\n flexDirection=\"column\"\n ref={refs.setFloating}\n onKeyDown={(event) => {\n if (event?.key === 'Escape' || event?.code === 'Escape') {\n onDismiss();\n }\n }}\n >\n {children}\n </AnimatedDrawerContainer>\n </BaseBox>\n </FloatingFocusManager>\n ) : null}\n </FloatingPortal>\n </DrawerContext.Provider>\n );\n};\n\n/**\n * ### Drawer Component\n * \n * A drawer is a panel that slides in mostly from right side of the screen over the existing content in the viewport. \n * It helps in providing additional details or context and can also be used to promote product features or new products.\n * \n * ---\n * \n * #### Usage\n * \n * ```jsx\n const MyDrawer = () => {\n const [showDrawer, setShowDrawer] = React.useState(false);\n return (\n <Box>\n <Button onClick={() => setShowDrawer(true)}>Open Drawer</Button>\n <Drawer\n isOpen={showDrawer}\n onDismiss={() => setShowDrawer(false)}\n >\n <DrawerHeader title=\"Announcements\" />\n <DrawerBody>\n <FTXAnnouncement />\n <CatPictures />\n </DrawerBody>\n <Drawer>\n </Box>\n )\n }\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-drawer Drawer Documentation}\n * \n * \n */\nconst Drawer = assignWithoutSideEffects(_Drawer, {\n componentId: drawerComponentIds.Drawer,\n});\n\nexport { Drawer };\n"],"names":["SHOW_DRAWER","AnimatedDrawerContainer","styled","BaseBox","withConfig","displayName","componentId","_ref","theme","isFirstDrawerInStack","isVisible","entranceTransition","concat","castWebType","makeMotionTime","motion","duration","gentle","easing","entrance","revealing","exitTransition","xmoderate","exit","opacity","transform","transition","animationFillMode","DrawerOverlay","FloatingOverlay","_ref2","_defineProperty","backgroundColor","colors","overlay","background","subtle","_Drawer","_ref4","isOpen","onDismiss","_ref4$zIndex","zIndex","componentZIndices","drawer","children","accessibilityLabel","_ref4$showOverlay","showOverlay","initialFocusRef","_ref4$isLazy","isLazy","testID","rest","_objectWithoutProperties","_excluded","closeButtonRef","React","useRef","_React$useState","useState","_React$useState2","_slicedToArray","zIndexState","setZIndexState","useVerifyAllowedChildren","componentName","allowedComponents","drawerComponentIds","DrawerHeader","DrawerBody","_useTheme","useTheme","drawerId","useId","_useDrawerStack","useDrawerStack","drawerStack","addToDrawerStack","removeFromDrawerStack","_usePresence","usePresence","enterTransitionDuration","exitTransitionDuration","initialEnter","isMounted","isExiting","_React$useMemo","useMemo","level","Object","keys","indexOf","stackingLevel","length","_useFloating","useFloating","open","refs","context","useEffect","elementId","contextValue","close","_jsx","DrawerContext","Provider","value","FloatingPortal","FloatingFocusManager","initialFocus","returnFocus","_jsxs","_objectSpread","display","undefined","position","metaAttribute","name","MetaConstants","Drawer","makeAnalyticsAttribute","onClick","className","lockScroll","width","base","s","m","makeAccessible","role","modal","label","top","left","elevation","height","flexDirection","ref","setFloating","onKeyDown","event","key","code","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAMA,WAAW,GAAG,aAAa,CAAA;AAEjC,IAAMC,uBAAuB,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,oCAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAG5C,CAAA,CAAA,UAAAC,IAAA,EAAgD;AAAA,EAAA,IAA7CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,oBAAoB,GAAAF,IAAA,CAApBE,oBAAoB;IAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS,CAAA;AAC1C,EAAA,IAAMC,kBAA+C,GAAA,MAAA,CAAAC,MAAA,CAAUC,WAAW,CACxEA,WAAW,CAACC,cAAc,CAACN,KAAK,CAACO,MAAM,CAACC,QAAQ,CAACC,MAAM,CAAC,CAC1D,CAAC,EAAAL,GAAAA,CAAAA,CAAAA,MAAA,CAAIC,WAAW,CAACL,KAAK,CAACO,MAAM,CAACG,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,CAAE,CAAA;AAE1D,EAAA,IAAMC,cA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ACc,CAAC,CAAA;SACnB,CAAA,CAAA;AAAC,OACU,CAAC,GACrB,IAAA;KACU,CAAA;AAAC,GACK,CAAC,CAAA;AAE7B,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAM2E,MAAM,gBAAGwB,wBAAwB,CAAC3G,OAAO,EAAE;EAC/C/B,WAAW,EAAE8D,kBAAkB,CAACoD,MAAAA;AAClC,CAAC;;;;"}
1
+ {"version":3,"file":"Drawer.web.js","sources":["../../../../../../src/components/Drawer/Drawer.web.tsx"],"sourcesContent":["import {\n FloatingFocusManager,\n FloatingOverlay,\n FloatingPortal,\n useFloating,\n} from '@floating-ui/react';\nimport type { CSSProperties } from 'react';\nimport React from 'react';\nimport styled from 'styled-components';\nimport usePresence from 'use-presence';\nimport { drawerComponentIds } from './drawerComponentIds';\nimport { DrawerContext } from './DrawerContext';\nimport type { DrawerProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType, makeMotionTime, useTheme } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { useDrawerStack } from '~components/Drawer/StackProvider';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useId } from '~utils/useId';\nimport { useVerifyAllowedChildren } from '~utils/useVerifyAllowedChildren';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst SHOW_DRAWER = 'show-drawer';\n\nconst AnimatedDrawerContainer = styled(BaseBox)<{\n isFirstDrawerInStack: boolean;\n isVisible: boolean;\n}>(({ theme, isFirstDrawerInStack, isVisible }) => {\n const entranceTransition: CSSProperties['transition'] = `all ${castWebType(\n castWebType(makeMotionTime(theme.motion.duration.xmoderate)),\n )} ${castWebType(theme.motion.easing.entrance)}`;\n\n const exitTransition: CSSProperties['transition'] = `all\n ${castWebType(makeMotionTime(theme.motion.duration.moderate))}\n ${castWebType(theme.motion.easing.exit)}`;\n\n return {\n opacity: isVisible ? 1 : 0,\n transform: isVisible\n ? isFirstDrawerInStack\n ? 'translateX(calc(-100% - 16px))'\n : 'translateX(-100%)'\n : 'translateX(0%)',\n transition: isVisible ? entranceTransition : exitTransition,\n animationFillMode: 'initial',\n };\n});\n\nconst DrawerOverlay = styled(FloatingOverlay)(({ theme }) => {\n return {\n opacity: 0,\n transition: `opacity\n ${makeMotionTime(theme.motion.duration.xmoderate)}\n ${castWebType(theme.motion.easing.exit)}`,\n backgroundColor: theme.colors.overlay.background.subtle,\n\n [`&.${SHOW_DRAWER}`]: {\n opacity: 1,\n transition: `opacity ${makeMotionTime(theme.motion.duration.gentle)} ${castWebType(\n theme.motion.easing.entrance,\n )}`,\n },\n };\n});\n\nconst _Drawer = ({\n isOpen,\n onDismiss,\n zIndex = componentZIndices.drawer,\n children,\n accessibilityLabel,\n showOverlay = true,\n initialFocusRef,\n isLazy = true,\n testID,\n ...rest\n}: DrawerProps): React.ReactElement => {\n const closeButtonRef = React.useRef<HTMLDivElement>(null);\n const [zIndexState, setZIndexState] = React.useState<number>(zIndex);\n\n useVerifyAllowedChildren({\n children,\n componentName: 'Drawer',\n allowedComponents: [drawerComponentIds.DrawerHeader, drawerComponentIds.DrawerBody],\n });\n\n const { theme } = useTheme();\n const drawerId = useId('drawer');\n const { drawerStack, addToDrawerStack, removeFromDrawerStack } = useDrawerStack();\n\n const { isMounted, isVisible, isExiting } = usePresence(isOpen, {\n enterTransitionDuration: theme.motion.duration.gentle,\n exitTransitionDuration: theme.motion.duration.xmoderate,\n initialEnter: true,\n });\n\n const { stackingLevel, isFirstDrawerInStack } = React.useMemo(() => {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n const level = Object.keys(drawerStack).indexOf(drawerId) + 1;\n return {\n stackingLevel: level,\n isFirstDrawerInStack: level === 1 && Object.keys(drawerStack).length > 1,\n };\n }, [drawerId, drawerStack]);\n\n const { refs, context } = useFloating({\n open: isMounted,\n });\n\n React.useEffect(() => {\n if (isOpen) {\n addToDrawerStack({ elementId: drawerId, onDismiss });\n } else {\n removeFromDrawerStack({ elementId: drawerId });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen]);\n\n // When z-index is not defined by user, we use default drawer z index and add stackingLevel to ensure\n // new drawer that opens, always opens on top of previous one.\n React.useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n setZIndexState(zIndex + stackingLevel);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMounted]);\n\n const contextValue = React.useMemo(\n () => ({\n close: onDismiss,\n closeButtonRef,\n stackingLevel,\n isExiting,\n }),\n [isExiting, onDismiss, stackingLevel],\n );\n\n return (\n <DrawerContext.Provider value={contextValue}>\n <FloatingPortal>\n {isMounted || !isLazy ? (\n <FloatingFocusManager\n context={context}\n initialFocus={initialFocusRef ?? closeButtonRef}\n returnFocus={true}\n >\n <BaseBox\n display={isLazy ? undefined : isMounted ? 'block' : 'none'}\n position=\"fixed\"\n {...metaAttribute({\n name: MetaConstants.Drawer,\n testID,\n })}\n {...makeAnalyticsAttribute(rest)}\n zIndex={zIndexState}\n >\n {showOverlay || stackingLevel === 2 ? (\n <DrawerOverlay\n onClick={() => {\n onDismiss();\n }}\n className={isVisible ? SHOW_DRAWER : ''}\n lockScroll={true}\n {...metaAttribute({\n testID: 'drawer-overlay',\n })}\n />\n ) : null}\n <AnimatedDrawerContainer\n isVisible={isVisible}\n isFirstDrawerInStack={isFirstDrawerInStack}\n width={{ base: '90%', s: '375px', m: '420px' }}\n {...makeAccessible({\n role: 'dialog',\n modal: true,\n label: accessibilityLabel,\n })}\n position=\"fixed\"\n top=\"spacing.0\"\n left=\"100%\"\n backgroundColor=\"popup.background.subtle\"\n elevation=\"highRaised\"\n height=\"100%\"\n display=\"flex\"\n flexDirection=\"column\"\n ref={refs.setFloating}\n onKeyDown={(event) => {\n if (event?.key === 'Escape' || event?.code === 'Escape') {\n onDismiss();\n }\n }}\n >\n {children}\n </AnimatedDrawerContainer>\n </BaseBox>\n </FloatingFocusManager>\n ) : null}\n </FloatingPortal>\n </DrawerContext.Provider>\n );\n};\n\n/**\n * ### Drawer Component\n * \n * A drawer is a panel that slides in mostly from right side of the screen over the existing content in the viewport. \n * It helps in providing additional details or context and can also be used to promote product features or new products.\n * \n * ---\n * \n * #### Usage\n * \n * ```jsx\n const MyDrawer = () => {\n const [showDrawer, setShowDrawer] = React.useState(false);\n return (\n <Box>\n <Button onClick={() => setShowDrawer(true)}>Open Drawer</Button>\n <Drawer\n isOpen={showDrawer}\n onDismiss={() => setShowDrawer(false)}\n >\n <DrawerHeader title=\"Announcements\" />\n <DrawerBody>\n <FTXAnnouncement />\n <CatPictures />\n </DrawerBody>\n <Drawer>\n </Box>\n )\n }\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-drawer Drawer Documentation}\n * \n * \n */\nconst Drawer = assignWithoutSideEffects(_Drawer, {\n componentId: drawerComponentIds.Drawer,\n});\n\nexport { Drawer };\n"],"names":["SHOW_DRAWER","AnimatedDrawerContainer","styled","BaseBox","withConfig","displayName","componentId","_ref","theme","isFirstDrawerInStack","isVisible","entranceTransition","concat","castWebType","makeMotionTime","motion","duration","xmoderate","easing","entrance","exitTransition","moderate","exit","opacity","transform","transition","animationFillMode","DrawerOverlay","FloatingOverlay","_ref2","_defineProperty","backgroundColor","colors","overlay","background","subtle","gentle","_Drawer","_ref4","isOpen","onDismiss","_ref4$zIndex","zIndex","componentZIndices","drawer","children","accessibilityLabel","_ref4$showOverlay","showOverlay","initialFocusRef","_ref4$isLazy","isLazy","testID","rest","_objectWithoutProperties","_excluded","closeButtonRef","React","useRef","_React$useState","useState","_React$useState2","_slicedToArray","zIndexState","setZIndexState","useVerifyAllowedChildren","componentName","allowedComponents","drawerComponentIds","DrawerHeader","DrawerBody","_useTheme","useTheme","drawerId","useId","_useDrawerStack","useDrawerStack","drawerStack","addToDrawerStack","removeFromDrawerStack","_usePresence","usePresence","enterTransitionDuration","exitTransitionDuration","initialEnter","isMounted","isExiting","_React$useMemo","useMemo","level","Object","keys","indexOf","stackingLevel","length","_useFloating","useFloating","open","refs","context","useEffect","elementId","contextValue","close","_jsx","DrawerContext","Provider","value","FloatingPortal","FloatingFocusManager","initialFocus","returnFocus","_jsxs","_objectSpread","display","undefined","position","metaAttribute","name","MetaConstants","Drawer","makeAnalyticsAttribute","onClick","className","lockScroll","width","base","s","m","makeAccessible","role","modal","label","top","left","elevation","height","flexDirection","ref","setFloating","onKeyDown","event","key","code","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAMA,WAAW,GAAG,aAAa,CAAA;AAEjC,IAAMC,uBAAuB,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,oCAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAG5C,CAAA,CAAA,UAAAC,IAAA,EAAgD;AAAA,EAAA,IAA7CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,oBAAoB,GAAAF,IAAA,CAApBE,oBAAoB;IAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS,CAAA;AAC1C,EAAA,IAAMC,kBAA+C,GAAA,MAAA,CAAAC,MAAA,CAAUC,WAAW,CACxEA,WAAW,CAACC,cAAc,CAACN,KAAK,CAACO,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,CAC7D,CAAC,EAAAL,GAAAA,CAAAA,CAAAA,MAAA,CAAIC,WAAW,CAACL,KAAK,CAACO,MAAM,CAACG,MAAM,CAACC,QAAQ,CAAC,CAAE,CAAA;AAEhD,EAAA,IAAMC,cAA2C,GAAA,SAAA,CAAAR,MA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K,CAAC,CAAA;AAE7B,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAM2E,MAAM,gBAAGwB,wBAAwB,CAAC3G,OAAO,EAAE;EAC/C/B,WAAW,EAAE8D,kBAAkB,CAACoD,MAAAA;AAClC,CAAC;;;;"}
@@ -14,6 +14,7 @@ import '../../utils/isValidAllowedChildren/index.js';
14
14
  import '../../utils/metaAttribute/index.js';
15
15
  import '../../utils/logger/index.js';
16
16
  import { useControllableState } from '../../utils/useControllable.js';
17
+ import { mergeRefs } from '../../utils/useMergeRefs.js';
17
18
  import '../../utils/makeAnalyticsAttribute/index.js';
18
19
  import { jsx } from 'react/jsx-runtime';
19
20
  import { getComponentId, isValidAllowedChildren } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
@@ -58,7 +59,7 @@ dropdownComponentIds.BaseBox, dropdownComponentIds.triggers.SelectInput, dropdow
58
59
  *
59
60
  * Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select Dropdown Documentation}
60
61
  */
61
- var _Dropdown = function _Dropdown(_ref) {
62
+ var _Dropdown = function _Dropdown(_ref, ref) {
62
63
  var children = _ref.children,
63
64
  isOpenControlled = _ref.isOpen,
64
65
  onOpenChange = _ref.onOpenChange,
@@ -245,7 +246,7 @@ var _Dropdown = function _Dropdown(_ref) {
245
246
  children: /*#__PURE__*/jsx(BaseBox
246
247
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
247
248
  , _objectSpread(_objectSpread(_objectSpread(_objectSpread({
248
- ref: dropdownContainerRef
249
+ ref: mergeRefs(ref, dropdownContainerRef)
249
250
  }, metaAttribute({
250
251
  name: MetaConstants.Dropdown,
251
252
  testID: testID
@@ -260,7 +261,7 @@ var _Dropdown = function _Dropdown(_ref) {
260
261
  })
261
262
  });
262
263
  };
263
- var Dropdown = /*#__PURE__*/assignWithoutSideEffects(_Dropdown, {
264
+ var Dropdown = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.forwardRef(_Dropdown), {
264
265
  componentId: dropdownComponentIds.Dropdown
265
266
  });
266
267
 
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.js","sources":["../../../../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React from 'react';\nimport { DropdownContext } from './useDropdown';\nimport type { DropdownContextType } from './useDropdown';\nimport type { DropdownProps } from './types';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { useId } from '~utils/useId';\nimport { ComponentIds as bottomSheetComponentIds } from '~components/BottomSheet/componentIds';\nimport { BottomSheetAndDropdownGlueContext } from '~components/BottomSheet/BottomSheetContext';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport BaseBox from '~components/Box/BaseBox';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { throwBladeError } from '~utils/logger';\nimport type { ContainerElementType } from '~utils/types';\nimport { useControllableState } from '~utils/useControllable';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst validDropdownChildren = [\n // TODO: Remove Box once CountrySelector's button sizing is fixed\n dropdownComponentIds.BaseBox,\n dropdownComponentIds.triggers.SelectInput,\n dropdownComponentIds.triggers.SearchInput,\n dropdownComponentIds.triggers.DropdownButton,\n dropdownComponentIds.triggers.DropdownLink,\n dropdownComponentIds.DropdownOverlay,\n dropdownComponentIds.triggers.AutoComplete,\n bottomSheetComponentIds.BottomSheet,\n];\n\n/**\n * ### Dropdown component\n *\n * Dropdown component is generic component that controls the dropdown functionality.\n * It can be used with multiple triggers and mostly contains ActionList component inside it\n *\n * ---\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown selectionType=\"single\">\n * <SelectInput />\n * <DropdownOverlay>\n * <ActionList>\n * <ActionListItem />\n * <ActionListItem />\n * </ActionList>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select Dropdown Documentation}\n */\nconst _Dropdown = ({\n children,\n isOpen: isOpenControlled,\n onOpenChange,\n selectionType = 'single',\n testID,\n _width,\n ...rest\n}: DropdownProps): React.ReactElement => {\n const [options, setOptions] = React.useState<DropdownContextType['options']>([]);\n const [filteredValues, setFilteredValues] = React.useState<string[]>([]);\n const [selectedIndices, setSelectedIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [controlledValueIndices, setControlledValueIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [activeIndex, setActiveIndex] = React.useState(-1);\n const [activeTagIndex, setActiveTagIndex] = React.useState(-1);\n const [shouldIgnoreBlurAnimation, setShouldIgnoreBlurAnimation] = React.useState(false);\n const [hasFooterAction, setHasFooterAction] = React.useState(false);\n const [\n hasAutoCompleteInBottomSheetHeader,\n setHasAutoCompleteInBottomSheetHeader,\n ] = React.useState(false);\n const [isKeydownPressed, setIsKeydownPressed] = React.useState(false);\n const [changeCallbackTriggerer, setChangeCallbackTriggerer] = React.useState<\n DropdownContextType['changeCallbackTriggerer']\n >(0);\n const [isControlled, setIsControlled] = React.useState(false);\n // keep track if dropdown contains bottomsheet\n const [dropdownHasBottomSheet, setDropdownHasBottomSheet] = React.useState(false);\n\n /**\n * In inputs, actual input is smaller than the visible input wrapper.\n * You can set this reference in such cases so floating ui calculations happen correctly\n * */\n const triggererWrapperRef = React.useRef<ContainerElementType>(null);\n const triggererRef = React.useRef<HTMLButtonElement>(null);\n const actionListItemRef = React.useRef<HTMLDivElement>(null);\n const dropdownTriggerer = React.useRef<DropdownContextType['dropdownTriggerer']>();\n const isTagDismissedRef = React.useRef<{ value: boolean } | null>({ value: false });\n const visibleTagsCountRef = React.useRef<{ value: number }>({ value: 0 });\n const dropdownContainerRef = React.useRef<HTMLDivElement>(null);\n\n const dropdownBaseId = useId('dropdown');\n const isDropdownOpenRef = React.useRef(isOpenControlled);\n\n const [isDropdownOpen, setIsDropdownOpen] = useControllableState({\n value: isOpenControlled,\n defaultValue: false,\n onChange: (isOpenControlledValue) => {\n isDropdownOpenRef.current = isOpenControlledValue;\n onOpenChange?.(isOpenControlledValue);\n },\n });\n\n isDropdownOpenRef.current = isDropdownOpen;\n\n const setIsOpen = (isOpenValue: boolean): void => {\n isDropdownOpenRef.current = isOpenValue;\n setIsDropdownOpen(() => isOpenValue);\n };\n\n const close = React.useCallback(() => {\n setActiveTagIndex(-1);\n setIsOpen(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n if (__DEV__) {\n if (!validDropdownChildren.includes(getComponentId(child) ?? '')) {\n throwBladeError({\n message: `Dropdown can only have one of following elements as children - \\n\\n ${validDropdownChildren.join(\n ', ',\n )} \\n\\n Check out: https://blade.razorpay.com/?path=/story/components-dropdown`,\n moduleName: 'Dropdown',\n });\n }\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SelectInput)) {\n dropdownTriggerer.current = 'SelectInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SearchInput)) {\n dropdownTriggerer.current = 'SearchInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.DropdownButton)) {\n dropdownTriggerer.current = 'DropdownButton';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.AutoComplete)) {\n dropdownTriggerer.current = 'AutoComplete';\n }\n }\n });\n\n const contextValue = React.useMemo<DropdownContextType>(\n () => ({\n isOpen: isDropdownOpen,\n setIsOpen,\n close,\n selectedIndices,\n setSelectedIndices,\n controlledValueIndices,\n setControlledValueIndices,\n options,\n setOptions,\n filteredValues,\n setFilteredValues,\n activeIndex,\n setActiveIndex,\n activeTagIndex,\n setActiveTagIndex,\n visibleTagsCountRef,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n isKeydownPressed,\n setIsKeydownPressed,\n dropdownBaseId,\n triggererRef,\n triggererWrapperRef,\n actionListItemRef,\n selectionType,\n hasFooterAction,\n setHasFooterAction,\n hasAutoCompleteInBottomSheetHeader,\n setHasAutoCompleteInBottomSheetHeader,\n dropdownTriggerer: dropdownTriggerer.current,\n changeCallbackTriggerer,\n setChangeCallbackTriggerer,\n isControlled,\n setIsControlled,\n isTagDismissedRef,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n isDropdownOpen,\n isOpenControlled,\n selectedIndices,\n controlledValueIndices,\n options,\n filteredValues,\n activeIndex,\n activeTagIndex,\n shouldIgnoreBlurAnimation,\n selectionType,\n hasFooterAction,\n isKeydownPressed,\n changeCallbackTriggerer,\n isControlled,\n ],\n );\n\n const BottomSheetAndDropdownGlueContextValue = React.useMemo((): BottomSheetAndDropdownGlueContext => {\n return {\n isOpen: isDropdownOpen,\n dropdownHasBottomSheet,\n hasAutoCompleteInBottomSheetHeader,\n setDropdownHasBottomSheet,\n // This is the dismiss function which will be injected into the BottomSheet\n // Basically <BottomSheet onDismiss={onBottomSheetDismiss} />\n onBottomSheetDismiss: close,\n };\n }, [dropdownHasBottomSheet, hasAutoCompleteInBottomSheetHeader, isDropdownOpen, close]);\n\n return (\n <BottomSheetAndDropdownGlueContext.Provider value={BottomSheetAndDropdownGlueContextValue}>\n <DropdownContext.Provider value={contextValue}>\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={dropdownContainerRef as any}\n {...metaAttribute({ name: MetaConstants.Dropdown, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n width={_width}\n >\n <BaseBox position=\"relative\" textAlign={'left' as never}>\n {children}\n </BaseBox>\n </BaseBox>\n </DropdownContext.Provider>\n </BottomSheetAndDropdownGlueContext.Provider>\n );\n};\n\nconst Dropdown = assignWithoutSideEffects(_Dropdown, {\n componentId: dropdownComponentIds.Dropdown,\n});\n\nexport { Dropdown };\n"],"names":["validDropdownChildren","dropdownComponentIds","BaseBox","triggers","SelectInput","SearchInput","DropdownButton","DropdownLink","DropdownOverlay","AutoComplete","bottomSheetComponentIds","BottomSheet","_Dropdown","_ref","children","isOpenControlled","isOpen","onOpenChange","_ref$selectionType","selectionType","testID","_width","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_React$useState2","_slicedToArray","options","setOptions","_React$useState3","_React$useState4","filteredValues","setFilteredValues","_React$useState5","_React$useState6","selectedIndices","setSelectedIndices","_React$useState7","_React$useState8","controlledValueIndices","setControlledValueIndices","_React$useState9","_React$useState10","activeIndex","setActiveIndex","_React$useState11","_React$useState12","activeTagIndex","setActiveTagIndex","_React$useState13","_React$useState14","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","_React$useState15","_React$useState16","hasFooterAction","setHasFooterAction","_React$useState17","_React$useState18","hasAutoCompleteInBottomSheetHeader","setHasAutoCompleteInBottomSheetHeader","_React$useState19","_React$useState20","isKeydownPressed","setIsKeydownPressed","_React$useState21","_React$useState22","changeCallbackTriggerer","setChangeCallbackTriggerer","_React$useState23","_React$useState24","isControlled","setIsControlled","_React$useState25","_React$useState26","dropdownHasBottomSheet","setDropdownHasBottomSheet","triggererWrapperRef","useRef","triggererRef","actionListItemRef","dropdownTriggerer","isTagDismissedRef","value","visibleTagsCountRef","dropdownContainerRef","dropdownBaseId","useId","isDropdownOpenRef","_useControllableState","useControllableState","defaultValue","onChange","isOpenControlledValue","current","_useControllableState2","isDropdownOpen","setIsDropdownOpen","setIsOpen","isOpenValue","close","useCallback","Children","map","child","isValidElement","_getComponentId","includes","getComponentId","throwBladeError","message","concat","join","moduleName","isValidAllowedChildren","contextValue","useMemo","BottomSheetAndDropdownGlueContextValue","onBottomSheetDismiss","_jsx","BottomSheetAndDropdownGlueContext","Provider","DropdownContext","_objectSpread","ref","metaAttribute","name","MetaConstants","Dropdown","getStyledProps","makeAnalyticsAttribute","width","position","textAlign","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAMA,qBAAqB,GAAG;AAC5B;AACAC,oBAAoB,CAACC,OAAO,EAC5BD,oBAAoB,CAACE,QAAQ,CAACC,WAAW,EACzCH,oBAAoB,CAACE,QAAQ,CAACE,WAAW,EACzCJ,oBAAoB,CAACE,QAAQ,CAACG,cAAc,EAC5CL,oBAAoB,CAACE,QAAQ,CAACI,YAAY,EAC1CN,oBAAoB,CAACO,eAAe,EACpCP,oBAAoB,CAACE,QAAQ,CAACM,YAAY,EAC1CC,YAAuB,CAACC,WAAW,CACpC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAQ0B;AAAA,EAAA,IAPvCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACAC,gBAAgB,GAAAF,IAAA,CAAxBG,MAAM;IACNC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IAAAC,kBAAA,GAAAL,IAAA,CACZM,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,kBAAA;IACxBE,MAAM,GAAAP,IAAA,CAANO,MAAM;IACNC,MAAM,GAAAR,IAAA,CAANQ,MAAM;AACHC,IAAAA,IAAI,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,eAAA,GAA8BC,cAAK,CAACC,QAAQ,CAAiC,EAAE,CAAC;IAAAC,gBAAA,GAAAC,cAAA,CAAAJ,eAAA,EAAA,CAAA,CAAA;AAAzEK,IAAAA,OAAO,GAAAF,gB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cAAc,CAAC9G,IAAI,CAAC,CACpB+G,EAAAA,sBAAsB,CAAC/G,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAChCgH,QAAAA,KAAK,EAAEjH,MAAO;QAAAP,QAAA,eAEd4G,GAAA,CAACxH,OAAO,EAAA;AAACqI,UAAAA,QAAQ,EAAC,UAAU;AAACC,UAAAA,SAAS,EAAE,MAAgB;AAAA1H,UAAAA,QAAA,EACrDA,QAAAA;SACM,CAAA;OACF,CAAA,CAAA;KACe,CAAA;AAAC,GACe,CAAC,CAAA;AAEjD,CAAC,CAAA;AAED,IAAMqH,QAAQ,gBAAGM,wBAAwB,CAAC7H,SAAS,EAAE;EACnD8H,WAAW,EAAEzI,oBAAoB,CAACkI,QAAAA;AACpC,CAAC;;;;"}
1
+ {"version":3,"file":"Dropdown.js","sources":["../../../../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React from 'react';\nimport { DropdownContext } from './useDropdown';\nimport type { DropdownContextType } from './useDropdown';\nimport type { DropdownProps } from './types';\nimport { dropdownComponentIds } from './dropdownComponentIds';\nimport { useId } from '~utils/useId';\nimport { ComponentIds as bottomSheetComponentIds } from '~components/BottomSheet/componentIds';\nimport { BottomSheetAndDropdownGlueContext } from '~components/BottomSheet/BottomSheetContext';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport BaseBox from '~components/Box/BaseBox';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { throwBladeError } from '~utils/logger';\nimport type { BladeElementRef, ContainerElementType } from '~utils/types';\nimport { useControllableState } from '~utils/useControllable';\nimport { mergeRefs } from '~utils/useMergeRefs';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst validDropdownChildren = [\n // TODO: Remove Box once CountrySelector's button sizing is fixed\n dropdownComponentIds.BaseBox,\n dropdownComponentIds.triggers.SelectInput,\n dropdownComponentIds.triggers.SearchInput,\n dropdownComponentIds.triggers.DropdownButton,\n dropdownComponentIds.triggers.DropdownLink,\n dropdownComponentIds.DropdownOverlay,\n dropdownComponentIds.triggers.AutoComplete,\n bottomSheetComponentIds.BottomSheet,\n];\n\n/**\n * ### Dropdown component\n *\n * Dropdown component is generic component that controls the dropdown functionality.\n * It can be used with multiple triggers and mostly contains ActionList component inside it\n *\n * ---\n *\n * #### Usage\n *\n * ```jsx\n * <Dropdown selectionType=\"single\">\n * <SelectInput />\n * <DropdownOverlay>\n * <ActionList>\n * <ActionListItem />\n * <ActionListItem />\n * </ActionList>\n * </DropdownOverlay>\n * </Dropdown>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-dropdown-with-select--with-single-select Dropdown Documentation}\n */\nconst _Dropdown = (\n {\n children,\n isOpen: isOpenControlled,\n onOpenChange,\n selectionType = 'single',\n testID,\n _width,\n ...rest\n }: DropdownProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const [options, setOptions] = React.useState<DropdownContextType['options']>([]);\n const [filteredValues, setFilteredValues] = React.useState<string[]>([]);\n const [selectedIndices, setSelectedIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [controlledValueIndices, setControlledValueIndices] = React.useState<\n DropdownContextType['selectedIndices']\n >([]);\n const [activeIndex, setActiveIndex] = React.useState(-1);\n const [activeTagIndex, setActiveTagIndex] = React.useState(-1);\n const [shouldIgnoreBlurAnimation, setShouldIgnoreBlurAnimation] = React.useState(false);\n const [hasFooterAction, setHasFooterAction] = React.useState(false);\n const [\n hasAutoCompleteInBottomSheetHeader,\n setHasAutoCompleteInBottomSheetHeader,\n ] = React.useState(false);\n const [isKeydownPressed, setIsKeydownPressed] = React.useState(false);\n const [changeCallbackTriggerer, setChangeCallbackTriggerer] = React.useState<\n DropdownContextType['changeCallbackTriggerer']\n >(0);\n const [isControlled, setIsControlled] = React.useState(false);\n // keep track if dropdown contains bottomsheet\n const [dropdownHasBottomSheet, setDropdownHasBottomSheet] = React.useState(false);\n\n /**\n * In inputs, actual input is smaller than the visible input wrapper.\n * You can set this reference in such cases so floating ui calculations happen correctly\n * */\n const triggererWrapperRef = React.useRef<ContainerElementType>(null);\n const triggererRef = React.useRef<HTMLButtonElement>(null);\n const actionListItemRef = React.useRef<HTMLDivElement>(null);\n const dropdownTriggerer = React.useRef<DropdownContextType['dropdownTriggerer']>();\n const isTagDismissedRef = React.useRef<{ value: boolean } | null>({ value: false });\n const visibleTagsCountRef = React.useRef<{ value: number }>({ value: 0 });\n const dropdownContainerRef = React.useRef<HTMLDivElement>(null);\n\n const dropdownBaseId = useId('dropdown');\n const isDropdownOpenRef = React.useRef(isOpenControlled);\n\n const [isDropdownOpen, setIsDropdownOpen] = useControllableState({\n value: isOpenControlled,\n defaultValue: false,\n onChange: (isOpenControlledValue) => {\n isDropdownOpenRef.current = isOpenControlledValue;\n onOpenChange?.(isOpenControlledValue);\n },\n });\n\n isDropdownOpenRef.current = isDropdownOpen;\n\n const setIsOpen = (isOpenValue: boolean): void => {\n isDropdownOpenRef.current = isOpenValue;\n setIsDropdownOpen(() => isOpenValue);\n };\n\n const close = React.useCallback(() => {\n setActiveTagIndex(-1);\n setIsOpen(false);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n if (__DEV__) {\n if (!validDropdownChildren.includes(getComponentId(child) ?? '')) {\n throwBladeError({\n message: `Dropdown can only have one of following elements as children - \\n\\n ${validDropdownChildren.join(\n ', ',\n )} \\n\\n Check out: https://blade.razorpay.com/?path=/story/components-dropdown`,\n moduleName: 'Dropdown',\n });\n }\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SelectInput)) {\n dropdownTriggerer.current = 'SelectInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.SearchInput)) {\n dropdownTriggerer.current = 'SearchInput';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.DropdownButton)) {\n dropdownTriggerer.current = 'DropdownButton';\n }\n\n if (isValidAllowedChildren(child, dropdownComponentIds.triggers.AutoComplete)) {\n dropdownTriggerer.current = 'AutoComplete';\n }\n }\n });\n\n const contextValue = React.useMemo<DropdownContextType>(\n () => ({\n isOpen: isDropdownOpen,\n setIsOpen,\n close,\n selectedIndices,\n setSelectedIndices,\n controlledValueIndices,\n setControlledValueIndices,\n options,\n setOptions,\n filteredValues,\n setFilteredValues,\n activeIndex,\n setActiveIndex,\n activeTagIndex,\n setActiveTagIndex,\n visibleTagsCountRef,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n isKeydownPressed,\n setIsKeydownPressed,\n dropdownBaseId,\n triggererRef,\n triggererWrapperRef,\n actionListItemRef,\n selectionType,\n hasFooterAction,\n setHasFooterAction,\n hasAutoCompleteInBottomSheetHeader,\n setHasAutoCompleteInBottomSheetHeader,\n dropdownTriggerer: dropdownTriggerer.current,\n changeCallbackTriggerer,\n setChangeCallbackTriggerer,\n isControlled,\n setIsControlled,\n isTagDismissedRef,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n isDropdownOpen,\n isOpenControlled,\n selectedIndices,\n controlledValueIndices,\n options,\n filteredValues,\n activeIndex,\n activeTagIndex,\n shouldIgnoreBlurAnimation,\n selectionType,\n hasFooterAction,\n isKeydownPressed,\n changeCallbackTriggerer,\n isControlled,\n ],\n );\n\n const BottomSheetAndDropdownGlueContextValue = React.useMemo((): BottomSheetAndDropdownGlueContext => {\n return {\n isOpen: isDropdownOpen,\n dropdownHasBottomSheet,\n hasAutoCompleteInBottomSheetHeader,\n setDropdownHasBottomSheet,\n // This is the dismiss function which will be injected into the BottomSheet\n // Basically <BottomSheet onDismiss={onBottomSheetDismiss} />\n onBottomSheetDismiss: close,\n };\n }, [dropdownHasBottomSheet, hasAutoCompleteInBottomSheetHeader, isDropdownOpen, close]);\n\n return (\n <BottomSheetAndDropdownGlueContext.Provider value={BottomSheetAndDropdownGlueContextValue}>\n <DropdownContext.Provider value={contextValue}>\n <BaseBox\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={mergeRefs(ref, dropdownContainerRef as any)}\n {...metaAttribute({ name: MetaConstants.Dropdown, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n width={_width}\n >\n <BaseBox position=\"relative\" textAlign={'left' as never}>\n {children}\n </BaseBox>\n </BaseBox>\n </DropdownContext.Provider>\n </BottomSheetAndDropdownGlueContext.Provider>\n );\n};\n\nconst Dropdown = assignWithoutSideEffects(React.forwardRef(_Dropdown), {\n componentId: dropdownComponentIds.Dropdown,\n});\n\nexport { Dropdown };\n"],"names":["validDropdownChildren","dropdownComponentIds","BaseBox","triggers","SelectInput","SearchInput","DropdownButton","DropdownLink","DropdownOverlay","AutoComplete","bottomSheetComponentIds","BottomSheet","_Dropdown","_ref","ref","children","isOpenControlled","isOpen","onOpenChange","_ref$selectionType","selectionType","testID","_width","rest","_objectWithoutProperties","_excluded","_React$useState","React","useState","_React$useState2","_slicedToArray","options","setOptions","_React$useState3","_React$useState4","filteredValues","setFilteredValues","_React$useState5","_React$useState6","selectedIndices","setSelectedIndices","_React$useState7","_React$useState8","controlledValueIndices","setControlledValueIndices","_React$useState9","_React$useState10","activeIndex","setActiveIndex","_React$useState11","_React$useState12","activeTagIndex","setActiveTagIndex","_React$useState13","_React$useState14","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","_React$useState15","_React$useState16","hasFooterAction","setHasFooterAction","_React$useState17","_React$useState18","hasAutoCompleteInBottomSheetHeader","setHasAutoCompleteInBottomSheetHeader","_React$useState19","_React$useState20","isKeydownPressed","setIsKeydownPressed","_React$useState21","_React$useState22","changeCallbackTriggerer","setChangeCallbackTriggerer","_React$useState23","_React$useState24","isControlled","setIsControlled","_React$useState25","_React$useState26","dropdownHasBottomSheet","setDropdownHasBottomSheet","triggererWrapperRef","useRef","triggererRef","actionListItemRef","dropdownTriggerer","isTagDismissedRef","value","visibleTagsCountRef","dropdownContainerRef","dropdownBaseId","useId","isDropdownOpenRef","_useControllableState","useControllableState","defaultValue","onChange","isOpenControlledValue","current","_useControllableState2","isDropdownOpen","setIsDropdownOpen","setIsOpen","isOpenValue","close","useCallback","Children","map","child","isValidElement","_getComponentId","includes","getComponentId","throwBladeError","message","concat","join","moduleName","isValidAllowedChildren","contextValue","useMemo","BottomSheetAndDropdownGlueContextValue","onBottomSheetDismiss","_jsx","BottomSheetAndDropdownGlueContext","Provider","DropdownContext","_objectSpread","mergeRefs","metaAttribute","name","MetaConstants","Dropdown","getStyledProps","makeAnalyticsAttribute","width","position","textAlign","assignWithoutSideEffects","forwardRef","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,qBAAqB,GAAG;AAC5B;AACAC,oBAAoB,CAACC,OAAO,EAC5BD,oBAAoB,CAACE,QAAQ,CAACC,WAAW,EACzCH,oBAAoB,CAACE,QAAQ,CAACE,WAAW,EACzCJ,oBAAoB,CAACE,QAAQ,CAACG,cAAc,EAC5CL,oBAAoB,CAACE,QAAQ,CAACI,YAAY,EAC1CN,oBAAoB,CAACO,eAAe,EACpCP,oBAAoB,CAACE,QAAQ,CAACM,YAAY,EAC1CC,YAAuB,CAACC,WAAW,CACpC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAUbC,GAA+B,EACR;AAAA,EAAA,IATrBC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IACAC,gBAAgB,GAAAH,IAAA,CAAxBI,MAAM;IACNC,YAAY,GAAAL,IAAA,CAAZK,YAAY;IAAAC,kBAAA,GAAAN,IAAA,CACZO,aAAa;AAAbA,IAAAA,aAAa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AAA,eACxF4G,GAAA,CAACG,eAAe,CAACD,QAAQ,EAAA;AAACtC,MAAAA,KAAK,EAAEgC,YAAa;MAAAxG,QAAA,eAC5C4G,GAAA,CAACzH,OAAAA;AACC;AAAA,QAAA6H,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAAA,aAAA,CAAA;AACAjH,QAAAA,GAAG,EAAEkH,SAAS,CAAClH,GAAG,EAAE2E,oBAA2B,CAAA;AAAE,OAAA,EAC7CwC,aAAa,CAAC;QAAEC,IAAI,EAAEC,aAAa,CAACC,QAAQ;AAAE/G,QAAAA,MAAM,EAANA,MAAAA;OAAQ,CAAC,CACvDgH,EAAAA,cAAc,CAAC9G,IAAI,CAAC,CACpB+G,EAAAA,sBAAsB,CAAC/G,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAChCgH,QAAAA,KAAK,EAAEjH,MAAO;QAAAP,QAAA,eAEd4G,GAAA,CAACzH,OAAO,EAAA;AAACsI,UAAAA,QAAQ,EAAC,UAAU;AAACC,UAAAA,SAAS,EAAE,MAAgB;AAAA1H,UAAAA,QAAA,EACrDA,QAAAA;SACM,CAAA;OACF,CAAA,CAAA;KACe,CAAA;AAAC,GACe,CAAC,CAAA;AAEjD,CAAC,CAAA;AAEKqH,IAAAA,QAAQ,gBAAGM,wBAAwB,eAAC/G,cAAK,CAACgH,UAAU,CAAC/H,SAAS,CAAC,EAAE;EACrEgI,WAAW,EAAE3I,oBAAoB,CAACmI,QAAAA;AACpC,CAAC;;;;"}
@@ -0,0 +1,62 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _typeof from '@babel/runtime/helpers/typeof';
3
+ import 'react';
4
+ import '../BaseMotion/index.js';
5
+ import '../../utils/index.js';
6
+ import { cssBezierToArray } from '../../utils/cssBezierToArray.js';
7
+ import { msToSeconds } from '../../utils/msToSeconds.js';
8
+ import { jsx } from 'react/jsx-runtime';
9
+ import useTheme from '../BladeProvider/useTheme.js';
10
+ import { castWebType } from '../../utils/platform/castUtils.js';
11
+ import { BaseMotionEntryExit } from '../BaseMotion/BaseMotion.js';
12
+
13
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
+ var Fade = function Fade(_ref) {
16
+ var children = _ref.children,
17
+ isVisible = _ref.isVisible,
18
+ _ref$type = _ref.type,
19
+ type = _ref$type === void 0 ? 'inout' : _ref$type,
20
+ _ref$motionTriggers = _ref.motionTriggers,
21
+ motionTriggers = _ref$motionTriggers === void 0 ? ['mount'] : _ref$motionTriggers,
22
+ shouldUnmountWhenHidden = _ref.shouldUnmountWhenHidden,
23
+ delay = _ref.delay;
24
+ var _useTheme = useTheme(),
25
+ theme = _useTheme.theme;
26
+ var enterDelay = _typeof(delay) === 'object' ? delay.enter : delay;
27
+ var exitDelay = _typeof(delay) === 'object' ? delay.exit : delay;
28
+ var fadeVariants = {
29
+ initial: {
30
+ opacity: 0
31
+ },
32
+ animate: {
33
+ opacity: 1,
34
+ transition: _objectSpread(_objectSpread({}, enterDelay ? {
35
+ delay: msToSeconds(theme.motion.delay[enterDelay])
36
+ } : {}), {}, {
37
+ duration: msToSeconds(theme.motion.duration.xquick),
38
+ ease: cssBezierToArray(castWebType(theme.motion.easing.entrance))
39
+ })
40
+ },
41
+ exit: {
42
+ opacity: 0,
43
+ transition: _objectSpread(_objectSpread({}, exitDelay ? {
44
+ delay: msToSeconds(theme.motion.delay[exitDelay])
45
+ } : {}), {}, {
46
+ duration: msToSeconds(theme.motion.duration.xquick),
47
+ ease: cssBezierToArray(castWebType(theme.motion.easing.exit))
48
+ })
49
+ }
50
+ };
51
+ return /*#__PURE__*/jsx(BaseMotionEntryExit, {
52
+ motionVariants: fadeVariants,
53
+ type: type,
54
+ isVisible: isVisible,
55
+ motionTriggers: motionTriggers,
56
+ shouldUnmountWhenHidden: shouldUnmountWhenHidden,
57
+ children: children
58
+ });
59
+ };
60
+
61
+ export { Fade };
62
+ //# sourceMappingURL=Fade.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fade.web.js","sources":["../../../../../../src/components/Fade/Fade.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { FadeProps } from './types';\nimport { BaseMotionEntryExit } from '~components/BaseMotion';\nimport type { MotionVariantsType } from '~components/BaseMotion';\nimport { castWebType, useTheme } from '~utils';\nimport { cssBezierToArray } from '~utils/cssBezierToArray';\nimport { msToSeconds } from '~utils/msToSeconds';\n\n/**\n * ## Fade\n *\n * Fade is one of the motion presets that we expose from blade to help you fade in / fade out components easily.\n *\n * ### Usage\n *\n * #### Fade in on mount\n *\n * ```jsx\n * <Fade>\n * <Card />\n * </Fade>\n * ```\n *\n * #### Conditionally fade based on state\n *\n * ```jsx\n * <Fade isVisible={isVisibleState}>\n * <Card />\n * </Fade>\n * ```\n */\nconst Fade = ({\n children,\n isVisible,\n type = 'inout',\n motionTriggers = ['mount'],\n shouldUnmountWhenHidden,\n delay,\n}: FadeProps): React.ReactElement => {\n const { theme } = useTheme();\n const enterDelay = typeof delay === 'object' ? delay.enter : delay;\n const exitDelay = typeof delay === 'object' ? delay.exit : delay;\n\n const fadeVariants: MotionVariantsType = {\n initial: {\n opacity: 0,\n },\n animate: {\n opacity: 1,\n transition: {\n // We have to make sure we don't add delay prop because if we define it, it takes precedence in stagger.\n // Even setting `undefined` would break the stagger\n ...(enterDelay ? { delay: msToSeconds(theme.motion.delay[enterDelay]) } : {}),\n duration: msToSeconds(theme.motion.duration.xquick),\n ease: cssBezierToArray(castWebType(theme.motion.easing.entrance)),\n },\n },\n exit: {\n opacity: 0,\n transition: {\n ...(exitDelay ? { delay: msToSeconds(theme.motion.delay[exitDelay]) } : {}),\n duration: msToSeconds(theme.motion.duration.xquick),\n ease: cssBezierToArray(castWebType(theme.motion.easing.exit)),\n },\n },\n };\n\n return (\n <BaseMotionEntryExit\n motionVariants={fadeVariants}\n type={type}\n isVisible={isVisible}\n motionTriggers={motionTriggers}\n shouldUnmountWhenHidden={shouldUnmountWhenHidden}\n children={children}\n />\n );\n};\n\nexport { Fade };\n"],"names":["Fade","_ref","children","isVisible","_ref$type","type","_ref$motionTriggers","motionTriggers","shouldUnmountWhenHidden","delay","_useTheme","useTheme","theme","enterDelay","_typeof","enter","exitDelay","exit","fadeVariants","initial","opacity","animate","transition","_objectSpread","msToSeconds","motion","duration","xquick","ease","cssBezierToArray","castWebType","easing","entrance","_jsx","BaseMotionEntryExit","motionVariants"],"mappings":";;;;;;;;;;;;;;AA+BA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAAC,IAAA,EAO2B;AAAA,EAAA,IANnCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAAC,SAAA,GAAAH,IAAA,CACTI,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,SAAA;IAAAE,mBAAA,GAAAL,IAAA,CACdM,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAA,KAAA,CAAA,GAAG,CAAC,OAAO,CAAC,GAAAA,mBAAA;IAC1BE,uBAAuB,GAAAP,IAAA,CAAvBO,uBAAuB;IACvBC,KAAK,GAAAR,IAAA,CAALQ,KAAK,CAAA;AAEL,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;AACb,EAAA,I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MAAM,CAACd,IAAI,CAAC,CAAA;AAAC,OAAA,CAAA;AAEjE,KAAA;GACD,CAAA;EAED,oBACEgB,GAAA,CAACC,mBAAmB,EAAA;AAClBC,IAAAA,cAAc,EAAEjB,YAAa;AAC7Bb,IAAAA,IAAI,EAAEA,IAAK;AACXF,IAAAA,SAAS,EAAEA,SAAU;AACrBI,IAAAA,cAAc,EAAEA,cAAe;AAC/BC,IAAAA,uBAAuB,EAAEA,uBAAwB;AACjDN,IAAAA,QAAQ,EAAEA,QAAAA;AAAS,GACpB,CAAC,CAAA;AAEN;;;;"}
@@ -0,0 +1,2 @@
1
+ export { Fade } from './Fade.web.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -24,6 +24,7 @@ import '../../utils/makeAccessible/index.js';
24
24
  import { formHintLeftLabelMarginLeft } from '../Input/BaseInput/baseInputTokens.js';
25
25
  import { useMergeRefs } from '../../utils/useMergeRefs.js';
26
26
  import { useControllableState } from '../../utils/useControllable.js';
27
+ import { getOuterMotionRef, getInnerMotionRef } from '../../utils/getMotionRefs.js';
27
28
  import '../../utils/makeAnalyticsAttribute/index.js';
28
29
  import '../../utils/fireNativeEvent/index.js';
29
30
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -43,7 +44,7 @@ import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeA
43
44
  import { FormHint } from '../Form/FormHint.js';
44
45
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
45
46
 
46
- var _excluded = ["name", "accept", "uploadType", "onChange", "onPreview", "onRemove", "onReupload", "onDismiss", "onDrop", "isDisabled", "isRequired", "necessityIndicator", "fileList", "testID", "label", "labelPosition", "accessibilityLabel", "validationState", "helpText", "errorText", "maxCount", "maxSize", "size"];
47
+ var _excluded = ["name", "accept", "uploadType", "onChange", "onPreview", "onRemove", "onReupload", "onDismiss", "onDrop", "isDisabled", "isRequired", "necessityIndicator", "fileList", "testID", "label", "labelPosition", "accessibilityLabel", "validationState", "helpText", "errorText", "maxCount", "maxSize", "size", "_motionMeta"];
47
48
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
48
49
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
49
50
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
@@ -76,6 +77,7 @@ var _FileUpload = function _FileUpload(_ref, ref) {
76
77
  maxSize = _ref.maxSize,
77
78
  _ref$size = _ref.size,
78
79
  size = _ref$size === void 0 ? 'medium' : _ref$size,
80
+ _motionMeta = _ref._motionMeta,
79
81
  rest = _objectWithoutProperties(_ref, _excluded);
80
82
  var inputRef = useRef(null);
81
83
  var mergedRef = useMergeRefs(ref, inputRef);
@@ -215,6 +217,10 @@ var _FileUpload = function _FileUpload(_ref, ref) {
215
217
  event.target.value = '';
216
218
  };
217
219
  return /*#__PURE__*/jsxs(BaseBox, _objectSpread(_objectSpread(_objectSpread({
220
+ ref: getOuterMotionRef({
221
+ _motionMeta: _motionMeta,
222
+ ref: ref
223
+ }),
218
224
  display: "flex",
219
225
  flexDirection: "column",
220
226
  width: "100%"
@@ -295,7 +301,10 @@ var _FileUpload = function _FileUpload(_ref, ref) {
295
301
  return setIsActive(false);
296
302
  }
297
303
  }, accessibilityProps),
298
- ref: mergedRef
304
+ ref: getInnerMotionRef({
305
+ _motionMeta: _motionMeta,
306
+ ref: mergedRef
307
+ })
299
308
  }, makeAnalyticsAttribute(rest))), /*#__PURE__*/jsx(Box, {
300
309
  display: "flex",
301
310
  justifyContent: "center",