@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
@@ -13,6 +13,7 @@ import { usePreviousValue } from '@coinbase/cds-common/hooks/usePreviousValue';
13
13
  import { containsStep, flattenSteps, isStepVisited } from '@coinbase/cds-common/stepper/utils';
14
14
  import { useSprings } from '@react-spring/web';
15
15
  import { cx } from '../cx';
16
+ import { useComponentConfig } from '../hooks/useComponentConfig';
16
17
  import { useHasMounted } from '../hooks/useHasMounted';
17
18
  import { Box } from '../layout/Box';
18
19
  import { VStack } from '../layout/VStack';
@@ -48,9 +49,10 @@ export const defaultProgressSpringConfig = {
48
49
  tension: 100,
49
50
  clamp: true
50
51
  };
51
- const StepperBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
52
+ const StepperBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
52
53
  var _usePreviousValue, _usePreviousValue2;
53
- let {
54
+ const mergedProps = useComponentConfig('Stepper', _props);
55
+ const {
54
56
  direction,
55
57
  activeStepId,
56
58
  steps,
@@ -71,8 +73,8 @@ const StepperBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
71
73
  progressSpringConfig = defaultProgressSpringConfig,
72
74
  animate = true,
73
75
  disableAnimateOnMount
74
- } = _ref,
75
- props = _objectWithoutProperties(_ref, _excluded);
76
+ } = mergedProps,
77
+ props = _objectWithoutProperties(mergedProps, _excluded);
76
78
  const hasMounted = useHasMounted();
77
79
  const flatStepIds = useMemo(() => flattenSteps(steps).map(step => step.id), [steps]);
78
80
 
@@ -86,11 +88,11 @@ const StepperBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
86
88
  rootClassName,
87
89
  stepClassNames
88
90
  } = useMemo(() => {
89
- const _ref2 = classNames !== null && classNames !== void 0 ? classNames : {},
91
+ const _ref = classNames !== null && classNames !== void 0 ? classNames : {},
90
92
  {
91
93
  root
92
- } = _ref2,
93
- stepClassNames = _objectWithoutProperties(_ref2, _excluded2);
94
+ } = _ref,
95
+ stepClassNames = _objectWithoutProperties(_ref, _excluded2);
94
96
  const rootClassName = cx(className, root);
95
97
  return {
96
98
  rootClassName,
@@ -101,11 +103,11 @@ const StepperBase = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
101
103
  rootStyle,
102
104
  stepStyles
103
105
  } = useMemo(() => {
104
- const _ref3 = styles !== null && styles !== void 0 ? styles : {},
106
+ const _ref2 = styles !== null && styles !== void 0 ? styles : {},
105
107
  {
106
108
  root
107
- } = _ref3,
108
- stepStyles = _objectWithoutProperties(_ref3, _excluded3);
109
+ } = _ref2,
110
+ stepStyles = _objectWithoutProperties(_ref2, _excluded3);
109
111
  const rootStyle = _objectSpread(_objectSpread({}, style), root);
110
112
  return {
111
113
  rootStyle,
@@ -0,0 +1,41 @@
1
+ import React, { createContext, useContext, useRef } from 'react';
2
+ import { createStore } from 'zustand';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ export const ComponentConfigContext = /*#__PURE__*/createContext(undefined);
5
+
6
+ /** Builds the full store state from a ComponentConfig. */
7
+ const createComponentConfigStoreState = config => {
8
+ return {
9
+ components: config
10
+ };
11
+ };
12
+ /**
13
+ * Provides component-level default props via a zustand store.
14
+ * Each component subscribes to only its own config slice, preventing cross-component re-renders.
15
+ * Supports nesting with isolated scopes: a child provider only applies its own config map.
16
+ */
17
+ export const ComponentConfigProvider = _ref => {
18
+ let {
19
+ value,
20
+ children
21
+ } = _ref;
22
+ const storeRef = useRef(null);
23
+ if (!storeRef.current) {
24
+ storeRef.current = createStore(() => createComponentConfigStoreState(value));
25
+ }
26
+ const newState = createComponentConfigStoreState(value);
27
+ storeRef.current.setState(newState, true);
28
+ return /*#__PURE__*/_jsx(ComponentConfigContext.Provider, {
29
+ value: storeRef.current,
30
+ children: children
31
+ });
32
+ };
33
+
34
+ /** Singleton empty store used when no ComponentConfigProvider exists in the tree. */
35
+ const emptyComponentConfigStore = createStore(() => ({}));
36
+
37
+ /** Returns the nearest ComponentConfigProvider's zustand store, or an empty fallback. */
38
+ export const useComponentConfigStore = () => {
39
+ const context = useContext(ComponentConfigContext);
40
+ return context !== null && context !== void 0 ? context : emptyComponentConfigStore;
41
+ };
@@ -1,3 +1,4 @@
1
+ export * from './ComponentConfigProvider';
1
2
  export * from './EventHandlerProvider';
2
3
  export * from './Interactable';
3
4
  export * from './MediaQueryProvider';
@@ -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, useMemo } from 'react';
10
10
  import { cx } from '../cx';
11
+ import { useComponentConfig } from '../hooks/useComponentConfig';
11
12
  import { TableContext } from './context/TableContext';
12
13
 
13
14
  /**
@@ -28,8 +29,9 @@ const tableVariantStyles = {
28
29
  graph: tableVariantGraphCss,
29
30
  ruled: tableVariantRuledCss
30
31
  };
31
- const TableWithRef = /*#__PURE__*/forwardRef(function TableWithRef(_ref, ref) {
32
- let {
32
+ const TableWithRef = /*#__PURE__*/forwardRef(function TableWithRef(_props, ref) {
33
+ const mergedProps = useComponentConfig('Table', _props);
34
+ const {
33
35
  children,
34
36
  variant = 'default',
35
37
  bordered,
@@ -42,8 +44,8 @@ const TableWithRef = /*#__PURE__*/forwardRef(function TableWithRef(_ref, ref) {
42
44
  accessibilityLabelledBy,
43
45
  accessibilityLabel,
44
46
  className
45
- } = _ref,
46
- props = _objectWithoutProperties(_ref, _excluded);
47
+ } = mergedProps,
48
+ props = _objectWithoutProperties(mergedProps, _excluded);
47
49
  const api = useMemo(() => ({
48
50
  variant,
49
51
  cellSpacing,
@@ -8,12 +8,14 @@ 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, { memo, useMemo } from 'react';
10
10
  import { useCellSpacing } from '../hooks/useCellSpacing';
11
+ import { useComponentConfig } from '../hooks/useComponentConfig';
11
12
  import { Box } from '../layout/Box';
12
13
  import { Text } from '../typography/Text';
13
14
  import { useTableCellSpacing } from './hooks/useTable';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
- export const TableCaption = /*#__PURE__*/memo(_ref => {
16
- let {
16
+ export const TableCaption = /*#__PURE__*/memo(_props => {
17
+ const mergedProps = useComponentConfig('TableCaption', _props);
18
+ const {
17
19
  children,
18
20
  as = 'span',
19
21
  align = 'start',
@@ -23,8 +25,8 @@ export const TableCaption = /*#__PURE__*/memo(_ref => {
23
25
  innerSpacing,
24
26
  testID,
25
27
  style
26
- } = _ref,
27
- props = _objectWithoutProperties(_ref, _excluded);
28
+ } = mergedProps,
29
+ props = _objectWithoutProperties(mergedProps, _excluded);
28
30
  const {
29
31
  outer,
30
32
  inner
@@ -10,6 +10,7 @@ import React, { memo, useMemo } from 'react';
10
10
  import { isDevelopment } from '@coinbase/cds-utils';
11
11
  import { Cell } from '../cells/Cell';
12
12
  import { cx } from '../cx';
13
+ import { useComponentConfig } from '../hooks/useComponentConfig';
13
14
  import { Box } from '../layout/Box';
14
15
  import { Text } from '../typography/Text';
15
16
  import { useTableCellSpacing, useTableCellTag, useTableContext, useTableSectionTag } from './hooks/useTable';
@@ -23,9 +24,10 @@ const tableFooterCellCss = "tableFooterCellCss-t1gwndzp";
23
24
  // the table behavior will override this. We use `width`
24
25
  // to explicitly define a table columns width
25
26
  const tableOverflowWidthCss = "tableOverflowWidthCss-t1l3yoo8";
26
- export const TableCell = /*#__PURE__*/memo(_ref => {
27
- var _ref2;
28
- let {
27
+ export const TableCell = /*#__PURE__*/memo(_props => {
28
+ var _ref;
29
+ const mergedProps = useComponentConfig('TableCell', _props);
30
+ const {
29
31
  alignItems,
30
32
  children,
31
33
  colSpan = 1,
@@ -38,7 +40,7 @@ export const TableCell = /*#__PURE__*/memo(_ref => {
38
40
  start,
39
41
  testID,
40
42
  overflow,
41
- // Only available when Children is null
43
+ // Only available when children is null
42
44
  title,
43
45
  titleColor,
44
46
  subtitle,
@@ -48,8 +50,8 @@ export const TableCell = /*#__PURE__*/memo(_ref => {
48
50
  outerSpacing,
49
51
  as,
50
52
  className
51
- } = _ref,
52
- props = _objectWithoutProperties(_ref, _excluded);
53
+ } = mergedProps,
54
+ props = _objectWithoutProperties(mergedProps, _excluded);
53
55
  if (isDevelopment() && children && (title || subtitle)) {
54
56
  console.error('TableCell: Cannot use `title` or `subtitle` with `children`.');
55
57
  }
@@ -83,7 +85,7 @@ export const TableCell = /*#__PURE__*/memo(_ref => {
83
85
  const tableSectionType = useTableSectionTag();
84
86
  const isInBody = tableSectionType === 'tbody';
85
87
  const defaultTitleColor = isInBody ? 'fg' : 'fgMuted';
86
- const smartTitleColor = (_ref2 = titleColor !== null && titleColor !== void 0 ? titleColor : color) !== null && _ref2 !== void 0 ? _ref2 : defaultTitleColor;
88
+ const smartTitleColor = (_ref = titleColor !== null && titleColor !== void 0 ? titleColor : color) !== null && _ref !== void 0 ? _ref : defaultTitleColor;
87
89
 
88
90
  // Spacing defined on the TableCell will override cellSpacing defined on the Table
89
91
  const {
@@ -10,13 +10,15 @@ import { memo } from 'react';
10
10
  import { getRectWidthVariant } from '@coinbase/cds-common/utils/getRectWidthVariant';
11
11
  import { Cell } from '../cells/Cell';
12
12
  import { MediaFallback } from '../cells/MediaFallback';
13
+ import { useComponentConfig } from '../hooks/useComponentConfig';
13
14
  import { Fallback } from '../layout';
14
15
  import { useTableCellSpacing, useTableCellTag, useTableContext } from './hooks/useTable';
15
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
17
  const visuallyHiddenCss = "visuallyHiddenCss-v1l01hi5";
17
18
  const tableCellCss = "tableCellCss-t189mbuy";
18
- export const TableCellFallback = /*#__PURE__*/memo(_ref => {
19
- let {
19
+ export const TableCellFallback = /*#__PURE__*/memo(_props => {
20
+ const mergedProps = useComponentConfig('TableCellFallback', _props);
21
+ const {
20
22
  title,
21
23
  start,
22
24
  end,
@@ -28,8 +30,8 @@ export const TableCellFallback = /*#__PURE__*/memo(_ref => {
28
30
  disableRandomRectWidth,
29
31
  rectWidthVariant,
30
32
  accessibilityLabel = 'Loading Cell'
31
- } = _ref,
32
- props = _objectWithoutProperties(_ref, _excluded);
33
+ } = mergedProps,
34
+ props = _objectWithoutProperties(mergedProps, _excluded);
33
35
  const TableCellComponent = useTableCellTag(as);
34
36
  // Depending on compact value
35
37
  const {
@@ -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, { memo, useMemo, useRef } from 'react';
10
10
  import { cx } from '../cx';
11
+ import { useComponentConfig } from '../hooks/useComponentConfig';
11
12
  import { useIsBrowser } from '../hooks/useIsBrowser';
12
13
  import { useTableSectionTag } from './hooks/useTable';
13
14
  import { useTableRowListener } from './hooks/useTableRowListener';
@@ -15,8 +16,9 @@ import { TableCell } from './TableCell';
15
16
  import { jsx as _jsx } from "react/jsx-runtime";
16
17
  const tableRowCss = "tableRowCss-t1cncu43";
17
18
  const tableRowHoverCss = "tableRowHoverCss-tg1utdg";
18
- export const TableRow = /*#__PURE__*/memo(_ref => {
19
- let {
19
+ export const TableRow = /*#__PURE__*/memo(_props => {
20
+ const mergedProps = useComponentConfig('TableRow', _props);
21
+ const {
20
22
  fullWidth,
21
23
  disableHoverIndicator,
22
24
  children,
@@ -26,8 +28,8 @@ export const TableRow = /*#__PURE__*/memo(_ref => {
26
28
  onClick,
27
29
  outerSpacing,
28
30
  innerSpacing
29
- } = _ref,
30
- props = _objectWithoutProperties(_ref, _excluded);
31
+ } = mergedProps,
32
+ props = _objectWithoutProperties(mergedProps, _excluded);
31
33
  const isBrowser = useIsBrowser();
32
34
  const tableSectionType = useTableSectionTag();
33
35
  const isCellInBody = tableSectionType === 'tbody';
@@ -10,6 +10,7 @@ import React, { forwardRef, memo, useCallback, useMemo } from 'react';
10
10
  import { useTabsContext } from '@coinbase/cds-common/tabs/TabsContext';
11
11
  import { m as motion } from 'framer-motion';
12
12
  import { cx } from '../cx';
13
+ import { useComponentConfig } from '../hooks/useComponentConfig';
13
14
  import { Box } from '../layout/Box';
14
15
  import { Pressable } from '../system/Pressable';
15
16
  import { Text } from '../typography/Text';
@@ -20,8 +21,9 @@ const insetFocusRingCss = "insetFocusRingCss-i13o7yik";
20
21
  const buttonCss = "buttonCss-bijg88k";
21
22
  const buttonDisabledCss = "buttonDisabledCss-b265t1b";
22
23
  const disabledCss = "disabledCss-d1cor7bl";
23
- const SegmentedTabComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
24
- let {
24
+ const SegmentedTabComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
25
+ const mergedProps = useComponentConfig('SegmentedTab', _props);
26
+ const {
25
27
  id,
26
28
  label,
27
29
  disabled: disabledProp,
@@ -37,8 +39,8 @@ const SegmentedTabComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, r
37
39
  lineHeight,
38
40
  textAlign,
39
41
  textTransform
40
- } = _ref,
41
- props = _objectWithoutProperties(_ref, _excluded);
42
+ } = mergedProps,
43
+ props = _objectWithoutProperties(mergedProps, _excluded);
42
44
  const {
43
45
  activeTab,
44
46
  updateActiveTab,
@@ -8,12 +8,14 @@ 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 { cx } from '../cx';
11
+ import { useComponentConfig } from '../hooks/useComponentConfig';
11
12
  import { SegmentedTab } from './SegmentedTab';
12
13
  import { SegmentedTabsActiveIndicator } from './SegmentedTabsActiveIndicator';
13
14
  import { Tabs } from './Tabs';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
- const SegmentedTabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
16
- let {
16
+ const SegmentedTabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
17
+ const mergedProps = useComponentConfig('SegmentedTabs', _props);
18
+ const {
17
19
  TabComponent = SegmentedTab,
18
20
  TabsActiveIndicatorComponent = SegmentedTabsActiveIndicator,
19
21
  activeBackground = 'bgInverse',
@@ -23,8 +25,8 @@ const SegmentedTabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref,
23
25
  classNames,
24
26
  style,
25
27
  styles
26
- } = _ref,
27
- props = _objectWithoutProperties(_ref, _excluded);
28
+ } = mergedProps,
29
+ props = _objectWithoutProperties(mergedProps, _excluded);
28
30
  return /*#__PURE__*/_jsx(Tabs, _objectSpread({
29
31
  ref: ref,
30
32
  TabComponent: TabComponent,
package/esm/tabs/Tabs.js CHANGED
@@ -19,6 +19,7 @@ import { accessibleOpacityDisabled } from '@coinbase/cds-common/tokens/interacta
19
19
  import { defaultRect } from '@coinbase/cds-common/types/Rect';
20
20
  import { m as motion } from 'framer-motion';
21
21
  import { cx } from '../cx';
22
+ import { useComponentConfig } from '../hooks/useComponentConfig';
22
23
  import { Box } from '../layout/Box';
23
24
  import { HStack } from '../layout/HStack';
24
25
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -41,8 +42,9 @@ export const tabsTransitionConfig = {
41
42
  damping: 10,
42
43
  velocity: 5
43
44
  };
44
- const TabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref2, ref) => {
45
- let {
45
+ const TabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
46
+ const mergedProps = useComponentConfig('Tabs', _props);
47
+ const {
46
48
  tabs,
47
49
  TabComponent,
48
50
  TabsActiveIndicatorComponent,
@@ -63,8 +65,8 @@ const TabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref2, ref) =>
63
65
  borderBottomLeftRadius,
64
66
  borderBottomRightRadius,
65
67
  style
66
- } = _ref2,
67
- props = _objectWithoutProperties(_ref2, _excluded2);
68
+ } = mergedProps,
69
+ props = _objectWithoutProperties(mergedProps, _excluded2);
68
70
  const api = useTabs({
69
71
  tabs,
70
72
  activeTab,
@@ -158,13 +160,13 @@ const TabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref2, ref) =>
158
160
  borderTopRightRadius: borderTopRightRadius,
159
161
  className: classNames === null || classNames === void 0 ? void 0 : classNames.activeIndicator,
160
162
  style: styles === null || styles === void 0 ? void 0 : styles.activeIndicator
161
- }), tabs.map(_ref3 => {
163
+ }), tabs.map(_ref2 => {
162
164
  let {
163
165
  id,
164
166
  Component: CustomTabComponent,
165
167
  disabled: tabDisabled
166
- } = _ref3,
167
- props = _objectWithoutProperties(_ref3, _excluded3);
168
+ } = _ref2,
169
+ props = _objectWithoutProperties(_ref2, _excluded3);
168
170
  const RenderedTab = CustomTabComponent !== null && CustomTabComponent !== void 0 ? CustomTabComponent : TabComponent;
169
171
  return /*#__PURE__*/_jsx(TabContainer, {
170
172
  id: id,
@@ -185,12 +187,12 @@ const TabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref2, ref) =>
185
187
  }));
186
188
  TabsComponent.displayName = 'Tabs';
187
189
  export const Tabs = TabsComponent;
188
- export const TabsActiveIndicator = _ref4 => {
190
+ export const TabsActiveIndicator = _ref3 => {
189
191
  let {
190
192
  activeTabRect,
191
193
  position = 'absolute'
192
- } = _ref4,
193
- props = _objectWithoutProperties(_ref4, _excluded4);
194
+ } = _ref3,
195
+ props = _objectWithoutProperties(_ref3, _excluded4);
194
196
  const {
195
197
  width,
196
198
  height,
package/esm/tag/Tag.js CHANGED
@@ -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, useMemo } from 'react';
10
10
  import { tagBorderRadiusMap, tagEmphasisColorMap, tagFontMap, tagHorizontalSpacing } from '@coinbase/cds-common/tokens/tags';
11
+ import { useComponentConfig } from '../hooks/useComponentConfig';
11
12
  import { useTheme } from '../hooks/useTheme';
12
13
  import { Icon } from '../icons/Icon';
13
14
  import { Box } from '../layout/Box';
@@ -15,8 +16,9 @@ import { Text } from '../typography/Text';
15
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
17
  const nodeCss = "nodeCss-n1hf567u";
17
18
  export const tagStaticClassName = 'cds-tag';
18
- export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Tag(_ref, forwardedRef) {
19
- let {
19
+ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedRef) => {
20
+ const mergedProps = useComponentConfig('Tag', _props);
21
+ const {
20
22
  children,
21
23
  intent = 'informational',
22
24
  emphasis = intent === 'informational' ? 'low' : 'high',
@@ -35,8 +37,8 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Tag(_ref,
35
37
  justifyContent = 'center',
36
38
  paddingY = 0.25,
37
39
  testID = tagStaticClassName
38
- } = _ref,
39
- props = _objectWithoutProperties(_ref, _excluded);
40
+ } = mergedProps,
41
+ props = _objectWithoutProperties(mergedProps, _excluded);
40
42
  const theme = useTheme();
41
43
  const {
42
44
  background,
package/esm/tour/Tour.js CHANGED
@@ -9,6 +9,7 @@ import { TourContext } from '@coinbase/cds-common/tour/TourContext';
9
9
  import { useTour } from '@coinbase/cds-common/tour/useTour';
10
10
  import { arrow as arrowMiddleware, autoPlacement, autoUpdate, offset, shift, useFloating } from '@floating-ui/react-dom';
11
11
  import { animated, config as springConfig, useSpring } from '@react-spring/web';
12
+ import { useComponentConfig } from '../hooks/useComponentConfig';
12
13
  import { useScrollBlocker } from '../hooks/useScrollBlocker';
13
14
  import { FocusTrap } from '../overlays/FocusTrap';
14
15
  import { Portal } from '../overlays/Portal';
@@ -70,9 +71,10 @@ const scrollIntoView = async (element, scrollOptions) => {
70
71
  };
71
72
  const defaultTourStepOffset = 24;
72
73
  const defaultTourStepShiftPadding = 32;
73
- const TourComponent = _ref => {
74
+ const TourComponent = _props => {
74
75
  var _activeTourStep$Arrow, _activeTourStep$hideO, _activeTourStep$tourM, _activeTourStep$tourM2;
75
- let {
76
+ const mergedProps = useComponentConfig('Tour', _props);
77
+ const {
76
78
  steps,
77
79
  activeTourStep,
78
80
  onChange,
@@ -92,7 +94,7 @@ const TourComponent = _ref => {
92
94
  accessibilityLabelledBy,
93
95
  id,
94
96
  testID
95
- } = _ref;
97
+ } = mergedProps;
96
98
  const tourStepArrowRef = useRef(null);
97
99
  const RenderedTourStep = activeTourStep === null || activeTourStep === void 0 ? void 0 : activeTourStep.Component;
98
100
  const RenderedTourStepArrow = (_activeTourStep$Arrow = activeTourStep === null || activeTourStep === void 0 ? void 0 : activeTourStep.ArrowComponent) !== null && _activeTourStep$Arrow !== void 0 ? _activeTourStep$Arrow : TourStepArrowComponent;
@@ -9,13 +9,15 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
9
9
  import React, { forwardRef, memo, useRef } from 'react';
10
10
  import { useMergeRefs } from '@coinbase/cds-common/hooks/useMergeRefs';
11
11
  import { cx } from '../cx';
12
+ import { useComponentConfig } from '../hooks/useComponentConfig';
12
13
  import { Pressable } from '../system/Pressable';
13
14
  import { Text } from './Text';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  export const linkDefaultElement = 'a';
16
17
  const baseCss = "baseCss-b678mx9";
17
- export const Link = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
18
- let {
18
+ export const Link = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
19
+ const mergedProps = useComponentConfig('Link', _props);
20
+ const {
19
21
  // Text props
20
22
  children,
21
23
  color = 'fgPrimary',
@@ -31,8 +33,8 @@ export const Link = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
31
33
  padding = 0,
32
34
  noScaleOnPress = true,
33
35
  openInNewWindow = false
34
- } = _ref,
35
- props = _objectWithoutProperties(_ref, _excluded);
36
+ } = mergedProps,
37
+ props = _objectWithoutProperties(mergedProps, _excluded);
36
38
  const Component = as !== null && as !== void 0 ? as : linkDefaultElement;
37
39
  const isAnchor = Component === 'a';
38
40
  const linkRef = useRef(null);
@@ -0,0 +1,39 @@
1
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
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
+ /**
7
+ * The result of merging two sets of props
8
+ */
9
+
10
+ /**
11
+ * Merges two sets of component props where source overrides target.
12
+ *
13
+ * This merge is shallow by design and applies to any BaseProps keys, not only
14
+ * style-like props. This allows component config defaults such as `compact`,
15
+ * `variant`, `height`, and `font` to flow through alongside style props.
16
+ *
17
+ * @param target - Base set of props (e.g., from component config defaults)
18
+ * @param source - Overriding set of props (e.g., from local component props)
19
+ * @returns Merged props with source values taking precedence
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * const merged = mergeComponentProps(
24
+ * { compact: false, variant: 'secondary', height: 32, font: 'headline' },
25
+ * { compact: true, variant: 'primary' }
26
+ * );
27
+ * // Result: {
28
+ * // compact: true, // local override
29
+ * // variant: 'primary', // local override
30
+ * // height: 32, // preserved from defaults
31
+ * // font: 'headline' // preserved from defaults
32
+ * // }
33
+ * ```
34
+ */
35
+ export function mergeComponentProps(target, source) {
36
+ if (!target) return source;
37
+ if (!source) return target;
38
+ return _objectSpread(_objectSpread({}, target), source);
39
+ }
@@ -8,14 +8,16 @@ import { animateProgressBaseSpec } from '@coinbase/cds-common/animation/progress
8
8
  import { getProgressSize } from '@coinbase/cds-common/visualizations/getProgressSize';
9
9
  import { m as motion } from 'framer-motion';
10
10
  import { cx } from '../cx';
11
+ import { useComponentConfig } from '../hooks/useComponentConfig';
11
12
  import { Box, HStack } from '../layout';
12
13
  import { useMotionProps } from '../motion/useMotionProps';
13
14
  import { isRtl } from '../utils/isRtl';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  const MotionBox = motion(Box);
16
17
  const boxCss = "boxCss-bnvjmt8";
17
- export const ProgressBar = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forwardedRef) => {
18
- let {
18
+ export const ProgressBar = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedRef) => {
19
+ const mergedProps = useComponentConfig('ProgressBar', _props);
20
+ const {
19
21
  weight = 'normal',
20
22
  progress = 0,
21
23
  color = 'bgPrimary',
@@ -29,7 +31,7 @@ export const ProgressBar = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forw
29
31
  classNames,
30
32
  onAnimationEnd,
31
33
  onAnimationStart
32
- } = _ref;
34
+ } = mergedProps;
33
35
  const height = getProgressSize(weight);
34
36
 
35
37
  // start position of the progress bar on mount
@@ -5,6 +5,7 @@ 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, { memo } from 'react';
7
7
  import { cx } from '../cx';
8
+ import { useComponentConfig } from '../hooks/useComponentConfig';
8
9
  import { Box } from '../layout/Box';
9
10
  import { VStack } from '../layout/VStack';
10
11
  import { isRtl } from '../utils/isRtl';
@@ -106,8 +107,9 @@ const ProgressBarFixedLabelContainer = /*#__PURE__*/memo(_ref3 => {
106
107
  children: nodes
107
108
  });
108
109
  });
109
- export const ProgressBarWithFixedLabels = /*#__PURE__*/memo(_ref4 => {
110
- let {
110
+ export const ProgressBarWithFixedLabels = /*#__PURE__*/memo(_props => {
111
+ const mergedProps = useComponentConfig('ProgressBarWithFixedLabels', _props);
112
+ const {
111
113
  startLabel,
112
114
  endLabel,
113
115
  labelPlacement = 'beside',
@@ -119,7 +121,7 @@ export const ProgressBarWithFixedLabels = /*#__PURE__*/memo(_ref4 => {
119
121
  className,
120
122
  styles,
121
123
  classNames
122
- } = _ref4;
124
+ } = mergedProps;
123
125
  const startLabelEl = typeof startLabel !== 'undefined' && /*#__PURE__*/_jsx(Box, {
124
126
  flexGrow: 0,
125
127
  flexShrink: 0,
@@ -8,6 +8,7 @@ import { animateProgressBaseSpec } from '@coinbase/cds-common/animation/progress
8
8
  import { isStorybook } from '@coinbase/cds-utils';
9
9
  import { m as motion } from 'framer-motion';
10
10
  import { cx } from '../cx';
11
+ import { useComponentConfig } from '../hooks/useComponentConfig';
11
12
  import { useDimensions } from '../hooks/useDimensions';
12
13
  import { Box } from '../layout/Box';
13
14
  import { VStack } from '../layout/VStack';
@@ -96,8 +97,9 @@ const ProgressBarFloatLabel = /*#__PURE__*/memo(_ref => {
96
97
  })
97
98
  });
98
99
  });
99
- export const ProgressBarWithFloatLabel = /*#__PURE__*/memo(_ref2 => {
100
- let {
100
+ export const ProgressBarWithFloatLabel = /*#__PURE__*/memo(_props => {
101
+ const mergedProps = useComponentConfig('ProgressBarWithFloatLabel', _props);
102
+ const {
101
103
  label,
102
104
  labelPlacement = 'above',
103
105
  progress,
@@ -109,7 +111,7 @@ export const ProgressBarWithFloatLabel = /*#__PURE__*/memo(_ref2 => {
109
111
  className,
110
112
  styles,
111
113
  classNames
112
- } = _ref2;
114
+ } = mergedProps;
113
115
  const skipLabel = isStorybook();
114
116
  const progressBarFloatLabel = !skipLabel && /*#__PURE__*/_jsx(ProgressBarFloatLabel, {
115
117
  classNames: classNames,