@coinbase/cds-mobile 8.25.0 → 8.26.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 +19 -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/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/__stories__/ListCell.stories.js +1 -17
- 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
|
@@ -1,354 +1,193 @@
|
|
|
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
1
|
import React from 'react';
|
|
3
2
|
import { loremIpsum } from '@coinbase/cds-common/internal/data/loremIpsum';
|
|
4
3
|
import { NoopFn as noopFn } from '@coinbase/cds-common/utils/mockUtils';
|
|
5
|
-
import { Button } from '../../buttons';
|
|
6
4
|
import { Example, ExampleScreen } from '../../examples/ExampleScreen';
|
|
7
|
-
import {
|
|
8
|
-
import { Link } from '../../typography/Link';
|
|
5
|
+
import { VStack } from '../../layout';
|
|
9
6
|
import { Text } from '../../typography/Text';
|
|
10
7
|
import { Banner } from '../Banner';
|
|
11
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
const primaryAction = /*#__PURE__*/_jsx(Link, {
|
|
13
|
-
to: "https://www.coinbase.com",
|
|
14
|
-
children: "Primary"
|
|
15
|
-
});
|
|
16
|
-
const secondaryAction = /*#__PURE__*/_jsx(Link, {
|
|
17
|
-
to: "https://www.coinbase.com",
|
|
18
|
-
children: "Secondary"
|
|
19
|
-
});
|
|
20
9
|
const shortMessage = 'Lorem ipsum dolar sit amet, consecturo.';
|
|
21
|
-
const longMessage =
|
|
10
|
+
const longMessage = loremIpsum.slice(0, 200) + "...";
|
|
22
11
|
const label = 'Last updated today at 3:33pm';
|
|
23
|
-
const exampleProps = {
|
|
24
|
-
title: 'Failure Message',
|
|
25
|
-
startIcon: 'error',
|
|
26
|
-
startIconActive: true,
|
|
27
|
-
startIconAccessibilityLabel: 'Error',
|
|
28
|
-
closeAccessibilityLabel: 'Close'
|
|
29
|
-
};
|
|
30
|
-
const examplePropsWithOffset = _extends({}, exampleProps, {
|
|
31
|
-
marginX: -2,
|
|
32
|
-
children: 'Lorem ipsum dolar sit amet'
|
|
33
|
-
});
|
|
34
|
-
const borderRadiusValues = [0, 200, 400];
|
|
35
|
-
const styleProps = [{
|
|
36
|
-
variant: 'warning',
|
|
37
|
-
title: 'Warning message',
|
|
38
|
-
startIcon: 'warning',
|
|
39
|
-
startIconActive: true,
|
|
40
|
-
children: shortMessage,
|
|
41
|
-
startIconAccessibilityLabel: 'Warning',
|
|
42
|
-
closeAccessibilityLabel: 'Close'
|
|
43
|
-
}, {
|
|
44
|
-
variant: 'informational',
|
|
45
|
-
title: 'Informative message',
|
|
46
|
-
startIcon: 'info',
|
|
47
|
-
startIconActive: true,
|
|
48
|
-
children: shortMessage,
|
|
49
|
-
startIconAccessibilityLabel: 'Information',
|
|
50
|
-
closeAccessibilityLabel: 'Close'
|
|
51
|
-
}, {
|
|
52
|
-
variant: 'promotional',
|
|
53
|
-
title: 'Promotional message',
|
|
54
|
-
startIcon: 'info',
|
|
55
|
-
startIconActive: true,
|
|
56
|
-
children: shortMessage,
|
|
57
|
-
startIconAccessibilityLabel: 'Information',
|
|
58
|
-
closeAccessibilityLabel: 'Close'
|
|
59
|
-
}, {
|
|
60
|
-
variant: 'error',
|
|
61
|
-
title: 'Error message',
|
|
62
|
-
startIcon: 'error',
|
|
63
|
-
startIconActive: true,
|
|
64
|
-
children: shortMessage,
|
|
65
|
-
startIconAccessibilityLabel: 'Error',
|
|
66
|
-
closeAccessibilityLabel: 'Close'
|
|
67
|
-
}];
|
|
68
|
-
const Banners = _ref => {
|
|
69
|
-
let {
|
|
70
|
-
title,
|
|
71
|
-
props
|
|
72
|
-
} = _ref;
|
|
73
|
-
return /*#__PURE__*/_jsxs(VStack, {
|
|
74
|
-
gap: 2,
|
|
75
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
76
|
-
font: "title1",
|
|
77
|
-
children: title
|
|
78
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, props)), /*#__PURE__*/_jsxs(Text, {
|
|
79
|
-
font: "title1",
|
|
80
|
-
children: [title, " with showDismiss"]
|
|
81
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, props, {
|
|
82
|
-
showDismiss: true,
|
|
83
|
-
onClose: noopFn,
|
|
84
|
-
title: title + " with showDismiss"
|
|
85
|
-
})), /*#__PURE__*/_jsxs(Text, {
|
|
86
|
-
font: "title1",
|
|
87
|
-
children: [title, " with Action"]
|
|
88
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, props, {
|
|
89
|
-
primaryAction: primaryAction
|
|
90
|
-
})), /*#__PURE__*/_jsxs(Text, {
|
|
91
|
-
font: "title1",
|
|
92
|
-
children: [title, " with multiple Actions"]
|
|
93
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, props, {
|
|
94
|
-
primaryAction: primaryAction,
|
|
95
|
-
secondaryAction: secondaryAction
|
|
96
|
-
})), /*#__PURE__*/_jsx(Text, {
|
|
97
|
-
font: "title1",
|
|
98
|
-
children: "Primary Action is not a Link"
|
|
99
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, props, {
|
|
100
|
-
primaryAction: /*#__PURE__*/_jsx(Button, {
|
|
101
|
-
compact: true,
|
|
102
|
-
children: "Primary Action"
|
|
103
|
-
})
|
|
104
|
-
})), /*#__PURE__*/_jsx(Text, {
|
|
105
|
-
font: "title1",
|
|
106
|
-
children: "Secondary Action is not a Link"
|
|
107
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, props, {
|
|
108
|
-
secondaryAction: /*#__PURE__*/_jsx(Button, {
|
|
109
|
-
compact: true,
|
|
110
|
-
children: "Secondary Action"
|
|
111
|
-
})
|
|
112
|
-
})), /*#__PURE__*/_jsxs(Text, {
|
|
113
|
-
font: "title1",
|
|
114
|
-
children: [title, " Long Text with Action"]
|
|
115
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, props, {
|
|
116
|
-
primaryAction: primaryAction,
|
|
117
|
-
title: title + " Long Text with Action. " + longMessage,
|
|
118
|
-
children: longMessage
|
|
119
|
-
})), /*#__PURE__*/_jsxs(Text, {
|
|
120
|
-
font: "title1",
|
|
121
|
-
children: [title, " with Action and showDismiss"]
|
|
122
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, props, {
|
|
123
|
-
showDismiss: true,
|
|
124
|
-
onClose: noopFn,
|
|
125
|
-
primaryAction: primaryAction,
|
|
126
|
-
title: title + " with Action and showDismiss"
|
|
127
|
-
})), /*#__PURE__*/_jsxs(Text, {
|
|
128
|
-
font: "title1",
|
|
129
|
-
children: [title, " Long Text and showDismiss"]
|
|
130
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, props, {
|
|
131
|
-
showDismiss: true,
|
|
132
|
-
onClose: noopFn,
|
|
133
|
-
title: title + " Long Text and showDismiss. " + longMessage,
|
|
134
|
-
children: longMessage
|
|
135
|
-
})), /*#__PURE__*/_jsxs(Text, {
|
|
136
|
-
font: "title1",
|
|
137
|
-
children: [title, " Long Text with Action and showDismiss"]
|
|
138
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, props, {
|
|
139
|
-
showDismiss: true,
|
|
140
|
-
onClose: noopFn,
|
|
141
|
-
primaryAction: primaryAction,
|
|
142
|
-
secondaryAction: secondaryAction,
|
|
143
|
-
title: title + " Long Text with Action and showDismiss. " + longMessage,
|
|
144
|
-
children: longMessage
|
|
145
|
-
}))]
|
|
146
|
-
});
|
|
147
|
-
};
|
|
148
|
-
const All = () => {
|
|
149
|
-
return /*#__PURE__*/_jsx(VStack, {
|
|
150
|
-
gap: 2,
|
|
151
|
-
children: styleProps.map(props => {
|
|
152
|
-
return /*#__PURE__*/_jsxs(VStack, {
|
|
153
|
-
gap: 2,
|
|
154
|
-
children: [/*#__PURE__*/_jsx(Banners, {
|
|
155
|
-
props: props,
|
|
156
|
-
title: "Contextual " + props.variant
|
|
157
|
-
}), /*#__PURE__*/_jsx(Banners, {
|
|
158
|
-
props: _extends({}, props, {
|
|
159
|
-
styleVariant: 'inline'
|
|
160
|
-
}),
|
|
161
|
-
title: "Inline " + props.variant
|
|
162
|
-
}), /*#__PURE__*/_jsx(Banners, {
|
|
163
|
-
props: _extends({}, props, {
|
|
164
|
-
label,
|
|
165
|
-
styleVariant: 'global'
|
|
166
|
-
}),
|
|
167
|
-
title: "Global " + props.variant
|
|
168
|
-
})]
|
|
169
|
-
}, "styles-" + props.variant);
|
|
170
|
-
})
|
|
171
|
-
});
|
|
172
|
-
};
|
|
173
12
|
const BannerScreen = () => {
|
|
174
13
|
return /*#__PURE__*/_jsxs(ExampleScreen, {
|
|
175
14
|
children: [/*#__PURE__*/_jsx(Example, {
|
|
176
|
-
title: "
|
|
177
|
-
children: /*#__PURE__*/_jsx(All, {})
|
|
178
|
-
}), /*#__PURE__*/_jsx(Example, {
|
|
179
|
-
title: "With Link",
|
|
15
|
+
title: "Variants",
|
|
180
16
|
children: /*#__PURE__*/_jsxs(VStack, {
|
|
181
17
|
gap: 2,
|
|
182
|
-
children: [/*#__PURE__*/_jsx(
|
|
183
|
-
|
|
184
|
-
|
|
18
|
+
children: [/*#__PURE__*/_jsx(Banner, {
|
|
19
|
+
startIconActive: true,
|
|
20
|
+
closeAccessibilityLabel: "Close",
|
|
21
|
+
startIcon: "warning",
|
|
22
|
+
startIconAccessibilityLabel: "Warning",
|
|
23
|
+
title: "Warning message",
|
|
24
|
+
variant: "warning",
|
|
25
|
+
children: shortMessage
|
|
26
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
27
|
+
startIconActive: true,
|
|
28
|
+
closeAccessibilityLabel: "Close",
|
|
29
|
+
startIcon: "info",
|
|
30
|
+
startIconAccessibilityLabel: "Information",
|
|
31
|
+
title: "Informative message",
|
|
32
|
+
variant: "informational",
|
|
33
|
+
children: shortMessage
|
|
34
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
35
|
+
startIconActive: true,
|
|
36
|
+
closeAccessibilityLabel: "Close",
|
|
37
|
+
startIcon: "info",
|
|
38
|
+
startIconAccessibilityLabel: "Information",
|
|
39
|
+
title: "Promotional message",
|
|
40
|
+
variant: "promotional",
|
|
41
|
+
children: shortMessage
|
|
185
42
|
}), /*#__PURE__*/_jsx(Banner, {
|
|
186
|
-
showDismiss: true,
|
|
187
43
|
startIconActive: true,
|
|
188
44
|
closeAccessibilityLabel: "Close",
|
|
189
|
-
primaryAction: primaryAction,
|
|
190
|
-
secondaryAction: secondaryAction,
|
|
191
45
|
startIcon: "error",
|
|
192
46
|
startIconAccessibilityLabel: "Error",
|
|
193
|
-
|
|
194
|
-
title: "Global " + shortMessage,
|
|
47
|
+
title: "Error message",
|
|
195
48
|
variant: "error",
|
|
196
|
-
children:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
49
|
+
children: shortMessage
|
|
50
|
+
})]
|
|
51
|
+
})
|
|
52
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
53
|
+
title: "Style Variants",
|
|
54
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
55
|
+
gap: 2,
|
|
56
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
57
|
+
font: "headline",
|
|
58
|
+
children: "Contextual (default)"
|
|
59
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
60
|
+
startIconActive: true,
|
|
61
|
+
closeAccessibilityLabel: "Close",
|
|
62
|
+
startIcon: "info",
|
|
63
|
+
startIconAccessibilityLabel: "Information",
|
|
64
|
+
title: "Contextual banner",
|
|
65
|
+
variant: "informational",
|
|
66
|
+
children: "Used for messages within a specific context or section"
|
|
203
67
|
}), /*#__PURE__*/_jsx(Text, {
|
|
204
|
-
font: "
|
|
68
|
+
font: "headline",
|
|
205
69
|
children: "Inline"
|
|
206
70
|
}), /*#__PURE__*/_jsx(Banner, {
|
|
207
|
-
showDismiss: true,
|
|
208
71
|
startIconActive: true,
|
|
209
72
|
closeAccessibilityLabel: "Close",
|
|
210
|
-
primaryAction: primaryAction,
|
|
211
|
-
secondaryAction: secondaryAction,
|
|
212
73
|
startIcon: "warning",
|
|
213
74
|
startIconAccessibilityLabel: "Warning",
|
|
214
75
|
styleVariant: "inline",
|
|
215
|
-
title: "Inline "
|
|
76
|
+
title: "Inline banner",
|
|
216
77
|
variant: "warning",
|
|
217
|
-
children:
|
|
218
|
-
font: "label2",
|
|
219
|
-
to: "https://www.coinbase.com",
|
|
220
|
-
children: "Learn more"
|
|
221
|
-
})
|
|
78
|
+
children: "Used for inline messages with reduced visual emphasis"
|
|
222
79
|
}), /*#__PURE__*/_jsx(Text, {
|
|
223
|
-
font: "
|
|
224
|
-
children: "
|
|
80
|
+
font: "headline",
|
|
81
|
+
children: "Global"
|
|
225
82
|
}), /*#__PURE__*/_jsx(Banner, {
|
|
226
|
-
showDismiss: true,
|
|
227
83
|
startIconActive: true,
|
|
228
84
|
closeAccessibilityLabel: "Close",
|
|
229
85
|
label: label,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
variant: "
|
|
235
|
-
children:
|
|
236
|
-
font: "label2",
|
|
237
|
-
children: [shortMessage, /*#__PURE__*/_jsx(Link, {
|
|
238
|
-
to: "https://www.coinbase.com",
|
|
239
|
-
children: " Learn more"
|
|
240
|
-
})]
|
|
241
|
-
})
|
|
86
|
+
startIcon: "error",
|
|
87
|
+
startIconAccessibilityLabel: "Error",
|
|
88
|
+
styleVariant: "global",
|
|
89
|
+
title: "Global banner",
|
|
90
|
+
variant: "error",
|
|
91
|
+
children: "Used for system-wide notifications and alerts"
|
|
242
92
|
})]
|
|
243
93
|
})
|
|
244
94
|
}), /*#__PURE__*/_jsx(Example, {
|
|
245
|
-
title: "
|
|
95
|
+
title: "Dismissible",
|
|
246
96
|
children: /*#__PURE__*/_jsxs(VStack, {
|
|
247
97
|
gap: 2,
|
|
248
|
-
children: [/*#__PURE__*/_jsx(
|
|
249
|
-
font: "
|
|
250
|
-
children: "
|
|
251
|
-
}), /*#__PURE__*/_jsx(Banner,
|
|
252
|
-
showDismiss: true,
|
|
253
|
-
startIconAccessibilityLabel: "Information",
|
|
254
|
-
styleVariant: "global",
|
|
255
|
-
variant: "informational"
|
|
256
|
-
})), /*#__PURE__*/_jsx(Banner, _extends({}, examplePropsWithOffset, {
|
|
98
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
99
|
+
font: "headline",
|
|
100
|
+
children: "Warning with Dismiss"
|
|
101
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
257
102
|
showDismiss: true,
|
|
258
|
-
startIconAccessibilityLabel: "Information",
|
|
259
|
-
styleVariant: "global",
|
|
260
|
-
variant: "promotional"
|
|
261
|
-
})), /*#__PURE__*/_jsx(Banner, _extends({}, examplePropsWithOffset, {
|
|
262
103
|
startIconActive: true,
|
|
104
|
+
closeAccessibilityLabel: "Close",
|
|
105
|
+
onClose: noopFn,
|
|
263
106
|
startIcon: "warning",
|
|
264
107
|
startIconAccessibilityLabel: "Warning",
|
|
265
|
-
|
|
266
|
-
variant: "warning"
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
children: "Inline"
|
|
273
|
-
}), /*#__PURE__*/_jsx(Banner, _extends({}, examplePropsWithOffset, {
|
|
274
|
-
showDismiss: true,
|
|
275
|
-
startIconAccessibilityLabel: "Information",
|
|
276
|
-
styleVariant: "inline",
|
|
277
|
-
variant: "informational"
|
|
278
|
-
})), /*#__PURE__*/_jsx(Banner, _extends({}, examplePropsWithOffset, {
|
|
108
|
+
title: "Dismissible warning",
|
|
109
|
+
variant: "warning",
|
|
110
|
+
children: "This warning can be dismissed by the user"
|
|
111
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
112
|
+
font: "headline",
|
|
113
|
+
children: "Promotional with Dismiss"
|
|
114
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
279
115
|
showDismiss: true,
|
|
280
|
-
startIconAccessibilityLabel: "Information",
|
|
281
|
-
styleVariant: "inline",
|
|
282
|
-
variant: "promotional"
|
|
283
|
-
})), /*#__PURE__*/_jsx(Banner, _extends({}, examplePropsWithOffset, {
|
|
284
116
|
startIconActive: true,
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
})), /*#__PURE__*/_jsx(Banner, _extends({}, examplePropsWithOffset, {
|
|
117
|
+
closeAccessibilityLabel: "Close",
|
|
118
|
+
onClose: noopFn,
|
|
119
|
+
startIcon: "info",
|
|
120
|
+
startIconAccessibilityLabel: "Information",
|
|
290
121
|
styleVariant: "inline",
|
|
291
|
-
|
|
292
|
-
|
|
122
|
+
title: "Limited time offer",
|
|
123
|
+
variant: "promotional",
|
|
124
|
+
children: "Special promotion that can be dismissed"
|
|
125
|
+
})]
|
|
293
126
|
})
|
|
294
|
-
}), /*#__PURE__*/
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
children: "Vertical Align"
|
|
298
|
-
}), /*#__PURE__*/_jsxs(VStack, {
|
|
127
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
128
|
+
title: "Long Content",
|
|
129
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
299
130
|
gap: 2,
|
|
300
|
-
children: [/*#__PURE__*/_jsx(
|
|
301
|
-
|
|
131
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
132
|
+
font: "headline",
|
|
133
|
+
children: "Long Message"
|
|
134
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
135
|
+
startIconActive: true,
|
|
136
|
+
closeAccessibilityLabel: "Close",
|
|
137
|
+
startIcon: "info",
|
|
302
138
|
startIconAccessibilityLabel: "Information",
|
|
303
|
-
title:
|
|
139
|
+
title: "Information with extended content",
|
|
304
140
|
variant: "informational",
|
|
305
|
-
children:
|
|
306
|
-
})
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
variant: "error"
|
|
316
|
-
|
|
141
|
+
children: longMessage
|
|
142
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
143
|
+
font: "headline",
|
|
144
|
+
children: "Long Title"
|
|
145
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
146
|
+
startIconActive: true,
|
|
147
|
+
closeAccessibilityLabel: "Close",
|
|
148
|
+
startIcon: "error",
|
|
149
|
+
startIconAccessibilityLabel: "Error",
|
|
150
|
+
title: "Critical error detected: " + longMessage,
|
|
151
|
+
variant: "error",
|
|
152
|
+
children: shortMessage
|
|
153
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
154
|
+
font: "headline",
|
|
155
|
+
children: "Long Content with Dismiss"
|
|
156
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
317
157
|
showDismiss: true,
|
|
318
158
|
startIconActive: true,
|
|
319
|
-
|
|
159
|
+
closeAccessibilityLabel: "Close",
|
|
160
|
+
onClose: noopFn,
|
|
320
161
|
startIcon: "warning",
|
|
321
162
|
startIconAccessibilityLabel: "Warning",
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
163
|
+
title: "Detailed warning message",
|
|
164
|
+
variant: "warning",
|
|
165
|
+
children: longMessage
|
|
166
|
+
})]
|
|
167
|
+
})
|
|
325
168
|
}), /*#__PURE__*/_jsx(Example, {
|
|
326
|
-
title: "
|
|
169
|
+
title: "With Labels",
|
|
327
170
|
children: /*#__PURE__*/_jsxs(VStack, {
|
|
328
171
|
gap: 2,
|
|
329
|
-
children: [/*#__PURE__*/_jsx(
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
title: "Inline radius " + radius,
|
|
349
|
-
variant: "informational",
|
|
350
|
-
children: shortMessage
|
|
351
|
-
}), "mobile-inline-" + radius))
|
|
172
|
+
children: [/*#__PURE__*/_jsx(Banner, {
|
|
173
|
+
startIconActive: true,
|
|
174
|
+
closeAccessibilityLabel: "Close",
|
|
175
|
+
label: "Version 2.4.1 released",
|
|
176
|
+
startIcon: "info",
|
|
177
|
+
startIconAccessibilityLabel: "Information",
|
|
178
|
+
title: "Update available",
|
|
179
|
+
variant: "informational",
|
|
180
|
+
children: "A new version of the app is available with bug fixes and improvements"
|
|
181
|
+
}), /*#__PURE__*/_jsx(Banner, {
|
|
182
|
+
startIconActive: true,
|
|
183
|
+
closeAccessibilityLabel: "Close",
|
|
184
|
+
label: label,
|
|
185
|
+
startIcon: "error",
|
|
186
|
+
startIconAccessibilityLabel: "Error",
|
|
187
|
+
styleVariant: "global",
|
|
188
|
+
title: "System maintenance",
|
|
189
|
+
variant: "error",
|
|
190
|
+
children: "Services will be unavailable during the maintenance window"
|
|
352
191
|
})]
|
|
353
192
|
})
|
|
354
193
|
})]
|