@coinbase/cds-web 8.61.0 → 8.62.1

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 (268) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dts/accordion/Accordion.d.ts +1 -9
  3. package/dts/accordion/Accordion.d.ts.map +1 -1
  4. package/dts/alpha/combobox/Combobox.d.ts.map +1 -1
  5. package/dts/alpha/select/Select.d.ts.map +1 -1
  6. package/dts/alpha/select-chip/SelectChip.d.ts.map +1 -1
  7. package/dts/alpha/tabbed-chips/TabbedChips.d.ts.map +1 -1
  8. package/dts/banner/Banner.d.ts.map +1 -1
  9. package/dts/buttons/AvatarButton.d.ts.map +1 -1
  10. package/dts/buttons/Button.d.ts +2 -4
  11. package/dts/buttons/Button.d.ts.map +1 -1
  12. package/dts/buttons/ButtonGroup.d.ts.map +1 -1
  13. package/dts/buttons/IconButton.d.ts.map +1 -1
  14. package/dts/buttons/IconCounterButton.d.ts.map +1 -1
  15. package/dts/buttons/Tile.d.ts +1 -1
  16. package/dts/buttons/Tile.d.ts.map +1 -1
  17. package/dts/buttons/TileButton.d.ts.map +1 -1
  18. package/dts/cards/LikeButton.d.ts.map +1 -1
  19. package/dts/carousel/Carousel.d.ts.map +1 -1
  20. package/dts/cells/Cell.d.ts.map +1 -1
  21. package/dts/cells/CellAccessory.d.ts.map +1 -1
  22. package/dts/cells/ListCell.d.ts.map +1 -1
  23. package/dts/cells/ListCellFallback.d.ts.map +1 -1
  24. package/dts/chips/Chip.d.ts.map +1 -1
  25. package/dts/chips/ChipProps.d.ts +10 -8
  26. package/dts/chips/ChipProps.d.ts.map +1 -1
  27. package/dts/chips/InputChip.d.ts.map +1 -1
  28. package/dts/chips/MediaChip.d.ts +4 -4
  29. package/dts/chips/MediaChip.d.ts.map +1 -1
  30. package/dts/chips/TabbedChips.d.ts.map +1 -1
  31. package/dts/coachmark/Coachmark.d.ts.map +1 -1
  32. package/dts/collapsible/Collapsible.d.ts.map +1 -1
  33. package/dts/collapsible/useCollapsibleMotionProps.d.ts +221 -221
  34. package/dts/controls/Checkbox.d.ts.map +1 -1
  35. package/dts/controls/CheckboxCell.d.ts.map +1 -1
  36. package/dts/controls/Control.d.ts.map +1 -1
  37. package/dts/controls/ControlGroup.d.ts +13 -4
  38. package/dts/controls/ControlGroup.d.ts.map +1 -1
  39. package/dts/controls/InputStack.d.ts.map +1 -1
  40. package/dts/controls/Radio.d.ts.map +1 -1
  41. package/dts/controls/RadioCell.d.ts.map +1 -1
  42. package/dts/controls/SearchInput.d.ts.map +1 -1
  43. package/dts/controls/SelectOption.d.ts +1 -14
  44. package/dts/controls/SelectOption.d.ts.map +1 -1
  45. package/dts/controls/Switch.d.ts +2 -1
  46. package/dts/controls/Switch.d.ts.map +1 -1
  47. package/dts/controls/TextInput.d.ts.map +1 -1
  48. package/dts/core/componentConfig.d.ts +192 -0
  49. package/dts/core/componentConfig.d.ts.map +1 -0
  50. package/dts/dates/Calendar.d.ts.map +1 -1
  51. package/dts/dates/DateInput.d.ts.map +1 -1
  52. package/dts/dates/DatePicker.d.ts.map +1 -1
  53. package/dts/dots/DotCount.d.ts +1 -15
  54. package/dts/dots/DotCount.d.ts.map +1 -1
  55. package/dts/dots/DotStatusColor.d.ts +1 -10
  56. package/dts/dots/DotStatusColor.d.ts.map +1 -1
  57. package/dts/dots/DotSymbol.d.ts +1 -22
  58. package/dts/dots/DotSymbol.d.ts.map +1 -1
  59. package/dts/dropdown/Dropdown.d.ts +30 -29
  60. package/dts/dropdown/Dropdown.d.ts.map +1 -1
  61. package/dts/dropdown/DropdownProps.d.ts +53 -51
  62. package/dts/dropdown/DropdownProps.d.ts.map +1 -1
  63. package/dts/hooks/useComponentConfig.d.ts +22 -0
  64. package/dts/hooks/useComponentConfig.d.ts.map +1 -0
  65. package/dts/hooks/useIsoEffect.d.ts +2 -2
  66. package/dts/hooks/useIsoEffect.d.ts.map +1 -1
  67. package/dts/icons/Icon.d.ts.map +1 -1
  68. package/dts/index.d.ts +2 -0
  69. package/dts/index.d.ts.map +1 -1
  70. package/dts/layout/Divider.d.ts +1 -6
  71. package/dts/layout/Divider.d.ts.map +1 -1
  72. package/dts/layout/Fallback.d.ts.map +1 -1
  73. package/dts/media/Avatar.d.ts +1 -15
  74. package/dts/media/Avatar.d.ts.map +1 -1
  75. package/dts/media/RemoteImage.d.ts +1 -15
  76. package/dts/media/RemoteImage.d.ts.map +1 -1
  77. package/dts/media/RemoteImageGroup.d.ts +3 -10
  78. package/dts/media/RemoteImageGroup.d.ts.map +1 -1
  79. package/dts/motion/useMotionProps.d.ts +457 -457
  80. package/dts/motion/utils.d.ts +211 -211
  81. package/dts/navigation/NavigationBar.d.ts +1 -25
  82. package/dts/navigation/NavigationBar.d.ts.map +1 -1
  83. package/dts/navigation/NavigationTitle.d.ts +4 -3
  84. package/dts/navigation/NavigationTitle.d.ts.map +1 -1
  85. package/dts/navigation/NavigationTitleSelect.d.ts +5 -12
  86. package/dts/navigation/NavigationTitleSelect.d.ts.map +1 -1
  87. package/dts/navigation/Sidebar.d.ts.map +1 -1
  88. package/dts/navigation/SidebarItem.d.ts +40 -34
  89. package/dts/navigation/SidebarItem.d.ts.map +1 -1
  90. package/dts/navigation/SidebarMoreMenu.d.ts +13 -12
  91. package/dts/navigation/SidebarMoreMenu.d.ts.map +1 -1
  92. package/dts/numbers/RollingNumber/RollingNumber.d.ts.map +1 -1
  93. package/dts/overlays/Alert.d.ts.map +1 -1
  94. package/dts/overlays/FocusTrap.d.ts +9 -12
  95. package/dts/overlays/FocusTrap.d.ts.map +1 -1
  96. package/dts/overlays/FullscreenAlert.d.ts +10 -7
  97. package/dts/overlays/FullscreenAlert.d.ts.map +1 -1
  98. package/dts/overlays/Toast.d.ts.map +1 -1
  99. package/dts/overlays/modal/FullscreenModal.d.ts +47 -45
  100. package/dts/overlays/modal/FullscreenModal.d.ts.map +1 -1
  101. package/dts/overlays/modal/FullscreenModalHeader.d.ts.map +1 -1
  102. package/dts/overlays/modal/FullscreenModalLayout.d.ts +2 -2
  103. package/dts/overlays/modal/Modal.d.ts.map +1 -1
  104. package/dts/overlays/modal/ModalBody.d.ts +6 -3
  105. package/dts/overlays/modal/ModalBody.d.ts.map +1 -1
  106. package/dts/overlays/modal/ModalFooter.d.ts +3 -10
  107. package/dts/overlays/modal/ModalFooter.d.ts.map +1 -1
  108. package/dts/overlays/modal/ModalHeader.d.ts +3 -12
  109. package/dts/overlays/modal/ModalHeader.d.ts.map +1 -1
  110. package/dts/overlays/modal/ModalWrapper.d.ts.map +1 -1
  111. package/dts/overlays/overlay/Overlay.d.ts +2 -1
  112. package/dts/overlays/overlay/Overlay.d.ts.map +1 -1
  113. package/dts/overlays/overlay/OverlayContent.d.ts +7 -5
  114. package/dts/overlays/overlay/OverlayContent.d.ts.map +1 -1
  115. package/dts/overlays/popover/PopoverProps.d.ts +46 -46
  116. package/dts/overlays/popover/PopoverProps.d.ts.map +1 -1
  117. package/dts/overlays/tooltip/Tooltip.d.ts +4 -22
  118. package/dts/overlays/tooltip/Tooltip.d.ts.map +1 -1
  119. package/dts/overlays/tooltip/TooltipContent.d.ts +7 -1
  120. package/dts/overlays/tooltip/TooltipContent.d.ts.map +1 -1
  121. package/dts/overlays/tray/Tray.d.ts.map +1 -1
  122. package/dts/page/PageFooter.d.ts.map +1 -1
  123. package/dts/page/PageHeader.d.ts.map +1 -1
  124. package/dts/pagination/Pagination.d.ts +3 -19
  125. package/dts/pagination/Pagination.d.ts.map +1 -1
  126. package/dts/perf/component-config/Button.component-config.perf-test.d.ts +2 -0
  127. package/dts/perf/component-config/Button.component-config.perf-test.d.ts.map +1 -0
  128. package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts +2 -0
  129. package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts.map +1 -0
  130. package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts +2 -0
  131. package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts.map +1 -0
  132. package/dts/section-header/SectionHeader.d.ts.map +1 -1
  133. package/dts/stepper/Stepper.d.ts.map +1 -1
  134. package/dts/system/ComponentConfigProvider.d.ts +26 -0
  135. package/dts/system/ComponentConfigProvider.d.ts.map +1 -0
  136. package/dts/system/index.d.ts +1 -0
  137. package/dts/system/index.d.ts.map +1 -1
  138. package/dts/tables/Table.d.ts +7 -5
  139. package/dts/tables/Table.d.ts.map +1 -1
  140. package/dts/tables/TableCaption.d.ts +32 -41
  141. package/dts/tables/TableCaption.d.ts.map +1 -1
  142. package/dts/tables/TableCell.d.ts +26 -48
  143. package/dts/tables/TableCell.d.ts.map +1 -1
  144. package/dts/tables/TableCellFallback.d.ts +10 -17
  145. package/dts/tables/TableCellFallback.d.ts.map +1 -1
  146. package/dts/tables/TableRow.d.ts +44 -53
  147. package/dts/tables/TableRow.d.ts.map +1 -1
  148. package/dts/tabs/SegmentedTab.d.ts +6 -3
  149. package/dts/tabs/SegmentedTab.d.ts.map +1 -1
  150. package/dts/tabs/SegmentedTabs.d.ts +9 -3
  151. package/dts/tabs/SegmentedTabs.d.ts.map +1 -1
  152. package/dts/tabs/Tabs.d.ts +16 -15
  153. package/dts/tabs/Tabs.d.ts.map +1 -1
  154. package/dts/tabs/hooks/useAnimateTabIndicator.d.ts +457 -457
  155. package/dts/tag/Tag.d.ts.map +1 -1
  156. package/dts/tour/Tour.d.ts +54 -53
  157. package/dts/tour/Tour.d.ts.map +1 -1
  158. package/dts/typography/Link.d.ts.map +1 -1
  159. package/dts/utils/mergeComponentProps.d.ts +34 -0
  160. package/dts/utils/mergeComponentProps.d.ts.map +1 -0
  161. package/dts/visualizations/ProgressBar.d.ts.map +1 -1
  162. package/dts/visualizations/ProgressBarWithFixedLabels.d.ts +5 -3
  163. package/dts/visualizations/ProgressBarWithFixedLabels.d.ts.map +1 -1
  164. package/dts/visualizations/ProgressBarWithFloatLabel.d.ts +3 -1
  165. package/dts/visualizations/ProgressBarWithFloatLabel.d.ts.map +1 -1
  166. package/dts/visualizations/ProgressCircle.d.ts.map +1 -1
  167. package/esm/accordion/Accordion.js +5 -3
  168. package/esm/alpha/combobox/Combobox.js +6 -4
  169. package/esm/alpha/select/Select.js +5 -3
  170. package/esm/alpha/select-chip/SelectChip.js +6 -4
  171. package/esm/alpha/tabbed-chips/TabbedChips.js +6 -4
  172. package/esm/banner/Banner.js +6 -4
  173. package/esm/buttons/AvatarButton.js +6 -4
  174. package/esm/buttons/Button.js +6 -4
  175. package/esm/buttons/ButtonGroup.js +5 -3
  176. package/esm/buttons/IconButton.js +6 -4
  177. package/esm/buttons/IconCounterButton.js +6 -4
  178. package/esm/buttons/Tile.js +5 -3
  179. package/esm/buttons/TileButton.js +6 -4
  180. package/esm/cards/LikeButton.js +6 -4
  181. package/esm/carousel/Carousel.js +8 -6
  182. package/esm/cells/Cell.js +8 -6
  183. package/esm/cells/CellAccessory.js +6 -4
  184. package/esm/cells/ListCell.js +6 -4
  185. package/esm/cells/ListCellFallback.js +6 -4
  186. package/esm/chips/Chip.js +6 -4
  187. package/esm/chips/InputChip.js +6 -4
  188. package/esm/chips/MediaChip.js +6 -4
  189. package/esm/chips/TabbedChips.js +6 -4
  190. package/esm/coachmark/Coachmark.js +6 -4
  191. package/esm/collapsible/Collapsible.js +5 -3
  192. package/esm/controls/Checkbox.js +6 -4
  193. package/esm/controls/CheckboxCell.js +6 -4
  194. package/esm/controls/Control.js +6 -4
  195. package/esm/controls/ControlGroup.js +6 -4
  196. package/esm/controls/InputStack.js +6 -4
  197. package/esm/controls/Radio.js +6 -4
  198. package/esm/controls/RadioCell.js +6 -4
  199. package/esm/controls/SearchInput.js +6 -4
  200. package/esm/controls/SelectOption.js +6 -4
  201. package/esm/controls/Switch.js +6 -4
  202. package/esm/controls/TextInput.js +6 -4
  203. package/esm/core/componentConfig.js +1 -0
  204. package/esm/dates/Calendar.js +6 -4
  205. package/esm/dates/DateInput.js +6 -4
  206. package/esm/dates/DatePicker.js +6 -4
  207. package/esm/dots/DotCount.js +6 -4
  208. package/esm/dots/DotStatusColor.js +6 -4
  209. package/esm/dots/DotSymbol.js +6 -4
  210. package/esm/dropdown/Dropdown.js +6 -4
  211. package/esm/hooks/useComponentConfig.js +27 -0
  212. package/esm/icons/Icon.js +6 -4
  213. package/esm/index.js +2 -0
  214. package/esm/layout/Divider.js +6 -4
  215. package/esm/layout/Fallback.js +6 -4
  216. package/esm/media/Avatar.js +8 -6
  217. package/esm/media/RemoteImage.js +6 -4
  218. package/esm/media/RemoteImageGroup.js +6 -4
  219. package/esm/navigation/NavigationBar.js +6 -4
  220. package/esm/navigation/NavigationTitle.js +6 -4
  221. package/esm/navigation/NavigationTitleSelect.js +6 -4
  222. package/esm/navigation/Sidebar.js +6 -4
  223. package/esm/navigation/SidebarItem.js +6 -4
  224. package/esm/navigation/SidebarMoreMenu.js +6 -4
  225. package/esm/numbers/RollingNumber/RollingNumber.js +6 -4
  226. package/esm/overlays/Alert.js +6 -4
  227. package/esm/overlays/FocusTrap.js +6 -4
  228. package/esm/overlays/FullscreenAlert.js +5 -3
  229. package/esm/overlays/Toast.js +6 -4
  230. package/esm/overlays/modal/FullscreenModal.js +5 -3
  231. package/esm/overlays/modal/FullscreenModalHeader.js +6 -4
  232. package/esm/overlays/modal/Modal.js +6 -4
  233. package/esm/overlays/modal/ModalBody.js +9 -6
  234. package/esm/overlays/modal/ModalFooter.js +8 -6
  235. package/esm/overlays/modal/ModalHeader.js +6 -4
  236. package/esm/overlays/modal/ModalWrapper.js +6 -4
  237. package/esm/overlays/overlay/Overlay.js +4 -2
  238. package/esm/overlays/tooltip/Tooltip.js +9 -7
  239. package/esm/overlays/tooltip/TooltipContent.js +16 -9
  240. package/esm/overlays/tray/Tray.js +5 -3
  241. package/esm/page/PageFooter.js +6 -4
  242. package/esm/page/PageHeader.js +6 -4
  243. package/esm/pagination/Pagination.js +6 -4
  244. package/esm/perf/component-config/Button.component-config.perf-test.js +43 -0
  245. package/esm/perf/component-config/ComponentConfigProvider.perf-test.js +134 -0
  246. package/esm/perf/component-config/ComponentConfigStickerSheet.perf-test.js +332 -0
  247. package/esm/perf/component-config/README.md +8 -0
  248. package/esm/section-header/SectionHeader.js +6 -4
  249. package/esm/stepper/Stepper.js +12 -10
  250. package/esm/system/ComponentConfigProvider.js +41 -0
  251. package/esm/system/index.js +1 -0
  252. package/esm/tables/Table.js +6 -4
  253. package/esm/tables/TableCaption.js +6 -4
  254. package/esm/tables/TableCell.js +9 -7
  255. package/esm/tables/TableCellFallback.js +6 -4
  256. package/esm/tables/TableRow.js +6 -4
  257. package/esm/tabs/SegmentedTab.js +6 -4
  258. package/esm/tabs/SegmentedTabs.js +6 -4
  259. package/esm/tabs/Tabs.js +12 -10
  260. package/esm/tag/Tag.js +6 -4
  261. package/esm/tour/Tour.js +5 -3
  262. package/esm/typography/Link.js +6 -4
  263. package/esm/utils/mergeComponentProps.js +39 -0
  264. package/esm/visualizations/ProgressBar.js +5 -3
  265. package/esm/visualizations/ProgressBarWithFixedLabels.js +5 -3
  266. package/esm/visualizations/ProgressBarWithFloatLabel.js +5 -3
  267. package/esm/visualizations/ProgressCircle.js +7 -5
  268. package/package.json +4 -3
@@ -10,13 +10,15 @@ import React, { memo, useCallback, useMemo, useRef, useState } from 'react';
10
10
  import { SelectOption } from '../controls/SelectOption';
11
11
  import { Dropdown } from '../dropdown/Dropdown';
12
12
  import { useA11yControlledVisibility } from '../hooks/useA11yControlledVisibility';
13
+ import { useComponentConfig } from '../hooks/useComponentConfig';
13
14
  import { Icon } from '../icons';
14
15
  import { Pressable } from '../system';
15
16
  import { Text } from '../typography/Text';
16
17
  import { navigationTitleDefaultElement } from './NavigationTitle';
17
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
- export const NavigationTitleSelect = /*#__PURE__*/memo(_ref => {
19
- let {
19
+ export const NavigationTitleSelect = /*#__PURE__*/memo(_props => {
20
+ const mergedProps = useComponentConfig('NavigationTitleSelect', _props);
21
+ const {
20
22
  options,
21
23
  value,
22
24
  onChange,
@@ -24,8 +26,8 @@ export const NavigationTitleSelect = /*#__PURE__*/memo(_ref => {
24
26
  color = 'fg',
25
27
  font = 'title1',
26
28
  as = navigationTitleDefaultElement
27
- } = _ref,
28
- props = _objectWithoutProperties(_ref, _excluded);
29
+ } = mergedProps,
30
+ props = _objectWithoutProperties(mergedProps, _excluded);
29
31
  const [visible, setVisible] = useState(false);
30
32
  const dropdownRef = useRef(null);
31
33
  const {
@@ -9,6 +9,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
9
9
  import React, { Children, memo, useMemo } from 'react';
10
10
  import { zIndex } from '@coinbase/cds-common/tokens/zIndex';
11
11
  import { cx } from '../cx';
12
+ import { useComponentConfig } from '../hooks/useComponentConfig';
12
13
  import { useDimensions } from '../hooks/useDimensions';
13
14
  import { Box, VStack } from '../layout';
14
15
  import { breakpoints } from '../styles/media';
@@ -33,8 +34,9 @@ const breakpointConfig = {
33
34
  },
34
35
  updateOnBreakpointChange: true
35
36
  };
36
- export const Sidebar = /*#__PURE__*/memo(_ref => {
37
- let {
37
+ export const Sidebar = /*#__PURE__*/memo(_props => {
38
+ const mergedProps = useComponentConfig('Sidebar', _props);
39
+ const {
38
40
  logo,
39
41
  children,
40
42
  collapsed,
@@ -48,8 +50,8 @@ export const Sidebar = /*#__PURE__*/memo(_ref => {
48
50
  classNames,
49
51
  style,
50
52
  styles
51
- } = _ref,
52
- props = _objectWithoutProperties(_ref, _excluded);
53
+ } = mergedProps,
54
+ props = _objectWithoutProperties(mergedProps, _excluded);
53
55
  const {
54
56
  ref,
55
57
  currentBreakpoint
@@ -7,6 +7,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
7
7
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
8
8
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
9
9
  import React, { forwardRef, memo, useMemo } from 'react';
10
+ import { useComponentConfig } from '../hooks/useComponentConfig';
10
11
  import { Icon } from '../icons';
11
12
  import { Box } from '../layout';
12
13
  import { Tooltip } from '../overlays/tooltip/Tooltip';
@@ -15,8 +16,9 @@ import { Text } from '../typography';
15
16
  import { useSidebarContext } from './SidebarContext';
16
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
18
  const pressableCss = "pressableCss-p1t38snu";
18
- export const SidebarItem = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
19
- let {
19
+ export const SidebarItem = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
20
+ const mergedProps = useComponentConfig('SidebarItem', _props);
21
+ const {
20
22
  icon,
21
23
  title,
22
24
  collapsed,
@@ -26,8 +28,8 @@ export const SidebarItem = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref)
26
28
  borderRadius,
27
29
  accessibilityLabel = title,
28
30
  Component
29
- } = _ref,
30
- pressableProps = _objectWithoutProperties(_ref, _excluded);
31
+ } = mergedProps,
32
+ pressableProps = _objectWithoutProperties(mergedProps, _excluded);
31
33
  const color = active ? 'fgPrimary' : 'fg';
32
34
  const {
33
35
  collapsed: computedCollapsed,
@@ -10,6 +10,7 @@ import React, { memo, useCallback, useMemo, useRef, useState } from 'react';
10
10
  import { sidebarMenuMaxWidth, sidebarMenuMinWidth } from '@coinbase/cds-common/tokens/menu';
11
11
  import { Dropdown } from '../dropdown';
12
12
  import { useA11yControlledVisibility } from '../hooks/useA11yControlledVisibility';
13
+ import { useComponentConfig } from '../hooks/useComponentConfig';
13
14
  import { Tooltip } from '../overlays/tooltip/Tooltip';
14
15
  import { useSidebarContext } from './SidebarContext';
15
16
  import { SidebarItem } from './SidebarItem';
@@ -18,8 +19,9 @@ const defaultContentPosition = {
18
19
  gap: 3,
19
20
  placement: 'right-start'
20
21
  };
21
- export const SidebarMoreMenu = /*#__PURE__*/memo(function SidebarMoreMenu(_ref) {
22
- let {
22
+ export const SidebarMoreMenu = /*#__PURE__*/memo(function SidebarMoreMenu(_props) {
23
+ const mergedProps = useComponentConfig('SidebarMoreMenu', _props);
24
+ const {
23
25
  children,
24
26
  active,
25
27
  onClick,
@@ -29,8 +31,8 @@ export const SidebarMoreMenu = /*#__PURE__*/memo(function SidebarMoreMenu(_ref)
29
31
  triggerTitle = 'More',
30
32
  Component,
31
33
  borderRadius
32
- } = _ref,
33
- props = _objectWithoutProperties(_ref, _excluded);
34
+ } = mergedProps,
35
+ props = _objectWithoutProperties(mergedProps, _excluded);
34
36
  const [visible, setVisible] = useState(false);
35
37
  const {
36
38
  collapsed
@@ -13,6 +13,7 @@ import { useValueChangeDirection } from '@coinbase/cds-common/numbers/useValueCh
13
13
  import { useLocale } from '@coinbase/cds-common/system/LocaleProvider';
14
14
  import { m } from 'framer-motion';
15
15
  import { cx } from '../../cx';
16
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
16
17
  import { HStack } from '../../layout/HStack';
17
18
  import { Text } from '../../typography/Text';
18
19
  import { DefaultRollingNumberAffixSection } from './DefaultRollingNumberAffixSection';
@@ -56,8 +57,9 @@ export const defaultTransitionConfig = {
56
57
  // Subcomponent prop and component type declarations
57
58
 
58
59
  export const rollingNumberDefaultElement = 'span';
59
- export const RollingNumber = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
60
- let {
60
+ export const RollingNumber = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
61
+ const mergedProps = useComponentConfig('RollingNumber', _props);
62
+ const {
61
63
  as,
62
64
  value,
63
65
  transition,
@@ -91,8 +93,8 @@ export const RollingNumber = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, re
91
93
  tabularNumbers = true,
92
94
  accessibilityLabelPrefix,
93
95
  accessibilityLabelSuffix
94
- } = _ref,
95
- props = _objectWithoutProperties(_ref, _excluded);
96
+ } = mergedProps,
97
+ props = _objectWithoutProperties(mergedProps, _excluded);
96
98
  const Component = as !== null && as !== void 0 ? as : rollingNumberDefaultElement;
97
99
  const {
98
100
  locale: defaultLocale
@@ -9,6 +9,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
9
9
  import { forwardRef, memo, useCallback, useMemo } from 'react';
10
10
  import { Button } from '../buttons';
11
11
  import { useA11yLabels } from '../hooks/useA11yLabels';
12
+ import { useComponentConfig } from '../hooks/useComponentConfig';
12
13
  import { Pictogram } from '../illustrations';
13
14
  import { Box } from '../layout/Box';
14
15
  import { Text } from '../typography/Text';
@@ -17,8 +18,9 @@ import { Portal } from './Portal';
17
18
  import { alertContainerId } from './PortalProvider';
18
19
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
20
  export const alertModalWidth = 318;
20
- export const Alert = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
21
- let {
21
+ export const Alert = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
22
+ const mergedProps = useComponentConfig('Alert', _props);
23
+ const {
22
24
  title,
23
25
  body,
24
26
  pictogram,
@@ -35,8 +37,8 @@ export const Alert = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
35
37
  actionLayout = 'horizontal',
36
38
  accessibilityLabelledBy,
37
39
  accessibilityLabel
38
- } = _ref,
39
- props = _objectWithoutProperties(_ref, _excluded);
40
+ } = mergedProps,
41
+ props = _objectWithoutProperties(mergedProps, _excluded);
40
42
  const {
41
43
  labelledBySource,
42
44
  labelledBy,
@@ -2,15 +2,17 @@ import React, { memo, useCallback, useEffect, useMemo, useRef } from 'react';
2
2
  import { useMergeRefs } from '@coinbase/cds-common/hooks/useMergeRefs';
3
3
  import { FOCUSABLE_ELEMENTS } from '@coinbase/cds-common/tokens/overlays';
4
4
  import { debounce } from '@coinbase/cds-common/utils/debounce';
5
+ import { useComponentConfig } from '../hooks/useComponentConfig';
5
6
  import { getBrowserGlobals } from '../utils/browser';
6
7
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
7
8
  const DEBOUNCE_MS = 50;
8
9
  export const NAVIGATION_KEYS = ['Tab', 'ArrowDown', 'ArrowUp', 'Home', 'End'];
9
10
  const ALPHABET_KEYS = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
10
11
  const FOCUSABLE_ELEMENTS_INCLUDING_TABINDEX = "".concat(FOCUSABLE_ELEMENTS, ", [tabindex]");
11
- export const FocusTrap = /*#__PURE__*/memo(function FocusTrap(_ref) {
12
+ export const FocusTrap = /*#__PURE__*/memo(_props => {
12
13
  var _previouslyFocusedEle, _getBrowserGlobals;
13
- let {
14
+ const mergedProps = useComponentConfig('FocusTrap', _props);
15
+ const {
14
16
  children,
15
17
  onEscPress,
16
18
  disableTypeFocus,
@@ -22,7 +24,7 @@ export const FocusTrap = /*#__PURE__*/memo(function FocusTrap(_ref) {
22
24
  focusTabIndexElements,
23
25
  autoFocusDelay,
24
26
  restoreFocusOnUnmount
25
- } = _ref;
27
+ } = mergedProps;
26
28
  const isFocused = useRef(false);
27
29
  const childrenRef = useRef(null);
28
30
  const previouslyFocusedElement = useRef(null);
@@ -139,7 +141,7 @@ export const FocusTrap = /*#__PURE__*/memo(function FocusTrap(_ref) {
139
141
  event.preventDefault();
140
142
  const elementWithMatchingFirstLetter = focusableElements.find(el => {
141
143
  var _el$textContent;
142
- const textContentFirstLetter = (_el$textContent = el.textContent) === null || _el$textContent === void 0 || (_el$textContent = _el$textContent.at(0)) === null || _el$textContent === void 0 ? void 0 : _el$textContent.toLowerCase();
144
+ const textContentFirstLetter = (_el$textContent = el.textContent) === null || _el$textContent === void 0 || (_el$textContent = _el$textContent[0]) === null || _el$textContent === void 0 ? void 0 : _el$textContent.toLowerCase();
143
145
  const eventKeyLowerCase = event.key.toLowerCase();
144
146
  return textContentFirstLetter === eventKeyLowerCase;
145
147
  });
@@ -1,6 +1,7 @@
1
1
  import { memo, useMemo } from 'react';
2
2
  import { Button } from '../buttons';
3
3
  import { useA11yLabels } from '../hooks/useA11yLabels';
4
+ import { useComponentConfig } from '../hooks/useComponentConfig';
4
5
  import { HeroSquare } from '../illustrations';
5
6
  import { Box } from '../layout/Box';
6
7
  import { VStack } from '../layout/VStack';
@@ -11,8 +12,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
12
  const centerContentCss = "centerContentCss-c1uepcpp";
12
13
  const actionsContainerCss = "actionsContainerCss-a13dr4a7";
13
14
  const primaryContentCss = "primaryContentCss-p1scz3m2";
14
- export const FullscreenAlert = /*#__PURE__*/memo(function FullscreenAlert(_ref) {
15
- let {
15
+ export const FullscreenAlert = /*#__PURE__*/memo(_props => {
16
+ const mergedProps = useComponentConfig('FullscreenAlert', _props);
17
+ const {
16
18
  visible,
17
19
  onRequestClose,
18
20
  title,
@@ -28,7 +30,7 @@ export const FullscreenAlert = /*#__PURE__*/memo(function FullscreenAlert(_ref)
28
30
  accessibilityLabelledBy,
29
31
  testID,
30
32
  closeAccessibilityLabel
31
- } = _ref;
33
+ } = mergedProps;
32
34
  const {
33
35
  labelledBySource,
34
36
  labelledBy,
@@ -12,6 +12,7 @@ import { ToastContext } from '@coinbase/cds-common/overlays/ToastProvider';
12
12
  import { m as motion, useAnimation } from 'framer-motion';
13
13
  import { Button } from '../buttons/Button';
14
14
  import { IconButton } from '../buttons/IconButton';
15
+ import { useComponentConfig } from '../hooks/useComponentConfig';
15
16
  import { Box } from '../layout/Box';
16
17
  import { HStack } from '../layout/HStack';
17
18
  import { ColorSurge } from '../motion/ColorSurge';
@@ -27,9 +28,10 @@ const closeButtonAccessibilityDefaults = {
27
28
  const baseCss = "baseCss-b10fl3zt";
28
29
  const toastCss = "toastCss-tzee9px";
29
30
  export const toastTestId = 'cds-toast';
30
- export const Toast = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
31
+ export const Toast = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
31
32
  var _action$testID;
32
- let {
33
+ const mergedProps = useComponentConfig('Toast', _props);
34
+ const {
33
35
  text,
34
36
  action,
35
37
  onWillHide,
@@ -40,8 +42,8 @@ export const Toast = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
40
42
  bottomOffset = 'var(--space-4)',
41
43
  closeButtonAccessibilityProps = closeButtonAccessibilityDefaults,
42
44
  variant
43
- } = _ref,
44
- props = _objectWithoutProperties(_ref, _excluded);
45
+ } = mergedProps,
46
+ props = _objectWithoutProperties(mergedProps, _excluded);
45
47
  const {
46
48
  pauseTimer,
47
49
  resumeTimer
@@ -1,6 +1,7 @@
1
1
  import React, { memo, useMemo } from 'react';
2
2
  import { cx } from '../../cx';
3
3
  import { useA11yLabels } from '../../hooks/useA11yLabels';
4
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
4
5
  import { VStack } from '../../layout';
5
6
  import { breakpoints } from '../../styles/media';
6
7
  import { FullscreenModalHeader } from './FullscreenModalHeader';
@@ -15,8 +16,9 @@ const secondaryContentContainerCss = "secondaryContentContainerCss-sfkv6s4";
15
16
  const secondaryContentDividerCss = "secondaryContentDividerCss-s9mfox4";
16
17
  const contentScrollContainerCss = "contentScrollContainerCss-cb0slex";
17
18
  const contentCss = "contentCss-c18pcq89";
18
- export const FullscreenModal = /*#__PURE__*/memo(function FullscreenModal(_ref) {
19
- let {
19
+ export const FullscreenModal = /*#__PURE__*/memo(_props => {
20
+ const mergedProps = useComponentConfig('FullscreenModal', _props);
21
+ const {
20
22
  focusTabIndexElements,
21
23
  logo,
22
24
  visible,
@@ -41,7 +43,7 @@ export const FullscreenModal = /*#__PURE__*/memo(function FullscreenModal(_ref)
41
43
  accessibilityLabel,
42
44
  closeAccessibilityLabel,
43
45
  contentStyle
44
- } = _ref;
46
+ } = mergedProps;
45
47
  const {
46
48
  labelledBySource,
47
49
  labelledBy,
@@ -8,6 +8,7 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
8
8
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
9
9
  import React, { forwardRef, memo } from 'react';
10
10
  import { IconButton } from '../../buttons';
11
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
11
12
  import { LogoMark } from '../../icons/LogoMark';
12
13
  import { Box, HStack } from '../../layout';
13
14
  import { breakpoints } from '../../styles/media';
@@ -17,8 +18,9 @@ const paddingStartSmall = 80;
17
18
  const paddingStartLarge = 240;
18
19
  const headerLogoCss = "headerLogoCss-h8v5jkx";
19
20
  const headerLogoInnerCss = "headerLogoInnerCss-hazb7kh";
20
- export const FullscreenModalHeader = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function FullscreenModalHeader(_ref, ref) {
21
- let {
21
+ export const FullscreenModalHeader = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function FullscreenModalHeader(_props, ref) {
22
+ const mergedProps = useComponentConfig('FullscreenModalHeader', _props);
23
+ const {
22
24
  logo,
23
25
  title,
24
26
  onRequestClose,
@@ -29,8 +31,8 @@ export const FullscreenModalHeader = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(f
29
31
  borderedBottom = true,
30
32
  paddingX = 4,
31
33
  paddingY = 2
32
- } = _ref,
33
- props = _objectWithoutProperties(_ref, _excluded);
34
+ } = mergedProps,
35
+ props = _objectWithoutProperties(mergedProps, _excluded);
34
36
  const actualBorderedBottom = hideDivider === undefined ? borderedBottom : !hideDivider;
35
37
  return /*#__PURE__*/_jsxs(HStack, _objectSpread(_objectSpread({
36
38
  ref: ref,
@@ -14,6 +14,7 @@ import { zIndex } from '@coinbase/cds-common/tokens/zIndex';
14
14
  import { m as motion } from 'framer-motion';
15
15
  import { cx } from '../../cx';
16
16
  import { useA11yLabels } from '../../hooks/useA11yLabels';
17
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
17
18
  import { Box } from '../../layout';
18
19
  import { VStack } from '../../layout/VStack';
19
20
  import { useMotionProps } from '../../motion/useMotionProps';
@@ -36,8 +37,9 @@ const MotionBox = motion(Box);
36
37
  const overlayContentContextValue = {
37
38
  isModal: true
38
39
  };
39
- export const Modal = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
40
- let {
40
+ export const Modal = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
41
+ const mergedProps = useComponentConfig('Modal', _props);
42
+ const {
41
43
  children,
42
44
  visible = false,
43
45
  onRequestClose,
@@ -56,8 +58,8 @@ export const Modal = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
56
58
  hideCloseButton,
57
59
  hideDividers,
58
60
  maxWidth
59
- } = _ref,
60
- props = _objectWithoutProperties(_ref, _excluded);
61
+ } = mergedProps,
62
+ props = _objectWithoutProperties(mergedProps, _excluded);
61
63
  const defaultWidth = dangerouslyDisableResponsiveness ? modalMaxWidth : defaultWidthStyle;
62
64
  const defaultMaxWidth = dangerouslyDisableResponsiveness ? undefined : defaultMaxWidthStyle;
63
65
  const {
@@ -6,20 +6,22 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
8
8
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
9
- import React, { forwardRef } from 'react';
9
+ import React, { forwardRef, memo } from 'react';
10
10
  import { useModalContext } from '@coinbase/cds-common/overlays/ModalContext';
11
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
11
12
  import { Box } from '../../layout/Box';
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
- export const ModalBody = /*#__PURE__*/forwardRef((_ref, ref) => {
14
- let {
14
+ export const ModalBody = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
15
+ const mergedProps = useComponentConfig('ModalBody', _props);
16
+ const {
15
17
  children,
16
18
  flexDirection = 'column',
17
19
  flexGrow = 1,
18
20
  overflow = 'auto',
19
21
  paddingX = 3,
20
22
  tabIndex = 0
21
- } = _ref,
22
- props = _objectWithoutProperties(_ref, _excluded);
23
+ } = mergedProps,
24
+ props = _objectWithoutProperties(mergedProps, _excluded);
23
25
  const {
24
26
  hideDividers
25
27
  } = useModalContext();
@@ -35,4 +37,5 @@ export const ModalBody = /*#__PURE__*/forwardRef((_ref, ref) => {
35
37
  }, props), {}, {
36
38
  children: children
37
39
  }));
38
- });
40
+ }));
41
+ ModalBody.displayName = 'ModalBody';
@@ -6,14 +6,16 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
8
8
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
9
- import React from 'react';
9
+ import React, { memo } from 'react';
10
10
  import { useModalContext } from '@coinbase/cds-common/overlays/ModalContext';
11
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
11
12
  import { HStack } from '../../layout/HStack';
12
13
  import { breakpoints } from '../../styles/media';
13
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
15
  const baseCss = "baseCss-b12mhpgg";
15
- export const ModalFooter = _ref => {
16
- let {
16
+ export const ModalFooter = /*#__PURE__*/memo(_props => {
17
+ const mergedProps = useComponentConfig('ModalFooter', _props);
18
+ const {
17
19
  gap = 2,
18
20
  justifyContent = 'flex-end',
19
21
  paddingX = 3,
@@ -21,8 +23,8 @@ export const ModalFooter = _ref => {
21
23
  width = '100%',
22
24
  primaryAction,
23
25
  secondaryAction
24
- } = _ref,
25
- props = _objectWithoutProperties(_ref, _excluded);
26
+ } = mergedProps,
27
+ props = _objectWithoutProperties(mergedProps, _excluded);
26
28
  const {
27
29
  hideDividers
28
30
  } = useModalContext();
@@ -37,5 +39,5 @@ export const ModalFooter = _ref => {
37
39
  }, props), {}, {
38
40
  children: [secondaryAction, primaryAction]
39
41
  }));
40
- };
42
+ });
41
43
  import "./ModalFooter.css";
@@ -10,12 +10,14 @@ import React from 'react';
10
10
  import { useModalContext } from '@coinbase/cds-common/overlays/ModalContext';
11
11
  import { interactableHeight } from '@coinbase/cds-common/tokens/interactableHeight';
12
12
  import { IconButton } from '../../buttons/IconButton';
13
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
13
14
  import { Box } from '../../layout/Box';
14
15
  import { HStack } from '../../layout/HStack';
15
16
  import { Text } from '../../typography/Text';
16
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
- export const ModalHeader = _ref => {
18
- let {
18
+ export const ModalHeader = _props => {
19
+ const mergedProps = useComponentConfig('ModalHeader', _props);
20
+ const {
19
21
  alignItems = 'center',
20
22
  paddingX = 3,
21
23
  paddingY = 2,
@@ -25,8 +27,8 @@ export const ModalHeader = _ref => {
25
27
  backAccessibilityHint,
26
28
  closeAccessibilityLabel,
27
29
  closeAccessibilityHint
28
- } = _ref,
29
- props = _objectWithoutProperties(_ref, _excluded);
30
+ } = mergedProps,
31
+ props = _objectWithoutProperties(mergedProps, _excluded);
30
32
  const {
31
33
  onRequestClose,
32
34
  accessibilityLabelledBy,
@@ -9,6 +9,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
9
9
  import React, { forwardRef, memo, useEffect } from 'react';
10
10
  import { NewAnimatePresence } from '../../animation/NewAnimatePresence';
11
11
  import { cx } from '../../cx';
12
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
12
13
  import { useScrollBlocker } from '../../hooks/useScrollBlocker';
13
14
  import { Box } from '../../layout/Box';
14
15
  import { media } from '../../styles/media';
@@ -17,8 +18,9 @@ import { Portal } from '../Portal';
17
18
  import { modalContainerId } from '../PortalProvider';
18
19
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
19
20
  const modalOverlayResponsiveCss = "modalOverlayResponsiveCss-msg6e82";
20
- export const ModalWrapper = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
21
- let {
21
+ export const ModalWrapper = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
22
+ const mergedProps = useComponentConfig('ModalWrapper', _props);
23
+ const {
22
24
  alignItems = 'center',
23
25
  'aria-modal': ariaModal,
24
26
  children,
@@ -35,8 +37,8 @@ export const ModalWrapper = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref
35
37
  hideOverlay = false,
36
38
  role = 'dialog',
37
39
  width = '100vw'
38
- } = _ref,
39
- props = _objectWithoutProperties(_ref, _excluded);
40
+ } = mergedProps,
41
+ props = _objectWithoutProperties(mergedProps, _excluded);
40
42
  const blockScroll = useScrollBlocker();
41
43
 
42
44
  // prevent body scroll when modal is open
@@ -5,17 +5,19 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
5
5
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
6
  import React, { forwardRef, memo } from 'react';
7
7
  import { OverlayContentContext } from '@coinbase/cds-common/overlays/OverlayContentContext';
8
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
8
9
  import { OverlayContent } from './OverlayContent';
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
10
11
  const overlayContentContextValue = {
11
12
  isOverlay: true
12
13
  };
13
- export const Overlay = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((props, forwardedRef) => {
14
+ export const Overlay = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedRef) => {
15
+ const mergedProps = useComponentConfig('Overlay', _props);
14
16
  return /*#__PURE__*/_jsx(OverlayContentContext.Provider, {
15
17
  value: overlayContentContextValue,
16
18
  children: /*#__PURE__*/_jsx(OverlayContent, _objectSpread({
17
19
  ref: forwardedRef
18
- }, props))
20
+ }, mergedProps))
19
21
  });
20
22
  }));
21
23
  Overlay.displayName = 'Overlay';
@@ -1,4 +1,5 @@
1
- import React, { cloneElement, useCallback, useMemo, useRef } from 'react';
1
+ import React, { cloneElement, memo, useCallback, useMemo, useRef } from 'react';
2
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
2
3
  import { Popover } from '../popover/Popover';
3
4
  import { TooltipContent } from './TooltipContent';
4
5
  import { useTooltipState } from './useTooltipState';
@@ -7,8 +8,9 @@ const preventMouseDown = event => {
7
8
  event.preventDefault();
8
9
  event.stopPropagation();
9
10
  };
10
- export const Tooltip = _ref => {
11
- let {
11
+ export const Tooltip = /*#__PURE__*/memo(_props => {
12
+ const mergedProps = useComponentConfig('Tooltip', _props);
13
+ const {
12
14
  children,
13
15
  content,
14
16
  elevation,
@@ -29,7 +31,7 @@ export const Tooltip = _ref => {
29
31
  autoFocusDelay = 20,
30
32
  openDelay,
31
33
  closeDelay
32
- } = _ref;
34
+ } = mergedProps;
33
35
  const {
34
36
  isOpen,
35
37
  handleOnMouseEnter,
@@ -39,10 +41,10 @@ export const Tooltip = _ref => {
39
41
  tooltipId
40
42
  } = useTooltipState(tooltipIdDefault, openDelay, closeDelay);
41
43
  const tooltipContentRef = useRef(null);
42
- const handleMouseEnter = useCallback(_ref2 => {
44
+ const handleMouseEnter = useCallback(_ref => {
43
45
  let {
44
46
  target
45
- } = _ref2;
47
+ } = _ref;
46
48
  const node = tooltipContentRef.current;
47
49
 
48
50
  // to prevent flicker, don't open tooltip if enter event originates from tooltip content
@@ -98,4 +100,4 @@ export const Tooltip = _ref => {
98
100
  visible: isVisible,
99
101
  children: clonedChild
100
102
  });
101
- };
103
+ });
@@ -8,21 +8,28 @@ import { animateInOpacityConfig, animateOutOpacityConfig, getTranslateConfigByPl
8
8
  import { tooltipMaxWidth, tooltipPaddingX, tooltipPaddingY } from '@coinbase/cds-common/tokens/tooltip';
9
9
  import { zIndex as zIndexTokens } from '@coinbase/cds-common/tokens/zIndex';
10
10
  import { m as motion } from 'framer-motion';
11
+ import { useComponentConfig } from '../../hooks/useComponentConfig';
11
12
  import { Box } from '../../layout/Box';
12
13
  import { useMotionProps } from '../../motion/useMotionProps';
13
14
  import { Text } from '../../typography/Text';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  const textCss = "textCss-t15dzixe";
16
- export const TooltipContent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
17
- let {
17
+ export const TooltipContent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
18
+ const mergedProps = useComponentConfig('TooltipContent', _props);
19
+ const {
18
20
  content,
19
21
  elevation,
20
22
  gap,
21
23
  testID,
22
24
  zIndex,
23
25
  tooltipId,
24
- placement = 'top'
25
- } = _ref;
26
+ placement = 'top',
27
+ background = 'bg',
28
+ borderRadius = 200,
29
+ maxWidth = tooltipMaxWidth,
30
+ paddingX = tooltipPaddingX,
31
+ paddingY = tooltipPaddingY
32
+ } = mergedProps;
26
33
  const outerStyle = useMemo(() => ({
27
34
  padding: "var(--space-".concat(gap, ")"),
28
35
  zIndex: zIndex !== null && zIndex !== void 0 ? zIndex : zIndexTokens.tooltip
@@ -42,14 +49,14 @@ export const TooltipContent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, r
42
49
  "data-testid": "".concat(testID, "-motion"),
43
50
  children: /*#__PURE__*/_jsx(Box, {
44
51
  ref: ref,
45
- background: "bg",
46
- borderRadius: 200,
52
+ background: background,
53
+ borderRadius: borderRadius,
47
54
  "data-testid": testID,
48
55
  elevation: elevation,
49
56
  id: tooltipId,
50
- maxWidth: tooltipMaxWidth,
51
- paddingX: tooltipPaddingX,
52
- paddingY: tooltipPaddingY,
57
+ maxWidth: maxWidth,
58
+ paddingX: paddingX,
59
+ paddingY: paddingY,
53
60
  role: "tooltip",
54
61
  children: typeof content === 'string' ? /*#__PURE__*/_jsx(Text, {
55
62
  className: textCss,