@coinbase/cds-mobile 8.25.1 → 8.27.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 +21 -0
- package/dts/alpha/select/DefaultSelectControl.d.ts +2 -8
- package/dts/alpha/select/DefaultSelectControl.d.ts.map +1 -1
- package/dts/alpha/select/DefaultSelectDropdown.d.ts.map +1 -1
- package/dts/alpha/select/DefaultSelectOptionGroup.d.ts +8 -0
- package/dts/alpha/select/DefaultSelectOptionGroup.d.ts.map +1 -0
- package/dts/alpha/select/Select.d.ts +23 -366
- package/dts/alpha/select/Select.d.ts.map +1 -1
- package/dts/alpha/select/index.d.ts +2 -0
- package/dts/alpha/select/index.d.ts.map +1 -1
- package/dts/alpha/select/types.d.ts +486 -0
- package/dts/alpha/select/types.d.ts.map +1 -0
- package/dts/alpha/select-chip/SelectChip.d.ts +26 -0
- package/dts/alpha/select-chip/SelectChip.d.ts.map +1 -0
- package/dts/alpha/select-chip/SelectChipControl.d.ts +14 -0
- package/dts/alpha/select-chip/SelectChipControl.d.ts.map +1 -0
- package/dts/alpha/select-chip/index.d.ts +3 -0
- package/dts/alpha/select-chip/index.d.ts.map +1 -0
- package/dts/cells/CellAccessory.d.ts +1 -1
- package/dts/cells/CellAccessory.d.ts.map +1 -1
- package/dts/chips/Chip.d.ts.map +1 -1
- package/dts/chips/SelectChip.d.ts +8 -0
- package/dts/chips/SelectChip.d.ts.map +1 -1
- package/dts/examples/ExampleScreen.d.ts +26 -1
- package/dts/examples/ExampleScreen.d.ts.map +1 -1
- package/esm/alpha/select/DefaultSelectControl.js +46 -8
- package/esm/alpha/select/DefaultSelectDropdown.js +100 -31
- package/esm/alpha/select/DefaultSelectOption.js +1 -1
- package/esm/alpha/select/DefaultSelectOptionGroup.js +90 -0
- package/esm/alpha/select/Select.js +10 -26
- package/esm/alpha/select/index.js +3 -1
- package/esm/alpha/select/types.js +50 -0
- package/esm/alpha/select-chip/SelectChip.js +31 -0
- package/esm/alpha/select-chip/SelectChipControl.js +111 -0
- package/esm/alpha/select-chip/__stories__/SelectChip.stories.js +538 -0
- package/esm/alpha/select-chip/index.js +2 -0
- package/esm/banner/__stories__/Banner.stories.js +133 -294
- package/esm/banner/__stories__/BannerActions.stories.js +276 -0
- package/esm/banner/__stories__/BannerLayout.stories.js +329 -0
- package/esm/cells/Cell.js +1 -1
- package/esm/cells/CellAccessory.js +9 -0
- package/esm/cells/__stories__/ListCell.stories.js +81 -87
- package/esm/cells/__stories__/ListCellFallback.stories.js +1 -0
- package/esm/chips/Chip.js +4 -1
- package/esm/chips/SelectChip.js +9 -0
- package/esm/examples/ExampleScreen.js +79 -58
- package/esm/icons/__stories__/IconSheet.js +35 -13
- package/esm/illustrations/__stories__/HeroSquare.stories.js +70 -2
- package/esm/illustrations/__stories__/Pictogram.stories.js +70 -2
- package/esm/illustrations/__stories__/SpotIcon.stories.js +70 -2
- package/esm/illustrations/__stories__/SpotRectangle.stories.js +68 -2
- package/esm/illustrations/__stories__/SpotSquare.stories.js +68 -2
- package/esm/media/__stories__/CarouselMedia.stories.js +2 -5
- package/esm/numpad/__stories__/Numpad.stories.js +8 -5
- package/esm/page/__stories__/PageFooter.stories.js +5 -4
- package/esm/page/__stories__/PageFooterInPage.stories.js +20 -19
- package/esm/page/__stories__/PageHeader.stories.js +4 -4
- package/esm/page/__stories__/PageHeaderInErrorEmptyState.stories.js +6 -4
- package/esm/page/__stories__/PageHeaderInPage.stories.js +20 -18
- package/esm/section-header/__stories__/SectionHeader.stories.js +4 -4
- package/esm/sticky-footer/__stories__/StickyFooter.stories.js +6 -8
- package/esm/tour/__stories__/Tour.stories.js +13 -166
- package/esm/typography/__stories__/TextBody.stories.js +2 -0
- package/esm/typography/__stories__/TextCaption.stories.js +2 -0
- package/esm/typography/__stories__/TextCore.stories.js +2 -0
- package/esm/typography/__stories__/TextDisplay1.stories.js +2 -0
- package/esm/typography/__stories__/TextDisplay2.stories.js +2 -0
- package/esm/typography/__stories__/TextDisplay3.stories.js +2 -0
- package/esm/typography/__stories__/TextHeadline.stories.js +2 -0
- package/esm/typography/__stories__/TextLabel1.stories.js +2 -0
- package/esm/typography/__stories__/TextLabel2.stories.js +2 -0
- package/esm/typography/__stories__/TextLegal.stories.js +2 -0
- package/esm/typography/__stories__/TextTitle1.stories.js +2 -0
- package/esm/typography/__stories__/TextTitle2.stories.js +2 -0
- package/esm/typography/__stories__/TextTitle3.stories.js +2 -0
- package/esm/typography/__stories__/TextTitle4.stories.js +2 -0
- package/package.json +2 -2
- package/esm/icons/__stories__/Icon.stories.js +0 -98
- package/esm/illustrations/__stories__/getIllustrationSheet.js +0 -164
- /package/esm/alpha/select/__stories__/{Select.stories.js → AlphaSelect.stories.js} +0 -0
- /package/esm/alpha/tabbed-chips/__stories__/{TabbedChips.stories.js → AlphaTabbedChips.stories.js} +0 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NoopFn as noopFn } from '@coinbase/cds-common/utils/mockUtils';
|
|
3
|
+
import { Button } from '../../buttons';
|
|
4
|
+
import { Example, ExampleScreen } from '../../examples/ExampleScreen';
|
|
5
|
+
import { VStack } from '../../layout';
|
|
6
|
+
import { Link } from '../../typography/Link';
|
|
7
|
+
import { Text } from '../../typography/Text';
|
|
8
|
+
import { Banner } from '../Banner';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const primaryAction = /*#__PURE__*/_jsx(Link, {
|
|
11
|
+
to: "https://www.coinbase.com",
|
|
12
|
+
children: "Primary"
|
|
13
|
+
});
|
|
14
|
+
const secondaryAction = /*#__PURE__*/_jsx(Link, {
|
|
15
|
+
to: "https://www.coinbase.com",
|
|
16
|
+
children: "Secondary"
|
|
17
|
+
});
|
|
18
|
+
const shortMessage = 'Lorem ipsum dolar sit amet, consecturo.';
|
|
19
|
+
const BannerActionsScreen = () => {
|
|
20
|
+
return /*#__PURE__*/_jsxs(ExampleScreen, {
|
|
21
|
+
children: [/*#__PURE__*/_jsx(Example, {
|
|
22
|
+
title: "Primary Actions",
|
|
23
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
24
|
+
gap: 2,
|
|
25
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
26
|
+
font: "headline",
|
|
27
|
+
children: "Link as Primary Action"
|
|
28
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
29
|
+
startIconActive: true,
|
|
30
|
+
closeAccessibilityLabel: "Close",
|
|
31
|
+
primaryAction: primaryAction,
|
|
32
|
+
startIcon: "info",
|
|
33
|
+
startIconAccessibilityLabel: "Information",
|
|
34
|
+
title: "Info with link action",
|
|
35
|
+
variant: "informational",
|
|
36
|
+
children: shortMessage
|
|
37
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
38
|
+
font: "headline",
|
|
39
|
+
children: "Button as Primary Action"
|
|
40
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
41
|
+
startIconActive: true,
|
|
42
|
+
closeAccessibilityLabel: "Close",
|
|
43
|
+
primaryAction: /*#__PURE__*/_jsx(Button, {
|
|
44
|
+
compact: true,
|
|
45
|
+
children: "Get Started"
|
|
46
|
+
}),
|
|
47
|
+
startIcon: "info",
|
|
48
|
+
startIconAccessibilityLabel: "Information",
|
|
49
|
+
title: "Promo with button action",
|
|
50
|
+
variant: "promotional",
|
|
51
|
+
children: shortMessage
|
|
52
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
53
|
+
font: "headline",
|
|
54
|
+
children: "Custom Button Variants"
|
|
55
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
56
|
+
startIconActive: true,
|
|
57
|
+
closeAccessibilityLabel: "Close",
|
|
58
|
+
primaryAction: /*#__PURE__*/_jsx(Button, {
|
|
59
|
+
compact: true,
|
|
60
|
+
variant: "negative",
|
|
61
|
+
children: "Fix Now"
|
|
62
|
+
}),
|
|
63
|
+
startIcon: "error",
|
|
64
|
+
startIconAccessibilityLabel: "Error",
|
|
65
|
+
title: "Error with action",
|
|
66
|
+
variant: "error",
|
|
67
|
+
children: "Critical issue requires immediate action"
|
|
68
|
+
})]
|
|
69
|
+
})
|
|
70
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
71
|
+
title: "Multiple Actions",
|
|
72
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
73
|
+
gap: 2,
|
|
74
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
75
|
+
font: "headline",
|
|
76
|
+
children: "Primary and Secondary Links"
|
|
77
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
78
|
+
startIconActive: true,
|
|
79
|
+
closeAccessibilityLabel: "Close",
|
|
80
|
+
primaryAction: primaryAction,
|
|
81
|
+
secondaryAction: secondaryAction,
|
|
82
|
+
startIcon: "warning",
|
|
83
|
+
startIconAccessibilityLabel: "Warning",
|
|
84
|
+
title: "Warning with two actions",
|
|
85
|
+
variant: "warning",
|
|
86
|
+
children: shortMessage
|
|
87
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
88
|
+
font: "headline",
|
|
89
|
+
children: "Mixed Action Types"
|
|
90
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
91
|
+
startIconActive: true,
|
|
92
|
+
closeAccessibilityLabel: "Close",
|
|
93
|
+
primaryAction: /*#__PURE__*/_jsx(Button, {
|
|
94
|
+
compact: true,
|
|
95
|
+
variant: "positive",
|
|
96
|
+
children: "Claim Offer"
|
|
97
|
+
}),
|
|
98
|
+
secondaryAction: /*#__PURE__*/_jsx(Link, {
|
|
99
|
+
to: "https://www.coinbase.com",
|
|
100
|
+
children: "Learn More"
|
|
101
|
+
}),
|
|
102
|
+
startIcon: "info",
|
|
103
|
+
startIconAccessibilityLabel: "Information",
|
|
104
|
+
title: "Special offer",
|
|
105
|
+
variant: "promotional",
|
|
106
|
+
children: "Limited time promotion available"
|
|
107
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
108
|
+
font: "headline",
|
|
109
|
+
children: "Button Actions Only"
|
|
110
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
111
|
+
startIconActive: true,
|
|
112
|
+
closeAccessibilityLabel: "Close",
|
|
113
|
+
primaryAction: /*#__PURE__*/_jsx(Button, {
|
|
114
|
+
compact: true,
|
|
115
|
+
children: "Accept"
|
|
116
|
+
}),
|
|
117
|
+
secondaryAction: /*#__PURE__*/_jsx(Button, {
|
|
118
|
+
compact: true,
|
|
119
|
+
variant: "secondary",
|
|
120
|
+
children: "Decline"
|
|
121
|
+
}),
|
|
122
|
+
startIcon: "info",
|
|
123
|
+
startIconAccessibilityLabel: "Information",
|
|
124
|
+
title: "Choose your action",
|
|
125
|
+
variant: "informational",
|
|
126
|
+
children: "Make your selection below"
|
|
127
|
+
})]
|
|
128
|
+
})
|
|
129
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
130
|
+
title: "Actions with Dismiss",
|
|
131
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
132
|
+
gap: 2,
|
|
133
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
134
|
+
font: "headline",
|
|
135
|
+
children: "Single Action with Dismiss"
|
|
136
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
137
|
+
showDismiss: true,
|
|
138
|
+
startIconActive: true,
|
|
139
|
+
closeAccessibilityLabel: "Close",
|
|
140
|
+
onClose: noopFn,
|
|
141
|
+
primaryAction: /*#__PURE__*/_jsx(Link, {
|
|
142
|
+
to: "https://www.coinbase.com",
|
|
143
|
+
children: "Try Now"
|
|
144
|
+
}),
|
|
145
|
+
startIcon: "info",
|
|
146
|
+
startIconAccessibilityLabel: "Information",
|
|
147
|
+
title: "New feature available",
|
|
148
|
+
variant: "promotional",
|
|
149
|
+
children: "Explore our latest features"
|
|
150
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
151
|
+
font: "headline",
|
|
152
|
+
children: "Multiple Actions with Dismiss"
|
|
153
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
154
|
+
showDismiss: true,
|
|
155
|
+
startIconActive: true,
|
|
156
|
+
closeAccessibilityLabel: "Close",
|
|
157
|
+
onClose: noopFn,
|
|
158
|
+
primaryAction: primaryAction,
|
|
159
|
+
secondaryAction: secondaryAction,
|
|
160
|
+
startIcon: "warning",
|
|
161
|
+
startIconAccessibilityLabel: "Warning",
|
|
162
|
+
title: "Action required",
|
|
163
|
+
variant: "warning",
|
|
164
|
+
children: "Complete your profile to continue"
|
|
165
|
+
})]
|
|
166
|
+
})
|
|
167
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
168
|
+
title: "Inline Links",
|
|
169
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
170
|
+
gap: 2,
|
|
171
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
172
|
+
font: "headline",
|
|
173
|
+
children: "Link in Content"
|
|
174
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
175
|
+
startIconActive: true,
|
|
176
|
+
closeAccessibilityLabel: "Close",
|
|
177
|
+
startIcon: "info",
|
|
178
|
+
startIconAccessibilityLabel: "Information",
|
|
179
|
+
title: "Learn more about our services",
|
|
180
|
+
variant: "informational",
|
|
181
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
182
|
+
font: "label2",
|
|
183
|
+
children: ["Discover new features and updates.", ' ', /*#__PURE__*/_jsx(Link, {
|
|
184
|
+
to: "https://www.coinbase.com",
|
|
185
|
+
children: "Read more"
|
|
186
|
+
}), " about the latest improvements."]
|
|
187
|
+
})
|
|
188
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
189
|
+
font: "headline",
|
|
190
|
+
children: "Multiple Links in Content"
|
|
191
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
192
|
+
startIconActive: true,
|
|
193
|
+
closeAccessibilityLabel: "Close",
|
|
194
|
+
startIcon: "info",
|
|
195
|
+
startIconAccessibilityLabel: "Information",
|
|
196
|
+
title: "Resources available",
|
|
197
|
+
variant: "promotional",
|
|
198
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
199
|
+
font: "label2",
|
|
200
|
+
children: ["Check our ", /*#__PURE__*/_jsx(Link, {
|
|
201
|
+
to: "https://www.coinbase.com",
|
|
202
|
+
children: "documentation"
|
|
203
|
+
}), " or visit the", ' ', /*#__PURE__*/_jsx(Link, {
|
|
204
|
+
to: "https://www.coinbase.com",
|
|
205
|
+
children: "help center"
|
|
206
|
+
}), " for assistance."]
|
|
207
|
+
})
|
|
208
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
209
|
+
font: "headline",
|
|
210
|
+
children: "Link with Actions"
|
|
211
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
212
|
+
startIconActive: true,
|
|
213
|
+
closeAccessibilityLabel: "Close",
|
|
214
|
+
primaryAction: /*#__PURE__*/_jsx(Button, {
|
|
215
|
+
compact: true,
|
|
216
|
+
variant: "negative",
|
|
217
|
+
children: "Get Updates"
|
|
218
|
+
}),
|
|
219
|
+
startIcon: "error",
|
|
220
|
+
startIconAccessibilityLabel: "Error",
|
|
221
|
+
styleVariant: "global",
|
|
222
|
+
title: "Service disruption",
|
|
223
|
+
variant: "error",
|
|
224
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
225
|
+
font: "label2",
|
|
226
|
+
children: ["Some services are currently unavailable.", ' ', /*#__PURE__*/_jsx(Link, {
|
|
227
|
+
to: "https://www.coinbase.com",
|
|
228
|
+
children: "View status page"
|
|
229
|
+
}), " for details."]
|
|
230
|
+
})
|
|
231
|
+
})]
|
|
232
|
+
})
|
|
233
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
234
|
+
title: "Style Variants with Actions",
|
|
235
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
236
|
+
gap: 2,
|
|
237
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
238
|
+
font: "headline",
|
|
239
|
+
children: "Inline with Actions"
|
|
240
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
241
|
+
startIconActive: true,
|
|
242
|
+
closeAccessibilityLabel: "Close",
|
|
243
|
+
primaryAction: primaryAction,
|
|
244
|
+
startIcon: "warning",
|
|
245
|
+
startIconAccessibilityLabel: "Warning",
|
|
246
|
+
styleVariant: "inline",
|
|
247
|
+
title: "Inline warning",
|
|
248
|
+
variant: "warning",
|
|
249
|
+
children: "Compact inline style with action"
|
|
250
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
251
|
+
font: "headline",
|
|
252
|
+
children: "Global with Actions"
|
|
253
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
254
|
+
startIconActive: true,
|
|
255
|
+
closeAccessibilityLabel: "Close",
|
|
256
|
+
label: "Critical",
|
|
257
|
+
primaryAction: /*#__PURE__*/_jsx(Link, {
|
|
258
|
+
to: "https://www.coinbase.com",
|
|
259
|
+
children: "View Details"
|
|
260
|
+
}),
|
|
261
|
+
secondaryAction: /*#__PURE__*/_jsx(Link, {
|
|
262
|
+
to: "https://www.coinbase.com",
|
|
263
|
+
children: "Contact Support"
|
|
264
|
+
}),
|
|
265
|
+
startIcon: "error",
|
|
266
|
+
startIconAccessibilityLabel: "Error",
|
|
267
|
+
styleVariant: "global",
|
|
268
|
+
title: "System alert",
|
|
269
|
+
variant: "error",
|
|
270
|
+
children: "System-wide message with multiple actions"
|
|
271
|
+
})]
|
|
272
|
+
})
|
|
273
|
+
})]
|
|
274
|
+
});
|
|
275
|
+
};
|
|
276
|
+
export default BannerActionsScreen;
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NoopFn as noopFn } from '@coinbase/cds-common/utils/mockUtils';
|
|
3
|
+
import { Example, ExampleScreen } from '../../examples/ExampleScreen';
|
|
4
|
+
import { Spacer, VStack } from '../../layout';
|
|
5
|
+
import { Link } from '../../typography/Link';
|
|
6
|
+
import { Text } from '../../typography/Text';
|
|
7
|
+
import { Banner } from '../Banner';
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const shortMessage = 'Lorem ipsum dolar sit amet';
|
|
10
|
+
const borderRadiusValues = [0, 200, 400];
|
|
11
|
+
const BannerLayoutScreen = () => {
|
|
12
|
+
return /*#__PURE__*/_jsxs(ExampleScreen, {
|
|
13
|
+
children: [/*#__PURE__*/_jsx(Example, {
|
|
14
|
+
title: "Custom Margins",
|
|
15
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
16
|
+
gap: 2,
|
|
17
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
18
|
+
font: "headline",
|
|
19
|
+
children: "Negative Margin Offset"
|
|
20
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
21
|
+
startIconActive: true,
|
|
22
|
+
closeAccessibilityLabel: "Close",
|
|
23
|
+
marginX: -2,
|
|
24
|
+
startIcon: "info",
|
|
25
|
+
startIconAccessibilityLabel: "Information",
|
|
26
|
+
title: "Custom offset banner",
|
|
27
|
+
variant: "informational",
|
|
28
|
+
children: shortMessage
|
|
29
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
30
|
+
font: "headline",
|
|
31
|
+
children: "Custom Margins - Inline"
|
|
32
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
33
|
+
startIconActive: true,
|
|
34
|
+
closeAccessibilityLabel: "Close",
|
|
35
|
+
marginX: -2,
|
|
36
|
+
startIcon: "info",
|
|
37
|
+
startIconAccessibilityLabel: "Information",
|
|
38
|
+
styleVariant: "inline",
|
|
39
|
+
title: "Inline with offset",
|
|
40
|
+
variant: "promotional",
|
|
41
|
+
children: shortMessage
|
|
42
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
43
|
+
font: "headline",
|
|
44
|
+
children: "Custom Margins - Global"
|
|
45
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
46
|
+
startIconActive: true,
|
|
47
|
+
closeAccessibilityLabel: "Close",
|
|
48
|
+
marginX: -2,
|
|
49
|
+
startIcon: "warning",
|
|
50
|
+
startIconAccessibilityLabel: "Warning",
|
|
51
|
+
styleVariant: "global",
|
|
52
|
+
title: "Global with offset",
|
|
53
|
+
variant: "warning",
|
|
54
|
+
children: shortMessage
|
|
55
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
56
|
+
font: "headline",
|
|
57
|
+
children: "With Dismiss and Offset"
|
|
58
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
59
|
+
showDismiss: true,
|
|
60
|
+
startIconActive: true,
|
|
61
|
+
closeAccessibilityLabel: "Close",
|
|
62
|
+
marginX: -2,
|
|
63
|
+
onClose: noopFn,
|
|
64
|
+
startIcon: "error",
|
|
65
|
+
startIconAccessibilityLabel: "Error",
|
|
66
|
+
title: "Error with custom margin",
|
|
67
|
+
variant: "error",
|
|
68
|
+
children: shortMessage
|
|
69
|
+
})]
|
|
70
|
+
})
|
|
71
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
72
|
+
title: "Vertical Alignment",
|
|
73
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
74
|
+
gap: 2,
|
|
75
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
76
|
+
font: "headline",
|
|
77
|
+
children: "Center Aligned Content"
|
|
78
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
79
|
+
startIconActive: true,
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
closeAccessibilityLabel: "Close",
|
|
82
|
+
startIcon: "info",
|
|
83
|
+
startIconAccessibilityLabel: "Information",
|
|
84
|
+
variant: "informational",
|
|
85
|
+
children: "Center aligned content without title"
|
|
86
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
87
|
+
startIconActive: true,
|
|
88
|
+
alignItems: "center",
|
|
89
|
+
closeAccessibilityLabel: "Close",
|
|
90
|
+
startIcon: "info",
|
|
91
|
+
startIconAccessibilityLabel: "Information",
|
|
92
|
+
title: "Center aligned with title",
|
|
93
|
+
variant: "promotional",
|
|
94
|
+
children: shortMessage
|
|
95
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
96
|
+
font: "headline",
|
|
97
|
+
children: "Center Aligned with Dismiss"
|
|
98
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
99
|
+
showDismiss: true,
|
|
100
|
+
startIconActive: true,
|
|
101
|
+
alignItems: "center",
|
|
102
|
+
closeAccessibilityLabel: "Close",
|
|
103
|
+
onClose: noopFn,
|
|
104
|
+
startIcon: "warning",
|
|
105
|
+
startIconAccessibilityLabel: "Warning",
|
|
106
|
+
title: "Centered dismissible banner",
|
|
107
|
+
variant: "warning",
|
|
108
|
+
children: "Content is vertically centered"
|
|
109
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
110
|
+
font: "headline",
|
|
111
|
+
children: "Center Aligned with Actions"
|
|
112
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
113
|
+
startIconActive: true,
|
|
114
|
+
alignItems: "center",
|
|
115
|
+
closeAccessibilityLabel: "Close",
|
|
116
|
+
primaryAction: /*#__PURE__*/_jsx(Link, {
|
|
117
|
+
to: "https://www.coinbase.com",
|
|
118
|
+
children: "Action"
|
|
119
|
+
}),
|
|
120
|
+
startIcon: "error",
|
|
121
|
+
startIconAccessibilityLabel: "Error",
|
|
122
|
+
variant: "error",
|
|
123
|
+
children: "Centered content with action button"
|
|
124
|
+
})]
|
|
125
|
+
})
|
|
126
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
127
|
+
title: "Border Radius",
|
|
128
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
129
|
+
gap: 2,
|
|
130
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
131
|
+
font: "headline",
|
|
132
|
+
children: "Contextual Style"
|
|
133
|
+
}), /*#__PURE__*/_jsx(VStack, {
|
|
134
|
+
gap: 1,
|
|
135
|
+
children: borderRadiusValues.map(radius => /*#__PURE__*/_jsx(Banner, {
|
|
136
|
+
startIconActive: true,
|
|
137
|
+
borderRadius: radius,
|
|
138
|
+
closeAccessibilityLabel: "Close",
|
|
139
|
+
startIcon: "info",
|
|
140
|
+
startIconAccessibilityLabel: "Information",
|
|
141
|
+
title: "Border radius: " + radius,
|
|
142
|
+
variant: "informational",
|
|
143
|
+
children: shortMessage
|
|
144
|
+
}, "contextual-" + radius))
|
|
145
|
+
}), /*#__PURE__*/_jsx(Spacer, {}), /*#__PURE__*/_jsx(Text, {
|
|
146
|
+
font: "headline",
|
|
147
|
+
children: "Inline Style"
|
|
148
|
+
}), /*#__PURE__*/_jsx(VStack, {
|
|
149
|
+
gap: 1,
|
|
150
|
+
children: borderRadiusValues.map(radius => /*#__PURE__*/_jsx(Banner, {
|
|
151
|
+
startIconActive: true,
|
|
152
|
+
borderRadius: radius,
|
|
153
|
+
closeAccessibilityLabel: "Close",
|
|
154
|
+
startIcon: "warning",
|
|
155
|
+
startIconAccessibilityLabel: "Warning",
|
|
156
|
+
styleVariant: "inline",
|
|
157
|
+
title: "Border radius: " + radius,
|
|
158
|
+
variant: "warning",
|
|
159
|
+
children: shortMessage
|
|
160
|
+
}, "inline-" + radius))
|
|
161
|
+
}), /*#__PURE__*/_jsx(Spacer, {}), /*#__PURE__*/_jsx(Text, {
|
|
162
|
+
font: "headline",
|
|
163
|
+
children: "With Dismiss"
|
|
164
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
165
|
+
showDismiss: true,
|
|
166
|
+
startIconActive: true,
|
|
167
|
+
borderRadius: 100,
|
|
168
|
+
closeAccessibilityLabel: "Close",
|
|
169
|
+
onClose: noopFn,
|
|
170
|
+
startIcon: "info",
|
|
171
|
+
startIconAccessibilityLabel: "Information",
|
|
172
|
+
title: "Custom border radius",
|
|
173
|
+
variant: "promotional",
|
|
174
|
+
children: "Banner with 100px border radius and dismiss button"
|
|
175
|
+
})]
|
|
176
|
+
})
|
|
177
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
178
|
+
title: "Labels",
|
|
179
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
180
|
+
gap: 2,
|
|
181
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
182
|
+
font: "headline",
|
|
183
|
+
children: "With Timestamp"
|
|
184
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
185
|
+
startIconActive: true,
|
|
186
|
+
closeAccessibilityLabel: "Close",
|
|
187
|
+
label: "Last updated today at 3:33pm",
|
|
188
|
+
startIcon: "info",
|
|
189
|
+
startIconAccessibilityLabel: "Information",
|
|
190
|
+
title: "Update notification",
|
|
191
|
+
variant: "informational",
|
|
192
|
+
children: "System update completed successfully"
|
|
193
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
194
|
+
font: "headline",
|
|
195
|
+
children: "With Status Label"
|
|
196
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
197
|
+
startIconActive: true,
|
|
198
|
+
closeAccessibilityLabel: "Close",
|
|
199
|
+
label: "Expires in 2 days",
|
|
200
|
+
startIcon: "info",
|
|
201
|
+
startIconAccessibilityLabel: "Information",
|
|
202
|
+
title: "Limited time offer",
|
|
203
|
+
variant: "promotional",
|
|
204
|
+
children: "Special promotion for selected users"
|
|
205
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
206
|
+
font: "headline",
|
|
207
|
+
children: "Global with Label"
|
|
208
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
209
|
+
startIconActive: true,
|
|
210
|
+
closeAccessibilityLabel: "Close",
|
|
211
|
+
label: "Scheduled: Tonight 2-4 AM",
|
|
212
|
+
startIcon: "error",
|
|
213
|
+
startIconAccessibilityLabel: "Error",
|
|
214
|
+
styleVariant: "global",
|
|
215
|
+
title: "System maintenance",
|
|
216
|
+
variant: "error",
|
|
217
|
+
children: "Services will be temporarily unavailable"
|
|
218
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
219
|
+
font: "headline",
|
|
220
|
+
children: "Label with Actions"
|
|
221
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
222
|
+
startIconActive: true,
|
|
223
|
+
closeAccessibilityLabel: "Close",
|
|
224
|
+
label: "Deadline: December 31",
|
|
225
|
+
primaryAction: /*#__PURE__*/_jsx(Link, {
|
|
226
|
+
to: "https://www.coinbase.com",
|
|
227
|
+
children: "Complete Now"
|
|
228
|
+
}),
|
|
229
|
+
startIcon: "warning",
|
|
230
|
+
startIconAccessibilityLabel: "Warning",
|
|
231
|
+
title: "Action required",
|
|
232
|
+
variant: "warning",
|
|
233
|
+
children: "Please complete your verification"
|
|
234
|
+
})]
|
|
235
|
+
})
|
|
236
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
237
|
+
title: "Complex Layouts",
|
|
238
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
239
|
+
gap: 2,
|
|
240
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
241
|
+
font: "headline",
|
|
242
|
+
children: "All Features Combined"
|
|
243
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
244
|
+
showDismiss: true,
|
|
245
|
+
startIconActive: true,
|
|
246
|
+
alignItems: "center",
|
|
247
|
+
borderRadius: 200,
|
|
248
|
+
closeAccessibilityLabel: "Close",
|
|
249
|
+
label: "Priority: High",
|
|
250
|
+
marginX: -2,
|
|
251
|
+
onClose: noopFn,
|
|
252
|
+
primaryAction: /*#__PURE__*/_jsx(Link, {
|
|
253
|
+
to: "https://www.coinbase.com",
|
|
254
|
+
children: "View Details"
|
|
255
|
+
}),
|
|
256
|
+
secondaryAction: /*#__PURE__*/_jsx(Link, {
|
|
257
|
+
to: "https://www.coinbase.com",
|
|
258
|
+
children: "Contact Support"
|
|
259
|
+
}),
|
|
260
|
+
startIcon: "error",
|
|
261
|
+
startIconAccessibilityLabel: "Error",
|
|
262
|
+
styleVariant: "global",
|
|
263
|
+
title: "Critical system alert",
|
|
264
|
+
variant: "error",
|
|
265
|
+
children: /*#__PURE__*/_jsxs(Text, {
|
|
266
|
+
font: "label2",
|
|
267
|
+
children: ["System issues detected. ", /*#__PURE__*/_jsx(Link, {
|
|
268
|
+
to: "https://www.coinbase.com",
|
|
269
|
+
children: "Learn more"
|
|
270
|
+
}), " about the current status."]
|
|
271
|
+
})
|
|
272
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
273
|
+
font: "headline",
|
|
274
|
+
children: "Inline Complex"
|
|
275
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
276
|
+
startIconActive: true,
|
|
277
|
+
borderRadius: 100,
|
|
278
|
+
closeAccessibilityLabel: "Close",
|
|
279
|
+
label: "Beta",
|
|
280
|
+
primaryAction: /*#__PURE__*/_jsx(Link, {
|
|
281
|
+
to: "https://www.coinbase.com",
|
|
282
|
+
children: "Try It"
|
|
283
|
+
}),
|
|
284
|
+
startIcon: "info",
|
|
285
|
+
startIconAccessibilityLabel: "Information",
|
|
286
|
+
styleVariant: "inline",
|
|
287
|
+
title: "New feature",
|
|
288
|
+
variant: "promotional",
|
|
289
|
+
children: "Experience our latest features before general release"
|
|
290
|
+
})]
|
|
291
|
+
})
|
|
292
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
293
|
+
title: "Without Title",
|
|
294
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
295
|
+
gap: 2,
|
|
296
|
+
children: [/*#__PURE__*/_jsx(Banner, {
|
|
297
|
+
startIconActive: true,
|
|
298
|
+
closeAccessibilityLabel: "Close",
|
|
299
|
+
startIcon: "info",
|
|
300
|
+
startIconAccessibilityLabel: "Information",
|
|
301
|
+
variant: "informational",
|
|
302
|
+
children: "Simple message without a title"
|
|
303
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
304
|
+
showDismiss: true,
|
|
305
|
+
startIconActive: true,
|
|
306
|
+
closeAccessibilityLabel: "Close",
|
|
307
|
+
onClose: noopFn,
|
|
308
|
+
startIcon: "warning",
|
|
309
|
+
startIconAccessibilityLabel: "Warning",
|
|
310
|
+
styleVariant: "inline",
|
|
311
|
+
variant: "warning",
|
|
312
|
+
children: "Inline warning without title but with dismiss"
|
|
313
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
314
|
+
startIconActive: true,
|
|
315
|
+
closeAccessibilityLabel: "Close",
|
|
316
|
+
primaryAction: /*#__PURE__*/_jsx(Link, {
|
|
317
|
+
to: "https://www.coinbase.com",
|
|
318
|
+
children: "Learn More"
|
|
319
|
+
}),
|
|
320
|
+
startIcon: "info",
|
|
321
|
+
startIconAccessibilityLabel: "Information",
|
|
322
|
+
variant: "promotional",
|
|
323
|
+
children: "No title but includes an action"
|
|
324
|
+
})]
|
|
325
|
+
})
|
|
326
|
+
})]
|
|
327
|
+
});
|
|
328
|
+
};
|
|
329
|
+
export default BannerLayoutScreen;
|
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
|
}
|