@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
@@ -46,7 +46,7 @@ var ModalContent = /*#__PURE__*/styled(BaseBox).withConfig({
46
46
  })(function (_ref) {
47
47
  var isVisible = _ref.isVisible,
48
48
  theme = _ref.theme;
49
- return css(["box-shadow:", ";position:fixed;transform:translate(-50%,-50%);opacity:", ";animation:", " ", " ", ";"], theme.elevation.highRaised, isVisible ? 1 : 0, isVisible ? entry : exit, castWebType(makeMotionTime(theme.motion.duration.xmoderate)), isVisible ? castWebType(theme.motion.easing.entrance.revealing) : castWebType(theme.motion.easing.exit.revealing));
49
+ return css(["box-shadow:", ";position:fixed;transform:translate(-50%,-50%);opacity:", ";animation:", " ", " ", ";"], theme.elevation.highRaised, isVisible ? 1 : 0, isVisible ? entry : exit, castWebType(makeMotionTime(theme.motion.duration.moderate)), isVisible ? castWebType(theme.motion.easing.entrance) : castWebType(theme.motion.easing.exit));
50
50
  });
51
51
  var Modal = function Modal(_ref2) {
52
52
  var _ref2$isOpen = _ref2.isOpen,
@@ -64,7 +64,7 @@ var Modal = function Modal(_ref2) {
64
64
  theme = _useTheme.theme,
65
65
  platform = _useTheme.platform;
66
66
  var _usePresence = usePresence(isOpen, {
67
- transitionDuration: theme.motion.duration.xmoderate,
67
+ transitionDuration: theme.motion.duration.moderate,
68
68
  initialEnter: true
69
69
  }),
70
70
  isMounted = _usePresence.isMounted,
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.web.js","sources":["../../../../../../src/components/Modal/Modal.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useEffect } from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nimport { FloatingFocusManager, FloatingPortal, useFloating } from '@floating-ui/react';\nimport usePresence from 'use-presence';\nimport { ModalHeader } from './ModalHeader';\nimport type { ModalHeaderProps } from './ModalHeader';\nimport { ModalFooter } from './ModalFooter';\nimport type { ModalFooterProps } from './ModalFooter';\nimport { ModalBody } from './ModalBody';\nimport type { ModalBodyProps } from './ModalBody';\nimport { ModalContext } from './ModalContext';\nimport { ModalBackdrop } from './ModalBackdrop';\nimport {\n modalBorderRadius,\n modalMaxHeight,\n modalMaxWidth,\n modalMinWidth,\n modalResponsiveScreenGap,\n} from './modalTokens';\nimport type { ModalProps } from './types';\nimport { componentIds } from './constants';\nimport { castWebType, makeMotionTime, makeSize } from '~utils';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { Box } from '~components/Box';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { logger } from '~utils/logger';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { useVerifyAllowedChildren } from '~utils/useVerifyAllowedChildren';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst entry = keyframes`\n from {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.9) translateY(20px);\n }\n to {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1) translateY(0px);\n }\n`;\n\nconst exit = keyframes`\n from {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1) translateY(0px);\n }\n to {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.9) translateY(20px);\n }\n`;\n\nconst ModalContent = styled(BaseBox)<{ isVisible: boolean }>(({ isVisible, theme }) => {\n return css`\n box-shadow: ${theme.elevation.highRaised};\n position: fixed;\n transform: translate(-50%, -50%);\n opacity: ${isVisible ? 1 : 0};\n animation: ${isVisible ? entry : exit}\n ${castWebType(makeMotionTime(theme.motion.duration.xmoderate))}\n ${isVisible\n ? castWebType(theme.motion.easing.entrance.revealing)\n : castWebType(theme.motion.easing.exit.revealing)};\n `;\n});\n\nconst Modal = ({\n isOpen = false,\n children,\n onDismiss,\n initialFocusRef,\n size = 'small',\n accessibilityLabel,\n zIndex = componentZIndices.modal,\n ...rest\n}: ModalProps): React.ReactElement => {\n const { theme, platform } = useTheme();\n const { isMounted, isVisible } = usePresence(isOpen, {\n transitionDuration: theme.motion.duration.xmoderate,\n initialEnter: true,\n });\n\n // Warn consumer if modal is opened on mobile\n useEffect(() => {\n if (__DEV__) {\n if (platform === 'onMobile') {\n logger({\n message: 'Modal is not supported on mobile devices. Please use BottomSheet instead.',\n moduleName: 'Modal',\n type: 'warn',\n });\n }\n }\n }, [platform]);\n\n // required by floating ui to handle focus\n const { refs, context } = useFloating({\n open: isMounted,\n });\n\n const defaultInitialFocusRef = React.useRef<any>(null);\n\n const modalContext = React.useMemo(\n () => ({\n isOpen,\n close: onDismiss,\n defaultInitialFocusRef,\n isVisible,\n }),\n [isOpen, onDismiss, defaultInitialFocusRef, isVisible],\n );\n const handleKeyDown = (event: React.KeyboardEvent): void => {\n // close modal on escape key press\n if (event?.key === 'Escape' || event?.code === 'Escape') {\n onDismiss();\n }\n };\n\n // Only allow ModalHeader, ModalBody and ModalFooter as children\n useVerifyAllowedChildren({\n allowedComponents: [componentIds.ModalHeader, componentIds.ModalBody, componentIds.ModalFooter],\n children,\n componentName: 'Modal',\n });\n\n return (\n <FloatingPortal>\n <ModalContext.Provider value={modalContext}>\n {isMounted ? (\n <FloatingFocusManager\n returnFocus\n initialFocus={initialFocusRef ?? defaultInitialFocusRef}\n context={context}\n modal={true}\n >\n <Box\n zIndex={zIndex}\n position=\"fixed\"\n testID=\"modal-wrapper\"\n {...makeAnalyticsAttribute(rest)}\n >\n <ModalBackdrop />\n <ModalContent\n {...metaAttribute({\n name: MetaConstants.Modal,\n })}\n {...makeAccessible({\n role: 'dialog',\n modal: true,\n label: accessibilityLabel,\n })}\n maxWidth={makeSize(modalMaxWidth[size])}\n minWidth={makeSize(modalMinWidth)}\n maxHeight={modalMaxHeight}\n width={`calc(100vw - ${makeSize(modalResponsiveScreenGap)})`}\n borderRadius={modalBorderRadius}\n backgroundColor=\"popup.background.subtle\"\n position=\"absolute\"\n display=\"flex\"\n flexDirection=\"column\"\n top=\"50%\"\n left=\"50%\"\n onKeyDown={handleKeyDown}\n isVisible={isVisible}\n ref={refs.setFloating}\n >\n {children}\n </ModalContent>\n </Box>\n </FloatingFocusManager>\n ) : null}\n </ModalContext.Provider>\n </FloatingPortal>\n );\n};\n\nexport { Modal, ModalHeader, ModalFooter, ModalBody };\nexport type { ModalProps, ModalHeaderProps, ModalFooterProps, ModalBodyProps };\n"],"names":["entry","keyframes","exit","ModalContent","styled","BaseBox","withConfig","displayName","componentId","_ref","isVisible","theme","css","elevation","highRaised","castWebType","makeMotionTime","motion","duration","xmoderate","easing","entrance","revealing","Modal","_ref2","_ref2$isOpen","isOpen","children","onDismiss","initialFocusRef","_ref2$size","size","accessibilityLabel","_ref2$zIndex","zIndex","componentZIndices","modal","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","platform","_usePresence","usePresence","transitionDuration","initialEnter","isMounted","useEffect","logger","message","moduleName","type","_useFloating","useFloating","open","refs","context","defaultInitialFocusRef","React","useRef","modalContext","useMemo","close","handleKeyDown","event","key","code","useVerifyAllowedChildren","allowedComponents","componentIds","ModalHeader","ModalBody","ModalFooter","componentName","_jsx","FloatingPortal","ModalContext","Provider","value","FloatingFocusManager","returnFocus","initialFocus","_jsxs","Box","_objectSpread","position","testID","makeAnalyticsAttribute","ModalBackdrop","metaAttribute","name","MetaConstants","makeAccessible","role","label","maxWidth","makeSize","modalMaxWidth","minWidth","modalMinWidth","maxHeight","modalMaxHeight","width","concat","modalResponsiveScreenGap","borderRadius","modalBorderRadius","backgroundColor","display","flexDirection","top","left","onKeyDown","ref","setFloating"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAMA,KAAK,gBAAGC,SAAS,CAStB,CAAA,mJAAA,CAAA,CAAA,CAAA;AAED,IAAMC,IAAI,gBAAGD,SAAS,CASrB,CAAA,mJAAA,CAAA,CAAA,CAAA;AAED,IAAME,YAAY,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,wBAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAyB,CAAA,CAAA,UAAAC,IAAA,EAA0B;AAAA,EAAA,IAAvBC,SAAS,G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,GACV,CAAC,CAAA;AAErB;;;;"}
1
+ {"version":3,"file":"Modal.web.js","sources":["../../../../../../src/components/Modal/Modal.web.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useEffect } from 'react';\nimport styled, { css, keyframes } from 'styled-components';\nimport { FloatingFocusManager, FloatingPortal, useFloating } from '@floating-ui/react';\nimport usePresence from 'use-presence';\nimport { ModalHeader } from './ModalHeader';\nimport type { ModalHeaderProps } from './ModalHeader';\nimport { ModalFooter } from './ModalFooter';\nimport type { ModalFooterProps } from './ModalFooter';\nimport { ModalBody } from './ModalBody';\nimport type { ModalBodyProps } from './ModalBody';\nimport { ModalContext } from './ModalContext';\nimport { ModalBackdrop } from './ModalBackdrop';\nimport {\n modalBorderRadius,\n modalMaxHeight,\n modalMaxWidth,\n modalMinWidth,\n modalResponsiveScreenGap,\n} from './modalTokens';\nimport type { ModalProps } from './types';\nimport { componentIds } from './constants';\nimport { castWebType, makeMotionTime, makeSize } from '~utils';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport { Box } from '~components/Box';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { logger } from '~utils/logger';\nimport { componentZIndices } from '~utils/componentZIndices';\nimport { useVerifyAllowedChildren } from '~utils/useVerifyAllowedChildren';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst entry = keyframes`\n from {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.9) translateY(20px);\n }\n to {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1) translateY(0px);\n }\n`;\n\nconst exit = keyframes`\n from {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1) translateY(0px);\n }\n to {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.9) translateY(20px);\n }\n`;\n\nconst ModalContent = styled(BaseBox)<{ isVisible: boolean }>(({ isVisible, theme }) => {\n return css`\n box-shadow: ${theme.elevation.highRaised};\n position: fixed;\n transform: translate(-50%, -50%);\n opacity: ${isVisible ? 1 : 0};\n animation: ${isVisible ? entry : exit}\n ${castWebType(makeMotionTime(theme.motion.duration.moderate))}\n ${isVisible\n ? castWebType(theme.motion.easing.entrance)\n : castWebType(theme.motion.easing.exit)};\n `;\n});\n\nconst Modal = ({\n isOpen = false,\n children,\n onDismiss,\n initialFocusRef,\n size = 'small',\n accessibilityLabel,\n zIndex = componentZIndices.modal,\n ...rest\n}: ModalProps): React.ReactElement => {\n const { theme, platform } = useTheme();\n const { isMounted, isVisible } = usePresence(isOpen, {\n transitionDuration: theme.motion.duration.moderate,\n initialEnter: true,\n });\n\n // Warn consumer if modal is opened on mobile\n useEffect(() => {\n if (__DEV__) {\n if (platform === 'onMobile') {\n logger({\n message: 'Modal is not supported on mobile devices. Please use BottomSheet instead.',\n moduleName: 'Modal',\n type: 'warn',\n });\n }\n }\n }, [platform]);\n\n // required by floating ui to handle focus\n const { refs, context } = useFloating({\n open: isMounted,\n });\n\n const defaultInitialFocusRef = React.useRef<any>(null);\n\n const modalContext = React.useMemo(\n () => ({\n isOpen,\n close: onDismiss,\n defaultInitialFocusRef,\n isVisible,\n }),\n [isOpen, onDismiss, defaultInitialFocusRef, isVisible],\n );\n const handleKeyDown = (event: React.KeyboardEvent): void => {\n // close modal on escape key press\n if (event?.key === 'Escape' || event?.code === 'Escape') {\n onDismiss();\n }\n };\n\n // Only allow ModalHeader, ModalBody and ModalFooter as children\n useVerifyAllowedChildren({\n allowedComponents: [componentIds.ModalHeader, componentIds.ModalBody, componentIds.ModalFooter],\n children,\n componentName: 'Modal',\n });\n\n return (\n <FloatingPortal>\n <ModalContext.Provider value={modalContext}>\n {isMounted ? (\n <FloatingFocusManager\n returnFocus\n initialFocus={initialFocusRef ?? defaultInitialFocusRef}\n context={context}\n modal={true}\n >\n <Box\n zIndex={zIndex}\n position=\"fixed\"\n testID=\"modal-wrapper\"\n {...makeAnalyticsAttribute(rest)}\n >\n <ModalBackdrop />\n <ModalContent\n {...metaAttribute({\n name: MetaConstants.Modal,\n })}\n {...makeAccessible({\n role: 'dialog',\n modal: true,\n label: accessibilityLabel,\n })}\n maxWidth={makeSize(modalMaxWidth[size])}\n minWidth={makeSize(modalMinWidth)}\n maxHeight={modalMaxHeight}\n width={`calc(100vw - ${makeSize(modalResponsiveScreenGap)})`}\n borderRadius={modalBorderRadius}\n backgroundColor=\"popup.background.subtle\"\n position=\"absolute\"\n display=\"flex\"\n flexDirection=\"column\"\n top=\"50%\"\n left=\"50%\"\n onKeyDown={handleKeyDown}\n isVisible={isVisible}\n ref={refs.setFloating}\n >\n {children}\n </ModalContent>\n </Box>\n </FloatingFocusManager>\n ) : null}\n </ModalContext.Provider>\n </FloatingPortal>\n );\n};\n\nexport { Modal, ModalHeader, ModalFooter, ModalBody };\nexport type { ModalProps, ModalHeaderProps, ModalFooterProps, ModalBodyProps };\n"],"names":["entry","keyframes","exit","ModalContent","styled","BaseBox","withConfig","displayName","componentId","_ref","isVisible","theme","css","elevation","highRaised","castWebType","makeMotionTime","motion","duration","moderate","easing","entrance","Modal","_ref2","_ref2$isOpen","isOpen","children","onDismiss","initialFocusRef","_ref2$size","size","accessibilityLabel","_ref2$zIndex","zIndex","componentZIndices","modal","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","platform","_usePresence","usePresence","transitionDuration","initialEnter","isMounted","useEffect","logger","message","moduleName","type","_useFloating","useFloating","open","refs","context","defaultInitialFocusRef","React","useRef","modalContext","useMemo","close","handleKeyDown","event","key","code","useVerifyAllowedChildren","allowedComponents","componentIds","ModalHeader","ModalBody","ModalFooter","componentName","_jsx","FloatingPortal","ModalContext","Provider","value","FloatingFocusManager","returnFocus","initialFocus","_jsxs","Box","_objectSpread","position","testID","makeAnalyticsAttribute","ModalBackdrop","metaAttribute","name","MetaConstants","makeAccessible","role","label","maxWidth","makeSize","modalMaxWidth","minWidth","modalMinWidth","maxHeight","modalMaxHeight","width","concat","modalResponsiveScreenGap","borderRadius","modalBorderRadius","backgroundColor","display","flexDirection","top","left","onKeyDown","ref","setFloating"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAMA,KAAK,gBAAGC,SAAS,CAStB,CAAA,mJAAA,CAAA,CAAA,CAAA;AAED,IAAMC,IAAI,gBAAGD,SAAS,CASrB,CAAA,mJAAA,CAAA,CAAA,CAAA;AAED,IAAME,YAAY,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,wBAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAyB,CAAA,CAAA,UAAAC,IAAA,EAA0B;AAAA,EAAA,IAAvBC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,KAAK,GAAAF,IAAA,CAALE,KAAK,CAAA;EAC9E,OAAOC,GAAG,CACMD,CAAAA,aAAAA,EAAAA,yDAAAA,EAAAA,aAAAA,EAAAA,GAAAA,EAAAA,GAAAA,EAAAA,GAAAA,CAAAA,EAAAA,KAAK,CAACE,SAAS,CAACC,UAAU,EAG7BJ,SAAS,GAAG,CAAC,GAAG,CAAC,EACfA,SAAS,GAAGV,KAAK,GAAGE,IAAI,EACjCa,WAAW,CAACC,cAAc,CAACL,KAAK,CAACM,MAAM,CAACC,QAAQ,CAACC,QAAQ,CAAC,CAAC,EAC3DT,SAAS,GACPK,WAAW,CAACJ,KAAK,CAACM,MAAM,CAACG,MAAM,CAACC,QAAQ,CAAC,GACzCN,WAAW,CAACJ,KAAK,CAACM,MAAM,CAACG,MAAM,CAAClB,IAAI,CAAC,CAAA,CAAA;AAE/C,CAAC,CAAC,CAAA;AAEF,IAAMoB,KAAK,GAAG,SAARA,KAAKA,CAAAC,KAAA,EAS2B;AAAA,EAAA,IAAAC,YAAA,GAAAD,KAAA,CARpCE,MAAM;AAANA,IAAAA,MAAM,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,YAAA;I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iBAAkB;AAChCC,YAAAA,eAAe,EAAC,yBAAyB;AACzCtB,YAAAA,QAAQ,EAAC,UAAU;AACnBuB,YAAAA,OAAO,EAAC,MAAM;AACdC,YAAAA,aAAa,EAAC,QAAQ;AACtBC,YAAAA,GAAG,EAAC,KAAK;AACTC,YAAAA,IAAI,EAAC,KAAK;AACVC,YAAAA,SAAS,EAAEjD,aAAc;AACzBrD,YAAAA,SAAS,EAAEA,SAAU;YACrBuG,GAAG,EAAE1D,IAAI,CAAC2D,WAAY;AAAAxF,YAAAA,QAAA,EAErBA,QAAAA;AAAQ,WAAA,CACG,CAAC,CAAA;SACZ,CAAA,CAAA;AAAC,OACc,CAAC,GACrB,IAAA;KACiB,CAAA;AAAC,GACV,CAAC,CAAA;AAErB;;;;"}
@@ -21,8 +21,8 @@ var StyledModalBackdrop = /*#__PURE__*/styled(FloatingOverlay).withConfig({
21
21
  var _useModalContext = useModalContext(),
22
22
  isVisible = _useModalContext.isVisible;
23
23
  return {
24
- transitionDuration: "".concat(makeMotionTime(theme.motion.duration.xmoderate)),
25
- transitionTimingFunction: isVisible ? castWebType(theme.motion.easing.entrance.revealing) : castWebType(theme.motion.easing.exit.revealing),
24
+ transitionDuration: "".concat(makeMotionTime(theme.motion.duration.moderate)),
25
+ transitionTimingFunction: isVisible ? castWebType(theme.motion.easing.entrance) : castWebType(theme.motion.easing.exit),
26
26
  transitionProperty: 'opacity',
27
27
  opacity: isVisible ? 1 : 0,
28
28
  backgroundColor: theme.colors.overlay.background.subtle
@@ -1 +1 @@
1
- {"version":3,"file":"ModalBackdrop.js","sources":["../../../../../../src/components/Modal/ModalBackdrop.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { FloatingOverlay } from '@floating-ui/react';\nimport { useModalContext } from './ModalContext';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst StyledModalBackdrop = styled(FloatingOverlay)(({ theme }) => {\n const { isVisible } = useModalContext();\n\n return {\n transitionDuration: `${makeMotionTime(theme.motion.duration.xmoderate)}`,\n transitionTimingFunction: isVisible\n ? castWebType(theme.motion.easing.entrance.revealing)\n : castWebType(theme.motion.easing.exit.revealing),\n transitionProperty: 'opacity',\n opacity: isVisible ? 1 : 0,\n backgroundColor: theme.colors.overlay.background.subtle,\n };\n});\n\nconst ModalBackdrop = (): React.ReactElement => {\n const { close } = useModalContext();\n\n return (\n <StyledModalBackdrop\n {...metaAttribute({ name: MetaConstants.ModalBackdrop, testID: MetaConstants.ModalBackdrop })}\n onClick={() => {\n close();\n }}\n lockScroll={true}\n />\n );\n};\n\nexport { ModalBackdrop };\n"],"names":["StyledModalBackdrop","styled","FloatingOverlay","withConfig","displayName","componentId","_ref","theme","_useModalContext","useModalContext","isVisible","transitionDuration","concat","makeMotionTime","motion","duration","xmoderate","transitionTimingFunction","castWebType","easing","entrance","revealing","exit","transitionProperty","opacity","backgroundColor","colors","overlay","background","subtle","ModalBackdrop","_useModalContext2","close","_jsx","_objectSpread","metaAttribute","name","MetaConstants","testID","onClick","lockScroll"],"mappings":";;;;;;;;;;;;;;;AAQA,IAAMA,mBAAmB,gBAAGC,MAAM,CAACC,eAAe,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,oCAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAAC,CAAA,CAAA,UAAAC,IAAA,EAAe;AAAA,EAAA,IAAZC,KAAK,GAAAD,IAAA,CAALC,KAAK,CAAA;AAC1D,EAAA,IAAAC,gBAAA,GAAsBC,eAAe,EAAE;IAA/BC,SAAS,GAAAF,gBAAA,CAATE,SAAS,CAAA;EAEjB,OAAO;AACLC,IAAAA,kBAAkB,EAAAC,EAAAA,CAAAA,MAAA,CAAKC,cAAc,CAACN,KAAK,CAACO,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,CAAE;IACxEC,wBAAwB,EAAEP,SAAS,GAC/BQ,WAAW,CAACX,KAAK,CAACO,MAAM,CAACK,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,GACnDH,WAAW,CAACX,KAAK,CAACO,MAAM,CAACK,MAAM,CAACG,IAAI,CAACD,SAAS,CAAC;AACnDE,IAAAA,kBAAkB,EAAE,SAAS;AAC7BC,IAAAA,OAAO,EAAEd,SAAS,GAAG,CAAC,GAAG,CAAC;IAC1Be,eAAe,EAAElB,KAAK,CAACmB,MAAM,CAACC,OAAO,CAACC,UAAU,CAACC,MAAAA;GAClD,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,GAA6B;AAC9C,EAAA,IAAAC,iBAAA,GAAkBtB,eAAe,EAAE;IAA3BuB,KAAK,GAAAD,iBAAA,CAALC,KAAK,CAAA;EAEb,oBACEC,GAAA,CAACjC,mBAAmB,EAAAkC,aAAA,CAAAA,aAAA,CACdC,EAAAA,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACP,aAAa;IAAEQ,MAAM,EAAED,aAAa,CAACP,aAAAA;AAAc,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;IAC7FS,OAAO,EAAE,SAAAA,OAAAA,GAAM;AACbP,MAAAA,KAAK,EAAE,CAAA;KACP;AACFQ,IAAAA,UAAU,EAAE,IAAA;AAAK,GAAA,CAClB,CAAC,CAAA;AAEN;;;;"}
1
+ {"version":3,"file":"ModalBackdrop.js","sources":["../../../../../../src/components/Modal/ModalBackdrop.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport React from 'react';\nimport styled from 'styled-components';\nimport { FloatingOverlay } from '@floating-ui/react';\nimport { useModalContext } from './ModalContext';\nimport { castWebType, makeMotionTime } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst StyledModalBackdrop = styled(FloatingOverlay)(({ theme }) => {\n const { isVisible } = useModalContext();\n\n return {\n transitionDuration: `${makeMotionTime(theme.motion.duration.moderate)}`,\n transitionTimingFunction: isVisible\n ? castWebType(theme.motion.easing.entrance)\n : castWebType(theme.motion.easing.exit),\n transitionProperty: 'opacity',\n opacity: isVisible ? 1 : 0,\n backgroundColor: theme.colors.overlay.background.subtle,\n };\n});\n\nconst ModalBackdrop = (): React.ReactElement => {\n const { close } = useModalContext();\n\n return (\n <StyledModalBackdrop\n {...metaAttribute({ name: MetaConstants.ModalBackdrop, testID: MetaConstants.ModalBackdrop })}\n onClick={() => {\n close();\n }}\n lockScroll={true}\n />\n );\n};\n\nexport { ModalBackdrop };\n"],"names":["StyledModalBackdrop","styled","FloatingOverlay","withConfig","displayName","componentId","_ref","theme","_useModalContext","useModalContext","isVisible","transitionDuration","concat","makeMotionTime","motion","duration","moderate","transitionTimingFunction","castWebType","easing","entrance","exit","transitionProperty","opacity","backgroundColor","colors","overlay","background","subtle","ModalBackdrop","_useModalContext2","close","_jsx","_objectSpread","metaAttribute","name","MetaConstants","testID","onClick","lockScroll"],"mappings":";;;;;;;;;;;;;;;AAQA,IAAMA,mBAAmB,gBAAGC,MAAM,CAACC,eAAe,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,oCAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAAC,CAAA,CAAA,UAAAC,IAAA,EAAe;AAAA,EAAA,IAAZC,KAAK,GAAAD,IAAA,CAALC,KAAK,CAAA;AAC1D,EAAA,IAAAC,gBAAA,GAAsBC,eAAe,EAAE;IAA/BC,SAAS,GAAAF,gBAAA,CAATE,SAAS,CAAA;EAEjB,OAAO;AACLC,IAAAA,kBAAkB,EAAAC,EAAAA,CAAAA,MAAA,CAAKC,cAAc,CAACN,KAAK,CAACO,MAAM,CAACC,QAAQ,CAACC,QAAQ,CAAC,CAAE;IACvEC,wBAAwB,EAAEP,SAAS,GAC/BQ,WAAW,CAACX,KAAK,CAACO,MAAM,CAACK,MAAM,CAACC,QAAQ,CAAC,GACzCF,WAAW,CAACX,KAAK,CAACO,MAAM,CAACK,MAAM,CAACE,IAAI,CAAC;AACzCC,IAAAA,kBAAkB,EAAE,SAAS;AAC7BC,IAAAA,OAAO,EAAEb,SAAS,GAAG,CAAC,GAAG,CAAC;IAC1Bc,eAAe,EAAEjB,KAAK,CAACkB,MAAM,CAACC,OAAO,CAACC,UAAU,CAACC,MAAAA;GAClD,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,GAA6B;AAC9C,EAAA,IAAAC,iBAAA,GAAkBrB,eAAe,EAAE;IAA3BsB,KAAK,GAAAD,iBAAA,CAALC,KAAK,CAAA;EAEb,oBACEC,GAAA,CAAChC,mBAAmB,EAAAiC,aAAA,CAAAA,aAAA,CACdC,EAAAA,EAAAA,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACP,aAAa;IAAEQ,MAAM,EAAED,aAAa,CAACP,aAAAA;AAAc,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;IAC7FS,OAAO,EAAE,SAAAA,OAAAA,GAAM;AACbP,MAAAA,KAAK,EAAE,CAAA;KACP;AACFQ,IAAAA,UAAU,EAAE,IAAA;AAAK,GAAA,CAClB,CAAC,CAAA;AAEN;;;;"}
@@ -0,0 +1,48 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import 'react';
4
+ import '../BaseMotion/index.js';
5
+ import { useMemoizedStyles } from '../Box/BaseBox/useMemoizedStyles.web.js';
6
+ import '../../utils/index.js';
7
+ import { cssBezierToArray } from '../../utils/cssBezierToArray.js';
8
+ import { msToSeconds } from '../../utils/msToSeconds.js';
9
+ import { jsx } from 'react/jsx-runtime';
10
+ import useTheme from '../BladeProvider/useTheme.js';
11
+ import { MotionDiv } from '../BaseMotion/BaseMotion.js';
12
+ import { castWebType } from '../../utils/platform/castUtils.js';
13
+
14
+ var _excluded = ["borderRadius", "backgroundColor"];
15
+ 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; }
16
+ 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; }
17
+ var Morph = function Morph(_ref) {
18
+ var children = _ref.children,
19
+ layoutId = _ref.layoutId;
20
+ // Apart from framer-motion's layout morphing, we also support morph of backgroundColor and borderRadius
21
+ var _children$props = children.props,
22
+ borderRadius = _children$props.borderRadius,
23
+ backgroundColor = _children$props.backgroundColor,
24
+ rest = _objectWithoutProperties(_children$props, _excluded);
25
+ var _useTheme = useTheme(),
26
+ theme = _useTheme.theme;
27
+ var cssProps = useMemoizedStyles({
28
+ borderRadius: borderRadius,
29
+ backgroundColor: backgroundColor,
30
+ theme: theme
31
+ });
32
+ return /*#__PURE__*/jsx(MotionDiv, _objectSpread(_objectSpread({
33
+ as: children.type
34
+ }, rest), {}, {
35
+ layout: true,
36
+ layoutId: layoutId
37
+ // The animations that are not supported by layout animation are animated using `animate` prop here
38
+ ,
39
+ animate: cssProps,
40
+ transition: {
41
+ duration: msToSeconds(theme.motion.duration.moderate),
42
+ ease: cssBezierToArray(castWebType(theme.motion.easing.standard))
43
+ }
44
+ }));
45
+ };
46
+
47
+ export { Morph };
48
+ //# sourceMappingURL=Morph.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Morph.web.js","sources":["../../../../../../src/components/Morph/Morph.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { MorphProps } from './types';\nimport { MotionDiv } from '~components/BaseMotion';\nimport { useMemoizedStyles } from '~components/Box/BaseBox/useMemoizedStyles.web';\nimport { castWebType, useTheme } from '~utils';\nimport { cssBezierToArray } from '~utils/cssBezierToArray';\nimport { msToSeconds } from '~utils/msToSeconds';\n\nconst Morph = ({ children, layoutId }: MorphProps): React.ReactElement => {\n // Apart from framer-motion's layout morphing, we also support morph of backgroundColor and borderRadius\n const { borderRadius, backgroundColor, ...rest } = children.props;\n const { theme } = useTheme();\n const cssProps = useMemoizedStyles({ borderRadius, backgroundColor, theme });\n\n return (\n <MotionDiv\n as={children.type}\n {...rest}\n layout\n layoutId={layoutId}\n // The animations that are not supported by layout animation are animated using `animate` prop here\n animate={cssProps}\n transition={{\n duration: msToSeconds(theme.motion.duration.moderate),\n ease: cssBezierToArray(castWebType(theme.motion.easing.standard)),\n }}\n />\n );\n};\n\nexport { Morph };\n"],"names":["Morph","_ref","children","layoutId","_children$props","props","borderRadius","backgroundColor","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","cssProps","useMemoizedStyles","_jsx","MotionDiv","_objectSpread","as","type","layout","animate","transition","duration","msToSeconds","motion","moderate","ease","cssBezierToArray","castWebType","easing","standard"],"mappings":";;;;;;;;;;;;;;;;AAQA,IAAMA,KAAK,GAAG,SAARA,KAAKA,CAAAC,IAAA,EAA+D;AAAA,EAAA,IAAzDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ,CAAA;AACjC;AACA,EAAA,IAAAC,eAAA,GAAmDF,QAAQ,CAACG,KAAK;IAAzDC,YAAY,GAAAF,eAAA,CAAZE,YAAY;IAAEC,eAAe,GAAAH,eAAA,CAAfG,eAAe;AAAKC,IAAAA,IAAI,GAAAC,wBAAA,CAAAL,eAAA,EAAAM,SAAA,CAAA,CAAA;AAC9C,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;EACb,IAAMC,QAAQ,GAAGC,iBAAiB,CAAC;AAAET,IAAAA,YAAY,EAAZA,YAAY;AAAEC,IAAAA,eAAe,EAAfA,eAAe;AAAEM,IAAAA,KAAK,EAALA,KAAAA;AAAM,GAAC,CAAC,CAAA;AAE5E,EAAA,oBACEG,GAAA,CAACC,SAAS,EAAAC,aAAA,CAAAA,aAAA,CAAA;IACRC,EAAE,EAAEjB,QAAQ,CAACkB,IAAAA;AAAK,GAAA,EACdZ,IAAI,CAAA,EAAA,EAAA,EAAA;IACRa,MAAM,EAAA,IAAA;AACNlB,IAAAA,QAAQ,EAAEA,QAAAA;AACV;AAAA;AACAmB,IAAAA,OAAO,EAAER,QAAS;AAClBS,IAAAA,UAAU,EAAE;MACVC,QAAQ,EAAEC,WAAW,CAACZ,KAAK,CAACa,MAAM,CAACF,QAAQ,CAACG,QAAQ,CAAC;AACrDC,MAAAA,IAAI,EAAEC,gBAAgB,CAACC,WAAW,CAACjB,KAAK,CAACa,MAAM,CAACK,MAAM,CAACC,QAAQ,CAAC,CAAA;AAClE,KAAA;AAAE,GAAA,CACH,CAAC,CAAA;AAEN;;;;"}
@@ -0,0 +1,2 @@
1
+ export { Morph } from './Morph.web.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _typeof from '@babel/runtime/helpers/typeof';
3
+ import 'react';
4
+ import '../BaseMotion/index.js';
5
+ import { 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 { makeSpace } from '../../utils/makeSpace/makeSpace.js';
11
+ import { castWebType } from '../../utils/platform/castUtils.js';
12
+ import { BaseMotionEntryExit } from '../BaseMotion/BaseMotion.js';
13
+
14
+ 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; }
15
+ 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; }
16
+ var Move = function Move(_ref) {
17
+ var children = _ref.children,
18
+ _ref$type = _ref.type,
19
+ type = _ref$type === void 0 ? 'inout' : _ref$type,
20
+ isVisible = _ref.isVisible,
21
+ motionTriggers = _ref.motionTriggers,
22
+ shouldUnmountWhenHidden = _ref.shouldUnmountWhenHidden,
23
+ delay = _ref.delay;
24
+ var _useTheme = useTheme(),
25
+ theme = _useTheme.theme;
26
+ var enterDelay = _typeof(delay) === 'object' ? delay.enter : delay;
27
+ var exitDelay = _typeof(delay) === 'object' ? delay.exit : delay;
28
+ var movePx = makeSpace(theme.spacing[5]);
29
+ var moveVariants = {
30
+ initial: {
31
+ opacity: 0,
32
+ transform: "translateY(".concat(movePx, ")")
33
+ },
34
+ animate: {
35
+ opacity: 1,
36
+ transform: "translateY(".concat(makeSpace(theme.spacing[0]), ")"),
37
+ transition: _objectSpread(_objectSpread({}, enterDelay ? {
38
+ delay: msToSeconds(theme.motion.delay[enterDelay])
39
+ } : {}), {}, {
40
+ duration: msToSeconds(theme.motion.duration.xmoderate),
41
+ ease: cssBezierToArray(castWebType(theme.motion.easing.entrance))
42
+ })
43
+ },
44
+ exit: {
45
+ opacity: 0,
46
+ transform: "translateY(".concat(movePx, ")"),
47
+ transition: _objectSpread(_objectSpread({}, exitDelay ? {
48
+ delay: msToSeconds(theme.motion.delay[exitDelay])
49
+ } : {}), {}, {
50
+ duration: msToSeconds(theme.motion.duration.quick),
51
+ ease: cssBezierToArray(castWebType(theme.motion.easing.exit))
52
+ })
53
+ }
54
+ };
55
+ return /*#__PURE__*/jsx(BaseMotionEntryExit, {
56
+ motionVariants: moveVariants,
57
+ children: children,
58
+ type: type,
59
+ isVisible: isVisible,
60
+ motionTriggers: motionTriggers,
61
+ shouldUnmountWhenHidden: shouldUnmountWhenHidden
62
+ });
63
+ };
64
+
65
+ export { Move };
66
+ //# sourceMappingURL=Move.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Move.web.js","sources":["../../../../../../src/components/Move/Move.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { MoveProps } 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, makeSpace, useTheme } from '~utils';\n\n/**\n * ## Move\n *\n * Move is one of the motion presets that we expose from blade to help you make components appear / disappear with move\n *\n * ### Usage\n *\n * #### Move in on mount\n *\n * ```jsx\n * <Move>\n * <Card />\n * </Move>\n * ```\n *\n * #### Conditionally move based on state\n *\n * ```jsx\n * <Move isVisible={isVisibleState}>\n * <Card />\n * </Move>\n * ```\n */\nconst Move = ({\n children,\n type = 'inout',\n isVisible,\n motionTriggers,\n shouldUnmountWhenHidden,\n delay,\n}: MoveProps): React.ReactElement => {\n const { theme } = useTheme();\n const enterDelay = typeof delay === 'object' ? delay.enter : delay;\n const exitDelay = typeof delay === 'object' ? delay.exit : delay;\n\n const movePx = makeSpace(theme.spacing[5]);\n\n const moveVariants: MotionVariantsType = {\n initial: {\n opacity: 0,\n transform: `translateY(${movePx})`,\n },\n animate: {\n opacity: 1,\n transform: `translateY(${makeSpace(theme.spacing[0])})`,\n transition: {\n // We have to make sure we don't add delay prop because if we define it, it takes precedence in stagger.\n // Even setting `undefined` would break the stagger\n ...(enterDelay ? { delay: msToSeconds(theme.motion.delay[enterDelay]) } : {}),\n duration: msToSeconds(theme.motion.duration.xmoderate),\n ease: cssBezierToArray(castWebType(theme.motion.easing.entrance)),\n },\n },\n exit: {\n opacity: 0,\n transform: `translateY(${movePx})`,\n transition: {\n ...(exitDelay ? { delay: msToSeconds(theme.motion.delay[exitDelay]) } : {}),\n duration: msToSeconds(theme.motion.duration.quick),\n ease: cssBezierToArray(castWebType(theme.motion.easing.exit)),\n },\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 { Move };\n"],"names":["Move","_ref","children","_ref$type","type","isVisible","motionTriggers","shouldUnmountWhenHidden","delay","_useTheme","useTheme","theme","enterDelay","_typeof","enter","exitDelay","exit","movePx","makeSpace","spacing","moveVariants","initial","opacity","transform","concat","animate","transition","_objectSpread","msToSeconds","motion","duration","xmoderate","ease","cssBezierToArray","castWebType","easing","entrance","quick","_jsx","BaseMotionEntryExit","motionVariants"],"mappings":";;;;;;;;;;;;;;;AA+BA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAAC,IAAA,EAO2B;AAAA,EAAA,IANnCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IAAAC,SAAA,GAAAF,IAAA,CACRG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,SAAA;IACdE,SAAS,GAAAJ,IAAA,CAATI,SAAS;IACTC,cAAc,GAAAL,IAAA,CAAdK,cAAc;IACdC,uBAAuB,GAAAN,IAAA,CAAvBM,uBAAuB;IACvBC,KAAK,GAAAP,IAAA,CAALO,KAAK,CAAA;AAEL,EAAA,IAAAC,SAAA,GAAkBC,QAAQ,EAAE;IAApBC,KAAK,GAAAF,SAAA,CAALE,KAAK,CAAA;AACb,EAAA,IAAMC,UAAU,GAAGC,OAAA,CA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AAC,aAAA,CAAAA,aAAA,CAAA,EAAA,EACJZ,SAAS,GAAG;QAAEP,KAAK,EAAEoB,WAAW,CAACjB,KAAK,CAACkB,MAAM,CAACrB,KAAK,CAACO,SAAS,CAAC,CAAA;OAAG,GAAG,EAAE,CAAA,EAAA,EAAA,EAAA;QAC1Ee,QAAQ,EAAEF,WAAW,CAACjB,KAAK,CAACkB,MAAM,CAACC,QAAQ,CAACO,KAAK,CAAC;AAClDL,QAAAA,IAAI,EAAEC,gBAAgB,CAACC,WAAW,CAACvB,KAAK,CAACkB,MAAM,CAACM,MAAM,CAACnB,IAAI,CAAC,CAAA;AAAC,OAAA,CAAA;AAEjE,KAAA;GACD,CAAA;EAED,oBACEsB,GAAA,CAACC,mBAAmB,EAAA;AAClBC,IAAAA,cAAc,EAAEpB,YAAa;AAC7BlB,IAAAA,QAAQ,EAAEA,QAAS;AACnBE,IAAAA,IAAI,EAAEA,IAAK;AACXC,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 { Move } from './Move.web.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -119,7 +119,7 @@ var CircularProgressBarFilled = function CircularProgressBarFilled(_ref4) {
119
119
  strokeDashoffset: dashOffset,
120
120
  pulseMotionDuration: "duration.2xgentle",
121
121
  pulseMotionDelay: "delay.long",
122
- motionEasing: "easing.standard.revealing"
122
+ motionEasing: "easing.emphasized"
123
123
  }), showPercentage && size !== 'small' && /*#__PURE__*/jsxs(StyledSVGText, {
124
124
  size: circularProgressSizeTokens[size].percentTextSize,
125
125
  weight: "semibold",
@@ -1 +1 @@
1
- {"version":3,"file":"CircularProgressBar.web.js","sources":["../../../../../../src/components/ProgressBar/CircularProgressBar.web.tsx"],"sourcesContent":["import type { FlattenSimpleInterpolation } from 'styled-components';\nimport styled, { css, keyframes } from 'styled-components';\nimport React from 'react';\nimport type { CircularProgressBarFilledProps } from './types';\nimport {\n pulseAnimation,\n circularProgressSizeTokens,\n getCircularProgressSVGTokens,\n} from './progressBarTokens';\nimport { CircularProgressLabel } from './CircularProgressLabel';\nimport getIn from '~utils/lodashButBetter/get';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType } from '~utils';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport type { TextProps } from '~components/Typography';\nimport { getTextProps } from '~components/Typography';\nimport { Svg, Circle } from '~components/Icons/_Svg';\nimport getBaseTextStyles from '~components/Typography/BaseText/getBaseTextStyles';\n\nconst pulseKeyframes = keyframes`\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.65;\n }\n 100% {\n opacity: 1;\n }\n`;\n\nconst getPulseAnimationStyles = ({\n duration,\n easing,\n progressPercent,\n isMeter,\n}: {\n duration: string;\n easing: string;\n progressPercent: number;\n isMeter: boolean;\n}): FlattenSimpleInterpolation => {\n if (isMeter || progressPercent === 100) {\n return css`\n height: 100%;\n width: 100%;\n transition: stroke-dashoffset ${duration} ${easing};\n `;\n }\n\n return css`\n height: 100%;\n width: 100%;\n opacity: ${pulseAnimation.opacityInitial};\n background-color: ${pulseAnimation.backgroundColor};\n transition: stroke-dashoffset ${duration} ${easing};\n animation: ${pulseKeyframes} ${duration} ${easing} infinite;\n `;\n};\n\nconst StyledSVGText = styled.text<Pick<TextProps<{ variant: 'body' }>, 'size' | 'weight'>>(\n ({ theme, size, weight }) => {\n return {\n ...getBaseTextStyles({\n theme,\n ...getTextProps({ variant: 'body', size, weight }),\n }),\n fill: theme.colors.surface.text.gray.normal,\n };\n },\n);\n\nconst DeterminatePulseAnimation = styled.circle<\n Pick<\n CircularProgressBarFilledProps,\n 'pulseMotionDuration' | 'pulseMotionDelay' | 'motionEasing' | 'progressPercent' | 'isMeter'\n >\n>(({ theme, pulseMotionDuration, motionEasing, progressPercent, isMeter }) => {\n const duration = castWebType(makeMotionTime(getIn(theme.motion, pulseMotionDuration)));\n const easing = castWebType(getIn(theme.motion, motionEasing));\n\n return getPulseAnimationStyles({\n duration,\n easing,\n progressPercent,\n isMeter,\n });\n});\n\nconst CircularProgressBarFilled = ({\n progressPercent,\n fillColor,\n backgroundColor,\n size = 'small',\n label,\n showPercentage = true,\n isMeter,\n}: CircularProgressBarFilledProps): React.ReactElement => {\n const {\n sqSize,\n strokeWidth,\n radius,\n viewBox,\n dashArray,\n dashOffset,\n } = getCircularProgressSVGTokens({ size, progressPercent });\n\n return (\n <BaseBox\n width=\"fit-content\"\n textAlign=\"center\"\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n >\n <Svg width={String(sqSize)} height={String(sqSize)} viewBox={viewBox}>\n <Circle\n fill=\"none\"\n stroke={backgroundColor}\n cx={String(sqSize / 2)}\n cy={String(sqSize / 2)}\n r={String(radius)}\n strokeWidth={`${strokeWidth}px`}\n />\n\n <DeterminatePulseAnimation\n progressPercent={progressPercent}\n isMeter={isMeter}\n fill=\"none\"\n stroke={fillColor}\n cx={sqSize / 2}\n cy={sqSize / 2}\n r={radius}\n strokeWidth={`${strokeWidth}px`}\n // Start progress marker at 12 O'Clock\n transform={`rotate(-90 ${sqSize / 2} ${sqSize / 2})`}\n strokeDasharray={dashArray}\n strokeDashoffset={dashOffset}\n pulseMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.standard.revealing\"\n />\n {showPercentage && size !== 'small' && (\n <StyledSVGText\n size={circularProgressSizeTokens[size].percentTextSize}\n weight=\"semibold\"\n x=\"50%\"\n y=\"50%\"\n textAnchor=\"middle\"\n dy=\".4em\"\n >\n {progressPercent}%\n </StyledSVGText>\n )}\n </Svg>\n\n <CircularProgressLabel\n progressPercent={progressPercent}\n size={size}\n label={label}\n showPercentage={showPercentage}\n />\n </BaseBox>\n );\n};\n\nexport { CircularProgressBarFilled };\n"],"names":["pulseKeyframes","keyframes","getPulseAnimationStyles","_ref","duration","easing","progressPercent","isMeter","css","pulseAnimation","opacityInitial","backgroundColor","StyledSVGText","styled","text","withConfig","displayName","componentId","_ref2","theme","size","weight","_objectSpread","getBaseTextStyles","getTextProps","variant","fill","colors","surface","gray","normal","DeterminatePulseAnimation","circle","_ref3","pulseMotionDuration","motionEasing","castWebType","makeMotionTime","getIn","motion","CircularProgressBarFilled","_ref4","fillColor","_ref4$size","label","_ref4$showPercentage","showPercentage","_getCircularProgressS","getCircularProgressSVGTokens","sqSize","strokeWidth","radius","viewBox","dashArray","dashOffset","_jsxs","BaseBox","width","textAlign","display","flexDirection","alignItems","children","Svg","String","height","_jsx","Circle","stroke","cx","cy","r","concat","transform","strokeDasharray","strokeDashoffset","pulseMotionDelay","circularProgressSizeTokens","percentTextSize","x","y","textAnchor","dy","CircularProgressLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,cAAc,gBAAGC,SAAS,CAU/B,CAAA,kDAAA,CAAA,CAAA,CAAA;AAED,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAAC,IAAA,EAUK;AAAA,EAAA,IAThCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,eAAe,GAAAH,IAAA,CAAfG,eAAe;IACfC,OAAO,GAAAJ,IAAA,CAAPI,OAAO,CAAA;AAOP,EAAA,IAAIA,OAAO,IAAID,eAAe,KAAK,GAAG,EAAE;AACtC,IAAA,OAAOE,GAAG,CAAA,CAAA,sDAAA,EAAA,GAAA,EAAA,GAAA,CAAA,EAGwBJ,QAAQ,EAAIC,MAAM,CAAA,CAAA;AAEtD,GAAA;AAEA,EAAA,OAAOG,GAAG,CAGGC,CAAAA,iCAAAA,EAAAA,oBAAAA,EAAAA,gCAAAA,EAAAA,GAAAA,EAAAA,aAAAA,EAAAA,GAAAA,EAAAA,G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M,GAAG,CAAE;AACfsB,QAAAA,CAAC,EAAEpB,MAAO;QACVD,WAAW,EAAA,EAAA,CAAAsB,MAAA,CAAKtB,WAAW,EAAA,IAAA,CAAA;AAC3B;AAAA;AACAuB,QAAAA,SAAS,EAAAD,aAAAA,CAAAA,MAAA,CAAgBvB,MAAM,GAAG,CAAC,EAAAuB,GAAAA,CAAAA,CAAAA,MAAA,CAAIvB,MAAM,GAAG,CAAC,EAAI,GAAA,CAAA;AACrDyB,QAAAA,eAAe,EAAErB,SAAU;AAC3BsB,QAAAA,gBAAgB,EAAErB,UAAW;AAC7BpB,QAAAA,mBAAmB,EAAC,mBAAmB;AACvC0C,QAAAA,gBAAgB,EAAC,YAAY;AAC7BzC,QAAAA,YAAY,EAAC,2BAAA;OACd,CAAC,EACDW,cAAc,IAAI1B,IAAI,KAAK,OAAO,iBACjCmC,IAAA,CAAC3C,aAAa,EAAA;AACZQ,QAAAA,IAAI,EAAEyD,0BAA0B,CAACzD,IAAI,CAAC,CAAC0D,eAAgB;AACvDzD,QAAAA,MAAM,EAAC,UAAU;AACjB0D,QAAAA,CAAC,EAAC,KAAK;AACPC,QAAAA,CAAC,EAAC,KAAK;AACPC,QAAAA,UAAU,EAAC,QAAQ;AACnBC,QAAAA,EAAE,EAAC,MAAM;QAAApB,QAAA,EAAA,CAERxD,eAAe,EAAC,GACnB,CAAA;AAAA,OAAe,CAChB,CAAA;AAAA,KACE,CAAC,eAEN4D,GAAA,CAACiB,qBAAqB,EAAA;AACpB7E,MAAAA,eAAe,EAAEA,eAAgB;AACjCc,MAAAA,IAAI,EAAEA,IAAK;AACXwB,MAAAA,KAAK,EAAEA,KAAM;AACbE,MAAAA,cAAc,EAAEA,cAAAA;AAAe,KAChC,CAAC,CAAA;AAAA,GACK,CAAC,CAAA;AAEd;;;;"}
1
+ {"version":3,"file":"CircularProgressBar.web.js","sources":["../../../../../../src/components/ProgressBar/CircularProgressBar.web.tsx"],"sourcesContent":["import type { FlattenSimpleInterpolation } from 'styled-components';\nimport styled, { css, keyframes } from 'styled-components';\nimport React from 'react';\nimport type { CircularProgressBarFilledProps } from './types';\nimport {\n pulseAnimation,\n circularProgressSizeTokens,\n getCircularProgressSVGTokens,\n} from './progressBarTokens';\nimport { CircularProgressLabel } from './CircularProgressLabel';\nimport getIn from '~utils/lodashButBetter/get';\nimport BaseBox from '~components/Box/BaseBox';\nimport { castWebType } from '~utils';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport type { TextProps } from '~components/Typography';\nimport { getTextProps } from '~components/Typography';\nimport { Svg, Circle } from '~components/Icons/_Svg';\nimport getBaseTextStyles from '~components/Typography/BaseText/getBaseTextStyles';\n\nconst pulseKeyframes = keyframes`\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.65;\n }\n 100% {\n opacity: 1;\n }\n`;\n\nconst getPulseAnimationStyles = ({\n duration,\n easing,\n progressPercent,\n isMeter,\n}: {\n duration: string;\n easing: string;\n progressPercent: number;\n isMeter: boolean;\n}): FlattenSimpleInterpolation => {\n if (isMeter || progressPercent === 100) {\n return css`\n height: 100%;\n width: 100%;\n transition: stroke-dashoffset ${duration} ${easing};\n `;\n }\n\n return css`\n height: 100%;\n width: 100%;\n opacity: ${pulseAnimation.opacityInitial};\n background-color: ${pulseAnimation.backgroundColor};\n transition: stroke-dashoffset ${duration} ${easing};\n animation: ${pulseKeyframes} ${duration} ${easing} infinite;\n `;\n};\n\nconst StyledSVGText = styled.text<Pick<TextProps<{ variant: 'body' }>, 'size' | 'weight'>>(\n ({ theme, size, weight }) => {\n return {\n ...getBaseTextStyles({\n theme,\n ...getTextProps({ variant: 'body', size, weight }),\n }),\n fill: theme.colors.surface.text.gray.normal,\n };\n },\n);\n\nconst DeterminatePulseAnimation = styled.circle<\n Pick<\n CircularProgressBarFilledProps,\n 'pulseMotionDuration' | 'pulseMotionDelay' | 'motionEasing' | 'progressPercent' | 'isMeter'\n >\n>(({ theme, pulseMotionDuration, motionEasing, progressPercent, isMeter }) => {\n const duration = castWebType(makeMotionTime(getIn(theme.motion, pulseMotionDuration)));\n const easing = castWebType(getIn(theme.motion, motionEasing));\n\n return getPulseAnimationStyles({\n duration,\n easing,\n progressPercent,\n isMeter,\n });\n});\n\nconst CircularProgressBarFilled = ({\n progressPercent,\n fillColor,\n backgroundColor,\n size = 'small',\n label,\n showPercentage = true,\n isMeter,\n}: CircularProgressBarFilledProps): React.ReactElement => {\n const {\n sqSize,\n strokeWidth,\n radius,\n viewBox,\n dashArray,\n dashOffset,\n } = getCircularProgressSVGTokens({ size, progressPercent });\n\n return (\n <BaseBox\n width=\"fit-content\"\n textAlign=\"center\"\n display=\"flex\"\n flexDirection=\"column\"\n alignItems=\"center\"\n >\n <Svg width={String(sqSize)} height={String(sqSize)} viewBox={viewBox}>\n <Circle\n fill=\"none\"\n stroke={backgroundColor}\n cx={String(sqSize / 2)}\n cy={String(sqSize / 2)}\n r={String(radius)}\n strokeWidth={`${strokeWidth}px`}\n />\n\n <DeterminatePulseAnimation\n progressPercent={progressPercent}\n isMeter={isMeter}\n fill=\"none\"\n stroke={fillColor}\n cx={sqSize / 2}\n cy={sqSize / 2}\n r={radius}\n strokeWidth={`${strokeWidth}px`}\n // Start progress marker at 12 O'Clock\n transform={`rotate(-90 ${sqSize / 2} ${sqSize / 2})`}\n strokeDasharray={dashArray}\n strokeDashoffset={dashOffset}\n pulseMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.emphasized\"\n />\n {showPercentage && size !== 'small' && (\n <StyledSVGText\n size={circularProgressSizeTokens[size].percentTextSize}\n weight=\"semibold\"\n x=\"50%\"\n y=\"50%\"\n textAnchor=\"middle\"\n dy=\".4em\"\n >\n {progressPercent}%\n </StyledSVGText>\n )}\n </Svg>\n\n <CircularProgressLabel\n progressPercent={progressPercent}\n size={size}\n label={label}\n showPercentage={showPercentage}\n />\n </BaseBox>\n );\n};\n\nexport { CircularProgressBarFilled };\n"],"names":["pulseKeyframes","keyframes","getPulseAnimationStyles","_ref","duration","easing","progressPercent","isMeter","css","pulseAnimation","opacityInitial","backgroundColor","StyledSVGText","styled","text","withConfig","displayName","componentId","_ref2","theme","size","weight","_objectSpread","getBaseTextStyles","getTextProps","variant","fill","colors","surface","gray","normal","DeterminatePulseAnimation","circle","_ref3","pulseMotionDuration","motionEasing","castWebType","makeMotionTime","getIn","motion","CircularProgressBarFilled","_ref4","fillColor","_ref4$size","label","_ref4$showPercentage","showPercentage","_getCircularProgressS","getCircularProgressSVGTokens","sqSize","strokeWidth","radius","viewBox","dashArray","dashOffset","_jsxs","BaseBox","width","textAlign","display","flexDirection","alignItems","children","Svg","String","height","_jsx","Circle","stroke","cx","cy","r","concat","transform","strokeDasharray","strokeDashoffset","pulseMotionDelay","circularProgressSizeTokens","percentTextSize","x","y","textAnchor","dy","CircularProgressLabel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,cAAc,gBAAGC,SAAS,CAU/B,CAAA,kDAAA,CAAA,CAAA,CAAA;AAED,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAAC,IAAA,EAUK;AAAA,EAAA,IAThCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,eAAe,GAAAH,IAAA,CAAfG,eAAe;IACfC,OAAO,GAAAJ,IAAA,CAAPI,OAAO,CAAA;AAOP,EAAA,IAAIA,OAAO,IAAID,eAAe,KAAK,GAAG,EAAE;AACtC,IAAA,OAAOE,GAAG,CAAA,CAAA,sDAAA,EAAA,GAAA,EAAA,GAAA,CAAA,EAGwBJ,QAAQ,EAAIC,MAAM,CAAA,CAAA;AAEtD,GAAA;AAEA,EAAA,OAAOG,GAAG,CAGGC,CAAAA,iCAAAA,EAAAA,oBAAAA,EAAAA,gCAAAA,EAAAA,GAAAA,EAAAA,aAAAA,EAAAA,GAAAA,EAAAA,GAAAA,EAAAA,YAAAA,CAAAA,EAAAA,cAAc,CAACC,cAAc,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D,WAAW,EAAA,EAAA,CAAAsB,MAAA,CAAKtB,WAAW,EAAA,IAAA,CAAA;AAC3B;AAAA;AACAuB,QAAAA,SAAS,EAAAD,aAAAA,CAAAA,MAAA,CAAgBvB,MAAM,GAAG,CAAC,EAAAuB,GAAAA,CAAAA,CAAAA,MAAA,CAAIvB,MAAM,GAAG,CAAC,EAAI,GAAA,CAAA;AACrDyB,QAAAA,eAAe,EAAErB,SAAU;AAC3BsB,QAAAA,gBAAgB,EAAErB,UAAW;AAC7BpB,QAAAA,mBAAmB,EAAC,mBAAmB;AACvC0C,QAAAA,gBAAgB,EAAC,YAAY;AAC7BzC,QAAAA,YAAY,EAAC,mBAAA;OACd,CAAC,EACDW,cAAc,IAAI1B,IAAI,KAAK,OAAO,iBACjCmC,IAAA,CAAC3C,aAAa,EAAA;AACZQ,QAAAA,IAAI,EAAEyD,0BAA0B,CAACzD,IAAI,CAAC,CAAC0D,eAAgB;AACvDzD,QAAAA,MAAM,EAAC,UAAU;AACjB0D,QAAAA,CAAC,EAAC,KAAK;AACPC,QAAAA,CAAC,EAAC,KAAK;AACPC,QAAAA,UAAU,EAAC,QAAQ;AACnBC,QAAAA,EAAE,EAAC,MAAM;QAAApB,QAAA,EAAA,CAERxD,eAAe,EAAC,GACnB,CAAA;AAAA,OAAe,CAChB,CAAA;AAAA,KACE,CAAC,eAEN4D,GAAA,CAACiB,qBAAqB,EAAA;AACpB7E,MAAAA,eAAe,EAAEA,eAAgB;AACjCc,MAAAA,IAAI,EAAEA,IAAK;AACXwB,MAAAA,KAAK,EAAEA,KAAM;AACbE,MAAAA,cAAc,EAAEA,cAAAA;AAAe,KAChC,CAAC,CAAA;AAAA,GACK,CAAC,CAAA;AAEd;;;;"}
@@ -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 { ProgressBarFilled } from './ProgressBarFilled.web.js';
4
5
  import { CircularProgressBarFilled } from './CircularProgressBar.web.js';
5
6
  import clamp from '../../utils/lodashButBetter/clamp.js';
@@ -36,7 +37,7 @@ var progressBarHeight = {
36
37
  // Large size isn't available when variant is 'linear'
37
38
  large: size[0]
38
39
  };
39
- var ProgressBar = function ProgressBar(_ref) {
40
+ var _ProgressBar = function _ProgressBar(_ref, ref) {
40
41
  var _label$trim;
41
42
  var accessibilityLabel = _ref.accessibilityLabel,
42
43
  color = _ref.color,
@@ -117,7 +118,9 @@ var ProgressBar = function ProgressBar(_ref) {
117
118
  accessibilityProps.valueMax = undefined;
118
119
  accessibilityProps.valueText = undefined;
119
120
  }
120
- return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, getStyledProps(rest)), metaAttribute({
121
+ return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
122
+ ref: ref
123
+ }, getStyledProps(rest)), metaAttribute({
121
124
  name: MetaConstants.ProgressBar,
122
125
  testID: testID
123
126
  })), makeAnalyticsAttribute(rest)), {}, {
@@ -165,7 +168,7 @@ var ProgressBar = function ProgressBar(_ref) {
165
168
  pulseMotionDuration: "duration.2xgentle",
166
169
  fillMotionDuration: "duration.2xgentle",
167
170
  pulseMotionDelay: "delay.long",
168
- motionEasing: "easing.standard.revealing"
171
+ motionEasing: "easing.emphasized"
169
172
  }) : /*#__PURE__*/jsx(BaseBox, {
170
173
  backgroundColor: unfilledBackgroundColor,
171
174
  height: makeSize(progressBarHeight[size]),
@@ -178,7 +181,7 @@ var ProgressBar = function ProgressBar(_ref) {
178
181
  pulseMotionDuration: "duration.2xgentle",
179
182
  indeterminateMotionDuration: "duration.2xgentle",
180
183
  pulseMotionDelay: "delay.long",
181
- motionEasing: "easing.standard.revealing",
184
+ motionEasing: "easing.emphasized",
182
185
  type: progressType,
183
186
  isIndeterminate: isIndeterminate
184
187
  })
@@ -187,6 +190,7 @@ var ProgressBar = function ProgressBar(_ref) {
187
190
  })
188
191
  }));
189
192
  };
193
+ var ProgressBar = /*#__PURE__*/React__default.forwardRef(_ProgressBar);
190
194
 
191
195
  export { ProgressBar };
192
196
  //# sourceMappingURL=ProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.js","sources":["../../../../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { ProgressBarFilled } from './ProgressBarFilled';\nimport { CircularProgressBarFilled } from './CircularProgressBar';\nimport clamp from '~utils/lodashButBetter/clamp';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { Text } from '~components/Typography/Text';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useId } from '~utils/useId';\nimport { useTheme } from '~components/BladeProvider';\nimport type { BaseBoxProps } from '~components/Box/BaseBox';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { size } from '~tokens/global';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ProgressBarCommonProps = {\n /**\n * Sets aria-label to help users know what the progress bar is for. Default value is the same as the `label` passed.\n */\n accessibilityLabel?: string;\n /**\n * Sets the color of the progress bar which changes the feedback color.\n */\n color?: FeedbackColors;\n /**\n * Sets the type of the progress bar.\n * @default 'progress'\n */\n type?: 'meter' | 'progress';\n /**\n * Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.\n */\n label?: string;\n /**\n * Sets the size of the progress bar.\n * Note: 'large' size isn't available when the variant is 'linear'.\n * @default 'small'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Sets the progress value of the progress bar.\n * @default 'small'\n */\n value?: number;\n /**\n * Sets the minimum value for the progress bar.\n * @default 0\n */\n min?: number;\n /**\n * Sets the maximum value for the progress bar.\n * @default 100\n */\n max?: number;\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\ntype ProgressBarVariant = 'progress' | 'meter' | 'linear' | 'circular';\n\ntype ProgressBarProgressProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for the progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'progress' | 'linear' | 'circular'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: boolean;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default true\n */\n showPercentage?: boolean;\n};\n\ntype ProgressBarMeterProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for thr progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'meter' | 'linear' | 'circular'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: undefined;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default false\n */\n showPercentage?: undefined;\n};\n\ntype ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;\n\nconst progressBarHeight: Record<NonNullable<ProgressBarProps['size']>, 2 | 4 | 0> = {\n small: size[2],\n medium: size[4],\n // Large size isn't available when variant is 'linear'\n large: size[0],\n};\n\nconst ProgressBar = ({\n accessibilityLabel,\n color,\n type,\n isIndeterminate = false,\n label,\n showPercentage = true,\n size = 'small',\n value = 0,\n variant = 'progress',\n min = 0,\n max = 100,\n testID,\n ...rest\n}: ProgressBarProps): ReactElement => {\n const { theme } = useTheme();\n const progressType = !type && (variant === 'meter' || variant === 'progress') ? variant : type;\n const progressVariant = variant === 'meter' || variant === 'progress' ? 'linear' : variant;\n const id = useId(`${progressType}-${progressVariant}`);\n\n if (__DEV__) {\n if (progressType === 'meter' && isIndeterminate) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Cannot set 'isIndeterminate' when 'type' or 'variant' is 'meter'.`,\n });\n }\n\n if (progressVariant === 'circular' && isIndeterminate) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Cannot set 'isIndeterminate' when 'variant' is 'circular'.`,\n });\n }\n\n if (progressVariant === 'linear' && size === 'large') {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Large size isn't available when 'variant' is 'linear'.`,\n });\n }\n\n if (type && (variant === 'progress' || variant === 'meter')) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `variant can only be 'linear' or 'circular' when 'type=${type}'.`,\n });\n }\n }\n\n const unfilledBackgroundColor = theme.colors.feedback.background.neutral\n .subtle as BaseBoxProps['backgroundColor'];\n const filledBackgroundColor = color\n ? theme.colors.feedback.background[color].intense\n : theme.colors.surface.background.primary.intense;\n const hasLabel = label && label.trim()?.length > 0;\n const isMeter = progressType === 'meter';\n const isCircular = progressVariant === 'circular';\n const progressValue = clamp(value, min, max);\n const percentageValue = ((progressValue - min) * 100) / (max - min);\n const percentageProgressValue = isMeter\n ? parseFloat(percentageValue.toFixed(1))\n : Math.floor(percentageValue);\n const shouldShowPercentage = showPercentage && !isMeter && !isIndeterminate;\n const accessibilityProps: Pick<\n AccessibilityProps,\n 'role' | 'label' | 'valueMax' | 'valueNow' | 'valueMin' | 'valueText'\n > = {\n role: 'progressbar',\n label: accessibilityLabel ?? label,\n valueNow: percentageProgressValue,\n valueText: `${percentageProgressValue}%`,\n valueMin: min,\n valueMax: max,\n };\n\n if (isMeter) {\n accessibilityProps.role = 'meter';\n accessibilityProps.valueNow = progressValue;\n accessibilityProps.valueText = `${progressValue}`;\n }\n\n if (isIndeterminate) {\n accessibilityProps.valueNow = undefined;\n accessibilityProps.valueMin = undefined;\n accessibilityProps.valueMax = undefined;\n accessibilityProps.valueText = undefined;\n }\n\n return (\n <BaseBox\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.ProgressBar, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox display=\"flex\" flexDirection=\"column\" width=\"100%\">\n {!isCircular ? (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={hasLabel ? 'space-between' : 'flex-end'}\n >\n {hasLabel ? (\n <Text as=\"label\" variant=\"body\" size=\"small\" color=\"surface.text.gray.subtle\">\n {label}\n </Text>\n ) : null}\n {shouldShowPercentage ? (\n <BaseBox marginBottom=\"spacing.2\">\n <Text\n variant=\"body\"\n size=\"small\"\n color=\"surface.text.gray.subtle\"\n >{`${percentageProgressValue}%`}</Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n ) : null}\n\n <BaseBox\n id={id}\n {...makeAccessible({\n role: accessibilityProps.role,\n label: accessibilityProps.label,\n valueNow: accessibilityProps.valueNow,\n valueText: accessibilityProps.valueText,\n valueMin: accessibilityProps.valueMin,\n valueMax: accessibilityProps.valueMax,\n })}\n >\n {isCircular ? (\n <CircularProgressBarFilled\n size={size}\n label={label}\n progressPercent={percentageProgressValue}\n isMeter={isMeter}\n showPercentage={showPercentage}\n backgroundColor={unfilledBackgroundColor as string}\n fillColor={filledBackgroundColor}\n pulseMotionDuration=\"duration.2xgentle\"\n fillMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.standard.revealing\"\n />\n ) : (\n <BaseBox\n backgroundColor={unfilledBackgroundColor}\n height={makeSize(progressBarHeight[size])}\n overflow=\"hidden\"\n position=\"relative\"\n >\n <ProgressBarFilled\n backgroundColor={filledBackgroundColor}\n progress={percentageProgressValue}\n fillMotionDuration=\"duration.2xgentle\"\n pulseMotionDuration=\"duration.2xgentle\"\n indeterminateMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.standard.revealing\"\n type={progressType}\n isIndeterminate={isIndeterminate}\n />\n </BaseBox>\n )}\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nexport type { ProgressBarProps, ProgressBarVariant };\nexport { ProgressBar };\n"],"names":["progressBarHeight","small","size","medium","large","ProgressBar","_ref","_label$trim","accessibilityLabel","color","type","_ref$isIndeterminate","isIndeterminate","label","_ref$showPercentage","showPercentage","_ref$size","_ref$value","value","_ref$variant","variant","_ref$min","min","_ref$max","max","testID","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","progressType","progressVariant","id","useId","concat","throwBladeError","moduleName","message","unfilledBackgroundColor","colors","feedback","background","neutral","subtle","filledBackgroundColor","intense","surface","primary","hasLabel","trim","length","isMeter","isCircular","progressValue","clamp","percentageValue","percentageProgressValue","parseFloat","toFixed","Math","floor","shouldShowPercentage","accessibilityProps","role","valueNow","valueText","valueMin","valueMax","undefined","_jsx","BaseBox","_objectSpread","getStyledProps","metaAttribute","name","MetaConstants","makeAnalyticsAttribute","children","_jsxs","display","flexDirection","width","justifyContent","Text","as","marginBottom","makeAccessible","CircularProgressBarFilled","progressPercent","backgroundColor","fillColor","pulseMotionDuration","fillMotionDuration","pulseMotionDelay","motionEasing","height","makeSize","overflow","position","ProgressBarFilled","progress","indeterminateMotionDuration"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwGA,IAAMA,iBAA2E,GAAG;AAClFC,EAAAA,KAAK,EAAEC,IAAI,CAAC,CAAC,CAAC;AACdC,EAAAA,MAAM,EAAED,IAAI,CAAC,CAAC,CAAC;AACf;EACAE,KAAK,EAAEF,IAAI,CAAC,CAAC,CAAA;AACf,CAAC,CAAA;AAED,IAAMG,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAcqB;AAAA,EAAA,IAAAC,WAAA,CAAA;AAAA,EAAA,IAbpCC,kBAAkB,GAAAF,IAAA,CAAlBE,kBAAkB;IAClBC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;IAAAC,oBAAA,GAAAL,IAAA,CACJM,eAAe;AAAfA,IAAAA,eA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EAAE9C,qBAAsB;AACjC+C,UAAAA,mBAAmB,EAAC,mBAAmB;AACvCC,UAAAA,kBAAkB,EAAC,mBAAmB;AACtCC,UAAAA,gBAAgB,EAAC,YAAY;AAC7BC,UAAAA,YAAY,EAAC,2BAAA;AAA2B,SACzC,CAAC,gBAEFzB,GAAA,CAACC,OAAO,EAAA;AACNmB,UAAAA,eAAe,EAAEnD,uBAAwB;AACzCyD,UAAAA,MAAM,EAAEC,QAAQ,CAAClG,iBAAiB,CAACE,IAAI,CAAC,CAAE;AAC1CiG,UAAAA,QAAQ,EAAC,QAAQ;AACjBC,UAAAA,QAAQ,EAAC,UAAU;UAAArB,QAAA,eAEnBR,GAAA,CAAC8B,iBAAiB,EAAA;AAChBV,YAAAA,eAAe,EAAE7C,qBAAsB;AACvCwD,YAAAA,QAAQ,EAAE5C,uBAAwB;AAClCoC,YAAAA,kBAAkB,EAAC,mBAAmB;AACtCD,YAAAA,mBAAmB,EAAC,mBAAmB;AACvCU,YAAAA,2BAA2B,EAAC,mBAAmB;AAC/CR,YAAAA,gBAAgB,EAAC,YAAY;AAC7BC,YAAAA,YAAY,EAAC,2BAA2B;AACxCtF,YAAAA,IAAI,EAAEsB,YAAa;AACnBpB,YAAAA,eAAe,EAAEA,eAAAA;WAClB,CAAA;SACM,CAAA;AACV,OAAA,CACM,CAAC,CAAA;KACH,CAAA;AAAC,GAAA,CACH,CAAC,CAAA;AAEd;;;;"}
1
+ {"version":3,"file":"ProgressBar.js","sources":["../../../../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement, Ref } from 'react';\nimport { ProgressBarFilled } from './ProgressBarFilled';\nimport { CircularProgressBarFilled } from './CircularProgressBar';\nimport clamp from '~utils/lodashButBetter/clamp';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { Text } from '~components/Typography/Text';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useId } from '~utils/useId';\nimport { useTheme } from '~components/BladeProvider';\nimport type { BaseBoxProps } from '~components/Box/BaseBox';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { size } from '~tokens/global';\nimport type { DataAnalyticsAttribute, BladeElementRef, TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype ProgressBarCommonProps = {\n /**\n * Sets aria-label to help users know what the progress bar is for. Default value is the same as the `label` passed.\n */\n accessibilityLabel?: string;\n /**\n * Sets the color of the progress bar which changes the feedback color.\n */\n color?: FeedbackColors;\n /**\n * Sets the type of the progress bar.\n * @default 'progress'\n */\n type?: 'meter' | 'progress';\n /**\n * Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.\n */\n label?: string;\n /**\n * Sets the size of the progress bar.\n * Note: 'large' size isn't available when the variant is 'linear'.\n * @default 'small'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Sets the progress value of the progress bar.\n * @default 'small'\n */\n value?: number;\n /**\n * Sets the minimum value for the progress bar.\n * @default 0\n */\n min?: number;\n /**\n * Sets the maximum value for the progress bar.\n * @default 100\n */\n max?: number;\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\ntype ProgressBarVariant = 'progress' | 'meter' | 'linear' | 'circular';\n\ntype ProgressBarProgressProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for the progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'progress' | 'linear' | 'circular'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: boolean;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default true\n */\n showPercentage?: boolean;\n};\n\ntype ProgressBarMeterProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for thr progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'meter' | 'linear' | 'circular'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: undefined;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default false\n */\n showPercentage?: undefined;\n};\n\ntype ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;\n\nconst progressBarHeight: Record<NonNullable<ProgressBarProps['size']>, 2 | 4 | 0> = {\n small: size[2],\n medium: size[4],\n // Large size isn't available when variant is 'linear'\n large: size[0],\n};\n\nconst _ProgressBar = (\n {\n accessibilityLabel,\n color,\n type,\n isIndeterminate = false,\n label,\n showPercentage = true,\n size = 'small',\n value = 0,\n variant = 'progress',\n min = 0,\n max = 100,\n testID,\n ...rest\n }: ProgressBarProps,\n ref: Ref<BladeElementRef>,\n): ReactElement => {\n const { theme } = useTheme();\n const progressType = !type && (variant === 'meter' || variant === 'progress') ? variant : type;\n const progressVariant = variant === 'meter' || variant === 'progress' ? 'linear' : variant;\n const id = useId(`${progressType}-${progressVariant}`);\n\n if (__DEV__) {\n if (progressType === 'meter' && isIndeterminate) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Cannot set 'isIndeterminate' when 'type' or 'variant' is 'meter'.`,\n });\n }\n\n if (progressVariant === 'circular' && isIndeterminate) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Cannot set 'isIndeterminate' when 'variant' is 'circular'.`,\n });\n }\n\n if (progressVariant === 'linear' && size === 'large') {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Large size isn't available when 'variant' is 'linear'.`,\n });\n }\n\n if (type && (variant === 'progress' || variant === 'meter')) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `variant can only be 'linear' or 'circular' when 'type=${type}'.`,\n });\n }\n }\n\n const unfilledBackgroundColor = theme.colors.feedback.background.neutral\n .subtle as BaseBoxProps['backgroundColor'];\n const filledBackgroundColor = color\n ? theme.colors.feedback.background[color].intense\n : theme.colors.surface.background.primary.intense;\n const hasLabel = label && label.trim()?.length > 0;\n const isMeter = progressType === 'meter';\n const isCircular = progressVariant === 'circular';\n const progressValue = clamp(value, min, max);\n const percentageValue = ((progressValue - min) * 100) / (max - min);\n const percentageProgressValue = isMeter\n ? parseFloat(percentageValue.toFixed(1))\n : Math.floor(percentageValue);\n const shouldShowPercentage = showPercentage && !isMeter && !isIndeterminate;\n const accessibilityProps: Pick<\n AccessibilityProps,\n 'role' | 'label' | 'valueMax' | 'valueNow' | 'valueMin' | 'valueText'\n > = {\n role: 'progressbar',\n label: accessibilityLabel ?? label,\n valueNow: percentageProgressValue,\n valueText: `${percentageProgressValue}%`,\n valueMin: min,\n valueMax: max,\n };\n\n if (isMeter) {\n accessibilityProps.role = 'meter';\n accessibilityProps.valueNow = progressValue;\n accessibilityProps.valueText = `${progressValue}`;\n }\n\n if (isIndeterminate) {\n accessibilityProps.valueNow = undefined;\n accessibilityProps.valueMin = undefined;\n accessibilityProps.valueMax = undefined;\n accessibilityProps.valueText = undefined;\n }\n\n return (\n <BaseBox\n ref={ref as never}\n {...getStyledProps(rest)}\n {...metaAttribute({ name: MetaConstants.ProgressBar, testID })}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox display=\"flex\" flexDirection=\"column\" width=\"100%\">\n {!isCircular ? (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={hasLabel ? 'space-between' : 'flex-end'}\n >\n {hasLabel ? (\n <Text as=\"label\" variant=\"body\" size=\"small\" color=\"surface.text.gray.subtle\">\n {label}\n </Text>\n ) : null}\n {shouldShowPercentage ? (\n <BaseBox marginBottom=\"spacing.2\">\n <Text\n variant=\"body\"\n size=\"small\"\n color=\"surface.text.gray.subtle\"\n >{`${percentageProgressValue}%`}</Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n ) : null}\n\n <BaseBox\n id={id}\n {...makeAccessible({\n role: accessibilityProps.role,\n label: accessibilityProps.label,\n valueNow: accessibilityProps.valueNow,\n valueText: accessibilityProps.valueText,\n valueMin: accessibilityProps.valueMin,\n valueMax: accessibilityProps.valueMax,\n })}\n >\n {isCircular ? (\n <CircularProgressBarFilled\n size={size}\n label={label}\n progressPercent={percentageProgressValue}\n isMeter={isMeter}\n showPercentage={showPercentage}\n backgroundColor={unfilledBackgroundColor as string}\n fillColor={filledBackgroundColor}\n pulseMotionDuration=\"duration.2xgentle\"\n fillMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.emphasized\"\n />\n ) : (\n <BaseBox\n backgroundColor={unfilledBackgroundColor}\n height={makeSize(progressBarHeight[size])}\n overflow=\"hidden\"\n position=\"relative\"\n >\n <ProgressBarFilled\n backgroundColor={filledBackgroundColor}\n progress={percentageProgressValue}\n fillMotionDuration=\"duration.2xgentle\"\n pulseMotionDuration=\"duration.2xgentle\"\n indeterminateMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.emphasized\"\n type={progressType}\n isIndeterminate={isIndeterminate}\n />\n </BaseBox>\n )}\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst ProgressBar = React.forwardRef(_ProgressBar);\n\nexport type { ProgressBarProps, ProgressBarVariant };\nexport { ProgressBar };\n"],"names":["progressBarHeight","small","size","medium","large","_ProgressBar","_ref","ref","_label$trim","accessibilityLabel","color","type","_ref$isIndeterminate","isIndeterminate","label","_ref$showPercentage","showPercentage","_ref$size","_ref$value","value","_ref$variant","variant","_ref$min","min","_ref$max","max","testID","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","progressType","progressVariant","id","useId","concat","throwBladeError","moduleName","message","unfilledBackgroundColor","colors","feedback","background","neutral","subtle","filledBackgroundColor","intense","surface","primary","hasLabel","trim","length","isMeter","isCircular","progressValue","clamp","percentageValue","percentageProgressValue","parseFloat","toFixed","Math","floor","shouldShowPercentage","accessibilityProps","role","valueNow","valueText","valueMin","valueMax","undefined","_jsx","BaseBox","_objectSpread","getStyledProps","metaAttribute","name","MetaConstants","ProgressBar","makeAnalyticsAttribute","children","_jsxs","display","flexDirection","width","justifyContent","Text","as","marginBottom","makeAccessible","CircularProgressBarFilled","progressPercent","backgroundColor","fillColor","pulseMotionDuration","fillMotionDuration","pulseMotionDelay","motionEasing","height","makeSize","overflow","position","ProgressBarFilled","progress","indeterminateMotionDuration","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,IAAMA,iBAA2E,GAAG;AAClFC,EAAAA,KAAK,EAAEC,IAAI,CAAC,CAAC,CAAC;AACdC,EAAAA,MAAM,EAAED,IAAI,CAAC,CAAC,CAAC;AACf;EACAE,KAAK,EAAEF,IAAI,CAAC,CAAC,CAAA;AACf,CAAC,CAAA;AAED,IAAMG,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAgBhBC,GAAyB,EACR;AAAA,EAAA,IAAAC,WAAA,CAAA;AAAA,EAAA,IAffC,kBAAkB,GAAAH,IAAA,CAAlBG,kBAAkB;IAClBC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,IAAI,GAAAL,IAAA,CAAJK,IAAI;IAAAC,oBAAA,GAAAN,IAAA,CACJO,eAAe;AAAfA,IAAAA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,oBAAA;IACvBE,KAAK,GAAAR,IAAA,CAALQ,KAAK;IAAAC,mBAAA,GAAAT,IAAA,CACLU,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;IAAAE,SAAA,GAAAX,IAAA,CACrBJ,IAAI;AAAJA,IAAAA,IAAI,GAAAe,SAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,SAAA;IAAAC,UAAA,GAAAZ,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E,IAAI,CAAC,CAAE;AAC1CmG,UAAAA,QAAQ,EAAC,QAAQ;AACjBC,UAAAA,QAAQ,EAAC,UAAU;UAAArB,QAAA,eAEnBT,GAAA,CAAC+B,iBAAiB,EAAA;AAChBV,YAAAA,eAAe,EAAE9C,qBAAsB;AACvCyD,YAAAA,QAAQ,EAAE7C,uBAAwB;AAClCqC,YAAAA,kBAAkB,EAAC,mBAAmB;AACtCD,YAAAA,mBAAmB,EAAC,mBAAmB;AACvCU,YAAAA,2BAA2B,EAAC,mBAAmB;AAC/CR,YAAAA,gBAAgB,EAAC,YAAY;AAC7BC,YAAAA,YAAY,EAAC,mBAAmB;AAChCvF,YAAAA,IAAI,EAAEsB,YAAa;AACnBpB,YAAAA,eAAe,EAAEA,eAAAA;WAClB,CAAA;SACM,CAAA;AACV,OAAA,CACM,CAAC,CAAA;KACH,CAAA;AAAC,GAAA,CACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMkE,WAAW,gBAAG2B,cAAK,CAACC,UAAU,CAACtG,YAAY;;;;"}
@@ -16,6 +16,7 @@ import '../../utils/assignWithoutSideEffects/index.js';
16
16
  import '../../utils/index.js';
17
17
  import '../../utils/metaAttribute/index.js';
18
18
  import '../../utils/logger/index.js';
19
+ import { getOuterMotionRef, getInnerMotionRef } from '../../utils/getMotionRefs.js';
19
20
  import '../../utils/makeAnalyticsAttribute/index.js';
20
21
  import { jsx, jsxs } from 'react/jsx-runtime';
21
22
  import useTheme from '../BladeProvider/useTheme.js';
@@ -28,7 +29,7 @@ import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
28
29
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
29
30
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
30
31
 
31
- var _excluded = ["value", "children", "helpText", "isDisabled", "size", "testID"];
32
+ var _excluded = ["value", "children", "helpText", "isDisabled", "size", "testID", "_motionMeta"];
32
33
  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; }
33
34
  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; }
34
35
  var _Radio = function _Radio(_ref, ref) {
@@ -40,6 +41,7 @@ var _Radio = function _Radio(_ref, ref) {
40
41
  _ref$size = _ref.size,
41
42
  size = _ref$size === void 0 ? 'medium' : _ref$size,
42
43
  testID = _ref.testID,
44
+ _motionMeta = _ref._motionMeta,
43
45
  rest = _objectWithoutProperties(_ref, _excluded);
44
46
  var _useTheme = useTheme(),
45
47
  theme = _useTheme.theme;
@@ -90,7 +92,12 @@ var _Radio = function _Radio(_ref, ref) {
90
92
 
91
93
  // radio icon's size & margin + margin-left of SelectorTitle which is 2
92
94
  var helpTextLeftSpacing = makeSize(radioSizes.icon[size].width + theme.spacing[3]);
93
- return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread({}, getStyledProps(rest)), {}, {
95
+ return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread({
96
+ ref: getOuterMotionRef({
97
+ _motionMeta: _motionMeta,
98
+ ref: ref
99
+ })
100
+ }, getStyledProps(rest)), {}, {
94
101
  children: /*#__PURE__*/jsx(SelectorLabel, {
95
102
  componentName: MetaConstants.RadioLabel,
96
103
  inputProps: isReactNative ? inputProps : {},
@@ -108,7 +115,10 @@ var _Radio = function _Radio(_ref, ref) {
108
115
  isDisabled: _isDisabled,
109
116
  hasError: hasError,
110
117
  inputProps: inputProps,
111
- ref: ref
118
+ ref: getInnerMotionRef({
119
+ _motionMeta: _motionMeta,
120
+ ref: ref
121
+ })
112
122
  }, makeAnalyticsAttribute(rest))), /*#__PURE__*/jsx(RadioIcon, {
113
123
  size: _size,
114
124
  isChecked: state.isChecked,