@coinbase/cds-mobile 8.54.0 → 8.55.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 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.55.0 (3/19/2026 PST)
12
+
13
+ #### 🚀 Updates
14
+
15
+ - Add `disableSafeAreaPaddingBottom` prop to drawer. [[#522](https://github.com/coinbase/cds/pull/522)]
16
+
17
+ #### 🐞 Fixes
18
+
19
+ - Fix padding collapsing on tray with handle bar inside. [[#522](https://github.com/coinbase/cds/pull/522)]
20
+
11
21
  ## 8.54.0 (3/18/2026 PST)
12
22
 
13
23
  #### 🚀 Updates
@@ -73,6 +73,10 @@ export type DrawerBaseProps = SharedProps &
73
73
  reduceMotion?: boolean;
74
74
  /** Callback fired when the open animation completes. */
75
75
  onOpenComplete?: () => void;
76
+ /**
77
+ * disable safe area padding for bottom of drawer when true
78
+ */
79
+ disableSafeAreaPaddingBottom?: boolean;
76
80
  };
77
81
  export type DrawerProps = DrawerBaseProps & {
78
82
  styles?: {
@@ -152,6 +156,10 @@ export declare const Drawer: React.MemoExoticComponent<
152
156
  reduceMotion?: boolean;
153
157
  /** Callback fired when the open animation completes. */
154
158
  onOpenComplete?: () => void;
159
+ /**
160
+ * disable safe area padding for bottom of drawer when true
161
+ */
162
+ disableSafeAreaPaddingBottom?: boolean;
155
163
  } & {
156
164
  styles?: {
157
165
  /** Root container element */
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/overlays/drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAarF,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACx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BAAgB;IACtB;;OAEG;6BACsB,OAAO;IAChC;;OAEG;yCACkC,OAAO;IAC5C;;;;OAIG;uBACgB,cAAc,CAAC,SAAS,CAAC;IAC5C;;SAEK;oBACW,OAAO;IACvB,uDAAuD;qBACtC,MAAM,IAAI;IAC3B;;;OAGG;wCACiC,OAAO;IAC3C,oEAAoE;aAC3D,MAAM,IAAI;IAEnB;;;OAGG;qCAC8B,MAAM;IACvC;;;OAGG;kCAC2B,MAAM;IACpC;;;OAGG;mBACY,oBAAoB,GAAG,KAAK,CAAC,SAAS;IACrD;;;;OAIG;mBACY,OAAO;IACtB,wDAAwD;qBACvC,MAAM,IAAI;IAC3B;;OAEG;mCAC4B,OAAO;;aAI/B;QACP,6BAA6B;QAC7B,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5B,+BAA+B;QAC/B,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC/B,yCAAyC;QACzC,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACjC,mCAAmC;QACnC,SAAS,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;QACpC,mCAAmC;QACnC,eAAe,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACvC,qCAAqC;QACrC,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KAC/B;6CAqOF,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { PinningDirection } from '@coinbase/cds-common';
2
- export declare const useDrawerSpacing: (pin?: PinningDirection | undefined) =>
2
+ export declare const useDrawerSpacing: (
3
+ pin?: PinningDirection | undefined,
4
+ disableSafeAreaPaddingBottom?: boolean,
5
+ ) =>
3
6
  | {
4
7
  paddingTop: number;
5
8
  paddingLeft?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useDrawerSpacing.d.ts","sourceRoot":"","sources":["../../../src/overlays/drawer/useDrawerSpacing.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,eAAO,MAAM,gBAAgB,GAAI,MAAK,gBAAgB,GAAG,SAAoB;;;;;;;;;;;;;;;;;;;;CAoB5E,CAAC"}
1
+ {"version":3,"file":"useDrawerSpacing.d.ts","sourceRoot":"","sources":["../../../src/overlays/drawer/useDrawerSpacing.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK7D,eAAO,MAAM,gBAAgB,GAC3B,MAAK,gBAAgB,GAAG,SAAoB,EAC5C,+BAA8B,OAAe;;;;;;;;;;;;;;;;;;;;CA6B9C,CAAC"}
@@ -78,6 +78,9 @@ export declare const Tray: React.MemoExoticComponent<
78
78
  } & React.RefAttributes<DrawerRefBaseProps>
79
79
  >
80
80
  >;
81
+ /**
82
+ * @deprecated Redundant component.
83
+ */
81
84
  export declare const TrayStickyFooter: ({
82
85
  children,
83
86
  }: {
@@ -1 +1 @@
1
- {"version":3,"file":"Tray.d.ts","sourceRoot":"","sources":["../../../src/overlays/tray/Tray.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAqB,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAM5D,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,EAAE,CAAC;IAAE,WAAW,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,CAAC;AAEvE,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,eAAe,EAAE,KAAK,GAAG,UAAU,CAAC,GAAG;IACt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AS,CAAC,CAAC;QAC/B,6BAA6B;QAC7B,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC9B,yBAAyB;QACzB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KAC9B;6CAsIJ,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAQrE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../src/sticky-footer/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG;IACzC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;IAPvB;;;OAGG;eACQ,OAAO;+BAiCnB,CAAC"}
1
+ {"version":3,"file":"StickyFooter.d.ts","sourceRoot":"","sources":["../../src/sticky-footer/StickyFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG;IACzC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;IAPvB;;;OAGG;eACQ,OAAO;+BAmCnB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  const _excluded = ["media"];
2
2
  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; }
3
3
  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); }
4
- import React, { useCallback, useRef, useState } from 'react';
4
+ import { useCallback, useRef, useState } from 'react';
5
5
  import { FlatList } from 'react-native';
6
6
  import { assets } from '@coinbase/cds-common/internal/data/assets';
7
7
  import { Button } from '../../buttons/Button';
@@ -12,7 +12,7 @@ import { SectionHeader } from '../../section-header/SectionHeader';
12
12
  import { StickyFooter } from '../../sticky-footer/StickyFooter';
13
13
  import { Link } from '../../typography/Link';
14
14
  import { Text } from '../../typography/Text';
15
- import { Tray, TrayStickyFooter } from '../tray/Tray';
15
+ import { Tray } from '../tray/Tray';
16
16
  import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
17
17
  const defaultOptions = [{
18
18
  title: 'Ethereum',
@@ -142,6 +142,19 @@ export const WithStickyFooter = () => {
142
142
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
143
143
  ref: trayRef,
144
144
  disableCapturePanGestureToDismiss: true,
145
+ footer: _ref3 => {
146
+ let {
147
+ handleClose
148
+ } = _ref3;
149
+ return /*#__PURE__*/_jsx(StickyFooter, {
150
+ paddingX: 3,
151
+ children: /*#__PURE__*/_jsx(Button, {
152
+ block: true,
153
+ onPress: handleClose,
154
+ children: "Button"
155
+ })
156
+ });
157
+ },
145
158
  handleBarAccessibilityLabel: "Dismiss",
146
159
  onCloseComplete: setIsTrayVisibleToFalse,
147
160
  onVisibilityChange: handleTrayVisibilityChange,
@@ -149,25 +162,11 @@ export const WithStickyFooter = () => {
149
162
  paddingX: 3,
150
163
  title: "Section header"
151
164
  }),
152
- children: _ref3 => {
153
- let {
154
- handleClose
155
- } = _ref3;
156
- return /*#__PURE__*/_jsxs(TrayStickyFooter, {
157
- children: [/*#__PURE__*/_jsx(FlatList, {
158
- data: items,
159
- keyExtractor: handleKeyExtractor,
160
- renderItem: renderItem
161
- }), /*#__PURE__*/_jsx(StickyFooter, {
162
- paddingX: 3,
163
- children: /*#__PURE__*/_jsx(Button, {
164
- block: true,
165
- onPress: handleClose,
166
- children: "Button"
167
- })
168
- })]
169
- });
170
- }
165
+ children: /*#__PURE__*/_jsx(FlatList, {
166
+ data: items,
167
+ keyExtractor: handleKeyExtractor,
168
+ renderItem: renderItem
169
+ })
171
170
  })]
172
171
  });
173
172
  };
@@ -1,4 +1,4 @@
1
- import React, { useCallback, useRef, useState } from 'react';
1
+ import { useCallback, useRef, useState } from 'react';
2
2
  import { Button } from '../../buttons/Button';
3
3
  import { Example, ExampleScreen } from '../../examples/ExampleScreen';
4
4
  import { HStack, VStack } from '../../layout';
@@ -6,7 +6,7 @@ import { SectionHeader } from '../../section-header/SectionHeader';
6
6
  import { StickyFooter } from '../../sticky-footer/StickyFooter';
7
7
  import { Text } from '../../typography/Text';
8
8
  import { ProgressBar } from '../../visualizations/ProgressBar';
9
- import { Tray, TrayStickyFooter } from '../tray/Tray';
9
+ import { Tray } from '../tray/Tray';
10
10
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
11
  export const Default = () => {
12
12
  const [isTrayVisible, setIsTrayVisible] = useState(false);
@@ -22,50 +22,47 @@ export const Default = () => {
22
22
  children: "Open"
23
23
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
24
24
  ref: trayRef,
25
- handleBarAccessibilityLabel: "Dismiss",
26
- onCloseComplete: setIsTrayVisibleToFalse,
27
- onVisibilityChange: handleTrayVisibilityChange,
28
- title: /*#__PURE__*/_jsx(SectionHeader, {
29
- paddingX: 3,
30
- title: "Trading activity"
31
- }),
32
- children: _ref => {
25
+ footer: _ref => {
33
26
  let {
34
27
  handleClose
35
28
  } = _ref;
36
- return /*#__PURE__*/_jsxs(TrayStickyFooter, {
37
- children: [/*#__PURE__*/_jsxs(VStack, {
38
- paddingBottom: 1,
39
- paddingX: 3,
40
- children: [/*#__PURE__*/_jsx(Text, {
41
- color: "fgMuted",
42
- font: "body",
43
- paddingBottom: 3,
44
- children: "The percentage of Coinbase customers who increased or decreased their net position in 00 over the past 24 hours through trading. What this means: Increased buying activity can signal that the asset is gaining popularity. Last updated on May 2, 2023."
45
- }), /*#__PURE__*/_jsx(Text, {
46
- font: "headline",
47
- children: "What this means:"
48
- }), /*#__PURE__*/_jsx(Text, {
49
- color: "fgMuted",
50
- font: "body",
51
- paddingBottom: 3,
52
- children: "Increased buying activity can signal that the asset is gaining popularity."
53
- }), /*#__PURE__*/_jsx(Text, {
54
- color: "fgMuted",
55
- font: "legal",
56
- children: "Last updated on May 2, 2023."
57
- })]
58
- }), /*#__PURE__*/_jsx(StickyFooter, {
59
- paddingX: 3,
60
- children: /*#__PURE__*/_jsx(Button, {
61
- block: true,
62
- onPress: handleClose,
63
- variant: "secondary",
64
- children: "Got it"
65
- })
66
- })]
29
+ return /*#__PURE__*/_jsx(StickyFooter, {
30
+ paddingX: 3,
31
+ children: /*#__PURE__*/_jsx(Button, {
32
+ block: true,
33
+ onPress: handleClose,
34
+ variant: "secondary",
35
+ children: "Got it"
36
+ })
67
37
  });
68
- }
38
+ },
39
+ handleBarAccessibilityLabel: "Dismiss",
40
+ handleBarVariant: "inside",
41
+ onCloseComplete: setIsTrayVisibleToFalse,
42
+ onVisibilityChange: handleTrayVisibilityChange,
43
+ title: "Trading activity",
44
+ children: /*#__PURE__*/_jsxs(VStack, {
45
+ paddingBottom: 1,
46
+ paddingX: 3,
47
+ children: [/*#__PURE__*/_jsx(Text, {
48
+ color: "fgMuted",
49
+ font: "body",
50
+ paddingBottom: 3,
51
+ children: "The percentage of Coinbase customers who increased or decreased their net position in 00 over the past 24 hours through trading. What this means: Increased buying activity can signal that the asset is gaining popularity. Last updated on May 2, 2023."
52
+ }), /*#__PURE__*/_jsx(Text, {
53
+ font: "headline",
54
+ children: "What this means:"
55
+ }), /*#__PURE__*/_jsx(Text, {
56
+ color: "fgMuted",
57
+ font: "body",
58
+ paddingBottom: 3,
59
+ children: "Increased buying activity can signal that the asset is gaining popularity."
60
+ }), /*#__PURE__*/_jsx(Text, {
61
+ color: "fgMuted",
62
+ font: "legal",
63
+ children: "Last updated on May 2, 2023."
64
+ })]
65
+ })
69
66
  })]
70
67
  });
71
68
  };
@@ -94,7 +91,7 @@ export const WithProgressBar = () => {
94
91
  let {
95
92
  handleClose
96
93
  } = _ref2;
97
- return /*#__PURE__*/_jsxs(TrayStickyFooter, {
94
+ return /*#__PURE__*/_jsxs(_Fragment, {
98
95
  children: [/*#__PURE__*/_jsxs(VStack, {
99
96
  paddingBottom: 1,
100
97
  paddingX: 3,
@@ -1,11 +1,11 @@
1
- import React, { useCallback, useRef, useState } from 'react';
1
+ import { useCallback, useRef, useState } from 'react';
2
2
  import { Button } from '../../buttons/Button';
3
3
  import { Example, ExampleScreen } from '../../examples/ExampleScreen';
4
4
  import { SpotSquare } from '../../illustrations';
5
5
  import { Box, VStack } from '../../layout';
6
6
  import { StickyFooter } from '../../sticky-footer/StickyFooter';
7
7
  import { Text } from '../../typography/Text';
8
- import { Tray, TrayStickyFooter } from '../tray/Tray';
8
+ import { Tray } from '../tray/Tray';
9
9
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
10
10
  export const Default = () => {
11
11
  const [isTrayVisible, setIsTrayVisible] = useState(false);
@@ -21,45 +21,44 @@ export const Default = () => {
21
21
  children: "Open"
22
22
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
23
23
  ref: trayRef,
24
- handleBarAccessibilityLabel: "Dismiss",
25
- onCloseComplete: setIsTrayVisibleToFalse,
26
- onVisibilityChange: handleTrayVisibilityChange,
27
- children: _ref => {
24
+ footer: _ref => {
28
25
  let {
29
26
  handleClose
30
27
  } = _ref;
31
- return /*#__PURE__*/_jsxs(TrayStickyFooter, {
32
- children: [/*#__PURE__*/_jsxs(VStack, {
33
- paddingBottom: 1,
34
- paddingTop: 1,
35
- paddingX: 3,
36
- children: [/*#__PURE__*/_jsx(Box, {
37
- alignItems: "center",
38
- paddingBottom: 4,
39
- children: /*#__PURE__*/_jsx(SpotSquare, {
40
- name: "borrowWallet"
41
- })
42
- }), /*#__PURE__*/_jsx(Text, {
43
- align: "center",
44
- font: "title1",
45
- paddingBottom: 1,
46
- children: "You\u2019re ready to explore"
47
- }), /*#__PURE__*/_jsx(Text, {
48
- align: "center",
49
- color: "fgMuted",
50
- font: "body",
51
- children: "You don\u2019t have any dapps open right now. Here\u2019s one you might like: [dapp]"
52
- })]
53
- }), /*#__PURE__*/_jsx(StickyFooter, {
54
- paddingX: 3,
55
- children: /*#__PURE__*/_jsx(Button, {
56
- block: true,
57
- onPress: handleClose,
58
- children: "Button"
59
- })
60
- })]
28
+ return /*#__PURE__*/_jsx(StickyFooter, {
29
+ paddingX: 3,
30
+ children: /*#__PURE__*/_jsx(Button, {
31
+ block: true,
32
+ onPress: handleClose,
33
+ children: "Button"
34
+ })
61
35
  });
62
- }
36
+ },
37
+ handleBarAccessibilityLabel: "Dismiss",
38
+ onCloseComplete: setIsTrayVisibleToFalse,
39
+ onVisibilityChange: handleTrayVisibilityChange,
40
+ children: /*#__PURE__*/_jsxs(VStack, {
41
+ paddingBottom: 1,
42
+ paddingTop: 1,
43
+ paddingX: 3,
44
+ children: [/*#__PURE__*/_jsx(Box, {
45
+ alignItems: "center",
46
+ paddingBottom: 4,
47
+ children: /*#__PURE__*/_jsx(SpotSquare, {
48
+ name: "borrowWallet"
49
+ })
50
+ }), /*#__PURE__*/_jsx(Text, {
51
+ align: "center",
52
+ font: "title1",
53
+ paddingBottom: 1,
54
+ children: "You\u2019re ready to explore"
55
+ }), /*#__PURE__*/_jsx(Text, {
56
+ align: "center",
57
+ color: "fgMuted",
58
+ font: "body",
59
+ children: "You don\u2019t have any dapps open right now. Here\u2019s one you might like: [dapp]"
60
+ })]
61
+ })
63
62
  })]
64
63
  });
65
64
  };
@@ -1,13 +1,11 @@
1
1
  const _excluded = ["key"];
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, useCallback, useRef, useState } from 'react';
5
- import { Platform } from 'react-native';
6
- import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
+ import { memo, useCallback, useRef, useState } from 'react';
7
5
  import { Button } from '../../buttons/Button';
8
6
  import { ListCell } from '../../cells/ListCell';
9
7
  import { Example, ExampleScreen } from '../../examples/ExampleScreen';
10
- import { useDimensions } from '../../hooks/useDimensions';
8
+ import { useSafeBottomPadding } from '../../hooks/useSafeBottomPadding';
11
9
  import { Icon } from '../../icons';
12
10
  import { SpotRectangle } from '../../illustrations';
13
11
  import { Box, HStack, VStack } from '../../layout';
@@ -17,7 +15,7 @@ import { defaultTheme } from '../../themes/defaultTheme';
17
15
  import { Text } from '../../typography/Text';
18
16
  import { TextBody } from '../../typography/TextBody';
19
17
  import { TextTitle1 } from '../../typography/TextTitle1';
20
- import { Tray, TrayStickyFooter } from '../tray/Tray';
18
+ import { Tray } from '../tray/Tray';
21
19
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
22
20
  export const Default = () => {
23
21
  const [isTrayVisible, setIsTrayVisible] = useState(false);
@@ -33,45 +31,44 @@ export const Default = () => {
33
31
  children: "Open"
34
32
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
35
33
  ref: trayRef,
36
- handleBarAccessibilityLabel: "Dismiss",
37
- onCloseComplete: setIsTrayVisibleToFalse,
38
- onVisibilityChange: handleTrayVisibilityChange,
39
- children: _ref => {
34
+ footer: _ref => {
40
35
  let {
41
36
  handleClose
42
37
  } = _ref;
43
- return /*#__PURE__*/_jsxs(TrayStickyFooter, {
44
- children: [/*#__PURE__*/_jsxs(VStack, {
45
- paddingBottom: 1,
46
- paddingTop: 1,
47
- paddingX: 3,
48
- children: [/*#__PURE__*/_jsx(Box, {
49
- alignItems: "center",
50
- paddingBottom: 3,
51
- children: /*#__PURE__*/_jsx(SpotRectangle, {
52
- name: "exploreDecentralizedApps"
53
- })
54
- }), /*#__PURE__*/_jsx(Text, {
55
- align: "center",
56
- font: "title1",
57
- paddingBottom: 2,
58
- children: "Earn crypto by lending, staking, and more"
59
- }), /*#__PURE__*/_jsx(Text, {
60
- align: "center",
61
- color: "fgMuted",
62
- font: "body",
63
- children: "Many decentralized apps (\u201Cdapps\u201D) let you earn yield on your crypto. Check out trusted dapps like Aave and Compound without leaving Coinbaes."
64
- })]
65
- }), /*#__PURE__*/_jsx(StickyFooter, {
66
- paddingX: 3,
67
- children: /*#__PURE__*/_jsx(Button, {
68
- block: true,
69
- onPress: handleClose,
70
- children: "Explore Dapps"
71
- })
72
- })]
38
+ return /*#__PURE__*/_jsx(StickyFooter, {
39
+ paddingX: 3,
40
+ children: /*#__PURE__*/_jsx(Button, {
41
+ block: true,
42
+ onPress: handleClose,
43
+ children: "Explore Dapps"
44
+ })
73
45
  });
74
- }
46
+ },
47
+ handleBarAccessibilityLabel: "Dismiss",
48
+ onCloseComplete: setIsTrayVisibleToFalse,
49
+ onVisibilityChange: handleTrayVisibilityChange,
50
+ children: /*#__PURE__*/_jsxs(VStack, {
51
+ paddingBottom: 1,
52
+ paddingTop: 1,
53
+ paddingX: 3,
54
+ children: [/*#__PURE__*/_jsx(Box, {
55
+ alignItems: "center",
56
+ paddingBottom: 3,
57
+ children: /*#__PURE__*/_jsx(SpotRectangle, {
58
+ name: "exploreDecentralizedApps"
59
+ })
60
+ }), /*#__PURE__*/_jsx(Text, {
61
+ align: "center",
62
+ font: "title1",
63
+ paddingBottom: 2,
64
+ children: "Earn crypto by lending, staking, and more"
65
+ }), /*#__PURE__*/_jsx(Text, {
66
+ align: "center",
67
+ color: "fgMuted",
68
+ font: "body",
69
+ children: "Many decentralized apps (\u201Cdapps\u201D) let you earn yield on your crypto. Check out trusted dapps like Aave and Compound without leaving Coinbaes."
70
+ })]
71
+ })
75
72
  })]
76
73
  });
77
74
  };
@@ -120,15 +117,7 @@ const CreditCardAddAssetsTrayExample = () => {
120
117
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
121
118
  handleBarAccessibilityLabel: "Information about rewards details",
122
119
  onCloseComplete: setIsTrayVisibleOff,
123
- title: trayContentType === 'addFundsInfo' ? /*#__PURE__*/_jsx(VStack, {
124
- gap: 0.5,
125
- paddingTop: 3,
126
- paddingX: 3,
127
- children: /*#__PURE__*/_jsx(Text, {
128
- font: "title3",
129
- children: "Lifetime rewards details"
130
- })
131
- }) : null,
120
+ title: trayContentType === 'addFundsInfo' ? 'Lifetime rewards details' : null,
132
121
  children: trayContentType === 'addFundsInfo' ? /*#__PURE__*/_jsxs(VStack, {
133
122
  paddingX: 3,
134
123
  children: [/*#__PURE__*/_jsx(Text, {
@@ -154,8 +143,6 @@ const CreditCardAddAssetsTrayExample = () => {
154
143
  })]
155
144
  });
156
145
  };
157
- const TOP_TRAY_OFFSET = 20;
158
- const SAFE_AREA_OVERFLOW_MULTIPLIER = 2;
159
146
  const BACKGROUND_COLOR = '#011C92';
160
147
  const UPSELL_BENEFITS = [{
161
148
  key: '1',
@@ -195,13 +182,23 @@ const ProductUpsellTrayExample = () => {
195
182
  const [isTrayVisible, setIsTrayVisible] = useState(false);
196
183
  const setIsTrayVisibleOff = useCallback(() => setIsTrayVisible(false), []);
197
184
  const setIsTrayVisibleOn = useCallback(() => setIsTrayVisible(true), []);
185
+ const safeBottomPadding = useSafeBottomPadding();
198
186
  return /*#__PURE__*/_jsxs(_Fragment, {
199
187
  children: [/*#__PURE__*/_jsx(Button, {
200
188
  onPress: setIsTrayVisibleOn,
201
189
  children: "Open"
202
190
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
191
+ disableSafeAreaPaddingBottom: true,
203
192
  handleBarAccessibilityLabel: "Product upsell details",
204
193
  onCloseComplete: setIsTrayVisibleOff,
194
+ styles: {
195
+ drawer: {
196
+ backgroundColor: BACKGROUND_COLOR
197
+ },
198
+ content: {
199
+ paddingBottom: safeBottomPadding
200
+ }
201
+ },
205
202
  verticalDrawerPercentageOfView: 0.95,
206
203
  children: _ref3 => {
207
204
  let {
@@ -220,11 +217,6 @@ const ProductUpsellTrayContent = /*#__PURE__*/memo(function ProductUpsellTrayCon
220
217
  benefits,
221
218
  dismiss
222
219
  } = _ref4;
223
- const {
224
- screenWidth
225
- } = useDimensions();
226
- const insets = useSafeAreaInsets();
227
- const bottom = Platform.OS === 'android' ? Math.max(insets.bottom, 24) : insets.bottom;
228
220
  const handlePrimaryCtaPress = useCallback(() => {
229
221
  alert('Primary CTA pressed');
230
222
  dismiss();
@@ -232,24 +224,9 @@ const ProductUpsellTrayContent = /*#__PURE__*/memo(function ProductUpsellTrayCon
232
224
  return /*#__PURE__*/_jsx(ThemeProvider, {
233
225
  activeColorScheme: "dark",
234
226
  theme: defaultTheme,
235
- children: /*#__PURE__*/_jsxs(VStack, {
227
+ children: /*#__PURE__*/_jsx(VStack, {
236
228
  position: "relative",
237
- children: [/*#__PURE__*/_jsx(Box, {
238
- bottom: -bottom * SAFE_AREA_OVERFLOW_MULTIPLIER,
239
- dangerouslySetBackground: BACKGROUND_COLOR,
240
- height: bottom * SAFE_AREA_OVERFLOW_MULTIPLIER,
241
- left: 0,
242
- position: "absolute",
243
- right: 0,
244
- width: "100%"
245
- }), /*#__PURE__*/_jsx(Box, {
246
- dangerouslySetBackground: BACKGROUND_COLOR,
247
- height: TOP_TRAY_OFFSET,
248
- left: 0,
249
- position: "absolute",
250
- right: 0,
251
- top: -TOP_TRAY_OFFSET
252
- }), /*#__PURE__*/_jsxs(VStack, {
229
+ children: /*#__PURE__*/_jsxs(VStack, {
253
230
  dangerouslySetBackground: BACKGROUND_COLOR,
254
231
  gap: 4,
255
232
  paddingTop: 5,
@@ -308,7 +285,7 @@ const ProductUpsellTrayContent = /*#__PURE__*/memo(function ProductUpsellTrayCon
308
285
  })]
309
286
  })]
310
287
  })]
311
- })]
288
+ })
312
289
  })
313
290
  });
314
291
  });
@@ -172,6 +172,7 @@ const TrayWithListCells = () => {
172
172
  children: "Open"
173
173
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
174
174
  ref: trayRef,
175
+ disableSafeAreaPaddingBottom: true,
175
176
  handleBarVariant: "inside",
176
177
  headerElevation: isScrolled ? 2 : 0,
177
178
  onCloseComplete: setIsTrayVisibleOff,
@@ -196,7 +197,6 @@ const TrayWithListCells = () => {
196
197
  });
197
198
  };
198
199
  const TrayWithListCellsStickyFooter = () => {
199
- const safeBottomPadding = useSafeBottomPadding();
200
200
  const [isTrayVisible, setIsTrayVisible] = useState(false);
201
201
  const [isScrolled, setIsScrolled] = useState(false);
202
202
  const setIsTrayVisibleOff = useCallback(() => setIsTrayVisible(false), [setIsTrayVisible]);
@@ -223,9 +223,6 @@ const TrayWithListCellsStickyFooter = () => {
223
223
  background: "bgElevation2",
224
224
  elevation: isScrolled ? 2 : 0,
225
225
  paddingX: 3,
226
- style: {
227
- paddingBottom: safeBottomPadding
228
- },
229
226
  children: /*#__PURE__*/_jsx(Button, {
230
227
  block: true,
231
228
  onPress: handleClose,
@@ -327,6 +324,7 @@ const IllustrationTrayWithListCells = () => {
327
324
  children: "Open"
328
325
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
329
326
  ref: trayRef,
327
+ disableSafeAreaPaddingBottom: true,
330
328
  handleBarVariant: "inside",
331
329
  headerElevation: isScrolled ? 2 : 0,
332
330
  onCloseComplete: setIsTrayVisibleOff,
@@ -410,7 +408,6 @@ const IllustrationTrayWithStickyFooter = () => {
410
408
  });
411
409
  };
412
410
  const IllustrationTrayWithListCellsStickyFooter = () => {
413
- const safeBottomPadding = useSafeBottomPadding();
414
411
  const [isTrayVisible, setIsTrayVisible] = useState(false);
415
412
  const [isScrolled, setIsScrolled] = useState(false);
416
413
  const setIsTrayVisibleOff = useCallback(() => setIsTrayVisible(false), [setIsTrayVisible]);
@@ -437,9 +434,6 @@ const IllustrationTrayWithListCellsStickyFooter = () => {
437
434
  background: "bgElevation2",
438
435
  elevation: isScrolled ? 2 : 0,
439
436
  paddingX: 3,
440
- style: {
441
- paddingBottom: safeBottomPadding
442
- },
443
437
  children: /*#__PURE__*/_jsx(Button, {
444
438
  block: true,
445
439
  onPress: handleClose,
@@ -570,6 +564,7 @@ const FullBleedImageTrayWithListCells = () => {
570
564
  children: "Open"
571
565
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
572
566
  ref: trayRef,
567
+ disableSafeAreaPaddingBottom: true,
573
568
  handleBarVariant: "inside",
574
569
  header: /*#__PURE__*/_jsx(Text, {
575
570
  font: "title3",
@@ -591,8 +586,7 @@ const FullBleedImageTrayWithListCells = () => {
591
586
  header: {
592
587
  paddingHorizontal: 0,
593
588
  paddingBottom: 0
594
- },
595
- drawer: scrollContentStyle
589
+ }
596
590
  },
597
591
  title: /*#__PURE__*/_jsx(Box, {
598
592
  background: "bgAlternate",
@@ -907,8 +901,7 @@ const MultiScreenTrayExample = () => {
907
901
  let {
908
902
  onNavigate
909
903
  } = _ref9;
910
- return /*#__PURE__*/_jsxs(ScrollView, {
911
- scrollEventThrottle: 16,
904
+ return /*#__PURE__*/_jsxs(VStack, {
912
905
  children: [/*#__PURE__*/_jsx(ListCell, {
913
906
  accessory: "arrow",
914
907
  description: "Manage your account settings",
@@ -102,6 +102,7 @@ export const ScrollableTray = _ref2 => {
102
102
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
103
103
  ref: trayRef,
104
104
  disableCapturePanGestureToDismiss: true,
105
+ disableSafeAreaPaddingBottom: true,
105
106
  onCloseComplete: setIsTrayVisibleOff,
106
107
  title: title,
107
108
  verticalDrawerPercentageOfView: verticalDrawerPercentageOfView,
@@ -1,8 +1,8 @@
1
- const _excluded = ["children", "pin", "onCloseComplete", "preventDismissGestures", "preventHardwareBackBehaviorAndroid", "handleBarVariant", "hideHandleBar", "disableCapturePanGestureToDismiss", "onBlur", "verticalDrawerPercentageOfView", "handleBarAccessibilityLabel", "accessibilityLabel", "accessibilityLabelledBy", "reduceMotion", "onOpenComplete", "style", "styles", "accessibilityRole", "animationType"];
1
+ const _excluded = ["children", "pin", "onCloseComplete", "preventDismissGestures", "preventHardwareBackBehaviorAndroid", "handleBarVariant", "hideHandleBar", "disableCapturePanGestureToDismiss", "onBlur", "verticalDrawerPercentageOfView", "handleBarAccessibilityLabel", "accessibilityLabel", "accessibilityLabelledBy", "reduceMotion", "onOpenComplete", "style", "styles", "accessibilityRole", "animationType", "disableSafeAreaPaddingBottom"];
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, { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
5
- import { Animated, Keyboard, Modal, Platform, useWindowDimensions, View } from 'react-native';
5
+ import { Animated, Keyboard, Modal, Platform, useWindowDimensions } from 'react-native';
6
6
  import { drawerAnimationDefaultDuration, MAX_OVER_DRAG } from '@coinbase/cds-common/animation/drawer';
7
7
  import { OverlayContentContext } from '@coinbase/cds-common/overlays/OverlayContentContext';
8
8
  import { horizontalDrawerPercentageOfView, verticalDrawerPercentageOfView as defaultVerticalDrawerPercentageOfView } from '@coinbase/cds-common/tokens/drawer';
@@ -19,10 +19,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
19
  const overlayContentContextValue = {
20
20
  isDrawer: true
21
21
  };
22
- const overflowStyle = {
23
- overflow: 'hidden',
24
- maxHeight: '100%'
25
- };
26
22
  export const Drawer = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Drawer(_ref, ref) {
27
23
  let {
28
24
  children,
@@ -43,7 +39,8 @@ export const Drawer = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Drawer(
43
39
  style,
44
40
  styles,
45
41
  accessibilityRole = 'alert',
46
- animationType = 'none'
42
+ animationType = 'none',
43
+ disableSafeAreaPaddingBottom
47
44
  } = _ref,
48
45
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
49
46
  const theme = useTheme();
@@ -61,7 +58,7 @@ export const Drawer = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Drawer(
61
58
  animateSwipeToClose
62
59
  } = useDrawerAnimation(pin, verticalDrawerPercentageOfView, reduceMotion);
63
60
  const [opacityAnimation, animateOverlayIn, animateOverlayOut] = useOverlayAnimation(drawerAnimationDefaultDuration);
64
- const paddingStyles = useDrawerSpacing(pin);
61
+ const paddingStyles = useDrawerSpacing(pin, disableSafeAreaPaddingBottom);
65
62
  const isMounted = useRef(false);
66
63
  const handleClose = useCallback(() => {
67
64
  Animated.parallel([animateDrawerOut, animateOverlayOut]).start(_ref2 => {
@@ -199,10 +196,7 @@ export const Drawer = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Drawer(
199
196
  elevation: 2,
200
197
  maxHeight: !isSideDrawer ? verticalDrawerMaxHeight : '100%',
201
198
  style: drawerStyle,
202
- children: [showHandleBarInside && handleBar, showHandleBarInside ? /*#__PURE__*/_jsx(View, {
203
- style: overflowStyle,
204
- children: content
205
- }) : content]
199
+ children: [showHandleBarInside && handleBar, content]
206
200
  })]
207
201
  }))]
208
202
  })
@@ -2,39 +2,42 @@ import { useMemo } from 'react';
2
2
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
3
3
  import { MAX_OVER_DRAG } from '@coinbase/cds-common/animation/drawer';
4
4
  import { useSafeBottomPadding } from '../../hooks/useSafeBottomPadding';
5
- export const useDrawerSpacing = function (pin) {
5
+ export const useDrawerSpacing = function (pin, disableSafeAreaPaddingBottom) {
6
6
  if (pin === void 0) {
7
7
  pin = 'bottom';
8
8
  }
9
+ if (disableSafeAreaPaddingBottom === void 0) {
10
+ disableSafeAreaPaddingBottom = false;
11
+ }
9
12
  const {
10
- top
13
+ top: safeTopPadding
11
14
  } = useSafeAreaInsets();
12
15
  const safeBottomPadding = useSafeBottomPadding();
13
16
  const safeAreaStyles = useMemo(() => {
14
17
  switch (pin) {
15
18
  case 'top':
16
19
  return {
17
- paddingTop: top + MAX_OVER_DRAG
20
+ paddingTop: safeTopPadding + MAX_OVER_DRAG
18
21
  };
19
22
  case 'left':
20
23
  return {
21
- paddingTop: top,
24
+ paddingTop: safeTopPadding,
22
25
  paddingLeft: MAX_OVER_DRAG
23
26
  };
24
27
  case 'bottom':
25
28
  return {
26
- paddingBottom: safeBottomPadding + MAX_OVER_DRAG
29
+ paddingBottom: disableSafeAreaPaddingBottom ? MAX_OVER_DRAG : safeBottomPadding + MAX_OVER_DRAG
27
30
  };
28
31
  case 'right':
29
32
  return {
30
- paddingTop: top,
33
+ paddingTop: safeTopPadding,
31
34
  paddingRight: MAX_OVER_DRAG
32
35
  };
33
36
  default:
34
37
  return {
35
- paddingBottom: safeBottomPadding + MAX_OVER_DRAG
38
+ paddingBottom: disableSafeAreaPaddingBottom ? MAX_OVER_DRAG : safeBottomPadding + MAX_OVER_DRAG
36
39
  };
37
40
  }
38
- }, [pin, safeBottomPadding, top]);
41
+ }, [pin, safeBottomPadding, safeTopPadding, disableSafeAreaPaddingBottom]);
39
42
  return safeAreaStyles;
40
43
  };
@@ -71,6 +71,7 @@ export const Tray = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Tray(_ref
71
71
  flexGrow: 1,
72
72
  flexShrink: 1,
73
73
  minHeight: 0,
74
+ overflow: "hidden",
74
75
  paddingTop: title ? 0 : 2,
75
76
  style: contentStyle,
76
77
  children: [(title || headerContent) && /*#__PURE__*/_jsxs(Box, {
@@ -119,6 +120,10 @@ export const Tray = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Tray(_ref
119
120
  }))
120
121
  });
121
122
  }));
123
+
124
+ /**
125
+ * @deprecated Redundant component.
126
+ */
122
127
  export const TrayStickyFooter = _ref4 => {
123
128
  let {
124
129
  children
@@ -1,4 +1,4 @@
1
- const _excluded = ["elevated", "elevation", "children", "testID", "role", "accessibilityLabel", "padding"];
1
+ const _excluded = ["elevated", "elevation", "children", "testID", "role", "accessibilityLabel", "padding", "flexShrink"];
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, { forwardRef, memo } from 'react';
@@ -13,13 +13,15 @@ export const StickyFooter = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, for
13
13
  testID = 'sticky-footer',
14
14
  role = 'toolbar',
15
15
  accessibilityLabel = 'footer',
16
- padding = 2
16
+ padding = 2,
17
+ flexShrink = 0
17
18
  } = _ref,
18
19
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
19
20
  return /*#__PURE__*/_jsx(Box, _extends({
20
21
  ref: forwardedRef,
21
22
  accessibilityLabel: accessibilityLabel,
22
23
  elevation: elevation,
24
+ flexShrink: flexShrink,
23
25
  padding: padding,
24
26
  role: role,
25
27
  testID: testID
@@ -1,12 +1,12 @@
1
1
  import React, { useCallback, useRef, useState } from 'react';
2
- import { FlatList, ScrollView } from 'react-native';
2
+ import { FlatList } from 'react-native';
3
3
  import { prices } from '@coinbase/cds-common/internal/data/prices';
4
4
  import { Button } from '../../buttons/Button';
5
5
  import { Menu } from '../../controls/Menu';
6
6
  import { SelectOption } from '../../controls/SelectOption';
7
7
  import { Example, ExampleScreen } from '../../examples/ExampleScreen';
8
8
  import { Box, HStack } from '../../layout';
9
- import { Tray, TrayStickyFooter } from '../../overlays';
9
+ import { Tray } from '../../overlays';
10
10
  import { StickyFooter } from '../StickyFooter';
11
11
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
12
12
  const options = prices.slice(0, 20);
@@ -42,51 +42,46 @@ const StickyFooterWithTray = _ref => {
42
42
  }), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
43
43
  ref: trayRef,
44
44
  disableCapturePanGestureToDismiss: true,
45
- onCloseComplete: setIsTrayVisibleToFalse,
46
- title: title,
47
- verticalDrawerPercentageOfView: 0.75,
48
- children: _ref3 => {
45
+ footer: _ref3 => {
49
46
  let {
50
47
  handleClose
51
48
  } = _ref3;
52
- return /*#__PURE__*/_jsxs(TrayStickyFooter, {
53
- children: [/*#__PURE__*/_jsx(ScrollView, {
54
- children: /*#__PURE__*/_jsx(Menu, {
55
- onChange: setValue,
56
- value: value,
57
- children: /*#__PURE__*/_jsx(FlatList, {
58
- data: options,
59
- renderItem: renderItem,
60
- scrollEnabled: false
49
+ return /*#__PURE__*/_jsx(StickyFooter, {
50
+ children: /*#__PURE__*/_jsxs(HStack, {
51
+ alignItems: "center",
52
+ gap: 1,
53
+ justifyContent: "center",
54
+ width: "100%",
55
+ children: [/*#__PURE__*/_jsx(Box, {
56
+ flexGrow: 1,
57
+ children: /*#__PURE__*/_jsx(Button, {
58
+ block: true,
59
+ variant: "secondary",
60
+ children: "Secondary"
61
+ })
62
+ }), /*#__PURE__*/_jsx(Box, {
63
+ flexGrow: 1,
64
+ children: /*#__PURE__*/_jsx(Button, {
65
+ block: true,
66
+ onPress: handleClose,
67
+ children: "Primary"
61
68
  })
62
- })
63
- }), /*#__PURE__*/_jsx(StickyFooter, {
64
- elevated: true,
65
- children: /*#__PURE__*/_jsxs(HStack, {
66
- alignContent: "center",
67
- alignItems: "center",
68
- gap: 1,
69
- justifyContent: "center",
70
- width: "100%",
71
- children: [/*#__PURE__*/_jsx(Box, {
72
- flexGrow: 1,
73
- children: /*#__PURE__*/_jsx(Button, {
74
- block: true,
75
- variant: "secondary",
76
- children: "Secondary"
77
- })
78
- }), /*#__PURE__*/_jsx(Box, {
79
- flexGrow: 1,
80
- children: /*#__PURE__*/_jsx(Button, {
81
- block: true,
82
- onPress: handleClose,
83
- children: "Primary"
84
- })
85
- })]
86
- })
87
- })]
69
+ })]
70
+ })
88
71
  });
89
- }
72
+ },
73
+ handleBarVariant: "inside",
74
+ onCloseComplete: setIsTrayVisibleToFalse,
75
+ title: title,
76
+ verticalDrawerPercentageOfView: 0.75,
77
+ children: /*#__PURE__*/_jsx(Menu, {
78
+ onChange: setValue,
79
+ value: value,
80
+ children: /*#__PURE__*/_jsx(FlatList, {
81
+ data: options,
82
+ renderItem: renderItem
83
+ })
84
+ })
90
85
  })]
91
86
  });
92
87
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-mobile",
3
- "version": "8.54.0",
3
+ "version": "8.55.0",
4
4
  "description": "Coinbase Design System - Mobile",
5
5
  "repository": {
6
6
  "type": "git",
@@ -197,7 +197,7 @@
197
197
  "react-native-svg": "^14.1.0"
198
198
  },
199
199
  "dependencies": {
200
- "@coinbase/cds-common": "^8.54.0",
200
+ "@coinbase/cds-common": "^8.55.0",
201
201
  "@coinbase/cds-icons": "^5.13.0",
202
202
  "@coinbase/cds-illustrations": "^4.34.0",
203
203
  "@coinbase/cds-lottie-files": "^3.3.4",