@razorpay/blade 11.38.1 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (637) hide show
  1. package/build/lib/native/components/Accordion/Accordion.js +2 -2
  2. package/build/lib/native/components/Accordion/Accordion.js.map +1 -1
  3. package/build/lib/native/components/Accordion/AccordionButton.native.js +8 -10
  4. package/build/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
  5. package/build/lib/native/components/Accordion/AccordionItemBody.js +7 -8
  6. package/build/lib/native/components/Accordion/AccordionItemBody.js.map +1 -1
  7. package/build/lib/native/components/Accordion/AccordionItemHeader.js +3 -8
  8. package/build/lib/native/components/Accordion/AccordionItemHeader.js.map +1 -1
  9. package/build/lib/native/components/Accordion/commonStyles.js +1 -1
  10. package/build/lib/native/components/Accordion/commonStyles.js.map +1 -1
  11. package/build/lib/native/components/ActionList/ActionList.js +1 -1
  12. package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
  13. package/build/lib/native/components/ActionList/ActionListItem.js +9 -8
  14. package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
  15. package/build/lib/native/components/ActionList/ActionListNoResults.js +2 -1
  16. package/build/lib/native/components/ActionList/ActionListNoResults.js.map +1 -1
  17. package/build/lib/native/components/Alert/Alert.js +4 -3
  18. package/build/lib/native/components/Alert/Alert.js.map +1 -1
  19. package/build/lib/native/components/Amount/Amount.js +4 -2
  20. package/build/lib/native/components/Amount/Amount.js.map +1 -1
  21. package/build/lib/native/components/Badge/Badge.js +10 -9
  22. package/build/lib/native/components/Badge/Badge.js.map +1 -1
  23. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +11 -10
  24. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  25. package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +8 -6
  26. package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
  27. package/build/lib/native/components/BottomNav/BottomNav.native.js +4 -10
  28. package/build/lib/native/components/BottomNav/BottomNav.native.js.map +1 -1
  29. package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  30. package/build/lib/native/components/Box/Box.js +1 -1
  31. package/build/lib/native/components/Box/Box.js.map +1 -1
  32. package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
  33. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  34. package/build/lib/native/components/Card/Card.js +1 -1
  35. package/build/lib/native/components/Card/Card.js.map +1 -1
  36. package/build/lib/native/components/Card/CardFooter.js +4 -8
  37. package/build/lib/native/components/Card/CardFooter.js.map +1 -1
  38. package/build/lib/native/components/Card/CardHeader.js +5 -9
  39. package/build/lib/native/components/Card/CardHeader.js.map +1 -1
  40. package/build/lib/native/components/Card/CardRoot.native.js +1 -1
  41. package/build/lib/native/components/Card/CardRoot.native.js.map +1 -1
  42. package/build/lib/native/components/Carousel/Carousel.native.js +1 -1
  43. package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
  44. package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js +1 -1
  45. package/build/lib/native/components/Carousel/Indicators/StyledIndicatorButton.native.js.map +1 -1
  46. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  47. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  48. package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  49. package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  50. package/build/lib/native/components/Checkbox/Checkbox.js +6 -4
  51. package/build/lib/native/components/Checkbox/Checkbox.js.map +1 -1
  52. package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js +1 -1
  53. package/build/lib/native/components/Checkbox/CheckboxIcon/Fade.native.js.map +1 -1
  54. package/build/lib/native/components/Chip/Chip.js +5 -3
  55. package/build/lib/native/components/Chip/Chip.js.map +1 -1
  56. package/build/lib/native/components/Chip/ChipGroup.js +4 -3
  57. package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
  58. package/build/lib/native/components/Chip/chipTokens.js +1 -1
  59. package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
  60. package/build/lib/native/components/Collapsible/Collapsible.js +2 -2
  61. package/build/lib/native/components/Collapsible/Collapsible.js.map +1 -1
  62. package/build/lib/native/components/Collapsible/commonStyles.js +1 -1
  63. package/build/lib/native/components/Collapsible/commonStyles.js.map +1 -1
  64. package/build/lib/native/components/Counter/Counter.js +13 -12
  65. package/build/lib/native/components/Counter/Counter.js.map +1 -1
  66. package/build/lib/native/components/Divider/Divider.js +2 -2
  67. package/build/lib/native/components/Divider/Divider.js.map +1 -1
  68. package/build/lib/native/components/Drawer/Drawer.native.js +4 -10
  69. package/build/lib/native/components/Drawer/Drawer.native.js.map +1 -1
  70. package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js +4 -9
  71. package/build/lib/native/components/Drawer/DrawerSubcomponents.native.js.map +1 -1
  72. package/build/lib/native/components/Dropdown/Dropdown.js +2 -1
  73. package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
  74. package/build/lib/native/components/Fade/Fade.native.js +11 -0
  75. package/build/lib/native/components/Fade/Fade.native.js.map +1 -0
  76. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +3 -9
  77. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  78. package/build/lib/native/components/Form/FormLabel.js +10 -10
  79. package/build/lib/native/components/Icons/RayIcon/RayIcon.js +12 -0
  80. package/build/lib/native/components/Icons/RayIcon/RayIcon.js.map +1 -0
  81. package/build/lib/native/components/Indicator/Indicator.js +7 -6
  82. package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
  83. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
  84. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
  85. package/build/lib/native/components/Input/BaseInput/BaseInput.js +2 -1
  86. package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
  87. package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +3 -3
  88. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +8 -10
  89. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  90. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +9 -8
  91. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
  92. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +1 -1
  93. package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  94. package/build/lib/native/components/Link/BaseLink/BaseLink.js +1 -1
  95. package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
  96. package/build/lib/native/components/List/List.js +1 -1
  97. package/build/lib/native/components/List/List.js.map +1 -1
  98. package/build/lib/native/components/List/ListItem.js +8 -10
  99. package/build/lib/native/components/List/ListItem.js.map +1 -1
  100. package/build/lib/native/components/List/ListItemCode.js +3 -9
  101. package/build/lib/native/components/List/ListItemCode.js.map +1 -1
  102. package/build/lib/native/components/List/ListItemText.js +3 -8
  103. package/build/lib/native/components/List/ListItemText.js.map +1 -1
  104. package/build/lib/native/components/Menu/Menu.native.js +4 -10
  105. package/build/lib/native/components/Menu/Menu.native.js.map +1 -1
  106. package/build/lib/native/components/Menu/MenuItem.native.js +4 -10
  107. package/build/lib/native/components/Menu/MenuItem.native.js.map +1 -1
  108. package/build/lib/native/components/Menu/MenuOverlay.native.js +4 -10
  109. package/build/lib/native/components/Menu/MenuOverlay.native.js.map +1 -1
  110. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js +4 -10
  111. package/build/lib/native/components/Menu/VisualSubComponents/MenuDivider.native.js.map +1 -1
  112. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js +4 -10
  113. package/build/lib/native/components/Menu/VisualSubComponents/MenuHeaderFooter.native.js.map +1 -1
  114. package/build/lib/native/components/Modal/Modal.native.js +4 -9
  115. package/build/lib/native/components/Modal/Modal.native.js.map +1 -1
  116. package/build/lib/native/components/Modal/ModalBody.native.js +3 -8
  117. package/build/lib/native/components/Modal/ModalBody.native.js.map +1 -1
  118. package/build/lib/native/components/Modal/ModalFooter.native.js +3 -8
  119. package/build/lib/native/components/Modal/ModalFooter.native.js.map +1 -1
  120. package/build/lib/native/components/Modal/ModalHeader.native.js +3 -8
  121. package/build/lib/native/components/Modal/ModalHeader.native.js.map +1 -1
  122. package/build/lib/native/components/Morph/Morph.native.js +11 -0
  123. package/build/lib/native/components/Morph/Morph.native.js.map +1 -0
  124. package/build/lib/native/components/Move/Move.native.js +11 -0
  125. package/build/lib/native/components/Move/Move.native.js.map +1 -0
  126. package/build/lib/native/components/Popover/PopoverContent.js +6 -8
  127. package/build/lib/native/components/Popover/PopoverContent.js.map +1 -1
  128. package/build/lib/native/components/Popover/PopoverContentWrapper.native.js +1 -1
  129. package/build/lib/native/components/Popover/PopoverContentWrapper.native.js.map +1 -1
  130. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js +7 -9
  131. package/build/lib/native/components/ProgressBar/CircularProgressBar.native.js.map +1 -1
  132. package/build/lib/native/components/ProgressBar/CircularProgressLabel.js +3 -8
  133. package/build/lib/native/components/ProgressBar/CircularProgressLabel.js.map +1 -1
  134. package/build/lib/native/components/ProgressBar/ProgressBar.js +2 -2
  135. package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
  136. package/build/lib/native/components/Radio/Radio.js +2 -1
  137. package/build/lib/native/components/Radio/Radio.js.map +1 -1
  138. package/build/lib/native/components/Radio/RadioIcon/Fade.native.js +1 -1
  139. package/build/lib/native/components/Radio/RadioIcon/Fade.native.js.map +1 -1
  140. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  141. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  142. package/build/lib/native/components/Scale/Scale.native.js +11 -0
  143. package/build/lib/native/components/Scale/Scale.native.js.map +1 -0
  144. package/build/lib/native/components/SideNav/SideNav.native.js +4 -10
  145. package/build/lib/native/components/SideNav/SideNav.native.js.map +1 -1
  146. package/build/lib/native/components/SideNav/SideNavBody.native.js +4 -10
  147. package/build/lib/native/components/SideNav/SideNavBody.native.js.map +1 -1
  148. package/build/lib/native/components/SideNav/SideNavFooter.native.js +4 -10
  149. package/build/lib/native/components/SideNav/SideNavFooter.native.js.map +1 -1
  150. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js +4 -10
  151. package/build/lib/native/components/SideNav/SideNavItems/SideNavItem.native.js.map +1 -1
  152. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js +4 -10
  153. package/build/lib/native/components/SideNav/SideNavItems/SideNavLink.native.js.map +1 -1
  154. package/build/lib/native/components/SideNav/SideNavLevel.native.js +4 -10
  155. package/build/lib/native/components/SideNav/SideNavLevel.native.js.map +1 -1
  156. package/build/lib/native/components/SideNav/SideNavSection.native.js +4 -10
  157. package/build/lib/native/components/SideNav/SideNavSection.native.js.map +1 -1
  158. package/build/lib/native/components/SideNav/tokens.js.map +1 -1
  159. package/build/lib/native/components/Skeleton/PulseAnimation.native.js +1 -1
  160. package/build/lib/native/components/Skeleton/PulseAnimation.native.js.map +1 -1
  161. package/build/lib/native/components/Skeleton/Skeleton.js +2 -2
  162. package/build/lib/native/components/Skeleton/Skeleton.js.map +1 -1
  163. package/build/lib/native/components/Slide/Slide.native.js +11 -0
  164. package/build/lib/native/components/Slide/Slide.native.js.map +1 -0
  165. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +4 -3
  166. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  167. package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  168. package/build/lib/native/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  169. package/build/lib/native/components/Spinner/Spinner/Spinner.js +2 -1
  170. package/build/lib/native/components/Spinner/Spinner/Spinner.js.map +1 -1
  171. package/build/lib/native/components/StepGroup/StepGroup.native.js +4 -10
  172. package/build/lib/native/components/StepGroup/StepGroup.native.js.map +1 -1
  173. package/build/lib/native/components/StepGroup/StepItem.native.js +4 -10
  174. package/build/lib/native/components/StepGroup/StepItem.native.js.map +1 -1
  175. package/build/lib/native/components/Switch/Switch.js +2 -1
  176. package/build/lib/native/components/Switch/Switch.js.map +1 -1
  177. package/build/lib/native/components/Switch/getTrackStyles.js +1 -1
  178. package/build/lib/native/components/Switch/getTrackStyles.js.map +1 -1
  179. package/build/lib/native/components/Switch/switchTokens.js +1 -1
  180. package/build/lib/native/components/Switch/switchTokens.js.map +1 -1
  181. package/build/lib/native/components/Table/Table.native.js +4 -9
  182. package/build/lib/native/components/Table/Table.native.js.map +1 -1
  183. package/build/lib/native/components/Table/TableBody.native.js +3 -8
  184. package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
  185. package/build/lib/native/components/Table/TableEditableCell.native.js +3 -9
  186. package/build/lib/native/components/Table/TableEditableCell.native.js.map +1 -1
  187. package/build/lib/native/components/Table/TableFooter.native.js +3 -8
  188. package/build/lib/native/components/Table/TableFooter.native.js.map +1 -1
  189. package/build/lib/native/components/Table/TableHeader.native.js +3 -8
  190. package/build/lib/native/components/Table/TableHeader.native.js.map +1 -1
  191. package/build/lib/native/components/Table/TablePagination.native.js +3 -8
  192. package/build/lib/native/components/Table/TablePagination.native.js.map +1 -1
  193. package/build/lib/native/components/Table/TableToolbar.native.js +3 -8
  194. package/build/lib/native/components/Table/TableToolbar.native.js.map +1 -1
  195. package/build/lib/native/components/Table/tokens.js.map +1 -1
  196. package/build/lib/native/components/Tabs/Tabs.native.js +6 -8
  197. package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
  198. package/build/lib/native/components/Tag/AnimatedTag.native.js +1 -1
  199. package/build/lib/native/components/Tag/AnimatedTag.native.js.map +1 -1
  200. package/build/lib/native/components/Tag/Tag.js +3 -2
  201. package/build/lib/native/components/Tag/Tag.js.map +1 -1
  202. package/build/lib/native/components/Tooltip/TooltipContent.js +8 -8
  203. package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js +1 -1
  204. package/build/lib/native/components/Tooltip/TooltipContentWrapper.native.js.map +1 -1
  205. package/build/lib/native/components/TopNav/TabNav/TabNav.native.js +4 -10
  206. package/build/lib/native/components/TopNav/TabNav/TabNav.native.js.map +1 -1
  207. package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js +4 -10
  208. package/build/lib/native/components/TopNav/TabNav/TabNavItem.native.js.map +1 -1
  209. package/build/lib/native/components/TopNav/TopNav.native.js +4 -10
  210. package/build/lib/native/components/TopNav/TopNav.native.js.map +1 -1
  211. package/build/lib/native/components/Typography/Code/Code.js +1 -1
  212. package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
  213. package/build/lib/native/components/Typography/Display/Display.js +2 -2
  214. package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
  215. package/build/lib/native/components/Typography/Heading/Heading.js +2 -2
  216. package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
  217. package/build/lib/native/components/Typography/Text/Text.js +2 -2
  218. package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
  219. package/build/lib/native/components/index.js +6 -0
  220. package/build/lib/native/components/index.js.map +1 -1
  221. package/build/lib/native/tokens/global/motion.js +1 -1
  222. package/build/lib/native/tokens/global/motion.js.map +1 -1
  223. package/build/lib/native/utils/getMotionRefs.js +4 -0
  224. package/build/lib/native/utils/getMotionRefs.js.map +1 -0
  225. package/build/lib/web/development/components/Accordion/Accordion.js +6 -3
  226. package/build/lib/web/development/components/Accordion/Accordion.js.map +1 -1
  227. package/build/lib/web/development/components/Accordion/commonStyles.js +1 -1
  228. package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
  229. package/build/lib/web/development/components/ActionList/ActionList.js +3 -0
  230. package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
  231. package/build/lib/web/development/components/Alert/Alert.js +6 -3
  232. package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
  233. package/build/lib/web/development/components/Amount/Amount.js +3 -2
  234. package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
  235. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
  236. package/build/lib/web/development/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
  237. package/build/lib/web/development/components/Badge/Badge.js +4 -2
  238. package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
  239. package/build/lib/web/development/components/BaseMotion/BaseMotion.js +123 -0
  240. package/build/lib/web/development/components/BaseMotion/BaseMotion.js.map +1 -0
  241. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js +60 -0
  242. package/build/lib/web/development/components/BaseMotion/baseMotionUtils.js.map +1 -0
  243. package/build/lib/web/development/components/BaseMotion/index.js +3 -0
  244. package/build/lib/web/development/components/BaseMotion/index.js.map +1 -0
  245. package/build/lib/web/development/components/BaseMotion/types.js +2 -0
  246. package/build/lib/web/development/components/BaseMotion/types.js.map +1 -0
  247. package/build/lib/web/development/components/BottomNav/BottomNav.web.js +4 -2
  248. package/build/lib/web/development/components/BottomNav/BottomNav.web.js.map +1 -1
  249. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +1 -1
  250. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
  251. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
  252. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  253. package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  254. package/build/lib/web/development/components/Box/Box.js +2 -2
  255. package/build/lib/web/development/components/Box/Box.js.map +1 -1
  256. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js +3 -1
  257. package/build/lib/web/development/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  258. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +1 -1
  259. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  260. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +1 -1
  261. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  262. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +3 -2
  263. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  264. package/build/lib/web/development/components/Card/Card.js +3 -1
  265. package/build/lib/web/development/components/Card/Card.js.map +1 -1
  266. package/build/lib/web/development/components/Card/CardRoot.web.js +6 -4
  267. package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
  268. package/build/lib/web/development/components/Carousel/Carousel.web.js +6 -3
  269. package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
  270. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  271. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  272. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  273. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  274. package/build/lib/web/development/components/Checkbox/Checkbox.js +13 -3
  275. package/build/lib/web/development/components/Checkbox/Checkbox.js.map +1 -1
  276. package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
  277. package/build/lib/web/development/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
  278. package/build/lib/web/development/components/Chip/Chip.js +11 -2
  279. package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
  280. package/build/lib/web/development/components/Chip/ChipGroup.js +5 -2
  281. package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
  282. package/build/lib/web/development/components/Chip/chipTokens.js +1 -1
  283. package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
  284. package/build/lib/web/development/components/Collapsible/Collapsible.js +6 -3
  285. package/build/lib/web/development/components/Collapsible/Collapsible.js.map +1 -1
  286. package/build/lib/web/development/components/Collapsible/commonStyles.js +2 -2
  287. package/build/lib/web/development/components/Collapsible/commonStyles.js.map +1 -1
  288. package/build/lib/web/development/components/Counter/Counter.js +4 -2
  289. package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
  290. package/build/lib/web/development/components/Divider/Divider.js +4 -2
  291. package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
  292. package/build/lib/web/development/components/Drawer/Drawer.web.js +4 -4
  293. package/build/lib/web/development/components/Drawer/Drawer.web.js.map +1 -1
  294. package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -3
  295. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  296. package/build/lib/web/development/components/Fade/Fade.web.js +62 -0
  297. package/build/lib/web/development/components/Fade/Fade.web.js.map +1 -0
  298. package/build/lib/web/development/components/Fade/index.js +2 -0
  299. package/build/lib/web/development/components/Fade/index.js.map +1 -0
  300. package/build/lib/web/development/components/FileUpload/FileUpload.web.js +11 -2
  301. package/build/lib/web/development/components/FileUpload/FileUpload.web.js.map +1 -1
  302. package/build/lib/web/development/components/FileUpload/fileUploadTokens.js +1 -1
  303. package/build/lib/web/development/components/FileUpload/fileUploadTokens.js.map +1 -1
  304. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +1 -1
  305. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
  306. package/build/lib/web/development/components/Icons/RayIcon/RayIcon.js +37 -0
  307. package/build/lib/web/development/components/Icons/RayIcon/RayIcon.js.map +1 -0
  308. package/build/lib/web/development/components/Icons/RayIcon/index.js +2 -0
  309. package/build/lib/web/development/components/Icons/RayIcon/index.js.map +1 -0
  310. package/build/lib/web/development/components/Icons/index.js +1 -0
  311. package/build/lib/web/development/components/Icons/index.js.map +1 -1
  312. package/build/lib/web/development/components/Indicator/Indicator.js +4 -2
  313. package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
  314. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  315. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  316. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +21 -7
  317. package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
  318. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +2 -2
  319. package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  320. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +1 -1
  321. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
  322. package/build/lib/web/development/components/List/List.js +5 -3
  323. package/build/lib/web/development/components/List/List.js.map +1 -1
  324. package/build/lib/web/development/components/Modal/Modal.web.js +2 -2
  325. package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
  326. package/build/lib/web/development/components/Modal/ModalBackdrop.js +2 -2
  327. package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
  328. package/build/lib/web/development/components/Morph/Morph.web.js +48 -0
  329. package/build/lib/web/development/components/Morph/Morph.web.js.map +1 -0
  330. package/build/lib/web/development/components/Morph/index.js +2 -0
  331. package/build/lib/web/development/components/Morph/index.js.map +1 -0
  332. package/build/lib/web/development/components/Move/Move.web.js +66 -0
  333. package/build/lib/web/development/components/Move/Move.web.js.map +1 -0
  334. package/build/lib/web/development/components/Move/index.js +2 -0
  335. package/build/lib/web/development/components/Move/index.js.map +1 -0
  336. package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js +1 -1
  337. package/build/lib/web/development/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
  338. package/build/lib/web/development/components/ProgressBar/ProgressBar.js +8 -4
  339. package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
  340. package/build/lib/web/development/components/Radio/Radio.js +13 -3
  341. package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
  342. package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js +3 -3
  343. package/build/lib/web/development/components/Radio/RadioIcon/Fade.web.js.map +1 -1
  344. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  345. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  346. package/build/lib/web/development/components/Scale/Scale.web.js +47 -0
  347. package/build/lib/web/development/components/Scale/Scale.web.js.map +1 -0
  348. package/build/lib/web/development/components/Scale/index.js +2 -0
  349. package/build/lib/web/development/components/Scale/index.js.map +1 -0
  350. package/build/lib/web/development/components/SideNav/SideNav.web.js +7 -5
  351. package/build/lib/web/development/components/SideNav/SideNav.web.js.map +1 -1
  352. package/build/lib/web/development/components/SideNav/tokens.js +1 -1
  353. package/build/lib/web/development/components/SideNav/tokens.js.map +1 -1
  354. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js +1 -1
  355. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js.map +1 -1
  356. package/build/lib/web/development/components/Skeleton/Skeleton.js +4 -1
  357. package/build/lib/web/development/components/Skeleton/Skeleton.js.map +1 -1
  358. package/build/lib/web/development/components/Slide/Slide.web.js +119 -0
  359. package/build/lib/web/development/components/Slide/Slide.web.js.map +1 -0
  360. package/build/lib/web/development/components/Slide/index.js +2 -0
  361. package/build/lib/web/development/components/Slide/index.js.map +1 -0
  362. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
  363. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  364. package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  365. package/build/lib/web/development/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  366. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +4 -1
  367. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
  368. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  369. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  370. package/build/lib/web/development/components/Stagger/StaggerProvider.js +13 -0
  371. package/build/lib/web/development/components/Stagger/StaggerProvider.js.map +1 -0
  372. package/build/lib/web/development/components/StepGroup/StepGroup.web.js +5 -3
  373. package/build/lib/web/development/components/StepGroup/StepGroup.web.js.map +1 -1
  374. package/build/lib/web/development/components/StepGroup/StepItem.web.js +1 -1
  375. package/build/lib/web/development/components/StepGroup/StepItem.web.js.map +1 -1
  376. package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js +1 -1
  377. package/build/lib/web/development/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
  378. package/build/lib/web/development/components/Switch/Switch.js +13 -3
  379. package/build/lib/web/development/components/Switch/Switch.js.map +1 -1
  380. package/build/lib/web/development/components/Switch/getTrackStyles.js +1 -1
  381. package/build/lib/web/development/components/Switch/getTrackStyles.js.map +1 -1
  382. package/build/lib/web/development/components/Switch/switchTokens.js +6 -6
  383. package/build/lib/web/development/components/Switch/switchTokens.js.map +1 -1
  384. package/build/lib/web/development/components/Table/Table.web.js +4 -2
  385. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  386. package/build/lib/web/development/components/Table/tokens.js +2 -2
  387. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  388. package/build/lib/web/development/components/Tabs/TabIndicator.web.js +1 -1
  389. package/build/lib/web/development/components/Tabs/TabIndicator.web.js.map +1 -1
  390. package/build/lib/web/development/components/Tabs/TabItem.web.js +2 -2
  391. package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
  392. package/build/lib/web/development/components/Tabs/Tabs.web.js +34 -1
  393. package/build/lib/web/development/components/Tabs/Tabs.web.js.map +1 -1
  394. package/build/lib/web/development/components/Tag/AnimatedTag.web.js +2 -2
  395. package/build/lib/web/development/components/Tag/AnimatedTag.web.js.map +1 -1
  396. package/build/lib/web/development/components/Tag/Tag.js +31 -29
  397. package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
  398. package/build/lib/web/development/components/Toast/Toast.web.js +2 -2
  399. package/build/lib/web/development/components/Toast/Toast.web.js.map +1 -1
  400. package/build/lib/web/development/components/Toast/ToastContainer.web.js +1 -1
  401. package/build/lib/web/development/components/Toast/ToastContainer.web.js.map +1 -1
  402. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  403. package/build/lib/web/development/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  404. package/build/lib/web/development/components/TopNav/TopNav.web.js +4 -2
  405. package/build/lib/web/development/components/TopNav/TopNav.web.js.map +1 -1
  406. package/build/lib/web/development/components/Typography/Code/Code.js +30 -27
  407. package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
  408. package/build/lib/web/development/components/Typography/Display/Display.js +6 -2
  409. package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
  410. package/build/lib/web/development/components/Typography/Heading/Heading.js +4 -1
  411. package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
  412. package/build/lib/web/development/components/Typography/Text/Text.js +6 -10
  413. package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
  414. package/build/lib/web/development/components/index.js +11 -0
  415. package/build/lib/web/development/components/index.js.map +1 -1
  416. package/build/lib/web/development/tokens/global/motion.js +22 -28
  417. package/build/lib/web/development/tokens/global/motion.js.map +1 -1
  418. package/build/lib/web/development/utils/cssBezierToArray.js +12 -0
  419. package/build/lib/web/development/utils/cssBezierToArray.js.map +1 -0
  420. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
  421. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  422. package/build/lib/web/development/utils/getMotionRefs.js +86 -0
  423. package/build/lib/web/development/utils/getMotionRefs.js.map +1 -0
  424. package/build/lib/web/development/utils/msToSeconds.js +6 -0
  425. package/build/lib/web/development/utils/msToSeconds.js.map +1 -0
  426. package/build/lib/web/production/components/Accordion/Accordion.js +6 -3
  427. package/build/lib/web/production/components/Accordion/Accordion.js.map +1 -1
  428. package/build/lib/web/production/components/Accordion/commonStyles.js +1 -1
  429. package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
  430. package/build/lib/web/production/components/ActionList/ActionList.js +3 -0
  431. package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
  432. package/build/lib/web/production/components/Alert/Alert.js +6 -3
  433. package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
  434. package/build/lib/web/production/components/Amount/Amount.js +3 -2
  435. package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
  436. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js +12 -0
  437. package/build/lib/web/production/components/AnimateInteractions/AnimateInteractionsProvider.js.map +1 -0
  438. package/build/lib/web/production/components/Badge/Badge.js +4 -2
  439. package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
  440. package/build/lib/web/production/components/BaseMotion/BaseMotion.js +123 -0
  441. package/build/lib/web/production/components/BaseMotion/BaseMotion.js.map +1 -0
  442. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js +60 -0
  443. package/build/lib/web/production/components/BaseMotion/baseMotionUtils.js.map +1 -0
  444. package/build/lib/web/production/components/BaseMotion/index.js +3 -0
  445. package/build/lib/web/production/components/BaseMotion/index.js.map +1 -0
  446. package/build/lib/web/production/components/BaseMotion/types.js +2 -0
  447. package/build/lib/web/production/components/BaseMotion/types.js.map +1 -0
  448. package/build/lib/web/production/components/BottomNav/BottomNav.web.js +4 -2
  449. package/build/lib/web/production/components/BottomNav/BottomNav.web.js.map +1 -1
  450. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +1 -1
  451. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
  452. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +1 -1
  453. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  454. package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  455. package/build/lib/web/production/components/Box/Box.js +2 -2
  456. package/build/lib/web/production/components/Box/Box.js.map +1 -1
  457. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js +3 -1
  458. package/build/lib/web/production/components/Breadcrumb/Breadcrumb.web.js.map +1 -1
  459. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +1 -1
  460. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  461. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +1 -1
  462. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  463. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +3 -2
  464. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -1
  465. package/build/lib/web/production/components/Card/Card.js +3 -1
  466. package/build/lib/web/production/components/Card/Card.js.map +1 -1
  467. package/build/lib/web/production/components/Card/CardRoot.web.js +6 -4
  468. package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
  469. package/build/lib/web/production/components/Carousel/Carousel.web.js +6 -3
  470. package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
  471. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +1 -1
  472. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  473. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +1 -1
  474. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  475. package/build/lib/web/production/components/Checkbox/Checkbox.js +13 -3
  476. package/build/lib/web/production/components/Checkbox/Checkbox.js.map +1 -1
  477. package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js +2 -2
  478. package/build/lib/web/production/components/Checkbox/CheckboxIcon/Fade.web.js.map +1 -1
  479. package/build/lib/web/production/components/Chip/Chip.js +11 -2
  480. package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
  481. package/build/lib/web/production/components/Chip/ChipGroup.js +5 -2
  482. package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
  483. package/build/lib/web/production/components/Chip/chipTokens.js +1 -1
  484. package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
  485. package/build/lib/web/production/components/Collapsible/Collapsible.js +6 -3
  486. package/build/lib/web/production/components/Collapsible/Collapsible.js.map +1 -1
  487. package/build/lib/web/production/components/Collapsible/commonStyles.js +2 -2
  488. package/build/lib/web/production/components/Collapsible/commonStyles.js.map +1 -1
  489. package/build/lib/web/production/components/Counter/Counter.js +4 -2
  490. package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
  491. package/build/lib/web/production/components/Divider/Divider.js +4 -2
  492. package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
  493. package/build/lib/web/production/components/Drawer/Drawer.web.js +4 -4
  494. package/build/lib/web/production/components/Drawer/Drawer.web.js.map +1 -1
  495. package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -3
  496. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  497. package/build/lib/web/production/components/Fade/Fade.web.js +62 -0
  498. package/build/lib/web/production/components/Fade/Fade.web.js.map +1 -0
  499. package/build/lib/web/production/components/Fade/index.js +2 -0
  500. package/build/lib/web/production/components/Fade/index.js.map +1 -0
  501. package/build/lib/web/production/components/FileUpload/FileUpload.web.js +11 -2
  502. package/build/lib/web/production/components/FileUpload/FileUpload.web.js.map +1 -1
  503. package/build/lib/web/production/components/FileUpload/fileUploadTokens.js +1 -1
  504. package/build/lib/web/production/components/FileUpload/fileUploadTokens.js.map +1 -1
  505. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +1 -1
  506. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
  507. package/build/lib/web/production/components/Icons/RayIcon/RayIcon.js +37 -0
  508. package/build/lib/web/production/components/Icons/RayIcon/RayIcon.js.map +1 -0
  509. package/build/lib/web/production/components/Icons/RayIcon/index.js +2 -0
  510. package/build/lib/web/production/components/Icons/RayIcon/index.js.map +1 -0
  511. package/build/lib/web/production/components/Icons/index.js +1 -0
  512. package/build/lib/web/production/components/Icons/index.js.map +1 -1
  513. package/build/lib/web/production/components/Indicator/Indicator.js +4 -2
  514. package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
  515. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  516. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  517. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +21 -7
  518. package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
  519. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +2 -2
  520. package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
  521. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +1 -1
  522. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
  523. package/build/lib/web/production/components/List/List.js +5 -3
  524. package/build/lib/web/production/components/List/List.js.map +1 -1
  525. package/build/lib/web/production/components/Modal/Modal.web.js +2 -2
  526. package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
  527. package/build/lib/web/production/components/Modal/ModalBackdrop.js +2 -2
  528. package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
  529. package/build/lib/web/production/components/Morph/Morph.web.js +48 -0
  530. package/build/lib/web/production/components/Morph/Morph.web.js.map +1 -0
  531. package/build/lib/web/production/components/Morph/index.js +2 -0
  532. package/build/lib/web/production/components/Morph/index.js.map +1 -0
  533. package/build/lib/web/production/components/Move/Move.web.js +66 -0
  534. package/build/lib/web/production/components/Move/Move.web.js.map +1 -0
  535. package/build/lib/web/production/components/Move/index.js +2 -0
  536. package/build/lib/web/production/components/Move/index.js.map +1 -0
  537. package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js +1 -1
  538. package/build/lib/web/production/components/ProgressBar/CircularProgressBar.web.js.map +1 -1
  539. package/build/lib/web/production/components/ProgressBar/ProgressBar.js +8 -4
  540. package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
  541. package/build/lib/web/production/components/Radio/Radio.js +13 -3
  542. package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
  543. package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js +3 -3
  544. package/build/lib/web/production/components/Radio/RadioIcon/Fade.web.js.map +1 -1
  545. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  546. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  547. package/build/lib/web/production/components/Scale/Scale.web.js +47 -0
  548. package/build/lib/web/production/components/Scale/Scale.web.js.map +1 -0
  549. package/build/lib/web/production/components/Scale/index.js +2 -0
  550. package/build/lib/web/production/components/Scale/index.js.map +1 -0
  551. package/build/lib/web/production/components/SideNav/SideNav.web.js +7 -5
  552. package/build/lib/web/production/components/SideNav/SideNav.web.js.map +1 -1
  553. package/build/lib/web/production/components/SideNav/tokens.js +1 -1
  554. package/build/lib/web/production/components/SideNav/tokens.js.map +1 -1
  555. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js +1 -1
  556. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js.map +1 -1
  557. package/build/lib/web/production/components/Skeleton/Skeleton.js +4 -1
  558. package/build/lib/web/production/components/Skeleton/Skeleton.js.map +1 -1
  559. package/build/lib/web/production/components/Slide/Slide.web.js +119 -0
  560. package/build/lib/web/production/components/Slide/Slide.web.js.map +1 -0
  561. package/build/lib/web/production/components/Slide/index.js +2 -0
  562. package/build/lib/web/production/components/Slide/index.js.map +1 -0
  563. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +6 -3
  564. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  565. package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js +1 -1
  566. package/build/lib/web/production/components/Spinner/BaseSpinner/spinnerTokens.js.map +1 -1
  567. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +4 -1
  568. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
  569. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  570. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  571. package/build/lib/web/production/components/Stagger/StaggerProvider.js +13 -0
  572. package/build/lib/web/production/components/Stagger/StaggerProvider.js.map +1 -0
  573. package/build/lib/web/production/components/StepGroup/StepGroup.web.js +5 -3
  574. package/build/lib/web/production/components/StepGroup/StepGroup.web.js.map +1 -1
  575. package/build/lib/web/production/components/StepGroup/StepItem.web.js +1 -1
  576. package/build/lib/web/production/components/StepGroup/StepItem.web.js.map +1 -1
  577. package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js +1 -1
  578. package/build/lib/web/production/components/Switch/AnimatedThumbIcon.web.js.map +1 -1
  579. package/build/lib/web/production/components/Switch/Switch.js +13 -3
  580. package/build/lib/web/production/components/Switch/Switch.js.map +1 -1
  581. package/build/lib/web/production/components/Switch/getTrackStyles.js +1 -1
  582. package/build/lib/web/production/components/Switch/getTrackStyles.js.map +1 -1
  583. package/build/lib/web/production/components/Switch/switchTokens.js +6 -6
  584. package/build/lib/web/production/components/Switch/switchTokens.js.map +1 -1
  585. package/build/lib/web/production/components/Table/Table.web.js +4 -2
  586. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  587. package/build/lib/web/production/components/Table/tokens.js +2 -2
  588. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  589. package/build/lib/web/production/components/Tabs/TabIndicator.web.js +1 -1
  590. package/build/lib/web/production/components/Tabs/TabIndicator.web.js.map +1 -1
  591. package/build/lib/web/production/components/Tabs/TabItem.web.js +2 -2
  592. package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
  593. package/build/lib/web/production/components/Tabs/Tabs.web.js +34 -1
  594. package/build/lib/web/production/components/Tabs/Tabs.web.js.map +1 -1
  595. package/build/lib/web/production/components/Tag/AnimatedTag.web.js +2 -2
  596. package/build/lib/web/production/components/Tag/AnimatedTag.web.js.map +1 -1
  597. package/build/lib/web/production/components/Tag/Tag.js +31 -29
  598. package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
  599. package/build/lib/web/production/components/Toast/Toast.web.js +2 -2
  600. package/build/lib/web/production/components/Toast/Toast.web.js.map +1 -1
  601. package/build/lib/web/production/components/Toast/ToastContainer.web.js +1 -1
  602. package/build/lib/web/production/components/Toast/ToastContainer.web.js.map +1 -1
  603. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js +2 -2
  604. package/build/lib/web/production/components/TopNav/TabNav/TabNavItem.web.js.map +1 -1
  605. package/build/lib/web/production/components/TopNav/TopNav.web.js +4 -2
  606. package/build/lib/web/production/components/TopNav/TopNav.web.js.map +1 -1
  607. package/build/lib/web/production/components/Typography/Code/Code.js +30 -27
  608. package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
  609. package/build/lib/web/production/components/Typography/Display/Display.js +6 -2
  610. package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
  611. package/build/lib/web/production/components/Typography/Heading/Heading.js +4 -1
  612. package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
  613. package/build/lib/web/production/components/Typography/Text/Text.js +6 -10
  614. package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
  615. package/build/lib/web/production/components/index.js +11 -0
  616. package/build/lib/web/production/components/index.js.map +1 -1
  617. package/build/lib/web/production/tokens/global/motion.js +22 -28
  618. package/build/lib/web/production/tokens/global/motion.js.map +1 -1
  619. package/build/lib/web/production/utils/cssBezierToArray.js +12 -0
  620. package/build/lib/web/production/utils/cssBezierToArray.js.map +1 -0
  621. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +1 -1
  622. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -1
  623. package/build/lib/web/production/utils/getMotionRefs.js +86 -0
  624. package/build/lib/web/production/utils/getMotionRefs.js.map +1 -0
  625. package/build/lib/web/production/utils/msToSeconds.js +6 -0
  626. package/build/lib/web/production/utils/msToSeconds.js.map +1 -0
  627. package/build/types/components/index.d.ts +17969 -5488
  628. package/build/types/components/index.native.d.ts +7924 -2157
  629. package/build/types/tokens/index.d.ts +103 -93
  630. package/build/types/tokens/index.native.d.ts +103 -93
  631. package/build/types/utils/index.d.ts +84 -71
  632. package/build/types/utils/index.native.d.ts +84 -71
  633. package/codemods/migrate-motion-tokens/transformers/__tests__/migrate-motion-tokens.test.ts +130 -0
  634. package/codemods/migrate-motion-tokens/transformers/index.ts +1 -0
  635. package/codemods/migrate-motion-tokens/transformers/migrate-motion.ts +24 -0
  636. package/codemods/migrate-motion-tokens/transformers/motionTokenMapping.json +11 -0
  637. package/package.json +3 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.js","sources":["../../../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import React from 'react';\nimport { useChipGroupContext } from './ChipGroupContext';\nimport {\n chipIconSizes,\n chipTextSizes,\n chipColorTokens,\n getChipInputHoverTokens,\n chipHeightTokens,\n chipHorizontalPaddingTokens,\n} from './chipTokens';\nimport type { ChipProps } from './types';\nimport { AnimatedChip } from './AnimatedChip';\nimport { StyledChipWrapper } from './StyledChipWrapper';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport BaseBox from '~components/Box/BaseBox';\nimport { SelectorLabel } from '~components/Form/Selector/SelectorLabel';\nimport { SelectorInput } from '~components/Form/Selector/SelectorInput';\nimport type { BladeElementRef } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport { useCheckbox } from '~components/Checkbox/useCheckbox';\nimport { useRadio } from '~components/Radio/useRadio';\nimport { isReactNative, makeSize, useBreakpoint } from '~utils';\nimport { Text } from '~components/Typography';\nimport { useTheme } from '~components/BladeProvider';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype OnChange = ({\n isChecked,\n event,\n value,\n}: {\n isChecked: boolean;\n event?: React.ChangeEvent;\n value?: string;\n}) => void;\n\nconst _Chip: React.ForwardRefRenderFunction<BladeElementRef, ChipProps> = (\n { isDisabled, value, children, icon: Icon, color, testID, ...rest },\n ref,\n) => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const groupProps = useChipGroupContext();\n const isInsideGroup = !isEmpty(groupProps);\n const [isPressed, setIsPressed] = React.useState(false);\n\n if (__DEV__) {\n if (!isInsideGroup) {\n throwBladeError({\n moduleName: 'Chip',\n message:\n '<Chip /> component should only be used within the context of a <ChipGroup /> component',\n });\n }\n }\n\n const hasError = groupProps?.validationState === 'error';\n const _isDisabled = isDisabled ?? groupProps?.isDisabled;\n const _isRequired = groupProps?.isRequired || groupProps?.necessityIndicator === 'required';\n const _name = groupProps?.name;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const _isChecked = groupProps?.state?.isChecked(value!);\n // Check if the defaultValue property of groupProps is undefined\n const defaultChecked =\n typeof groupProps?.defaultValue === 'undefined'\n ? undefined // If undefined, defaultChecked is also undefined\n : groupProps?.defaultValue?.includes(value as string); // If multiple selection, check if value is in defaultValue array\n const useChip = groupProps?.selectionType === 'single' ? useRadio : useCheckbox;\n const _size = groupProps?.size || 'small';\n const chipColor = color ?? groupProps?.color ?? 'primary';\n\n const handleChange: OnChange = ({ isChecked, value }) => {\n if (isChecked) {\n groupProps?.state?.addValue(value!);\n } else {\n groupProps?.state?.removeValue(value!);\n }\n };\n\n const { state, inputProps } = useChip({\n defaultChecked,\n isChecked: _isChecked,\n isDisabled: _isDisabled,\n isRequired: _isRequired,\n hasError,\n name: _name,\n value,\n onChange: handleChange,\n });\n\n const handlePointerPressedIn = React.useCallback(() => {\n if (_isDisabled) return;\n setIsPressed(true);\n }, [_isDisabled]);\n\n const handlePointerPressedOut = React.useCallback(() => {\n if (_isDisabled) return;\n setIsPressed(false);\n }, [_isDisabled]);\n\n const handleKeyboardPressedIn = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (_isDisabled) return;\n if (e.key === ' ') {\n setIsPressed(true);\n }\n },\n [_isDisabled],\n );\n\n const handleKeyboardPressedOut = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (_isDisabled) return;\n if (e.key === ' ') {\n setIsPressed(false);\n }\n },\n [_isDisabled],\n );\n\n let textVariant = 'unchecked';\n if (_isChecked && chipColor) {\n textVariant = chipColor;\n }\n if (_isDisabled) {\n textVariant = 'disabled';\n }\n const chipTextColor = chipColorTokens.text[textVariant];\n const chipIconColor = chipColorTokens.icon[textVariant];\n\n let colorVariant = 'unchecked';\n const stateVariant = _isDisabled ? 'disabled' : 'default';\n if (_isChecked && chipColor) {\n colorVariant = chipColor;\n }\n const chipBackgroundColor = chipColorTokens.background[colorVariant][stateVariant];\n const chipBorderColor = chipColorTokens.border[colorVariant][stateVariant];\n\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.Chip, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n >\n <SelectorLabel\n componentName={MetaConstants.ChipLabel}\n onTouchStart={handlePointerPressedIn}\n onTouchEnd={handlePointerPressedOut}\n onMouseDown={handlePointerPressedIn}\n onMouseUp={handlePointerPressedOut}\n onMouseOut={handlePointerPressedOut}\n onKeyDown={handleKeyboardPressedIn}\n onKeyUp={handleKeyboardPressedOut}\n inputProps={isReactNative() ? inputProps : {}}\n style={{ cursor: _isDisabled ? 'not-allowed' : 'pointer' }}\n >\n <BaseBox display=\"flex\" flexDirection=\"column\">\n <BaseBox display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n <SelectorInput\n hoverTokens={getChipInputHoverTokens(chipColor)}\n isChecked={state.isChecked}\n isDisabled={_isDisabled}\n inputProps={inputProps}\n hasError={hasError}\n ref={ref}\n />\n <AnimatedChip\n borderColor={chipBorderColor}\n isDisabled={_isDisabled}\n isPressed={isPressed}\n isDesktop={matchedDeviceType === 'desktop'}\n >\n <StyledChipWrapper\n borderColor={chipBorderColor}\n isChecked={_isChecked}\n isDisabled={_isDisabled}\n color={chipColor}\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n overflow=\"hidden\"\n backgroundColor={chipBackgroundColor}\n borderRadius=\"max\"\n borderWidth={['xsmall', 'small'].includes(_size) ? 'thinner' : 'thin'}\n paddingLeft={\n chipHorizontalPaddingTokens[Boolean(Icon) ? 'withIcon' : 'withoutIcon'].left[\n _size\n ]\n }\n paddingRight={\n chipHorizontalPaddingTokens[Boolean(Icon) ? 'withIcon' : 'withoutIcon'].right[\n _size\n ]\n }\n height={makeSize(chipHeightTokens[_size])}\n >\n {Icon ? (\n <BaseBox paddingRight=\"spacing.3\" display=\"flex\">\n <Icon color={chipIconColor} size={chipIconSizes[_size]} />\n </BaseBox>\n ) : null}\n <Text {...chipTextSizes[_size]} truncateAfterLines={1} color={chipTextColor}>\n {children}\n </Text>\n </StyledChipWrapper>\n </AnimatedChip>\n </BaseBox>\n </BaseBox>\n </SelectorLabel>\n </BaseBox>\n );\n};\n\nconst Chip = assignWithoutSideEffects(React.forwardRef(_Chip), {\n displayName: 'Chip',\n});\n\nexport { Chip };\nexport type { ChipProps };\n"],"names":["_Chip","_ref","ref","_groupProps$state","_groupProps$defaultVa","_ref2","isDisabled","value","children","Icon","icon","color","testID","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","groupProps","useChipGroupContext","isInsideGroup","isEmpty","_React$useState","React","useState","_React$useState2","_slicedToArray","isPressed","setIsPressed","__DEV__","throwBladeError","moduleName","message","hasError","validationState","_isDisabled","_isRequired","isRequired","necessityIndicator","_name","name","_isChecked","state","isChecked","defaultChecked","defaultValue","undefined","includes","useChip","selectionType","useRadio","useCheckbox","_size","size","chipColor","handleChange","_ref3","_groupProps$state2","addValue","_groupProps$state3","removeValue","_useChip","onChange","inputProps","handlePointerPressedIn","useCallback","handlePointerPressedOut","handleKeyboardPressedIn","e","key","handleKeyboardPressedOut","textVariant","chipTextColor","chipColorTokens","text","chipIconColor","colorVariant","stateVariant","chipBackgroundColor","background","chipBorderColor","border","_jsx","BaseBox","Object","assign","metaAttribute","MetaConstants","Chip","getStyledProps","makeAnalyticsAttribute","display","isReactNative","SelectorLabel","componentName","ChipLabel","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","onMouseOut","onKeyDown","onKeyUp","style","cursor","flexDirection","_jsxs","alignItems","SelectorInput","hoverTokens","getChipInputHoverTokens","AnimatedChip","borderColor","isDesktop","StyledChipWrapper","justifyContent","overflow","backgroundColor","borderRadius","borderWidth","paddingLeft","chipHorizontalPaddingTokens","Boolean","left","paddingRight","right","height","makeSize","chipHeightTokens","chipIconSizes","Text","chipTextSizes","truncateAfterLines","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,MAAA,CAAA,OAAA,CAAA,QAAA,CAAA,CAuCA,IAAMA,KAAiE,CAAG,SAApEA,KAAiEA,CAAAC,IAAA,CAErEC,GAAG,CACA,CAAAC,IAAAA,iBAAA,CAAAC,qBAAA,CAAAC,KAAA,KAFDC,UAAU,CAAAL,IAAA,CAAVK,UAAU,CAAEC,KAAK,CAAAN,IAAA,CAALM,KAAK,CAAEC,QAAQ,CAAAP,IAAA,CAARO,QAAQ,CAAQC,IAAI,CAAAR,IAAA,CAAVS,IAAI,CAAQC,KAAK,CAAAV,IAAA,CAALU,KAAK,CAAEC,MAAM,CAAAX,IAAA,CAANW,MAAM,CAAK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W,CAAE,MACf,CAAC;;;;"}
1
+ {"version":3,"file":"Chip.js","sources":["../../../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import React from 'react';\nimport { useChipGroupContext } from './ChipGroupContext';\nimport {\n chipIconSizes,\n chipTextSizes,\n chipColorTokens,\n getChipInputHoverTokens,\n chipHeightTokens,\n chipHorizontalPaddingTokens,\n} from './chipTokens';\nimport type { ChipProps } from './types';\nimport { AnimatedChip } from './AnimatedChip';\nimport { StyledChipWrapper } from './StyledChipWrapper';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport BaseBox from '~components/Box/BaseBox';\nimport { SelectorLabel } from '~components/Form/Selector/SelectorLabel';\nimport { SelectorInput } from '~components/Form/Selector/SelectorInput';\nimport type { BladeElementRef } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { throwBladeError } from '~utils/logger';\nimport { useCheckbox } from '~components/Checkbox/useCheckbox';\nimport { useRadio } from '~components/Radio/useRadio';\nimport { isReactNative, makeSize, useBreakpoint } from '~utils';\nimport { Text } from '~components/Typography';\nimport { useTheme } from '~components/BladeProvider';\nimport { getInnerMotionRef, getOuterMotionRef } from '~utils/getMotionRefs';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype OnChange = ({\n isChecked,\n event,\n value,\n}: {\n isChecked: boolean;\n event?: React.ChangeEvent;\n value?: string;\n}) => void;\n\nconst _Chip: React.ForwardRefRenderFunction<BladeElementRef, ChipProps> = (\n { isDisabled, value, children, icon: Icon, color, testID, _motionMeta, ...rest },\n ref,\n) => {\n const { theme } = useTheme();\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const groupProps = useChipGroupContext();\n const isInsideGroup = !isEmpty(groupProps);\n const [isPressed, setIsPressed] = React.useState(false);\n\n if (__DEV__) {\n if (!isInsideGroup) {\n throwBladeError({\n moduleName: 'Chip',\n message:\n '<Chip /> component should only be used within the context of a <ChipGroup /> component',\n });\n }\n }\n\n const hasError = groupProps?.validationState === 'error';\n const _isDisabled = isDisabled ?? groupProps?.isDisabled;\n const _isRequired = groupProps?.isRequired || groupProps?.necessityIndicator === 'required';\n const _name = groupProps?.name;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n const _isChecked = groupProps?.state?.isChecked(value!);\n // Check if the defaultValue property of groupProps is undefined\n const defaultChecked =\n typeof groupProps?.defaultValue === 'undefined'\n ? undefined // If undefined, defaultChecked is also undefined\n : groupProps?.defaultValue?.includes(value as string); // If multiple selection, check if value is in defaultValue array\n const useChip = groupProps?.selectionType === 'single' ? useRadio : useCheckbox;\n const _size = groupProps?.size || 'small';\n const chipColor = color ?? groupProps?.color ?? 'primary';\n\n const handleChange: OnChange = ({ isChecked, value }) => {\n if (isChecked) {\n groupProps?.state?.addValue(value!);\n } else {\n groupProps?.state?.removeValue(value!);\n }\n };\n\n const { state, inputProps } = useChip({\n defaultChecked,\n isChecked: _isChecked,\n isDisabled: _isDisabled,\n isRequired: _isRequired,\n hasError,\n name: _name,\n value,\n onChange: handleChange,\n });\n\n const handlePointerPressedIn = React.useCallback(() => {\n if (_isDisabled) return;\n setIsPressed(true);\n }, [_isDisabled]);\n\n const handlePointerPressedOut = React.useCallback(() => {\n if (_isDisabled) return;\n setIsPressed(false);\n }, [_isDisabled]);\n\n const handleKeyboardPressedIn = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (_isDisabled) return;\n if (e.key === ' ') {\n setIsPressed(true);\n }\n },\n [_isDisabled],\n );\n\n const handleKeyboardPressedOut = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (_isDisabled) return;\n if (e.key === ' ') {\n setIsPressed(false);\n }\n },\n [_isDisabled],\n );\n\n let textVariant = 'unchecked';\n if (_isChecked && chipColor) {\n textVariant = chipColor;\n }\n if (_isDisabled) {\n textVariant = 'disabled';\n }\n const chipTextColor = chipColorTokens.text[textVariant];\n const chipIconColor = chipColorTokens.icon[textVariant];\n\n let colorVariant = 'unchecked';\n const stateVariant = _isDisabled ? 'disabled' : 'default';\n if (_isChecked && chipColor) {\n colorVariant = chipColor;\n }\n const chipBackgroundColor = chipColorTokens.background[colorVariant][stateVariant];\n const chipBorderColor = chipColorTokens.border[colorVariant][stateVariant];\n\n return (\n <BaseBox\n {...metaAttribute({ name: MetaConstants.Chip, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n ref={getOuterMotionRef({ _motionMeta, ref })}\n >\n <SelectorLabel\n componentName={MetaConstants.ChipLabel}\n onTouchStart={handlePointerPressedIn}\n onTouchEnd={handlePointerPressedOut}\n onMouseDown={handlePointerPressedIn}\n onMouseUp={handlePointerPressedOut}\n onMouseOut={handlePointerPressedOut}\n onKeyDown={handleKeyboardPressedIn}\n onKeyUp={handleKeyboardPressedOut}\n inputProps={isReactNative() ? inputProps : {}}\n style={{ cursor: _isDisabled ? 'not-allowed' : 'pointer' }}\n >\n <BaseBox display=\"flex\" flexDirection=\"column\">\n <BaseBox display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n <SelectorInput\n hoverTokens={getChipInputHoverTokens(chipColor)}\n isChecked={state.isChecked}\n isDisabled={_isDisabled}\n inputProps={inputProps}\n hasError={hasError}\n ref={getInnerMotionRef({ _motionMeta, ref })}\n />\n <AnimatedChip\n borderColor={chipBorderColor}\n isDisabled={_isDisabled}\n isPressed={isPressed}\n isDesktop={matchedDeviceType === 'desktop'}\n >\n <StyledChipWrapper\n borderColor={chipBorderColor}\n isChecked={_isChecked}\n isDisabled={_isDisabled}\n color={chipColor}\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n overflow=\"hidden\"\n backgroundColor={chipBackgroundColor}\n borderRadius=\"max\"\n borderWidth={['xsmall', 'small'].includes(_size) ? 'thinner' : 'thin'}\n paddingLeft={\n chipHorizontalPaddingTokens[Boolean(Icon) ? 'withIcon' : 'withoutIcon'].left[\n _size\n ]\n }\n paddingRight={\n chipHorizontalPaddingTokens[Boolean(Icon) ? 'withIcon' : 'withoutIcon'].right[\n _size\n ]\n }\n height={makeSize(chipHeightTokens[_size])}\n >\n {Icon ? (\n <BaseBox paddingRight=\"spacing.3\" display=\"flex\">\n <Icon color={chipIconColor} size={chipIconSizes[_size]} />\n </BaseBox>\n ) : null}\n <Text {...chipTextSizes[_size]} truncateAfterLines={1} color={chipTextColor}>\n {children}\n </Text>\n </StyledChipWrapper>\n </AnimatedChip>\n </BaseBox>\n </BaseBox>\n </SelectorLabel>\n </BaseBox>\n );\n};\n\nconst Chip = assignWithoutSideEffects(React.forwardRef(_Chip), {\n displayName: 'Chip',\n});\n\nexport { Chip };\nexport type { ChipProps };\n"],"names":["_Chip","_ref","ref","_groupProps$state","_groupProps$defaultVa","_ref2","isDisabled","value","children","Icon","icon","color","testID","_motionMeta","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","groupProps","useChipGroupContext","isInsideGroup","isEmpty","_React$useState","React","useState","_React$useState2","_slicedToArray","isPressed","setIsPressed","__DEV__","throwBladeError","moduleName","message","hasError","validationState","_isDisabled","_isRequired","isRequired","necessityIndicator","_name","name","_isChecked","state","isChecked","defaultChecked","defaultValue","undefined","includes","useChip","selectionType","useRadio","useCheckbox","_size","size","chipColor","handleChange","_ref3","_groupProps$state2","addValue","_groupProps$state3","removeValue","_useChip","onChange","inputProps","handlePointerPressedIn","useCallback","handlePointerPressedOut","handleKeyboardPressedIn","e","key","handleKeyboardPressedOut","textVariant","chipTextColor","chipColorTokens","text","chipIconColor","colorVariant","stateVariant","chipBackgroundColor","background","chipBorderColor","border","_jsx","BaseBox","Object","assign","metaAttribute","MetaConstants","Chip","getStyledProps","makeAnalyticsAttribute","display","isReactNative","getOuterMotionRef","SelectorLabel","componentName","ChipLabel","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","onMouseOut","onKeyDown","onKeyUp","style","cursor","flexDirection","_jsxs","alignItems","SelectorInput","hoverTokens","getChipInputHoverTokens","getInnerMotionRef","AnimatedChip","borderColor","isDesktop","StyledChipWrapper","justifyContent","overflow","backgroundColor","borderRadius","borderWidth","paddingLeft","chipHorizontalPaddingTokens","Boolean","left","paddingRight","right","height","makeSize","chipHeightTokens","chipIconSizes","Text","chipTextSizes","truncateAfterLines","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,YAAA,CAAA,OAAA,CAAA,UAAA,CAAA,MAAA,CAAA,OAAA,CAAA,QAAA,CAAA,aAAA,CAAA,CAwCA,IAAMA,KAAiE,CAAG,SAApEA,KAAiEA,CAAAC,IAAA,CAErEC,GAAG,CACA,KAAAC,iBAAA,CAAAC,qBAAA,CAAAC,KAAA,CAFD,IAAAC,UAAU,CAAAL,IAAA,CAAVK,UAAU,CAAEC,KAAK,CAAAN,IAAA,CAALM,KAAK,CAAEC,QAAQ,CAAAP,IAAA,CAARO,QAAQ,CAAQC,IAAI,CAAAR,IAAA,CAAVS,IAAI,CAAQC,KAAK,CAAAV,IAAA,CAALU,KAAK,CAAEC,MAAM,CAAAX,IAAA,CAANW,MAAM,CAAEC,WAAW,CAAAZ,IAAA,CAAXY,WAAW,CAAKC,IAAI,CAAAC,wBAAA,CAAAd,IAAA,CAAAe,SAAA,CAG9E,CAAA,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CACb,IAAAC,cAAA,CAA8BC,aAAa,CAAC,CAAEC,WAAW,CAAEH,KAAK,CAACG,WAAY,CAAC,CAAC,CAAvEC,iBAAiB,CAAAH,cAAA,CAAjBG,iBAAiB,CACzB,IAAMC,UAAU,CAAGC,mBAAmB,EAAE,CACxC,IAAMC,aAAa,CAAG,C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AC1E,QAAQ,CAACK,KAAK,CAAC,CAAG,SAAS,CAAG,MAAO,CACtEsE,WAAW,CACTC,2BAA2B,CAACC,OAAO,CAACzH,IAAI,CAAC,CAAG,UAAU,CAAG,aAAa,CAAC,CAAC0H,IAAI,CAC1EzE,KAAK,CAER,CACD0E,YAAY,CACVH,2BAA2B,CAACC,OAAO,CAACzH,IAAI,CAAC,CAAG,UAAU,CAAG,aAAa,CAAC,CAAC4H,KAAK,CAC3E3E,KAAK,CAER,CACD4E,MAAM,CAAEC,QAAQ,CAACC,gBAAgB,CAAC9E,KAAK,CAAC,CAAE,CAAAlD,QAAA,CAEzCC,CAAAA,IAAI,CACH+E,GAAA,CAACC,OAAO,CAAA,CAAC2C,YAAY,CAAC,WAAW,CAACnC,OAAO,CAAC,MAAM,CAAAzF,QAAA,CAC9CgF,GAAA,CAAC/E,IAAI,CAAA,CAACE,KAAK,CAAEsE,aAAc,CAACtB,IAAI,CAAE8E,aAAa,CAAC/E,KAAK,CAAE,CAAE,CAAC,CACnD,CAAC,CACR,IAAI,CACR8B,GAAA,CAACkD,IAAI,CAAAhD,MAAA,CAAAC,MAAA,CAAKgD,EAAAA,CAAAA,aAAa,CAACjF,KAAK,CAAC,CAAA,CAAEkF,kBAAkB,CAAE,CAAE,CAACjI,KAAK,CAAEmE,aAAc,CAAAtE,QAAA,CACzEA,QAAQ,CACL,CAAA,CAAC,CACU,CAAA,CAAC,CACR,CAAC,CACR,CAAA,CAAC,CACH,CAAC,CACG,CAAC,CAAA,CACT,CAAC,CAEd,CAAC,CAEK,IAAAsF,IAAI,CAAG+C,wBAAwB,CAAChH,cAAK,CAACiH,UAAU,CAAC9I,KAAK,CAAC,CAAE,CAC7D+I,WAAW,CAAE,MACf,CAAC;;;;"}
@@ -15,13 +15,14 @@ import '../../tokens/global/motion.js';
15
15
  import { throwBladeError } from '../../utils/logger/logger.js';
16
16
  import '../BladeProvider/useTheme.js';
17
17
  import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.native.js';
18
- import '../Typography/BaseText/BaseText.native.js';
19
- import { jsx, jsxs } from 'react/jsx-runtime';
18
+ import '../Typography/Heading/Heading.js';
20
19
  import { Text } from '../Typography/Text/Text.js';
21
20
  import '../Typography/Code/Code.js';
21
+ import '../Typography/Display/Display.js';
22
22
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
23
+ import { jsx, jsxs } from 'react/jsx-runtime';
23
24
 
24
- var _excluded=["accessibilityLabel","label","labelPosition","necessityIndicator","validationState","errorText","helpText","isRequired","children","isDisabled","name","defaultValue","onChange","value","size","color","testID","selectionType"];var ChipGroup=function ChipGroup(_ref){var accessibilityLabel=_ref.accessibilityLabel,label=_ref.label,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,_ref$necessityIndicat=_ref.necessityIndicator,necessityIndicator=_ref$necessityIndicat===void 0?'none':_ref$necessityIndicat,_ref$validationState=_ref.validationState,validationState=_ref$validationState===void 0?'none':_ref$validationState,errorText=_ref.errorText,helpText=_ref.helpText,_ref$isRequired=_ref.isRequired,isRequired=_ref$isRequired===void 0?false:_ref$isRequired,children=_ref.children,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,name=_ref.name,defaultValue=_ref.defaultValue,onChange=_ref.onChange,value=_ref.value,_ref$size=_ref.size,size=_ref$size===void 0?'small':_ref$size,_ref$color=_ref.color,color=_ref$color===void 0?'primary':_ref$color,testID=_ref.testID,_ref$selectionType=_ref.selectionType,selectionType=_ref$selectionType===void 0?'single':_ref$selectionType,rest=_objectWithoutProperties(_ref,_excluded);var _useChipGroup=useChipGroup({defaultValue:defaultValue,onChange:onChange,value:value,isDisabled:isDisabled,name:name,size:size,color:color,selectionType:selectionType,isRequired:isRequired,validationState:validationState,necessityIndicator:necessityIndicator}),contextValue=_useChipGroup.contextValue,ids=_useChipGroup.ids;var showError=validationState==='error'&&errorText;var showHelpText=!showError&&helpText;var accessibilityText=`${showError?errorText:''} ${showHelpText?helpText:''}`.trim();if(__DEV__){if(selectionType==='single'&&Array.isArray(defaultValue)){throwBladeError({moduleName:'ChipGroup',message:`When "selectionType" is "single", the "defaultValue" prop must be a string value, but an array was provided.`});}if(selectionType==='single'&&Array.isArray(value)){throwBladeError({moduleName:'ChipGroup',message:`When "selectionType" is "single", the "value" prop must be a string value, but an array was provided.`});}}return jsx(ChipGroupProvider,{value:contextValue,children:jsx(BaseBox,Object.assign({},getStyledProps(rest),{children:jsxs(SelectorGroupField,Object.assign({position:labelPosition,accessibilityRole:selectionType==='single'?'radiogroup':'group',labelledBy:ids.labelId,componentName:"chip-group",testID:testID},makeAnalyticsAttribute(rest),{children:[label?jsx(FormLabel,{as:"span",necessityIndicator:necessityIndicator,position:labelPosition,id:ids.labelId,accessibilityText:accessibilityText&&`,${accessibilityText}`,size:chipGroupLabelSizeTokens[size],children:label}):null,jsxs(BaseBox,{children:[jsx(VisuallyHidden,{children:jsx(Text,{children:accessibilityLabel})}),jsx(BaseBox,{display:"flex",flexDirection:"row",flexWrap:"wrap",children:React__default.Children.map(children,function(child,index){return jsx(BaseBox,{marginBottom:chipGroupGapTokens[size].bottom,marginRight:chipGroupGapTokens[size].right,children:child},index);})}),jsx(FormHint,{size:chipGroupLabelSizeTokens[size],type:validationState==='error'?'error':'help',errorText:errorText,helpText:helpText})]})]}))}))});};
25
+ var _excluded=["accessibilityLabel","label","labelPosition","necessityIndicator","validationState","errorText","helpText","isRequired","children","isDisabled","name","defaultValue","onChange","value","size","color","testID","selectionType"];var _ChipGroup=function _ChipGroup(_ref,ref){var accessibilityLabel=_ref.accessibilityLabel,label=_ref.label,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,_ref$necessityIndicat=_ref.necessityIndicator,necessityIndicator=_ref$necessityIndicat===void 0?'none':_ref$necessityIndicat,_ref$validationState=_ref.validationState,validationState=_ref$validationState===void 0?'none':_ref$validationState,errorText=_ref.errorText,helpText=_ref.helpText,_ref$isRequired=_ref.isRequired,isRequired=_ref$isRequired===void 0?false:_ref$isRequired,children=_ref.children,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,name=_ref.name,defaultValue=_ref.defaultValue,onChange=_ref.onChange,value=_ref.value,_ref$size=_ref.size,size=_ref$size===void 0?'small':_ref$size,_ref$color=_ref.color,color=_ref$color===void 0?'primary':_ref$color,testID=_ref.testID,_ref$selectionType=_ref.selectionType,selectionType=_ref$selectionType===void 0?'single':_ref$selectionType,rest=_objectWithoutProperties(_ref,_excluded);var _useChipGroup=useChipGroup({defaultValue:defaultValue,onChange:onChange,value:value,isDisabled:isDisabled,name:name,size:size,color:color,selectionType:selectionType,isRequired:isRequired,validationState:validationState,necessityIndicator:necessityIndicator}),contextValue=_useChipGroup.contextValue,ids=_useChipGroup.ids;var showError=validationState==='error'&&errorText;var showHelpText=!showError&&helpText;var accessibilityText=`${showError?errorText:''} ${showHelpText?helpText:''}`.trim();if(__DEV__){if(selectionType==='single'&&Array.isArray(defaultValue)){throwBladeError({moduleName:'ChipGroup',message:`When "selectionType" is "single", the "defaultValue" prop must be a string value, but an array was provided.`});}if(selectionType==='single'&&Array.isArray(value)){throwBladeError({moduleName:'ChipGroup',message:`When "selectionType" is "single", the "value" prop must be a string value, but an array was provided.`});}}return jsx(ChipGroupProvider,{value:contextValue,children:jsx(BaseBox,Object.assign({ref:ref},getStyledProps(rest),{children:jsxs(SelectorGroupField,Object.assign({position:labelPosition,accessibilityRole:selectionType==='single'?'radiogroup':'group',labelledBy:ids.labelId,componentName:"chip-group",testID:testID},makeAnalyticsAttribute(rest),{children:[label?jsx(FormLabel,{as:"span",necessityIndicator:necessityIndicator,position:labelPosition,id:ids.labelId,accessibilityText:accessibilityText&&`,${accessibilityText}`,size:chipGroupLabelSizeTokens[size],children:label}):null,jsxs(BaseBox,{children:[jsx(VisuallyHidden,{children:jsx(Text,{children:accessibilityLabel})}),jsx(BaseBox,{display:"flex",flexDirection:"row",flexWrap:"wrap",children:React__default.Children.map(children,function(child,index){return jsx(BaseBox,{marginBottom:chipGroupGapTokens[size].bottom,marginRight:chipGroupGapTokens[size].right,children:child},index);})}),jsx(FormHint,{size:chipGroupLabelSizeTokens[size],type:validationState==='error'?'error':'help',errorText:errorText,helpText:helpText})]})]}))}))});};var ChipGroup=React__default.forwardRef(_ChipGroup);
25
26
 
26
27
  export { ChipGroup };
27
28
  //# sourceMappingURL=ChipGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChipGroup.js","sources":["../../../../../src/components/Chip/ChipGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { chipGroupGapTokens, chipGroupLabelSizeTokens } from './chipTokens';\nimport { ChipGroupProvider } from './ChipGroupContext';\nimport { useChipGroup } from './useChipGroup';\nimport type { ChipGroupProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { FormHint, FormLabel } from '~components/Form';\nimport { SelectorGroupField } from '~components/Form/Selector/SelectorGroupField';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { VisuallyHidden } from '~components/VisuallyHidden';\nimport { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst ChipGroup = ({\n accessibilityLabel,\n label,\n labelPosition = 'top',\n necessityIndicator = 'none',\n validationState = 'none',\n errorText,\n helpText,\n isRequired = false,\n children,\n isDisabled = false,\n name,\n defaultValue,\n onChange,\n value,\n size = 'small',\n color = 'primary',\n testID,\n selectionType = 'single',\n ...rest\n}: ChipGroupProps): React.ReactElement => {\n const { contextValue, ids } = useChipGroup({\n defaultValue,\n onChange,\n value,\n isDisabled,\n name,\n size,\n color,\n selectionType,\n isRequired,\n validationState,\n necessityIndicator,\n });\n const showError = validationState === 'error' && errorText;\n const showHelpText = !showError && helpText;\n const accessibilityText = `${showError ? errorText : ''} ${showHelpText ? helpText : ''}`.trim();\n\n if (__DEV__) {\n if (selectionType === 'single' && Array.isArray(defaultValue)) {\n throwBladeError({\n moduleName: 'ChipGroup',\n message: `When \"selectionType\" is \"single\", the \"defaultValue\" prop must be a string value, but an array was provided.`,\n });\n }\n if (selectionType === 'single' && Array.isArray(value)) {\n throwBladeError({\n moduleName: 'ChipGroup',\n message: `When \"selectionType\" is \"single\", the \"value\" prop must be a string value, but an array was provided.`,\n });\n }\n }\n\n return (\n <ChipGroupProvider value={contextValue}>\n <BaseBox {...getStyledProps(rest)}>\n <SelectorGroupField\n position={labelPosition}\n accessibilityRole={selectionType === 'single' ? 'radiogroup' : 'group'}\n labelledBy={ids.labelId}\n componentName=\"chip-group\"\n testID={testID}\n {...makeAnalyticsAttribute(rest)}\n >\n {label ? (\n <FormLabel\n as=\"span\"\n necessityIndicator={necessityIndicator}\n position={labelPosition}\n id={ids.labelId}\n accessibilityText={accessibilityText && `,${accessibilityText}`}\n size={chipGroupLabelSizeTokens[size]}\n >\n {label}\n </FormLabel>\n ) : null}\n <BaseBox>\n <VisuallyHidden>\n <Text>{accessibilityLabel}</Text>\n </VisuallyHidden>\n <BaseBox display=\"flex\" flexDirection=\"row\" flexWrap=\"wrap\">\n {React.Children.map(children, (child, index) => {\n return (\n <BaseBox\n key={index}\n marginBottom={chipGroupGapTokens[size].bottom}\n marginRight={chipGroupGapTokens[size].right}\n >\n {child}\n </BaseBox>\n );\n })}\n </BaseBox>\n <FormHint\n size={chipGroupLabelSizeTokens[size]}\n type={validationState === 'error' ? 'error' : 'help'}\n errorText={errorText}\n helpText={helpText}\n />\n </BaseBox>\n </SelectorGroupField>\n </BaseBox>\n </ChipGroupProvider>\n );\n};\n\nexport { ChipGroup };\nexport type { ChipGroupProps };\n"],"names":["ChipGroup","_ref","accessibilityLabel","label","_ref$labelPosition","labelPosition","_ref$necessityIndicat","necessityIndicator","_ref$validationState","validationState","errorText","helpText","_ref$isRequired","isRequired","children","_ref$isDisabled","isDisabled","name","defaultValue","onChange","value","_ref$size","size","_ref$color","color","testID","_ref$selectionType","selectionType","rest","_objectWithoutProperties","_excluded","_useChipGroup","useChipGroup","contextValue","ids","showError","showHelpText","accessibilityText","trim","__DEV__","Array","isArray","throwBladeError","moduleName","message","_jsx","ChipGroupProvider","BaseBox","Object","assign","getStyledProps","_jsxs","SelectorGroupField","position","accessibilityRole","labelledBy","labelId","componentName","makeAnalyticsAttribute","FormLabel","as","id","chipGroupLabelSizeTokens","VisuallyHidden","Text","display","flexDirection","flexWrap","React","Children","map","child","index","marginBottom","chipGroupGapTokens","bottom","marginRight","right","FormHint","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,eAAA,CAAA,oBAAA,CAAA,iBAAA,CAAA,WAAA,CAAA,UAAA,CAAA,YAAA,CAAA,UAAA,CAAA,YAAA,CAAA,MAAA,CAAA,cAAA,CAAA,UAAA,CAAA,OAAA,CAAA,MAAA,CAAA,OAAA,CAAA,QAAA,CAAA,eAAA,CAAA,CAcM,IAAAA,SAAS,CAAG,SAAZA,SAASA,CAAAC,IAAA,CAoB2B,CAnBxC,IAAAC,kBAAkB,CAAAD,IAAA,CAAlBC,kBAAkB,CAClBC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAAAC,kBAAA,CAAAH,IAAA,CACLI,aAAa,CAAbA,aAAa,CAAAD,kBAAA,GAAG,KAAA,CAAA,CAAA,KAAK,CAAAA,kBAAA,CAAAE,qBAAA,CAAAL,IAAA,CACrBM,kBAAkB,CAAlBA,kBAAkB,CAAAD,qBAAA,GAAA,KAAA,CAAA,CAAG,MAAM,CAAAA,qBAAA,CAAAE,oBAAA,CAAAP,IAAA,CAC3BQ,eAAe,CAAfA,eAAe,CAAAD,oBAAA,GAAG,KAAA,CAAA,CAAA,MAAM,CAAAA,oBAAA,CACxBE,SAAS,CAAAT,IAAA,CAATS,SAAS,CACTC,QAAQ,CAAAV,IAAA,CAARU,QAAQ,CAAAC,e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ACO,CAAC,CAExB;;;;"}
1
+ {"version":3,"file":"ChipGroup.js","sources":["../../../../../src/components/Chip/ChipGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { chipGroupGapTokens, chipGroupLabelSizeTokens } from './chipTokens';\nimport { ChipGroupProvider } from './ChipGroupContext';\nimport { useChipGroup } from './useChipGroup';\nimport type { ChipGroupProps } from './types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { FormHint, FormLabel } from '~components/Form';\nimport { SelectorGroupField } from '~components/Form/Selector/SelectorGroupField';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { VisuallyHidden } from '~components/VisuallyHidden';\nimport { Text } from '~components/Typography';\nimport type { BladeElementRef } from '~utils/types';\nimport { throwBladeError } from '~utils/logger';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nconst _ChipGroup = (\n {\n accessibilityLabel,\n label,\n labelPosition = 'top',\n necessityIndicator = 'none',\n validationState = 'none',\n errorText,\n helpText,\n isRequired = false,\n children,\n isDisabled = false,\n name,\n defaultValue,\n onChange,\n value,\n size = 'small',\n color = 'primary',\n testID,\n selectionType = 'single',\n ...rest\n }: ChipGroupProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const { contextValue, ids } = useChipGroup({\n defaultValue,\n onChange,\n value,\n isDisabled,\n name,\n size,\n color,\n selectionType,\n isRequired,\n validationState,\n necessityIndicator,\n });\n const showError = validationState === 'error' && errorText;\n const showHelpText = !showError && helpText;\n const accessibilityText = `${showError ? errorText : ''} ${showHelpText ? helpText : ''}`.trim();\n\n if (__DEV__) {\n if (selectionType === 'single' && Array.isArray(defaultValue)) {\n throwBladeError({\n moduleName: 'ChipGroup',\n message: `When \"selectionType\" is \"single\", the \"defaultValue\" prop must be a string value, but an array was provided.`,\n });\n }\n if (selectionType === 'single' && Array.isArray(value)) {\n throwBladeError({\n moduleName: 'ChipGroup',\n message: `When \"selectionType\" is \"single\", the \"value\" prop must be a string value, but an array was provided.`,\n });\n }\n }\n\n return (\n <ChipGroupProvider value={contextValue}>\n <BaseBox ref={ref as never} {...getStyledProps(rest)}>\n <SelectorGroupField\n position={labelPosition}\n accessibilityRole={selectionType === 'single' ? 'radiogroup' : 'group'}\n labelledBy={ids.labelId}\n componentName=\"chip-group\"\n testID={testID}\n {...makeAnalyticsAttribute(rest)}\n >\n {label ? (\n <FormLabel\n as=\"span\"\n necessityIndicator={necessityIndicator}\n position={labelPosition}\n id={ids.labelId}\n accessibilityText={accessibilityText && `,${accessibilityText}`}\n size={chipGroupLabelSizeTokens[size]}\n >\n {label}\n </FormLabel>\n ) : null}\n <BaseBox>\n <VisuallyHidden>\n <Text>{accessibilityLabel}</Text>\n </VisuallyHidden>\n <BaseBox display=\"flex\" flexDirection=\"row\" flexWrap=\"wrap\">\n {React.Children.map(children, (child, index) => {\n return (\n <BaseBox\n key={index}\n marginBottom={chipGroupGapTokens[size].bottom}\n marginRight={chipGroupGapTokens[size].right}\n >\n {child}\n </BaseBox>\n );\n })}\n </BaseBox>\n <FormHint\n size={chipGroupLabelSizeTokens[size]}\n type={validationState === 'error' ? 'error' : 'help'}\n errorText={errorText}\n helpText={helpText}\n />\n </BaseBox>\n </SelectorGroupField>\n </BaseBox>\n </ChipGroupProvider>\n );\n};\n\nconst ChipGroup = React.forwardRef(_ChipGroup);\n\nexport { ChipGroup };\nexport type { ChipGroupProps };\n"],"names":["_ChipGroup","_ref","ref","accessibilityLabel","label","_ref$labelPosition","labelPosition","_ref$necessityIndicat","necessityIndicator","_ref$validationState","validationState","errorText","helpText","_ref$isRequired","isRequired","children","_ref$isDisabled","isDisabled","name","defaultValue","onChange","value","_ref$size","size","_ref$color","color","testID","_ref$selectionType","selectionType","rest","_objectWithoutProperties","_excluded","_useChipGroup","useChipGroup","contextValue","ids","showError","showHelpText","accessibilityText","trim","__DEV__","Array","isArray","throwBladeError","moduleName","message","_jsx","ChipGroupProvider","BaseBox","Object","assign","getStyledProps","_jsxs","SelectorGroupField","position","accessibilityRole","labelledBy","labelId","componentName","makeAnalyticsAttribute","FormLabel","as","id","chipGroupLabelSizeTokens","VisuallyHidden","Text","display","flexDirection","flexWrap","React","Children","map","child","index","marginBottom","chipGroupGapTokens","bottom","marginRight","right","FormHint","type","ChipGroup","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,eAAA,CAAA,oBAAA,CAAA,iBAAA,CAAA,WAAA,CAAA,UAAA,CAAA,YAAA,CAAA,UAAA,CAAA,YAAA,CAAA,MAAA,CAAA,cAAA,CAAA,UAAA,CAAA,OAAA,CAAA,MAAA,CAAA,OAAA,CAAA,QAAA,CAAA,eAAA,CAAA,CAeA,IAAMA,UAAU,CAAG,SAAbA,UAAUA,CAAAC,IAAA,CAsBdC,GAA+B,CACR,CArBrB,IAAAC,kBAAkB,CAAAF,IAAA,CAAlBE,kBAAkB,CAClBC,KAAK,CAAAH,IAAA,CAALG,KAAK,CAAAC,kBAAA,CAAAJ,IAAA,CACLK,aAAa,CAAbA,aAAa,CAAAD,kBAAA,GAAA,KAAA,CAAA,CAAG,KAAK,CAAAA,kBAAA,CAAAE,qBAAA,CAAAN,IAAA,CACrBO,kBAAkB,CAAlBA,kBAAkB,CAAAD,qBAAA,UAAG,MAAM,CAAAA,qBAAA,CAAAE,oBAAA,CAAAR,IAAA,CAC3BS,eAAe,CAAfA,eAAe,CAAAD,oBAAA,GAAA,KAAA,CAAA,CAAG,MAAM,CAAAA,oBAAA,CACxBE,SAAS,CAAAV,IAAA,CAATU,SAAS,CACTC,QAAQ,CAAAX,IAAA,CAARW,QAAQ,CAAAC,eAAA,CAAAZ,IAAA,CACRa,UAAU,CAAVA,UAAU,CAAAD,eAAA,GAAG,KAAA,CAAA,CAAA,KAAK,CAAAA,eAAA,CAClBE,QAAQ,CAAAd,IAAA,CAARc,QAAQ,CAAAC,eAAA,CAAAf,IAAA,CACRgB,UAAU,CAAVA,UAAU,CAAAD,e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,CAAA,CAAA,EAAGA,iBAAkB,CAAA,CAAE,CAChEf,IAAI,CAAEwC,wBAAwB,CAACxC,IAAI,CAAE,CAAAR,QAAA,CAEpCX,KAAK,CACG,CAAC,CACV,IAAI,CACRgD,IAAA,CAACJ,OAAO,CAAAjC,CAAAA,QAAA,EACN+B,GAAA,CAACkB,cAAc,CAAA,CAAAjD,QAAA,CACb+B,GAAA,CAACmB,IAAI,CAAA,CAAAlD,QAAA,CAAEZ,kBAAkB,CAAO,CAAC,CACnB,CAAC,CACjB2C,GAAA,CAACE,OAAO,CAACkB,CAAAA,OAAO,CAAC,MAAM,CAACC,aAAa,CAAC,KAAK,CAACC,QAAQ,CAAC,MAAM,CAAArD,QAAA,CACxDsD,cAAK,CAACC,QAAQ,CAACC,GAAG,CAACxD,QAAQ,CAAE,SAACyD,KAAK,CAAEC,KAAK,CAAK,CAC9C,OACE3B,GAAA,CAACE,OAAO,CAAA,CAEN0B,YAAY,CAAEC,kBAAkB,CAACpD,IAAI,CAAC,CAACqD,MAAO,CAC9CC,WAAW,CAAEF,kBAAkB,CAACpD,IAAI,CAAC,CAACuD,KAAM,CAAA/D,QAAA,CAE3CyD,KAAK,CAJDC,CAAAA,KAKE,CAAC,CAEd,CAAC,CAAC,CACK,CAAC,CACV3B,GAAA,CAACiC,QAAQ,EACPxD,IAAI,CAAEwC,wBAAwB,CAACxC,IAAI,CAAE,CACrCyD,IAAI,CAAEtE,eAAe,GAAK,OAAO,CAAG,OAAO,CAAG,MAAO,CACrDC,SAAS,CAAEA,SAAU,CACrBC,QAAQ,CAAEA,QAAS,CACpB,CAAC,EACK,CAAC,CAAA,CAAA,CACQ,CAAC,CAAA,CACd,CAAC,CACO,CAAC,CAExB,CAAC,CAEK,IAAAqE,SAAS,CAAGZ,cAAK,CAACa,UAAU,CAAClF,UAAU;;;;"}
@@ -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 chipGroupGapTokens={xsmall:{right:'spacing.3',bottom:'spacing.3'},small:{right:'spacing.3',bottom:'spacing.3'},medium:{right:'spacing.3',bottom:'spacing.4'},large:{right:'spacing.3',bottom:'spacing.4'}};var chipHeightTokens={xsmall:size[24],small:size[28],medium:size[36],large:size[48]};var chipGroupLabelSizeTokens={xsmall:'small',small:'medium',medium:'large',large:'large'};var chipHorizontalPaddingTokens={withoutIcon:{left:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'},right:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'}},withIcon:{left:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.5',large:'spacing.6'},right:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'}}};var chipColorTokens={text:{unchecked:'interactive.text.gray.subtle',disabled:'interactive.text.gray.disabled',primary:'interactive.text.primary.normal',positive:'interactive.text.positive.normal',negative:'interactive.text.negative.normal'},icon:{unchecked:'interactive.icon.gray.subtle',disabled:'interactive.icon.gray.disabled',primary:'interactive.icon.primary.normal',positive:'interactive.icon.positive.normal',negative:'interactive.icon.negative.normal'},background:{unchecked:{default:'surface.background.gray.intense',hover:'interactive.background.gray.faded',disabled:'transparent'},primary:{default:'interactive.background.primary.faded',hover:'interactive.background.primary.fadedHighlighted',disabled:'interactive.background.primary.disabled'},positive:{default:'interactive.background.positive.faded',hover:'interactive.background.positive.fadedHighlighted',disabled:'interactive.background.positive.disabled'},negative:{default:'interactive.background.negative.faded',hover:'interactive.background.negative.fadedHighlighted',disabled:'interactive.background.negative.disabled'}},border:{unchecked:{default:'interactive.border.gray.faded',hover:'interactive.border.gray.faded',disabled:'interactive.border.gray.disabled'},primary:{default:'interactive.border.primary.default',hover:'interactive.border.primary.default',disabled:'interactive.border.primary.disabled'},positive:{default:'interactive.border.positive.default',hover:'interactive.border.positive.default',disabled:'interactive.border.positive.disabled'},negative:{default:'interactive.border.negative.default',hover:'interactive.border.negative.default',disabled:'interactive.border.negative.disabled'}}};var getChipInputHoverTokens=function getChipInputHoverTokens(color){return {default:{background:{checked:'colors.transparent',unchecked:'colors.transparent'},border:{checked:`colors.${chipColorTokens.border[color||'default'].hover}`,unchecked:'colors.interactive.border.gray.faded'}}};};var chipIconSizes={xsmall:'small',small:'small',medium:'medium',large:'large'};var chipTextSizes={xsmall:{variant:'body',size:'small'},small:{variant:'body',size:'medium'},medium:{variant:'body',size:'large'},large:{variant:'body',size:'large'}};var chipMotionTokens={duration:'duration.xquick',easing:'easing.standard.effective'};
5
+ var chipGroupGapTokens={xsmall:{right:'spacing.3',bottom:'spacing.3'},small:{right:'spacing.3',bottom:'spacing.3'},medium:{right:'spacing.3',bottom:'spacing.4'},large:{right:'spacing.3',bottom:'spacing.4'}};var chipHeightTokens={xsmall:size[24],small:size[28],medium:size[36],large:size[48]};var chipGroupLabelSizeTokens={xsmall:'small',small:'medium',medium:'large',large:'large'};var chipHorizontalPaddingTokens={withoutIcon:{left:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'},right:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'}},withIcon:{left:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.5',large:'spacing.6'},right:{xsmall:'spacing.4',small:'spacing.4',medium:'spacing.6',large:'spacing.7'}}};var chipColorTokens={text:{unchecked:'interactive.text.gray.subtle',disabled:'interactive.text.gray.disabled',primary:'interactive.text.primary.normal',positive:'interactive.text.positive.normal',negative:'interactive.text.negative.normal'},icon:{unchecked:'interactive.icon.gray.subtle',disabled:'interactive.icon.gray.disabled',primary:'interactive.icon.primary.normal',positive:'interactive.icon.positive.normal',negative:'interactive.icon.negative.normal'},background:{unchecked:{default:'surface.background.gray.intense',hover:'interactive.background.gray.faded',disabled:'transparent'},primary:{default:'interactive.background.primary.faded',hover:'interactive.background.primary.fadedHighlighted',disabled:'interactive.background.primary.disabled'},positive:{default:'interactive.background.positive.faded',hover:'interactive.background.positive.fadedHighlighted',disabled:'interactive.background.positive.disabled'},negative:{default:'interactive.background.negative.faded',hover:'interactive.background.negative.fadedHighlighted',disabled:'interactive.background.negative.disabled'}},border:{unchecked:{default:'interactive.border.gray.faded',hover:'interactive.border.gray.faded',disabled:'interactive.border.gray.disabled'},primary:{default:'interactive.border.primary.default',hover:'interactive.border.primary.default',disabled:'interactive.border.primary.disabled'},positive:{default:'interactive.border.positive.default',hover:'interactive.border.positive.default',disabled:'interactive.border.positive.disabled'},negative:{default:'interactive.border.negative.default',hover:'interactive.border.negative.default',disabled:'interactive.border.negative.disabled'}}};var getChipInputHoverTokens=function getChipInputHoverTokens(color){return {default:{background:{checked:'colors.transparent',unchecked:'colors.transparent'},border:{checked:`colors.${chipColorTokens.border[color||'default'].hover}`,unchecked:'colors.interactive.border.gray.faded'}}};};var chipIconSizes={xsmall:'small',small:'small',medium:'medium',large:'large'};var chipTextSizes={xsmall:{variant:'body',size:'small'},small:{variant:'body',size:'medium'},medium:{variant:'body',size:'large'},large:{variant:'body',size:'large'}};var chipMotionTokens={duration:'duration.xquick',easing:'easing.standard'};
6
6
 
7
7
  export { chipColorTokens, chipGroupGapTokens, chipGroupLabelSizeTokens, chipHeightTokens, chipHorizontalPaddingTokens, chipIconSizes, chipMotionTokens, chipTextSizes, getChipInputHoverTokens };
8
8
  //# sourceMappingURL=chipTokens.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chipTokens.js","sources":["../../../../../src/components/Chip/chipTokens.ts"],"sourcesContent":["import type { ChipGroupProps } from './ChipGroup';\nimport type { ChipBorderColors, ChipBackgroundColors } from './types';\nimport type { DotNotationSpacingStringToken } from '~utils/types';\nimport type { SelectorInputHoverTokens } from '~components/Form/Selector/types';\nimport type { IconProps } from '~components/Icons';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport type { DurationString, EasingString } from '~tokens/global';\nimport { size } from '~tokens/global';\n\nconst chipGroupGapTokens = {\n xsmall: {\n right: 'spacing.3',\n bottom: 'spacing.3',\n },\n small: {\n right: 'spacing.3',\n bottom: 'spacing.3',\n },\n medium: {\n right: 'spacing.3',\n bottom: 'spacing.4',\n },\n large: {\n right: 'spacing.3',\n bottom: 'spacing.4',\n },\n} as const;\n\nconst chipHeightTokens: Record<NonNullable<ChipGroupProps['size']>, number> = {\n xsmall: size[24],\n small: size[28],\n medium: size[36],\n large: size[48],\n};\n\nconst chipGroupLabelSizeTokens = {\n xsmall: 'small',\n small: 'medium',\n medium: 'large',\n large: 'large',\n} as const;\n\ntype ChipHorizontalPaddingTokens = {\n withoutIcon: Record<\n 'left' | 'right',\n Record<NonNullable<ChipGroupProps['size']>, DotNotationSpacingStringToken>\n >;\n withIcon: Record<\n 'left' | 'right',\n Record<NonNullable<ChipGroupProps['size']>, DotNotationSpacingStringToken>\n >;\n};\n\nconst chipHorizontalPaddingTokens: ChipHorizontalPaddingTokens = {\n withoutIcon: {\n left: {\n xsmall: 'spacing.4',\n small: 'spacing.4',\n medium: 'spacing.6',\n large: 'spacing.7',\n },\n right: {\n xsmall: 'spacing.4',\n small: 'spacing.4',\n medium: 'spacing.6',\n large: 'spacing.7',\n },\n },\n withIcon: {\n left: {\n xsmall: 'spacing.4',\n small: 'spacing.4',\n medium: 'spacing.5',\n large: 'spacing.6',\n },\n right: {\n xsmall: 'spacing.4',\n small: 'spacing.4',\n medium: 'spacing.6',\n large: 'spacing.7',\n },\n },\n};\n\ntype TextColorTokens = BaseTextProps['color'];\ntype IconColorTokens = IconProps['color'];\ntype ChipColorTokens = {\n text: Record<string, TextColorTokens>;\n icon: Record<string, IconColorTokens>;\n background: Record<string, Record<string, ChipBackgroundColors>>;\n border: Record<string, Record<string, ChipBorderColors>>;\n};\n\nconst chipColorTokens: ChipColorTokens = {\n text: {\n unchecked: 'interactive.text.gray.subtle',\n disabled: 'interactive.text.gray.disabled',\n primary: 'interactive.text.primary.normal',\n positive: 'interactive.text.positive.normal',\n negative: 'interactive.text.negative.normal',\n },\n icon: {\n unchecked: 'interactive.icon.gray.subtle',\n disabled: 'interactive.icon.gray.disabled',\n primary: 'interactive.icon.primary.normal',\n positive: 'interactive.icon.positive.normal',\n negative: 'interactive.icon.negative.normal',\n },\n background: {\n unchecked: {\n default: 'surface.background.gray.intense',\n hover: 'interactive.background.gray.faded',\n disabled: 'transparent',\n },\n primary: {\n default: 'interactive.background.primary.faded',\n hover: 'interactive.background.primary.fadedHighlighted',\n disabled: 'interactive.background.primary.disabled',\n },\n positive: {\n default: 'interactive.background.positive.faded',\n hover: 'interactive.background.positive.fadedHighlighted',\n disabled: 'interactive.background.positive.disabled',\n },\n negative: {\n default: 'interactive.background.negative.faded',\n hover: 'interactive.background.negative.fadedHighlighted',\n disabled: 'interactive.background.negative.disabled',\n },\n },\n border: {\n unchecked: {\n default: 'interactive.border.gray.faded',\n hover: 'interactive.border.gray.faded',\n disabled: 'interactive.border.gray.disabled',\n },\n primary: {\n default: 'interactive.border.primary.default',\n hover: 'interactive.border.primary.default',\n disabled: 'interactive.border.primary.disabled',\n },\n positive: {\n default: 'interactive.border.positive.default',\n hover: 'interactive.border.positive.default',\n disabled: 'interactive.border.positive.disabled',\n },\n negative: {\n default: 'interactive.border.negative.default',\n hover: 'interactive.border.negative.default',\n disabled: 'interactive.border.negative.disabled',\n },\n },\n};\n\nconst getChipInputHoverTokens = (color: ChipGroupProps['color']): SelectorInputHoverTokens => {\n return {\n default: {\n background: {\n checked: 'colors.transparent',\n unchecked: 'colors.transparent',\n },\n border: {\n checked: `colors.${chipColorTokens.border[color || 'default'].hover}` as never,\n unchecked: 'colors.interactive.border.gray.faded',\n },\n },\n };\n};\n\nconst chipIconSizes: Record<NonNullable<ChipGroupProps['size']>, IconProps['size']> = {\n xsmall: 'small',\n small: 'small',\n medium: 'medium',\n large: 'large',\n};\n\nconst chipTextSizes = {\n xsmall: {\n variant: 'body',\n size: 'small',\n },\n small: {\n variant: 'body',\n size: 'medium',\n },\n medium: {\n variant: 'body',\n size: 'large',\n },\n large: {\n variant: 'body',\n size: 'large',\n },\n} as const;\n\nconst chipMotionTokens: Record<'duration' | 'easing', DurationString | EasingString> = {\n duration: 'duration.xquick',\n easing: 'easing.standard.effective',\n};\n\nexport {\n chipColorTokens,\n chipHeightTokens,\n chipGroupGapTokens,\n getChipInputHoverTokens,\n chipHorizontalPaddingTokens,\n chipTextSizes,\n chipIconSizes,\n chipMotionTokens,\n chipGroupLabelSizeTokens,\n};\n"],"names":["chipGroupGapTokens","xsmall","right","bottom","small","medium","large","chipHeightTokens","size","chipGroupLabelSizeTokens","chipHorizontalPaddingTokens","withoutIcon","left","withIcon","chipColorTokens","text","unchecked","disabled","primary","positive","negative","icon","background","default","hover","border","getChipInputHoverTokens","color","checked","chipIconSizes","chipTextSizes","variant","chipMotionTokens","duration","easing"],"mappings":";;;;AASM,IAAAA,kBAAkB,CAAG,CACzBC,MAAM,CAAE,CACNC,KAAK,CAAE,WAAW,CAClBC,MAAM,CAAE,WACV,CAAC,CACDC,KAAK,CAAE,CACLF,KAAK,CAAE,WAAW,CAClBC,MAAM,CAAE,WACV,CAAC,CACDE,MAAM,CAAE,CACNH,KAAK,CAAE,WAAW,CAClBC,MAAM,CAAE,WACV,CAAC,CACDG,KAAK,CAAE,CACLJ,KAAK,CAAE,WAAW,CAClBC,MAAM,CAAE,WACV,CACF,EAEM,IAAAI,gBAAqE,CAAG,CAC5EN,MAAM,CAAEO,IAAI,CAAC,EAAE,CAAC,CAChBJ,KAAK,CAAEI,IAAI,CAAC,EAAE,CAAC,CACfH,MAAM,CAAEG,IAAI,CAAC,EAAE,CAAC,CAChBF,KAAK,CAAEE,IAAI,CAAC,EAAE,CAChB,EAEM,IAAAC,wBAAwB,CAAG,CAC/BR,MAAM,CAAE,OAAO,CACfG,KAAK,CAAE,QAAQ,CACfC,MAAM,CAAE,OAAO,CACfC,KAAK,CAAE,OACT,EAaM,IAAAI,2BAAwD,CAAG,CAC/DC,WAAW,CAAE,CACXC,IAAI,CAAE,CACJX,MAAM,CAAE,WAAW,CACnBG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ACR,CAAC,CACDF,KAAK,CAAE,CACLyB,OAAO,CAAE,MAAM,CACfvB,IAAI,CAAE,OACR,CACF,EAEM,IAAAwB,gBAA8E,CAAG,CACrFC,QAAQ,CAAE,iBAAiB,CAC3BC,MAAM,CAAE,2BACV;;;;"}
1
+ {"version":3,"file":"chipTokens.js","sources":["../../../../../src/components/Chip/chipTokens.ts"],"sourcesContent":["import type { ChipGroupProps } from './ChipGroup';\nimport type { ChipBorderColors, ChipBackgroundColors } from './types';\nimport type { DotNotationSpacingStringToken } from '~utils/types';\nimport type { SelectorInputHoverTokens } from '~components/Form/Selector/types';\nimport type { IconProps } from '~components/Icons';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport type { DurationString, EasingString } from '~tokens/global';\nimport { size } from '~tokens/global';\n\nconst chipGroupGapTokens = {\n xsmall: {\n right: 'spacing.3',\n bottom: 'spacing.3',\n },\n small: {\n right: 'spacing.3',\n bottom: 'spacing.3',\n },\n medium: {\n right: 'spacing.3',\n bottom: 'spacing.4',\n },\n large: {\n right: 'spacing.3',\n bottom: 'spacing.4',\n },\n} as const;\n\nconst chipHeightTokens: Record<NonNullable<ChipGroupProps['size']>, number> = {\n xsmall: size[24],\n small: size[28],\n medium: size[36],\n large: size[48],\n};\n\nconst chipGroupLabelSizeTokens = {\n xsmall: 'small',\n small: 'medium',\n medium: 'large',\n large: 'large',\n} as const;\n\ntype ChipHorizontalPaddingTokens = {\n withoutIcon: Record<\n 'left' | 'right',\n Record<NonNullable<ChipGroupProps['size']>, DotNotationSpacingStringToken>\n >;\n withIcon: Record<\n 'left' | 'right',\n Record<NonNullable<ChipGroupProps['size']>, DotNotationSpacingStringToken>\n >;\n};\n\nconst chipHorizontalPaddingTokens: ChipHorizontalPaddingTokens = {\n withoutIcon: {\n left: {\n xsmall: 'spacing.4',\n small: 'spacing.4',\n medium: 'spacing.6',\n large: 'spacing.7',\n },\n right: {\n xsmall: 'spacing.4',\n small: 'spacing.4',\n medium: 'spacing.6',\n large: 'spacing.7',\n },\n },\n withIcon: {\n left: {\n xsmall: 'spacing.4',\n small: 'spacing.4',\n medium: 'spacing.5',\n large: 'spacing.6',\n },\n right: {\n xsmall: 'spacing.4',\n small: 'spacing.4',\n medium: 'spacing.6',\n large: 'spacing.7',\n },\n },\n};\n\ntype TextColorTokens = BaseTextProps['color'];\ntype IconColorTokens = IconProps['color'];\ntype ChipColorTokens = {\n text: Record<string, TextColorTokens>;\n icon: Record<string, IconColorTokens>;\n background: Record<string, Record<string, ChipBackgroundColors>>;\n border: Record<string, Record<string, ChipBorderColors>>;\n};\n\nconst chipColorTokens: ChipColorTokens = {\n text: {\n unchecked: 'interactive.text.gray.subtle',\n disabled: 'interactive.text.gray.disabled',\n primary: 'interactive.text.primary.normal',\n positive: 'interactive.text.positive.normal',\n negative: 'interactive.text.negative.normal',\n },\n icon: {\n unchecked: 'interactive.icon.gray.subtle',\n disabled: 'interactive.icon.gray.disabled',\n primary: 'interactive.icon.primary.normal',\n positive: 'interactive.icon.positive.normal',\n negative: 'interactive.icon.negative.normal',\n },\n background: {\n unchecked: {\n default: 'surface.background.gray.intense',\n hover: 'interactive.background.gray.faded',\n disabled: 'transparent',\n },\n primary: {\n default: 'interactive.background.primary.faded',\n hover: 'interactive.background.primary.fadedHighlighted',\n disabled: 'interactive.background.primary.disabled',\n },\n positive: {\n default: 'interactive.background.positive.faded',\n hover: 'interactive.background.positive.fadedHighlighted',\n disabled: 'interactive.background.positive.disabled',\n },\n negative: {\n default: 'interactive.background.negative.faded',\n hover: 'interactive.background.negative.fadedHighlighted',\n disabled: 'interactive.background.negative.disabled',\n },\n },\n border: {\n unchecked: {\n default: 'interactive.border.gray.faded',\n hover: 'interactive.border.gray.faded',\n disabled: 'interactive.border.gray.disabled',\n },\n primary: {\n default: 'interactive.border.primary.default',\n hover: 'interactive.border.primary.default',\n disabled: 'interactive.border.primary.disabled',\n },\n positive: {\n default: 'interactive.border.positive.default',\n hover: 'interactive.border.positive.default',\n disabled: 'interactive.border.positive.disabled',\n },\n negative: {\n default: 'interactive.border.negative.default',\n hover: 'interactive.border.negative.default',\n disabled: 'interactive.border.negative.disabled',\n },\n },\n};\n\nconst getChipInputHoverTokens = (color: ChipGroupProps['color']): SelectorInputHoverTokens => {\n return {\n default: {\n background: {\n checked: 'colors.transparent',\n unchecked: 'colors.transparent',\n },\n border: {\n checked: `colors.${chipColorTokens.border[color || 'default'].hover}` as never,\n unchecked: 'colors.interactive.border.gray.faded',\n },\n },\n };\n};\n\nconst chipIconSizes: Record<NonNullable<ChipGroupProps['size']>, IconProps['size']> = {\n xsmall: 'small',\n small: 'small',\n medium: 'medium',\n large: 'large',\n};\n\nconst chipTextSizes = {\n xsmall: {\n variant: 'body',\n size: 'small',\n },\n small: {\n variant: 'body',\n size: 'medium',\n },\n medium: {\n variant: 'body',\n size: 'large',\n },\n large: {\n variant: 'body',\n size: 'large',\n },\n} as const;\n\nconst chipMotionTokens: Record<'duration' | 'easing', DurationString | EasingString> = {\n duration: 'duration.xquick',\n easing: 'easing.standard',\n};\n\nexport {\n chipColorTokens,\n chipHeightTokens,\n chipGroupGapTokens,\n getChipInputHoverTokens,\n chipHorizontalPaddingTokens,\n chipTextSizes,\n chipIconSizes,\n chipMotionTokens,\n chipGroupLabelSizeTokens,\n};\n"],"names":["chipGroupGapTokens","xsmall","right","bottom","small","medium","large","chipHeightTokens","size","chipGroupLabelSizeTokens","chipHorizontalPaddingTokens","withoutIcon","left","withIcon","chipColorTokens","text","unchecked","disabled","primary","positive","negative","icon","background","default","hover","border","getChipInputHoverTokens","color","checked","chipIconSizes","chipTextSizes","variant","chipMotionTokens","duration","easing"],"mappings":";;;;AASM,IAAAA,kBAAkB,CAAG,CACzBC,MAAM,CAAE,CACNC,KAAK,CAAE,WAAW,CAClBC,MAAM,CAAE,WACV,CAAC,CACDC,KAAK,CAAE,CACLF,KAAK,CAAE,WAAW,CAClBC,MAAM,CAAE,WACV,CAAC,CACDE,MAAM,CAAE,CACNH,KAAK,CAAE,W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MAAM,CAAE,CACNG,OAAO,CAAG,CAASd,OAAAA,EAAAA,eAAe,CAACW,MAAM,CAACE,KAAK,EAAI,SAAS,CAAC,CAACH,KAAM,CAAU,CAAA,CAC9ER,SAAS,CAAE,sCACb,CACF,CACF,CAAC,CACH,EAEM,IAAAa,aAA6E,CAAG,CACpF5B,MAAM,CAAE,OAAO,CACfG,KAAK,CAAE,OAAO,CACdC,MAAM,CAAE,QAAQ,CAChBC,KAAK,CAAE,OACT,EAEM,IAAAwB,aAAa,CAAG,CACpB7B,MAAM,CAAE,CACN8B,OAAO,CAAE,MAAM,CACfvB,IAAI,CAAE,OACR,CAAC,CACDJ,KAAK,CAAE,CACL2B,OAAO,CAAE,MAAM,CACfvB,IAAI,CAAE,QACR,CAAC,CACDH,MAAM,CAAE,CACN0B,OAAO,CAAE,MAAM,CACfvB,IAAI,CAAE,OACR,CAAC,CACDF,KAAK,CAAE,CACLyB,OAAO,CAAE,MAAM,CACfvB,IAAI,CAAE,OACR,CACF,EAEM,IAAAwB,gBAA8E,CAAG,CACrFC,QAAQ,CAAE,iBAAiB,CAC3BC,MAAM,CAAE,iBACV;;;;"}
@@ -1,6 +1,6 @@
1
1
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
2
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import { useState, useRef, useCallback, useMemo, Children } from 'react';
3
+ import { forwardRef, useState, useRef, useCallback, useMemo, Children } from 'react';
4
4
  import { CollapsibleContext } from './CollapsibleContext.js';
5
5
  import { MAX_WIDTH, MAX_WIDTH_NO_RESTRICTIONS } from './styles.native.js';
6
6
  import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
@@ -19,7 +19,7 @@ import { isValidAllowedChildren } from '../../utils/isValidAllowedChildren/isVal
19
19
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
20
20
  import { jsx } from 'react/jsx-runtime';
21
21
 
22
- var _excluded=["children","direction","defaultIsExpanded","isExpanded","onExpandChange","testID","_shouldApplyWidthRestrictions","_dangerouslyDisableValidations"];var MIN_WIDTH=makeSize(size[200]);var Collapsible=function Collapsible(_ref){var children=_ref.children,_ref$direction=_ref.direction,direction=_ref$direction===void 0?'bottom':_ref$direction,_ref$defaultIsExpande=_ref.defaultIsExpanded,defaultIsExpanded=_ref$defaultIsExpande===void 0?false:_ref$defaultIsExpande,isExpanded=_ref.isExpanded,onExpandChange=_ref.onExpandChange,testID=_ref.testID,_ref$_shouldApplyWidt=_ref._shouldApplyWidthRestrictions,_shouldApplyWidthRestrictions=_ref$_shouldApplyWidt===void 0?true:_ref$_shouldApplyWidt,_ref$_dangerouslyDisa=_ref._dangerouslyDisableValidations,_dangerouslyDisableValidations=_ref$_dangerouslyDisa===void 0?false:_ref$_dangerouslyDisa,rest=_objectWithoutProperties(_ref,_excluded);var _useState=useState(isExpanded!=null?isExpanded:defaultIsExpanded),_useState2=_slicedToArray(_useState,2),isBodyExpanded=_useState2[0],setIsBodyExpanded=_useState2[1];var collapsibleBodyId=useId(MetaConstants.CollapsibleBody);var initialDefaultExpanded=useRef(Boolean(defaultIsExpanded||isExpanded));var handleExpandChange=useCallback(function(nextIsExpanded){if(typeof isExpanded!=='undefined'){onExpandChange==null?void 0:onExpandChange({isExpanded:nextIsExpanded});}else {setIsBodyExpanded(nextIsExpanded);onExpandChange==null?void 0:onExpandChange({isExpanded:nextIsExpanded});}},[onExpandChange,isExpanded]);var contextValue=useMemo(function(){return {isExpanded:isExpanded!=null?isExpanded:isBodyExpanded,onExpandChange:handleExpandChange,defaultIsExpanded:initialDefaultExpanded.current,direction:direction,collapsibleBodyId:collapsibleBodyId};},[isBodyExpanded,direction,handleExpandChange,isExpanded,collapsibleBodyId]);if(__DEV__){Children.forEach(children,function(child){if(!(isValidAllowedChildren(child,MetaConstants.CollapsibleBody)||isValidAllowedChildren(child,MetaConstants.CollapsibleButton)||isValidAllowedChildren(child,MetaConstants.CollapsibleLink))&&!_dangerouslyDisableValidations){throwBladeError({message:`only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink`,moduleName:'Collapsible'});}});}return jsx(CollapsibleContext.Provider,{value:contextValue,children:jsx(BaseBox,Object.assign({},metaAttribute({name:MetaConstants.Collapsible,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsx(BaseBox,{display:"flex",flexDirection:direction==='bottom'?'column':'column-reverse',alignItems:"flex-start",minWidth:_shouldApplyWidthRestrictions?MIN_WIDTH:makeSize(size[0]),maxWidth:_shouldApplyWidthRestrictions?MAX_WIDTH:MAX_WIDTH_NO_RESTRICTIONS,children:children})}))});};
22
+ var _excluded=["children","direction","defaultIsExpanded","isExpanded","onExpandChange","testID","_shouldApplyWidthRestrictions","_dangerouslyDisableValidations"];var MIN_WIDTH=makeSize(size[200]);var _Collapsible=function _Collapsible(_ref,ref){var children=_ref.children,_ref$direction=_ref.direction,direction=_ref$direction===void 0?'bottom':_ref$direction,_ref$defaultIsExpande=_ref.defaultIsExpanded,defaultIsExpanded=_ref$defaultIsExpande===void 0?false:_ref$defaultIsExpande,isExpanded=_ref.isExpanded,onExpandChange=_ref.onExpandChange,testID=_ref.testID,_ref$_shouldApplyWidt=_ref._shouldApplyWidthRestrictions,_shouldApplyWidthRestrictions=_ref$_shouldApplyWidt===void 0?true:_ref$_shouldApplyWidt,_ref$_dangerouslyDisa=_ref._dangerouslyDisableValidations,_dangerouslyDisableValidations=_ref$_dangerouslyDisa===void 0?false:_ref$_dangerouslyDisa,rest=_objectWithoutProperties(_ref,_excluded);var _useState=useState(isExpanded!=null?isExpanded:defaultIsExpanded),_useState2=_slicedToArray(_useState,2),isBodyExpanded=_useState2[0],setIsBodyExpanded=_useState2[1];var collapsibleBodyId=useId(MetaConstants.CollapsibleBody);var initialDefaultExpanded=useRef(Boolean(defaultIsExpanded||isExpanded));var handleExpandChange=useCallback(function(nextIsExpanded){if(typeof isExpanded!=='undefined'){onExpandChange==null?void 0:onExpandChange({isExpanded:nextIsExpanded});}else {setIsBodyExpanded(nextIsExpanded);onExpandChange==null?void 0:onExpandChange({isExpanded:nextIsExpanded});}},[onExpandChange,isExpanded]);var contextValue=useMemo(function(){return {isExpanded:isExpanded!=null?isExpanded:isBodyExpanded,onExpandChange:handleExpandChange,defaultIsExpanded:initialDefaultExpanded.current,direction:direction,collapsibleBodyId:collapsibleBodyId};},[isBodyExpanded,direction,handleExpandChange,isExpanded,collapsibleBodyId]);if(__DEV__){Children.forEach(children,function(child){if(!(isValidAllowedChildren(child,MetaConstants.CollapsibleBody)||isValidAllowedChildren(child,MetaConstants.CollapsibleButton)||isValidAllowedChildren(child,MetaConstants.CollapsibleLink))&&!_dangerouslyDisableValidations){throwBladeError({message:`only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink`,moduleName:'Collapsible'});}});}return jsx(CollapsibleContext.Provider,{value:contextValue,children:jsx(BaseBox,Object.assign({ref:ref},metaAttribute({name:MetaConstants.Collapsible,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsx(BaseBox,{display:"flex",flexDirection:direction==='bottom'?'column':'column-reverse',alignItems:"flex-start",minWidth:_shouldApplyWidthRestrictions?MIN_WIDTH:makeSize(size[0]),maxWidth:_shouldApplyWidthRestrictions?MAX_WIDTH:MAX_WIDTH_NO_RESTRICTIONS,children:children})}))});};var Collapsible=forwardRef(_Collapsible);
23
23
 
24
24
  export { Collapsible };
25
25
  //# sourceMappingURL=Collapsible.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Collapsible.js","sources":["../../../../../src/components/Collapsible/Collapsible.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport { Children, useCallback, useRef, useState, useMemo } from 'react';\n\nimport type { CollapsibleContextState } from './CollapsibleContext';\nimport { CollapsibleContext } from './CollapsibleContext';\nimport { MAX_WIDTH, MAX_WIDTH_NO_RESTRICTIONS } from './styles';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { makeSize } from '~utils';\nimport { size } from '~tokens/global';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useId } from '~utils/useId';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype CollapsibleProps = {\n /**\n * Composes `CollapsibleButton`, `CollapsibleLink`, `CollapsibleBody`\n */\n children: ReactNode;\n\n /**\n * Direction in which the content expands\n *\n * @default bottom\n */\n direction?: 'bottom' | 'top';\n\n /**\n * Expands the collapsible content by default (uncontrolled)\n *\n * @default false\n */\n defaultIsExpanded?: boolean;\n\n /**\n * Expands the collapsible content (controlled)\n *\n * @default undefined\n */\n isExpanded?: boolean;\n\n /**\n * Callback for change in collapsible's expanded state\n *\n * @default undefined\n */\n onExpandChange?: ({ isExpanded }: { isExpanded: boolean }) => void;\n\n /**\n * **Internal**: disables trigger validations. Used for AccordionButton and SideNavLink internally\n */\n _dangerouslyDisableValidations?: boolean;\n /**\n * **Internal**: used to override responsive width restrictions\n */\n _shouldApplyWidthRestrictions?: boolean;\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst MIN_WIDTH: BoxProps['minWidth'] = makeSize(size[200]);\n\nconst Collapsible = ({\n children,\n direction = 'bottom',\n defaultIsExpanded = false,\n isExpanded,\n onExpandChange,\n testID,\n _shouldApplyWidthRestrictions = true,\n _dangerouslyDisableValidations = false,\n ...rest\n}: CollapsibleProps): ReactElement => {\n const [isBodyExpanded, setIsBodyExpanded] = useState(isExpanded ?? defaultIsExpanded);\n const collapsibleBodyId = useId(MetaConstants.CollapsibleBody);\n\n /**\n * Maintain a ref to the initial value of `defaultExpanded || isExpanded` so changing it has no effect.\n * This will help in determining the correct initial height of collapsing body content\n */\n const initialDefaultExpanded = useRef(Boolean(defaultIsExpanded || isExpanded));\n\n const handleExpandChange = useCallback(\n (nextIsExpanded: boolean) => {\n if (typeof isExpanded !== 'undefined') {\n // controlled\n onExpandChange?.({ isExpanded: nextIsExpanded });\n } else {\n // uncontrolled\n setIsBodyExpanded(nextIsExpanded);\n onExpandChange?.({ isExpanded: nextIsExpanded });\n }\n },\n [onExpandChange, isExpanded],\n );\n\n const contextValue = useMemo<CollapsibleContextState>(\n () => ({\n // controlled behavior if isExpanded is provided\n isExpanded: isExpanded ?? isBodyExpanded,\n onExpandChange: handleExpandChange,\n defaultIsExpanded: initialDefaultExpanded.current,\n direction,\n collapsibleBodyId,\n }),\n [isBodyExpanded, direction, handleExpandChange, isExpanded, collapsibleBodyId],\n );\n\n if (__DEV__) {\n Children.forEach(children, (child) => {\n if (\n !(\n isValidAllowedChildren(child, MetaConstants.CollapsibleBody) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleButton) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleLink)\n ) &&\n !_dangerouslyDisableValidations\n ) {\n throwBladeError({\n message: `only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink`,\n moduleName: 'Collapsible',\n });\n }\n });\n }\n\n return (\n <CollapsibleContext.Provider value={contextValue}>\n <BaseBox\n {...metaAttribute({ name: MetaConstants.Collapsible, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n display=\"flex\"\n flexDirection={direction === 'bottom' ? 'column' : 'column-reverse'}\n alignItems=\"flex-start\"\n minWidth={_shouldApplyWidthRestrictions ? MIN_WIDTH : makeSize(size[0])}\n maxWidth={_shouldApplyWidthRestrictions ? MAX_WIDTH : MAX_WIDTH_NO_RESTRICTIONS}\n >\n {children}\n </BaseBox>\n </BaseBox>\n </CollapsibleContext.Provider>\n );\n};\n\nexport type { CollapsibleProps };\nexport { Collapsible };\n"],"names":["MIN_WIDTH","makeSize","size","Collapsible","_ref","children","_ref$direction","direction","_ref$defaultIsExpande","defaultIsExpanded","isExpanded","onExpandChange","testID","_ref$_shouldApplyWidt","_shouldApplyWidthRestrictions","_ref$_dangerouslyDisa","_dangerouslyDisableValidations","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isBodyExpanded","setIsBodyExpanded","collapsibleBodyId","useId","MetaConstants","CollapsibleBody","initialDefaultExpanded","useRef","Boolean","handleExpandChange","useCallback","nextIsExpanded","contextValue","useMemo","current","__DEV__","Children","forEach","child","isValidAllowedChildren","CollapsibleButton","CollapsibleLink","throwBladeError","message","moduleName","_jsx","CollapsibleContext","Provider","value","BaseBox","Object","assign","metaAttribute","name","getStyledProps","makeAnalyticsAttribute","display","flexDirection","alignItems","minWidth","maxWidth","MAX_WIDTH","MAX_WIDTH_NO_RESTRICTIONS"],"mappings":";;;;;;;;;;;;;;;;;;;;;mKAiEA,IAAMA,SAA+B,CAAGC,QAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC,CAErD,IAAAC,WAAW,CAAG,SAAdA,WAAWA,CAAAC,IAAA,CAUqB,CATpC,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAAC,cAAA,CAAAF,IAAA,CACRG,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAA,KAAA,CAAA,CAAG,QAAQ,CAAAA,cAAA,CAAAE,qBAAA,CAAAJ,IAAA,CACpBK,iBAAiB,CAAjBA,iBAAiB,CAAAD,qBAAA,GAAA,KAAA,CAAA,CAAG,KAAK,CAAAA,qBAAA,CACzBE,UAAU,CAAAN,IAAA,CAAVM,UAAU,CACVC,cAAc,CAAAP,IAAA,CAAdO,cAAc,CACdC,MAAM,CAAAR,IAAA,CAANQ,MAAM,CAAAC,qBAAA,CAAAT,IAAA,CACNU,6BAA6B,CAA7BA,6BAA6B,CAAAD,qBAAA,GAAG,KAAA,CAAA,CAAA,IAAI,CAAAA,qBAAA,CAAAE,qBAAA,CAAAX,IAAA,CACpCY,8BAA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CAAC,CACiB,CAAC,CAElC;;;;"}
1
+ {"version":3,"file":"Collapsible.js","sources":["../../../../../src/components/Collapsible/Collapsible.tsx"],"sourcesContent":["import type { ReactElement, ReactNode } from 'react';\nimport { Children, useCallback, useRef, useState, useMemo, forwardRef } from 'react';\n\nimport type { CollapsibleContextState } from './CollapsibleContext';\nimport { CollapsibleContext } from './CollapsibleContext';\nimport { MAX_WIDTH, MAX_WIDTH_NO_RESTRICTIONS } from './styles';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { DataAnalyticsAttribute, BladeElementRef, TestID } from '~utils/types';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { BoxProps } from '~components/Box';\nimport { makeSize } from '~utils';\nimport { size } from '~tokens/global';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useId } from '~utils/useId';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype CollapsibleProps = {\n /**\n * Composes `CollapsibleButton`, `CollapsibleLink`, `CollapsibleBody`\n */\n children: ReactNode;\n\n /**\n * Direction in which the content expands\n *\n * @default bottom\n */\n direction?: 'bottom' | 'top';\n\n /**\n * Expands the collapsible content by default (uncontrolled)\n *\n * @default false\n */\n defaultIsExpanded?: boolean;\n\n /**\n * Expands the collapsible content (controlled)\n *\n * @default undefined\n */\n isExpanded?: boolean;\n\n /**\n * Callback for change in collapsible's expanded state\n *\n * @default undefined\n */\n onExpandChange?: ({ isExpanded }: { isExpanded: boolean }) => void;\n\n /**\n * **Internal**: disables trigger validations. Used for AccordionButton and SideNavLink internally\n */\n _dangerouslyDisableValidations?: boolean;\n /**\n * **Internal**: used to override responsive width restrictions\n */\n _shouldApplyWidthRestrictions?: boolean;\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\nconst MIN_WIDTH: BoxProps['minWidth'] = makeSize(size[200]);\n\nconst _Collapsible = (\n {\n children,\n direction = 'bottom',\n defaultIsExpanded = false,\n isExpanded,\n onExpandChange,\n testID,\n _shouldApplyWidthRestrictions = true,\n _dangerouslyDisableValidations = false,\n ...rest\n }: CollapsibleProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n const [isBodyExpanded, setIsBodyExpanded] = useState(isExpanded ?? defaultIsExpanded);\n const collapsibleBodyId = useId(MetaConstants.CollapsibleBody);\n\n /**\n * Maintain a ref to the initial value of `defaultExpanded || isExpanded` so changing it has no effect.\n * This will help in determining the correct initial height of collapsing body content\n */\n const initialDefaultExpanded = useRef(Boolean(defaultIsExpanded || isExpanded));\n\n const handleExpandChange = useCallback(\n (nextIsExpanded: boolean) => {\n if (typeof isExpanded !== 'undefined') {\n // controlled\n onExpandChange?.({ isExpanded: nextIsExpanded });\n } else {\n // uncontrolled\n setIsBodyExpanded(nextIsExpanded);\n onExpandChange?.({ isExpanded: nextIsExpanded });\n }\n },\n [onExpandChange, isExpanded],\n );\n\n const contextValue = useMemo<CollapsibleContextState>(\n () => ({\n // controlled behavior if isExpanded is provided\n isExpanded: isExpanded ?? isBodyExpanded,\n onExpandChange: handleExpandChange,\n defaultIsExpanded: initialDefaultExpanded.current,\n direction,\n collapsibleBodyId,\n }),\n [isBodyExpanded, direction, handleExpandChange, isExpanded, collapsibleBodyId],\n );\n\n if (__DEV__) {\n Children.forEach(children, (child) => {\n if (\n !(\n isValidAllowedChildren(child, MetaConstants.CollapsibleBody) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleButton) ||\n isValidAllowedChildren(child, MetaConstants.CollapsibleLink)\n ) &&\n !_dangerouslyDisableValidations\n ) {\n throwBladeError({\n message: `only the following are supported as valid children: CollapsibleBody, CollapsibleButton, CollapsibleLink`,\n moduleName: 'Collapsible',\n });\n }\n });\n }\n\n return (\n <CollapsibleContext.Provider value={contextValue}>\n <BaseBox\n ref={ref as never}\n {...metaAttribute({ name: MetaConstants.Collapsible, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <BaseBox\n display=\"flex\"\n flexDirection={direction === 'bottom' ? 'column' : 'column-reverse'}\n alignItems=\"flex-start\"\n minWidth={_shouldApplyWidthRestrictions ? MIN_WIDTH : makeSize(size[0])}\n maxWidth={_shouldApplyWidthRestrictions ? MAX_WIDTH : MAX_WIDTH_NO_RESTRICTIONS}\n >\n {children}\n </BaseBox>\n </BaseBox>\n </CollapsibleContext.Provider>\n );\n};\n\nconst Collapsible = forwardRef(_Collapsible);\n\nexport type { CollapsibleProps };\nexport { Collapsible };\n"],"names":["MIN_WIDTH","makeSize","size","_Collapsible","_ref","ref","children","_ref$direction","direction","_ref$defaultIsExpande","defaultIsExpanded","isExpanded","onExpandChange","testID","_ref$_shouldApplyWidt","_shouldApplyWidthRestrictions","_ref$_dangerouslyDisa","_dangerouslyDisableValidations","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isBodyExpanded","setIsBodyExpanded","collapsibleBodyId","useId","MetaConstants","CollapsibleBody","initialDefaultExpanded","useRef","Boolean","handleExpandChange","useCallback","nextIsExpanded","contextValue","useMemo","current","__DEV__","Children","forEach","child","isValidAllowedChildren","CollapsibleButton","CollapsibleLink","throwBladeError","message","moduleName","_jsx","CollapsibleContext","Provider","value","BaseBox","Object","assign","metaAttribute","name","Collapsible","getStyledProps","makeAnalyticsAttribute","display","flexDirection","alignItems","minWidth","maxWidth","MAX_WIDTH","MAX_WIDTH_NO_RESTRICTIONS","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,UAAA,CAAA,WAAA,CAAA,mBAAA,CAAA,YAAA,CAAA,gBAAA,CAAA,QAAA,CAAA,+BAAA,CAAA,gCAAA,CAAA,CAgEA,IAAMA,SAA+B,CAAGC,QAAQ,CAACC,IAAI,CAAC,GAAG,CAAC,CAAC,CAE3D,IAAMC,YAAY,CAAG,SAAfA,YAAY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C4C,GAAA,CAACI,OAAO,CAAAC,MAAA,CAAAC,MAAA,CACNnD,CAAAA,GAAG,CAAEA,GAAa,CACdoD,CAAAA,aAAa,CAAC,CAAEC,IAAI,CAAE7B,aAAa,CAAC8B,WAAW,CAAE9C,MAAM,CAANA,MAAO,CAAC,CAAC,CAC1D+C,cAAc,CAAC1C,IAAI,CAAC,CACpB2C,sBAAsB,CAAC3C,IAAI,CAAC,CAAA,CAAAZ,QAAA,CAEhC4C,GAAA,CAACI,OAAO,CACNQ,CAAAA,OAAO,CAAC,MAAM,CACdC,aAAa,CAAEvD,SAAS,GAAK,QAAQ,CAAG,QAAQ,CAAG,gBAAiB,CACpEwD,UAAU,CAAC,YAAY,CACvBC,QAAQ,CAAElD,6BAA6B,CAAGf,SAAS,CAAGC,QAAQ,CAACC,IAAI,CAAC,CAAC,CAAC,CAAE,CACxEgE,QAAQ,CAAEnD,6BAA6B,CAAGoD,SAAS,CAAGC,yBAA0B,CAAA9D,QAAA,CAE/EA,QAAQ,CACF,CAAC,CACH,CAAA,CAAC,CACiB,CAAC,CAElC,CAAC,CAEK,IAAAqD,WAAW,CAAGU,UAAU,CAAClE,YAAY;;;;"}
@@ -4,7 +4,7 @@ import 'react';
4
4
  import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.native.js';
5
5
  import '../BladeProvider/useTheme.js';
6
6
 
7
- var getCollapsibleBodyContentBoxProps=function getCollapsibleBodyContentBoxProps(_ref){var direction=_ref.direction,_hasMargin=_ref._hasMargin;if(!_hasMargin){return {};}return {marginTop:direction==='bottom'?'spacing.5':'spacing.0',marginBottom:direction==='top'?'spacing.5':'spacing.0'};};var getOpacity=function getOpacity(_ref2){var isExpanded=_ref2.isExpanded;return isExpanded?1:0.8;};var getTransitionDuration=function getTransitionDuration(theme){return makeMotionTime(theme.motion.duration.xmoderate);};var getTransitionEasing=function getTransitionEasing(theme){return theme.motion.easing.standard.effective;};var getCollapsibleChevronIconTransforms=function getCollapsibleChevronIconTransforms(){return {transformExpanded:-180,transformCollapsed:0};};
7
+ var getCollapsibleBodyContentBoxProps=function getCollapsibleBodyContentBoxProps(_ref){var direction=_ref.direction,_hasMargin=_ref._hasMargin;if(!_hasMargin){return {};}return {marginTop:direction==='bottom'?'spacing.5':'spacing.0',marginBottom:direction==='top'?'spacing.5':'spacing.0'};};var getOpacity=function getOpacity(_ref2){var isExpanded=_ref2.isExpanded;return isExpanded?1:0.8;};var getTransitionDuration=function getTransitionDuration(theme){return makeMotionTime(theme.motion.duration.moderate);};var getTransitionEasing=function getTransitionEasing(theme){return theme.motion.easing.standard;};var getCollapsibleChevronIconTransforms=function getCollapsibleChevronIconTransforms(){return {transformExpanded:-180,transformCollapsed:0};};
8
8
 
9
9
  export { getCollapsibleBodyContentBoxProps, getCollapsibleChevronIconTransforms, getOpacity, getTransitionDuration, getTransitionEasing };
10
10
  //# sourceMappingURL=commonStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commonStyles.js","sources":["../../../../../src/components/Collapsible/commonStyles.ts"],"sourcesContent":["import type { CollapsibleProps } from './Collapsible';\nimport type { CollapsibleBodyProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport type { BoxProps } from '~components/Box';\nimport { makeMotionTime } from '~utils';\n\nconst getCollapsibleBodyContentBoxProps = ({\n direction,\n _hasMargin,\n}: {\n direction: CollapsibleProps['direction'];\n _hasMargin: CollapsibleBodyProps['_hasMargin'];\n}): BoxProps => {\n if (!_hasMargin) {\n return {};\n }\n\n return {\n /**\n * Need a margin inside the outside wrapper so this is\n * included in height calculations and prevents jank\n */\n marginTop: direction === 'bottom' ? 'spacing.5' : 'spacing.0',\n marginBottom: direction === 'top' ? 'spacing.5' : 'spacing.0',\n };\n};\n\nconst getOpacity = ({ isExpanded }: { isExpanded: boolean }): number => (isExpanded ? 1 : 0.8);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration.xmoderate);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard.effective;\n\nconst getCollapsibleChevronIconTransforms = (): {\n transformExpanded: number;\n transformCollapsed: number;\n} => ({ transformExpanded: -180, transformCollapsed: 0 });\n\nexport {\n getCollapsibleBodyContentBoxProps,\n getOpacity,\n getTransitionDuration,\n getTransitionEasing,\n getCollapsibleChevronIconTransforms,\n};\n"],"names":["getCollapsibleBodyContentBoxProps","_ref","direction","_hasMargin","marginTop","marginBottom","getOpacity","_ref2","isExpanded","getTransitionDuration","theme","makeMotionTime","motion","duration","xmoderate","getTransitionEasing","easing","standard","effective","getCollapsibleChevronIconTransforms","transformExpanded","transformCollapsed"],"mappings":";;;;;;AAMM,IAAAA,iCAAiC,CAAG,SAApCA,iCAAiCA,CAAAC,IAAA,CAMvB,CAAA,IALdC,SAAS,CAAAD,IAAA,CAATC,SAAS,CACTC,UAAU,CAAAF,IAAA,CAAVE,UAAU,CAKV,GAAI,CAACA,UAAU,CAAE,CACf,OAAO,EAAE,CACX,CAEA,OAAO,CAKLC,SAAS,CAAEF,SAAS,GAAK,QAAQ,CAAG,WAAW,CAAG,WAAW,CAC7DG,YAAY,CAAEH,SAAS,GAAK,KAAK,CAAG,WAAW,CAAG,WACpD,CAAC,CACH,EAEM,IAAAI,UAAU,CAAG,SAAbA,UAAUA,CAAAC,KAAA,MAAMC,UAAU,CAAAD,KAAA,CAAVC,UAAU,CAAyC,OAAAA,UAAU,CAAG,CAAC,CAAG,GAAG,CAAC,EAGxF,IAAAC,qBAAqB,CAAG,SAAxBA,qBAAqBA,CAAIC,KAAY,CAAA,CAAA,OAAKC,cAAc,CAACD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAACC,SAAS,CAAC,CAG/F,EAAM,IAAAC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIL,KAAY,SAAKA,KAAK,CAACE,MAAM,CAACI,MAAM,CAACC,QAAQ,CAACC,SAAS,CAEpF,EAAM,IAAAC,mCAAmC,CAAG,SAAtCA,mCAAmCA,UAGnC,CAAEC,iBAAiB,CAAE,CAAC,GAAG,CAAEC,kBAAkB,CAAE,CAAE,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"commonStyles.js","sources":["../../../../../src/components/Collapsible/commonStyles.ts"],"sourcesContent":["import type { CollapsibleProps } from './Collapsible';\nimport type { CollapsibleBodyProps } from './types';\nimport type { Theme } from '~components/BladeProvider';\nimport type { BoxProps } from '~components/Box';\nimport { makeMotionTime } from '~utils';\n\nconst getCollapsibleBodyContentBoxProps = ({\n direction,\n _hasMargin,\n}: {\n direction: CollapsibleProps['direction'];\n _hasMargin: CollapsibleBodyProps['_hasMargin'];\n}): BoxProps => {\n if (!_hasMargin) {\n return {};\n }\n\n return {\n /**\n * Need a margin inside the outside wrapper so this is\n * included in height calculations and prevents jank\n */\n marginTop: direction === 'bottom' ? 'spacing.5' : 'spacing.0',\n marginBottom: direction === 'top' ? 'spacing.5' : 'spacing.0',\n };\n};\n\nconst getOpacity = ({ isExpanded }: { isExpanded: boolean }): number => (isExpanded ? 1 : 0.8);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionDuration = (theme: Theme) => makeMotionTime(theme.motion.duration.moderate);\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getTransitionEasing = (theme: Theme) => theme.motion.easing.standard;\n\nconst getCollapsibleChevronIconTransforms = (): {\n transformExpanded: number;\n transformCollapsed: number;\n} => ({ transformExpanded: -180, transformCollapsed: 0 });\n\nexport {\n getCollapsibleBodyContentBoxProps,\n getOpacity,\n getTransitionDuration,\n getTransitionEasing,\n getCollapsibleChevronIconTransforms,\n};\n"],"names":["getCollapsibleBodyContentBoxProps","_ref","direction","_hasMargin","marginTop","marginBottom","getOpacity","_ref2","isExpanded","getTransitionDuration","theme","makeMotionTime","motion","duration","moderate","getTransitionEasing","easing","standard","getCollapsibleChevronIconTransforms","transformExpanded","transformCollapsed"],"mappings":";;;;;;AAMM,IAAAA,iCAAiC,CAAG,SAApCA,iCAAiCA,CAAAC,IAAA,CAMvB,CAAA,IALdC,SAAS,CAAAD,IAAA,CAATC,SAAS,CACTC,UAAU,CAAAF,IAAA,CAAVE,UAAU,CAKV,GAAI,CAACA,UAAU,CAAE,CACf,OAAO,EAAE,CACX,CAEA,OAAO,CAKLC,SAAS,CAAEF,SAAS,GAAK,QAAQ,CAAG,WAAW,CAAG,WAAW,CAC7DG,YAAY,CAAEH,SAAS,GAAK,KAAK,CAAG,WAAW,CAAG,WACpD,CAAC,CACH,EAEM,IAAAI,UAAU,CAAG,SAAbA,UAAUA,CAAAC,KAAA,MAAMC,UAAU,CAAAD,KAAA,CAAVC,UAAU,CAAA,OAAyCA,UAAU,CAAG,CAAC,CAAG,GAAG,CAAA,EAGvF,IAAAC,qBAAqB,CAAG,SAAxBA,qBAAqBA,CAAIC,KAAY,SAAKC,cAAc,CAACD,KAAK,CAACE,MAAM,CAACC,QAAQ,CAACC,QAAQ,CAAC,CAAA,EAGxF,IAAAC,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAIL,KAAY,CAAA,CAAA,OAAKA,KAAK,CAACE,MAAM,CAACI,MAAM,CAACC,QAAQ,CAE1E,EAAM,IAAAC,mCAAmC,CAAG,SAAtCA,mCAAmCA,UAGnC,CAAEC,iBAAiB,CAAE,CAAC,GAAG,CAAEC,kBAAkB,CAAE,CAAE,CAAC,CAAC;;;;"}
@@ -1,30 +1,31 @@
1
1
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
+ import React__default from 'react';
2
3
  import { StyledCounter } from './StyledCounter.native.js';
3
4
  import { counterHeight, horizontalPadding } from './counterTokens.js';
4
- import '../Typography/BaseText/BaseText.native.js';
5
- import 'react';
6
- import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
7
- import '@babel/runtime/helpers/slicedToArray';
8
- import 'react-native';
9
- import '../../tokens/global/typography.js';
10
- import '../../tokens/global/motion.js';
11
- import { isReactNative } from '../../utils/platform/isReactNative.js';
12
- import { makeSize } from '../../utils/makeSize/makeSize.js';
13
- import useTheme from '../BladeProvider/useTheme.js';
14
- import { jsx } from 'react/jsx-runtime';
5
+ import '../Typography/Heading/Heading.js';
15
6
  import { Text } from '../Typography/Text/Text.js';
16
7
  import '../Typography/Code/Code.js';
8
+ import '../Typography/Display/Display.js';
17
9
  import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
18
10
  import 'styled-components/native';
19
11
  import '@gorhom/portal';
20
12
  import 'react-native-gesture-handler';
13
+ import useTheme from '../BladeProvider/useTheme.js';
14
+ import 'react-native';
15
+ import '@babel/runtime/helpers/slicedToArray';
16
+ import { isReactNative } from '../../utils/platform/isReactNative.js';
17
+ import { makeSize } from '../../utils/makeSize/makeSize.js';
21
18
  import '../BottomSheet/BottomSheetStack.js';
19
+ import { jsx } from 'react/jsx-runtime';
22
20
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js';
23
21
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
22
+ import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
23
+ import '../../tokens/global/typography.js';
24
+ import '../../tokens/global/motion.js';
24
25
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
25
26
  import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
26
27
 
27
- var _excluded=["value","max","color","emphasis","size","testID"];var getColorProps=function getColorProps(_ref){var _ref$color=_ref.color,color=_ref$color===void 0?'neutral':_ref$color,_ref$emphasis=_ref.emphasis,emphasis=_ref$emphasis===void 0?'subtle':_ref$emphasis;var props={textColor:'feedback.text.neutral.intense',backgroundColor:'feedback.background.neutral.subtle'};if(color==='primary'){props.textColor=emphasis==='intense'?`surface.text.staticWhite.normal`:`surface.text.primary.normal`;props.backgroundColor=`surface.background.primary.${emphasis}`;}else {props.textColor=emphasis==='intense'?`surface.text.staticWhite.normal`:`feedback.text.${color}.intense`;props.backgroundColor=`feedback.background.${color}.${emphasis}`;}return props;};var _Counter=function _Counter(_ref2){var value=_ref2.value,max=_ref2.max,_ref2$color=_ref2.color,color=_ref2$color===void 0?'neutral':_ref2$color,_ref2$emphasis=_ref2.emphasis,emphasis=_ref2$emphasis===void 0?'subtle':_ref2$emphasis,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,testID=_ref2.testID,rest=_objectWithoutProperties(_ref2,_excluded);var content=`${value}`;if(max&&value>max){content=`${max}+`;}var _useTheme=useTheme(),platform=_useTheme.platform;var _getColorProps=getColorProps({color:color,emphasis:emphasis}),backgroundColor=_getColorProps.backgroundColor,textColor=_getColorProps.textColor;var counterTextSizes={small:{variant:'body',size:'xsmall'},medium:{variant:'body',size:'small'},large:{variant:'body',size:'medium'}};return jsx(BaseBox,Object.assign({display:isReactNative()?'flex':'inline-flex'},metaAttribute({name:MetaConstants.Counter,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsx(StyledCounter,{minHeight:makeSize(counterHeight[size]),backgroundColor:backgroundColor,size:size,platform:platform,children:jsx(BaseBox,{paddingX:horizontalPadding[size],display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",overflow:"hidden",children:jsx(Text,Object.assign({},counterTextSizes[size],{textAlign:"center",weight:"medium",truncateAfterLines:1,color:textColor,children:content}))})})}));};var Counter=assignWithoutSideEffects(_Counter,{displayName:'Counter',componentId:'Counter'});
28
+ var _excluded=["value","max","color","emphasis","size","testID"];var getColorProps=function getColorProps(_ref){var _ref$color=_ref.color,color=_ref$color===void 0?'neutral':_ref$color,_ref$emphasis=_ref.emphasis,emphasis=_ref$emphasis===void 0?'subtle':_ref$emphasis;var props={textColor:'feedback.text.neutral.intense',backgroundColor:'feedback.background.neutral.subtle'};if(color==='primary'){props.textColor=emphasis==='intense'?`surface.text.staticWhite.normal`:`surface.text.primary.normal`;props.backgroundColor=`surface.background.primary.${emphasis}`;}else {props.textColor=emphasis==='intense'?`surface.text.staticWhite.normal`:`feedback.text.${color}.intense`;props.backgroundColor=`feedback.background.${color}.${emphasis}`;}return props;};var _Counter=function _Counter(_ref2,ref){var value=_ref2.value,max=_ref2.max,_ref2$color=_ref2.color,color=_ref2$color===void 0?'neutral':_ref2$color,_ref2$emphasis=_ref2.emphasis,emphasis=_ref2$emphasis===void 0?'subtle':_ref2$emphasis,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,testID=_ref2.testID,rest=_objectWithoutProperties(_ref2,_excluded);var content=`${value}`;if(max&&value>max){content=`${max}+`;}var _useTheme=useTheme(),platform=_useTheme.platform;var _getColorProps=getColorProps({color:color,emphasis:emphasis}),backgroundColor=_getColorProps.backgroundColor,textColor=_getColorProps.textColor;var counterTextSizes={small:{variant:'body',size:'xsmall'},medium:{variant:'body',size:'small'},large:{variant:'body',size:'medium'}};return jsx(BaseBox,Object.assign({ref:ref,display:isReactNative()?'flex':'inline-flex'},metaAttribute({name:MetaConstants.Counter,testID:testID}),getStyledProps(rest),makeAnalyticsAttribute(rest),{children:jsx(StyledCounter,{minHeight:makeSize(counterHeight[size]),backgroundColor:backgroundColor,size:size,platform:platform,children:jsx(BaseBox,{paddingX:horizontalPadding[size],display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",overflow:"hidden",children:jsx(Text,Object.assign({},counterTextSizes[size],{textAlign:"center",weight:"medium",truncateAfterLines:1,color:textColor,children:content}))})})}));};var Counter=assignWithoutSideEffects(React__default.forwardRef(_Counter),{displayName:'Counter',componentId:'Counter'});
28
29
 
29
30
  export { Counter };
30
31
  //# sourceMappingURL=Counter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Counter.js","sources":["../../../../../src/components/Counter/Counter.tsx"],"sourcesContent":["import { StyledCounter } from './StyledCounter';\nimport type { StyledCounterProps } from './types';\nimport { counterHeight, horizontalPadding } from './counterTokens';\nimport type { FeedbackColors, SubtleOrIntense } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { DataAnalyticsAttribute, TestID } from '~utils/types';\nimport { isReactNative, makeSize } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nexport type CounterProps = {\n /**\n * Sets the value for the counter.\n */\n value: number;\n /**\n * Sets the max value for the counter.\n * If value exceedes `max` it will render `value+`\n */\n max?: number;\n /**\n * Sets the color of the counter.\n *\n * @default 'neutral'\n */\n color?: FeedbackColors | 'primary';\n /**\n * Sets the contrast of the counter.\n *\n * @default 'subtle'\n */\n emphasis?: SubtleOrIntense;\n /**\n * Sets the size of the counter.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\ntype ColorProps = {\n textColor: BaseTextProps['color'];\n backgroundColor: StyledCounterProps['backgroundColor'];\n};\n\nconst getColorProps = ({\n color = 'neutral',\n emphasis = 'subtle',\n}: {\n color: NonNullable<CounterProps['color']>;\n emphasis: NonNullable<CounterProps['emphasis']>;\n}): ColorProps => {\n const props: ColorProps = {\n textColor: 'feedback.text.neutral.intense',\n backgroundColor: 'feedback.background.neutral.subtle',\n };\n\n if (color === 'primary') {\n // primary color badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `surface.text.primary.normal`;\n props.backgroundColor = `surface.background.primary.${emphasis}`;\n } else {\n // feedback colors badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `feedback.text.${color}.intense`;\n props.backgroundColor = `feedback.background.${color}.${emphasis}`;\n }\n return props;\n};\n\nconst _Counter = ({\n value,\n max,\n color = 'neutral',\n emphasis = 'subtle',\n size = 'medium',\n testID,\n ...rest\n}: CounterProps): React.ReactElement => {\n let content = `${value}`;\n if (max && value > max) {\n content = `${max}+`;\n }\n\n const { platform } = useTheme();\n const { backgroundColor, textColor } = getColorProps({\n color,\n emphasis,\n });\n\n const counterTextSizes = {\n small: {\n variant: 'body',\n size: 'xsmall',\n },\n medium: {\n variant: 'body',\n size: 'small',\n },\n large: {\n variant: 'body',\n size: 'medium',\n },\n } as const;\n\n return (\n <BaseBox\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n {...metaAttribute({ name: MetaConstants.Counter, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <StyledCounter\n minHeight={makeSize(counterHeight[size])}\n backgroundColor={backgroundColor}\n size={size}\n platform={platform}\n >\n <BaseBox\n paddingX={horizontalPadding[size]}\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n overflow=\"hidden\"\n >\n <Text\n {...counterTextSizes[size]}\n textAlign=\"center\"\n weight=\"medium\"\n truncateAfterLines={1}\n color={textColor}\n >\n {content}\n </Text>\n </BaseBox>\n </StyledCounter>\n </BaseBox>\n );\n};\n\nconst Counter = assignWithoutSideEffects(_Counter, {\n displayName: 'Counter',\n componentId: 'Counter',\n});\n\nexport { Counter };\n"],"names":["getColorProps","_ref","_ref$color","color","_ref$emphasis","emphasis","props","textColor","backgroundColor","_Counter","_ref2","value","max","_ref2$color","_ref2$emphasis","_ref2$size","size","testID","rest","_objectWithoutProperties","_excluded","content","_useTheme","useTheme","platform","_getColorProps","counterTextSizes","small","variant","medium","large","_jsx","BaseBox","Object","assign","display","isReactNative","metaAttribute","name","MetaConstants","Counter","getStyledProps","makeAnalyticsAttribute","children","StyledCounter","minHeight","makeSize","counterHeight","paddingX","horizontalPadding","flexDirection","justifyContent","alignItems","overflow","Text","textAlign","weight","truncateAfterLines","assignWithoutSideEffects","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;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cAAc,CAACvB,IAAI,CAAC,CACpBwB,sBAAsB,CAACxB,IAAI,CAAC,CAAAyB,CAAAA,QAAA,CAEhCZ,GAAA,CAACa,aAAa,CACZC,CAAAA,SAAS,CAAEC,QAAQ,CAACC,aAAa,CAAC/B,IAAI,CAAC,CAAE,CACzCR,eAAe,CAAEA,eAAgB,CACjCQ,IAAI,CAAEA,IAAK,CACXQ,QAAQ,CAAEA,QAAS,CAAAmB,QAAA,CAEnBZ,GAAA,CAACC,OAAO,CACNgB,CAAAA,QAAQ,CAAEC,iBAAiB,CAACjC,IAAI,CAAE,CAClCmB,OAAO,CAAC,MAAM,CACde,aAAa,CAAC,KAAK,CACnBC,cAAc,CAAC,QAAQ,CACvBC,UAAU,CAAC,QAAQ,CACnBC,QAAQ,CAAC,QAAQ,CAAAV,QAAA,CAEjBZ,GAAA,CAACuB,IAAI,CAAArB,MAAA,CAAAC,MAAA,CAAA,EAAA,CACCR,gBAAgB,CAACV,IAAI,CAAC,CAC1BuC,CAAAA,SAAS,CAAC,QAAQ,CAClBC,MAAM,CAAC,QAAQ,CACfC,kBAAkB,CAAE,CAAE,CACtBtD,KAAK,CAAEI,SAAU,CAAAoC,QAAA,CAEhBtB,OAAO,CACJ,CAAA,CAAC,CACA,CAAC,CACG,CAAC,CACT,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAmB,OAAO,CAAGkB,wBAAwB,CAACjD,QAAQ,CAAE,CACjDkD,WAAW,CAAE,SAAS,CACtBC,WAAW,CAAE,SACf,CAAC;;;;"}
1
+ {"version":3,"file":"Counter.js","sources":["../../../../../src/components/Counter/Counter.tsx"],"sourcesContent":["import React from 'react';\nimport { StyledCounter } from './StyledCounter';\nimport type { StyledCounterProps } from './types';\nimport { counterHeight, horizontalPadding } from './counterTokens';\nimport type { FeedbackColors, SubtleOrIntense } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport BaseBox from '~components/Box/BaseBox';\nimport { useTheme } from '~components/BladeProvider';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type { DataAnalyticsAttribute, BladeElementRef, TestID } from '~utils/types';\nimport { isReactNative, makeSize } from '~utils';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\nexport type CounterProps = {\n /**\n * Sets the value for the counter.\n */\n value: number;\n /**\n * Sets the max value for the counter.\n * If value exceedes `max` it will render `value+`\n */\n max?: number;\n /**\n * Sets the color of the counter.\n *\n * @default 'neutral'\n */\n color?: FeedbackColors | 'primary';\n /**\n * Sets the contrast of the counter.\n *\n * @default 'subtle'\n */\n emphasis?: SubtleOrIntense;\n /**\n * Sets the size of the counter.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n DataAnalyticsAttribute &\n StyledPropsBlade;\n\ntype ColorProps = {\n textColor: BaseTextProps['color'];\n backgroundColor: StyledCounterProps['backgroundColor'];\n};\n\nconst getColorProps = ({\n color = 'neutral',\n emphasis = 'subtle',\n}: {\n color: NonNullable<CounterProps['color']>;\n emphasis: NonNullable<CounterProps['emphasis']>;\n}): ColorProps => {\n const props: ColorProps = {\n textColor: 'feedback.text.neutral.intense',\n backgroundColor: 'feedback.background.neutral.subtle',\n };\n\n if (color === 'primary') {\n // primary color badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `surface.text.primary.normal`;\n props.backgroundColor = `surface.background.primary.${emphasis}`;\n } else {\n // feedback colors badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `feedback.text.${color}.intense`;\n props.backgroundColor = `feedback.background.${color}.${emphasis}`;\n }\n return props;\n};\n\nconst _Counter = (\n {\n value,\n max,\n color = 'neutral',\n emphasis = 'subtle',\n size = 'medium',\n testID,\n ...rest\n }: CounterProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n let content = `${value}`;\n if (max && value > max) {\n content = `${max}+`;\n }\n\n const { platform } = useTheme();\n const { backgroundColor, textColor } = getColorProps({\n color,\n emphasis,\n });\n\n const counterTextSizes = {\n small: {\n variant: 'body',\n size: 'xsmall',\n },\n medium: {\n variant: 'body',\n size: 'small',\n },\n large: {\n variant: 'body',\n size: 'medium',\n },\n } as const;\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n {...metaAttribute({ name: MetaConstants.Counter, testID })}\n {...getStyledProps(rest)}\n {...makeAnalyticsAttribute(rest)}\n >\n <StyledCounter\n minHeight={makeSize(counterHeight[size])}\n backgroundColor={backgroundColor}\n size={size}\n platform={platform}\n >\n <BaseBox\n paddingX={horizontalPadding[size]}\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n overflow=\"hidden\"\n >\n <Text\n {...counterTextSizes[size]}\n textAlign=\"center\"\n weight=\"medium\"\n truncateAfterLines={1}\n color={textColor}\n >\n {content}\n </Text>\n </BaseBox>\n </StyledCounter>\n </BaseBox>\n );\n};\n\nconst Counter = assignWithoutSideEffects(React.forwardRef(_Counter), {\n displayName: 'Counter',\n componentId: 'Counter',\n});\n\nexport { Counter };\n"],"names":["getColorProps","_ref","_ref$color","color","_ref$emphasis","emphasis","props","textColor","backgroundColor","_Counter","_ref2","ref","value","max","_ref2$color","_ref2$emphasis","_ref2$size","size","testID","rest","_objectWithoutProperties","_excluded","content","_useTheme","useTheme","platform","_getColorProps","counterTextSizes","small","variant","medium","large","_jsx","BaseBox","Object","assign","display","isReactNative","metaAttribute","name","MetaConstants","Counter","getStyledProps","makeAnalyticsAttribute","children","StyledCounter","minHeight","makeSize","counterHeight","paddingX","horizontalPadding","flexDirection","justifyContent","alignItems","overflow","Text","textAlign","weight","truncateAfterLines","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;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,aAAa,CAACC,OAAO,CAAEvB,MAAM,CAANA,MAAO,CAAC,CAAC,CACtDwB,cAAc,CAACvB,IAAI,CAAC,CACpBwB,sBAAsB,CAACxB,IAAI,CAAC,CAAA,CAAAyB,QAAA,CAEhCZ,GAAA,CAACa,aAAa,CAAA,CACZC,SAAS,CAAEC,QAAQ,CAACC,aAAa,CAAC/B,IAAI,CAAC,CAAE,CACzCT,eAAe,CAAEA,eAAgB,CACjCS,IAAI,CAAEA,IAAK,CACXQ,QAAQ,CAAEA,QAAS,CAAAmB,QAAA,CAEnBZ,GAAA,CAACC,OAAO,CACNgB,CAAAA,QAAQ,CAAEC,iBAAiB,CAACjC,IAAI,CAAE,CAClCmB,OAAO,CAAC,MAAM,CACde,aAAa,CAAC,KAAK,CACnBC,cAAc,CAAC,QAAQ,CACvBC,UAAU,CAAC,QAAQ,CACnBC,QAAQ,CAAC,QAAQ,CAAAV,QAAA,CAEjBZ,GAAA,CAACuB,IAAI,CAAArB,MAAA,CAAAC,MAAA,CACCR,EAAAA,CAAAA,gBAAgB,CAACV,IAAI,CAAC,CAAA,CAC1BuC,SAAS,CAAC,QAAQ,CAClBC,MAAM,CAAC,QAAQ,CACfC,kBAAkB,CAAE,CAAE,CACtBvD,KAAK,CAAEI,SAAU,CAAAqC,QAAA,CAEhBtB,OAAO,CAAA,CACJ,CAAC,CACA,CAAC,CACG,CAAC,CACT,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAmB,OAAO,CAAGkB,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAACpD,QAAQ,CAAC,CAAE,CACnEqD,WAAW,CAAE,SAAS,CACtBC,WAAW,CAAE,SACf,CAAC;;;;"}
@@ -1,6 +1,6 @@
1
1
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
- import 'react';
3
+ import React__default from 'react';
4
4
  import styled from 'styled-components/native';
5
5
  import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
6
6
  import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
@@ -16,7 +16,7 @@ import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
16
16
  import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native.js';
17
17
  import { jsx } from 'react/jsx-runtime';
18
18
 
19
- var _excluded=["orientation","dividerStyle","variant","thickness","height","width","testID"];var StyledDivider=styled(BaseBox)(function(_ref){var theme=_ref.theme,borderPosition=_ref.borderPosition,dividerStyle=_ref.dividerStyle,thickness=_ref.thickness,isDividerHorizontal=_ref.isDividerHorizontal,width=_ref.width,height=_ref.height;return Object.assign(_defineProperty(_defineProperty({borderWidth:0},`${borderPosition}Style`,dividerStyle),`${borderPosition}Width`,makeBorderSize(theme.border.width[thickness])),isDividerHorizontal?{flexGrow:1,width:width}:{alignSelf:'stretch',height:height});});var Divider=function Divider(_ref2){var _ref2$orientation=_ref2.orientation,orientation=_ref2$orientation===void 0?'horizontal':_ref2$orientation,_ref2$dividerStyle=_ref2.dividerStyle,dividerStyle=_ref2$dividerStyle===void 0?'solid':_ref2$dividerStyle,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'muted':_ref2$variant,_ref2$thickness=_ref2.thickness,thickness=_ref2$thickness===void 0?'thin':_ref2$thickness,height=_ref2.height,width=_ref2.width,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded);var isDividerHorizontal=orientation==='horizontal';var borderPosition=isDividerHorizontal?'borderBottom':'borderLeft';var borderColor=_defineProperty({},`${borderPosition}Color`,`surface.border.gray.${variant}`);var accessibilityProps=isReactNative()?{}:makeAccessible({role:'separator'});return jsx(StyledDivider,Object.assign({borderPosition:borderPosition,isDividerHorizontal:isDividerHorizontal,dividerStyle:dividerStyle,thickness:thickness,height:height,width:width},borderColor,metaAttribute({name:MetaConstants.Divider,testID:testID}),getStyledProps(styledProps),accessibilityProps));};
19
+ var _excluded=["orientation","dividerStyle","variant","thickness","height","width","testID"];var StyledDivider=styled(BaseBox)(function(_ref){var theme=_ref.theme,borderPosition=_ref.borderPosition,dividerStyle=_ref.dividerStyle,thickness=_ref.thickness,isDividerHorizontal=_ref.isDividerHorizontal,width=_ref.width,height=_ref.height;return Object.assign(_defineProperty(_defineProperty({borderWidth:0},`${borderPosition}Style`,dividerStyle),`${borderPosition}Width`,makeBorderSize(theme.border.width[thickness])),isDividerHorizontal?{flexGrow:1,width:width}:{alignSelf:'stretch',height:height});});var _Divider=function _Divider(_ref2,ref){var _ref2$orientation=_ref2.orientation,orientation=_ref2$orientation===void 0?'horizontal':_ref2$orientation,_ref2$dividerStyle=_ref2.dividerStyle,dividerStyle=_ref2$dividerStyle===void 0?'solid':_ref2$dividerStyle,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'muted':_ref2$variant,_ref2$thickness=_ref2.thickness,thickness=_ref2$thickness===void 0?'thin':_ref2$thickness,height=_ref2.height,width=_ref2.width,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded);var isDividerHorizontal=orientation==='horizontal';var borderPosition=isDividerHorizontal?'borderBottom':'borderLeft';var borderColor=_defineProperty({},`${borderPosition}Color`,`surface.border.gray.${variant}`);var accessibilityProps=isReactNative()?{}:makeAccessible({role:'separator'});return jsx(StyledDivider,Object.assign({ref:ref,borderPosition:borderPosition,isDividerHorizontal:isDividerHorizontal,dividerStyle:dividerStyle,thickness:thickness,height:height,width:width},borderColor,metaAttribute({name:MetaConstants.Divider,testID:testID}),getStyledProps(styledProps),accessibilityProps));};var Divider=React__default.forwardRef(_Divider);
20
20
 
21
21
  export { Divider };
22
22
  //# sourceMappingURL=Divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.js","sources":["../../../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport styled from 'styled-components';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { isReactNative, makeBorderSize } from '~utils';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport type { TestID } from '~utils/types';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype DividerProps = {\n /**\n * Sets the orientation of divider\n *\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Sets the style of divider\n *\n * @default 'solid'\n */\n dividerStyle?: 'solid' | 'dashed';\n /**\n * Sets the variant of divider\n *\n * @default 'normal'\n */\n variant?: 'normal' | 'subtle' | 'muted';\n /**\n * Sets the thickness of divider\n *\n * @default 'thin'\n */\n thickness?: 'thinner' | 'thin' | 'thick' | 'thicker';\n /**\n * Sets the height of divider. Divider uses Flex by default, use height only when parent is not flex.\n *\n */\n height?: CSSObject['height'];\n /**\n * Sets the width of divider. Divider uses Flex by default, use width only when parent is not flex.\n *\n */\n width?: CSSObject['width'];\n} & TestID &\n StyledPropsBlade;\n\nconst StyledDivider = styled(BaseBox)<{\n borderPosition: 'borderBottom' | 'borderLeft';\n dividerStyle: NonNullable<DividerProps['dividerStyle']>;\n thickness: NonNullable<DividerProps['thickness']>;\n height: DividerProps['height'];\n width: DividerProps['width'];\n isDividerHorizontal: boolean;\n}>(({ theme, borderPosition, dividerStyle, thickness, isDividerHorizontal, width, height }) => ({\n borderWidth: 0,\n [`${borderPosition}Style`]: dividerStyle,\n [`${borderPosition}Width`]: makeBorderSize(theme.border.width[thickness]),\n ...(isDividerHorizontal ? { flexGrow: 1, width } : { alignSelf: 'stretch', height }),\n}));\n\nconst Divider = ({\n orientation = 'horizontal',\n dividerStyle = 'solid',\n variant = 'muted',\n thickness = 'thin',\n height,\n width,\n testID,\n ...styledProps\n}: DividerProps): React.ReactElement => {\n const isDividerHorizontal = orientation === 'horizontal';\n const borderPosition = isDividerHorizontal ? 'borderBottom' : 'borderLeft';\n const borderColor = { [`${borderPosition}Color`]: `surface.border.gray.${variant}` };\n const accessibilityProps = isReactNative()\n ? {}\n : makeAccessible({\n role: 'separator',\n });\n\n return (\n <StyledDivider\n borderPosition={borderPosition}\n isDividerHorizontal={isDividerHorizontal}\n dividerStyle={dividerStyle}\n thickness={thickness}\n height={height}\n width={width}\n {...borderColor}\n {...metaAttribute({ name: MetaConstants.Divider, testID })}\n {...getStyledProps(styledProps)}\n {...accessibilityProps}\n />\n );\n};\n\nexport { Divider };\nexport type { DividerProps };\n"],"names":["StyledDivider","styled","BaseBox","_ref","theme","borderPosition","dividerStyle","thickness","isDividerHorizontal","width","height","Object","assign","_defineProperty","borderWidth","makeBorderSize","border","flexGrow","alignSelf","Divider","_ref2","_ref2$orientation","orientation","_ref2$dividerStyle","_ref2$variant","variant","_ref2$thickness","testID","styledProps","_objectWithoutProperties","_excluded","borderColor","accessibilityProps","isReactNative","makeAccessible","role","_jsx","metaAttribute","name","MetaConstants","getStyledProps"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,aAAA,CAAA,cAAA,CAAA,SAAA,CAAA,WAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,CAiDA,IAAMA,aAAa,CAAGC,MAAM,CAACC,OAAO,CAAC,CAOlC,SAAAC,IAAA,MAAGC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,cAAc,CAAAF,IAAA,CAAdE,cAAc,CAAEC,YAAY,CAAAH,IAAA,CAAZG,YAAY,CAAEC,SAAS,CAAAJ,IAAA,CAATI,SAAS,CAAEC,mBAAmB,CAAAL,IAAA,CAAnBK,mBAAmB,CAAEC,KAAK,CAAAN,IAAA,CAALM,KAAK,CAAEC,MAAM,CAAAP,IAAA,CAANO,MAAM,CAAAC,OAAAA,MAAA,CAAAC,MAAA,CAAAC,eAAA,CAAAA,eAAA,EACtFC,WAAW,CAAE,CAAC,CAAA,CACZ,GAAET,cAAe,CAAA,KAAA,CAAM,CAAGC,YAAY,CAAA,CACtC,GAAED,cAAe,CAAA,KAAA,CAAM,CAAGU,cAAc,CAACX,KAAK,CAACY,MAAM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CAAC,CAEN,OACEC,GAAA,CAACpC,aAAa,CAAAW,MAAA,CAAAC,MAAA,CACZP,CAAAA,cAAc,CAAEA,cAAe,CAC/BG,mBAAmB,CAAEA,mBAAoB,CACzCF,YAAY,CAAEA,YAAa,CAC3BC,SAAS,CAAEA,SAAU,CACrBG,MAAM,CAAEA,MAAO,CACfD,KAAK,CAAEA,KAAM,EACTsB,WAAW,CACXM,aAAa,CAAC,CAAEC,IAAI,CAAEC,aAAa,CAACpB,OAAO,CAAEQ,MAAM,CAANA,MAAO,CAAC,CAAC,CACtDa,cAAc,CAACZ,WAAW,CAAC,CAC3BI,kBAAkB,CACvB,CAAC,CAEN;;;;"}
1
+ {"version":3,"file":"Divider.js","sources":["../../../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport styled from 'styled-components';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { isReactNative, makeBorderSize } from '~utils';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport type { BladeElementRef, TestID } from '~utils/types';\nimport { makeAccessible } from '~utils/makeAccessible';\n\ntype DividerProps = {\n /**\n * Sets the orientation of divider\n *\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Sets the style of divider\n *\n * @default 'solid'\n */\n dividerStyle?: 'solid' | 'dashed';\n /**\n * Sets the variant of divider\n *\n * @default 'normal'\n */\n variant?: 'normal' | 'subtle' | 'muted';\n /**\n * Sets the thickness of divider\n *\n * @default 'thin'\n */\n thickness?: 'thinner' | 'thin' | 'thick' | 'thicker';\n /**\n * Sets the height of divider. Divider uses Flex by default, use height only when parent is not flex.\n *\n */\n height?: CSSObject['height'];\n /**\n * Sets the width of divider. Divider uses Flex by default, use width only when parent is not flex.\n *\n */\n width?: CSSObject['width'];\n} & TestID &\n StyledPropsBlade;\n\nconst StyledDivider = styled(BaseBox)<{\n borderPosition: 'borderBottom' | 'borderLeft';\n dividerStyle: NonNullable<DividerProps['dividerStyle']>;\n thickness: NonNullable<DividerProps['thickness']>;\n height: DividerProps['height'];\n width: DividerProps['width'];\n isDividerHorizontal: boolean;\n}>(({ theme, borderPosition, dividerStyle, thickness, isDividerHorizontal, width, height }) => ({\n borderWidth: 0,\n [`${borderPosition}Style`]: dividerStyle,\n [`${borderPosition}Width`]: makeBorderSize(theme.border.width[thickness]),\n ...(isDividerHorizontal ? { flexGrow: 1, width } : { alignSelf: 'stretch', height }),\n}));\n\nconst _Divider = (\n {\n orientation = 'horizontal',\n dividerStyle = 'solid',\n variant = 'muted',\n thickness = 'thin',\n height,\n width,\n testID,\n ...styledProps\n }: DividerProps,\n ref: React.Ref<BladeElementRef>,\n): React.ReactElement => {\n const isDividerHorizontal = orientation === 'horizontal';\n const borderPosition = isDividerHorizontal ? 'borderBottom' : 'borderLeft';\n const borderColor = { [`${borderPosition}Color`]: `surface.border.gray.${variant}` };\n const accessibilityProps = isReactNative()\n ? {}\n : makeAccessible({\n role: 'separator',\n });\n\n return (\n <StyledDivider\n ref={ref as never}\n borderPosition={borderPosition}\n isDividerHorizontal={isDividerHorizontal}\n dividerStyle={dividerStyle}\n thickness={thickness}\n height={height}\n width={width}\n {...borderColor}\n {...metaAttribute({ name: MetaConstants.Divider, testID })}\n {...getStyledProps(styledProps)}\n {...accessibilityProps}\n />\n );\n};\n\nconst Divider = React.forwardRef(_Divider);\n\nexport { Divider };\nexport type { DividerProps };\n"],"names":["StyledDivider","styled","BaseBox","_ref","theme","borderPosition","dividerStyle","thickness","isDividerHorizontal","width","height","Object","assign","_defineProperty","borderWidth","makeBorderSize","border","flexGrow","alignSelf","_Divider","_ref2","ref","_ref2$orientation","orientation","_ref2$dividerStyle","_ref2$variant","variant","_ref2$thickness","testID","styledProps","_objectWithoutProperties","_excluded","borderColor","accessibilityProps","isReactNative","makeAccessible","role","_jsx","metaAttribute","name","MetaConstants","Divider","getSt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WithoutProperties';
2
- import '../Typography/BaseText/BaseText.native.js';
3
- import 'react';
4
- import { throwBladeError } from '../../utils/logger/logger.js';
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';
1
+ import '../Typography/Heading/Heading.js';
11
2
  import { Text } from '../Typography/Text/Text.js';
12
3
  import '../Typography/Code/Code.js';
4
+ import '../Typography/Display/Display.js';
5
+ import { throwBladeError } from '../../utils/logger/logger.js';
6
+ import { jsx } from 'react/jsx-runtime';
13
7
 
14
8
  var Drawer=function Drawer(_props){throwBladeError({message:'Drawer is not yet implemented for native',moduleName:'Drawer'});return jsx(Text,{children:"Drawer Component is not available for Native mobile apps."});};
15
9
 
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.native.js","sources":["../../../../../src/components/Drawer/Drawer.native.tsx"],"sourcesContent":["import type { DrawerProps } from './types';\nimport { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst Drawer = (_props: DrawerProps): React.ReactElement => {\n throwBladeError({\n message: 'Drawer is not yet implemented for native',\n moduleName: 'Drawer',\n });\n\n return <Text>Drawer Component is not available for Native mobile apps.</Text>;\n};\n\nexport { Drawer };\n"],"names":["Drawer","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;;;;;;;AAIM,IAAAA,MAAM,CAAG,SAATA,MAAMA,CAAIC,MAAmB,CAAyB,CAC1DC,eAAe,CAAC,CACdC,OAAO,CAAE,0CAA0C,CACnDC,UAAU,CAAE,QACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,2DAAyD,CAAM,CAAC,CAC/E;;;;"}
1
+ {"version":3,"file":"Drawer.native.js","sources":["../../../../../src/components/Drawer/Drawer.native.tsx"],"sourcesContent":["import type { DrawerProps } from './types';\nimport { Text } from '~components/Typography';\nimport { throwBladeError } from '~utils/logger';\n\nconst Drawer = (_props: DrawerProps): React.ReactElement => {\n throwBladeError({\n message: 'Drawer is not yet implemented for native',\n moduleName: 'Drawer',\n });\n\n return <Text>Drawer Component is not available for Native mobile apps.</Text>;\n};\n\nexport { Drawer };\n"],"names":["Drawer","_props","throwBladeError","message","moduleName","_jsx","Text","children"],"mappings":";;;;;;;AAIM,IAAAA,MAAM,CAAG,SAATA,MAAMA,CAAIC,MAAmB,CAAyB,CAC1DC,eAAe,CAAC,CACdC,OAAO,CAAE,0CAA0C,CACnDC,UAAU,CAAE,QACd,CAAC,CAAC,CAEF,OAAOC,GAAA,CAACC,IAAI,CAAA,CAAAC,QAAA,CAAC,2DAAyD,CAAM,CAAC,CAC/E;;;;"}