@coinbase/cds-mobile 8.27.4 → 8.28.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/cells/ContentCell.d.ts +72 -2
- package/dts/cells/ContentCell.d.ts.map +1 -1
- package/dts/cells/ContentCellFallback.d.ts +24 -11
- package/dts/cells/ContentCellFallback.d.ts.map +1 -1
- package/dts/cells/ListCell.d.ts +15 -4
- package/dts/cells/ListCell.d.ts.map +1 -1
- package/esm/cells/ContentCell.js +108 -30
- package/esm/cells/ContentCellFallback.js +64 -18
- package/esm/cells/__stories__/ContentCell.stories.js +269 -40
- package/esm/cells/__stories__/ContentCellFallback.stories.js +30 -18
- package/esm/cells/__stories__/ListCell.stories.js +5 -1
- 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.28.0 (12/10/2025 PST)
|
|
12
|
+
|
|
13
|
+
#### 🚀 Updates
|
|
14
|
+
|
|
15
|
+
- Updated ContentCell to support condensed variant. [[#205](https://github.com/coinbase/cds/pull/205)] [DX-5013]
|
|
16
|
+
|
|
11
17
|
## 8.27.4 (12/7/2025 PST)
|
|
12
18
|
|
|
13
19
|
#### 🐞 Fixes
|
|
@@ -1,20 +1,90 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
3
|
import { type CellProps } from './Cell';
|
|
3
4
|
import { type CellAccessoryType } from './CellAccessory';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated this component will be removed in a future version. Use ListCell instead.
|
|
7
|
+
*/
|
|
4
8
|
export type ContentCellBaseProps = {
|
|
5
9
|
/** Accessory to display at the end of the cell. */
|
|
6
10
|
accessory?: CellAccessoryType;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `spacingVariant="compact"` instead. `compact` will be removed in a future major release.
|
|
13
|
+
*/
|
|
14
|
+
compact?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Spacing variant configuration.
|
|
17
|
+
* Deprecated value: 'compact'. Prefer 'condensed'.
|
|
18
|
+
*
|
|
19
|
+
* When `spacingVariant="normal"`:
|
|
20
|
+
* 1. `min-height` is `80px`
|
|
21
|
+
* 2. padding is `var(--space-2) var(--space-3)`
|
|
22
|
+
* 3. `border-radius` is `var(--borderRadius-200)`
|
|
23
|
+
*
|
|
24
|
+
* When `spacingVariant="compact"`:
|
|
25
|
+
* 1. same as `spacingVariant="normal"`, except `min-height` is `40px`
|
|
26
|
+
*
|
|
27
|
+
* When `spacingVariant="condensed"`:
|
|
28
|
+
* 1. `min-height` is undefined
|
|
29
|
+
* 2. padding is `var(--space-1) var(--space-2)`
|
|
30
|
+
* 3. `border-radius` is `var(--borderRadius-0)`
|
|
31
|
+
* 4. subtitle uses `label1`
|
|
32
|
+
* 5. title wraps to 2 lines regardless of description content
|
|
33
|
+
*
|
|
34
|
+
* @default 'normal'
|
|
35
|
+
*/
|
|
36
|
+
spacingVariant?: 'normal' | 'compact' | 'condensed';
|
|
7
37
|
/** Description of content. Content will wrap accordingly. */
|
|
8
38
|
description?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* React node to render description. Takes precedence over `description`.
|
|
41
|
+
* When provided, `styles.description` is not applied.
|
|
42
|
+
*/
|
|
43
|
+
descriptionNode?: React.ReactNode;
|
|
9
44
|
/** Media (icon, asset, image, etc) to display at the start of the cell. */
|
|
10
45
|
media?: React.ReactElement;
|
|
11
46
|
/** Meta information to display at the end of the title. */
|
|
12
47
|
meta?: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* React node to render meta. Takes precedence over `meta`.
|
|
50
|
+
* When provided, `styles.meta` and `styles.metaContainer` are not applied.
|
|
51
|
+
*/
|
|
52
|
+
metaNode?: React.ReactNode;
|
|
13
53
|
/** Subtitle of content. Max 1 line, otherwise will truncate. */
|
|
14
54
|
subtitle?: React.ReactNode;
|
|
15
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* React node to render subtitle. Takes precedence over `subtitle`.
|
|
57
|
+
* When provided, `styles.subtitle` is not applied.
|
|
58
|
+
*/
|
|
59
|
+
subtitleNode?: React.ReactNode;
|
|
60
|
+
/** Title of content. Up to 2 lines depending on spacing variant. */
|
|
16
61
|
title?: React.ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* React node to render title. Takes precedence over `title`.
|
|
64
|
+
* When provided, `styles.title` is not applied.
|
|
65
|
+
*/
|
|
66
|
+
titleNode?: React.ReactNode;
|
|
67
|
+
/**
|
|
68
|
+
* Styles for the default subcomponents. Ignored when the corresponding `xxNode` prop is used.
|
|
69
|
+
*/
|
|
70
|
+
styles?: {
|
|
71
|
+
root?: StyleProp<ViewStyle>;
|
|
72
|
+
media?: StyleProp<ViewStyle>;
|
|
73
|
+
accessory?: StyleProp<ViewStyle>;
|
|
74
|
+
contentContainer?: StyleProp<ViewStyle>;
|
|
75
|
+
pressable?: StyleProp<ViewStyle>;
|
|
76
|
+
mainContent?: StyleProp<ViewStyle>;
|
|
77
|
+
title?: StyleProp<TextStyle>;
|
|
78
|
+
subtitle?: StyleProp<TextStyle>;
|
|
79
|
+
metaContainer?: StyleProp<ViewStyle>;
|
|
80
|
+
meta?: StyleProp<TextStyle>;
|
|
81
|
+
description?: StyleProp<TextStyle>;
|
|
82
|
+
};
|
|
17
83
|
};
|
|
18
|
-
export type ContentCellProps = Omit<CellProps, 'children' | 'accessory'> &
|
|
84
|
+
export type ContentCellProps = Omit<CellProps, 'children' | 'accessory' | 'styles'> &
|
|
85
|
+
ContentCellBaseProps;
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated this component will be removed in a future version. Use ListCell instead.
|
|
88
|
+
*/
|
|
19
89
|
export declare const ContentCell: React.NamedExoticComponent<ContentCellProps>;
|
|
20
90
|
//# sourceMappingURL=ContentCell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentCell.d.ts","sourceRoot":"","sources":["../../src/cells/ContentCell.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ContentCell.d.ts","sourceRoot":"","sources":["../../src/cells/ContentCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOpE,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGxE;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,mDAAmD;IACnD,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IACpD,6DAA6D;IAC7D,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,2EAA2E;IAC3E,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC3B,2DAA2D;IAC3D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gEAAgE;IAChE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,oEAAoE;IACpE,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACjC,gBAAgB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACxC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACjC,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACnC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAChC,aAAa,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACrC,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5B,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KACpC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAC,GACjF,oBAAoB,CAAC;AAoBvB;;GAEG;AACH,eAAO,MAAM,WAAW,8CAsLtB,CAAC"}
|
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FallbackRectWidthProps } from '@coinbase/cds-common/types';
|
|
3
|
+
import type { CellSpacing } from './Cell';
|
|
4
|
+
import type { CellAccessoryType } from './CellAccessory';
|
|
3
5
|
import type { CellMediaType } from './CellMedia';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
media?: CellMediaType;
|
|
9
|
-
/** Display meta shimmer. */
|
|
10
|
-
meta?: boolean;
|
|
11
|
-
/** Display subtitle shimmer. */
|
|
12
|
-
subtitle?: boolean;
|
|
13
|
-
/** Display title shimmer. */
|
|
14
|
-
title?: boolean;
|
|
6
|
+
type ContentCellFallbackSpacingProps = {
|
|
7
|
+
innerSpacing?: CellSpacing;
|
|
8
|
+
outerSpacing?: CellSpacing;
|
|
9
|
+
spacingVariant?: 'normal' | 'compact' | 'condensed';
|
|
15
10
|
};
|
|
11
|
+
export type ContentCellFallbackProps = FallbackRectWidthProps &
|
|
12
|
+
ContentCellFallbackSpacingProps & {
|
|
13
|
+
/** Accessory to display at the end of the cell. */
|
|
14
|
+
accessory?: CellAccessoryType;
|
|
15
|
+
/** Custom accessory rendered at the end of the cell. Takes precedence over `accessory`. */
|
|
16
|
+
accessoryNode?: React.ReactNode;
|
|
17
|
+
/** Display description shimmer. */
|
|
18
|
+
description?: boolean;
|
|
19
|
+
/** Display media shimmer with a shape according to type. */
|
|
20
|
+
media?: CellMediaType;
|
|
21
|
+
/** Display meta shimmer. */
|
|
22
|
+
meta?: boolean;
|
|
23
|
+
/** Display subtitle shimmer. */
|
|
24
|
+
subtitle?: boolean;
|
|
25
|
+
/** Display title shimmer. */
|
|
26
|
+
title?: boolean;
|
|
27
|
+
};
|
|
16
28
|
export declare const ContentCellFallback: React.NamedExoticComponent<ContentCellFallbackProps>;
|
|
29
|
+
export {};
|
|
17
30
|
//# sourceMappingURL=ContentCellFallback.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentCellFallback.d.ts","sourceRoot":"","sources":["../../src/cells/ContentCellFallback.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ContentCellFallback.d.ts","sourceRoot":"","sources":["../../src/cells/ContentCellFallback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAMzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKjD,KAAK,+BAA+B,GAAG;IACrC,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,cAAc,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,GAC3D,+BAA+B,GAAG;IAChC,mDAAmD;IACnD,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,2FAA2F;IAC3F,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEJ,eAAO,MAAM,mBAAmB,sDAuG9B,CAAC"}
|
package/dts/cells/ListCell.d.ts
CHANGED
|
@@ -59,7 +59,10 @@ export type ListCellBaseProps = CellDetailProps &
|
|
|
59
59
|
spacingVariant?: 'normal' | 'compact' | 'condensed';
|
|
60
60
|
/** Description of content. Max 1 line (with title) or 2 lines (without), otherwise will truncate. This prop is only intended to accept a string or Text component; other use cases, while allowed, are not supported and may result in unexpected behavior. For arbitrary content, use `descriptionNode`. */
|
|
61
61
|
description?: React.ReactNode;
|
|
62
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* React node to render description. Takes precedence over `description`.
|
|
64
|
+
* When provided, `styles.description` is not applied.
|
|
65
|
+
*/
|
|
63
66
|
descriptionNode?: React.ReactNode;
|
|
64
67
|
/**
|
|
65
68
|
* Disable the default accessory that is displayed when the cell is selected.
|
|
@@ -82,13 +85,21 @@ export type ListCellBaseProps = CellDetailProps &
|
|
|
82
85
|
multiline?: boolean;
|
|
83
86
|
/** Title of content. Max 1 line (with description) or 2 lines (without), otherwise will truncate. This prop is only intended to accept a string or Text component; other use cases, while allowed, are not supported and may result in unexpected behavior. For arbitrary content, use `titleNode`. */
|
|
84
87
|
title?: React.ReactNode;
|
|
85
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* React node to render title. Takes precedence over `title`.
|
|
90
|
+
* When provided, `styles.title` is not applied.
|
|
91
|
+
*/
|
|
86
92
|
titleNode?: React.ReactNode;
|
|
87
93
|
/** Subtitle to display below the title and above the description. This prop is only intended to accept a string or Text component; other use cases, while allowed, are not supported and may result in unexpected behavior. For arbitrary content, use `subtitleNode`. */
|
|
88
94
|
subtitle?: React.ReactNode;
|
|
89
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* React node to render subtitle. Takes precedence over `subtitle`.
|
|
97
|
+
* When provided, `styles.subtitle` is not applied.
|
|
98
|
+
*/
|
|
90
99
|
subtitleNode?: React.ReactNode;
|
|
91
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* Styles for default subcomponents. Ignored when the corresponding `xxNode` prop is used.
|
|
102
|
+
*/
|
|
92
103
|
styles?: {
|
|
93
104
|
root?: StyleProp<ViewStyle>;
|
|
94
105
|
media?: StyleProp<ViewStyle>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListCell.d.ts","sourceRoot":"","sources":["../../src/cells/ListCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpE,OAAO,EAAQ,KAAK,aAAa,EAAE,KAAK,SAAS,EAAoB,MAAM,QAAQ,CAAC;AACpF,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;CAIF,CAAC;AAGjC,eAAO,MAAM,qBAAqB;;;;CAIF,CAAC;AAEjC,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAC7C,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IAC9C,mDAAmD;IACnD,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,gGAAgG;IAChG,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC;;;;OAIG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IACpD,6SAA6S;IAC7S,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B
|
|
1
|
+
{"version":3,"file":"ListCell.d.ts","sourceRoot":"","sources":["../../src/cells/ListCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAMpE,OAAO,EAAQ,KAAK,aAAa,EAAE,KAAK,SAAS,EAAoB,MAAM,QAAQ,CAAC;AACpF,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhE,eAAO,MAAM,qBAAqB;;;;CAIF,CAAC;AAGjC,eAAO,MAAM,qBAAqB;;;;CAIF,CAAC;AAEjC,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAC7C,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,UAAU,CAAC,GAAG;IAC9C,mDAAmD;IACnD,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,gGAAgG;IAChG,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC;;;;OAIG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IACpD,6SAA6S;IAC7S,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,6BAA6B;IAC7B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE/B,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC3B,wIAAwI;IACxI,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uSAAuS;IACvS,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,0QAA0Q;IAC1Q,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACpC,GAAG,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC3B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACjC,gBAAgB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACxC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACjC,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACnC,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAClC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAChC,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KACpC,CAAC;CACH,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,WAAW,GAAG,UAAU,CAAC,CAAC;AAE1F,eAAO,MAAM,QAAQ,2CAoKnB,CAAC"}
|
package/esm/cells/ContentCell.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
const _excluded = ["accessory", "title", "description", "disabled", "media", "meta", "selected", "subtitle", "accessibilityLabel", "accessibilityHint", "detailWidth", "priority", "innerSpacing", "outerSpacing", "alignItems"];
|
|
1
|
+
const _excluded = ["accessory", "accessoryNode", "title", "titleNode", "description", "descriptionNode", "disabled", "media", "meta", "metaNode", "selected", "subtitle", "subtitleNode", "accessibilityLabel", "accessibilityHint", "detailWidth", "priority", "innerSpacing", "outerSpacing", "compact", "spacingVariant", "alignItems", "style", "styles", "onPress"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
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; }
|
|
4
|
-
import React, { memo } from 'react';
|
|
4
|
+
import React, { memo, useMemo } from 'react';
|
|
5
|
+
import { compactListHeight, listHeight } from '@coinbase/cds-common/tokens/cell';
|
|
5
6
|
import { isProduction } from '@coinbase/cds-utils';
|
|
6
7
|
import { Box, HStack, VStack } from '../layout';
|
|
7
8
|
import { Text } from '../typography/Text';
|
|
8
9
|
import { Cell } from './Cell';
|
|
9
10
|
import { CellAccessory } from './CellAccessory';
|
|
11
|
+
import { condensedInnerSpacing, condensedOuterSpacing } from './ListCell';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated this component will be removed in a future version. Use ListCell instead.
|
|
15
|
+
*/
|
|
10
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
17
|
function generateAccessibilityLabels(userLabel, title, subtitle) {
|
|
12
18
|
let computedLabel = userLabel != null ? userLabel : '';
|
|
@@ -20,49 +26,124 @@ function generateAccessibilityLabels(userLabel, title, subtitle) {
|
|
|
20
26
|
}
|
|
21
27
|
return computedLabel;
|
|
22
28
|
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated this component will be removed in a future version. Use ListCell instead.
|
|
32
|
+
*/
|
|
23
33
|
export const ContentCell = /*#__PURE__*/memo(function ContentCell(_ref) {
|
|
34
|
+
var _props$borderRadius;
|
|
24
35
|
let {
|
|
25
36
|
accessory,
|
|
37
|
+
accessoryNode,
|
|
26
38
|
title,
|
|
39
|
+
titleNode,
|
|
27
40
|
description,
|
|
41
|
+
descriptionNode,
|
|
28
42
|
disabled,
|
|
29
43
|
media,
|
|
30
44
|
meta,
|
|
45
|
+
metaNode,
|
|
31
46
|
selected,
|
|
32
47
|
subtitle,
|
|
48
|
+
subtitleNode,
|
|
33
49
|
accessibilityLabel,
|
|
34
50
|
accessibilityHint,
|
|
35
51
|
detailWidth,
|
|
36
52
|
priority,
|
|
37
53
|
innerSpacing,
|
|
38
54
|
outerSpacing,
|
|
39
|
-
|
|
55
|
+
compact: compactProp,
|
|
56
|
+
spacingVariant = compactProp ? 'compact' : 'normal',
|
|
57
|
+
alignItems = 'flex-start',
|
|
58
|
+
style,
|
|
59
|
+
styles,
|
|
60
|
+
onPress
|
|
40
61
|
} = _ref,
|
|
41
62
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
63
|
+
const hasTitleContent = Boolean(titleNode != null ? titleNode : title);
|
|
64
|
+
const hasSubtitleContent = Boolean(subtitleNode != null ? subtitleNode : subtitle);
|
|
65
|
+
const hasMetaContent = Boolean(metaNode != null ? metaNode : meta);
|
|
66
|
+
const hasDescriptionContent = Boolean(descriptionNode != null ? descriptionNode : description);
|
|
42
67
|
if (!isProduction()) {
|
|
43
|
-
if (
|
|
68
|
+
if (hasMetaContent && !hasTitleContent && !hasSubtitleContent) {
|
|
44
69
|
console.error('ContentCell: Cannot use `meta` without a `title` or `subtitle`.');
|
|
45
70
|
}
|
|
46
71
|
}
|
|
47
|
-
const hasTitles =
|
|
72
|
+
const hasTitles = hasTitleContent || hasSubtitleContent;
|
|
48
73
|
const accessoryType = selected ? 'selected' : accessory;
|
|
49
74
|
const computedAccessibilityLabel = generateAccessibilityLabels(accessibilityLabel, title, subtitle);
|
|
50
75
|
const computedAccessibilityHint = generateAccessibilityLabels(accessibilityHint, title, subtitle);
|
|
76
|
+
const minHeight = spacingVariant === 'compact' ? compactListHeight : spacingVariant === 'normal' ? listHeight : undefined;
|
|
77
|
+
const subtitleFont = spacingVariant === 'condensed' ? 'label1' : 'label2';
|
|
78
|
+
const titleNumberOfLines = spacingVariant === 'condensed' ? 2 : hasDescriptionContent ? 1 : 2;
|
|
79
|
+
const metaRender = useMemo(() => {
|
|
80
|
+
if (metaNode) {
|
|
81
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
82
|
+
justifyContent: "flex-end",
|
|
83
|
+
paddingStart: 1,
|
|
84
|
+
paddingTop: 0.5,
|
|
85
|
+
style: styles == null ? void 0 : styles.metaContainer,
|
|
86
|
+
children: metaNode
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
if (meta) {
|
|
90
|
+
return /*#__PURE__*/_jsx(Box, {
|
|
91
|
+
justifyContent: "flex-end",
|
|
92
|
+
paddingStart: 1,
|
|
93
|
+
paddingTop: 0.5,
|
|
94
|
+
style: styles == null ? void 0 : styles.metaContainer,
|
|
95
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
96
|
+
color: "fgMuted",
|
|
97
|
+
font: "label2",
|
|
98
|
+
style: styles == null ? void 0 : styles.meta,
|
|
99
|
+
children: meta
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
return null;
|
|
104
|
+
}, [metaNode, meta, styles == null ? void 0 : styles.metaContainer, styles == null ? void 0 : styles.meta]);
|
|
105
|
+
const accessoryRender = useMemo(() => {
|
|
106
|
+
if (spacingVariant !== 'condensed') {
|
|
107
|
+
return accessoryType ? /*#__PURE__*/_jsx(CellAccessory, {
|
|
108
|
+
paddingTop: 0.5,
|
|
109
|
+
type: accessoryType
|
|
110
|
+
}) : undefined;
|
|
111
|
+
}
|
|
112
|
+
if (!accessoryType && !metaRender) {
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
return /*#__PURE__*/_jsxs(HStack, {
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
gap: 2,
|
|
118
|
+
children: [metaRender, accessoryType ? /*#__PURE__*/_jsx(CellAccessory, {
|
|
119
|
+
paddingTop: 0.5,
|
|
120
|
+
type: accessoryType
|
|
121
|
+
}) : null]
|
|
122
|
+
});
|
|
123
|
+
}, [spacingVariant, accessoryType, metaRender]);
|
|
51
124
|
return /*#__PURE__*/_jsx(Cell, _extends({
|
|
52
125
|
accessibilityHint: computedAccessibilityHint,
|
|
53
126
|
accessibilityLabel: computedAccessibilityLabel,
|
|
54
|
-
accessory:
|
|
55
|
-
|
|
56
|
-
type: accessoryType
|
|
57
|
-
}) : undefined,
|
|
127
|
+
accessory: accessoryRender,
|
|
128
|
+
accessoryNode: accessoryNode,
|
|
58
129
|
alignItems: alignItems,
|
|
130
|
+
borderRadius: (_props$borderRadius = props.borderRadius) != null ? _props$borderRadius : spacingVariant === 'condensed' ? 0 : undefined,
|
|
59
131
|
detailWidth: detailWidth,
|
|
60
132
|
disabled: disabled,
|
|
61
|
-
innerSpacing: innerSpacing,
|
|
133
|
+
innerSpacing: innerSpacing != null ? innerSpacing : spacingVariant === 'condensed' ? condensedInnerSpacing : undefined,
|
|
62
134
|
media: media,
|
|
63
|
-
|
|
135
|
+
minHeight: minHeight,
|
|
136
|
+
onPress: onPress,
|
|
137
|
+
outerSpacing: outerSpacing != null ? outerSpacing : spacingVariant === 'condensed' ? condensedOuterSpacing : undefined,
|
|
64
138
|
priority: priority,
|
|
65
|
-
selected: selected
|
|
139
|
+
selected: selected,
|
|
140
|
+
style: [style, styles == null ? void 0 : styles.root],
|
|
141
|
+
styles: {
|
|
142
|
+
accessory: styles == null ? void 0 : styles.accessory,
|
|
143
|
+
contentContainer: styles == null ? void 0 : styles.contentContainer,
|
|
144
|
+
media: styles == null ? void 0 : styles.media,
|
|
145
|
+
pressable: styles == null ? void 0 : styles.pressable
|
|
146
|
+
}
|
|
66
147
|
}, props, {
|
|
67
148
|
children: /*#__PURE__*/_jsxs(VStack, {
|
|
68
149
|
children: [hasTitles && /*#__PURE__*/_jsxs(HStack, {
|
|
@@ -70,30 +151,27 @@ export const ContentCell = /*#__PURE__*/memo(function ContentCell(_ref) {
|
|
|
70
151
|
justifyContent: "space-between",
|
|
71
152
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
72
153
|
flexShrink: 1,
|
|
73
|
-
|
|
154
|
+
style: styles == null ? void 0 : styles.mainContent,
|
|
155
|
+
children: [titleNode ? titleNode : title ? /*#__PURE__*/_jsx(Text, {
|
|
156
|
+
ellipsize: "tail",
|
|
74
157
|
font: "headline",
|
|
158
|
+
numberOfLines: titleNumberOfLines,
|
|
159
|
+
style: styles == null ? void 0 : styles.title,
|
|
75
160
|
children: title
|
|
76
|
-
}),
|
|
77
|
-
font:
|
|
78
|
-
paddingBottom:
|
|
79
|
-
paddingTop:
|
|
161
|
+
}) : null, subtitleNode ? subtitleNode : subtitle ? /*#__PURE__*/_jsx(Text, {
|
|
162
|
+
font: subtitleFont,
|
|
163
|
+
paddingBottom: hasDescriptionContent ? 0.5 : 0,
|
|
164
|
+
paddingTop: hasTitleContent ? 0.5 : 0,
|
|
165
|
+
style: styles == null ? void 0 : styles.subtitle,
|
|
80
166
|
children: subtitle
|
|
81
|
-
})]
|
|
82
|
-
}),
|
|
83
|
-
|
|
84
|
-
paddingStart: 1,
|
|
85
|
-
paddingTop: 0.5,
|
|
86
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
87
|
-
color: "fgMuted",
|
|
88
|
-
font: "label2",
|
|
89
|
-
children: meta
|
|
90
|
-
})
|
|
91
|
-
})]
|
|
92
|
-
}), !!description && /*#__PURE__*/_jsx(Text, {
|
|
167
|
+
}) : null]
|
|
168
|
+
}), spacingVariant !== 'condensed' ? metaRender : null]
|
|
169
|
+
}), descriptionNode ? descriptionNode : description ? /*#__PURE__*/_jsx(Text, {
|
|
93
170
|
color: "fgMuted",
|
|
94
171
|
font: "body",
|
|
172
|
+
style: styles == null ? void 0 : styles.description,
|
|
95
173
|
children: description
|
|
96
|
-
})]
|
|
174
|
+
}) : null]
|
|
97
175
|
})
|
|
98
176
|
}));
|
|
99
177
|
});
|
|
@@ -1,43 +1,89 @@
|
|
|
1
|
-
import React, { memo } from 'react';
|
|
1
|
+
import React, { memo, useMemo } from 'react';
|
|
2
2
|
import { getRectWidthVariant } from '@coinbase/cds-common/utils/getRectWidthVariant';
|
|
3
3
|
import { useTheme } from '../hooks/useTheme';
|
|
4
4
|
import { Fallback } from '../layout';
|
|
5
5
|
import { ContentCell } from './ContentCell';
|
|
6
|
+
import { condensedInnerSpacing, condensedOuterSpacing } from './ListCell';
|
|
6
7
|
import { MediaFallback } from './MediaFallback';
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
export const ContentCellFallback = /*#__PURE__*/memo(function ContentCellFallback(_ref) {
|
|
9
10
|
let {
|
|
11
|
+
accessory,
|
|
12
|
+
accessoryNode,
|
|
10
13
|
title,
|
|
11
14
|
description,
|
|
12
15
|
media,
|
|
13
16
|
meta,
|
|
14
17
|
subtitle,
|
|
15
18
|
disableRandomRectWidth,
|
|
16
|
-
rectWidthVariant
|
|
19
|
+
rectWidthVariant,
|
|
20
|
+
spacingVariant = 'normal',
|
|
21
|
+
innerSpacing,
|
|
22
|
+
outerSpacing
|
|
17
23
|
} = _ref;
|
|
18
24
|
const theme = useTheme();
|
|
19
|
-
|
|
20
|
-
|
|
25
|
+
const descriptionHeight = spacingVariant === 'condensed' ? theme.lineHeight.label2 : theme.lineHeight.body;
|
|
26
|
+
const subtitleHeight = spacingVariant === 'condensed' ? theme.lineHeight.label1 : theme.lineHeight.label2;
|
|
27
|
+
const titleHeight = theme.lineHeight.headline;
|
|
28
|
+
const metaNode = useMemo(() => {
|
|
29
|
+
if (!meta) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
return /*#__PURE__*/_jsx(Fallback, {
|
|
21
33
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
22
|
-
height: theme.lineHeight.
|
|
23
|
-
paddingTop: 0.5,
|
|
34
|
+
height: theme.lineHeight.label2,
|
|
24
35
|
rectWidthVariant: getRectWidthVariant(rectWidthVariant, 0),
|
|
25
|
-
width:
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
width: 50
|
|
37
|
+
});
|
|
38
|
+
}, [meta, disableRandomRectWidth, rectWidthVariant, theme]);
|
|
39
|
+
const titleNode = useMemo(() => {
|
|
40
|
+
if (!title) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
return /*#__PURE__*/_jsx(Fallback, {
|
|
31
44
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
32
|
-
height:
|
|
45
|
+
height: titleHeight,
|
|
33
46
|
rectWidthVariant: getRectWidthVariant(rectWidthVariant, 1),
|
|
34
|
-
width:
|
|
35
|
-
})
|
|
36
|
-
|
|
47
|
+
width: 90
|
|
48
|
+
});
|
|
49
|
+
}, [title, disableRandomRectWidth, rectWidthVariant, titleHeight]);
|
|
50
|
+
const subtitleNode = useMemo(() => {
|
|
51
|
+
if (!subtitle) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
return /*#__PURE__*/_jsx(Fallback, {
|
|
37
55
|
disableRandomRectWidth: disableRandomRectWidth,
|
|
38
|
-
height:
|
|
56
|
+
height: subtitleHeight,
|
|
57
|
+
paddingBottom: description ? 0.5 : undefined,
|
|
58
|
+
paddingTop: title ? 0.5 : undefined,
|
|
39
59
|
rectWidthVariant: getRectWidthVariant(rectWidthVariant, 2),
|
|
40
60
|
width: 90
|
|
41
|
-
})
|
|
61
|
+
});
|
|
62
|
+
}, [subtitle, disableRandomRectWidth, rectWidthVariant, subtitleHeight, description, title]);
|
|
63
|
+
const descriptionNode = useMemo(() => {
|
|
64
|
+
if (!description) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
return /*#__PURE__*/_jsx(Fallback, {
|
|
68
|
+
disableRandomRectWidth: disableRandomRectWidth,
|
|
69
|
+
height: descriptionHeight,
|
|
70
|
+
paddingTop: 0.5,
|
|
71
|
+
rectWidthVariant: getRectWidthVariant(rectWidthVariant, 3),
|
|
72
|
+
width: 110
|
|
73
|
+
});
|
|
74
|
+
}, [description, disableRandomRectWidth, rectWidthVariant, descriptionHeight]);
|
|
75
|
+
return /*#__PURE__*/_jsx(ContentCell, {
|
|
76
|
+
accessory: accessory,
|
|
77
|
+
accessoryNode: accessoryNode,
|
|
78
|
+
descriptionNode: descriptionNode,
|
|
79
|
+
innerSpacing: innerSpacing != null ? innerSpacing : spacingVariant === 'condensed' ? condensedInnerSpacing : undefined,
|
|
80
|
+
media: media ? /*#__PURE__*/_jsx(MediaFallback, {
|
|
81
|
+
type: media
|
|
82
|
+
}) : undefined,
|
|
83
|
+
metaNode: metaNode,
|
|
84
|
+
outerSpacing: outerSpacing != null ? outerSpacing : spacingVariant === 'condensed' ? condensedOuterSpacing : undefined,
|
|
85
|
+
spacingVariant: spacingVariant,
|
|
86
|
+
subtitleNode: subtitleNode,
|
|
87
|
+
titleNode: titleNode
|
|
42
88
|
});
|
|
43
89
|
});
|
|
@@ -1,46 +1,64 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { assets } from '@coinbase/cds-common/internal/data/assets';
|
|
3
|
+
import { Switch } from '../../controls/Switch';
|
|
3
4
|
import { Example, ExampleScreen } from '../../examples/ExampleScreen';
|
|
5
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
6
|
+
import { Icon } from '../../icons/Icon';
|
|
4
7
|
import { Pictogram } from '../../illustrations/Pictogram';
|
|
5
8
|
import { Box } from '../../layout/Box';
|
|
6
|
-
import {
|
|
9
|
+
import { HStack } from '../../layout/HStack';
|
|
10
|
+
import { VStack } from '../../layout/VStack';
|
|
11
|
+
import { Avatar } from '../../media/Avatar';
|
|
12
|
+
import { RemoteImage } from '../../media/RemoteImage';
|
|
13
|
+
import { Text } from '../../typography/Text';
|
|
7
14
|
import { ContentCell } from '../ContentCell';
|
|
15
|
+
import { ContentCellFallback } from '../ContentCellFallback';
|
|
8
16
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
17
|
const innerSpacingConfig = {
|
|
10
|
-
paddingX: 1
|
|
18
|
+
paddingX: 1,
|
|
19
|
+
marginX: 0
|
|
11
20
|
};
|
|
12
21
|
const onPressConsole = () => console.log('pressed');
|
|
13
22
|
const Content = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
14
23
|
children: [/*#__PURE__*/_jsx(ContentCell, {
|
|
15
24
|
meta: "Meta",
|
|
25
|
+
spacingVariant: "condensed",
|
|
16
26
|
title: "Title"
|
|
17
27
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
28
|
+
spacingVariant: "condensed",
|
|
18
29
|
subtitle: "Subtitle",
|
|
19
30
|
title: "Title"
|
|
20
31
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
21
32
|
description: "Description",
|
|
22
33
|
meta: "Meta",
|
|
34
|
+
spacingVariant: "condensed",
|
|
23
35
|
title: "Title"
|
|
24
36
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
25
37
|
description: "Description",
|
|
38
|
+
spacingVariant: "condensed",
|
|
26
39
|
subtitle: "Subtitle",
|
|
27
40
|
title: "Title"
|
|
28
41
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
29
42
|
meta: "Meta",
|
|
43
|
+
spacingVariant: "condensed",
|
|
30
44
|
subtitle: "Subtitle"
|
|
31
45
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
32
46
|
description: "Description",
|
|
47
|
+
spacingVariant: "condensed",
|
|
33
48
|
subtitle: "Subtitle"
|
|
34
49
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
35
|
-
description: "Description"
|
|
50
|
+
description: "Description",
|
|
51
|
+
spacingVariant: "condensed"
|
|
36
52
|
})]
|
|
37
53
|
});
|
|
38
54
|
const PressableContent = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
39
55
|
children: [/*#__PURE__*/_jsx(ContentCell, {
|
|
40
56
|
onPress: onPressConsole,
|
|
57
|
+
spacingVariant: "condensed",
|
|
41
58
|
title: "Title"
|
|
42
59
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
43
60
|
onPress: onPressConsole,
|
|
61
|
+
spacingVariant: "condensed",
|
|
44
62
|
subtitle: "Subtitle",
|
|
45
63
|
title: "Title"
|
|
46
64
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
@@ -48,11 +66,13 @@ const PressableContent = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
|
48
66
|
innerSpacing: innerSpacingConfig,
|
|
49
67
|
meta: "Meta",
|
|
50
68
|
onPress: onPressConsole,
|
|
69
|
+
spacingVariant: "condensed",
|
|
51
70
|
subtitle: "Subtitle",
|
|
52
71
|
title: "Title"
|
|
53
72
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
54
73
|
description: "Description",
|
|
55
74
|
onPress: onPressConsole,
|
|
75
|
+
spacingVariant: "condensed",
|
|
56
76
|
subtitle: "Subtitle"
|
|
57
77
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
58
78
|
selected: true,
|
|
@@ -60,17 +80,20 @@ const PressableContent = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
|
60
80
|
innerSpacing: innerSpacingConfig,
|
|
61
81
|
meta: "Meta",
|
|
62
82
|
onPress: onPressConsole,
|
|
83
|
+
spacingVariant: "condensed",
|
|
63
84
|
title: "Title"
|
|
64
85
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
65
86
|
disabled: true,
|
|
66
87
|
description: "Description",
|
|
67
88
|
onPress: onPressConsole,
|
|
89
|
+
spacingVariant: "condensed",
|
|
68
90
|
subtitle: "Subtitle",
|
|
69
91
|
title: "Title"
|
|
70
92
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
71
93
|
disabled: true,
|
|
72
94
|
selected: true,
|
|
73
95
|
onPress: onPressConsole,
|
|
96
|
+
spacingVariant: "condensed",
|
|
74
97
|
subtitle: "Subtitle",
|
|
75
98
|
title: "Title"
|
|
76
99
|
})]
|
|
@@ -78,125 +101,329 @@ const PressableContent = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
|
78
101
|
const LongContent = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
79
102
|
children: [/*#__PURE__*/_jsx(ContentCell, {
|
|
80
103
|
description: "Description also has a very long length that will wrap to 2 lines maximum. This is different from subtitle that only supports 1 line.",
|
|
81
|
-
|
|
104
|
+
spacingVariant: "condensed",
|
|
105
|
+
title: "Title with a very long length that wraps to 2 lines in condensed spacing"
|
|
82
106
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
83
107
|
accessory: "more",
|
|
84
108
|
description: "Description also has a very long length that will wrap to 2 lines maximum. This is different from subtitle that only supports 1 line.",
|
|
85
|
-
media: /*#__PURE__*/_jsx(
|
|
86
|
-
|
|
87
|
-
|
|
109
|
+
media: /*#__PURE__*/_jsx(Avatar, {
|
|
110
|
+
size: "m",
|
|
111
|
+
src: assets.eth.imageUrl
|
|
88
112
|
}),
|
|
113
|
+
spacingVariant: "condensed",
|
|
89
114
|
subtitle: "Subtitle is short lol",
|
|
90
|
-
title: "Title with a very long length that
|
|
115
|
+
title: "Title with a very long length that wraps to 2 lines in condensed spacing"
|
|
91
116
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
92
|
-
media: /*#__PURE__*/_jsx(
|
|
93
|
-
|
|
94
|
-
|
|
117
|
+
media: /*#__PURE__*/_jsx(Avatar, {
|
|
118
|
+
size: "m",
|
|
119
|
+
src: assets.eth.imageUrl
|
|
95
120
|
}),
|
|
96
121
|
meta: "Long meta title",
|
|
97
|
-
|
|
122
|
+
spacingVariant: "condensed",
|
|
123
|
+
title: "Title with a very long length that wraps to 2 lines in condensed spacing"
|
|
98
124
|
})]
|
|
99
125
|
});
|
|
100
126
|
const WithAccessory = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
101
127
|
children: [/*#__PURE__*/_jsx(ContentCell, {
|
|
102
128
|
accessory: "arrow",
|
|
103
129
|
meta: "Meta",
|
|
130
|
+
spacingVariant: "condensed",
|
|
104
131
|
title: "Title"
|
|
105
132
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
106
133
|
accessory: "more",
|
|
134
|
+
spacingVariant: "condensed",
|
|
107
135
|
subtitle: "Subtitle",
|
|
108
136
|
title: "Title"
|
|
109
137
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
110
138
|
accessory: "selected",
|
|
111
139
|
description: "Description",
|
|
140
|
+
spacingVariant: "condensed",
|
|
112
141
|
title: "Title"
|
|
113
142
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
114
143
|
accessory: "arrow",
|
|
115
144
|
description: "Description",
|
|
116
145
|
meta: "Meta",
|
|
146
|
+
spacingVariant: "condensed",
|
|
117
147
|
subtitle: "Subtitle",
|
|
118
148
|
title: "Title"
|
|
119
149
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
120
150
|
accessory: "more",
|
|
121
151
|
description: "Description",
|
|
122
152
|
meta: "Meta",
|
|
153
|
+
spacingVariant: "condensed",
|
|
123
154
|
subtitle: "Subtitle"
|
|
124
155
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
125
156
|
accessory: "selected",
|
|
126
157
|
description: "Description",
|
|
158
|
+
spacingVariant: "condensed",
|
|
127
159
|
title: "Title"
|
|
128
160
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
129
161
|
accessory: "arrow",
|
|
130
|
-
description: "Description"
|
|
162
|
+
description: "Description",
|
|
163
|
+
spacingVariant: "condensed"
|
|
131
164
|
})]
|
|
132
165
|
});
|
|
133
166
|
const WithMedia = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
134
167
|
children: [/*#__PURE__*/_jsx(ContentCell, {
|
|
135
|
-
media: /*#__PURE__*/_jsx(
|
|
168
|
+
media: /*#__PURE__*/_jsx(Icon, {
|
|
136
169
|
active: true,
|
|
137
170
|
name: "email",
|
|
138
|
-
|
|
171
|
+
size: "s"
|
|
139
172
|
}),
|
|
173
|
+
spacingVariant: "condensed",
|
|
140
174
|
title: "Icon"
|
|
141
175
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
142
|
-
media: /*#__PURE__*/_jsx(
|
|
176
|
+
media: /*#__PURE__*/_jsx(Icon, {
|
|
143
177
|
active: true,
|
|
144
178
|
name: "email",
|
|
145
|
-
|
|
179
|
+
size: "s"
|
|
146
180
|
}),
|
|
147
181
|
onPress: onPressConsole,
|
|
182
|
+
spacingVariant: "condensed",
|
|
148
183
|
title: "Icon (pressable)"
|
|
149
184
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
150
185
|
description: "Description",
|
|
151
|
-
media: /*#__PURE__*/_jsx(
|
|
186
|
+
media: /*#__PURE__*/_jsx(Icon, {
|
|
152
187
|
name: "phone",
|
|
153
|
-
|
|
188
|
+
size: "s"
|
|
154
189
|
}),
|
|
190
|
+
spacingVariant: "condensed",
|
|
155
191
|
title: "Icon"
|
|
156
192
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
157
193
|
description: "Description",
|
|
158
|
-
media: /*#__PURE__*/_jsx(
|
|
194
|
+
media: /*#__PURE__*/_jsx(Icon, {
|
|
159
195
|
color: "fgPrimary",
|
|
160
196
|
name: "phone",
|
|
161
|
-
|
|
197
|
+
size: "s"
|
|
162
198
|
}),
|
|
199
|
+
spacingVariant: "condensed",
|
|
163
200
|
title: "Icon (With Primary Color)"
|
|
164
201
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
165
202
|
description: "Description",
|
|
166
|
-
media: /*#__PURE__*/_jsx(
|
|
167
|
-
|
|
168
|
-
|
|
203
|
+
media: /*#__PURE__*/_jsx(Avatar, {
|
|
204
|
+
size: "m",
|
|
205
|
+
src: assets.eth.imageUrl
|
|
169
206
|
}),
|
|
207
|
+
spacingVariant: "condensed",
|
|
170
208
|
subtitle: "Subtitle",
|
|
171
209
|
title: "Avatar"
|
|
172
210
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
173
211
|
description: "Description",
|
|
174
|
-
media: /*#__PURE__*/_jsx(
|
|
175
|
-
|
|
176
|
-
|
|
212
|
+
media: /*#__PURE__*/_jsx(RemoteImage, {
|
|
213
|
+
darkModeEnhancementsApplied: true,
|
|
214
|
+
accessibilityLabel: "ETH asset",
|
|
215
|
+
shape: "circle",
|
|
216
|
+
size: "m",
|
|
217
|
+
source: assets.eth.imageUrl
|
|
177
218
|
}),
|
|
178
219
|
meta: "Meta",
|
|
220
|
+
spacingVariant: "condensed",
|
|
179
221
|
subtitle: "Subtitle",
|
|
180
222
|
title: "Asset"
|
|
181
223
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
182
|
-
media: /*#__PURE__*/_jsx(
|
|
183
|
-
|
|
184
|
-
|
|
224
|
+
media: /*#__PURE__*/_jsx(RemoteImage, {
|
|
225
|
+
accessibilityLabel: "ETH image",
|
|
226
|
+
shape: "squircle",
|
|
227
|
+
size: "m",
|
|
228
|
+
source: assets.eth.imageUrl
|
|
185
229
|
}),
|
|
186
230
|
meta: "Meta",
|
|
231
|
+
spacingVariant: "condensed",
|
|
187
232
|
subtitle: "Subtitle",
|
|
188
233
|
title: "Image"
|
|
189
234
|
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
190
235
|
description: "Description",
|
|
191
|
-
media: /*#__PURE__*/_jsx(
|
|
192
|
-
|
|
236
|
+
media: /*#__PURE__*/_jsx(Box, {
|
|
237
|
+
alignItems: "center",
|
|
238
|
+
height: 48,
|
|
239
|
+
justifyContent: "center",
|
|
240
|
+
width: 48,
|
|
241
|
+
children: /*#__PURE__*/_jsx(Pictogram, {
|
|
242
|
+
dimension: "48x48",
|
|
193
243
|
name: "shield"
|
|
194
|
-
})
|
|
195
|
-
type: "pictogram"
|
|
244
|
+
})
|
|
196
245
|
}),
|
|
246
|
+
spacingVariant: "condensed",
|
|
197
247
|
title: "Pictogram"
|
|
198
248
|
})]
|
|
199
249
|
});
|
|
250
|
+
const SpacingVariants = () => /*#__PURE__*/_jsxs(VStack, {
|
|
251
|
+
gap: 2,
|
|
252
|
+
children: [/*#__PURE__*/_jsx(ContentCell, {
|
|
253
|
+
description: "Description",
|
|
254
|
+
meta: "Meta",
|
|
255
|
+
onPress: onPressConsole,
|
|
256
|
+
spacingVariant: "condensed",
|
|
257
|
+
subtitle: "Subtitle",
|
|
258
|
+
title: "Condensed spacing"
|
|
259
|
+
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
260
|
+
description: "Description",
|
|
261
|
+
meta: "Meta",
|
|
262
|
+
onPress: onPressConsole,
|
|
263
|
+
spacingVariant: "compact",
|
|
264
|
+
subtitle: "Subtitle",
|
|
265
|
+
title: "Compact spacing"
|
|
266
|
+
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
267
|
+
description: "Description",
|
|
268
|
+
meta: "Meta",
|
|
269
|
+
onPress: onPressConsole,
|
|
270
|
+
spacingVariant: "normal",
|
|
271
|
+
subtitle: "Subtitle",
|
|
272
|
+
title: "Normal spacing"
|
|
273
|
+
})]
|
|
274
|
+
});
|
|
275
|
+
const CondensedContent = () => {
|
|
276
|
+
const theme = useTheme();
|
|
277
|
+
return /*#__PURE__*/_jsxs(VStack, {
|
|
278
|
+
gap: 3,
|
|
279
|
+
children: [/*#__PURE__*/_jsx(ContentCell, {
|
|
280
|
+
accessory: "more",
|
|
281
|
+
description: "Concise summary of an item in condensed spacing.",
|
|
282
|
+
meta: "Updated 2m ago",
|
|
283
|
+
onPress: onPressConsole,
|
|
284
|
+
spacingVariant: "condensed",
|
|
285
|
+
subtitle: "Subtitle",
|
|
286
|
+
title: "Default layout"
|
|
287
|
+
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
288
|
+
description: "Opens an external experience",
|
|
289
|
+
meta: "External link",
|
|
290
|
+
onPress: onPressConsole,
|
|
291
|
+
spacingVariant: "condensed",
|
|
292
|
+
subtitle: "Tap to learn more",
|
|
293
|
+
title: "Pressable condensed"
|
|
294
|
+
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
295
|
+
description: "Avatar media paired with condensed spacing.",
|
|
296
|
+
media: /*#__PURE__*/_jsx(Avatar, {
|
|
297
|
+
size: "m",
|
|
298
|
+
src: assets.eth.imageUrl
|
|
299
|
+
}),
|
|
300
|
+
meta: "ETH",
|
|
301
|
+
spacingVariant: "condensed",
|
|
302
|
+
subtitle: "Asset overview",
|
|
303
|
+
title: "Condensed with media"
|
|
304
|
+
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
305
|
+
descriptionNode: /*#__PURE__*/_jsxs(VStack, {
|
|
306
|
+
gap: 0.5,
|
|
307
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
308
|
+
font: "label1",
|
|
309
|
+
children: "Composable description node"
|
|
310
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
311
|
+
color: "fgMuted",
|
|
312
|
+
font: "label2",
|
|
313
|
+
children: "Use this slot to render arbitrary React content."
|
|
314
|
+
})]
|
|
315
|
+
}),
|
|
316
|
+
metaNode: /*#__PURE__*/_jsxs(VStack, {
|
|
317
|
+
alignItems: "flex-end",
|
|
318
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
319
|
+
color: "fgPositive",
|
|
320
|
+
font: "label2",
|
|
321
|
+
children: "+4.25%"
|
|
322
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
323
|
+
color: "fgMuted",
|
|
324
|
+
font: "label2",
|
|
325
|
+
children: "Week over week"
|
|
326
|
+
})]
|
|
327
|
+
}),
|
|
328
|
+
spacingVariant: "condensed",
|
|
329
|
+
subtitleNode: /*#__PURE__*/_jsxs(Text, {
|
|
330
|
+
font: "label1",
|
|
331
|
+
children: ["Subtitle with", ' ', /*#__PURE__*/_jsx(Text, {
|
|
332
|
+
underline: true,
|
|
333
|
+
font: "label1",
|
|
334
|
+
children: "inline emphasis"
|
|
335
|
+
})]
|
|
336
|
+
}),
|
|
337
|
+
titleNode: /*#__PURE__*/_jsxs(HStack, {
|
|
338
|
+
alignItems: "center",
|
|
339
|
+
gap: 1,
|
|
340
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
341
|
+
font: "headline",
|
|
342
|
+
children: "Custom nodes"
|
|
343
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
344
|
+
alignItems: "center",
|
|
345
|
+
background: "bgSecondary",
|
|
346
|
+
borderRadius: 1000,
|
|
347
|
+
paddingX: 1,
|
|
348
|
+
paddingY: 0.5,
|
|
349
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
350
|
+
font: "label2",
|
|
351
|
+
children: "New"
|
|
352
|
+
})
|
|
353
|
+
})]
|
|
354
|
+
})
|
|
355
|
+
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
356
|
+
accessory: "arrow",
|
|
357
|
+
description: "Applies custom styles to highlight the container.",
|
|
358
|
+
media: /*#__PURE__*/_jsx(Icon, {
|
|
359
|
+
name: "chartLine",
|
|
360
|
+
size: "s"
|
|
361
|
+
}),
|
|
362
|
+
spacingVariant: "condensed",
|
|
363
|
+
styles: {
|
|
364
|
+
contentContainer: {
|
|
365
|
+
borderColor: theme.color.bgLineHeavy,
|
|
366
|
+
borderWidth: 1,
|
|
367
|
+
paddingVertical: theme.space[2]
|
|
368
|
+
},
|
|
369
|
+
media: {
|
|
370
|
+
alignSelf: 'flex-start'
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
subtitle: "Uses styles prop overrides",
|
|
374
|
+
title: "Styled condensed cell"
|
|
375
|
+
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
376
|
+
accessory: "arrow",
|
|
377
|
+
description: "Shows how to combine meta and accessory in condensed layout.",
|
|
378
|
+
meta: "Meta",
|
|
379
|
+
spacingVariant: "condensed",
|
|
380
|
+
subtitle: "Subtitle",
|
|
381
|
+
title: "Accessory example"
|
|
382
|
+
}), /*#__PURE__*/_jsx(ContentCell, {
|
|
383
|
+
selected: true,
|
|
384
|
+
description: "Selected state with condensed spacing and avatar media.",
|
|
385
|
+
media: /*#__PURE__*/_jsx(Avatar, {
|
|
386
|
+
size: "m",
|
|
387
|
+
src: assets.eth.imageUrl
|
|
388
|
+
}),
|
|
389
|
+
meta: "Selected",
|
|
390
|
+
spacingVariant: "condensed",
|
|
391
|
+
subtitle: "Subtitle",
|
|
392
|
+
title: "Selected condensed"
|
|
393
|
+
})]
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
const Fallback = () => {
|
|
397
|
+
const [showFallback, setShowFallback] = React.useState(false);
|
|
398
|
+
return /*#__PURE__*/_jsxs(VStack, {
|
|
399
|
+
gap: 2,
|
|
400
|
+
children: [/*#__PURE__*/_jsx(Switch, {
|
|
401
|
+
checked: showFallback,
|
|
402
|
+
onChange: (_value, nextChecked) => setShowFallback(Boolean(nextChecked)),
|
|
403
|
+
children: "Show fallback state"
|
|
404
|
+
}), showFallback ? /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
405
|
+
description: true,
|
|
406
|
+
disableRandomRectWidth: true,
|
|
407
|
+
meta: true,
|
|
408
|
+
subtitle: true,
|
|
409
|
+
title: true,
|
|
410
|
+
accessory: "more",
|
|
411
|
+
media: "asset",
|
|
412
|
+
spacingVariant: "condensed"
|
|
413
|
+
}) : /*#__PURE__*/_jsx(ContentCell, {
|
|
414
|
+
accessory: "more",
|
|
415
|
+
description: "Review portfolio performance",
|
|
416
|
+
media: /*#__PURE__*/_jsx(Avatar, {
|
|
417
|
+
size: "m",
|
|
418
|
+
src: assets.eth.imageUrl
|
|
419
|
+
}),
|
|
420
|
+
meta: "Updated just now",
|
|
421
|
+
spacingVariant: "condensed",
|
|
422
|
+
subtitle: "ETH",
|
|
423
|
+
title: "Ethereum"
|
|
424
|
+
})]
|
|
425
|
+
});
|
|
426
|
+
};
|
|
200
427
|
const ContentCellScreen = () => {
|
|
201
428
|
return /*#__PURE__*/_jsxs(ExampleScreen, {
|
|
202
429
|
children: [/*#__PURE__*/_jsx(Example, {
|
|
@@ -215,12 +442,14 @@ const ContentCellScreen = () => {
|
|
|
215
442
|
title: "With media",
|
|
216
443
|
children: /*#__PURE__*/_jsx(WithMedia, {})
|
|
217
444
|
}), /*#__PURE__*/_jsx(Example, {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
445
|
+
title: "Spacing variants",
|
|
446
|
+
children: /*#__PURE__*/_jsx(SpacingVariants, {})
|
|
447
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
448
|
+
title: "Condensed spacing",
|
|
449
|
+
children: /*#__PURE__*/_jsx(CondensedContent, {})
|
|
450
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
451
|
+
title: "Fallback",
|
|
452
|
+
children: /*#__PURE__*/_jsx(Fallback, {})
|
|
224
453
|
})]
|
|
225
454
|
});
|
|
226
455
|
};
|
|
@@ -6,83 +6,95 @@ const Fallbacks = () => {
|
|
|
6
6
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
7
7
|
children: [/*#__PURE__*/_jsx(ContentCellFallback, {
|
|
8
8
|
disableRandomRectWidth: true,
|
|
9
|
-
title: true
|
|
9
|
+
title: true,
|
|
10
|
+
spacingVariant: "condensed"
|
|
10
11
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
11
12
|
description: true,
|
|
12
13
|
disableRandomRectWidth: true,
|
|
13
|
-
title: true
|
|
14
|
+
title: true,
|
|
15
|
+
spacingVariant: "condensed"
|
|
14
16
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
15
17
|
disableRandomRectWidth: true,
|
|
16
18
|
meta: true,
|
|
17
|
-
title: true
|
|
19
|
+
title: true,
|
|
20
|
+
spacingVariant: "condensed"
|
|
18
21
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
19
22
|
disableRandomRectWidth: true,
|
|
20
23
|
subtitle: true,
|
|
21
|
-
title: true
|
|
24
|
+
title: true,
|
|
25
|
+
spacingVariant: "condensed"
|
|
22
26
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
23
27
|
description: true,
|
|
24
28
|
disableRandomRectWidth: true,
|
|
25
29
|
meta: true,
|
|
26
|
-
title: true
|
|
30
|
+
title: true,
|
|
31
|
+
spacingVariant: "condensed"
|
|
27
32
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
28
33
|
description: true,
|
|
29
34
|
disableRandomRectWidth: true,
|
|
30
35
|
meta: true,
|
|
31
36
|
subtitle: true,
|
|
32
|
-
title: true
|
|
37
|
+
title: true,
|
|
38
|
+
spacingVariant: "condensed"
|
|
33
39
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
34
40
|
disableRandomRectWidth: true,
|
|
35
41
|
title: true,
|
|
36
|
-
media: "icon"
|
|
42
|
+
media: "icon",
|
|
43
|
+
spacingVariant: "condensed"
|
|
37
44
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
38
45
|
description: true,
|
|
39
46
|
disableRandomRectWidth: true,
|
|
40
47
|
title: true,
|
|
41
|
-
media: "asset"
|
|
48
|
+
media: "asset",
|
|
49
|
+
spacingVariant: "condensed"
|
|
42
50
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
43
51
|
disableRandomRectWidth: true,
|
|
44
52
|
meta: true,
|
|
45
53
|
title: true,
|
|
46
|
-
media: "image"
|
|
54
|
+
media: "image",
|
|
55
|
+
spacingVariant: "condensed"
|
|
47
56
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
48
57
|
disableRandomRectWidth: true,
|
|
49
58
|
subtitle: true,
|
|
50
59
|
title: true,
|
|
51
|
-
media: "avatar"
|
|
60
|
+
media: "avatar",
|
|
61
|
+
spacingVariant: "condensed"
|
|
52
62
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
53
63
|
description: true,
|
|
54
64
|
disableRandomRectWidth: true,
|
|
55
65
|
meta: true,
|
|
56
66
|
title: true,
|
|
57
|
-
media: "icon"
|
|
67
|
+
media: "icon",
|
|
68
|
+
spacingVariant: "condensed"
|
|
58
69
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
59
70
|
description: true,
|
|
60
71
|
disableRandomRectWidth: true,
|
|
61
72
|
meta: true,
|
|
62
73
|
subtitle: true,
|
|
63
74
|
title: true,
|
|
64
|
-
media: "asset"
|
|
75
|
+
media: "asset",
|
|
76
|
+
spacingVariant: "condensed"
|
|
65
77
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
66
78
|
description: true,
|
|
67
|
-
meta: true,
|
|
68
79
|
subtitle: true,
|
|
69
80
|
title: true,
|
|
70
81
|
media: "asset",
|
|
71
|
-
rectWidthVariant: 0
|
|
82
|
+
rectWidthVariant: 0,
|
|
83
|
+
spacingVariant: "condensed"
|
|
72
84
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
73
85
|
description: true,
|
|
74
|
-
meta: true,
|
|
75
86
|
subtitle: true,
|
|
76
87
|
title: true,
|
|
77
88
|
media: "asset",
|
|
78
|
-
rectWidthVariant: 1
|
|
89
|
+
rectWidthVariant: 1,
|
|
90
|
+
spacingVariant: "condensed"
|
|
79
91
|
}), /*#__PURE__*/_jsx(ContentCellFallback, {
|
|
80
92
|
description: true,
|
|
81
|
-
meta: true,
|
|
82
93
|
subtitle: true,
|
|
83
94
|
title: true,
|
|
84
95
|
media: "asset",
|
|
85
|
-
rectWidthVariant: 2
|
|
96
|
+
rectWidthVariant: 2,
|
|
97
|
+
spacingVariant: "condensed"
|
|
86
98
|
})]
|
|
87
99
|
});
|
|
88
100
|
};
|
|
@@ -921,7 +921,11 @@ const CondensedListCell = () => {
|
|
|
921
921
|
title: "Title"
|
|
922
922
|
}), /*#__PURE__*/_jsx(ListCell, {
|
|
923
923
|
multiline: true,
|
|
924
|
-
description:
|
|
924
|
+
description: /*#__PURE__*/_jsx(Text, {
|
|
925
|
+
color: "fgMuted",
|
|
926
|
+
font: "body",
|
|
927
|
+
children: "Long description with multiple lines. This section can be arbitrarily long and occupy many many lines."
|
|
928
|
+
}),
|
|
925
929
|
detail: "Detail",
|
|
926
930
|
end: /*#__PURE__*/_jsxs(HStack, {
|
|
927
931
|
alignItems: "center",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-mobile",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.28.0",
|
|
4
4
|
"description": "Coinbase Design System - Mobile",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"react-native-svg": "^14.1.0"
|
|
155
155
|
},
|
|
156
156
|
"dependencies": {
|
|
157
|
-
"@coinbase/cds-common": "^8.
|
|
157
|
+
"@coinbase/cds-common": "^8.28.0",
|
|
158
158
|
"@coinbase/cds-icons": "^5.8.0",
|
|
159
159
|
"@coinbase/cds-illustrations": "^4.29.0",
|
|
160
160
|
"@coinbase/cds-lottie-files": "^3.3.3",
|