@hero-design/rn 8.2.3 → 8.3.1

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 (35) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/es/index.js +316 -53
  3. package/lib/index.js +315 -51
  4. package/package.json +5 -5
  5. package/src/components/Carousel/CarouselItem.tsx +44 -0
  6. package/src/components/Carousel/CarouselPaginator/StyledCarouselPaginator.tsx +20 -0
  7. package/src/components/Carousel/CarouselPaginator/index.tsx +57 -0
  8. package/src/components/Carousel/StyledCarousel.tsx +58 -0
  9. package/src/components/Carousel/__tests__/StyledCarousel.spec.tsx +13 -0
  10. package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +20 -0
  11. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +600 -0
  12. package/src/components/Carousel/__tests__/index.spec.tsx +94 -0
  13. package/src/components/Carousel/index.tsx +157 -0
  14. package/src/components/Carousel/types.ts +10 -0
  15. package/src/components/Typography/Text/StyledText.tsx +1 -0
  16. package/src/components/Typography/Text/index.tsx +1 -0
  17. package/src/index.ts +2 -0
  18. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +34 -0
  19. package/src/theme/components/carousel.ts +42 -0
  20. package/src/theme/components/typography.ts +2 -0
  21. package/src/theme/getTheme.ts +3 -0
  22. package/src/theme/global/typography.ts +3 -0
  23. package/types/components/Carousel/CarouselItem.d.ts +6 -0
  24. package/types/components/Carousel/CarouselPaginator/StyledCarouselPaginator.d.ts +14 -0
  25. package/types/components/Carousel/CarouselPaginator/index.d.ts +7 -0
  26. package/types/components/Carousel/StyledCarousel.d.ts +36 -0
  27. package/types/components/Carousel/index.d.ts +32 -0
  28. package/types/components/Carousel/types.d.ts +9 -0
  29. package/types/components/Typography/Text/StyledText.d.ts +1 -1
  30. package/types/components/Typography/Text/index.d.ts +1 -1
  31. package/types/index.d.ts +2 -1
  32. package/types/theme/components/carousel.d.ts +32 -0
  33. package/types/theme/components/typography.d.ts +2 -0
  34. package/types/theme/getTheme.d.ts +2 -0
  35. package/types/theme/global/typography.d.ts +1 -0
@@ -0,0 +1,157 @@
1
+ import React, {
2
+ Dispatch,
3
+ SetStateAction,
4
+ useCallback,
5
+ useRef,
6
+ useEffect,
7
+ useState,
8
+ } from 'react';
9
+ import {
10
+ Animated,
11
+ FlatList,
12
+ StyleProp,
13
+ useWindowDimensions,
14
+ View,
15
+ ViewProps,
16
+ ViewStyle,
17
+ } from 'react-native';
18
+
19
+ import { CarouselData } from './types';
20
+ import CarouselPaginator from './CarouselPaginator';
21
+ import {
22
+ StyledBackDrop,
23
+ StyledCarouselFooterWrapper,
24
+ StyledCarouselView,
25
+ } from './StyledCarousel';
26
+ import CarouselItem from './CarouselItem';
27
+
28
+ interface CarouselProps extends ViewProps {
29
+ /**
30
+ * Additional style.
31
+ */
32
+ style?: StyleProp<ViewStyle>;
33
+ /**
34
+ * Testing id of the component.
35
+ */
36
+ testID?: string;
37
+ /**
38
+ * onItemIndexChange event handler receiving index of selected Item.
39
+ */
40
+ onItemIndexChange?: Dispatch<SetStateAction<number>>;
41
+ /**
42
+ * Carousel data.
43
+ */
44
+ items: CarouselData[];
45
+ /**
46
+ * Render action elements function.
47
+ */
48
+ renderActions?: (pageIndex: number) => JSX.Element;
49
+ /**
50
+ * Current selected item index.
51
+ */
52
+ selectedItemIndex?: number;
53
+ }
54
+
55
+ export function useStateFromProp<T>(
56
+ initialValue: T
57
+ ): [T, Dispatch<SetStateAction<T>>] {
58
+ const [value, setValue] = useState(initialValue);
59
+
60
+ useEffect(() => setValue(initialValue), [initialValue]);
61
+
62
+ return [value, setValue];
63
+ }
64
+
65
+ const Carousel = ({
66
+ items,
67
+ onItemIndexChange,
68
+ renderActions,
69
+ selectedItemIndex = 0,
70
+ style,
71
+ ...nativeProps
72
+ }: CarouselProps) => {
73
+ const carouselRef = useRef<FlatList>(null);
74
+
75
+ const [currentSlideIndex, setCurrentSlideIndex] =
76
+ useStateFromProp(selectedItemIndex);
77
+
78
+ const internalOnItemIndexChange = useCallback(
79
+ (index: number) => {
80
+ setCurrentSlideIndex(index);
81
+ if (onItemIndexChange) {
82
+ onItemIndexChange(index);
83
+ }
84
+ },
85
+ [setCurrentSlideIndex, onItemIndexChange]
86
+ );
87
+ const { width } = useWindowDimensions();
88
+
89
+ const scrollX = useRef(new Animated.Value(0)).current;
90
+ useEffect(() => {
91
+ // must use setTimeout since when layout is mounted, the pagination dots are not set correct scrollX
92
+ const handle = setTimeout(() => {
93
+ scrollX.setValue(currentSlideIndex * width);
94
+ carouselRef.current?.scrollToOffset({
95
+ offset: currentSlideIndex * width,
96
+ animated: true,
97
+ });
98
+ }, 100);
99
+ return () => {
100
+ clearTimeout(handle);
101
+ };
102
+ }, [currentSlideIndex, carouselRef]);
103
+
104
+ const visibleSlideChanged = useCallback(({ viewableItems }) => {
105
+ if (!viewableItems || (viewableItems && !viewableItems.length)) return;
106
+ const { index } = viewableItems[0];
107
+ internalOnItemIndexChange(index);
108
+ }, []);
109
+
110
+ const viewConfig = useRef({ viewAreaCoveragePercentThreshold: 50 }).current;
111
+
112
+ return (
113
+ <View style={style} {...nativeProps}>
114
+ <StyledBackDrop
115
+ themeSlideBackground={items[currentSlideIndex].background}
116
+ />
117
+ <StyledCarouselView>
118
+ <FlatList
119
+ horizontal
120
+ showsHorizontalScrollIndicator={false}
121
+ pagingEnabled
122
+ bounces={false}
123
+ data={items}
124
+ onViewableItemsChanged={visibleSlideChanged}
125
+ viewabilityConfig={viewConfig}
126
+ scrollEventThrottle={32}
127
+ ref={carouselRef}
128
+ onScroll={Animated.event(
129
+ [{ nativeEvent: { contentOffset: { x: scrollX } } }],
130
+ { useNativeDriver: false }
131
+ )}
132
+ renderItem={({ item }) => {
133
+ if (!item) return null;
134
+
135
+ const { image, heading, body, content } = item;
136
+
137
+ return (
138
+ <CarouselItem
139
+ image={image}
140
+ heading={heading}
141
+ body={body}
142
+ content={content}
143
+ width={width}
144
+ />
145
+ );
146
+ }}
147
+ />
148
+ <StyledCarouselFooterWrapper>
149
+ {renderActions && renderActions(currentSlideIndex)}
150
+ <CarouselPaginator numberOfSlides={items.length} scrollX={scrollX} />
151
+ </StyledCarouselFooterWrapper>
152
+ </StyledCarouselView>
153
+ </View>
154
+ );
155
+ };
156
+
157
+ export default Carousel;
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ import { ImageSourcePropType } from 'react-native';
3
+
4
+ export type CarouselData = {
5
+ image: ImageSourcePropType | string;
6
+ content?: ReactNode;
7
+ heading: string;
8
+ body?: string;
9
+ background: string;
10
+ };
@@ -15,6 +15,7 @@ const StyledText = styled(Text)<{
15
15
  | 'xlarge'
16
16
  | 'xxxlarge'
17
17
  | 'xxxxxlarge'
18
+ | '6xlarge'
18
19
  | '7xlarge';
19
20
  themeFontWeight: 'light' | 'regular' | 'semi-bold';
20
21
  themeIntent:
@@ -22,6 +22,7 @@ export interface TextProps extends NativeTextProps {
22
22
  | 'xlarge'
23
23
  | 'xxxlarge'
24
24
  | 'xxxxxlarge'
25
+ | '6xlarge'
25
26
  | '7xlarge';
26
27
  /**
27
28
  * Font weight of the text.
package/src/index.ts CHANGED
@@ -21,6 +21,7 @@ import BottomSheet from './components/BottomSheet';
21
21
  import Box from './components/Box';
22
22
  import Button from './components/Button';
23
23
  import Calendar from './components/Calendar';
24
+ import Carousel from './components/Carousel';
24
25
  import Card from './components/Card';
25
26
  import Collapse from './components/Collapse';
26
27
  import Checkbox from './components/Checkbox';
@@ -76,6 +77,7 @@ export {
76
77
  Button,
77
78
  Calendar,
78
79
  Card,
80
+ Carousel,
79
81
  Collapse,
80
82
  Checkbox,
81
83
  ContentNavigator,
@@ -253,6 +253,36 @@ Object {
253
253
  "indicatorWidth": 16,
254
254
  },
255
255
  },
256
+ "carousel": Object {
257
+ "colors": Object {
258
+ "paginatorBackgroundColor": "#401960",
259
+ },
260
+ "fontSizes": Object {
261
+ "heading": 36,
262
+ },
263
+ "fonts": Object {
264
+ "heading": "RebondGrotesque-SemiBold",
265
+ },
266
+ "lineHeights": Object {
267
+ "heading": 44,
268
+ },
269
+ "radii": Object {
270
+ "paginatorBorderRadius": 999,
271
+ },
272
+ "sizes": Object {
273
+ "indicatorWidth": 16,
274
+ "paginatorHeight": 8,
275
+ "paginatorWidth": 8,
276
+ },
277
+ "space": Object {
278
+ "footerMarginBottom": 24,
279
+ "footerPaddingHorizontal": 24,
280
+ "footerPaddingVertical": 16,
281
+ "headingMarginBottom": 16,
282
+ "headingMarginTop": 8,
283
+ "paginatorMarginHorizontal": 8,
284
+ },
285
+ },
256
286
  "checkbox": Object {
257
287
  "borderWidths": Object {
258
288
  "icon": 2,
@@ -900,6 +930,7 @@ Object {
900
930
  "warning": "#ffa234",
901
931
  },
902
932
  "fontSizes": Object {
933
+ "6xlarge": 36,
903
934
  "7xlarge": 42,
904
935
  "large": 16,
905
936
  "medium": 14,
@@ -921,6 +952,7 @@ Object {
921
952
  },
922
953
  },
923
954
  "lineHeights": Object {
955
+ "6xlarge": 44,
924
956
  "7xlarge": 50,
925
957
  "large": 24,
926
958
  "medium": 22,
@@ -980,6 +1012,7 @@ Object {
980
1012
  "warningSurface": "#fff6eb",
981
1013
  },
982
1014
  "fontSizes": Object {
1015
+ "6xlarge": 36,
983
1016
  "7xlarge": 42,
984
1017
  "large": 16,
985
1018
  "medium": 14,
@@ -1004,6 +1037,7 @@ Object {
1004
1037
  },
1005
1038
  },
1006
1039
  "lineHeights": Object {
1040
+ "6xlarge": 44,
1007
1041
  "7xlarge": 50,
1008
1042
  "large": 24,
1009
1043
  "medium": 22,
@@ -0,0 +1,42 @@
1
+ import type { GlobalTheme } from '../global';
2
+
3
+ const getCarouselTheme = (theme: GlobalTheme) => {
4
+ const colors = {
5
+ paginatorBackgroundColor: theme.colors.primary,
6
+ };
7
+
8
+ const space = {
9
+ headingMarginTop: theme.space.small,
10
+ headingMarginBottom: theme.space.medium,
11
+ paginatorMarginHorizontal: theme.space.small,
12
+ footerPaddingHorizontal: theme.space.large,
13
+ footerPaddingVertical: theme.space.medium,
14
+ footerMarginBottom: theme.space.large,
15
+ };
16
+
17
+ const sizes = {
18
+ indicatorWidth: theme.sizes.medium,
19
+ paginatorHeight: theme.sizes.small,
20
+ paginatorWidth: theme.sizes.small,
21
+ };
22
+
23
+ const radii = {
24
+ paginatorBorderRadius: theme.radii.rounded,
25
+ };
26
+
27
+ const fontSizes = {
28
+ heading: theme.fontSizes['6xlarge'],
29
+ };
30
+
31
+ const fonts = {
32
+ heading: theme.fonts.playful.semiBold,
33
+ };
34
+
35
+ const lineHeights = {
36
+ heading: theme.lineHeights['6xlarge'],
37
+ };
38
+
39
+ return { colors, sizes, radii, space, fonts, fontSizes, lineHeights };
40
+ };
41
+
42
+ export default getCarouselTheme;
@@ -20,6 +20,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
20
20
  xlarge: theme.fontSizes.xlarge,
21
21
  xxxlarge: theme.fontSizes.xxxlarge,
22
22
  xxxxxlarge: theme.fontSizes.xxxxxlarge,
23
+ '6xlarge': theme.fontSizes['6xlarge'],
23
24
  '7xlarge': theme.fontSizes['7xlarge'],
24
25
  };
25
26
 
@@ -30,6 +31,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
30
31
  xlarge: theme.lineHeights.xlarge,
31
32
  xxxlarge: theme.lineHeights.xxxlarge,
32
33
  xxxxxlarge: theme.lineHeights.xxxxxlarge,
34
+ '6xlarge': theme.lineHeights['6xlarge'],
33
35
  '7xlarge': theme.lineHeights['7xlarge'],
34
36
  };
35
37
 
@@ -10,6 +10,7 @@ import getBottomSheetTheme from './components/bottomSheet';
10
10
  import getButtonTheme from './components/button';
11
11
  import getCalendarTheme from './components/calendar';
12
12
  import getCardTheme from './components/card';
13
+ import getCarouselTheme from './components/carousel';
13
14
  import getCheckboxTheme from './components/checkbox';
14
15
  import getContentNavigatorTheme from './components/contentNavigator';
15
16
  import getDatePickerTheme from './components/datePicker';
@@ -53,6 +54,7 @@ type Theme = GlobalTheme & {
53
54
  button: ReturnType<typeof getButtonTheme>;
54
55
  calendar: ReturnType<typeof getCalendarTheme>;
55
56
  card: ReturnType<typeof getCardTheme>;
57
+ carousel: ReturnType<typeof getCarouselTheme>;
56
58
  checkbox: ReturnType<typeof getCheckboxTheme>;
57
59
  contentNavigator: ReturnType<typeof getContentNavigatorTheme>;
58
60
  datePicker: ReturnType<typeof getDatePickerTheme>;
@@ -102,6 +104,7 @@ const getTheme = (
102
104
  button: getButtonTheme(globalTheme),
103
105
  calendar: getCalendarTheme(globalTheme),
104
106
  card: getCardTheme(globalTheme),
107
+ carousel: getCarouselTheme(globalTheme),
105
108
  checkbox: getCheckboxTheme(globalTheme),
106
109
  contentNavigator: getContentNavigatorTheme(globalTheme),
107
110
  datePicker: getDatePickerTheme(globalTheme),
@@ -13,6 +13,7 @@ interface Fonts {
13
13
 
14
14
  interface FontSizes {
15
15
  '7xlarge': number;
16
+ '6xlarge': number;
16
17
  xxxxxlarge: number;
17
18
  xxxxlarge: number;
18
19
  xxxlarge: number;
@@ -62,6 +63,7 @@ const getFontSizes = (baseFontSize: number): FontSizes => {
62
63
  });
63
64
  return {
64
65
  '7xlarge': scale(fontSizes[10]), // 42
66
+ '6xlarge': scale(fontSizes[9]), // 36
65
67
  xxxxxlarge: scale(fontSizes[8]), // 32
66
68
  xxxxlarge: scale(fontSizes[7]), // 28
67
69
  xxxlarge: scale(fontSizes[6]), // 24
@@ -78,6 +80,7 @@ const getLineHeights = (fontSizes: FontSizes): LineHeights => {
78
80
  const additionalSpace = 8;
79
81
  return {
80
82
  '7xlarge': fontSizes['7xlarge'] + additionalSpace,
83
+ '6xlarge': fontSizes['6xlarge'] + additionalSpace,
81
84
  xxxxxlarge: fontSizes.xxxxxlarge + additionalSpace,
82
85
  xxxxlarge: fontSizes.xxxxlarge + additionalSpace,
83
86
  xxxlarge: fontSizes.xxxlarge + additionalSpace,
@@ -0,0 +1,6 @@
1
+ import { CarouselData } from './types';
2
+ interface CarouselItemProps extends Omit<CarouselData, 'background'> {
3
+ width: number;
4
+ }
5
+ declare const CarouselItem: ({ width, image, content, heading, body, }: CarouselItemProps) => JSX.Element;
6
+ export default CarouselItem;
@@ -0,0 +1,14 @@
1
+ import { Animated, View } from 'react-native';
2
+ declare const StyledCarouselPaginator: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, {}, {
6
+ ref?: import("react").Ref<View> | undefined;
7
+ }>;
8
+ declare const StyledCarouselPaginatorAnimatedView: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<View>> & {
9
+ children?: import("react").ReactNode;
10
+ } & {
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ as?: import("react").ElementType<any> | undefined;
13
+ }, {}, {}>;
14
+ export { StyledCarouselPaginator, StyledCarouselPaginatorAnimatedView };
@@ -0,0 +1,7 @@
1
+ import { Animated } from 'react-native';
2
+ interface CarouselPaginatorProps {
3
+ numberOfSlides: number;
4
+ scrollX: Animated.Value;
5
+ }
6
+ declare const CarouselPaginator: ({ numberOfSlides, scrollX, }: CarouselPaginatorProps) => JSX.Element;
7
+ export default CarouselPaginator;
@@ -0,0 +1,36 @@
1
+ import { View } from 'react-native';
2
+ declare const StyledBackDrop: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ } & {
6
+ themeSlideBackground: string;
7
+ }, {}, {
8
+ ref?: import("react").Ref<View> | undefined;
9
+ }>;
10
+ declare const StyledCarouselView: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ as?: import("react").ElementType<any> | undefined;
13
+ }, {}, {
14
+ ref?: import("react").Ref<View> | undefined;
15
+ }>;
16
+ declare const StyledCarouselHeading: import("@emotion/native").StyledComponent<import("../..").TextProps & {
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any> | undefined;
19
+ }, {}, {}>;
20
+ declare const StyledCarouselImage: import("@emotion/native").StyledComponent<import("../Image").ImageProps & {
21
+ theme?: import("@emotion/react").Theme | undefined;
22
+ as?: import("react").ElementType<any> | undefined;
23
+ }, {}, {}>;
24
+ declare const StyledCarouselContentWrapper: import("@emotion/native").StyledComponent<import("../Box").BoxProps & {
25
+ theme?: import("@emotion/react").Theme | undefined;
26
+ as?: import("react").ElementType<any> | undefined;
27
+ } & {
28
+ width: number;
29
+ }, {}, {}>;
30
+ declare const StyledCarouselFooterWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
31
+ theme?: import("@emotion/react").Theme | undefined;
32
+ as?: import("react").ElementType<any> | undefined;
33
+ }, {}, {
34
+ ref?: import("react").Ref<View> | undefined;
35
+ }>;
36
+ export { StyledBackDrop, StyledCarouselView, StyledCarouselHeading, StyledCarouselImage, StyledCarouselContentWrapper, StyledCarouselFooterWrapper, };
@@ -0,0 +1,32 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { StyleProp, ViewProps, ViewStyle } from 'react-native';
3
+ import { CarouselData } from './types';
4
+ interface CarouselProps extends ViewProps {
5
+ /**
6
+ * Additional style.
7
+ */
8
+ style?: StyleProp<ViewStyle>;
9
+ /**
10
+ * Testing id of the component.
11
+ */
12
+ testID?: string;
13
+ /**
14
+ * onItemIndexChange event handler receiving index of selected Item.
15
+ */
16
+ onItemIndexChange?: Dispatch<SetStateAction<number>>;
17
+ /**
18
+ * Carousel data.
19
+ */
20
+ items: CarouselData[];
21
+ /**
22
+ * Render action elements function.
23
+ */
24
+ renderActions?: (pageIndex: number) => JSX.Element;
25
+ /**
26
+ * Current selected item index.
27
+ */
28
+ selectedItemIndex?: number;
29
+ }
30
+ export declare function useStateFromProp<T>(initialValue: T): [T, Dispatch<SetStateAction<T>>];
31
+ declare const Carousel: ({ items, onItemIndexChange, renderActions, selectedItemIndex, style, ...nativeProps }: CarouselProps) => JSX.Element;
32
+ export default Carousel;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ import { ImageSourcePropType } from 'react-native';
3
+ export declare type CarouselData = {
4
+ image: ImageSourcePropType | string;
5
+ content?: ReactNode;
6
+ heading: string;
7
+ body?: string;
8
+ background: string;
9
+ };
@@ -3,7 +3,7 @@ declare const StyledText: import("@emotion/native").StyledComponent<import("reac
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  as?: import("react").ElementType<any> | undefined;
5
5
  } & {
6
- themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge' | '7xlarge';
6
+ themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge' | '6xlarge' | '7xlarge';
7
7
  themeFontWeight: 'light' | 'regular' | 'semi-bold';
8
8
  themeIntent: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
9
9
  themeTypeface: 'neutral' | 'playful';
@@ -8,7 +8,7 @@ export interface TextProps extends NativeTextProps {
8
8
  /**
9
9
  * Size of the text.
10
10
  */
11
- fontSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge' | '7xlarge';
11
+ fontSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge' | '6xlarge' | '7xlarge';
12
12
  /**
13
13
  * Font weight of the text.
14
14
  */
package/types/index.d.ts CHANGED
@@ -10,6 +10,7 @@ import BottomSheet from './components/BottomSheet';
10
10
  import Box from './components/Box';
11
11
  import Button from './components/Button';
12
12
  import Calendar from './components/Calendar';
13
+ import Carousel from './components/Carousel';
13
14
  import Card from './components/Card';
14
15
  import Collapse from './components/Collapse';
15
16
  import Checkbox from './components/Checkbox';
@@ -40,5 +41,5 @@ import Toolbar from './components/Toolbar';
40
41
  import Typography from './components/Typography';
41
42
  import RefreshControl from './components/RefreshControl';
42
43
  import RichTextEditor from './components/RichTextEditor';
43
- export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, swagSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
44
+ export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, swagSystemPalette, workSystemPalette, jobsSystemPalette, walletSystemPalette, eBensSystemPalette, Accordion, Alert, Attachment, Avatar, useAvatarColors, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Carousel, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
44
45
  export * from './types';
@@ -0,0 +1,32 @@
1
+ import type { GlobalTheme } from '../global';
2
+ declare const getCarouselTheme: (theme: GlobalTheme) => {
3
+ colors: {
4
+ paginatorBackgroundColor: string;
5
+ };
6
+ sizes: {
7
+ indicatorWidth: number;
8
+ paginatorHeight: number;
9
+ paginatorWidth: number;
10
+ };
11
+ radii: {
12
+ paginatorBorderRadius: number;
13
+ };
14
+ space: {
15
+ headingMarginTop: number;
16
+ headingMarginBottom: number;
17
+ paginatorMarginHorizontal: number;
18
+ footerPaddingHorizontal: number;
19
+ footerPaddingVertical: number;
20
+ footerMarginBottom: number;
21
+ };
22
+ fonts: {
23
+ heading: string;
24
+ };
25
+ fontSizes: {
26
+ heading: number;
27
+ };
28
+ lineHeights: {
29
+ heading: number;
30
+ };
31
+ };
32
+ export default getCarouselTheme;
@@ -19,6 +19,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
19
19
  xlarge: number;
20
20
  xxxlarge: number;
21
21
  xxxxxlarge: number;
22
+ '6xlarge': number;
22
23
  '7xlarge': number;
23
24
  };
24
25
  lineHeights: {
@@ -28,6 +29,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
28
29
  xlarge: number;
29
30
  xxxlarge: number;
30
31
  xxxxxlarge: number;
32
+ '6xlarge': number;
31
33
  '7xlarge': number;
32
34
  };
33
35
  };
@@ -8,6 +8,7 @@ import getBottomSheetTheme from './components/bottomSheet';
8
8
  import getButtonTheme from './components/button';
9
9
  import getCalendarTheme from './components/calendar';
10
10
  import getCardTheme from './components/card';
11
+ import getCarouselTheme from './components/carousel';
11
12
  import getCheckboxTheme from './components/checkbox';
12
13
  import getContentNavigatorTheme from './components/contentNavigator';
13
14
  import getDatePickerTheme from './components/datePicker';
@@ -49,6 +50,7 @@ declare type Theme = GlobalTheme & {
49
50
  button: ReturnType<typeof getButtonTheme>;
50
51
  calendar: ReturnType<typeof getCalendarTheme>;
51
52
  card: ReturnType<typeof getCardTheme>;
53
+ carousel: ReturnType<typeof getCarouselTheme>;
52
54
  checkbox: ReturnType<typeof getCheckboxTheme>;
53
55
  contentNavigator: ReturnType<typeof getContentNavigatorTheme>;
54
56
  datePicker: ReturnType<typeof getDatePickerTheme>;
@@ -9,6 +9,7 @@ interface Fonts {
9
9
  }
10
10
  interface FontSizes {
11
11
  '7xlarge': number;
12
+ '6xlarge': number;
12
13
  xxxxxlarge: number;
13
14
  xxxxlarge: number;
14
15
  xxxlarge: number;