@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.
Files changed (81) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dts/alpha/select/DefaultSelectControl.d.ts +2 -8
  3. package/dts/alpha/select/DefaultSelectControl.d.ts.map +1 -1
  4. package/dts/alpha/select/DefaultSelectDropdown.d.ts.map +1 -1
  5. package/dts/alpha/select/DefaultSelectOptionGroup.d.ts +8 -0
  6. package/dts/alpha/select/DefaultSelectOptionGroup.d.ts.map +1 -0
  7. package/dts/alpha/select/Select.d.ts +23 -366
  8. package/dts/alpha/select/Select.d.ts.map +1 -1
  9. package/dts/alpha/select/index.d.ts +2 -0
  10. package/dts/alpha/select/index.d.ts.map +1 -1
  11. package/dts/alpha/select/types.d.ts +486 -0
  12. package/dts/alpha/select/types.d.ts.map +1 -0
  13. package/dts/alpha/select-chip/SelectChip.d.ts +26 -0
  14. package/dts/alpha/select-chip/SelectChip.d.ts.map +1 -0
  15. package/dts/alpha/select-chip/SelectChipControl.d.ts +14 -0
  16. package/dts/alpha/select-chip/SelectChipControl.d.ts.map +1 -0
  17. package/dts/alpha/select-chip/index.d.ts +3 -0
  18. package/dts/alpha/select-chip/index.d.ts.map +1 -0
  19. package/dts/cells/CellAccessory.d.ts +1 -1
  20. package/dts/cells/CellAccessory.d.ts.map +1 -1
  21. package/dts/chips/Chip.d.ts.map +1 -1
  22. package/dts/chips/SelectChip.d.ts +8 -0
  23. package/dts/chips/SelectChip.d.ts.map +1 -1
  24. package/dts/examples/ExampleScreen.d.ts +26 -1
  25. package/dts/examples/ExampleScreen.d.ts.map +1 -1
  26. package/esm/alpha/select/DefaultSelectControl.js +46 -8
  27. package/esm/alpha/select/DefaultSelectDropdown.js +100 -31
  28. package/esm/alpha/select/DefaultSelectOption.js +1 -1
  29. package/esm/alpha/select/DefaultSelectOptionGroup.js +90 -0
  30. package/esm/alpha/select/Select.js +10 -26
  31. package/esm/alpha/select/index.js +3 -1
  32. package/esm/alpha/select/types.js +50 -0
  33. package/esm/alpha/select-chip/SelectChip.js +31 -0
  34. package/esm/alpha/select-chip/SelectChipControl.js +111 -0
  35. package/esm/alpha/select-chip/__stories__/SelectChip.stories.js +538 -0
  36. package/esm/alpha/select-chip/index.js +2 -0
  37. package/esm/banner/__stories__/Banner.stories.js +133 -294
  38. package/esm/banner/__stories__/BannerActions.stories.js +276 -0
  39. package/esm/banner/__stories__/BannerLayout.stories.js +329 -0
  40. package/esm/cells/Cell.js +1 -1
  41. package/esm/cells/CellAccessory.js +9 -0
  42. package/esm/cells/__stories__/ListCell.stories.js +81 -87
  43. package/esm/cells/__stories__/ListCellFallback.stories.js +1 -0
  44. package/esm/chips/Chip.js +4 -1
  45. package/esm/chips/SelectChip.js +9 -0
  46. package/esm/examples/ExampleScreen.js +79 -58
  47. package/esm/icons/__stories__/IconSheet.js +35 -13
  48. package/esm/illustrations/__stories__/HeroSquare.stories.js +70 -2
  49. package/esm/illustrations/__stories__/Pictogram.stories.js +70 -2
  50. package/esm/illustrations/__stories__/SpotIcon.stories.js +70 -2
  51. package/esm/illustrations/__stories__/SpotRectangle.stories.js +68 -2
  52. package/esm/illustrations/__stories__/SpotSquare.stories.js +68 -2
  53. package/esm/media/__stories__/CarouselMedia.stories.js +2 -5
  54. package/esm/numpad/__stories__/Numpad.stories.js +8 -5
  55. package/esm/page/__stories__/PageFooter.stories.js +5 -4
  56. package/esm/page/__stories__/PageFooterInPage.stories.js +20 -19
  57. package/esm/page/__stories__/PageHeader.stories.js +4 -4
  58. package/esm/page/__stories__/PageHeaderInErrorEmptyState.stories.js +6 -4
  59. package/esm/page/__stories__/PageHeaderInPage.stories.js +20 -18
  60. package/esm/section-header/__stories__/SectionHeader.stories.js +4 -4
  61. package/esm/sticky-footer/__stories__/StickyFooter.stories.js +6 -8
  62. package/esm/tour/__stories__/Tour.stories.js +13 -166
  63. package/esm/typography/__stories__/TextBody.stories.js +2 -0
  64. package/esm/typography/__stories__/TextCaption.stories.js +2 -0
  65. package/esm/typography/__stories__/TextCore.stories.js +2 -0
  66. package/esm/typography/__stories__/TextDisplay1.stories.js +2 -0
  67. package/esm/typography/__stories__/TextDisplay2.stories.js +2 -0
  68. package/esm/typography/__stories__/TextDisplay3.stories.js +2 -0
  69. package/esm/typography/__stories__/TextHeadline.stories.js +2 -0
  70. package/esm/typography/__stories__/TextLabel1.stories.js +2 -0
  71. package/esm/typography/__stories__/TextLabel2.stories.js +2 -0
  72. package/esm/typography/__stories__/TextLegal.stories.js +2 -0
  73. package/esm/typography/__stories__/TextTitle1.stories.js +2 -0
  74. package/esm/typography/__stories__/TextTitle2.stories.js +2 -0
  75. package/esm/typography/__stories__/TextTitle3.stories.js +2 -0
  76. package/esm/typography/__stories__/TextTitle4.stories.js +2 -0
  77. package/package.json +2 -2
  78. package/esm/icons/__stories__/Icon.stories.js +0 -98
  79. package/esm/illustrations/__stories__/getIllustrationSheet.js +0 -164
  80. /package/esm/alpha/select/__stories__/{Select.stories.js → AlphaSelect.stories.js} +0 -0
  81. /package/esm/alpha/tabbed-chips/__stories__/{TabbedChips.stories.js → AlphaTabbedChips.stories.js} +0 -0
@@ -1,2 +1,70 @@
1
- import { getIllustrationSheet } from './getIllustrationSheet';
2
- export default getIllustrationSheet('pictogram');
1
+ import React from 'react';
2
+ import { illustrationDimensions, illustrationSizes } from '@coinbase/cds-common/tokens/illustrations';
3
+ import pictogramVersionMap from '@coinbase/cds-illustrations/__generated__/pictogram/data/versionMap';
4
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
5
+ import { HStack, VStack } from '../../layout';
6
+ import { ThemeProvider } from '../../system/ThemeProvider';
7
+ import { defaultTheme } from '../../themes/defaultTheme';
8
+ import { Text } from '../../typography/Text';
9
+ import { Pictogram } from '../index';
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const COLOR_SCHEMES = ['light', 'dark'];
12
+ const ITEMS_PER_EXAMPLE = 12;
13
+ const PICTOGRAM_SCALE = 1;
14
+ const pictogramDimensionKey = illustrationDimensions.pictogram[0];
15
+ const [pictogramWidth, pictogramHeight] = illustrationSizes[pictogramDimensionKey];
16
+ const PICTOGRAM_DIMENSION = pictogramWidth + "x" + pictogramHeight;
17
+ const PREVIEW_WIDTH = pictogramWidth * PICTOGRAM_SCALE;
18
+ const pictogramNames = Object.keys(pictogramVersionMap);
19
+ const pictogramGroups = [];
20
+ for (let i = 0; i < pictogramNames.length; i += ITEMS_PER_EXAMPLE) {
21
+ pictogramGroups.push(pictogramNames.slice(i, i + ITEMS_PER_EXAMPLE));
22
+ }
23
+ const PictogramPreview = _ref => {
24
+ let {
25
+ name
26
+ } = _ref;
27
+ return /*#__PURE__*/_jsxs(VStack, {
28
+ gap: 0,
29
+ style: {
30
+ width: PREVIEW_WIDTH * COLOR_SCHEMES.length
31
+ },
32
+ children: [/*#__PURE__*/_jsx(Text, {
33
+ ellipsize: "tail",
34
+ font: "legal",
35
+ numberOfLines: 1,
36
+ children: name
37
+ }), /*#__PURE__*/_jsx(HStack, {
38
+ gap: 0,
39
+ children: COLOR_SCHEMES.map(scheme => /*#__PURE__*/_jsx(ThemeProvider, {
40
+ activeColorScheme: scheme,
41
+ theme: defaultTheme,
42
+ children: /*#__PURE__*/_jsx(VStack, {
43
+ background: "bg",
44
+ overflow: "hidden",
45
+ width: PREVIEW_WIDTH,
46
+ children: /*#__PURE__*/_jsx(Pictogram, {
47
+ dimension: PICTOGRAM_DIMENSION,
48
+ name: name,
49
+ scaleMultiplier: PICTOGRAM_SCALE
50
+ })
51
+ })
52
+ }, name + "-" + scheme))
53
+ })]
54
+ });
55
+ };
56
+ const PictogramStory = () => {
57
+ return /*#__PURE__*/_jsx(ExampleScreen, {
58
+ children: pictogramGroups.map((group, index, arr) => /*#__PURE__*/_jsx(Example, {
59
+ title: "Pictograms " + (index + 1) + " of " + arr.length,
60
+ children: /*#__PURE__*/_jsx(HStack, {
61
+ flexWrap: "wrap",
62
+ gap: 1,
63
+ children: group.map(name => /*#__PURE__*/_jsx(PictogramPreview, {
64
+ name: name
65
+ }, name))
66
+ })
67
+ }, "pictogram-" + index))
68
+ });
69
+ };
70
+ export default PictogramStory;
@@ -1,2 +1,70 @@
1
- import { getIllustrationSheet } from './getIllustrationSheet';
2
- export default getIllustrationSheet('spotIcon');
1
+ import React from 'react';
2
+ import { illustrationDimensions, illustrationSizes } from '@coinbase/cds-common/tokens/illustrations';
3
+ import spotIconVersionMap from '@coinbase/cds-illustrations/__generated__/spotIcon/data/versionMap';
4
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
5
+ import { HStack, VStack } from '../../layout';
6
+ import { ThemeProvider } from '../../system/ThemeProvider';
7
+ import { defaultTheme } from '../../themes/defaultTheme';
8
+ import { Text } from '../../typography/Text';
9
+ import { SpotIcon } from '../index';
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const COLOR_SCHEMES = ['light', 'dark'];
12
+ const ITEMS_PER_EXAMPLE = 20;
13
+ const SPOT_ICON_SCALE = 1;
14
+ const spotIconDimensionKey = illustrationDimensions.spotIcon[0];
15
+ const [spotIconWidth, spotIconHeight] = illustrationSizes[spotIconDimensionKey];
16
+ const SPOT_ICON_DIMENSION = spotIconWidth + "x" + spotIconHeight;
17
+ const PREVIEW_WIDTH = spotIconWidth * SPOT_ICON_SCALE;
18
+ const spotIconNames = Object.keys(spotIconVersionMap);
19
+ const spotIconGroups = [];
20
+ for (let i = 0; i < spotIconNames.length; i += ITEMS_PER_EXAMPLE) {
21
+ spotIconGroups.push(spotIconNames.slice(i, i + ITEMS_PER_EXAMPLE));
22
+ }
23
+ const SpotIconPreview = _ref => {
24
+ let {
25
+ name
26
+ } = _ref;
27
+ return /*#__PURE__*/_jsxs(VStack, {
28
+ gap: 0,
29
+ style: {
30
+ width: PREVIEW_WIDTH * COLOR_SCHEMES.length
31
+ },
32
+ children: [/*#__PURE__*/_jsx(Text, {
33
+ ellipsize: "tail",
34
+ font: "legal",
35
+ numberOfLines: 1,
36
+ children: name
37
+ }), /*#__PURE__*/_jsx(HStack, {
38
+ gap: 0,
39
+ children: COLOR_SCHEMES.map(scheme => /*#__PURE__*/_jsx(ThemeProvider, {
40
+ activeColorScheme: scheme,
41
+ theme: defaultTheme,
42
+ children: /*#__PURE__*/_jsx(VStack, {
43
+ background: "bg",
44
+ overflow: "hidden",
45
+ width: PREVIEW_WIDTH,
46
+ children: /*#__PURE__*/_jsx(SpotIcon, {
47
+ dimension: SPOT_ICON_DIMENSION,
48
+ name: name,
49
+ scaleMultiplier: SPOT_ICON_SCALE
50
+ })
51
+ })
52
+ }, name + "-" + scheme))
53
+ })]
54
+ });
55
+ };
56
+ const SpotIconStory = () => {
57
+ return /*#__PURE__*/_jsx(ExampleScreen, {
58
+ children: spotIconGroups.map((group, index, arr) => /*#__PURE__*/_jsx(Example, {
59
+ title: "Spot Icons " + (index + 1) + " of " + arr.length,
60
+ children: /*#__PURE__*/_jsx(HStack, {
61
+ flexWrap: "wrap",
62
+ gap: 1,
63
+ children: group.map(name => /*#__PURE__*/_jsx(SpotIconPreview, {
64
+ name: name
65
+ }, name))
66
+ })
67
+ }, "spot-icon-" + index))
68
+ });
69
+ };
70
+ export default SpotIconStory;
@@ -1,2 +1,68 @@
1
- import { getIllustrationSheet } from './getIllustrationSheet';
2
- export default getIllustrationSheet('spotRectangle');
1
+ import React from 'react';
2
+ import { illustrationDimensions, illustrationSizes } from '@coinbase/cds-common/tokens/illustrations';
3
+ import spotRectangleVersionMap from '@coinbase/cds-illustrations/__generated__/spotRectangle/data/versionMap';
4
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
5
+ import { HStack, VStack } from '../../layout';
6
+ import { ThemeProvider } from '../../system/ThemeProvider';
7
+ import { defaultTheme } from '../../themes/defaultTheme';
8
+ import { Text } from '../../typography/Text';
9
+ import { SpotRectangle } from '../index';
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const COLOR_SCHEMES = ['light', 'dark'];
12
+ const ITEMS_PER_EXAMPLE = 12;
13
+ const SPOT_RECTANGLE_SCALE = 0.3;
14
+ const spotRectangleDimension = illustrationDimensions.spotRectangle[0];
15
+ const [spotRectangleWidth] = illustrationSizes[spotRectangleDimension];
16
+ const PREVIEW_WIDTH = spotRectangleWidth * SPOT_RECTANGLE_SCALE;
17
+ const spotRectangleNames = Object.keys(spotRectangleVersionMap);
18
+ const spotRectangleGroups = [];
19
+ for (let i = 0; i < spotRectangleNames.length; i += ITEMS_PER_EXAMPLE) {
20
+ spotRectangleGroups.push(spotRectangleNames.slice(i, i + ITEMS_PER_EXAMPLE));
21
+ }
22
+ const SpotRectanglePreview = _ref => {
23
+ let {
24
+ name
25
+ } = _ref;
26
+ return /*#__PURE__*/_jsxs(VStack, {
27
+ gap: 0,
28
+ style: {
29
+ width: PREVIEW_WIDTH * COLOR_SCHEMES.length
30
+ },
31
+ children: [/*#__PURE__*/_jsx(Text, {
32
+ ellipsize: "tail",
33
+ font: "legal",
34
+ numberOfLines: 1,
35
+ children: name
36
+ }), /*#__PURE__*/_jsx(HStack, {
37
+ gap: 0,
38
+ children: COLOR_SCHEMES.map(scheme => /*#__PURE__*/_jsx(ThemeProvider, {
39
+ activeColorScheme: scheme,
40
+ theme: defaultTheme,
41
+ children: /*#__PURE__*/_jsx(VStack, {
42
+ background: "bg",
43
+ overflow: "hidden",
44
+ width: PREVIEW_WIDTH,
45
+ children: /*#__PURE__*/_jsx(SpotRectangle, {
46
+ name: name,
47
+ scaleMultiplier: SPOT_RECTANGLE_SCALE
48
+ })
49
+ })
50
+ }, name + "-" + scheme))
51
+ })]
52
+ });
53
+ };
54
+ const SpotRectangleStory = () => {
55
+ return /*#__PURE__*/_jsx(ExampleScreen, {
56
+ children: spotRectangleGroups.map((group, index, arr) => /*#__PURE__*/_jsx(Example, {
57
+ title: "Spot Rectangles " + (index + 1) + " of " + arr.length,
58
+ children: /*#__PURE__*/_jsx(HStack, {
59
+ flexWrap: "wrap",
60
+ gap: 1,
61
+ children: group.map(name => /*#__PURE__*/_jsx(SpotRectanglePreview, {
62
+ name: name
63
+ }, name))
64
+ })
65
+ }, "spot-rectangles-" + index))
66
+ });
67
+ };
68
+ export default SpotRectangleStory;
@@ -1,2 +1,68 @@
1
- import { getIllustrationSheet } from './getIllustrationSheet';
2
- export default getIllustrationSheet('spotSquare');
1
+ import React from 'react';
2
+ import { illustrationDimensions, illustrationSizes } from '@coinbase/cds-common/tokens/illustrations';
3
+ import spotSquareVersionMap from '@coinbase/cds-illustrations/__generated__/spotSquare/data/versionMap';
4
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
5
+ import { HStack, VStack } from '../../layout';
6
+ import { ThemeProvider } from '../../system/ThemeProvider';
7
+ import { defaultTheme } from '../../themes/defaultTheme';
8
+ import { Text } from '../../typography/Text';
9
+ import { SpotSquare } from '../index';
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const COLOR_SCHEMES = ['light', 'dark'];
12
+ const ITEMS_PER_EXAMPLE = 16;
13
+ const SPOT_SQUARE_SCALE = 0.4;
14
+ const spotSquareDimensionKey = illustrationDimensions.spotSquare[0];
15
+ const [spotSquareWidth] = illustrationSizes[spotSquareDimensionKey];
16
+ const PREVIEW_WIDTH = spotSquareWidth * SPOT_SQUARE_SCALE;
17
+ const spotSquareNames = Object.keys(spotSquareVersionMap);
18
+ const spotSquareGroups = [];
19
+ for (let i = 0; i < spotSquareNames.length; i += ITEMS_PER_EXAMPLE) {
20
+ spotSquareGroups.push(spotSquareNames.slice(i, i + ITEMS_PER_EXAMPLE));
21
+ }
22
+ const SpotSquarePreview = _ref => {
23
+ let {
24
+ name
25
+ } = _ref;
26
+ return /*#__PURE__*/_jsxs(VStack, {
27
+ gap: 0,
28
+ style: {
29
+ width: PREVIEW_WIDTH * COLOR_SCHEMES.length
30
+ },
31
+ children: [/*#__PURE__*/_jsx(Text, {
32
+ ellipsize: "tail",
33
+ font: "legal",
34
+ numberOfLines: 1,
35
+ children: name
36
+ }), /*#__PURE__*/_jsx(HStack, {
37
+ gap: 0,
38
+ children: COLOR_SCHEMES.map(scheme => /*#__PURE__*/_jsx(ThemeProvider, {
39
+ activeColorScheme: scheme,
40
+ theme: defaultTheme,
41
+ children: /*#__PURE__*/_jsx(VStack, {
42
+ background: "bg",
43
+ overflow: "hidden",
44
+ width: PREVIEW_WIDTH,
45
+ children: /*#__PURE__*/_jsx(SpotSquare, {
46
+ name: name,
47
+ scaleMultiplier: SPOT_SQUARE_SCALE
48
+ })
49
+ })
50
+ }, name + "-" + scheme))
51
+ })]
52
+ });
53
+ };
54
+ const SpotSquareStory = () => {
55
+ return /*#__PURE__*/_jsx(ExampleScreen, {
56
+ children: spotSquareGroups.map((group, index, arr) => /*#__PURE__*/_jsx(Example, {
57
+ title: "Spot Squares " + (index + 1) + " of " + arr.length,
58
+ children: /*#__PURE__*/_jsx(HStack, {
59
+ flexWrap: "wrap",
60
+ gap: 1,
61
+ children: group.map(name => /*#__PURE__*/_jsx(SpotSquarePreview, {
62
+ name: name
63
+ }, name))
64
+ })
65
+ }, "spot-square-" + index))
66
+ });
67
+ };
68
+ export default SpotSquareStory;
@@ -1,5 +1,4 @@
1
1
  import React, { memo, useCallback, useMemo, useRef } from 'react';
2
- import { SafeAreaProvider } from 'react-native-safe-area-context';
3
2
  import { useIndexCounter } from '@coinbase/cds-common/hooks/useIndexCounter';
4
3
  import { svgs } from '@coinbase/cds-common/internal/data/assets';
5
4
  import { Button } from '../../buttons';
@@ -173,10 +172,8 @@ const DynamicItemsExample = () => {
173
172
  });
174
173
  };
175
174
  const CarouselScreen = () => {
176
- return /*#__PURE__*/_jsx(SafeAreaProvider, {
177
- children: /*#__PURE__*/_jsxs(ExampleScreen, {
178
- children: [/*#__PURE__*/_jsx(ProgressBarsExample, {}), /*#__PURE__*/_jsx(DynamicItemsExample, {}), /*#__PURE__*/_jsx(SimpleExample, {}), /*#__PURE__*/_jsx(UpdateOnMountExample, {}), /*#__PURE__*/_jsx(TriggerViaButton, {})]
179
- })
175
+ return /*#__PURE__*/_jsxs(ExampleScreen, {
176
+ children: [/*#__PURE__*/_jsx(ProgressBarsExample, {}), /*#__PURE__*/_jsx(DynamicItemsExample, {}), /*#__PURE__*/_jsx(SimpleExample, {}), /*#__PURE__*/_jsx(UpdateOnMountExample, {}), /*#__PURE__*/_jsx(TriggerViaButton, {})]
180
177
  });
181
178
  };
182
179
  export default CarouselScreen;
@@ -3,7 +3,7 @@ import { View } from 'react-native';
3
3
  import { Banner } from '../../banner/Banner';
4
4
  import { Button, ButtonGroup } from '../../buttons';
5
5
  import { TextInput } from '../../controls';
6
- import { ExampleScreen } from '../../examples/ExampleScreen';
6
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
7
7
  import { useSafeBottomPadding } from '../../hooks/useSafeBottomPadding';
8
8
  import { useTheme } from '../../hooks/useTheme';
9
9
  import { Box, HStack, VStack } from '../../layout';
@@ -220,10 +220,13 @@ const NumpadExample2 = () => {
220
220
  };
221
221
  const NumpadScreen = () => {
222
222
  return /*#__PURE__*/_jsx(ExampleScreen, {
223
- children: /*#__PURE__*/_jsxs(VStack, {
224
- gap: 2,
225
- padding: 2,
226
- children: [/*#__PURE__*/_jsx(NumpadExample1, {}), /*#__PURE__*/_jsx(NumpadExample2, {})]
223
+ children: /*#__PURE__*/_jsx(Example, {
224
+ title: "Numpad Examples",
225
+ children: /*#__PURE__*/_jsxs(VStack, {
226
+ gap: 2,
227
+ padding: 2,
228
+ children: [/*#__PURE__*/_jsx(NumpadExample1, {}), /*#__PURE__*/_jsx(NumpadExample2, {})]
229
+ })
227
230
  })
228
231
  });
229
232
  };
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
- import { View } from 'react-native';
3
2
  import { NoopFn } from '@coinbase/cds-common/utils/mockUtils';
4
3
  import { Button, ButtonGroup } from '../../buttons';
5
- import { ExampleScreen } from '../../examples/ExampleScreen';
4
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
6
5
  import { Icon } from '../../icons';
7
6
  import { Divider } from '../../layout';
8
7
  import { PageFooter } from '../PageFooter';
@@ -41,8 +40,10 @@ const exampleProps = {
41
40
  })
42
41
  };
43
42
  const PageFooterScreen = () => {
44
- return /*#__PURE__*/_jsx(View, {
45
- children: /*#__PURE__*/_jsxs(ExampleScreen, {
43
+ return /*#__PURE__*/_jsx(ExampleScreen, {
44
+ paddingX: 0,
45
+ children: /*#__PURE__*/_jsxs(Example, {
46
+ gap: 0,
46
47
  children: [/*#__PURE__*/_jsx(PageFooter, {
47
48
  action: exampleProps.endButton,
48
49
  background: "bgPrimaryWash"
@@ -1,11 +1,10 @@
1
1
  import React from 'react';
2
- import { View } from 'react-native';
3
2
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
3
  import { NoopFn } from '@coinbase/cds-common/utils/mockUtils';
5
4
  import { Button, ButtonGroup } from '../../buttons';
6
- import { ExampleScreen } from '../../examples/ExampleScreen';
5
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
7
6
  import { Icon } from '../../icons';
8
- import { VStack } from '../../layout';
7
+ import { Box, VStack } from '../../layout';
9
8
  import { Text } from '../../typography/Text';
10
9
  import { PageFooter } from '../PageFooter';
11
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -50,13 +49,15 @@ const exampleProps = {
50
49
  };
51
50
  const PageFooterInPageScreen = () => {
52
51
  const inset = useSafeAreaInsets();
53
- return /*#__PURE__*/_jsxs(View, {
54
- children: [/*#__PURE__*/_jsx(ExampleScreen, {
55
- children: /*#__PURE__*/_jsx(VStack, {
52
+ return /*#__PURE__*/_jsx(ExampleScreen, {
53
+ paddingX: 0,
54
+ children: /*#__PURE__*/_jsxs(Example, {
55
+ hideDivider: true,
56
+ height: "100%",
57
+ children: [/*#__PURE__*/_jsx(VStack, {
56
58
  alignContent: "center",
57
59
  alignItems: "center",
58
60
  dangerouslySetBackground: "#FADADD",
59
- flexGrow: 1,
60
61
  gap: 0,
61
62
  justifyContent: "center",
62
63
  left: 0,
@@ -65,18 +66,18 @@ const PageFooterInPageScreen = () => {
65
66
  font: "title1",
66
67
  children: "Primary Content"
67
68
  })
68
- })
69
- }), /*#__PURE__*/_jsx(View, {
70
- style: {
71
- position: 'absolute',
72
- bottom: inset.bottom / 2,
73
- left: 0,
74
- right: 0
75
- },
76
- children: /*#__PURE__*/_jsx(PageFooter, {
77
- action: exampleProps.endButtons2
78
- })
79
- })]
69
+ }), /*#__PURE__*/_jsx(Box, {
70
+ style: {
71
+ position: 'absolute',
72
+ bottom: inset.bottom / 2,
73
+ left: 0,
74
+ right: 0
75
+ },
76
+ children: /*#__PURE__*/_jsx(PageFooter, {
77
+ action: exampleProps.endButtons2
78
+ })
79
+ })]
80
+ })
80
81
  });
81
82
  };
82
83
  export default PageFooterInPageScreen;
@@ -1,10 +1,9 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React from 'react';
3
- import { View } from 'react-native';
4
3
  import { assets } from '@coinbase/cds-common/internal/data/assets';
5
4
  import { NoopFn } from '@coinbase/cds-common/utils/mockUtils';
6
5
  import { Button, ButtonGroup, IconButton } from '../../buttons';
7
- import { ExampleScreen } from '../../examples/ExampleScreen';
6
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
8
7
  import { useTheme } from '../../hooks/useTheme';
9
8
  import { LogoMark } from '../../icons';
10
9
  import { Box, Divider, HStack, VStack } from '../../layout';
@@ -137,8 +136,9 @@ const PageHeaderScreen = () => {
137
136
  paddingStart: theme.space[1.5]
138
137
  }
139
138
  };
140
- return /*#__PURE__*/_jsx(View, {
141
- children: /*#__PURE__*/_jsx(ExampleScreen, {
139
+ return /*#__PURE__*/_jsx(ExampleScreen, {
140
+ children: /*#__PURE__*/_jsx(Example, {
141
+ title: "PageHeader Variants",
142
142
  children: /*#__PURE__*/_jsxs(VStack, {
143
143
  gap: 3,
144
144
  children: [/*#__PURE__*/_jsx(PageHeader, {
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { View } from 'react-native';
3
2
  import { assets } from '@coinbase/cds-common/internal/data/assets';
4
3
  import { NoopFn } from '@coinbase/cds-common/utils/mockUtils';
5
4
  import { IconButton } from '../../buttons';
6
- import { ExampleScreen } from '../../examples/ExampleScreen';
5
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
7
6
  import { LogoMark } from '../../icons';
8
7
  import { SpotSquare } from '../../illustrations';
9
8
  import { Box, VStack } from '../../layout';
@@ -31,8 +30,11 @@ const exampleProps = {
31
30
  })
32
31
  };
33
32
  const PageHeaderInErrorEmptyState = () => {
34
- return /*#__PURE__*/_jsx(View, {
35
- children: /*#__PURE__*/_jsx(ExampleScreen, {
33
+ return /*#__PURE__*/_jsx(ExampleScreen, {
34
+ children: /*#__PURE__*/_jsx(Example, {
35
+ hideDivider: true,
36
+ height: "100%",
37
+ title: "Error/Empty State",
36
38
  children: /*#__PURE__*/_jsxs(VStack, {
37
39
  gap: 0,
38
40
  width: "100%",
@@ -1,10 +1,9 @@
1
1
  import React from 'react';
2
- import { View } from 'react-native';
3
2
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
3
  import { NoopFn } from '@coinbase/cds-common/utils/mockUtils';
5
4
  import { Button, ButtonGroup, IconButton } from '../../buttons';
6
- import { ExampleScreen } from '../../examples/ExampleScreen';
7
- import { VStack } from '../../layout';
5
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
6
+ import { Box, VStack } from '../../layout';
8
7
  import { Text } from '../../typography/Text';
9
8
  import { PageFooter } from '../PageFooter';
10
9
  import { PageHeader } from '../PageHeader';
@@ -33,9 +32,12 @@ const exampleProps = {
33
32
  };
34
33
  const PageHeaderInPage = () => {
35
34
  const inset = useSafeAreaInsets();
36
- return /*#__PURE__*/_jsxs(View, {
37
- children: [/*#__PURE__*/_jsx(ExampleScreen, {
38
- children: /*#__PURE__*/_jsxs(VStack, {
35
+ return /*#__PURE__*/_jsx(ExampleScreen, {
36
+ paddingX: 0,
37
+ children: /*#__PURE__*/_jsxs(Example, {
38
+ hideDivider: true,
39
+ height: "100%",
40
+ children: [/*#__PURE__*/_jsxs(VStack, {
39
41
  gap: 0,
40
42
  width: "100%",
41
43
  children: [/*#__PURE__*/_jsx(PageHeader, {
@@ -62,18 +64,18 @@ const PageHeaderInPage = () => {
62
64
  children: "Primary Content"
63
65
  })
64
66
  })]
65
- })
66
- }), /*#__PURE__*/_jsx(View, {
67
- style: {
68
- position: 'absolute',
69
- bottom: inset.bottom / 2,
70
- left: 0,
71
- right: 0
72
- },
73
- children: /*#__PURE__*/_jsx(PageFooter, {
74
- action: exampleProps.endButtons
75
- })
76
- })]
67
+ }), /*#__PURE__*/_jsx(Box, {
68
+ style: {
69
+ position: 'absolute',
70
+ bottom: inset.bottom / 2,
71
+ left: 0,
72
+ right: 0
73
+ },
74
+ children: /*#__PURE__*/_jsx(PageFooter, {
75
+ action: exampleProps.endButtons
76
+ })
77
+ })]
78
+ })
77
79
  });
78
80
  };
79
81
  export default PageHeaderInPage;
@@ -1,12 +1,11 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { useState } from 'react';
3
- import { View } from 'react-native';
4
3
  import { assets } from '@coinbase/cds-common/internal/data/assets';
5
4
  import { NoopFn } from '@coinbase/cds-common/utils/mockUtils';
6
5
  import { Button, IconButton } from '../../buttons';
7
6
  import { SelectChip } from '../../chips/SelectChip';
8
7
  import { SearchInput, SelectOption } from '../../controls';
9
- import { ExampleScreen } from '../../examples/ExampleScreen';
8
+ import { Example, ExampleScreen } from '../../examples/ExampleScreen';
10
9
  import { Icon } from '../../icons';
11
10
  import { Divider, HStack } from '../../layout';
12
11
  import { RemoteImage } from '../../media';
@@ -62,8 +61,9 @@ const SelectChipDropdown = () => {
62
61
  });
63
62
  };
64
63
  const SectionHeaderScreen = () => {
65
- return /*#__PURE__*/_jsx(View, {
66
- children: /*#__PURE__*/_jsxs(ExampleScreen, {
64
+ return /*#__PURE__*/_jsx(ExampleScreen, {
65
+ children: /*#__PURE__*/_jsxs(Example, {
66
+ title: "SectionHeader Variants",
67
67
  children: [/*#__PURE__*/_jsx(SectionHeader, {
68
68
  title: "SectionHeader"
69
69
  }), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx(SectionHeader, _extends({}, defaultProps, {
@@ -12,14 +12,12 @@ const StickyFooterScreen = () => {
12
12
  setShowStickyFooter(!showStickyFooter);
13
13
  }, [showStickyFooter]);
14
14
  const inset = useSafeAreaInsets();
15
- return /*#__PURE__*/_jsxs(View, {
16
- children: [/*#__PURE__*/_jsx(ExampleScreen, {
17
- children: /*#__PURE__*/_jsx(Example, {
18
- title: "StickyFooter with Screen",
19
- children: /*#__PURE__*/_jsx(Button, {
20
- onPress: handleButtonPress,
21
- children: showStickyFooter ? 'Close' : 'Open'
22
- })
15
+ return /*#__PURE__*/_jsxs(ExampleScreen, {
16
+ children: [/*#__PURE__*/_jsx(Example, {
17
+ title: "StickyFooter with Screen",
18
+ children: /*#__PURE__*/_jsx(Button, {
19
+ onPress: handleButtonPress,
20
+ children: showStickyFooter ? 'Close' : 'Open'
23
21
  })
24
22
  }), showStickyFooter && /*#__PURE__*/_jsx(View, {
25
23
  style: {