@coinbase/cds-mobile 8.53.1 → 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 +20 -0
- package/README.md +5 -2
- package/dts/buttons/IconButton.d.ts +23 -1
- package/dts/buttons/IconButton.d.ts.map +1 -1
- package/dts/controls/InputIconButton.d.ts +22 -1
- package/dts/controls/InputIconButton.d.ts.map +1 -1
- package/dts/dates/Calendar.d.ts +170 -0
- package/dts/dates/Calendar.d.ts.map +1 -0
- package/dts/dates/DateInput.d.ts +2 -2
- package/dts/dates/DateInput.d.ts.map +1 -1
- package/dts/dates/DatePicker.d.ts +136 -67
- package/dts/dates/DatePicker.d.ts.map +1 -1
- package/dts/overlays/drawer/Drawer.d.ts +12 -0
- package/dts/overlays/drawer/Drawer.d.ts.map +1 -1
- package/dts/overlays/drawer/useDrawerSpacing.d.ts +4 -1
- package/dts/overlays/drawer/useDrawerSpacing.d.ts.map +1 -1
- package/dts/overlays/tooltip/Tooltip.d.ts +9 -1
- package/dts/overlays/tooltip/Tooltip.d.ts.map +1 -1
- package/dts/overlays/tray/Tray.d.ts +3 -0
- package/dts/overlays/tray/Tray.d.ts.map +1 -1
- package/dts/sticky-footer/StickyFooter.d.ts.map +1 -1
- package/esm/buttons/IconButton.js +4 -3
- package/esm/controls/InputIconButton.js +4 -3
- package/esm/dates/Calendar.js +346 -0
- package/esm/dates/DateInput.js +3 -1
- package/esm/dates/DatePicker.js +116 -39
- package/esm/dates/__stories__/Calendar.stories.js +360 -0
- package/esm/dates/__stories__/DatePicker.stories.js +51 -25
- package/esm/overlays/__stories__/TrayAction.stories.js +20 -21
- package/esm/overlays/__stories__/TrayInformational.stories.js +40 -43
- package/esm/overlays/__stories__/TrayMessaging.stories.js +36 -37
- package/esm/overlays/__stories__/TrayPromotional.stories.js +51 -74
- package/esm/overlays/__stories__/TrayRedesign.stories.js +5 -12
- package/esm/overlays/__stories__/Trays.js +1 -0
- package/esm/overlays/drawer/Drawer.js +9 -13
- package/esm/overlays/drawer/useDrawerSpacing.js +11 -8
- package/esm/overlays/tooltip/Tooltip.js +7 -2
- package/esm/overlays/tray/Tray.js +5 -0
- package/esm/sticky-footer/StickyFooter.js +4 -2
- package/esm/sticky-footer/__stories__/StickyFooterWithTray.stories.js +37 -42
- package/package.json +2 -4
|
@@ -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(
|
|
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", "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
|
|
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,
|
|
@@ -39,10 +35,12 @@ export const Drawer = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Drawer(
|
|
|
39
35
|
accessibilityLabel,
|
|
40
36
|
accessibilityLabelledBy,
|
|
41
37
|
reduceMotion,
|
|
38
|
+
onOpenComplete,
|
|
42
39
|
style,
|
|
43
40
|
styles,
|
|
44
41
|
accessibilityRole = 'alert',
|
|
45
|
-
animationType = 'none'
|
|
42
|
+
animationType = 'none',
|
|
43
|
+
disableSafeAreaPaddingBottom
|
|
46
44
|
} = _ref,
|
|
47
45
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
48
46
|
const theme = useTheme();
|
|
@@ -60,7 +58,7 @@ export const Drawer = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Drawer(
|
|
|
60
58
|
animateSwipeToClose
|
|
61
59
|
} = useDrawerAnimation(pin, verticalDrawerPercentageOfView, reduceMotion);
|
|
62
60
|
const [opacityAnimation, animateOverlayIn, animateOverlayOut] = useOverlayAnimation(drawerAnimationDefaultDuration);
|
|
63
|
-
const paddingStyles = useDrawerSpacing(pin);
|
|
61
|
+
const paddingStyles = useDrawerSpacing(pin, disableSafeAreaPaddingBottom);
|
|
64
62
|
const isMounted = useRef(false);
|
|
65
63
|
const handleClose = useCallback(() => {
|
|
66
64
|
Animated.parallel([animateDrawerOut, animateOverlayOut]).start(_ref2 => {
|
|
@@ -95,10 +93,11 @@ export const Drawer = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Drawer(
|
|
|
95
93
|
} = _ref4;
|
|
96
94
|
if (finished) {
|
|
97
95
|
isMounted.current = true;
|
|
96
|
+
onOpenComplete == null || onOpenComplete();
|
|
98
97
|
}
|
|
99
98
|
});
|
|
100
99
|
}
|
|
101
|
-
}, [drawerAnimation, animateDrawerIn, animateOverlayIn]);
|
|
100
|
+
}, [drawerAnimation, animateDrawerIn, animateOverlayIn, onOpenComplete]);
|
|
102
101
|
const panGestureHandlers = useDrawerPanResponder({
|
|
103
102
|
pin,
|
|
104
103
|
drawerAnimation,
|
|
@@ -197,10 +196,7 @@ export const Drawer = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Drawer(
|
|
|
197
196
|
elevation: 2,
|
|
198
197
|
maxHeight: !isSideDrawer ? verticalDrawerMaxHeight : '100%',
|
|
199
198
|
style: drawerStyle,
|
|
200
|
-
children: [showHandleBarInside && handleBar,
|
|
201
|
-
style: overflowStyle,
|
|
202
|
-
children: content
|
|
203
|
-
}) : content]
|
|
199
|
+
children: [showHandleBarInside && handleBar, content]
|
|
204
200
|
})]
|
|
205
201
|
}))]
|
|
206
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:
|
|
20
|
+
paddingTop: safeTopPadding + MAX_OVER_DRAG
|
|
18
21
|
};
|
|
19
22
|
case 'left':
|
|
20
23
|
return {
|
|
21
|
-
paddingTop:
|
|
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:
|
|
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,
|
|
41
|
+
}, [pin, safeBottomPadding, safeTopPadding, disableSafeAreaPaddingBottom]);
|
|
39
42
|
return safeAreaStyles;
|
|
40
43
|
};
|
|
@@ -19,6 +19,7 @@ export const Tooltip = /*#__PURE__*/memo(_ref => {
|
|
|
19
19
|
accessibilityHint,
|
|
20
20
|
accessibilityLabelForContent,
|
|
21
21
|
accessibilityHintForContent,
|
|
22
|
+
accessibilityState,
|
|
22
23
|
visible,
|
|
23
24
|
invertColorScheme = true,
|
|
24
25
|
elevation,
|
|
@@ -92,8 +93,12 @@ export const Tooltip = /*#__PURE__*/memo(_ref => {
|
|
|
92
93
|
// equals the component where when you click on it, it will show the tooltip
|
|
93
94
|
const accessibilityPropsForTrigger = useMemo(() => ({
|
|
94
95
|
accessibilityLabel: typeof children === 'string' && accessibilityLabel === undefined ? children : accessibilityLabel,
|
|
95
|
-
accessibilityHint: typeof children === 'string' && accessibilityHint === undefined ? children : accessibilityHint
|
|
96
|
-
|
|
96
|
+
accessibilityHint: typeof children === 'string' && accessibilityHint === undefined ? children : accessibilityHint,
|
|
97
|
+
// accessibilityState is applied to the trigger regardless of screen reader usage.
|
|
98
|
+
// Only set it when you need screen reader behavior.
|
|
99
|
+
// e.g. disabled = true: state is announced and the trigger cannot activate
|
|
100
|
+
accessibilityState
|
|
101
|
+
}), [children, accessibilityLabel, accessibilityHint, accessibilityState]);
|
|
97
102
|
const accessibilityPropsForContent = useMemo(() => ({
|
|
98
103
|
accessibilityLabel: typeof content === 'string' && accessibilityLabelForContent === undefined ? content : accessibilityLabelForContent,
|
|
99
104
|
accessibilityHint: typeof content === 'string' && accessibilityHintForContent === undefined ? content : accessibilityHintForContent,
|
|
@@ -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
|
|
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
|
|
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
|
-
|
|
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__*/
|
|
53
|
-
children:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
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
|
-
})
|
|
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.
|
|
3
|
+
"version": "8.55.0",
|
|
4
4
|
"description": "Coinbase Design System - Mobile",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -187,7 +187,6 @@
|
|
|
187
187
|
"lottie-react-native": "^6.7.0",
|
|
188
188
|
"react": "^18.3.1",
|
|
189
189
|
"react-native": "^0.74.5",
|
|
190
|
-
"react-native-date-picker": "^4.4.2",
|
|
191
190
|
"react-native-gesture-handler": "^2.16.2",
|
|
192
191
|
"react-native-inappbrowser-reborn": "^3.7.0",
|
|
193
192
|
"react-native-linear-gradient": "^2.8.3",
|
|
@@ -198,7 +197,7 @@
|
|
|
198
197
|
"react-native-svg": "^14.1.0"
|
|
199
198
|
},
|
|
200
199
|
"dependencies": {
|
|
201
|
-
"@coinbase/cds-common": "^8.
|
|
200
|
+
"@coinbase/cds-common": "^8.55.0",
|
|
202
201
|
"@coinbase/cds-icons": "^5.13.0",
|
|
203
202
|
"@coinbase/cds-illustrations": "^4.34.0",
|
|
204
203
|
"@coinbase/cds-lottie-files": "^3.3.4",
|
|
@@ -223,7 +222,6 @@
|
|
|
223
222
|
"eslint-plugin-reanimated": "^2.0.1",
|
|
224
223
|
"lottie-react-native": "6.7.0",
|
|
225
224
|
"react-native-accessibility-engine": "^3.2.0",
|
|
226
|
-
"react-native-date-picker": "4.4.2",
|
|
227
225
|
"react-native-gesture-handler": "2.16.2",
|
|
228
226
|
"react-native-inappbrowser-reborn": "3.7.0",
|
|
229
227
|
"react-native-linear-gradient": "2.8.3",
|