@coinbase/cds-web 9.6.8 → 9.6.10

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,18 @@ All notable changes to this project will be documented in this file.
8
8
 
9
9
  <!-- template-start -->
10
10
 
11
+ ## 9.6.10 (7/22/2026 PST)
12
+
13
+ #### 🐞 Fixes
14
+
15
+ - Fix: Remove max-width constraint for ReactNode children of Tooltip. [[#801](https://github.com/coinbase/cds/pull/801)]
16
+
17
+ ## 9.6.9 (7/22/2026 PST)
18
+
19
+ #### 🐞 Fixes
20
+
21
+ - Fix: adjust messaging card imports. [[#800](https://github.com/coinbase/cds/pull/800)]
22
+
11
23
  ## 9.6.8 (7/22/2026 PST)
12
24
 
13
25
  #### 🐞 Fixes
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import type { Polymorphic } from '../../core/polymorphism';
3
+ import { type CardRootBaseProps } from '../CardRoot';
4
+ import { type MediaCardLayoutProps } from './MediaCardLayout';
5
+ export type MediaCardBaseProps = Polymorphic.ExtendableProps<
6
+ Omit<CardRootBaseProps, 'children'>,
7
+ MediaCardLayoutProps & {
8
+ classNames?: {
9
+ /** Root element */
10
+ root?: string;
11
+ };
12
+ styles?: {
13
+ /** Root element */
14
+ root?: React.CSSProperties;
15
+ };
16
+ }
17
+ >;
18
+ export type MediaCardProps<AsComponent extends React.ElementType = 'article'> = Polymorphic.Props<
19
+ AsComponent,
20
+ MediaCardBaseProps
21
+ >;
22
+ type MediaCardComponent = (<AsComponent extends React.ElementType = 'article'>(
23
+ props: MediaCardProps<AsComponent>,
24
+ ) => Polymorphic.ReactReturn) &
25
+ Polymorphic.ReactNamed;
26
+ export declare const MediaCard: MediaCardComponent;
27
+ export {};
28
+ //# sourceMappingURL=MediaCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaCard.d.ts","sourceRoot":"","sources":["../../../src/cards/MediaCard/MediaCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,eAAe,CAC1D,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,EACnC,oBAAoB,GAAG;IACrB,UAAU,CAAC,EAAE;QACX,mBAAmB;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE;QACP,mBAAmB;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,CAAC;CACH,CACF,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,SAAS,IAAI,WAAW,CAAC,KAAK,CAC/F,WAAW,EACX,kBAAkB,CACnB,CAAC;AASF,KAAK,kBAAkB,GAAG,CAAC,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,SAAS,EAC3E,KAAK,EAAE,cAAc,CAAC,WAAW,CAAC,KAC/B,WAAW,CAAC,WAAW,CAAC,GAC3B,WAAW,CAAC,UAAU,CAAC;AAEzB,eAAO,MAAM,SAAS,EAAE,kBAyCvB,CAAC"}
@@ -1,28 +1,3 @@
1
- import React from 'react';
2
- import type { Polymorphic } from '../../core/polymorphism';
3
- import { type CardRootBaseProps } from '../CardRoot';
4
- import { type MediaCardLayoutProps } from './MediaCardLayout';
5
- export type MediaCardBaseProps = Polymorphic.ExtendableProps<
6
- Omit<CardRootBaseProps, 'children'>,
7
- MediaCardLayoutProps & {
8
- classNames?: {
9
- /** Root element */
10
- root?: string;
11
- };
12
- styles?: {
13
- /** Root element */
14
- root?: React.CSSProperties;
15
- };
16
- }
17
- >;
18
- export type MediaCardProps<AsComponent extends React.ElementType = 'article'> = Polymorphic.Props<
19
- AsComponent,
20
- MediaCardBaseProps
21
- >;
22
- type MediaCardComponent = (<AsComponent extends React.ElementType = 'article'>(
23
- props: MediaCardProps<AsComponent>,
24
- ) => Polymorphic.ReactReturn) &
25
- Polymorphic.ReactNamed;
26
- export declare const MediaCard: MediaCardComponent;
27
- export {};
1
+ export * from './MediaCard';
2
+ export * from './MediaCardLayout';
28
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cards/MediaCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAGhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,eAAe,CAC1D,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,EACnC,oBAAoB,GAAG;IACrB,UAAU,CAAC,EAAE;QACX,mBAAmB;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE;QACP,mBAAmB;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,CAAC;CACH,CACF,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,SAAS,IAAI,WAAW,CAAC,KAAK,CAC/F,WAAW,EACX,kBAAkB,CACnB,CAAC;AASF,KAAK,kBAAkB,GAAG,CAAC,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,SAAS,EAC3E,KAAK,EAAE,cAAc,CAAC,WAAW,CAAC,KAC/B,WAAW,CAAC,WAAW,CAAC,GAC3B,WAAW,CAAC,UAAU,CAAC;AAEzB,eAAO,MAAM,SAAS,EAAE,kBAyCvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cards/MediaCard/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { Polymorphic } from '../../core/polymorphism';
2
+ import { type CardRootBaseProps } from '../CardRoot';
3
+ import { type MessagingCardLayoutProps } from './MessagingCardLayout';
4
+ export type MessagingCardBaseProps = Polymorphic.ExtendableProps<
5
+ Omit<CardRootBaseProps, 'children'>,
6
+ MessagingCardLayoutProps & {
7
+ classNames?: {
8
+ /** Root element */
9
+ root?: string;
10
+ };
11
+ styles?: {
12
+ /** Root element */
13
+ root?: React.CSSProperties;
14
+ };
15
+ }
16
+ >;
17
+ export type MessagingCardProps<AsComponent extends React.ElementType = 'article'> =
18
+ Polymorphic.Props<AsComponent, MessagingCardBaseProps>;
19
+ type MessagingCardComponent = (<AsComponent extends React.ElementType = 'article'>(
20
+ props: MessagingCardProps<AsComponent>,
21
+ ) => Polymorphic.ReactReturn) &
22
+ Polymorphic.ReactNamed;
23
+ export declare const MessagingCard: MessagingCardComponent;
24
+ export {};
25
+ //# sourceMappingURL=MessagingCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessagingCard.d.ts","sourceRoot":"","sources":["../../../src/cards/MessagingCard/MessagingCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAE3F,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,eAAe,CAC9D,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,EACnC,wBAAwB,GAAG;IACzB,UAAU,CAAC,EAAE;QACX,mBAAmB;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE;QACP,mBAAmB;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,CAAC;CACH,CACF,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,SAAS,IAC9E,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC;AAEzD,KAAK,sBAAsB,GAAG,CAAC,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,SAAS,EAC/E,KAAK,EAAE,kBAAkB,CAAC,WAAW,CAAC,KACnC,WAAW,CAAC,WAAW,CAAC,GAC3B,WAAW,CAAC,UAAU,CAAC;AAEzB,eAAO,MAAM,aAAa,EAAE,sBAuD3B,CAAC"}
@@ -1,25 +1,3 @@
1
- import type { Polymorphic } from '../../core/polymorphism';
2
- import { type CardRootBaseProps } from '../CardRoot';
3
- import { type MessagingCardLayoutProps } from './MessagingCardLayout';
4
- export type MessagingCardBaseProps = Polymorphic.ExtendableProps<
5
- Omit<CardRootBaseProps, 'children'>,
6
- MessagingCardLayoutProps & {
7
- classNames?: {
8
- /** Root element */
9
- root?: string;
10
- };
11
- styles?: {
12
- /** Root element */
13
- root?: React.CSSProperties;
14
- };
15
- }
16
- >;
17
- export type MessagingCardProps<AsComponent extends React.ElementType = 'article'> =
18
- Polymorphic.Props<AsComponent, MessagingCardBaseProps>;
19
- type MessagingCardComponent = (<AsComponent extends React.ElementType = 'article'>(
20
- props: MessagingCardProps<AsComponent>,
21
- ) => Polymorphic.ReactReturn) &
22
- Polymorphic.ReactNamed;
23
- export declare const MessagingCard: MessagingCardComponent;
24
- export {};
1
+ export * from './MessagingCard';
2
+ export * from './MessagingCardLayout';
25
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cards/MessagingCard/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAuB,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAE3F,MAAM,MAAM,sBAAsB,GAAG,WAAW,CAAC,eAAe,CAC9D,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,EACnC,wBAAwB,GAAG;IACzB,UAAU,CAAC,EAAE;QACX,mBAAmB;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE;QACP,mBAAmB;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,CAAC;CACH,CACF,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,SAAS,IAC9E,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,sBAAsB,CAAC,CAAC;AAEzD,KAAK,sBAAsB,GAAG,CAAC,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,SAAS,EAC/E,KAAK,EAAE,kBAAkB,CAAC,WAAW,CAAC,KACnC,WAAW,CAAC,WAAW,CAAC,GAC3B,WAAW,CAAC,UAAU,CAAC;AAEzB,eAAO,MAAM,aAAa,EAAE,sBAuD3B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cards/MessagingCard/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/overlays/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAWhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQnD,eAAO,MAAM,OAAO,qCAAiB,YAAY,6CA+H/C,CAAC"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/overlays/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAOhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQnD,eAAO,MAAM,OAAO,qCAAiB,YAAY,6CA+H/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipContent.d.ts","sourceRoot":"","sources":["../../../src/overlays/tooltip/TooltipContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAezD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAI1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAgBzD,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,GACtD,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE1D,eAAO,MAAM,cAAc;;;wMA+E1B,CAAC"}
1
+ {"version":3,"file":"TooltipContent.d.ts","sourceRoot":"","sources":["../../../src/overlays/tooltip/TooltipContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAezD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAI1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAgBzD,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,GACtD,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC;AAEjD,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE1D,eAAO,MAAM,cAAc;;;wMAmF1B,CAAC"}
@@ -1,11 +1,11 @@
1
1
  export * from './Link';
2
2
  export * from './Text';
3
3
  export * from './TextBody';
4
- export * from './TextFallback';
5
4
  export * from './TextCaption';
6
5
  export * from './TextDisplay1';
7
6
  export * from './TextDisplay2';
8
7
  export * from './TextDisplay3';
8
+ export * from './TextFallback';
9
9
  export * from './TextHeadline';
10
10
  export * from './TextInherited';
11
11
  export * from './TextLabel1';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/typography/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/typography/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
@@ -0,0 +1,61 @@
1
+ const _excluded = ["root"],
2
+ _excluded2 = ["root"],
3
+ _excluded3 = ["title", "subtitle", "description", "thumbnail", "media", "children", "mediaPlacement", "as", "classNames", "styles", "className", "style"];
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
+ 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
+ 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
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
8
+ 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); }
9
+ 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; }
10
+ 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; }
11
+ import React, { forwardRef, memo } from 'react';
12
+ import { cx } from '../../cx';
13
+ import { CardRoot } from '../CardRoot';
14
+ import { MediaCardLayout } from './MediaCardLayout';
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ const mediaCardContainerProps = {
17
+ borderRadius: 500,
18
+ flexDirection: 'row',
19
+ background: 'bgAlternate',
20
+ overflow: 'hidden'
21
+ };
22
+ export const MediaCard = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
23
+ let {
24
+ title,
25
+ subtitle,
26
+ description,
27
+ thumbnail,
28
+ media,
29
+ children,
30
+ mediaPlacement = 'end',
31
+ as,
32
+ classNames: {
33
+ root: rootClassName
34
+ } = {},
35
+ styles: {
36
+ root: rootStyle
37
+ } = {},
38
+ className,
39
+ style
40
+ } = _ref,
41
+ layoutClassNames = _objectWithoutProperties(_ref.classNames, _excluded),
42
+ layoutStyles = _objectWithoutProperties(_ref.styles, _excluded2),
43
+ props = _objectWithoutProperties(_ref, _excluded3);
44
+ return /*#__PURE__*/_jsx(CardRoot, _objectSpread(_objectSpread(_objectSpread({
45
+ ref: ref,
46
+ as: as,
47
+ className: cx(rootClassName, className),
48
+ style: _objectSpread(_objectSpread({}, rootStyle), style)
49
+ }, mediaCardContainerProps), props), {}, {
50
+ children: /*#__PURE__*/_jsx(MediaCardLayout, {
51
+ classNames: layoutClassNames,
52
+ description: description,
53
+ media: media,
54
+ mediaPlacement: mediaPlacement,
55
+ styles: layoutStyles,
56
+ subtitle: subtitle,
57
+ thumbnail: thumbnail,
58
+ title: title
59
+ })
60
+ }));
61
+ }));
@@ -1,61 +1,2 @@
1
- const _excluded = ["root"],
2
- _excluded2 = ["root"],
3
- _excluded3 = ["title", "subtitle", "description", "thumbnail", "media", "children", "mediaPlacement", "as", "classNames", "styles", "className", "style"];
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
- 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
- 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
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
8
- 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); }
9
- 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; }
10
- 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; }
11
- import React, { forwardRef, memo } from 'react';
12
- import { cx } from '../../cx';
13
- import { CardRoot } from '../CardRoot';
14
- import { MediaCardLayout } from './MediaCardLayout';
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- const mediaCardContainerProps = {
17
- borderRadius: 500,
18
- flexDirection: 'row',
19
- background: 'bgAlternate',
20
- overflow: 'hidden'
21
- };
22
- export const MediaCard = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
23
- let {
24
- title,
25
- subtitle,
26
- description,
27
- thumbnail,
28
- media,
29
- children,
30
- mediaPlacement = 'end',
31
- as,
32
- classNames: {
33
- root: rootClassName
34
- } = {},
35
- styles: {
36
- root: rootStyle
37
- } = {},
38
- className,
39
- style
40
- } = _ref,
41
- layoutClassNames = _objectWithoutProperties(_ref.classNames, _excluded),
42
- layoutStyles = _objectWithoutProperties(_ref.styles, _excluded2),
43
- props = _objectWithoutProperties(_ref, _excluded3);
44
- return /*#__PURE__*/_jsx(CardRoot, _objectSpread(_objectSpread(_objectSpread({
45
- ref: ref,
46
- as: as,
47
- className: cx(rootClassName, className),
48
- style: _objectSpread(_objectSpread({}, rootStyle), style)
49
- }, mediaCardContainerProps), props), {}, {
50
- children: /*#__PURE__*/_jsx(MediaCardLayout, {
51
- classNames: layoutClassNames,
52
- description: description,
53
- media: media,
54
- mediaPlacement: mediaPlacement,
55
- styles: layoutStyles,
56
- subtitle: subtitle,
57
- thumbnail: thumbnail,
58
- title: title
59
- })
60
- }));
61
- }));
1
+ export * from './MediaCard';
2
+ export * from './MediaCardLayout';
@@ -0,0 +1,70 @@
1
+ const _excluded = ["root"],
2
+ _excluded2 = ["root"],
3
+ _excluded3 = ["as", "type", "title", "description", "tag", "action", "onActionButtonClick", "actionButtonAccessibilityLabel", "onDismissButtonClick", "dismissButtonAccessibilityLabel", "mediaPlacement", "media", "dismissButton", "styles", "classNames", "className", "style"];
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
+ 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
+ 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
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
8
+ 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); }
9
+ 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; }
10
+ 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; }
11
+ import { forwardRef, memo } from 'react';
12
+ import { cx } from '../../cx';
13
+ import { CardRoot } from '../CardRoot';
14
+ import { MessagingCardLayout } from './MessagingCardLayout';
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ export const MessagingCard = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
17
+ let {
18
+ as,
19
+ type,
20
+ title,
21
+ description,
22
+ tag,
23
+ action,
24
+ onActionButtonClick,
25
+ actionButtonAccessibilityLabel,
26
+ onDismissButtonClick,
27
+ dismissButtonAccessibilityLabel,
28
+ mediaPlacement,
29
+ media,
30
+ dismissButton,
31
+ styles: {
32
+ root: rootStyle
33
+ } = {},
34
+ classNames: {
35
+ root: rootClassName
36
+ } = {},
37
+ className,
38
+ style
39
+ } = _ref,
40
+ layoutStyles = _objectWithoutProperties(_ref.styles, _excluded),
41
+ layoutClassNames = _objectWithoutProperties(_ref.classNames, _excluded2),
42
+ props = _objectWithoutProperties(_ref, _excluded3);
43
+ return /*#__PURE__*/_jsx(CardRoot, _objectSpread(_objectSpread({
44
+ ref: ref,
45
+ as: as,
46
+ background: type === 'upsell' ? 'bgPrimary' : 'bgAlternate',
47
+ borderRadius: 500,
48
+ borderWidth: 0,
49
+ className: cx(rootClassName, className),
50
+ overflow: "hidden",
51
+ style: _objectSpread(_objectSpread({}, rootStyle), style)
52
+ }, props), {}, {
53
+ children: /*#__PURE__*/_jsx(MessagingCardLayout, {
54
+ action: action,
55
+ actionButtonAccessibilityLabel: actionButtonAccessibilityLabel,
56
+ classNames: layoutClassNames,
57
+ description: description,
58
+ dismissButton: dismissButton,
59
+ dismissButtonAccessibilityLabel: dismissButtonAccessibilityLabel,
60
+ media: media,
61
+ mediaPlacement: mediaPlacement,
62
+ onActionButtonClick: onActionButtonClick,
63
+ onDismissButtonClick: onDismissButtonClick,
64
+ styles: layoutStyles,
65
+ tag: tag,
66
+ title: title,
67
+ type: type
68
+ })
69
+ }));
70
+ }));
@@ -1,70 +1,2 @@
1
- const _excluded = ["root"],
2
- _excluded2 = ["root"],
3
- _excluded3 = ["as", "type", "title", "description", "tag", "action", "onActionButtonClick", "actionButtonAccessibilityLabel", "onDismissButtonClick", "dismissButtonAccessibilityLabel", "mediaPlacement", "media", "dismissButton", "styles", "classNames", "className", "style"];
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
- 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
- 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
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
8
- 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); }
9
- 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; }
10
- 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; }
11
- import { forwardRef, memo } from 'react';
12
- import { cx } from '../../cx';
13
- import { CardRoot } from '../CardRoot';
14
- import { MessagingCardLayout } from './MessagingCardLayout';
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- export const MessagingCard = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
17
- let {
18
- as,
19
- type,
20
- title,
21
- description,
22
- tag,
23
- action,
24
- onActionButtonClick,
25
- actionButtonAccessibilityLabel,
26
- onDismissButtonClick,
27
- dismissButtonAccessibilityLabel,
28
- mediaPlacement,
29
- media,
30
- dismissButton,
31
- styles: {
32
- root: rootStyle
33
- } = {},
34
- classNames: {
35
- root: rootClassName
36
- } = {},
37
- className,
38
- style
39
- } = _ref,
40
- layoutStyles = _objectWithoutProperties(_ref.styles, _excluded),
41
- layoutClassNames = _objectWithoutProperties(_ref.classNames, _excluded2),
42
- props = _objectWithoutProperties(_ref, _excluded3);
43
- return /*#__PURE__*/_jsx(CardRoot, _objectSpread(_objectSpread({
44
- ref: ref,
45
- as: as,
46
- background: type === 'upsell' ? 'bgPrimary' : 'bgAlternate',
47
- borderRadius: 500,
48
- borderWidth: 0,
49
- className: cx(rootClassName, className),
50
- overflow: "hidden",
51
- style: _objectSpread(_objectSpread({}, rootStyle), style)
52
- }, props), {}, {
53
- children: /*#__PURE__*/_jsx(MessagingCardLayout, {
54
- action: action,
55
- actionButtonAccessibilityLabel: actionButtonAccessibilityLabel,
56
- classNames: layoutClassNames,
57
- description: description,
58
- dismissButton: dismissButton,
59
- dismissButtonAccessibilityLabel: dismissButtonAccessibilityLabel,
60
- media: media,
61
- mediaPlacement: mediaPlacement,
62
- onActionButtonClick: onActionButtonClick,
63
- onDismissButtonClick: onDismissButtonClick,
64
- styles: layoutStyles,
65
- tag: tag,
66
- title: title,
67
- type: type
68
- })
69
- }));
70
- }));
1
+ export * from './MessagingCard';
2
+ export * from './MessagingCardLayout';
@@ -48,10 +48,10 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_pro
48
48
  }
49
49
  return /*#__PURE__*/_jsx(TextFallback, {
50
50
  "aria-hidden": true,
51
+ percentage: true,
51
52
  className: classNames === null || classNames === void 0 ? void 0 : classNames.helperText,
52
53
  disableRandomRectWidth: disableRandomRectWidth,
53
54
  font: "body",
54
- percentage: true,
55
55
  rectWidthVariant: getRectWidthVariant(rectWidthVariant, 4),
56
56
  style: styles === null || styles === void 0 ? void 0 : styles.helperText,
57
57
  testID: "list-cell-fallback-helper-text",
@@ -67,20 +67,20 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_pro
67
67
  flexShrink: 0,
68
68
  children: [!!detail && /*#__PURE__*/_jsx(TextFallback, {
69
69
  "aria-hidden": true,
70
+ percentage: true,
70
71
  className: classNames === null || classNames === void 0 ? void 0 : classNames.detail,
71
72
  disableRandomRectWidth: disableRandomRectWidth,
72
73
  font: "body",
73
- percentage: true,
74
74
  rectWidthVariant: getRectWidthVariant(rectWidthVariant, 0),
75
75
  style: styles === null || styles === void 0 ? void 0 : styles.detail,
76
76
  testID: "list-cell-fallback-detail",
77
77
  width: 60
78
78
  }), !!subdetail && /*#__PURE__*/_jsx(TextFallback, {
79
79
  "aria-hidden": true,
80
+ percentage: true,
80
81
  className: classNames === null || classNames === void 0 ? void 0 : classNames.subdetail,
81
82
  disableRandomRectWidth: disableRandomRectWidth,
82
83
  font: spacingVariant === 'condensed' ? 'label2' : 'body',
83
- percentage: true,
84
84
  rectWidthVariant: getRectWidthVariant(rectWidthVariant, 1),
85
85
  style: styles === null || styles === void 0 ? void 0 : styles.subdetail,
86
86
  testID: "list-cell-fallback-subdetail",
@@ -94,10 +94,10 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_pro
94
94
  }
95
95
  return /*#__PURE__*/_jsx(TextFallback, {
96
96
  "aria-hidden": true,
97
+ percentage: true,
97
98
  className: classNames === null || classNames === void 0 ? void 0 : classNames.title,
98
99
  disableRandomRectWidth: disableRandomRectWidth,
99
100
  font: "headline",
100
- percentage: true,
101
101
  rectWidthVariant: getRectWidthVariant(rectWidthVariant, 2),
102
102
  style: styles === null || styles === void 0 ? void 0 : styles.title,
103
103
  testID: "list-cell-fallback-title",
@@ -110,10 +110,10 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_pro
110
110
  }
111
111
  return /*#__PURE__*/_jsx(TextFallback, {
112
112
  "aria-hidden": true,
113
+ percentage: true,
113
114
  className: classNames === null || classNames === void 0 ? void 0 : classNames.subtitle,
114
115
  disableRandomRectWidth: disableRandomRectWidth,
115
116
  font: "label1",
116
- percentage: true,
117
117
  rectWidthVariant: getRectWidthVariant(rectWidthVariant, 2),
118
118
  style: styles === null || styles === void 0 ? void 0 : styles.subtitle,
119
119
  testID: "list-cell-fallback-subtitle",
@@ -126,10 +126,10 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_pro
126
126
  }
127
127
  return /*#__PURE__*/_jsx(TextFallback, {
128
128
  "aria-hidden": true,
129
+ percentage: true,
129
130
  className: classNames === null || classNames === void 0 ? void 0 : classNames.description,
130
131
  disableRandomRectWidth: disableRandomRectWidth,
131
132
  font: spacingVariant === 'condensed' ? 'label2' : 'body',
132
- percentage: true,
133
133
  rectWidthVariant: getRectWidthVariant(rectWidthVariant, 3),
134
134
  style: styles === null || styles === void 0 ? void 0 : styles.description,
135
135
  testID: "list-cell-fallback-description",
@@ -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, { cloneElement, memo, useCallback, useMemo, useRef } from 'react';
10
- import { tooltipMaxWidth, tooltipPaddingX, tooltipPaddingY } from '@coinbase/cds-common/tokens/tooltip';
10
+ import { tooltipPaddingX, tooltipPaddingY } from '@coinbase/cds-common/tokens/tooltip';
11
11
  import { useComponentConfig } from '../../hooks/useComponentConfig';
12
12
  import { Popover } from '../popover/Popover';
13
13
  import { TooltipContent } from './TooltipContent';
@@ -42,7 +42,7 @@ export const Tooltip = /*#__PURE__*/memo(_props => {
42
42
  closeDelay,
43
43
  background = 'bg',
44
44
  borderRadius = 200,
45
- maxWidth = tooltipMaxWidth,
45
+ maxWidth,
46
46
  paddingX = tooltipPaddingX,
47
47
  paddingY = tooltipPaddingY,
48
48
  color = 'fg',
@@ -27,7 +27,7 @@ export const TooltipContent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, r
27
27
  placement = 'top',
28
28
  background = 'bg',
29
29
  borderRadius = 200,
30
- maxWidth = tooltipMaxWidth,
30
+ maxWidth,
31
31
  paddingX = tooltipPaddingX,
32
32
  paddingY = tooltipPaddingY,
33
33
  color = 'fg',
@@ -42,6 +42,8 @@ export const TooltipContent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, r
42
42
  padding: "var(--space-".concat(gap, ")"),
43
43
  zIndex: zIndex !== null && zIndex !== void 0 ? zIndex : zIndexTokens.tooltip
44
44
  }), [gap, zIndex]);
45
+ const isTextContent = typeof content === 'string';
46
+ const contentMaxWidth = maxWidth !== null && maxWidth !== void 0 ? maxWidth : isTextContent ? tooltipMaxWidth : undefined;
45
47
  const motionProps = useMotionProps({
46
48
  style: outerStyle,
47
49
  enterConfigs: [animateInOpacityConfig, getTranslateConfigByPlacement({
@@ -62,12 +64,13 @@ export const TooltipContent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, r
62
64
  "data-testid": testID,
63
65
  elevation: elevation,
64
66
  id: tooltipId,
65
- maxWidth: maxWidth,
67
+ maxWidth: contentMaxWidth,
66
68
  paddingX: paddingX,
67
69
  paddingY: paddingY,
68
- role: "tooltip"
70
+ role: "tooltip",
71
+ width: "max-content"
69
72
  }, props), {}, {
70
- children: typeof content === 'string' ? /*#__PURE__*/_jsx(Text, {
73
+ children: isTextContent ? /*#__PURE__*/_jsx(Text, {
71
74
  className: textCss,
72
75
  color: color,
73
76
  font: font,
@@ -1,11 +1,11 @@
1
1
  export * from './Link';
2
2
  export * from './Text';
3
3
  export * from './TextBody';
4
- export * from './TextFallback';
5
4
  export * from './TextCaption';
6
5
  export * from './TextDisplay1';
7
6
  export * from './TextDisplay2';
8
7
  export * from './TextDisplay3';
8
+ export * from './TextFallback';
9
9
  export * from './TextHeadline';
10
10
  export * from './TextInherited';
11
11
  export * from './TextLabel1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-web",
3
- "version": "9.6.8",
3
+ "version": "9.6.10",
4
4
  "description": "Coinbase Design System - Web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -68,6 +68,14 @@
68
68
  "types": "./dts/cards/ContentCard/index.d.ts",
69
69
  "default": "./esm/cards/ContentCard/index.js"
70
70
  },
71
+ "./cards/MediaCard": {
72
+ "types": "./dts/cards/MediaCard/index.d.ts",
73
+ "default": "./esm/cards/MediaCard/index.js"
74
+ },
75
+ "./cards/MessagingCard": {
76
+ "types": "./dts/cards/MessagingCard/index.d.ts",
77
+ "default": "./esm/cards/MessagingCard/index.js"
78
+ },
71
79
  "./carousel": {
72
80
  "types": "./dts/carousel/index.d.ts",
73
81
  "default": "./esm/carousel/index.js"
@@ -219,7 +227,7 @@
219
227
  "react-dom": "^18.0.0 || ~19.1.2"
220
228
  },
221
229
  "dependencies": {
222
- "@coinbase/cds-common": "^9.6.8",
230
+ "@coinbase/cds-common": "^9.6.10",
223
231
  "@coinbase/cds-icons": "^5.21.0",
224
232
  "@coinbase/cds-illustrations": "^4.44.0",
225
233
  "@coinbase/cds-lottie-files": "^3.3.4",