@coinbase/cds-web 8.60.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.
- package/CHANGELOG.md +20 -0
- package/dts/accordion/Accordion.d.ts +1 -9
- package/dts/accordion/Accordion.d.ts.map +1 -1
- package/dts/alpha/combobox/Combobox.d.ts.map +1 -1
- package/dts/alpha/select/Select.d.ts.map +1 -1
- package/dts/alpha/select-chip/SelectChip.d.ts.map +1 -1
- package/dts/alpha/tabbed-chips/TabbedChips.d.ts.map +1 -1
- package/dts/banner/Banner.d.ts.map +1 -1
- package/dts/buttons/AvatarButton.d.ts.map +1 -1
- package/dts/buttons/Button.d.ts +2 -4
- package/dts/buttons/Button.d.ts.map +1 -1
- package/dts/buttons/ButtonGroup.d.ts.map +1 -1
- package/dts/buttons/IconButton.d.ts.map +1 -1
- package/dts/buttons/IconCounterButton.d.ts.map +1 -1
- package/dts/buttons/Tile.d.ts +1 -1
- package/dts/buttons/Tile.d.ts.map +1 -1
- package/dts/buttons/TileButton.d.ts.map +1 -1
- package/dts/cards/Card.d.ts +4 -0
- package/dts/cards/Card.d.ts.map +1 -1
- package/dts/cards/CardBody.d.ts +3 -0
- package/dts/cards/CardBody.d.ts.map +1 -1
- package/dts/cards/CardFooter.d.ts +4 -0
- package/dts/cards/CardFooter.d.ts.map +1 -1
- package/dts/cards/CardGroup.d.ts +12 -0
- package/dts/cards/CardGroup.d.ts.map +1 -1
- package/dts/cards/CardHeader.d.ts +4 -0
- package/dts/cards/CardHeader.d.ts.map +1 -1
- package/dts/cards/CardMedia.d.ts +4 -0
- package/dts/cards/CardMedia.d.ts.map +1 -1
- package/dts/cards/LikeButton.d.ts.map +1 -1
- package/dts/carousel/Carousel.d.ts.map +1 -1
- package/dts/cells/Cell.d.ts.map +1 -1
- package/dts/cells/CellAccessory.d.ts.map +1 -1
- package/dts/cells/ListCell.d.ts.map +1 -1
- package/dts/cells/ListCellFallback.d.ts.map +1 -1
- package/dts/chips/Chip.d.ts.map +1 -1
- package/dts/chips/ChipProps.d.ts +10 -8
- package/dts/chips/ChipProps.d.ts.map +1 -1
- package/dts/chips/InputChip.d.ts.map +1 -1
- package/dts/chips/MediaChip.d.ts +4 -4
- package/dts/chips/MediaChip.d.ts.map +1 -1
- package/dts/chips/TabbedChips.d.ts.map +1 -1
- package/dts/coachmark/Coachmark.d.ts.map +1 -1
- package/dts/collapsible/Collapsible.d.ts.map +1 -1
- package/dts/collapsible/useCollapsibleMotionProps.d.ts +221 -221
- package/dts/controls/Checkbox.d.ts.map +1 -1
- package/dts/controls/CheckboxCell.d.ts.map +1 -1
- package/dts/controls/Control.d.ts.map +1 -1
- package/dts/controls/ControlGroup.d.ts +13 -4
- package/dts/controls/ControlGroup.d.ts.map +1 -1
- package/dts/controls/InputStack.d.ts.map +1 -1
- package/dts/controls/Radio.d.ts.map +1 -1
- package/dts/controls/RadioCell.d.ts.map +1 -1
- package/dts/controls/SearchInput.d.ts.map +1 -1
- package/dts/controls/SelectOption.d.ts +1 -14
- package/dts/controls/SelectOption.d.ts.map +1 -1
- package/dts/controls/Switch.d.ts +2 -1
- package/dts/controls/Switch.d.ts.map +1 -1
- package/dts/controls/TextInput.d.ts.map +1 -1
- package/dts/core/componentConfig.d.ts +192 -0
- package/dts/core/componentConfig.d.ts.map +1 -0
- package/dts/dates/Calendar.d.ts.map +1 -1
- package/dts/dates/DateInput.d.ts.map +1 -1
- package/dts/dates/DatePicker.d.ts.map +1 -1
- package/dts/dots/DotCount.d.ts +1 -15
- package/dts/dots/DotCount.d.ts.map +1 -1
- package/dts/dots/DotStatusColor.d.ts +1 -10
- package/dts/dots/DotStatusColor.d.ts.map +1 -1
- package/dts/dots/DotSymbol.d.ts +1 -22
- package/dts/dots/DotSymbol.d.ts.map +1 -1
- package/dts/dropdown/Dropdown.d.ts +30 -29
- package/dts/dropdown/Dropdown.d.ts.map +1 -1
- package/dts/dropdown/DropdownProps.d.ts +53 -51
- package/dts/dropdown/DropdownProps.d.ts.map +1 -1
- package/dts/hooks/useComponentConfig.d.ts +22 -0
- package/dts/hooks/useComponentConfig.d.ts.map +1 -0
- package/dts/hooks/useIsoEffect.d.ts +2 -2
- package/dts/hooks/useIsoEffect.d.ts.map +1 -1
- package/dts/icons/Icon.d.ts.map +1 -1
- package/dts/index.d.ts +2 -0
- package/dts/index.d.ts.map +1 -1
- package/dts/layout/Divider.d.ts +1 -6
- package/dts/layout/Divider.d.ts.map +1 -1
- package/dts/layout/Fallback.d.ts.map +1 -1
- package/dts/media/Avatar.d.ts +1 -15
- package/dts/media/Avatar.d.ts.map +1 -1
- package/dts/media/RemoteImage.d.ts +1 -15
- package/dts/media/RemoteImage.d.ts.map +1 -1
- package/dts/media/RemoteImageGroup.d.ts +3 -10
- package/dts/media/RemoteImageGroup.d.ts.map +1 -1
- package/dts/motion/useMotionProps.d.ts +457 -457
- package/dts/motion/utils.d.ts +211 -211
- package/dts/navigation/NavigationBar.d.ts +1 -25
- package/dts/navigation/NavigationBar.d.ts.map +1 -1
- package/dts/navigation/NavigationTitle.d.ts +4 -3
- package/dts/navigation/NavigationTitle.d.ts.map +1 -1
- package/dts/navigation/NavigationTitleSelect.d.ts +5 -12
- package/dts/navigation/NavigationTitleSelect.d.ts.map +1 -1
- package/dts/navigation/Sidebar.d.ts.map +1 -1
- package/dts/navigation/SidebarItem.d.ts +40 -34
- package/dts/navigation/SidebarItem.d.ts.map +1 -1
- package/dts/navigation/SidebarMoreMenu.d.ts +13 -12
- package/dts/navigation/SidebarMoreMenu.d.ts.map +1 -1
- package/dts/numbers/RollingNumber/RollingNumber.d.ts.map +1 -1
- package/dts/overlays/Alert.d.ts.map +1 -1
- package/dts/overlays/FocusTrap.d.ts +9 -12
- package/dts/overlays/FocusTrap.d.ts.map +1 -1
- package/dts/overlays/FullscreenAlert.d.ts +10 -7
- package/dts/overlays/FullscreenAlert.d.ts.map +1 -1
- package/dts/overlays/Toast.d.ts.map +1 -1
- package/dts/overlays/modal/FullscreenModal.d.ts +47 -45
- package/dts/overlays/modal/FullscreenModal.d.ts.map +1 -1
- package/dts/overlays/modal/FullscreenModalHeader.d.ts.map +1 -1
- package/dts/overlays/modal/FullscreenModalLayout.d.ts +2 -2
- package/dts/overlays/modal/Modal.d.ts.map +1 -1
- package/dts/overlays/modal/ModalBody.d.ts +6 -3
- package/dts/overlays/modal/ModalBody.d.ts.map +1 -1
- package/dts/overlays/modal/ModalFooter.d.ts +3 -10
- package/dts/overlays/modal/ModalFooter.d.ts.map +1 -1
- package/dts/overlays/modal/ModalHeader.d.ts +3 -12
- package/dts/overlays/modal/ModalHeader.d.ts.map +1 -1
- package/dts/overlays/modal/ModalWrapper.d.ts.map +1 -1
- package/dts/overlays/overlay/Overlay.d.ts +2 -1
- package/dts/overlays/overlay/Overlay.d.ts.map +1 -1
- package/dts/overlays/overlay/OverlayContent.d.ts +7 -5
- package/dts/overlays/overlay/OverlayContent.d.ts.map +1 -1
- package/dts/overlays/popover/PopoverProps.d.ts +46 -46
- package/dts/overlays/popover/PopoverProps.d.ts.map +1 -1
- package/dts/overlays/tooltip/Tooltip.d.ts +4 -22
- package/dts/overlays/tooltip/Tooltip.d.ts.map +1 -1
- package/dts/overlays/tooltip/TooltipContent.d.ts +7 -1
- package/dts/overlays/tooltip/TooltipContent.d.ts.map +1 -1
- package/dts/overlays/tray/Tray.d.ts.map +1 -1
- package/dts/page/PageFooter.d.ts.map +1 -1
- package/dts/page/PageHeader.d.ts.map +1 -1
- package/dts/pagination/Pagination.d.ts +3 -19
- package/dts/pagination/Pagination.d.ts.map +1 -1
- package/dts/perf/component-config/Button.component-config.perf-test.d.ts +2 -0
- package/dts/perf/component-config/Button.component-config.perf-test.d.ts.map +1 -0
- package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts +2 -0
- package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts.map +1 -0
- package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts +2 -0
- package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts.map +1 -0
- package/dts/section-header/SectionHeader.d.ts.map +1 -1
- package/dts/stepper/Stepper.d.ts.map +1 -1
- package/dts/system/ComponentConfigProvider.d.ts +26 -0
- package/dts/system/ComponentConfigProvider.d.ts.map +1 -0
- package/dts/system/index.d.ts +1 -0
- package/dts/system/index.d.ts.map +1 -1
- package/dts/tables/Table.d.ts +7 -5
- package/dts/tables/Table.d.ts.map +1 -1
- package/dts/tables/TableCaption.d.ts +32 -41
- package/dts/tables/TableCaption.d.ts.map +1 -1
- package/dts/tables/TableCell.d.ts +26 -48
- package/dts/tables/TableCell.d.ts.map +1 -1
- package/dts/tables/TableCellFallback.d.ts +10 -17
- package/dts/tables/TableCellFallback.d.ts.map +1 -1
- package/dts/tables/TableRow.d.ts +44 -53
- package/dts/tables/TableRow.d.ts.map +1 -1
- package/dts/tabs/SegmentedTab.d.ts +6 -3
- package/dts/tabs/SegmentedTab.d.ts.map +1 -1
- package/dts/tabs/SegmentedTabs.d.ts +9 -3
- package/dts/tabs/SegmentedTabs.d.ts.map +1 -1
- package/dts/tabs/Tabs.d.ts +16 -15
- package/dts/tabs/Tabs.d.ts.map +1 -1
- package/dts/tabs/hooks/useAnimateTabIndicator.d.ts +457 -457
- package/dts/tag/Tag.d.ts.map +1 -1
- package/dts/tour/Tour.d.ts +54 -53
- package/dts/tour/Tour.d.ts.map +1 -1
- package/dts/typography/Link.d.ts.map +1 -1
- package/dts/utils/mergeComponentProps.d.ts +34 -0
- package/dts/utils/mergeComponentProps.d.ts.map +1 -0
- package/dts/visualizations/ProgressBar.d.ts.map +1 -1
- package/dts/visualizations/ProgressBarWithFixedLabels.d.ts +5 -3
- package/dts/visualizations/ProgressBarWithFixedLabels.d.ts.map +1 -1
- package/dts/visualizations/ProgressBarWithFloatLabel.d.ts +3 -1
- package/dts/visualizations/ProgressBarWithFloatLabel.d.ts.map +1 -1
- package/dts/visualizations/ProgressCircle.d.ts.map +1 -1
- package/esm/accordion/Accordion.js +5 -3
- package/esm/alpha/combobox/Combobox.js +6 -4
- package/esm/alpha/select/Select.js +5 -3
- package/esm/alpha/select-chip/SelectChip.js +6 -4
- package/esm/alpha/tabbed-chips/TabbedChips.js +6 -4
- package/esm/banner/Banner.js +6 -4
- package/esm/buttons/AvatarButton.js +6 -4
- package/esm/buttons/Button.js +6 -4
- package/esm/buttons/ButtonGroup.js +5 -3
- package/esm/buttons/IconButton.js +6 -4
- package/esm/buttons/IconCounterButton.js +6 -4
- package/esm/buttons/Tile.js +5 -3
- package/esm/buttons/TileButton.js +6 -4
- package/esm/cards/Card.js +4 -0
- package/esm/cards/CardBody.js +3 -0
- package/esm/cards/CardFooter.js +4 -0
- package/esm/cards/CardGroup.js +14 -0
- package/esm/cards/CardHeader.js +5 -0
- package/esm/cards/CardMedia.js +5 -0
- package/esm/cards/LikeButton.js +6 -4
- package/esm/carousel/Carousel.js +8 -6
- package/esm/cells/Cell.js +8 -6
- package/esm/cells/CellAccessory.js +6 -4
- package/esm/cells/ListCell.js +6 -4
- package/esm/cells/ListCellFallback.js +6 -4
- package/esm/chips/Chip.js +6 -4
- package/esm/chips/InputChip.js +6 -4
- package/esm/chips/MediaChip.js +6 -4
- package/esm/chips/TabbedChips.js +6 -4
- package/esm/coachmark/Coachmark.js +6 -4
- package/esm/collapsible/Collapsible.js +5 -3
- package/esm/controls/Checkbox.js +6 -4
- package/esm/controls/CheckboxCell.js +6 -4
- package/esm/controls/Control.js +6 -4
- package/esm/controls/ControlGroup.js +6 -4
- package/esm/controls/InputStack.js +6 -4
- package/esm/controls/Radio.js +6 -4
- package/esm/controls/RadioCell.js +6 -4
- package/esm/controls/SearchInput.js +11 -12
- package/esm/controls/SelectOption.js +6 -4
- package/esm/controls/Switch.js +6 -4
- package/esm/controls/TextInput.js +6 -4
- package/esm/core/componentConfig.js +1 -0
- package/esm/dates/Calendar.js +6 -4
- package/esm/dates/DateInput.js +6 -4
- package/esm/dates/DatePicker.js +6 -4
- package/esm/dots/DotCount.js +6 -4
- package/esm/dots/DotStatusColor.js +6 -4
- package/esm/dots/DotSymbol.js +6 -4
- package/esm/dropdown/Dropdown.js +6 -4
- package/esm/hooks/useComponentConfig.js +27 -0
- package/esm/icons/Icon.js +6 -4
- package/esm/index.js +2 -0
- package/esm/layout/Divider.js +6 -4
- package/esm/layout/Fallback.js +6 -4
- package/esm/media/Avatar.js +8 -6
- package/esm/media/RemoteImage.js +6 -4
- package/esm/media/RemoteImageGroup.js +6 -4
- package/esm/navigation/NavigationBar.js +6 -4
- package/esm/navigation/NavigationTitle.js +6 -4
- package/esm/navigation/NavigationTitleSelect.js +6 -4
- package/esm/navigation/Sidebar.js +6 -4
- package/esm/navigation/SidebarItem.js +6 -4
- package/esm/navigation/SidebarMoreMenu.js +6 -4
- package/esm/numbers/RollingNumber/RollingNumber.js +6 -4
- package/esm/overlays/Alert.js +6 -4
- package/esm/overlays/FocusTrap.js +5 -3
- package/esm/overlays/FullscreenAlert.js +5 -3
- package/esm/overlays/Toast.js +6 -4
- package/esm/overlays/modal/FullscreenModal.js +5 -3
- package/esm/overlays/modal/FullscreenModalHeader.js +6 -4
- package/esm/overlays/modal/Modal.js +6 -4
- package/esm/overlays/modal/ModalBody.js +9 -6
- package/esm/overlays/modal/ModalFooter.js +8 -6
- package/esm/overlays/modal/ModalHeader.js +6 -4
- package/esm/overlays/modal/ModalWrapper.js +6 -4
- package/esm/overlays/overlay/Overlay.js +4 -2
- package/esm/overlays/tooltip/Tooltip.js +9 -7
- package/esm/overlays/tooltip/TooltipContent.js +16 -9
- package/esm/overlays/tray/Tray.js +5 -3
- package/esm/page/PageFooter.js +6 -4
- package/esm/page/PageHeader.js +6 -4
- package/esm/pagination/Pagination.js +6 -4
- package/esm/perf/component-config/Button.component-config.perf-test.js +43 -0
- package/esm/perf/component-config/ComponentConfigProvider.perf-test.js +134 -0
- package/esm/perf/component-config/ComponentConfigStickerSheet.perf-test.js +332 -0
- package/esm/perf/component-config/README.md +8 -0
- package/esm/section-header/SectionHeader.js +6 -4
- package/esm/stepper/Stepper.js +12 -10
- package/esm/system/ComponentConfigProvider.js +41 -0
- package/esm/system/index.js +1 -0
- package/esm/tables/Table.js +6 -4
- package/esm/tables/TableCaption.js +6 -4
- package/esm/tables/TableCell.js +9 -7
- package/esm/tables/TableCellFallback.js +6 -4
- package/esm/tables/TableRow.js +6 -4
- package/esm/tabs/SegmentedTab.js +6 -4
- package/esm/tabs/SegmentedTabs.js +6 -4
- package/esm/tabs/Tabs.js +12 -10
- package/esm/tag/Tag.js +6 -4
- package/esm/tour/Tour.js +5 -3
- package/esm/typography/Link.js +6 -4
- package/esm/utils/mergeComponentProps.js +39 -0
- package/esm/visualizations/ProgressBar.js +5 -3
- package/esm/visualizations/ProgressBarWithFixedLabels.js +5 -3
- package/esm/visualizations/ProgressBarWithFloatLabel.js +5 -3
- package/esm/visualizations/ProgressCircle.js +7 -5
- package/package.json +4 -3
- package/esm/controls/SearchInput.css +0 -2
package/esm/tabs/SegmentedTab.js
CHANGED
|
@@ -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((
|
|
24
|
-
|
|
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
|
-
} =
|
|
41
|
-
props = _objectWithoutProperties(
|
|
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((
|
|
16
|
-
|
|
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
|
-
} =
|
|
27
|
-
props = _objectWithoutProperties(
|
|
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((
|
|
45
|
-
|
|
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
|
-
} =
|
|
67
|
-
props = _objectWithoutProperties(
|
|
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(
|
|
163
|
+
}), tabs.map(_ref2 => {
|
|
162
164
|
let {
|
|
163
165
|
id,
|
|
164
166
|
Component: CustomTabComponent,
|
|
165
167
|
disabled: tabDisabled
|
|
166
|
-
} =
|
|
167
|
-
props = _objectWithoutProperties(
|
|
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 =
|
|
190
|
+
export const TabsActiveIndicator = _ref3 => {
|
|
189
191
|
let {
|
|
190
192
|
activeTabRect,
|
|
191
193
|
position = 'absolute'
|
|
192
|
-
} =
|
|
193
|
-
props = _objectWithoutProperties(
|
|
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(
|
|
19
|
-
|
|
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
|
-
} =
|
|
39
|
-
props = _objectWithoutProperties(
|
|
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 =
|
|
74
|
+
const TourComponent = _props => {
|
|
74
75
|
var _activeTourStep$Arrow, _activeTourStep$hideO, _activeTourStep$tourM, _activeTourStep$tourM2;
|
|
75
|
-
|
|
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
|
-
} =
|
|
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;
|
package/esm/typography/Link.js
CHANGED
|
@@ -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((
|
|
18
|
-
|
|
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
|
-
} =
|
|
35
|
-
props = _objectWithoutProperties(
|
|
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((
|
|
18
|
-
|
|
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
|
-
} =
|
|
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(
|
|
110
|
-
|
|
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
|
-
} =
|
|
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(
|
|
100
|
-
|
|
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
|
-
} =
|
|
114
|
+
} = mergedProps;
|
|
113
115
|
const skipLabel = isStorybook();
|
|
114
116
|
const progressBarFloatLabel = !skipLabel && /*#__PURE__*/_jsx(ProgressBarFloatLabel, {
|
|
115
117
|
classNames: classNames,
|
|
@@ -9,6 +9,7 @@ import { getProgressCircleParams } from '@coinbase/cds-common/visualizations/get
|
|
|
9
9
|
import { getProgressSize } from '@coinbase/cds-common/visualizations/getProgressSize';
|
|
10
10
|
import { m as motion } from 'framer-motion';
|
|
11
11
|
import { cx } from '../cx';
|
|
12
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
12
13
|
import { Box } from '../layout/Box';
|
|
13
14
|
import { useMotionProps } from '../motion/useMotionProps';
|
|
14
15
|
import { DefaultProgressCircleContent } from './DefaultProgressCircleContent';
|
|
@@ -59,8 +60,9 @@ const ProgressCircleInner = /*#__PURE__*/memo(_ref => {
|
|
|
59
60
|
onAnimationStart: onAnimationStart
|
|
60
61
|
}));
|
|
61
62
|
});
|
|
62
|
-
export const ProgressCircle = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
63
|
-
|
|
63
|
+
export const ProgressCircle = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedRef) => {
|
|
64
|
+
const mergedProps = useComponentConfig('ProgressCircle', _props);
|
|
65
|
+
const {
|
|
64
66
|
indeterminate,
|
|
65
67
|
weight = 'normal',
|
|
66
68
|
progress = indeterminate ? 0.75 : 0,
|
|
@@ -79,18 +81,18 @@ export const ProgressCircle = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref2,
|
|
|
79
81
|
classNames,
|
|
80
82
|
onAnimationEnd,
|
|
81
83
|
onAnimationStart
|
|
82
|
-
} =
|
|
84
|
+
} = mergedProps;
|
|
83
85
|
const visSize = size !== null && size !== void 0 ? size : '100%';
|
|
84
86
|
const strokeWidth = getProgressSize(weight);
|
|
85
87
|
return /*#__PURE__*/_jsx(VisualizationContainer, {
|
|
86
88
|
height: visSize,
|
|
87
89
|
width: visSize,
|
|
88
|
-
children:
|
|
90
|
+
children: _ref2 => {
|
|
89
91
|
let {
|
|
90
92
|
width,
|
|
91
93
|
height,
|
|
92
94
|
circleSize
|
|
93
|
-
} =
|
|
95
|
+
} = _ref2;
|
|
94
96
|
return /*#__PURE__*/_jsxs(Box, _objectSpread(_objectSpread({
|
|
95
97
|
ref: forwardedRef,
|
|
96
98
|
accessibilityLabel: accessibilityLabel,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-web",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.62.0",
|
|
4
4
|
"description": "Coinbase Design System - Web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"react-dom": "^18.3.1"
|
|
208
208
|
},
|
|
209
209
|
"dependencies": {
|
|
210
|
-
"@coinbase/cds-common": "^8.
|
|
210
|
+
"@coinbase/cds-common": "^8.62.0",
|
|
211
211
|
"@coinbase/cds-icons": "^5.13.0",
|
|
212
212
|
"@coinbase/cds-illustrations": "^4.36.0",
|
|
213
213
|
"@coinbase/cds-lottie-files": "^3.3.4",
|
|
@@ -222,7 +222,8 @@
|
|
|
222
222
|
"lodash": "^4.17.21",
|
|
223
223
|
"lottie-web": "^5.13.0",
|
|
224
224
|
"react-popper": "^2.2.4",
|
|
225
|
-
"react-use-measure": "^2"
|
|
225
|
+
"react-use-measure": "^2",
|
|
226
|
+
"zustand": "^5.0.12"
|
|
226
227
|
},
|
|
227
228
|
"devDependencies": {
|
|
228
229
|
"@babel/core": "^7.28.0",
|