@coinbase/cds-web 8.24.0 → 8.25.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 +6 -0
- package/dts/tag/Tag.d.ts +6 -0
- package/dts/tag/Tag.d.ts.map +1 -1
- package/esm/tag/Tag.js +4 -3
- package/esm/tag/__figma__/Tag.figma.js +8 -0
- package/package.json +2 -2
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.25.0 (12/1/2025 PST)
|
|
12
|
+
|
|
13
|
+
#### 🚀 Updates
|
|
14
|
+
|
|
15
|
+
- Add emphasis prop to Tag. [[#197](https://github.com/coinbase/cds/pull/197)]
|
|
16
|
+
|
|
11
17
|
## 8.24.0 (12/1/2025 PST)
|
|
12
18
|
|
|
13
19
|
#### 🚀 Updates
|
package/dts/tag/Tag.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
SharedAccessibilityProps,
|
|
5
5
|
SharedProps,
|
|
6
6
|
TagColorScheme,
|
|
7
|
+
TagEmphasis,
|
|
7
8
|
TagIntent,
|
|
8
9
|
} from '@coinbase/cds-common/types';
|
|
9
10
|
import { type BoxDefaultElement, type BoxProps } from '../layout/Box';
|
|
@@ -17,6 +18,11 @@ export type TagBaseProps = SharedProps &
|
|
|
17
18
|
* @default informational
|
|
18
19
|
*/
|
|
19
20
|
intent?: TagIntent;
|
|
21
|
+
/**
|
|
22
|
+
* Specify the emphasis of the Tag.
|
|
23
|
+
* @default 'low' when informational intent, 'high' when promotional intent
|
|
24
|
+
*/
|
|
25
|
+
emphasis?: TagEmphasis;
|
|
20
26
|
/**
|
|
21
27
|
* Specify the colorScheme of the Tag
|
|
22
28
|
* @default blue
|
package/dts/tag/Tag.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../src/tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAOjE,OAAO,KAAK,EACV,wBAAwB,EACxB,WAAW,EACX,cAAc,EACd,SAAS,EACV,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAO,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG3E,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,MAAM,MAAM,YAAY,GAAG,WAAW,GACpC,wBAAwB,GAAG;IACzB,yCAAyC;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,sCAAsC;IACtC,UAAU,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC;IACrC,gCAAgC;IAChC,KAAK,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC;IAChC,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,CAAC;CACpD,CAAC;AAEJ,MAAM,MAAM,QAAQ,GAAG,YAAY,GACjC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAEtF,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../src/tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAOjE,OAAO,KAAK,EACV,wBAAwB,EACxB,WAAW,EACX,cAAc,EACd,WAAW,EACX,SAAS,EACV,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAO,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG3E,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,MAAM,MAAM,YAAY,GAAG,WAAW,GACpC,wBAAwB,GAAG;IACzB,yCAAyC;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,sCAAsC;IACtC,UAAU,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC;IACrC,gCAAgC;IAChC,KAAK,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC;IAChC,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,CAAC;CACpD,CAAC;AAEJ,MAAM,MAAM,QAAQ,GAAG,YAAY,GACjC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAEtF,eAAO,MAAM,GAAG,yHA4Df,CAAC"}
|
package/esm/tag/Tag.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["children", "intent", "colorScheme", "background", "color", "display", "alignItems", "justifyContent", "testID"];
|
|
1
|
+
const _excluded = ["children", "intent", "emphasis", "colorScheme", "background", "color", "display", "alignItems", "justifyContent", "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; }
|
|
@@ -7,7 +7,7 @@ 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, useMemo } from 'react';
|
|
10
|
-
import { tagBorderRadiusMap,
|
|
10
|
+
import { tagBorderRadiusMap, tagEmphasisColorMap, tagFontMap, tagHorizontalSpacing } from '@coinbase/cds-common/tokens/tags';
|
|
11
11
|
import { useTheme } from '../hooks/useTheme';
|
|
12
12
|
import { Box } from '../layout/Box';
|
|
13
13
|
import { Text } from '../typography/Text';
|
|
@@ -17,6 +17,7 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Tag(_ref,
|
|
|
17
17
|
let {
|
|
18
18
|
children,
|
|
19
19
|
intent = 'informational',
|
|
20
|
+
emphasis = intent === 'informational' ? 'low' : 'high',
|
|
20
21
|
colorScheme = 'blue',
|
|
21
22
|
background: customBackground,
|
|
22
23
|
color: customColor,
|
|
@@ -30,7 +31,7 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Tag(_ref,
|
|
|
30
31
|
const {
|
|
31
32
|
background,
|
|
32
33
|
foreground
|
|
33
|
-
} =
|
|
34
|
+
} = tagEmphasisColorMap[emphasis][colorScheme];
|
|
34
35
|
const boxStyles = useMemo(() => ({
|
|
35
36
|
backgroundColor: "rgb(".concat(theme.spectrum[customBackground !== null && customBackground !== void 0 ? customBackground : background], ")")
|
|
36
37
|
}), [background, customBackground, theme.spectrum]);
|
|
@@ -16,6 +16,10 @@ figma.connect(Tag, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-
|
|
|
16
16
|
intent: 'informational'
|
|
17
17
|
},
|
|
18
18
|
props: {
|
|
19
|
+
emphasis: figma.enum('emphasis', {
|
|
20
|
+
high: 'high',
|
|
21
|
+
low: 'low'
|
|
22
|
+
}),
|
|
19
23
|
colorScheme: figma.enum('colorScheme', {
|
|
20
24
|
green: 'green',
|
|
21
25
|
purple: 'purple',
|
|
@@ -51,6 +55,10 @@ figma.connect(Tag, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-
|
|
|
51
55
|
intent: 'promotional'
|
|
52
56
|
},
|
|
53
57
|
props: {
|
|
58
|
+
emphasis: figma.enum('emphasis', {
|
|
59
|
+
high: 'high',
|
|
60
|
+
low: 'low'
|
|
61
|
+
}),
|
|
54
62
|
colorScheme: figma.enum('colorScheme', {
|
|
55
63
|
green: 'green',
|
|
56
64
|
purple: 'purple',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-web",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.25.0",
|
|
4
4
|
"description": "Coinbase Design System - Web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"react-dom": "^18.3.1"
|
|
148
148
|
},
|
|
149
149
|
"dependencies": {
|
|
150
|
-
"@coinbase/cds-common": "^8.
|
|
150
|
+
"@coinbase/cds-common": "^8.25.0",
|
|
151
151
|
"@coinbase/cds-icons": "^5.7.0",
|
|
152
152
|
"@coinbase/cds-illustrations": "^4.28.0",
|
|
153
153
|
"@coinbase/cds-lottie-files": "^3.3.3",
|