@razorpay/blade 11.39.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (623) hide show
  1. package/build/lib/native/components/Accordion/Accordion.js +2 -2
  2. package/build/lib/native/components/Accordion/Accordion.js.map +1 -1
  3. package/build/lib/native/components/Accordion/AccordionButton.native.js +8 -10
  4. package/build/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
  5. package/build/lib/native/components/Accordion/AccordionItemBody.js +7 -8
  6. package/build/lib/native/components/Accordion/AccordionItemBody.js.map +1 -1
  7. package/build/lib/native/components/Accordion/AccordionItemHeader.js +3 -8
  8. package/build/lib/native/components/Accordion/AccordionItemHeader.js.map +1 -1
  9. package/build/lib/native/components/Accordion/commonStyles.js +1 -1
  10. package/build/lib/native/components/Accordion/commonStyles.js.map +1 -1
  11. package/build/lib/native/components/ActionList/ActionList.js +1 -1
  12. package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
  13. package/build/lib/native/components/ActionList/ActionListItem.js +9 -8
  14. package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
  15. package/build/lib/native/components/ActionList/ActionListNoResults.js +2 -1
  16. package/build/lib/native/components/ActionList/ActionListNoResults.js.map +1 -1
  17. package/build/lib/native/components/Alert/Alert.js +4 -3
  18. package/build/lib/native/components/Alert/Alert.js.map +1 -1
  19. package/build/lib/native/components/Amount/Amount.js +4 -2
  20. package/build/lib/native/components/Amount/Amount.js.map +1 -1
  21. package/build/lib/native/components/Badge/Badge.js +10 -9
  22. package/build/lib/native/components/Badge/Badge.js.map +1 -1
  23. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +11 -10
  24. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  25. package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +8 -6
  26. package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
  27. package/build/lib/native/components/BottomNav/BottomNav.native.js +4 -10
  28. package/build/lib/native/components/BottomNav/BottomNav.native.js.map +1 -1
  29. package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  30. package/build/lib/native/components/Box/Box.js +1 -1
  31. package/build/lib/native/components/Box/Box.js.map +1 -1
  32. package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
  33. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  34. package/build/lib/native/components/Card/Card.js +1 -1
  35. package/build/lib/native/components/Card/Card.js.map +1 -1
  36. package/build/lib/native/components/Card/CardFooter.js +4 -8
  37. package/build/lib/native/components/Card/CardFooter.js.map +1 -1
  38. package/build/lib/native/components/Card/CardHeader.js +5 -9
  39. package/build/lib/native/components/Card/CardHeader.js.map +1 -1
  40. package/build/lib/native/components/Card/CardRoot.native.js +1 -1
  41. package/build/lib/native/components/Card/CardRoot.native.js.map +1 -1
  42. package/build/lib/native/components/Carousel/Carousel.native.js +1 -1
  43. package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
  44. package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js +1 -1
  45. package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js.map +1 -1
  46. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  47. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  48. package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  49. package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  50. package/build/lib/native/components/Checkbox/Checkbox.js +6 -4
  51. package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
  52. package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js +1 -1
  53. package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js.map +1 -1
  54. package/build/lib/native/components/Chip/Chip.js +5 -3
  55. package/build/lib/native/components/Chip/Chip.js.map +1 -1
  56. package/build/lib/native/components/Chip/ChipGroup.js +4 -3
  57. package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
  58. package/build/lib/native/components/Chip/chipTokens.js +1 -1
  59. package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
  60. package/build/lib/native/components/Collapsible/Collapsible.js +2 -2
  61. package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
  62. package/build/lib/native/components/Collapsible/commonStyles.js +1 -1
  63. package/build/lib/native/components/Collapsible/commonStyles.js.map +1 -1
  64. package/build/lib/native/components/Counter/Counter.js +13 -12
  65. package/build/lib/native/components/Counter/Counter.js.map +1 -1
  66. package/build/lib/native/components/Divider/Divider.js +2 -2
  67. package/build/lib/native/components/Divider/Divider.js.map +1 -1
  68. package/build/lib/native/components/Drawer/Drawer.native.js +4 -10
  69. package/build/lib/native/components/Drawer/Drawer.native.js.map +1 -1
  70. package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js +4 -9
  71. package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js.map +1 -1
  72. package/build/lib/native/components/Dropdown/Dropdown.js +2 -1
  73. package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
  74. package/build/lib/native/components/Fade/Fade.native.js +11 -0
  75. package/build/lib/native/components/Fade/Fade.native.js.map +1 -0
  76. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +3 -9
  77. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  78. package/build/lib/native/components/Form/FormLabel.js +10 -10
  79. package/build/lib/native/components/Indicator/Indicator.js +7 -6
  80. package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
  81. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
  82. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
  83. package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
  84. package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
  85. package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +3 -3
  86. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +8 -10
  87. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  88. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +9 -8
  89. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
  90. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +1 -1
  91. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  92. package/build/lib/native/components/Link/BaseLink/BaseLink.js +1 -1
  93. package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
  94. package/build/lib/native/components/List/List.js +1 -1
  95. package/build/lib/native/components/List/List.js.map +1 -1
  96. package/build/lib/native/components/List/ListItem.js +8 -10
  97. package/build/lib/native/components/List/ListItem.js.map +1 -1
  98. package/build/lib/native/components/List/ListItemCode.js +3 -9
  99. package/build/lib/native/components/List/ListItemCode.js.map +1 -1
  100. package/build/lib/native/components/List/ListItemText.js +3 -8
  101. package/build/lib/native/components/List/ListItemText.js.map +1 -1
  102. package/build/lib/native/components/Menu/Menu.native.js +4 -10
  103. package/build/lib/native/components/Menu/Menu.native.js.map +1 -1
  104. package/build/lib/native/components/Menu/MenuItem.native.js +4 -10
  105. package/build/lib/native/components/Menu/MenuItem.native.js.map +1 -1
  106. package/build/lib/native/components/Menu/MenuOverlay.native.js +4 -10
  107. package/build/lib/native/components/Menu/MenuOverlay.native.js.map +1 -1
  108. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js +4 -10
  109. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js.map +1 -1
  110. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js +4 -10
  111. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js.map +1 -1
  112. package/build/lib/native/components/Modal/Modal.native.js +4 -9
  113. package/build/lib/native/components/Modal/Modal.native.js.map +1 -1
  114. package/build/lib/native/components/Modal/ModalBody.native.js +3 -8
  115. package/build/lib/native/components/Modal/ModalBody.native.js.map +1 -1
  116. package/build/lib/native/components/Modal/ModalFooter.native.js +3 -8
  117. package/build/lib/native/components/Modal/ModalFooter.native.js.map +1 -1
  118. package/build/lib/native/components/Modal/ModalHeader.native.js +3 -8
  119. package/build/lib/native/components/Modal/ModalHeader.native.js.map +1 -1
  120. package/build/lib/native/components/Morph/Morph.native.js +11 -0
  121. package/build/lib/native/components/Morph/Morph.native.js.map +1 -0
  122. package/build/lib/native/components/Move/Move.native.js +11 -0
  123. package/build/lib/native/components/Move/Move.native.js.map +1 -0
  124. package/build/lib/native/components/Popover/PopoverContent.js +6 -8
  125. package/build/lib/native/components/Popover/PopoverContent.js.map +1 -1
  126. package/build/lib/native/components/Popover/PopoverContentWrapper.native.js +1 -1
  127. package/build/lib/native/components/Popover/PopoverContentWrapper.native.js.map +1 -1
  128. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js +7 -9
  129. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
  130. package/build/lib/native/components/ProgressBar/CircularProgressLabel.js +3 -8
  131. package/build/lib/native/components/ProgressBar/CircularProgressLabel.js.map +1 -1
  132. package/build/lib/native/components/ProgressBar/ProgressBar.js +2 -2
  133. package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
  134. package/build/lib/native/components/Radio/Radio.js +2 -1
  135. package/build/lib/native/components/Radio/Radio.js.map +1 -1
  136. package/build/lib/native/components/Radio/RadioIcon/Fade.native.js +1 -1
  137. package/build/lib/native/components/Radio/RadioIcon/Fade.native.js.map +1 -1
  138. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  139. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  140. package/build/lib/native/components/Scale/Scale.native.js +11 -0
  141. package/build/lib/native/components/Scale/Scale.native.js.map +1 -0
  142. package/build/lib/native/components/SideNav/SideNav.native.js +4 -10
  143. package/build/lib/native/components/SideNav/SideNav.native.js.map +1 -1
  144. package/build/lib/native/components/SideNav/SideNavBody.native.js +4 -10
  145. package/build/lib/native/components/SideNav/SideNavBody.native.js.map +1 -1
  146. package/build/lib/native/components/SideNav/SideNavFooter.native.js +4 -10
  147. package/build/lib/native/components/SideNav/SideNavFooter.native.js.map +1 -1
  148. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js +4 -10
  149. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js.map +1 -1
  150. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js +4 -10
  151. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js.map +1 -1
  152. package/build/lib/native/components/SideNav/SideNavLevel.native.js +4 -10
  153. package/build/lib/native/components/SideNav/SideNavLevel.native.js.map +1 -1
  154. package/build/lib/native/components/SideNav/SideNavSection.native.js +4 -10
  155. package/build/lib/native/components/SideNav/SideNavSection.native.js.map +1 -1
  156. package/build/lib/native/components/SideNav/tokens.js.map +1 -1
  157. package/build/lib/native/components/Skeleton/PulseAnimation.native.js +1 -1
  158. package/build/lib/native/components/Skeleton/PulseAnimation.native.js.map +1 -1
  159. package/build/lib/native/components/Skeleton/Skeleton.js +2 -2
  160. package/build/lib/native/components/Skeleton/Skeleton.js.map +1 -1
  161. package/build/lib/native/components/Slide/Slide.native.js +11 -0
  162. package/build/lib/native/components/Slide/Slide.native.js.map +1 -0
  163. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +4 -3
  164. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  165. package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  166. package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  167. package/build/lib/native/components/Spinner/Spinner/Spinner.js +2 -1
  168. package/build/lib/native/components/Spinner/Spinner/Spinner.js.map +1 -1
  169. package/build/lib/native/components/StepGroup/StepGroup.native.js +4 -10
  170. package/build/lib/native/components/StepGroup/StepGroup.native.js.map +1 -1
  171. package/build/lib/native/components/StepGroup/StepItem.native.js +4 -10
  172. package/build/lib/native/components/StepGroup/StepItem.native.js.map +1 -1
  173. package/build/lib/native/components/Switch/Switch.js +2 -1
  174. package/build/lib/native/components/Switch/Switch.js.map +1 -1
  175. package/build/lib/native/components/Switch/getTrackStyles.js +1 -1
  176. package/build/lib/native/components/Switch/getTrackStyles.js.map +1 -1
  177. package/build/lib/native/components/Switch/switchTokens.js +1 -1
  178. package/build/lib/native/components/Switch/switchTokens.js.map +1 -1
  179. package/build/lib/native/components/Table/Table.native.js +4 -9
  180. package/build/lib/native/components/Table/Table.native.js.map +1 -1
  181. package/build/lib/native/components/Table/TableBody.native.js +3 -8
  182. package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
  183. package/build/lib/native/components/Table/TableEditableCell.native.js +3 -9
  184. package/build/lib/native/components/Table/TableEditableCell.native.js.map +1 -1
  185. package/build/lib/native/components/Table/TableFooter.native.js +3 -8
  186. package/build/lib/native/components/Table/TableFooter.native.js.map +1 -1
  187. package/build/lib/native/components/Table/TableHeader.native.js +3 -8
  188. package/build/lib/native/components/Table/TableHeader.native.js.map +1 -1
  189. package/build/lib/native/components/Table/TablePagination.native.js +3 -8
  190. package/build/lib/native/components/Table/TablePagination.native.js.map +1 -1
  191. package/build/lib/native/components/Table/TableToolbar.native.js +3 -8
  192. package/build/lib/native/components/Table/TableToolbar.native.js.map +1 -1
  193. package/build/lib/native/components/Table/tokens.js.map +1 -1
  194. package/build/lib/native/components/Tabs/Tabs.native.js +6 -8
  195. package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
  196. package/build/lib/native/components/Tag/AnimatedTag.native.js +1 -1
  197. package/build/lib/native/components/Tag/AnimatedTag.native.js.map +1 -1
  198. package/build/lib/native/components/Tag/Tag.js +3 -2
  199. package/build/lib/native/components/Tag/Tag.js.map +1 -1
  200. package/build/lib/native/components/Tooltip/TooltipContent.js +8 -8
  201. package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js +1 -1
  202. package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js.map +1 -1
  203. package/build/lib/native/components/TopNav/TabNav/TabNav.native.js +4 -10
  204. package/build/lib/native/components/TopNav/TabNav/TabNav.native.js.map +1 -1
  205. package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js +4 -10
  206. package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js.map +1 -1
  207. package/build/lib/native/components/TopNav/TopNav.native.js +4 -10
  208. package/build/lib/native/components/TopNav/TopNav.native.js.map +1 -1
  209. package/build/lib/native/components/Typography/Code/Code.js +1 -1
  210. package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
  211. package/build/lib/native/components/Typography/Display/Display.js +2 -2
  212. package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
  213. package/build/lib/native/components/Typography/Heading/Heading.js +2 -2
  214. package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
  215. package/build/lib/native/components/Typography/Text/Text.js +2 -2
  216. package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
  217. package/build/lib/native/components/index.js +5 -0
  218. package/build/lib/native/components/index.js.map +1 -1
  219. package/build/lib/native/tokens/global/motion.js +1 -1
  220. package/build/lib/native/tokens/global/motion.js.map +1 -1
  221. package/build/lib/native/utils/getMotionRefs.js +4 -0
  222. package/build/lib/native/utils/getMotionRefs.js.map +1 -0
  223. package/build/lib/web/development/components/Accordion/Accordion.js +6 -3
  224. package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
  225. package/build/lib/web/development/components/Accordion/commonStyles.js +1 -1
  226. package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
  227. package/build/lib/web/development/components/ActionList/ActionList.js +3 -0
  228. package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
  229. package/build/lib/web/development/components/Alert/Alert.js +6 -3
  230. package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
  231. package/build/lib/web/development/components/Amount/Amount.js +3 -2
  232. package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
  233. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
  234. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
  235. package/build/lib/web/development/components/Badge/Badge.js +4 -2
  236. package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
  237. package/build/lib/web/development/components/BaseMotion/BaseMotion.js +123 -0
  238. package/build/lib/web/development/components/BaseMotion/BaseMotion.js.map +1 -0
  239. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js +60 -0
  240. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js.map +1 -0
  241. package/build/lib/web/development/components/BaseMotion/index.js +3 -0
  242. package/build/lib/web/development/components/BaseMotion/index.js.map +1 -0
  243. package/build/lib/web/development/components/BaseMotion/types.js +2 -0
  244. package/build/lib/web/development/components/BaseMotion/types.js.map +1 -0
  245. package/build/lib/web/development/components/BottomNav/BottomNav.web.js +4 -2
  246. package/build/lib/web/development/components/BottomNav/BottomNav.web.js.map +1 -1
  247. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +1 -1
  248. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
  249. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
  250. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  251. package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  252. package/build/lib/web/development/components/Box/Box.js +2 -2
  253. package/build/lib/web/development/components/Box/Box.js.map +1 -1
  254. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +3 -1
  255. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  256. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +1 -1
  257. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  258. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +1 -1
  259. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  260. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +3 -2
  261. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  262. package/build/lib/web/development/components/Card/Card.js +3 -1
  263. package/build/lib/web/development/components/Card/Card.js.map +1 -1
  264. package/build/lib/web/development/components/Card/CardRoot.web.js +6 -4
  265. package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
  266. package/build/lib/web/development/components/Carousel/Carousel.web.js +6 -3
  267. package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
  268. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  269. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  270. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  271. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  272. package/build/lib/web/development/components/Checkbox/Checkbox.js +13 -3
  273. package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
  274. package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
  275. package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
  276. package/build/lib/web/development/components/Chip/Chip.js +11 -2
  277. package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
  278. package/build/lib/web/development/components/Chip/ChipGroup.js +5 -2
  279. package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
  280. package/build/lib/web/development/components/Chip/chipTokens.js +1 -1
  281. package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
  282. package/build/lib/web/development/components/Collapsible/Collapsible.js +6 -3
  283. package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
  284. package/build/lib/web/development/components/Collapsible/commonStyles.js +2 -2
  285. package/build/lib/web/development/components/Collapsible/commonStyles.js.map +1 -1
  286. package/build/lib/web/development/components/Counter/Counter.js +4 -2
  287. package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
  288. package/build/lib/web/development/components/Divider/Divider.js +4 -2
  289. package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
  290. package/build/lib/web/development/components/Drawer/Drawer.web.js +4 -4
  291. package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
  292. package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -3
  293. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  294. package/build/lib/web/development/components/Fade/Fade.web.js +62 -0
  295. package/build/lib/web/development/components/Fade/Fade.web.js.map +1 -0
  296. package/build/lib/web/development/components/Fade/index.js +2 -0
  297. package/build/lib/web/development/components/Fade/index.js.map +1 -0
  298. package/build/lib/web/development/components/FileUpload/FileUpload.web.js +11 -2
  299. package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
  300. package/build/lib/web/development/components/FileUpload/fileUploadTokens.js +1 -1
  301. package/build/lib/web/development/components/FileUpload/fileUploadTokens.js.map +1 -1
  302. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +1 -1
  303. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
  304. package/build/lib/web/development/components/Indicator/Indicator.js +4 -2
  305. package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
  306. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  307. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  308. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +21 -7
  309. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
  310. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +2 -2
  311. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  312. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +1 -1
  313. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
  314. package/build/lib/web/development/components/List/List.js +5 -3
  315. package/build/lib/web/development/components/List/List.js.map +1 -1
  316. package/build/lib/web/development/components/Modal/Modal.web.js +2 -2
  317. package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
  318. package/build/lib/web/development/components/Modal/ModalBackdrop.js +2 -2
  319. package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
  320. package/build/lib/web/development/components/Morph/Morph.web.js +48 -0
  321. package/build/lib/web/development/components/Morph/Morph.web.js.map +1 -0
  322. package/build/lib/web/development/components/Morph/index.js +2 -0
  323. package/build/lib/web/development/components/Morph/index.js.map +1 -0
  324. package/build/lib/web/development/components/Move/Move.web.js +66 -0
  325. package/build/lib/web/development/components/Move/Move.web.js.map +1 -0
  326. package/build/lib/web/development/components/Move/index.js +2 -0
  327. package/build/lib/web/development/components/Move/index.js.map +1 -0
  328. package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js +1 -1
  329. package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
  330. package/build/lib/web/development/components/ProgressBar/ProgressBar.js +8 -4
  331. package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
  332. package/build/lib/web/development/components/Radio/Radio.js +13 -3
  333. package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
  334. package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js +3 -3
  335. package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js.map +1 -1
  336. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  337. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  338. package/build/lib/web/development/components/Scale/Scale.web.js +47 -0
  339. package/build/lib/web/development/components/Scale/Scale.web.js.map +1 -0
  340. package/build/lib/web/development/components/Scale/index.js +2 -0
  341. package/build/lib/web/development/components/Scale/index.js.map +1 -0
  342. package/build/lib/web/development/components/SideNav/SideNav.web.js +7 -5
  343. package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
  344. package/build/lib/web/development/components/SideNav/tokens.js +1 -1
  345. package/build/lib/web/development/components/SideNav/tokens.js.map +1 -1
  346. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js +1 -1
  347. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js.map +1 -1
  348. package/build/lib/web/development/components/Skeleton/Skeleton.js +4 -1
  349. package/build/lib/web/development/components/Skeleton/Skeleton.js.map +1 -1
  350. package/build/lib/web/development/components/Slide/Slide.web.js +119 -0
  351. package/build/lib/web/development/components/Slide/Slide.web.js.map +1 -0
  352. package/build/lib/web/development/components/Slide/index.js +2 -0
  353. package/build/lib/web/development/components/Slide/index.js.map +1 -0
  354. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
  355. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  356. package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  357. package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  358. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +4 -1
  359. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
  360. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  361. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  362. package/build/lib/web/development/components/Stagger/StaggerProvider.js +13 -0
  363. package/build/lib/web/development/components/Stagger/StaggerProvider.js.map +1 -0
  364. package/build/lib/web/development/components/StepGroup/StepGroup.web.js +5 -3
  365. package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
  366. package/build/lib/web/development/components/StepGroup/StepItem.web.js +1 -1
  367. package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
  368. package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js +1 -1
  369. package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
  370. package/build/lib/web/development/components/Switch/Switch.js +13 -3
  371. package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
  372. package/build/lib/web/development/components/Switch/getTrackStyles.js +1 -1
  373. package/build/lib/web/development/components/Switch/getTrackStyles.js.map +1 -1
  374. package/build/lib/web/development/components/Switch/switchTokens.js +6 -6
  375. package/build/lib/web/development/components/Switch/switchTokens.js.map +1 -1
  376. package/build/lib/web/development/components/Table/Table.web.js +4 -2
  377. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  378. package/build/lib/web/development/components/Table/tokens.js +2 -2
  379. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  380. package/build/lib/web/development/components/Tabs/TabIndicator.web.js +1 -1
  381. package/build/lib/web/development/components/Tabs/TabIndicator.web.js.map +1 -1
  382. package/build/lib/web/development/components/Tabs/TabItem.web.js +2 -2
  383. package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
  384. package/build/lib/web/development/components/Tabs/Tabs.web.js +34 -1
  385. package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
  386. package/build/lib/web/development/components/Tag/AnimatedTag.web.js +2 -2
  387. package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
  388. package/build/lib/web/development/components/Tag/Tag.js +31 -29
  389. package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
  390. package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
  391. package/build/lib/web/development/components/Toast/Toast.web.js.map +1 -1
  392. package/build/lib/web/development/components/Toast/ToastContainer.web.js +1 -1
  393. package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
  394. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  395. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  396. package/build/lib/web/development/components/TopNav/TopNav.web.js +4 -2
  397. package/build/lib/web/development/components/TopNav/TopNav.web.js.map +1 -1
  398. package/build/lib/web/development/components/Typography/Code/Code.js +30 -27
  399. package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
  400. package/build/lib/web/development/components/Typography/Display/Display.js +6 -2
  401. package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
  402. package/build/lib/web/development/components/Typography/Heading/Heading.js +4 -1
  403. package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
  404. package/build/lib/web/development/components/Typography/Text/Text.js +6 -10
  405. package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
  406. package/build/lib/web/development/components/index.js +10 -0
  407. package/build/lib/web/development/components/index.js.map +1 -1
  408. package/build/lib/web/development/tokens/global/motion.js +22 -28
  409. package/build/lib/web/development/tokens/global/motion.js.map +1 -1
  410. package/build/lib/web/development/utils/cssBezierToArray.js +12 -0
  411. package/build/lib/web/development/utils/cssBezierToArray.js.map +1 -0
  412. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
  413. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  414. package/build/lib/web/development/utils/getMotionRefs.js +86 -0
  415. package/build/lib/web/development/utils/getMotionRefs.js.map +1 -0
  416. package/build/lib/web/development/utils/msToSeconds.js +6 -0
  417. package/build/lib/web/development/utils/msToSeconds.js.map +1 -0
  418. package/build/lib/web/production/components/Accordion/Accordion.js +6 -3
  419. package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
  420. package/build/lib/web/production/components/Accordion/commonStyles.js +1 -1
  421. package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
  422. package/build/lib/web/production/components/ActionList/ActionList.js +3 -0
  423. package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
  424. package/build/lib/web/production/components/Alert/Alert.js +6 -3
  425. package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
  426. package/build/lib/web/production/components/Amount/Amount.js +3 -2
  427. package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
  428. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
  429. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
  430. package/build/lib/web/production/components/Badge/Badge.js +4 -2
  431. package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
  432. package/build/lib/web/production/components/BaseMotion/BaseMotion.js +123 -0
  433. package/build/lib/web/production/components/BaseMotion/BaseMotion.js.map +1 -0
  434. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js +60 -0
  435. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js.map +1 -0
  436. package/build/lib/web/production/components/BaseMotion/index.js +3 -0
  437. package/build/lib/web/production/components/BaseMotion/index.js.map +1 -0
  438. package/build/lib/web/production/components/BaseMotion/types.js +2 -0
  439. package/build/lib/web/production/components/BaseMotion/types.js.map +1 -0
  440. package/build/lib/web/production/components/BottomNav/BottomNav.web.js +4 -2
  441. package/build/lib/web/production/components/BottomNav/BottomNav.web.js.map +1 -1
  442. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +1 -1
  443. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
  444. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
  445. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  446. package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  447. package/build/lib/web/production/components/Box/Box.js +2 -2
  448. package/build/lib/web/production/components/Box/Box.js.map +1 -1
  449. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +3 -1
  450. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  451. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +1 -1
  452. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  453. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +1 -1
  454. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  455. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +3 -2
  456. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  457. package/build/lib/web/production/components/Card/Card.js +3 -1
  458. package/build/lib/web/production/components/Card/Card.js.map +1 -1
  459. package/build/lib/web/production/components/Card/CardRoot.web.js +6 -4
  460. package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
  461. package/build/lib/web/production/components/Carousel/Carousel.web.js +6 -3
  462. package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
  463. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  464. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  465. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  466. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  467. package/build/lib/web/production/components/Checkbox/Checkbox.js +13 -3
  468. package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
  469. package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
  470. package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
  471. package/build/lib/web/production/components/Chip/Chip.js +11 -2
  472. package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
  473. package/build/lib/web/production/components/Chip/ChipGroup.js +5 -2
  474. package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
  475. package/build/lib/web/production/components/Chip/chipTokens.js +1 -1
  476. package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
  477. package/build/lib/web/production/components/Collapsible/Collapsible.js +6 -3
  478. package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
  479. package/build/lib/web/production/components/Collapsible/commonStyles.js +2 -2
  480. package/build/lib/web/production/components/Collapsible/commonStyles.js.map +1 -1
  481. package/build/lib/web/production/components/Counter/Counter.js +4 -2
  482. package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
  483. package/build/lib/web/production/components/Divider/Divider.js +4 -2
  484. package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
  485. package/build/lib/web/production/components/Drawer/Drawer.web.js +4 -4
  486. package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
  487. package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -3
  488. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  489. package/build/lib/web/production/components/Fade/Fade.web.js +62 -0
  490. package/build/lib/web/production/components/Fade/Fade.web.js.map +1 -0
  491. package/build/lib/web/production/components/Fade/index.js +2 -0
  492. package/build/lib/web/production/components/Fade/index.js.map +1 -0
  493. package/build/lib/web/production/components/FileUpload/FileUpload.web.js +11 -2
  494. package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
  495. package/build/lib/web/production/components/FileUpload/fileUploadTokens.js +1 -1
  496. package/build/lib/web/production/components/FileUpload/fileUploadTokens.js.map +1 -1
  497. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +1 -1
  498. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
  499. package/build/lib/web/production/components/Indicator/Indicator.js +4 -2
  500. package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
  501. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  502. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  503. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +21 -7
  504. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
  505. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +2 -2
  506. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  507. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +1 -1
  508. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
  509. package/build/lib/web/production/components/List/List.js +5 -3
  510. package/build/lib/web/production/components/List/List.js.map +1 -1
  511. package/build/lib/web/production/components/Modal/Modal.web.js +2 -2
  512. package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
  513. package/build/lib/web/production/components/Modal/ModalBackdrop.js +2 -2
  514. package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
  515. package/build/lib/web/production/components/Morph/Morph.web.js +48 -0
  516. package/build/lib/web/production/components/Morph/Morph.web.js.map +1 -0
  517. package/build/lib/web/production/components/Morph/index.js +2 -0
  518. package/build/lib/web/production/components/Morph/index.js.map +1 -0
  519. package/build/lib/web/production/components/Move/Move.web.js +66 -0
  520. package/build/lib/web/production/components/Move/Move.web.js.map +1 -0
  521. package/build/lib/web/production/components/Move/index.js +2 -0
  522. package/build/lib/web/production/components/Move/index.js.map +1 -0
  523. package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js +1 -1
  524. package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
  525. package/build/lib/web/production/components/ProgressBar/ProgressBar.js +8 -4
  526. package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
  527. package/build/lib/web/production/components/Radio/Radio.js +13 -3
  528. package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
  529. package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js +3 -3
  530. package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js.map +1 -1
  531. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  532. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  533. package/build/lib/web/production/components/Scale/Scale.web.js +47 -0
  534. package/build/lib/web/production/components/Scale/Scale.web.js.map +1 -0
  535. package/build/lib/web/production/components/Scale/index.js +2 -0
  536. package/build/lib/web/production/components/Scale/index.js.map +1 -0
  537. package/build/lib/web/production/components/SideNav/SideNav.web.js +7 -5
  538. package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
  539. package/build/lib/web/production/components/SideNav/tokens.js +1 -1
  540. package/build/lib/web/production/components/SideNav/tokens.js.map +1 -1
  541. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js +1 -1
  542. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js.map +1 -1
  543. package/build/lib/web/production/components/Skeleton/Skeleton.js +4 -1
  544. package/build/lib/web/production/components/Skeleton/Skeleton.js.map +1 -1
  545. package/build/lib/web/production/components/Slide/Slide.web.js +119 -0
  546. package/build/lib/web/production/components/Slide/Slide.web.js.map +1 -0
  547. package/build/lib/web/production/components/Slide/index.js +2 -0
  548. package/build/lib/web/production/components/Slide/index.js.map +1 -0
  549. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
  550. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  551. package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  552. package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  553. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +4 -1
  554. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
  555. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  556. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  557. package/build/lib/web/production/components/Stagger/StaggerProvider.js +13 -0
  558. package/build/lib/web/production/components/Stagger/StaggerProvider.js.map +1 -0
  559. package/build/lib/web/production/components/StepGroup/StepGroup.web.js +5 -3
  560. package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
  561. package/build/lib/web/production/components/StepGroup/StepItem.web.js +1 -1
  562. package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
  563. package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js +1 -1
  564. package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
  565. package/build/lib/web/production/components/Switch/Switch.js +13 -3
  566. package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
  567. package/build/lib/web/production/components/Switch/getTrackStyles.js +1 -1
  568. package/build/lib/web/production/components/Switch/getTrackStyles.js.map +1 -1
  569. package/build/lib/web/production/components/Switch/switchTokens.js +6 -6
  570. package/build/lib/web/production/components/Switch/switchTokens.js.map +1 -1
  571. package/build/lib/web/production/components/Table/Table.web.js +4 -2
  572. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  573. package/build/lib/web/production/components/Table/tokens.js +2 -2
  574. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  575. package/build/lib/web/production/components/Tabs/TabIndicator.web.js +1 -1
  576. package/build/lib/web/production/components/Tabs/TabIndicator.web.js.map +1 -1
  577. package/build/lib/web/production/components/Tabs/TabItem.web.js +2 -2
  578. package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
  579. package/build/lib/web/production/components/Tabs/Tabs.web.js +34 -1
  580. package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
  581. package/build/lib/web/production/components/Tag/AnimatedTag.web.js +2 -2
  582. package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
  583. package/build/lib/web/production/components/Tag/Tag.js +31 -29
  584. package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
  585. package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
  586. package/build/lib/web/production/components/Toast/Toast.web.js.map +1 -1
  587. package/build/lib/web/production/components/Toast/ToastContainer.web.js +1 -1
  588. package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
  589. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  590. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  591. package/build/lib/web/production/components/TopNav/TopNav.web.js +4 -2
  592. package/build/lib/web/production/components/TopNav/TopNav.web.js.map +1 -1
  593. package/build/lib/web/production/components/Typography/Code/Code.js +30 -27
  594. package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
  595. package/build/lib/web/production/components/Typography/Display/Display.js +6 -2
  596. package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
  597. package/build/lib/web/production/components/Typography/Heading/Heading.js +4 -1
  598. package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
  599. package/build/lib/web/production/components/Typography/Text/Text.js +6 -10
  600. package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
  601. package/build/lib/web/production/components/index.js +10 -0
  602. package/build/lib/web/production/components/index.js.map +1 -1
  603. package/build/lib/web/production/tokens/global/motion.js +22 -28
  604. package/build/lib/web/production/tokens/global/motion.js.map +1 -1
  605. package/build/lib/web/production/utils/cssBezierToArray.js +12 -0
  606. package/build/lib/web/production/utils/cssBezierToArray.js.map +1 -0
  607. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
  608. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  609. package/build/lib/web/production/utils/getMotionRefs.js +86 -0
  610. package/build/lib/web/production/utils/getMotionRefs.js.map +1 -0
  611. package/build/lib/web/production/utils/msToSeconds.js +6 -0
  612. package/build/lib/web/production/utils/msToSeconds.js.map +1 -0
  613. package/build/types/components/index.d.ts +17967 -5488
  614. package/build/types/components/index.native.d.ts +7923 -2158
  615. package/build/types/tokens/index.d.ts +103 -93
  616. package/build/types/tokens/index.native.d.ts +103 -93
  617. package/build/types/utils/index.d.ts +84 -71
  618. package/build/types/utils/index.native.d.ts +84 -71
  619. package/codemods/migrate-motion-tokens/transformers/__tests__/migrate-motion-tokens.test.ts +130 -0
  620. package/codemods/migrate-motion-tokens/transformers/index.ts +1 -0
  621. package/codemods/migrate-motion-tokens/transformers/migrate-motion.ts +24 -0
  622. package/codemods/migrate-motion-tokens/transformers/motionTokenMapping.json +11 -0
  623. package/package.json +3 -1
@@ -1 +1 @@
1
- {"version":3,"file":"StyledBaseInput.native.js","sources":["../../../../../../src/components/Input/BaseInput/StyledBaseInput.native.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components/native';\nimport type { CSSObject, ThemeProps, DefaultTheme } from 'styled-components';\nimport type {\n TextInputProps,\n TouchableHighlight,\n TouchableHighlightProps,\n GestureResponderEvent,\n TextInput,\n} from 'react-native';\nimport { Platform as RNPlatform } from 'react-native';\nimport type { BaseInputProps } from './BaseInput';\nimport type { StyledBaseInputProps } from './types';\nimport { getBaseInputStyles } from './baseInputStyles';\nimport { baseInputHeight } from './baseInputTokens';\nimport { Text } from '~components/Typography';\nimport { useTheme } from '~components/BladeProvider';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { size as sizeToken } from '~tokens/global';\nimport { makeSize } from '~utils/makeSize';\nimport type { Platform } from '~utils';\n\ntype StyledComponentAutoCompleteAndroid =\n | 'off'\n | 'name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-number'\n | 'email'\n | 'username'\n | 'password'\n | 'postal-code'\n | 'tel'\n | undefined;\n\nconst autoCompleteSuggestionTypeAndroid = {\n none: 'off',\n name: 'name',\n email: 'email',\n username: 'username',\n password: 'password',\n newPassword: 'password-new',\n oneTimeCode: 'sms-otp',\n telephone: 'tel',\n postalCode: 'postal-code',\n countryName: 'postal-address-country',\n creditCardNumber: 'cc-number',\n creditCardCSC: 'cc-csc',\n creditCardExpiry: 'cc-exp',\n creditCardExpiryMonth: 'cc-exp-month',\n creditCardExpiryYear: 'cc-exp-year',\n} as const;\n\nconst autoCompleteSuggestionTypeIOS = {\n none: 'none',\n name: 'name',\n email: 'emailAddress',\n username: 'username',\n password: 'password',\n newPassword: 'newPassword',\n oneTimeCode: 'oneTimeCode',\n telephone: 'telephoneNumber',\n postalCode: 'postalCode',\n countryName: 'countryName',\n creditCardNumber: 'creditCardNumber',\n creditCardCSC: 'none',\n creditCardExpiry: 'none',\n creditCardExpiryMonth: 'none',\n creditCardExpiryYear: 'none',\n} as const;\n\nconst KeyboardTypeToNativeValuesMap = {\n text: 'default',\n search: 'default',\n telephone: 'phone-pad',\n email: 'email-address',\n url: 'url',\n decimal: 'decimal-pad',\n};\n\ntype StyledComponentInputProps = Omit<\n StyledBaseInputProps,\n 'accessibilityProps' | 'setCurrentInteraction' | 'currentInteraction'\n> & {\n isTextArea?: boolean;\n isFocused: boolean;\n autoCompleteType?: typeof autoCompleteSuggestionTypeAndroid[keyof typeof autoCompleteSuggestionTypeAndroid];\n editable?: boolean;\n onPress?: (event: GestureResponderEvent) => void;\n $size: NonNullable<BaseInputProps['size']>;\n};\n\nconst getInputHeight = ({\n isTextArea,\n hasTags,\n numberOfLines,\n isDropdownTrigger,\n size,\n}: Pick<StyledBaseInputProps, 'hasTags' | 'isTextArea' | 'numberOfLines' | 'isDropdownTrigger'> & {\n size: NonNullable<BaseInputProps['size']>;\n}): string | undefined => {\n if (isTextArea) {\n const lines = isDropdownTrigger ? 1 : numberOfLines ?? 0;\n return `${baseInputHeight[size] * lines}px`;\n }\n\n if (hasTags) {\n return undefined; // we don't set height on input. We set it on wrapper to properly include tags in overall height\n }\n\n return makeSize(sizeToken[baseInputHeight[size]]);\n};\n\nconst getRNInputStyles = (\n props: StyledComponentInputProps &\n ThemeProps<DefaultTheme> &\n (TextInputProps | TouchableHighlightProps),\n): CSSObject => {\n return {\n ...getBaseInputStyles({\n theme: props.theme,\n isFocused: props.isFocused,\n isDisabled: !props.editable,\n validationState: props.validationState,\n leadingIcon: props.leadingIcon,\n prefix: props.prefix,\n trailingInteractionElement: props.trailingInteractionElement,\n leadingInteractionElement: props.leadingInteractionElement,\n suffix: props.suffix,\n trailingIcon: props.trailingIcon,\n isTextArea: props.isTextArea,\n hasTags: props.hasTags,\n isDropdownTrigger: props.isDropdownTrigger,\n size: props.$size,\n valueComponentType: props.valueComponentType,\n isTableInputCell: props.isTableInputCell,\n }),\n lineHeight: RNPlatform.select({\n android: makeSize(props.theme.typography.lineHeights[100]),\n ios: undefined,\n }),\n textAlignVertical: 'top',\n height: getInputHeight({\n isTextArea: props.isTextArea,\n hasTags: props.hasTags,\n numberOfLines: props.numberOfLines,\n isDropdownTrigger: props.isDropdownTrigger,\n size: props.$size,\n }),\n };\n};\nconst StyledNativeBaseInput = styled.TextInput<StyledComponentInputProps>(\n ({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n isDropdownTrigger,\n hasTags,\n $size,\n isTableInputCell,\n valueComponentType,\n }) =>\n getRNInputStyles({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n hasTags,\n isDropdownTrigger,\n $size,\n valueComponentType,\n isTableInputCell,\n }),\n);\nconst StyledNativeBaseButton = styled.TouchableOpacity<StyledComponentInputProps>(\n ({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n isDropdownTrigger,\n hasTags,\n $size,\n isTableInputCell,\n valueComponentType,\n }) => ({\n ...getRNInputStyles({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n isDropdownTrigger,\n hasTags,\n $size,\n valueComponentType,\n isTableInputCell,\n }),\n }),\n);\n\nconst _StyledBaseInput: React.ForwardRefRenderFunction<\n TextInput | TouchableHighlight,\n StyledBaseInputProps\n> = (\n {\n name,\n isRequired,\n isDisabled,\n maxCharacters,\n handleOnFocus,\n handleOnChange,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n handleOnClick,\n keyboardType = 'text',\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n accessibilityProps,\n currentInteraction,\n setCurrentInteraction,\n type,\n numberOfLines,\n isTextArea,\n hasPopup,\n shouldIgnoreBlurAnimation,\n autoCapitalize,\n as: renderAs,\n $size,\n ...props\n },\n ref,\n) => {\n const buttonValue = props.value ? props.value : props.placeholder;\n const { theme } = useTheme();\n const commonProps = {\n onBlur: (): void => {\n // In certain cases like SelectInput, we want to ignore the blur animation when option item is clicked.\n // The selectinput should always look like it is in focus otherwise it triggers blur + focus again which can cause flicker\n if (!shouldIgnoreBlurAnimation) {\n setCurrentInteraction('default');\n }\n },\n isFocused: currentInteraction === 'focus',\n };\n\n return renderAs === 'button' ? (\n <StyledNativeBaseButton\n // the types of styled-components for react-native is creating a mess, so there's no other option but to type `ref` as any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n onPress={(): void => {\n handleOnClick?.({ name, value: props.value });\n }}\n onFocus={(): void => {\n handleOnFocus?.({ name, value: props.value });\n setCurrentInteraction('focus');\n }}\n as={undefined}\n $size={$size}\n {...commonProps}\n {...props}\n {...accessibilityProps}\n >\n <Text\n color={\n props.value && !isDisabled ? 'surface.text.gray.subtle' : 'surface.text.gray.disabled'\n }\n truncateAfterLines={1}\n textAlign={props.textAlign}\n size={$size}\n >\n {buttonValue}\n </Text>\n </StyledNativeBaseButton>\n ) : (\n <StyledNativeBaseInput\n // the types of styled-components for react-native is creating a mess, so there's no other option but to type `ref` as any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n multiline={isTextArea}\n numberOfLines={numberOfLines}\n editable={!isDisabled}\n maxLength={maxCharacters}\n placeholderTextColor={theme.colors.surface.text.gray.disabled}\n onFocus={(event): void => {\n handleOnFocus?.({ name, value: event?.nativeEvent.text });\n // React Native does not have native onPress event on Input elements so for consistency of API we call it on onFocus which also gets triggered on clicks\n handleOnClick?.({ name, value: event?.nativeEvent.text });\n setCurrentInteraction('focus');\n }}\n onChangeText={(text): void => {\n handleOnChange?.({ name, value: text });\n handleOnInput?.({ name, value: text });\n }}\n onEndEditing={(event): void => handleOnBlur?.({ name, value: event?.nativeEvent.text })}\n onSubmitEditing={(event): void => handleOnSubmit?.({ name, value: event?.nativeEvent.text })}\n onKeyPress={(event): void => {\n handleOnKeyDown?.({\n name,\n key: event?.nativeEvent.key,\n event: (event as unknown) as React.KeyboardEvent<HTMLInputElement>, // TODO: handle platform specific type\n });\n }}\n // @ts-expect-error styled-components have limited keyboard types('default' | 'email-address' | 'numeric' | 'phone-pad' | 'number-pad' | 'decimal-pad') compared to the actual supported types so ignoring the error.\n // source: https://reactnative.dev/docs/textinput/#keyboardtype\n keyboardType={KeyboardTypeToNativeValuesMap[keyboardType]}\n returnKeyType={keyboardReturnKeyType}\n autoCompleteType={\n autoCompleteSuggestionType\n ? (autoCompleteSuggestionTypeAndroid[\n autoCompleteSuggestionType as Platform.CastNative<\n BaseInputProps['autoCompleteSuggestionType']\n >\n ] as StyledComponentAutoCompleteAndroid)\n : undefined\n }\n secureTextEntry={type === 'password'}\n isTextArea={isTextArea}\n textContentType={\n autoCompleteSuggestionType\n ? autoCompleteSuggestionTypeIOS[\n autoCompleteSuggestionType as Platform.CastNative<\n BaseInputProps['autoCompleteSuggestionType']\n >\n ]\n : undefined\n }\n autoCapitalize={autoCapitalize}\n $size={$size}\n {...commonProps}\n {...props}\n {...accessibilityProps}\n />\n );\n};\n\nconst StyledBaseInput = assignWithoutSideEffects(React.forwardRef(_StyledBaseInput), {\n displayName: 'StyledBaseInput',\n});\n\nexport { StyledBaseInput };\n"],"names":["autoCompleteSuggestionTypeAndroid","none","name","email","username","password","newPassword","oneTimeCode","telephone","postalCode","countryName","creditCardNumber","creditCardCSC","creditCardExpiry","creditCardExpiryMonth","creditCardExpiryYear","autoCompleteSuggestionTypeIOS","KeyboardTypeToNativeValuesMap","text","search","url","decimal","getInputHeight","_ref","isTextArea","hasTags","numberOfLines","isDropdownTrigger","size","lines","baseInputHeight","undefined","makeSize","sizeToken","getRNInputStyles","props","Object","assign","getBaseInputStyles","theme","isFocused","isDisabled","editable","validationState","leadingIcon","prefix","trailingInteractionElement","leadingInteractionElement","suffix","trailingIcon","$size","valueComponentType","isTableInputCell","lineHeight","RNPlatform","select","android","typography","lineHeights","ios","textAlignVertical","height","StyledNativeBaseInput","styled","TextInput","_ref2","id","StyledNativeBaseButton","TouchableOpacity","_ref3","_StyledBaseInput","_ref4","ref","isRequired","maxCharacters","handleOnFocus","handleOnChange","handleOnBlur","handleOnSubmit","handleOnInput","handleOnKeyDown","handleOnClick","_ref4$keyboardType","keyboardType","keyboardReturnKeyType","autoCompleteSuggestionType","accessibilityProps","currentInteraction","setCurrentInteraction","type","hasPopup","shouldIgnoreBlurAnimation","autoCapitalize","renderAs","as","_objectWithoutProperties","_excluded","buttonValue","value","placeholder","_useTheme","useTheme","commonProps","onBlur","_jsx","onPress","onFocus","children","Text","color","truncateAfterLines","textAlign","multiline","maxLength","placeholderTextColor","colors","surface","gray","disabled","event","nativeEvent","onChangeText","onEndEditing","onSubmitEditing","onKeyPress","key","returnKeyType","autoCompleteType","secureTextEntry","textContentType","StyledBaseInput","assignWithoutSideEffects","React","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;maAqCA,IAAMA,iCAAiC,CAAG,CACxCC,IAAI,CAAE,KAAK,CACXC,IAAI,CAAE,MAAM,CACZC,KAAK,CAAE,OAAO,CACdC,QAAQ,CAAE,UAAU,CACpBC,QAAQ,CAAE,UAAU,CACpBC,WAAW,CAAE,cAAc,CAC3BC,WAAW,CAAE,SAAS,CACtBC,SAAS,CAAE,KAAK,CAChBC,UAAU,CAAE,aAAa,CACzBC,WAAW,CAAE,wBAAwB,CACrCC,gBAAgB,CAAE,WAAW,CAC7BC,aAAa,CAAE,QAAQ,CACvBC,gBAAgB,CAAE,QAAQ,CAC1BC,qBAAqB,CAAE,cAAc,CACrCC,oBAAoB,CAAE,aACxB,CAAU,CAEV,IAAMC,6BAA6B,CAAG,CACpCf,IAAI,C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CAG3B,CACDtD,SACL,CACDiG,eAAe,CAAEvC,IAAI,GAAK,UAAW,CACrCjE,UAAU,CAAEA,UAAW,CACvByG,eAAe,CACb5C,0BAA0B,CACtBrE,6BAA6B,CAC3BqE,0BAA0B,CAG3B,CACDtD,SACL,CACD6D,cAAc,CAAEA,cAAe,CAC/B1C,KAAK,CAAEA,KAAM,CACToD,CAAAA,WAAW,CACXnE,KAAK,CACLmD,kBAAkB,CACvB,CACF,CACH,CAAC,CAEK,IAAA4C,eAAe,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAAC/D,gBAAgB,CAAC,CAAE,CACnFgE,WAAW,CAAE,iBACf,CAAC;;;;"}
1
+ {"version":3,"file":"StyledBaseInput.native.js","sources":["../../../../../../src/components/Input/BaseInput/StyledBaseInput.native.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components/native';\nimport type { CSSObject, ThemeProps, DefaultTheme } from 'styled-components';\nimport type {\n TextInputProps,\n TouchableHighlight,\n TouchableHighlightProps,\n GestureResponderEvent,\n TextInput,\n} from 'react-native';\nimport { Platform as RNPlatform } from 'react-native';\nimport type { BaseInputProps } from './BaseInput';\nimport type { StyledBaseInputProps } from './types';\nimport { getBaseInputStyles } from './baseInputStyles';\nimport { baseInputHeight } from './baseInputTokens';\nimport { Text } from '~components/Typography';\nimport { useTheme } from '~components/BladeProvider';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { size as sizeToken } from '~tokens/global';\nimport { makeSize } from '~utils/makeSize';\nimport type { Platform } from '~utils';\n\ntype StyledComponentAutoCompleteAndroid =\n | 'off'\n | 'name'\n | 'cc-csc'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-number'\n | 'email'\n | 'username'\n | 'password'\n | 'postal-code'\n | 'tel'\n | undefined;\n\nconst autoCompleteSuggestionTypeAndroid = {\n none: 'off',\n name: 'name',\n email: 'email',\n username: 'username',\n password: 'password',\n newPassword: 'password-new',\n oneTimeCode: 'sms-otp',\n telephone: 'tel',\n postalCode: 'postal-code',\n countryName: 'postal-address-country',\n creditCardNumber: 'cc-number',\n creditCardCSC: 'cc-csc',\n creditCardExpiry: 'cc-exp',\n creditCardExpiryMonth: 'cc-exp-month',\n creditCardExpiryYear: 'cc-exp-year',\n} as const;\n\nconst autoCompleteSuggestionTypeIOS = {\n none: 'none',\n name: 'name',\n email: 'emailAddress',\n username: 'username',\n password: 'password',\n newPassword: 'newPassword',\n oneTimeCode: 'oneTimeCode',\n telephone: 'telephoneNumber',\n postalCode: 'postalCode',\n countryName: 'countryName',\n creditCardNumber: 'creditCardNumber',\n creditCardCSC: 'none',\n creditCardExpiry: 'none',\n creditCardExpiryMonth: 'none',\n creditCardExpiryYear: 'none',\n} as const;\n\nconst KeyboardTypeToNativeValuesMap = {\n text: 'default',\n search: 'default',\n telephone: 'phone-pad',\n email: 'email-address',\n url: 'url',\n decimal: 'decimal-pad',\n};\n\ntype StyledComponentInputProps = Omit<\n StyledBaseInputProps,\n 'accessibilityProps' | 'setCurrentInteraction' | 'currentInteraction'\n> & {\n isTextArea?: boolean;\n isFocused: boolean;\n autoCompleteType?: typeof autoCompleteSuggestionTypeAndroid[keyof typeof autoCompleteSuggestionTypeAndroid];\n editable?: boolean;\n onPress?: (event: GestureResponderEvent) => void;\n $size: NonNullable<BaseInputProps['size']>;\n};\n\nconst getInputHeight = ({\n isTextArea,\n hasTags,\n numberOfLines,\n isDropdownTrigger,\n size,\n}: Pick<StyledBaseInputProps, 'hasTags' | 'isTextArea' | 'numberOfLines' | 'isDropdownTrigger'> & {\n size: NonNullable<BaseInputProps['size']>;\n}): string | undefined => {\n if (isTextArea) {\n const lines = isDropdownTrigger ? 1 : numberOfLines ?? 0;\n return `${baseInputHeight[size] * lines}px`;\n }\n\n if (hasTags) {\n return undefined; // we don't set height on input. We set it on wrapper to properly include tags in overall height\n }\n\n return makeSize(sizeToken[baseInputHeight[size]]);\n};\n\nconst getRNInputStyles = (\n props: StyledComponentInputProps &\n ThemeProps<DefaultTheme> &\n (TextInputProps | TouchableHighlightProps),\n): CSSObject => {\n return {\n ...getBaseInputStyles({\n theme: props.theme,\n isFocused: props.isFocused,\n isDisabled: !props.editable,\n validationState: props.validationState,\n leadingIcon: props.leadingIcon,\n prefix: props.prefix,\n trailingInteractionElement: props.trailingInteractionElement,\n leadingInteractionElement: props.leadingInteractionElement,\n suffix: props.suffix,\n trailingIcon: props.trailingIcon,\n isTextArea: props.isTextArea,\n hasTags: props.hasTags,\n isDropdownTrigger: props.isDropdownTrigger,\n size: props.$size,\n valueComponentType: props.valueComponentType,\n isTableInputCell: props.isTableInputCell,\n }),\n lineHeight: RNPlatform.select({\n android: makeSize(props.theme.typography.lineHeights[100]),\n ios: undefined,\n }),\n textAlignVertical: 'top',\n height: getInputHeight({\n isTextArea: props.isTextArea,\n hasTags: props.hasTags,\n numberOfLines: props.numberOfLines,\n isDropdownTrigger: props.isDropdownTrigger,\n size: props.$size,\n }),\n };\n};\nconst StyledNativeBaseInput = styled.TextInput<StyledComponentInputProps>(\n ({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n isDropdownTrigger,\n hasTags,\n $size,\n isTableInputCell,\n valueComponentType,\n }) =>\n getRNInputStyles({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n hasTags,\n isDropdownTrigger,\n $size,\n valueComponentType,\n isTableInputCell,\n }),\n);\nconst StyledNativeBaseButton = styled.TouchableOpacity<StyledComponentInputProps>(\n ({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n isDropdownTrigger,\n hasTags,\n $size,\n isTableInputCell,\n valueComponentType,\n }) => ({\n ...getRNInputStyles({\n id,\n isFocused,\n theme,\n editable,\n validationState,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n isTextArea,\n numberOfLines,\n isDropdownTrigger,\n hasTags,\n $size,\n valueComponentType,\n isTableInputCell,\n }),\n }),\n);\n\nconst _StyledBaseInput: React.ForwardRefRenderFunction<\n TextInput | TouchableHighlight,\n StyledBaseInputProps\n> = (\n {\n name,\n isRequired,\n isDisabled,\n maxCharacters,\n handleOnFocus,\n handleOnChange,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n handleOnClick,\n keyboardType = 'text',\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n accessibilityProps,\n currentInteraction,\n setCurrentInteraction,\n type,\n numberOfLines,\n isTextArea,\n hasPopup,\n shouldIgnoreBlurAnimation,\n autoCapitalize,\n as: renderAs,\n $size,\n ...props\n },\n ref,\n) => {\n const buttonValue = props.value ? props.value : props.placeholder;\n const { theme } = useTheme();\n const commonProps = {\n onBlur: (): void => {\n // In certain cases like SelectInput, we want to ignore the blur animation when option item is clicked.\n // The selectinput should always look like it is in focus otherwise it triggers blur + focus again which can cause flicker\n if (!shouldIgnoreBlurAnimation) {\n setCurrentInteraction('default');\n }\n },\n isFocused: currentInteraction === 'focus',\n };\n\n return renderAs === 'button' ? (\n <StyledNativeBaseButton\n // the types of styled-components for react-native is creating a mess, so there's no other option but to type `ref` as any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n onPress={(): void => {\n handleOnClick?.({ name, value: props.value });\n }}\n onFocus={(): void => {\n handleOnFocus?.({ name, value: props.value });\n setCurrentInteraction('focus');\n }}\n as={undefined}\n $size={$size}\n {...commonProps}\n {...props}\n {...accessibilityProps}\n >\n <Text\n color={\n props.value && !isDisabled ? 'surface.text.gray.subtle' : 'surface.text.gray.disabled'\n }\n truncateAfterLines={1}\n textAlign={props.textAlign}\n size={$size}\n >\n {buttonValue}\n </Text>\n </StyledNativeBaseButton>\n ) : (\n <StyledNativeBaseInput\n // the types of styled-components for react-native is creating a mess, so there's no other option but to type `ref` as any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n multiline={isTextArea}\n numberOfLines={numberOfLines}\n editable={!isDisabled}\n maxLength={maxCharacters}\n placeholderTextColor={theme.colors.surface.text.gray.disabled}\n onFocus={(event): void => {\n handleOnFocus?.({ name, value: event?.nativeEvent.text });\n // React Native does not have native onPress event on Input elements so for consistency of API we call it on onFocus which also gets triggered on clicks\n handleOnClick?.({ name, value: event?.nativeEvent.text });\n setCurrentInteraction('focus');\n }}\n onChangeText={(text): void => {\n handleOnChange?.({ name, value: text });\n handleOnInput?.({ name, value: text });\n }}\n onEndEditing={(event): void => handleOnBlur?.({ name, value: event?.nativeEvent.text })}\n onSubmitEditing={(event): void => handleOnSubmit?.({ name, value: event?.nativeEvent.text })}\n onKeyPress={(event): void => {\n handleOnKeyDown?.({\n name,\n key: event?.nativeEvent.key,\n event: (event as unknown) as React.KeyboardEvent<HTMLInputElement>, // TODO: handle platform specific type\n });\n }}\n // @ts-expect-error styled-components have limited keyboard types('default' | 'email-address' | 'numeric' | 'phone-pad' | 'number-pad' | 'decimal-pad') compared to the actual supported types so ignoring the error.\n // source: https://reactnative.dev/docs/textinput/#keyboardtype\n keyboardType={KeyboardTypeToNativeValuesMap[keyboardType]}\n returnKeyType={keyboardReturnKeyType}\n autoCompleteType={\n autoCompleteSuggestionType\n ? (autoCompleteSuggestionTypeAndroid[\n autoCompleteSuggestionType as Platform.CastNative<\n BaseInputProps['autoCompleteSuggestionType']\n >\n ] as StyledComponentAutoCompleteAndroid)\n : undefined\n }\n secureTextEntry={type === 'password'}\n isTextArea={isTextArea}\n textContentType={\n autoCompleteSuggestionType\n ? autoCompleteSuggestionTypeIOS[\n autoCompleteSuggestionType as Platform.CastNative<\n BaseInputProps['autoCompleteSuggestionType']\n >\n ]\n : undefined\n }\n autoCapitalize={autoCapitalize}\n $size={$size}\n {...commonProps}\n {...props}\n {...accessibilityProps}\n />\n );\n};\n\nconst StyledBaseInput = assignWithoutSideEffects(React.forwardRef(_StyledBaseInput), {\n displayName: 'StyledBaseInput',\n});\n\nexport { StyledBaseInput };\n"],"names":["autoCompleteSuggestionTypeAndroid","none","name","email","username","password","newPassword","oneTimeCode","telephone","postalCode","countryName","creditCardNumber","creditCardCSC","creditCardExpiry","creditCardExpiryMonth","creditCardExpiryYear","autoCompleteSuggestionTypeIOS","KeyboardTypeToNativeValuesMap","text","search","url","decimal","getInputHeight","_ref","isTextArea","hasTags","numberOfLines","isDropdownTrigger","size","lines","baseInputHeight","undefined","makeSize","sizeToken","getRNInputStyles","props","Object","assign","getBaseInputStyles","theme","isFocused","isDisabled","editable","validationState","leadingIcon","prefix","trailingInteractionElement","leadingInteractionElement","suffix","trailingIcon","$size","valueComponentType","isTableInputCell","lineHeight","RNPlatform","select","android","typography","lineHeights","ios","textAlignVertical","height","StyledNativeBaseInput","styled","TextInput","_ref2","id","StyledNativeBaseButton","TouchableOpacity","_ref3","_StyledBaseInput","_ref4","ref","isRequired","maxCharacters","handleOnFocus","handleOnChange","handleOnBlur","handleOnSubmit","handleOnInput","handleOnKeyDown","handleOnClick","_ref4$keyboardType","keyboardType","keyboardReturnKeyType","autoCompleteSuggestionType","accessibilityProps","currentInteraction","setCurrentInteraction","type","hasPopup","shouldIgnoreBlurAnimation","autoCapitalize","renderAs","as","_objectWithoutProperties","_excluded","buttonValue","value","placeholder","_useTheme","useTheme","commonProps","onBlur","_jsx","onPress","onFocus","children","Text","color","truncateAfterLines","textAlign","multiline","maxLength","placeholderTextColor","colors","surface","gray","disabled","event","nativeEvent","onChangeText","onEndEditing","onSubmitEditing","onKeyPress","key","returnKeyType","autoCompleteType","secureTextEntry","textContentType","StyledBaseInput","assignWithoutSideEffects","React","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;maAqCA,IA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AA,KAAK,CAAEC,WAAW,CAACtG,IAAK,CAAC,CAAC,CAAC,CAAA,CAC7F0G,UAAU,CAAE,SAAAA,WAACL,KAAK,CAAW,CAC3BvC,eAAe,EAAA,IAAA,CAAA,KAAA,CAAA,CAAfA,eAAe,CAAG,CAChB9E,IAAI,CAAJA,IAAI,CACJ2H,GAAG,CAAEN,KAAK,cAALA,KAAK,CAAEC,WAAW,CAACK,GAAG,CAC3BN,KAAK,CAAGA,KACV,CAAC,CAAC,CACJ,CAAE,CAGFpC,YAAY,CAAElE,6BAA6B,CAACkE,YAAY,CAAE,CAC1D2C,aAAa,CAAE1C,qBAAsB,CACrC2C,gBAAgB,CACd1C,0BAA0B,CACrBrF,iCAAiC,CAChCqF,0BAA0B,CAG3B,CACDtD,SACL,CACDiG,eAAe,CAAEvC,IAAI,GAAK,UAAW,CACrCjE,UAAU,CAAEA,UAAW,CACvByG,eAAe,CACb5C,0BAA0B,CACtBrE,6BAA6B,CAC3BqE,0BAA0B,CAG3B,CACDtD,SACL,CACD6D,cAAc,CAAEA,cAAe,CAC/B1C,KAAK,CAAEA,KAAM,CACToD,CAAAA,WAAW,CACXnE,KAAK,CACLmD,kBAAkB,CACvB,CACF,CACH,CAAC,CAEK,IAAA4C,eAAe,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAAC/D,gBAAgB,CAAC,CAAE,CACnFgE,WAAW,CAAE,iBACf,CAAC;;;;"}
@@ -2,7 +2,7 @@ import '../../../tokens/global/typography.js';
2
2
  import '../../../tokens/global/motion.js';
3
3
  import { size } from '../../../tokens/global/size.js';
4
4
 
5
- var BASEINPUT_MAX_ROWS=4;var baseInputHeight={medium:size['36'],large:size['48']};var baseInputWrapperMaxHeight={medium:baseInputHeight.medium*BASEINPUT_MAX_ROWS,large:baseInputHeight.large*BASEINPUT_MAX_ROWS};var baseInputBorderColor={default:'interactive.border.gray.default',hovered:'interactive.border.gray.highlighted',focused:'interactive.border.primary.default',disabled:'interactive.border.gray.disabled',error:'interactive.border.negative.default',success:'interactive.border.positive.default'};var baseInputBackgroundColor={default:'surface.background.gray.intense',hovered:'surface.background.gray.moderate',focused:'surface.background.gray.moderate',disabled:'surface.background.gray.intense',error:'surface.background.gray.intense',success:'surface.background.gray.intense'};var baseInputBorderlessBackgroundColor={default:'transparent',hovered:'surface.background.gray.moderate',focused:'surface.background.gray.moderate',disabled:'surface.background.gray.intense',error:'feedback.background.negative.subtle',success:'feedback.background.positive.subtle'};var baseInputBorderWidth={default:'thin',hovered:'thin',disabled:'thin',focused:'thick',error:'thick',success:'thick'};var baseInputBorderBackgroundMotion={enter:{duration:'xgentle',easing:'standard.revealing'},exit:{duration:'gentle',easing:'standard.effective'}};var baseInputPaddingTokens={top:{medium:3,large:4},bottom:{medium:3,large:4},left:{medium:4,large:4},right:{medium:4,large:4}};var formHintLeftLabelMarginLeft={medium:136,large:192};
5
+ var BASEINPUT_MAX_ROWS=4;var baseInputHeight={medium:size['36'],large:size['48']};var baseInputWrapperMaxHeight={medium:baseInputHeight.medium*BASEINPUT_MAX_ROWS,large:baseInputHeight.large*BASEINPUT_MAX_ROWS};var baseInputBorderColor={default:'interactive.border.gray.default',hovered:'interactive.border.gray.highlighted',focused:'interactive.border.primary.default',disabled:'interactive.border.gray.disabled',error:'interactive.border.negative.default',success:'interactive.border.positive.default'};var baseInputBackgroundColor={default:'surface.background.gray.intense',hovered:'surface.background.gray.moderate',focused:'surface.background.gray.moderate',disabled:'surface.background.gray.intense',error:'surface.background.gray.intense',success:'surface.background.gray.intense'};var baseInputBorderlessBackgroundColor={default:'transparent',hovered:'surface.background.gray.moderate',focused:'surface.background.gray.moderate',disabled:'surface.background.gray.intense',error:'feedback.background.negative.subtle',success:'feedback.background.positive.subtle'};var baseInputBorderWidth={default:'thin',hovered:'thin',disabled:'thin',focused:'thick',error:'thick',success:'thick'};var baseInputBorderBackgroundMotion={enter:{duration:'xgentle',easing:'emphasized'},exit:{duration:'gentle',easing:'standard'}};var baseInputPaddingTokens={top:{medium:3,large:4},bottom:{medium:3,large:4},left:{medium:4,large:4},right:{medium:4,large:4}};var formHintLeftLabelMarginLeft={medium:136,large:192};
6
6
 
7
7
  export { BASEINPUT_MAX_ROWS, baseInputBackgroundColor, baseInputBorderBackgroundMotion, baseInputBorderColor, baseInputBorderWidth, baseInputBorderlessBackgroundColor, baseInputHeight, baseInputPaddingTokens, baseInputWrapperMaxHeight, formHintLeftLabelMarginLeft };
8
8
  //# sourceMappingURL=baseInputTokens.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"baseInputTokens.js","sources":["../../../../../../src/components/Input/BaseInput/baseInputTokens.ts"],"sourcesContent":["import type { BaseInputProps } from './BaseInput';\nimport { size, spacing } from '~tokens/global';\n\nexport const BASEINPUT_MAX_ROWS = 4;\n\nexport const TAG_HEIGHT = size['20'];\nexport const TAG_GAP = spacing['3'];\n\n/**\n * 36px\n */\nexport const baseInputHeight: Record<\n NonNullable<BaseInputProps['size']>,\n typeof size[keyof typeof size]\n> = {\n medium: size['36'],\n large: size['48'],\n};\n\n/**\n * medium - 144px (36px height * 4 rows)\n * large - 192px (48px height * 4 rows)\n */\n// we don't want exact number but rough number to be able to animate correctly in height.\nexport const baseInputWrapperMaxHeight = {\n medium: baseInputHeight.medium * BASEINPUT_MAX_ROWS,\n large: baseInputHeight.large * BASEINPUT_MAX_ROWS,\n} as const;\n\nexport const baseInputBorderColor = {\n default: 'interactive.border.gray.default',\n hovered: 'interactive.border.gray.highlighted',\n focused: 'interactive.border.primary.default',\n disabled: 'interactive.border.gray.disabled',\n error: 'interactive.border.negative.default',\n success: 'interactive.border.positive.default',\n} as const;\n\nexport const baseInputBackgroundColor = {\n default: 'surface.background.gray.intense',\n hovered: 'surface.background.gray.moderate',\n focused: 'surface.background.gray.moderate',\n disabled: 'surface.background.gray.intense',\n error: 'surface.background.gray.intense',\n success: 'surface.background.gray.intense',\n} as const;\n\nexport const baseInputBorderlessBackgroundColor = {\n default: 'transparent',\n hovered: 'surface.background.gray.moderate',\n focused: 'surface.background.gray.moderate',\n disabled: 'surface.background.gray.intense',\n error: 'feedback.background.negative.subtle',\n success: 'feedback.background.positive.subtle',\n} as const;\n\nexport const baseInputBorderWidth = {\n default: 'thin',\n hovered: 'thin',\n disabled: 'thin',\n focused: 'thick',\n error: 'thick',\n success: 'thick',\n} as const;\n\nexport const baseInputBorderBackgroundMotion = {\n enter: { duration: 'xgentle', easing: 'standard.revealing' },\n exit: { duration: 'gentle', easing: 'standard.effective' },\n} as const;\n\nexport const baseInputPaddingTokens = {\n top: {\n medium: 3,\n large: 4,\n },\n bottom: {\n medium: 3,\n large: 4,\n },\n left: {\n medium: 4,\n large: 4,\n },\n right: {\n medium: 4,\n large: 4,\n },\n} as const;\n\n/* the magic number 192 is basically max-width of label \ni.e 176 and then right margin \ni.e 16 which is the spacing between label and input field */\nexport const formHintLeftLabelMarginLeft = {\n medium: 136,\n large: 192,\n} as const;\n"],"names":["BASEINPUT_MAX_ROWS","baseInputHeight","medium","size","large","baseInputWrapperMaxHeight","baseInputBorderColor","default","hovered","focused","disabled","error","success","baseInputBackgroundColor","baseInputBorderlessBackgroundColor","baseInputBorderWidth","baseInputBorderBackgroundMotion","enter","duration","easing","exit","baseInputPaddingTokens","top","bottom","left","right","formHintLeftLabelMarginLeft"],"mappings":";;;;AAGa,IAAAA,kBAAkB,CAAG,EAQrB,IAAAC,eAGZ,CAAG,CACFC,MAAM,CAAEC,IAAI,CAAC,IAAI,CAAC,CAClBC,KAAK,CAAED,IAAI,CAAC,IAAI,CAClB,EAOa,IAAAE,yBAAyB,CAAG,CACvCH,MAAM,CAAED,eAAe,CAACC,MAAM,CAAGF,kBAAkB,CACnDI,KAAK,CAAEH,eAAe,CAACG,KAAK,CAAGJ,kBACjC,EAEa,IAAAM,oBAAoB,CAAG,CAClCC,OAAO,CAAE,iCAAiC,CAC1CC,OAAO,CAAE,qCAAqC,CAC9CC,OAAO,CAAE,oCAAoC,CAC7CC,QAAQ,CAAE,kCAAkC,CAC5CC,KA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okens.js","sources":["../../../../../../src/components/Input/BaseInput/baseInputTokens.ts"],"sourcesContent":["import type { BaseInputProps } from './BaseInput';\nimport { size, spacing } from '~tokens/global';\n\nexport const BASEINPUT_MAX_ROWS = 4;\n\nexport const TAG_HEIGHT = size['20'];\nexport const TAG_GAP = spacing['3'];\n\n/**\n * 36px\n */\nexport const baseInputHeight: Record<\n NonNullable<BaseInputProps['size']>,\n typeof size[keyof typeof size]\n> = {\n medium: size['36'],\n large: size['48'],\n};\n\n/**\n * medium - 144px (36px height * 4 rows)\n * large - 192px (48px height * 4 rows)\n */\n// we don't want exact number but rough number to be able to animate correctly in height.\nexport const baseInputWrapperMaxHeight = {\n medium: baseInputHeight.medium * BASEINPUT_MAX_ROWS,\n large: baseInputHeight.large * BASEINPUT_MAX_ROWS,\n} as const;\n\nexport const baseInputBorderColor = {\n default: 'interactive.border.gray.default',\n hovered: 'interactive.border.gray.highlighted',\n focused: 'interactive.border.primary.default',\n disabled: 'interactive.border.gray.disabled',\n error: 'interactive.border.negative.default',\n success: 'interactive.border.positive.default',\n} as const;\n\nexport const baseInputBackgroundColor = {\n default: 'surface.background.gray.intense',\n hovered: 'surface.background.gray.moderate',\n focused: 'surface.background.gray.moderate',\n disabled: 'surface.background.gray.intense',\n error: 'surface.background.gray.intense',\n success: 'surface.background.gray.intense',\n} as const;\n\nexport const baseInputBorderlessBackgroundColor = {\n default: 'transparent',\n hovered: 'surface.background.gray.moderate',\n focused: 'surface.background.gray.moderate',\n disabled: 'surface.background.gray.intense',\n error: 'feedback.background.negative.subtle',\n success: 'feedback.background.positive.subtle',\n} as const;\n\nexport const baseInputBorderWidth = {\n default: 'thin',\n hovered: 'thin',\n disabled: 'thin',\n focused: 'thick',\n error: 'thick',\n success: 'thick',\n} as const;\n\nexport const baseInputBorderBackgroundMotion = {\n enter: { duration: 'xgentle', easing: 'emphasized' },\n exit: { duration: 'gentle', easing: 'standard' },\n} as const;\n\nexport const baseInputPaddingTokens = {\n top: {\n medium: 3,\n large: 4,\n },\n bottom: {\n medium: 3,\n large: 4,\n },\n left: {\n medium: 4,\n large: 4,\n },\n right: {\n medium: 4,\n large: 4,\n },\n} as const;\n\n/* the magic number 192 is basically max-width of label \ni.e 176 and then right margin \ni.e 16 which is the spacing between label and input field */\nexport const formHintLeftLabelMarginLeft = {\n medium: 136,\n large: 192,\n} as const;\n"],"names":["BASEINPUT_MAX_ROWS","baseInputHeight","medium","size","large","baseInputWrapperMaxHeight","baseInputBorderColor","default","hovered","focused","disabled","error","success","baseInputBackgroundColor","baseInputBorderlessBackgroundColor","baseInputBorderWidth","baseInputBorderBackgroundMotion","enter","duration","easing","exit","baseInputPaddingTokens","top","bottom","left","right","formHintLeftLabelMarginLeft"],"mappings":";;;;AAGa,IAAAA,kBAAkB,CAAG,EAQrB,IAAAC,eAGZ,CAAG,CACFC,MAAM,CAAEC,IAAI,CAAC,IAAI,CAAC,CAClBC,KAAK,CAAED,IAAI,CAAC,IAAI,CAClB,EAOa,IAAAE,yBAAyB,CAAG,CACvCH,MAAM,CAAED,eAAe,CAACC,MAAM,CAAGF,kBAAkB,CACnDI,KAAK,CAAEH,eAAe,CAACG,KAAK,CAAGJ,kBACjC,EAEa,IAAAM,oBAAoB,CAAG,CAClCC,OAAO,CAAE,iCAAiC,CAC1CC,OAAO,CAAE,qCAAqC,CAC9CC,OAAO,CAAE,oCAAoC,CAC7CC,QAAQ,CAAE,kCAAkC,CAC5CC,KAAK,CAAE,qCAAqC,CAC5CC,OAAO,CAAE,qCACX,EAEa,IAAAC,wBAAwB,CAAG,CACtCN,OAAO,CAAE,iCAAiC,CAC1CC,OAAO,CAAE,kCAAkC,CAC3CC,OAAO,CAAE,kCAAkC,CAC3CC,QAAQ,CAAE,iCAAiC,CAC3CC,KAAK,CAAE,iCAAiC,CACxCC,OAAO,CAAE,iCACX,EAEa,IAAAE,kCAAkC,CAAG,CAChDP,OAAO,CAAE,aAAa,CACtBC,OAAO,CAAE,kCAAkC,CAC3CC,OAAO,CAAE,kCAAkC,CAC3CC,QAAQ,CAAE,iCAAiC,CAC3CC,KAAK,CAAE,qCAAqC,CAC5CC,OAAO,CAAE,qCACX,EAEa,IAAAG,oBAAoB,CAAG,CAClCR,OAAO,CAAE,MAAM,CACfC,OAAO,CAAE,MAAM,CACfE,QAAQ,CAAE,MAAM,CAChBD,OAAO,CAAE,OAAO,CAChBE,KAAK,CAAE,OAAO,CACdC,OAAO,CAAE,OACX,EAEa,IAAAI,+BAA+B,CAAG,CAC7CC,KAAK,CAAE,CAAEC,QAAQ,CAAE,SAAS,CAAEC,MAAM,CAAE,YAAa,CAAC,CACpDC,IAAI,CAAE,CAAEF,QAAQ,CAAE,QAAQ,CAAEC,MAAM,CAAE,UAAW,CACjD,EAEa,IAAAE,sBAAsB,CAAG,CACpCC,GAAG,CAAE,CACHpB,MAAM,CAAE,CAAC,CACTE,KAAK,CAAE,CACT,CAAC,CACDmB,MAAM,CAAE,CACNrB,MAAM,CAAE,CAAC,CACTE,KAAK,CAAE,CACT,CAAC,CACDoB,IAAI,CAAE,CACJtB,MAAM,CAAE,CAAC,CACTE,KAAK,CAAE,CACT,CAAC,CACDqB,KAAK,CAAE,CACLvB,MAAM,CAAE,CAAC,CACTE,KAAK,CAAE,CACT,CACF,EAKa,IAAAsB,2BAA2B,CAAG,CACzCxB,MAAM,CAAE,GAAG,CACXE,KAAK,CAAE,GACT;;;;"}
@@ -25,7 +25,7 @@ import { makeAccessible } from '../../../utils/makeAccessible/makeAccessible.nat
25
25
  import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
26
26
  import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
27
27
 
28
- var _excluded=["children","icon","iconPosition","isDisabled","onClick","onKeyDown","variant","href","target","rel","color","opacity","accessibilityProps","className","style","size","testID","hitSlop","htmlTitle","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd","onMouseDown","onMouseUp"],_excluded2=["currentInteraction","setCurrentInteraction"];var getColorToken=function getColorToken(_ref){var variant=_ref.variant,color=_ref.color,currentInteraction=_ref.currentInteraction,isDisabled=_ref.isDisabled,element=_ref.element;var state=currentInteraction;var map={default:'normal',hover:'subtle',focus:'normal',disabled:'disabled'};if(isDisabled&&variant=='button'){state='disabled';}if(color&&color!=='primary'){if(color!=='white'){return `interactive.${element}.${color}.${map[state]}`;}return `interactive.${element}.staticWhite.${map[state]}`;}return `interactive.${element}.primary.${map[state]}`;};var getProps=function getProps(_ref2){var theme=_ref2.theme,variant=_ref2.variant,currentInteraction=_ref2.currentInteraction,children=_ref2.children,isDisabled=_ref2.isDisabled,color=_ref2.color,target=_ref2.target,size=_ref2.size;var isButton=variant==='button';var textSizes={fontSize:{xsmall:25,small:75,medium:100,large:200},lineHeight:{xsmall:25,small:75,medium:100,large:200}};var props={as:isButton?'button':'a',textDecorationLine:!isButton&&currentInteraction!=='default'?'underline':'none',iconColor:getColorToken({variant:variant,color:color,element:'icon',currentInteraction:currentInteraction,isDisabled:isDisabled}),fontSize:textSizes.fontSize[size],lineHeight:textSizes.lineHeight[size],iconSize:size,iconPadding:children!=null&&children.trim()?'spacing.2':'spacing.0',textColor:getColorToken({variant:variant,color:color,element:'text',currentInteraction:currentInteraction,isDisabled:isDisabled}),focusRingColor:getIn(theme.colors,'interactive.background.primary.faded'),motionDuration:'duration.2xquick',motionEasing:'easing.standard.effective',cursor:isButton&&isDisabled?'not-allowed':'pointer',disabled:isButton&&isDisabled,role:isButton?'button':'link',defaultRel:target&&target==='_blank'?'noreferrer noopener':undefined,type:isButton?'button':undefined};return props;};var _BaseLink=function _BaseLink(_ref3,ref){var children=_ref3.children,Icon=_ref3.icon,_ref3$iconPosition=_ref3.iconPosition,iconPosition=_ref3$iconPosition===void 0?'left':_ref3$iconPosition,_ref3$isDisabled=_ref3.isDisabled,isDisabled=_ref3$isDisabled===void 0?false:_ref3$isDisabled,onClick=_ref3.onClick,onKeyDown=_ref3.onKeyDown,_ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'anchor':_ref3$variant,href=_ref3.href,target=_ref3.target,rel=_ref3.rel,_ref3$color=_ref3.color,color=_ref3$color===void 0?'primary':_ref3$color,opacity=_ref3.opacity,accessibilityProps=_ref3.accessibilityProps,className=_ref3.className,style=_ref3.style,_ref3$size=_ref3.size,size=_ref3$size===void 0?'medium':_ref3$size,testID=_ref3.testID,hitSlop=_ref3.hitSlop,htmlTitle=_ref3.htmlTitle,_onBlur=_ref3.onBlur,_onFocus=_ref3.onFocus,_onMouseLeave=_ref3.onMouseLeave,onMouseMove=_ref3.onMouseMove,onPointerDown=_ref3.onPointerDown,onPointerEnter=_ref3.onPointerEnter,onTouchStart=_ref3.onTouchStart,onTouchEnd=_ref3.onTouchEnd,onMouseDown=_ref3.onMouseDown,onMouseUp=_ref3.onMouseUp,rest=_objectWithoutProperties(_ref3,_excluded);var childrenString=getStringFromReactText(children);var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction,syntheticEvents=_objectWithoutProperties(_useInteraction,_excluded2);var _useTheme=useTheme(),theme=_useTheme.theme;if(__DEV__){if(!Icon&&!(childrenString!=null&&childrenString.trim())){throwBladeError({message:`At least one of icon or text is required to render a link.`,moduleName:'BaseLink'});}}var _getProps=getProps({theme:theme,variant:variant,currentInteraction:currentInteraction,children:childrenString,isDisabled:isDisabled,color:color,target:target,size:size}),as=_getProps.as,textDecorationLine=_getProps.textDecorationLine,iconColor=_getProps.iconColor,iconPadding=_getProps.iconPadding,iconSize=_getProps.iconSize,fontSize=_getProps.fontSize,textColor=_getProps.textColor,focusRingColor=_getProps.focusRingColor,motionDuration=_getProps.motionDuration,motionEasing=_getProps.motionEasing,cursor=_getProps.cursor,disabled=_getProps.disabled,role=_getProps.role,defaultRel=_getProps.defaultRel,type=_getProps.type,lineHeight=_getProps.lineHeight;var handleOnClick=function handleOnClick(event){if(onClick){onClick(event);}};var asProp=isReactNative()?undefined:'span';return jsx(StyledLink,Object.assign({ref:ref},metaAttribute({name:MetaConstants.Link,testID:testID}),{accessibilityProps:Object.assign({},makeAccessible(Object.assign({role:role,disabled:disabled},accessibilityProps))),variant:variant,as:as,href:href,target:target,rel:rel!=null?rel:defaultRel,onClick:handleOnClick},syntheticEvents,{onBlur:function onBlur(event){_onBlur==null?void 0:_onBlur(event);syntheticEvents.onBlur();},onFocus:function onFocus(event){_onFocus==null?void 0:_onFocus(event);syntheticEvents.onFocus();},onMouseLeave:function onMouseLeave(event){if(_onMouseLeave){_onMouseLeave(event);}syntheticEvents.onMouseLeave();},onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onTouchStart:onTouchStart,onTouchEnd:onTouchEnd,onKeyDown:onKeyDown,onMouseDown:onMouseDown,onMouseUp:onMouseUp,disabled:disabled,type:type,cursor:cursor,focusRingColor:focusRingColor,motionDuration:motionDuration,motionEasing:motionEasing,setCurrentInteraction:setCurrentInteraction},getStyledProps(rest),makeAnalyticsAttribute(rest),{className:className,style:style,hitSlop:hitSlop,title:htmlTitle,children:jsxs(BaseBox,{as:asProp,display:"flex",flexDirection:"row",className:"content-container",alignItems:"center",opacity:opacity,children:[Icon&&iconPosition=='left'?jsx(BaseBox,{as:asProp,paddingRight:iconPadding,display:"flex",alignItems:"center",children:jsx(Icon,{color:iconColor,size:iconSize})}):null,jsx(BaseText,{as:asProp,textDecorationLine:textDecorationLine,color:textColor,fontSize:fontSize,lineHeight:lineHeight,textAlign:"center",fontWeight:"medium",children:children}),Icon&&iconPosition=='right'?jsx(BaseBox,{as:asProp,paddingLeft:iconPadding,display:"flex",alignItems:"center",children:jsx(Icon,{color:iconColor,size:iconSize})}):null]})}));};var BaseLink=assignWithoutSideEffects(React__default.forwardRef(_BaseLink),{displayName:'BaseLink',componentId:'BaseLink'});
28
+ var _excluded=["children","icon","iconPosition","isDisabled","onClick","onKeyDown","variant","href","target","rel","color","opacity","accessibilityProps","className","style","size","testID","hitSlop","htmlTitle","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd","onMouseDown","onMouseUp"],_excluded2=["currentInteraction","setCurrentInteraction"];var getColorToken=function getColorToken(_ref){var variant=_ref.variant,color=_ref.color,currentInteraction=_ref.currentInteraction,isDisabled=_ref.isDisabled,element=_ref.element;var state=currentInteraction;var map={default:'normal',hover:'subtle',focus:'normal',disabled:'disabled'};if(isDisabled&&variant=='button'){state='disabled';}if(color&&color!=='primary'){if(color!=='white'){return `interactive.${element}.${color}.${map[state]}`;}return `interactive.${element}.staticWhite.${map[state]}`;}return `interactive.${element}.primary.${map[state]}`;};var getProps=function getProps(_ref2){var theme=_ref2.theme,variant=_ref2.variant,currentInteraction=_ref2.currentInteraction,children=_ref2.children,isDisabled=_ref2.isDisabled,color=_ref2.color,target=_ref2.target,size=_ref2.size;var isButton=variant==='button';var textSizes={fontSize:{xsmall:25,small:75,medium:100,large:200},lineHeight:{xsmall:25,small:75,medium:100,large:200}};var props={as:isButton?'button':'a',textDecorationLine:!isButton&&currentInteraction!=='default'?'underline':'none',iconColor:getColorToken({variant:variant,color:color,element:'icon',currentInteraction:currentInteraction,isDisabled:isDisabled}),fontSize:textSizes.fontSize[size],lineHeight:textSizes.lineHeight[size],iconSize:size,iconPadding:children!=null&&children.trim()?'spacing.2':'spacing.0',textColor:getColorToken({variant:variant,color:color,element:'text',currentInteraction:currentInteraction,isDisabled:isDisabled}),focusRingColor:getIn(theme.colors,'interactive.background.primary.faded'),motionDuration:'duration.2xquick',motionEasing:'easing.standard',cursor:isButton&&isDisabled?'not-allowed':'pointer',disabled:isButton&&isDisabled,role:isButton?'button':'link',defaultRel:target&&target==='_blank'?'noreferrer noopener':undefined,type:isButton?'button':undefined};return props;};var _BaseLink=function _BaseLink(_ref3,ref){var children=_ref3.children,Icon=_ref3.icon,_ref3$iconPosition=_ref3.iconPosition,iconPosition=_ref3$iconPosition===void 0?'left':_ref3$iconPosition,_ref3$isDisabled=_ref3.isDisabled,isDisabled=_ref3$isDisabled===void 0?false:_ref3$isDisabled,onClick=_ref3.onClick,onKeyDown=_ref3.onKeyDown,_ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'anchor':_ref3$variant,href=_ref3.href,target=_ref3.target,rel=_ref3.rel,_ref3$color=_ref3.color,color=_ref3$color===void 0?'primary':_ref3$color,opacity=_ref3.opacity,accessibilityProps=_ref3.accessibilityProps,className=_ref3.className,style=_ref3.style,_ref3$size=_ref3.size,size=_ref3$size===void 0?'medium':_ref3$size,testID=_ref3.testID,hitSlop=_ref3.hitSlop,htmlTitle=_ref3.htmlTitle,_onBlur=_ref3.onBlur,_onFocus=_ref3.onFocus,_onMouseLeave=_ref3.onMouseLeave,onMouseMove=_ref3.onMouseMove,onPointerDown=_ref3.onPointerDown,onPointerEnter=_ref3.onPointerEnter,onTouchStart=_ref3.onTouchStart,onTouchEnd=_ref3.onTouchEnd,onMouseDown=_ref3.onMouseDown,onMouseUp=_ref3.onMouseUp,rest=_objectWithoutProperties(_ref3,_excluded);var childrenString=getStringFromReactText(children);var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction,syntheticEvents=_objectWithoutProperties(_useInteraction,_excluded2);var _useTheme=useTheme(),theme=_useTheme.theme;if(__DEV__){if(!Icon&&!(childrenString!=null&&childrenString.trim())){throwBladeError({message:`At least one of icon or text is required to render a link.`,moduleName:'BaseLink'});}}var _getProps=getProps({theme:theme,variant:variant,currentInteraction:currentInteraction,children:childrenString,isDisabled:isDisabled,color:color,target:target,size:size}),as=_getProps.as,textDecorationLine=_getProps.textDecorationLine,iconColor=_getProps.iconColor,iconPadding=_getProps.iconPadding,iconSize=_getProps.iconSize,fontSize=_getProps.fontSize,textColor=_getProps.textColor,focusRingColor=_getProps.focusRingColor,motionDuration=_getProps.motionDuration,motionEasing=_getProps.motionEasing,cursor=_getProps.cursor,disabled=_getProps.disabled,role=_getProps.role,defaultRel=_getProps.defaultRel,type=_getProps.type,lineHeight=_getProps.lineHeight;var handleOnClick=function handleOnClick(event){if(onClick){onClick(event);}};var asProp=isReactNative()?undefined:'span';return jsx(StyledLink,Object.assign({ref:ref},metaAttribute({name:MetaConstants.Link,testID:testID}),{accessibilityProps:Object.assign({},makeAccessible(Object.assign({role:role,disabled:disabled},accessibilityProps))),variant:variant,as:as,href:href,target:target,rel:rel!=null?rel:defaultRel,onClick:handleOnClick},syntheticEvents,{onBlur:function onBlur(event){_onBlur==null?void 0:_onBlur(event);syntheticEvents.onBlur();},onFocus:function onFocus(event){_onFocus==null?void 0:_onFocus(event);syntheticEvents.onFocus();},onMouseLeave:function onMouseLeave(event){if(_onMouseLeave){_onMouseLeave(event);}syntheticEvents.onMouseLeave();},onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onTouchStart:onTouchStart,onTouchEnd:onTouchEnd,onKeyDown:onKeyDown,onMouseDown:onMouseDown,onMouseUp:onMouseUp,disabled:disabled,type:type,cursor:cursor,focusRingColor:focusRingColor,motionDuration:motionDuration,motionEasing:motionEasing,setCurrentInteraction:setCurrentInteraction},getStyledProps(rest),makeAnalyticsAttribute(rest),{className:className,style:style,hitSlop:hitSlop,title:htmlTitle,children:jsxs(BaseBox,{as:asProp,display:"flex",flexDirection:"row",className:"content-container",alignItems:"center",opacity:opacity,children:[Icon&&iconPosition=='left'?jsx(BaseBox,{as:asProp,paddingRight:iconPadding,display:"flex",alignItems:"center",children:jsx(Icon,{color:iconColor,size:iconSize})}):null,jsx(BaseText,{as:asProp,textDecorationLine:textDecorationLine,color:textColor,fontSize:fontSize,lineHeight:lineHeight,textAlign:"center",fontWeight:"medium",children:children}),Icon&&iconPosition=='right'?jsx(BaseBox,{as:asProp,paddingLeft:iconPadding,display:"flex",alignItems:"center",children:jsx(Icon,{color:iconColor,size:iconSize})}):null]})}));};var BaseLink=assignWithoutSideEffects(React__default.forwardRef(_BaseLink),{displayName:'BaseLink',componentId:'BaseLink'});
29
29
 
30
30
  export { BaseLink as default };
31
31
  //# sourceMappingURL=BaseLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseLink.js","sources":["../../../../../../src/components/Link/BaseLink/BaseLink.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/prefer-ts-expect-error */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport type { SyntheticEvent } from 'react';\nimport React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport type { GestureResponderEvent } from 'react-native';\nimport StyledBaseLink from './StyledBaseLink';\nimport getIn from '~utils/lodashButBetter/get';\nimport useInteraction from '~utils/useInteraction';\nimport type { IconColors, IconComponent, IconProps } from '~components/Icons';\nimport type { Theme } from '~components/BladeProvider';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { BaseText } from '~components/Typography/BaseText';\nimport type {\n DotNotationSpacingStringToken,\n StringChildrenType,\n TestID,\n BladeElementRef,\n} from '~utils/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { Platform } from '~utils';\nimport { isReactNative } from '~utils';\nimport type { DurationString, EasingString, FontSize, Typography } from '~tokens/global';\nimport type {\n BaseTextProps,\n BaseTextSizes,\n TextColors,\n} from '~components/Typography/BaseText/types';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { BladeCommonEvents } from '~components/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport type { ActionStates } from '~utils/useInteraction';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype BaseLinkCommonProps = {\n color?: 'primary' | 'white' | 'positive' | 'negative' | 'notice' | 'information' | 'neutral';\n icon?: IconComponent;\n iconPosition?: 'left' | 'right';\n onClick?: (event: SyntheticEvent) => void;\n onBlur?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.FocusEvent<HTMLButtonElement>) => void;\n }>;\n onMouseLeave?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.MouseEvent<HTMLButtonElement>) => void;\n }>;\n onKeyDown?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.KeyboardEvent<HTMLButtonElement>) => void;\n }>;\n accessibilityProps?: Partial<AccessibilityProps>;\n\n /**\n * Sets the size of the link\n *\n * @default medium\n */\n size?: Extract<BaseTextSizes, 'xsmall' | 'small' | 'medium' | 'large'>;\n /**\n * Defines how far your touch can start away from the link. This is a react-native only prop and has no effect on web.\n */\n hitSlop?:\n | {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n }\n | number;\n /**\n * The title of the link which is displayed as a tooltip. This is a web only prop and has no effect on react-native.\n */\n htmlTitle?: string;\n opacity?: number;\n} & TestID &\n StyledPropsBlade &\n Omit<BladeCommonEvents, 'onBlur' | 'onMouseLeave'>;\n\n/*\n Mandatory children prop when icon is not provided\n*/\ntype BaseLinkWithoutIconProps = BaseLinkCommonProps & {\n icon?: undefined;\n children: StringChildrenType;\n};\n\n/*\n Optional children prop when icon is provided\n*/\ntype BaseLinkWithIconProps = BaseLinkCommonProps & {\n icon: IconComponent;\n children?: StringChildrenType;\n};\n\n/*\n BaseLink Props with or without an icon\n*/\ntype BaseLinkPropsWithOrWithoutIcon = BaseLinkWithIconProps | BaseLinkWithoutIconProps;\n\n/*\n BaseLink Props when variant is anchor\n*/\ntype BaseLinkAnchorVariantProps = BaseLinkPropsWithOrWithoutIcon & {\n variant?: 'anchor';\n href?: string;\n target?: string;\n rel?: string;\n isDisabled?: undefined;\n};\n\n/*\n BaseLink Props when variant is button\n*/\ntype BaseLinkButtonVariantProps = BaseLinkPropsWithOrWithoutIcon & {\n variant?: 'button';\n isDisabled?: boolean;\n href?: undefined;\n target?: undefined;\n rel?: undefined;\n};\n\n/*\n BaseLink Props when variant is anchor or button\n*/\nexport type BaseLinkProps = BaseLinkAnchorVariantProps | BaseLinkButtonVariantProps;\n\ntype BaseLinkStyleProps = {\n as: 'a' | 'button';\n textDecorationLine: 'underline' | 'none';\n iconColor: IconProps['color'];\n iconSize: IconProps['size'];\n iconPadding: DotNotationSpacingStringToken;\n textColor: BaseTextProps['color'];\n focusRingColor: string;\n motionDuration: DurationString;\n motionEasing: EasingString;\n cursor: CSSObject['cursor'];\n disabled: boolean;\n role: 'button' | 'link';\n defaultRel: BaseLinkProps['rel'];\n type?: 'button';\n fontSize: BaseTextProps['fontSize'];\n lineHeight: BaseTextProps['lineHeight'];\n};\n\ntype LinkActionStates = ActionStates;\nconst getColorToken = ({\n variant,\n color,\n currentInteraction,\n isDisabled,\n element,\n}: {\n variant: BaseLinkProps['variant'];\n color: BaseLinkProps['color'];\n element: 'icon' | 'text';\n currentInteraction: LinkActionStates;\n isDisabled: boolean;\n}): IconColors | TextColors => {\n let state = currentInteraction;\n const map = {\n default: 'normal',\n hover: 'subtle',\n focus: 'normal',\n disabled: 'disabled',\n } as const;\n\n if (isDisabled && variant == 'button') {\n state = 'disabled';\n }\n\n if (color && color !== 'primary') {\n if (color !== 'white') {\n return `interactive.${element}.${color}.${map[state]}`;\n }\n return `interactive.${element}.staticWhite.${map[state]}`;\n }\n return `interactive.${element}.primary.${map[state]}`;\n};\n\nconst getProps = ({\n theme,\n variant,\n currentInteraction,\n children,\n isDisabled,\n color,\n target,\n size,\n}: {\n theme: Theme;\n variant: NonNullable<BaseLinkProps['variant']>;\n currentInteraction: LinkActionStates;\n children?: string;\n isDisabled: boolean;\n color: BaseLinkProps['color'];\n target: BaseLinkProps['target'];\n size: NonNullable<BaseLinkProps['size']>;\n}): BaseLinkStyleProps => {\n const isButton = variant === 'button';\n const textSizes: {\n fontSize: Record<NonNullable<BaseLinkProps['size']>, keyof FontSize>;\n lineHeight: Record<NonNullable<BaseLinkProps['size']>, keyof Typography['lineHeights']>;\n } = {\n fontSize: {\n xsmall: 25,\n small: 75,\n medium: 100,\n large: 200,\n },\n lineHeight: {\n xsmall: 25,\n small: 75,\n medium: 100,\n large: 200,\n },\n };\n\n const props: BaseLinkStyleProps = {\n as: isButton ? 'button' : 'a',\n textDecorationLine: !isButton && currentInteraction !== 'default' ? 'underline' : 'none',\n iconColor: getColorToken({\n variant,\n color,\n element: 'icon',\n currentInteraction,\n isDisabled,\n }) as IconProps['color'],\n fontSize: textSizes.fontSize[size],\n lineHeight: textSizes.lineHeight[size],\n iconSize: size,\n iconPadding: children?.trim() ? 'spacing.2' : 'spacing.0',\n textColor: getColorToken({\n variant,\n color,\n element: 'text',\n currentInteraction,\n isDisabled,\n }) as BaseTextProps['color'],\n focusRingColor: getIn(theme.colors, 'interactive.background.primary.faded'),\n motionDuration: 'duration.2xquick',\n motionEasing: 'easing.standard.effective',\n cursor: isButton && isDisabled ? 'not-allowed' : 'pointer',\n disabled: isButton && isDisabled,\n role: isButton ? 'button' : 'link',\n defaultRel: target && target === '_blank' ? 'noreferrer noopener' : undefined,\n type: isButton ? 'button' : undefined,\n };\n\n return props;\n};\n\nconst _BaseLink: React.ForwardRefRenderFunction<BladeElementRef, BaseLinkProps> = (\n {\n children,\n icon: Icon,\n iconPosition = 'left',\n isDisabled = false,\n onClick,\n onKeyDown,\n variant = 'anchor',\n href,\n target,\n rel,\n color = 'primary',\n opacity,\n accessibilityProps,\n // @ts-expect-error avoiding exposing to public\n className,\n // @ts-expect-error avoiding exposing to public\n style,\n size = 'medium',\n testID,\n hitSlop,\n htmlTitle,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n onTouchStart,\n onTouchEnd,\n onMouseDown,\n onMouseUp,\n ...rest\n },\n ref,\n) => {\n const childrenString = getStringFromReactText(children);\n const { currentInteraction, setCurrentInteraction, ...syntheticEvents } = useInteraction();\n const { theme } = useTheme();\n if (__DEV__) {\n if (!Icon && !childrenString?.trim()) {\n throwBladeError({\n message: `At least one of icon or text is required to render a link.`,\n moduleName: 'BaseLink',\n });\n }\n }\n const {\n as,\n textDecorationLine,\n iconColor,\n iconPadding,\n iconSize,\n fontSize,\n textColor,\n focusRingColor,\n motionDuration,\n motionEasing,\n cursor,\n disabled,\n role,\n defaultRel,\n type,\n lineHeight,\n } = getProps({\n theme,\n variant,\n currentInteraction,\n children: childrenString,\n isDisabled,\n color,\n target,\n size,\n });\n\n const handleOnClick = (event: SyntheticEvent): void => {\n if (onClick) {\n onClick(event);\n }\n };\n\n const asProp = isReactNative() ? undefined : 'span';\n return (\n <StyledBaseLink\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Link, testID })}\n accessibilityProps={{\n ...makeAccessible({\n role,\n disabled,\n ...accessibilityProps,\n }),\n }}\n variant={variant}\n as={as}\n href={href}\n target={target}\n rel={rel ?? defaultRel}\n onClick={handleOnClick}\n {...syntheticEvents}\n onBlur={(event: any) => {\n onBlur?.(event);\n syntheticEvents.onBlur();\n }}\n onFocus={(event: any) => {\n onFocus?.(event);\n syntheticEvents.onFocus();\n }}\n onMouseLeave={(event: any) => {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n syntheticEvents.onMouseLeave();\n }}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd}\n onKeyDown={onKeyDown}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n disabled={disabled}\n type={type}\n cursor={cursor}\n focusRingColor={focusRingColor}\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n setCurrentInteraction={setCurrentInteraction}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n // @ts-ignore Because we avoided exposing className to public\n className={className}\n style={style}\n hitSlop={hitSlop}\n title={htmlTitle}\n >\n <BaseBox\n as={asProp}\n display=\"flex\"\n flexDirection=\"row\"\n className=\"content-container\"\n alignItems=\"center\"\n opacity={opacity}\n >\n {Icon && iconPosition == 'left' ? (\n <BaseBox as={asProp} paddingRight={iconPadding} display=\"flex\" alignItems=\"center\">\n <Icon color={iconColor} size={iconSize} />\n </BaseBox>\n ) : null}\n <BaseText\n as={asProp}\n textDecorationLine={textDecorationLine}\n color={textColor}\n fontSize={fontSize}\n lineHeight={lineHeight}\n textAlign=\"center\"\n fontWeight=\"medium\"\n >\n {children}\n </BaseText>\n {Icon && iconPosition == 'right' ? (\n <BaseBox as={asProp} paddingLeft={iconPadding} display=\"flex\" alignItems=\"center\">\n <Icon color={iconColor} size={iconSize} />\n </BaseBox>\n ) : null}\n </BaseBox>\n </StyledBaseLink>\n );\n};\n\nconst BaseLink = assignWithoutSideEffects(React.forwardRef(_BaseLink), {\n displayName: 'BaseLink',\n componentId: 'BaseLink',\n});\n\nexport default BaseLink;\n"],"names":["getColorToken","_ref","variant","color","currentInteraction","isDisabled","element","state","map","default","hover","focus","disabled","getProps","_ref2","theme","children","target","size","isButton","textSizes","fontSize","xsmall","small","medium","large","lineHeight","props","as","textDecorationLine","iconColor","iconSize","iconPadding","trim","textColor","focusRingColor","getIn","colors","motionDuration","motionEasing","cursor","role","defaultRel","undefined","type","_BaseLink","_ref3","ref","Icon","icon","_ref3$iconPosition","iconPosition","_ref3$isDisabled","onClick","onKeyDown","_ref3$variant","href","rel","_ref3$color","opacity","accessibilityProps","className","style","_ref3$size","testID","hitSlop","htmlTitle","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","rest","_objectWithoutProperties","_excluded","childrenString","getStringFromReactText","_useInteraction","useInteraction","setCurrentInteraction","syntheticEvents","_excluded2","_useTheme","useTheme","__DEV__","throwBladeError","message","moduleName","_getProps","handleOnClick","event","asProp","isReactNative","_jsx","StyledBaseLink","Object","assign","metaAttribute","name","MetaConstants","Link","makeAccessible","getStyledProps","makeAnalyticsAttribute","title","_jsxs","BaseBox","display","flexDirection","alignItems","paddingRight","BaseText","textAlign","fontWeight","paddingLeft","BaseLink","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAA,SAAA,CAAA,CAAA,UAAA,CAAA,MAAA,CAAA,cAAA,CAAA,YAAA,CAAA,SAAA,CAAA,WAAA,CAAA,SAAA,CAAA,MAAA,CAAA,QAAA,CAAA,KAAA,CAAA,OAAA,CAAA,SAAA,CAAA,oBAAA,CAAA,WAAA,CAAA,OAAA,CAAA,MAAA,CAAA,QAAA,CAAA,SAAA,CAAA,WAAA,CAAA,QAAA,CAAA,SAAA,CAAA,cAAA,CAAA,aAAA,CAAA,eAAA,CAAA,gBAAA,CAAA,cAAA,CAAA,YAAA,CAAA,aAAA,CAAA,WAAA,CAAA,CAAA,UAAA,CAAA,CAAA,oBAAA,CAAA,uBAAA,CAAA,CAsJA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAYY,KAX7BC,OAAO,CAAAD,IAAA,CAAPC,OAAO,CACPC,KAAK,CAAAF,IAAA,CAALE,KAAK,CACLC,kBAAkB,CAAAH,IAAA,CAAlBG,kBAAkB,CAClBC,UAAU,CAAAJ,IAAA,CAAVI,UAAU,CACVC,OAAO,CAAAL,IAAA,CAAPK,OAAO,CAQP,IAAIC,KAAK,CAAGH,kBAAkB,CAC9B,IAAMI,GAAG,CAAG,CACVC,OAAO,CAAE,QAAQ,CACjBC,KAAK,CAAE,QAAQ,CACfC,KAAK,CAAE,QAAQ,CACfC,QAAQ,CAAE,UACZ,CAAU,CAEV,GAAIP,UAAU,EAAIH,OAAO,EAAI,QAAQ,CAAE,CACrCK,KAAK,CAAG,UAAU,CACpB,CAEA,GAAIJ,KAAK,EAAIA,KAAK,GAAK,SAAS,CAAE,CAChC,GAAIA,KAAK,GAAK,OAAO,CAAE,CACrB,OAAQ,eAAcG,O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Link.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/prefer-ts-expect-error */\n/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport type { SyntheticEvent } from 'react';\nimport React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport type { GestureResponderEvent } from 'react-native';\nimport StyledBaseLink from './StyledBaseLink';\nimport getIn from '~utils/lodashButBetter/get';\nimport useInteraction from '~utils/useInteraction';\nimport type { IconColors, IconComponent, IconProps } from '~components/Icons';\nimport type { Theme } from '~components/BladeProvider';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { BaseText } from '~components/Typography/BaseText';\nimport type {\n DotNotationSpacingStringToken,\n StringChildrenType,\n TestID,\n BladeElementRef,\n} from '~utils/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { Platform } from '~utils';\nimport { isReactNative } from '~utils';\nimport type { DurationString, EasingString, FontSize, Typography } from '~tokens/global';\nimport type {\n BaseTextProps,\n BaseTextSizes,\n TextColors,\n} from '~components/Typography/BaseText/types';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport type { BladeCommonEvents } from '~components/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport type { ActionStates } from '~utils/useInteraction';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype BaseLinkCommonProps = {\n color?: 'primary' | 'white' | 'positive' | 'negative' | 'notice' | 'information' | 'neutral';\n icon?: IconComponent;\n iconPosition?: 'left' | 'right';\n onClick?: (event: SyntheticEvent) => void;\n onBlur?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.FocusEvent<HTMLButtonElement>) => void;\n }>;\n onMouseLeave?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.MouseEvent<HTMLButtonElement>) => void;\n }>;\n onKeyDown?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.KeyboardEvent<HTMLButtonElement>) => void;\n }>;\n accessibilityProps?: Partial<AccessibilityProps>;\n\n /**\n * Sets the size of the link\n *\n * @default medium\n */\n size?: Extract<BaseTextSizes, 'xsmall' | 'small' | 'medium' | 'large'>;\n /**\n * Defines how far your touch can start away from the link. This is a react-native only prop and has no effect on web.\n */\n hitSlop?:\n | {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n }\n | number;\n /**\n * The title of the link which is displayed as a tooltip. This is a web only prop and has no effect on react-native.\n */\n htmlTitle?: string;\n opacity?: number;\n} & TestID &\n StyledPropsBlade &\n Omit<BladeCommonEvents, 'onBlur' | 'onMouseLeave'>;\n\n/*\n Mandatory children prop when icon is not provided\n*/\ntype BaseLinkWithoutIconProps = BaseLinkCommonProps & {\n icon?: undefined;\n children: StringChildrenType;\n};\n\n/*\n Optional children prop when icon is provided\n*/\ntype BaseLinkWithIconProps = BaseLinkCommonProps & {\n icon: IconComponent;\n children?: StringChildrenType;\n};\n\n/*\n BaseLink Props with or without an icon\n*/\ntype BaseLinkPropsWithOrWithoutIcon = BaseLinkWithIconProps | BaseLinkWithoutIconProps;\n\n/*\n BaseLink Props when variant is anchor\n*/\ntype BaseLinkAnchorVariantProps = BaseLinkPropsWithOrWithoutIcon & {\n variant?: 'anchor';\n href?: string;\n target?: string;\n rel?: string;\n isDisabled?: undefined;\n};\n\n/*\n BaseLink Props when variant is button\n*/\ntype BaseLinkButtonVariantProps = BaseLinkPropsWithOrWithoutIcon & {\n variant?: 'button';\n isDisabled?: boolean;\n href?: undefined;\n target?: undefined;\n rel?: undefined;\n};\n\n/*\n BaseLink Props when variant is anchor or button\n*/\nexport type BaseLinkProps = BaseLinkAnchorVariantProps | BaseLinkButtonVariantProps;\n\ntype BaseLinkStyleProps = {\n as: 'a' | 'button';\n textDecorationLine: 'underline' | 'none';\n iconColor: IconProps['color'];\n iconSize: IconProps['size'];\n iconPadding: DotNotationSpacingStringToken;\n textColor: BaseTextProps['color'];\n focusRingColor: string;\n motionDuration: DurationString;\n motionEasing: EasingString;\n cursor: CSSObject['cursor'];\n disabled: boolean;\n role: 'button' | 'link';\n defaultRel: BaseLinkProps['rel'];\n type?: 'button';\n fontSize: BaseTextProps['fontSize'];\n lineHeight: BaseTextProps['lineHeight'];\n};\n\ntype LinkActionStates = ActionStates;\nconst getColorToken = ({\n variant,\n color,\n currentInteraction,\n isDisabled,\n element,\n}: {\n variant: BaseLinkProps['variant'];\n color: BaseLinkProps['color'];\n element: 'icon' | 'text';\n currentInteraction: LinkActionStates;\n isDisabled: boolean;\n}): IconColors | TextColors => {\n let state = currentInteraction;\n const map = {\n default: 'normal',\n hover: 'subtle',\n focus: 'normal',\n disabled: 'disabled',\n } as const;\n\n if (isDisabled && variant == 'button') {\n state = 'disabled';\n }\n\n if (color && color !== 'primary') {\n if (color !== 'white') {\n return `interactive.${element}.${color}.${map[state]}`;\n }\n return `interactive.${element}.staticWhite.${map[state]}`;\n }\n return `interactive.${element}.primary.${map[state]}`;\n};\n\nconst getProps = ({\n theme,\n variant,\n currentInteraction,\n children,\n isDisabled,\n color,\n target,\n size,\n}: {\n theme: Theme;\n variant: NonNullable<BaseLinkProps['variant']>;\n currentInteraction: LinkActionStates;\n children?: string;\n isDisabled: boolean;\n color: BaseLinkProps['color'];\n target: BaseLinkProps['target'];\n size: NonNullable<BaseLinkProps['size']>;\n}): BaseLinkStyleProps => {\n const isButton = variant === 'button';\n const textSizes: {\n fontSize: Record<NonNullable<BaseLinkProps['size']>, keyof FontSize>;\n lineHeight: Record<NonNullable<BaseLinkProps['size']>, keyof Typography['lineHeights']>;\n } = {\n fontSize: {\n xsmall: 25,\n small: 75,\n medium: 100,\n large: 200,\n },\n lineHeight: {\n xsmall: 25,\n small: 75,\n medium: 100,\n large: 200,\n },\n };\n\n const props: BaseLinkStyleProps = {\n as: isButton ? 'button' : 'a',\n textDecorationLine: !isButton && currentInteraction !== 'default' ? 'underline' : 'none',\n iconColor: getColorToken({\n variant,\n color,\n element: 'icon',\n currentInteraction,\n isDisabled,\n }) as IconProps['color'],\n fontSize: textSizes.fontSize[size],\n lineHeight: textSizes.lineHeight[size],\n iconSize: size,\n iconPadding: children?.trim() ? 'spacing.2' : 'spacing.0',\n textColor: getColorToken({\n variant,\n color,\n element: 'text',\n currentInteraction,\n isDisabled,\n }) as BaseTextProps['color'],\n focusRingColor: getIn(theme.colors, 'interactive.background.primary.faded'),\n motionDuration: 'duration.2xquick',\n motionEasing: 'easing.standard',\n cursor: isButton && isDisabled ? 'not-allowed' : 'pointer',\n disabled: isButton && isDisabled,\n role: isButton ? 'button' : 'link',\n defaultRel: target && target === '_blank' ? 'noreferrer noopener' : undefined,\n type: isButton ? 'button' : undefined,\n };\n\n return props;\n};\n\nconst _BaseLink: React.ForwardRefRenderFunction<BladeElementRef, BaseLinkProps> = (\n {\n children,\n icon: Icon,\n iconPosition = 'left',\n isDisabled = false,\n onClick,\n onKeyDown,\n variant = 'anchor',\n href,\n target,\n rel,\n color = 'primary',\n opacity,\n accessibilityProps,\n // @ts-expect-error avoiding exposing to public\n className,\n // @ts-expect-error avoiding exposing to public\n style,\n size = 'medium',\n testID,\n hitSlop,\n htmlTitle,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n onTouchStart,\n onTouchEnd,\n onMouseDown,\n onMouseUp,\n ...rest\n },\n ref,\n) => {\n const childrenString = getStringFromReactText(children);\n const { currentInteraction, setCurrentInteraction, ...syntheticEvents } = useInteraction();\n const { theme } = useTheme();\n if (__DEV__) {\n if (!Icon && !childrenString?.trim()) {\n throwBladeError({\n message: `At least one of icon or text is required to render a link.`,\n moduleName: 'BaseLink',\n });\n }\n }\n const {\n as,\n textDecorationLine,\n iconColor,\n iconPadding,\n iconSize,\n fontSize,\n textColor,\n focusRingColor,\n motionDuration,\n motionEasing,\n cursor,\n disabled,\n role,\n defaultRel,\n type,\n lineHeight,\n } = getProps({\n theme,\n variant,\n currentInteraction,\n children: childrenString,\n isDisabled,\n color,\n target,\n size,\n });\n\n const handleOnClick = (event: SyntheticEvent): void => {\n if (onClick) {\n onClick(event);\n }\n };\n\n const asProp = isReactNative() ? undefined : 'span';\n return (\n <StyledBaseLink\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Link, testID })}\n accessibilityProps={{\n ...makeAccessible({\n role,\n disabled,\n ...accessibilityProps,\n }),\n }}\n variant={variant}\n as={as}\n href={href}\n target={target}\n rel={rel ?? defaultRel}\n onClick={handleOnClick}\n {...syntheticEvents}\n onBlur={(event: any) => {\n onBlur?.(event);\n syntheticEvents.onBlur();\n }}\n onFocus={(event: any) => {\n onFocus?.(event);\n syntheticEvents.onFocus();\n }}\n onMouseLeave={(event: any) => {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n syntheticEvents.onMouseLeave();\n }}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd}\n onKeyDown={onKeyDown}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n disabled={disabled}\n type={type}\n cursor={cursor}\n focusRingColor={focusRingColor}\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n setCurrentInteraction={setCurrentInteraction}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n // @ts-ignore Because we avoided exposing className to public\n className={className}\n style={style}\n hitSlop={hitSlop}\n title={htmlTitle}\n >\n <BaseBox\n as={asProp}\n display=\"flex\"\n flexDirection=\"row\"\n className=\"content-container\"\n alignItems=\"center\"\n opacity={opacity}\n >\n {Icon && iconPosition == 'left' ? (\n <BaseBox as={asProp} paddingRight={iconPadding} display=\"flex\" alignItems=\"center\">\n <Icon color={iconColor} size={iconSize} />\n </BaseBox>\n ) : null}\n <BaseText\n as={asProp}\n textDecorationLine={textDecorationLine}\n color={textColor}\n fontSize={fontSize}\n lineHeight={lineHeight}\n textAlign=\"center\"\n fontWeight=\"medium\"\n >\n {children}\n </BaseText>\n {Icon && iconPosition == 'right' ? (\n <BaseBox as={asProp} paddingLeft={iconPadding} display=\"flex\" alignItems=\"center\">\n <Icon color={iconColor} size={iconSize} />\n </BaseBox>\n ) : null}\n </BaseBox>\n </StyledBaseLink>\n );\n};\n\nconst BaseLink = assignWithoutSideEffects(React.forwardRef(_BaseLink), {\n displayName: 'BaseLink',\n componentId: 'BaseLink',\n});\n\nexport default BaseLink;\n"],"names":["getColorToken","_ref","variant","color","currentInteraction","isDisabled","element","state","map","default","hover","focus","disabled","getProps","_ref2","theme","children","target","size","isButton","textSizes","fontSize","xsmall","small","medium","large","lineHeight","props","as","textDecorationLine","iconColor","iconSize","iconPadding","trim","textColor","focusRingColor","getIn","colors","motionDuration","motionEasing","cursor","role","defaultRel","undefined","type","_BaseLink","_ref3","ref","Icon","icon","_ref3$iconPosition","iconPosition","_ref3$isDisabled","onClick","onKeyDown","_ref3$variant","href","rel","_ref3$color","opacity","accessibilityProps","className","style","_ref3$size","testID","hitSlop","htmlTitle","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","rest","_objectWithoutProperties","_excluded","childrenString","getStringFromReactText","_useInteraction","useInteraction","setCurrentInteraction","syntheticEvents","_excluded2","_useTheme","useTheme","__DEV__","throwBladeError","message","moduleName","_getProps","handleOnClick","event","asProp","isReactNative","_jsx","StyledBaseLink","Object","assign","metaAttribute","name","MetaConstants","Link","makeAccessible","getStyledProps","makeAnalyticsAttribute","title","_jsxs","BaseBox","display","flexDirection","alignItems","paddingRight","BaseText","textAlign","fontWeight","paddingLeft","BaseLink","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;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AAE,CAAEoE,MAAO,CAACmB,YAAY,CAAEnF,WAAY,CAACgF,OAAO,CAAC,MAAM,CAACE,UAAU,CAAC,QAAQ,CAAAlG,QAAA,CAChFkF,GAAA,CAAClD,IAAI,CAAA,CAAC7C,KAAK,CAAE2B,SAAU,CAACZ,IAAI,CAAEa,QAAS,CAAE,CAAC,CACnC,CAAC,CACR,IAAI,CACRmE,GAAA,CAACkB,QAAQ,EACPxF,EAAE,CAAEoE,MAAO,CACXnE,kBAAkB,CAAEA,kBAAmB,CACvC1B,KAAK,CAAE+B,SAAU,CACjBb,QAAQ,CAAEA,QAAS,CACnBK,UAAU,CAAEA,UAAW,CACvB2F,SAAS,CAAC,QAAQ,CAClBC,UAAU,CAAC,QAAQ,CAAAtG,QAAA,CAElBA,QAAQ,CACD,CAAC,CACVgC,IAAI,EAAIG,YAAY,EAAI,OAAO,CAC9B+C,GAAA,CAACa,OAAO,CAAA,CAACnF,EAAE,CAAEoE,MAAO,CAACuB,WAAW,CAAEvF,WAAY,CAACgF,OAAO,CAAC,MAAM,CAACE,UAAU,CAAC,QAAQ,CAAAlG,QAAA,CAC/EkF,GAAA,CAAClD,IAAI,CAAA,CAAC7C,KAAK,CAAE2B,SAAU,CAACZ,IAAI,CAAEa,QAAS,CAAE,CAAC,CACnC,CAAC,CACR,IAAI,CAAA,CACD,CAAC,CAAA,CACI,CAAC,CAErB,CAAC,CAEK,IAAAyF,QAAQ,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAAC9E,SAAS,CAAC,CAAE,CACrE+E,WAAW,CAAE,UAAU,CACvBC,WAAW,CAAE,UACf,CAAC;;;;"}
@@ -21,7 +21,7 @@ import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native
21
21
  import { isValidAllowedChildren } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
22
22
  import { jsx } from 'react/jsx-runtime';
23
23
 
24
- var _excluded=["variant","size","children","icon","testID","iconColor"];var StyledOrderedList=styled(OrderedList)(function(_ref){var marginTop=_ref.marginTop,theme=_ref.theme;return {marginTop:marginTop?makeSpace(getIn(theme,marginTop)):undefined};});var StyledUnorderedList=styled(UnorderedList)(function(_ref2){var marginTop=_ref2.marginTop,theme=_ref2.theme;return {marginTop:marginTop?makeSpace(getIn(theme,marginTop)):undefined};});var _List=function _List(_ref3){var _ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'unordered':_ref3$variant,size=_ref3.size,children=_ref3.children,icon=_ref3.icon,testID=_ref3.testID,iconColor=_ref3.iconColor,styledProps=_objectWithoutProperties(_ref3,_excluded);var ListElement=variant==='unordered'?StyledUnorderedList:StyledOrderedList;var _useListContext=useListContext(),level=_useListContext.level,listContextSize=_useListContext.size;var listContextValue=useMemo(function(){return {level:level?level+1:1,size:size!=null?size:listContextSize,icon:icon,iconColor:iconColor,variant:variant};},[icon,iconColor,level,listContextSize,size,variant]);var childrenArray=React__default.Children.toArray(children);var childListItems=childrenArray.filter(function(child){if(isValidAllowedChildren(child,MetaConstants.ListItem)){return child;}if(__DEV__){throwBladeError({message:'You can only pass a ListItem as a child to List.',moduleName:'List'});}return null;});return jsx(ListProvider,{value:listContextValue,children:jsx(BaseBox,Object.assign({},getStyledProps(styledProps),{children:jsx(ListElement,Object.assign({},metaAttribute({name:MetaConstants.List,testID:testID}),makeAccessible({role:'list'}),{children:variant==='unordered'?childListItems:childListItems.map(function(child,index){return React__default.cloneElement(child,{_itemNumber:index+1});})}))}))});};var List=assignWithoutSideEffects(_List,{componentId:MetaConstants.List});
24
+ var _excluded=["variant","size","children","icon","testID","iconColor"];var StyledOrderedList=styled(OrderedList)(function(_ref){var marginTop=_ref.marginTop,theme=_ref.theme;return {marginTop:marginTop?makeSpace(getIn(theme,marginTop)):undefined};});var StyledUnorderedList=styled(UnorderedList)(function(_ref2){var marginTop=_ref2.marginTop,theme=_ref2.theme;return {marginTop:marginTop?makeSpace(getIn(theme,marginTop)):undefined};});var _List=function _List(_ref3,ref){var _ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'unordered':_ref3$variant,size=_ref3.size,children=_ref3.children,icon=_ref3.icon,testID=_ref3.testID,iconColor=_ref3.iconColor,styledProps=_objectWithoutProperties(_ref3,_excluded);var ListElement=variant==='unordered'?StyledUnorderedList:StyledOrderedList;var _useListContext=useListContext(),level=_useListContext.level,listContextSize=_useListContext.size;var listContextValue=useMemo(function(){return {level:level?level+1:1,size:size!=null?size:listContextSize,icon:icon,iconColor:iconColor,variant:variant};},[icon,iconColor,level,listContextSize,size,variant]);var childrenArray=React__default.Children.toArray(children);var childListItems=childrenArray.filter(function(child){if(isValidAllowedChildren(child,MetaConstants.ListItem)){return child;}if(__DEV__){throwBladeError({message:'You can only pass a ListItem as a child to List.',moduleName:'List'});}return null;});return jsx(ListProvider,{value:listContextValue,children:jsx(BaseBox,Object.assign({ref:ref},getStyledProps(styledProps),{children:jsx(ListElement,Object.assign({},metaAttribute({name:MetaConstants.List,testID:testID}),makeAccessible({role:'list'}),{children:variant==='unordered'?childListItems:childListItems.map(function(child,index){return React__default.cloneElement(child,{_itemNumber:index+1});})}))}))});};var List=assignWithoutSideEffects(React__default.forwardRef(_List),{componentId:MetaConstants.List});
25
25
 
26
26
  export { List };
27
27
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/List/List.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { ListProvider, useListContext } from './ListContext';\nimport { UnorderedList } from './UnorderedList';\nimport { OrderedList } from './OrderedList';\nimport type { ListItemProps } from './ListItem';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { IconComponent, IconProps } from '~components/Icons';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListCommonProps = {\n /**\n * ListItem to be rendered for the List.\n *\n */\n children: React.ReactElement<ListItemProps> | React.ReactElement<ListItemProps>[];\n /**\n * Sets the variant to be rendered for the List.\n *\n * @default 'unordered'\n */\n variant?: 'unordered' | 'ordered' | 'ordered-filled';\n /**\n * Sets the size for the List.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n StyledPropsBlade;\n\ntype ListWithIconProps = ListCommonProps & {\n variant?: 'unordered';\n icon?: IconComponent;\n iconColor?: IconProps['color'];\n};\ntype ListWithoutIconProps = ListCommonProps & {\n variant?: 'ordered' | 'ordered-filled';\n icon?: undefined;\n iconColor?: undefined;\n};\ntype ListProps = ListWithIconProps | ListWithoutIconProps;\n\nconst StyledOrderedList = styled(OrderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\nconst StyledUnorderedList = styled(UnorderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\n/**\n * List Component is used to display a set of related items that are composed of text/links. Each list item begins with a bullet or a number.\n *\n * ## Usage\n *\n * ```tsx\n * <List\n * variant='unordered'\n * size='medium'\n * >\n * <ListItem>\n * Item 1\n * <List>\n * <ListItem>Item 1.1</ListItem>\n * </List>\n * </ListItem>\n * <ListItem>Item 2</ListItem>\n * <List />\n * ```\n */\nconst _List = ({\n variant = 'unordered',\n size,\n children,\n icon,\n testID,\n iconColor,\n ...styledProps\n}: ListProps): React.ReactElement => {\n const ListElement = variant === 'unordered' ? StyledUnorderedList : StyledOrderedList;\n const { level, size: listContextSize } = useListContext();\n const listContextValue = useMemo(\n () => ({\n level: level ? level + 1 : 1,\n size: size ?? listContextSize,\n icon,\n iconColor,\n variant,\n }),\n [icon, iconColor, level, listContextSize, size, variant],\n );\n\n const childrenArray = React.Children.toArray(children);\n const childListItems = childrenArray.filter((child) => {\n if (isValidAllowedChildren(child, MetaConstants.ListItem)) {\n return child;\n }\n if (__DEV__) {\n throwBladeError({\n message: 'You can only pass a ListItem as a child to List.',\n moduleName: 'List',\n });\n }\n return null;\n });\n\n return (\n <ListProvider value={listContextValue}>\n <BaseBox {...getStyledProps(styledProps)}>\n <ListElement\n {...metaAttribute({ name: MetaConstants.List, testID })}\n {...makeAccessible({ role: 'list' })} // Role needed for react-native\n >\n {variant === 'unordered'\n ? childListItems\n : childListItems.map(\n (child, index) =>\n React.cloneElement(child as React.ReactElement, { _itemNumber: index + 1 }), // adds _itemNumber for rendering ordered list bullets\n )}\n </ListElement>\n </BaseBox>\n </ListProvider>\n );\n};\n\nconst List = assignWithoutSideEffects(_List, { componentId: MetaConstants.List });\n\nexport { List };\nexport type { ListProps };\n"],"names":["StyledOrderedList","styled","OrderedList","_ref","marginTop","theme","makeSpace","getIn","undefined","StyledUnorderedList","UnorderedList","_ref2","_List","_ref3","_ref3$variant","variant","size","children","icon","testID","iconColor","styledProps","_objectWithoutProperties","_excluded","ListElement","_useListContext","useListContext","level","listContextSize","listContextValue","useMemo","childrenArray","React","Children","toArray","childListItems","filter","child","isValidAllowedChildren","MetaConstants","ListItem","__DEV__","throwBladeError","message","moduleName","_jsx","ListProvider","value","BaseBox","Object","assign","getStyledProps","metaAttribute","name","List","makeAccessible","role","map","index","cloneElement","_itemNumber","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;wEAoDA,IAAMA,iBAAiB,CAAGC,MAAM,CAACC,WAAW,CAAC,CAC3C,SAAAC,IAAA,CAAG,CAAA,IAAAC,SAAS,CAAAD,IAAA,CAATC,SAAS,CAAEC,KAAK,CA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AW,CAAEF,KAAK,CAAG,CAAE,CAAC,CAAC,EAC/E,CAAC,CAAA,CACM,CAAC,CAAA,CACP,CAAC,CACE,CAAC,CAEnB,CAAC,CAEK,IAAAJ,IAAI,CAAGO,wBAAwB,CAACjD,KAAK,CAAE,CAAEkD,WAAW,CAAEvB,aAAa,CAACe,IAAK,CAAC;;;;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/List/List.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { ListProvider, useListContext } from './ListContext';\nimport { UnorderedList } from './UnorderedList';\nimport { OrderedList } from './OrderedList';\nimport type { ListItemProps } from './ListItem';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { IconComponent, IconProps } from '~components/Icons';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { BladeElementRef, DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListCommonProps = {\n /**\n * ListItem to be rendered for the List.\n *\n */\n children: React.ReactElement<ListItemProps> | React.ReactElement<ListItemProps>[];\n /**\n * Sets the variant to be rendered for the List.\n *\n * @default 'unordered'\n */\n variant?: 'unordered' | 'ordered' | 'ordered-filled';\n /**\n * Sets the size for the List.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n StyledPropsBlade;\n\ntype ListWithIconProps = ListCommonProps & {\n variant?: 'unordered';\n icon?: IconComponent;\n iconColor?: IconProps['color'];\n};\ntype ListWithoutIconProps = ListCommonProps & {\n variant?: 'ordered' | 'ordered-filled';\n icon?: undefined;\n iconColor?: undefined;\n};\ntype ListProps = ListWithIconProps | ListWithoutIconProps;\n\nconst StyledOrderedList = styled(OrderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\nconst StyledUnorderedList = styled(UnorderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\n/**\n * List Component is used to display a set of related items that are composed of text/links. Each list item begins with a bullet or a number.\n *\n * ## Usage\n *\n * ```tsx\n * <List\n * variant='unordered'\n * size='medium'\n * >\n * <ListItem>\n * Item 1\n * <List>\n * <ListItem>Item 1.1</ListItem>\n * </List>\n * </ListItem>\n * <ListItem>Item 2</ListItem>\n * <List />\n * ```\n */\nconst _List = (\n { variant = 'unordered', size, children, icon, testID, iconColor, ...styledProps }: ListProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const ListElement = variant === 'unordered' ? StyledUnorderedList : StyledOrderedList;\n const { level, size: listContextSize } = useListContext();\n const listContextValue = useMemo(\n () => ({\n level: level ? level + 1 : 1,\n size: size ?? listContextSize,\n icon,\n iconColor,\n variant,\n }),\n [icon, iconColor, level, listContextSize, size, variant],\n );\n\n const childrenArray = React.Children.toArray(children);\n const childListItems = childrenArray.filter((child) => {\n if (isValidAllowedChildren(child, MetaConstants.ListItem)) {\n return child;\n }\n if (__DEV__) {\n throwBladeError({\n message: 'You can only pass a ListItem as a child to List.',\n moduleName: 'List',\n });\n }\n return null;\n });\n\n return (\n <ListProvider value={listContextValue}>\n <BaseBox ref={ref as never} {...getStyledProps(styledProps)}>\n <ListElement\n {...metaAttribute({ name: MetaConstants.List, testID })}\n {...makeAccessible({ role: 'list' })} // Role needed for react-native\n >\n {variant === 'unordered'\n ? childListItems\n : childListItems.map(\n (child, index) =>\n React.cloneElement(child as React.ReactElement, { _itemNumber: index + 1 }), // adds _itemNumber for rendering ordered list bullets\n )}\n </ListElement>\n </BaseBox>\n </ListProvider>\n );\n};\n\nconst List = assignWithoutSideEffects(React.forwardRef(_List), { componentId: MetaConstants.List });\n\nexport { List };\nexport type { ListProps };\n"],"names":["StyledOrderedList","styled","OrderedList","_ref","marginTop","theme","makeSpace","getIn","undefined","StyledUnorderedList","UnorderedList","_ref2","_List","_ref3","ref","_ref3$variant","variant","size","children","icon","testID","iconColor","styledProps","_objectWithoutProperties","_excluded","ListElement","_useListContext","useListContext","level","listContextSize","listContextValue","useMemo","childrenArray","React","Children","toArray","childListItems","filter","child","isValidAllowedChildren","MetaConstants","ListItem","__DEV__","throwBladeError","message","moduleName","_jsx","ListProvider","value","BaseBox","Object","assign","getStyledProps","metaAttribute","name","List","makeAccessible","role","map","index","cloneElement","_itemNumber","assignWithoutSideEffects","forwardRef","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;wEAoDA,IAAMA,iBAAiB,CAAGC,MAAM,CAACC,WAAW,CAAC,CAC3C,SAAAC,IAAA,CAAG,CAAA,IAAAC,SAAS,CAAAD,IAAA,CAATC,SAAS,CAAEC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAAA,OAAQ,CACzBD,SAAS,CAAEA,SAAS,CAAGE,SAAS,CAACC,KAAK,CAACF,KAAK,CAAED,SAAS,CAAC,CAAC,CAAGI,SAC9D,CAAC,CACH,CAAA,CAAC,CAED,IAAMC,mBAAmB,CAAGR,MAAM,CAACS,aAAa,CAAC,CAC/C,SAAAC,KAAA,CAAG,CAAA,IAAAP,SAAS,CAAAO,KAAA,CAATP,SAAS,CAAEC,KAAK,CAAAM,KAAA,CAALN,KAAK,CAAQ,OAAA,CACzBD,SAAS,CAAEA,SAAS,CAAGE,SAAS,CAACC,KAAK,CAACF,KAAK,CAAED,SAAS,CAAC,CAAC,CAAGI,SAC9D,CAAC,CACH,CAAA,CAAC,CAsBD,IAAMI,KAAK,CAAG,SAARA,KAAKA,CAAAC,KAAA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AAO,CAAE,CACXC,eAAe,CAAC,CACdC,OAAO,CAAE,kDAAkD,CAC3DC,UAAU,CAAE,MACd,CAAC,CAAC,CACJ,CACA,OAAO,IAAI,CACb,CAAC,CAAC,CAEF,OACEC,GAAA,CAACC,YAAY,CAAA,CAACC,KAAK,CAAElB,gBAAiB,CAAAZ,QAAA,CACpC4B,GAAA,CAACG,OAAO,CAAAC,MAAA,CAAAC,MAAA,CAACrC,CAAAA,GAAG,CAAEA,GAAa,CAAKsC,CAAAA,cAAc,CAAC9B,WAAW,CAAC,CAAA,CAAAJ,QAAA,CACzD4B,GAAA,CAACrB,WAAW,CAAAyB,MAAA,CAAAC,MAAA,CACNE,EAAAA,CAAAA,aAAa,CAAC,CAAEC,IAAI,CAAEd,aAAa,CAACe,IAAI,CAAEnC,MAAM,CAANA,MAAO,CAAC,CAAC,CACnDoC,cAAc,CAAC,CAAEC,IAAI,CAAE,MAAO,CAAC,CAAC,CAAAvC,CAAAA,QAAA,CAEnCF,OAAO,GAAK,WAAW,CACpBoB,cAAc,CACdA,cAAc,CAACsB,GAAG,CAChB,SAACpB,KAAK,CAAEqB,KAAK,CACX,CAAA,OAAA1B,cAAK,CAAC2B,YAAY,CAACtB,KAAK,CAAwB,CAAEuB,WAAW,CAAEF,KAAK,CAAG,CAAE,CAAC,CAAC,CAC/E,CAAA,CAAC,CACM,CAAA,CAAC,CACP,CAAA,CAAC,CACE,CAAC,CAEnB,CAAC,CAEK,IAAAJ,IAAI,CAAGO,wBAAwB,CAAC7B,cAAK,CAAC8B,UAAU,CAACnD,KAAK,CAAC,CAAE,CAAEoD,WAAW,CAAExB,aAAa,CAACe,IAAK,CAAC;;;;"}
@@ -6,21 +6,19 @@ import { ListItemElement } from './ListItemElement.native.js';
6
6
  import { listItemMarginLeft, listItemMarginBottom, listItemBulletMarginRight, listItemBulletMarginTop, listItemOrderedBulletBoxSize } from './listTokens.js';
7
7
  import { getOrderedListItemBullet } from './getOrderedListItemBullet.js';
8
8
  import getIn from '../../utils/lodashButBetter/get.js';
9
- import '@babel/runtime/helpers/objectWithoutProperties';
10
- import '../Typography/BaseText/BaseText.native.js';
11
- import { throwBladeError } from '../../utils/logger/logger.js';
12
- import '@babel/runtime/helpers/slicedToArray';
13
- import 'react-native';
14
- import '../../tokens/global/typography.js';
15
- import '../../tokens/global/motion.js';
16
- import { getPlatformType } from '../../utils/getPlatformType/getPlatformType.js';
17
- import useTheme from '../BladeProvider/useTheme.js';
18
- import { jsxs, jsx } from 'react/jsx-runtime';
9
+ import '../Typography/Heading/Heading.js';
19
10
  import { Text } from '../Typography/Text/Text.js';
20
11
  import '../Typography/Code/Code.js';
12
+ import '../Typography/Display/Display.js';
21
13
  import '@gorhom/portal';
22
14
  import 'react-native-gesture-handler';
15
+ import useTheme from '../BladeProvider/useTheme.js';
16
+ import 'react-native';
17
+ import { getPlatformType } from '../../utils/getPlatformType/getPlatformType.js';
18
+ import '@babel/runtime/helpers/slicedToArray';
19
+ import { throwBladeError } from '../../utils/logger/logger.js';
23
20
  import '../BottomSheet/BottomSheetStack.js';
21
+ import { jsxs, jsx } from 'react/jsx-runtime';
24
22
  import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
25
23
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js';
26
24
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.js","sources":["../../../../../src/components/List/ListItem.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport { useListContext } from './ListContext';\nimport { UnorderedItemIcon } from './ListItemIcons';\nimport { ListItemElement } from './ListItemElement';\nimport {\n listItemBulletMarginRight,\n listItemBulletMarginTop,\n listItemOrderedBulletBoxSize,\n listItemMarginBottom,\n listItemMarginLeft,\n} from './listTokens';\nimport type { ListProps } from './List';\nimport { getOrderedListItemBullet } from './getOrderedListItemBullet';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { IconComponent } from '~components/Icons';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { getPlatformType } from '~utils/getPlatformType';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListItemProps = {\n /**\n * Children to be rendered for ListItem. This can be a text, ListItemLink or another List.\n *\n */\n children: React.ReactNode;\n /**\n * Icon to be rendered for a ListItem's bullet.\n *\n */\n icon?: IconComponent;\n /**\n * Icon color of the ListItem's bullet.\n *\n */\n iconColor?: ListProps['iconColor'];\n /**\n * This is a private prop to be used only for internal logic purposes.\n *\n */\n _itemNumber?: undefined;\n} & TestID;\n\nconst StyledListItem = styled(ListItemElement)<{\n level?: number;\n variant: NonNullable<ListProps['variant']>;\n hasIcon: boolean;\n}>(({ level, theme, variant, hasIcon }) => ({\n marginLeft: level\n ? getIn(\n theme,\n listItemMarginLeft[\n `${variant}${variant === 'unordered' && hasIcon ? 'WithIcon' : ''}` as NonNullable<\n ListProps['variant'] | 'unorderedWithIcon'\n >\n ][level],\n )\n : 0,\n}));\n\nconst ListItemContentChildren = ({\n children,\n size,\n}: {\n children: React.ReactNode[];\n size: NonNullable<ListProps['size']>;\n}): React.ReactElement => {\n /* Having a <View><Text>...</Text><View/> inside <Text /> breaks vertical alignment. Issue: https://github.com/facebook/react-native/issues/31955\n As a workaround, we wrap individual strings in their own <Text /> and handle alignment with a parent <View> (BaseBox).\n */\n return getPlatformType() === 'react-native' ? (\n <BaseBox display=\"flex\" flexDirection=\"row\" flexWrap=\"wrap\">\n {children.map((child, index) => {\n if (typeof child === 'string') {\n return (\n <Text key={index} variant=\"body\" size={size}>\n {child}\n </Text>\n );\n }\n return child;\n })}\n </BaseBox>\n ) : (\n <Text variant=\"body\" size={size}>\n {children}\n </Text>\n );\n};\n\nconst _ListItem = ({\n children,\n icon: Icon,\n iconColor: listItemIconColor,\n _itemNumber,\n testID,\n}: ListItemProps): React.ReactElement => {\n const { level, size, icon: ListContextIcon, variant, iconColor } = useListContext();\n const { theme, platform } = useTheme();\n const ItemIcon = Icon ?? ListContextIcon;\n const iconColorToken = listItemIconColor ?? iconColor ?? 'surface.icon.gray.muted';\n\n if (__DEV__) {\n if (level && level > 3) {\n throwBladeError({\n message: 'List Nesting is allowed only upto 3 levels.',\n moduleName: 'List',\n });\n }\n }\n\n const childrenArray = React.Children.toArray(children);\n\n // Get children that are not a List component and are valid allowed children\n const validChildItem = childrenArray.filter((child) => {\n if (getComponentId(child) === MetaConstants.List) return null;\n\n if (\n typeof child === 'string' ||\n isValidAllowedChildren(child, MetaConstants.ListItemLink) ||\n isValidAllowedChildren(child, MetaConstants.ListItemText) ||\n isValidAllowedChildren(child, MetaConstants.ListItemCode)\n ) {\n return child;\n } else if (__DEV__) {\n throwBladeError({\n message: `You can only pass a List, ListItemLink, ListItemCode, ListItemText or a string as a child to ListItem.`,\n moduleName: 'ListItem',\n });\n }\n return null;\n });\n // Get child that is a List component\n const childList = childrenArray.filter((child) =>\n getComponentId(child) === MetaConstants.List ? child : null,\n );\n const hasIcon = Boolean(ItemIcon);\n\n return (\n <StyledListItem\n level={level}\n variant={variant}\n hasIcon={hasIcon}\n {...metaAttribute({ name: MetaConstants.ListItem, testID })}\n >\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n marginBottom={listItemMarginBottom}\n >\n {variant === 'unordered' ? (\n <BaseBox\n marginRight={listItemBulletMarginRight[variant]}\n marginTop={\n listItemBulletMarginTop[`${variant}${hasIcon ? 'WithIcon' : ''}`][platform][size]\n }\n display=\"flex\"\n alignSelf=\"flex-start\"\n >\n {ItemIcon ? (\n <ItemIcon size={size} color={iconColorToken} />\n ) : (\n <UnorderedItemIcon level={level} />\n )}\n </BaseBox>\n ) : (\n <BaseBox\n width={listItemOrderedBulletBoxSize[variant][platform][size]}\n height={listItemOrderedBulletBoxSize[variant][platform][size]}\n marginRight={listItemBulletMarginRight[variant]}\n marginTop={listItemBulletMarginTop[variant][platform][size]}\n display=\"flex\"\n flexShrink={0}\n justifyContent=\"center\"\n alignSelf=\"flex-start\"\n alignItems=\"center\"\n borderRadius={variant === 'ordered-filled' ? 'max' : undefined}\n backgroundColor={\n variant === 'ordered-filled'\n ? getIn(theme.colors, 'feedback.background.neutral.subtle')\n : undefined\n }\n >\n <Text\n variant=\"body\"\n color=\"surface.text.gray.muted\"\n size={variant === 'ordered' ? size : 'xsmall'}\n >\n {`${getOrderedListItemBullet({\n itemNumber: _itemNumber ?? 1,\n level: level ?? 1,\n })}${variant === 'ordered' ? '.' : ''}`}\n </Text>\n </BaseBox>\n )}\n <ListItemContentChildren size={size}>{validChildItem}</ListItemContentChildren>\n </BaseBox>\n {childList}\n </StyledListItem>\n );\n};\n\nconst ListItem = assignWithoutSideEffects(_ListItem, { componentId: MetaConstants.ListItem });\n\nexport { ListItem };\nexport type { ListItemProps };\n"],"names":["StyledListItem","styled","ListItemElement","_ref","level","theme","variant","hasIcon","marginLeft","getIn","listItemMarginLeft","ListItemContentChildren","_ref2","children","size","getPlatformType","_jsx","BaseBox","display","flexDirection","flexWrap","map","child","index","Text","_ListItem","_ref3","_ref4","Icon","icon","listItemIconColor","iconColor","_itemNumber","testID","_useListContext","useListContext","ListContextIcon","_useTheme","useTheme","platform","ItemIcon","iconColorToken","__DEV__","throwBladeError","message","moduleName","childrenArray","React","Children","toArray","validChildItem","filter","getComponentId","MetaConstants","List","isValidAllowedChildren","ListItemLink","ListItemText","ListItemCode","childList","Boolean","_jsxs","Object","assign","metaAttribute","name","ListItem","alignItems","marginBottom","listItemMarginBottom","marginRight","listItemBulletMarginRight","marginTop","listItemBulletMarginTop","alignSelf","color","UnorderedItemIcon","width","listItemOrderedBulletBoxSize","height","flexShrink","justifyContent","borderRadius","undefined","backgroundColor","colors","getOrderedListItemBullet","itemN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AAM,CACdqE,KAAK,CAAC,yBAAyB,CAC/B7D,IAAI,CAAER,OAAO,GAAK,SAAS,CAAGQ,IAAI,CAAG,QAAS,CAAAD,QAAA,CAE5C,GAAEyE,wBAAwB,CAAC,CAC3BC,UAAU,CAAEvD,WAAW,OAAXA,WAAW,CAAI,CAAC,CAC5B5B,KAAK,CAAEA,KAAK,EAALA,IAAAA,CAAAA,KAAK,CAAI,CAClB,CAAC,CAAE,GAAEE,OAAO,GAAK,SAAS,CAAG,GAAG,CAAG,EAAG,CAAC,CAAA,CACnC,CAAC,CACA,CACV,CACDU,GAAA,CAACL,uBAAuB,CAACG,CAAAA,IAAI,CAAEA,IAAK,CAAAD,QAAA,CAAEqC,cAAc,CAA0B,CAAC,CAAA,CACxE,CAAC,CACTS,SAAS,CACI,CAAA,CAAA,CAAC,CAErB,CAAC,CAEK,IAAAO,QAAQ,CAAGsB,wBAAwB,CAAC/D,SAAS,CAAE,CAAEgE,WAAW,CAAEpC,aAAa,CAACa,QAAS,CAAC;;;;"}
1
+ {"version":3,"file":"ListItem.js","sources":["../../../../../src/components/List/ListItem.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport { useListContext } from './ListContext';\nimport { UnorderedItemIcon } from './ListItemIcons';\nimport { ListItemElement } from './ListItemElement';\nimport {\n listItemBulletMarginRight,\n listItemBulletMarginTop,\n listItemOrderedBulletBoxSize,\n listItemMarginBottom,\n listItemMarginLeft,\n} from './listTokens';\nimport type { ListProps } from './List';\nimport { getOrderedListItemBullet } from './getOrderedListItemBullet';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { IconComponent } from '~components/Icons';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { getPlatformType } from '~utils/getPlatformType';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListItemProps = {\n /**\n * Children to be rendered for ListItem. This can be a text, ListItemLink or another List.\n *\n */\n children: React.ReactNode;\n /**\n * Icon to be rendered for a ListItem's bullet.\n *\n */\n icon?: IconComponent;\n /**\n * Icon color of the ListItem's bullet.\n *\n */\n iconColor?: ListProps['iconColor'];\n /**\n * This is a private prop to be used only for internal logic purposes.\n *\n */\n _itemNumber?: undefined;\n} & TestID;\n\nconst StyledListItem = styled(ListItemElement)<{\n level?: number;\n variant: NonNullable<ListProps['variant']>;\n hasIcon: boolean;\n}>(({ level, theme, variant, hasIcon }) => ({\n marginLeft: level\n ? getIn(\n theme,\n listItemMarginLeft[\n `${variant}${variant === 'unordered' && hasIcon ? 'WithIcon' : ''}` as NonNullable<\n ListProps['variant'] | 'unorderedWithIcon'\n >\n ][level],\n )\n : 0,\n}));\n\nconst ListItemContentChildren = ({\n children,\n size,\n}: {\n children: React.ReactNode[];\n size: NonNullable<ListProps['size']>;\n}): React.ReactElement => {\n /* Having a <View><Text>...</Text><View/> inside <Text /> breaks vertical alignment. Issue: https://github.com/facebook/react-native/issues/31955\n As a workaround, we wrap individual strings in their own <Text /> and handle alignment with a parent <View> (BaseBox).\n */\n return getPlatformType() === 'react-native' ? (\n <BaseBox display=\"flex\" flexDirection=\"row\" flexWrap=\"wrap\">\n {children.map((child, index) => {\n if (typeof child === 'string') {\n return (\n <Text key={index} variant=\"body\" size={size}>\n {child}\n </Text>\n );\n }\n return child;\n })}\n </BaseBox>\n ) : (\n <Text variant=\"body\" size={size}>\n {children}\n </Text>\n );\n};\n\nconst _ListItem = ({\n children,\n icon: Icon,\n iconColor: listItemIconColor,\n _itemNumber,\n testID,\n}: ListItemProps): React.ReactElement => {\n const { level, size, icon: ListContextIcon, variant, iconColor } = useListContext();\n const { theme, platform } = useTheme();\n const ItemIcon = Icon ?? ListContextIcon;\n const iconColorToken = listItemIconColor ?? iconColor ?? 'surface.icon.gray.muted';\n\n if (__DEV__) {\n if (level && level > 3) {\n throwBladeError({\n message: 'List Nesting is allowed only upto 3 levels.',\n moduleName: 'List',\n });\n }\n }\n\n const childrenArray = React.Children.toArray(children);\n\n // Get children that are not a List component and are valid allowed children\n const validChildItem = childrenArray.filter((child) => {\n if (getComponentId(child) === MetaConstants.List) return null;\n\n if (\n typeof child === 'string' ||\n isValidAllowedChildren(child, MetaConstants.ListItemLink) ||\n isValidAllowedChildren(child, MetaConstants.ListItemText) ||\n isValidAllowedChildren(child, MetaConstants.ListItemCode)\n ) {\n return child;\n } else if (__DEV__) {\n throwBladeError({\n message: `You can only pass a List, ListItemLink, ListItemCode, ListItemText or a string as a child to ListItem.`,\n moduleName: 'ListItem',\n });\n }\n return null;\n });\n // Get child that is a List component\n const childList = childrenArray.filter((child) =>\n getComponentId(child) === MetaConstants.List ? child : null,\n );\n const hasIcon = Boolean(ItemIcon);\n\n return (\n <StyledListItem\n level={level}\n variant={variant}\n hasIcon={hasIcon}\n {...metaAttribute({ name: MetaConstants.ListItem, testID })}\n >\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n marginBottom={listItemMarginBottom}\n >\n {variant === 'unordered' ? (\n <BaseBox\n marginRight={listItemBulletMarginRight[variant]}\n marginTop={\n listItemBulletMarginTop[`${variant}${hasIcon ? 'WithIcon' : ''}`][platform][size]\n }\n display=\"flex\"\n alignSelf=\"flex-start\"\n >\n {ItemIcon ? (\n <ItemIcon size={size} color={iconColorToken} />\n ) : (\n <UnorderedItemIcon level={level} />\n )}\n </BaseBox>\n ) : (\n <BaseBox\n width={listItemOrderedBulletBoxSize[variant][platform][size]}\n height={listItemOrderedBulletBoxSize[variant][platform][size]}\n marginRight={listItemBulletMarginRight[variant]}\n marginTop={listItemBulletMarginTop[variant][platform][size]}\n display=\"flex\"\n flexShrink={0}\n justifyContent=\"center\"\n alignSelf=\"flex-start\"\n alignItems=\"center\"\n borderRadius={variant === 'ordered-filled' ? 'max' : undefined}\n backgroundColor={\n variant === 'ordered-filled'\n ? getIn(theme.colors, 'feedback.background.neutral.subtle')\n : undefined\n }\n >\n <Text\n variant=\"body\"\n color=\"surface.text.gray.muted\"\n size={variant === 'ordered' ? size : 'xsmall'}\n >\n {`${getOrderedListItemBullet({\n itemNumber: _itemNumber ?? 1,\n level: level ?? 1,\n })}${variant === 'ordered' ? '.' : ''}`}\n </Text>\n </BaseBox>\n )}\n <ListItemContentChildren size={size}>{validChildItem}</ListItemContentChildren>\n </BaseBox>\n {childList}\n </StyledListItem>\n );\n};\n\nconst ListItem = assignWithoutSideEffects(_ListItem, { componentId: MetaConstants.ListItem });\n\nexport { ListItem };\nexport type { ListItemProps };\n"],"names":["StyledListItem","styled","ListItemElement","_ref","level","theme","variant","hasIcon","marginLeft","getIn","listItemMarginLeft","ListItemContentChildren","_ref2","children","size","getPlatformType","_jsx","BaseBox","display","flexDirection","flexWrap","map","child","index","Text","_ListItem","_ref3","_ref4","Icon","icon","listItemIconColor","iconColor","_itemNumber","testID","_useListContext","useListContext","ListContextIcon","_useTheme","useTheme","platform","ItemIcon","iconColorToken","__DEV__","throwBladeError","message","moduleName","childrenArray","React","Children","toArray","validChildItem","filter","getComponentId","MetaConstants","List","isValidAllowedChildren","ListItemLink","ListItemText","ListItemCode","childList","Boolean","_jsxs","Object","assign","metaAttribute","name","ListItem","alignItems","marginBottom","listItemMarginBottom","marginRight","listItemBulletMarginRight","marginTop","listItemBulletMarginTop","alignSelf","color","UnorderedItemIcon","width","listItemOrderedBulletBoxSize","height","flexShrink","justifyContent","borderRadius","undefined","backgroundColor","colors","getOrderedListItemBullet","itemNumber","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,IAAMA,cAAc,CAAGC,MAAM,CAACC,eAAe,CAAC,CAI3C,SAAAC,IAAA,CAAA,CAAA,IAAGC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,KAAK,CAAAF,I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K,CAAEA,KAAK,EAALA,IAAAA,CAAAA,KAAK,CAAI,CAClB,CAAC,CAAE,GAAEE,OAAO,GAAK,SAAS,CAAG,GAAG,CAAG,EAAG,CAAC,CAAA,CACnC,CAAC,CACA,CACV,CACDU,GAAA,CAACL,uBAAuB,CAACG,CAAAA,IAAI,CAAEA,IAAK,CAAAD,QAAA,CAAEqC,cAAc,CAA0B,CAAC,CAAA,CACxE,CAAC,CACTS,SAAS,CACI,CAAA,CAAA,CAAC,CAErB,CAAC,CAEK,IAAAO,QAAQ,CAAGsB,wBAAwB,CAAC/D,SAAS,CAAE,CAAEgE,WAAW,CAAEpC,aAAa,CAACa,QAAS,CAAC;;;;"}
@@ -1,19 +1,13 @@
1
1
  import { listItemCodeSize } from './listTokens.js';
2
2
  import { useListContext } from './ListContext.js';
3
- import '@babel/runtime/helpers/objectWithoutProperties';
4
- import '../Typography/BaseText/BaseText.native.js';
5
- import 'react';
6
- import '@babel/runtime/helpers/slicedToArray';
7
- import 'react-native';
8
- import '../../tokens/global/typography.js';
9
- import '../../tokens/global/motion.js';
10
- import '../BladeProvider/useTheme.js';
11
- import { jsx } from 'react/jsx-runtime';
3
+ import '../Typography/Heading/Heading.js';
12
4
  import '../Typography/Text/Text.js';
13
5
  import { Code } from '../Typography/Code/Code.js';
6
+ import '../Typography/Display/Display.js';
14
7
  import '@babel/runtime/helpers/defineProperty';
15
8
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
16
9
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
10
+ import { jsx } from 'react/jsx-runtime';
17
11
 
18
12
  var _ListItemCode=function _ListItemCode(_ref){var children=_ref.children,testID=_ref.testID;var _useListContext=useListContext(),size=_useListContext.size;return jsx(Code,{size:listItemCodeSize[size],children:children,testID:testID});};var ListItemCode=assignWithoutSideEffects(_ListItemCode,{componentId:MetaConstants.ListItemCode});
19
13
 
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemCode.js","sources":["../../../../../src/components/List/ListItemCode.tsx"],"sourcesContent":["import { listItemCodeSize } from './listTokens';\nimport { useListContext } from './ListContext';\nimport type { CodeProps } from '~components/Typography';\nimport { Code } from '~components/Typography';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\ntype ListItemCodeProps = Exclude<CodeProps, 'size'>;\n\nconst _ListItemCode = ({ children, testID }: ListItemCodeProps): React.ReactElement => {\n const { size } = useListContext();\n\n return <Code size={listItemCodeSize[size]} children={children} testID={testID} />;\n};\n\nconst ListItemCode = assignWithoutSideEffects(_ListItemCode, {\n componentId: MetaConstants.ListItemCode,\n});\n\nexport type { ListItemCodeProps };\nexport { ListItemCode };\n"],"names":["_ListItemCode","_ref","children","testID","_useListContext","useListContext","size","_jsx","Code","listItemCodeSize","ListItemCode","assignWithoutSideEffects","componentId","MetaConstants"],"mappings":";;;;;;;;;;;;;;;;;AASA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAAoE,KAA9DC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,MAAM,CAAAF,IAAA,CAANE,MAAM,CACvC,IAAAC,eAAA,CAAiBC,cAAc,EAAE,CAAzBC,IAAI,CAAAF,eAAA,CAAJE,IAAI,CAEZ,OAAOC,GAAA,CAACC,IAAI,CAAA,CAACF,IAAI,CAAEG,gBAAgB,CAACH,IAAI,CAAE,CAACJ,QAAQ,CAAEA,QAAS,CAACC,MAAM,CAAEA,MAAO,CAAE,CAAC,CACnF,CAAC,CAEK,IAAAO,YAAY,CAAGC,wBAAwB,CAACX,aAAa,CAAE,CAC3DY,WAAW,CAAEC,aAAa,CAACH,YAC7B,CAAC;;;;"}
1
+ {"version":3,"file":"ListItemCode.js","sources":["../../../../../src/components/List/ListItemCode.tsx"],"sourcesContent":["import { listItemCodeSize } from './listTokens';\nimport { useListContext } from './ListContext';\nimport type { CodeProps } from '~components/Typography';\nimport { Code } from '~components/Typography';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\n\ntype ListItemCodeProps = Exclude<CodeProps, 'size'>;\n\nconst _ListItemCode = ({ children, testID }: ListItemCodeProps): React.ReactElement => {\n const { size } = useListContext();\n\n return <Code size={listItemCodeSize[size]} children={children} testID={testID} />;\n};\n\nconst ListItemCode = assignWithoutSideEffects(_ListItemCode, {\n componentId: MetaConstants.ListItemCode,\n});\n\nexport type { ListItemCodeProps };\nexport { ListItemCode };\n"],"names":["_ListItemCode","_ref","children","testID","_useListContext","useListContext","size","_jsx","Code","listItemCodeSize","ListItemCode","assignWithoutSideEffects","componentId","MetaConstants"],"mappings":";;;;;;;;;;;AASA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAAoE,KAA9DC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,MAAM,CAAAF,IAAA,CAANE,MAAM,CACvC,IAAAC,eAAA,CAAiBC,cAAc,EAAE,CAAzBC,IAAI,CAAAF,eAAA,CAAJE,IAAI,CAEZ,OAAOC,GAAA,CAACC,IAAI,CAAA,CAACF,IAAI,CAAEG,gBAAgB,CAACH,IAAI,CAAE,CAACJ,QAAQ,CAAEA,QAAS,CAACC,MAAM,CAAEA,MAAO,CAAE,CAAC,CACnF,CAAC,CAEK,IAAAO,YAAY,CAAGC,wBAAwB,CAACX,aAAa,CAAE,CAC3DY,WAAW,CAAEC,aAAa,CAACH,YAC7B,CAAC;;;;"}
@@ -1,18 +1,13 @@
1
1
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
2
  import { useListContext } from './ListContext.js';
3
- import '../Typography/BaseText/BaseText.native.js';
4
- import 'react';
5
- import '@babel/runtime/helpers/slicedToArray';
6
- import 'react-native';
7
- import '../../tokens/global/typography.js';
8
- import '../../tokens/global/motion.js';
9
- import '../BladeProvider/useTheme.js';
10
- import { jsx } from 'react/jsx-runtime';
3
+ import '../Typography/Heading/Heading.js';
11
4
  import { Text } from '../Typography/Text/Text.js';
12
5
  import '../Typography/Code/Code.js';
6
+ import '../Typography/Display/Display.js';
13
7
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
14
8
  import '@babel/runtime/helpers/defineProperty';
15
9
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
10
+ import { jsx } from 'react/jsx-runtime';
16
11
 
17
12
  var _excluded=["children","testID"];var _ListItemText=function _ListItemText(_ref){var children=_ref.children,testID=_ref.testID,props=_objectWithoutProperties(_ref,_excluded);var _useListContext=useListContext(),size=_useListContext.size;return jsx(Text,Object.assign({as:"span"},props,{size:size,children:children,testID:testID}));};var ListItemText=assignWithoutSideEffects(_ListItemText,{componentId:MetaConstants.ListItemText});
18
13
 
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemText.js","sources":["../../../../../src/components/List/ListItemText.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useListContext } from './ListContext';\nimport type { TextProps, TextVariant } from '~components/Typography';\nimport { Text } from '~components/Typography';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { MetaConstants } from '~utils/metaAttribute';\n\ntype ListItemTextProps = Omit<TextProps<{ variant: TextVariant }>, 'variant' | 'size'>;\n\nconst _ListItemText = ({ children, testID, ...props }: ListItemTextProps): ReactElement => {\n const { size } = useListContext();\n\n return <Text as=\"span\" {...props} size={size} children={children} testID={testID} />;\n};\n\nconst ListItemText = assignWithoutSideEffects(_ListItemText, {\n componentId: MetaConstants.ListItemText,\n});\n\nexport type { ListItemTextProps };\nexport { ListItemText };\n"],"names":["_ListItemText","_ref","children","testID","props","_objectWithoutProperties","_excluded","_useListContext","useListContext","size","_jsx","Text","Object","assign","as","ListItemText","assignWithoutSideEffects","componentId","MetaConstants"],"mappings":";;;;;;;;;;;;;;;;oCASA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAAwE,KAAlEC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,MAAM,CAAAF,IAAA,CAANE,MAAM,CAAKC,KAAK,CAAAC,wBAAA,CAAAJ,IAAA,CAAAK,SAAA,CACjD,CAAA,IAAAC,eAAA,CAAiBC,cAAc,EAAE,CAAzBC,IAAI,CAAAF,eAAA,CAAJE,IAAI,CAEZ,OAAOC,GAAA,CAACC,IAAI,CAAAC,MAAA,CAAAC,MAAA,CAACC,CAAAA,EAAE,CAAC,MAAM,CAAKV,CAAAA,KAAK,CAAEK,CAAAA,IAAI,CAAEA,IAAK,CAACP,QAAQ,CAAEA,QAAS,CAACC,MAAM,CAAEA,MAAO,CAAA,CAAE,CAAC,CACtF,CAAC,CAEK,IAAAY,YAAY,CAAGC,wBAAwB,CAAChB,aAAa,CAAE,CAC3DiB,WAAW,CAAEC,aAAa,CAACH,YAC7B,CAAC;;;;"}
1
+ {"version":3,"file":"ListItemText.js","sources":["../../../../../src/components/List/ListItemText.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { useListContext } from './ListContext';\nimport type { TextProps, TextVariant } from '~components/Typography';\nimport { Text } from '~components/Typography';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { MetaConstants } from '~utils/metaAttribute';\n\ntype ListItemTextProps = Omit<TextProps<{ variant: TextVariant }>, 'variant' | 'size'>;\n\nconst _ListItemText = ({ children, testID, ...props }: ListItemTextProps): ReactElement => {\n const { size } = useListContext();\n\n return <Text as=\"span\" {...props} size={size} children={children} testID={testID} />;\n};\n\nconst ListItemText = assignWithoutSideEffects(_ListItemText, {\n componentId: MetaConstants.ListItemText,\n});\n\nexport type { ListItemTextProps };\nexport { ListItemText };\n"],"names":["_ListItemText","_ref","children","testID","props","_objectWithoutProperties","_excluded","_useListContext","useListContext","size","_jsx","Text","Object","assign","as","ListItemText","assignWithoutSideEffects","componentId","MetaConstants"],"mappings":";;;;;;;;;;;oCASA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAAwE,KAAlEC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAEC,MAAM,CAAAF,IAAA,CAANE,MAAM,CAAKC,KAAK,CAAAC,wBAAA,CAAAJ,IAAA,CAAAK,SAAA,CACjD,CAAA,IAAAC,eAAA,CAAiBC,cAAc,EAAE,CAAzBC,IAAI,CAAAF,eAAA,CAAJE,IAAI,CAEZ,OAAOC,GAAA,CAACC,IAAI,CAAAC,MAAA,CAAAC,MAAA,CAACC,CAAAA,EAAE,CAAC,MAAM,CAAKV,CAAAA,KAAK,CAAEK,CAAAA,IAAI,CAAEA,IAAK,CAACP,QAAQ,CAAEA,QAAS,CAACC,MAAM,CAAEA,MAAO,CAAA,CAAE,CAAC,CACtF,CAAC,CAEK,IAAAY,YAAY,CAAGC,wBAAwB,CAAChB,aAAa,CAAE,CAC3DiB,WAAW,CAAEC,aAAa,CAACH,YAC7B,CAAC;;;;"}