@coinbase/cds-web 9.6.7 → 9.6.9
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/cards/MediaCard/MediaCard.d.ts +28 -0
- package/dts/cards/MediaCard/MediaCard.d.ts.map +1 -0
- package/dts/cards/MediaCard/index.d.ts +2 -27
- package/dts/cards/MediaCard/index.d.ts.map +1 -1
- package/dts/cards/MessagingCard/MessagingCard.d.ts +25 -0
- package/dts/cards/MessagingCard/MessagingCard.d.ts.map +1 -0
- package/dts/cards/MessagingCard/index.d.ts +2 -24
- package/dts/cards/MessagingCard/index.d.ts.map +1 -1
- package/dts/coachmark/Coachmark.d.ts.map +1 -1
- package/esm/cards/MediaCard/MediaCard.js +61 -0
- package/esm/cards/MediaCard/index.js +2 -61
- package/esm/cards/MessagingCard/MessagingCard.js +70 -0
- package/esm/cards/MessagingCard/index.js +2 -70
- package/esm/coachmark/Coachmark.js +1 -0
- package/package.json +10 -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
|
+
## 9.6.9 (7/22/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🐞 Fixes
|
|
14
|
+
|
|
15
|
+
- Fix: adjust messaging card imports. [[#800](https://github.com/coinbase/cds/pull/800)]
|
|
16
|
+
|
|
17
|
+
## 9.6.8 (7/22/2026 PST)
|
|
18
|
+
|
|
19
|
+
#### 🐞 Fixes
|
|
20
|
+
|
|
21
|
+
- Make Coachmark close button transparent. [[#798](https://github.com/coinbase/cds/pull/798)]
|
|
22
|
+
|
|
11
23
|
## 9.6.7 ((7/20/2026, 09:01 AM PST))
|
|
12
24
|
|
|
13
25
|
This is an artificial version bump with no new change.
|
|
@@ -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
|
-
|
|
2
|
-
|
|
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.
|
|
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
|
-
|
|
2
|
-
|
|
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.
|
|
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":"Coachmark.d.ts","sourceRoot":"","sources":["../../src/coachmark/Coachmark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAI1E,OAAO,EAAO,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAM9F,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAC1C,YAAY,GAAG;IACb;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACrC;;OAEG;IACH,6BAA6B,CAAC,EAAE,MAAM,CAAC;CACxC,CAAC;AAEJ,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAC7C,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;AAEzD,eAAO,MAAM,SAAS,+
|
|
1
|
+
{"version":3,"file":"Coachmark.d.ts","sourceRoot":"","sources":["../../src/coachmark/Coachmark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAI1E,OAAO,EAAO,KAAK,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAM9F,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAC1C,YAAY,GAAG;IACb;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACrC;;OAEG;IACH,6BAA6B,CAAC,EAAE,MAAM,CAAC;CACxC,CAAC;AAEJ,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAC7C,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC,CAAC;AAEzD,eAAO,MAAM,SAAS,+FAkErB,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
|
-
|
|
2
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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';
|
|
@@ -44,6 +44,7 @@ export const Coachmark = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref)
|
|
|
44
44
|
padding: 1,
|
|
45
45
|
pin: "right",
|
|
46
46
|
children: /*#__PURE__*/_jsx(IconButton, {
|
|
47
|
+
transparent: true,
|
|
47
48
|
accessibilityLabel: closeButtonAccessibilityLabel,
|
|
48
49
|
name: "close",
|
|
49
50
|
onClick: onClose
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-web",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.9",
|
|
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.
|
|
230
|
+
"@coinbase/cds-common": "^9.6.9",
|
|
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",
|