@coinbase/cds-web 8.66.1 → 8.67.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 +12 -0
- package/dts/page/PageFooter.d.ts +4 -0
- package/dts/page/PageFooter.d.ts.map +1 -1
- package/dts/tabs/SegmentedTab.d.ts.map +1 -1
- package/esm/page/PageFooter.js +20 -4
- package/esm/page/__figma__/PageFooter.figma.js +50 -6
- package/esm/tabs/SegmentedTab.js +5 -15
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,18 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.67.0 (5/1/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🚀 Updates
|
|
14
|
+
|
|
15
|
+
- Feat: Add legalText prop to PageFooter component. [[#661](https://github.com/coinbase/cds/pull/661)]
|
|
16
|
+
|
|
17
|
+
## 8.66.2 (4/28/2026 PST)
|
|
18
|
+
|
|
19
|
+
#### 🐞 Fixes
|
|
20
|
+
|
|
21
|
+
- Fix SegmentedTab color not applied during Suspense transition. [[#650](https://github.com/coinbase/cds/pull/650)]
|
|
22
|
+
|
|
11
23
|
## 8.66.1 ((4/27/2026, 12:59 PM PST))
|
|
12
24
|
|
|
13
25
|
This is an artificial version bump with no new change.
|
package/dts/page/PageFooter.d.ts
CHANGED
|
@@ -13,6 +13,10 @@ export type PageFooterBaseProps = SharedProps &
|
|
|
13
13
|
* Set the background color of the box.
|
|
14
14
|
*/
|
|
15
15
|
background?: ThemeVars.Color;
|
|
16
|
+
/**
|
|
17
|
+
* Optional legal text rendered below the action in a pre-styled caption. Right-aligned on desktop, centered on mobile/responsive web.
|
|
18
|
+
*/
|
|
19
|
+
legalText?: string;
|
|
16
20
|
};
|
|
17
21
|
export declare const pageFooterPaddingX: ResponsiveProps<StaticStyleProps>['paddingX'];
|
|
18
22
|
export declare const pageFooterJustifyContent: ResponsiveProps<StaticStyleProps>['justifyContent'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageFooter.d.ts","sourceRoot":"","sources":["../../src/page/PageFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAO,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"PageFooter.d.ts","sourceRoot":"","sources":["../../src/page/PageFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAO,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG9E,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAC3C,cAAc,GAAG;IACf;+HAC2H;IAC3H,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEJ,eAAO,MAAM,kBAAkB,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAInE,CAAC;AAEX,eAAO,MAAM,wBAAwB,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,CAI/E,CAAC;AAQX,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,eAAe,CACvD,QAAQ,CAAC,iBAAiB,CAAC,EAC3B,mBAAmB,CACpB,CAAC;AACF,eAAO,MAAM,UAAU,gIAoCtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedTab.d.ts","sourceRoot":"","sources":["../../src/tabs/SegmentedTab.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SegmentedTab.d.ts","sourceRoot":"","sources":["../../src/tabs/SegmentedTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAMlE,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AA8BzE,MAAM,MAAM,qBAAqB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI,kBAAkB,GACnF,QAAQ,CAAC,KAAK,CAAC,GAAG;IAChB;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;IAC9B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;CACzB,CAAC;AAEJ,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI,qBAAqB,CAAC,KAAK,CAAC,GAAG;IAC5F,+DAA+D;IAC/D,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACxD,CAAC;AAMF,KAAK,qBAAqB,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EACzD,KAAK,EAAE,iBAAiB,CAAC,KAAK,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAA;CAAE,KAC9E,KAAK,CAAC,YAAY,CAAC;AAExB,QAAA,MAAM,qBAAqB;;;;IAzBvB;;;OAGG;kBACW,SAAS,CAAC,KAAK;IAC7B;;;OAGG;YACK,SAAS,CAAC,KAAK;;IAIzB,+DAA+D;mCAClC,KAAK,CAAC,UAAU,KAAK,IAAI;4CAsGvD,CAAC;AAIF,eAAO,MAAM,YAAY,EAA4B,qBAAqB,CAAC"}
|
package/esm/page/PageFooter.js
CHANGED
|
@@ -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 {
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
5
|
-
|
|
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('
|
|
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
|
-
|
|
22
|
+
legalText
|
|
12
23
|
} = _ref;
|
|
13
24
|
return /*#__PURE__*/_jsx(PageFooter, {
|
|
14
|
-
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
|
});
|
package/esm/tabs/SegmentedTab.js
CHANGED
|
@@ -6,17 +6,14 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
6
6
|
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); }
|
|
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
|
-
import React, { forwardRef, memo, useCallback
|
|
9
|
+
import React, { forwardRef, memo, useCallback } from 'react';
|
|
10
10
|
import { useTabsContext } from '@coinbase/cds-common/tabs/TabsContext';
|
|
11
|
-
import { m as motion } from 'framer-motion';
|
|
12
11
|
import { cx } from '../cx';
|
|
13
12
|
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
14
13
|
import { Box } from '../layout/Box';
|
|
15
14
|
import { Pressable } from '../system/Pressable';
|
|
16
15
|
import { Text } from '../typography/Text';
|
|
17
|
-
import { tabsTransitionConfig } from './Tabs';
|
|
18
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
|
-
const MotionBox = motion(Box);
|
|
20
17
|
const insetFocusRingCss = "insetFocusRingCss-i13o7yik";
|
|
21
18
|
const buttonCss = "buttonCss-bijg88k";
|
|
22
19
|
const buttonDisabledCss = "buttonDisabledCss-b265t1b";
|
|
@@ -52,13 +49,6 @@ const SegmentedTabComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props,
|
|
|
52
49
|
updateActiveTab(id);
|
|
53
50
|
onClick === null || onClick === void 0 || onClick(id, event);
|
|
54
51
|
}, [id, updateActiveTab, onClick]);
|
|
55
|
-
const motionProps = useMemo(() => ({
|
|
56
|
-
animate: {
|
|
57
|
-
color: "var(--color-".concat(isActive ? activeColor : color, ")")
|
|
58
|
-
},
|
|
59
|
-
transition: tabsTransitionConfig,
|
|
60
|
-
initial: false
|
|
61
|
-
}), [activeColor, color, isActive]);
|
|
62
52
|
return /*#__PURE__*/_jsx(Pressable, _objectSpread(_objectSpread({
|
|
63
53
|
ref: ref,
|
|
64
54
|
"aria-selected": isActive,
|
|
@@ -77,12 +67,12 @@ const SegmentedTabComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props,
|
|
|
77
67
|
textTransform: textTransform,
|
|
78
68
|
type: "button"
|
|
79
69
|
}, props), {}, {
|
|
80
|
-
children: /*#__PURE__*/_jsx(
|
|
70
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
81
71
|
as: "span",
|
|
72
|
+
color: isActive ? activeColor : color,
|
|
82
73
|
justifyContent: "center",
|
|
83
74
|
paddingX: 2,
|
|
84
|
-
paddingY: 1
|
|
85
|
-
}, motionProps), {}, {
|
|
75
|
+
paddingY: 1,
|
|
86
76
|
children: typeof label === 'string' ? /*#__PURE__*/_jsx(Text, {
|
|
87
77
|
color: "currentColor",
|
|
88
78
|
font: font,
|
|
@@ -94,7 +84,7 @@ const SegmentedTabComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props,
|
|
|
94
84
|
textTransform: textTransform,
|
|
95
85
|
children: label
|
|
96
86
|
}) : label
|
|
97
|
-
})
|
|
87
|
+
})
|
|
98
88
|
}));
|
|
99
89
|
}));
|
|
100
90
|
SegmentedTabComponent.displayName = 'SegmentedTab';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-web",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.67.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.67.0",
|
|
211
211
|
"@coinbase/cds-icons": "^5.16.0",
|
|
212
212
|
"@coinbase/cds-illustrations": "^4.38.0",
|
|
213
213
|
"@coinbase/cds-lottie-files": "^3.3.4",
|