@coinbase/cds-mobile 8.61.0 → 8.62.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 (236) hide show
  1. package/CHANGELOG.md +6 -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 +6 -3
  10. package/dts/buttons/AvatarButton.d.ts.map +1 -1
  11. package/dts/buttons/Button.d.ts.map +1 -1
  12. package/dts/buttons/ButtonGroup.d.ts +3 -1
  13. package/dts/buttons/ButtonGroup.d.ts.map +1 -1
  14. package/dts/buttons/IconButton.d.ts.map +1 -1
  15. package/dts/buttons/IconCounterButton.d.ts.map +1 -1
  16. package/dts/buttons/SlideButton.d.ts.map +1 -1
  17. package/dts/cards/LikeButton.d.ts.map +1 -1
  18. package/dts/carousel/Carousel.d.ts.map +1 -1
  19. package/dts/cells/Cell.d.ts.map +1 -1
  20. package/dts/cells/ListCell.d.ts.map +1 -1
  21. package/dts/cells/ListCellFallback.d.ts.map +1 -1
  22. package/dts/chips/Chip.d.ts.map +1 -1
  23. package/dts/chips/ChipProps.d.ts +10 -8
  24. package/dts/chips/ChipProps.d.ts.map +1 -1
  25. package/dts/chips/InputChip.d.ts.map +1 -1
  26. package/dts/chips/MediaChip.d.ts +3 -2
  27. package/dts/chips/MediaChip.d.ts.map +1 -1
  28. package/dts/chips/TabbedChips.d.ts.map +1 -1
  29. package/dts/coachmark/Coachmark.d.ts.map +1 -1
  30. package/dts/collapsible/Collapsible.d.ts.map +1 -1
  31. package/dts/controls/Checkbox.d.ts.map +1 -1
  32. package/dts/controls/CheckboxCell.d.ts.map +1 -1
  33. package/dts/controls/Control.d.ts.map +1 -1
  34. package/dts/controls/ControlGroup.d.ts +13 -4
  35. package/dts/controls/ControlGroup.d.ts.map +1 -1
  36. package/dts/controls/InputStack.d.ts.map +1 -1
  37. package/dts/controls/Radio.d.ts.map +1 -1
  38. package/dts/controls/RadioCell.d.ts.map +1 -1
  39. package/dts/controls/SearchInput.d.ts.map +1 -1
  40. package/dts/controls/SelectOption.d.ts +3 -1
  41. package/dts/controls/SelectOption.d.ts.map +1 -1
  42. package/dts/controls/Switch.d.ts.map +1 -1
  43. package/dts/controls/TextInput.d.ts.map +1 -1
  44. package/dts/core/componentConfig.d.ts +166 -0
  45. package/dts/core/componentConfig.d.ts.map +1 -0
  46. package/dts/dates/Calendar.d.ts.map +1 -1
  47. package/dts/dates/DateInput.d.ts.map +1 -1
  48. package/dts/dates/DatePicker.d.ts.map +1 -1
  49. package/dts/dots/DotCount.d.ts +1 -11
  50. package/dts/dots/DotCount.d.ts.map +1 -1
  51. package/dts/dots/DotStatusColor.d.ts +1 -8
  52. package/dts/dots/DotStatusColor.d.ts.map +1 -1
  53. package/dts/dots/DotSymbol.d.ts +1 -17
  54. package/dts/dots/DotSymbol.d.ts.map +1 -1
  55. package/dts/hooks/useComponentConfig.d.ts +22 -0
  56. package/dts/hooks/useComponentConfig.d.ts.map +1 -0
  57. package/dts/icons/Icon.d.ts +11 -1
  58. package/dts/icons/Icon.d.ts.map +1 -1
  59. package/dts/index.d.ts +2 -0
  60. package/dts/index.d.ts.map +1 -1
  61. package/dts/layout/Divider.d.ts +3 -1
  62. package/dts/layout/Divider.d.ts.map +1 -1
  63. package/dts/layout/Fallback.d.ts +3 -1
  64. package/dts/layout/Fallback.d.ts.map +1 -1
  65. package/dts/media/Avatar.d.ts +1 -14
  66. package/dts/media/Avatar.d.ts.map +1 -1
  67. package/dts/media/RemoteImage.d.ts.map +1 -1
  68. package/dts/media/RemoteImageGroup.d.ts +3 -10
  69. package/dts/media/RemoteImageGroup.d.ts.map +1 -1
  70. package/dts/navigation/BrowserBar.d.ts +5 -14
  71. package/dts/navigation/BrowserBar.d.ts.map +1 -1
  72. package/dts/navigation/NavigationTitle.d.ts +4 -7
  73. package/dts/navigation/NavigationTitle.d.ts.map +1 -1
  74. package/dts/navigation/NavigationTitleSelect.d.ts +5 -11
  75. package/dts/navigation/NavigationTitleSelect.d.ts.map +1 -1
  76. package/dts/navigation/TopNavBar.d.ts +3 -13
  77. package/dts/navigation/TopNavBar.d.ts.map +1 -1
  78. package/dts/numbers/RollingNumber/RollingNumber.d.ts.map +1 -1
  79. package/dts/numpad/Numpad.d.ts +41 -38
  80. package/dts/numpad/Numpad.d.ts.map +1 -1
  81. package/dts/overlays/Alert.d.ts.map +1 -1
  82. package/dts/overlays/Toast.d.ts.map +1 -1
  83. package/dts/overlays/drawer/Drawer.d.ts.map +1 -1
  84. package/dts/overlays/modal/Modal.d.ts.map +1 -1
  85. package/dts/overlays/modal/ModalBody.d.ts.map +1 -1
  86. package/dts/overlays/modal/ModalFooter.d.ts +3 -8
  87. package/dts/overlays/modal/ModalFooter.d.ts.map +1 -1
  88. package/dts/overlays/modal/ModalHeader.d.ts.map +1 -1
  89. package/dts/overlays/overlay/Overlay.d.ts +7 -3
  90. package/dts/overlays/overlay/Overlay.d.ts.map +1 -1
  91. package/dts/overlays/tooltip/Tooltip.d.ts +2 -20
  92. package/dts/overlays/tooltip/Tooltip.d.ts.map +1 -1
  93. package/dts/overlays/tray/Tray.d.ts.map +1 -1
  94. package/dts/page/PageFooter.d.ts.map +1 -1
  95. package/dts/page/PageHeader.d.ts.map +1 -1
  96. package/dts/perf/component-config/Button.component-config.perf-test.d.ts +2 -0
  97. package/dts/perf/component-config/Button.component-config.perf-test.d.ts.map +1 -0
  98. package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts +2 -0
  99. package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts.map +1 -0
  100. package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts +2 -0
  101. package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts.map +1 -0
  102. package/dts/stepper/Stepper.d.ts.map +1 -1
  103. package/dts/system/ComponentConfigProvider.d.ts +26 -0
  104. package/dts/system/ComponentConfigProvider.d.ts.map +1 -0
  105. package/dts/system/index.d.ts +1 -0
  106. package/dts/system/index.d.ts.map +1 -1
  107. package/dts/tabs/SegmentedTab.d.ts +6 -3
  108. package/dts/tabs/SegmentedTab.d.ts.map +1 -1
  109. package/dts/tabs/SegmentedTabs.d.ts +6 -3
  110. package/dts/tabs/SegmentedTabs.d.ts.map +1 -1
  111. package/dts/tabs/Tabs.d.ts +25 -24
  112. package/dts/tabs/Tabs.d.ts.map +1 -1
  113. package/dts/tag/Tag.d.ts.map +1 -1
  114. package/dts/tour/Tour.d.ts +42 -41
  115. package/dts/tour/Tour.d.ts.map +1 -1
  116. package/dts/typography/Link.d.ts +1 -14
  117. package/dts/typography/Link.d.ts.map +1 -1
  118. package/dts/utils/mergeComponentProps.d.ts +34 -0
  119. package/dts/utils/mergeComponentProps.d.ts.map +1 -0
  120. package/dts/visualizations/ProgressBar.d.ts.map +1 -1
  121. package/dts/visualizations/ProgressBarWithFixedLabels.d.ts +5 -3
  122. package/dts/visualizations/ProgressBarWithFixedLabels.d.ts.map +1 -1
  123. package/dts/visualizations/ProgressBarWithFloatLabel.d.ts +3 -1
  124. package/dts/visualizations/ProgressBarWithFloatLabel.d.ts.map +1 -1
  125. package/dts/visualizations/ProgressCircle.d.ts.map +1 -1
  126. package/esm/accordion/Accordion.js +5 -3
  127. package/esm/alpha/combobox/Combobox.js +8 -6
  128. package/esm/alpha/select/Select.js +6 -4
  129. package/esm/alpha/select-chip/SelectChip.js +6 -4
  130. package/esm/alpha/tabbed-chips/TabbedChips.js +6 -4
  131. package/esm/banner/Banner.js +6 -4
  132. package/esm/buttons/AvatarButton.js +6 -4
  133. package/esm/buttons/Button.js +6 -4
  134. package/esm/buttons/ButtonGroup.js +5 -3
  135. package/esm/buttons/IconButton.js +6 -4
  136. package/esm/buttons/IconCounterButton.js +6 -4
  137. package/esm/buttons/SlideButton.js +10 -8
  138. package/esm/cards/LikeButton.js +6 -4
  139. package/esm/carousel/Carousel.js +10 -8
  140. package/esm/cells/Cell.js +6 -4
  141. package/esm/cells/ListCell.js +6 -4
  142. package/esm/cells/ListCellFallback.js +6 -4
  143. package/esm/chips/Chip.js +6 -4
  144. package/esm/chips/InputChip.js +6 -4
  145. package/esm/chips/MediaChip.js +6 -4
  146. package/esm/chips/TabbedChips.js +6 -4
  147. package/esm/coachmark/Coachmark.js +6 -4
  148. package/esm/collapsible/Collapsible.js +10 -8
  149. package/esm/controls/Checkbox.js +6 -4
  150. package/esm/controls/CheckboxCell.js +6 -4
  151. package/esm/controls/Control.js +8 -6
  152. package/esm/controls/ControlGroup.js +6 -4
  153. package/esm/controls/InputStack.js +6 -4
  154. package/esm/controls/Radio.js +6 -4
  155. package/esm/controls/RadioCell.js +6 -4
  156. package/esm/controls/SearchInput.js +6 -4
  157. package/esm/controls/SelectOption.js +6 -4
  158. package/esm/controls/Switch.js +6 -4
  159. package/esm/controls/TextInput.js +6 -4
  160. package/esm/core/componentConfig.js +1 -0
  161. package/esm/dates/Calendar.js +8 -6
  162. package/esm/dates/DateInput.js +6 -4
  163. package/esm/dates/DatePicker.js +9 -6
  164. package/esm/dots/DotCount.js +6 -4
  165. package/esm/dots/DotStatusColor.js +6 -4
  166. package/esm/dots/DotSymbol.js +6 -4
  167. package/esm/hooks/useComponentConfig.js +27 -0
  168. package/esm/icons/Icon.js +10 -8
  169. package/esm/index.js +2 -0
  170. package/esm/layout/Divider.js +6 -4
  171. package/esm/layout/Fallback.js +6 -4
  172. package/esm/media/Avatar.js +6 -4
  173. package/esm/media/RemoteImage.js +6 -4
  174. package/esm/media/RemoteImageGroup.js +6 -4
  175. package/esm/navigation/BrowserBar.js +6 -4
  176. package/esm/navigation/NavigationTitle.js +6 -4
  177. package/esm/navigation/NavigationTitleSelect.js +8 -6
  178. package/esm/navigation/TopNavBar.js +5 -3
  179. package/esm/numbers/RollingNumber/RollingNumber.js +6 -4
  180. package/esm/numpad/Numpad.js +8 -6
  181. package/esm/overlays/Alert.js +7 -5
  182. package/esm/overlays/Toast.js +10 -8
  183. package/esm/overlays/drawer/Drawer.js +12 -10
  184. package/esm/overlays/modal/Modal.js +4 -1
  185. package/esm/overlays/modal/ModalBody.js +8 -6
  186. package/esm/overlays/modal/ModalFooter.js +8 -6
  187. package/esm/overlays/modal/ModalHeader.js +6 -4
  188. package/esm/overlays/overlay/Overlay.js +6 -4
  189. package/esm/overlays/tooltip/Tooltip.js +5 -3
  190. package/esm/overlays/tray/Tray.js +13 -11
  191. package/esm/page/PageFooter.js +6 -4
  192. package/esm/page/PageHeader.js +6 -4
  193. package/esm/perf/component-config/Button.component-config.perf-test.js +35 -0
  194. package/esm/perf/component-config/ComponentConfigProvider.perf-test.js +147 -0
  195. package/esm/perf/component-config/ComponentConfigStickerSheet.perf-test.js +326 -0
  196. package/esm/perf/component-config/README.md +8 -0
  197. package/esm/stepper/Stepper.js +11 -9
  198. package/esm/system/ComponentConfigProvider.js +39 -0
  199. package/esm/system/__stories__/ComponentConfigProvider.stories.js +12 -0
  200. package/esm/system/__stories__/ComponentConfigProviderCustom.stories.js +22 -0
  201. package/esm/system/__stories__/componentConfigStickerSheet/Container.js +27 -0
  202. package/esm/system/__stories__/componentConfigStickerSheet/StickerSheet.js +94 -0
  203. package/esm/system/__stories__/componentConfigStickerSheet/customComponentConfig.js +116 -0
  204. package/esm/system/__stories__/componentConfigStickerSheet/customTheme.js +520 -0
  205. package/esm/system/__stories__/componentConfigStickerSheet/examples/Accordion.js +67 -0
  206. package/esm/system/__stories__/componentConfigStickerSheet/examples/Avatar.js +48 -0
  207. package/esm/system/__stories__/componentConfigStickerSheet/examples/Banner.js +43 -0
  208. package/esm/system/__stories__/componentConfigStickerSheet/examples/Button.js +77 -0
  209. package/esm/system/__stories__/componentConfigStickerSheet/examples/Coachmark.js +15 -0
  210. package/esm/system/__stories__/componentConfigStickerSheet/examples/Controls.js +29 -0
  211. package/esm/system/__stories__/componentConfigStickerSheet/examples/DatePicker.js +15 -0
  212. package/esm/system/__stories__/componentConfigStickerSheet/examples/DotCount.js +28 -0
  213. package/esm/system/__stories__/componentConfigStickerSheet/examples/Icon.js +57 -0
  214. package/esm/system/__stories__/componentConfigStickerSheet/examples/InputChip.js +17 -0
  215. package/esm/system/__stories__/componentConfigStickerSheet/examples/ListCell.js +48 -0
  216. package/esm/system/__stories__/componentConfigStickerSheet/examples/Search.js +20 -0
  217. package/esm/system/__stories__/componentConfigStickerSheet/examples/SegmentedTabs.js +12 -0
  218. package/esm/system/__stories__/componentConfigStickerSheet/examples/Select.js +24 -0
  219. package/esm/system/__stories__/componentConfigStickerSheet/examples/SelectChip.js +22 -0
  220. package/esm/system/__stories__/componentConfigStickerSheet/examples/Tag.js +35 -0
  221. package/esm/system/__stories__/componentConfigStickerSheet/examples/TextInput.js +46 -0
  222. package/esm/system/__stories__/componentConfigStickerSheet/examples/constants.js +33 -0
  223. package/esm/system/__stories__/componentConfigStickerSheet/themeVars.js +2 -0
  224. package/esm/system/index.js +1 -0
  225. package/esm/tabs/SegmentedTab.js +7 -5
  226. package/esm/tabs/SegmentedTabs.js +9 -4
  227. package/esm/tabs/Tabs.js +12 -10
  228. package/esm/tag/Tag.js +6 -4
  229. package/esm/tour/Tour.js +5 -3
  230. package/esm/typography/Link.js +6 -4
  231. package/esm/utils/mergeComponentProps.js +35 -0
  232. package/esm/visualizations/ProgressBar.js +7 -5
  233. package/esm/visualizations/ProgressBarWithFixedLabels.js +5 -3
  234. package/esm/visualizations/ProgressBarWithFloatLabel.js +5 -3
  235. package/esm/visualizations/ProgressCircle.js +7 -5
  236. package/package.json +4 -3
@@ -5,14 +5,16 @@ import { forwardRef, memo, useCallback, useMemo } from 'react';
5
5
  import { transparentVariants, variants } from '@coinbase/cds-common/tokens/button';
6
6
  import { interactableHeight } from '@coinbase/cds-common/tokens/interactableHeight';
7
7
  import { getButtonSpacingProps } from '@coinbase/cds-common/utils/getButtonSpacingProps';
8
+ import { useComponentConfig } from '../hooks/useComponentConfig';
8
9
  import { useTheme } from '../hooks/useTheme';
9
10
  import { Icon } from '../icons/Icon';
10
11
  import { Box } from '../layout/Box';
11
12
  import { Pressable } from '../system/Pressable';
12
13
  import { ProgressCircle } from '../visualizations/ProgressCircle';
13
14
  import { jsx as _jsx } from "react/jsx-runtime";
14
- export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function IconButton(_ref, ref) {
15
- let {
15
+ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
16
+ const mergedProps = useComponentConfig('IconButton', _props);
17
+ const {
16
18
  name,
17
19
  active,
18
20
  variant = 'secondary',
@@ -33,8 +35,8 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Ico
33
35
  style,
34
36
  accessibilityHint,
35
37
  accessibilityLabel
36
- } = _ref,
37
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
38
+ } = mergedProps,
39
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
38
40
  const theme = useTheme();
39
41
  const iconSizeValue = theme.iconSize[iconSize];
40
42
  const variantMap = transparent ? transparentVariants : variants;
@@ -3,13 +3,15 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  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; }
4
4
  import React, { forwardRef, memo } from 'react';
5
5
  import { formatCount } from '@coinbase/cds-common/utils/formatCount';
6
+ import { useComponentConfig } from '../hooks/useComponentConfig';
6
7
  import { Icon } from '../icons';
7
8
  import { HStack } from '../layout';
8
9
  import { Pressable } from '../system';
9
10
  import { Text } from '../typography/Text';
10
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
- export const IconCounterButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function IconCounterButton(_ref, ref) {
12
- let {
12
+ export const IconCounterButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function IconCounterButton(_props, ref) {
13
+ const mergedProps = useComponentConfig('IconCounterButton', _props);
14
+ const {
13
15
  icon,
14
16
  iconSize = 's',
15
17
  size = iconSize,
@@ -17,8 +19,8 @@ export const IconCounterButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(funct
17
19
  count = 0,
18
20
  color = 'fg',
19
21
  dangerouslySetColor
20
- } = _ref,
21
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
22
+ } = mergedProps,
23
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
22
24
  return /*#__PURE__*/_jsx(Pressable, _extends({
23
25
  ref: ref,
24
26
  background: "transparent"
@@ -6,13 +6,15 @@ import { View } from 'react-native';
6
6
  import { Gesture, GestureDetector } from 'react-native-gesture-handler';
7
7
  import { interactableHeight } from '@coinbase/cds-common/tokens/interactableHeight';
8
8
  import { animated, to, useSpring } from '@react-spring/native';
9
+ import { useComponentConfig } from '../hooks/useComponentConfig';
9
10
  import { useLayout } from '../hooks/useLayout';
10
11
  import { DefaultSlideButtonBackground } from './DefaultSlideButtonBackground';
11
12
  import { animationConfig, DefaultSlideButtonHandle } from './DefaultSlideButtonHandle';
12
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
14
  export const slideButtonTestID = 'slide-button';
14
- export const SlideButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
15
- let {
15
+ export const SlideButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
16
+ const mergedProps = useComponentConfig('SlideButton', _props);
17
+ const {
16
18
  checked,
17
19
  compact,
18
20
  borderRadius = compact ? 700 : 900,
@@ -38,8 +40,8 @@ export const SlideButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref)
38
40
  variant = 'primary',
39
41
  startUncheckedNode,
40
42
  endCheckedNode
41
- } = _ref,
42
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
43
+ } = mergedProps,
44
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
43
45
  const labelId = useId();
44
46
  const [containerSize, onLayout] = useLayout();
45
47
  const {
@@ -68,10 +70,10 @@ export const SlideButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref)
68
70
  const panGesture = useMemo(() => Gesture.Pan().onStart(() => {
69
71
  if (checked || disabled) return;
70
72
  onSlideStart == null || onSlideStart();
71
- }).onUpdate(_ref2 => {
73
+ }).onUpdate(_ref => {
72
74
  let {
73
75
  translationX
74
- } = _ref2;
76
+ } = _ref;
75
77
  if (checked || disabled) return;
76
78
  const newWidth = (buttonMinWidth + translationX) / containerSize.width;
77
79
  const thresholdReached = newWidth >= checkThreshold;
@@ -81,10 +83,10 @@ export const SlideButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref)
81
83
  }
82
84
  const progressValue = autoCompleteSlideOnThresholdMet ? newWidth : Math.min(1, newWidth);
83
85
  void progress.set(progressValue);
84
- }).onEnd(_ref3 => {
86
+ }).onEnd(_ref2 => {
85
87
  let {
86
88
  translationX
87
- } = _ref3;
89
+ } = _ref2;
88
90
  if (checked || disabled) return;
89
91
  const newWidth = (buttonMinWidth + translationX) / containerSize.width;
90
92
  if (newWidth >= checkThreshold) {
@@ -7,6 +7,7 @@ import { activeScale, inactiveScale, scaleInConfig, scaleOutConfig } from '@coin
7
7
  import { interactableHeight } from '@coinbase/cds-common/tokens/interactableHeight';
8
8
  import { getButtonSpacingProps } from '@coinbase/cds-common/utils/getButtonSpacingProps';
9
9
  import { convertMotionConfig } from '../animation/convertMotionConfig';
10
+ import { useComponentConfig } from '../hooks/useComponentConfig';
10
11
  import { TextIcon } from '../icons/TextIcon';
11
12
  import { HStack } from '../layout/HStack';
12
13
  import { Pressable } from '../system/Pressable';
@@ -14,8 +15,9 @@ import { Text } from '../typography/Text';
14
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
16
  const scaleIn = convertMotionConfig(scaleInConfig);
16
17
  const scaleOut = convertMotionConfig(scaleOutConfig);
17
- export const LikeButton = /*#__PURE__*/memo(function LikeButton(_ref) {
18
- let {
18
+ export const LikeButton = /*#__PURE__*/memo(function LikeButton(_props) {
19
+ const mergedProps = useComponentConfig('LikeButton', _props);
20
+ const {
19
21
  count = 0,
20
22
  compact = true,
21
23
  flush,
@@ -24,8 +26,8 @@ export const LikeButton = /*#__PURE__*/memo(function LikeButton(_ref) {
24
26
  accessibilityHint,
25
27
  accessibilityLabel = 'Like',
26
28
  borderRadius = compact ? 700 : 900
27
- } = _ref,
28
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
29
+ } = mergedProps,
30
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
29
31
  const iconScale = useRef(new Animated.Value(1));
30
32
  const iconSize = compact ? 's' : 'm';
31
33
  const size = interactableHeight[compact ? 'compact' : 'regular'];
@@ -6,6 +6,7 @@ import { View } from 'react-native';
6
6
  import { Gesture, GestureDetector } from 'react-native-gesture-handler';
7
7
  import { useCarouselAutoplay } from '@coinbase/cds-common/carousel/useCarouselAutoplay';
8
8
  import { animated, useSpring } from '@react-spring/native';
9
+ import { useComponentConfig } from '../hooks/useComponentConfig';
9
10
  import { useLayout } from '../hooks/useLayout';
10
11
  import { HStack } from '../layout/HStack';
11
12
  import { VStack } from '../layout/VStack';
@@ -254,8 +255,9 @@ const animationConfig = {
254
255
  stiffness: 900,
255
256
  damping: 120
256
257
  };
257
- export const Carousel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref4, ref) => {
258
- let {
258
+ export const Carousel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
259
+ const mergedProps = useComponentConfig('Carousel', _props);
260
+ const {
259
261
  children,
260
262
  title,
261
263
  hideNavigation,
@@ -278,8 +280,8 @@ export const Carousel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref4, ref) =
278
280
  autoplay,
279
281
  autoplayInterval = 3000,
280
282
  paginationVariant
281
- } = _ref4,
282
- props = _objectWithoutPropertiesLoose(_ref4, _excluded);
283
+ } = mergedProps,
284
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
283
285
  const carouselScrollX = useRef(0);
284
286
  const animationApi = useSpring({
285
287
  x: carouselScrollX.current,
@@ -498,10 +500,10 @@ export const Carousel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref4, ref) =
498
500
  .failOffsetY([-10, 10]).onStart(() => {
499
501
  if (!isDragEnabled) return;
500
502
  handleDragStart();
501
- }).onUpdate(_ref5 => {
503
+ }).onUpdate(_ref4 => {
502
504
  let {
503
505
  translationX
504
- } = _ref5;
506
+ } = _ref4;
505
507
  if (!isDragEnabled) return;
506
508
  let newOffset;
507
509
  if (shouldLoop) {
@@ -510,11 +512,11 @@ export const Carousel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref4, ref) =
510
512
  newOffset = clampWithElasticResistance(carouselScrollX.current - translationX, maxScrollOffset);
511
513
  }
512
514
  animationApi.x.set(newOffset);
513
- }).onEnd(_ref6 => {
515
+ }).onEnd(_ref5 => {
514
516
  let {
515
517
  translationX,
516
518
  velocityX
517
- } = _ref6;
519
+ } = _ref5;
518
520
  if (!isDragEnabled) return;
519
521
  let projectedOffset;
520
522
  if (shouldLoop) {
package/esm/cells/Cell.js CHANGED
@@ -6,14 +6,16 @@ import React, { memo, useMemo } from 'react';
6
6
  import { StyleSheet } from 'react-native';
7
7
  import { hasCellPriority } from '@coinbase/cds-common/utils/cell';
8
8
  import { useCellSpacing } from '../hooks/useCellSpacing';
9
+ import { useComponentConfig } from '../hooks/useComponentConfig';
9
10
  import { useTheme } from '../hooks/useTheme';
10
11
  import { Box } from '../layout/Box';
11
12
  import { HStack } from '../layout/HStack';
12
13
  import { VStack } from '../layout/VStack';
13
14
  import { Pressable } from '../system/Pressable';
14
15
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
15
- export const Cell = /*#__PURE__*/memo(function Cell(_ref) {
16
- let {
16
+ export const Cell = /*#__PURE__*/memo(function Cell(_props) {
17
+ const mergedProps = useComponentConfig('Cell', _props);
18
+ const {
17
19
  accessory,
18
20
  accessoryNode,
19
21
  alignItems = 'center',
@@ -46,8 +48,8 @@ export const Cell = /*#__PURE__*/memo(function Cell(_ref) {
46
48
  style,
47
49
  background = 'bgAlternate',
48
50
  blendStyles
49
- } = _ref,
50
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
51
+ } = mergedProps,
52
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
51
53
  const theme = useTheme();
52
54
  const {
53
55
  inner: innerSpacing,
@@ -3,6 +3,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  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; }
4
4
  import React, { memo, useMemo } from 'react';
5
5
  import { compactListHeight, listHeight } from '@coinbase/cds-common/tokens/cell';
6
+ import { useComponentConfig } from '../hooks/useComponentConfig';
6
7
  import { VStack } from '../layout/VStack';
7
8
  import { Text } from '../typography/Text';
8
9
  import { Cell } from './Cell';
@@ -21,9 +22,10 @@ export const condensedOuterSpacing = {
21
22
  paddingY: 0,
22
23
  marginX: 0
23
24
  };
24
- export const ListCell = /*#__PURE__*/memo(function ListCell(_ref) {
25
+ export const ListCell = /*#__PURE__*/memo(function ListCell(_props) {
25
26
  var _props$borderRadius;
26
- let {
27
+ const mergedProps = useComponentConfig('ListCell', _props);
28
+ const {
27
29
  accessory,
28
30
  accessoryNode,
29
31
  end: endProp,
@@ -56,8 +58,8 @@ export const ListCell = /*#__PURE__*/memo(function ListCell(_ref) {
56
58
  spacingVariant = compact ? 'compact' : 'normal',
57
59
  style,
58
60
  styles
59
- } = _ref,
60
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
61
+ } = mergedProps,
62
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
61
63
  const minHeight = spacingVariant === 'compact' ? compactListHeight : spacingVariant === 'normal' ? listHeight : undefined;
62
64
  const accessoryType = selected && !disableSelectionAccessory ? 'selected' : accessory;
63
65
  const hasDetails = Boolean(detail || subdetail || detailNode || subdetailNode);
@@ -4,6 +4,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
4
4
  import { memo, useMemo } from 'react';
5
5
  import { StyleSheet, Text } from 'react-native';
6
6
  import { getRectWidthVariant } from '@coinbase/cds-common/utils/getRectWidthVariant';
7
+ import { useComponentConfig } from '../hooks/useComponentConfig';
7
8
  import { useTheme } from '../hooks/useTheme';
8
9
  import { VStack } from '../layout';
9
10
  import { Fallback } from '../layout/Fallback';
@@ -12,8 +13,9 @@ import { CellAccessory } from './CellAccessory';
12
13
  import { condensedInnerSpacing, condensedOuterSpacing } from './ListCell';
13
14
  import { MediaFallback } from './MediaFallback';
14
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
- export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref) {
16
- let {
16
+ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_props) {
17
+ const mergedProps = useComponentConfig('ListCellFallback', _props);
18
+ const {
17
19
  accessory,
18
20
  accessoryNode,
19
21
  title,
@@ -31,8 +33,8 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
31
33
  innerSpacing,
32
34
  outerSpacing,
33
35
  accessibilityLabel = 'Loading'
34
- } = _ref,
35
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
36
+ } = mergedProps,
37
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
36
38
  const theme = useTheme();
37
39
  const descriptionFallback = useMemo(() => {
38
40
  if (!description) {
package/esm/chips/Chip.js CHANGED
@@ -3,6 +3,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  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; }
4
4
  import React, { forwardRef, Fragment, memo } from 'react';
5
5
  import { chipMaxWidth } from '@coinbase/cds-common/tokens/chip';
6
+ import { useComponentConfig } from '../hooks/useComponentConfig';
6
7
  import { Box, HStack } from '../layout';
7
8
  import { InvertedThemeProvider, Pressable } from '../system';
8
9
  import { Text } from '../typography/Text';
@@ -10,8 +11,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
11
  /**
11
12
  * This is a basic Chip component used to create all Chip components.
12
13
  */
13
- export const Chip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Chip(_ref, ref) {
14
- let {
14
+ export const Chip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Chip(_props, ref) {
15
+ const mergedProps = useComponentConfig('Chip', _props);
16
+ const {
15
17
  alignSelf = 'flex-start',
16
18
  children,
17
19
  start,
@@ -40,8 +42,8 @@ export const Chip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Chip(_ref
40
42
  onPress,
41
43
  color = 'fg',
42
44
  font = compact ? 'label1' : 'headline'
43
- } = _ref,
44
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
45
+ } = mergedProps,
46
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
45
47
  const WrapperComponent = (invertColorScheme != null ? invertColorScheme : inverted) ? InvertedThemeProvider : Fragment;
46
48
  const containerProps = {
47
49
  testID,
@@ -2,18 +2,20 @@ const _excluded = ["value", "children", "accessibilityLabel", "invertColorScheme
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  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; }
4
4
  import React, { forwardRef, memo } from 'react';
5
+ import { useComponentConfig } from '../hooks/useComponentConfig';
5
6
  import { Icon } from '../icons';
6
7
  import { MediaChip } from './MediaChip';
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
- export const InputChip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function InputChip(_ref, ref) {
9
- let {
9
+ export const InputChip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
10
+ const mergedProps = useComponentConfig('InputChip', _props);
11
+ const {
10
12
  value,
11
13
  children = value,
12
14
  accessibilityLabel = typeof children === 'string' ? "Remove " + children : 'Remove option',
13
15
  invertColorScheme = true,
14
16
  testID = 'input-chip'
15
- } = _ref,
16
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
17
+ } = mergedProps,
18
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
17
19
  return /*#__PURE__*/_jsx(MediaChip, _extends({
18
20
  ref: ref,
19
21
  accessibilityLabel: accessibilityLabel,
@@ -3,10 +3,12 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  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; }
4
4
  import { forwardRef, memo, useMemo } from 'react';
5
5
  import { getMediaChipSpacingProps } from '@coinbase/cds-common/chips/getMediaChipSpacingProps';
6
+ import { useComponentConfig } from '../hooks/useComponentConfig';
6
7
  import { Chip } from './Chip';
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
- export const MediaChip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function MediaChip(_ref, ref) {
9
- let {
9
+ export const MediaChip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function MediaChip(_props, ref) {
10
+ const mergedProps = useComponentConfig('MediaChip', _props);
11
+ const {
10
12
  start,
11
13
  children,
12
14
  end,
@@ -18,8 +20,8 @@ export const MediaChip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Medi
18
20
  paddingBottom,
19
21
  paddingStart,
20
22
  paddingEnd
21
- } = _ref,
22
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
23
+ } = mergedProps,
24
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
23
25
  const spacingProps = useMemo(() => {
24
26
  const defaults = getMediaChipSpacingProps({
25
27
  compact: !!compact,
@@ -5,6 +5,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
5
5
  import React, { forwardRef, memo, useCallback, useMemo, useState } from 'react';
6
6
  import { ScrollView } from 'react-native';
7
7
  import { useTabsContext } from '@coinbase/cds-common/tabs/TabsContext';
8
+ import { useComponentConfig } from '../hooks/useComponentConfig';
8
9
  import { useHorizontalScrollToTarget } from '../hooks/useHorizontalScrollToTarget';
9
10
  import { Box, OverflowGradient } from '../layout';
10
11
  import { Tabs } from '../tabs';
@@ -35,15 +36,16 @@ const TabComponent = _ref => {
35
36
  const TabsActiveIndicatorComponent = () => {
36
37
  return null;
37
38
  };
38
- const TabbedChipsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function TabbedChips(_ref2, ref) {
39
- let {
39
+ const TabbedChipsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function TabbedChips(_props, ref) {
40
+ const mergedProps = useComponentConfig('TabbedChips', _props);
41
+ const {
40
42
  tabs,
41
43
  value = tabs[0].id,
42
44
  testID = 'tabbed-chips',
43
45
  onChange,
44
46
  Component = TabComponent
45
- } = _ref2,
46
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
47
+ } = mergedProps,
48
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded2);
47
49
  const activeTab = useMemo(() => tabs.find(tab => tab.id === value), [tabs, value]);
48
50
  const [scrollTarget, setScrollTarget] = useState(null);
49
51
  const handleChange = useCallback(tabValue => {
@@ -4,13 +4,15 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
4
4
  import React, { forwardRef, memo } from 'react';
5
5
  import { useWindowDimensions } from 'react-native';
6
6
  import { IconButton } from '../buttons';
7
+ import { useComponentConfig } from '../hooks/useComponentConfig';
7
8
  import { useTheme } from '../hooks/useTheme';
8
9
  import { Box, HStack, VStack } from '../layout';
9
10
  import { InvertedThemeProvider } from '../system';
10
11
  import { Text } from '../typography/Text';
11
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- export const Coachmark = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
13
- let {
13
+ export const Coachmark = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
14
+ const mergedProps = useComponentConfig('Coachmark', _props);
15
+ const {
14
16
  title,
15
17
  content,
16
18
  checkbox,
@@ -20,8 +22,8 @@ export const Coachmark = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
20
22
  width,
21
23
  closeButtonAccessibilityLabel,
22
24
  testID
23
- } = _ref,
24
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
25
+ } = mergedProps,
26
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
25
27
  const theme = useTheme();
26
28
  const {
27
29
  width: windowWidth
@@ -4,15 +4,17 @@ import { ScrollView, StyleSheet, View } from 'react-native';
4
4
  import Animated, { useAnimatedReaction, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
5
5
  import { animateInMaxSizeConfig, animateInOpacityConfig, animateOutMaxSizeConfig, animateOutOpacityConfig } from '@coinbase/cds-common/animation/collapsible';
6
6
  import { usePreviousValue } from '@coinbase/cds-common/hooks/usePreviousValue';
7
+ import { useComponentConfig } from '../hooks/useComponentConfig';
7
8
  import { useContentSize } from '../hooks/useContentSize';
8
9
  import { useTheme } from '../hooks/useTheme';
9
10
  import { convertMotionConfigs } from '../motion/convertMotionConfig';
10
11
  import { withMotionTiming } from '../motion/withMotionTiming';
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
  const ReanimatedView = Animated.createAnimatedComponent(View);
13
- export const Collapsible = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forwardedRef) => {
14
- var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
15
- let {
14
+ export const Collapsible = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedRef) => {
15
+ var _ref, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8;
16
+ const mergedProps = useComponentConfig('Collapsible', _props);
17
+ const {
16
18
  children,
17
19
  collapsed = true,
18
20
  direction = 'vertical',
@@ -27,7 +29,7 @@ export const Collapsible = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forw
27
29
  paddingBottom,
28
30
  paddingStart,
29
31
  scrollViewProps
30
- } = _ref;
32
+ } = mergedProps;
31
33
  const theme = useTheme();
32
34
  // TO DO: Remove this after refactoring useContentSize to default values to null on initial render
33
35
  const hasMounted = useRef(false);
@@ -41,10 +43,10 @@ export const Collapsible = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forw
41
43
  const heightAnimatedValue = useSharedValue(animateInMaxSize.fromValue);
42
44
  const opacityAnimatedValue = useSharedValue(animateInOpacity.fromValue);
43
45
  const spacingStyles = {
44
- paddingTop: theme.space[(_ref2 = (_ref3 = paddingTop != null ? paddingTop : paddingY) != null ? _ref3 : padding) != null ? _ref2 : 0],
45
- paddingEnd: theme.space[(_ref4 = (_ref5 = paddingEnd != null ? paddingEnd : paddingX) != null ? _ref5 : padding) != null ? _ref4 : 0],
46
- paddingBottom: theme.space[(_ref6 = (_ref7 = paddingBottom != null ? paddingBottom : paddingY) != null ? _ref7 : padding) != null ? _ref6 : 0],
47
- paddingStart: theme.space[(_ref8 = (_ref9 = paddingStart != null ? paddingStart : paddingX) != null ? _ref9 : padding) != null ? _ref8 : 0]
46
+ paddingTop: theme.space[(_ref = (_ref2 = paddingTop != null ? paddingTop : paddingY) != null ? _ref2 : padding) != null ? _ref : 0],
47
+ paddingEnd: theme.space[(_ref3 = (_ref4 = paddingEnd != null ? paddingEnd : paddingX) != null ? _ref4 : padding) != null ? _ref3 : 0],
48
+ paddingBottom: theme.space[(_ref5 = (_ref6 = paddingBottom != null ? paddingBottom : paddingY) != null ? _ref6 : padding) != null ? _ref5 : 0],
49
+ paddingStart: theme.space[(_ref7 = (_ref8 = paddingStart != null ? paddingStart : paddingX) != null ? _ref8 : padding) != null ? _ref7 : 0]
48
50
  };
49
51
  const prevCollapsed = usePreviousValue(collapsed);
50
52
 
@@ -3,6 +3,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  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; }
4
4
  import React, { forwardRef, memo, useMemo } from 'react';
5
5
  import { Animated } from 'react-native';
6
+ import { useComponentConfig } from '../hooks/useComponentConfig';
6
7
  import { useTheme } from '../hooks/useTheme';
7
8
  import { Icon } from '../icons/Icon';
8
9
  import { Interactable } from '../system/Interactable';
@@ -70,14 +71,15 @@ const CheckboxIcon = /*#__PURE__*/memo(_ref => {
70
71
  })
71
72
  });
72
73
  });
73
- const CheckboxWithRef = /*#__PURE__*/forwardRef(function Checkbox(_ref2, ref) {
74
- let {
74
+ const CheckboxWithRef = /*#__PURE__*/forwardRef(function Checkbox(_props, ref) {
75
+ const mergedProps = useComponentConfig('Checkbox', _props);
76
+ const {
75
77
  children,
76
78
  accessibilityLabel,
77
79
  accessibilityHint,
78
80
  accessible = true
79
- } = _ref2,
80
- props = _objectWithoutPropertiesLoose(_ref2, _excluded);
81
+ } = mergedProps,
82
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
81
83
  const accessibilityLabelValue = typeof children === 'string' && accessibilityLabel === undefined ? children : accessibilityLabel;
82
84
  const accessibilityHintValue = typeof children === 'string' && accessibilityHint === undefined ? children : accessibilityHint;
83
85
  return /*#__PURE__*/_jsx(Control, _extends({
@@ -3,6 +3,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  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; }
4
4
  import React, { forwardRef, memo, useCallback, useMemo, useState } from 'react';
5
5
  import { Animated } from 'react-native';
6
+ import { useComponentConfig } from '../hooks/useComponentConfig';
6
7
  import { useLayout } from '../hooks/useLayout';
7
8
  import { useSelectionCellBorderStyle } from '../hooks/useSelectionCellBorderStyle';
8
9
  import { useTheme } from '../hooks/useTheme';
@@ -11,8 +12,9 @@ import { Pressable } from '../system/Pressable';
11
12
  import { Text } from '../typography/Text';
12
13
  import { Checkbox } from './Checkbox';
13
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- const CheckboxCellWithRef = /*#__PURE__*/forwardRef(function CheckboxCell(_ref, ref) {
15
- let {
15
+ const CheckboxCellWithRef = /*#__PURE__*/forwardRef(function CheckboxCell(_props, ref) {
16
+ const mergedProps = useComponentConfig('CheckboxCell', _props);
17
+ const {
16
18
  title,
17
19
  description,
18
20
  checked,
@@ -42,8 +44,8 @@ const CheckboxCellWithRef = /*#__PURE__*/forwardRef(function CheckboxCell(_ref,
42
44
  indeterminate,
43
45
  readOnly,
44
46
  styles
45
- } = _ref,
46
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
47
+ } = mergedProps,
48
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
47
49
  const theme = useTheme();
48
50
  const [layout, setLayout] = useLayout();
49
51
  const [pressed, setPressed] = useState(false);
@@ -5,13 +5,15 @@ import React, { forwardRef, memo, useCallback, useEffect, useMemo, useRef } from
5
5
  import { I18nManager, Keyboard, Pressable, View } from 'react-native';
6
6
  import { accessibleOpacityDisabled, opacityPressed } from '@coinbase/cds-common/tokens/interactable';
7
7
  import { isDevelopment } from '@coinbase/cds-utils';
8
+ import { useComponentConfig } from '../hooks/useComponentConfig';
8
9
  import { useTheme } from '../hooks/useTheme';
9
10
  import { Text } from '../typography/Text';
10
11
  import { Haptics } from '../utils/haptics';
11
12
  import { useControlMotionProps } from './useControlMotionProps';
12
13
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- const ControlWithRef = /*#__PURE__*/forwardRef(function ControlWithRef(_ref, ref) {
14
- let {
14
+ const ControlWithRef = /*#__PURE__*/forwardRef(function ControlWithRef(_props, ref) {
15
+ const mergedProps = useComponentConfig('Control', _props);
16
+ const {
15
17
  testID,
16
18
  label,
17
19
  checked,
@@ -37,8 +39,8 @@ const ControlWithRef = /*#__PURE__*/forwardRef(function ControlWithRef(_ref, ref
37
39
  borderWidth,
38
40
  controlSize,
39
41
  dotSize
40
- } = _ref,
41
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
42
+ } = mergedProps,
43
+ props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
42
44
  const theme = useTheme();
43
45
  if (isDevelopment() && accessible && !label && !accessibilityLabel) {
44
46
  console.warn("Please specify an accessibility label for the " + accessibilityRole + " control with value " + value + ".");
@@ -98,10 +100,10 @@ const ControlWithRef = /*#__PURE__*/forwardRef(function ControlWithRef(_ref, ref
98
100
  const handleAccessibilityAction = useCallback(event => {
99
101
  if (event.nativeEvent.actionName === 'activate') handlePress();
100
102
  }, [handlePress]);
101
- const controlIcon = useCallback(_ref2 => {
103
+ const controlIcon = useCallback(_ref => {
102
104
  let {
103
105
  pressed
104
- } = _ref2;
106
+ } = _ref;
105
107
  /**
106
108
  * If the control has label, the label's lineHeight doesn't match the icon size. We need to
107
109
  * wrap the icon with a container that match the lineHeight of the label typography and
@@ -3,10 +3,12 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
3
3
  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; }
4
4
  import React, { forwardRef, memo } from 'react';
5
5
  import { isDevelopment } from '@coinbase/cds-utils';
6
+ import { useComponentConfig } from '../hooks/useComponentConfig';
6
7
  import { Group } from '../layout';
7
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
- const ControlGroupWithRef = /*#__PURE__*/forwardRef(function ControlGroup(_ref, ref) {
9
- let {
9
+ const ControlGroupWithRef = /*#__PURE__*/forwardRef(function ControlGroup(_props, ref) {
10
+ const mergedProps = useComponentConfig('ControlGroup', _props);
11
+ const {
10
12
  ControlComponent,
11
13
  options,
12
14
  label,
@@ -17,8 +19,8 @@ const ControlGroupWithRef = /*#__PURE__*/forwardRef(function ControlGroup(_ref,
17
19
  testID,
18
20
  gap = 2,
19
21
  role = 'group'
20
- } = _ref,
21
- restProps = _objectWithoutPropertiesLoose(_ref, _excluded);
22
+ } = mergedProps,
23
+ restProps = _objectWithoutPropertiesLoose(mergedProps, _excluded);
22
24
  if (isDevelopment() && !label && !ariaLabelledby && !ariaLabel) {
23
25
  console.warn('Please specify a label or aria-labelledby for the ControlGroup.');
24
26
  }