@coinbase/cds-web 8.66.2 → 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
CHANGED
|
@@ -8,6 +8,12 @@ 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
|
+
|
|
11
17
|
## 8.66.2 (4/28/2026 PST)
|
|
12
18
|
|
|
13
19
|
#### 🐞 Fixes
|
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"}
|
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/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",
|