@razorpay/blade 10.23.5 → 11.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 (874) hide show
  1. package/build/lib/native/components/Accordion/AccordionButton.native.js +2 -3
  2. package/build/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
  3. package/build/lib/native/components/Accordion/AccordionItem.js +1 -1
  4. package/build/lib/native/components/Accordion/AccordionItem.js.map +1 -1
  5. package/build/lib/native/components/Accordion/commonStyles.js +1 -1
  6. package/build/lib/native/components/Accordion/commonStyles.js.map +1 -1
  7. package/build/lib/native/components/ActionList/ActionList.js +2 -3
  8. package/build/lib/native/components/ActionList/ActionList.js.map +1 -1
  9. package/build/lib/native/components/ActionList/ActionListBox.native.js +4 -1
  10. package/build/lib/native/components/ActionList/ActionListBox.native.js.map +1 -1
  11. package/build/lib/native/components/ActionList/ActionListItem.js +1 -2
  12. package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
  13. package/build/lib/native/components/ActionList/ActionListNoResults.js +1 -1
  14. package/build/lib/native/components/ActionList/ActionListNoResults.js.map +1 -1
  15. package/build/lib/native/components/ActionList/actionListUtils.js +1 -1
  16. package/build/lib/native/components/ActionList/actionListUtils.js.map +1 -1
  17. package/build/lib/native/components/ActionList/styles/StyledActionListItem.native.js +1 -1
  18. package/build/lib/native/components/ActionList/styles/StyledActionListItem.native.js.map +1 -1
  19. package/build/lib/native/components/Alert/Alert.js +1 -3
  20. package/build/lib/native/components/Alert/Alert.js.map +1 -1
  21. package/build/lib/native/components/Alert/styles.js +1 -1
  22. package/build/lib/native/components/Alert/styles.js.map +1 -1
  23. package/build/lib/native/components/Amount/Amount.js +7 -3
  24. package/build/lib/native/components/Amount/Amount.js.map +1 -1
  25. package/build/lib/native/components/Amount/amountTokens.js +2 -2
  26. package/build/lib/native/components/Amount/amountTokens.js.map +1 -1
  27. package/build/lib/native/components/Badge/Badge.js +3 -2
  28. package/build/lib/native/components/Badge/Badge.js.map +1 -1
  29. package/build/lib/native/components/Badge/badgeTokens.js +4 -2
  30. package/build/lib/native/components/Badge/badgeTokens.js.map +1 -1
  31. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +1 -2
  32. package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  33. package/build/lib/native/components/BottomSheet/BottomSheet.native.js +1 -1
  34. package/build/lib/native/components/BottomSheet/BottomSheet.native.js.map +1 -1
  35. package/build/lib/native/components/BottomSheet/BottomSheetBackdrop.native.js +1 -1
  36. package/build/lib/native/components/BottomSheet/BottomSheetBackdrop.native.js.map +1 -1
  37. package/build/lib/native/components/BottomSheet/BottomSheetCommon.js +2 -2
  38. package/build/lib/native/components/BottomSheet/BottomSheetCommon.js.map +1 -1
  39. package/build/lib/native/components/BottomSheet/BottomSheetFooter.native.js +2 -9
  40. package/build/lib/native/components/BottomSheet/BottomSheetFooter.native.js.map +1 -1
  41. package/build/lib/native/components/BottomSheet/getBottomSheetGrabHandleStyles.js +1 -1
  42. package/build/lib/native/components/BottomSheet/getBottomSheetGrabHandleStyles.js.map +1 -1
  43. package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js +1 -1
  44. package/build/lib/native/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
  45. package/build/lib/native/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  46. package/build/lib/native/components/Button/BaseButton/BaseButton.js +2 -2
  47. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  48. package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js +1 -1
  49. package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js.map +1 -1
  50. package/build/lib/native/components/Button/BaseButton/buttonTokens.js +2 -2
  51. package/build/lib/native/components/Button/BaseButton/buttonTokens.js.map +1 -1
  52. package/build/lib/native/components/Button/BaseButton/getStyledBaseButtonStyles.js +1 -1
  53. package/build/lib/native/components/Button/BaseButton/getStyledBaseButtonStyles.js.map +1 -1
  54. package/build/lib/native/components/Button/Button/Button.js +1 -1
  55. package/build/lib/native/components/Button/Button/Button.js.map +1 -1
  56. package/build/lib/native/components/Button/IconButton/IconButton.js +1 -1
  57. package/build/lib/native/components/Button/IconButton/IconButton.js.map +1 -1
  58. package/build/lib/native/components/Button/IconButton/StyledIconButton.native.js +1 -1
  59. package/build/lib/native/components/Button/IconButton/StyledIconButton.native.js.map +1 -1
  60. package/build/lib/native/components/Card/Card.js +1 -1
  61. package/build/lib/native/components/Card/Card.js.map +1 -1
  62. package/build/lib/native/components/Card/CardFooter.js +1 -1
  63. package/build/lib/native/components/Card/CardFooter.js.map +1 -1
  64. package/build/lib/native/components/Card/CardHeader.js +3 -3
  65. package/build/lib/native/components/Card/CardHeader.js.map +1 -1
  66. package/build/lib/native/components/Card/CardRoot.native.js +1 -1
  67. package/build/lib/native/components/Card/CardRoot.native.js.map +1 -1
  68. package/build/lib/native/components/Card/CardSurface.native.js +1 -1
  69. package/build/lib/native/components/Card/CardSurface.native.js.map +1 -1
  70. package/build/lib/native/components/Carousel/Carousel.native.js +2 -1
  71. package/build/lib/native/components/Carousel/Carousel.native.js.map +1 -1
  72. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js +2 -1
  73. package/build/lib/native/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  74. package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js +1 -1
  75. package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
  76. package/build/lib/native/components/Carousel/NavigationButton/StyledNavigationButton.native.js +7 -1
  77. package/build/lib/native/components/Carousel/NavigationButton/StyledNavigationButton.native.js.map +1 -1
  78. package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js +2 -1
  79. package/build/lib/native/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  80. package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -1
  81. package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
  82. package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js +1 -1
  83. package/build/lib/native/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js.map +1 -1
  84. package/build/lib/native/components/Checkbox/checkboxTokens.js +1 -1
  85. package/build/lib/native/components/Checkbox/checkboxTokens.js.map +1 -1
  86. package/build/lib/native/components/Chip/AnimatedChip.native.js +1 -1
  87. package/build/lib/native/components/Chip/AnimatedChip.native.js.map +1 -1
  88. package/build/lib/native/components/Chip/Chip.js +1 -1
  89. package/build/lib/native/components/Chip/Chip.js.map +1 -1
  90. package/build/lib/native/components/Chip/ChipGroup.js +1 -1
  91. package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
  92. package/build/lib/native/components/Chip/chipTokens.js +1 -1
  93. package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
  94. package/build/lib/native/components/Chip/getAnimatedChipStyles.js +1 -1
  95. package/build/lib/native/components/Chip/getAnimatedChipStyles.js.map +1 -1
  96. package/build/lib/native/components/Chip/useChipGroup.js +1 -1
  97. package/build/lib/native/components/Chip/useChipGroup.js.map +1 -1
  98. package/build/lib/native/components/Counter/Counter.js +3 -3
  99. package/build/lib/native/components/Counter/Counter.js.map +1 -1
  100. package/build/lib/native/components/Counter/counterTokens.js +2 -2
  101. package/build/lib/native/components/Counter/counterTokens.js.map +1 -1
  102. package/build/lib/native/components/Divider/Divider.js +1 -1
  103. package/build/lib/native/components/Divider/Divider.js.map +1 -1
  104. package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
  105. package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
  106. package/build/lib/native/components/Dropdown/StyledDropdownOverlay.js +1 -1
  107. package/build/lib/native/components/Dropdown/StyledDropdownOverlay.js.map +1 -1
  108. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js +1 -1
  109. package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  110. package/build/lib/native/components/Form/FormHint.js +2 -2
  111. package/build/lib/native/components/Form/FormHint.js.map +1 -1
  112. package/build/lib/native/components/Form/FormLabel.js +2 -2
  113. package/build/lib/native/components/Form/FormLabel.js.map +1 -1
  114. package/build/lib/native/components/Form/Selector/SelectorSupportText.js +4 -2
  115. package/build/lib/native/components/Form/Selector/SelectorSupportText.js.map +1 -1
  116. package/build/lib/native/components/Form/Selector/SelectorTitle.js +2 -2
  117. package/build/lib/native/components/Form/Selector/SelectorTitle.js.map +1 -1
  118. package/build/lib/native/components/Icons/useIconProps/useIconProps.js +1 -1
  119. package/build/lib/native/components/Icons/useIconProps/useIconProps.js.map +1 -1
  120. package/build/lib/native/components/Indicator/Indicator.js +1 -1
  121. package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
  122. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
  123. package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
  124. package/build/lib/native/components/Input/BaseInput/BaseInputAnimatedBorder.native.js +1 -1
  125. package/build/lib/native/components/Input/BaseInput/BaseInputAnimatedBorder.native.js.map +1 -1
  126. package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js +1 -1
  127. package/build/lib/native/components/Input/BaseInput/BaseInputTagSlot.native.js.map +1 -1
  128. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
  129. package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  130. package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
  131. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +1 -1
  132. package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
  133. package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +1 -1
  134. package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
  135. package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js +1 -1
  136. package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
  137. package/build/lib/native/components/Link/BaseLink/BaseLink.js +3 -3
  138. package/build/lib/native/components/Link/BaseLink/BaseLink.js.map +1 -1
  139. package/build/lib/native/components/Link/BaseLink/StyledBaseLink.native.js +1 -1
  140. package/build/lib/native/components/Link/BaseLink/StyledBaseLink.native.js.map +1 -1
  141. package/build/lib/native/components/Link/Link/Link.js +1 -1
  142. package/build/lib/native/components/Link/Link/Link.js.map +1 -1
  143. package/build/lib/native/components/List/List.js +1 -1
  144. package/build/lib/native/components/List/List.js.map +1 -1
  145. package/build/lib/native/components/List/ListItem.js +1 -1
  146. package/build/lib/native/components/List/ListItem.js.map +1 -1
  147. package/build/lib/native/components/List/ListItemIcons.js +4 -1
  148. package/build/lib/native/components/List/ListItemIcons.js.map +1 -1
  149. package/build/lib/native/components/Popover/Popover.native.js +1 -1
  150. package/build/lib/native/components/Popover/Popover.native.js.map +1 -1
  151. package/build/lib/native/components/Popover/PopoverContent.js +2 -3
  152. package/build/lib/native/components/Popover/PopoverContent.js.map +1 -1
  153. package/build/lib/native/components/Popover/getPopoverContentWrapperStyles.js +1 -1
  154. package/build/lib/native/components/Popover/getPopoverContentWrapperStyles.js.map +1 -1
  155. package/build/lib/native/components/ProgressBar/ProgressBar.js +14 -18
  156. package/build/lib/native/components/ProgressBar/ProgressBar.js.map +1 -1
  157. package/build/lib/native/components/Radio/Radio.js +1 -1
  158. package/build/lib/native/components/Radio/Radio.js.map +1 -1
  159. package/build/lib/native/components/Radio/RadioIcon/RadioIcon.js +1 -1
  160. package/build/lib/native/components/Radio/RadioIcon/RadioIcon.js.map +1 -1
  161. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
  162. package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  163. package/build/lib/native/components/Radio/radioTokens.js +1 -1
  164. package/build/lib/native/components/Radio/radioTokens.js.map +1 -1
  165. package/build/lib/native/components/Skeleton/PulseAnimation.native.js +1 -2
  166. package/build/lib/native/components/Skeleton/PulseAnimation.native.js.map +1 -1
  167. package/build/lib/native/components/Skeleton/Skeleton.js +1 -1
  168. package/build/lib/native/components/Skeleton/Skeleton.js.map +1 -1
  169. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +1 -1
  170. package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  171. package/build/lib/native/components/Spinner/Spinner/Spinner.js +1 -1
  172. package/build/lib/native/components/Spinner/Spinner/Spinner.js.map +1 -1
  173. package/build/lib/native/components/Switch/switchTokens.js +1 -1
  174. package/build/lib/native/components/Switch/switchTokens.js.map +1 -1
  175. package/build/lib/native/components/Tabs/TabIndicator.native.js +1 -1
  176. package/build/lib/native/components/Tabs/TabIndicator.native.js.map +1 -1
  177. package/build/lib/native/components/Tabs/Tabs.native.js +3 -2
  178. package/build/lib/native/components/Tabs/Tabs.native.js.map +1 -1
  179. package/build/lib/native/components/Tabs/tabTokens.js +2 -2
  180. package/build/lib/native/components/Tabs/tabTokens.js.map +1 -1
  181. package/build/lib/native/components/Tag/Tag.js +1 -1
  182. package/build/lib/native/components/Tag/Tag.js.map +1 -1
  183. package/build/lib/native/components/Tooltip/Tooltip.native.js +1 -1
  184. package/build/lib/native/components/Tooltip/Tooltip.native.js.map +1 -1
  185. package/build/lib/native/components/Tooltip/TooltipContent.js +1 -1
  186. package/build/lib/native/components/Tooltip/TooltipContent.js.map +1 -1
  187. package/build/lib/native/components/Tooltip/getTooltipContentWrapperStyles.js +1 -1
  188. package/build/lib/native/components/Tooltip/getTooltipContentWrapperStyles.js.map +1 -1
  189. package/build/lib/native/components/Typography/BaseText/BaseText.native.js +1 -1
  190. package/build/lib/native/components/Typography/BaseText/BaseText.native.js.map +1 -1
  191. package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js +2 -1
  192. package/build/lib/native/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
  193. package/build/lib/native/components/Typography/Code/Code.js +1 -1
  194. package/build/lib/native/components/Typography/Code/Code.js.map +1 -1
  195. package/build/lib/native/components/Typography/Display/Display.js +1 -1
  196. package/build/lib/native/components/Typography/Display/Display.js.map +1 -1
  197. package/build/lib/native/components/Typography/Heading/Heading.js +1 -2
  198. package/build/lib/native/components/Typography/Heading/Heading.js.map +1 -1
  199. package/build/lib/native/components/Typography/Text/Text.js +1 -1
  200. package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
  201. package/build/lib/native/components/Typography/Text/getTextStyles.js +1 -1
  202. package/build/lib/native/components/Typography/Text/getTextStyles.js.map +1 -1
  203. package/build/lib/native/components/index.js +37 -38
  204. package/build/lib/native/components/index.js.map +1 -1
  205. package/build/lib/native/tokens/global/border.js +1 -1
  206. package/build/lib/native/tokens/global/border.js.map +1 -1
  207. package/build/lib/native/tokens/global/colors.js +1 -1
  208. package/build/lib/native/tokens/global/colors.js.map +1 -1
  209. package/build/lib/native/tokens/global/elevation/elevation.native.js +1 -1
  210. package/build/lib/native/tokens/global/elevation/elevation.native.js.map +1 -1
  211. package/build/lib/native/tokens/global/fontFamily/fontFamily.native.js +1 -1
  212. package/build/lib/native/tokens/global/fontFamily/fontFamily.native.js.map +1 -1
  213. package/build/lib/native/tokens/global/motion.js.map +1 -1
  214. package/build/lib/native/tokens/global/opacity.js +1 -1
  215. package/build/lib/native/tokens/global/opacity.js.map +1 -1
  216. package/build/lib/native/tokens/global/typography.js +1 -1
  217. package/build/lib/native/tokens/global/typography.js.map +1 -1
  218. package/build/lib/native/tokens/index.js +1 -2
  219. package/build/lib/native/tokens/index.js.map +1 -1
  220. package/build/lib/native/tokens/theme/bladeTheme.js +13 -0
  221. package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -0
  222. package/build/lib/native/tokens/theme/createTheme.js +2 -2
  223. package/build/lib/native/tokens/theme/createTheme.js.map +1 -1
  224. package/build/lib/native/tokens/theme/overrideTheme.js +3 -3
  225. package/build/lib/native/tokens/theme/overrideTheme.js.map +1 -1
  226. package/build/lib/native/tokens/theme/theme.js.map +1 -1
  227. package/build/lib/native/utils/getFocusRingStyles/getFocusRingStyles.native.js +4 -0
  228. package/build/lib/native/utils/getFocusRingStyles/getFocusRingStyles.native.js.map +1 -0
  229. package/build/lib/native/utils/lodashButBetter/get.js.map +1 -1
  230. package/build/lib/native/utils/lodashButBetter/isEmpty.js.map +1 -1
  231. package/build/lib/native/utils/makeLetterSpacing/makeLetterSpacing.js +4 -0
  232. package/build/lib/native/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -0
  233. package/build/lib/native/utils/objectKeysWithType.js +4 -0
  234. package/build/lib/native/utils/objectKeysWithType.js.map +1 -0
  235. package/build/lib/native/utils/useInteraction.js +1 -1
  236. package/build/lib/native/utils/useInteraction.js.map +1 -1
  237. package/build/lib/web/development/components/Accordion/AccordionButton.web.js +8 -6
  238. package/build/lib/web/development/components/Accordion/AccordionButton.web.js.map +1 -1
  239. package/build/lib/web/development/components/Accordion/AccordionItem.js +1 -1
  240. package/build/lib/web/development/components/Accordion/AccordionItem.js.map +1 -1
  241. package/build/lib/web/development/components/Accordion/StyledAccordionButton.web.js +10 -11
  242. package/build/lib/web/development/components/Accordion/StyledAccordionButton.web.js.map +1 -1
  243. package/build/lib/web/development/components/Accordion/commonStyles.js +3 -6
  244. package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
  245. package/build/lib/web/development/components/ActionList/ActionList.js +21 -48
  246. package/build/lib/web/development/components/ActionList/ActionList.js.map +1 -1
  247. package/build/lib/web/development/components/ActionList/ActionListItem.js +6 -12
  248. package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
  249. package/build/lib/web/development/components/ActionList/ActionListNoResults.js +3 -3
  250. package/build/lib/web/development/components/ActionList/ActionListNoResults.js.map +1 -1
  251. package/build/lib/web/development/components/ActionList/actionListUtils.js +3 -3
  252. package/build/lib/web/development/components/ActionList/actionListUtils.js.map +1 -1
  253. package/build/lib/web/development/components/ActionList/index.js +1 -1
  254. package/build/lib/web/development/components/ActionList/styles/StyledActionListItem.web.js +6 -3
  255. package/build/lib/web/development/components/ActionList/styles/StyledActionListItem.web.js.map +1 -1
  256. package/build/lib/web/development/components/Alert/Alert.js +36 -52
  257. package/build/lib/web/development/components/Alert/Alert.js.map +1 -1
  258. package/build/lib/web/development/components/Alert/styles.js +3 -7
  259. package/build/lib/web/development/components/Alert/styles.js.map +1 -1
  260. package/build/lib/web/development/components/Amount/Amount.js +141 -76
  261. package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
  262. package/build/lib/web/development/components/Amount/amountTokens.js +67 -34
  263. package/build/lib/web/development/components/Amount/amountTokens.js.map +1 -1
  264. package/build/lib/web/development/components/Badge/Badge.js +26 -35
  265. package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
  266. package/build/lib/web/development/components/Badge/badgeTokens.js +7 -5
  267. package/build/lib/web/development/components/Badge/badgeTokens.js.map +1 -1
  268. package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +7 -7
  269. package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  270. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js +3 -3
  271. package/build/lib/web/development/components/BottomSheet/BottomSheet.web.js.map +1 -1
  272. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js +1 -5
  273. package/build/lib/web/development/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  274. package/build/lib/web/development/components/BottomSheet/BottomSheetCommon.js +1 -5
  275. package/build/lib/web/development/components/BottomSheet/BottomSheetCommon.js.map +1 -1
  276. package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js +1 -5
  277. package/build/lib/web/development/components/BottomSheet/BottomSheetFooter.web.js.map +1 -1
  278. package/build/lib/web/development/components/BottomSheet/getBottomSheetGrabHandleStyles.js +1 -1
  279. package/build/lib/web/development/components/BottomSheet/getBottomSheetGrabHandleStyles.js.map +1 -1
  280. package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js +15 -4
  281. package/build/lib/web/development/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
  282. package/build/lib/web/development/components/Box/BaseBox/getResponsiveValue.web.js.map +1 -1
  283. package/build/lib/web/development/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  284. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +103 -91
  285. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  286. package/build/lib/web/development/components/Button/BaseButton/StyledBaseButton.web.js +4 -4
  287. package/build/lib/web/development/components/Button/BaseButton/StyledBaseButton.web.js.map +1 -1
  288. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js +113 -6
  289. package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
  290. package/build/lib/web/development/components/Button/BaseButton/getStyledBaseButtonStyles.js +2 -1
  291. package/build/lib/web/development/components/Button/BaseButton/getStyledBaseButtonStyles.js.map +1 -1
  292. package/build/lib/web/development/components/Button/Button/Button.js +1 -1
  293. package/build/lib/web/development/components/Button/Button/Button.js.map +1 -1
  294. package/build/lib/web/development/components/Button/IconButton/IconButton.js +3 -3
  295. package/build/lib/web/development/components/Button/IconButton/IconButton.js.map +1 -1
  296. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +15 -14
  297. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  298. package/build/lib/web/development/components/Card/Card.js +8 -5
  299. package/build/lib/web/development/components/Card/Card.js.map +1 -1
  300. package/build/lib/web/development/components/Card/CardFooter.js +13 -9
  301. package/build/lib/web/development/components/Card/CardFooter.js.map +1 -1
  302. package/build/lib/web/development/components/Card/CardHeader.js +28 -15
  303. package/build/lib/web/development/components/Card/CardHeader.js.map +1 -1
  304. package/build/lib/web/development/components/Card/CardRoot.web.js +2 -2
  305. package/build/lib/web/development/components/Card/CardRoot.web.js.map +1 -1
  306. package/build/lib/web/development/components/Card/CardSurface.web.js +2 -5
  307. package/build/lib/web/development/components/Card/CardSurface.web.js.map +1 -1
  308. package/build/lib/web/development/components/Card/index.js +1 -1
  309. package/build/lib/web/development/components/Carousel/Carousel.web.js.map +1 -1
  310. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js +9 -9
  311. package/build/lib/web/development/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  312. package/build/lib/web/development/components/Carousel/NavigationButton/NavigationButton.js +2 -2
  313. package/build/lib/web/development/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
  314. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js +23 -30
  315. package/build/lib/web/development/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  316. package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -3
  317. package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
  318. package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js +2 -2
  319. package/build/lib/web/development/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js.map +1 -1
  320. package/build/lib/web/development/components/Checkbox/checkboxTokens.js +17 -16
  321. package/build/lib/web/development/components/Checkbox/checkboxTokens.js.map +1 -1
  322. package/build/lib/web/development/components/Chip/AnimatedChip.web.js +2 -2
  323. package/build/lib/web/development/components/Chip/AnimatedChip.web.js.map +1 -1
  324. package/build/lib/web/development/components/Chip/Chip.js +6 -11
  325. package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
  326. package/build/lib/web/development/components/Chip/ChipGroup.js +3 -5
  327. package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
  328. package/build/lib/web/development/components/Chip/StyledChipWrapper.web.js +2 -2
  329. package/build/lib/web/development/components/Chip/StyledChipWrapper.web.js.map +1 -1
  330. package/build/lib/web/development/components/Chip/chipTokens.js +38 -38
  331. package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
  332. package/build/lib/web/development/components/Chip/getAnimatedChipStyles.js +1 -1
  333. package/build/lib/web/development/components/Chip/getAnimatedChipStyles.js.map +1 -1
  334. package/build/lib/web/development/components/Chip/useChipGroup.js +1 -3
  335. package/build/lib/web/development/components/Chip/useChipGroup.js.map +1 -1
  336. package/build/lib/web/development/components/Counter/Counter.js +25 -44
  337. package/build/lib/web/development/components/Counter/Counter.js.map +1 -1
  338. package/build/lib/web/development/components/Counter/counterTokens.js +5 -5
  339. package/build/lib/web/development/components/Counter/counterTokens.js.map +1 -1
  340. package/build/lib/web/development/components/Divider/Divider.js +6 -8
  341. package/build/lib/web/development/components/Divider/Divider.js.map +1 -1
  342. package/build/lib/web/development/components/Dropdown/Dropdown.js +1 -5
  343. package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
  344. package/build/lib/web/development/components/Dropdown/StyledDropdownOverlay.js +2 -2
  345. package/build/lib/web/development/components/Dropdown/StyledDropdownOverlay.js.map +1 -1
  346. package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js +1 -1
  347. package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  348. package/build/lib/web/development/components/Form/FormHint.js +11 -13
  349. package/build/lib/web/development/components/Form/FormHint.js.map +1 -1
  350. package/build/lib/web/development/components/Form/FormLabel.js +9 -17
  351. package/build/lib/web/development/components/Form/FormLabel.js.map +1 -1
  352. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js +5 -5
  353. package/build/lib/web/development/components/Form/Selector/SelectorInput.web.js.map +1 -1
  354. package/build/lib/web/development/components/Form/Selector/SelectorSupportText.js +16 -11
  355. package/build/lib/web/development/components/Form/Selector/SelectorSupportText.js.map +1 -1
  356. package/build/lib/web/development/components/Form/Selector/SelectorTitle.js +5 -16
  357. package/build/lib/web/development/components/Form/Selector/SelectorTitle.js.map +1 -1
  358. package/build/lib/web/development/components/Icons/_Svg/Circle/Circle.web.js +4 -2
  359. package/build/lib/web/development/components/Icons/_Svg/Circle/Circle.web.js.map +1 -1
  360. package/build/lib/web/development/components/Icons/_Svg/Rect/Rect.web.js +4 -2
  361. package/build/lib/web/development/components/Icons/_Svg/Rect/Rect.web.js.map +1 -1
  362. package/build/lib/web/development/components/Icons/_Svg/Svg/Svg.web.js +4 -2
  363. package/build/lib/web/development/components/Icons/_Svg/Svg/Svg.web.js.map +1 -1
  364. package/build/lib/web/development/components/Icons/useIconProps/useIconProps.js +1 -1
  365. package/build/lib/web/development/components/Icons/useIconProps/useIconProps.js.map +1 -1
  366. package/build/lib/web/development/components/Indicator/Indicator.js +9 -16
  367. package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
  368. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  369. package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  370. package/build/lib/web/development/components/Input/BaseInput/BaseInputAnimatedBorder.web.js +2 -2
  371. package/build/lib/web/development/components/Input/BaseInput/BaseInputAnimatedBorder.web.js.map +1 -1
  372. package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +4 -1
  373. package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
  374. package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +4 -6
  375. package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  376. package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
  377. package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +3 -4
  378. package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
  379. package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +11 -12
  380. package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
  381. package/build/lib/web/development/components/Input/DropdownInputTriggers/Chevron.js +1 -1
  382. package/build/lib/web/development/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
  383. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js +20 -32
  384. package/build/lib/web/development/components/Link/BaseLink/BaseLink.js.map +1 -1
  385. package/build/lib/web/development/components/Link/Link/Link.js +1 -1
  386. package/build/lib/web/development/components/Link/Link/Link.js.map +1 -1
  387. package/build/lib/web/development/components/List/List.js +1 -3
  388. package/build/lib/web/development/components/List/List.js.map +1 -1
  389. package/build/lib/web/development/components/List/ListItem.js +3 -3
  390. package/build/lib/web/development/components/List/ListItem.js.map +1 -1
  391. package/build/lib/web/development/components/List/ListItemIcons.js +11 -7
  392. package/build/lib/web/development/components/List/ListItemIcons.js.map +1 -1
  393. package/build/lib/web/development/components/Modal/Modal.web.js +1 -1
  394. package/build/lib/web/development/components/Modal/Modal.web.js.map +1 -1
  395. package/build/lib/web/development/components/Modal/ModalBackdrop.js +1 -1
  396. package/build/lib/web/development/components/Modal/ModalBackdrop.js.map +1 -1
  397. package/build/lib/web/development/components/Modal/ModalHeader.web.js +1 -5
  398. package/build/lib/web/development/components/Modal/ModalHeader.web.js.map +1 -1
  399. package/build/lib/web/development/components/Popover/Popover.web.js +2 -2
  400. package/build/lib/web/development/components/Popover/Popover.web.js.map +1 -1
  401. package/build/lib/web/development/components/Popover/PopoverContent.js +4 -5
  402. package/build/lib/web/development/components/Popover/PopoverContent.js.map +1 -1
  403. package/build/lib/web/development/components/Popover/PopoverInteractiveWrapper.web.js +5 -5
  404. package/build/lib/web/development/components/Popover/PopoverInteractiveWrapper.web.js.map +1 -1
  405. package/build/lib/web/development/components/Popover/getPopoverContentWrapperStyles.js +2 -2
  406. package/build/lib/web/development/components/Popover/getPopoverContentWrapperStyles.js.map +1 -1
  407. package/build/lib/web/development/components/ProgressBar/ProgressBar.js +9 -13
  408. package/build/lib/web/development/components/ProgressBar/ProgressBar.js.map +1 -1
  409. package/build/lib/web/development/components/Radio/Radio.js +1 -0
  410. package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
  411. package/build/lib/web/development/components/Radio/RadioIcon/RadioIcon.js +2 -1
  412. package/build/lib/web/development/components/Radio/RadioIcon/RadioIcon.js.map +1 -1
  413. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +2 -2
  414. package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  415. package/build/lib/web/development/components/Radio/radioTokens.js +23 -22
  416. package/build/lib/web/development/components/Radio/radioTokens.js.map +1 -1
  417. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js +4 -7
  418. package/build/lib/web/development/components/Skeleton/PulseAnimation.web.js.map +1 -1
  419. package/build/lib/web/development/components/Skeleton/Skeleton.js +3 -6
  420. package/build/lib/web/development/components/Skeleton/Skeleton.js.map +1 -1
  421. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +9 -14
  422. package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  423. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js +2 -5
  424. package/build/lib/web/development/components/Spinner/Spinner/Spinner.js.map +1 -1
  425. package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js +1 -1
  426. package/build/lib/web/development/components/SpotlightPopoverTour/TourFooter.web.js.map +1 -1
  427. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  428. package/build/lib/web/development/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  429. package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js +2 -2
  430. package/build/lib/web/development/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
  431. package/build/lib/web/development/components/Switch/switchTokens.js +10 -10
  432. package/build/lib/web/development/components/Switch/switchTokens.js.map +1 -1
  433. package/build/lib/web/development/components/Table/Table.web.js +9 -9
  434. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  435. package/build/lib/web/development/components/Table/TableBody.web.js +14 -12
  436. package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
  437. package/build/lib/web/development/components/Table/TableContext.js +2 -2
  438. package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
  439. package/build/lib/web/development/components/Table/TableFooter.web.js +7 -7
  440. package/build/lib/web/development/components/Table/TableFooter.web.js.map +1 -1
  441. package/build/lib/web/development/components/Table/TableHeader.web.js +18 -16
  442. package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
  443. package/build/lib/web/development/components/Table/TablePagination.web.js +6 -5
  444. package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
  445. package/build/lib/web/development/components/Table/TableToolbar.web.js +4 -3
  446. package/build/lib/web/development/components/Table/TableToolbar.web.js.map +1 -1
  447. package/build/lib/web/development/components/Table/tokens.js +41 -43
  448. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  449. package/build/lib/web/development/components/Tabs/TabIndicator.web.js +7 -6
  450. package/build/lib/web/development/components/Tabs/TabIndicator.web.js.map +1 -1
  451. package/build/lib/web/development/components/Tabs/TabItem.web.js +17 -14
  452. package/build/lib/web/development/components/Tabs/TabItem.web.js.map +1 -1
  453. package/build/lib/web/development/components/Tabs/TabList.web.js +7 -5
  454. package/build/lib/web/development/components/Tabs/TabList.web.js.map +1 -1
  455. package/build/lib/web/development/components/Tabs/tabTokens.js +38 -41
  456. package/build/lib/web/development/components/Tabs/tabTokens.js.map +1 -1
  457. package/build/lib/web/development/components/Tag/Tag.js +7 -5
  458. package/build/lib/web/development/components/Tag/Tag.js.map +1 -1
  459. package/build/lib/web/development/components/Tooltip/Tooltip.web.js +2 -2
  460. package/build/lib/web/development/components/Tooltip/Tooltip.web.js.map +1 -1
  461. package/build/lib/web/development/components/Tooltip/TooltipContent.js +3 -4
  462. package/build/lib/web/development/components/Tooltip/TooltipContent.js.map +1 -1
  463. package/build/lib/web/development/components/Tooltip/getTooltipContentWrapperStyles.js +2 -2
  464. package/build/lib/web/development/components/Tooltip/getTooltipContentWrapperStyles.js.map +1 -1
  465. package/build/lib/web/development/components/Typography/BaseText/BaseText.web.js +10 -2
  466. package/build/lib/web/development/components/Typography/BaseText/BaseText.web.js.map +1 -1
  467. package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js +10 -2
  468. package/build/lib/web/development/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
  469. package/build/lib/web/development/components/Typography/Code/Code.js +3 -3
  470. package/build/lib/web/development/components/Typography/Code/Code.js.map +1 -1
  471. package/build/lib/web/development/components/Typography/Display/Display.js +23 -25
  472. package/build/lib/web/development/components/Typography/Display/Display.js.map +1 -1
  473. package/build/lib/web/development/components/Typography/Heading/Heading.js +30 -61
  474. package/build/lib/web/development/components/Typography/Heading/Heading.js.map +1 -1
  475. package/build/lib/web/development/components/Typography/Text/Text.js +26 -24
  476. package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
  477. package/build/lib/web/development/components/Typography/Text/getTextStyles.js +3 -5
  478. package/build/lib/web/development/components/Typography/Text/getTextStyles.js.map +1 -1
  479. package/build/lib/web/development/components/Typography/index.js +0 -1
  480. package/build/lib/web/development/components/Typography/index.js.map +1 -1
  481. package/build/lib/web/development/components/index.js +56 -57
  482. package/build/lib/web/development/components/index.js.map +1 -1
  483. package/build/lib/web/development/tokens/global/border.js +3 -0
  484. package/build/lib/web/development/tokens/global/border.js.map +1 -1
  485. package/build/lib/web/development/tokens/global/colors.js +227 -250
  486. package/build/lib/web/development/tokens/global/colors.js.map +1 -1
  487. package/build/lib/web/development/tokens/global/elevation/elevation.web.js +6 -6
  488. package/build/lib/web/development/tokens/global/elevation/elevation.web.js.map +1 -1
  489. package/build/lib/web/development/tokens/global/fontFamily/fontFamily.web.js +3 -2
  490. package/build/lib/web/development/tokens/global/fontFamily/fontFamily.web.js.map +1 -1
  491. package/build/lib/web/development/tokens/global/motion.js.map +1 -1
  492. package/build/lib/web/development/tokens/global/opacity.js +12 -9
  493. package/build/lib/web/development/tokens/global/opacity.js.map +1 -1
  494. package/build/lib/web/development/tokens/global/typography.js +37 -40
  495. package/build/lib/web/development/tokens/global/typography.js.map +1 -1
  496. package/build/lib/web/development/tokens/index.js +1 -2
  497. package/build/lib/web/development/tokens/index.js.map +1 -1
  498. package/build/lib/web/development/tokens/theme/bladeTheme.js +925 -0
  499. package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -0
  500. package/build/lib/web/development/tokens/theme/createTheme.js +123 -177
  501. package/build/lib/web/development/tokens/theme/createTheme.js.map +1 -1
  502. package/build/lib/web/development/tokens/theme/index.js +1 -2
  503. package/build/lib/web/development/tokens/theme/index.js.map +1 -1
  504. package/build/lib/web/development/tokens/theme/overrideTheme.js +4 -4
  505. package/build/lib/web/development/tokens/theme/overrideTheme.js.map +1 -1
  506. package/build/lib/web/development/tokens/theme/theme.js +1 -7
  507. package/build/lib/web/development/tokens/theme/theme.js.map +1 -1
  508. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js +26 -0
  509. package/build/lib/web/development/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -0
  510. package/build/lib/web/development/utils/getFocusRingStyles/index.js +2 -0
  511. package/build/lib/web/development/utils/lodashButBetter/get.js +8 -0
  512. package/build/lib/web/development/utils/lodashButBetter/get.js.map +1 -1
  513. package/build/lib/web/development/utils/lodashButBetter/isEmpty.js.map +1 -1
  514. package/build/lib/web/development/utils/makeLetterSpacing/index.js +2 -0
  515. package/build/lib/web/development/utils/makeLetterSpacing/makeLetterSpacing.js +7 -0
  516. package/build/lib/web/development/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -0
  517. package/build/lib/web/development/utils/objectKeysWithType.js +7 -0
  518. package/build/lib/web/development/utils/objectKeysWithType.js.map +1 -0
  519. package/build/lib/web/development/utils/useInteraction.js +3 -3
  520. package/build/lib/web/development/utils/useInteraction.js.map +1 -1
  521. package/build/lib/web/production/components/Accordion/AccordionButton.web.js +8 -6
  522. package/build/lib/web/production/components/Accordion/AccordionButton.web.js.map +1 -1
  523. package/build/lib/web/production/components/Accordion/AccordionItem.js +1 -1
  524. package/build/lib/web/production/components/Accordion/AccordionItem.js.map +1 -1
  525. package/build/lib/web/production/components/Accordion/StyledAccordionButton.web.js +10 -11
  526. package/build/lib/web/production/components/Accordion/StyledAccordionButton.web.js.map +1 -1
  527. package/build/lib/web/production/components/Accordion/commonStyles.js +3 -6
  528. package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
  529. package/build/lib/web/production/components/ActionList/ActionList.js +21 -48
  530. package/build/lib/web/production/components/ActionList/ActionList.js.map +1 -1
  531. package/build/lib/web/production/components/ActionList/ActionListItem.js +6 -12
  532. package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
  533. package/build/lib/web/production/components/ActionList/ActionListNoResults.js +3 -3
  534. package/build/lib/web/production/components/ActionList/ActionListNoResults.js.map +1 -1
  535. package/build/lib/web/production/components/ActionList/actionListUtils.js +3 -3
  536. package/build/lib/web/production/components/ActionList/actionListUtils.js.map +1 -1
  537. package/build/lib/web/production/components/ActionList/index.js +1 -1
  538. package/build/lib/web/production/components/ActionList/styles/StyledActionListItem.web.js +6 -3
  539. package/build/lib/web/production/components/ActionList/styles/StyledActionListItem.web.js.map +1 -1
  540. package/build/lib/web/production/components/Alert/Alert.js +36 -52
  541. package/build/lib/web/production/components/Alert/Alert.js.map +1 -1
  542. package/build/lib/web/production/components/Alert/styles.js +3 -7
  543. package/build/lib/web/production/components/Alert/styles.js.map +1 -1
  544. package/build/lib/web/production/components/Amount/Amount.js +141 -76
  545. package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
  546. package/build/lib/web/production/components/Amount/amountTokens.js +67 -34
  547. package/build/lib/web/production/components/Amount/amountTokens.js.map +1 -1
  548. package/build/lib/web/production/components/Badge/Badge.js +26 -35
  549. package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
  550. package/build/lib/web/production/components/Badge/badgeTokens.js +7 -5
  551. package/build/lib/web/production/components/Badge/badgeTokens.js.map +1 -1
  552. package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +7 -7
  553. package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
  554. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js +3 -3
  555. package/build/lib/web/production/components/BottomSheet/BottomSheet.web.js.map +1 -1
  556. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js +1 -5
  557. package/build/lib/web/production/components/BottomSheet/BottomSheetBackdrop.web.js.map +1 -1
  558. package/build/lib/web/production/components/BottomSheet/BottomSheetCommon.js +1 -5
  559. package/build/lib/web/production/components/BottomSheet/BottomSheetCommon.js.map +1 -1
  560. package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js +1 -5
  561. package/build/lib/web/production/components/BottomSheet/BottomSheetFooter.web.js.map +1 -1
  562. package/build/lib/web/production/components/BottomSheet/getBottomSheetGrabHandleStyles.js +1 -1
  563. package/build/lib/web/production/components/BottomSheet/getBottomSheetGrabHandleStyles.js.map +1 -1
  564. package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js +15 -4
  565. package/build/lib/web/production/components/Box/BaseBox/baseBoxStyles.js.map +1 -1
  566. package/build/lib/web/production/components/Box/BaseBox/getResponsiveValue.web.js.map +1 -1
  567. package/build/lib/web/production/components/Box/BaseBox/types/propsTypes.js.map +1 -1
  568. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +103 -91
  569. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  570. package/build/lib/web/production/components/Button/BaseButton/StyledBaseButton.web.js +4 -4
  571. package/build/lib/web/production/components/Button/BaseButton/StyledBaseButton.web.js.map +1 -1
  572. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js +113 -6
  573. package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
  574. package/build/lib/web/production/components/Button/BaseButton/getStyledBaseButtonStyles.js +2 -1
  575. package/build/lib/web/production/components/Button/BaseButton/getStyledBaseButtonStyles.js.map +1 -1
  576. package/build/lib/web/production/components/Button/Button/Button.js +1 -1
  577. package/build/lib/web/production/components/Button/Button/Button.js.map +1 -1
  578. package/build/lib/web/production/components/Button/IconButton/IconButton.js +3 -3
  579. package/build/lib/web/production/components/Button/IconButton/IconButton.js.map +1 -1
  580. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +15 -14
  581. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  582. package/build/lib/web/production/components/Card/Card.js +8 -5
  583. package/build/lib/web/production/components/Card/Card.js.map +1 -1
  584. package/build/lib/web/production/components/Card/CardFooter.js +13 -9
  585. package/build/lib/web/production/components/Card/CardFooter.js.map +1 -1
  586. package/build/lib/web/production/components/Card/CardHeader.js +28 -15
  587. package/build/lib/web/production/components/Card/CardHeader.js.map +1 -1
  588. package/build/lib/web/production/components/Card/CardRoot.web.js +2 -2
  589. package/build/lib/web/production/components/Card/CardRoot.web.js.map +1 -1
  590. package/build/lib/web/production/components/Card/CardSurface.web.js +2 -5
  591. package/build/lib/web/production/components/Card/CardSurface.web.js.map +1 -1
  592. package/build/lib/web/production/components/Card/index.js +1 -1
  593. package/build/lib/web/production/components/Carousel/Carousel.web.js.map +1 -1
  594. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js +9 -9
  595. package/build/lib/web/production/components/Carousel/Indicators/getIndicatorButtonStyles.js.map +1 -1
  596. package/build/lib/web/production/components/Carousel/NavigationButton/NavigationButton.js +2 -2
  597. package/build/lib/web/production/components/Carousel/NavigationButton/NavigationButton.js.map +1 -1
  598. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js +23 -30
  599. package/build/lib/web/production/components/Carousel/NavigationButton/getNavigationButtonStyles.js.map +1 -1
  600. package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js +1 -3
  601. package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIcon.js.map +1 -1
  602. package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js +2 -2
  603. package/build/lib/web/production/components/Checkbox/CheckboxIcon/CheckboxIconWrapperStyles.js.map +1 -1
  604. package/build/lib/web/production/components/Checkbox/checkboxTokens.js +17 -16
  605. package/build/lib/web/production/components/Checkbox/checkboxTokens.js.map +1 -1
  606. package/build/lib/web/production/components/Chip/AnimatedChip.web.js +2 -2
  607. package/build/lib/web/production/components/Chip/AnimatedChip.web.js.map +1 -1
  608. package/build/lib/web/production/components/Chip/Chip.js +6 -11
  609. package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
  610. package/build/lib/web/production/components/Chip/ChipGroup.js +3 -5
  611. package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
  612. package/build/lib/web/production/components/Chip/StyledChipWrapper.web.js +2 -2
  613. package/build/lib/web/production/components/Chip/StyledChipWrapper.web.js.map +1 -1
  614. package/build/lib/web/production/components/Chip/chipTokens.js +38 -38
  615. package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
  616. package/build/lib/web/production/components/Chip/getAnimatedChipStyles.js +1 -1
  617. package/build/lib/web/production/components/Chip/getAnimatedChipStyles.js.map +1 -1
  618. package/build/lib/web/production/components/Chip/useChipGroup.js +1 -3
  619. package/build/lib/web/production/components/Chip/useChipGroup.js.map +1 -1
  620. package/build/lib/web/production/components/Counter/Counter.js +25 -44
  621. package/build/lib/web/production/components/Counter/Counter.js.map +1 -1
  622. package/build/lib/web/production/components/Counter/counterTokens.js +5 -5
  623. package/build/lib/web/production/components/Counter/counterTokens.js.map +1 -1
  624. package/build/lib/web/production/components/Divider/Divider.js +6 -8
  625. package/build/lib/web/production/components/Divider/Divider.js.map +1 -1
  626. package/build/lib/web/production/components/Dropdown/Dropdown.js +1 -5
  627. package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
  628. package/build/lib/web/production/components/Dropdown/StyledDropdownOverlay.js +2 -2
  629. package/build/lib/web/production/components/Dropdown/StyledDropdownOverlay.js.map +1 -1
  630. package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js +1 -1
  631. package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
  632. package/build/lib/web/production/components/Form/FormHint.js +11 -13
  633. package/build/lib/web/production/components/Form/FormHint.js.map +1 -1
  634. package/build/lib/web/production/components/Form/FormLabel.js +9 -17
  635. package/build/lib/web/production/components/Form/FormLabel.js.map +1 -1
  636. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js +5 -5
  637. package/build/lib/web/production/components/Form/Selector/SelectorInput.web.js.map +1 -1
  638. package/build/lib/web/production/components/Form/Selector/SelectorSupportText.js +16 -11
  639. package/build/lib/web/production/components/Form/Selector/SelectorSupportText.js.map +1 -1
  640. package/build/lib/web/production/components/Form/Selector/SelectorTitle.js +5 -16
  641. package/build/lib/web/production/components/Form/Selector/SelectorTitle.js.map +1 -1
  642. package/build/lib/web/production/components/Icons/_Svg/Circle/Circle.web.js +4 -2
  643. package/build/lib/web/production/components/Icons/_Svg/Circle/Circle.web.js.map +1 -1
  644. package/build/lib/web/production/components/Icons/_Svg/Rect/Rect.web.js +4 -2
  645. package/build/lib/web/production/components/Icons/_Svg/Rect/Rect.web.js.map +1 -1
  646. package/build/lib/web/production/components/Icons/_Svg/Svg/Svg.web.js +4 -2
  647. package/build/lib/web/production/components/Icons/_Svg/Svg/Svg.web.js.map +1 -1
  648. package/build/lib/web/production/components/Icons/useIconProps/useIconProps.js +1 -1
  649. package/build/lib/web/production/components/Icons/useIconProps/useIconProps.js.map +1 -1
  650. package/build/lib/web/production/components/Indicator/Indicator.js +9 -16
  651. package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
  652. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +3 -3
  653. package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
  654. package/build/lib/web/production/components/Input/BaseInput/BaseInputAnimatedBorder.web.js +2 -2
  655. package/build/lib/web/production/components/Input/BaseInput/BaseInputAnimatedBorder.web.js.map +1 -1
  656. package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +4 -1
  657. package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
  658. package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +4 -6
  659. package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
  660. package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
  661. package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +3 -4
  662. package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
  663. package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +11 -12
  664. package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
  665. package/build/lib/web/production/components/Input/DropdownInputTriggers/Chevron.js +1 -1
  666. package/build/lib/web/production/components/Input/DropdownInputTriggers/Chevron.js.map +1 -1
  667. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js +20 -32
  668. package/build/lib/web/production/components/Link/BaseLink/BaseLink.js.map +1 -1
  669. package/build/lib/web/production/components/Link/Link/Link.js +1 -1
  670. package/build/lib/web/production/components/Link/Link/Link.js.map +1 -1
  671. package/build/lib/web/production/components/List/List.js +1 -3
  672. package/build/lib/web/production/components/List/List.js.map +1 -1
  673. package/build/lib/web/production/components/List/ListItem.js +3 -3
  674. package/build/lib/web/production/components/List/ListItem.js.map +1 -1
  675. package/build/lib/web/production/components/List/ListItemIcons.js +11 -7
  676. package/build/lib/web/production/components/List/ListItemIcons.js.map +1 -1
  677. package/build/lib/web/production/components/Modal/Modal.web.js +1 -1
  678. package/build/lib/web/production/components/Modal/Modal.web.js.map +1 -1
  679. package/build/lib/web/production/components/Modal/ModalBackdrop.js +1 -1
  680. package/build/lib/web/production/components/Modal/ModalBackdrop.js.map +1 -1
  681. package/build/lib/web/production/components/Modal/ModalHeader.web.js +1 -5
  682. package/build/lib/web/production/components/Modal/ModalHeader.web.js.map +1 -1
  683. package/build/lib/web/production/components/Popover/Popover.web.js +2 -2
  684. package/build/lib/web/production/components/Popover/Popover.web.js.map +1 -1
  685. package/build/lib/web/production/components/Popover/PopoverContent.js +4 -5
  686. package/build/lib/web/production/components/Popover/PopoverContent.js.map +1 -1
  687. package/build/lib/web/production/components/Popover/PopoverInteractiveWrapper.web.js +5 -5
  688. package/build/lib/web/production/components/Popover/PopoverInteractiveWrapper.web.js.map +1 -1
  689. package/build/lib/web/production/components/Popover/getPopoverContentWrapperStyles.js +2 -2
  690. package/build/lib/web/production/components/Popover/getPopoverContentWrapperStyles.js.map +1 -1
  691. package/build/lib/web/production/components/ProgressBar/ProgressBar.js +9 -13
  692. package/build/lib/web/production/components/ProgressBar/ProgressBar.js.map +1 -1
  693. package/build/lib/web/production/components/Radio/Radio.js +1 -0
  694. package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
  695. package/build/lib/web/production/components/Radio/RadioIcon/RadioIcon.js +2 -1
  696. package/build/lib/web/production/components/Radio/RadioIcon/RadioIcon.js.map +1 -1
  697. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +2 -2
  698. package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
  699. package/build/lib/web/production/components/Radio/radioTokens.js +23 -22
  700. package/build/lib/web/production/components/Radio/radioTokens.js.map +1 -1
  701. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js +4 -7
  702. package/build/lib/web/production/components/Skeleton/PulseAnimation.web.js.map +1 -1
  703. package/build/lib/web/production/components/Skeleton/Skeleton.js +3 -6
  704. package/build/lib/web/production/components/Skeleton/Skeleton.js.map +1 -1
  705. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +9 -14
  706. package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
  707. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js +2 -5
  708. package/build/lib/web/production/components/Spinner/Spinner/Spinner.js.map +1 -1
  709. package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js +1 -1
  710. package/build/lib/web/production/components/SpotlightPopoverTour/TourFooter.web.js.map +1 -1
  711. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js +2 -2
  712. package/build/lib/web/production/components/SpotlightPopoverTour/TourMask.web.js.map +1 -1
  713. package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js +2 -2
  714. package/build/lib/web/production/components/SpotlightPopoverTour/TourPopover.web.js.map +1 -1
  715. package/build/lib/web/production/components/Switch/switchTokens.js +10 -10
  716. package/build/lib/web/production/components/Switch/switchTokens.js.map +1 -1
  717. package/build/lib/web/production/components/Table/Table.web.js +9 -9
  718. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  719. package/build/lib/web/production/components/Table/TableBody.web.js +14 -12
  720. package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
  721. package/build/lib/web/production/components/Table/TableContext.js +2 -2
  722. package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
  723. package/build/lib/web/production/components/Table/TableFooter.web.js +7 -7
  724. package/build/lib/web/production/components/Table/TableFooter.web.js.map +1 -1
  725. package/build/lib/web/production/components/Table/TableHeader.web.js +18 -16
  726. package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
  727. package/build/lib/web/production/components/Table/TablePagination.web.js +6 -5
  728. package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
  729. package/build/lib/web/production/components/Table/TableToolbar.web.js +4 -3
  730. package/build/lib/web/production/components/Table/TableToolbar.web.js.map +1 -1
  731. package/build/lib/web/production/components/Table/tokens.js +41 -43
  732. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  733. package/build/lib/web/production/components/Tabs/TabIndicator.web.js +7 -6
  734. package/build/lib/web/production/components/Tabs/TabIndicator.web.js.map +1 -1
  735. package/build/lib/web/production/components/Tabs/TabItem.web.js +17 -14
  736. package/build/lib/web/production/components/Tabs/TabItem.web.js.map +1 -1
  737. package/build/lib/web/production/components/Tabs/TabList.web.js +7 -5
  738. package/build/lib/web/production/components/Tabs/TabList.web.js.map +1 -1
  739. package/build/lib/web/production/components/Tabs/tabTokens.js +38 -41
  740. package/build/lib/web/production/components/Tabs/tabTokens.js.map +1 -1
  741. package/build/lib/web/production/components/Tag/Tag.js +7 -5
  742. package/build/lib/web/production/components/Tag/Tag.js.map +1 -1
  743. package/build/lib/web/production/components/Tooltip/Tooltip.web.js +2 -2
  744. package/build/lib/web/production/components/Tooltip/Tooltip.web.js.map +1 -1
  745. package/build/lib/web/production/components/Tooltip/TooltipContent.js +3 -4
  746. package/build/lib/web/production/components/Tooltip/TooltipContent.js.map +1 -1
  747. package/build/lib/web/production/components/Tooltip/getTooltipContentWrapperStyles.js +2 -2
  748. package/build/lib/web/production/components/Tooltip/getTooltipContentWrapperStyles.js.map +1 -1
  749. package/build/lib/web/production/components/Typography/BaseText/BaseText.web.js +10 -2
  750. package/build/lib/web/production/components/Typography/BaseText/BaseText.web.js.map +1 -1
  751. package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js +10 -2
  752. package/build/lib/web/production/components/Typography/BaseText/getBaseTextStyles.js.map +1 -1
  753. package/build/lib/web/production/components/Typography/Code/Code.js +3 -3
  754. package/build/lib/web/production/components/Typography/Code/Code.js.map +1 -1
  755. package/build/lib/web/production/components/Typography/Display/Display.js +23 -25
  756. package/build/lib/web/production/components/Typography/Display/Display.js.map +1 -1
  757. package/build/lib/web/production/components/Typography/Heading/Heading.js +30 -61
  758. package/build/lib/web/production/components/Typography/Heading/Heading.js.map +1 -1
  759. package/build/lib/web/production/components/Typography/Text/Text.js +26 -24
  760. package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
  761. package/build/lib/web/production/components/Typography/Text/getTextStyles.js +3 -5
  762. package/build/lib/web/production/components/Typography/Text/getTextStyles.js.map +1 -1
  763. package/build/lib/web/production/components/Typography/index.js +0 -1
  764. package/build/lib/web/production/components/Typography/index.js.map +1 -1
  765. package/build/lib/web/production/components/index.js +56 -57
  766. package/build/lib/web/production/components/index.js.map +1 -1
  767. package/build/lib/web/production/tokens/global/border.js +3 -0
  768. package/build/lib/web/production/tokens/global/border.js.map +1 -1
  769. package/build/lib/web/production/tokens/global/colors.js +227 -250
  770. package/build/lib/web/production/tokens/global/colors.js.map +1 -1
  771. package/build/lib/web/production/tokens/global/elevation/elevation.web.js +6 -6
  772. package/build/lib/web/production/tokens/global/elevation/elevation.web.js.map +1 -1
  773. package/build/lib/web/production/tokens/global/fontFamily/fontFamily.web.js +3 -2
  774. package/build/lib/web/production/tokens/global/fontFamily/fontFamily.web.js.map +1 -1
  775. package/build/lib/web/production/tokens/global/motion.js.map +1 -1
  776. package/build/lib/web/production/tokens/global/opacity.js +12 -9
  777. package/build/lib/web/production/tokens/global/opacity.js.map +1 -1
  778. package/build/lib/web/production/tokens/global/typography.js +37 -40
  779. package/build/lib/web/production/tokens/global/typography.js.map +1 -1
  780. package/build/lib/web/production/tokens/index.js +1 -2
  781. package/build/lib/web/production/tokens/index.js.map +1 -1
  782. package/build/lib/web/production/tokens/theme/bladeTheme.js +925 -0
  783. package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -0
  784. package/build/lib/web/production/tokens/theme/createTheme.js +123 -177
  785. package/build/lib/web/production/tokens/theme/createTheme.js.map +1 -1
  786. package/build/lib/web/production/tokens/theme/index.js +1 -2
  787. package/build/lib/web/production/tokens/theme/index.js.map +1 -1
  788. package/build/lib/web/production/tokens/theme/overrideTheme.js +4 -4
  789. package/build/lib/web/production/tokens/theme/overrideTheme.js.map +1 -1
  790. package/build/lib/web/production/tokens/theme/theme.js +1 -7
  791. package/build/lib/web/production/tokens/theme/theme.js.map +1 -1
  792. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js +26 -0
  793. package/build/lib/web/production/utils/getFocusRingStyles/getFocusRingStyles.web.js.map +1 -0
  794. package/build/lib/web/production/utils/getFocusRingStyles/index.js +2 -0
  795. package/build/lib/web/production/utils/getFocusRingStyles/index.js.map +1 -0
  796. package/build/lib/web/production/utils/lodashButBetter/get.js +8 -0
  797. package/build/lib/web/production/utils/lodashButBetter/get.js.map +1 -1
  798. package/build/lib/web/production/utils/lodashButBetter/isEmpty.js.map +1 -1
  799. package/build/lib/web/production/utils/makeLetterSpacing/index.js +2 -0
  800. package/build/lib/web/production/utils/makeLetterSpacing/index.js.map +1 -0
  801. package/build/lib/web/production/utils/makeLetterSpacing/makeLetterSpacing.js +7 -0
  802. package/build/lib/web/production/utils/makeLetterSpacing/makeLetterSpacing.js.map +1 -0
  803. package/build/lib/web/production/utils/objectKeysWithType.js +7 -0
  804. package/build/lib/web/production/utils/objectKeysWithType.js.map +1 -0
  805. package/build/lib/web/production/utils/useInteraction.js +3 -3
  806. package/build/lib/web/production/utils/useInteraction.js.map +1 -1
  807. package/build/types/components/index.d.ts +6006 -6173
  808. package/build/types/components/index.native.d.ts +4657 -4824
  809. package/build/types/tokens/index.d.ts +135 -182
  810. package/build/types/tokens/index.native.d.ts +135 -182
  811. package/build/types/utils/index.d.ts +94 -154
  812. package/build/types/utils/index.native.d.ts +94 -154
  813. package/codemods/brand-refresh/transformers/__tests__/migrate-actionlist.test.ts +88 -0
  814. package/codemods/brand-refresh/transformers/__tests__/migrate-amount.test.ts +186 -0
  815. package/codemods/brand-refresh/transformers/__tests__/migrate-badge.test.ts +32 -0
  816. package/codemods/brand-refresh/transformers/__tests__/migrate-card.test.ts +180 -0
  817. package/codemods/brand-refresh/transformers/__tests__/migrate-colors.test.ts +172 -0
  818. package/codemods/brand-refresh/transformers/__tests__/migrate-contrast-intent-variant.test.ts +206 -0
  819. package/codemods/brand-refresh/transformers/__tests__/migrate-divider.test.ts +24 -0
  820. package/codemods/brand-refresh/transformers/__tests__/migrate-dropdown.test.ts +282 -0
  821. package/codemods/brand-refresh/transformers/__tests__/migrate-table.test.ts +182 -0
  822. package/codemods/brand-refresh/transformers/__tests__/migrate-typography.test.ts +432 -0
  823. package/codemods/brand-refresh/transformers/colorTokensMapping.json +624 -0
  824. package/codemods/brand-refresh/transformers/index.ts +224 -0
  825. package/codemods/brand-refresh/transformers/migrate-actionlist-and-table.ts +32 -0
  826. package/codemods/brand-refresh/transformers/migrate-amount.ts +173 -0
  827. package/codemods/brand-refresh/transformers/migrate-badge.ts +28 -0
  828. package/codemods/brand-refresh/transformers/migrate-card.ts +43 -0
  829. package/codemods/brand-refresh/transformers/migrate-contrast-intent-color-props.ts +298 -0
  830. package/codemods/brand-refresh/transformers/migrate-divider.ts +38 -0
  831. package/codemods/brand-refresh/transformers/migrate-dropdown.ts +81 -0
  832. package/codemods/brand-refresh/transformers/migrate-typography.ts +342 -0
  833. package/codemods/brand-refresh/transformers/utils.ts +7 -0
  834. package/fonts/blade-fonts-react-native.zip +0 -0
  835. package/fonts/inter-variable/inter-cyrillic-extra.woff2 +0 -0
  836. package/fonts/inter-variable/inter-cyrillic.woff2 +0 -0
  837. package/fonts/inter-variable/inter-greek-extra.woff2 +0 -0
  838. package/fonts/inter-variable/inter-greek.woff2 +0 -0
  839. package/fonts/inter-variable/inter-latin-blade-extra.woff2 +0 -0
  840. package/fonts/inter-variable/inter-latin-blade.woff2 +0 -0
  841. package/fonts/inter-variable/inter-vietnamese.woff2 +0 -0
  842. package/fonts/tasa-orbiter.woff2 +0 -0
  843. package/fonts.css +82 -0
  844. package/package.json +10 -4
  845. package/build/css/bankingThemeDarkDesktop.css +0 -751
  846. package/build/css/bankingThemeDarkMobile.css +0 -751
  847. package/build/css/bankingThemeLightDesktop.css +0 -751
  848. package/build/css/bankingThemeLightMobile.css +0 -751
  849. package/build/css/paymentThemeDarkDesktop.css +0 -751
  850. package/build/css/paymentThemeDarkMobile.css +0 -751
  851. package/build/css/paymentThemeLightDesktop.css +0 -751
  852. package/build/css/paymentThemeLightMobile.css +0 -751
  853. package/build/lib/native/components/Typography/Title/Title.js +0 -17
  854. package/build/lib/native/components/Typography/Title/Title.js.map +0 -1
  855. package/build/lib/native/tokens/theme/bankingTheme.js +0 -12
  856. package/build/lib/native/tokens/theme/bankingTheme.js.map +0 -1
  857. package/build/lib/native/tokens/theme/paymentTheme.js +0 -12
  858. package/build/lib/native/tokens/theme/paymentTheme.js.map +0 -1
  859. package/build/lib/web/development/components/Typography/Title/Title.js +0 -96
  860. package/build/lib/web/development/components/Typography/Title/Title.js.map +0 -1
  861. package/build/lib/web/development/components/Typography/Title/index.js +0 -2
  862. package/build/lib/web/development/tokens/theme/bankingTheme.js +0 -3086
  863. package/build/lib/web/development/tokens/theme/bankingTheme.js.map +0 -1
  864. package/build/lib/web/development/tokens/theme/paymentTheme.js +0 -3086
  865. package/build/lib/web/development/tokens/theme/paymentTheme.js.map +0 -1
  866. package/build/lib/web/production/components/Typography/Title/Title.js +0 -96
  867. package/build/lib/web/production/components/Typography/Title/Title.js.map +0 -1
  868. package/build/lib/web/production/components/Typography/Title/index.js +0 -2
  869. package/build/lib/web/production/tokens/theme/bankingTheme.js +0 -3086
  870. package/build/lib/web/production/tokens/theme/bankingTheme.js.map +0 -1
  871. package/build/lib/web/production/tokens/theme/paymentTheme.js +0 -3086
  872. package/build/lib/web/production/tokens/theme/paymentTheme.js.map +0 -1
  873. /package/build/lib/web/development/{components/Typography/Title → utils/getFocusRingStyles}/index.js.map +0 -0
  874. /package/build/lib/web/{production/components/Typography/Title → development/utils/makeLetterSpacing}/index.js.map +0 -0
@@ -21,7 +21,7 @@ import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native
21
21
  import { isValidAllowedChildren } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
22
22
  import { jsx } from 'react/jsx-runtime';
23
23
 
24
- var _excluded=["variant","size","children","icon","testID"];var StyledOrderedList=styled(OrderedList)(function(_ref){var marginTop=_ref.marginTop,theme=_ref.theme;return {marginTop:marginTop?makeSpace(getIn(theme,marginTop)):undefined};});var StyledUnorderedList=styled(UnorderedList)(function(_ref2){var marginTop=_ref2.marginTop,theme=_ref2.theme;return {marginTop:marginTop?makeSpace(getIn(theme,marginTop)):undefined};});var _List=function _List(_ref3){var _ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'unordered':_ref3$variant,size=_ref3.size,children=_ref3.children,icon=_ref3.icon,testID=_ref3.testID,styledProps=_objectWithoutProperties(_ref3,_excluded);var ListElement=variant==='unordered'?StyledUnorderedList:StyledOrderedList;var _useListContext=useListContext(),level=_useListContext.level,listContextSize=_useListContext.size;var listContextValue=useMemo(function(){return {level:level?level+1:1,size:size!=null?size:listContextSize,icon:icon,variant:variant};},[icon,level,listContextSize,size,variant]);var childrenArray=React__default.Children.toArray(children);var childListItems=childrenArray.filter(function(child){if(isValidAllowedChildren(child,MetaConstants.ListItem)){return child;}if(__DEV__){throwBladeError({message:'You can only pass a ListItem as a child to List.',moduleName:'List'});}return null;});return jsx(ListProvider,{value:listContextValue,children:jsx(BaseBox,Object.assign({},getStyledProps(styledProps),{children:jsx(ListElement,Object.assign({marginTop:level?undefined:'spacing.3'},metaAttribute({name:MetaConstants.List,testID:testID}),makeAccessible({role:'list'}),{children:variant==='unordered'?childListItems:childListItems.map(function(child,index){return React__default.cloneElement(child,{_itemNumber:index+1});})}))}))});};var List=assignWithoutSideEffects(_List,{componentId:MetaConstants.List});
24
+ var _excluded=["variant","size","children","icon","testID"];var StyledOrderedList=styled(OrderedList)(function(_ref){var marginTop=_ref.marginTop,theme=_ref.theme;return {marginTop:marginTop?makeSpace(getIn(theme,marginTop)):undefined};});var StyledUnorderedList=styled(UnorderedList)(function(_ref2){var marginTop=_ref2.marginTop,theme=_ref2.theme;return {marginTop:marginTop?makeSpace(getIn(theme,marginTop)):undefined};});var _List=function _List(_ref3){var _ref3$variant=_ref3.variant,variant=_ref3$variant===void 0?'unordered':_ref3$variant,size=_ref3.size,children=_ref3.children,icon=_ref3.icon,testID=_ref3.testID,styledProps=_objectWithoutProperties(_ref3,_excluded);var ListElement=variant==='unordered'?StyledUnorderedList:StyledOrderedList;var _useListContext=useListContext(),level=_useListContext.level,listContextSize=_useListContext.size;var listContextValue=useMemo(function(){return {level:level?level+1:1,size:size!=null?size:listContextSize,icon:icon,variant:variant};},[icon,level,listContextSize,size,variant]);var childrenArray=React__default.Children.toArray(children);var childListItems=childrenArray.filter(function(child){if(isValidAllowedChildren(child,MetaConstants.ListItem)){return child;}if(__DEV__){throwBladeError({message:'You can only pass a ListItem as a child to List.',moduleName:'List'});}return null;});return jsx(ListProvider,{value:listContextValue,children:jsx(BaseBox,Object.assign({},getStyledProps(styledProps),{children:jsx(ListElement,Object.assign({},metaAttribute({name:MetaConstants.List,testID:testID}),makeAccessible({role:'list'}),{children:variant==='unordered'?childListItems:childListItems.map(function(child,index){return React__default.cloneElement(child,{_itemNumber:index+1});})}))}))});};var List=assignWithoutSideEffects(_List,{componentId:MetaConstants.List});
25
25
 
26
26
  export { List };
27
27
  //# sourceMappingURL=List.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"List.js","sources":["../../../../../src/components/List/List.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { ListProvider, useListContext } from './ListContext';\nimport { UnorderedList } from './UnorderedList';\nimport { OrderedList } from './OrderedList';\nimport type { ListItemProps } from './ListItem';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { IconComponent } from '~components/Icons';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListCommonProps = {\n /**\n * ListItem to be rendered for the List.\n *\n */\n children: React.ReactElement<ListItemProps> | React.ReactElement<ListItemProps>[];\n /**\n * Sets the variant to be rendered for the List.\n *\n * @default 'unordered'\n */\n variant?: 'unordered' | 'ordered' | 'ordered-filled';\n /**\n * Sets the size for the List.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n StyledPropsBlade;\n\ntype ListWithIconProps = ListCommonProps & {\n variant?: 'unordered';\n icon?: IconComponent;\n};\ntype ListWithoutIconProps = ListCommonProps & {\n variant?: 'ordered' | 'ordered-filled';\n icon?: undefined;\n};\ntype ListProps = ListWithIconProps | ListWithoutIconProps;\n\nconst StyledOrderedList = styled(OrderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\nconst StyledUnorderedList = styled(UnorderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\n/**\n * List Component is used to display a set of related items that are composed of text/links. Each list item begins with a bullet or a number.\n *\n * ## Usage\n *\n * ```tsx\n * <List\n * variant='unordered'\n * size='medium'\n * >\n * <ListItem>\n * Item 1\n * <List>\n * <ListItem>Item 1.1</ListItem>\n * </List>\n * </ListItem>\n * <ListItem>Item 2</ListItem>\n * <List />\n * ```\n */\nconst _List = ({\n variant = 'unordered',\n size,\n children,\n icon,\n testID,\n ...styledProps\n}: ListProps): React.ReactElement => {\n const ListElement = variant === 'unordered' ? StyledUnorderedList : StyledOrderedList;\n const { level, size: listContextSize } = useListContext();\n const listContextValue = useMemo(\n () => ({\n level: level ? level + 1 : 1,\n size: size ?? listContextSize,\n icon,\n variant,\n }),\n [icon, level, listContextSize, size, variant],\n );\n\n const childrenArray = React.Children.toArray(children);\n const childListItems = childrenArray.filter((child) => {\n if (isValidAllowedChildren(child, MetaConstants.ListItem)) {\n return child;\n }\n if (__DEV__) {\n throwBladeError({\n message: 'You can only pass a ListItem as a child to List.',\n moduleName: 'List',\n });\n }\n return null;\n });\n\n return (\n <ListProvider value={listContextValue}>\n <BaseBox {...getStyledProps(styledProps)}>\n <ListElement\n marginTop={level ? undefined : 'spacing.3'}\n {...metaAttribute({ name: MetaConstants.List, testID })}\n {...makeAccessible({ role: 'list' })} // Role needed for react-native\n >\n {variant === 'unordered'\n ? childListItems\n : childListItems.map(\n (child, index) =>\n React.cloneElement(child as React.ReactElement, { _itemNumber: index + 1 }), // adds _itemNumber for rendering ordered list bullets\n )}\n </ListElement>\n </BaseBox>\n </ListProvider>\n );\n};\n\nconst List = assignWithoutSideEffects(_List, { componentId: MetaConstants.List });\n\nexport { List };\nexport type { ListProps };\n"],"names":["StyledOrderedList","styled","OrderedList","_ref","marginTop","theme","makeSpace","getIn","undefined","StyledUnorderedList","UnorderedList","_ref2","_List","_ref3","_ref3$variant","variant","size","children","icon","testID","styledProps","_objectWithoutProperties","_excluded","ListElement","_useListContext","useListContext","level","listContextSize","listContextValue","useMemo","childrenArray","React","Children","toArray","childListItems","filter","child","isValidAllowedChildren","MetaConstants","ListItem","__DEV__","throwBladeError","message","moduleName","_jsx","ListProvider","value","BaseBox","Object","assign","getStyledProps","metaAttribute","name","List","makeAccessible","role","map","index","cloneElement","_itemNumber","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;4DAkDA,IAAMA,iBAAiB,CAAGC,MAAM,CAACC,WAAW,CAAC,CAC3C,SAAAC,IAAA,CAAG,CAAA,IAAAC,SAAS,CAAAD,IAAA,CAATC,SAAS,CAAEC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAAQ,OAAA,CACzBD,SAAS,CAAEA,SAAS,CAAGE,SAAS,CAACC,KAAK,CAACF,KAAK,CAAED,SAAS,CAAC,CAAC,CAAGI,SAC9D,CAAC,CAAA,CACH,CAAC,CAED,IAAMC,mBAAmB,CAAGR,MAAM,CAACS,aAAa,CAAC,CAC/C,SAAAC,KAAA,CAAG,CAAA,IAAAP,SAAS,CAAAO,KAAA,CAATP,SAAS,CAAEC,KAAK,CAAAM,KAAA,CAALN,KAAK,CAAQ,OAAA,CACzBD,SAAS,CAAEA,SAAS,CAAGE,SAAS,CAACC,KAAK,CAACF,KAAK,CAAED,SAAS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AAII,OAAO,CAAE,CACXC,eAAe,CAAC,CACdC,OAAO,CAAE,kDAAkD,CAC3DC,UAAU,CAAE,MACd,CAAC,CAAC,CACJ,CACA,OAAW,IAAA,CACb,CAAC,CAAC,CAEF,OACEC,GAAA,CAACC,YAAY,CAACC,CAAAA,KAAK,CAAElB,gBAAiB,CAAAX,QAAA,CACpC2B,GAAA,CAACG,OAAO,CAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,CAAKC,cAAc,CAAC9B,WAAW,CAAC,EAAAH,QAAA,CACtC2B,GAAA,CAACrB,WAAW,CAAAyB,MAAA,CAAAC,MAAA,CAAA,CACV7C,SAAS,CAAEsB,KAAK,CAAGlB,SAAS,CAAG,WAAY,CACvC2C,CAAAA,aAAa,CAAC,CAAEC,IAAI,CAAEd,aAAa,CAACe,IAAI,CAAElC,MAAM,CAANA,MAAO,CAAC,CAAC,CACnDmC,cAAc,CAAC,CAAEC,IAAI,CAAE,MAAO,CAAC,CAAC,CAAA,CAAAtC,QAAA,CAEnCF,OAAO,GAAK,WAAW,CACpBmB,cAAc,CACdA,cAAc,CAACsB,GAAG,CAChB,SAACpB,KAAK,CAAEqB,KAAK,CAAA,CAAA,OACX1B,cAAK,CAAC2B,YAAY,CAACtB,KAAK,CAAwB,CAAEuB,WAAW,CAAEF,KAAK,CAAG,CAAE,CAAC,CAAC,EAC/E,CAAC,CAAA,CACM,CAAC,CAAA,CACP,CAAC,CACE,CAAC,CAEnB,CAAC,CAEK,IAAAJ,IAAI,CAAGO,wBAAwB,CAAChD,KAAK,CAAE,CAAEiD,WAAW,CAAEvB,aAAa,CAACe,IAAK,CAAC;;;;"}
1
+ {"version":3,"file":"List.js","sources":["../../../../../src/components/List/List.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { ListProvider, useListContext } from './ListContext';\nimport { UnorderedList } from './UnorderedList';\nimport { OrderedList } from './OrderedList';\nimport type { ListItemProps } from './ListItem';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { IconComponent } from '~components/Icons';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { DotNotationSpacingStringToken, TestID } from '~utils/types';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSpace } from '~utils/makeSpace';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListCommonProps = {\n /**\n * ListItem to be rendered for the List.\n *\n */\n children: React.ReactElement<ListItemProps> | React.ReactElement<ListItemProps>[];\n /**\n * Sets the variant to be rendered for the List.\n *\n * @default 'unordered'\n */\n variant?: 'unordered' | 'ordered' | 'ordered-filled';\n /**\n * Sets the size for the List.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n} & TestID &\n StyledPropsBlade;\n\ntype ListWithIconProps = ListCommonProps & {\n variant?: 'unordered';\n icon?: IconComponent;\n};\ntype ListWithoutIconProps = ListCommonProps & {\n variant?: 'ordered' | 'ordered-filled';\n icon?: undefined;\n};\ntype ListProps = ListWithIconProps | ListWithoutIconProps;\n\nconst StyledOrderedList = styled(OrderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\nconst StyledUnorderedList = styled(UnorderedList)<{ marginTop?: DotNotationSpacingStringToken }>(\n ({ marginTop, theme }) => ({\n marginTop: marginTop ? makeSpace(getIn(theme, marginTop)) : undefined,\n }),\n);\n\n/**\n * List Component is used to display a set of related items that are composed of text/links. Each list item begins with a bullet or a number.\n *\n * ## Usage\n *\n * ```tsx\n * <List\n * variant='unordered'\n * size='medium'\n * >\n * <ListItem>\n * Item 1\n * <List>\n * <ListItem>Item 1.1</ListItem>\n * </List>\n * </ListItem>\n * <ListItem>Item 2</ListItem>\n * <List />\n * ```\n */\nconst _List = ({\n variant = 'unordered',\n size,\n children,\n icon,\n testID,\n ...styledProps\n}: ListProps): React.ReactElement => {\n const ListElement = variant === 'unordered' ? StyledUnorderedList : StyledOrderedList;\n const { level, size: listContextSize } = useListContext();\n const listContextValue = useMemo(\n () => ({\n level: level ? level + 1 : 1,\n size: size ?? listContextSize,\n icon,\n variant,\n }),\n [icon, level, listContextSize, size, variant],\n );\n\n const childrenArray = React.Children.toArray(children);\n const childListItems = childrenArray.filter((child) => {\n if (isValidAllowedChildren(child, MetaConstants.ListItem)) {\n return child;\n }\n if (__DEV__) {\n throwBladeError({\n message: 'You can only pass a ListItem as a child to List.',\n moduleName: 'List',\n });\n }\n return null;\n });\n\n return (\n <ListProvider value={listContextValue}>\n <BaseBox {...getStyledProps(styledProps)}>\n <ListElement\n {...metaAttribute({ name: MetaConstants.List, testID })}\n {...makeAccessible({ role: 'list' })} // Role needed for react-native\n >\n {variant === 'unordered'\n ? childListItems\n : childListItems.map(\n (child, index) =>\n React.cloneElement(child as React.ReactElement, { _itemNumber: index + 1 }), // adds _itemNumber for rendering ordered list bullets\n )}\n </ListElement>\n </BaseBox>\n </ListProvider>\n );\n};\n\nconst List = assignWithoutSideEffects(_List, { componentId: MetaConstants.List });\n\nexport { List };\nexport type { ListProps };\n"],"names":["StyledOrderedList","styled","OrderedList","_ref","marginTop","theme","makeSpace","getIn","undefined","StyledUnorderedList","UnorderedList","_ref2","_List","_ref3","_ref3$variant","variant","size","children","icon","testID","styledProps","_objectWithoutProperties","_excluded","ListElement","_useListContext","useListContext","level","listContextSize","listContextValue","useMemo","childrenArray","React","Children","toArray","childListItems","filter","child","isValidAllowedChildren","MetaConstants","ListItem","__DEV__","throwBladeError","message","moduleName","_jsx","ListProvider","value","BaseBox","Object","assign","getStyledProps","metaAttribute","name","List","makeAccessible","role","map","index","cloneElement","_itemNumber","assignWithoutSideEffects","componentId"],"mappings":";;;;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CACX,CAAA,OAAA1B,cAAK,CAAC2B,YAAY,CAACtB,KAAK,CAAwB,CAAEuB,WAAW,CAAEF,KAAK,CAAG,CAAE,CAAC,CAAC,CAAA,CAC/E,CAAC,CACM,CAAA,CAAC,CACP,CAAA,CAAC,CACE,CAAC,CAEnB,CAAC,CAEK,IAAAJ,IAAI,CAAGO,wBAAwB,CAAChD,KAAK,CAAE,CAAEiD,WAAW,CAAEvB,aAAa,CAACe,IAAK,CAAC;;;;"}
@@ -27,7 +27,7 @@ import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
27
27
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
28
28
  import { getComponentId, isValidAllowedChildren } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
29
29
 
30
- var StyledListItem=styled(ListItemElement)(function(_ref){var level=_ref.level,theme=_ref.theme,variant=_ref.variant,hasIcon=_ref.hasIcon;return {marginLeft:level?getIn(theme,listItemMarginLeft[`${variant}${variant==='unordered'&&hasIcon?'WithIcon':''}`][level]):0};});var ListItemContentChildren=function ListItemContentChildren(_ref2){var children=_ref2.children,size=_ref2.size;return getPlatformType()==='react-native'?jsx(BaseBox,{display:"flex",flexDirection:"row",flexWrap:"wrap",children:children.map(function(child,index){if(typeof child==='string'){return jsx(Text,{variant:"body",size:size,children:child},index);}return child;})}):jsx(Text,{variant:"body",size:size,children:children});};var _ListItem=function _ListItem(_ref3){var children=_ref3.children,Icon=_ref3.icon,_itemNumber=_ref3._itemNumber,testID=_ref3.testID;var _useListContext=useListContext(),level=_useListContext.level,size=_useListContext.size,ListContextIcon=_useListContext.icon,variant=_useListContext.variant;var _useTheme=useTheme(),theme=_useTheme.theme,platform=_useTheme.platform;var ItemIcon=Icon!=null?Icon:ListContextIcon;if(__DEV__){if(level&&level>3){throwBladeError({message:'List Nesting is allowed only upto 3 levels.',moduleName:'List'});}}var childrenArray=React__default.Children.toArray(children);var validChildItem=childrenArray.filter(function(child){if(getComponentId(child)===MetaConstants.List)return null;if(typeof child==='string'||isValidAllowedChildren(child,MetaConstants.ListItemLink)||isValidAllowedChildren(child,MetaConstants.ListItemText)||isValidAllowedChildren(child,MetaConstants.ListItemCode)){return child;}else if(__DEV__){throwBladeError({message:`You can only pass a List, ListItemLink, ListItemCode, ListItemText or a string as a child to ListItem.`,moduleName:'ListItem'});}return null;});var childList=childrenArray.filter(function(child){return getComponentId(child)===MetaConstants.List?child:null;});var hasIcon=Boolean(ItemIcon);return jsxs(StyledListItem,Object.assign({level:level,variant:variant,hasIcon:hasIcon},metaAttribute({name:MetaConstants.ListItem,testID:testID}),{children:[jsxs(BaseBox,{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:listItemMarginBottom,children:[variant==='unordered'?jsx(BaseBox,{marginRight:listItemBulletMarginRight[variant],marginTop:listItemBulletMarginTop[`${variant}${hasIcon?'WithIcon':''}`][platform][size],display:"flex",alignSelf:"flex-start",children:ItemIcon?jsx(ItemIcon,{size:size,color:"surface.text.subdued.lowContrast"}):jsx(UnorderedItemIcon,{level:level})}):jsx(BaseBox,{width:listItemOrderedBulletBoxSize[variant][platform][size],height:listItemOrderedBulletBoxSize[variant][platform][size],marginRight:listItemBulletMarginRight[variant],marginTop:listItemBulletMarginTop[variant][platform][size],display:"flex",flexShrink:0,justifyContent:"center",alignSelf:"flex-start",alignItems:"center",borderRadius:variant==='ordered-filled'?'max':undefined,backgroundColor:variant==='ordered-filled'?getIn(theme,'colors.brand.gray.a100.lowContrast'):undefined,children:jsx(Text,{variant:"body",type:"subtle",size:variant==='ordered'?size:'xsmall',children:`${getOrderedListItemBullet({itemNumber:_itemNumber!=null?_itemNumber:1,level:level!=null?level:1})}${variant==='ordered'?'.':''}`})}),jsx(ListItemContentChildren,{size:size,children:validChildItem})]}),childList]}));};var ListItem=assignWithoutSideEffects(_ListItem,{componentId:MetaConstants.ListItem});
30
+ var StyledListItem=styled(ListItemElement)(function(_ref){var level=_ref.level,theme=_ref.theme,variant=_ref.variant,hasIcon=_ref.hasIcon;return {marginLeft:level?getIn(theme,listItemMarginLeft[`${variant}${variant==='unordered'&&hasIcon?'WithIcon':''}`][level]):0};});var ListItemContentChildren=function ListItemContentChildren(_ref2){var children=_ref2.children,size=_ref2.size;return getPlatformType()==='react-native'?jsx(BaseBox,{display:"flex",flexDirection:"row",flexWrap:"wrap",children:children.map(function(child,index){if(typeof child==='string'){return jsx(Text,{variant:"body",size:size,children:child},index);}return child;})}):jsx(Text,{variant:"body",size:size,children:children});};var _ListItem=function _ListItem(_ref3){var children=_ref3.children,Icon=_ref3.icon,_itemNumber=_ref3._itemNumber,testID=_ref3.testID;var _useListContext=useListContext(),level=_useListContext.level,size=_useListContext.size,ListContextIcon=_useListContext.icon,variant=_useListContext.variant;var _useTheme=useTheme(),theme=_useTheme.theme,platform=_useTheme.platform;var ItemIcon=Icon!=null?Icon:ListContextIcon;if(__DEV__){if(level&&level>3){throwBladeError({message:'List Nesting is allowed only upto 3 levels.',moduleName:'List'});}}var childrenArray=React__default.Children.toArray(children);var validChildItem=childrenArray.filter(function(child){if(getComponentId(child)===MetaConstants.List)return null;if(typeof child==='string'||isValidAllowedChildren(child,MetaConstants.ListItemLink)||isValidAllowedChildren(child,MetaConstants.ListItemText)||isValidAllowedChildren(child,MetaConstants.ListItemCode)){return child;}else if(__DEV__){throwBladeError({message:`You can only pass a List, ListItemLink, ListItemCode, ListItemText or a string as a child to ListItem.`,moduleName:'ListItem'});}return null;});var childList=childrenArray.filter(function(child){return getComponentId(child)===MetaConstants.List?child:null;});var hasIcon=Boolean(ItemIcon);return jsxs(StyledListItem,Object.assign({level:level,variant:variant,hasIcon:hasIcon},metaAttribute({name:MetaConstants.ListItem,testID:testID}),{children:[jsxs(BaseBox,{display:"flex",flexDirection:"row",alignItems:"center",marginBottom:listItemMarginBottom,children:[variant==='unordered'?jsx(BaseBox,{marginRight:listItemBulletMarginRight[variant],marginTop:listItemBulletMarginTop[`${variant}${hasIcon?'WithIcon':''}`][platform][size],display:"flex",alignSelf:"flex-start",children:ItemIcon?jsx(ItemIcon,{size:size,color:"surface.icon.gray.muted"}):jsx(UnorderedItemIcon,{level:level})}):jsx(BaseBox,{width:listItemOrderedBulletBoxSize[variant][platform][size],height:listItemOrderedBulletBoxSize[variant][platform][size],marginRight:listItemBulletMarginRight[variant],marginTop:listItemBulletMarginTop[variant][platform][size],display:"flex",flexShrink:0,justifyContent:"center",alignSelf:"flex-start",alignItems:"center",borderRadius:variant==='ordered-filled'?'max':undefined,backgroundColor:variant==='ordered-filled'?getIn(theme.colors,'feedback.background.neutral.subtle'):undefined,children:jsx(Text,{variant:"body",color:"surface.text.gray.muted",size:variant==='ordered'?size:'xsmall',children:`${getOrderedListItemBullet({itemNumber:_itemNumber!=null?_itemNumber:1,level:level!=null?level:1})}${variant==='ordered'?'.':''}`})}),jsx(ListItemContentChildren,{size:size,children:validChildItem})]}),childList]}));};var ListItem=assignWithoutSideEffects(_ListItem,{componentId:MetaConstants.ListItem});
31
31
 
32
32
  export { ListItem };
33
33
  //# sourceMappingURL=ListItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.js","sources":["../../../../../src/components/List/ListItem.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport { useListContext } from './ListContext';\nimport { UnorderedItemIcon } from './ListItemIcons';\nimport { ListItemElement } from './ListItemElement';\nimport {\n listItemBulletMarginRight,\n listItemBulletMarginTop,\n listItemOrderedBulletBoxSize,\n listItemMarginBottom,\n listItemMarginLeft,\n} from './listTokens';\nimport type { ListProps } from './List';\nimport { getOrderedListItemBullet } from './getOrderedListItemBullet';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { IconComponent } from '~components/Icons';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { getPlatformType } from '~utils/getPlatformType';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListItemProps = {\n /**\n * Children to be rendered for ListItem. This can be a text, ListItemLink or another List.\n *\n */\n children: React.ReactNode;\n /**\n * Icon to be rendered for a ListItem's bullet.\n *\n */\n icon?: IconComponent;\n /**\n * This is a private prop to be used only for internal logic purposes.\n *\n */\n _itemNumber?: undefined;\n} & TestID;\n\nconst StyledListItem = styled(ListItemElement)<{\n level?: number;\n variant: NonNullable<ListProps['variant']>;\n hasIcon: boolean;\n}>(({ level, theme, variant, hasIcon }) => ({\n marginLeft: level\n ? getIn(\n theme,\n listItemMarginLeft[\n `${variant}${variant === 'unordered' && hasIcon ? 'WithIcon' : ''}` as NonNullable<\n ListProps['variant'] | 'unorderedWithIcon'\n >\n ][level],\n )\n : 0,\n}));\n\nconst ListItemContentChildren = ({\n children,\n size,\n}: {\n children: React.ReactNode[];\n size: NonNullable<ListProps['size']>;\n}): React.ReactElement => {\n /* Having a <View><Text>...</Text><View/> inside <Text /> breaks vertical alignment. Issue: https://github.com/facebook/react-native/issues/31955\n As a workaround, we wrap individual strings in their own <Text /> and handle alignment with a parent <View> (BaseBox).\n */\n return getPlatformType() === 'react-native' ? (\n <BaseBox display=\"flex\" flexDirection=\"row\" flexWrap=\"wrap\">\n {children.map((child, index) => {\n if (typeof child === 'string') {\n return (\n <Text key={index} variant=\"body\" size={size}>\n {child}\n </Text>\n );\n }\n return child;\n })}\n </BaseBox>\n ) : (\n <Text variant=\"body\" size={size}>\n {children}\n </Text>\n );\n};\n\nconst _ListItem = ({\n children,\n icon: Icon,\n _itemNumber,\n testID,\n}: ListItemProps): React.ReactElement => {\n const { level, size, icon: ListContextIcon, variant } = useListContext();\n const { theme, platform } = useTheme();\n const ItemIcon = Icon ?? ListContextIcon;\n\n if (__DEV__) {\n if (level && level > 3) {\n throwBladeError({\n message: 'List Nesting is allowed only upto 3 levels.',\n moduleName: 'List',\n });\n }\n }\n\n const childrenArray = React.Children.toArray(children);\n\n // Get children that are not a List component and are valid allowed children\n const validChildItem = childrenArray.filter((child) => {\n if (getComponentId(child) === MetaConstants.List) return null;\n\n if (\n typeof child === 'string' ||\n isValidAllowedChildren(child, MetaConstants.ListItemLink) ||\n isValidAllowedChildren(child, MetaConstants.ListItemText) ||\n isValidAllowedChildren(child, MetaConstants.ListItemCode)\n ) {\n return child;\n } else if (__DEV__) {\n throwBladeError({\n message: `You can only pass a List, ListItemLink, ListItemCode, ListItemText or a string as a child to ListItem.`,\n moduleName: 'ListItem',\n });\n }\n return null;\n });\n // Get child that is a List component\n const childList = childrenArray.filter((child) =>\n getComponentId(child) === MetaConstants.List ? child : null,\n );\n const hasIcon = Boolean(ItemIcon);\n\n return (\n <StyledListItem\n level={level}\n variant={variant}\n hasIcon={hasIcon}\n {...metaAttribute({ name: MetaConstants.ListItem, testID })}\n >\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n marginBottom={listItemMarginBottom}\n >\n {variant === 'unordered' ? (\n <BaseBox\n marginRight={listItemBulletMarginRight[variant]}\n marginTop={\n listItemBulletMarginTop[`${variant}${hasIcon ? 'WithIcon' : ''}`][platform][size]\n }\n display=\"flex\"\n alignSelf=\"flex-start\"\n >\n {ItemIcon ? (\n <ItemIcon size={size} color=\"surface.text.subdued.lowContrast\" />\n ) : (\n <UnorderedItemIcon level={level} />\n )}\n </BaseBox>\n ) : (\n <BaseBox\n width={listItemOrderedBulletBoxSize[variant][platform][size]}\n height={listItemOrderedBulletBoxSize[variant][platform][size]}\n marginRight={listItemBulletMarginRight[variant]}\n marginTop={listItemBulletMarginTop[variant][platform][size]}\n display=\"flex\"\n flexShrink={0}\n justifyContent=\"center\"\n alignSelf=\"flex-start\"\n alignItems=\"center\"\n borderRadius={variant === 'ordered-filled' ? 'max' : undefined}\n backgroundColor={\n variant === 'ordered-filled'\n ? getIn(theme, 'colors.brand.gray.a100.lowContrast')\n : undefined\n }\n >\n <Text variant=\"body\" type=\"subtle\" size={variant === 'ordered' ? size : 'xsmall'}>\n {`${getOrderedListItemBullet({\n itemNumber: _itemNumber ?? 1,\n level: level ?? 1,\n })}${variant === 'ordered' ? '.' : ''}`}\n </Text>\n </BaseBox>\n )}\n <ListItemContentChildren size={size}>{validChildItem}</ListItemContentChildren>\n </BaseBox>\n {childList}\n </StyledListItem>\n );\n};\n\nconst ListItem = assignWithoutSideEffects(_ListItem, { componentId: MetaConstants.ListItem });\n\nexport { ListItem };\nexport type { ListItemProps };\n"],"names":["StyledListItem","styled","ListItemElement","_ref","level","theme","variant","hasIcon","marginLeft","getIn","listItemMarginLeft","ListItemContentChildren","_ref2","children","size","getPlatformType","_jsx","BaseBox","display","flexDirection","flexWrap","map","child","index","Text","_ListItem","_ref3","Icon","icon","_itemNumber","testID","_useListContext","useListContext","ListContextIcon","_useTheme","useTheme","platform","ItemIcon","__DEV__","throwBladeError","message","moduleName","childrenArray","React","Children","toArray","validChildItem","filter","getComponentId","MetaConstants","List","isValidAllowedChildren","ListItemLink","ListItemText","ListItemCode","childList","Boolean","_jsxs","Object","assign","metaAttribute","name","ListItem","alignItems","marginBottom","listItemMarginBottom","marginRight","listItemBulletMarginRight","marginTop","listItemBulletMarginTop","alignSelf","color","UnorderedItemIcon","width","listItemOrderedBulletBoxSize","height","flexShrink","justifyContent","borderRadius","undefined","backgroundColor","type","getOrderedListItemBullet","itemNumber","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAMA,cAAc,CAAGC,MAAM,CAACC,eAAe,CAAC,CAI3C,SAAAC,IAAA,CAAG,CAAA,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAAEC,OAAO,CAAAH,IAAA,CAAPG,OAAO,CAAEC,OAAO,CAAAJ,IAAA,CAAPI,OAAO,CAAA,OAAQ,CAC1CC,UAAU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AE,CAAE4D,WAAW,CAAEpC,aAAa,CAACa,QAAS,CAAC;;;;"}
1
+ {"version":3,"file":"ListItem.js","sources":["../../../../../src/components/List/ListItem.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport React from 'react';\nimport { useListContext } from './ListContext';\nimport { UnorderedItemIcon } from './ListItemIcons';\nimport { ListItemElement } from './ListItemElement';\nimport {\n listItemBulletMarginRight,\n listItemBulletMarginTop,\n listItemOrderedBulletBoxSize,\n listItemMarginBottom,\n listItemMarginLeft,\n} from './listTokens';\nimport type { ListProps } from './List';\nimport { getOrderedListItemBullet } from './getOrderedListItemBullet';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { IconComponent } from '~components/Icons';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { getPlatformType } from '~utils/getPlatformType';\nimport { throwBladeError } from '~utils/logger';\n\ntype ListItemProps = {\n /**\n * Children to be rendered for ListItem. This can be a text, ListItemLink or another List.\n *\n */\n children: React.ReactNode;\n /**\n * Icon to be rendered for a ListItem's bullet.\n *\n */\n icon?: IconComponent;\n /**\n * This is a private prop to be used only for internal logic purposes.\n *\n */\n _itemNumber?: undefined;\n} & TestID;\n\nconst StyledListItem = styled(ListItemElement)<{\n level?: number;\n variant: NonNullable<ListProps['variant']>;\n hasIcon: boolean;\n}>(({ level, theme, variant, hasIcon }) => ({\n marginLeft: level\n ? getIn(\n theme,\n listItemMarginLeft[\n `${variant}${variant === 'unordered' && hasIcon ? 'WithIcon' : ''}` as NonNullable<\n ListProps['variant'] | 'unorderedWithIcon'\n >\n ][level],\n )\n : 0,\n}));\n\nconst ListItemContentChildren = ({\n children,\n size,\n}: {\n children: React.ReactNode[];\n size: NonNullable<ListProps['size']>;\n}): React.ReactElement => {\n /* Having a <View><Text>...</Text><View/> inside <Text /> breaks vertical alignment. Issue: https://github.com/facebook/react-native/issues/31955\n As a workaround, we wrap individual strings in their own <Text /> and handle alignment with a parent <View> (BaseBox).\n */\n return getPlatformType() === 'react-native' ? (\n <BaseBox display=\"flex\" flexDirection=\"row\" flexWrap=\"wrap\">\n {children.map((child, index) => {\n if (typeof child === 'string') {\n return (\n <Text key={index} variant=\"body\" size={size}>\n {child}\n </Text>\n );\n }\n return child;\n })}\n </BaseBox>\n ) : (\n <Text variant=\"body\" size={size}>\n {children}\n </Text>\n );\n};\n\nconst _ListItem = ({\n children,\n icon: Icon,\n _itemNumber,\n testID,\n}: ListItemProps): React.ReactElement => {\n const { level, size, icon: ListContextIcon, variant } = useListContext();\n const { theme, platform } = useTheme();\n const ItemIcon = Icon ?? ListContextIcon;\n\n if (__DEV__) {\n if (level && level > 3) {\n throwBladeError({\n message: 'List Nesting is allowed only upto 3 levels.',\n moduleName: 'List',\n });\n }\n }\n\n const childrenArray = React.Children.toArray(children);\n\n // Get children that are not a List component and are valid allowed children\n const validChildItem = childrenArray.filter((child) => {\n if (getComponentId(child) === MetaConstants.List) return null;\n\n if (\n typeof child === 'string' ||\n isValidAllowedChildren(child, MetaConstants.ListItemLink) ||\n isValidAllowedChildren(child, MetaConstants.ListItemText) ||\n isValidAllowedChildren(child, MetaConstants.ListItemCode)\n ) {\n return child;\n } else if (__DEV__) {\n throwBladeError({\n message: `You can only pass a List, ListItemLink, ListItemCode, ListItemText or a string as a child to ListItem.`,\n moduleName: 'ListItem',\n });\n }\n return null;\n });\n // Get child that is a List component\n const childList = childrenArray.filter((child) =>\n getComponentId(child) === MetaConstants.List ? child : null,\n );\n const hasIcon = Boolean(ItemIcon);\n\n return (\n <StyledListItem\n level={level}\n variant={variant}\n hasIcon={hasIcon}\n {...metaAttribute({ name: MetaConstants.ListItem, testID })}\n >\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n marginBottom={listItemMarginBottom}\n >\n {variant === 'unordered' ? (\n <BaseBox\n marginRight={listItemBulletMarginRight[variant]}\n marginTop={\n listItemBulletMarginTop[`${variant}${hasIcon ? 'WithIcon' : ''}`][platform][size]\n }\n display=\"flex\"\n alignSelf=\"flex-start\"\n >\n {ItemIcon ? (\n <ItemIcon size={size} color=\"surface.icon.gray.muted\" />\n ) : (\n <UnorderedItemIcon level={level} />\n )}\n </BaseBox>\n ) : (\n <BaseBox\n width={listItemOrderedBulletBoxSize[variant][platform][size]}\n height={listItemOrderedBulletBoxSize[variant][platform][size]}\n marginRight={listItemBulletMarginRight[variant]}\n marginTop={listItemBulletMarginTop[variant][platform][size]}\n display=\"flex\"\n flexShrink={0}\n justifyContent=\"center\"\n alignSelf=\"flex-start\"\n alignItems=\"center\"\n borderRadius={variant === 'ordered-filled' ? 'max' : undefined}\n backgroundColor={\n variant === 'ordered-filled'\n ? getIn(theme.colors, 'feedback.background.neutral.subtle')\n : undefined\n }\n >\n <Text\n variant=\"body\"\n color=\"surface.text.gray.muted\"\n size={variant === 'ordered' ? size : 'xsmall'}\n >\n {`${getOrderedListItemBullet({\n itemNumber: _itemNumber ?? 1,\n level: level ?? 1,\n })}${variant === 'ordered' ? '.' : ''}`}\n </Text>\n </BaseBox>\n )}\n <ListItemContentChildren size={size}>{validChildItem}</ListItemContentChildren>\n </BaseBox>\n {childList}\n </StyledListItem>\n );\n};\n\nconst ListItem = assignWithoutSideEffects(_ListItem, { componentId: MetaConstants.ListItem });\n\nexport { ListItem };\nexport type { ListItemProps };\n"],"names":["StyledListItem","styled","ListItemElement","_ref","level","theme","variant","hasIcon","marginLeft","getIn","listItemMarginLeft","ListItemContentChildren","_ref2","children","size","getPlatformType","_jsx","BaseBox","display","flexDirection","flexWrap","map","child","index","Text","_ListItem","_ref3","Icon","icon","_itemNumber","testID","_useListContext","useListContext","ListContextIcon","_useTheme","useTheme","platform","ItemIcon","__DEV__","throwBladeError","message","moduleName","childrenArray","React","Children","toArray","validChildItem","filter","getComponentId","MetaConstants","List","isValidAllowedChildren","ListItemLink","ListItemText","ListItemCode","childList","Boolean","_jsxs","Object","assign","metaAttribute","name","ListItem","alignItems","marginBottom","listItemMarginBottom","marginRight","listItemBulletMarginRight","marginTop","listItemBulletMarginTop","alignSelf","color","UnorderedItemIcon","width","listItemOrderedBulletBoxSize","height","flexShrink","justifyContent","borderRadius","undefined","backgroundColor","colors","getOrderedListItemBullet","itemNumber","assignWithoutSideEffects","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAMA,cAAc,CAAGC,MAAM,CAACC,eAAe,CAAC,CAI3C,SAAAC,IAAA,MAAGC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAAEC,OAAO,CAAAH,IAAA,CAAPG,OAAO,CAAEC,OAAO,CAAAJ,IAAA,CAAPI,OAAO,CAAQ,OAAA,CAC1CC,UAAU,CAAEJ,KAAK,CACbK,KAAK,CACHJ,KAAK,CACLK,kBAAkB,CACf,CAAEJ,EAAAA,OAAQ,CAAEA,EAAAA,OAAO,GAAK,WAAW,EAAIC,OAAO,CAAG,UAAU,CAAG,EAAG,CAAC,CAAA,CAGpE,CAACH,KAAK,CACT,CAAC,CACD,CACN,CAAC,CAAA,CAAC,CAAC,CAEH,IAAMO,uBAAuB,CAAG,SAA1BA,uBAAuBA,CAAAC,KAAA,CAMH,CALxB,IAAAC,QAAQ,CAAAD,KAAA,CAARC,QAAQ,CACRC,IAAI,CAAAF,KAAA,CAAJE,IAAI,CAQJ,OAAOC,eAAe,EAAE,GAAK,cAAc,CACzCC,GAAA,CAACC,OAAO,CAACC,CAAAA,OAAO,CAAC,MAAM,CAACC,aAAa,CAAC,KAAK,CAACC,QAAQ,CAAC,MAAM,CAAAP,QAAA,CACxDA,QAAQ,CAACQ,GAAG,CAAC,SAACC,KAAK,CAAEC,KAAK,CAAK,CAC9B,GAAI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AA,CAEDG,GAAA,CAACQ,IAAI,CAAA,CACHlB,OAAO,CAAC,MAAM,CACdiE,KAAK,CAAC,yBAAyB,CAC/BzD,IAAI,CAAER,OAAO,GAAK,SAAS,CAAGQ,IAAI,CAAG,QAAS,CAAAD,QAAA,CAE5C,CAAEqE,EAAAA,wBAAwB,CAAC,CAC3BC,UAAU,CAAEtD,WAAW,EAAXA,IAAAA,CAAAA,WAAW,CAAI,CAAC,CAC5BzB,KAAK,CAAEA,KAAK,EAAA,IAAA,CAALA,KAAK,CAAI,CAClB,CAAC,CAAE,CAAEE,EAAAA,OAAO,GAAK,SAAS,CAAG,GAAG,CAAG,EAAG,EAAC,CACnC,CAAC,CACA,CACV,CACDU,GAAA,CAACL,uBAAuB,CAAA,CAACG,IAAI,CAAEA,IAAK,CAAAD,QAAA,CAAEiC,cAAc,CAA0B,CAAC,CACxE,CAAA,CAAC,CACTS,SAAS,CAAA,CAAA,CACI,CAAC,CAErB,CAAC,CAEK,IAAAO,QAAQ,CAAGsB,wBAAwB,CAAC3D,SAAS,CAAE,CAAE4D,WAAW,CAAEpC,aAAa,CAACa,QAAS,CAAC;;;;"}
@@ -14,8 +14,11 @@ import '@babel/runtime/helpers/defineProperty';
14
14
  import Circle from '../Icons/_Svg/Circle/Circle.native.js';
15
15
  import Rect from '../Icons/_Svg/Rect/Rect.native.js';
16
16
  import Svg from '../Icons/_Svg/Svg/Svg.native.js';
17
+ import { opacity } from '../../tokens/global/opacity.js';
18
+ import '../../tokens/global/typography.js';
19
+ import '../../tokens/global/motion.js';
17
20
 
18
- var UnorderedLevel1Icon=function UnorderedLevel1Icon(_ref){var iconDimensions=_ref.iconDimensions,color=_ref.color;return jsx(Svg,{width:iconDimensions,height:iconDimensions,viewBox:"0 0 6 6",fill:"none",children:jsx(Circle,{cx:"3px",cy:"3px",r:"3px",fill:color})});};var UnorderedLevel2Icon=function UnorderedLevel2Icon(_ref2){var iconDimensions=_ref2.iconDimensions,color=_ref2.color;return jsx(Svg,{width:iconDimensions,height:iconDimensions,viewBox:"0 0 6 6",fill:"none",children:jsx(Circle,{cx:"3px",cy:"3px",r:"2.5px",stroke:color})});};var UnorderedLevel3Icon=function UnorderedLevel3Icon(_ref3){var iconDimensions=_ref3.iconDimensions,color=_ref3.color;return jsx(Svg,{width:iconDimensions,height:iconDimensions,viewBox:"0 0 6 6",fill:"none",children:jsx(Rect,{width:iconDimensions,height:iconDimensions,rx:"1px",fill:color})});};var UnorderedItemIcon=function UnorderedItemIcon(_ref4){var level=_ref4.level;var _useTheme=useTheme(),theme=_useTheme.theme,platform=_useTheme.platform;var _useListContext=useListContext(),size=_useListContext.size;var iconDimensions=listItemUnorderedBulletSize[platform][size];var color=theme.colors.surface.text.placeholder.lowContrast;switch(level){case 1:return jsx(UnorderedLevel1Icon,{iconDimensions:iconDimensions,color:color});case 2:return jsx(UnorderedLevel2Icon,{iconDimensions:iconDimensions,color:color});case 3:return jsx(UnorderedLevel3Icon,{iconDimensions:iconDimensions,color:color});default:return jsx(UnorderedLevel3Icon,{iconDimensions:iconDimensions,color:color});}};
21
+ var UnorderedLevel1Icon=function UnorderedLevel1Icon(_ref){var iconDimensions=_ref.iconDimensions,color=_ref.color;return jsx(Svg,{width:iconDimensions,height:iconDimensions,viewBox:"0 0 6 6",fill:"none",children:jsx(Circle,{cx:"3px",cy:"3px",r:"3px",fill:color,fillOpacity:opacity[6]})});};var UnorderedLevel2Icon=function UnorderedLevel2Icon(_ref2){var iconDimensions=_ref2.iconDimensions,color=_ref2.color;return jsx(Svg,{width:iconDimensions,height:iconDimensions,viewBox:"0 0 6 6",fill:"none",children:jsx(Circle,{cx:"3px",cy:"3px",r:"2.5px",stroke:color})});};var UnorderedLevel3Icon=function UnorderedLevel3Icon(_ref3){var iconDimensions=_ref3.iconDimensions,color=_ref3.color;return jsx(Svg,{width:iconDimensions,height:iconDimensions,viewBox:"0 0 6 6",fill:"none",children:jsx(Rect,{width:iconDimensions,height:iconDimensions,rx:"1px",fill:color,fillOpacity:opacity[6]})});};var UnorderedItemIcon=function UnorderedItemIcon(_ref4){var level=_ref4.level;var _useTheme=useTheme(),theme=_useTheme.theme,platform=_useTheme.platform;var _useListContext=useListContext(),size=_useListContext.size;var iconDimensions=listItemUnorderedBulletSize[platform][size];var backgroundToken=theme.colors.surface.text.gray.muted;switch(level){case 1:return jsx(UnorderedLevel1Icon,{iconDimensions:iconDimensions,color:backgroundToken});case 2:return jsx(UnorderedLevel2Icon,{iconDimensions:iconDimensions,color:backgroundToken});case 3:return jsx(UnorderedLevel3Icon,{iconDimensions:iconDimensions,color:backgroundToken});default:return jsx(UnorderedLevel3Icon,{iconDimensions:iconDimensions,color:backgroundToken});}};
19
22
 
20
23
  export { UnorderedItemIcon };
21
24
  //# sourceMappingURL=ListItemIcons.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemIcons.js","sources":["../../../../../src/components/List/ListItemIcons.tsx"],"sourcesContent":["import React from 'react';\nimport { listItemUnorderedBulletSize } from './listTokens';\nimport { useListContext } from './ListContext';\nimport { useTheme } from '~components/BladeProvider';\nimport { Svg, Circle, Rect } from '~components/Icons/_Svg';\n\ntype UnorderedIconProps = {\n iconDimensions: string;\n color: string;\n};\n\nconst UnorderedLevel1Icon = ({ iconDimensions, color }: UnorderedIconProps): React.ReactElement => {\n return (\n <Svg width={iconDimensions} height={iconDimensions} viewBox=\"0 0 6 6\" fill=\"none\">\n <Circle cx=\"3px\" cy=\"3px\" r=\"3px\" fill={color} />\n </Svg>\n );\n};\n\nconst UnorderedLevel2Icon = ({ iconDimensions, color }: UnorderedIconProps): React.ReactElement => {\n return (\n <Svg width={iconDimensions} height={iconDimensions} viewBox=\"0 0 6 6\" fill=\"none\">\n <Circle cx=\"3px\" cy=\"3px\" r=\"2.5px\" stroke={color} />\n </Svg>\n );\n};\n\nconst UnorderedLevel3Icon = ({ iconDimensions, color }: UnorderedIconProps): React.ReactElement => {\n return (\n <Svg width={iconDimensions} height={iconDimensions} viewBox=\"0 0 6 6\" fill=\"none\">\n <Rect width={iconDimensions} height={iconDimensions} rx=\"1px\" fill={color} />\n </Svg>\n );\n};\n\nconst UnorderedItemIcon = ({ level }: { level?: number }): React.ReactElement => {\n const { theme, platform } = useTheme();\n const { size } = useListContext();\n const iconDimensions = listItemUnorderedBulletSize[platform][size];\n const color = theme.colors.surface.text.placeholder.lowContrast;\n\n switch (level) {\n case 1:\n return <UnorderedLevel1Icon iconDimensions={iconDimensions} color={color} />;\n case 2:\n return <UnorderedLevel2Icon iconDimensions={iconDimensions} color={color} />;\n case 3:\n return <UnorderedLevel3Icon iconDimensions={iconDimensions} color={color} />;\n default:\n return <UnorderedLevel3Icon iconDimensions={iconDimensions} color={color} />;\n }\n};\n\nexport { UnorderedItemIcon };\n"],"names":["UnorderedLevel1Icon","_ref","iconDimensions","color","_jsx","Svg","width","height","viewBox","fill","children","Circle","cx","cy","r","UnorderedLevel2Icon","_ref2","stroke","UnorderedLevel3Icon","_ref3","Rect","rx","UnorderedItemIcon","_ref4","level","_useTheme","useTheme","theme","platform","_useListContext","useListContext","size","listItemUnorderedBulletSize","colors","surface","text","placeholder","lowContrast"],"mappings":";;;;;;;;;;;;;;;;;AAWA,IAAMA,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,CAA0E,KAApEC,cAAc,CAAAD,IAAA,CAAdC,cAAc,CAAEC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAClD,OACEC,GAAA,CAACC,GAAG,EAACC,KAAK,CAAEJ,cAAe,CAACK,MAAM,CAAEL,cAAe,CAACM,OAAO,CAAC,SAAS,CAACC,IAAI,CAAC,MAAM,CAAAC,QAAA,CAC/EN,GAAA,CAACO,MAAM,EAACC,EAAE,CAAC,KAAK,CAACC,EAAE,CAAC,KAAK,CAACC,CAAC,CAAC,KAAK,CAACL,IAAI,CAAEN,KAAM,CAAE,CAAC,CAC9C,CAAC,CAEV,CAAC,CAED,IAAMY,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAAC,KAAA,CAA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Q,CAAC,CAACG,IAAI,CAAC,CAClE,IAAM5B,KAAK,CAAGwB,KAAK,CAACM,MAAM,CAACC,OAAO,CAACC,IAAI,CAACC,WAAW,CAACC,WAAW,CAE/D,OAAQb,KAAK,EACX,KAAK,CAAC,CACJ,OAAOpB,GAAA,CAACJ,mBAAmB,EAACE,cAAc,CAAEA,cAAe,CAACC,KAAK,CAAEA,KAAM,CAAE,CAAC,CAC9E,KAAK,CAAC,CACJ,OAAOC,GAAA,CAACW,mBAAmB,CAAA,CAACb,cAAc,CAAEA,cAAe,CAACC,KAAK,CAAEA,KAAM,CAAE,CAAC,CAC9E,KAAM,CAAA,CACJ,OAAOC,GAAA,CAACc,mBAAmB,CAAA,CAAChB,cAAc,CAAEA,cAAe,CAACC,KAAK,CAAEA,KAAM,CAAE,CAAC,CAC9E,QACE,OAAOC,GAAA,CAACc,mBAAmB,CAAChB,CAAAA,cAAc,CAAEA,cAAe,CAACC,KAAK,CAAEA,KAAM,CAAE,CAAC,CAChF,CACF;;;;"}
1
+ {"version":3,"file":"ListItemIcons.js","sources":["../../../../../src/components/List/ListItemIcons.tsx"],"sourcesContent":["import React from 'react';\nimport { listItemUnorderedBulletSize } from './listTokens';\nimport { useListContext } from './ListContext';\nimport { useTheme } from '~components/BladeProvider';\nimport { Svg, Circle, Rect } from '~components/Icons/_Svg';\nimport { opacity } from '~tokens/global';\n\ntype UnorderedIconProps = {\n iconDimensions: string;\n color: string;\n};\n\nconst UnorderedLevel1Icon = ({ iconDimensions, color }: UnorderedIconProps): React.ReactElement => {\n return (\n <Svg width={iconDimensions} height={iconDimensions} viewBox=\"0 0 6 6\" fill=\"none\">\n <Circle cx=\"3px\" cy=\"3px\" r=\"3px\" fill={color} fillOpacity={opacity[6]} />\n </Svg>\n );\n};\n\nconst UnorderedLevel2Icon = ({ iconDimensions, color }: UnorderedIconProps): React.ReactElement => {\n return (\n <Svg width={iconDimensions} height={iconDimensions} viewBox=\"0 0 6 6\" fill=\"none\">\n <Circle cx=\"3px\" cy=\"3px\" r=\"2.5px\" stroke={color} />\n </Svg>\n );\n};\n\nconst UnorderedLevel3Icon = ({ iconDimensions, color }: UnorderedIconProps): React.ReactElement => {\n return (\n <Svg width={iconDimensions} height={iconDimensions} viewBox=\"0 0 6 6\" fill=\"none\">\n <Rect\n width={iconDimensions}\n height={iconDimensions}\n rx=\"1px\"\n fill={color}\n fillOpacity={opacity[6]}\n />\n </Svg>\n );\n};\n\nconst UnorderedItemIcon = ({ level }: { level?: number }): React.ReactElement => {\n const { theme, platform } = useTheme();\n const { size } = useListContext();\n const iconDimensions = listItemUnorderedBulletSize[platform][size];\n const backgroundToken = theme.colors.surface.text.gray.muted;\n\n switch (level) {\n case 1:\n return <UnorderedLevel1Icon iconDimensions={iconDimensions} color={backgroundToken} />;\n case 2:\n return <UnorderedLevel2Icon iconDimensions={iconDimensions} color={backgroundToken} />;\n case 3:\n return <UnorderedLevel3Icon iconDimensions={iconDimensions} color={backgroundToken} />;\n default:\n return <UnorderedLevel3Icon iconDimensions={iconDimensions} color={backgroundToken} />;\n }\n};\n\nexport { UnorderedItemIcon };\n"],"names":["UnorderedLevel1Icon","_ref","iconDimensions","color","_jsx","Svg","width","height","viewBox","fill","children","Circle","cx","cy","r","fillOpacity","opacity","UnorderedLevel2Icon","_ref2","stroke","UnorderedLevel3Icon","_ref3","Rect","rx","UnorderedItemIcon","_ref4","level","_useTheme","useTheme","theme","platform","_useListContext","useListContext","size","listItemUnorderedBulletSize","backgroundToken","colors","surface","text","gray","muted"],"mappings":";;;;;;;;;;;;;;;;;;;;AAYA,IAAMA,mBAAmB,CAAG,SAAtBA,mBAAmBA,CAAAC,IAAA,CAA0E,CAAA,IAApEC,cAAc,CAAAD,IAAA,CAAdC,cAAc,CAAEC,KAAK,CAAAF,IAAA,CAALE,KAAK,CAClD,OACEC,GAAA,CAACC,GAAG,CAACC,CAAAA,KAAK,CAAEJ,cAAe,CAACK,MAAM,CAAEL,cAAe,CAACM,OAAO,CAAC,SAAS,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C,CAEK,IAAAQ,iBAAiB,CAAG,SAApBA,iBAAiBA,CAAAC,KAAA,CAA0D,CAAA,IAApDC,KAAK,CAAAD,KAAA,CAALC,KAAK,CAChC,IAAAC,SAAA,CAA4BC,QAAQ,EAAE,CAA9BC,KAAK,CAAAF,SAAA,CAALE,KAAK,CAAEC,QAAQ,CAAAH,SAAA,CAARG,QAAQ,CACvB,IAAAC,eAAA,CAAiBC,cAAc,EAAE,CAAzBC,IAAI,CAAAF,eAAA,CAAJE,IAAI,CACZ,IAAM/B,cAAc,CAAGgC,2BAA2B,CAACJ,QAAQ,CAAC,CAACG,IAAI,CAAC,CAClE,IAAME,eAAe,CAAGN,KAAK,CAACO,MAAM,CAACC,OAAO,CAACC,IAAI,CAACC,IAAI,CAACC,KAAK,CAE5D,OAAQd,KAAK,EACX,KAAK,CAAC,CACJ,OAAOtB,GAAA,CAACJ,mBAAmB,CAACE,CAAAA,cAAc,CAAEA,cAAe,CAACC,KAAK,CAAEgC,eAAgB,CAAE,CAAC,CACxF,KAAM,CAAA,CACJ,OAAO/B,GAAA,CAACa,mBAAmB,CAACf,CAAAA,cAAc,CAAEA,cAAe,CAACC,KAAK,CAAEgC,eAAgB,CAAE,CAAC,CACxF,MAAM,CACJ,OAAO/B,GAAA,CAACgB,mBAAmB,EAAClB,cAAc,CAAEA,cAAe,CAACC,KAAK,CAAEgC,eAAgB,CAAE,CAAC,CACxF,QACE,OAAO/B,GAAA,CAACgB,mBAAmB,CAAA,CAAClB,cAAc,CAAEA,cAAe,CAACC,KAAK,CAAEgC,eAAgB,CAAE,CAAC,CAC1F,CACF;;;;"}
@@ -18,7 +18,7 @@ import { useControllableState } from '../../utils/useControllable.js';
18
18
  import { PopupArrow } from '../PopupArrow/PopupArrow.native.js';
19
19
  import { getFloatingPlacementParts } from '../../utils/getFloatingPlacementParts.js';
20
20
 
21
- var Popover=function Popover(_ref){var content=_ref.content,children=_ref.children,_ref$placement=_ref.placement,placement=_ref$placement===void 0?'top':_ref$placement,onOpenChange=_ref.onOpenChange,_ref$zIndex=_ref.zIndex,zIndex=_ref$zIndex===void 0?popoverZIndex:_ref$zIndex,title=_ref.title,titleLeading=_ref.titleLeading,footer=_ref.footer,isOpen=_ref.isOpen,defaultIsOpen=_ref.defaultIsOpen;var _useTheme=useTheme(),theme=_useTheme.theme;var defaultInitialFocusRef=React__default.useRef(null);var _useControllableState=useControllableState({value:isOpen,defaultValue:defaultIsOpen,onChange:function onChange(isOpen){return onOpenChange==null?void 0:onOpenChange({isOpen:isOpen});}}),_useControllableState2=_slicedToArray(_useControllableState,2),controllableIsOpen=_useControllableState2[0],controllableSetIsOpen=_useControllableState2[1];var gap=theme.spacing[2];var _getFloatingPlacement=getFloatingPlacementParts(placement),_getFloatingPlacement2=_slicedToArray(_getFloatingPlacement,1),side=_getFloatingPlacement2[0];var isHorizontal=side==='left'||side==='right';var arrowRef=React__default.useRef();var context=useFloating({sameScrollView:false,placement:placement,middleware:[shift({crossAxis:false,padding:gap}),flip({padding:gap,fallbackAxisSideDirection:'start'}),offset(gap+ARROW_HEIGHT),arrow({element:arrowRef,padding:isHorizontal?0:ARROW_WIDTH})]});var refs=context.refs,floatingStyles=context.floatingStyles;var _getFloatingPlacement3=getFloatingPlacementParts(context.placement),_getFloatingPlacement4=_slicedToArray(_getFloatingPlacement3,1),computedSide=_getFloatingPlacement4[0];var handleOpen=React__default.useCallback(function(){controllableSetIsOpen(function(){return true;});onOpenChange==null?void 0:onOpenChange({isOpen:true});},[controllableSetIsOpen,onOpenChange]);var handleClose=React__default.useCallback(function(){controllableSetIsOpen(function(){return false;});onOpenChange==null?void 0:onOpenChange({isOpen:false});},[controllableSetIsOpen,onOpenChange]);var _React$useState=React__default.useState(function(){return controllableIsOpen;}),_React$useState2=_slicedToArray(_React$useState,2),isVisible=_React$useState2[0],setIsVisible=_React$useState2[1];React__default.useEffect(function(){var id=setTimeout(function(){if(!controllableIsOpen){setIsVisible(false);}},theme.motion.duration.gentle);if(controllableIsOpen){setIsVisible(true);}return function(){return clearTimeout(id);};},[controllableIsOpen]);var contextValue=React__default.useMemo(function(){return {close:handleClose,defaultInitialFocusRef:defaultInitialFocusRef,titleId:undefined};},[handleClose]);return jsxs(PopoverContext.Provider,{value:contextValue,children:[React__default.cloneElement(children,Object.assign({},mergeProps({onTouchEnd:children.props.onTouchEnd},{onTouchEnd:handleOpen}),{ref:refs.setReference})),jsxs(Modal,Object.assign({collapsable:false,transparent:true,visible:Boolean(isVisible)},metaAttribute({testID:'popover-modal'}),{children:[jsx(TouchableOpacity,Object.assign({style:{position:'absolute',top:0,bottom:0,left:0,right:0},onPress:handleClose,activeOpacity:1,testID:"popover-modal-backdrop"},metaAttribute({name:MetaConstants.Popover}))),jsx(PopoverContent,{titleLeading:titleLeading,title:title,footer:footer,isVisible:controllableIsOpen,ref:refs.setFloating,side:computedSide,style:Object.assign({},floatingStyles,{zIndex:zIndex}),arrow:jsx(PopupArrow,{ref:arrowRef,context:context,width:ARROW_WIDTH,height:ARROW_HEIGHT,fillColor:theme.colors.surface.popup.background,strokeColor:theme.colors.brand.gray[400].lowContrast}),children:content})]}))]});};
21
+ var Popover=function Popover(_ref){var content=_ref.content,children=_ref.children,_ref$placement=_ref.placement,placement=_ref$placement===void 0?'top':_ref$placement,onOpenChange=_ref.onOpenChange,_ref$zIndex=_ref.zIndex,zIndex=_ref$zIndex===void 0?popoverZIndex:_ref$zIndex,title=_ref.title,titleLeading=_ref.titleLeading,footer=_ref.footer,isOpen=_ref.isOpen,defaultIsOpen=_ref.defaultIsOpen;var _useTheme=useTheme(),theme=_useTheme.theme;var defaultInitialFocusRef=React__default.useRef(null);var _useControllableState=useControllableState({value:isOpen,defaultValue:defaultIsOpen,onChange:function onChange(isOpen){return onOpenChange==null?void 0:onOpenChange({isOpen:isOpen});}}),_useControllableState2=_slicedToArray(_useControllableState,2),controllableIsOpen=_useControllableState2[0],controllableSetIsOpen=_useControllableState2[1];var gap=theme.spacing[2];var _getFloatingPlacement=getFloatingPlacementParts(placement),_getFloatingPlacement2=_slicedToArray(_getFloatingPlacement,1),side=_getFloatingPlacement2[0];var isHorizontal=side==='left'||side==='right';var arrowRef=React__default.useRef();var context=useFloating({sameScrollView:false,placement:placement,middleware:[shift({crossAxis:false,padding:gap}),flip({padding:gap,fallbackAxisSideDirection:'start'}),offset(gap+ARROW_HEIGHT),arrow({element:arrowRef,padding:isHorizontal?0:ARROW_WIDTH})]});var refs=context.refs,floatingStyles=context.floatingStyles;var _getFloatingPlacement3=getFloatingPlacementParts(context.placement),_getFloatingPlacement4=_slicedToArray(_getFloatingPlacement3,1),computedSide=_getFloatingPlacement4[0];var handleOpen=React__default.useCallback(function(){controllableSetIsOpen(function(){return true;});onOpenChange==null?void 0:onOpenChange({isOpen:true});},[controllableSetIsOpen,onOpenChange]);var handleClose=React__default.useCallback(function(){controllableSetIsOpen(function(){return false;});onOpenChange==null?void 0:onOpenChange({isOpen:false});},[controllableSetIsOpen,onOpenChange]);var _React$useState=React__default.useState(function(){return controllableIsOpen;}),_React$useState2=_slicedToArray(_React$useState,2),isVisible=_React$useState2[0],setIsVisible=_React$useState2[1];React__default.useEffect(function(){var id=setTimeout(function(){if(!controllableIsOpen){setIsVisible(false);}},theme.motion.duration.gentle);if(controllableIsOpen){setIsVisible(true);}return function(){return clearTimeout(id);};},[controllableIsOpen]);var contextValue=React__default.useMemo(function(){return {close:handleClose,defaultInitialFocusRef:defaultInitialFocusRef,titleId:undefined};},[handleClose]);return jsxs(PopoverContext.Provider,{value:contextValue,children:[React__default.cloneElement(children,Object.assign({},mergeProps({onTouchEnd:children.props.onTouchEnd},{onTouchEnd:handleOpen}),{ref:refs.setReference})),jsxs(Modal,Object.assign({collapsable:false,transparent:true,visible:Boolean(isVisible)},metaAttribute({testID:'popover-modal'}),{children:[jsx(TouchableOpacity,Object.assign({style:{position:'absolute',top:0,bottom:0,left:0,right:0},onPress:handleClose,activeOpacity:1,testID:"popover-modal-backdrop"},metaAttribute({name:MetaConstants.Popover}))),jsx(PopoverContent,{titleLeading:titleLeading,title:title,footer:footer,isVisible:controllableIsOpen,ref:refs.setFloating,side:computedSide,style:Object.assign({},floatingStyles,{zIndex:zIndex}),arrow:jsx(PopupArrow,{ref:arrowRef,context:context,width:ARROW_WIDTH,height:ARROW_HEIGHT,fillColor:theme.colors.popup.background.subtle,strokeColor:theme.colors.popup.border.subtle}),children:content})]}))]});};
22
22
 
23
23
  export { Popover };
24
24
  //# sourceMappingURL=Popover.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.native.js","sources":["../../../../../src/components/Popover/Popover.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport { arrow, shift, useFloating, flip, offset } from '@floating-ui/react-native';\nimport React from 'react';\nimport { Modal, TouchableOpacity } from 'react-native';\nimport { PopoverContent } from './PopoverContent';\nimport type { PopoverProps } from './types';\nimport { ARROW_HEIGHT, ARROW_WIDTH, popoverZIndex } from './constants';\nimport { PopoverContext } from './PopoverContext';\nimport { useTheme } from '~components/BladeProvider';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { mergeProps } from '~utils/mergeProps';\nimport { useControllableState } from '~utils/useControllable';\nimport { PopupArrow } from '~components/PopupArrow';\nimport { getFloatingPlacementParts } from '~utils/getFloatingPlacementParts';\n\nconst Popover = ({\n content,\n children,\n placement = 'top',\n onOpenChange,\n zIndex = popoverZIndex,\n title,\n titleLeading,\n footer,\n isOpen,\n defaultIsOpen,\n}: PopoverProps): React.ReactElement => {\n const { theme } = useTheme();\n const defaultInitialFocusRef = React.useRef(null);\n const [controllableIsOpen, controllableSetIsOpen] = useControllableState({\n value: isOpen,\n defaultValue: defaultIsOpen,\n onChange: (isOpen) => onOpenChange?.({ isOpen }),\n });\n\n const gap = theme.spacing[2];\n const [side] = getFloatingPlacementParts(placement);\n const isHorizontal = side === 'left' || side === 'right';\n const arrowRef = React.useRef();\n const context = useFloating({\n sameScrollView: false,\n placement,\n middleware: [\n shift({ crossAxis: false, padding: gap }),\n flip({ padding: gap, fallbackAxisSideDirection: 'start' }),\n offset(gap + ARROW_HEIGHT),\n arrow({\n element: arrowRef,\n padding: isHorizontal ? 0 : ARROW_WIDTH,\n }),\n ],\n });\n\n const { refs, floatingStyles } = context;\n const [computedSide] = getFloatingPlacementParts(context.placement);\n\n const handleOpen = React.useCallback(() => {\n controllableSetIsOpen(() => true);\n onOpenChange?.({ isOpen: true });\n }, [controllableSetIsOpen, onOpenChange]);\n\n const handleClose = React.useCallback(() => {\n controllableSetIsOpen(() => false);\n onOpenChange?.({ isOpen: false });\n }, [controllableSetIsOpen, onOpenChange]);\n\n // wait for animation to finish before unmounting modal\n const [isVisible, setIsVisible] = React.useState(() => controllableIsOpen);\n React.useEffect(() => {\n const id = setTimeout(() => {\n if (!controllableIsOpen) {\n setIsVisible(false);\n }\n }, theme.motion.duration.gentle);\n\n if (controllableIsOpen) {\n setIsVisible(true);\n }\n return () => clearTimeout(id);\n }, [controllableIsOpen]);\n\n const contextValue = React.useMemo(() => {\n return {\n close: handleClose,\n defaultInitialFocusRef,\n titleId: undefined,\n };\n }, [handleClose]);\n\n return (\n <PopoverContext.Provider value={contextValue}>\n {/* Cloning the trigger children to enhance it with ref and event handler */}\n {React.cloneElement(children, {\n ...mergeProps(\n {\n onTouchEnd: children.props.onTouchEnd,\n },\n { onTouchEnd: handleOpen },\n ),\n ref: refs.setReference,\n })}\n <Modal\n collapsable={false}\n transparent\n visible={Boolean(isVisible)}\n {...metaAttribute({ testID: 'popover-modal' })}\n >\n <TouchableOpacity\n style={{\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n }}\n onPress={handleClose}\n activeOpacity={1}\n testID=\"popover-modal-backdrop\"\n {...metaAttribute({ name: MetaConstants.Popover })}\n />\n <PopoverContent\n titleLeading={titleLeading}\n title={title}\n footer={footer}\n isVisible={controllableIsOpen}\n ref={refs.setFloating}\n side={computedSide}\n style={{\n ...floatingStyles,\n // TODO: Tokenize zIndex values\n zIndex,\n }}\n arrow={\n <PopupArrow\n ref={arrowRef as never}\n context={context}\n width={ARROW_WIDTH}\n height={ARROW_HEIGHT}\n fillColor={theme.colors.surface.popup.background}\n strokeColor={theme.colors.brand.gray[400].lowContrast}\n />\n }\n >\n {content}\n </PopoverContent>\n </Modal>\n </PopoverContext.Provider>\n );\n};\n\nexport { Popover };\n"],"names":["Popover","_ref","content","children","_ref$placement","placement","onOpenChange","_ref$zIndex","zIndex","popoverZIndex","title","titleLeading","footer","isOpen","defaultIsOpen","_useTheme","useTheme","theme","defaultInitialFocusRef","React","useRef","_useControllableState","useControllableState","value","defaultValue","onChange","_useControllableState2","_slicedToArray","controllableIsOpen","controllableSetIsOpen","gap","spacing","_getFloatingPlacement","getFloatingPlacementParts","_getFloatingPlacement2","side","isHorizontal","arrowRef","context","useFloating","sameScrollView","middleware","shift","crossAxis","padding","flip","fallbackAxisSideDirection","offset","ARROW_HEIGHT","arrow","element","ARROW_WIDTH","refs","floatingStyles","_getFloatingPlacement3","_getFloatingPlacement4","computedSide","handleOpen","useCallback","handleClose","_React$useState","useState","_React$useState2","isVisible","setIsVisible","useEffect","id","setTimeout","motion","duration","gentle","clearTimeout","contextValue","useMemo","close","titleId","undefined","_jsxs","PopoverContext","Provider","cloneElement","Object","assign","mergeProps","onTouchEnd","props","ref","setReference","Modal","collapsable","transparent","visible","Boolean","metaAttribute","testID","_jsx","TouchableOpacity","style","position","top","bottom","left","right","onPress","activeOpacity","name","MetaConstants","PopoverContent","setFloating","PopupArrow","width","height","fillColor","colors","surface","popup","background","strokeColor","brand","gray","lowContrast"],"mappings":";;;;;;;;;;;;;;;;;;;;AAeM,IAAAA,OAAO,CAAG,SAAVA,OAAOA,CAAAC,IAAA,CAW2B,CAAA,IAVtCC,OAAO,CAAAD,IAAA,CAAPC,OAAO,CACPC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAAC,cAAA,CAAAH,IAAA,CACRI,SAAS,CAATA,SAAS,CAAAD,cAAA,GAAA,KA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AK,CAACC,UAAW,CACjDC,WAAW,CAAEpG,KAAK,CAACgG,MAAM,CAACK,KAAK,CAACC,IAAI,CAAC,GAAG,CAAC,CAACC,WAAY,CACvD,CACF,CAAArH,QAAA,CAEAD,OAAO,CACM,CAAC,GACZ,CAAC,CAAA,CACe,CAAC,CAE9B;;;;"}
1
+ {"version":3,"file":"Popover.native.js","sources":["../../../../../src/components/Popover/Popover.native.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/restrict-plus-operands */\nimport { arrow, shift, useFloating, flip, offset } from '@floating-ui/react-native';\nimport React from 'react';\nimport { Modal, TouchableOpacity } from 'react-native';\nimport { PopoverContent } from './PopoverContent';\nimport type { PopoverProps } from './types';\nimport { ARROW_HEIGHT, ARROW_WIDTH, popoverZIndex } from './constants';\nimport { PopoverContext } from './PopoverContext';\nimport { useTheme } from '~components/BladeProvider';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { mergeProps } from '~utils/mergeProps';\nimport { useControllableState } from '~utils/useControllable';\nimport { PopupArrow } from '~components/PopupArrow';\nimport { getFloatingPlacementParts } from '~utils/getFloatingPlacementParts';\n\nconst Popover = ({\n content,\n children,\n placement = 'top',\n onOpenChange,\n zIndex = popoverZIndex,\n title,\n titleLeading,\n footer,\n isOpen,\n defaultIsOpen,\n}: PopoverProps): React.ReactElement => {\n const { theme } = useTheme();\n const defaultInitialFocusRef = React.useRef(null);\n const [controllableIsOpen, controllableSetIsOpen] = useControllableState({\n value: isOpen,\n defaultValue: defaultIsOpen,\n onChange: (isOpen) => onOpenChange?.({ isOpen }),\n });\n\n const gap = theme.spacing[2];\n const [side] = getFloatingPlacementParts(placement);\n const isHorizontal = side === 'left' || side === 'right';\n const arrowRef = React.useRef();\n const context = useFloating({\n sameScrollView: false,\n placement,\n middleware: [\n shift({ crossAxis: false, padding: gap }),\n flip({ padding: gap, fallbackAxisSideDirection: 'start' }),\n offset(gap + ARROW_HEIGHT),\n arrow({\n element: arrowRef,\n padding: isHorizontal ? 0 : ARROW_WIDTH,\n }),\n ],\n });\n\n const { refs, floatingStyles } = context;\n const [computedSide] = getFloatingPlacementParts(context.placement);\n\n const handleOpen = React.useCallback(() => {\n controllableSetIsOpen(() => true);\n onOpenChange?.({ isOpen: true });\n }, [controllableSetIsOpen, onOpenChange]);\n\n const handleClose = React.useCallback(() => {\n controllableSetIsOpen(() => false);\n onOpenChange?.({ isOpen: false });\n }, [controllableSetIsOpen, onOpenChange]);\n\n // wait for animation to finish before unmounting modal\n const [isVisible, setIsVisible] = React.useState(() => controllableIsOpen);\n React.useEffect(() => {\n const id = setTimeout(() => {\n if (!controllableIsOpen) {\n setIsVisible(false);\n }\n }, theme.motion.duration.gentle);\n\n if (controllableIsOpen) {\n setIsVisible(true);\n }\n return () => clearTimeout(id);\n }, [controllableIsOpen]);\n\n const contextValue = React.useMemo(() => {\n return {\n close: handleClose,\n defaultInitialFocusRef,\n titleId: undefined,\n };\n }, [handleClose]);\n\n return (\n <PopoverContext.Provider value={contextValue}>\n {/* Cloning the trigger children to enhance it with ref and event handler */}\n {React.cloneElement(children, {\n ...mergeProps(\n {\n onTouchEnd: children.props.onTouchEnd,\n },\n { onTouchEnd: handleOpen },\n ),\n ref: refs.setReference,\n })}\n <Modal\n collapsable={false}\n transparent\n visible={Boolean(isVisible)}\n {...metaAttribute({ testID: 'popover-modal' })}\n >\n <TouchableOpacity\n style={{\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n }}\n onPress={handleClose}\n activeOpacity={1}\n testID=\"popover-modal-backdrop\"\n {...metaAttribute({ name: MetaConstants.Popover })}\n />\n <PopoverContent\n titleLeading={titleLeading}\n title={title}\n footer={footer}\n isVisible={controllableIsOpen}\n ref={refs.setFloating}\n side={computedSide}\n style={{\n ...floatingStyles,\n // TODO: Tokenize zIndex values\n zIndex,\n }}\n arrow={\n <PopupArrow\n ref={arrowRef as never}\n context={context}\n width={ARROW_WIDTH}\n height={ARROW_HEIGHT}\n fillColor={theme.colors.popup.background.subtle}\n strokeColor={theme.colors.popup.border.subtle}\n />\n }\n >\n {content}\n </PopoverContent>\n </Modal>\n </PopoverContext.Provider>\n );\n};\n\nexport { Popover };\n"],"names":["Popover","_ref","content","children","_ref$placement","placement","onOpenChange","_ref$zIndex","zIndex","popoverZIndex","title","titleLeading","footer","isOpen","defaultIsOpen","_useTheme","useTheme","theme","defaultInitialFocusRef","React","useRef","_useControllableState","useControllableState","value","defaultValue","onChange","_useControllableState2","_slicedToArray","controllableIsOpen","controllableSetIsOpen","gap","spacing","_getFloatingPlacement","getFloatingPlacementParts","_getFloatingPlacement2","side","isHorizontal","arrowRef","context","useFloating","sameScrollView","middleware","shift","crossAxis","padding","flip","fallbackAxisSideDirection","offset","ARROW_HEIGHT","arrow","element","ARROW_WIDTH","refs","floatingStyles","_getFloatingPlacement3","_getFloatingPlacement4","computedSide","handleOpen","useCallback","handleClose","_React$useState","useState","_React$useState2","isVisible","setIsVisible","useEffect","id","setTimeout","motion","duration","gentle","clearTimeout","contextValue","useMemo","close","titleId","undefined","_jsxs","PopoverContext","Provider","cloneElement","Object","assign","mergeProps","onTouchEnd","props","ref","setReference","Modal","collapsable","transparent","visible","Boolean","metaAttribute","testID","_jsx","TouchableOpacity","style","position","top","bottom","left","right","onPress","activeOpacity","name","MetaConstants","PopoverContent","setFloating","PopupArrow","width","height","fillColor","colors","popup","background","subtle","strokeColor","border"],"mappings":";;;;;;;;;;;;;;;;;;;;AAeM,IAAAA,OAAO,CAAG,SAAVA,OAAOA,CAAAC,IAAA,CAW2B,KAVtCC,OAAO,CAAAD,IAAA,CAAPC,OAAO,CACPC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAAC,cAAA,CAAAH,IAAA,CACRI,SAAS,CAATA,SAAS,CAAAD,cAAA,UAAG,KAAK,CAAAA,cAAA,CACjBE,YAAY,CAAAL,IAAA,CAAZK,YAAY,CAAAC,WAAA,CAAAN,IAAA,CACZO,MAAM,CAANA,MAAM,CAAAD,WAAA,G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CAAC,CAE9B;;;;"}
@@ -12,12 +12,11 @@ import '../../tokens/global/motion.js';
12
12
  import { isReactNative } from '../../utils/platform/isReactNative.js';
13
13
  import '../BladeProvider/useTheme.js';
14
14
  import { jsxs, jsx } from 'react/jsx-runtime';
15
- import { Heading } from '../Typography/Heading/Heading.js';
16
- import '../Typography/Text/Text.js';
15
+ import { Text } from '../Typography/Text/Text.js';
17
16
  import '../Typography/Code/Code.js';
18
17
  import { useIsMobile } from '../../utils/useIsMobile.js';
19
18
 
20
- var PopoverHeader=function PopoverHeader(_ref){var title=_ref.title,titleLeading=_ref.titleLeading;var _usePopoverContext=usePopoverContext(),titleId=_usePopoverContext.titleId;var isFloating=!(title||titleLeading);if(isFloating){return jsx(BaseBox,{borderRadius:"max",position:"absolute",padding:"spacing.2",top:"spacing.2",right:"spacing.2",zIndex:1,children:jsx(PopoverCloseButton,{})});}return jsxs(BaseBox,{display:"flex",flexDirection:"row",flexWrap:isReactNative()?'wrap':'nowrap',alignItems:"center",gap:"spacing.3",children:[titleLeading?React__default.cloneElement(titleLeading,{size:'large'}):null,title?jsx(BaseBox,{id:titleId,paddingRight:"spacing.4",children:jsx(Heading,{size:"small",weight:"bold",type:"normal",children:title})}):null,jsx(BaseBox,{marginLeft:"auto",children:jsx(PopoverCloseButton,{})})]});};var PopoverContent=React__default.forwardRef(function(_ref2,ref){var children=_ref2.children,title=_ref2.title,titleLeading=_ref2.titleLeading,footer=_ref2.footer,arrow=_ref2.arrow,side=_ref2.side,style=_ref2.style,isVisible=_ref2.isVisible;var isMobile=useIsMobile();return jsxs(PopoverContentWrapper,{ref:ref,styles:style,side:side,isVisible:isVisible,isMobile:isMobile,children:[jsxs(BaseBox,{padding:"spacing.4",display:"flex",flexDirection:"column",gap:"spacing.4",children:[jsx(PopoverHeader,{title:title,titleLeading:titleLeading}),jsx(BaseBox,{children:children}),footer?jsx(BaseBox,{children:footer}):null]}),arrow]});});
19
+ var PopoverHeader=function PopoverHeader(_ref){var title=_ref.title,titleLeading=_ref.titleLeading;var _usePopoverContext=usePopoverContext(),titleId=_usePopoverContext.titleId;var isFloating=!(title||titleLeading);if(isFloating){return jsx(BaseBox,{borderRadius:"max",position:"absolute",padding:"spacing.2",top:"spacing.2",right:"spacing.2",zIndex:1,children:jsx(PopoverCloseButton,{})});}return jsxs(BaseBox,{display:"flex",flexDirection:"row",flexWrap:isReactNative()?'wrap':'nowrap',alignItems:"center",gap:"spacing.3",children:[titleLeading?React__default.cloneElement(titleLeading,{size:'large'}):null,title?jsx(BaseBox,{id:titleId,paddingRight:"spacing.4",children:jsx(Text,{size:"large",weight:"semibold",children:title})}):null,jsx(BaseBox,{marginLeft:"auto",children:jsx(PopoverCloseButton,{})})]});};var PopoverContent=React__default.forwardRef(function(_ref2,ref){var children=_ref2.children,title=_ref2.title,titleLeading=_ref2.titleLeading,footer=_ref2.footer,arrow=_ref2.arrow,side=_ref2.side,style=_ref2.style,isVisible=_ref2.isVisible;var isMobile=useIsMobile();return jsxs(PopoverContentWrapper,{ref:ref,styles:style,side:side,isVisible:isVisible,isMobile:isMobile,children:[jsxs(BaseBox,{padding:"spacing.4",display:"flex",flexDirection:"column",gap:"spacing.4",children:[jsx(PopoverHeader,{title:title,titleLeading:titleLeading}),jsx(BaseBox,{children:children}),footer?jsx(BaseBox,{children:footer}):null]}),arrow]});});
21
20
 
22
21
  export { PopoverContent };
23
22
  //# sourceMappingURL=PopoverContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverContent.js","sources":["../../../../../src/components/Popover/PopoverContent.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport React from 'react';\nimport { PopoverContentWrapper } from './PopoverContentWrapper';\nimport type { PopoverContentProps } from './types';\nimport { PopoverCloseButton } from './PopoverCloseButton';\nimport { usePopoverContext } from './PopoverContext';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Heading } from '~components/Typography';\nimport { isReactNative } from '~utils';\nimport { useIsMobile } from '~utils/useIsMobile';\n\ntype PopoverHeaderProps = {\n title?: string;\n titleLeading?: React.ReactNode;\n};\n\nconst PopoverHeader = ({ title, titleLeading }: PopoverHeaderProps): React.ReactElement => {\n const { titleId } = usePopoverContext();\n\n const isFloating = !(title || titleLeading);\n if (isFloating) {\n return (\n <BaseBox\n borderRadius=\"max\"\n position=\"absolute\"\n padding=\"spacing.2\"\n top=\"spacing.2\"\n right=\"spacing.2\"\n zIndex={1}\n >\n <PopoverCloseButton />\n </BaseBox>\n );\n }\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n flexWrap={isReactNative() ? 'wrap' : 'nowrap'}\n alignItems=\"center\"\n gap=\"spacing.3\"\n >\n {titleLeading\n ? React.cloneElement(titleLeading as React.ReactElement, { size: 'large' })\n : null}\n {title ? (\n <BaseBox id={titleId} paddingRight=\"spacing.4\">\n <Heading size=\"small\" weight=\"bold\" type=\"normal\">\n {title}\n </Heading>\n </BaseBox>\n ) : null}\n <BaseBox marginLeft=\"auto\">\n <PopoverCloseButton />\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst PopoverContent = React.forwardRef<HTMLDivElement, PopoverContentProps>(\n ({ children, title, titleLeading, footer, arrow, side, style, isVisible }, ref) => {\n const isMobile = useIsMobile();\n return (\n <PopoverContentWrapper\n ref={ref as never}\n styles={style}\n side={side}\n isVisible={isVisible}\n isMobile={isMobile}\n >\n <BaseBox padding=\"spacing.4\" display=\"flex\" flexDirection=\"column\" gap=\"spacing.4\">\n <PopoverHeader title={title} titleLeading={titleLeading} />\n <BaseBox>{children}</BaseBox>\n {footer ? <BaseBox>{footer}</BaseBox> : null}\n </BaseBox>\n {arrow}\n </PopoverContentWrapper>\n );\n },\n);\n\nexport { PopoverContent };\n"],"names":["PopoverHeader","_ref","title","titleLeading","_usePopoverContext","usePopoverContext","titleId","isFloating","_jsx","BaseBox","borderRadius","position","padding","top","right","zIndex","children","PopoverCloseButton","_jsxs","display","flexDirection","flexWrap","isReactNative","alignItems","gap","React","cloneElement","size","id","paddingRight","Heading","weight","type","marginLeft","PopoverContent","forwardRef","_ref2","ref","footer","arrow","side","style","isVisible","isMobile","useIsMobile","PopoverContentWrapper","styles"],"mappings":";;;;;;;;;;;;;;;;;;;AAgBA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAAwE,CAAlE,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,YAAY,CAAAF,IAAA,CAAZE,YAAY,CAC1C,IAAAC,kBAAA,CAAoBC,iBAAiB,EAAE,CAA/BC,OAAO,CAAAF,kBAAA,CAAPE,OAAO,CAEf,IAAMC,UAAU,CAAG,EAAEL,KAAK,EAAIC,YAAY,CAAC,CAC3C,GAAII,UAAU,CAAE,CACd,OACEC,GAAA,CAACC,OAAO,EACNC,YAAY,CAAC,KAAK,CAClBC,QAAQ,CAAC,UAAU,CACnBC,OAAO,CAAC,WAAW,CACnBC,GAAG,CAAC,WAAW,CACfC,KAAK,CAAC,WAAW,CACjBC,MAAM,CAAE,CAAE,CAAAC,QAAA,CAEVR,GAAA,CAACS,kBAAkB,CAAE,EAAA,CAAC,CACf,CAAC,CAEd,CAEA,OACEC,IAAA,CAACT,OAAO,CAAA,CACNU,OAAO,CAAC,MAAM,CACdC,aAAa,CAAC,KAAK,CACnBC,QAAQ,CAAEC,aAAa,EAAE,CAAG,MAAM,CAAG,QAAS,CAC9CC,UAAU,CAAC,QAAQ,CACnBC,GAAG,CAAC,WAAW,CAAAR,QAAA,CAEdb,CAAAA,YAAY,CACTsB,cAAK,CAACC,YAAY,CAACvB,YAAY,CAAwB,CAAEwB,IAAI,CAAE,OAAQ,CAAC,CAAC,CACzE,IAAI,CACPzB,KAAK,CACJM,GAAA,CAACC,OAAO,CAACmB,CAAAA,EAAE,CAAEtB,OAAQ,CAACuB,YAAY,CAAC,WAAW,CAAAb,QAAA,CAC5CR,GAAA,CAACsB,OAAO,CAAA,CAACH,IAAI,CAAC,OAAO,CAACI,MAAM,CAAC,MAAM,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ACC,OAAO,CAAA,CAAAO,QAAA,CAAEsB,MAAM,CAAU,CAAC,CAAG,IAAI,EACrC,CAAC,CACTC,KAAK,CACe,CAAA,CAAC,CAE5B,CACF;;;;"}
1
+ {"version":3,"file":"PopoverContent.js","sources":["../../../../../src/components/Popover/PopoverContent.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport React from 'react';\nimport { PopoverContentWrapper } from './PopoverContentWrapper';\nimport type { PopoverContentProps } from './types';\nimport { PopoverCloseButton } from './PopoverCloseButton';\nimport { usePopoverContext } from './PopoverContext';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport { isReactNative } from '~utils';\nimport { useIsMobile } from '~utils/useIsMobile';\n\ntype PopoverHeaderProps = {\n title?: string;\n titleLeading?: React.ReactNode;\n};\n\nconst PopoverHeader = ({ title, titleLeading }: PopoverHeaderProps): React.ReactElement => {\n const { titleId } = usePopoverContext();\n\n const isFloating = !(title || titleLeading);\n if (isFloating) {\n return (\n <BaseBox\n borderRadius=\"max\"\n position=\"absolute\"\n padding=\"spacing.2\"\n top=\"spacing.2\"\n right=\"spacing.2\"\n zIndex={1}\n >\n <PopoverCloseButton />\n </BaseBox>\n );\n }\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n flexWrap={isReactNative() ? 'wrap' : 'nowrap'}\n alignItems=\"center\"\n gap=\"spacing.3\"\n >\n {titleLeading\n ? React.cloneElement(titleLeading as React.ReactElement, { size: 'large' })\n : null}\n {title ? (\n <BaseBox id={titleId} paddingRight=\"spacing.4\">\n <Text size=\"large\" weight=\"semibold\">\n {title}\n </Text>\n </BaseBox>\n ) : null}\n <BaseBox marginLeft=\"auto\">\n <PopoverCloseButton />\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst PopoverContent = React.forwardRef<HTMLDivElement, PopoverContentProps>(\n ({ children, title, titleLeading, footer, arrow, side, style, isVisible }, ref) => {\n const isMobile = useIsMobile();\n return (\n <PopoverContentWrapper\n ref={ref as never}\n styles={style}\n side={side}\n isVisible={isVisible}\n isMobile={isMobile}\n >\n <BaseBox padding=\"spacing.4\" display=\"flex\" flexDirection=\"column\" gap=\"spacing.4\">\n <PopoverHeader title={title} titleLeading={titleLeading} />\n <BaseBox>{children}</BaseBox>\n {footer ? <BaseBox>{footer}</BaseBox> : null}\n </BaseBox>\n {arrow}\n </PopoverContentWrapper>\n );\n },\n);\n\nexport { PopoverContent };\n"],"names":["PopoverHeader","_ref","title","titleLeading","_usePopoverContext","usePopoverContext","titleId","isFloating","_jsx","BaseBox","borderRadius","position","padding","top","right","zIndex","children","PopoverCloseButton","_jsxs","display","flexDirection","flexWrap","isReactNative","alignItems","gap","React","cloneElement","size","id","paddingRight","Text","weight","marginLeft","PopoverContent","forwardRef","_ref2","ref","footer","arrow","side","style","isVisible","isMobile","useIsMobile","PopoverContentWrapper","styles"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAAC,IAAA,CAAwE,CAAA,IAAlEC,KAAK,CAAAD,IAAA,CAALC,KAAK,CAAEC,YAAY,CAAAF,IAAA,CAAZE,YAAY,CAC1C,IAAAC,kBAAA,CAAoBC,iBAAiB,EAAE,CAA/BC,OAAO,CAAAF,kBAAA,CAAPE,OAAO,CAEf,IAAMC,UAAU,CAAG,EAAEL,KAAK,EAAIC,YAAY,CAAC,CAC3C,GAAII,UAAU,CAAE,CACd,OACEC,GAAA,CAACC,OAAO,CACNC,CAAAA,YAAY,CAAC,KAAK,CAClBC,QAAQ,CAAC,UAAU,CACnBC,OAAO,CAAC,WAAW,CACnBC,GAAG,CAAC,WAAW,CACfC,KAAK,CAAC,WAAW,CACjBC,MAAM,CAAE,CAAE,CAAAC,QAAA,CAEVR,GAAA,CAACS,kBAAkB,CAAE,EAAA,CAAC,CACf,CAAC,CAEd,CAEA,OACEC,IAAA,CAACT,OAAO,CACNU,CAAAA,OAAO,CAAC,MAAM,CACdC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EA,IAAK,CACXE,SAAS,CAAEA,SAAU,CACrBC,QAAQ,CAAEA,QAAS,CAAA1B,QAAA,CAAA,CAEnBE,IAAA,CAACT,OAAO,CAACG,CAAAA,OAAO,CAAC,WAAW,CAACO,OAAO,CAAC,MAAM,CAACC,aAAa,CAAC,QAAQ,CAACI,GAAG,CAAC,WAAW,CAAAR,QAAA,CAChFR,CAAAA,GAAA,CAACR,aAAa,CAAA,CAACE,KAAK,CAAEA,KAAM,CAACC,YAAY,CAAEA,YAAa,CAAE,CAAC,CAC3DK,GAAA,CAACC,OAAO,EAAAO,QAAA,CAAEA,QAAQ,CAAU,CAAC,CAC5BqB,MAAM,CAAG7B,GAAA,CAACC,OAAO,CAAA,CAAAO,QAAA,CAAEqB,MAAM,CAAU,CAAC,CAAG,IAAI,EACrC,CAAC,CACTC,KAAK,CACe,CAAA,CAAC,CAE5B,CACF;;;;"}
@@ -7,7 +7,7 @@ import { makeBorderSize } from '../../utils/makeBorderSize/makeBorderSize.js';
7
7
  import { makeSpace } from '../../utils/makeSpace/makeSpace.js';
8
8
  import '../BladeProvider/useTheme.js';
9
9
 
10
- var getPopoverContentWrapperStyles=function getPopoverContentWrapperStyles(_ref){var theme=_ref.theme,styles=_ref.styles,isMobile=_ref.isMobile;return Object.assign({width:'100%',maxWidth:makeSpace(isMobile?288:328),position:isReactNative()?'absolute':'relative',backgroundColor:theme.colors.surface.popup.background,borderWidth:makeBorderSize(theme.border.width.thin),borderRadius:makeBorderSize(theme.border.radius.large),borderColor:theme.colors.brand.gray[400].lowContrast,borderStyle:'solid',boxShadow:isReactNative()?undefined:castWebType(theme.elevation.midRaised)},styles);};
10
+ var getPopoverContentWrapperStyles=function getPopoverContentWrapperStyles(_ref){var theme=_ref.theme,styles=_ref.styles,isMobile=_ref.isMobile;return Object.assign({width:'100%',maxWidth:makeSpace(isMobile?288:328),position:isReactNative()?'absolute':'relative',backgroundColor:theme.colors.popup.background.subtle,borderWidth:makeBorderSize(theme.border.width.thin),borderRadius:makeBorderSize(theme.border.radius.large),borderColor:theme.colors.popup.border.subtle,borderStyle:'solid',boxShadow:isReactNative()?undefined:castWebType(theme.elevation.midRaised)},styles);};
11
11
 
12
12
  export { getPopoverContentWrapperStyles };
13
13
  //# sourceMappingURL=getPopoverContentWrapperStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getPopoverContentWrapperStyles.js","sources":["../../../../../src/components/Popover/getPopoverContentWrapperStyles.ts"],"sourcesContent":["/* eslint-disable react-hooks/rules-of-hooks */\nimport type React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeBorderSize, castWebType, isReactNative, makeSpace } from '~utils';\n\nconst getPopoverContentWrapperStyles = ({\n theme,\n styles,\n isMobile,\n}: {\n isMobile: boolean;\n theme: Theme;\n styles: React.CSSProperties;\n}): CSSObject => {\n return {\n width: '100%',\n maxWidth: makeSpace(isMobile ? 288 : 328),\n position: isReactNative() ? 'absolute' : 'relative',\n backgroundColor: theme.colors.surface.popup.background,\n borderWidth: makeBorderSize(theme.border.width.thin),\n borderRadius: makeBorderSize(theme.border.radius.large),\n borderColor: theme.colors.brand.gray[400].lowContrast,\n borderStyle: 'solid',\n boxShadow: isReactNative() ? undefined : castWebType(theme.elevation.midRaised),\n ...styles,\n };\n};\n\nexport { getPopoverContentWrapperStyles };\n"],"names":["getPopoverContentWrapperStyles","_ref","theme","styles","isMobile","Object","assign","width","maxWidth","makeSpace","position","isReactNative","backgroundColor","colors","surface","popup","background","borderWidth","makeBorderSize","border","thin","borderRadius","radius","large","borderColor","brand","gray","lowContrast","borderStyle","boxShadow","undefined","castWebType","elevation","midRaised"],"mappings":";;;;;;;;;AAMM,IAAAA,8BAA8B,CAAG,SAAjCA,8BAA8BA,CAAAC,IAAA,CAQnB,CAPf,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,MAAM,CAAAF,IAAA,CAANE,MAAM,CACNC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAMR,OAAAC,MAAA,CAAAC,MAAA,CACEC,CAAAA,KAAK,CAAE,MAAM,CACbC,QAAQ,CAAEC,SAAS,CAACL,QAAQ,CAAG,GAAG,CAAG,GAAG,CAAC,CACzCM,QAAQ,CAAEC,aAAa,EAAE,CAAG,UAAU,CAAG,UAAU,CACnDC,eAAe,CAAEV,KAAK,CAACW,MAAM,CAACC,OAAO,CAACC,KAAK,CAACC,UAAU,CACtDC,WAAW,CAAEC,cAAc,CAAChB,KAAK,CAACiB,MAAM,CAACZ,KAAK,CAACa,IAAI,CAAC,CACpDC,YAAY,CAAEH,cAAc,CAAChB,KAAK,CAACiB,MAAM,CAACG,MAAM,CAACC,KAAK,CAAC,CACvDC,WAAW,CAAEtB,KAAK,CAACW,MAAM,CAACY,KAAK,CAACC,IAAI,CAAC,GAAG,CAAC,CAACC,WAAW,CACrDC,WAAW,CAAE,OAAO,CACpBC,SAAS,CAAElB,aAAa,EAAE,CAAGmB,SAAS,CAAGC,WAAW,CAAC7B,KAAK,CAAC8B,SAAS,CAACC,SAAS,CAAC,EAC5E9B,MAAM,CAAA,CAEb;;;;"}
1
+ {"version":3,"file":"getPopoverContentWrapperStyles.js","sources":["../../../../../src/components/Popover/getPopoverContentWrapperStyles.ts"],"sourcesContent":["/* eslint-disable react-hooks/rules-of-hooks */\nimport type React from 'react';\nimport type { CSSObject } from 'styled-components';\nimport type { Theme } from '~components/BladeProvider';\nimport { makeBorderSize, castWebType, isReactNative, makeSpace } from '~utils';\n\nconst getPopoverContentWrapperStyles = ({\n theme,\n styles,\n isMobile,\n}: {\n isMobile: boolean;\n theme: Theme;\n styles: React.CSSProperties;\n}): CSSObject => {\n return {\n width: '100%',\n maxWidth: makeSpace(isMobile ? 288 : 328),\n position: isReactNative() ? 'absolute' : 'relative',\n backgroundColor: theme.colors.popup.background.subtle,\n borderWidth: makeBorderSize(theme.border.width.thin),\n borderRadius: makeBorderSize(theme.border.radius.large),\n borderColor: theme.colors.popup.border.subtle,\n borderStyle: 'solid',\n boxShadow: isReactNative() ? undefined : castWebType(theme.elevation.midRaised),\n ...styles,\n };\n};\n\nexport { getPopoverContentWrapperStyles };\n"],"names":["getPopoverContentWrapperStyles","_ref","theme","styles","isMobile","Object","assign","width","maxWidth","makeSpace","position","isReactNative","backgroundColor","colors","popup","background","subtle","borderWidth","makeBorderSize","border","thin","borderRadius","radius","large","borderColor","borderStyle","boxShadow","undefined","castWebType","elevation","midRaised"],"mappings":";;;;;;;;;AAMM,IAAAA,8BAA8B,CAAG,SAAjCA,8BAA8BA,CAAAC,IAAA,CAQnB,CAPf,IAAAC,KAAK,CAAAD,IAAA,CAALC,KAAK,CACLC,MAAM,CAAAF,IAAA,CAANE,MAAM,CACNC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAMR,OAAAC,MAAA,CAAAC,MAAA,CACEC,CAAAA,KAAK,CAAE,MAAM,CACbC,QAAQ,CAAEC,SAAS,CAACL,QAAQ,CAAG,GAAG,CAAG,GAAG,CAAC,CACzCM,QAAQ,CAAEC,aAAa,EAAE,CAAG,UAAU,CAAG,UAAU,CACnDC,eAAe,CAAEV,KAAK,CAACW,MAAM,CAACC,KAAK,CAACC,UAAU,CAACC,MAAM,CACrDC,WAAW,CAAEC,cAAc,CAAChB,KAAK,CAACiB,MAAM,CAACZ,KAAK,CAACa,IAAI,CAAC,CACpDC,YAAY,CAAEH,cAAc,CAAChB,KAAK,CAACiB,MAAM,CAACG,MAAM,CAACC,KAAK,CAAC,CACvDC,WAAW,CAAEtB,KAAK,CAACW,MAAM,CAACC,KAAK,CAACK,MAAM,CAACH,MAAM,CAC7CS,WAAW,CAAE,OAAO,CACpBC,SAAS,CAAEf,aAAa,EAAE,CAAGgB,SAAS,CAAGC,WAAW,CAAC1B,KAAK,CAAC2B,SAAS,CAACC,SAAS,CAAC,EAC5E3B,MAAM,CAAA,CAEb;;;;"}
@@ -1,33 +1,29 @@
1
1
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
2
  import { ProgressBarFilled } from './ProgressBarFilled.native.js';
3
3
  import clamp from '../../utils/lodashButBetter/clamp.js';
4
- import 'react';
5
- import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
6
- import { jsx, jsxs } from 'react/jsx-runtime';
7
- import '../Typography/BaseText/BaseText.native.js';
8
- import 'react-native-svg';
9
4
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.native.js';
10
5
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
11
- import '../Icons/_Svg/Svg/Svg.native.js';
12
- import 'styled-components/native';
13
- import '@gorhom/portal';
14
- import 'react-native-gesture-handler';
15
- import useTheme from '../BladeProvider/useTheme.js';
16
- import 'react-native';
6
+ import { Text } from '../Typography/Text/Text.js';
7
+ import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
17
8
  import '@babel/runtime/helpers/slicedToArray';
18
- import { throwBladeError } from '../../utils/logger/logger.js';
19
- import { makeSize } from '../../utils/makeSize/makeSize.js';
20
- import '../BottomSheet/BottomSheetStack.js';
9
+ import 'react-native';
21
10
  import '../../tokens/global/typography.js';
22
11
  import '../../tokens/global/motion.js';
23
12
  import { size } from '../../tokens/global/size.js';
24
- import { FormLabel } from '../Form/FormLabel.js';
25
- import { Text } from '../Typography/Text/Text.js';
26
- import { getStyledProps } from '../Box/styledProps/getStyledProps.js';
13
+ import 'react';
14
+ import { throwBladeError } from '../../utils/logger/logger.js';
15
+ import { makeSize } from '../../utils/makeSize/makeSize.js';
16
+ import useTheme from '../BladeProvider/useTheme.js';
27
17
  import { useId } from '../../utils/useId.js';
18
+ import 'styled-components/native';
19
+ import '@gorhom/portal';
20
+ import 'react-native-gesture-handler';
21
+ import '../BottomSheet/BottomSheetStack.js';
22
+ import { jsx, jsxs } from 'react/jsx-runtime';
23
+ import { BaseBox } from '../Box/BaseBox/BaseBox.native.js';
28
24
  import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.native.js';
29
25
 
30
- var _excluded=["accessibilityLabel","contrast","intent","isIndeterminate","label","showPercentage","size","value","variant","min","max","testID"];var progressBarHeight={small:size[2],medium:size[4]};var ProgressBar=function ProgressBar(_ref){var _label$trim;var accessibilityLabel=_ref.accessibilityLabel,_ref$contrast=_ref.contrast,contrast=_ref$contrast===void 0?'low':_ref$contrast,intent=_ref.intent,_ref$isIndeterminate=_ref.isIndeterminate,isIndeterminate=_ref$isIndeterminate===void 0?false:_ref$isIndeterminate,label=_ref.label,_ref$showPercentage=_ref.showPercentage,showPercentage=_ref$showPercentage===void 0?true:_ref$showPercentage,_ref$size=_ref.size,size=_ref$size===void 0?'small':_ref$size,_ref$value=_ref.value,value=_ref$value===void 0?0:_ref$value,_ref$variant=_ref.variant,variant=_ref$variant===void 0?'progress':_ref$variant,_ref$min=_ref.min,min=_ref$min===void 0?0:_ref$min,_ref$max=_ref.max,max=_ref$max===void 0?100:_ref$max,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var id=useId(variant);if(__DEV__){if(variant==='meter'&&isIndeterminate){throwBladeError({moduleName:'ProgressBar',message:`Cannot set 'isIndeterminate' when 'variant' is 'meter'.`});}}var unfilledBackgroundColor=theme.colors.brand.gray.a100[`${contrast}Contrast`];var filledBackgroundColor=intent?theme.colors.feedback.background[intent].highContrast:theme.colors.brand.primary[500];var hasLabel=label&&((_label$trim=label.trim())==null?void 0:_label$trim.length)>0;var isMeter=variant==='meter';var progressValue=clamp(value,min,max);var percentageProgressValue=Math.floor((progressValue-min)*100/(max-min));var shouldShowPercentage=showPercentage&&!isMeter&&!isIndeterminate;var accessibilityProps={role:'progressbar',label:accessibilityLabel!=null?accessibilityLabel:label,valueNow:percentageProgressValue,valueText:`${percentageProgressValue}%`,valueMin:min,valueMax:max};if(isMeter){accessibilityProps.role='meter';accessibilityProps.valueNow=progressValue;accessibilityProps.valueText=`${progressValue}`;}if(isIndeterminate){accessibilityProps.valueNow=undefined;accessibilityProps.valueMin=undefined;accessibilityProps.valueMax=undefined;accessibilityProps.valueText=undefined;}return jsx(BaseBox,Object.assign({},getStyledProps(styledProps),metaAttribute({name:MetaConstants.ProgressBar,testID:testID}),{children:jsxs(BaseBox,{display:"flex",flexDirection:"column",width:"100%",children:[jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:hasLabel?'space-between':'flex-end',children:[hasLabel?jsx(FormLabel,{as:"label",htmlFor:id,contrast:contrast,children:label}):null,shouldShowPercentage?jsx(BaseBox,{marginBottom:"spacing.2",children:jsx(Text,{type:"subdued",variant:"body",contrast:contrast,size:"small",children:`${percentageProgressValue}%`})}):null]}),jsx(BaseBox,Object.assign({id:id},makeAccessible({role:accessibilityProps.role,label:accessibilityProps.label,valueNow:accessibilityProps.valueNow,valueText:accessibilityProps.valueText,valueMin:accessibilityProps.valueMin,valueMax:accessibilityProps.valueMax}),{children:jsx(BaseBox,{backgroundColor:unfilledBackgroundColor,height:makeSize(progressBarHeight[size]),overflow:"hidden",position:"relative",children:jsx(ProgressBarFilled,{backgroundColor:filledBackgroundColor,progress:percentageProgressValue,fillMotionDuration:"duration.2xgentle",pulseMotionDuration:"duration.2xgentle",indeterminateMotionDuration:"duration.2xgentle",pulseMotionDelay:"delay.long",motionEasing:"easing.standard.revealing",variant:variant,isIndeterminate:isIndeterminate})})}))]})}));};
26
+ var _excluded=["accessibilityLabel","color","isIndeterminate","label","showPercentage","size","value","variant","min","max","testID"];var progressBarHeight={small:size[2],medium:size[4]};var ProgressBar=function ProgressBar(_ref){var _label$trim;var accessibilityLabel=_ref.accessibilityLabel,color=_ref.color,_ref$isIndeterminate=_ref.isIndeterminate,isIndeterminate=_ref$isIndeterminate===void 0?false:_ref$isIndeterminate,label=_ref.label,_ref$showPercentage=_ref.showPercentage,showPercentage=_ref$showPercentage===void 0?true:_ref$showPercentage,_ref$size=_ref.size,size=_ref$size===void 0?'small':_ref$size,_ref$value=_ref.value,value=_ref$value===void 0?0:_ref$value,_ref$variant=_ref.variant,variant=_ref$variant===void 0?'progress':_ref$variant,_ref$min=_ref.min,min=_ref$min===void 0?0:_ref$min,_ref$max=_ref.max,max=_ref$max===void 0?100:_ref$max,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var id=useId(variant);if(__DEV__){if(variant==='meter'&&isIndeterminate){throwBladeError({moduleName:'ProgressBar',message:`Cannot set 'isIndeterminate' when 'variant' is 'meter'.`});}}var unfilledBackgroundColor=theme.colors.feedback.background.neutral.subtle;var filledBackgroundColor=color?theme.colors.feedback.background[color].intense:theme.colors.surface.background.primary.intense;var hasLabel=label&&((_label$trim=label.trim())==null?void 0:_label$trim.length)>0;var isMeter=variant==='meter';var progressValue=clamp(value,min,max);var percentageProgressValue=Math.floor((progressValue-min)*100/(max-min));var shouldShowPercentage=showPercentage&&!isMeter&&!isIndeterminate;var accessibilityProps={role:'progressbar',label:accessibilityLabel!=null?accessibilityLabel:label,valueNow:percentageProgressValue,valueText:`${percentageProgressValue}%`,valueMin:min,valueMax:max};if(isMeter){accessibilityProps.role='meter';accessibilityProps.valueNow=progressValue;accessibilityProps.valueText=`${progressValue}`;}if(isIndeterminate){accessibilityProps.valueNow=undefined;accessibilityProps.valueMin=undefined;accessibilityProps.valueMax=undefined;accessibilityProps.valueText=undefined;}return jsx(BaseBox,Object.assign({},getStyledProps(styledProps),metaAttribute({name:MetaConstants.ProgressBar,testID:testID}),{children:jsxs(BaseBox,{display:"flex",flexDirection:"column",width:"100%",children:[jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:hasLabel?'space-between':'flex-end',children:[hasLabel?jsx(Text,{as:"label",variant:"body",size:"small",color:"surface.text.gray.subtle",children:label}):null,shouldShowPercentage?jsx(BaseBox,{marginBottom:"spacing.2",children:jsx(Text,{variant:"body",size:"small",color:"surface.text.gray.subtle",children:`${percentageProgressValue}%`})}):null]}),jsx(BaseBox,Object.assign({id:id},makeAccessible({role:accessibilityProps.role,label:accessibilityProps.label,valueNow:accessibilityProps.valueNow,valueText:accessibilityProps.valueText,valueMin:accessibilityProps.valueMin,valueMax:accessibilityProps.valueMax}),{children:jsx(BaseBox,{backgroundColor:unfilledBackgroundColor,height:makeSize(progressBarHeight[size]),overflow:"hidden",position:"relative",children:jsx(ProgressBarFilled,{backgroundColor:filledBackgroundColor,progress:percentageProgressValue,fillMotionDuration:"duration.2xgentle",pulseMotionDuration:"duration.2xgentle",indeterminateMotionDuration:"duration.2xgentle",pulseMotionDelay:"delay.long",motionEasing:"easing.standard.revealing",variant:variant,isIndeterminate:isIndeterminate})})}))]})}));};
31
27
 
32
28
  export { ProgressBar };
33
29
  //# sourceMappingURL=ProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.js","sources":["../../../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { ProgressBarFilled } from './ProgressBarFilled';\nimport clamp from '~utils/lodashButBetter/clamp';\nimport { FormLabel } from '~components/Form';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { Text } from '~components/Typography/Text';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useId } from '~utils/useId';\nimport { useTheme } from '~components/BladeProvider';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { ColorContrastTypes, Feedback } from '~tokens/theme/theme';\nimport { size } from '~tokens/global';\nimport type { TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\n\ntype ProgressBarCommonProps = {\n /**\n * Sets aria-label to help users know what the progress bar is for. Default value is the same as the `label` passed.\n */\n accessibilityLabel?: string;\n /**\n * Sets the contrast for the progress bar\n * @default 'low'\n */\n contrast?: ColorContrastTypes;\n /**\n * Sets the intent of the progress bar which changes the feedback color.\n */\n intent?: Feedback;\n /**\n * Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.\n */\n label?: string;\n /**\n * Sets the size of the progress bar.\n * @default 'small'\n */\n size?: 'small' | 'medium';\n /**\n * Sets the progress value of the progress bar.\n * @default 'small'\n */\n value?: number;\n /**\n * Sets the minimum value for the progress bar.\n * @default 0\n */\n min?: number;\n /**\n * Sets the maximum value for the progress bar.\n * @default 100\n */\n max?: number;\n} & TestID &\n StyledPropsBlade;\n\ntype ProgressBarVariant = 'progress' | 'meter';\n\ntype ProgressBarProgressProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for the progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'progress'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: boolean;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default true\n */\n showPercentage?: boolean;\n};\n\ntype ProgressBarMeterProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for thr progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'meter'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: undefined;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default false\n */\n showPercentage?: undefined;\n};\n\ntype ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;\n\nconst progressBarHeight: Record<NonNullable<ProgressBarCommonProps['size']>, 2 | 4> = {\n small: size[2],\n medium: size[4],\n};\n\nconst ProgressBar = ({\n accessibilityLabel,\n contrast = 'low',\n intent,\n isIndeterminate = false,\n label,\n showPercentage = true,\n size = 'small',\n value = 0,\n variant = 'progress',\n min = 0,\n max = 100,\n testID,\n ...styledProps\n}: ProgressBarProps): ReactElement => {\n const { theme } = useTheme();\n const id = useId(variant);\n\n if (__DEV__) {\n if (variant === 'meter' && isIndeterminate) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Cannot set 'isIndeterminate' when 'variant' is 'meter'.`,\n });\n }\n }\n\n const unfilledBackgroundColor = theme.colors.brand.gray.a100[`${contrast}Contrast`];\n const filledBackgroundColor = intent\n ? theme.colors.feedback.background[intent].highContrast\n : theme.colors.brand.primary[500];\n const hasLabel = label && label.trim()?.length > 0;\n const isMeter = variant === 'meter';\n const progressValue = clamp(value, min, max);\n const percentageProgressValue = Math.floor(((progressValue - min) * 100) / (max - min));\n const shouldShowPercentage = showPercentage && !isMeter && !isIndeterminate;\n const accessibilityProps: Pick<\n AccessibilityProps,\n 'role' | 'label' | 'valueMax' | 'valueNow' | 'valueMin' | 'valueText'\n > = {\n role: 'progressbar',\n label: accessibilityLabel ?? label,\n valueNow: percentageProgressValue,\n valueText: `${percentageProgressValue}%`,\n valueMin: min,\n valueMax: max,\n };\n\n if (isMeter) {\n accessibilityProps.role = 'meter';\n accessibilityProps.valueNow = progressValue;\n accessibilityProps.valueText = `${progressValue}`;\n }\n\n if (isIndeterminate) {\n accessibilityProps.valueNow = undefined;\n accessibilityProps.valueMin = undefined;\n accessibilityProps.valueMax = undefined;\n accessibilityProps.valueText = undefined;\n }\n\n return (\n <BaseBox\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.ProgressBar, testID })}\n >\n <BaseBox display=\"flex\" flexDirection=\"column\" width=\"100%\">\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={hasLabel ? 'space-between' : 'flex-end'}\n >\n {hasLabel ? (\n <FormLabel as=\"label\" htmlFor={id} contrast={contrast}>\n {label}\n </FormLabel>\n ) : null}\n {shouldShowPercentage ? (\n <BaseBox marginBottom=\"spacing.2\">\n <Text\n type=\"subdued\"\n variant=\"body\"\n contrast={contrast}\n size=\"small\"\n >{`${percentageProgressValue}%`}</Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n <BaseBox\n id={id}\n {...makeAccessible({\n role: accessibilityProps.role,\n label: accessibilityProps.label,\n valueNow: accessibilityProps.valueNow,\n valueText: accessibilityProps.valueText,\n valueMin: accessibilityProps.valueMin,\n valueMax: accessibilityProps.valueMax,\n })}\n >\n <BaseBox\n backgroundColor={unfilledBackgroundColor}\n height={makeSize(progressBarHeight[size])}\n overflow=\"hidden\"\n position=\"relative\"\n >\n <ProgressBarFilled\n backgroundColor={filledBackgroundColor}\n progress={percentageProgressValue}\n fillMotionDuration=\"duration.2xgentle\"\n pulseMotionDuration=\"duration.2xgentle\"\n indeterminateMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.standard.revealing\"\n variant={variant}\n isIndeterminate={isIndeterminate}\n />\n </BaseBox>\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nexport type { ProgressBarProps, ProgressBarVariant };\nexport { ProgressBar };\n"],"names":["progressBarHeight","small","size","medium","ProgressBar","_ref","_label$trim","accessibilityLabel","_ref$contrast","contrast","intent","_ref$isIndeterminate","isIndeterminate","label","_ref$showPercentage","showPercentage","_ref$size","_ref$value","value","_ref$variant","variant","_ref$min","min","_ref$max","max","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","id","useId","__DEV__","throwBladeError","moduleName","message","unfilledBackgroundColor","colors","brand","gray","a100","filledBackgroundColor","feedback","background","highContrast","primary","hasLabel","trim","length","isMeter","progressValue","clamp","percentageProgressValue","Math","floor","shouldShowPercentage","accessibilityProps","role","valueNow","valueText","valueMin","valueMax","undefined","_jsx","BaseBox","Object","assign","getStyledProps","metaAttribute","name","MetaConstants","children","_jsxs","display","flexDirection","width","justifyContent","FormLabel","as","htmlFor","marginBottom","Text","type","makeAccessible","backgroundColor","height","makeSize","overflow","position","ProgressBarFilled","progress","fillMotionDuration","pulseMotionDuration","indeterminateMotionDuration","pulseMotionDelay","motionEasing"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kJAoGA,IAAMA,iBAA6E,CAAG,CACpFC,KAAK,CAAEC,IAAI,CAAC,CAAC,CAAC,CACdC,MAAM,CAAED,IAA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"file":"ProgressBar.js","sources":["../../../../../src/components/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { ProgressBarFilled } from './ProgressBarFilled';\nimport clamp from '~utils/lodashButBetter/clamp';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { Text } from '~components/Typography/Text';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useId } from '~utils/useId';\nimport { useTheme } from '~components/BladeProvider';\nimport type { BaseBoxProps } from '~components/Box/BaseBox';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { size } from '~tokens/global';\nimport type { TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\n\ntype ProgressBarCommonProps = {\n /**\n * Sets aria-label to help users know what the progress bar is for. Default value is the same as the `label` passed.\n */\n accessibilityLabel?: string;\n /**\n * Sets the color of the progress bar which changes the feedback color.\n */\n color?: FeedbackColors;\n /**\n * Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.\n */\n label?: string;\n /**\n * Sets the size of the progress bar.\n * @default 'small'\n */\n size?: 'small' | 'medium';\n /**\n * Sets the progress value of the progress bar.\n * @default 'small'\n */\n value?: number;\n /**\n * Sets the minimum value for the progress bar.\n * @default 0\n */\n min?: number;\n /**\n * Sets the maximum value for the progress bar.\n * @default 100\n */\n max?: number;\n} & TestID &\n StyledPropsBlade;\n\ntype ProgressBarVariant = 'progress' | 'meter';\n\ntype ProgressBarProgressProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for the progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'progress'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: boolean;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default true\n */\n showPercentage?: boolean;\n};\n\ntype ProgressBarMeterProps = ProgressBarCommonProps & {\n /**\n * Sets the variant to be rendered for thr progress bar.\n * @default 'progress'\n */\n variant?: Extract<ProgressBarVariant, 'meter'>;\n /**\n * Sets whether the progress bar is in an indeterminate state.\n * @default false\n */\n isIndeterminate?: undefined;\n /**\n * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.\n * @default false\n */\n showPercentage?: undefined;\n};\n\ntype ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;\n\nconst progressBarHeight: Record<NonNullable<ProgressBarCommonProps['size']>, 2 | 4> = {\n small: size[2],\n medium: size[4],\n};\n\nconst ProgressBar = ({\n accessibilityLabel,\n color,\n isIndeterminate = false,\n label,\n showPercentage = true,\n size = 'small',\n value = 0,\n variant = 'progress',\n min = 0,\n max = 100,\n testID,\n ...styledProps\n}: ProgressBarProps): ReactElement => {\n const { theme } = useTheme();\n const id = useId(variant);\n\n if (__DEV__) {\n if (variant === 'meter' && isIndeterminate) {\n throwBladeError({\n moduleName: 'ProgressBar',\n message: `Cannot set 'isIndeterminate' when 'variant' is 'meter'.`,\n });\n }\n }\n\n const unfilledBackgroundColor = theme.colors.feedback.background.neutral\n .subtle as BaseBoxProps['backgroundColor'];\n const filledBackgroundColor = color\n ? theme.colors.feedback.background[color].intense\n : theme.colors.surface.background.primary.intense;\n const hasLabel = label && label.trim()?.length > 0;\n const isMeter = variant === 'meter';\n const progressValue = clamp(value, min, max);\n const percentageProgressValue = Math.floor(((progressValue - min) * 100) / (max - min));\n const shouldShowPercentage = showPercentage && !isMeter && !isIndeterminate;\n const accessibilityProps: Pick<\n AccessibilityProps,\n 'role' | 'label' | 'valueMax' | 'valueNow' | 'valueMin' | 'valueText'\n > = {\n role: 'progressbar',\n label: accessibilityLabel ?? label,\n valueNow: percentageProgressValue,\n valueText: `${percentageProgressValue}%`,\n valueMin: min,\n valueMax: max,\n };\n\n if (isMeter) {\n accessibilityProps.role = 'meter';\n accessibilityProps.valueNow = progressValue;\n accessibilityProps.valueText = `${progressValue}`;\n }\n\n if (isIndeterminate) {\n accessibilityProps.valueNow = undefined;\n accessibilityProps.valueMin = undefined;\n accessibilityProps.valueMax = undefined;\n accessibilityProps.valueText = undefined;\n }\n\n return (\n <BaseBox\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.ProgressBar, testID })}\n >\n <BaseBox display=\"flex\" flexDirection=\"column\" width=\"100%\">\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={hasLabel ? 'space-between' : 'flex-end'}\n >\n {hasLabel ? (\n <Text as=\"label\" variant=\"body\" size=\"small\" color=\"surface.text.gray.subtle\">\n {label}\n </Text>\n ) : null}\n {shouldShowPercentage ? (\n <BaseBox marginBottom=\"spacing.2\">\n <Text\n variant=\"body\"\n size=\"small\"\n color=\"surface.text.gray.subtle\"\n >{`${percentageProgressValue}%`}</Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n <BaseBox\n id={id}\n {...makeAccessible({\n role: accessibilityProps.role,\n label: accessibilityProps.label,\n valueNow: accessibilityProps.valueNow,\n valueText: accessibilityProps.valueText,\n valueMin: accessibilityProps.valueMin,\n valueMax: accessibilityProps.valueMax,\n })}\n >\n <BaseBox\n backgroundColor={unfilledBackgroundColor}\n height={makeSize(progressBarHeight[size])}\n overflow=\"hidden\"\n position=\"relative\"\n >\n <ProgressBarFilled\n backgroundColor={filledBackgroundColor}\n progress={percentageProgressValue}\n fillMotionDuration=\"duration.2xgentle\"\n pulseMotionDuration=\"duration.2xgentle\"\n indeterminateMotionDuration=\"duration.2xgentle\"\n pulseMotionDelay=\"delay.long\"\n motionEasing=\"easing.standard.revealing\"\n variant={variant}\n isIndeterminate={isIndeterminate}\n />\n </BaseBox>\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nexport type { ProgressBarProps, ProgressBarVariant };\nexport { ProgressBar };\n"],"names":["progressBarHeight","small","size","medium","ProgressBar","_ref","_label$trim","accessibilityLabel","color","_ref$isIndeterminate","isIndeterminate","label","_ref$showPercentage","showPercentage","_ref$size","_ref$value","value","_ref$variant","variant","_ref$min","min","_ref$max","max","testID","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","id","useId","__DEV__","throwBladeError","moduleName","message","unfilledBackgroundColor","colors","feedback","background","neutral","subtle","filledBackgroundColor","intense","surface","primary","hasLabel","trim","length","isMeter","progressValue","clamp","percentageProgressValue","Math","floor","shouldShowPercentage","accessibilityProps","role","valueNow","valueText","valueMin","valueMax","undefined","_jsx","BaseBox","Object","assign","getStyledProps","metaAttribute","name","MetaConstants","children","_jsxs","display","flexDirection","width","justifyContent","Text","as","marginBottom","makeAccessible","backgroundColor","height","makeSize","overflow","position","ProgressBarFilled","progress","fillMotionDuration","pulseMotionDuration","indeterminateMotionDuration","pulseMotionDelay","motionEasing"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAA,SAAA,CAAA,CAAA,oBAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,MAAA,CAAA,OAAA,CAAA,SAAA,CAAA,KAAA,CAAA,KAAA,CAAA,QAAA,CAAA,CA8FA,IAAMA,iBAA6E,CAAG,CACpFC,KAAK,CAAEC,IAAI,CAAC,CAAC,CAAC,CACdC,MAAM,CAAED,IAAI,CAAC,CAAC,CAChB,CAAC,CAEK,IAAAE,WAAW,CAAG,SAAdA,WAAWA,CAAAC,IAAA,CAaqB,CAAAC,IAAAA,WAAA,KAZpCC,kBAAkB,CAAAF,IAAA,CAAlBE,kBAAkB,CAClBC,KAAK,CAAAH,IAAA,CAALG,KAAK,CAAAC,oBAAA,CAAAJ,IAAA,CACLK,eAAe,CAAfA,eAAe,CAAAD,oBAAA,UAAG,KAAK,CAAAA,oBAAA,CACvBE,KAAK,CAAAN,IAAA,CAALM,KAAK,CAAAC,mBAAA,CAAAP,IA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,CAACG,SAAS,CACvCC,QAAQ,CAAEJ,kBAAkB,CAACI,QAAQ,CACrCC,QAAQ,CAAEL,kBAAkB,CAACK,QAC/B,CAAC,CAAC,CAAAU,CAAAA,QAAA,CAEFR,GAAA,CAACC,OAAO,CACNiB,CAAAA,eAAe,CAAE7C,uBAAwB,CACzC8C,MAAM,CAAEC,QAAQ,CAACnF,iBAAiB,CAACE,IAAI,CAAC,CAAE,CAC1CkF,QAAQ,CAAC,QAAQ,CACjBC,QAAQ,CAAC,UAAU,CAAAd,QAAA,CAEnBR,GAAA,CAACuB,iBAAiB,CAAA,CAChBL,eAAe,CAAEvC,qBAAsB,CACvC6C,QAAQ,CAAEnC,uBAAwB,CAClCoC,kBAAkB,CAAC,mBAAmB,CACtCC,mBAAmB,CAAC,mBAAmB,CACvCC,2BAA2B,CAAC,mBAAmB,CAC/CC,gBAAgB,CAAC,YAAY,CAC7BC,YAAY,CAAC,2BAA2B,CACxC1E,OAAO,CAAEA,OAAQ,CACjBR,eAAe,CAAEA,eAAgB,CAClC,CAAC,CACK,CAAC,EACH,CAAC,CAAA,CACH,CAAC,CACH,CAAA,CAAC,CAEd;;;;"}
@@ -23,7 +23,7 @@ import '@babel/runtime/helpers/defineProperty';
23
23
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
24
24
  import { jsx, jsxs } from 'react/jsx-runtime';
25
25
 
26
- var _excluded=["value","children","helpText","isDisabled","size","testID"];var _Radio=function _Radio(_ref,ref){var _groupProps$state,_groupProps$size;var value=_ref.value,children=_ref.children,helpText=_ref.helpText,isDisabled=_ref.isDisabled,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded);var groupProps=useRadioGroupContext();var isInsideGroup=!isEmpty(groupProps);if(__DEV__){if(!isInsideGroup){throwBladeError({moduleName:'Radio',message:'Cannot use <Radio /> outside of <RadioGroup />'});}}var isChecked=groupProps==null?void 0:(_groupProps$state=groupProps.state)==null?void 0:_groupProps$state.isChecked(value);var defaultChecked=(groupProps==null?void 0:groupProps.defaultValue)===undefined?undefined:(groupProps==null?void 0:groupProps.defaultValue)===value;var validationState=groupProps==null?void 0:groupProps.validationState;var hasError=validationState==='error';var _isDisabled=isDisabled!=null?isDisabled:groupProps==null?void 0:groupProps.isDisabled;var _isRequired=(groupProps==null?void 0:groupProps.isRequired)||(groupProps==null?void 0:groupProps.necessityIndicator)==='required';var name=groupProps==null?void 0:groupProps.name;var showHelpText=!hasError&&helpText;var isReactNative=getPlatformType()==='react-native';var _size=(_groupProps$size=groupProps.size)!=null?_groupProps$size:size;var isSmall=_size==='small';var handleChange=function handleChange(_ref2){var isChecked=_ref2.isChecked,value=_ref2.value;if(isChecked){var _groupProps$state2;groupProps==null?void 0:(_groupProps$state2=groupProps.state)==null?void 0:_groupProps$state2.setValue(value);}else {var _groupProps$state3;groupProps==null?void 0:(_groupProps$state3=groupProps.state)==null?void 0:_groupProps$state3.removeValue();}};var _useRadio=useRadio({defaultChecked:defaultChecked,isChecked:isChecked,hasError:hasError,isDisabled:_isDisabled,isRequired:_isRequired,name:name,value:value,onChange:handleChange}),state=_useRadio.state,ids=_useRadio.ids,inputProps=_useRadio.inputProps;return jsx(BaseBox,Object.assign({},getStyledProps(styledProps),{children:jsx(SelectorLabel,{componentName:MetaConstants.RadioLabel,inputProps:isReactNative?inputProps:{},testID:testID,children:jsxs(BaseBox,{display:"flex",flexDirection:"column",children:[jsxs(BaseBox,{display:"flex",alignItems:"center",flexDirection:"row",children:[jsx(SelectorInput,{hoverTokens:radioHoverTokens,isChecked:state.isChecked,isDisabled:_isDisabled,hasError:hasError,inputProps:inputProps,ref:ref}),jsx(RadioIcon,{size:_size,isChecked:state.isChecked,isDisabled:_isDisabled,isNegative:hasError}),children?jsx(SelectorTitle,{size:_size,isDisabled:_isDisabled,children:children}):null]}),showHelpText&&jsx(BaseBox,{marginLeft:isSmall?'spacing.6':'spacing.7',children:jsx(SelectorSupportText,{id:ids==null?void 0:ids.helpTextId,children:helpText})})]})})}));};var Radio=assignWithoutSideEffects(React__default.forwardRef(_Radio),{displayName:'Radio'});
26
+ var _excluded=["value","children","helpText","isDisabled","size","testID"];var _Radio=function _Radio(_ref,ref){var _groupProps$state,_groupProps$size;var value=_ref.value,children=_ref.children,helpText=_ref.helpText,isDisabled=_ref.isDisabled,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded);var groupProps=useRadioGroupContext();var isInsideGroup=!isEmpty(groupProps);if(__DEV__){if(!isInsideGroup){throwBladeError({moduleName:'Radio',message:'Cannot use <Radio /> outside of <RadioGroup />'});}}var isChecked=groupProps==null?void 0:(_groupProps$state=groupProps.state)==null?void 0:_groupProps$state.isChecked(value);var defaultChecked=(groupProps==null?void 0:groupProps.defaultValue)===undefined?undefined:(groupProps==null?void 0:groupProps.defaultValue)===value;var validationState=groupProps==null?void 0:groupProps.validationState;var hasError=validationState==='error';var _isDisabled=isDisabled!=null?isDisabled:groupProps==null?void 0:groupProps.isDisabled;var _isRequired=(groupProps==null?void 0:groupProps.isRequired)||(groupProps==null?void 0:groupProps.necessityIndicator)==='required';var name=groupProps==null?void 0:groupProps.name;var showHelpText=!hasError&&helpText;var isReactNative=getPlatformType()==='react-native';var _size=(_groupProps$size=groupProps.size)!=null?_groupProps$size:size;var isSmall=_size==='small';var handleChange=function handleChange(_ref2){var isChecked=_ref2.isChecked,value=_ref2.value;if(isChecked){var _groupProps$state2;groupProps==null?void 0:(_groupProps$state2=groupProps.state)==null?void 0:_groupProps$state2.setValue(value);}else {var _groupProps$state3;groupProps==null?void 0:(_groupProps$state3=groupProps.state)==null?void 0:_groupProps$state3.removeValue();}};var _useRadio=useRadio({defaultChecked:defaultChecked,isChecked:isChecked,hasError:hasError,isDisabled:_isDisabled,isRequired:_isRequired,name:name,value:value,onChange:handleChange}),state=_useRadio.state,ids=_useRadio.ids,inputProps=_useRadio.inputProps;return jsx(BaseBox,Object.assign({},getStyledProps(styledProps),{children:jsx(SelectorLabel,{componentName:MetaConstants.RadioLabel,inputProps:isReactNative?inputProps:{},testID:testID,children:jsxs(BaseBox,{display:"flex",flexDirection:"column",children:[jsxs(BaseBox,{display:"flex",alignItems:"center",flexDirection:"row",children:[jsx(SelectorInput,{hoverTokens:radioHoverTokens,isChecked:state.isChecked,isDisabled:_isDisabled,hasError:hasError,inputProps:inputProps,ref:ref}),jsx(RadioIcon,{size:_size,isChecked:state.isChecked,isDisabled:_isDisabled,isNegative:hasError}),children?jsx(SelectorTitle,{size:_size,isDisabled:_isDisabled,children:children}):null]}),showHelpText&&jsx(BaseBox,{marginLeft:isSmall?'spacing.6':'spacing.7',children:jsx(SelectorSupportText,{isNegative:true,id:ids==null?void 0:ids.helpTextId,children:helpText})})]})})}));};var Radio=assignWithoutSideEffects(React__default.forwardRef(_Radio),{displayName:'Radio'});
27
27
 
28
28
  export { Radio };
29
29
  //# sourceMappingURL=Radio.js.map