@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
@@ -0,0 +1,119 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _typeof from '@babel/runtime/helpers/typeof';
3
+ import React__default from 'react';
4
+ import '../BaseMotion/index.js';
5
+ import { msToSeconds } from '../../utils/msToSeconds.js';
6
+ import { cssBezierToArray } from '../../utils/cssBezierToArray.js';
7
+ import '../../utils/index.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 getFromTransform = function getFromTransform(direction, fromOffset) {
16
+ if (direction === 'top') {
17
+ return "translateY(-".concat(fromOffset, ")");
18
+ }
19
+ if (direction === 'left') {
20
+ return "translateX(-".concat(fromOffset, ")");
21
+ }
22
+ if (direction === 'right') {
23
+ return "translateX(".concat(fromOffset, ")");
24
+ }
25
+ return "translateY(".concat(fromOffset, ")");
26
+ };
27
+
28
+ /**
29
+ * ## Slide
30
+ *
31
+ * Slide is one of the motion presets that we expose from blade to help you make components slide in from outside of viewport
32
+ *
33
+ * If you're looking for subtle movement on enter in the viewport itself, checkout `Move` preset instead.
34
+ *
35
+ * ### Usage
36
+ *
37
+ * #### Slide in on mount
38
+ *
39
+ * ```jsx
40
+ * <Slide direction="bottom">
41
+ * <Card />
42
+ * </Slide>
43
+ * ```
44
+ *
45
+ * #### Conditionally slide based on state
46
+ *
47
+ * ```jsx
48
+ * <Slide isVisible={isVisibleState}>
49
+ * <Card />
50
+ * </Slide>
51
+ * ```
52
+ */
53
+ var Slide = function Slide(_ref) {
54
+ var children = _ref.children,
55
+ _ref$type = _ref.type,
56
+ type = _ref$type === void 0 ? 'inout' : _ref$type,
57
+ _ref$direction = _ref.direction,
58
+ direction = _ref$direction === void 0 ? 'bottom' : _ref$direction,
59
+ isVisible = _ref.isVisible,
60
+ motionTriggers = _ref.motionTriggers,
61
+ shouldUnmountWhenHidden = _ref.shouldUnmountWhenHidden,
62
+ fromOffset = _ref.fromOffset,
63
+ delay = _ref.delay;
64
+ var _useTheme = useTheme(),
65
+ theme = _useTheme.theme;
66
+ var enterDirection = _typeof(direction) === 'object' ? direction.enter : direction;
67
+ var exitDirection = _typeof(direction) === 'object' ? direction.exit : direction;
68
+ var isEnterDirectionHorizontal = ['left', 'right'].includes(enterDirection);
69
+ var isExitDirectionHorizontal = ['left', 'right'].includes(exitDirection);
70
+ var defaultOffset = isEnterDirectionHorizontal ? '100vw' : '100vh';
71
+ var enterTransform = getFromTransform(enterDirection, fromOffset !== null && fromOffset !== void 0 ? fromOffset : defaultOffset);
72
+ var exitTransform = getFromTransform(exitDirection, fromOffset !== null && fromOffset !== void 0 ? fromOffset : defaultOffset);
73
+ var enterDelay = _typeof(delay) === 'object' ? delay.enter : delay;
74
+ var exitDelay = _typeof(delay) === 'object' ? delay.exit : delay;
75
+ var moveVariants = React__default.useMemo(function () {
76
+ return {
77
+ initial: {
78
+ // We keep element in view with opacity 0 initially so that it works with `in-view` trigger as expected
79
+ opacity: 0
80
+ },
81
+ animate: {
82
+ transform: [enterTransform, 'translateY(0%)'],
83
+ opacity: 1,
84
+ transition: _objectSpread(_objectSpread({}, enterDelay ? {
85
+ delay: msToSeconds(theme.motion.delay[enterDelay])
86
+ } : {}), {}, {
87
+ duration: msToSeconds(isEnterDirectionHorizontal ? theme.motion.duration.xmoderate : theme.motion.duration['2xgentle']),
88
+ ease: cssBezierToArray(isEnterDirectionHorizontal ? castWebType(theme.motion.easing.entrance) : castWebType(theme.motion.easing.emphasized))
89
+ })
90
+ },
91
+ exit: {
92
+ opacity: 0,
93
+ transform: exitTransform,
94
+ transitionEnd: {
95
+ transform: enterTransform
96
+ },
97
+ transition: _objectSpread(_objectSpread({}, exitDelay ? {
98
+ delay: msToSeconds(theme.motion.delay[exitDelay])
99
+ } : {}), {}, {
100
+ duration: msToSeconds(isExitDirectionHorizontal ? theme.motion.duration.moderate : theme.motion.duration.xgentle),
101
+ ease: cssBezierToArray(isExitDirectionHorizontal ? castWebType(theme.motion.easing.exit) : castWebType(theme.motion.easing.emphasized))
102
+ })
103
+ }
104
+ };
105
+ },
106
+ // eslint-disable-next-line react-hooks/exhaustive-deps
107
+ [enterDirection, exitDirection, isEnterDirectionHorizontal, isExitDirectionHorizontal, theme.name]);
108
+ return /*#__PURE__*/jsx(BaseMotionEntryExit, {
109
+ motionVariants: moveVariants,
110
+ children: children,
111
+ type: type,
112
+ isVisible: isVisible,
113
+ motionTriggers: motionTriggers,
114
+ shouldUnmountWhenHidden: shouldUnmountWhenHidden
115
+ });
116
+ };
117
+
118
+ export { Slide };
119
+ //# sourceMappingURL=Slide.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slide.web.js","sources":["../../../../../../src/components/Slide/Slide.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { SlideProps } from './types';\nimport { BaseMotionEntryExit } from '~components/BaseMotion';\nimport type { MotionVariantsType } from '~components/BaseMotion';\nimport { msToSeconds } from '~utils/msToSeconds';\nimport { cssBezierToArray } from '~utils/cssBezierToArray';\nimport { castWebType, useTheme } from '~utils';\n\nconst getFromTransform = (\n direction: SlideProps['direction'],\n fromOffset: SlideProps['fromOffset'],\n): `translate${string}` => {\n if (direction === 'top') {\n return `translateY(-${fromOffset})`;\n }\n\n if (direction === 'left') {\n return `translateX(-${fromOffset})`;\n }\n\n if (direction === 'right') {\n return `translateX(${fromOffset})`;\n }\n\n return `translateY(${fromOffset})`;\n};\n\n/**\n * ## Slide\n *\n * Slide is one of the motion presets that we expose from blade to help you make components slide in from outside of viewport\n *\n * If you're looking for subtle movement on enter in the viewport itself, checkout `Move` preset instead.\n *\n * ### Usage\n *\n * #### Slide in on mount\n *\n * ```jsx\n * <Slide direction=\"bottom\">\n * <Card />\n * </Slide>\n * ```\n *\n * #### Conditionally slide based on state\n *\n * ```jsx\n * <Slide isVisible={isVisibleState}>\n * <Card />\n * </Slide>\n * ```\n */\nconst Slide = ({\n children,\n type = 'inout',\n direction = 'bottom',\n isVisible,\n motionTriggers,\n shouldUnmountWhenHidden,\n fromOffset,\n delay,\n}: SlideProps): React.ReactElement => {\n const { theme } = useTheme();\n\n const enterDirection = typeof direction === 'object' ? direction.enter : direction;\n const exitDirection = typeof direction === 'object' ? direction.exit : direction;\n const isEnterDirectionHorizontal = ['left', 'right'].includes(enterDirection);\n const isExitDirectionHorizontal = ['left', 'right'].includes(exitDirection);\n\n const defaultOffset: SlideProps['fromOffset'] = isEnterDirectionHorizontal ? '100vw' : '100vh';\n\n const enterTransform = getFromTransform(enterDirection, fromOffset ?? defaultOffset);\n const exitTransform = getFromTransform(exitDirection, fromOffset ?? defaultOffset);\n\n const enterDelay = typeof delay === 'object' ? delay.enter : delay;\n const exitDelay = typeof delay === 'object' ? delay.exit : delay;\n\n const moveVariants: MotionVariantsType = React.useMemo(\n () => ({\n initial: {\n // We keep element in view with opacity 0 initially so that it works with `in-view` trigger as expected\n opacity: 0,\n },\n animate: {\n transform: [enterTransform, 'translateY(0%)'],\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(\n isEnterDirectionHorizontal\n ? theme.motion.duration.xmoderate\n : theme.motion.duration['2xgentle'],\n ),\n ease: cssBezierToArray(\n isEnterDirectionHorizontal\n ? castWebType(theme.motion.easing.entrance)\n : castWebType(theme.motion.easing.emphasized),\n ),\n },\n },\n exit: {\n opacity: 0,\n transform: exitTransform,\n transitionEnd: {\n transform: enterTransform,\n },\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 ...(exitDelay ? { delay: msToSeconds(theme.motion.delay[exitDelay]) } : {}),\n duration: msToSeconds(\n isExitDirectionHorizontal\n ? theme.motion.duration.moderate\n : theme.motion.duration.xgentle,\n ),\n ease: cssBezierToArray(\n isExitDirectionHorizontal\n ? castWebType(theme.motion.easing.exit)\n : castWebType(theme.motion.easing.emphasized),\n ),\n },\n },\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n enterDirection,\n exitDirection,\n isEnterDirectionHorizontal,\n isExitDirectionHorizontal,\n theme.name,\n ],\n );\n\n return (\n <BaseMotionEntryExit\n motionVariants={moveVariants}\n children={children}\n type={type}\n isVisible={isVisible}\n motionTriggers={motionTriggers}\n shouldUnmountWhenHidden={shouldUnmountWhenHidden}\n />\n );\n};\n\nexport { Slide };\n"],"names":["getFromTransform","direction","fromOffset","concat","Slide","_ref","children","_ref$type","type","_ref$direction","isVisible","motionTriggers","shouldUnmountWhenHidden","delay","_useTheme","useTheme","theme","enterDirection","_typeof","enter","exitDirection","exit","isEnterDirectionHorizontal","includes","isExitDirectionHorizontal","defaultOffset","enterTransform","exitTransform","enterDelay","exitDelay","moveVariants","React","useMemo","initial","opacity","animate","transform","transition","_objectSpread","msToSeconds","motion","duration","xmoderate","ease","cssBezierToArray","castWebType","easing","entrance","emphasized","transitionEnd","moderate","xgentle","name","_jsx","BaseMotionEntryExit","motionVariants"],"mappings":";;;;;;;;;;;;;;AAQA,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CACpBC,SAAkC,EAClCC,UAAoC,EACX;EACzB,IAAID,SAAS,KAAK,KAAK,EAAE;IACvB,OAAAE,cAAAA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AAI,CAAC,GACrCwB,WAAW,CAAC7B,KAAK,CAACwB,MAAM,CAACM,MAAM,CAACE,UAAU,CAChD,CAAA;AAAC,SAAA,CAAA;AAEL,OAAA;KACD,CAAA;GAAC;AACF;AACA,EAAA,CACE/B,cAAc,EACdG,aAAa,EACbE,0BAA0B,EAC1BE,yBAAyB,EACzBR,KAAK,CAACoC,IAAI,CAEd,CAAC,CAAA;EAED,oBACEC,GAAA,CAACC,mBAAmB,EAAA;AAClBC,IAAAA,cAAc,EAAEzB,YAAa;AAC7BxB,IAAAA,QAAQ,EAAEA,QAAS;AACnBE,IAAAA,IAAI,EAAEA,IAAK;AACXE,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,cAAc,EAAEA,cAAe;AAC/BC,IAAAA,uBAAuB,EAAEA,uBAAAA;AAAwB,GAClD,CAAC,CAAA;AAEN;;;;"}
@@ -0,0 +1,2 @@
1
+ export { Slide } from './Slide.web.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import 'react';
3
+ import React__default from 'react';
4
4
  import { dimensions } from './spinnerTokens.js';
5
5
  import SpinnerIcon from './SpinnerIcon.js';
6
6
  import { SpinningBox } from './SpinningBox.web.js';
@@ -36,7 +36,7 @@ var getColor = function getColor(_ref) {
36
36
  }
37
37
  return getIn(theme.colors, 'interactive.icon.gray.subtle');
38
38
  };
39
- var BaseSpinner = function BaseSpinner(_ref2) {
39
+ var _BaseSpinner = function _BaseSpinner(_ref2, ref) {
40
40
  var label = _ref2.label,
41
41
  _ref2$labelPosition = _ref2.labelPosition,
42
42
  labelPosition = _ref2$labelPosition === void 0 ? 'right' : _ref2$labelPosition,
@@ -49,7 +49,9 @@ var BaseSpinner = function BaseSpinner(_ref2) {
49
49
  styledProps = _objectWithoutProperties(_ref2, _excluded);
50
50
  var _useTheme = useTheme(),
51
51
  theme = _useTheme.theme;
52
- return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
52
+ return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({
53
+ ref: ref
54
+ }, metaAttribute({
53
55
  name: MetaConstants.Spinner,
54
56
  testID: testID
55
57
  })), getStyledProps(styledProps)), {}, {
@@ -83,6 +85,7 @@ var BaseSpinner = function BaseSpinner(_ref2) {
83
85
  }))
84
86
  }));
85
87
  };
88
+ var BaseSpinner = /*#__PURE__*/React__default.forwardRef(_BaseSpinner);
86
89
 
87
90
  export { BaseSpinner };
88
91
  //# sourceMappingURL=BaseSpinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseSpinner.js","sources":["../../../../../../../src/components/Spinner/BaseSpinner/BaseSpinner.tsx"],"sourcesContent":["import React from 'react';\nimport { dimensions } from './spinnerTokens';\nimport SpinnerIcon from './SpinnerIcon';\nimport { SpinningBox } from './SpinningBox';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { useTheme } from '~components/BladeProvider';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport type { TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype BaseSpinnerProps = {\n /**\n * Sets the color of the spinner.\n *\n * @default 'default'\n */\n color?: 'primary' | 'white' | FeedbackColors;\n /**\n * Sets the label of the spinner.\n *\n * @default 'right'\n */\n label?: string;\n /**\n * Sets the label of the spinner.\n *\n */\n labelPosition?: 'right' | 'bottom';\n /**\n * Sets the size of the spinner.\n *\n * @default 'medium'\n */\n size?: 'medium' | 'large' | 'xlarge';\n /**\n * Sets the aria-label for web & accessibilityLabel react-native.\n *\n */\n accessibilityLabel: string;\n} & TestID &\n StyledPropsBlade;\n\nconst getColor = ({ color, theme }: { color: BaseSpinnerProps['color']; theme: Theme }): string => {\n if (color && color === 'white') {\n return getIn(theme.colors, 'interactive.icon.staticWhite.subtle');\n }\n if (color && color !== 'neutral') {\n return getIn(theme.colors, `interactive.icon.${color}.subtle`);\n }\n return getIn(theme.colors, 'interactive.icon.gray.subtle');\n};\n\nconst BaseSpinner = ({\n label,\n labelPosition = 'right',\n accessibilityLabel,\n color = 'neutral',\n size = 'medium',\n testID,\n ...styledProps\n}: BaseSpinnerProps): React.ReactElement => {\n const { theme } = useTheme();\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.Spinner, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n flexDirection={labelPosition === 'right' ? 'row' : 'column'}\n {...makeAccessible({\n label: accessibilityLabel,\n role: 'progressbar',\n })}\n >\n <SpinningBox>\n <SpinnerIcon dimensions={makeSize(dimensions[size])} color={getColor({ color, theme })} />\n </SpinningBox>\n {label && label.trim().length > 0 ? (\n <BaseBox\n marginLeft={labelPosition === 'right' ? 'spacing.3' : 'spacing.0'}\n marginTop={labelPosition === 'bottom' ? 'spacing.3' : 'spacing.0'}\n >\n <Text variant=\"body\" weight=\"regular\" size=\"small\" color=\"surface.text.gray.muted\">\n {label}\n </Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n </BaseBox>\n );\n};\n\nexport type { BaseSpinnerProps };\nexport { BaseSpinner };\n"],"names":["getColor","_ref","color","theme","getIn","colors","concat","BaseSpinner","_ref2","label","_ref2$labelPosition","labelPosition","accessibilityLabel","_ref2$color","_ref2$size","size","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","_jsx","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","Spinner","getStyledProps","children","_jsxs","display","alignItems","flexDirection","makeAccessible","role","SpinningBox","SpinnerIcon","dimensions","makeSize","trim","length","marginLeft","marginTop","Text","variant","weight"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAAqF;AAAA,EAAA,IAA/EC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK,CAAA;AAC9B,EAAA,IAAID,KAAK,IAAIA,KAAK,KAAK,OAAO,EAAE;AAC9B,IAAA,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,EAAE,qCAAqC,CAAC,CAAA;AACnE,GAAA;AACA,EAAA,IAAIH,KAAK,IAAIA,KAAK,KAAK,SAAS,EAAE;IAChC,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,sBAAAC,MAAA,CAAsBJ,KAAK,EAAA,SAAA,CAAS,CAAC,CAAA;AAChE,GAAA;AACA,EAAA,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,EAAE,8BAA8B,CAAC,CAAA;AAC5D,CAAC,CAAA;AAED,IAAME,WAAW,GAAG,SAAdA,WAAWA,CAAAC,KAAA,EAQ2B;AAAA,EAAA,IAP1CC,KAAK,GAAAD,KAAA,CAALC,KAAK;IAAAC,mBAAA,GAAAF,KAAA,CACLG,aAAa;AAAbA,IAAAA,aAAa,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,mBAAA;IACvBE,kBAAkB,GAAAJ,KAAA,CAAlBI,kBAAkB;IAAAC,WAAA,GAAAL,KAAA,CAClBN,KAAK;AAALA,IAAAA,KAAK,GAAAW,WAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,WAAA;IAAAC,UAAA,GAAAN,KAAA,CACjBO,IAAI;AAAJA,IAAAA,IAAI,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,UAAA;I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;AACNoB,QAAAA,UAAU,EAAEhC,aAAa,KAAK,OAAO,GAAG,WAAW,GAAG,WAAY;AAClEiC,QAAAA,SAAS,EAAEjC,aAAa,KAAK,QAAQ,GAAG,WAAW,GAAG,WAAY;QAAAmB,QAAA,eAElER,GAAA,CAACuB,IAAI,EAAA;AAACC,UAAAA,OAAO,EAAC,MAAM;AAACC,UAAAA,MAAM,EAAC,SAAS;AAAChC,UAAAA,IAAI,EAAC,OAAO;AAACb,UAAAA,KAAK,EAAC,yBAAyB;AAAA4B,UAAAA,QAAA,EAC/ErB,KAAAA;SACG,CAAA;OACC,CAAC,GACR,IAAI,CAAA;KACD,CAAA,CAAA;AAAC,GAAA,CACH,CAAC,CAAA;AAEd;;;;"}
1
+ {"version":3,"file":"BaseSpinner.js","sources":["../../../../../../../src/components/Spinner/BaseSpinner/BaseSpinner.tsx"],"sourcesContent":["import React from 'react';\nimport { dimensions } from './spinnerTokens';\nimport SpinnerIcon from './SpinnerIcon';\nimport { SpinningBox } from './SpinningBox';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { Theme } from '~components/BladeProvider';\nimport { useTheme } from '~components/BladeProvider';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport type { BladeElementRef, TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype BaseSpinnerProps = {\n /**\n * Sets the color of the spinner.\n *\n * @default 'default'\n */\n color?: 'primary' | 'white' | FeedbackColors;\n /**\n * Sets the label of the spinner.\n *\n * @default 'right'\n */\n label?: string;\n /**\n * Sets the label of the spinner.\n *\n */\n labelPosition?: 'right' | 'bottom';\n /**\n * Sets the size of the spinner.\n *\n * @default 'medium'\n */\n size?: 'medium' | 'large' | 'xlarge';\n /**\n * Sets the aria-label for web & accessibilityLabel react-native.\n *\n */\n accessibilityLabel: string;\n} & TestID &\n StyledPropsBlade;\n\nconst getColor = ({ color, theme }: { color: BaseSpinnerProps['color']; theme: Theme }): string => {\n if (color && color === 'white') {\n return getIn(theme.colors, 'interactive.icon.staticWhite.subtle');\n }\n if (color && color !== 'neutral') {\n return getIn(theme.colors, `interactive.icon.${color}.subtle`);\n }\n return getIn(theme.colors, 'interactive.icon.gray.subtle');\n};\n\nconst _BaseSpinner = (\n {\n label,\n labelPosition = 'right',\n accessibilityLabel,\n color = 'neutral',\n size = 'medium',\n testID,\n ...styledProps\n }: BaseSpinnerProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const { theme } = useTheme();\n return (\n <BaseBox\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Spinner, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n flexDirection={labelPosition === 'right' ? 'row' : 'column'}\n {...makeAccessible({\n label: accessibilityLabel,\n role: 'progressbar',\n })}\n >\n <SpinningBox>\n <SpinnerIcon dimensions={makeSize(dimensions[size])} color={getColor({ color, theme })} />\n </SpinningBox>\n {label && label.trim().length > 0 ? (\n <BaseBox\n marginLeft={labelPosition === 'right' ? 'spacing.3' : 'spacing.0'}\n marginTop={labelPosition === 'bottom' ? 'spacing.3' : 'spacing.0'}\n >\n <Text variant=\"body\" weight=\"regular\" size=\"small\" color=\"surface.text.gray.muted\">\n {label}\n </Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst BaseSpinner = React.forwardRef(_BaseSpinner);\n\nexport type { BaseSpinnerProps };\nexport { BaseSpinner };\n"],"names":["getColor","_ref","color","theme","getIn","colors","concat","_BaseSpinner","_ref2","ref","label","_ref2$labelPosition","labelPosition","accessibilityLabel","_ref2$color","_ref2$size","size","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","_jsx","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","Spinner","getStyledProps","children","_jsxs","display","alignItems","flexDirection","makeAccessible","role","SpinningBox","SpinnerIcon","dimensions","makeSize","trim","length","marginLeft","marginTop","Text","variant","weight","BaseSpinner","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAAqF;AAAA,EAAA,IAA/EC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK,CAAA;AAC9B,EAAA,IAAID,KAAK,IAAIA,KAAK,KAAK,OAAO,EAAE;AAC9B,IAAA,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,EAAE,qCAAqC,CAAC,CAAA;AACnE,GAAA;AACA,EAAA,IAAIH,KAAK,IAAIA,KAAK,KAAK,SAAS,EAAE;IAChC,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,sBAAAC,MAAA,CAAsBJ,KAAK,EAAA,SAAA,CAAS,CAAC,CAAA;AAChE,GAAA;AACA,EAAA,OAAOE,KAAK,CAACD,KAAK,CAACE,MAAM,EAAE,8BAA8B,CAAC,CAAA;AAC5D,CAAC,CAAA;AAED,IAAME,YAAY,GAAG,SAAfA,YAAYA,CAAAC,KAAA,EAUhBC,GAA+B,EACR;AAAA,EAAA,IATrBC,KAAK,GAAAF,KAAA,CAALE,KAAK;IAAAC,mBAAA,GAAAH,KAAA,CACLI,aAAa;AAAbA,IAAAA,aAAa,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,mBAAA;IACvBE,kBAAkB,GAAAL,KAAA,CAAlBK,kBAAkB;IAAAC,WAAA,GAAAN,KAAA,CAClBN,KAAK;AAALA,IAAAA,KAAK,GAAAY,WAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,WAAA;IAAAC,UAAA,GAAAP,KAAA,CACjBQ,IAAI;AAAJA,IAAAA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AC,EACbO,KAAK,IAAIA,KAAK,CAACgC,IAAI,EAAE,CAACC,MAAM,GAAG,CAAC,gBAC/BpB,GAAA,CAACC,OAAO,EAAA;AACNoB,QAAAA,UAAU,EAAEhC,aAAa,KAAK,OAAO,GAAG,WAAW,GAAG,WAAY;AAClEiC,QAAAA,SAAS,EAAEjC,aAAa,KAAK,QAAQ,GAAG,WAAW,GAAG,WAAY;QAAAmB,QAAA,eAElER,GAAA,CAACuB,IAAI,EAAA;AAACC,UAAAA,OAAO,EAAC,MAAM;AAACC,UAAAA,MAAM,EAAC,SAAS;AAAChC,UAAAA,IAAI,EAAC,OAAO;AAACd,UAAAA,KAAK,EAAC,yBAAyB;AAAA6B,UAAAA,QAAA,EAC/ErB,KAAAA;SACG,CAAA;OACC,CAAC,GACR,IAAI,CAAA;KACD,CAAA,CAAA;AAAC,GAAA,CACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMuC,WAAW,gBAAGC,cAAK,CAACC,UAAU,CAAC5C,YAAY;;;;"}
@@ -5,7 +5,7 @@ var dimensions = {
5
5
  };
6
6
  var motion = {
7
7
  duration: 'duration.2xgentle',
8
- easing: 'easing.standard.attentive'
8
+ easing: 'easing.overshoot'
9
9
  };
10
10
 
11
11
  export { dimensions, motion };
@@ -1 +1 @@
1
- {"version":3,"file":"spinnerTokens.js","sources":["../../../../../../../src/components/Spinner/BaseSpinner/spinnerTokens.ts"],"sourcesContent":["import type { DurationString, EasingString } from '~tokens/global';\n\nconst dimensions = {\n medium: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\nconst motion: {\n duration: DurationString;\n easing: EasingString;\n} = {\n duration: 'duration.2xgentle',\n easing: 'easing.standard.attentive',\n};\n\nexport { dimensions, motion };\n"],"names":["dimensions","medium","large","xlarge","motion","duration","easing"],"mappings":"AAEA,IAAMA,UAAU,GAAG;AACjBC,EAAAA,MAAM,EAAE,EAAE;AACVC,EAAAA,KAAK,EAAE,EAAE;AACTC,EAAAA,MAAM,EAAE,EAAA;AACV,EAAU;AAEV,IAAMC,MAGL,GAAG;AACFC,EAAAA,QAAQ,EAAE,mBAAmB;AAC7BC,EAAAA,MAAM,EAAE,2BAAA;AACV;;;;"}
1
+ {"version":3,"file":"spinnerTokens.js","sources":["../../../../../../../src/components/Spinner/BaseSpinner/spinnerTokens.ts"],"sourcesContent":["import type { DurationString, EasingString } from '~tokens/global';\n\nconst dimensions = {\n medium: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\nconst motion: {\n duration: DurationString;\n easing: EasingString;\n} = {\n duration: 'duration.2xgentle',\n easing: 'easing.overshoot',\n};\n\nexport { dimensions, motion };\n"],"names":["dimensions","medium","large","xlarge","motion","duration","easing"],"mappings":"AAEA,IAAMA,UAAU,GAAG;AACjBC,EAAAA,MAAM,EAAE,EAAE;AACVC,EAAAA,KAAK,EAAE,EAAE;AACTC,EAAAA,MAAM,EAAE,EAAA;AACV,EAAU;AAEV,IAAMC,MAGL,GAAG;AACFC,EAAAA,QAAQ,EAAE,mBAAmB;AAC7BC,EAAAA,MAAM,EAAE,kBAAA;AACV;;;;"}
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import React__default from 'react';
3
4
  import '../BaseSpinner/index.js';
4
5
  import { jsx } from 'react/jsx-runtime';
5
6
  import { BaseSpinner } from '../BaseSpinner/BaseSpinner.js';
@@ -7,7 +8,7 @@ import { BaseSpinner } from '../BaseSpinner/BaseSpinner.js';
7
8
  var _excluded = ["label", "labelPosition", "accessibilityLabel", "color", "size", "testID"];
8
9
  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; }
9
10
  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; }
10
- var Spinner = function Spinner(_ref) {
11
+ var _Spinner = function _Spinner(_ref, ref) {
11
12
  var _ref2;
12
13
  var label = _ref.label,
13
14
  labelPosition = _ref.labelPosition,
@@ -19,6 +20,7 @@ var Spinner = function Spinner(_ref) {
19
20
  testID = _ref.testID,
20
21
  styledProps = _objectWithoutProperties(_ref, _excluded);
21
22
  return /*#__PURE__*/jsx(BaseSpinner, _objectSpread({
23
+ ref: ref,
22
24
  label: label,
23
25
  labelPosition: labelPosition,
24
26
  accessibilityLabel: (_ref2 = accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : label) !== null && _ref2 !== void 0 ? _ref2 : 'Loading',
@@ -27,6 +29,7 @@ var Spinner = function Spinner(_ref) {
27
29
  testID: testID
28
30
  }, styledProps));
29
31
  };
32
+ var Spinner = /*#__PURE__*/React__default.forwardRef(_Spinner);
30
33
 
31
34
  export { Spinner };
32
35
  //# sourceMappingURL=Spinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.js","sources":["../../../../../../../src/components/Spinner/Spinner/Spinner.tsx"],"sourcesContent":["import { BaseSpinner } from '../BaseSpinner';\nimport type { BaseSpinnerProps } from '../BaseSpinner';\n\ntype SpinnerProps = BaseSpinnerProps & {\n /**\n * Sets the color of the spinner.\n *\n * @default 'default'\n */\n color?: 'primary' | 'neutral' | 'white';\n};\n\nconst Spinner = ({\n label,\n labelPosition,\n accessibilityLabel,\n color = 'neutral',\n size = 'medium',\n testID,\n ...styledProps\n}: SpinnerProps): React.ReactElement => {\n return (\n <BaseSpinner\n label={label}\n labelPosition={labelPosition}\n accessibilityLabel={accessibilityLabel ?? label ?? 'Loading'}\n color={color}\n size={size}\n testID={testID}\n {...styledProps}\n />\n );\n};\n\nexport type { SpinnerProps };\nexport { Spinner };\n"],"names":["Spinner","_ref","_ref2","label","labelPosition","accessibilityLabel","_ref$color","color","_ref$size","size","testID","styledProps","_objectWithoutProperties","_excluded","_jsx","BaseSpinner","_objectSpread"],"mappings":";;;;;;;;;AAYA,IAAMA,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAQ2B;AAAA,EAAA,IAAAC,KAAA,CAAA;AAAA,EAAA,IAPtCC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,aAAa,GAAAH,IAAA,CAAbG,aAAa;IACbC,kBAAkB,GAAAJ,IAAA,CAAlBI,kBAAkB;IAAAC,UAAA,GAAAL,IAAA,CAClBM,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,UAAA;IAAAE,SAAA,GAAAP,IAAA,CACjBQ,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA;IACfE,MAAM,GAAAT,IAAA,CAANS,MAAM;AACHC,IAAAA,WAAW,GAAAC,wBAAA,CAAAX,IAAA,EAAAY,SAAA,CAAA,CAAA;AAEd,EAAA,oBACEC,GAAA,CAACC,WAAW,EAAAC,aAAA,CAAA;AACVb,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,aAAa,EAAEA,aAAc;AAC7BC,IAAAA,kBAAkB,EAAAH,CAAAA,KAAA,GAAEG,kBAAkB,aAAlBA,kBAAkB,KAAA,KAAA,CAAA,GAAlBA,kBAAkB,GAAIF,KAAK,MAAAD,IAAAA,IAAAA,KAAA,KAAAA,KAAAA,CAAAA,GAAAA,KAAA,GAAI,SAAU;AAC7DK,IAAAA,KAAK,EAAEA,KAAM;AACbE,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,MAAM,EAAEA,MAAAA;GACJC,EAAAA,WAAW,CAChB,CAAC,CAAA;AAEN;;;;"}
1
+ {"version":3,"file":"Spinner.js","sources":["../../../../../../../src/components/Spinner/Spinner/Spinner.tsx"],"sourcesContent":["import React from 'react';\nimport { BaseSpinner } from '../BaseSpinner';\nimport type { BaseSpinnerProps } from '../BaseSpinner';\nimport type { BladeElementRef } from '~utils/types';\n\ntype SpinnerProps = BaseSpinnerProps & {\n /**\n * Sets the color of the spinner.\n *\n * @default 'default'\n */\n color?: 'primary' | 'neutral' | 'white';\n};\n\nconst _Spinner = (\n {\n label,\n labelPosition,\n accessibilityLabel,\n color = 'neutral',\n size = 'medium',\n testID,\n ...styledProps\n }: SpinnerProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n return (\n <BaseSpinner\n ref={ref as never}\n label={label}\n labelPosition={labelPosition}\n accessibilityLabel={accessibilityLabel ?? label ?? 'Loading'}\n color={color}\n size={size}\n testID={testID}\n {...styledProps}\n />\n );\n};\n\nconst Spinner = React.forwardRef(_Spinner);\n\nexport type { SpinnerProps };\nexport { Spinner };\n"],"names":["_Spinner","_ref","ref","_ref2","label","labelPosition","accessibilityLabel","_ref$color","color","_ref$size","size","testID","styledProps","_objectWithoutProperties","_excluded","_jsx","BaseSpinner","_objectSpread","Spinner","React","forwardRef"],"mappings":";;;;;;;;;;AAcA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAUZC,GAA+B,EACR;AAAA,EAAA,IAAAC,KAAA,CAAA;AAAA,EAAA,IATrBC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IACbC,kBAAkB,GAAAL,IAAA,CAAlBK,kBAAkB;IAAAC,UAAA,GAAAN,IAAA,CAClBO,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,UAAA;IAAAE,SAAA,GAAAR,IAAA,CACjBS,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA;IACfE,MAAM,GAAAV,IAAA,CAANU,MAAM;AACHC,IAAAA,WAAW,GAAAC,wBAAA,CAAAZ,IAAA,EAAAa,SAAA,CAAA,CAAA;AAIhB,EAAA,oBACEC,GAAA,CAACC,WAAW,EAAAC,aAAA,CAAA;AACVf,IAAAA,GAAG,EAAEA,GAAa;AAClBE,IAAAA,KAAK,EAAEA,KAAM;AACbC,IAAAA,aAAa,EAAEA,aAAc;AAC7BC,IAAAA,kBAAkB,EAAAH,CAAAA,KAAA,GAAEG,kBAAkB,aAAlBA,kBAAkB,KAAA,KAAA,CAAA,GAAlBA,kBAAkB,GAAIF,KAAK,MAAAD,IAAAA,IAAAA,KAAA,KAAAA,KAAAA,CAAAA,GAAAA,KAAA,GAAI,SAAU;AAC7DK,IAAAA,KAAK,EAAEA,KAAM;AACbE,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,MAAM,EAAEA,MAAAA;GACJC,EAAAA,WAAW,CAChB,CAAC,CAAA;AAEN,CAAC,CAAA;AAED,IAAMM,OAAO,gBAAGC,cAAK,CAACC,UAAU,CAACpB,QAAQ;;;;"}
@@ -45,8 +45,8 @@ var FadeRect = /*#__PURE__*/React__default.memo(function (_ref3) {
45
45
  var _useTheme = useTheme(),
46
46
  theme = _useTheme.theme;
47
47
  var duration = theme.motion.duration.gentle;
48
- var enter = /*#__PURE__*/css(["animation:", " ", " ", ";animation-fill-mode:forwards;"], scaleIn, makeMotionTime(duration), theme.motion.easing.entrance.effective);
49
- var exit = /*#__PURE__*/css(["animation:", " ", " ", ";animation-fill-mode:forwards;"], fadeOut, makeMotionTime(duration), theme.motion.easing.exit.effective);
48
+ var enter = /*#__PURE__*/css(["animation:", " ", " ", ";animation-fill-mode:forwards;"], scaleIn, makeMotionTime(duration), theme.motion.easing.entrance);
49
+ var exit = /*#__PURE__*/css(["animation:", " ", " ", ";animation-fill-mode:forwards;"], fadeOut, makeMotionTime(duration), theme.motion.easing.exit);
50
50
  var _usePresence = usePresence(Boolean(show), {
51
51
  transitionDuration: duration,
52
52
  initialEnter: false
@@ -1 +1 @@
1
- {"version":3,"file":"TourMask.web.js","sources":["../../../../../../src/components/SpotlightPopoverTour/TourMask.web.tsx"],"sourcesContent":["/* eslint-disable react/jsx-no-useless-fragment */\nimport React from 'react';\nimport type { FlattenSimpleInterpolation } from 'styled-components';\nimport styled, { css, keyframes } from 'styled-components';\nimport usePresence from 'use-presence';\nimport type { SpotlightPopoverTourMaskRect } from './types';\nimport { useTheme } from '~components/BladeProvider';\nimport { useWindowSize } from '~utils/useWindowSize';\nimport { makeSpace } from '~utils';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { componentZIndices } from '~utils/componentZIndices';\n\nconst scaleIn = keyframes`\n from {\n fill-opacity: 0;\n }\n to {\n fill-opacity: 1;\n }\n`;\nconst fadeOut = keyframes`\n from {\n fill-opacity: 1;\n }\n to {\n fill-opacity: 0;\n }\n`;\n\nconst pulsingAnimation = keyframes`\n 0% {\n opacity: 0.5;\n }\n 100% {\n opacity: 1;\n }\n`;\n\nconst AnimatedFade = styled.rect<{ animationType: FlattenSimpleInterpolation | null }>(\n ({ animationType }) =>\n animationType === null\n ? ''\n : css`\n ${animationType}\n `,\n);\n\nconst StyledPlusing = styled.rect<{ animationType: FlattenSimpleInterpolation | null }>(\n ({ animationType }) => {\n return animationType === null\n ? ''\n : css`\n ${animationType}\n `;\n },\n);\n\ntype FadeRectProps = React.ComponentProps<'rect'> & {\n show: boolean;\n};\nconst FadeRect = React.memo(\n ({ show, children, ...rest }: FadeRectProps): React.ReactElement => {\n const { theme } = useTheme();\n\n const duration = theme.motion.duration.gentle;\n const enter = css`\n animation: ${scaleIn} ${makeMotionTime(duration)}\n ${(theme.motion.easing.entrance.effective as unknown) as string};\n animation-fill-mode: forwards;\n `;\n\n const exit = css`\n animation: ${fadeOut} ${makeMotionTime(duration)}\n ${(theme.motion.easing.exit.effective as unknown) as string};\n animation-fill-mode: forwards;\n `;\n\n const { isVisible } = usePresence(Boolean(show), {\n transitionDuration: duration,\n initialEnter: false,\n });\n\n return (\n // @ts-expect-error styled compoennt types are different from react types\n <AnimatedFade animationType={isVisible ? enter : exit} {...rest}>\n {children}\n </AnimatedFade>\n );\n },\n);\n\nconst PulsingRect = React.memo(\n (props: React.ComponentProps<'rect'>): React.ReactElement => {\n const pulsing = css`\n animation: ${pulsingAnimation} 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n `;\n\n return (\n // @ts-expect-error styled compoennt types are different from react types\n <StyledPlusing animationType={pulsing} {...props} />\n );\n },\n);\n\ntype SpotlightPopoverTourMaskProps = {\n padding: number;\n size: SpotlightPopoverTourMaskRect;\n isTransitioning: boolean;\n};\n\nconst absoluteFill = {\n position: 'fixed',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n zIndex: componentZIndices.tourMask,\n} as const;\n\nconst _SpotlightPopoverTourMask = ({\n padding,\n size,\n isTransitioning,\n}: SpotlightPopoverTourMaskProps): React.ReactElement => {\n const { theme } = useTheme();\n const { width: windowWidth, height: windowHeight } = useWindowSize();\n\n const width = size.width + padding;\n const height = size.height + padding;\n const x = size.x - (width - size.width) / 2;\n const y = size.y - (height - size.height) / 2;\n\n const borderWidth = theme.spacing[1];\n const borderRadius = theme.spacing[2];\n\n const isSizeZero = size.width === 0 || size.height === 0;\n\n return (\n <svg\n style={absoluteFill}\n viewBox={`0 0 ${windowWidth} ${windowHeight}`}\n fill=\"none\"\n stroke=\"none\"\n {...metaAttribute({ name: MetaConstants.TourMask })}\n >\n <PulsingRect\n x={x + borderWidth / 2}\n y={y + borderWidth / 2}\n width={width - borderWidth}\n height={height - borderWidth}\n stroke={theme.colors.surface.background.primary.intense}\n strokeWidth={makeSpace(borderWidth)}\n rx={borderRadius - 1}\n ry={borderRadius - 1}\n fill=\"transparent\"\n opacity={isSizeZero ? 0 : 1}\n />\n\n <mask id=\"tour-mask\" x={0} y={0} height=\"100%\" width=\"100%\" stroke=\"none\">\n <rect height=\"100%\" width=\"100%\" fill=\"#fff\" />\n {!isSizeZero && (\n <FadeRect\n show={!isTransitioning}\n x={x}\n y={y}\n width={width}\n height={height}\n rx={borderRadius}\n ry={borderRadius}\n fill=\"#000\"\n />\n )}\n </mask>\n <rect\n height=\"100%\"\n width=\"100%\"\n mask=\"url(#tour-mask)\"\n fill={theme.colors.overlay.background.subtle}\n />\n </svg>\n );\n};\n\nconst SpotlightPopoverTourMask = assignWithoutSideEffects(React.memo(_SpotlightPopoverTourMask), {\n displayName: 'TourMask',\n});\nexport { SpotlightPopoverTourMask };\n"],"names":["scaleIn","keyframes","fadeOut","pulsingAnimation","AnimatedFade","styled","rect","withConfig","displayName","componentId","_ref","animationType","css","StyledPlusing","_ref2","FadeRect","React","memo","_ref3","show","children","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","duration","motion","gentle","enter","makeMotionTime","easing","entrance","effective","exit","_usePresence","usePresence","Boolean","transitionDuration","initialEnter","isVisible","_jsx","_objectSpread","PulsingRect","props","pulsing","absoluteFill","position","top","left","bottom","right","zIndex","componentZIndices","tourMask","_SpotlightPopoverTourMask","_ref4","padding","size","isTransitioning","_useTheme2","_useWindowSize","useWindowSize","windowWidth","width","windowHeight","height","x","y","borderWidth","spacing","borderRadius","isSizeZero","_jsxs","style","viewBox","concat","fill","stroke","metaAttribute","name","MetaConstants","TourMask","colors","surface","background","primary","intense","strokeWidth","makeSpace","rx","ry","opacity","id","mask","overlay","subtle","SpotlightPopoverTourMask","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,OAAO,gBAAGC,SAAS,CAOxB,CAAA,0CAAA,CAAA,CAAA,CAAA;AACD,IAAMC,OAAO,gBAAGD,SAAS,CAOxB,CAAA,0CAAA,CAAA,CAAA,CAAA;AAED,IAAME,gBAAgB,g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C,MAAM;AAACc,MAAAA,MAAM,EAAC,MAAM;AAAA3D,MAAAA,QAAA,gBACvEsB,GAAA,CAAA,MAAA,EAAA;AAAMyB,QAAAA,MAAM,EAAC,MAAM;AAACF,QAAAA,KAAK,EAAC,MAAM;AAACa,QAAAA,IAAI,EAAC,MAAA;AAAM,OAAE,CAAC,EAC9C,CAACL,UAAU,iBACV/B,GAAA,CAAC3B,QAAQ,EAAA;QACPI,IAAI,EAAE,CAACyC,eAAgB;AACvBQ,QAAAA,CAAC,EAAEA,CAAE;AACLC,QAAAA,CAAC,EAAEA,CAAE;AACLJ,QAAAA,KAAK,EAAEA,KAAM;AACbE,QAAAA,MAAM,EAAEA,MAAO;AACfwB,QAAAA,EAAE,EAAEnB,YAAa;AACjBoB,QAAAA,EAAE,EAAEpB,YAAa;AACjBM,QAAAA,IAAI,EAAC,MAAA;AAAM,OACZ,CACF,CAAA;KACG,CAAC,eACPpC,GAAA,CAAA,MAAA,EAAA;AACEyB,MAAAA,MAAM,EAAC,MAAM;AACbF,MAAAA,KAAK,EAAC,MAAM;AACZ8B,MAAAA,IAAI,EAAC,iBAAiB;MACtBjB,IAAI,EAAEpD,KAAK,CAAC0D,MAAM,CAACY,OAAO,CAACV,UAAU,CAACW,MAAAA;AAAO,KAC9C,CAAC,CAAA;AAAA,GAAA,CACC,CAAC,CAAA;AAEV,CAAC,CAAA;AAEKC,IAAAA,wBAAwB,gBAAGC,wBAAwB,eAACnF,cAAK,CAACC,IAAI,CAACuC,yBAAyB,CAAC,EAAE;AAC/FhD,EAAAA,WAAW,EAAE,UAAA;AACf,CAAC;;;;"}
1
+ {"version":3,"file":"TourMask.web.js","sources":["../../../../../../src/components/SpotlightPopoverTour/TourMask.web.tsx"],"sourcesContent":["/* eslint-disable react/jsx-no-useless-fragment */\nimport React from 'react';\nimport type { FlattenSimpleInterpolation } from 'styled-components';\nimport styled, { css, keyframes } from 'styled-components';\nimport usePresence from 'use-presence';\nimport type { SpotlightPopoverTourMaskRect } from './types';\nimport { useTheme } from '~components/BladeProvider';\nimport { useWindowSize } from '~utils/useWindowSize';\nimport { makeSpace } from '~utils';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { componentZIndices } from '~utils/componentZIndices';\n\nconst scaleIn = keyframes`\n from {\n fill-opacity: 0;\n }\n to {\n fill-opacity: 1;\n }\n`;\nconst fadeOut = keyframes`\n from {\n fill-opacity: 1;\n }\n to {\n fill-opacity: 0;\n }\n`;\n\nconst pulsingAnimation = keyframes`\n 0% {\n opacity: 0.5;\n }\n 100% {\n opacity: 1;\n }\n`;\n\nconst AnimatedFade = styled.rect<{ animationType: FlattenSimpleInterpolation | null }>(\n ({ animationType }) =>\n animationType === null\n ? ''\n : css`\n ${animationType}\n `,\n);\n\nconst StyledPlusing = styled.rect<{ animationType: FlattenSimpleInterpolation | null }>(\n ({ animationType }) => {\n return animationType === null\n ? ''\n : css`\n ${animationType}\n `;\n },\n);\n\ntype FadeRectProps = React.ComponentProps<'rect'> & {\n show: boolean;\n};\nconst FadeRect = React.memo(\n ({ show, children, ...rest }: FadeRectProps): React.ReactElement => {\n const { theme } = useTheme();\n\n const duration = theme.motion.duration.gentle;\n const enter = css`\n animation: ${scaleIn} ${makeMotionTime(duration)}\n ${(theme.motion.easing.entrance as unknown) as string};\n animation-fill-mode: forwards;\n `;\n\n const exit = css`\n animation: ${fadeOut} ${makeMotionTime(duration)}\n ${(theme.motion.easing.exit as unknown) as string};\n animation-fill-mode: forwards;\n `;\n\n const { isVisible } = usePresence(Boolean(show), {\n transitionDuration: duration,\n initialEnter: false,\n });\n\n return (\n // @ts-expect-error styled compoennt types are different from react types\n <AnimatedFade animationType={isVisible ? enter : exit} {...rest}>\n {children}\n </AnimatedFade>\n );\n },\n);\n\nconst PulsingRect = React.memo(\n (props: React.ComponentProps<'rect'>): React.ReactElement => {\n const pulsing = css`\n animation: ${pulsingAnimation} 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n `;\n\n return (\n // @ts-expect-error styled compoennt types are different from react types\n <StyledPlusing animationType={pulsing} {...props} />\n );\n },\n);\n\ntype SpotlightPopoverTourMaskProps = {\n padding: number;\n size: SpotlightPopoverTourMaskRect;\n isTransitioning: boolean;\n};\n\nconst absoluteFill = {\n position: 'fixed',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n zIndex: componentZIndices.tourMask,\n} as const;\n\nconst _SpotlightPopoverTourMask = ({\n padding,\n size,\n isTransitioning,\n}: SpotlightPopoverTourMaskProps): React.ReactElement => {\n const { theme } = useTheme();\n const { width: windowWidth, height: windowHeight } = useWindowSize();\n\n const width = size.width + padding;\n const height = size.height + padding;\n const x = size.x - (width - size.width) / 2;\n const y = size.y - (height - size.height) / 2;\n\n const borderWidth = theme.spacing[1];\n const borderRadius = theme.spacing[2];\n\n const isSizeZero = size.width === 0 || size.height === 0;\n\n return (\n <svg\n style={absoluteFill}\n viewBox={`0 0 ${windowWidth} ${windowHeight}`}\n fill=\"none\"\n stroke=\"none\"\n {...metaAttribute({ name: MetaConstants.TourMask })}\n >\n <PulsingRect\n x={x + borderWidth / 2}\n y={y + borderWidth / 2}\n width={width - borderWidth}\n height={height - borderWidth}\n stroke={theme.colors.surface.background.primary.intense}\n strokeWidth={makeSpace(borderWidth)}\n rx={borderRadius - 1}\n ry={borderRadius - 1}\n fill=\"transparent\"\n opacity={isSizeZero ? 0 : 1}\n />\n\n <mask id=\"tour-mask\" x={0} y={0} height=\"100%\" width=\"100%\" stroke=\"none\">\n <rect height=\"100%\" width=\"100%\" fill=\"#fff\" />\n {!isSizeZero && (\n <FadeRect\n show={!isTransitioning}\n x={x}\n y={y}\n width={width}\n height={height}\n rx={borderRadius}\n ry={borderRadius}\n fill=\"#000\"\n />\n )}\n </mask>\n <rect\n height=\"100%\"\n width=\"100%\"\n mask=\"url(#tour-mask)\"\n fill={theme.colors.overlay.background.subtle}\n />\n </svg>\n );\n};\n\nconst SpotlightPopoverTourMask = assignWithoutSideEffects(React.memo(_SpotlightPopoverTourMask), {\n displayName: 'TourMask',\n});\nexport { SpotlightPopoverTourMask };\n"],"names":["scaleIn","keyframes","fadeOut","pulsingAnimation","AnimatedFade","styled","rect","withConfig","displayName","componentId","_ref","animationType","css","StyledPlusing","_ref2","FadeRect","React","memo","_ref3","show","children","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","duration","motion","gentle","enter","makeMotionTime","easing","entrance","exit","_usePresence","usePresence","Boolean","transitionDuration","initialEnter","isVisible","_jsx","_objectSpread","PulsingRect","props","pulsing","absoluteFill","position","top","left","bottom","right","zIndex","componentZIndices","tourMask","_SpotlightPopoverTourMask","_ref4","padding","size","isTransitioning","_useTheme2","_useWindowSize","useWindowSize","windowWidth","width","windowHeight","height","x","y","borderWidth","spacing","borderRadius","isSizeZero","_jsxs","style","viewBox","concat","fill","stroke","metaAttribute","name","MetaConstants","TourMask","colors","surface","background","primary","intense","strokeWidth","makeSpace","rx","ry","opacity","id","mask","overlay","subtle","SpotlightPopoverTourMask","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,OAAO,gBAAGC,SAAS,CAOxB,CAAA,0CAAA,CAAA,CAAA,CAAA;AACD,IAAMC,OAAO,gBAAGD,SAAS,CAOxB,CAAA,0CAAA,CAAA,CAAA,CAAA;AAED,IAAME,gBAAgB,gBAAGF,SAAS,CAOjC,CAAA,kCAAA,CAAA,CAAA,CAAA;AAED,IAAMG,YAAY,gBAAGC,MAAM,CAACC,IAAI,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,2BAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAC9B,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,aAAa,GAAAD,IAAA,CAAbC,aAAa,CAAA;EAAA,OACdA,aAAa,KAAK,IAAI,GAClB,EAAE,GACFC,GAAG,CACCD,CAA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AACjBoB,QAAAA,EAAE,EAAEpB,YAAa;AACjBM,QAAAA,IAAI,EAAC,MAAA;AAAM,OACZ,CACF,CAAA;KACG,CAAC,eACPpC,GAAA,CAAA,MAAA,EAAA;AACEyB,MAAAA,MAAM,EAAC,MAAM;AACbF,MAAAA,KAAK,EAAC,MAAM;AACZ8B,MAAAA,IAAI,EAAC,iBAAiB;MACtBjB,IAAI,EAAEnD,KAAK,CAACyD,MAAM,CAACY,OAAO,CAACV,UAAU,CAACW,MAAAA;AAAO,KAC9C,CAAC,CAAA;AAAA,GAAA,CACC,CAAC,CAAA;AAEV,CAAC,CAAA;AAEKC,IAAAA,wBAAwB,gBAAGC,wBAAwB,eAAClF,cAAK,CAACC,IAAI,CAACsC,yBAAyB,CAAC,EAAE;AAC/F/C,EAAAA,WAAW,EAAE,UAAA;AACf,CAAC;;;;"}
@@ -0,0 +1,13 @@
1
+ import React__default from 'react';
2
+
3
+ var StaggerContext = /*#__PURE__*/React__default.createContext({
4
+ isInsideStaggerContainer: false,
5
+ staggerType: 'inout'
6
+ });
7
+ var useStagger = function useStagger() {
8
+ var staggerContextValue = React__default.useContext(StaggerContext);
9
+ return staggerContextValue;
10
+ };
11
+
12
+ export { StaggerContext, useStagger };
13
+ //# sourceMappingURL=StaggerProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StaggerProvider.js","sources":["../../../../../../src/components/Stagger/StaggerProvider.tsx"],"sourcesContent":["import React from 'react';\nimport type { BaseMotionBoxProps } from '~components/BaseMotion';\n\ntype StaggerContextType = {\n isInsideStaggerContainer: boolean;\n staggerType: BaseMotionBoxProps['type'];\n};\n\nconst StaggerContext = React.createContext<StaggerContextType>({\n isInsideStaggerContainer: false,\n staggerType: 'inout',\n});\n\nconst useStagger = (): StaggerContextType => {\n const staggerContextValue = React.useContext(StaggerContext);\n return staggerContextValue;\n};\n\nexport { useStagger, StaggerContext };\n"],"names":["StaggerContext","React","createContext","isInsideStaggerContainer","staggerType","useStagger","staggerContextValue","useContext"],"mappings":";;AAQA,IAAMA,cAAc,gBAAGC,cAAK,CAACC,aAAa,CAAqB;AAC7DC,EAAAA,wBAAwB,EAAE,KAAK;AAC/BC,EAAAA,WAAW,EAAE,OAAA;AACf,CAAC,EAAC;AAEF,IAAMC,UAAU,GAAG,SAAbA,UAAUA,GAA6B;AAC3C,EAAA,IAAMC,mBAAmB,GAAGL,cAAK,CAACM,UAAU,CAACP,cAAc,CAAC,CAAA;AAC5D,EAAA,OAAOM,mBAAmB,CAAA;AAC5B;;;;"}
@@ -62,7 +62,7 @@ var useChildrenWithIndexes = function useChildrenWithIndexes(_ref) {
62
62
  totalItemsInParentGroupCount: totalItemsInParentGroupCount
63
63
  };
64
64
  };
65
- var _StepGroup = function _StepGroup(_ref2) {
65
+ var _StepGroup = function _StepGroup(_ref2, ref) {
66
66
  var _ref2$size = _ref2.size,
67
67
  size = _ref2$size === void 0 ? 'medium' : _ref2$size,
68
68
  _ref2$orientation = _ref2.orientation,
@@ -96,7 +96,9 @@ var _StepGroup = function _StepGroup(_ref2) {
96
96
  var defaultWidth = isHorizontal ? '100%' : undefined;
97
97
  return /*#__PURE__*/jsx(StepGroupContext.Provider, {
98
98
  value: contextValue,
99
- children: /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, getStyledProps(rest)), {}, {
99
+ children: /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
100
+ ref: ref
101
+ }, getStyledProps(rest)), {}, {
100
102
  display: "inline-flex",
101
103
  maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : '100%',
102
104
  minWidth: minWidth,
@@ -131,7 +133,7 @@ var _StepGroup = function _StepGroup(_ref2) {
131
133
  *
132
134
  * Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}
133
135
  */
134
- var StepGroup = /*#__PURE__*/assignWithoutSideEffects(_StepGroup, {
136
+ var StepGroup = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__default.forwardRef(_StepGroup), {
135
137
  componentId: componentIds.StepGroup,
136
138
  displayName: componentIds.StepGroup
137
139
  });
@@ -1 +1 @@
1
- {"version":3,"file":"StepGroup.web.js","sources":["../../../../../../src/components/StepGroup/StepGroup.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { StepGroupContextType, StepGroupProps } from './types';\nimport { StepGroupContext, useStepGroup } from './StepGroupContext';\nimport { componentIds } from './componentIds';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst useChildrenWithIndexes = ({\n _nestingLevel,\n children,\n ...parentStepGroupProps\n}: Pick<StepGroupProps, 'children' | '_nestingLevel' | 'size' | 'orientation'>): {\n childrenWithIndex: React.ReactNode;\n totalItemsInParentGroupCount: number;\n} => {\n const { totalItemsInParentGroupCount: totalItemsFromPreviousParent } = useStepGroup();\n\n let totalIndex = 0;\n const traverseGroupAndAddIndex = (\n groupChildrenProp: StepGroupProps['children'],\n nestingLevelOfGroup = 0,\n ): React.ReactNode => {\n let stepItemIndex = 0;\n return React.Children.map(groupChildrenProp, (child, index) => {\n const componentId = getComponentId(child);\n if (componentId === componentIds.StepItem) {\n return React.cloneElement(child, {\n _index: stepItemIndex++,\n _totalIndex: totalIndex++,\n _nestingLevel: nestingLevelOfGroup,\n key: index,\n });\n }\n\n if (componentId === componentIds.StepGroup && nestingLevelOfGroup < 3) {\n return React.cloneElement(child, {\n ...parentStepGroupProps,\n children: traverseGroupAndAddIndex(child.props.children, nestingLevelOfGroup + 1),\n _nestingLevel: nestingLevelOfGroup + 1,\n });\n }\n\n return child;\n });\n };\n\n const childrenWithIndex: React.ReactNode = React.useMemo(\n () => (_nestingLevel === 0 ? traverseGroupAndAddIndex(children) : children),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [children, _nestingLevel],\n );\n\n const totalItemsInParentGroupCount =\n _nestingLevel === 0 ? totalIndex : totalItemsFromPreviousParent;\n\n return { childrenWithIndex, totalItemsInParentGroupCount };\n};\n\nconst _StepGroup = ({\n size = 'medium',\n orientation = 'vertical',\n children,\n testID,\n _nestingLevel = 0,\n width,\n minWidth,\n maxWidth,\n ...rest\n}: StepGroupProps): React.ReactElement => {\n const itemsInGroupCount = React.Children.count(children);\n const { childrenWithIndex, totalItemsInParentGroupCount } = useChildrenWithIndexes({\n children,\n size,\n orientation,\n _nestingLevel,\n });\n const contextValue = React.useMemo<StepGroupContextType>(\n () => ({\n size,\n orientation,\n itemsInGroupCount,\n totalItemsInParentGroupCount,\n }),\n [size, orientation, itemsInGroupCount, totalItemsInParentGroupCount],\n );\n\n const isHorizontal = orientation === 'horizontal';\n const defaultWidth = isHorizontal ? '100%' : undefined;\n\n return (\n <StepGroupContext.Provider value={contextValue}>\n <BaseBox\n {...getStyledProps(rest)}\n display=\"inline-flex\"\n maxWidth={maxWidth ?? '100%'}\n minWidth={minWidth}\n width={width ?? defaultWidth}\n padding={_nestingLevel === 0 ? 'spacing.4' : undefined}\n overflowX={orientation === 'horizontal' ? 'auto' : undefined}\n flexDirection={orientation === 'vertical' ? 'column' : 'row'}\n {...metaAttribute({ name: MetaConstants.StepGroup, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n {childrenWithIndex}\n </BaseBox>\n </StepGroupContext.Provider>\n );\n};\n\n/**\n * ## StepGroup\n *\n * Step Group visualises sequential processes with a consistent structure. It can be interactive, guiding users through steps, or function as a timeline for reference.\n *\n * ### Usage\n *\n * ```jsx\n * <StepGroup orientation=\"vertical\" size=\"medium\">\n * <StepItem title=\"Personal Details\" />\n * <StepItem title=\"Business Details\" />\n * </StepGroup>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}\n */\nconst StepGroup = assignWithoutSideEffects(_StepGroup, {\n componentId: componentIds.StepGroup,\n displayName: componentIds.StepGroup,\n});\n\nexport { StepGroup };\n"],"names":["useChildrenWithIndexes","_ref","_nestingLevel","children","parentStepGroupProps","_objectWithoutProperties","_excluded","_useStepGroup","useStepGroup","totalItemsFromPreviousParent","totalItemsInParentGroupCount","totalIndex","traverseGroupAndAddIndex","groupChildrenProp","nestingLevelOfGroup","arguments","length","undefined","stepItemIndex","React","Children","map","child","index","componentId","getComponentId","componentIds","StepItem","cloneElement","_index","_totalIndex","key","StepGroup","_objectSpread","props","childrenWithIndex","useMemo","_StepGroup","_ref2","_ref2$size","size","_ref2$orientation","orientation","testID","_ref2$_nestingLevel","width","minWidth","maxWidth","rest","_excluded2","itemsInGroupCount","count","_useChildrenWithIndex","contextValue","isHorizontal","defaultWidth","_jsx","StepGroupContext","Provider","value","BaseBox","getStyledProps","display","padding","overflowX","flexDirection","metaAttribute","name","MetaConstants","makeAnalyticsAttribute","assignWithoutSideEffects","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAMA,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAAAC,IAAA,EAOvB;AAAA,EAAA,IANHC,aAAa,GAAAD,IAAA,CAAbC,aAAa;IACbC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AACLC,IAAAA,oBAAoB,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA,CAAA,CAAA;AAKvB,EAAA,IAAAC,aAAA,GAAuEC,YAAY,EAAE;IAA/CC,4BAA4B,GAAAF,aAAA,CAA1DG,4BAA4B,CAAA;EAEpC,IAAIC,UAAU,GAAG,CAAC,CAAA;AAClB,EAAA,IAAMC,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAC5BC,iBAA6C,EAEzB;AAAA,IAAA,IADpBC,mBAAmB,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,C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GzB,SAAU;AAC7DgD,MAAAA,aAAa,EAAEvB,WAAW,KAAK,UAAU,GAAG,QAAQ,GAAG,KAAA;AAAM,KAAA,EACzDwB,aAAa,CAAC;MAAEC,IAAI,EAAEC,aAAa,CAACpC,SAAS;AAAEW,MAAAA,MAAM,EAANA,MAAAA;AAAO,KAAC,CAAC,CAAA,EACxD0B,sBAAsB,CAACrB,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAAA7C,MAAAA,QAAA,EAE/BgC,iBAAAA;KACM,CAAA,CAAA;AAAC,GACe,CAAC,CAAA;AAEhC,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMH,SAAS,gBAAGsC,wBAAwB,CAACjC,UAAU,EAAE;EACrDb,WAAW,EAAEE,YAAY,CAACM,SAAS;EACnCuC,WAAW,EAAE7C,YAAY,CAACM,SAAAA;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"StepGroup.web.js","sources":["../../../../../../src/components/StepGroup/StepGroup.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { StepGroupContextType, StepGroupProps } from './types';\nimport { StepGroupContext, useStepGroup } from './StepGroupContext';\nimport { componentIds } from './componentIds';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { BladeElementRef } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst useChildrenWithIndexes = ({\n _nestingLevel,\n children,\n ...parentStepGroupProps\n}: Pick<StepGroupProps, 'children' | '_nestingLevel' | 'size' | 'orientation'>): {\n childrenWithIndex: React.ReactNode;\n totalItemsInParentGroupCount: number;\n} => {\n const { totalItemsInParentGroupCount: totalItemsFromPreviousParent } = useStepGroup();\n\n let totalIndex = 0;\n const traverseGroupAndAddIndex = (\n groupChildrenProp: StepGroupProps['children'],\n nestingLevelOfGroup = 0,\n ): React.ReactNode => {\n let stepItemIndex = 0;\n return React.Children.map(groupChildrenProp, (child, index) => {\n const componentId = getComponentId(child);\n if (componentId === componentIds.StepItem) {\n return React.cloneElement(child, {\n _index: stepItemIndex++,\n _totalIndex: totalIndex++,\n _nestingLevel: nestingLevelOfGroup,\n key: index,\n });\n }\n\n if (componentId === componentIds.StepGroup && nestingLevelOfGroup < 3) {\n return React.cloneElement(child, {\n ...parentStepGroupProps,\n children: traverseGroupAndAddIndex(child.props.children, nestingLevelOfGroup + 1),\n _nestingLevel: nestingLevelOfGroup + 1,\n });\n }\n\n return child;\n });\n };\n\n const childrenWithIndex: React.ReactNode = React.useMemo(\n () => (_nestingLevel === 0 ? traverseGroupAndAddIndex(children) : children),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [children, _nestingLevel],\n );\n\n const totalItemsInParentGroupCount =\n _nestingLevel === 0 ? totalIndex : totalItemsFromPreviousParent;\n\n return { childrenWithIndex, totalItemsInParentGroupCount };\n};\n\nconst _StepGroup = (\n {\n size = 'medium',\n orientation = 'vertical',\n children,\n testID,\n _nestingLevel = 0,\n width,\n minWidth,\n maxWidth,\n ...rest\n }: StepGroupProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const itemsInGroupCount = React.Children.count(children);\n const { childrenWithIndex, totalItemsInParentGroupCount } = useChildrenWithIndexes({\n children,\n size,\n orientation,\n _nestingLevel,\n });\n const contextValue = React.useMemo<StepGroupContextType>(\n () => ({\n size,\n orientation,\n itemsInGroupCount,\n totalItemsInParentGroupCount,\n }),\n [size, orientation, itemsInGroupCount, totalItemsInParentGroupCount],\n );\n\n const isHorizontal = orientation === 'horizontal';\n const defaultWidth = isHorizontal ? '100%' : undefined;\n\n return (\n <StepGroupContext.Provider value={contextValue}>\n <BaseBox\n ref={ref as never}\n {...getStyledProps(rest)}\n display=\"inline-flex\"\n maxWidth={maxWidth ?? '100%'}\n minWidth={minWidth}\n width={width ?? defaultWidth}\n padding={_nestingLevel === 0 ? 'spacing.4' : undefined}\n overflowX={orientation === 'horizontal' ? 'auto' : undefined}\n flexDirection={orientation === 'vertical' ? 'column' : 'row'}\n {...metaAttribute({ name: MetaConstants.StepGroup, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n {childrenWithIndex}\n </BaseBox>\n </StepGroupContext.Provider>\n );\n};\n\n/**\n * ## StepGroup\n *\n * Step Group visualises sequential processes with a consistent structure. It can be interactive, guiding users through steps, or function as a timeline for reference.\n *\n * ### Usage\n *\n * ```jsx\n * <StepGroup orientation=\"vertical\" size=\"medium\">\n * <StepItem title=\"Personal Details\" />\n * <StepItem title=\"Business Details\" />\n * </StepGroup>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}\n */\nconst StepGroup = assignWithoutSideEffects(React.forwardRef(_StepGroup), {\n componentId: componentIds.StepGroup,\n displayName: componentIds.StepGroup,\n});\n\nexport { StepGroup };\n"],"names":["useChildrenWithIndexes","_ref","_nestingLevel","children","parentStepGroupProps","_objectWithoutProperties","_excluded","_useStepGroup","useStepGroup","totalItemsFromPreviousParent","totalItemsInParentGroupCount","totalIndex","traverseGroupAndAddIndex","groupChildrenProp","nestingLevelOfGroup","arguments","length","undefined","stepItemIndex","React","Children","map","child","index","componentId","getComponentId","componentIds","StepItem","cloneElement","_index","_totalIndex","key","StepGroup","_objectSpread","props","childrenWithIndex","useMemo","_StepGroup","_ref2","ref","_ref2$size","size","_ref2$orientation","orientation","testID","_ref2$_nestingLevel","width","minWidth","maxWidth","rest","_excluded2","itemsInGroupCount","count","_useChildrenWithIndex","contextValue","isHorizontal","defaultWidth","_jsx","StepGroupContext","Provider","value","BaseBox","getStyledProps","display","padding","overflowX","flexDirection","metaAttribute","name","MetaConstants","makeAnalyticsAttribute","assignWithoutSideEffects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W,EAAE/C,YAAY,CAACM,SAAAA;AAC5B,CAAC;;;;"}
@@ -48,7 +48,7 @@ var InteractiveItemHeaderBox = /*#__PURE__*/styled.button.withConfig({
48
48
  backgroundColor: props.isSelected ? props.theme.colors.interactive.background.primary.faded : props.theme.colors.transparent,
49
49
  borderRadius: props.theme.border.radius.medium,
50
50
  width: '100%',
51
- transition: "background-color ".concat(props.theme.motion.duration.xquick, " ").concat(props.theme.motion.easing.standard.effective),
51
+ transition: "background-color ".concat(props.theme.motion.duration.xquick, " ").concat(props.theme.motion.easing.standard),
52
52
  ':not([disabled]):hover': {
53
53
  backgroundColor: props.isSelected ? props.theme.colors.interactive.background.primary.fadedHighlighted : props.theme.colors.interactive.background.gray.fadedHighlighted
54
54
  },
@@ -1 +1 @@
1
- {"version":3,"file":"StepItem.web.js","sources":["../../../../../../src/components/StepGroup/StepItem.web.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { StepLine } from './StepLine';\nimport type { StepLineProps } from './StepLine';\nimport { useStepGroup } from './StepGroupContext';\nimport type {\n InteractiveItemHeaderProps,\n StepGroupContextType,\n StepGroupProps,\n StepItemProps,\n} from './types';\nimport { componentIds } from './componentIds';\nimport { itemLineGap, stepItemHeaderTokens } from './tokens';\nimport { Box } from '~components/Box';\nimport { Text } from '~components/Typography';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport BaseBox from '~components/Box/BaseBox';\nimport { makeSize, makeSpace } from '~utils';\nimport { size as sizeTokens } from '~tokens/global';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { throwBladeError } from '~utils/logger';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype GetStepTypeFromIndexProps = {\n _index: StepItemProps['_index'];\n _nestingLevel: StepGroupProps['_nestingLevel'];\n itemsCount: StepGroupContextType['itemsInGroupCount'];\n};\n\nconst InteractiveItemHeaderBox = styled.button<InteractiveItemHeaderProps>((props) => {\n return {\n padding: `${makeSpace(getIn(props.theme, props.paddingY))} ${makeSpace(\n getIn(props.theme, props.paddingX),\n )}`,\n cursor: 'pointer',\n display: 'inline-block',\n textDecoration: 'none',\n border: 'none',\n textAlign: 'inherit',\n backgroundColor: props.isSelected\n ? props.theme.colors.interactive.background.primary.faded\n : props.theme.colors.transparent,\n borderRadius: props.theme.border.radius.medium,\n width: '100%',\n transition: `background-color ${props.theme.motion.duration.xquick} ${props.theme.motion.easing.standard.effective}`,\n ':not([disabled]):hover': {\n backgroundColor: props.isSelected\n ? props.theme.colors.interactive.background.primary.fadedHighlighted\n : props.theme.colors.interactive.background.gray.fadedHighlighted,\n },\n ':not([disabled]):focus-visible': {\n ...getFocusRingStyles({ theme: props.theme }),\n },\n '&[disabled]': {\n cursor: 'not-allowed',\n },\n };\n});\n\nconst getStepTypeFromIndex = ({\n _index,\n _nestingLevel,\n itemsCount,\n}: GetStepTypeFromIndexProps): StepLineProps['stepType'] => {\n if (_nestingLevel === 0) {\n return 'default';\n }\n\n if (itemsCount === 1) {\n return 'single-item';\n }\n\n if (_index === 0) {\n return 'start';\n }\n\n if (_index === itemsCount - 1) {\n return 'end';\n }\n\n return 'middle';\n};\n\nconst _StepItem = ({\n title,\n titleColor,\n timestamp,\n description,\n stepProgress = 'none',\n marker,\n trailing,\n isSelected,\n isDisabled,\n href,\n target,\n onClick,\n children,\n _index = 0,\n _totalIndex = 0,\n _nestingLevel = 0,\n ...rest\n}: StepItemProps): React.ReactElement => {\n const {\n itemsInGroupCount: itemsCount,\n totalItemsInParentGroupCount,\n orientation,\n size,\n } = useStepGroup();\n const stepType = React.useMemo(\n () => getStepTypeFromIndex({ _index, _nestingLevel, itemsCount }),\n [_index, _nestingLevel, itemsCount],\n );\n\n const itemRef = React.useRef<HTMLDivElement>(null);\n\n const isFirstItem = _totalIndex === 0;\n const isLastItem = _totalIndex === totalItemsInParentGroupCount - 1;\n const isInteractive = Boolean(href) || Boolean(onClick);\n const isVertical = orientation === 'vertical';\n const isNested = _nestingLevel > 0;\n\n if (__DEV__) {\n if (trailing && orientation === 'horizontal') {\n throwBladeError({\n message: 'trailing is not allowed in horizontal StepGroup',\n moduleName: 'StepItem',\n });\n }\n\n if (_nestingLevel >= 1 && orientation === 'horizontal') {\n throwBladeError({\n message: 'Nested StepGroup components are not allowed in horizontal orientation',\n moduleName: 'StepItem',\n });\n }\n }\n\n const stepItemHeaderJSX = (\n <Box display=\"flex\" flexDirection=\"row\" justifyContent=\"space-between\" gap=\"spacing.4\">\n <Box>\n <Text\n size={stepItemHeaderTokens[size].title}\n color={\n isDisabled ? 'surface.text.gray.disabled' : titleColor ?? 'surface.text.gray.subtle'\n }\n weight={isNested ? 'regular' : 'semibold'}\n >\n {title}\n </Text>\n <Text\n size={stepItemHeaderTokens[size].timestamp}\n marginY=\"spacing.2\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.muted'}\n variant=\"caption\"\n >\n {timestamp}\n </Text>\n <Text\n size={stepItemHeaderTokens[size].description}\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.muted'}\n >\n {description}\n </Text>\n </Box>\n <Box>{trailing}</Box>\n </Box>\n );\n\n const stepItemHeaderPaddings: Omit<InteractiveItemHeaderProps, 'isSelected'> = {\n paddingY: 'spacing.3',\n paddingX: 'spacing.4',\n } as const;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={isVertical ? 'row' : 'column'}\n gap={itemLineGap[size]}\n className={`step-item step-index-${_index} step-nesting-level-${_nestingLevel}`}\n textAlign={isVertical ? 'left' : 'center'}\n alignItems={isVertical ? undefined : 'center'}\n minWidth={isVertical ? undefined : `min(${makeSize(sizeTokens['120'])}, 100%)`}\n width={isVertical ? '100%' : undefined}\n flex={isVertical ? undefined : '1'}\n {...metaAttribute({ name: MetaConstants.StepItem })}\n {...makeAnalyticsAttribute(rest)}\n ref={itemRef}\n >\n <StepLine\n shouldShowStartBranch={!isFirstItem}\n shouldShowEndBranch={!isLastItem}\n stepType={stepType}\n marker={marker}\n stepProgress={stepProgress}\n />\n <Box flex=\"1\" marginRight={isVertical ? undefined : undefined}>\n {isInteractive ? (\n <InteractiveItemHeaderBox\n {...stepItemHeaderPaddings}\n as={href ? 'a' : 'button'}\n href={href}\n target={target}\n isSelected={isSelected}\n onClick={onClick}\n disabled={isDisabled}\n >\n {stepItemHeaderJSX}\n </InteractiveItemHeaderBox>\n ) : (\n <Box {...stepItemHeaderPaddings}>{stepItemHeaderJSX}</Box>\n )}\n {children ? (\n <Box paddingX=\"spacing.4\" paddingBottom=\"spacing.3\">\n {children}\n </Box>\n ) : null}\n </Box>\n </BaseBox>\n );\n};\n\n/**\n * ## StepItem\n *\n * Component meant to be used inside the StepGroup parent component\n *\n * ### Usage\n *\n * ```jsx\n * <StepGroup orientation=\"vertical\" size=\"medium\">\n * <StepItem\n * title=\"Personal Details\"\n * timestamp=\"Thu 15th Oct'23 | 12:00pm\"\n * description=\"Fill your personal details here\"\n * marker={<StepItemIndicator color=\"negative\" />}\n * />\n * </StepGroup>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}\n */\nconst StepItem = assignWithoutSideEffects(_StepItem, {\n componentId: componentIds.StepItem,\n displayName: componentIds.StepItem,\n});\n\nexport { StepLine, StepItem };\n"],"names":["InteractiveItemHeaderBox","styled","button","withConfig","displayName","componentId","props","padding","concat","makeSpace","getIn","theme","paddingY","paddingX","cursor","display","textDecoration","border","textAlign","backgroundColor","isSelected","colors","interactive","background","primary","faded","transparent","borderRadius","radius","medium","width","transition","motion","duration","xquick","easing","standard","effective","fadedHighlighted","gray","_objectSpread","getFocusRingStyles","getStepTypeFromIndex","_ref","_index","_nestingLevel","itemsCount","_StepItem","_ref2","title","titleColor","timestamp","description","_ref2$stepProgress","stepProgress","marker","trailing","isDisabled","href","target","onClick","children","_ref2$_index","_ref2$_totalIndex","_totalIndex","_ref2$_nestingLevel","rest","_objectWithoutProperties","_excluded","_useStepGroup","useStepGroup","itemsInGroupCount","totalItemsInParentGroupCount","orientation","size","stepType","React","useMemo","itemRef","useRef","isFirstItem","isLastItem","isInteractive","Boolean","isVertical","isNested","throwBladeError","message","moduleName","stepItemHeaderJSX","_jsxs","Box","flexDirection","justifyContent","gap","_jsx","Text","stepItemHeaderTokens","color","weight","marginY","variant","stepItemHeaderPaddings","BaseBox","itemLineGap","className","alignItems","undefined","minWidth","makeSize","sizeTokens","flex","metaAttribute","name","MetaConstants","StepItem","makeAnalyticsAttribute","ref","StepLine","shouldShowStartBranch","shouldShowEndBranch","marginRight","as","disabled","paddingBottom","assignWithoutSideEffects","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAMA,wBAAwB,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,uCAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAA6B,CAAA,CAAA,UAACC,KAAK,EAAK;EACpF,OAAO;AACLC,IAAAA,OAAO,EAAAC,EAAAA,CAAAA,MAAA,CAAKC,SAAS,CAACC,KAAK,CAACJ,KAAK,CAACK,KAAK,EAAEL,KAAK,CAACM,QAAQ,CAAC,CAAC,EAAAJ,GAAAA,CAAAA,CAAAA,MAAA,CAAIC,SAAS,CACpEC,KAAK,CAACJ,KAAK,CAACK,KAAK,EAAEL,KAAK,CAACO,QAAQ,CACnC,CAAC,CAAE;AACHC,IAAAA,MAAM,EAAE,SAAS;AACjBC,IAAAA,OAAO,EAAE,cAAc;AACvBC,IAAAA,cAAc,EAAE,MAAM;AACtBC,IAAAA,MAAM,EAAE,MAAM;AACdC,IAAAA,SAAS,EAAE,SAAS;IACpBC,eAAe,EAAEb,KAAK,CAACc,UAAU,GAC7Bd,KAAK,CAACK,KAAK,CAACU,MAAM,CAACC,WAAW,CAACC,UAAU,CAACC,OAAO,CAAC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GAAA,CACC,CAAC,CAAA;AAEd,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,IAAMsD,QAAQ,gBAAGU,wBAAwB,CAAC9E,SAAS,EAAE;EACnD1C,WAAW,EAAEyH,YAAY,CAACX,QAAQ;EAClC/G,WAAW,EAAE0H,YAAY,CAACX,QAAAA;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"StepItem.web.js","sources":["../../../../../../src/components/StepGroup/StepItem.web.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { StepLine } from './StepLine';\nimport type { StepLineProps } from './StepLine';\nimport { useStepGroup } from './StepGroupContext';\nimport type {\n InteractiveItemHeaderProps,\n StepGroupContextType,\n StepGroupProps,\n StepItemProps,\n} from './types';\nimport { componentIds } from './componentIds';\nimport { itemLineGap, stepItemHeaderTokens } from './tokens';\nimport { Box } from '~components/Box';\nimport { Text } from '~components/Typography';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport BaseBox from '~components/Box/BaseBox';\nimport { makeSize, makeSpace } from '~utils';\nimport { size as sizeTokens } from '~tokens/global';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { throwBladeError } from '~utils/logger';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype GetStepTypeFromIndexProps = {\n _index: StepItemProps['_index'];\n _nestingLevel: StepGroupProps['_nestingLevel'];\n itemsCount: StepGroupContextType['itemsInGroupCount'];\n};\n\nconst InteractiveItemHeaderBox = styled.button<InteractiveItemHeaderProps>((props) => {\n return {\n padding: `${makeSpace(getIn(props.theme, props.paddingY))} ${makeSpace(\n getIn(props.theme, props.paddingX),\n )}`,\n cursor: 'pointer',\n display: 'inline-block',\n textDecoration: 'none',\n border: 'none',\n textAlign: 'inherit',\n backgroundColor: props.isSelected\n ? props.theme.colors.interactive.background.primary.faded\n : props.theme.colors.transparent,\n borderRadius: props.theme.border.radius.medium,\n width: '100%',\n transition: `background-color ${props.theme.motion.duration.xquick} ${props.theme.motion.easing.standard}`,\n ':not([disabled]):hover': {\n backgroundColor: props.isSelected\n ? props.theme.colors.interactive.background.primary.fadedHighlighted\n : props.theme.colors.interactive.background.gray.fadedHighlighted,\n },\n ':not([disabled]):focus-visible': {\n ...getFocusRingStyles({ theme: props.theme }),\n },\n '&[disabled]': {\n cursor: 'not-allowed',\n },\n };\n});\n\nconst getStepTypeFromIndex = ({\n _index,\n _nestingLevel,\n itemsCount,\n}: GetStepTypeFromIndexProps): StepLineProps['stepType'] => {\n if (_nestingLevel === 0) {\n return 'default';\n }\n\n if (itemsCount === 1) {\n return 'single-item';\n }\n\n if (_index === 0) {\n return 'start';\n }\n\n if (_index === itemsCount - 1) {\n return 'end';\n }\n\n return 'middle';\n};\n\nconst _StepItem = ({\n title,\n titleColor,\n timestamp,\n description,\n stepProgress = 'none',\n marker,\n trailing,\n isSelected,\n isDisabled,\n href,\n target,\n onClick,\n children,\n _index = 0,\n _totalIndex = 0,\n _nestingLevel = 0,\n ...rest\n}: StepItemProps): React.ReactElement => {\n const {\n itemsInGroupCount: itemsCount,\n totalItemsInParentGroupCount,\n orientation,\n size,\n } = useStepGroup();\n const stepType = React.useMemo(\n () => getStepTypeFromIndex({ _index, _nestingLevel, itemsCount }),\n [_index, _nestingLevel, itemsCount],\n );\n\n const itemRef = React.useRef<HTMLDivElement>(null);\n\n const isFirstItem = _totalIndex === 0;\n const isLastItem = _totalIndex === totalItemsInParentGroupCount - 1;\n const isInteractive = Boolean(href) || Boolean(onClick);\n const isVertical = orientation === 'vertical';\n const isNested = _nestingLevel > 0;\n\n if (__DEV__) {\n if (trailing && orientation === 'horizontal') {\n throwBladeError({\n message: 'trailing is not allowed in horizontal StepGroup',\n moduleName: 'StepItem',\n });\n }\n\n if (_nestingLevel >= 1 && orientation === 'horizontal') {\n throwBladeError({\n message: 'Nested StepGroup components are not allowed in horizontal orientation',\n moduleName: 'StepItem',\n });\n }\n }\n\n const stepItemHeaderJSX = (\n <Box display=\"flex\" flexDirection=\"row\" justifyContent=\"space-between\" gap=\"spacing.4\">\n <Box>\n <Text\n size={stepItemHeaderTokens[size].title}\n color={\n isDisabled ? 'surface.text.gray.disabled' : titleColor ?? 'surface.text.gray.subtle'\n }\n weight={isNested ? 'regular' : 'semibold'}\n >\n {title}\n </Text>\n <Text\n size={stepItemHeaderTokens[size].timestamp}\n marginY=\"spacing.2\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.muted'}\n variant=\"caption\"\n >\n {timestamp}\n </Text>\n <Text\n size={stepItemHeaderTokens[size].description}\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.muted'}\n >\n {description}\n </Text>\n </Box>\n <Box>{trailing}</Box>\n </Box>\n );\n\n const stepItemHeaderPaddings: Omit<InteractiveItemHeaderProps, 'isSelected'> = {\n paddingY: 'spacing.3',\n paddingX: 'spacing.4',\n } as const;\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection={isVertical ? 'row' : 'column'}\n gap={itemLineGap[size]}\n className={`step-item step-index-${_index} step-nesting-level-${_nestingLevel}`}\n textAlign={isVertical ? 'left' : 'center'}\n alignItems={isVertical ? undefined : 'center'}\n minWidth={isVertical ? undefined : `min(${makeSize(sizeTokens['120'])}, 100%)`}\n width={isVertical ? '100%' : undefined}\n flex={isVertical ? undefined : '1'}\n {...metaAttribute({ name: MetaConstants.StepItem })}\n {...makeAnalyticsAttribute(rest)}\n ref={itemRef}\n >\n <StepLine\n shouldShowStartBranch={!isFirstItem}\n shouldShowEndBranch={!isLastItem}\n stepType={stepType}\n marker={marker}\n stepProgress={stepProgress}\n />\n <Box flex=\"1\" marginRight={isVertical ? undefined : undefined}>\n {isInteractive ? (\n <InteractiveItemHeaderBox\n {...stepItemHeaderPaddings}\n as={href ? 'a' : 'button'}\n href={href}\n target={target}\n isSelected={isSelected}\n onClick={onClick}\n disabled={isDisabled}\n >\n {stepItemHeaderJSX}\n </InteractiveItemHeaderBox>\n ) : (\n <Box {...stepItemHeaderPaddings}>{stepItemHeaderJSX}</Box>\n )}\n {children ? (\n <Box paddingX=\"spacing.4\" paddingBottom=\"spacing.3\">\n {children}\n </Box>\n ) : null}\n </Box>\n </BaseBox>\n );\n};\n\n/**\n * ## StepItem\n *\n * Component meant to be used inside the StepGroup parent component\n *\n * ### Usage\n *\n * ```jsx\n * <StepGroup orientation=\"vertical\" size=\"medium\">\n * <StepItem\n * title=\"Personal Details\"\n * timestamp=\"Thu 15th Oct'23 | 12:00pm\"\n * description=\"Fill your personal details here\"\n * marker={<StepItemIndicator color=\"negative\" />}\n * />\n * </StepGroup>\n * ```\n *\n * ---\n *\n * Checkout {@link https://blade.razorpay.com/?path=/docs/components-stepgroup--docs StepGroup Documentation}\n */\nconst StepItem = assignWithoutSideEffects(_StepItem, {\n componentId: componentIds.StepItem,\n displayName: componentIds.StepItem,\n});\n\nexport { StepLine, StepItem };\n"],"names":["InteractiveItemHeaderBox","styled","button","withConfig","displayName","componentId","props","padding","concat","makeSpace","getIn","theme","paddingY","paddingX","cursor","display","textDecoration","border","textAlign","backgroundColor","isSelected","colors","interactive","background","primary","faded","transparent","borderRadius","radius","medium","width","transition","motion","duration","xquick","easing","standard","fadedHighlighted","gray","_objectSpread","getFocusRingStyles","getStepTypeFromIndex","_ref","_index","_nestingLevel","itemsCount","_StepItem","_ref2","title","titleColor","timestamp","description","_ref2$stepProgress","stepProgress","marker","trailing","isDisabled","href","target","onClick","children","_ref2$_index","_ref2$_totalIndex","_totalIndex","_ref2$_nestingLevel","rest","_objectWithoutProperties","_excluded","_useStepGroup","useStepGroup","itemsInGroupCount","totalItemsInParentGroupCount","orientation","size","stepType","React","useMemo","itemRef","useRef","isFirstItem","isLastItem","isInteractive","Boolean","isVertical","isNested","throwBladeError","message","moduleName","stepItemHeaderJSX","_jsxs","Box","flexDirection","justifyContent","gap","_jsx","Text","stepItemHeaderTokens","color","weight","marginY","variant","stepItemHeaderPaddings","BaseBox","itemLineGap","className","alignItems","undefined","minWidth","makeSize","sizeTokens","flex","metaAttribute","name","MetaConstants","StepItem","makeAnalyticsAttribute","ref","StepLine","shouldShowStartBranch","shouldShowEndBranch","marginRight","as","disabled","paddingBottom","assignWithoutSideEffects","componentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,IAAMA,wBAAwB,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,uCAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAA6B,CAAA,CAAA,UAACC,KAAK,EAAK;EACpF,OAAO;AACLC,IAAAA,OAAO,EAAAC,EAAAA,CAAAA,MAAA,CAAKC,SAAS,CAACC,KAAK,CAACJ,KAAK,CAACK,KAAK,EAAEL,KAAK,CAACM,QAAQ,CAAC,CAAC,EAAAJ,GAAAA,CAAAA,CAAAA,MAAA,CAAIC,SAAS,CACpEC,KAAK,CAACJ,KAAK,CAACK,KAAK,EAAEL,KAAK,CAACO,QAAQ,CACnC,CAAC,CAAE;AACHC,IAAAA,MAAM,EAAE,SAAS;AACjBC,IAAAA,OAAO,EAAE,cAAc;AACvBC,IAAAA,cAAc,EAAE,MAAM;AACtBC,IAAAA,MAAM,EAAE,MAAM;AACdC,IAAAA,SAAS,EAAE,SAAS;IACpBC,eAAe,EAAEb,KAAK,CAACc,UAAU,GAC7Bd,KAAK,CAACK,KAAK,CAACU,MAAM,CAACC,WAAW,CAACC,UAAU,CAACC,OAAO,CAACC,KAAK,GACvDnB,KAAK,CAACK,KAAK,CAACU,MAAM,CAACK,WAAW;IAClCC,YAAY,EAAErB,KAAK,CAACK,KAAK,CAACM,MAAM,CAACW,MAAM,CAACC,MAAM;AAC9CC,IAAAA,KAAK,EAAE,MAAM;IACbC,UAA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ACnDzC,WAAW,EAAEwH,YAAY,CAACX,QAAQ;EAClC9G,WAAW,EAAEyH,YAAY,CAACX,QAAAA;AAC5B,CAAC;;;;"}
@@ -17,7 +17,7 @@ var AnimatedThumbIcon = /*#__PURE__*/styled(Svg).withConfig({
17
17
  return {
18
18
  transitionDuration: "".concat(makeMotionTime(duration)),
19
19
  transitionTimingFunction: easing,
20
- transitionDelay: isChecked ? "".concat(makeMotionTime(theme.motion.delay['2xshort'])) : "0ms",
20
+ transitionDelay: isChecked ? "".concat(makeMotionTime(theme.motion.delay['2xquick'])) : "0ms",
21
21
  opacity: isChecked ? 1 : 0
22
22
  };
23
23
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AnimatedThumbIcon.web.js","sources":["../../../../../../src/components/Switch/AnimatedThumbIcon.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { switchMotion } from './switchTokens';\nimport getIn from '~utils/lodashButBetter/get';\nimport Svg from '~components/Icons/_Svg';\nimport { makeMotionTime } from '~utils/makeMotionTime';\n\nconst AnimatedThumbIcon = styled(Svg)<{ isChecked?: boolean }>(({ isChecked, theme }) => {\n const easing = getIn(theme, switchMotion.easing.thumbIcon);\n const duration = getIn(theme, switchMotion.duration.thumbIcon);\n\n return {\n transitionDuration: `${makeMotionTime(duration)}`,\n transitionTimingFunction: easing,\n transitionDelay: isChecked ? `${makeMotionTime(theme.motion.delay['2xshort'])}` : `0ms`,\n opacity: isChecked ? 1 : 0,\n };\n});\n\nexport { AnimatedThumbIcon };\n"],"names":["AnimatedThumbIcon","styled","Svg","withConfig","displayName","componentId","_ref","isChecked","theme","easing","getIn","switchMotion","thumbIcon","duration","transitionDuration","concat","makeMotionTime","transitionTimingFunction","transitionDelay","motion","delay","opacity"],"mappings":";;;;;;;;AAMA,IAAMA,iBAAiB,gBAAGC,MAAM,CAACC,GAAG,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,yCAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAA0B,CAAA,CAAA,UAAAC,IAAA,EAA0B;AAAA,EAAA,IAAvBC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK,CAAA;EAChF,IAAMC,MAAM,GAAGC,KAAK,CAACF,KAAK,EAAEG,YAAY,CAACF,MAAM,CAACG,SAAS,CAAC,CAAA;EAC1D,IAAMC,QAAQ,GAAGH,KAAK,CAACF,KAAK,EAAEG,YAAY,CAACE,QAAQ,CAACD,SAAS,CAAC,CAAA;EAE9D,OAAO;AACLE,IAAAA,kBAAkB,KAAAC,MAAA,CAAKC,cAAc,CAACH,QAAQ,CAAC,CAAE;AACjDI,IAAAA,wBAAwB,EAAER,MAAM;AAChCS,IAAAA,eAAe,EAAEX,SAAS,GAAA,EAAA,CAAAQ,MAAA,CAAMC,cAAc,CAACR,KAAK,CAACW,MAAM,CAACC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAU,GAAA,KAAA;AACvFC,IAAAA,OAAO,EAAEd,SAAS,GAAG,CAAC,GAAG,CAAA;GAC1B,CAAA;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"AnimatedThumbIcon.web.js","sources":["../../../../../../src/components/Switch/AnimatedThumbIcon.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { switchMotion } from './switchTokens';\nimport getIn from '~utils/lodashButBetter/get';\nimport Svg from '~components/Icons/_Svg';\nimport { makeMotionTime } from '~utils/makeMotionTime';\n\nconst AnimatedThumbIcon = styled(Svg)<{ isChecked?: boolean }>(({ isChecked, theme }) => {\n const easing = getIn(theme, switchMotion.easing.thumbIcon);\n const duration = getIn(theme, switchMotion.duration.thumbIcon);\n\n return {\n transitionDuration: `${makeMotionTime(duration)}`,\n transitionTimingFunction: easing,\n transitionDelay: isChecked ? `${makeMotionTime(theme.motion.delay['2xquick'])}` : `0ms`,\n opacity: isChecked ? 1 : 0,\n };\n});\n\nexport { AnimatedThumbIcon };\n"],"names":["AnimatedThumbIcon","styled","Svg","withConfig","displayName","componentId","_ref","isChecked","theme","easing","getIn","switchMotion","thumbIcon","duration","transitionDuration","concat","makeMotionTime","transitionTimingFunction","transitionDelay","motion","delay","opacity"],"mappings":";;;;;;;;AAMA,IAAMA,iBAAiB,gBAAGC,MAAM,CAACC,GAAG,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,yCAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAA0B,CAAA,CAAA,UAAAC,IAAA,EAA0B;AAAA,EAAA,IAAvBC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK,CAAA;EAChF,IAAMC,MAAM,GAAGC,KAAK,CAACF,KAAK,EAAEG,YAAY,CAACF,MAAM,CAACG,SAAS,CAAC,CAAA;EAC1D,IAAMC,QAAQ,GAAGH,KAAK,CAACF,KAAK,EAAEG,YAAY,CAACE,QAAQ,CAACD,SAAS,CAAC,CAAA;EAE9D,OAAO;AACLE,IAAAA,kBAAkB,KAAAC,MAAA,CAAKC,cAAc,CAACH,QAAQ,CAAC,CAAE;AACjDI,IAAAA,wBAAwB,EAAER,MAAM;AAChCS,IAAAA,eAAe,EAAEX,SAAS,GAAA,EAAA,CAAAQ,MAAA,CAAMC,cAAc,CAACR,KAAK,CAACW,MAAM,CAACC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAU,GAAA,KAAA;AACvFC,IAAAA,OAAO,EAAEd,SAAS,GAAG,CAAC,GAAG,CAAA;GAC1B,CAAA;AACH,CAAC;;;;"}