@coinbase/cds-mobile 8.16.0 → 8.16.2
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 +10 -0
- package/dts/cells/ListCell.d.ts +41 -36
- package/dts/cells/ListCell.d.ts.map +1 -1
- package/dts/cells/ListCellFallback.d.ts +1 -1
- package/dts/cells/ListCellFallback.d.ts.map +1 -1
- package/esm/cells/ListCell.js +16 -15
- package/esm/cells/ListCellFallback.js +5 -5
- package/esm/cells/__stories__/ListCell.stories.js +118 -119
- package/esm/cells/__stories__/ListCellFallback.stories.js +53 -53
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,16 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.16.2 (10/10/2025 PST)
|
|
12
|
+
|
|
13
|
+
#### 🐞 Fixes
|
|
14
|
+
|
|
15
|
+
- Change layoutSpacing to spacingVariant. [[#95](https://github.com/coinbase/cds/pull/95)]
|
|
16
|
+
|
|
17
|
+
## 8.16.1 ((10/9/2025, 08:02 AM PST))
|
|
18
|
+
|
|
19
|
+
This is an artificial version bump with no new change.
|
|
20
|
+
|
|
11
21
|
## 8.16.0 (10/8/2025 PST)
|
|
12
22
|
|
|
13
23
|
#### 🚀 Updates
|
package/dts/cells/ListCell.d.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { StyleProp, TextStyle } from 'react-native';
|
|
3
|
-
import { type CellBaseProps, type CellProps
|
|
2
|
+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
3
|
+
import { type CellBaseProps, type CellProps } from './Cell';
|
|
4
4
|
import { type CellAccessoryType } from './CellAccessory';
|
|
5
5
|
import { type CellDetailProps } from './CellDetail';
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
export declare const condensedInnerSpacing: {
|
|
7
|
+
readonly paddingX: 2;
|
|
8
|
+
readonly paddingY: 0.5;
|
|
9
|
+
readonly marginX: 0;
|
|
10
|
+
};
|
|
11
|
+
export declare const condensedOuterSpacing: {
|
|
12
|
+
readonly paddingX: 0;
|
|
13
|
+
readonly paddingY: 0;
|
|
14
|
+
readonly marginX: 0;
|
|
15
|
+
};
|
|
9
16
|
export type ListCellBaseProps = CellDetailProps &
|
|
10
17
|
Omit<CellBaseProps, 'accessory' | 'children'> & {
|
|
11
18
|
/** Accessory to display at the end of the cell. */
|
|
@@ -21,38 +28,33 @@ export type ListCellBaseProps = CellDetailProps &
|
|
|
21
28
|
*/
|
|
22
29
|
action?: React.ReactNode;
|
|
23
30
|
/**
|
|
24
|
-
* @deprecated Use `
|
|
31
|
+
* @deprecated Use `spacingVariant="compact"`. `compact` will be removed in a release.
|
|
25
32
|
*/
|
|
26
33
|
compact?: boolean;
|
|
27
34
|
/**
|
|
28
|
-
*
|
|
29
|
-
* Deprecated
|
|
30
|
-
* This prop will be removed in the next major release, new list cell will only have 'hug' spacing.
|
|
35
|
+
* Spacing variant configuration.
|
|
36
|
+
* Deprecated value: 'compact'. Prefer 'condensed'.
|
|
31
37
|
*
|
|
32
|
-
* When
|
|
33
|
-
* 1. min-height is 80px
|
|
34
|
-
* 2.
|
|
35
|
-
* 3. border
|
|
36
|
-
* 4.
|
|
37
|
-
* 5.
|
|
38
|
+
* When `spacingVariant="normal"`:
|
|
39
|
+
* 1. `min-height` is `80px`
|
|
40
|
+
* 2. `padding` is `'var(--space-2) var(--space-3)'`
|
|
41
|
+
* 3. `border-radius` is `'var(--borderRadius-200)'`
|
|
42
|
+
* 4. when there is a description, title's `numberOfLines={1}` otherwise title's `numberOfLines={2}`
|
|
43
|
+
* 5. description and subdetail have font `body`
|
|
38
44
|
*
|
|
39
|
-
* When
|
|
40
|
-
* 1. min-height is 40px
|
|
41
|
-
* 2. Effective padding is '16px 24px' with 8px padding around the pressable area
|
|
42
|
-
* 3. border radius is 8px for pressable area
|
|
43
|
-
* 4. Title always cap at 1 line when there is no description, cap at 2 lines when there is description
|
|
44
|
-
* 5. Description and subdetail have font 'body'
|
|
45
|
+
* When `spacingVariant="compact"`:
|
|
46
|
+
* 1. same as `spacingVariant="normal"`, except `min-height` is `40px`
|
|
45
47
|
*
|
|
46
|
-
* When
|
|
47
|
-
* 1.
|
|
48
|
-
* 2.
|
|
49
|
-
* 3.
|
|
50
|
-
* 4.
|
|
51
|
-
* 5.
|
|
48
|
+
* When `spacingVariant="condensed"`:
|
|
49
|
+
* 1. `min-height` is undefined
|
|
50
|
+
* 2. `padding` is `'var(--space-1) var(--space-2)'`
|
|
51
|
+
* 3. `border-radius` is `--borderRadius-0`
|
|
52
|
+
* 4. title's `numberOfLines={2}`
|
|
53
|
+
* 5. description and subdetail have font `label2`
|
|
52
54
|
*
|
|
53
|
-
* @default '
|
|
55
|
+
* @default 'normal'
|
|
54
56
|
*/
|
|
55
|
-
|
|
57
|
+
spacingVariant?: 'normal' | 'compact' | 'condensed';
|
|
56
58
|
/** Description of content. Max 1 line (with title) or 2 lines (without), otherwise will truncate. */
|
|
57
59
|
description?: React.ReactNode;
|
|
58
60
|
/**
|
|
@@ -77,17 +79,20 @@ export type ListCellBaseProps = CellDetailProps &
|
|
|
77
79
|
/** Title of content. Max 1 line (with description) or 2 lines (without), otherwise will truncate. */
|
|
78
80
|
title?: React.ReactNode;
|
|
79
81
|
/** Styles for the components */
|
|
80
|
-
styles?:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
styles?: {
|
|
83
|
+
root?: StyleProp<ViewStyle>;
|
|
84
|
+
media?: StyleProp<ViewStyle>;
|
|
85
|
+
intermediary?: StyleProp<ViewStyle>;
|
|
86
|
+
end?: StyleProp<ViewStyle>;
|
|
87
|
+
accessory?: StyleProp<ViewStyle>;
|
|
88
|
+
contentContainer?: StyleProp<ViewStyle>;
|
|
89
|
+
pressable?: StyleProp<ViewStyle>;
|
|
90
|
+
mainContent?: StyleProp<ViewStyle>;
|
|
91
|
+
helperText?: StyleProp<ViewStyle>;
|
|
86
92
|
title?: StyleProp<TextStyle>;
|
|
87
93
|
description?: StyleProp<TextStyle>;
|
|
88
94
|
};
|
|
89
95
|
};
|
|
90
96
|
export type ListCellProps = ListCellBaseProps & Omit<CellProps, 'accessory' | 'children'>;
|
|
91
97
|
export declare const ListCell: React.NamedExoticComponent<ListCellProps>;
|
|
92
|
-
export {};
|
|
93
98
|
//# sourceMappingURL=ListCell.d.ts.map
|
|
@@ -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,MAAM,cAAc,CAAC;
|
|
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;;;;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,qGAAqG;IACrG,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;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,qGAAqG;IACrG,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,gCAAgC;IAChC,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,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,2CA6HnB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import type { CellMediaType } from './CellMedia';
|
|
|
4
4
|
import { type ListCellBaseProps } from './ListCell';
|
|
5
5
|
export type ListCellFallbackBaseProps = SharedProps &
|
|
6
6
|
FallbackRectWidthProps &
|
|
7
|
-
Pick<ListCellBaseProps, 'compact' | 'innerSpacing' | 'outerSpacing' | '
|
|
7
|
+
Pick<ListCellBaseProps, 'compact' | 'innerSpacing' | 'outerSpacing' | 'spacingVariant'> & {
|
|
8
8
|
/** Display description shimmer. */
|
|
9
9
|
description?: boolean;
|
|
10
10
|
/** Display detail shimmer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListCellFallback.d.ts","sourceRoot":"","sources":["../../src/cells/ListCellFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAQtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,
|
|
1
|
+
{"version":3,"file":"ListCellFallback.d.ts","sourceRoot":"","sources":["../../src/cells/ListCellFallback.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAQtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAgD,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAGlG,MAAM,MAAM,yBAAyB,GAAG,WAAW,GACjD,sBAAsB,GACtB,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,cAAc,GAAG,cAAc,GAAG,gBAAgB,CAAC,GAAG;IACxF,mCAAmC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,iCAAiC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,GAAG;IAC9D,+DAA+D;IAC/D,MAAM,CAAC,EAAE;QACP,kEAAkE;QAClE,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAClC,4CAA4C;QAC5C,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC9B,+CAA+C;QAC/C,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACjC,2CAA2C;QAC3C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7B,iDAAiD;QACjD,WAAW,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KACpC,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,gBAAgB,6DAmJ3B,CAAC"}
|
package/esm/cells/ListCell.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["accessory", "end", "action", "compact", "title", "disableMultilineTitle", "description", "detail", "detailWidth", "intermediary", "priority", "innerSpacing", "outerSpacing", "disabled", "disableSelectionAccessory", "helperText", "media", "multiline", "selected", "subdetail", "variant", "onPress", "
|
|
1
|
+
const _excluded = ["accessory", "end", "action", "compact", "title", "disableMultilineTitle", "description", "detail", "detailWidth", "intermediary", "priority", "innerSpacing", "outerSpacing", "disabled", "disableSelectionAccessory", "helperText", "media", "multiline", "selected", "subdetail", "variant", "onPress", "spacingVariant", "style", "styles"];
|
|
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
4
|
import React, { memo, useMemo } from 'react';
|
|
@@ -9,13 +9,14 @@ import { Cell } from './Cell';
|
|
|
9
9
|
import { CellAccessory } from './CellAccessory';
|
|
10
10
|
import { CellDetail } from './CellDetail';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
export const
|
|
12
|
+
export const condensedInnerSpacing = {
|
|
13
13
|
paddingX: 2,
|
|
14
14
|
paddingY: 0.5,
|
|
15
15
|
marginX: 0
|
|
16
16
|
};
|
|
17
|
+
|
|
17
18
|
// no padding outside of the pressable area
|
|
18
|
-
export const
|
|
19
|
+
export const condensedOuterSpacing = {
|
|
19
20
|
paddingX: 0,
|
|
20
21
|
paddingY: 0,
|
|
21
22
|
marginX: 0
|
|
@@ -45,36 +46,36 @@ export const ListCell = /*#__PURE__*/memo(function ListCell(_ref) {
|
|
|
45
46
|
subdetail,
|
|
46
47
|
variant,
|
|
47
48
|
onPress,
|
|
48
|
-
|
|
49
|
+
spacingVariant = compact ? 'compact' : 'normal',
|
|
49
50
|
style,
|
|
50
51
|
styles
|
|
51
52
|
} = _ref,
|
|
52
53
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
53
|
-
const minHeight =
|
|
54
|
+
const minHeight = spacingVariant === 'compact' ? compactListHeight : spacingVariant === 'normal' ? listHeight : undefined;
|
|
54
55
|
const accessoryType = selected && !disableSelectionAccessory ? 'selected' : accessory;
|
|
55
56
|
const hasDetails = Boolean(detail || subdetail);
|
|
56
57
|
const end = useMemo(() => endProp || action || hasDetails && /*#__PURE__*/_jsx(CellDetail, {
|
|
57
58
|
adjustsFontSizeToFit: !!detailWidth,
|
|
58
59
|
detail: detail,
|
|
59
60
|
subdetail: subdetail,
|
|
60
|
-
subdetailFont:
|
|
61
|
+
subdetailFont: spacingVariant === 'condensed' ? 'label2' : 'body',
|
|
61
62
|
variant: variant
|
|
62
|
-
}), [endProp, action, hasDetails, detail, subdetail, detailWidth,
|
|
63
|
+
}), [endProp, action, hasDetails, detail, subdetail, detailWidth, spacingVariant, variant]);
|
|
63
64
|
return /*#__PURE__*/_jsx(Cell, _extends({
|
|
64
65
|
accessory: accessoryType ? /*#__PURE__*/_jsx(CellAccessory, {
|
|
65
66
|
type: accessoryType
|
|
66
67
|
}) : undefined,
|
|
67
|
-
borderRadius: (_props$borderRadius = props.borderRadius) != null ? _props$borderRadius :
|
|
68
|
+
borderRadius: (_props$borderRadius = props.borderRadius) != null ? _props$borderRadius : spacingVariant === 'condensed' ? 0 : undefined,
|
|
68
69
|
bottomContent: helperText,
|
|
69
70
|
detailWidth: detailWidth,
|
|
70
71
|
disabled: disabled,
|
|
71
72
|
end: end,
|
|
72
|
-
innerSpacing: innerSpacing != null ? innerSpacing :
|
|
73
|
+
innerSpacing: innerSpacing != null ? innerSpacing : spacingVariant === 'condensed' ? condensedInnerSpacing : undefined,
|
|
73
74
|
intermediary: intermediary,
|
|
74
75
|
media: media,
|
|
75
76
|
minHeight: minHeight,
|
|
76
77
|
onPress: onPress,
|
|
77
|
-
outerSpacing: outerSpacing != null ? outerSpacing :
|
|
78
|
+
outerSpacing: outerSpacing != null ? outerSpacing : spacingVariant === 'condensed' ? condensedOuterSpacing : undefined,
|
|
78
79
|
priority: priority,
|
|
79
80
|
selected: selected,
|
|
80
81
|
style: [style, styles == null ? void 0 : styles.root],
|
|
@@ -87,8 +88,8 @@ export const ListCell = /*#__PURE__*/memo(function ListCell(_ref) {
|
|
|
87
88
|
bottomContent: styles == null ? void 0 : styles.helperText,
|
|
88
89
|
contentContainer: styles == null ? void 0 : styles.contentContainer,
|
|
89
90
|
pressable: [
|
|
90
|
-
// for the
|
|
91
|
-
|
|
91
|
+
// for the condensed spacing, we need to offset the margin vertical to remove the strange gap between the pressable area
|
|
92
|
+
spacingVariant === 'condensed' && !!onPress && {
|
|
92
93
|
marginVertical: -1
|
|
93
94
|
}, styles == null ? void 0 : styles.pressable]
|
|
94
95
|
}
|
|
@@ -99,14 +100,14 @@ export const ListCell = /*#__PURE__*/memo(function ListCell(_ref) {
|
|
|
99
100
|
ellipsize: "tail",
|
|
100
101
|
font: "headline",
|
|
101
102
|
numberOfLines: disableMultilineTitle ? 1 :
|
|
102
|
-
// wrap at 2 lines in
|
|
103
|
-
|
|
103
|
+
// wrap at 2 lines in condensed spacingVariant regardless of description
|
|
104
|
+
spacingVariant === 'condensed' ? 2 : description ? 1 : 2,
|
|
104
105
|
style: styles == null ? void 0 : styles.title,
|
|
105
106
|
children: title
|
|
106
107
|
}), !!description && /*#__PURE__*/_jsx(Text, {
|
|
107
108
|
color: "fgMuted",
|
|
108
109
|
ellipsize: multiline ? undefined : 'tail',
|
|
109
|
-
font:
|
|
110
|
+
font: spacingVariant === 'condensed' ? 'label2' : 'body',
|
|
110
111
|
numberOfLines: multiline ? undefined : title ? 1 : 2,
|
|
111
112
|
style: styles == null ? void 0 : styles.description,
|
|
112
113
|
children: description
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["title", "description", "detail", "subdetail", "media", "disableRandomRectWidth", "rectWidthVariant", "helperText", "styles", "compact", "
|
|
1
|
+
const _excluded = ["title", "description", "detail", "subdetail", "media", "disableRandomRectWidth", "rectWidthVariant", "helperText", "styles", "compact", "spacingVariant", "innerSpacing", "outerSpacing"];
|
|
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
4
|
import { memo, useMemo } from 'react';
|
|
@@ -7,7 +7,7 @@ import { useTheme } from '../hooks/useTheme';
|
|
|
7
7
|
import { VStack } from '../layout';
|
|
8
8
|
import { Fallback } from '../layout/Fallback';
|
|
9
9
|
import { Cell } from './Cell';
|
|
10
|
-
import {
|
|
10
|
+
import { condensedInnerSpacing, condensedOuterSpacing } from './ListCell';
|
|
11
11
|
import { MediaFallback } from './MediaFallback';
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref) {
|
|
@@ -22,7 +22,7 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
22
22
|
helperText,
|
|
23
23
|
styles,
|
|
24
24
|
compact,
|
|
25
|
-
|
|
25
|
+
spacingVariant = compact ? 'compact' : 'normal',
|
|
26
26
|
innerSpacing,
|
|
27
27
|
outerSpacing
|
|
28
28
|
} = _ref,
|
|
@@ -105,9 +105,9 @@ export const ListCellFallback = /*#__PURE__*/memo(function ListCellFallback(_ref
|
|
|
105
105
|
return /*#__PURE__*/_jsx(Cell, _extends({
|
|
106
106
|
bottomContent: helperTextFallback,
|
|
107
107
|
detail: detailFallback,
|
|
108
|
-
innerSpacing: innerSpacing != null ? innerSpacing :
|
|
108
|
+
innerSpacing: innerSpacing != null ? innerSpacing : spacingVariant === 'condensed' ? condensedInnerSpacing : undefined,
|
|
109
109
|
media: mediaFallback,
|
|
110
|
-
outerSpacing: outerSpacing != null ? outerSpacing :
|
|
110
|
+
outerSpacing: outerSpacing != null ? outerSpacing : spacingVariant === 'condensed' ? condensedOuterSpacing : undefined
|
|
111
111
|
}, props, {
|
|
112
112
|
children: /*#__PURE__*/_jsxs(VStack, {
|
|
113
113
|
gap: 0.5,
|