@coinbase/cds-web 9.0.0-rc.2 → 9.0.0-rc.3

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 (69) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dts/buttons/IconButton.d.ts +15 -1
  3. package/dts/buttons/IconButton.d.ts.map +1 -1
  4. package/dts/chips/TabbedChips.d.ts.map +1 -1
  5. package/dts/collapsible/Collapsible.d.ts.map +1 -1
  6. package/dts/controls/InputLabel.d.ts.map +1 -1
  7. package/dts/controls/SearchInput.d.ts +2 -0
  8. package/dts/controls/SearchInput.d.ts.map +1 -1
  9. package/dts/controls/TextInput.d.ts.map +1 -1
  10. package/dts/core/createThemeCssVars.d.ts.map +1 -1
  11. package/dts/core/theme.d.ts +15 -0
  12. package/dts/core/theme.d.ts.map +1 -1
  13. package/dts/illustrations/HeroSquare.d.ts.map +1 -1
  14. package/dts/illustrations/Pictogram.d.ts.map +1 -1
  15. package/dts/illustrations/SpotIcon.d.ts.map +1 -1
  16. package/dts/illustrations/SpotRectangle.d.ts.map +1 -1
  17. package/dts/illustrations/SpotSquare.d.ts.map +1 -1
  18. package/dts/illustrations/createIllustration.d.ts +19 -3
  19. package/dts/illustrations/createIllustration.d.ts.map +1 -1
  20. package/dts/navigation/NavigationBar.d.ts.map +1 -1
  21. package/dts/page/PageFooter.d.ts +4 -0
  22. package/dts/page/PageFooter.d.ts.map +1 -1
  23. package/dts/system/ThemeProvider.d.ts.map +1 -1
  24. package/dts/tabs/DefaultTab.d.ts +11 -2
  25. package/dts/tabs/DefaultTab.d.ts.map +1 -1
  26. package/dts/tabs/SegmentedTab.d.ts +13 -12
  27. package/dts/tabs/SegmentedTab.d.ts.map +1 -1
  28. package/dts/tabs/Tabs.d.ts +9 -3
  29. package/dts/tabs/Tabs.d.ts.map +1 -1
  30. package/dts/tag/Tag.d.ts +3 -2
  31. package/dts/tag/Tag.d.ts.map +1 -1
  32. package/dts/themes/coinbaseDenseTheme.d.ts +34 -2
  33. package/dts/themes/coinbaseDenseTheme.d.ts.map +1 -1
  34. package/dts/themes/coinbaseHighContrastTheme.d.ts +32 -0
  35. package/dts/themes/coinbaseHighContrastTheme.d.ts.map +1 -1
  36. package/dts/themes/coinbaseTheme.d.ts +34 -2
  37. package/dts/themes/coinbaseTheme.d.ts.map +1 -1
  38. package/dts/themes/defaultHighContrastTheme.d.ts +32 -0
  39. package/dts/themes/defaultHighContrastTheme.d.ts.map +1 -1
  40. package/dts/themes/defaultTheme.d.ts +34 -2
  41. package/dts/themes/defaultTheme.d.ts.map +1 -1
  42. package/dts/visualizations/chart/PeriodSelector.d.ts.map +1 -1
  43. package/esm/buttons/IconButton.js +26 -5
  44. package/esm/chips/TabbedChips.js +4 -2
  45. package/esm/collapsible/Collapsible.js +11 -15
  46. package/esm/controls/InputLabel.js +4 -3
  47. package/esm/controls/TextInput.js +7 -1
  48. package/esm/core/createThemeCssVars.js +23 -0
  49. package/esm/core/theme.js +3 -0
  50. package/esm/illustrations/HeroSquare.js +2 -1
  51. package/esm/illustrations/Pictogram.js +2 -1
  52. package/esm/illustrations/SpotIcon.js +2 -1
  53. package/esm/illustrations/SpotRectangle.js +2 -1
  54. package/esm/illustrations/SpotSquare.js +2 -1
  55. package/esm/illustrations/createIllustration.js +65 -19
  56. package/esm/navigation/NavigationBar.js +14 -10
  57. package/esm/page/PageFooter.js +20 -4
  58. package/esm/page/__figma__/PageFooter.figma.js +50 -6
  59. package/esm/system/ThemeProvider.js +3 -1
  60. package/esm/tabs/DefaultTab.css +1 -2
  61. package/esm/tabs/DefaultTab.js +6 -5
  62. package/esm/tabs/Tabs.js +8 -2
  63. package/esm/tag/Tag.js +13 -3
  64. package/esm/themes/coinbaseHighContrastTheme.js +32 -0
  65. package/esm/themes/coinbaseTheme.js +34 -2
  66. package/esm/themes/defaultHighContrastTheme.js +32 -0
  67. package/esm/themes/defaultTheme.js +34 -2
  68. package/esm/visualizations/chart/PeriodSelector.js +4 -3
  69. package/package.json +3 -3
@@ -77,10 +77,6 @@ export const NavigationBar = /*#__PURE__*/memo(_props => {
77
77
  }, props), {}, {
78
78
  children: [/*#__PURE__*/_jsxs(HStack, {
79
79
  alignItems: "center",
80
- gap: columnGap !== null && columnGap !== void 0 ? columnGap : {
81
- base: 2,
82
- phone: 1
83
- },
84
80
  overflow: "auto",
85
81
  children: [/*#__PURE__*/_jsx(Collapsible, {
86
82
  collapsed: !start,
@@ -96,14 +92,22 @@ export const NavigationBar = /*#__PURE__*/memo(_props => {
96
92
  style: styles === null || styles === void 0 ? void 0 : styles.start,
97
93
  children: startNode
98
94
  })
99
- }), /*#__PURE__*/_jsx(HStack, {
95
+ }), /*#__PURE__*/_jsxs(HStack, {
100
96
  alignItems: "center",
101
- className: cx(navigationBarClassNames.content, classNames === null || classNames === void 0 ? void 0 : classNames.content),
102
97
  flexGrow: 1,
103
- gap: 1,
104
- style: styles === null || styles === void 0 ? void 0 : styles.content,
105
- children: children
106
- }), end]
98
+ gap: columnGap !== null && columnGap !== void 0 ? columnGap : {
99
+ base: 2,
100
+ phone: 1
101
+ },
102
+ children: [/*#__PURE__*/_jsx(HStack, {
103
+ alignItems: "center",
104
+ className: cx(navigationBarClassNames.content, classNames === null || classNames === void 0 ? void 0 : classNames.content),
105
+ flexGrow: 1,
106
+ gap: 1,
107
+ style: styles === null || styles === void 0 ? void 0 : styles.content,
108
+ children: children
109
+ }), end]
110
+ })]
107
111
  }), bottom]
108
112
  }));
109
113
  });
@@ -1,4 +1,4 @@
1
- const _excluded = ["action", "height", "justifyContent", "paddingX", "paddingY", "role"];
1
+ const _excluded = ["action", "legalText", "height", "justifyContent", "paddingX", "paddingY", "role"];
2
2
  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; }
3
3
  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; }
4
4
  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; }
@@ -10,7 +10,9 @@ import React, { forwardRef, memo } from 'react';
10
10
  import { pageFooterHeight } from '@coinbase/cds-common/tokens/page';
11
11
  import { useComponentConfig } from '../hooks/useComponentConfig';
12
12
  import { Box } from '../layout/Box';
13
- import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { VStack } from '../layout/VStack';
14
+ import { Text } from '../typography/Text';
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
16
  export const pageFooterPaddingX = {
15
17
  phone: 3,
16
18
  tablet: 4,
@@ -21,11 +23,17 @@ export const pageFooterJustifyContent = {
21
23
  tablet: 'flex-end',
22
24
  desktop: 'flex-end'
23
25
  };
26
+ const legalTextAlignItems = {
27
+ phone: 'center',
28
+ tablet: 'flex-end',
29
+ desktop: 'flex-end'
30
+ };
24
31
  export const PageFooter = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) => {
25
32
  const mergedProps = useComponentConfig('PageFooter', _props);
26
33
  const {
27
34
  action,
28
- height = pageFooterHeight,
35
+ legalText,
36
+ height = legalText ? undefined : pageFooterHeight,
29
37
  justifyContent = pageFooterJustifyContent,
30
38
  paddingX = pageFooterPaddingX,
31
39
  paddingY = 1.5,
@@ -40,6 +48,14 @@ export const PageFooter = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
40
48
  paddingY: paddingY,
41
49
  role: role
42
50
  }, props), {}, {
43
- children: action
51
+ children: legalText ? /*#__PURE__*/_jsxs(VStack, {
52
+ alignItems: legalTextAlignItems,
53
+ gap: 2,
54
+ children: [action, /*#__PURE__*/_jsx(Text, {
55
+ color: "fgMuted",
56
+ font: "legal",
57
+ children: legalText
58
+ })]
59
+ }) : action
44
60
  }));
45
61
  }));
@@ -1,17 +1,61 @@
1
+ import React from 'react';
1
2
  import { figma } from '@figma/code-connect';
3
+ import { Button } from '../../buttons/Button';
4
+ import { ButtonGroup } from '../../buttons/ButtonGroup';
2
5
  import { PageFooter } from '../PageFooter';
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- figma.connect(PageFooter, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=17685%3A3266', {
5
- imports: ["import { PageFooter } from '@coinbase/cds-web/page/PageFooter'"],
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ const url = 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=17685%3A3266';
8
+ figma.connect(PageFooter, url, {
9
+ imports: ["import { PageFooter } from '@coinbase/cds-web/page/PageFooter'", "import { Button } from '@coinbase/cds-web/buttons/Button'"],
10
+ variant: {
11
+ '# of actions': '1'
12
+ },
6
13
  props: {
7
- action: figma.children('ButtonGroup')
14
+ action: figma.children('Button'),
15
+ legalText: figma.boolean('show legal text', {
16
+ true: 'Your legal text here.',
17
+ false: undefined
18
+ })
8
19
  },
9
20
  example: _ref => {
10
21
  let {
11
- action
22
+ legalText
12
23
  } = _ref;
13
24
  return /*#__PURE__*/_jsx(PageFooter, {
14
- action: action
25
+ action: /*#__PURE__*/_jsx(Button, {
26
+ variant: "primary",
27
+ children: "Next"
28
+ }),
29
+ legalText: legalText
30
+ });
31
+ }
32
+ });
33
+ figma.connect(PageFooter, url, {
34
+ imports: ["import { PageFooter } from '@coinbase/cds-web/page/PageFooter'", "import { Button } from '@coinbase/cds-web/buttons/Button'", "import { ButtonGroup } from '@coinbase/cds-web/buttons/ButtonGroup'"],
35
+ variant: {
36
+ '# of actions': '2'
37
+ },
38
+ props: {
39
+ legalText: figma.boolean('show legal text', {
40
+ true: 'Your legal text here.',
41
+ false: undefined
42
+ })
43
+ },
44
+ example: _ref2 => {
45
+ let {
46
+ legalText
47
+ } = _ref2;
48
+ return /*#__PURE__*/_jsx(PageFooter, {
49
+ action: /*#__PURE__*/_jsxs(ButtonGroup, {
50
+ children: [/*#__PURE__*/_jsx(Button, {
51
+ variant: "secondary",
52
+ children: "Back"
53
+ }), /*#__PURE__*/_jsx(Button, {
54
+ variant: "primary",
55
+ children: "Next"
56
+ })]
57
+ }),
58
+ legalText: legalText
15
59
  });
16
60
  }
17
61
  });
@@ -73,6 +73,7 @@ export const ThemeProvider = /*#__PURE__*/memo(_ref2 => {
73
73
  const themeApi = useMemo(() => {
74
74
  const activeSpectrumKey = activeColorScheme === 'dark' ? 'darkSpectrum' : 'lightSpectrum';
75
75
  const activeColorKey = activeColorScheme === 'dark' ? 'darkColor' : 'lightColor';
76
+ const activeIllustrationKey = activeColorScheme === 'dark' ? 'darkIllustrationColor' : 'lightIllustrationColor';
76
77
  const inverseSpectrumKey = activeColorScheme === 'dark' ? 'lightSpectrum' : 'darkSpectrum';
77
78
  const inverseColorKey = activeColorScheme === 'dark' ? 'lightColor' : 'darkColor';
78
79
  if (!theme[activeColorKey]) throw Error("ThemeProvider activeColorScheme is ".concat(activeColorScheme, " but no ").concat(activeColorScheme, " colors are defined for the theme. See the docs https://cds.coinbase.com/getting-started/theming"));
@@ -82,7 +83,8 @@ export const ThemeProvider = /*#__PURE__*/memo(_ref2 => {
82
83
  return _objectSpread(_objectSpread({}, theme), {}, {
83
84
  activeColorScheme: activeColorScheme,
84
85
  spectrum: theme[activeSpectrumKey],
85
- color: theme[activeColorKey]
86
+ color: theme[activeColorKey],
87
+ illustrationColor: theme[activeIllustrationKey]
86
88
  });
87
89
  }, [theme, activeColorScheme]);
88
90
  const parentTheme = useContext(ThemeContext);
@@ -1,3 +1,2 @@
1
1
  @layer cds{.pressableCss-p1gyavxu{margin:0;padding:0;white-space:nowrap;}
2
- .insetFocusRingCss-i14sq9yf{position:relative;}.insetFocusRingCss-i14sq9yf:focus{outline:none;}.insetFocusRingCss-i14sq9yf:focus-visible{outline-style:solid;outline-width:2px;outline-color:var(--color-bgPrimary);outline-offset:-3px;border-radius:4px;}
3
- .labelPaddingCss-lu2xm1d{padding-top:var(--space-2);padding-bottom:calc(var(--space-2) - 2px);}}
2
+ .insetFocusRingCss-i14sq9yf{position:relative;}.insetFocusRingCss-i14sq9yf:focus{outline:none;}.insetFocusRingCss-i14sq9yf:focus-visible{outline-style:solid;outline-width:2px;outline-color:var(--color-bgPrimary);outline-offset:-3px;border-radius:4px;}}
@@ -1,4 +1,4 @@
1
- const _excluded = ["id", "label", "disabled", "onClick", "count", "max", "accessibilityLabel", "className"];
1
+ const _excluded = ["id", "label", "disabled", "onClick", "count", "max", "accessibilityLabel", "className", "color", "activeColor"];
2
2
  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; }
3
3
  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; }
4
4
  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; }
@@ -18,7 +18,6 @@ import { Text } from '../typography/Text';
18
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
19
  const pressableCss = "pressableCss-p1gyavxu";
20
20
  const insetFocusRingCss = "insetFocusRingCss-i14sq9yf";
21
- const labelPaddingCss = "labelPaddingCss-lu2xm1d";
22
21
  const DefaultTabComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
23
22
  let {
24
23
  id,
@@ -28,7 +27,9 @@ const DefaultTabComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref
28
27
  count,
29
28
  max,
30
29
  accessibilityLabel,
31
- className
30
+ className,
31
+ color = 'fg',
32
+ activeColor = 'fgPrimary'
32
33
  } = _ref,
33
34
  props = _objectWithoutProperties(_ref, _excluded);
34
35
  const {
@@ -59,10 +60,10 @@ const DefaultTabComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref
59
60
  gap: 0.5,
60
61
  children: [/*#__PURE__*/_jsx(Text, {
61
62
  as: "h2",
62
- className: labelPaddingCss,
63
- color: isActive ? 'fgPrimary' : 'fg',
63
+ color: isActive ? activeColor : color,
64
64
  display: "block",
65
65
  font: "headline",
66
+ paddingY: 2,
66
67
  children: label
67
68
  }), !!count && /*#__PURE__*/_jsx(DotCount, {
68
69
  accessibilityLabel: "".concat(accessibilityLabel !== null && accessibilityLabel !== void 0 ? accessibilityLabel : typeof label === 'string' ? label : '', " count: ").concat(count),
package/esm/tabs/Tabs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const _excluded = ["id", "registerRef"],
2
- _excluded2 = ["tabs", "TabComponent", "TabsActiveIndicatorComponent", "activeBackground", "activeTab", "onActiveTabElementChange", "disabled", "onChange", "className", "classNames", "styles", "role", "position", "width", "borderRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "style", "testID"],
2
+ _excluded2 = ["tabs", "TabComponent", "TabsActiveIndicatorComponent", "activeBackground", "activeColor", "activeTab", "color", "onActiveTabElementChange", "disabled", "onChange", "className", "classNames", "styles", "role", "position", "width", "borderRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "style", "testID"],
3
3
  _excluded3 = ["activeTabRect", "position", "testID"];
4
4
  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; }
5
5
  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; }
@@ -52,7 +52,9 @@ const TabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) =>
52
52
  TabComponent = DefaultTab,
53
53
  TabsActiveIndicatorComponent = DefaultTabsActiveIndicator,
54
54
  activeBackground,
55
+ activeColor,
55
56
  activeTab,
57
+ color,
56
58
  onActiveTabElementChange,
57
59
  disabled,
58
60
  onChange,
@@ -144,6 +146,7 @@ const TabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) =>
144
146
  borderTopLeftRadius: borderTopLeftRadius,
145
147
  borderTopRightRadius: borderTopRightRadius,
146
148
  className: cx(className, classNames === null || classNames === void 0 ? void 0 : classNames.root),
149
+ color: color,
147
150
  onKeyDown: handleTabsContainerKeyDown,
148
151
  opacity: disabled ? accessibleOpacityDisabled : 1,
149
152
  position: position,
@@ -168,7 +171,10 @@ const TabsComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) =>
168
171
  }), tabs.map(props => {
169
172
  var _props$Component;
170
173
  const RenderedTab = (_props$Component = props.Component) !== null && _props$Component !== void 0 ? _props$Component : TabComponent;
171
- const renderedTabProps = _objectSpread(_objectSpread({}, props), {}, {
174
+ const renderedTabProps = _objectSpread(_objectSpread({
175
+ activeColor,
176
+ color
177
+ }, props), {}, {
172
178
  'data-rendered-tab': true,
173
179
  className: classNames === null || classNames === void 0 ? void 0 : classNames.tab,
174
180
  role: 'tab',
package/esm/tag/Tag.js CHANGED
@@ -1,4 +1,4 @@
1
- const _excluded = ["children", "intent", "emphasis", "colorScheme", "background", "color", "start", "startIcon", "startIconActive", "end", "endIcon", "endIconActive", "display", "alignItems", "gap", "justifyContent", "paddingY", "testID"];
1
+ const _excluded = ["children", "intent", "emphasis", "colorScheme", "background", "color", "start", "startIcon", "startIconActive", "end", "endIcon", "endIconActive", "display", "alignItems", "gap", "justifyContent", "paddingX", "paddingY", "font", "fontFamily", "fontSize", "fontWeight", "lineHeight", "testID"];
2
2
  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; }
3
3
  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; }
4
4
  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; }
@@ -35,7 +35,13 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedR
35
35
  alignItems = 'center',
36
36
  gap = 0.5,
37
37
  justifyContent = 'center',
38
+ paddingX,
38
39
  paddingY = 0.25,
40
+ font,
41
+ fontFamily,
42
+ fontSize,
43
+ fontWeight,
44
+ lineHeight,
39
45
  testID = tagStaticClassName
40
46
  } = mergedProps,
41
47
  props = _objectWithoutProperties(mergedProps, _excluded);
@@ -58,7 +64,7 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedR
58
64
  display: display,
59
65
  gap: gap,
60
66
  justifyContent: justifyContent,
61
- paddingX: tagHorizontalSpacing[intent],
67
+ paddingX: paddingX !== null && paddingX !== void 0 ? paddingX : tagHorizontalSpacing[intent],
62
68
  paddingY: paddingY,
63
69
  style: boxStyles,
64
70
  testID: testID
@@ -77,7 +83,11 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedR
77
83
  }) : null, /*#__PURE__*/_jsx(Text, {
78
84
  color: "currentColor",
79
85
  display: "inline",
80
- font: tagFontMap[intent],
86
+ font: font !== null && font !== void 0 ? font : tagFontMap[intent],
87
+ fontFamily: fontFamily,
88
+ fontSize: fontSize,
89
+ fontWeight: fontWeight,
90
+ lineHeight: lineHeight,
81
91
  overflow: "truncate",
82
92
  testID: "".concat(testID, "--text"),
83
93
  children: children
@@ -569,6 +569,38 @@ export const coinbaseHighContrastTheme = {
569
569
  caption: 'uppercase',
570
570
  legal: 'none'
571
571
  },
572
+ lightIllustrationColor: {
573
+ primary: "rgb(".concat(lightSpectrum.blue60, ")"),
574
+ black: "rgb(".concat(lightSpectrum.gray100, ")"),
575
+ white: "rgb(".concat(lightSpectrum.gray0, ")"),
576
+ gray: "rgb(".concat(lightSpectrum.gray20, ")"),
577
+ gray2: "rgb(10, 11, 15)",
578
+ gray3: "rgb(206, 210, 220)",
579
+ positive: "rgb(".concat(lightSpectrum.green30, ")"),
580
+ negative: "rgb(".concat(lightSpectrum.red50, ")"),
581
+ accent1: "rgb(255, 210, 0)",
582
+ accent2: "rgb(".concat(lightSpectrum.teal15, ")"),
583
+ accent3: "rgb(".concat(lightSpectrum.orange40, ")"),
584
+ accent4: "rgb(".concat(lightSpectrum.blue20, ")"),
585
+ invert: "rgb(10, 11, 14)",
586
+ invert2: "rgb(255, 255, 254)"
587
+ },
588
+ darkIllustrationColor: {
589
+ primary: "rgb(".concat(darkSpectrum.blue70, ")"),
590
+ black: "rgb(".concat(darkSpectrum.gray0, ")"),
591
+ white: "rgb(".concat(darkSpectrum.gray100, ")"),
592
+ gray: "rgb(".concat(darkSpectrum.gray30, ")"),
593
+ gray2: "rgb(".concat(darkSpectrum.gray30, ")"),
594
+ gray3: "rgb(".concat(darkSpectrum.gray100, ")"),
595
+ positive: "rgb(".concat(darkSpectrum.green70, ")"),
596
+ negative: "rgb(".concat(darkSpectrum.red60, ")"),
597
+ accent1: "rgb(236, 208, 105)",
598
+ accent2: "rgb(".concat(darkSpectrum.teal80, ")"),
599
+ accent3: "rgb(".concat(darkSpectrum.orange60, ")"),
600
+ accent4: "rgb(".concat(darkSpectrum.blue80, ")"),
601
+ invert: "rgb(".concat(darkSpectrum.gray100, ")"),
602
+ invert2: "rgb(".concat(darkSpectrum.gray50, ")")
603
+ },
572
604
  shadow: {
573
605
  elevation1: '0px 8px 12px rgba(0, 0, 0, 0.12)',
574
606
  elevation2: '0px 8px 24px rgba(0, 0, 0, 0.12)'
@@ -316,7 +316,7 @@ export const coinbaseTheme = {
316
316
  bgNegativeWash: "rgb(".concat(lightSpectrum.red0, ")"),
317
317
  bgPositive: "rgb(".concat(lightSpectrum.green60, ")"),
318
318
  bgPositiveWash: "rgb(".concat(lightSpectrum.green0, ")"),
319
- bgWarning: "rgb(".concat(lightSpectrum.orange40, ")"),
319
+ bgWarning: "rgb(".concat(lightSpectrum.orange60, ")"),
320
320
  bgWarningWash: "rgb(".concat(lightSpectrum.orange0, ")"),
321
321
  currentColor: 'currentColor',
322
322
  // Line
@@ -367,7 +367,7 @@ export const coinbaseTheme = {
367
367
  bgNegativeWash: "rgb(".concat(darkSpectrum.red0, ")"),
368
368
  bgPositive: "rgb(".concat(darkSpectrum.green60, ")"),
369
369
  bgPositiveWash: "rgb(".concat(darkSpectrum.green0, ")"),
370
- bgWarning: "rgb(".concat(darkSpectrum.yellow50, ")"),
370
+ bgWarning: "rgb(".concat(darkSpectrum.orange60, ")"),
371
371
  bgWarningWash: "rgb(".concat(darkSpectrum.orange0, ")"),
372
372
  currentColor: 'currentColor',
373
373
  // Line
@@ -572,5 +572,37 @@ export const coinbaseTheme = {
572
572
  shadow: {
573
573
  elevation1: '0px 8px 12px rgba(0, 0, 0, 0.12)',
574
574
  elevation2: '0px 8px 24px rgba(0, 0, 0, 0.12)'
575
+ },
576
+ lightIllustrationColor: {
577
+ primary: "rgb(".concat(lightSpectrum.blue60, ")"),
578
+ black: "rgb(".concat(lightSpectrum.gray100, ")"),
579
+ white: "rgb(".concat(lightSpectrum.gray0, ")"),
580
+ gray: "rgb(".concat(lightSpectrum.gray20, ")"),
581
+ gray2: "rgb(10, 11, 15)",
582
+ gray3: "rgb(206, 210, 220)",
583
+ positive: "rgb(".concat(lightSpectrum.green30, ")"),
584
+ negative: "rgb(".concat(lightSpectrum.red50, ")"),
585
+ accent1: "rgb(255, 210, 0)",
586
+ accent2: "rgb(".concat(lightSpectrum.teal15, ")"),
587
+ accent3: "rgb(".concat(lightSpectrum.orange40, ")"),
588
+ accent4: "rgb(".concat(lightSpectrum.blue20, ")"),
589
+ invert: "rgb(10, 11, 14)",
590
+ invert2: "rgb(255, 255, 254)"
591
+ },
592
+ darkIllustrationColor: {
593
+ primary: "rgb(".concat(darkSpectrum.blue70, ")"),
594
+ black: "rgb(".concat(darkSpectrum.gray0, ")"),
595
+ white: "rgb(".concat(darkSpectrum.gray100, ")"),
596
+ gray: "rgb(".concat(darkSpectrum.gray30, ")"),
597
+ gray2: "rgb(".concat(darkSpectrum.gray30, ")"),
598
+ gray3: "rgb(".concat(darkSpectrum.gray100, ")"),
599
+ positive: "rgb(".concat(darkSpectrum.green70, ")"),
600
+ negative: "rgb(".concat(darkSpectrum.red60, ")"),
601
+ accent1: "rgb(236, 208, 105)",
602
+ accent2: "rgb(".concat(darkSpectrum.teal80, ")"),
603
+ accent3: "rgb(".concat(darkSpectrum.orange60, ")"),
604
+ accent4: "rgb(".concat(darkSpectrum.blue80, ")"),
605
+ invert: "rgb(".concat(darkSpectrum.gray100, ")"),
606
+ invert2: "rgb(".concat(darkSpectrum.gray50, ")")
575
607
  }
576
608
  };
@@ -569,6 +569,38 @@ export const defaultHighContrastTheme = {
569
569
  caption: 'uppercase',
570
570
  legal: 'none'
571
571
  },
572
+ lightIllustrationColor: {
573
+ primary: "rgb(".concat(lightSpectrum.blue60, ")"),
574
+ black: "rgb(".concat(lightSpectrum.gray100, ")"),
575
+ white: "rgb(".concat(lightSpectrum.gray0, ")"),
576
+ gray: "rgb(".concat(lightSpectrum.gray20, ")"),
577
+ gray2: "rgb(10, 11, 15)",
578
+ gray3: "rgb(206, 210, 220)",
579
+ positive: "rgb(".concat(lightSpectrum.green30, ")"),
580
+ negative: "rgb(".concat(lightSpectrum.red50, ")"),
581
+ accent1: "rgb(255, 210, 0)",
582
+ accent2: "rgb(".concat(lightSpectrum.teal15, ")"),
583
+ accent3: "rgb(".concat(lightSpectrum.orange40, ")"),
584
+ accent4: "rgb(".concat(lightSpectrum.blue20, ")"),
585
+ invert: "rgb(10, 11, 14)",
586
+ invert2: "rgb(255, 255, 254)"
587
+ },
588
+ darkIllustrationColor: {
589
+ primary: "rgb(".concat(darkSpectrum.blue70, ")"),
590
+ black: "rgb(".concat(darkSpectrum.gray0, ")"),
591
+ white: "rgb(".concat(darkSpectrum.gray100, ")"),
592
+ gray: "rgb(".concat(darkSpectrum.gray30, ")"),
593
+ gray2: "rgb(".concat(darkSpectrum.gray30, ")"),
594
+ gray3: "rgb(".concat(darkSpectrum.gray100, ")"),
595
+ positive: "rgb(".concat(darkSpectrum.green70, ")"),
596
+ negative: "rgb(".concat(darkSpectrum.red60, ")"),
597
+ accent1: "rgb(236, 208, 105)",
598
+ accent2: "rgb(".concat(darkSpectrum.teal80, ")"),
599
+ accent3: "rgb(".concat(darkSpectrum.orange60, ")"),
600
+ accent4: "rgb(".concat(darkSpectrum.blue80, ")"),
601
+ invert: "rgb(".concat(darkSpectrum.gray100, ")"),
602
+ invert2: "rgb(".concat(darkSpectrum.gray50, ")")
603
+ },
572
604
  shadow: {
573
605
  elevation1: '0px 8px 12px rgba(0, 0, 0, 0.12)',
574
606
  elevation2: '0px 8px 24px rgba(0, 0, 0, 0.12)'
@@ -316,7 +316,7 @@ export const defaultTheme = {
316
316
  bgNegativeWash: "rgb(".concat(lightSpectrum.red0, ")"),
317
317
  bgPositive: "rgb(".concat(lightSpectrum.green60, ")"),
318
318
  bgPositiveWash: "rgb(".concat(lightSpectrum.green0, ")"),
319
- bgWarning: "rgb(".concat(lightSpectrum.orange40, ")"),
319
+ bgWarning: "rgb(".concat(lightSpectrum.orange60, ")"),
320
320
  bgWarningWash: "rgb(".concat(lightSpectrum.orange0, ")"),
321
321
  currentColor: 'currentColor',
322
322
  // Line
@@ -367,7 +367,7 @@ export const defaultTheme = {
367
367
  bgNegativeWash: "rgb(".concat(darkSpectrum.red0, ")"),
368
368
  bgPositive: "rgb(".concat(darkSpectrum.green60, ")"),
369
369
  bgPositiveWash: "rgb(".concat(darkSpectrum.green0, ")"),
370
- bgWarning: "rgb(".concat(darkSpectrum.yellow50, ")"),
370
+ bgWarning: "rgb(".concat(darkSpectrum.orange60, ")"),
371
371
  bgWarningWash: "rgb(".concat(darkSpectrum.orange0, ")"),
372
372
  currentColor: 'currentColor',
373
373
  // Line
@@ -395,6 +395,38 @@ export const defaultTheme = {
395
395
  // Transparent
396
396
  transparent: "rgba(".concat(darkSpectrum.gray0, ",0)")
397
397
  },
398
+ lightIllustrationColor: {
399
+ primary: "rgb(".concat(lightSpectrum.blue60, ")"),
400
+ black: "rgb(".concat(lightSpectrum.gray100, ")"),
401
+ white: "rgb(".concat(lightSpectrum.gray0, ")"),
402
+ gray: "rgb(".concat(lightSpectrum.gray20, ")"),
403
+ gray2: "rgb(10, 11, 15)",
404
+ gray3: "rgb(206, 210, 220)",
405
+ positive: "rgb(".concat(lightSpectrum.green30, ")"),
406
+ negative: "rgb(".concat(lightSpectrum.red50, ")"),
407
+ accent1: "rgb(255, 210, 0)",
408
+ accent2: "rgb(".concat(lightSpectrum.teal15, ")"),
409
+ accent3: "rgb(".concat(lightSpectrum.orange40, ")"),
410
+ accent4: "rgb(".concat(lightSpectrum.blue20, ")"),
411
+ invert: "rgb(10, 11, 14)",
412
+ invert2: "rgb(255, 255, 254)"
413
+ },
414
+ darkIllustrationColor: {
415
+ primary: "rgb(".concat(darkSpectrum.blue70, ")"),
416
+ black: "rgb(".concat(darkSpectrum.gray0, ")"),
417
+ white: "rgb(".concat(darkSpectrum.gray100, ")"),
418
+ gray: "rgb(".concat(darkSpectrum.gray30, ")"),
419
+ gray2: "rgb(".concat(darkSpectrum.gray30, ")"),
420
+ gray3: "rgb(".concat(darkSpectrum.gray100, ")"),
421
+ positive: "rgb(".concat(darkSpectrum.green70, ")"),
422
+ negative: "rgb(".concat(darkSpectrum.red60, ")"),
423
+ accent1: "rgb(236, 208, 105)",
424
+ accent2: "rgb(".concat(darkSpectrum.teal80, ")"),
425
+ accent3: "rgb(".concat(darkSpectrum.orange60, ")"),
426
+ accent4: "rgb(".concat(darkSpectrum.blue80, ")"),
427
+ invert: "rgb(".concat(darkSpectrum.gray100, ")"),
428
+ invert2: "rgb(".concat(darkSpectrum.gray50, ")")
429
+ },
398
430
  space: {
399
431
  '0': 0,
400
432
  '0.25': 2,
@@ -1,6 +1,6 @@
1
1
  const _excluded = ["activeTabRect", "background", "position", "borderRadius", "style"],
2
2
  _excluded2 = ["as", "color", "label", "display", "alignItems", "font", "hideDot"],
3
- _excluded3 = ["background", "activeBackground", "width", "justifyContent", "TabComponent", "TabsActiveIndicatorComponent", "className", "classNames", "style", "styles"];
3
+ _excluded3 = ["background", "activeBackground", "activeColor", "width", "justifyContent", "TabComponent", "TabsActiveIndicatorComponent", "className", "classNames", "style", "styles"];
4
4
  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; }
5
5
  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; }
6
6
  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; }
@@ -83,10 +83,9 @@ export const LiveTabLabel = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref2, re
83
83
  }));
84
84
  }));
85
85
 
86
- // Custom tab component with primary color for active state
86
+ // Set font
87
87
  const PeriodSelectorTab = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/_jsx(SegmentedTab, _objectSpread({
88
88
  ref: ref,
89
- activeColor: "fgPrimary",
90
89
  font: "label1"
91
90
  }, props))));
92
91
  /**
@@ -97,6 +96,7 @@ export const PeriodSelector = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref3,
97
96
  let {
98
97
  background = 'transparent',
99
98
  activeBackground = 'bgPrimaryWash',
99
+ activeColor = 'fgPrimary',
100
100
  width = '100%',
101
101
  justifyContent = 'space-between',
102
102
  TabComponent = PeriodSelectorTab,
@@ -112,6 +112,7 @@ export const PeriodSelector = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref3,
112
112
  TabComponent: TabComponent,
113
113
  TabsActiveIndicatorComponent: TabsActiveIndicatorComponent,
114
114
  activeBackground: activeBackground,
115
+ activeColor: activeColor,
115
116
  background: background,
116
117
  className: cx(className, classNames === null || classNames === void 0 ? void 0 : classNames.root),
117
118
  classNames: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-web",
3
- "version": "9.0.0-rc.2",
3
+ "version": "9.0.0-rc.3",
4
4
  "description": "Coinbase Design System - Web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -215,9 +215,9 @@
215
215
  "react-dom": "^18.0.0 || ~19.1.2"
216
216
  },
217
217
  "dependencies": {
218
- "@coinbase/cds-common": "^9.0.0-rc.2",
218
+ "@coinbase/cds-common": "^9.0.0-rc.3",
219
219
  "@coinbase/cds-icons": "^5.16.0",
220
- "@coinbase/cds-illustrations": "^4.38.0",
220
+ "@coinbase/cds-illustrations": "^4.40.1",
221
221
  "@coinbase/cds-lottie-files": "^3.3.4",
222
222
  "@coinbase/cds-utils": "^2.3.5",
223
223
  "@floating-ui/react-dom": "^2.1.1",