@razorpay/blade 11.38.1 → 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 (637) 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/Icons/RayIcon/RayIcon.js +12 -0
  80. package/build/lib/native/components/Icons/RayIcon/RayIcon.js.map +1 -0
  81. package/build/lib/native/components/Indicator/Indicator.js +7 -6
  82. package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
  83. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
  84. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
  85. package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
  86. package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
  87. package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +3 -3
  88. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +8 -10
  89. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  90. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +9 -8
  91. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
  92. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +1 -1
  93. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  94. package/build/lib/native/components/Link/BaseLink/BaseLink.js +1 -1
  95. package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
  96. package/build/lib/native/components/List/List.js +1 -1
  97. package/build/lib/native/components/List/List.js.map +1 -1
  98. package/build/lib/native/components/List/ListItem.js +8 -10
  99. package/build/lib/native/components/List/ListItem.js.map +1 -1
  100. package/build/lib/native/components/List/ListItemCode.js +3 -9
  101. package/build/lib/native/components/List/ListItemCode.js.map +1 -1
  102. package/build/lib/native/components/List/ListItemText.js +3 -8
  103. package/build/lib/native/components/List/ListItemText.js.map +1 -1
  104. package/build/lib/native/components/Menu/Menu.native.js +4 -10
  105. package/build/lib/native/components/Menu/Menu.native.js.map +1 -1
  106. package/build/lib/native/components/Menu/MenuItem.native.js +4 -10
  107. package/build/lib/native/components/Menu/MenuItem.native.js.map +1 -1
  108. package/build/lib/native/components/Menu/MenuOverlay.native.js +4 -10
  109. package/build/lib/native/components/Menu/MenuOverlay.native.js.map +1 -1
  110. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js +4 -10
  111. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js.map +1 -1
  112. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js +4 -10
  113. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js.map +1 -1
  114. package/build/lib/native/components/Modal/Modal.native.js +4 -9
  115. package/build/lib/native/components/Modal/Modal.native.js.map +1 -1
  116. package/build/lib/native/components/Modal/ModalBody.native.js +3 -8
  117. package/build/lib/native/components/Modal/ModalBody.native.js.map +1 -1
  118. package/build/lib/native/components/Modal/ModalFooter.native.js +3 -8
  119. package/build/lib/native/components/Modal/ModalFooter.native.js.map +1 -1
  120. package/build/lib/native/components/Modal/ModalHeader.native.js +3 -8
  121. package/build/lib/native/components/Modal/ModalHeader.native.js.map +1 -1
  122. package/build/lib/native/components/Morph/Morph.native.js +11 -0
  123. package/build/lib/native/components/Morph/Morph.native.js.map +1 -0
  124. package/build/lib/native/components/Move/Move.native.js +11 -0
  125. package/build/lib/native/components/Move/Move.native.js.map +1 -0
  126. package/build/lib/native/components/Popover/PopoverContent.js +6 -8
  127. package/build/lib/native/components/Popover/PopoverContent.js.map +1 -1
  128. package/build/lib/native/components/Popover/PopoverContentWrapper.native.js +1 -1
  129. package/build/lib/native/components/Popover/PopoverContentWrapper.native.js.map +1 -1
  130. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js +7 -9
  131. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
  132. package/build/lib/native/components/ProgressBar/CircularProgressLabel.js +3 -8
  133. package/build/lib/native/components/ProgressBar/CircularProgressLabel.js.map +1 -1
  134. package/build/lib/native/components/ProgressBar/ProgressBar.js +2 -2
  135. package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
  136. package/build/lib/native/components/Radio/Radio.js +2 -1
  137. package/build/lib/native/components/Radio/Radio.js.map +1 -1
  138. package/build/lib/native/components/Radio/RadioIcon/Fade.native.js +1 -1
  139. package/build/lib/native/components/Radio/RadioIcon/Fade.native.js.map +1 -1
  140. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  141. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  142. package/build/lib/native/components/Scale/Scale.native.js +11 -0
  143. package/build/lib/native/components/Scale/Scale.native.js.map +1 -0
  144. package/build/lib/native/components/SideNav/SideNav.native.js +4 -10
  145. package/build/lib/native/components/SideNav/SideNav.native.js.map +1 -1
  146. package/build/lib/native/components/SideNav/SideNavBody.native.js +4 -10
  147. package/build/lib/native/components/SideNav/SideNavBody.native.js.map +1 -1
  148. package/build/lib/native/components/SideNav/SideNavFooter.native.js +4 -10
  149. package/build/lib/native/components/SideNav/SideNavFooter.native.js.map +1 -1
  150. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js +4 -10
  151. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js.map +1 -1
  152. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js +4 -10
  153. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js.map +1 -1
  154. package/build/lib/native/components/SideNav/SideNavLevel.native.js +4 -10
  155. package/build/lib/native/components/SideNav/SideNavLevel.native.js.map +1 -1
  156. package/build/lib/native/components/SideNav/SideNavSection.native.js +4 -10
  157. package/build/lib/native/components/SideNav/SideNavSection.native.js.map +1 -1
  158. package/build/lib/native/components/SideNav/tokens.js.map +1 -1
  159. package/build/lib/native/components/Skeleton/PulseAnimation.native.js +1 -1
  160. package/build/lib/native/components/Skeleton/PulseAnimation.native.js.map +1 -1
  161. package/build/lib/native/components/Skeleton/Skeleton.js +2 -2
  162. package/build/lib/native/components/Skeleton/Skeleton.js.map +1 -1
  163. package/build/lib/native/components/Slide/Slide.native.js +11 -0
  164. package/build/lib/native/components/Slide/Slide.native.js.map +1 -0
  165. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +4 -3
  166. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  167. package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  168. package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  169. package/build/lib/native/components/Spinner/Spinner/Spinner.js +2 -1
  170. package/build/lib/native/components/Spinner/Spinner/Spinner.js.map +1 -1
  171. package/build/lib/native/components/StepGroup/StepGroup.native.js +4 -10
  172. package/build/lib/native/components/StepGroup/StepGroup.native.js.map +1 -1
  173. package/build/lib/native/components/StepGroup/StepItem.native.js +4 -10
  174. package/build/lib/native/components/StepGroup/StepItem.native.js.map +1 -1
  175. package/build/lib/native/components/Switch/Switch.js +2 -1
  176. package/build/lib/native/components/Switch/Switch.js.map +1 -1
  177. package/build/lib/native/components/Switch/getTrackStyles.js +1 -1
  178. package/build/lib/native/components/Switch/getTrackStyles.js.map +1 -1
  179. package/build/lib/native/components/Switch/switchTokens.js +1 -1
  180. package/build/lib/native/components/Switch/switchTokens.js.map +1 -1
  181. package/build/lib/native/components/Table/Table.native.js +4 -9
  182. package/build/lib/native/components/Table/Table.native.js.map +1 -1
  183. package/build/lib/native/components/Table/TableBody.native.js +3 -8
  184. package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
  185. package/build/lib/native/components/Table/TableEditableCell.native.js +3 -9
  186. package/build/lib/native/components/Table/TableEditableCell.native.js.map +1 -1
  187. package/build/lib/native/components/Table/TableFooter.native.js +3 -8
  188. package/build/lib/native/components/Table/TableFooter.native.js.map +1 -1
  189. package/build/lib/native/components/Table/TableHeader.native.js +3 -8
  190. package/build/lib/native/components/Table/TableHeader.native.js.map +1 -1
  191. package/build/lib/native/components/Table/TablePagination.native.js +3 -8
  192. package/build/lib/native/components/Table/TablePagination.native.js.map +1 -1
  193. package/build/lib/native/components/Table/TableToolbar.native.js +3 -8
  194. package/build/lib/native/components/Table/TableToolbar.native.js.map +1 -1
  195. package/build/lib/native/components/Table/tokens.js.map +1 -1
  196. package/build/lib/native/components/Tabs/Tabs.native.js +6 -8
  197. package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
  198. package/build/lib/native/components/Tag/AnimatedTag.native.js +1 -1
  199. package/build/lib/native/components/Tag/AnimatedTag.native.js.map +1 -1
  200. package/build/lib/native/components/Tag/Tag.js +3 -2
  201. package/build/lib/native/components/Tag/Tag.js.map +1 -1
  202. package/build/lib/native/components/Tooltip/TooltipContent.js +8 -8
  203. package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js +1 -1
  204. package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js.map +1 -1
  205. package/build/lib/native/components/TopNav/TabNav/TabNav.native.js +4 -10
  206. package/build/lib/native/components/TopNav/TabNav/TabNav.native.js.map +1 -1
  207. package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js +4 -10
  208. package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js.map +1 -1
  209. package/build/lib/native/components/TopNav/TopNav.native.js +4 -10
  210. package/build/lib/native/components/TopNav/TopNav.native.js.map +1 -1
  211. package/build/lib/native/components/Typography/Code/Code.js +1 -1
  212. package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
  213. package/build/lib/native/components/Typography/Display/Display.js +2 -2
  214. package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
  215. package/build/lib/native/components/Typography/Heading/Heading.js +2 -2
  216. package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
  217. package/build/lib/native/components/Typography/Text/Text.js +2 -2
  218. package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
  219. package/build/lib/native/components/index.js +6 -0
  220. package/build/lib/native/components/index.js.map +1 -1
  221. package/build/lib/native/tokens/global/motion.js +1 -1
  222. package/build/lib/native/tokens/global/motion.js.map +1 -1
  223. package/build/lib/native/utils/getMotionRefs.js +4 -0
  224. package/build/lib/native/utils/getMotionRefs.js.map +1 -0
  225. package/build/lib/web/development/components/Accordion/Accordion.js +6 -3
  226. package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
  227. package/build/lib/web/development/components/Accordion/commonStyles.js +1 -1
  228. package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
  229. package/build/lib/web/development/components/ActionList/ActionList.js +3 -0
  230. package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
  231. package/build/lib/web/development/components/Alert/Alert.js +6 -3
  232. package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
  233. package/build/lib/web/development/components/Amount/Amount.js +3 -2
  234. package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
  235. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
  236. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
  237. package/build/lib/web/development/components/Badge/Badge.js +4 -2
  238. package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
  239. package/build/lib/web/development/components/BaseMotion/BaseMotion.js +123 -0
  240. package/build/lib/web/development/components/BaseMotion/BaseMotion.js.map +1 -0
  241. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js +60 -0
  242. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js.map +1 -0
  243. package/build/lib/web/development/components/BaseMotion/index.js +3 -0
  244. package/build/lib/web/development/components/BaseMotion/index.js.map +1 -0
  245. package/build/lib/web/development/components/BaseMotion/types.js +2 -0
  246. package/build/lib/web/development/components/BaseMotion/types.js.map +1 -0
  247. package/build/lib/web/development/components/BottomNav/BottomNav.web.js +4 -2
  248. package/build/lib/web/development/components/BottomNav/BottomNav.web.js.map +1 -1
  249. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +1 -1
  250. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
  251. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
  252. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  253. package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  254. package/build/lib/web/development/components/Box/Box.js +2 -2
  255. package/build/lib/web/development/components/Box/Box.js.map +1 -1
  256. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +3 -1
  257. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  258. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +1 -1
  259. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  260. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +1 -1
  261. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  262. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +3 -2
  263. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  264. package/build/lib/web/development/components/Card/Card.js +3 -1
  265. package/build/lib/web/development/components/Card/Card.js.map +1 -1
  266. package/build/lib/web/development/components/Card/CardRoot.web.js +6 -4
  267. package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
  268. package/build/lib/web/development/components/Carousel/Carousel.web.js +6 -3
  269. package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
  270. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  271. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  272. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  273. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  274. package/build/lib/web/development/components/Checkbox/Checkbox.js +13 -3
  275. package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
  276. package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
  277. package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
  278. package/build/lib/web/development/components/Chip/Chip.js +11 -2
  279. package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
  280. package/build/lib/web/development/components/Chip/ChipGroup.js +5 -2
  281. package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
  282. package/build/lib/web/development/components/Chip/chipTokens.js +1 -1
  283. package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
  284. package/build/lib/web/development/components/Collapsible/Collapsible.js +6 -3
  285. package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
  286. package/build/lib/web/development/components/Collapsible/commonStyles.js +2 -2
  287. package/build/lib/web/development/components/Collapsible/commonStyles.js.map +1 -1
  288. package/build/lib/web/development/components/Counter/Counter.js +4 -2
  289. package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
  290. package/build/lib/web/development/components/Divider/Divider.js +4 -2
  291. package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
  292. package/build/lib/web/development/components/Drawer/Drawer.web.js +4 -4
  293. package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
  294. package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -3
  295. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  296. package/build/lib/web/development/components/Fade/Fade.web.js +62 -0
  297. package/build/lib/web/development/components/Fade/Fade.web.js.map +1 -0
  298. package/build/lib/web/development/components/Fade/index.js +2 -0
  299. package/build/lib/web/development/components/Fade/index.js.map +1 -0
  300. package/build/lib/web/development/components/FileUpload/FileUpload.web.js +11 -2
  301. package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
  302. package/build/lib/web/development/components/FileUpload/fileUploadTokens.js +1 -1
  303. package/build/lib/web/development/components/FileUpload/fileUploadTokens.js.map +1 -1
  304. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +1 -1
  305. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
  306. package/build/lib/web/development/components/Icons/RayIcon/RayIcon.js +37 -0
  307. package/build/lib/web/development/components/Icons/RayIcon/RayIcon.js.map +1 -0
  308. package/build/lib/web/development/components/Icons/RayIcon/index.js +2 -0
  309. package/build/lib/web/development/components/Icons/RayIcon/index.js.map +1 -0
  310. package/build/lib/web/development/components/Icons/index.js +1 -0
  311. package/build/lib/web/development/components/Icons/index.js.map +1 -1
  312. package/build/lib/web/development/components/Indicator/Indicator.js +4 -2
  313. package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
  314. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  315. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  316. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +21 -7
  317. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
  318. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +2 -2
  319. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  320. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +1 -1
  321. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
  322. package/build/lib/web/development/components/List/List.js +5 -3
  323. package/build/lib/web/development/components/List/List.js.map +1 -1
  324. package/build/lib/web/development/components/Modal/Modal.web.js +2 -2
  325. package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
  326. package/build/lib/web/development/components/Modal/ModalBackdrop.js +2 -2
  327. package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
  328. package/build/lib/web/development/components/Morph/Morph.web.js +48 -0
  329. package/build/lib/web/development/components/Morph/Morph.web.js.map +1 -0
  330. package/build/lib/web/development/components/Morph/index.js +2 -0
  331. package/build/lib/web/development/components/Morph/index.js.map +1 -0
  332. package/build/lib/web/development/components/Move/Move.web.js +66 -0
  333. package/build/lib/web/development/components/Move/Move.web.js.map +1 -0
  334. package/build/lib/web/development/components/Move/index.js +2 -0
  335. package/build/lib/web/development/components/Move/index.js.map +1 -0
  336. package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js +1 -1
  337. package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
  338. package/build/lib/web/development/components/ProgressBar/ProgressBar.js +8 -4
  339. package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
  340. package/build/lib/web/development/components/Radio/Radio.js +13 -3
  341. package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
  342. package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js +3 -3
  343. package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js.map +1 -1
  344. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  345. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  346. package/build/lib/web/development/components/Scale/Scale.web.js +47 -0
  347. package/build/lib/web/development/components/Scale/Scale.web.js.map +1 -0
  348. package/build/lib/web/development/components/Scale/index.js +2 -0
  349. package/build/lib/web/development/components/Scale/index.js.map +1 -0
  350. package/build/lib/web/development/components/SideNav/SideNav.web.js +7 -5
  351. package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
  352. package/build/lib/web/development/components/SideNav/tokens.js +1 -1
  353. package/build/lib/web/development/components/SideNav/tokens.js.map +1 -1
  354. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js +1 -1
  355. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js.map +1 -1
  356. package/build/lib/web/development/components/Skeleton/Skeleton.js +4 -1
  357. package/build/lib/web/development/components/Skeleton/Skeleton.js.map +1 -1
  358. package/build/lib/web/development/components/Slide/Slide.web.js +119 -0
  359. package/build/lib/web/development/components/Slide/Slide.web.js.map +1 -0
  360. package/build/lib/web/development/components/Slide/index.js +2 -0
  361. package/build/lib/web/development/components/Slide/index.js.map +1 -0
  362. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
  363. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  364. package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  365. package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  366. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +4 -1
  367. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
  368. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  369. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  370. package/build/lib/web/development/components/Stagger/StaggerProvider.js +13 -0
  371. package/build/lib/web/development/components/Stagger/StaggerProvider.js.map +1 -0
  372. package/build/lib/web/development/components/StepGroup/StepGroup.web.js +5 -3
  373. package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
  374. package/build/lib/web/development/components/StepGroup/StepItem.web.js +1 -1
  375. package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
  376. package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js +1 -1
  377. package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
  378. package/build/lib/web/development/components/Switch/Switch.js +13 -3
  379. package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
  380. package/build/lib/web/development/components/Switch/getTrackStyles.js +1 -1
  381. package/build/lib/web/development/components/Switch/getTrackStyles.js.map +1 -1
  382. package/build/lib/web/development/components/Switch/switchTokens.js +6 -6
  383. package/build/lib/web/development/components/Switch/switchTokens.js.map +1 -1
  384. package/build/lib/web/development/components/Table/Table.web.js +4 -2
  385. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  386. package/build/lib/web/development/components/Table/tokens.js +2 -2
  387. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  388. package/build/lib/web/development/components/Tabs/TabIndicator.web.js +1 -1
  389. package/build/lib/web/development/components/Tabs/TabIndicator.web.js.map +1 -1
  390. package/build/lib/web/development/components/Tabs/TabItem.web.js +2 -2
  391. package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
  392. package/build/lib/web/development/components/Tabs/Tabs.web.js +34 -1
  393. package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
  394. package/build/lib/web/development/components/Tag/AnimatedTag.web.js +2 -2
  395. package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
  396. package/build/lib/web/development/components/Tag/Tag.js +31 -29
  397. package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
  398. package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
  399. package/build/lib/web/development/components/Toast/Toast.web.js.map +1 -1
  400. package/build/lib/web/development/components/Toast/ToastContainer.web.js +1 -1
  401. package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
  402. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  403. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  404. package/build/lib/web/development/components/TopNav/TopNav.web.js +4 -2
  405. package/build/lib/web/development/components/TopNav/TopNav.web.js.map +1 -1
  406. package/build/lib/web/development/components/Typography/Code/Code.js +30 -27
  407. package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
  408. package/build/lib/web/development/components/Typography/Display/Display.js +6 -2
  409. package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
  410. package/build/lib/web/development/components/Typography/Heading/Heading.js +4 -1
  411. package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
  412. package/build/lib/web/development/components/Typography/Text/Text.js +6 -10
  413. package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
  414. package/build/lib/web/development/components/index.js +11 -0
  415. package/build/lib/web/development/components/index.js.map +1 -1
  416. package/build/lib/web/development/tokens/global/motion.js +22 -28
  417. package/build/lib/web/development/tokens/global/motion.js.map +1 -1
  418. package/build/lib/web/development/utils/cssBezierToArray.js +12 -0
  419. package/build/lib/web/development/utils/cssBezierToArray.js.map +1 -0
  420. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
  421. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  422. package/build/lib/web/development/utils/getMotionRefs.js +86 -0
  423. package/build/lib/web/development/utils/getMotionRefs.js.map +1 -0
  424. package/build/lib/web/development/utils/msToSeconds.js +6 -0
  425. package/build/lib/web/development/utils/msToSeconds.js.map +1 -0
  426. package/build/lib/web/production/components/Accordion/Accordion.js +6 -3
  427. package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
  428. package/build/lib/web/production/components/Accordion/commonStyles.js +1 -1
  429. package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
  430. package/build/lib/web/production/components/ActionList/ActionList.js +3 -0
  431. package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
  432. package/build/lib/web/production/components/Alert/Alert.js +6 -3
  433. package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
  434. package/build/lib/web/production/components/Amount/Amount.js +3 -2
  435. package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
  436. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
  437. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
  438. package/build/lib/web/production/components/Badge/Badge.js +4 -2
  439. package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
  440. package/build/lib/web/production/components/BaseMotion/BaseMotion.js +123 -0
  441. package/build/lib/web/production/components/BaseMotion/BaseMotion.js.map +1 -0
  442. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js +60 -0
  443. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js.map +1 -0
  444. package/build/lib/web/production/components/BaseMotion/index.js +3 -0
  445. package/build/lib/web/production/components/BaseMotion/index.js.map +1 -0
  446. package/build/lib/web/production/components/BaseMotion/types.js +2 -0
  447. package/build/lib/web/production/components/BaseMotion/types.js.map +1 -0
  448. package/build/lib/web/production/components/BottomNav/BottomNav.web.js +4 -2
  449. package/build/lib/web/production/components/BottomNav/BottomNav.web.js.map +1 -1
  450. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +1 -1
  451. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
  452. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
  453. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  454. package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  455. package/build/lib/web/production/components/Box/Box.js +2 -2
  456. package/build/lib/web/production/components/Box/Box.js.map +1 -1
  457. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +3 -1
  458. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  459. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +1 -1
  460. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  461. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +1 -1
  462. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  463. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +3 -2
  464. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  465. package/build/lib/web/production/components/Card/Card.js +3 -1
  466. package/build/lib/web/production/components/Card/Card.js.map +1 -1
  467. package/build/lib/web/production/components/Card/CardRoot.web.js +6 -4
  468. package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
  469. package/build/lib/web/production/components/Carousel/Carousel.web.js +6 -3
  470. package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
  471. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  472. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  473. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  474. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  475. package/build/lib/web/production/components/Checkbox/Checkbox.js +13 -3
  476. package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
  477. package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
  478. package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
  479. package/build/lib/web/production/components/Chip/Chip.js +11 -2
  480. package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
  481. package/build/lib/web/production/components/Chip/ChipGroup.js +5 -2
  482. package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
  483. package/build/lib/web/production/components/Chip/chipTokens.js +1 -1
  484. package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
  485. package/build/lib/web/production/components/Collapsible/Collapsible.js +6 -3
  486. package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
  487. package/build/lib/web/production/components/Collapsible/commonStyles.js +2 -2
  488. package/build/lib/web/production/components/Collapsible/commonStyles.js.map +1 -1
  489. package/build/lib/web/production/components/Counter/Counter.js +4 -2
  490. package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
  491. package/build/lib/web/production/components/Divider/Divider.js +4 -2
  492. package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
  493. package/build/lib/web/production/components/Drawer/Drawer.web.js +4 -4
  494. package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
  495. package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -3
  496. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  497. package/build/lib/web/production/components/Fade/Fade.web.js +62 -0
  498. package/build/lib/web/production/components/Fade/Fade.web.js.map +1 -0
  499. package/build/lib/web/production/components/Fade/index.js +2 -0
  500. package/build/lib/web/production/components/Fade/index.js.map +1 -0
  501. package/build/lib/web/production/components/FileUpload/FileUpload.web.js +11 -2
  502. package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
  503. package/build/lib/web/production/components/FileUpload/fileUploadTokens.js +1 -1
  504. package/build/lib/web/production/components/FileUpload/fileUploadTokens.js.map +1 -1
  505. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +1 -1
  506. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
  507. package/build/lib/web/production/components/Icons/RayIcon/RayIcon.js +37 -0
  508. package/build/lib/web/production/components/Icons/RayIcon/RayIcon.js.map +1 -0
  509. package/build/lib/web/production/components/Icons/RayIcon/index.js +2 -0
  510. package/build/lib/web/production/components/Icons/RayIcon/index.js.map +1 -0
  511. package/build/lib/web/production/components/Icons/index.js +1 -0
  512. package/build/lib/web/production/components/Icons/index.js.map +1 -1
  513. package/build/lib/web/production/components/Indicator/Indicator.js +4 -2
  514. package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
  515. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  516. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  517. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +21 -7
  518. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
  519. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +2 -2
  520. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  521. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +1 -1
  522. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
  523. package/build/lib/web/production/components/List/List.js +5 -3
  524. package/build/lib/web/production/components/List/List.js.map +1 -1
  525. package/build/lib/web/production/components/Modal/Modal.web.js +2 -2
  526. package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
  527. package/build/lib/web/production/components/Modal/ModalBackdrop.js +2 -2
  528. package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
  529. package/build/lib/web/production/components/Morph/Morph.web.js +48 -0
  530. package/build/lib/web/production/components/Morph/Morph.web.js.map +1 -0
  531. package/build/lib/web/production/components/Morph/index.js +2 -0
  532. package/build/lib/web/production/components/Morph/index.js.map +1 -0
  533. package/build/lib/web/production/components/Move/Move.web.js +66 -0
  534. package/build/lib/web/production/components/Move/Move.web.js.map +1 -0
  535. package/build/lib/web/production/components/Move/index.js +2 -0
  536. package/build/lib/web/production/components/Move/index.js.map +1 -0
  537. package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js +1 -1
  538. package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
  539. package/build/lib/web/production/components/ProgressBar/ProgressBar.js +8 -4
  540. package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
  541. package/build/lib/web/production/components/Radio/Radio.js +13 -3
  542. package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
  543. package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js +3 -3
  544. package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js.map +1 -1
  545. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  546. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  547. package/build/lib/web/production/components/Scale/Scale.web.js +47 -0
  548. package/build/lib/web/production/components/Scale/Scale.web.js.map +1 -0
  549. package/build/lib/web/production/components/Scale/index.js +2 -0
  550. package/build/lib/web/production/components/Scale/index.js.map +1 -0
  551. package/build/lib/web/production/components/SideNav/SideNav.web.js +7 -5
  552. package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
  553. package/build/lib/web/production/components/SideNav/tokens.js +1 -1
  554. package/build/lib/web/production/components/SideNav/tokens.js.map +1 -1
  555. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js +1 -1
  556. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js.map +1 -1
  557. package/build/lib/web/production/components/Skeleton/Skeleton.js +4 -1
  558. package/build/lib/web/production/components/Skeleton/Skeleton.js.map +1 -1
  559. package/build/lib/web/production/components/Slide/Slide.web.js +119 -0
  560. package/build/lib/web/production/components/Slide/Slide.web.js.map +1 -0
  561. package/build/lib/web/production/components/Slide/index.js +2 -0
  562. package/build/lib/web/production/components/Slide/index.js.map +1 -0
  563. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
  564. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  565. package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  566. package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  567. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +4 -1
  568. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
  569. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  570. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  571. package/build/lib/web/production/components/Stagger/StaggerProvider.js +13 -0
  572. package/build/lib/web/production/components/Stagger/StaggerProvider.js.map +1 -0
  573. package/build/lib/web/production/components/StepGroup/StepGroup.web.js +5 -3
  574. package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
  575. package/build/lib/web/production/components/StepGroup/StepItem.web.js +1 -1
  576. package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
  577. package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js +1 -1
  578. package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
  579. package/build/lib/web/production/components/Switch/Switch.js +13 -3
  580. package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
  581. package/build/lib/web/production/components/Switch/getTrackStyles.js +1 -1
  582. package/build/lib/web/production/components/Switch/getTrackStyles.js.map +1 -1
  583. package/build/lib/web/production/components/Switch/switchTokens.js +6 -6
  584. package/build/lib/web/production/components/Switch/switchTokens.js.map +1 -1
  585. package/build/lib/web/production/components/Table/Table.web.js +4 -2
  586. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  587. package/build/lib/web/production/components/Table/tokens.js +2 -2
  588. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  589. package/build/lib/web/production/components/Tabs/TabIndicator.web.js +1 -1
  590. package/build/lib/web/production/components/Tabs/TabIndicator.web.js.map +1 -1
  591. package/build/lib/web/production/components/Tabs/TabItem.web.js +2 -2
  592. package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
  593. package/build/lib/web/production/components/Tabs/Tabs.web.js +34 -1
  594. package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
  595. package/build/lib/web/production/components/Tag/AnimatedTag.web.js +2 -2
  596. package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
  597. package/build/lib/web/production/components/Tag/Tag.js +31 -29
  598. package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
  599. package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
  600. package/build/lib/web/production/components/Toast/Toast.web.js.map +1 -1
  601. package/build/lib/web/production/components/Toast/ToastContainer.web.js +1 -1
  602. package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
  603. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  604. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  605. package/build/lib/web/production/components/TopNav/TopNav.web.js +4 -2
  606. package/build/lib/web/production/components/TopNav/TopNav.web.js.map +1 -1
  607. package/build/lib/web/production/components/Typography/Code/Code.js +30 -27
  608. package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
  609. package/build/lib/web/production/components/Typography/Display/Display.js +6 -2
  610. package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
  611. package/build/lib/web/production/components/Typography/Heading/Heading.js +4 -1
  612. package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
  613. package/build/lib/web/production/components/Typography/Text/Text.js +6 -10
  614. package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
  615. package/build/lib/web/production/components/index.js +11 -0
  616. package/build/lib/web/production/components/index.js.map +1 -1
  617. package/build/lib/web/production/tokens/global/motion.js +22 -28
  618. package/build/lib/web/production/tokens/global/motion.js.map +1 -1
  619. package/build/lib/web/production/utils/cssBezierToArray.js +12 -0
  620. package/build/lib/web/production/utils/cssBezierToArray.js.map +1 -0
  621. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
  622. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  623. package/build/lib/web/production/utils/getMotionRefs.js +86 -0
  624. package/build/lib/web/production/utils/getMotionRefs.js.map +1 -0
  625. package/build/lib/web/production/utils/msToSeconds.js +6 -0
  626. package/build/lib/web/production/utils/msToSeconds.js.map +1 -0
  627. package/build/types/components/index.d.ts +17969 -5488
  628. package/build/types/components/index.native.d.ts +7924 -2157
  629. package/build/types/tokens/index.d.ts +103 -93
  630. package/build/types/tokens/index.native.d.ts +103 -93
  631. package/build/types/utils/index.d.ts +84 -71
  632. package/build/types/utils/index.native.d.ts +84 -71
  633. package/codemods/migrate-motion-tokens/transformers/__tests__/migrate-motion-tokens.test.ts +130 -0
  634. package/codemods/migrate-motion-tokens/transformers/index.ts +1 -0
  635. package/codemods/migrate-motion-tokens/transformers/migrate-motion.ts +24 -0
  636. package/codemods/migrate-motion-tokens/transformers/motionTokenMapping.json +11 -0
  637. package/package.json +3 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TopNav.native.js","sources":["../../../../../src/components/TopNav/TopNav.native.tsx"],"sourcesContent":["import { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst TopNav = (_props: never): React.ReactElement => {\n throwBladeError({\n message: 'TopNav is not yet implemented for native',\n moduleName: 'TopNav',\n });\n\n return <Text>TopNav Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TopNav };\n"],"names":["TopNav","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;;;;;;;AAGM,IAAAA,MAAM,CAAG,SAATA,MAAMA,CAAIC,MAAa,CAAyB,CACpDC,eAAe,CAAC,CACdC,OAAO,CAAE,0CAA0C,CACnDC,UAAU,CAAE,QACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,2DAAyD,CAAM,CAAC,CAC/E;;;;"}
1
+ {"version":3,"file":"TopNav.native.js","sources":["../../../../../src/components/TopNav/TopNav.native.tsx"],"sourcesContent":["import { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst TopNav = (_props: never): React.ReactElement => {\n throwBladeError({\n message: 'TopNav is not yet implemented for native',\n moduleName: 'TopNav',\n });\n\n return <Text>TopNav Component is not available for Native mobile apps.</Text>;\n};\n\nexport { TopNav };\n"],"names":["TopNav","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;AAGM,IAAAA,MAAM,CAAG,SAATA,MAAMA,CAAIC,MAAa,CAAyB,CACpDC,eAAe,CAAC,CACdC,OAAO,CAAE,0CAA0C,CACnDC,UAAU,CAAE,QACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,2DAAyD,CAAM,CAAC,CAC/E;;;;"}
@@ -17,7 +17,7 @@ import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.native
17
17
  import { MetaConstants } from '../../../utils/metaAttribute/metaConstants.js';
18
18
  import { jsx } from 'react/jsx-runtime';
19
19
 
20
- var _excluded=["children","size","weight","isHighlighted","color","testID"];var platformType=getPlatformType();var isPlatformWeb=platformType==='browser'||platformType==='node';var getCodeFontSizeAndLineHeight=function getCodeFontSizeAndLineHeight(size){switch(size){case'medium':return {fontSize:75,lineHeight:75};case'small':return {fontSize:25,lineHeight:25};default:if(__DEV__){throwBladeError({moduleName:'Code',message:`Unexpected size: ${size}`});}return undefined;}};var CodeContainer=styled(BaseBox)(function(props){var padding=`${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;return {padding:padding,backgroundColor:props.isHighlighted?props.theme.colors.feedback.background.neutral.subtle:undefined,borderRadius:props.theme.border.radius.medium,display:isPlatformWeb?'inline-block':'flex',alignSelf:isPlatformWeb?undefined:'center',verticalAlign:'middle',lineHeight:makeTypographySize(props.theme.typography.lineHeights[0])};});var getCodeColor=function getCodeColor(_ref){var isHighlighted=_ref.isHighlighted,color=_ref.color;if(isHighlighted){if(__DEV__){if(color){throwBladeError({moduleName:'Code',message:'`color` prop cannot be used without `isHighlighted={false}`'});}}return 'surface.text.gray.subtle';}if(color){return color;}return 'surface.text.gray.normal';};var Code=function Code(_ref2){var children=_ref2.children,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'regular':_ref2$weight,_ref2$isHighlighted=_ref2.isHighlighted,isHighlighted=_ref2$isHighlighted===void 0?true:_ref2$isHighlighted,color=_ref2.color,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded);var _ref3=getCodeFontSizeAndLineHeight(size),fontSize=_ref3.fontSize,lineHeight=_ref3.lineHeight;var codeTextColor=React__default.useMemo(function(){return getCodeColor({isHighlighted:isHighlighted,color:color});},[isHighlighted,color]);return jsx(CodeContainer,Object.assign({size:size,isHighlighted:isHighlighted,as:isPlatformWeb?'span':undefined},metaAttribute({name:MetaConstants.Code,testID:testID}),getStyledProps(styledProps),{children:jsx(BaseText,{color:codeTextColor,fontFamily:"code",fontSize:fontSize,fontWeight:weight,as:isPlatformWeb?'code':undefined,lineHeight:lineHeight,children:children})}));};
20
+ var _excluded=["children","size","weight","isHighlighted","color","testID"];var platformType=getPlatformType();var isPlatformWeb=platformType==='browser'||platformType==='node';var getCodeFontSizeAndLineHeight=function getCodeFontSizeAndLineHeight(size){switch(size){case'medium':return {fontSize:75,lineHeight:75};case'small':return {fontSize:25,lineHeight:25};default:if(__DEV__){throwBladeError({moduleName:'Code',message:`Unexpected size: ${size}`});}return undefined;}};var CodeContainer=styled(BaseBox)(function(props){var padding=`${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;return {padding:padding,backgroundColor:props.isHighlighted?props.theme.colors.feedback.background.neutral.subtle:undefined,borderRadius:props.theme.border.radius.medium,display:isPlatformWeb?'inline-block':'flex',alignSelf:isPlatformWeb?undefined:'center',verticalAlign:'middle',lineHeight:makeTypographySize(props.theme.typography.lineHeights[0])};});var getCodeColor=function getCodeColor(_ref){var isHighlighted=_ref.isHighlighted,color=_ref.color;if(isHighlighted){if(__DEV__){if(color){throwBladeError({moduleName:'Code',message:'`color` prop cannot be used without `isHighlighted={false}`'});}}return 'surface.text.gray.subtle';}if(color){return color;}return 'surface.text.gray.normal';};var _Code=function _Code(_ref2,ref){var children=_ref2.children,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'regular':_ref2$weight,_ref2$isHighlighted=_ref2.isHighlighted,isHighlighted=_ref2$isHighlighted===void 0?true:_ref2$isHighlighted,color=_ref2.color,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded);var _ref3=getCodeFontSizeAndLineHeight(size),fontSize=_ref3.fontSize,lineHeight=_ref3.lineHeight;var codeTextColor=React__default.useMemo(function(){return getCodeColor({isHighlighted:isHighlighted,color:color});},[isHighlighted,color]);return jsx(CodeContainer,Object.assign({ref:ref,size:size,isHighlighted:isHighlighted,as:isPlatformWeb?'span':undefined},metaAttribute({name:MetaConstants.Code,testID:testID}),getStyledProps(styledProps),{children:jsx(BaseText,{color:codeTextColor,fontFamily:"code",fontSize:fontSize,fontWeight:weight,as:isPlatformWeb?'code':undefined,lineHeight:lineHeight,children:children})}));};var Code=React__default.forwardRef(_Code);
21
21
 
22
22
  export { Code };
23
23
  //# sourceMappingURL=Code.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Code.js","sources":["../../../../../../src/components/Typography/Code/Code.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FontSize, Typography } from '~tokens/global';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { throwBladeError } from '~utils/logger';\n\ntype CodeCommonProps = {\n /**\n * Sets the color of the Heading component.\n */\n children: StringChildrenType;\n /**\n * Decides the fontSize and padding of Code\n *\n * @default small\n */\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'bold'>;\n isHighlighted?: boolean;\n color?: BaseTextProps['color'];\n} & TestID &\n StyledPropsBlade;\n\ntype CodeHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted?: true;\n /**\n * color prop can only be added when `isHighlighted` is set to `false`\n */\n color?: undefined;\n};\n\ntype CodeNonHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted: false;\n /**\n * color prop to set color of text when `isHighlighted` is set to false\n */\n color?: BaseTextProps['color'];\n};\n\nexport type CodeProps = CodeHighlightedProps | CodeNonHighlightedProps;\n\ntype CodeContainerProps = {\n size: CodeProps['size'];\n isHighlighted: CodeProps['isHighlighted'];\n};\n\nconst platformType = getPlatformType();\nconst isPlatformWeb = platformType === 'browser' || platformType === 'node';\n\nconst getCodeFontSizeAndLineHeight = (\n size: CodeProps['size'],\n): { fontSize: keyof FontSize; lineHeight: keyof Typography['lineHeights'] } | undefined => {\n switch (size) {\n case 'medium':\n return { fontSize: 75, lineHeight: 75 };\n case 'small':\n return { fontSize: 25, lineHeight: 25 };\n default:\n if (__DEV__) {\n throwBladeError({\n moduleName: 'Code',\n message: `Unexpected size: ${size}`,\n });\n }\n return undefined;\n }\n};\n\nconst CodeContainer = styled(BaseBox)<CodeContainerProps>((props) => {\n const padding = `${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;\n return {\n padding,\n backgroundColor: props.isHighlighted\n ? props.theme.colors.feedback.background.neutral.subtle\n : undefined,\n borderRadius: props.theme.border.radius.medium,\n display: isPlatformWeb ? 'inline-block' : 'flex',\n alignSelf: isPlatformWeb ? undefined : 'center',\n verticalAlign: 'middle',\n lineHeight: makeTypographySize(props.theme.typography.lineHeights[0]),\n };\n});\n\nconst getCodeColor = ({\n isHighlighted,\n color,\n}: Pick<CodeProps, 'isHighlighted' | 'color'>): CodeProps['color'] => {\n if (isHighlighted) {\n if (__DEV__) {\n if (color) {\n throwBladeError({\n moduleName: 'Code',\n message: '`color` prop cannot be used without `isHighlighted={false}`',\n });\n }\n }\n\n return 'surface.text.gray.subtle';\n }\n\n if (color) {\n return color;\n }\n\n return 'surface.text.gray.normal';\n};\n/**\n * Code component can be used for displaying token, variable names, or inlined code snippets.\n *\n * ## Usage\n *\n * ### In Web\n * In web, you can use it inside `Text` component or individually. The component is set to display `inline-block`\n *\n * ```tsx\n * <Text>\n * Lorem ipsum <Code>SENTRY_TOKEN</Code> normal text\n * </Text>\n * ```\n *\n * ### In React Native\n *\n * In React Native, you would have to align it using flex to make sure the Code and the surrounding text is correctly aligned\n *\n * ```tsx\n * <Box flexWrap=\"wrap\" flexDirection=\"row\" alignItems=\"flex-start\">\n * <Text>Lorem ipsum </Text>\n * <Code>SENTRY_TOKEN</Code>\n * <Text> normal text</Text>\n * </Box>\n * ```\n */\nconst Code = ({\n children,\n size = 'small',\n weight = 'regular',\n isHighlighted = true,\n color,\n testID,\n ...styledProps\n}: CodeProps): React.ReactElement => {\n const { fontSize, lineHeight } = getCodeFontSizeAndLineHeight(size)!;\n const codeTextColor = React.useMemo<CodeProps['color']>(\n () => getCodeColor({ isHighlighted, color }),\n [isHighlighted, color],\n );\n\n return (\n <CodeContainer\n size={size}\n isHighlighted={isHighlighted}\n as={isPlatformWeb ? 'span' : undefined}\n {...metaAttribute({ name: MetaConstants.Code, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseText\n color={codeTextColor}\n fontFamily=\"code\"\n fontSize={fontSize}\n fontWeight={weight}\n as={isPlatformWeb ? 'code' : undefined}\n lineHeight={lineHeight}\n >\n {children}\n </BaseText>\n </CodeContainer>\n );\n};\n\nexport { Code };\n"],"names":["platformType","getPlatformType","isPlatformWeb","getCodeFontSizeAndLineHeight","size","fontSize","lineHeight","__DEV__","throwBladeError","moduleName","message","undefined","CodeContainer","styled","BaseBox","props","padding","makeSpace","theme","spacing","backgroundColor","isHighlighted","colors","feedback","background","neutral","subtle","borderRadius","border","radius","medium","display","alignSelf","verticalAlign","makeTypographySize","typography","lineHeights","getCodeColor","_ref","color","Code","_ref2","children","_ref2$size","_ref2$weight","weight","_ref2$isHighlighted","testID","styledProps","_objectWithoutProperties","_excluded","_ref3","codeTextColor","React","useMemo","_jsx","Object","assign","as","metaAttribute","name","MetaConstants","getStyledProps","BaseText","fontFamily","fontWeight"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,UAAA,CAAA,MAAA,CAAA,QAAA,CAAA,eAAA,CAAA,OAAA,CAAA,QAAA,CAAA,CAiEA,IAAMA,YAAY,CAAGC,eAAe,EAAE,CACtC,IAAMC,aAAa,CAAGF,YAAY,GAAK,SAAS,EAAIA,YAAY,GAAK,MAAM,CAE3E,IAAMG,4BAA4B,CAAG,SAA/BA,4BAA4BA,CAChCC,IAAuB,CACmE,CAC1F,OAAQA,IAAI,EACV,IAAK,QAAQ,CACX,OAAO,CAAEC,QAAQ,CAAE,EAAE,CAAEC,UAAU,CAAE,EAAG,CAAC,CACzC,IAAK,OAAO,CACV,OAAO,CAAED,QAAQ,CAAE,EAAE,CAAEC,UAAU,CAAE,EAAG,CAAC,CACzC,QACE,GAAIC,OAAO,CAAE,CACXC,eAAe,CAAC,CACdC,UAAU,CAAE,MAAM,CAClBC,OAAO,CAAG,CAAmBN,iBAAAA,EAAAA,IAAK,CACpC,CAAA,CAAC,CAAC,CACJ,CACA,OAAOO,SAAS,CACpB,CACF,CAAC,CAED,IAAMC,aAAa,CAAGC,MAAM,CAACC,OAAO,CAAC,CAAqB,SAACC,KAAK,CAAK,CACnE,IAAMC,OAAO,CAAI,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C,MAAM,CACjB3D,QAAQ,CAAEA,QAAS,CACnB4D,UAAU,CAAEpB,MAAO,CACnBa,EAAE,CAAExD,aAAa,CAAG,MAAM,CAAGS,SAAU,CACvCL,UAAU,CAAEA,UAAW,CAAAoC,QAAA,CAEtBA,QAAQ,CACD,CAAC,CAAA,CACE,CAAC,CAEpB;;;;"}
1
+ {"version":3,"file":"Code.js","sources":["../../../../../../src/components/Typography/Code/Code.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getPlatformType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { FontSize, Typography } from '~tokens/global';\nimport type { BladeElementRef, StringChildrenType, TestID } from '~utils/types';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeTypographySize } from '~utils/makeTypographySize';\nimport { throwBladeError } from '~utils/logger';\n\ntype CodeCommonProps = {\n /**\n * Sets the color of the Heading component.\n */\n children: StringChildrenType;\n /**\n * Decides the fontSize and padding of Code\n *\n * @default small\n */\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'bold'>;\n isHighlighted?: boolean;\n color?: BaseTextProps['color'];\n} & TestID &\n StyledPropsBlade;\n\ntype CodeHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted?: true;\n /**\n * color prop can only be added when `isHighlighted` is set to `false`\n */\n color?: undefined;\n};\n\ntype CodeNonHighlightedProps = CodeCommonProps & {\n /**\n * Adds background color to highlight the text\n *\n * @default true\n */\n isHighlighted: false;\n /**\n * color prop to set color of text when `isHighlighted` is set to false\n */\n color?: BaseTextProps['color'];\n};\n\nexport type CodeProps = CodeHighlightedProps | CodeNonHighlightedProps;\n\ntype CodeContainerProps = {\n size: CodeProps['size'];\n isHighlighted: CodeProps['isHighlighted'];\n};\n\nconst platformType = getPlatformType();\nconst isPlatformWeb = platformType === 'browser' || platformType === 'node';\n\nconst getCodeFontSizeAndLineHeight = (\n size: CodeProps['size'],\n): { fontSize: keyof FontSize; lineHeight: keyof Typography['lineHeights'] } | undefined => {\n switch (size) {\n case 'medium':\n return { fontSize: 75, lineHeight: 75 };\n case 'small':\n return { fontSize: 25, lineHeight: 25 };\n default:\n if (__DEV__) {\n throwBladeError({\n moduleName: 'Code',\n message: `Unexpected size: ${size}`,\n });\n }\n return undefined;\n }\n};\n\nconst CodeContainer = styled(BaseBox)<CodeContainerProps>((props) => {\n const padding = `${makeSpace(props.theme.spacing[0])} ${makeSpace(props.theme.spacing[2])}`;\n return {\n padding,\n backgroundColor: props.isHighlighted\n ? props.theme.colors.feedback.background.neutral.subtle\n : undefined,\n borderRadius: props.theme.border.radius.medium,\n display: isPlatformWeb ? 'inline-block' : 'flex',\n alignSelf: isPlatformWeb ? undefined : 'center',\n verticalAlign: 'middle',\n lineHeight: makeTypographySize(props.theme.typography.lineHeights[0]),\n };\n});\n\nconst getCodeColor = ({\n isHighlighted,\n color,\n}: Pick<CodeProps, 'isHighlighted' | 'color'>): CodeProps['color'] => {\n if (isHighlighted) {\n if (__DEV__) {\n if (color) {\n throwBladeError({\n moduleName: 'Code',\n message: '`color` prop cannot be used without `isHighlighted={false}`',\n });\n }\n }\n\n return 'surface.text.gray.subtle';\n }\n\n if (color) {\n return color;\n }\n\n return 'surface.text.gray.normal';\n};\n\nconst _Code = (\n {\n children,\n size = 'small',\n weight = 'regular',\n isHighlighted = true,\n color,\n testID,\n ...styledProps\n }: CodeProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const { fontSize, lineHeight } = getCodeFontSizeAndLineHeight(size)!;\n const codeTextColor = React.useMemo<CodeProps['color']>(\n () => getCodeColor({ isHighlighted, color }),\n [isHighlighted, color],\n );\n\n return (\n <CodeContainer\n ref={ref as never}\n size={size}\n isHighlighted={isHighlighted}\n as={isPlatformWeb ? 'span' : undefined}\n {...metaAttribute({ name: MetaConstants.Code, testID })}\n {...getStyledProps(styledProps)}\n >\n <BaseText\n color={codeTextColor}\n fontFamily=\"code\"\n fontSize={fontSize}\n fontWeight={weight}\n as={isPlatformWeb ? 'code' : undefined}\n lineHeight={lineHeight}\n >\n {children}\n </BaseText>\n </CodeContainer>\n );\n};\n\n/**\n * Code component can be used for displaying token, variable names, or inlined code snippets.\n *\n * ## Usage\n *\n * ### In Web\n * In web, you can use it inside `Text` component or individually. The component is set to display `inline-block`\n *\n * ```tsx\n * <Text>\n * Lorem ipsum <Code>SENTRY_TOKEN</Code> normal text\n * </Text>\n * ```\n *\n * ### In React Native\n *\n * In React Native, you would have to align it using flex to make sure the Code and the surrounding text is correctly aligned\n *\n * ```tsx\n * <Box flexWrap=\"wrap\" flexDirection=\"row\" alignItems=\"flex-start\">\n * <Text>Lorem ipsum </Text>\n * <Code>SENTRY_TOKEN</Code>\n * <Text> normal text</Text>\n * </Box>\n * ```\n */\nconst Code = React.forwardRef(_Code);\n\nexport { Code };\n"],"names":["platformType","getPlatformType","isPlatformWeb","getCodeFontSizeAndLineHeight","size","fontSize","lineHeight","__DEV__","throwBladeError","moduleName","message","undefined","CodeContainer","styled","BaseBox","props","padding","makeSpace","theme","spacing","backgroundColor","isHighlighted","colors","feedback","background","neutral","subtle","borderRadius","border","radius","medium","display","alignSelf","verticalAlign","makeTypographySize","typography","lineHeights","getCodeColor","_ref","color","_Code","_ref2","ref","children","_ref2$size","_ref2$weight","weight","_ref2$isHighlighted","testID","styledProps","_objectWithoutProperties","_excluded","_ref3","codeTextColor","React","useMemo","_jsx","Object","assign","as","metaAttribute","name","MetaConstants","Code","getStyledProps","BaseText","fontFamily","fontWeight","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,UAAA,CAAA,MAAA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I,CAAC,CAA3DC,QAAQ,CAAA+C,KAAA,CAAR/C,QAAQ,CAAEC,UAAU,CAAA8C,KAAA,CAAV9C,UAAU,CAC5B,IAAM+C,aAAa,CAAGC,cAAK,CAACC,OAAO,CACjC,UAAM,CAAA,OAAAlB,YAAY,CAAC,CAAEhB,aAAa,CAAbA,aAAa,CAAEkB,KAAK,CAALA,KAAM,CAAC,CAAC,CAC5C,CAAA,CAAA,CAAClB,aAAa,CAAEkB,KAAK,CACvB,CAAC,CAED,OACEiB,GAAA,CAAC5C,aAAa,CAAA6C,MAAA,CAAAC,MAAA,CAAA,CACZhB,GAAG,CAAEA,GAAa,CAClBtC,IAAI,CAAEA,IAAK,CACXiB,aAAa,CAAEA,aAAc,CAC7BsC,EAAE,CAAEzD,aAAa,CAAG,MAAM,CAAGS,SAAU,CAAA,CACnCiD,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACC,IAAI,CAAEf,MAAM,CAANA,MAAO,CAAC,CAAC,CACnDgB,cAAc,CAACf,WAAW,CAAC,CAAAN,CAAAA,QAAA,CAE/Ba,GAAA,CAACS,QAAQ,CAAA,CACP1B,KAAK,CAAEc,aAAc,CACrBa,UAAU,CAAC,MAAM,CACjB7D,QAAQ,CAAEA,QAAS,CACnB8D,UAAU,CAAErB,MAAO,CACnBa,EAAE,CAAEzD,aAAa,CAAG,MAAM,CAAGS,SAAU,CACvCL,UAAU,CAAEA,UAAW,CAAAqC,QAAA,CAEtBA,QAAQ,CACD,CAAC,CAAA,CACE,CAAC,CAEpB,CAAC,CA4BK,IAAAoB,IAAI,CAAGT,cAAK,CAACc,UAAU,CAAC5B,KAAK;;;;"}
@@ -1,4 +1,5 @@
1
1
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
+ import React__default from 'react';
2
3
  import { BaseText } from '../BaseText/BaseText.native.js';
3
4
  import { useValidateAsProp } from '../utils.js';
4
5
  import { getStyledProps } from '../../Box/styledProps/getStyledProps.js';
@@ -7,11 +8,10 @@ import 'react-native';
7
8
  import '../../../tokens/global/typography.js';
8
9
  import '../../../tokens/global/motion.js';
9
10
  import { getPlatformType } from '../../../utils/getPlatformType/getPlatformType.js';
10
- import 'react';
11
11
  import '../../BladeProvider/useTheme.js';
12
12
  import { jsx } from 'react/jsx-runtime';
13
13
 
14
- var _excluded=["as","size","weight","color","children","testID","textAlign","textDecorationLine"];var validAsValues=['span','h1','h2','h3','h4','h5','h6'];var getProps=function getProps(_ref){var as=_ref.as,size=_ref.size,weight=_ref.weight,color=_ref.color,testID=_ref.testID;var isPlatformWeb=getPlatformType()==='browser'||getPlatformType()==='node';var letterSpacing=weight==='medium'||weight==='regular'?50:100;var props={color:color,fontSize:800,fontWeight:weight,fontStyle:'normal',lineHeight:800,fontFamily:'heading',accessibilityProps:isPlatformWeb?{}:{role:'heading'},componentName:'display',testID:testID,letterSpacing:letterSpacing};if(size==='small'){props.fontSize=800;props.lineHeight=800;}else if(size==='medium'){props.fontSize=900;props.lineHeight=900;}else if(size==='large'){props.fontSize=1000;props.lineHeight=1000;}else if(size==='xlarge'){props.fontSize=1100;props.lineHeight=1100;}props.as=isPlatformWeb?'h1':undefined;props.as=as||props.as;return props;};var Display=function Display(_ref2){var as=_ref2.as,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'semibold':_ref2$weight,_ref2$color=_ref2.color,color=_ref2$color===void 0?'surface.text.gray.normal':_ref2$color,children=_ref2.children,testID=_ref2.testID,textAlign=_ref2.textAlign,textDecorationLine=_ref2.textDecorationLine,styledProps=_objectWithoutProperties(_ref2,_excluded);useValidateAsProp({componentName:'Display',as:as,validAsValues:validAsValues});var props=getProps({as:as,size:size,color:color,weight:weight,testID:testID});return jsx(BaseText,Object.assign({},props,{textAlign:textAlign,textDecorationLine:textDecorationLine},getStyledProps(styledProps),{children:children}));};
14
+ var _excluded=["as","size","weight","color","children","testID","textAlign","textDecorationLine"];var validAsValues=['span','h1','h2','h3','h4','h5','h6'];var getProps=function getProps(_ref){var as=_ref.as,size=_ref.size,weight=_ref.weight,color=_ref.color,testID=_ref.testID;var isPlatformWeb=getPlatformType()==='browser'||getPlatformType()==='node';var letterSpacing=weight==='medium'||weight==='regular'?50:100;var props={color:color,fontSize:800,fontWeight:weight,fontStyle:'normal',lineHeight:800,fontFamily:'heading',accessibilityProps:isPlatformWeb?{}:{role:'heading'},componentName:'display',testID:testID,letterSpacing:letterSpacing};if(size==='small'){props.fontSize=800;props.lineHeight=800;}else if(size==='medium'){props.fontSize=900;props.lineHeight=900;}else if(size==='large'){props.fontSize=1000;props.lineHeight=1000;}else if(size==='xlarge'){props.fontSize=1100;props.lineHeight=1100;}props.as=isPlatformWeb?'h1':undefined;props.as=as||props.as;return props;};var _Display=function _Display(_ref2,ref){var as=_ref2.as,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'semibold':_ref2$weight,_ref2$color=_ref2.color,color=_ref2$color===void 0?'surface.text.gray.normal':_ref2$color,children=_ref2.children,testID=_ref2.testID,textAlign=_ref2.textAlign,textDecorationLine=_ref2.textDecorationLine,styledProps=_objectWithoutProperties(_ref2,_excluded);useValidateAsProp({componentName:'Display',as:as,validAsValues:validAsValues});var props=getProps({as:as,size:size,color:color,weight:weight,testID:testID});return jsx(BaseText,Object.assign({ref:ref},props,{textAlign:textAlign,textDecorationLine:textDecorationLine},getStyledProps(styledProps),{children:children}));};var Display=React__default.forwardRef(_Display);
15
15
 
16
16
  export { Display };
17
17
  //# sourceMappingURL=Display.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Display.js","sources":["../../../../../../src/components/Typography/Display/Display.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\n\nconst validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type DisplayProps = {\n as?: typeof validAsValues[number];\n /**\n * Overrides the color of the Display component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of title\n */\n color?: BaseTextProps['color'];\n size?: Extract<BaseTextSizes, 'small' | 'medium' | 'large' | 'xlarge'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'medium' | 'semibold'>;\n children: React.ReactNode;\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n} & TestID &\n StyledPropsBlade;\n\nconst getProps = ({\n as,\n size,\n weight,\n color,\n testID,\n}: Pick<DisplayProps, 'as' | 'size' | 'color' | 'weight' | 'testID'>): Omit<\n BaseTextProps,\n 'children'\n> => {\n const isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';\n const letterSpacing = weight === 'medium' || weight === 'regular' ? 50 : 100;\n const props: Omit<BaseTextProps, 'children'> = {\n color,\n fontSize: 800,\n fontWeight: weight,\n fontStyle: 'normal',\n lineHeight: 800,\n fontFamily: 'heading',\n accessibilityProps: isPlatformWeb ? {} : { role: 'heading' },\n componentName: 'display',\n testID,\n letterSpacing,\n };\n\n if (size === 'small') {\n props.fontSize = 800;\n props.lineHeight = 800;\n } else if (size === 'medium') {\n props.fontSize = 900;\n props.lineHeight = 900;\n } else if (size === 'large') {\n props.fontSize = 1000;\n props.lineHeight = 1000;\n } else if (size === 'xlarge') {\n props.fontSize = 1100;\n props.lineHeight = 1100;\n }\n\n props.as = isPlatformWeb ? 'h1' : undefined;\n // override the computed `as` prop if user passed an `as` prop\n props.as = as || props.as;\n return props;\n};\n\nexport const Display = ({\n as,\n size = 'small',\n weight = 'semibold',\n color = 'surface.text.gray.normal',\n children,\n testID,\n textAlign,\n textDecorationLine,\n ...styledProps\n}: DisplayProps): ReactElement => {\n useValidateAsProp({ componentName: 'Display', as, validAsValues });\n\n const props = getProps({ as, size, color, weight, testID });\n\n return (\n <BaseText\n {...props}\n textAlign={textAlign}\n textDecorationLine={textDecorationLine}\n {...getStyledProps(styledProps)}\n >\n {children}\n </BaseText>\n );\n};\n"],"names":["validAsValues","getProps","_ref","as","size","weight","color","testID","isPlatformWeb","getPlatformType","letterSpacing","props","fontSize","fontWeight","fontStyle","lineHeight","fontFamily","accessibilityProps","role","componentName","undefined","Display","_ref2","_ref2$size","_ref2$weight","_ref2$color","children","textAlign","textDecorationLine","styledProps","_objectWithoutProperties","_excluded","useValidateAsProp","_jsx","BaseText","Object","assign","getStyledProps"],"mappings":";;;;;;;;;;;;;kGASA,IAAMA,aAAa,CAAG,CAAC,MAAM,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAU,CAiB3E,IAAMC,QAAQ,CAAG,SAAXA,QAAQA,CAAAC,IAAA,CAST,KARHC,EAAE,CAAAD,IAAA,CAAFC,EAAE,CACFC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CACJC,MAAM,CAAAH,IAAA,CAANG,MAAM,CACNC,KAAK,CAAAJ,IAAA,CAALI,KAAK,CACLC,MAAM,CAAAL,IAAA,CAANK,MAAM,CAKN,IAAMC,aAAa,CAAGC,eAAe,EAAE,GAAK,SAAS,EAAIA,eAAe,EAAE,GAAK,MAAM,CACrF,IAAMC,aAAa,CAAGL,MAAM,GAAK,QAAQ,EAAIA,MAAM,GAAK,SAAS,CAAG,EAAE,CAAG,GAAG,CAC5E,IAAMM,KAAsC,CAAG,CAC7CL,KAAK,CAALA,KAAK,CACLM,QAAQ,CAAE,GAAG,CACbC,UAAU,CAAER,MAAM,CAClBS,SAAS,CAAE,QAAQ,CACnBC,UAAU,CAAE,GAAG,CACfC,UAAU,CAAE,SAAS,CACrBC,kBAAkB,CAAET,aAAa,CAAG,EAAE,CAAG,CAAEU,IAAI,CA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QAAQ,CACRnB,MAAM,CAAAe,KAAA,CAANf,MAAM,CACNoB,SAAS,CAAAL,KAAA,CAATK,SAAS,CACTC,kBAAkB,CAAAN,KAAA,CAAlBM,kBAAkB,CACfC,WAAW,CAAAC,wBAAA,CAAAR,KAAA,CAAAS,SAAA,CAAA,CAEdC,iBAAiB,CAAC,CAAEb,aAAa,CAAE,SAAS,CAAEhB,EAAE,CAAFA,EAAE,CAAEH,aAAa,CAAbA,aAAc,CAAC,CAAC,CAElE,IAAMW,KAAK,CAAGV,QAAQ,CAAC,CAAEE,EAAE,CAAFA,EAAE,CAAEC,IAAI,CAAJA,IAAI,CAAEE,KAAK,CAALA,KAAK,CAAED,MAAM,CAANA,MAAM,CAAEE,MAAM,CAANA,MAAO,CAAC,CAAC,CAE3D,OACE0B,GAAA,CAACC,QAAQ,CAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,CACHzB,KAAK,CAAA,CACTgB,SAAS,CAAEA,SAAU,CACrBC,kBAAkB,CAAEA,kBAAmB,EACnCS,cAAc,CAACR,WAAW,CAAC,CAAAH,CAAAA,QAAA,CAE9BA,QAAQ,CAAA,CACD,CAAC,CAEf;;;;"}
1
+ {"version":3,"file":"Display.js","sources":["../../../../../../src/components/Typography/Display/Display.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement } from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { BladeElementRef, TestID } from '~utils/types';\nimport { getPlatformType } from '~utils';\n\nconst validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type DisplayProps = {\n as?: typeof validAsValues[number];\n /**\n * Overrides the color of the Display component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of title\n */\n color?: BaseTextProps['color'];\n size?: Extract<BaseTextSizes, 'small' | 'medium' | 'large' | 'xlarge'>;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'medium' | 'semibold'>;\n children: React.ReactNode;\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n} & TestID &\n StyledPropsBlade;\n\nconst getProps = ({\n as,\n size,\n weight,\n color,\n testID,\n}: Pick<DisplayProps, 'as' | 'size' | 'color' | 'weight' | 'testID'>): Omit<\n BaseTextProps,\n 'children'\n> => {\n const isPlatformWeb = getPlatformType() === 'browser' || getPlatformType() === 'node';\n const letterSpacing = weight === 'medium' || weight === 'regular' ? 50 : 100;\n const props: Omit<BaseTextProps, 'children'> = {\n color,\n fontSize: 800,\n fontWeight: weight,\n fontStyle: 'normal',\n lineHeight: 800,\n fontFamily: 'heading',\n accessibilityProps: isPlatformWeb ? {} : { role: 'heading' },\n componentName: 'display',\n testID,\n letterSpacing,\n };\n\n if (size === 'small') {\n props.fontSize = 800;\n props.lineHeight = 800;\n } else if (size === 'medium') {\n props.fontSize = 900;\n props.lineHeight = 900;\n } else if (size === 'large') {\n props.fontSize = 1000;\n props.lineHeight = 1000;\n } else if (size === 'xlarge') {\n props.fontSize = 1100;\n props.lineHeight = 1100;\n }\n\n props.as = isPlatformWeb ? 'h1' : undefined;\n // override the computed `as` prop if user passed an `as` prop\n props.as = as || props.as;\n return props;\n};\n\nconst _Display = (\n {\n as,\n size = 'small',\n weight = 'semibold',\n color = 'surface.text.gray.normal',\n children,\n testID,\n textAlign,\n textDecorationLine,\n ...styledProps\n }: DisplayProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n useValidateAsProp({ componentName: 'Display', as, validAsValues });\n\n const props = getProps({ as, size, color, weight, testID });\n\n return (\n <BaseText\n ref={ref}\n {...props}\n textAlign={textAlign}\n textDecorationLine={textDecorationLine}\n {...getStyledProps(styledProps)}\n >\n {children}\n </BaseText>\n );\n};\n\nconst Display = React.forwardRef(_Display);\nexport { Display };\n"],"names":["validAsValues","getProps","_ref","as","size","weight","color","testID","isPlatformWeb","getPlatformType","letterSpacing","props","fontSize","fontWeight","fontStyle","lineHeight","fontFamily","accessibilityProps","role","componentName","undefined","_Display","_ref2","ref","_ref2$size","_ref2$weight","_ref2$color","children","textAlign","textDecorationLine","styledProps","_objectWithoutProperties","_excluded","useValidateAsProp","_jsx","BaseText","Object","assign","getStyledProps","Display","React","forwardRef"],"mappings":";;;;;;;;;;;;;kGAUA,IAAMA,aAAa,CAAG,CAAC,MAAM,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAU,CAiB3E,IAAMC,QAAQ,CAAG,SAAXA,QAAQA,CAAAC,IAAA,CAST,CARH,IAAAC,EAAE,CAAAD,IAAA,CAAFC,EAAE,CACFC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CACJC,MAAM,CAAAH,IAAA,CAANG,MAAM,CACNC,KAAK,CAAAJ,IAAA,CAALI,KAAK,CACLC,MAAM,CAAAL,IAAA,CAANK,MAAM,CAKN,IAAMC,aAAa,CAAGC,eAAe,EAAE,GAAK,SAAS,EAAIA,eAAe,EAAE,GAAK,MAAM,CACrF,IAAMC,aAAa,CAAGL,MAAM,GAAK,QAAQ,EAAIA,MAAM,GAAK,SAAS,CAAG,EAAE,CAAG,GAAG,CAC5E,IAAMM,KAAsC,CAAG,CAC7CL,KAAK,CAALA,KAAK,CACLM,QAAQ,CAAE,GAAG,CACbC,UAAU,CAAER,MAAM,CAClBS,SAAS,CAAE,QAAQ,CACnBC,UAAU,CAAE,GAAG,CACfC,UAAU,CAAE,SAAS,CACrBC,kBAAkB,CAAET,aAAa,CAAG,EAAE,CAAG,CAAEU,IAAI,CAAE,SAAU,CAAC,CAC5DC,aAAa,CAAE,SAAS,CACxBZ,MAAM,CAANA,MAAM,CACNG,aAAa,CAAbA,aACF,CAAC,CAED,GAAIN,IAAI,GAAK,OAAO,CAAE,CACpBO,KAAK,CAACC,QAAQ,CAAG,GA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CAAAU,SAAA,CAAA,CAIhBC,iBAAiB,CAAC,CAAEd,aAAa,CAAE,SAAS,CAAEhB,EAAE,CAAFA,EAAE,CAAEH,aAAa,CAAbA,aAAc,CAAC,CAAC,CAElE,IAAMW,KAAK,CAAGV,QAAQ,CAAC,CAAEE,EAAE,CAAFA,EAAE,CAAEC,IAAI,CAAJA,IAAI,CAAEE,KAAK,CAALA,KAAK,CAAED,MAAM,CAANA,MAAM,CAAEE,MAAM,CAANA,MAAO,CAAC,CAAC,CAE3D,OACE2B,GAAA,CAACC,QAAQ,CAAAC,MAAA,CAAAC,MAAA,CACPd,CAAAA,GAAG,CAAEA,GAAI,CACLZ,CAAAA,KAAK,CACTiB,CAAAA,SAAS,CAAEA,SAAU,CACrBC,kBAAkB,CAAEA,kBAAmB,CAAA,CACnCS,cAAc,CAACR,WAAW,CAAC,CAAAH,CAAAA,QAAA,CAE9BA,QAAQ,CACD,CAAA,CAAC,CAEf,CAAC,CAEK,IAAAY,OAAO,CAAGC,cAAK,CAACC,UAAU,CAACpB,QAAQ;;;;"}
@@ -1,4 +1,5 @@
1
1
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
+ import React__default from 'react';
2
3
  import { BaseText } from '../BaseText/BaseText.native.js';
3
4
  import { useValidateAsProp } from '../utils.js';
4
5
  import { getStyledProps } from '../../Box/styledProps/getStyledProps.js';
@@ -6,12 +7,11 @@ import '@babel/runtime/helpers/slicedToArray';
6
7
  import 'react-native';
7
8
  import '../../../tokens/global/typography.js';
8
9
  import '../../../tokens/global/motion.js';
9
- import 'react';
10
10
  import { isReactNative } from '../../../utils/platform/isReactNative.js';
11
11
  import '../../BladeProvider/useTheme.js';
12
12
  import { jsx } from 'react/jsx-runtime';
13
13
 
14
- var _excluded=["as","size","weight","color","children","testID","textAlign","textDecorationLine"];var validAsValues=['span','h1','h2','h3','h4','h5','h6'];var getHeadingProps=function getHeadingProps(_ref){var as=_ref.as,size=_ref.size,weight=_ref.weight,color=_ref.color,testID=_ref.testID;var props={color:color,fontSize:300,fontWeight:weight!=null?weight:'semibold',fontStyle:'normal',lineHeight:300,fontFamily:'heading',accessibilityProps:isReactNative()?{role:'heading'}:{},componentName:'heading',testID:testID};if(size==='small'){props.fontSize=300;props.lineHeight=300;props.as='h6';}else if(size==='medium'){props.fontSize=400;props.lineHeight=400;props.as='h5';}else if(size==='large'){props.fontSize=500;props.lineHeight=500;props.as='h4';}else if(size==='xlarge'){props.fontSize=600;props.lineHeight=600;props.as='h3';}else if(size==='2xlarge'){props.fontSize=700;props.lineHeight=700;props.as='h2';}props.as=as||props.as;return props;};var Heading=function Heading(_ref2){var as=_ref2.as,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'semibold':_ref2$weight,_ref2$color=_ref2.color,color=_ref2$color===void 0?'surface.text.gray.normal':_ref2$color,children=_ref2.children,testID=_ref2.testID,textAlign=_ref2.textAlign,textDecorationLine=_ref2.textDecorationLine,styledProps=_objectWithoutProperties(_ref2,_excluded);useValidateAsProp({componentName:'Heading',as:as,validAsValues:validAsValues});var props=getHeadingProps({as:as,size:size,weight:weight,color:color,testID:testID});return jsx(BaseText,Object.assign({},props,{textAlign:textAlign,textDecorationLine:textDecorationLine},getStyledProps(styledProps),{children:children}));};
14
+ var _excluded=["as","size","weight","color","children","testID","textAlign","textDecorationLine"];var validAsValues=['span','h1','h2','h3','h4','h5','h6'];var getHeadingProps=function getHeadingProps(_ref){var as=_ref.as,size=_ref.size,weight=_ref.weight,color=_ref.color,testID=_ref.testID;var props={color:color,fontSize:300,fontWeight:weight!=null?weight:'semibold',fontStyle:'normal',lineHeight:300,fontFamily:'heading',accessibilityProps:isReactNative()?{role:'heading'}:{},componentName:'heading',testID:testID};if(size==='small'){props.fontSize=300;props.lineHeight=300;props.as='h6';}else if(size==='medium'){props.fontSize=400;props.lineHeight=400;props.as='h5';}else if(size==='large'){props.fontSize=500;props.lineHeight=500;props.as='h4';}else if(size==='xlarge'){props.fontSize=600;props.lineHeight=600;props.as='h3';}else if(size==='2xlarge'){props.fontSize=700;props.lineHeight=700;props.as='h2';}props.as=as||props.as;return props;};var _Heading=function _Heading(_ref2,ref){var as=_ref2.as,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'semibold':_ref2$weight,_ref2$color=_ref2.color,color=_ref2$color===void 0?'surface.text.gray.normal':_ref2$color,children=_ref2.children,testID=_ref2.testID,textAlign=_ref2.textAlign,textDecorationLine=_ref2.textDecorationLine,styledProps=_objectWithoutProperties(_ref2,_excluded);useValidateAsProp({componentName:'Heading',as:as,validAsValues:validAsValues});var props=getHeadingProps({as:as,size:size,weight:weight,color:color,testID:testID});return jsx(BaseText,Object.assign({},props,{ref:ref,textAlign:textAlign,textDecorationLine:textDecorationLine},getStyledProps(styledProps),{children:children}));};var Heading=React__default.forwardRef(_Heading);
15
15
 
16
16
  export { Heading, getHeadingProps };
17
17
  //# sourceMappingURL=Heading.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Heading.js","sources":["../../../../../../src/components/Typography/Heading/Heading.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport type { ReactElement } from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { isReactNative } from '~utils';\nimport type { TestID } from '~utils/types';\n\nconst validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type HeadingProps = {\n as?: typeof validAsValues[number];\n /**\n * Overrides the color of the Heading component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of heading\n */\n color?: BaseTextProps['color'];\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'semibold'>;\n children: React.ReactNode;\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n size?: Extract<BaseTextSizes, 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge'>;\n} & TestID &\n StyledPropsBlade;\n\nexport const getHeadingProps = ({\n as,\n size,\n weight,\n color,\n testID,\n}: Pick<HeadingProps, 'as' | 'size' | 'weight' | 'color' | 'testID'>): Omit<\n BaseTextProps,\n 'children'\n> => {\n const props: Omit<BaseTextProps, 'children'> = {\n color,\n fontSize: 300,\n fontWeight: weight ?? 'semibold',\n fontStyle: 'normal',\n lineHeight: 300,\n fontFamily: 'heading',\n accessibilityProps: isReactNative() ? { role: 'heading' } : {},\n componentName: 'heading',\n testID,\n };\n\n if (size === 'small') {\n props.fontSize = 300;\n props.lineHeight = 300;\n props.as = 'h6';\n } else if (size === 'medium') {\n props.fontSize = 400;\n props.lineHeight = 400;\n props.as = 'h5';\n } else if (size === 'large') {\n props.fontSize = 500;\n props.lineHeight = 500;\n props.as = 'h4';\n } else if (size === 'xlarge') {\n props.fontSize = 600;\n props.lineHeight = 600;\n props.as = 'h3';\n } else if (size === '2xlarge') {\n props.fontSize = 700;\n props.lineHeight = 700;\n props.as = 'h2';\n }\n\n // override the computed `as` prop if user passed an `as` prop\n props.as = as || props.as;\n return props;\n};\n\nexport const Heading = ({\n as,\n size = 'small',\n weight = 'semibold',\n color = 'surface.text.gray.normal',\n children,\n testID,\n textAlign,\n textDecorationLine,\n ...styledProps\n}: HeadingProps): ReactElement => {\n useValidateAsProp({ componentName: 'Heading', as, validAsValues });\n\n const props = getHeadingProps({ as, size, weight, color, testID });\n\n return (\n <BaseText\n {...props}\n textAlign={textAlign}\n textDecorationLine={textDecorationLine}\n {...getStyledProps(styledProps)}\n >\n {children}\n </BaseText>\n );\n};\n"],"names":["validAsValues","getHeadingProps","_ref","as","size","weight","color","testID","props","fontSize","fontWeight","fontStyle","lineHeight","fontFamily","accessibilityProps","isReactNative","role","componentName","Heading","_ref2","_ref2$size","_ref2$weight","_ref2$color","children","textAlign","textDecorationLine","styledProps","_objectWithoutProperties","_excluded","useValidateAsProp","_jsx","BaseText","Object","assign","getStyledProps"],"mappings":";;;;;;;;;;;;;kGAUA,IAAMA,aAAa,CAAG,CAAC,MAAM,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAU,CAiB9D,IAAAC,eAAe,CAAG,SAAlBA,eAAeA,CAAAC,IAAA,CASvB,KARHC,EAAE,CAAAD,IAAA,CAAFC,EAAE,CACFC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CACJC,MAAM,CAAAH,IAAA,CAANG,MAAM,CACNC,KAAK,CAAAJ,IAAA,CAALI,KAAK,CACLC,MAAM,CAAAL,IAAA,CAANK,MAAM,CAKN,IAAMC,KAAsC,CAAG,CAC7CF,KAAK,CAALA,KAAK,CACLG,QAAQ,CAAE,GAAG,CACbC,UAAU,CAAEL,MAAM,EAAA,IAAA,CAANA,MAAM,CAAI,UAAU,CAChCM,SAAS,CAAE,QAAQ,CACnBC,UAAU,CAAE,GAAG,CACfC,UAAU,CAAE,SAAS,CACrBC,kBAAkB,CAAEC,aAAa,EAAE,CAAG,CAAEC,IAAI,CAAE,SAAU,CAAC,CAAG,EAAE,CAC9DC,aAAa,CAAE,SAAS,CACxBV,MAAM,CAANA,MACF,CAAC,CAED,GAAIH,IAAI,GAAK,OAAO,CAAE,CACpBI,KAAK,CAACC,QAAQ,CAAG,GAAG,CACpBD,KAAK,CAACI,UAAU,CAAG,GAAG,CACtBJ,KAAK,CAACL,EAAE,CAAG,IAAI,CACjB,CAAC,KAAUC,GAAAA,IAAI,GAAK,QAAQ,CAAE,CAC5BI,KAAK,CAACC,QAAQ,CAAG,GAAG,CACpBD,KAAK,CAACI,UAAU,CAAG,GAAG,CACtBJ,KAAK,CAACL,EAAE,CAAG,IAAI,CACjB,CAAC,KAAM,GAAIC,IAAI,GAAK,OAAO,CAAE,CAC3BI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,CAAE,SAAS,CAAEd,EAAE,CAAFA,EAAE,CAAEH,aAAa,CAAbA,aAAc,CAAC,CAAC,CAElE,IAAMQ,KAAK,CAAGP,eAAe,CAAC,CAAEE,EAAE,CAAFA,EAAE,CAAEC,IAAI,CAAJA,IAAI,CAAEC,MAAM,CAANA,MAAM,CAAEC,KAAK,CAALA,KAAK,CAAEC,MAAM,CAANA,MAAO,CAAC,CAAC,CAElE,OACEuB,GAAA,CAACC,QAAQ,CAAAC,MAAA,CAAAC,MAAA,CACHzB,EAAAA,CAAAA,KAAK,EACTgB,SAAS,CAAEA,SAAU,CACrBC,kBAAkB,CAAEA,kBAAmB,CACnCS,CAAAA,cAAc,CAACR,WAAW,CAAC,CAAA,CAAAH,QAAA,CAE9BA,QAAQ,CAAA,CACD,CAAC,CAEf;;;;"}
1
+ {"version":3,"file":"Heading.js","sources":["../../../../../../src/components/Typography/Heading/Heading.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport React from 'react';\nimport type { ReactElement } from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { isReactNative } from '~utils';\nimport type { BladeElementRef, TestID } from '~utils/types';\n\nconst validAsValues = ['span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const;\nexport type HeadingProps = {\n as?: typeof validAsValues[number];\n /**\n * Overrides the color of the Heading component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of heading\n */\n color?: BaseTextProps['color'];\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'semibold'>;\n children: React.ReactNode;\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n size?: Extract<BaseTextSizes, 'small' | 'medium' | 'large' | 'xlarge' | '2xlarge'>;\n} & TestID &\n StyledPropsBlade;\n\nexport const getHeadingProps = ({\n as,\n size,\n weight,\n color,\n testID,\n}: Pick<HeadingProps, 'as' | 'size' | 'weight' | 'color' | 'testID'>): Omit<\n BaseTextProps,\n 'children'\n> => {\n const props: Omit<BaseTextProps, 'children'> = {\n color,\n fontSize: 300,\n fontWeight: weight ?? 'semibold',\n fontStyle: 'normal',\n lineHeight: 300,\n fontFamily: 'heading',\n accessibilityProps: isReactNative() ? { role: 'heading' } : {},\n componentName: 'heading',\n testID,\n };\n\n if (size === 'small') {\n props.fontSize = 300;\n props.lineHeight = 300;\n props.as = 'h6';\n } else if (size === 'medium') {\n props.fontSize = 400;\n props.lineHeight = 400;\n props.as = 'h5';\n } else if (size === 'large') {\n props.fontSize = 500;\n props.lineHeight = 500;\n props.as = 'h4';\n } else if (size === 'xlarge') {\n props.fontSize = 600;\n props.lineHeight = 600;\n props.as = 'h3';\n } else if (size === '2xlarge') {\n props.fontSize = 700;\n props.lineHeight = 700;\n props.as = 'h2';\n }\n\n // override the computed `as` prop if user passed an `as` prop\n props.as = as || props.as;\n return props;\n};\n\nconst _Heading = (\n {\n as,\n size = 'small',\n weight = 'semibold',\n color = 'surface.text.gray.normal',\n children,\n testID,\n textAlign,\n textDecorationLine,\n ...styledProps\n }: HeadingProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n useValidateAsProp({ componentName: 'Heading', as, validAsValues });\n\n const props = getHeadingProps({ as, size, weight, color, testID });\n\n return (\n <BaseText\n {...props}\n ref={ref}\n textAlign={textAlign}\n textDecorationLine={textDecorationLine}\n {...getStyledProps(styledProps)}\n >\n {children}\n </BaseText>\n );\n};\n\nconst Heading = React.forwardRef(_Heading);\n\nexport { Heading };\n"],"names":["validAsValues","getHeadingProps","_ref","as","size","weight","color","testID","props","fontSize","fontWeight","fontStyle","lineHeight","fontFamily","accessibilityProps","isReactNative","role","componentName","_Heading","_ref2","ref","_ref2$size","_ref2$weight","_ref2$color","children","textAlign","textDecorationLine","styledProps","_objectWithoutProperties","_excluded","useValidateAsProp","_jsx","BaseText","Object","assign","getStyledProps","Heading","React","forwardRef"],"mappings":";;;;;;;;;;;;;kGAWA,IAAMA,aAAa,CAAG,CAAC,MAAM,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAE,IAAI,CAAU,CAiB9D,IAAAC,eAAe,CAAG,SAAlBA,eAAeA,CAAAC,IAAA,CASvB,CAAA,IARHC,EAAE,CAAAD,IAAA,CAAFC,EAAE,CACFC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CACJC,MAAM,CAAAH,IAAA,CAANG,MAAM,CACNC,KAAK,CAAAJ,IAAA,CAALI,KAAK,CACLC,MAAM,CAAAL,IAAA,CAANK,MAAM,CAKN,IAAMC,KAAsC,CAAG,CAC7CF,KAAK,CAALA,KAAK,CACLG,QAAQ,CAAE,GAAG,CACbC,UAAU,CAAEL,MAAM,EAANA,IAAAA,CAAAA,MAAM,CAAI,UAAU,CAChCM,SAAS,CAAE,QAAQ,CACnBC,UAAU,CAAE,GAAG,CACfC,UAAU,CAAE,SAAS,CACrBC,kBAAkB,CAAEC,aAAa,EAAE,CAAG,CAAEC,IAAI,CAAE,SAAU,CAAC,CAAG,EAAE,CAC9DC,aAAa,CAAE,SAAS,CACxBV,MAAM,CAANA,MACF,CAAC,CAED,GAAIH,IAAI,GAAK,OAAO,CAAE,CACpBI,KAAK,CAACC,QAAQ,CAAG,GAAG,CACpBD,KAAK,CAACI,UAAU,CAAG,GAAG,CACtBJ,KAAK,CAACL,EAAE,CAAG,IAAI,CACjB,CAAC,KAAUC,GAAAA,IAAI,GAAK,QAAQ,CAAE,CAC5BI,KAAK,CAACC,QAAQ,CAAG,GAAG,CACpBD,KAAK,CAACI,UAAU,CAAG,GAAG,CACtBJ,KAAK,CAACL,EAAE,CAAG,IAAI,CACjB,CAAC,KAAUC,GAAAA,IAAI,GAAK,OAAO,CAAE,CAC3BI,KAAK,CAACC,QAAQ,CAAG,GAAG,CAC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EAAE,CAAFA,EAAE,CAAEH,aAAa,CAAbA,aAAc,CAAC,CAAC,CAElE,IAAMQ,KAAK,CAAGP,eAAe,CAAC,CAAEE,EAAE,CAAFA,EAAE,CAAEC,IAAI,CAAJA,IAAI,CAAEC,MAAM,CAANA,MAAM,CAAEC,KAAK,CAALA,KAAK,CAAEC,MAAM,CAANA,MAAO,CAAC,CAAC,CAElE,OACEwB,GAAA,CAACC,QAAQ,CAAAC,MAAA,CAAAC,MAAA,CACH1B,EAAAA,CAAAA,KAAK,CACTY,CAAAA,GAAG,CAAEA,GAAI,CACTK,SAAS,CAAEA,SAAU,CACrBC,kBAAkB,CAAEA,kBAAmB,CAAA,CACnCS,cAAc,CAACR,WAAW,CAAC,CAAAH,CAAAA,QAAA,CAE9BA,QAAQ,CACD,CAAA,CAAC,CAEf,CAAC,CAEK,IAAAY,OAAO,CAAGC,cAAK,CAACC,UAAU,CAACpB,QAAQ;;;;"}
@@ -1,5 +1,5 @@
1
1
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
- import 'react';
2
+ import React__default from 'react';
3
3
  import { BaseText } from '../BaseText/BaseText.native.js';
4
4
  import { useValidateAsProp } from '../utils.js';
5
5
  import { getStyledProps } from '../../Box/styledProps/getStyledProps.js';
@@ -12,7 +12,7 @@ import '../../BladeProvider/useTheme.js';
12
12
  import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
13
13
  import { jsx } from 'react/jsx-runtime';
14
14
 
15
- var _excluded=["as","variant","weight","size","truncateAfterLines","children","color","testID","textAlign","textDecorationLine","wordBreak"];var validAsValues=['p','span','div','abbr','figcaption','cite','q','label'];var getTextProps=function getTextProps(_ref){var variant=_ref.variant,weight=_ref.weight,size=_ref.size,_ref$color=_ref.color,color=_ref$color===void 0?'surface.text.gray.normal':_ref$color,testID=_ref.testID,textAlign=_ref.textAlign,textDecorationLine=_ref.textDecorationLine;var props={color:color,fontSize:100,fontWeight:weight!=null?weight:'regular',fontStyle:'normal',lineHeight:100,fontFamily:'text',componentName:'text',testID:testID,textAlign:textAlign,textDecorationLine:textDecorationLine};if(variant==='caption'){if(size&&size!=='small'&&size!=='medium'){if(__DEV__){throwBladeError({moduleName:'Text',message:`size cannot be '${size}' when variant is 'caption'`});}size='small';}}else if(variant!=='caption'&&!size){size='medium';}if(variant==='body'){if(size==='xsmall'){props.fontSize=25;props.lineHeight=25;}if(size==='small'){props.fontSize=75;props.lineHeight=75;}if(size==='medium'){props.fontSize=100;props.lineHeight=100;}if(size==='large'){props.fontSize=200;props.lineHeight=200;}}if(variant==='caption'){if(size==='small'){props.fontSize=50;props.lineHeight=50;props.fontWeight='regular';}if(size==='medium'){props.fontSize=100;props.lineHeight=50;props.fontWeight='regular';}props.fontStyle='italic';}return props;};var _Text=function _Text(_ref2){var _ref2$as=_ref2.as,as=_ref2$as===void 0?'p':_ref2$as,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'body':_ref2$variant,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'regular':_ref2$weight,size=_ref2.size,truncateAfterLines=_ref2.truncateAfterLines,children=_ref2.children,color=_ref2.color,testID=_ref2.testID,textAlign=_ref2.textAlign,textDecorationLine=_ref2.textDecorationLine,wordBreak=_ref2.wordBreak,styledProps=_objectWithoutProperties(_ref2,_excluded);var props=Object.assign({as:as,truncateAfterLines:truncateAfterLines,wordBreak:wordBreak},getTextProps({variant:variant,weight:weight,color:color,size:size,testID:testID,textAlign:textAlign,textDecorationLine:textDecorationLine}));useValidateAsProp({componentName:'Text',as:as,validAsValues:validAsValues});return jsx(BaseText,Object.assign({},props,getStyledProps(styledProps),{children:children}));};var Text=assignWithoutSideEffects(_Text,{displayName:'Text',componentId:'Text'});
15
+ var _excluded=["as","variant","weight","size","truncateAfterLines","children","color","testID","textAlign","textDecorationLine","wordBreak"];var validAsValues=['p','span','div','abbr','figcaption','cite','q','label'];var getTextProps=function getTextProps(_ref){var variant=_ref.variant,weight=_ref.weight,size=_ref.size,_ref$color=_ref.color,color=_ref$color===void 0?'surface.text.gray.normal':_ref$color,testID=_ref.testID,textAlign=_ref.textAlign,textDecorationLine=_ref.textDecorationLine;var props={color:color,fontSize:100,fontWeight:weight!=null?weight:'regular',fontStyle:'normal',lineHeight:100,fontFamily:'text',componentName:'text',testID:testID,textAlign:textAlign,textDecorationLine:textDecorationLine};if(variant==='caption'){if(size&&size!=='small'&&size!=='medium'){if(__DEV__){throwBladeError({moduleName:'Text',message:`size cannot be '${size}' when variant is 'caption'`});}size='small';}}else if(variant!=='caption'&&!size){size='medium';}if(variant==='body'){if(size==='xsmall'){props.fontSize=25;props.lineHeight=25;}if(size==='small'){props.fontSize=75;props.lineHeight=75;}if(size==='medium'){props.fontSize=100;props.lineHeight=100;}if(size==='large'){props.fontSize=200;props.lineHeight=200;}}if(variant==='caption'){if(size==='small'){props.fontSize=50;props.lineHeight=50;props.fontWeight='regular';}if(size==='medium'){props.fontSize=100;props.lineHeight=50;props.fontWeight='regular';}props.fontStyle='italic';}return props;};var _Text=function _Text(_ref2,ref){var _ref2$as=_ref2.as,as=_ref2$as===void 0?'p':_ref2$as,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'body':_ref2$variant,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'regular':_ref2$weight,size=_ref2.size,truncateAfterLines=_ref2.truncateAfterLines,children=_ref2.children,color=_ref2.color,testID=_ref2.testID,textAlign=_ref2.textAlign,textDecorationLine=_ref2.textDecorationLine,wordBreak=_ref2.wordBreak,styledProps=_objectWithoutProperties(_ref2,_excluded);var props=Object.assign({as:as,truncateAfterLines:truncateAfterLines,wordBreak:wordBreak},getTextProps({variant:variant,weight:weight,color:color,size:size,testID:testID,textAlign:textAlign,textDecorationLine:textDecorationLine}));useValidateAsProp({componentName:'Text',as:as,validAsValues:validAsValues});return jsx(BaseText,Object.assign({ref:ref},props,getStyledProps(styledProps),{children:children}));};var Text=assignWithoutSideEffects(React__default.forwardRef(_Text),{displayName:'Text',componentId:'Text'});
16
16
 
17
17
  export { Text, getTextProps };
18
18
  //# sourceMappingURL=Text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sources":["../../../../../../src/components/Typography/Text/Text.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\n\nconst validAsValues = ['p', 'span', 'div', 'abbr', 'figcaption', 'cite', 'q', 'label'] as const;\ntype TextCommonProps = {\n as?: typeof validAsValues[number];\n truncateAfterLines?: number;\n children: React.ReactNode;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'medium' | 'semibold'>;\n /**\n * Overrides the color of the Text component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of text\n */\n color?: BaseTextProps['color'];\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n wordBreak?: BaseTextProps['wordBreak'];\n} & TestID &\n StyledPropsBlade;\n\nexport type TextVariant = 'body' | 'caption';\n\ntype TextBodyVariant = TextCommonProps & {\n variant?: Extract<TextVariant, 'body'>;\n size?: Extract<BaseTextSizes, 'xsmall' | 'small' | 'medium' | 'large'>;\n};\n\ntype TextCaptionVariant = TextCommonProps & {\n variant?: Extract<TextVariant, 'caption'>;\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n};\n\n/**\n * Conditionally changing props based on variant.\n * Overloads or union gives wrong intellisense.\n */\nexport type TextProps<T> = T extends {\n variant: infer Variant;\n}\n ? Variant extends 'caption'\n ? TextCaptionVariant\n : Variant extends 'body'\n ? TextBodyVariant\n : T\n : T;\n\ntype GetTextPropsReturn = Omit<BaseTextProps, 'children'>;\ntype GetTextProps<T extends { variant: TextVariant }> = Pick<\n TextProps<T>,\n 'variant' | 'weight' | 'size' | 'color' | 'testID' | 'textAlign' | 'textDecorationLine'\n>;\n\nconst getTextProps = <T extends { variant: TextVariant }>({\n variant,\n weight,\n size,\n color = 'surface.text.gray.normal',\n testID,\n textAlign,\n textDecorationLine,\n}: GetTextProps<T>): GetTextPropsReturn => {\n const props: GetTextPropsReturn = {\n color,\n fontSize: 100,\n fontWeight: weight ?? 'regular',\n fontStyle: 'normal',\n lineHeight: 100,\n fontFamily: 'text',\n componentName: 'text',\n testID,\n textAlign,\n textDecorationLine,\n };\n\n if (variant === 'caption') {\n // variant of caption can only have size of small\n if (size && size !== 'small' && size !== 'medium') {\n if (__DEV__) {\n throwBladeError({\n moduleName: 'Text',\n message: `size cannot be '${size}' when variant is 'caption'`,\n });\n }\n // Set size as small in case of invalid size\n size = 'small';\n }\n } else if (variant !== 'caption' && !size) {\n size = 'medium';\n }\n\n if (variant === 'body') {\n if (size === 'xsmall') {\n props.fontSize = 25;\n props.lineHeight = 25;\n }\n if (size === 'small') {\n props.fontSize = 75;\n props.lineHeight = 75;\n }\n if (size === 'medium') {\n props.fontSize = 100;\n props.lineHeight = 100;\n }\n if (size === 'large') {\n props.fontSize = 200;\n props.lineHeight = 200;\n }\n }\n if (variant === 'caption') {\n if (size === 'small') {\n props.fontSize = 50;\n props.lineHeight = 50;\n props.fontWeight = 'regular';\n }\n if (size === 'medium') {\n props.fontSize = 100;\n props.lineHeight = 50;\n props.fontWeight = 'regular';\n }\n props.fontStyle = 'italic';\n }\n\n return props;\n};\n\nconst _Text = <T extends { variant: TextVariant }>({\n as = 'p',\n variant = 'body',\n weight = 'regular',\n size,\n truncateAfterLines,\n children,\n color,\n testID,\n textAlign,\n textDecorationLine,\n wordBreak,\n ...styledProps\n}: TextProps<T>): ReactElement => {\n const props: Omit<BaseTextProps, 'children'> = {\n as,\n truncateAfterLines,\n wordBreak,\n ...getTextProps({\n variant,\n weight,\n color,\n size,\n testID,\n textAlign,\n textDecorationLine,\n }),\n };\n\n useValidateAsProp({ componentName: 'Text', as, validAsValues });\n\n return (\n <BaseText {...props} {...getStyledProps(styledProps)}>\n {children}\n </BaseText>\n );\n};\n\nconst Text = assignWithoutSideEffects(_Text, {\n displayName: 'Text',\n componentId: 'Text',\n});\n\nexport { Text, getTextProps };\n"],"names":["validAsValues","getTextProps","_ref","variant","weight","size","_ref$color","color","testID","textAlign","textDecorationLine","props","fontSize","fontWeight","fontStyle","lineHeight","fontFamily","componentName","__DEV__","throwBladeError","moduleName","message","_Text","_ref2","_ref2$as","as","_ref2$variant","_ref2$weight","truncateAfterLines","children","wordBreak","styledProps","_objectWithoutProperties","_excluded","Object","assign","useValidateAsProp","_jsx","BaseText","getStyledProps","Text","assignWithoutSideEffects","displayName","componentId"],"mappings":";;;;;;;;;;;;;;AAEA,IAAA,SAAA,CAAA,CAAA,IAAA,CAAA,SAAA,CAAA,QAAA,CAAA,MAAA,CAAA,oBAAA,CAAA,UAAA,CAAA,OAAA,CAAA,QAAA,CAAA,WAAA,CAAA,oBAAA,CAAA,WAAA,CAAA,CAUA,IAAMA,aAAa,CAAG,CAAC,GAAG,CAAE,MAAM,CAAE,KAAK,CAAE,MAAM,CAAE,YAAY,CAAE,MAAM,CAAE,GAAG,CAAE,OAAO,CAAU,CAkDzF,IAAAC,YAAY,CAAG,SAAfA,YAAYA,CAAAC,IAAA,CAQyB,CAAA,IAPzCC,OAAO,CAAAD,IAAA,CAAPC,OAAO,CACPC,MAAM,CAAAF,IAAA,CAANE,MAAM,CACNC,IAAI,CAAAH,IAAA,CAAJG,IAAI,CAAAC,UAAA,CAAAJ,IAAA,CACJK,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAG,KAAA,CAAA,CAAA,0BAA0B,CAAAA,UAAA,CAClCE,MAAM,CAAAN,IAAA,CAANM,MAAM,CACNC,SAAS,CA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C,WAAW,CAAAC,wBAAA,CAAAT,KAAA,CAAAU,SAAA,CAEd,CAAA,IAAMtB,KAAsC,CAAAuB,MAAA,CAAAC,MAAA,CAAA,CAC1CV,EAAE,CAAFA,EAAE,CACFG,kBAAkB,CAAlBA,kBAAkB,CAClBE,SAAS,CAATA,SAAS,CAAA,CACN7B,YAAY,CAAC,CACdE,OAAO,CAAPA,OAAO,CACPC,MAAM,CAANA,MAAM,CACNG,KAAK,CAALA,KAAK,CACLF,IAAI,CAAJA,IAAI,CACJG,MAAM,CAANA,MAAM,CACNC,SAAS,CAATA,SAAS,CACTC,kBAAkB,CAAlBA,kBACF,CAAC,CAAC,CACH,CAED0B,iBAAiB,CAAC,CAAEnB,aAAa,CAAE,MAAM,CAAEQ,EAAE,CAAFA,EAAE,CAAEzB,aAAa,CAAbA,aAAc,CAAC,CAAC,CAE/D,OACEqC,GAAA,CAACC,QAAQ,CAAAJ,MAAA,CAAAC,MAAA,CAAKxB,EAAAA,CAAAA,KAAK,CAAM4B,cAAc,CAACR,WAAW,CAAC,CAAA,CAAAF,QAAA,CACjDA,QAAQ,CACD,CAAA,CAAC,CAEf,CAAC,CAEK,IAAAW,IAAI,CAAGC,wBAAwB,CAACnB,KAAK,CAAE,CAC3CoB,WAAW,CAAE,MAAM,CACnBC,WAAW,CAAE,MACf,CAAC;;;;"}
1
+ {"version":3,"file":"Text.js","sources":["../../../../../../src/components/Typography/Text/Text.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport { BaseText } from '../BaseText';\nimport type { BaseTextProps, BaseTextSizes } from '../BaseText/types';\nimport { useValidateAsProp } from '../utils';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { BladeElementRef, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\n\nconst validAsValues = ['p', 'span', 'div', 'abbr', 'figcaption', 'cite', 'q', 'label'] as const;\ntype TextCommonProps = {\n as?: typeof validAsValues[number];\n truncateAfterLines?: number;\n children: React.ReactNode;\n weight?: Extract<BaseTextProps['fontWeight'], 'regular' | 'medium' | 'semibold'>;\n /**\n * Overrides the color of the Text component.\n *\n * **Note** This takes priority over `type` and `contrast` prop to decide color of text\n */\n color?: BaseTextProps['color'];\n textAlign?: BaseTextProps['textAlign'];\n textDecorationLine?: BaseTextProps['textDecorationLine'];\n wordBreak?: BaseTextProps['wordBreak'];\n} & TestID &\n StyledPropsBlade;\n\nexport type TextVariant = 'body' | 'caption';\n\ntype TextBodyVariant = TextCommonProps & {\n variant?: Extract<TextVariant, 'body'>;\n size?: Extract<BaseTextSizes, 'xsmall' | 'small' | 'medium' | 'large'>;\n};\n\ntype TextCaptionVariant = TextCommonProps & {\n variant?: Extract<TextVariant, 'caption'>;\n size?: Extract<BaseTextSizes, 'small' | 'medium'>;\n};\n\nexport type TextProps<T> = T extends { variant: infer Variant }\n ? Variant extends 'caption'\n ? TextCaptionVariant\n : Variant extends 'body'\n ? TextBodyVariant\n : T\n : T;\n\ntype GetTextPropsReturn = Omit<BaseTextProps, 'children'>;\ntype GetTextProps<T extends { variant: TextVariant }> = Pick<\n TextProps<T>,\n 'variant' | 'weight' | 'size' | 'color' | 'testID' | 'textAlign' | 'textDecorationLine'\n>;\n\nconst getTextProps = <T extends { variant: TextVariant }>({\n variant,\n weight,\n size,\n color = 'surface.text.gray.normal',\n testID,\n textAlign,\n textDecorationLine,\n}: GetTextProps<T>): GetTextPropsReturn => {\n const props: GetTextPropsReturn = {\n color,\n fontSize: 100,\n fontWeight: weight ?? 'regular',\n fontStyle: 'normal',\n lineHeight: 100,\n fontFamily: 'text',\n componentName: 'text',\n testID,\n textAlign,\n textDecorationLine,\n };\n\n if (variant === 'caption') {\n // variant of caption can only have size of small\n if (size && size !== 'small' && size !== 'medium') {\n if (__DEV__) {\n throwBladeError({\n moduleName: 'Text',\n message: `size cannot be '${size}' when variant is 'caption'`,\n });\n }\n // Set size as small in case of invalid size\n size = 'small';\n }\n } else if (variant !== 'caption' && !size) {\n size = 'medium';\n }\n\n if (variant === 'body') {\n if (size === 'xsmall') {\n props.fontSize = 25;\n props.lineHeight = 25;\n }\n if (size === 'small') {\n props.fontSize = 75;\n props.lineHeight = 75;\n }\n if (size === 'medium') {\n props.fontSize = 100;\n props.lineHeight = 100;\n }\n if (size === 'large') {\n props.fontSize = 200;\n props.lineHeight = 200;\n }\n }\n if (variant === 'caption') {\n if (size === 'small') {\n props.fontSize = 50;\n props.lineHeight = 50;\n props.fontWeight = 'regular';\n }\n if (size === 'medium') {\n props.fontSize = 100;\n props.lineHeight = 50;\n props.fontWeight = 'regular';\n }\n props.fontStyle = 'italic';\n }\n\n return props;\n};\n\nconst _Text = <T extends { variant: TextVariant }>(\n {\n as = 'p',\n variant = 'body',\n weight = 'regular',\n size,\n truncateAfterLines,\n children,\n color,\n testID,\n textAlign,\n textDecorationLine,\n wordBreak,\n ...styledProps\n }: TextProps<T>,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n const props: Omit<BaseTextProps, 'children'> = {\n as,\n truncateAfterLines,\n wordBreak,\n ...getTextProps({\n variant,\n weight,\n color,\n size,\n testID,\n textAlign,\n textDecorationLine,\n }),\n };\n\n useValidateAsProp({ componentName: 'Text', as, validAsValues });\n\n return (\n <BaseText ref={ref} {...props} {...getStyledProps(styledProps)}>\n {children}\n </BaseText>\n );\n};\n\nconst Text = assignWithoutSideEffects(React.forwardRef(_Text), {\n displayName: 'Text',\n componentId: 'Text',\n});\n\nexport { Text, getTextProps };\n"],"names":["validAsValues","getTextProps","_ref","variant","weight","size","_ref$color","color","testID","textAlign","textDecorationLine","props","fontSize","fontWeight","fontStyle","lineHeight","fontFamily","componentName","__DEV__","throwBladeError","moduleName","message","_Text","_ref2","ref","_ref2$as","as","_ref2$variant","_ref2$weight","truncateAfterLines","children","wordBreak","styledProps","_objectWithoutProperties","_excluded","Object","assign","useValidateAsProp","_jsx","BaseText","getStyledProps","Text","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;AAEA,IAAA,SAAA,CAAA,CAAA,IAAA,CAAA,SAAA,CAAA,QAAA,CAAA,MAAA,CAAA,oBAAA,CAAA,UAAA,CAAA,OAAA,CAAA,QAAA,CAAA,WAAA,CAAA,oBAAA,CAAA,WAAA,CAAA,CAUA,IAAMA,aAAa,CAAG,CAAC,GAAG,CAAE,MAAM,CAAE,KAAK,CAAE,MAAM,CAAE,YAAY,CAAE,MAAM,CAAE,GAAG,CAAE,OAAO,CAAU,CA4CzF,IAAAC,YAAY,CAAG,SAAfA,YAAYA,CAAAC,IAAA,CAQyB,CAPzC,IAAAC,OAAO,CAAAD,IAAA,CAAPC,OAAO,CACPC,MAAM,CAAAF,IAAA,CAANE,MAAM,CACNC,IAAI,CAAAH,IAAA,CAAJG,IAAI,CAAAC,UAAA,CAAAJ,IAAA,CACJK,KAAK,CAALA,KAAK,CAAAD,UAAA,GAAG,KAAA,CAAA,CAAA,0BAA0B,CAAAA,UAAA,CAClCE,MAAM,CAAAN,IAAA,CAANM,MAAM,CACNC,SAAS,CAAAP,IAAA,CAATO,SAAS,CACTC,kBAAkB,CAAAR,IAAA,CAAlBQ,kBAAkB,CAElB,IAAMC,KAAyB,CAAG,CAChCJ,KAAK,CAALA,KAAK,CACLK,QAAQ,CAAE,GAAG,CACbC,UAAU,CAAET,MAAM,EAAA,IAAA,CAANA,MAAM,CAAI,SAAS,CAC/BU,SAAS,CAAE,QAAQ,CACnBC,UAAU,CAAE,GAAG,CACfC,UAAU,CAAE,MAAM,CAClBC,aAAa,CAAE,MAAM,CACrBT,MAAM,CAANA,MAAM,CACNC,SAAS,CAATA,SAAS,CACTC,kBAAkB,CAAlBA,kBACF,CAAC,CAED,GAAIP,OAAO,GAAK,SAAS,CAAE,CAEzB,GAAIE,IAAI,EAAIA,IAAI,GAAK,OAAO,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CAAES,EAAE,CAAFA,EAAE,CAAE1B,aAAa,CAAbA,aAAc,CAAC,CAAC,CAE/D,OACEsC,GAAA,CAACC,QAAQ,CAAAJ,MAAA,CAAAC,MAAA,CAACZ,CAAAA,GAAG,CAAEA,GAAI,CAAA,CAAKb,KAAK,CAAM6B,cAAc,CAACR,WAAW,CAAC,CAAA,CAAAF,QAAA,CAC3DA,QAAQ,CAAA,CACD,CAAC,CAEf,CAAC,CAEK,IAAAW,IAAI,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAACtB,KAAK,CAAC,CAAE,CAC7DuB,WAAW,CAAE,MAAM,CACnBC,WAAW,CAAE,MACf,CAAC;;;;"}
@@ -44,6 +44,7 @@ export { DropdownOverlay } from './Dropdown/DropdownOverlay.native.js';
44
44
  export { DropdownButton } from './Dropdown/DropdownButton.js';
45
45
  export { DropdownLink } from './Dropdown/DropdownLink.js';
46
46
  export { DropdownFooter, DropdownHeader } from './Dropdown/DropdownHeaderFooter.js';
47
+ export { Fade } from './Fade/Fade.native.js';
47
48
  export { FileUpload } from './FileUpload/FileUpload.native.js';
48
49
  export { default as AcceptPaymentsIcon } from './Icons/AcceptPaymentsIcon/AcceptPaymentsIcon.js';
49
50
  export { default as ActivityIcon } from './Icons/ActivityIcon/ActivityIcon.js';
@@ -298,6 +299,7 @@ export { default as PowerIcon } from './Icons/PowerIcon/PowerIcon.js';
298
299
  export { default as PrinterIcon } from './Icons/PrinterIcon/PrinterIcon.js';
299
300
  export { default as QRCodeIcon } from './Icons/QRCodeIcon/QRCodeIcon.js';
300
301
  export { default as RadioIcon } from './Icons/RadioIcon/RadioIcon.js';
302
+ export { default as RayIcon } from './Icons/RayIcon/RayIcon.js';
301
303
  export { default as RazorpayIcon } from './Icons/RazorpayIcon/RazorpayIcon.js';
302
304
  export { default as RazorpayXIcon } from './Icons/RazorpayXIcon/RazorpayXIcon.js';
303
305
  export { default as RazorpayxPayrollIcon } from './Icons/RazorpayxPayrollIcon/RazorpayxPayrollIcon.js';
@@ -425,6 +427,8 @@ export { ListItemCode } from './List/ListItemCode.js';
425
427
  export { ListItemText } from './List/ListItemText.js';
426
428
  export { announce, clearAnnouncer, destroyAnnouncer } from './LiveAnnouncer/LiveAnnouncer.native.js';
427
429
  export { Modal } from './Modal/Modal.native.js';
430
+ export { Move } from './Move/Move.native.js';
431
+ export { Morph } from './Morph/Morph.native.js';
428
432
  export { Menu } from './Menu/Menu.native.js';
429
433
  export { MenuItem } from './Menu/MenuItem.native.js';
430
434
  export { MenuOverlay } from './Menu/MenuOverlay.native.js';
@@ -435,6 +439,7 @@ export { PopoverInteractiveWrapper } from './Popover/PopoverInteractiveWrapper.n
435
439
  export { ProgressBar } from './ProgressBar/ProgressBar.js';
436
440
  export { Radio } from './Radio/Radio.js';
437
441
  export { RadioGroup } from './Radio/RadioGroup/RadioGroup.js';
442
+ export { Scale } from './Scale/Scale.native.js';
438
443
  export { SideNav } from './SideNav/SideNav.native.js';
439
444
  export { SideNavLink } from './SideNav/SideNavItems/SideNavLink.native.js';
440
445
  export { SideNavLevel } from './SideNav/SideNavLevel.native.js';
@@ -452,6 +457,7 @@ export { SpotlightPopoverTourStep } from './SpotlightPopoverTour/TourStep.native
452
457
  export { StepGroup } from './StepGroup/StepGroup.native.js';
453
458
  export { StepItem } from './StepGroup/StepItem.native.js';
454
459
  export { StepItemIcon, StepItemIndicator } from './StepGroup/StepItemMarker.js';
460
+ export { Slide } from './Slide/Slide.native.js';
455
461
  export { Switch } from './Switch/Switch.js';
456
462
  export { Table } from './Table/Table.native.js';
457
463
  export { TableHeader, TableHeaderCell, TableHeaderRow } from './Table/TableHeader.native.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { makeBezier } from '../../utils/makeBezier/makeBezier.native.js';
2
2
 
3
- var delay={'2xshort':70,xshort:120,short:180,long:3000,xlong:5000};var duration={'2xquick':70,xquick:150,quick:200,moderate:250,xmoderate:300,gentle:400,xgentle:600,'2xgentle':900};var easing={standard:{attentive:makeBezier(0.5,0,0.3,1.5),effective:makeBezier(0.3,0,0.2,1),revealing:makeBezier(0.5,0,0,1),wary:makeBezier(1,0.5,0,0.5)},entrance:{attentive:makeBezier(0.5,0,0.3,1.5),effective:makeBezier(0,0,0.2,1),revealing:makeBezier(0,0,0,1)},exit:{attentive:makeBezier(0.7,0,0.5,1),effective:makeBezier(0.17,0,1,1),revealing:makeBezier(0.5,0,1,1)}};var motion={delay:delay,duration:duration,easing:easing};
3
+ var delay={'2xquick':80,xquick:160,moderate:280,gentle:480,xgentle:960,long:2000,xlong:3000,'2xlong':5000};var duration={'2xquick':80,xquick:160,quick:200,moderate:280,xmoderate:360,gentle:480,xgentle:640,'2xgentle':960};var easing={linear:makeBezier(0,0,0,0),entrance:makeBezier(0,0,0.2,1),exit:makeBezier(0.17,0,1,1),standard:makeBezier(0.3,0,0.2,1),emphasized:makeBezier(0.5,0,0,1),overshoot:makeBezier(0.5,0,0.3,1.5),shake:makeBezier(1,0.5,0,0.5)};var motion={delay:delay,duration:duration,easing:easing};
4
4
 
5
5
  export { motion };
6
6
  //# sourceMappingURL=motion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"motion.js","sources":["../../../../../src/tokens/global/motion.ts"],"sourcesContent":["import type { DotNotationMotionStringToken } from '~utils/types';\nimport type { Platform } from '~utils';\nimport { makeBezier } from '~utils/makeBezier';\n\ntype Duration = {\n /** `70` milliseconds */\n '2xquick': 70;\n /** `150` milliseconds */\n xquick: 150;\n /** `200` milliseconds */\n quick: 200;\n /** `250` milliseconds */\n moderate: 250;\n /** `300` milliseconds */\n xmoderate: 300;\n /** `400` milliseconds */\n gentle: 400;\n /** `600` milliseconds */\n xgentle: 600;\n /** `900` milliseconds */\n '2xgentle': 900;\n};\n\ntype Delay = {\n /** `70` milliseconds */\n '2xshort': 70;\n /** `120` milliseconds */\n xshort: 120;\n /** `180` milliseconds */\n short: 180;\n /** `3000` milliseconds */\n long: 3000;\n /** `5000` milliseconds */\n xlong: 5000;\n};\n\nexport type EasingFactoryFn = { factory: () => (value: number) => number }; // similar to EasingFactoryFn of `react-native-reanimated`\nexport type EasingType<Value extends string> = Platform.Select<{\n web: Value;\n native: EasingFactoryFn;\n}>;\n\ntype Easing = {\n /** Easings for all standard animations*/\n standard: {\n /** `cubic-bezier(0.5, 0, 0.3, 1.5)`\n *\n * Returns a `string` of `\"cubic-bezier(...)\"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */\n attentive: EasingType<'cubic-bezier(0.5, 0, 0.3, 1.5)'>;\n /** `cubic-bezier(0.3, 0, 0.2, 1)`\n *\n * Returns a `string` of `\"cubic-bezier(...)\"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */\n effective: EasingType<'cubic-bezier(0.3, 0, 0.2, 1)'>;\n /** `cubic-bezier(0.5, 0, 0, 1)`\n *\n * Returns a `string` of `\"cubic-bezier(...)\"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */\n revealing: EasingType<'cubic-bezier(0.5, 0, 0, 1)'>;\n /** `cubic-bezier(1, 0.5, 0, 0.5)`\n *\n * Returns a `string` of `\"cubic-bezier(...)\"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */\n wary: EasingType<'cubic-bezier(1, 0.5, 0, 0.5)'>;\n };\n /** Easings for all entrance animations*/\n entrance: {\n /** `cubic-bezier(0.5, 0, 0.3, 1.5)`\n *\n * Returns a `string` of `\"cubic-bezier(...)\"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */\n attentive: EasingType<'cubic-bezier(0.5, 0, 0.3, 1.5)'>;\n /** `cubic-bezier(0, 0, 0.2, 1)`\n *\n * Returns a `string` of `\"cubic-bezier(...)\"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */\n effective: EasingType<'cubic-bezier(0, 0, 0.2, 1)'>;\n /** `cubic-bezier(0, 0, 0, 1)`\n *\n * Returns a `string` of `\"cubic-bezier(...)\"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */\n revealing: EasingType<'cubic-bezier(0, 0, 0, 1)'>;\n };\n /** Easings for all exit animations*/\n exit: {\n /** `cubic-bezier(0.7, 0, 0.5, 1)`\n *\n * Returns a `string` of `\"cubic-bezier(...)\"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */\n attentive: EasingType<'cubic-bezier(0.7, 0, 0.5, 1)'>;\n /** `cubic-bezier(0.17, 0, 1, 1)`\n *\n * Returns a `string` of `\"cubic-bezier(...)\"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */\n effective: EasingType<'cubic-bezier(0.17, 0, 1, 1)'>;\n /** `cubic-bezier(0.5, 0, 1, 1)`\n *\n * Returns a `string` of `\"cubic-bezier(...)\"` for web & react-native-reanimated's Easing Function of type `EasingFactoryFn` for native */\n revealing: EasingType<'cubic-bezier(0.5, 0, 1, 1)'>;\n };\n};\n\nexport type Motion = Readonly<{\n delay: Delay;\n duration: Duration;\n easing: Easing;\n}>;\n\nexport type EasingString = `easing.${DotNotationMotionStringToken<Easing>}`;\nexport type DurationString = `duration.${keyof Duration}`;\nexport type DelayString = `delay.${keyof Delay}`;\n\nconst delay: Delay = {\n '2xshort': 70,\n xshort: 120,\n short: 180,\n long: 3000,\n xlong: 5000,\n};\n\nconst duration: Duration = {\n '2xquick': 70,\n xquick: 150,\n quick: 200,\n moderate: 250,\n xmoderate: 300,\n gentle: 400,\n xgentle: 600,\n '2xgentle': 900,\n};\n\n/* makeBezier returns a string of `cubic-bezier()` for web & a react-native-reanimated Easing Function of type `EasingFactoryFn` for native */\nconst easing: Easing = {\n standard: {\n attentive: makeBezier(0.5, 0, 0.3, 1.5),\n effective: makeBezier(0.3, 0, 0.2, 1),\n revealing: makeBezier(0.5, 0, 0, 1),\n wary: makeBezier(1, 0.5, 0, 0.5),\n },\n entrance: {\n attentive: makeBezier(0.5, 0, 0.3, 1.5),\n effective: makeBezier(0, 0, 0.2, 1),\n revealing: makeBezier(0, 0, 0, 1),\n },\n exit: {\n attentive: makeBezier(0.7, 0, 0.5, 1),\n effective: makeBezier(0.17, 0, 1, 1),\n revealing: makeBezier(0.5, 0, 1, 1),\n },\n};\n\nexport const motion: Motion = {\n delay,\n duration,\n easing,\n};\n"],"names":["delay","xshort","short","long","xlong","duration","xquick","quick","moderate","xmoderate","gentle","xgentle","easing","standard","attentive","makeBezier","effective","revealing","wary","entrance","exit","motion"],"mappings":";;AAwGA,IAAMA,KAAY,CAAG,CACnB,SAAS,CAAE,EAAE,CACbC,MAAM,CAAE,GAAG,CACXC,KAAK,CAAE,GAAG,CACVC,IAAI,CAAE,IAAI,CACVC,KAAK,CAAE,IACT,CAAC,CAED,IAAMC,QAAkB,CAAG,CACzB,SAAS,CAAE,EAAE,CACbC,MAAM,CAAE,GAAG,CACXC,KAAK,CAAE,GAAG,CACVC,QAAQ,CAAE,GAAG,CACbC,SAAS,CAAE,GAAG,CACdC,MAAM,CAAE,GAAG,CACXC,OAAO,CAAE,GAAG,CACZ,UAAU,CAAE,GACd,CAAC,CAGD,IAAMC,MAAc,CAAG,CACrBC,QAAQ,CAAE,CACRC,SAAS,CAAEC,UAAU,CAAC,GAAG,CAAE,CAAC,CAAE,GAAG,CAAE,GAAG,CAAC,CACvCC,SAAS,CAAED,UAAU,CAAC,GAAG,CAAE,CAAC,CAAE,GAAG,CAAE,CAAC,CAAC,CACrCE,SAAS,CAAEF,UAAU,CAAC,GAAG,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CACnCG,IAAI,CAAEH,UAAU,CAAC,CAAC,CAAE,GAAG,CAAE,CAAC,CAAE,GAAG,CACjC,CAAC,CACDI,QAAQ,CAAE,CACRL,SAAS,CAAEC,UAAU,CAAC,GAAG,CAAE,CAAC,CAAE,GAAG,CAAE,GAAG,CAAC,CACvCC,SAAS,CAAED,UAAU,CAAC,CAAC,CAAE,CAAC,CAAE,GAAG,CAAE,CAAC,CAAC,CACnCE,SAAS,CAAEF,UAAU,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAClC,CAAC,CACDK,IAAI,CAAE,CACJN,SAAS,CAAEC,UAAU,CAAC,GAAG,CAAE,CAAC,CAAE,GAAG,CAAE,CAAC,CAAC,CACrCC,SAAS,CAAED,UAAU,CAAC,IAAI,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CACpCE,SAAS,CAAEF,UAAU,CAAC,GAAG,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CACpC,CACF,CAAC,CAEY,IAAAM,MAAc,CAAG,CAC5BrB,KAAK,CAALA,KAAK,CACLK,QAAQ,CAARA,QAAQ,CACRO,MAAM,CAANA,MACF;;;;"}
1
+ {"version":3,"file":"motion.js","sources":["../../../../../src/tokens/global/motion.ts"],"sourcesContent":["import type { Platform } from '~utils';\nimport { makeBezier } from '~utils/makeBezier';\n\ntype Duration = {\n /** `80` milliseconds */\n '2xquick': 80;\n /** `160` milliseconds */\n xquick: 160;\n /** `200` milliseconds */\n quick: 200;\n /** `280` milliseconds */\n moderate: 280;\n /** `360` milliseconds */\n xmoderate: 360;\n /** `480` milliseconds */\n gentle: 480;\n /** `640` milliseconds */\n xgentle: 640;\n /** `960` milliseconds */\n '2xgentle': 960;\n};\n\nexport type Delay = {\n /** `80` milliseconds */\n '2xquick': 80;\n /** `160` milliseconds */\n xquick: 160;\n /** `280` milliseconds */\n moderate: 280;\n /** `480` milliseconds */\n gentle: 480;\n /** `960` milliseconds */\n xgentle: 960;\n /** `2000` milliseconds */\n long: 2000;\n /** `3000` milliseconds */\n xlong: 3000;\n /** `5000` milliseconds */\n '2xlong': 5000;\n};\n\nexport type EasingFactoryFn = { factory: () => (value: number) => number }; // similar to EasingFactoryFn of `react-native-reanimated`\nexport type EasingType<Value extends string> = Platform.Select<{\n web: Value;\n native: EasingFactoryFn;\n}>;\n\ntype Easing = {\n /**\n * Linear Easing\n *\n * Use Case: Marquee, Progress Bar, etc\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n linear: EasingType<'cubic-bezier(0, 0, 0, 0)'>;\n\n /**\n * Entrance Animation Easing\n *\n * Use Case: Entry of modals, drawer, dropdown, etc\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n entrance: EasingType<'cubic-bezier(0, 0, 0.2, 1)'>;\n\n /**\n * Exit Animation Easing\n *\n * Use Case: Exit of modals, drawer, dropdown, etc\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n exit: EasingType<'cubic-bezier(0.17, 0, 1, 1)'>;\n\n /**\n * Standard Easing\n *\n * Use Case: Morph\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n standard: EasingType<'cubic-bezier(0.3, 0, 0.2, 1)'>;\n\n /**\n * Emphasized Easing\n *\n * Use Case: Hover states of interactive items\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n emphasized: EasingType<'cubic-bezier(0.5, 0, 0, 1)'>;\n\n /**\n * Overshoot Easing\n *\n * Use Case: Toast notifications\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n overshoot: EasingType<'cubic-bezier(0.5, 0, 0.3, 1.5)'>;\n\n /**\n * Error Easing\n *\n * Use Case: Error States\n *\n * Returns cubic-bezier string in web and EasingFactoryFn of react-native-reanimated in native\n */\n shake: EasingType<'cubic-bezier(1, 0.5, 0, 0.5)'>;\n};\n\nexport type Motion = Readonly<{\n delay: Delay;\n duration: Duration;\n easing: Easing;\n}>;\n\nexport type EasingString = `easing.${keyof Easing}`;\nexport type DurationString = `duration.${keyof Duration}`;\nexport type DelayString = `delay.${keyof Delay}`;\n\nconst delay: Delay = {\n '2xquick': 80,\n xquick: 160,\n moderate: 280,\n gentle: 480,\n xgentle: 960,\n long: 2000,\n xlong: 3000,\n '2xlong': 5000,\n};\n\nconst duration: Duration = {\n '2xquick': 80,\n xquick: 160,\n quick: 200,\n moderate: 280,\n xmoderate: 360,\n gentle: 480,\n xgentle: 640,\n '2xgentle': 960,\n};\n\n/* makeBezier returns a string of `cubic-bezier()` for web & a react-native-reanimated Easing Function of type `EasingFactoryFn` for native */\nconst easing: Easing = {\n linear: makeBezier(0, 0, 0, 0),\n entrance: makeBezier(0, 0, 0.2, 1),\n exit: makeBezier(0.17, 0, 1, 1),\n standard: makeBezier(0.3, 0, 0.2, 1),\n emphasized: makeBezier(0.5, 0, 0, 1),\n overshoot: makeBezier(0.5, 0, 0.3, 1.5),\n shake: makeBezier(1, 0.5, 0, 0.5),\n};\n\nexport const motion: Motion = {\n delay,\n duration,\n easing,\n};\n"],"names":["delay","xquick","moderate","gentle","xgentle","long","xlong","duration","quick","xmoderate","easing","linear","makeBezier","entrance","exit","standard","emphasized","overshoot","shake","motion"],"mappings":";;AA0HA,IAAMA,KAAY,CAAG,CACnB,SAAS,CAAE,EAAE,CACbC,MAAM,CAAE,GAAG,CACXC,QAAQ,CAAE,GAAG,CACbC,MAAM,CAAE,GAAG,CACXC,OAAO,CAAE,GAAG,CACZC,IAAI,CAAE,IAAI,CACVC,KAAK,CAAE,IAAI,CACX,QAAQ,CAAE,IACZ,CAAC,CAED,IAAMC,QAAkB,CAAG,CACzB,SAAS,CAAE,EAAE,CACbN,MAAM,CAAE,GAAG,CACXO,KAAK,CAAE,GAAG,CACVN,QAAQ,CAAE,GAAG,CACbO,SAAS,CAAE,GAAG,CACdN,MAAM,CAAE,GAAG,CACXC,OAAO,CAAE,GAAG,CACZ,UAAU,CAAE,GACd,CAAC,CAGD,IAAMM,MAAc,CAAG,CACrBC,MAAM,CAAEC,UAAU,CAAC,CAAC,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CAC9BC,QAAQ,CAAED,UAAU,CAAC,CAAC,CAAE,CAAC,CAAE,GAAG,CAAE,CAAC,CAAC,CAClCE,IAAI,CAAEF,UAAU,CAAC,IAAI,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CAC/BG,QAAQ,CAAEH,UAAU,CAAC,GAAG,CAAE,CAAC,CAAE,GAAG,CAAE,CAAC,CAAC,CACpCI,UAAU,CAAEJ,UAAU,CAAC,GAAG,CAAE,CAAC,CAAE,CAAC,CAAE,CAAC,CAAC,CACpCK,SAAS,CAAEL,UAAU,CAAC,GAAG,CAAE,CAAC,CAAE,GAAG,CAAE,GAAG,CAAC,CACvCM,KAAK,CAAEN,UAAU,CAAC,CAAC,CAAE,GAAG,CAAE,CAAC,CAAE,GAAG,CAClC,CAAC,CAEY,IAAAO,MAAc,CAAG,CAC5BnB,KAAK,CAALA,KAAK,CACLO,QAAQ,CAARA,QAAQ,CACRG,MAAM,CAANA,MACF;;;;"}
@@ -0,0 +1,4 @@
1
+ var getOuterMotionRef=function getOuterMotionRef(_ref){var _motionMeta=_ref._motionMeta,ref=_ref.ref;return _motionMeta!=null&&_motionMeta.isEnhanced?ref:null;};var getInnerMotionRef=function getInnerMotionRef(_ref2){var _motionMeta=_ref2._motionMeta,ref=_ref2.ref;return _motionMeta!=null&&_motionMeta.isEnhanced?_motionMeta.innerRef:ref;};
2
+
3
+ export { getInnerMotionRef, getOuterMotionRef };
4
+ //# sourceMappingURL=getMotionRefs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getMotionRefs.js","sources":["../../../../src/utils/getMotionRefs.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type React from 'react';\nimport type { BladeElementRef } from './types';\nimport type { MotionMetaProp } from '~components/BaseMotion';\n\ntype MotionRefsType = {\n ref: React.Ref<BladeElementRef>;\n} & MotionMetaProp;\n\n/**\n * ## What are `getOuterMotionRef` and `getInnerMotionRef` functions?\n *\n * - Motion react requires refs on outermost element to animate components\n * - But we have certain components like input where we already pass refs on inner elements with certain expectation (e.g. in input to focus on the input)\n *\n * Using these 2 utility functions, we can use 2 refs from same forwardRef. One on outer element and one on inner element\n *\n * ---\n *\n * ### Examples\n *\n * ```jsx\n *\n * const MyComponent = ({ _motionMeta }: MotionMetaProp, ref: React.Ref<BladeElementRef>) => {\n *\n * return (\n * <BaseBox ref={getOuterMotionRef({ _motionMeta, ref })}>\n * <Text>Something something</Text>\n * <BaseInput ref={getInnerMotionRef({ _motionMeta, ref })} />\n * </BaseBox>\n * )\n * }\n * ```\n *\n * ### What does it internally do?\n *\n * - On BaseMotion.tsx, we inject _motionMeta prop with ref that is passed to child.\n * - i.e. we pick the `ref` prop of child, and pass it as `_motionMeta.innerRef`. This way in our components, we have access to both the refs. The motion/react ref that we get from forwardRef, and `_motionMeta.innerRef` (ref that you pass on child component of motion)\n * - Both `getOuterMotionRef` and `getInnerMotionRef` are simple one line utility functions to use the correct ref on correct element.\n *\n * ### When to use this?\n *\n * - When you want to forward ref to component on inner element instead of outer element (e.g. passing down the ref to input in checkbox)\n */\nconst getOuterMotionRef = ({ _motionMeta, ref }: MotionRefsType): any => {\n return _motionMeta?.isEnhanced ? ref : null;\n};\n\n/**\n * ## What are `getOuterMotionRef` and `getInnerMotionRef` functions?\n *\n * - Motion react requires refs on outermost element to animate components\n * - But we have certain components like input where we already pass refs on inner elements with certain expectation (e.g. in input to focus on the input)\n *\n * Using these 2 utility functions, we can use 2 refs from same forwardRef. One on outer element and one on inner element\n *\n * ---\n *\n * ### Examples\n *\n * ```jsx\n *\n * const MyComponent = ({ _motionMeta }: MotionMetaProp, ref: React.Ref<BladeElementRef>) => {\n *\n * return (\n * <BaseBox ref={getOuterMotionRef({ _motionMeta, ref })}>\n * <Text>Something something</Text>\n * <BaseInput ref={getInnerMotionRef({ _motionMeta, ref })} />\n * </BaseBox>\n * )\n * }\n * ```\n *\n * ### What does it internally do?\n *\n * - On BaseMotion.tsx, we inject _motionMeta prop with ref that is passed to child.\n * - i.e. we pick the `ref` prop of child, and pass it as `_motionMeta.innerRef`. This way in our components, we have access to both the refs. The motion/react ref that we get from forwardRef, and `_motionMeta.innerRef` (ref that you pass on child component of motion)\n * - Both `getOuterMotionRef` and `getInnerMotionRef` are simple one line utility functions to use the correct ref on correct element.\n *\n * ### When to use this?\n *\n * - When you want to forward ref to component on inner element instead of outer element (e.g. passing down the ref to input in checkbox)\n */\nconst getInnerMotionRef = ({ _motionMeta, ref }: MotionRefsType): any => {\n return _motionMeta?.isEnhanced ? _motionMeta.innerRef : ref;\n};\n\nexport { getOuterMotionRef, getInnerMotionRef };\n"],"names":["getOuterMotionRef","_ref","_motionMeta","ref","isEnhanced","getInnerMotionRef","_ref2","innerRef"],"mappings":"AA4CM,IAAAA,iBAAiB,CAAG,SAApBA,iBAAiBA,CAAAC,IAAA,CAAkD,CAAA,IAA5CC,WAAW,CAAAD,IAAA,CAAXC,WAAW,CAAEC,GAAG,CAAAF,IAAA,CAAHE,GAAG,CAC3C,OAAOD,WAAW,QAAXA,WAAW,CAAEE,UAAU,CAAGD,GAAG,CAAG,IAAI,CAC7C,EAqCM,IAAAE,iBAAiB,CAAG,SAApBA,iBAAiBA,CAAAC,KAAA,CAAkD,KAA5CJ,WAAW,CAAAI,KAAA,CAAXJ,WAAW,CAAEC,GAAG,CAAAG,KAAA,CAAHH,GAAG,CAC3C,OAAOD,WAAW,EAAXA,IAAAA,EAAAA,WAAW,CAAEE,UAAU,CAAGF,WAAW,CAACK,QAAQ,CAAGJ,GAAG,CAC7D;;;;"}
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
3
3
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
4
- import { useState, Children, useCallback, useMemo, cloneElement } from 'react';
4
+ import React__default, { useState, Children, useCallback, useMemo, cloneElement } from 'react';
5
5
  import { AccordionContext } from './AccordionContext.js';
6
6
  import { MAX_WIDTH } from './styles.web.js';
7
7
  import '../Box/BaseBox/index.js';
@@ -70,7 +70,7 @@ var getVariantStyles = function getVariantStyles(variant) {
70
70
  * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs
71
71
  *
72
72
  */
73
- var Accordion = function Accordion(_ref) {
73
+ var _Accordion = function _Accordion(_ref, ref) {
74
74
  var defaultExpandedIndex = _ref.defaultExpandedIndex,
75
75
  expandedIndex = _ref.expandedIndex,
76
76
  onExpandChange = _ref.onExpandChange,
@@ -116,7 +116,9 @@ var Accordion = function Accordion(_ref) {
116
116
  }, [expandedAccordionItemIndex, handleExpandChange, expandedIndex, showNumberPrefix, defaultExpandedIndex, variant, numberOfItems, size]);
117
117
  return /*#__PURE__*/jsx(AccordionContext.Provider, {
118
118
  value: accordionContext,
119
- children: /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, metaAttribute({
119
+ children: /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
120
+ ref: ref
121
+ }, metaAttribute({
120
122
  name: MetaConstants.Accordion,
121
123
  testID: testID
122
124
  })), getStyledProps(rest)), makeAnalyticsAttribute(rest)), {}, {
@@ -134,6 +136,7 @@ var Accordion = function Accordion(_ref) {
134
136
  }))
135
137
  });
136
138
  };
139
+ var Accordion = /*#__PURE__*/React__default.forwardRef(_Accordion);
137
140
 
138
141
  export { Accordion };
139
142
  //# sourceMappingURL=Accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","sources":["../../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useCallback, useMemo, useState, cloneElement, Children } from 'react';\nimport type { AccordionContextState } from './AccordionContext';\nimport { AccordionContext } from './AccordionContext';\nimport { MAX_WIDTH } from './styles';\nimport type { AccordionProps } from './types';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { size as sizeTokens } from '~tokens/global';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst MIN_WIDTH: BoxProps['minWidth'] = {\n s: makeSize(sizeTokens[200]),\n m: makeSize(sizeTokens[360]),\n l: makeSize(sizeTokens[360]),\n};\n\nconst getVariantStyles = (variant: AccordionProps['variant']): BoxProps => {\n if (variant === 'transparent') {\n return {};\n }\n\n return {\n backgroundColor: 'surface.background.gray.intense',\n borderRadius: 'medium',\n borderWidth: 'thinner',\n borderColor: 'surface.border.gray.subtle',\n };\n};\n\n/**\n * # Accordion\n *\n * An accordion is used to allow users to toggle between different content sections in a compact vertical stack.\n *\n * ## Usage\n *\n * ```jsx\n * <Accordion>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * </Accordion>\n * ```\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs\n *\n */\nconst Accordion = ({\n defaultExpandedIndex,\n expandedIndex,\n onExpandChange,\n showNumberPrefix = false,\n children,\n variant = 'transparent',\n size = 'large',\n maxWidth,\n testID,\n ...rest\n}: AccordionProps): ReactElement => {\n const [expandedAccordionItemIndex, setExpandedAccordionItemIndex] = useState<number | undefined>(\n defaultExpandedIndex,\n );\n\n const numberOfItems = Children.count(children);\n\n const handleExpandChange = useCallback(\n (nextExpandedIndex: number) => {\n if (typeof expandedIndex !== 'undefined') {\n // controlled\n onExpandChange?.({ expandedIndex: nextExpandedIndex });\n } else {\n // uncontrolled\n setExpandedAccordionItemIndex(nextExpandedIndex);\n onExpandChange?.({ expandedIndex: nextExpandedIndex });\n }\n },\n [onExpandChange, expandedIndex],\n );\n\n const accordionContext = useMemo<AccordionContextState>(\n () => ({\n expandedIndex: expandedIndex ?? expandedAccordionItemIndex,\n defaultExpandedIndex,\n onExpandChange: handleExpandChange,\n showNumberPrefix,\n variant,\n numberOfItems,\n size,\n }),\n [\n expandedAccordionItemIndex,\n handleExpandChange,\n expandedIndex,\n showNumberPrefix,\n defaultExpandedIndex,\n variant,\n numberOfItems,\n size,\n ],\n );\n\n return (\n <AccordionContext.Provider value={accordionContext}>\n <BaseBox\n {...metaAttribute({ name: MetaConstants.Accordion, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n {...getVariantStyles(variant)}\n minWidth={MIN_WIDTH}\n maxWidth={maxWidth ?? MAX_WIDTH}\n width=\"100%\"\n >\n {Children.map(children, (child, index) =>\n cloneElement(child, { _index: index, key: index }),\n )}\n </BaseBox>\n </BaseBox>\n </AccordionContext.Provider>\n );\n};\n\nexport { Accordion };\n"],"names":["MIN_WIDTH","s","makeSize","sizeTokens","m","l","getVariantStyles","variant","backgroundColor","borderRadius","borderWidth","borderColor","Accordion","_ref","defaultExpandedIndex","expandedIndex","onExpandChange","_ref$showNumberPrefix","showNumberPrefix","children","_ref$variant","_ref$size","size","maxWidth","testID","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","expandedAccordionItemIndex","setExpandedAccordionItemIndex","numberOfItems","Children","count","handleExpandChange","useCallback","nextExpandedIndex","accordionContext","useMemo","_jsx","AccordionContext","Provider","value","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","getStyledProps","makeAnalyticsAttribute","minWidth","MAX_WIDTH","width","map","child","index","cloneElement","_index","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,SAA+B,GAAG;AACtCC,EAAAA,CAAC,EAAEC,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAC;AAC5BC,EAAAA,CAAC,EAAEF,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAC;AAC5BE,EAAAA,CAAC,EAAEH,QAAQ,CAACC,IAAU,CA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CAAA;SACpD,CAAA;OACO,CAAA,CAAA;KACF,CAAA,CAAA;AAAC,GACe,CAAC,CAAA;AAEhC;;;;"}
1
+ {"version":3,"file":"Accordion.js","sources":["../../../../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport React, { useCallback, useMemo, useState, cloneElement, Children } from 'react';\nimport type { AccordionContextState } from './AccordionContext';\nimport { AccordionContext } from './AccordionContext';\nimport { MAX_WIDTH } from './styles';\nimport type { AccordionProps } from './types';\nimport { BaseBox } from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { size as sizeTokens } from '~tokens/global';\nimport { makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { BladeElementRef } from '~utils/types';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst MIN_WIDTH: BoxProps['minWidth'] = {\n s: makeSize(sizeTokens[200]),\n m: makeSize(sizeTokens[360]),\n l: makeSize(sizeTokens[360]),\n};\n\nconst getVariantStyles = (variant: AccordionProps['variant']): BoxProps => {\n if (variant === 'transparent') {\n return {};\n }\n\n return {\n backgroundColor: 'surface.background.gray.intense',\n borderRadius: 'medium',\n borderWidth: 'thinner',\n borderColor: 'surface.border.gray.subtle',\n };\n};\n\n/**\n * # Accordion\n *\n * An accordion is used to allow users to toggle between different content sections in a compact vertical stack.\n *\n * ## Usage\n *\n * ```jsx\n * <Accordion>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * <AccordionItem>\n * <AccordionItemHeader title=\"Title\" />\n * <AccordionItemBody>\n * <Text color=\"surface.text.gray.subtle\">\n * Hello this is accordion body content\n * </Text>\n * </AccordionItemBody>\n * </AccordionItem>\n * </Accordion>\n * ```\n *\n * Checkout https://blade.razorpay.com/?path=/docs/components-accordion--docs\n *\n */\nconst _Accordion = (\n {\n defaultExpandedIndex,\n expandedIndex,\n onExpandChange,\n showNumberPrefix = false,\n children,\n variant = 'transparent',\n size = 'large',\n maxWidth,\n testID,\n ...rest\n }: AccordionProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n const [expandedAccordionItemIndex, setExpandedAccordionItemIndex] = useState<number | undefined>(\n defaultExpandedIndex,\n );\n\n const numberOfItems = Children.count(children);\n\n const handleExpandChange = useCallback(\n (nextExpandedIndex: number) => {\n if (typeof expandedIndex !== 'undefined') {\n // controlled\n onExpandChange?.({ expandedIndex: nextExpandedIndex });\n } else {\n // uncontrolled\n setExpandedAccordionItemIndex(nextExpandedIndex);\n onExpandChange?.({ expandedIndex: nextExpandedIndex });\n }\n },\n [onExpandChange, expandedIndex],\n );\n\n const accordionContext = useMemo<AccordionContextState>(\n () => ({\n expandedIndex: expandedIndex ?? expandedAccordionItemIndex,\n defaultExpandedIndex,\n onExpandChange: handleExpandChange,\n showNumberPrefix,\n variant,\n numberOfItems,\n size,\n }),\n [\n expandedAccordionItemIndex,\n handleExpandChange,\n expandedIndex,\n showNumberPrefix,\n defaultExpandedIndex,\n variant,\n numberOfItems,\n size,\n ],\n );\n\n return (\n <AccordionContext.Provider value={accordionContext}>\n <BaseBox\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Accordion, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n {...getVariantStyles(variant)}\n minWidth={MIN_WIDTH}\n maxWidth={maxWidth ?? MAX_WIDTH}\n width=\"100%\"\n >\n {Children.map(children, (child, index) =>\n cloneElement(child, { _index: index, key: index }),\n )}\n </BaseBox>\n </BaseBox>\n </AccordionContext.Provider>\n );\n};\n\nconst Accordion = React.forwardRef(_Accordion);\n\nexport { Accordion };\n"],"names":["MIN_WIDTH","s","makeSize","sizeTokens","m","l","getVariantStyles","variant","backgroundColor","borderRadius","borderWidth","borderColor","_Accordion","_ref","ref","defaultExpandedIndex","expandedIndex","onExpandChange","_ref$showNumberPrefix","showNumberPrefix","children","_ref$variant","_ref$size","size","maxWidth","testID","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","expandedAccordionItemIndex","setExpandedAccordionItemIndex","numberOfItems","Children","count","handleExpandChange","useCallback","nextExpandedIndex","accordionContext","useMemo","_jsx","AccordionContext","Provider","value","BaseBox","_objectSpread","metaAttribute","name","MetaConstants","Accordion","getStyledProps","makeAnalyticsAttribute","minWidth","MAX_WIDTH","width","map","child","index","cloneElement","_index","key","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAMA,SAA+B,GAAG;AACtCC,EAAAA,CAAC,EAAEC,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAC;AAC5BC,EAAAA,CAAC,EAAEF,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAC;AAC5BE,EAAAA,CAAC,EAAEH,QAAQ,CAACC,IAAU,CAAC,GAAG,CAAC,CAAA;AAC7B,CAAC,CAAA;AAED,IAAMG,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,OAAkC,EAAe;EACzE,IAAIA,OAAO,KAAK,aAAa,EAAE;AAC7B,IAAA,OAAO,EAAE,CAAA;AACX,GAAA;EAEA,OAAO;AACLC,IAAAA,eAAe,EAAE,iCAAiC;AAClDC,IAAAA,YAAY,EAAE,QAAQ;AACtBC,IAAAA,WAAW,EAAE,SAAS;AACtBC,IAAAA,WAAW,EAAE,4BAAA;GACd,CAAA;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAadC,GAA+B,EACd;AAAA,EAAA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AAM,EAANA,MAAAA;KAAQ,CAAC,CACxD4B,EAAAA,cAAc,CAAC3B,IAAI,CAAC,CACpB4B,EAAAA,sBAAsB,CAAC5B,IAAI,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAN,MAAAA,QAAA,eAEhCuB,GAAA,CAACI,OAAO,EAAAC,aAAA,CAAAA,aAAA,CACF1C,EAAAA,EAAAA,gBAAgB,CAACC,OAAO,CAAC,CAAA,EAAA,EAAA,EAAA;AAC7BgD,QAAAA,QAAQ,EAAEvD,SAAU;AACpBwB,QAAAA,QAAQ,EAAEA,QAAQ,KAAA,IAAA,IAARA,QAAQ,KAARA,KAAAA,CAAAA,GAAAA,QAAQ,GAAIgC,SAAU;AAChCC,QAAAA,KAAK,EAAC,MAAM;QAAArC,QAAA,EAEXgB,QAAQ,CAACsB,GAAG,CAACtC,QAAQ,EAAE,UAACuC,KAAK,EAAEC,KAAK,EAAA;UAAA,oBACnCC,YAAY,CAACF,KAAK,EAAE;AAAEG,YAAAA,MAAM,EAAEF,KAAK;AAAEG,YAAAA,GAAG,EAAEH,KAAAA;AAAM,WAAC,CAAC,CAAA;SACpD,CAAA;OACO,CAAA,CAAA;KACF,CAAA,CAAA;AAAC,GACe,CAAC,CAAA;AAEhC,CAAC,CAAA;AAED,IAAMR,SAAS,gBAAGY,cAAK,CAACC,UAAU,CAACrD,UAAU;;;;"}
@@ -8,7 +8,7 @@ var getTransitionDuration = function getTransitionDuration(theme) {
8
8
 
9
9
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
10
10
  var getTransitionEasing = function getTransitionEasing(theme) {
11
- return theme.motion.easing.standard.effective;
11
+ return theme.motion.easing.standard;
12
12
  };
13
13
  var getBackgroundColor = function getBackgroundColor(_ref) {
14
14
  var theme = _ref.theme,
@@ -1 +1 @@
1
- {"version":3,"file":"commonStyles.js","sources":["../../../../../../src/components/Accordion/commonStyles.ts"],"sourcesContent":["import type { CSSObject, StyledProps } from 'styled-components';\nimport type { StyledAccordionButtonProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeMotionTime } from '~utils';\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration['2xquick']);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard.effective;\n\nconst getBackgroundColor = ({\n theme,\n isExpanded,\n isActive,\n}: {\n theme: Theme;\n isExpanded: boolean;\n isActive: boolean;\n}): string => {\n const { gray } = theme.colors.interactive.background;\n\n if (isExpanded) {\n if (isActive) {\n return gray.fadedHighlighted;\n }\n\n return gray.faded;\n }\n\n if (isActive) {\n return gray.faded;\n }\n\n return theme.colors.transparent;\n};\n\nconst getCommonAccordionButtonStyles = (\n props: StyledProps<StyledAccordionButtonProps>,\n): CSSObject => {\n const { theme } = props;\n\n return {\n padding: theme.spacing[0],\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n };\n};\n\nexport {\n getTransitionDuration,\n getTransitionEasing,\n getBackgroundColor,\n getCommonAccordionButtonStyles,\n};\n"],"names":["getTransitionDuration","theme","makeMotionTime","motion","duration","getTransitionEasing","easing","standard","effective","getBackgroundColor","_ref","isExpanded","isActive","gray","colors","interactive","background","fadedHighlighted","faded","transparent","getCommonAccordionButtonStyles","props","padding","spacing","display","flexDirection","alignItems","justifyContent"],"mappings":";;;AAKA;AACA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIC,KAAY,EAAA;EAAA,OAAKC,cAAc,CAACD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAA;AAAA,EAAA;;AAEhG;AACA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIJ,KAAY,EAAA;EAAA,OAAKA,KAAK,CAACE,MAAM,CAACG,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAA;AAAA,EAAA;AAEpF,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAQV;AAAA,EAAA,IAPZT,KAAK,GAAAS,IAAA,CAALT,KAAK;IACLU,UAAU,GAAAD,IAAA,CAAVC,UAAU;IACVC,QAAQ,GAAAF,IAAA,CAARE,QAAQ,CAAA;EAMR,IAAQC,IAAI,GAAKZ,KAAK,CAACa,MAAM,CAACC,WAAW,CAACC,UAAU,CAA5CH,IAAI,CAAA;AAEZ,EAAA,IAAIF,UAAU,EAAE;AACd,IAAA,IAAIC,QAAQ,EAAE;MACZ,OAAOC,IAAI,CAACI,gBAAgB,CAAA;AAC9B,KAAA;IAEA,OAAOJ,IAAI,CAACK,KAAK,CAAA;AACnB,GAAA;AAEA,EAAA,IAAIN,QAAQ,EAAE;IACZ,OAAOC,IAAI,CAACK,KAAK,CAAA;AACnB,GAAA;AAEA,EAAA,OAAOjB,KAAK,CAACa,MAAM,CAACK,WAAW,CAAA;AACjC,EAAC;AAED,IAAMC,8BAA8B,GAAG,SAAjCA,8BAA8BA,CAClCC,KAA8C,EAChC;AACd,EAAA,IAAQpB,KAAK,GAAKoB,KAAK,CAAfpB,KAAK,CAAA;EAEb,OAAO;AACLqB,IAAAA,OAAO,EAAErB,KAAK,CAACsB,OAAO,CAAC,CAAC,CAAC;AACzBC,IAAAA,OAAO,EAAE,MAAM;AACfC,IAAAA,aAAa,EAAE,KAAK;AACpBC,IAAAA,UAAU,EAAE,QAAQ;AACpBC,IAAAA,cAAc,EAAE,eAAA;GACjB,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"commonStyles.js","sources":["../../../../../../src/components/Accordion/commonStyles.ts"],"sourcesContent":["import type { CSSObject, StyledProps } from 'styled-components';\nimport type { StyledAccordionButtonProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeMotionTime } from '~utils';\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration['2xquick']);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard;\n\nconst getBackgroundColor = ({\n theme,\n isExpanded,\n isActive,\n}: {\n theme: Theme;\n isExpanded: boolean;\n isActive: boolean;\n}): string => {\n const { gray } = theme.colors.interactive.background;\n\n if (isExpanded) {\n if (isActive) {\n return gray.fadedHighlighted;\n }\n\n return gray.faded;\n }\n\n if (isActive) {\n return gray.faded;\n }\n\n return theme.colors.transparent;\n};\n\nconst getCommonAccordionButtonStyles = (\n props: StyledProps<StyledAccordionButtonProps>,\n): CSSObject => {\n const { theme } = props;\n\n return {\n padding: theme.spacing[0],\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n };\n};\n\nexport {\n getTransitionDuration,\n getTransitionEasing,\n getBackgroundColor,\n getCommonAccordionButtonStyles,\n};\n"],"names":["getTransitionDuration","theme","makeMotionTime","motion","duration","getTransitionEasing","easing","standard","getBackgroundColor","_ref","isExpanded","isActive","gray","colors","interactive","background","fadedHighlighted","faded","transparent","getCommonAccordionButtonStyles","props","padding","spacing","display","flexDirection","alignItems","justifyContent"],"mappings":";;;AAKA;AACA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIC,KAAY,EAAA;EAAA,OAAKC,cAAc,CAACD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAA;AAAA,EAAA;;AAEhG;AACA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIJ,KAAY,EAAA;AAAA,EAAA,OAAKA,KAAK,CAACE,MAAM,CAACG,MAAM,CAACC,QAAQ,CAAA;AAAA,EAAA;AAE1E,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAQV;AAAA,EAAA,IAPZR,KAAK,GAAAQ,IAAA,CAALR,KAAK;IACLS,UAAU,GAAAD,IAAA,CAAVC,UAAU;IACVC,QAAQ,GAAAF,IAAA,CAARE,QAAQ,CAAA;EAMR,IAAQC,IAAI,GAAKX,KAAK,CAACY,MAAM,CAACC,WAAW,CAACC,UAAU,CAA5CH,IAAI,CAAA;AAEZ,EAAA,IAAIF,UAAU,EAAE;AACd,IAAA,IAAIC,QAAQ,EAAE;MACZ,OAAOC,IAAI,CAACI,gBAAgB,CAAA;AAC9B,KAAA;IAEA,OAAOJ,IAAI,CAACK,KAAK,CAAA;AACnB,GAAA;AAEA,EAAA,IAAIN,QAAQ,EAAE;IACZ,OAAOC,IAAI,CAACK,KAAK,CAAA;AACnB,GAAA;AAEA,EAAA,OAAOhB,KAAK,CAACY,MAAM,CAACK,WAAW,CAAA;AACjC,EAAC;AAED,IAAMC,8BAA8B,GAAG,SAAjCA,8BAA8BA,CAClCC,KAA8C,EAChC;AACd,EAAA,IAAQnB,KAAK,GAAKmB,KAAK,CAAfnB,KAAK,CAAA;EAEb,OAAO;AACLoB,IAAAA,OAAO,EAAEpB,KAAK,CAACqB,OAAO,CAAC,CAAC,CAAC;AACzBC,IAAAA,OAAO,EAAE,MAAM;AACfC,IAAAA,aAAa,EAAE,KAAK;AACpBC,IAAAA,UAAU,EAAE,QAAQ;AACpBC,IAAAA,cAAc,EAAE,eAAA;GACjB,CAAA;AACH;;;;"}
@@ -45,6 +45,9 @@ var _ActionList = function _ActionList(_ref) {
45
45
  sectionData = _React$useMemo.sectionData,
46
46
  childrenWithId = _React$useMemo.childrenWithId,
47
47
  actionListOptions = _React$useMemo.actionListOptions;
48
+ console.log({
49
+ actionListOptions: actionListOptions
50
+ });
48
51
  React__default.useEffect(function () {
49
52
  setOptions(actionListOptions);
50
53
  // eslint-disable-next-line react-hooks/exhaustive-deps