@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.
- package/CHANGELOG.md +12 -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/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/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 +6 -4
- 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 +6 -4
- 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
|
@@ -10,21 +10,23 @@ import React, { forwardRef, memo, useMemo } from 'react';
|
|
|
10
10
|
import { gutter } from '@coinbase/cds-common/tokens/sizing';
|
|
11
11
|
import { pictogramScaleMultiplier } from '@coinbase/cds-common/tokens/tile';
|
|
12
12
|
import { isDevelopment } from '@coinbase/cds-utils';
|
|
13
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
13
14
|
import { Pictogram } from '../illustrations/Pictogram';
|
|
14
15
|
import { Pressable } from '../system/Pressable';
|
|
15
16
|
import { Tile } from './Tile';
|
|
16
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
18
|
export const tileButtonDefaultElement = 'button';
|
|
18
|
-
export const TileButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
19
|
-
|
|
19
|
+
export const TileButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
20
|
+
const mergedProps = useComponentConfig('TileButton', _props);
|
|
21
|
+
const {
|
|
20
22
|
as,
|
|
21
23
|
pictogram,
|
|
22
24
|
title,
|
|
23
25
|
count,
|
|
24
26
|
children,
|
|
25
27
|
showOverflow
|
|
26
|
-
} =
|
|
27
|
-
props = _objectWithoutProperties(
|
|
28
|
+
} = mergedProps,
|
|
29
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
28
30
|
const Component = as !== null && as !== void 0 ? as : tileButtonDefaultElement;
|
|
29
31
|
if (isDevelopment() && title.trim() === '') {
|
|
30
32
|
console.warn('Setting an empty title in TileButton violates accessibility and CDS usage guidelines.');
|
package/esm/cards/LikeButton.js
CHANGED
|
@@ -9,19 +9,21 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
9
9
|
import React, { memo } from 'react';
|
|
10
10
|
import { interactableHeight } from '@coinbase/cds-common/tokens/interactableHeight';
|
|
11
11
|
import { getButtonSpacingProps } from '@coinbase/cds-common/utils/getButtonSpacingProps';
|
|
12
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
12
13
|
import { Icon } from '../icons/Icon';
|
|
13
14
|
import { HStack } from '../layout/HStack';
|
|
14
15
|
import { Pressable } from '../system/Pressable';
|
|
15
16
|
import { Text } from '../typography/Text';
|
|
16
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
-
export const LikeButton = /*#__PURE__*/memo(function LikeButton(
|
|
18
|
-
|
|
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,
|
|
22
24
|
liked = false
|
|
23
|
-
} =
|
|
24
|
-
props = _objectWithoutProperties(
|
|
25
|
+
} = mergedProps,
|
|
26
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
25
27
|
const iconSize = compact ? 's' : 'm';
|
|
26
28
|
const size = interactableHeight[compact ? 'compact' : 'regular'];
|
|
27
29
|
const {
|
package/esm/carousel/Carousel.js
CHANGED
|
@@ -12,6 +12,7 @@ import { useRefMap } from '@coinbase/cds-common/hooks/useRefMap';
|
|
|
12
12
|
import { RefMapContext } from '@coinbase/cds-common/system/RefMapContext';
|
|
13
13
|
import { animate, domMax, LazyMotion, m, useAnimation, useDragControls, useMotionValue, useTransform } from 'framer-motion';
|
|
14
14
|
import { cx } from '../cx';
|
|
15
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
15
16
|
import { HStack } from '../layout/HStack';
|
|
16
17
|
import { VStack } from '../layout/VStack';
|
|
17
18
|
import { Text } from '../typography';
|
|
@@ -336,8 +337,9 @@ const findPageIndexForItem = (itemRect, pageOffsets) => {
|
|
|
336
337
|
return 0;
|
|
337
338
|
};
|
|
338
339
|
const defaultPageChangeAccessibilityLabel = (activePageIndex, totalPages) => "Page ".concat(activePageIndex + 1, " of ").concat(totalPages);
|
|
339
|
-
export const Carousel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
340
|
-
|
|
340
|
+
export const Carousel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
341
|
+
const mergedProps = useComponentConfig('Carousel', _props);
|
|
342
|
+
const {
|
|
341
343
|
children,
|
|
342
344
|
title,
|
|
343
345
|
hideNavigation,
|
|
@@ -363,8 +365,8 @@ export const Carousel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref4, ref) =
|
|
|
363
365
|
autoplay,
|
|
364
366
|
autoplayInterval = 3000,
|
|
365
367
|
paginationVariant
|
|
366
|
-
} =
|
|
367
|
-
props = _objectWithoutProperties(
|
|
368
|
+
} = mergedProps,
|
|
369
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
368
370
|
const animationApi = useAnimation();
|
|
369
371
|
const carouselScrollX = useMotionValue(0);
|
|
370
372
|
const dragControls = useDragControls();
|
|
@@ -378,8 +380,8 @@ export const Carousel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref4, ref) =
|
|
|
378
380
|
useEffect(() => {
|
|
379
381
|
const observer = new window.ResizeObserver(() => {
|
|
380
382
|
const newRects = {};
|
|
381
|
-
Object.entries(carouselItemRefMap.refs).forEach(
|
|
382
|
-
let [id, element] =
|
|
383
|
+
Object.entries(carouselItemRefMap.refs).forEach(_ref4 => {
|
|
384
|
+
let [id, element] = _ref4;
|
|
383
385
|
if (element) {
|
|
384
386
|
newRects[id] = {
|
|
385
387
|
x: element.offsetLeft,
|
package/esm/cells/Cell.js
CHANGED
|
@@ -11,6 +11,7 @@ import React, { forwardRef, memo, useMemo } from 'react';
|
|
|
11
11
|
import { hasCellPriority } from '@coinbase/cds-common/utils/cell';
|
|
12
12
|
import { cx } from '../cx';
|
|
13
13
|
import { useCellSpacing } from '../hooks/useCellSpacing';
|
|
14
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
14
15
|
import { Box } from '../layout/Box';
|
|
15
16
|
import { HStack } from '../layout/HStack';
|
|
16
17
|
import { VStack } from '../layout/VStack';
|
|
@@ -25,9 +26,10 @@ const baseCss = "baseCss-b1bbnpmz";
|
|
|
25
26
|
// https://css-tricks.com/flexbox-truncated-text/
|
|
26
27
|
const truncationCss = "truncationCss-tdaia71";
|
|
27
28
|
export const cellDefaultElement = 'div';
|
|
28
|
-
export const Cell = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
29
|
-
var
|
|
30
|
-
|
|
29
|
+
export const Cell = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
30
|
+
var _ref;
|
|
31
|
+
const mergedProps = useComponentConfig('Cell', _props);
|
|
32
|
+
const {
|
|
31
33
|
as,
|
|
32
34
|
accessory,
|
|
33
35
|
accessoryNode,
|
|
@@ -74,8 +76,8 @@ export const Cell = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
74
76
|
outerSpacing: outerSpacingProp,
|
|
75
77
|
bottomContent: bottom,
|
|
76
78
|
background = 'bgAlternate'
|
|
77
|
-
} =
|
|
78
|
-
props = _objectWithoutProperties(
|
|
79
|
+
} = mergedProps,
|
|
80
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
79
81
|
const Component = as !== null && as !== void 0 ? as : cellDefaultElement;
|
|
80
82
|
const {
|
|
81
83
|
inner: innerSpacing,
|
|
@@ -89,7 +91,7 @@ export const Cell = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
89
91
|
} = innerSpacing,
|
|
90
92
|
innerSpacingWithoutMarginX = _objectWithoutProperties(innerSpacing, _excluded2);
|
|
91
93
|
const isAnchor = Boolean(href);
|
|
92
|
-
const isButton = Boolean((
|
|
94
|
+
const isButton = Boolean((_ref = onClick !== null && onClick !== void 0 ? onClick : onKeyDown) !== null && _ref !== void 0 ? _ref : onKeyUp);
|
|
93
95
|
const linkable = isAnchor || isButton;
|
|
94
96
|
const contentTruncationStyle = cx(baseCss, shouldTruncate && truncationCss);
|
|
95
97
|
const content = useMemo(() => {
|
|
@@ -7,16 +7,18 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
9
|
import React, { forwardRef, memo } from 'react';
|
|
10
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
10
11
|
import { Icon } from '../icons/Icon';
|
|
11
12
|
import { Box } from '../layout/Box';
|
|
12
13
|
import { isRtl } from '../utils/isRtl';
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
export const cellAccessoryTestId = 'accessory';
|
|
15
|
-
export const CellAccessory = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function CellAccessory(
|
|
16
|
-
|
|
16
|
+
export const CellAccessory = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function CellAccessory(_props, ref) {
|
|
17
|
+
const mergedProps = useComponentConfig('CellAccessory', _props);
|
|
18
|
+
const {
|
|
17
19
|
type
|
|
18
|
-
} =
|
|
19
|
-
props = _objectWithoutProperties(
|
|
20
|
+
} = mergedProps,
|
|
21
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
20
22
|
let icon;
|
|
21
23
|
if (type === 'more') {
|
|
22
24
|
icon = /*#__PURE__*/_jsx(Icon, {
|
package/esm/cells/ListCell.js
CHANGED
|
@@ -9,6 +9,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
9
9
|
import React, { forwardRef, memo, useMemo } from 'react';
|
|
10
10
|
import { compactListHeight, listHeight } from '@coinbase/cds-common/tokens/cell';
|
|
11
11
|
import { cx } from '../cx';
|
|
12
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
12
13
|
import { Box } from '../layout/Box';
|
|
13
14
|
import { VStack } from '../layout/VStack';
|
|
14
15
|
import { Text } from '../typography/Text';
|
|
@@ -30,9 +31,10 @@ export const condensedOuterSpacing = {
|
|
|
30
31
|
paddingY: 0,
|
|
31
32
|
marginX: 0
|
|
32
33
|
};
|
|
33
|
-
export const ListCell = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
34
|
+
export const ListCell = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
34
35
|
var _props$borderRadius;
|
|
35
|
-
|
|
36
|
+
const mergedProps = useComponentConfig('ListCell', _props);
|
|
37
|
+
const {
|
|
36
38
|
as,
|
|
37
39
|
accessory,
|
|
38
40
|
accessoryNode,
|
|
@@ -66,8 +68,8 @@ export const ListCell = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =>
|
|
|
66
68
|
style,
|
|
67
69
|
subtitle,
|
|
68
70
|
subtitleNode
|
|
69
|
-
} =
|
|
70
|
-
props = _objectWithoutProperties(
|
|
71
|
+
} = mergedProps,
|
|
72
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
71
73
|
const Component = as !== null && as !== void 0 ? as : listCellDefaultElement;
|
|
72
74
|
const minHeight = spacingVariant === 'compact' ? compactListHeight : spacingVariant === 'normal' ? listHeight : undefined;
|
|
73
75
|
const accessoryType = selected && !disableSelectionAccessory ? 'selected' : accessory;
|
|
@@ -11,13 +11,15 @@ import { getRectWidthVariant } from '@coinbase/cds-common/utils/getRectWidthVari
|
|
|
11
11
|
import { VStack } from '../layout';
|
|
12
12
|
import { Fallback } from '../layout/Fallback';
|
|
13
13
|
const visuallyHiddenCss = "visuallyHiddenCss-vzen5l";
|
|
14
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
14
15
|
import { Cell } from './Cell';
|
|
15
16
|
import { CellAccessory } from './CellAccessory';
|
|
16
17
|
import { condensedInnerSpacing, condensedOuterSpacing } from './ListCell';
|
|
17
18
|
import { MediaFallback } from './MediaFallback';
|
|
18
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
-
export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(
|
|
20
|
-
|
|
20
|
+
export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_props) {
|
|
21
|
+
const mergedProps = useComponentConfig('ListCellFallback', _props);
|
|
22
|
+
const {
|
|
21
23
|
accessory,
|
|
22
24
|
accessoryNode,
|
|
23
25
|
classNames,
|
|
@@ -35,8 +37,8 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
35
37
|
innerSpacing,
|
|
36
38
|
outerSpacing,
|
|
37
39
|
accessibilityLabel = 'Loading'
|
|
38
|
-
} =
|
|
39
|
-
props = _objectWithoutProperties(
|
|
40
|
+
} = mergedProps,
|
|
41
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
40
42
|
// We cant use ListCell here as we need to account for percentage based widths.
|
|
41
43
|
// Flexbox collides with percentages also, so we need to wrap in normal divs.
|
|
42
44
|
|
package/esm/chips/Chip.js
CHANGED
|
@@ -10,6 +10,7 @@ import { forwardRef, Fragment, memo, useMemo } from 'react';
|
|
|
10
10
|
import { curves, durations } from '@coinbase/cds-common/motion/tokens';
|
|
11
11
|
import { chipMaxWidth } from '@coinbase/cds-common/tokens/chip';
|
|
12
12
|
import { cx } from '../cx';
|
|
13
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
13
14
|
import { Box, HStack } from '../layout';
|
|
14
15
|
import { InvertedThemeProvider, Pressable } from '../system';
|
|
15
16
|
import { Text } from '../typography/Text';
|
|
@@ -21,8 +22,9 @@ const transitionCss = "transitionCss-thdcix9";
|
|
|
21
22
|
* When onClick is provided, the ref will be typed as HTMLButtonElement.
|
|
22
23
|
* When onClick is not provided, the ref will be typed as HTMLDivElement.
|
|
23
24
|
*/
|
|
24
|
-
export const Chip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Chip(
|
|
25
|
-
|
|
25
|
+
export const Chip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Chip(_props, ref) {
|
|
26
|
+
const mergedProps = useComponentConfig('Chip', _props);
|
|
27
|
+
const {
|
|
26
28
|
as,
|
|
27
29
|
alignItems = 'center',
|
|
28
30
|
width = 'fit-content',
|
|
@@ -55,8 +57,8 @@ export const Chip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Chip(_ref
|
|
|
55
57
|
font = compact ? 'label1' : 'headline',
|
|
56
58
|
color = 'fg',
|
|
57
59
|
onClick
|
|
58
|
-
} =
|
|
59
|
-
props = _objectWithoutProperties(
|
|
60
|
+
} = mergedProps,
|
|
61
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
60
62
|
const WrapperComponent = (invertColorScheme !== null && invertColorScheme !== void 0 ? invertColorScheme : inverted) ? InvertedThemeProvider : Fragment;
|
|
61
63
|
const containerProps = {
|
|
62
64
|
background,
|
package/esm/chips/InputChip.js
CHANGED
|
@@ -7,18 +7,20 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7
7
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
8
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
9
|
import React, { forwardRef, memo } from 'react';
|
|
10
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
10
11
|
import { Icon } from '../icons/Icon';
|
|
11
12
|
import { MediaChip } from './MediaChip';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
export const InputChip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(
|
|
14
|
-
|
|
14
|
+
export const InputChip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
15
|
+
const mergedProps = useComponentConfig('InputChip', _props);
|
|
16
|
+
const {
|
|
15
17
|
value,
|
|
16
18
|
children = value,
|
|
17
19
|
accessibilityLabel = typeof children === 'string' ? "Remove ".concat(children) : 'Remove option',
|
|
18
20
|
invertColorScheme = true,
|
|
19
21
|
testID = 'input-chip'
|
|
20
|
-
} =
|
|
21
|
-
props = _objectWithoutProperties(
|
|
22
|
+
} = mergedProps,
|
|
23
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
22
24
|
return /*#__PURE__*/_jsx(MediaChip, _objectSpread(_objectSpread({
|
|
23
25
|
ref: ref,
|
|
24
26
|
accessibilityLabel: accessibilityLabel,
|
package/esm/chips/MediaChip.js
CHANGED
|
@@ -8,10 +8,12 @@ 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 { forwardRef, memo, useMemo } from 'react';
|
|
10
10
|
import { getMediaChipSpacingProps } from '@coinbase/cds-common/chips/getMediaChipSpacingProps';
|
|
11
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
11
12
|
import { Chip } from './Chip';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
export const MediaChip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function MediaChip(
|
|
14
|
-
|
|
14
|
+
export const MediaChip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function MediaChip(_props, ref) {
|
|
15
|
+
const mergedProps = useComponentConfig('MediaChip', _props);
|
|
16
|
+
const {
|
|
15
17
|
start,
|
|
16
18
|
children,
|
|
17
19
|
end,
|
|
@@ -23,8 +25,8 @@ export const MediaChip = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Medi
|
|
|
23
25
|
paddingBottom,
|
|
24
26
|
paddingStart,
|
|
25
27
|
paddingEnd
|
|
26
|
-
} =
|
|
27
|
-
props = _objectWithoutProperties(
|
|
28
|
+
} = mergedProps,
|
|
29
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
28
30
|
const spacingProps = useMemo(() => {
|
|
29
31
|
const defaults = getMediaChipSpacingProps({
|
|
30
32
|
compact: !!compact,
|
package/esm/chips/TabbedChips.js
CHANGED
|
@@ -9,6 +9,7 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
9
9
|
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; }
|
|
10
10
|
import React, { forwardRef, memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
11
11
|
import { useTabsContext } from '@coinbase/cds-common/tabs/TabsContext';
|
|
12
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
12
13
|
import { useHorizontalScrollToTarget } from '../hooks/useHorizontalScrollToTarget';
|
|
13
14
|
import { HStack } from '../layout';
|
|
14
15
|
import { Paddle, Tabs } from '../tabs';
|
|
@@ -49,8 +50,9 @@ const TabComponent = _ref => {
|
|
|
49
50
|
const TabsActiveIndicatorComponent = () => {
|
|
50
51
|
return null;
|
|
51
52
|
};
|
|
52
|
-
const TabbedChipsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function TabbedChips(
|
|
53
|
-
|
|
53
|
+
const TabbedChipsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function TabbedChips(_props, ref) {
|
|
54
|
+
const mergedProps = useComponentConfig('TabbedChips', _props);
|
|
55
|
+
const {
|
|
54
56
|
tabs,
|
|
55
57
|
value,
|
|
56
58
|
onChange,
|
|
@@ -63,8 +65,8 @@ const TabbedChipsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function
|
|
|
63
65
|
previousArrowAccessibilityLabel = 'Previous',
|
|
64
66
|
nextArrowAccessibilityLabel = 'Next',
|
|
65
67
|
width = '100%'
|
|
66
|
-
} =
|
|
67
|
-
props = _objectWithoutProperties(
|
|
68
|
+
} = mergedProps,
|
|
69
|
+
props = _objectWithoutProperties(mergedProps, _excluded2);
|
|
68
70
|
const [scrollTarget, setScrollTarget] = useState(null);
|
|
69
71
|
const {
|
|
70
72
|
scrollRef,
|
|
@@ -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 { IconButton } from '../buttons/IconButton';
|
|
11
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
11
12
|
import { Box, HStack, VStack } from '../layout';
|
|
12
13
|
import { InvertedThemeProvider } from '../system';
|
|
13
14
|
import { Text } from '../typography/Text';
|
|
14
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
export const Coachmark = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
16
|
-
|
|
16
|
+
export const Coachmark = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
17
|
+
const mergedProps = useComponentConfig('Coachmark', _props);
|
|
18
|
+
const {
|
|
17
19
|
title,
|
|
18
20
|
content,
|
|
19
21
|
checkbox,
|
|
@@ -23,8 +25,8 @@ export const Coachmark = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
|
|
|
23
25
|
width,
|
|
24
26
|
closeButtonAccessibilityLabel,
|
|
25
27
|
testID
|
|
26
|
-
} =
|
|
27
|
-
props = _objectWithoutProperties(
|
|
28
|
+
} = mergedProps,
|
|
29
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
28
30
|
return /*#__PURE__*/_jsx(InvertedThemeProvider, {
|
|
29
31
|
children: /*#__PURE__*/_jsxs(VStack, _objectSpread(_objectSpread({}, props), {}, {
|
|
30
32
|
ref: ref,
|
|
@@ -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, useCallback, useMemo, useState } from 'react';
|
|
10
10
|
import { m as motion } from 'framer-motion';
|
|
11
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
11
12
|
import { Box } from '../layout/Box';
|
|
12
13
|
import { useCollapsibleMotionProps } from './useCollapsibleMotionProps';
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
const COMPONENT_STATIC_CLASSNAME = 'cds-Collapsible';
|
|
15
|
-
export const Collapsible = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
16
|
-
|
|
16
|
+
export const Collapsible = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedRef) => {
|
|
17
|
+
const mergedProps = useComponentConfig('Collapsible', _props);
|
|
18
|
+
const {
|
|
17
19
|
children,
|
|
18
20
|
collapsed = true,
|
|
19
21
|
maxHeight,
|
|
@@ -32,7 +34,7 @@ export const Collapsible = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forw
|
|
|
32
34
|
paddingStart,
|
|
33
35
|
paddingTop,
|
|
34
36
|
paddingY
|
|
35
|
-
} =
|
|
37
|
+
} = mergedProps;
|
|
36
38
|
const _useCollapsibleMotion = useCollapsibleMotionProps({
|
|
37
39
|
collapsed,
|
|
38
40
|
direction,
|
package/esm/controls/Checkbox.js
CHANGED
|
@@ -9,6 +9,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
9
9
|
import React, { forwardRef, memo, useMemo } from 'react';
|
|
10
10
|
import { checkboxOpacityEnterConfig, checkboxOpacityExitConfig, checkboxScaleEnterConfig, checkboxScaleExitConfig } from '@coinbase/cds-common/motion/checkbox';
|
|
11
11
|
import { m as motion } from 'framer-motion';
|
|
12
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
12
13
|
import { useTheme } from '../hooks/useTheme';
|
|
13
14
|
import { Icon } from '../icons/Icon';
|
|
14
15
|
import { Box } from '../layout';
|
|
@@ -16,8 +17,9 @@ import { useMotionProps } from '../motion/useMotionProps';
|
|
|
16
17
|
import { Control } from './Control';
|
|
17
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
19
|
const checkboxCss = "checkboxCss-c198zdvk";
|
|
19
|
-
const CheckboxWithRef = /*#__PURE__*/forwardRef(function CheckboxWithRef(
|
|
20
|
-
|
|
20
|
+
const CheckboxWithRef = /*#__PURE__*/forwardRef(function CheckboxWithRef(_props, ref) {
|
|
21
|
+
const mergedProps = useComponentConfig('Checkbox', _props);
|
|
22
|
+
const {
|
|
21
23
|
children,
|
|
22
24
|
checked,
|
|
23
25
|
indeterminate,
|
|
@@ -28,8 +30,8 @@ const CheckboxWithRef = /*#__PURE__*/forwardRef(function CheckboxWithRef(_ref, r
|
|
|
28
30
|
borderWidth = 100,
|
|
29
31
|
elevation,
|
|
30
32
|
controlSize
|
|
31
|
-
} =
|
|
32
|
-
props = _objectWithoutProperties(
|
|
33
|
+
} = mergedProps,
|
|
34
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
33
35
|
const filled = checked || indeterminate;
|
|
34
36
|
const theme = useTheme();
|
|
35
37
|
const checkboxSize = controlSize !== null && controlSize !== void 0 ? controlSize : theme.controlSize.checkboxSize;
|
|
@@ -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 { forwardRef, memo, useId, useMemo } from 'react';
|
|
10
10
|
import { cx } from '../cx';
|
|
11
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
11
12
|
import { Box, HStack, VStack } from '../layout';
|
|
12
13
|
import { Pressable } from '../system/Pressable';
|
|
13
14
|
import { Text } from '../typography/Text';
|
|
@@ -15,8 +16,9 @@ import { Checkbox } from './Checkbox';
|
|
|
15
16
|
import { useSelectionCellControlHeight } from './useSelectionCellControlHeight';
|
|
16
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
18
|
const baseCss = "baseCss-b1n65grj";
|
|
18
|
-
const CheckboxCellWithRef = /*#__PURE__*/forwardRef(function CheckboxCell(
|
|
19
|
-
|
|
19
|
+
const CheckboxCellWithRef = /*#__PURE__*/forwardRef(function CheckboxCell(_props, ref) {
|
|
20
|
+
const mergedProps = useComponentConfig('CheckboxCell', _props);
|
|
21
|
+
const {
|
|
20
22
|
title,
|
|
21
23
|
description,
|
|
22
24
|
checked,
|
|
@@ -39,8 +41,8 @@ const CheckboxCellWithRef = /*#__PURE__*/forwardRef(function CheckboxCell(_ref,
|
|
|
39
41
|
className,
|
|
40
42
|
classNames,
|
|
41
43
|
styles
|
|
42
|
-
} =
|
|
43
|
-
props = _objectWithoutProperties(
|
|
44
|
+
} = mergedProps,
|
|
45
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
44
46
|
const generatedTitleId = useId();
|
|
45
47
|
const generatedDescriptionId = useId();
|
|
46
48
|
const titleId = customTitleId !== null && customTitleId !== void 0 ? customTitleId : generatedTitleId;
|
package/esm/controls/Control.js
CHANGED
|
@@ -12,6 +12,7 @@ import { usePrefixedId } from '@coinbase/cds-common/hooks/usePrefixedId';
|
|
|
12
12
|
import { zIndex } from '@coinbase/cds-common/tokens/zIndex';
|
|
13
13
|
import { isDevelopment } from '@coinbase/cds-utils';
|
|
14
14
|
import { cx } from '../cx';
|
|
15
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
15
16
|
import { Box } from '../layout/Box';
|
|
16
17
|
import { Interactable } from '../system/Interactable';
|
|
17
18
|
import { Text } from '../typography/Text';
|
|
@@ -21,9 +22,10 @@ const COMPONENT_STATIC_CLASSNAME = 'cds-Control';
|
|
|
21
22
|
const pointerCss = "pointerCss-p1pliz73";
|
|
22
23
|
const inputBaseCss = "inputBaseCss-i1hz3kk0";
|
|
23
24
|
const interactableCss = "interactableCss-i1h2gel3";
|
|
24
|
-
const ControlWithRef = /*#__PURE__*/forwardRef(function ControlWithRef(
|
|
25
|
+
const ControlWithRef = /*#__PURE__*/forwardRef(function ControlWithRef(_props, ref) {
|
|
25
26
|
var _htmlProps$id;
|
|
26
|
-
|
|
27
|
+
const mergedProps = useComponentConfig('Control', _props);
|
|
28
|
+
const {
|
|
27
29
|
type,
|
|
28
30
|
checked,
|
|
29
31
|
disabled,
|
|
@@ -43,8 +45,8 @@ const ControlWithRef = /*#__PURE__*/forwardRef(function ControlWithRef(_ref, ref
|
|
|
43
45
|
testID,
|
|
44
46
|
iconStyle,
|
|
45
47
|
labelStyle
|
|
46
|
-
} =
|
|
47
|
-
htmlProps = _objectWithoutProperties(
|
|
48
|
+
} = mergedProps,
|
|
49
|
+
htmlProps = _objectWithoutProperties(mergedProps, _excluded);
|
|
48
50
|
if (isDevelopment() && !children && !ariaLabelledby) {
|
|
49
51
|
console.warn("Please provide an aria label for the control component ".concat(value, " either through the children or aria-labelledby prop."));
|
|
50
52
|
}
|
|
@@ -9,14 +9,16 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
9
9
|
import React, { forwardRef, memo, useId } from 'react';
|
|
10
10
|
import { isDevelopment } from '@coinbase/cds-utils';
|
|
11
11
|
import { cx } from '../cx';
|
|
12
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
12
13
|
import { Box } from '../layout';
|
|
13
14
|
import { Text } from '../typography';
|
|
14
15
|
|
|
15
16
|
// Styles for container reset
|
|
16
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
18
|
const containerCss = "containerCss-c1holtq6";
|
|
18
|
-
const ControlGroupWithRef = /*#__PURE__*/forwardRef(function ControlGroup(
|
|
19
|
-
|
|
19
|
+
const ControlGroupWithRef = /*#__PURE__*/forwardRef(function ControlGroup(_props, ref) {
|
|
20
|
+
const mergedProps = useComponentConfig('ControlGroup', _props);
|
|
21
|
+
const {
|
|
20
22
|
ControlComponent: ControlComponent,
|
|
21
23
|
options,
|
|
22
24
|
label,
|
|
@@ -28,8 +30,8 @@ const ControlGroupWithRef = /*#__PURE__*/forwardRef(function ControlGroup(_ref,
|
|
|
28
30
|
gap = 2,
|
|
29
31
|
name,
|
|
30
32
|
role = 'group'
|
|
31
|
-
} =
|
|
32
|
-
restProps = _objectWithoutProperties(
|
|
33
|
+
} = mergedProps,
|
|
34
|
+
restProps = _objectWithoutProperties(mergedProps, _excluded);
|
|
33
35
|
const generatedId = useId();
|
|
34
36
|
const labelId = "".concat(generatedId, "-label");
|
|
35
37
|
if (isDevelopment() && !label && !ariaLabelledby) {
|
|
@@ -11,6 +11,7 @@ import { durations } from '@coinbase/cds-common/motion/tokens';
|
|
|
11
11
|
import { inputStackGap } from '@coinbase/cds-common/tokens/input';
|
|
12
12
|
import { accessibleOpacityDisabled } from '@coinbase/cds-common/tokens/interactable';
|
|
13
13
|
import { cx } from '../cx';
|
|
14
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
14
15
|
import { HStack } from '../layout/HStack';
|
|
15
16
|
import { VStack } from '../layout/VStack';
|
|
16
17
|
import { ColorSurge } from '../motion/ColorSurge';
|
|
@@ -35,8 +36,9 @@ const variantColorMap = {
|
|
|
35
36
|
foregroundMuted: 'bgLineHeavy',
|
|
36
37
|
secondary: 'bgSecondary'
|
|
37
38
|
};
|
|
38
|
-
export const InputStack = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((
|
|
39
|
-
|
|
39
|
+
export const InputStack = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
|
|
40
|
+
const mergedProps = useComponentConfig('InputStack', _props);
|
|
41
|
+
const {
|
|
40
42
|
width = '100%',
|
|
41
43
|
prependNode,
|
|
42
44
|
endNode,
|
|
@@ -58,8 +60,8 @@ export const InputStack = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref)
|
|
|
58
60
|
labelVariant = 'outside',
|
|
59
61
|
blendStyles,
|
|
60
62
|
inputBackground = 'bg'
|
|
61
|
-
} =
|
|
62
|
-
props = _objectWithoutProperties(
|
|
63
|
+
} = mergedProps,
|
|
64
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
63
65
|
const focusedVariant = useMemo(() => focused && variant !== 'positive' && variant !== 'negative' ? 'primary' : variant, [focused, variant]);
|
|
64
66
|
const inputBorderRadius = useMemo(() => {
|
|
65
67
|
return _objectSpread(_objectSpread({}, prependNode ? {
|
package/esm/controls/Radio.js
CHANGED
|
@@ -9,6 +9,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
9
9
|
import React, { forwardRef, memo } from 'react';
|
|
10
10
|
import { checkboxOpacityEnterConfig, checkboxOpacityExitConfig, checkboxScaleEnterConfig, checkboxScaleExitConfig } from '@coinbase/cds-common/motion/checkbox';
|
|
11
11
|
import { m as motion } from 'framer-motion';
|
|
12
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
12
13
|
import { useTheme } from '../hooks/useTheme';
|
|
13
14
|
import { Box } from '../layout';
|
|
14
15
|
import { useMotionProps } from '../motion/useMotionProps';
|
|
@@ -34,8 +35,9 @@ const DotSvg = _ref => {
|
|
|
34
35
|
});
|
|
35
36
|
};
|
|
36
37
|
const baseCss = "baseCss-b1rohblb";
|
|
37
|
-
const RadioWithRef = /*#__PURE__*/forwardRef(function RadioWithRef(
|
|
38
|
-
|
|
38
|
+
const RadioWithRef = /*#__PURE__*/forwardRef(function RadioWithRef(_props, ref) {
|
|
39
|
+
const mergedProps = useComponentConfig('Radio', _props);
|
|
40
|
+
const {
|
|
39
41
|
children,
|
|
40
42
|
controlColor = 'bgPrimary',
|
|
41
43
|
checked = false,
|
|
@@ -45,8 +47,8 @@ const RadioWithRef = /*#__PURE__*/forwardRef(function RadioWithRef(_ref2, ref) {
|
|
|
45
47
|
elevation,
|
|
46
48
|
controlSize,
|
|
47
49
|
dotSize
|
|
48
|
-
} =
|
|
49
|
-
props = _objectWithoutProperties(
|
|
50
|
+
} = mergedProps,
|
|
51
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
50
52
|
const theme = useTheme();
|
|
51
53
|
const iconWidth = controlSize !== null && controlSize !== void 0 ? controlSize : theme.controlSize.radioSize;
|
|
52
54
|
const innerContainerMotionProps = useMotionProps({
|
|
@@ -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 { forwardRef, memo, useId, useMemo } from 'react';
|
|
10
10
|
import { cx } from '../cx';
|
|
11
|
+
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
11
12
|
import { Box, HStack, VStack } from '../layout';
|
|
12
13
|
import { Pressable } from '../system';
|
|
13
14
|
import { Text } from '../typography/Text';
|
|
@@ -15,8 +16,9 @@ import { Radio } from './Radio';
|
|
|
15
16
|
import { useSelectionCellControlHeight } from './useSelectionCellControlHeight';
|
|
16
17
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
18
|
const baseCss = "baseCss-b11e1r8n";
|
|
18
|
-
const RadioCellWithRef = /*#__PURE__*/forwardRef(function RadioCell(
|
|
19
|
-
|
|
19
|
+
const RadioCellWithRef = /*#__PURE__*/forwardRef(function RadioCell(_props, ref) {
|
|
20
|
+
const mergedProps = useComponentConfig('RadioCell', _props);
|
|
21
|
+
const {
|
|
20
22
|
title,
|
|
21
23
|
description,
|
|
22
24
|
checked,
|
|
@@ -37,8 +39,8 @@ const RadioCellWithRef = /*#__PURE__*/forwardRef(function RadioCell(_ref, ref) {
|
|
|
37
39
|
className,
|
|
38
40
|
classNames,
|
|
39
41
|
styles
|
|
40
|
-
} =
|
|
41
|
-
props = _objectWithoutProperties(
|
|
42
|
+
} = mergedProps,
|
|
43
|
+
props = _objectWithoutProperties(mergedProps, _excluded);
|
|
42
44
|
const generatedTitleId = useId();
|
|
43
45
|
const generatedDescriptionId = useId();
|
|
44
46
|
const titleId = customTitleId !== null && customTitleId !== void 0 ? customTitleId : generatedTitleId;
|