@coinbase/cds-mobile 8.26.0 → 8.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,16 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.27.1 ((12/4/2025, 06:51 AM PST))
|
|
12
|
+
|
|
13
|
+
This is an artificial version bump with no new change.
|
|
14
|
+
|
|
15
|
+
## 8.27.0 (12/3/2025 PST)
|
|
16
|
+
|
|
17
|
+
#### 🚀 Updates
|
|
18
|
+
|
|
19
|
+
- Feat: introduce `unselected` state for ListCell. [[#194](https://github.com/coinbase/cds/pull/194)] [DX-4947]
|
|
20
|
+
|
|
11
21
|
## 8.26.0 (12/1/2025 PST)
|
|
12
22
|
|
|
13
23
|
#### 🚀 Updates
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PaddingProps } from '@coinbase/cds-common/types';
|
|
3
|
-
export type CellAccessoryType = 'arrow' | 'more' | 'selected';
|
|
3
|
+
export type CellAccessoryType = 'arrow' | 'more' | 'selected' | 'unselected';
|
|
4
4
|
export type CellAccessoryProps = PaddingProps & {
|
|
5
5
|
/** Type of accessory to display at the end. */
|
|
6
6
|
type: CellAccessoryType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellAccessory.d.ts","sourceRoot":"","sources":["../../src/cells/CellAccessory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAK/D,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"CellAccessory.d.ts","sourceRoot":"","sources":["../../src/cells/CellAccessory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAK/D,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,CAAC;AAE7E,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG;IAC9C,+CAA+C;IAC/C,IAAI,EAAE,iBAAiB,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,aAAa,gDA4BxB,CAAC"}
|
package/esm/cells/Cell.js
CHANGED
|
@@ -33,6 +33,15 @@ export const CellAccessory = /*#__PURE__*/memo(function CellAccessory(_ref) {
|
|
|
33
33
|
size: "s"
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
+
if (type === 'unselected') {
|
|
37
|
+
icon = /*#__PURE__*/_jsx(Icon, {
|
|
38
|
+
name: "checkmark",
|
|
39
|
+
size: "s",
|
|
40
|
+
style: {
|
|
41
|
+
opacity: 0
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
36
45
|
if (!icon) {
|
|
37
46
|
return null;
|
|
38
47
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
3
|
import { assets, squareAssets } from '@coinbase/cds-common/internal/data/assets';
|
|
4
4
|
import { selectCellSpacingConfig } from '@coinbase/cds-common/tokens/select';
|
|
5
5
|
import { gutter } from '@coinbase/cds-common/tokens/sizing';
|
|
@@ -490,75 +490,85 @@ const PriorityContent = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
|
490
490
|
variant: "warning"
|
|
491
491
|
})]
|
|
492
492
|
});
|
|
493
|
-
const WithAccessory = () =>
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
})
|
|
493
|
+
const WithAccessory = () => {
|
|
494
|
+
const [isSelected, setIsSelected] = useState(false);
|
|
495
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
496
|
+
children: [/*#__PURE__*/_jsx(ListCell, {
|
|
497
|
+
accessory: "arrow",
|
|
498
|
+
spacingVariant: "condensed",
|
|
499
|
+
title: "Title"
|
|
500
|
+
}), /*#__PURE__*/_jsx(ListCell, {
|
|
501
|
+
accessory: isSelected ? 'selected' : 'unselected',
|
|
502
|
+
description: "Selected state uses the same space, no layout shift when selected",
|
|
503
|
+
onPress: () => setIsSelected(prev => !prev),
|
|
504
|
+
selected: isSelected,
|
|
505
|
+
spacingVariant: "condensed",
|
|
506
|
+
title: "Leverage unselected state"
|
|
507
|
+
}), /*#__PURE__*/_jsx(ListCell, {
|
|
508
|
+
accessory: "more",
|
|
509
|
+
detail: "Detail",
|
|
510
|
+
spacingVariant: "condensed",
|
|
511
|
+
title: "Title"
|
|
512
|
+
}), /*#__PURE__*/_jsx(ListCell, {
|
|
513
|
+
accessory: "selected",
|
|
514
|
+
description: "Description",
|
|
515
|
+
spacingVariant: "condensed",
|
|
516
|
+
title: "Title"
|
|
517
|
+
}), /*#__PURE__*/_jsx(ListCell, {
|
|
518
|
+
accessory: "arrow",
|
|
519
|
+
description: "Description",
|
|
520
|
+
detail: "Detail",
|
|
521
|
+
spacingVariant: "condensed",
|
|
522
|
+
title: "Title"
|
|
523
|
+
}), /*#__PURE__*/_jsx(ListCell, {
|
|
524
|
+
selected: true,
|
|
525
|
+
accessory: "arrow",
|
|
526
|
+
description: "Description",
|
|
527
|
+
detail: "Detail",
|
|
528
|
+
spacingVariant: "condensed",
|
|
529
|
+
title: "Title"
|
|
530
|
+
}), /*#__PURE__*/_jsx(ListCell, {
|
|
531
|
+
disableSelectionAccessory: true,
|
|
532
|
+
selected: true,
|
|
533
|
+
accessory: "arrow",
|
|
534
|
+
description: "Description",
|
|
535
|
+
detail: "Detail",
|
|
536
|
+
spacingVariant: "condensed",
|
|
537
|
+
title: "Title"
|
|
538
|
+
}), /*#__PURE__*/_jsx(ListCell, {
|
|
539
|
+
accessory: "more",
|
|
540
|
+
description: "Description",
|
|
541
|
+
detail: "Detail",
|
|
542
|
+
spacingVariant: "condensed",
|
|
543
|
+
subdetail: "Neutral",
|
|
544
|
+
title: "Title"
|
|
545
|
+
}), /*#__PURE__*/_jsx(ListCell, {
|
|
546
|
+
accessory: "selected",
|
|
547
|
+
description: "Description",
|
|
548
|
+
detail: "Detail",
|
|
549
|
+
spacingVariant: "condensed",
|
|
550
|
+
subdetail: "+Positive",
|
|
551
|
+
title: "Title",
|
|
552
|
+
variant: "positive"
|
|
553
|
+
}), /*#__PURE__*/_jsx(ListCell, {
|
|
554
|
+
accessory: "arrow",
|
|
555
|
+
description: "Description",
|
|
556
|
+
detail: "Detail",
|
|
557
|
+
spacingVariant: "condensed",
|
|
558
|
+
subdetail: "-Negative",
|
|
559
|
+
title: "Title",
|
|
560
|
+
variant: "negative"
|
|
561
|
+
}), /*#__PURE__*/_jsx(ListCell, {
|
|
562
|
+
accessory: "arrow",
|
|
563
|
+
description: "Description",
|
|
564
|
+
detail: "Detail",
|
|
565
|
+
spacingVariant: "condensed",
|
|
566
|
+
subdetail: "Warning",
|
|
567
|
+
title: "Title",
|
|
568
|
+
variant: "warning"
|
|
569
|
+
})]
|
|
570
|
+
});
|
|
571
|
+
};
|
|
562
572
|
const WithMedia = () => /*#__PURE__*/_jsxs(_Fragment, {
|
|
563
573
|
children: [/*#__PURE__*/_jsx(ListCell, {
|
|
564
574
|
media: /*#__PURE__*/_jsx(Icon, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-mobile",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.27.1",
|
|
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.27.1",
|
|
158
158
|
"@coinbase/cds-icons": "^5.7.0",
|
|
159
159
|
"@coinbase/cds-illustrations": "^4.28.0",
|
|
160
160
|
"@coinbase/cds-lottie-files": "^3.3.3",
|