@hero-design/rn 8.6.1 → 8.8.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 (42) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  3. package/es/index.js +444 -412
  4. package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
  5. package/lib/index.js +444 -411
  6. package/package.json +5 -5
  7. package/src/components/Carousel/StyledCarousel.tsx +5 -0
  8. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +622 -6
  9. package/src/components/Carousel/__tests__/index.spec.tsx +3 -1
  10. package/src/components/Carousel/index.tsx +4 -4
  11. package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
  12. package/src/components/Icon/IconList.ts +7 -0
  13. package/src/components/PageControl/StyledPageControl.tsx +17 -0
  14. package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +58 -0
  15. package/src/components/PageControl/__tests__/index.spec.tsx +21 -0
  16. package/src/components/PageControl/index.tsx +75 -0
  17. package/src/components/Typography/Text/StyledText.tsx +1 -0
  18. package/src/components/Typography/Text/index.tsx +1 -0
  19. package/src/index.ts +2 -0
  20. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +20 -12
  21. package/src/theme/components/carousel.ts +1 -16
  22. package/src/theme/components/pageControl.ts +25 -0
  23. package/src/theme/components/typography.ts +2 -0
  24. package/src/theme/getTheme.ts +3 -0
  25. package/src/theme/global/borders.ts +4 -0
  26. package/types/components/Carousel/StyledCarousel.d.ts +5 -1
  27. package/types/components/Icon/IconList.d.ts +1 -1
  28. package/types/components/Icon/index.d.ts +1 -1
  29. package/types/components/Icon/utils.d.ts +1 -1
  30. package/types/components/{Carousel/CarouselPaginator/StyledCarouselPaginator.d.ts → PageControl/StyledPageControl.d.ts} +3 -3
  31. package/types/components/PageControl/index.d.ts +21 -0
  32. package/types/components/Typography/Text/StyledText.d.ts +1 -1
  33. package/types/components/Typography/Text/index.d.ts +1 -1
  34. package/types/index.d.ts +2 -1
  35. package/types/theme/components/carousel.d.ts +0 -12
  36. package/types/theme/components/pageControl.d.ts +18 -0
  37. package/types/theme/components/typography.d.ts +2 -0
  38. package/types/theme/getTheme.d.ts +2 -0
  39. package/types/theme/global/borders.d.ts +2 -0
  40. package/src/components/Carousel/CarouselPaginator/StyledCarouselPaginator.tsx +0 -20
  41. package/src/components/Carousel/CarouselPaginator/index.tsx +0 -57
  42. package/types/components/Carousel/CarouselPaginator/index.d.ts +0 -7
@@ -1,2 +1,2 @@
1
- declare const isHeroIcon: (x: any) => x is "number" | "swag" | "wallet" | "bold" | "menu" | "filter" | "image" | "switch" | "list" | "warning" | "activate" | "add-emoji" | "add-person" | "adjustment" | "alignment" | "antenna" | "archive" | "assignment-warning" | "bank" | "bell" | "billing" | "bookmark-added" | "bookmark" | "box-check" | "box" | "buildings" | "cake" | "calendar-clock" | "calendar" | "candy-box-menu" | "caret-down-small" | "caret-down" | "caret-left-small" | "caret-left" | "caret-right-small" | "caret-right" | "caret-up-small" | "caret-up" | "check-radio" | "circle-add" | "circle-cancel" | "circle-check" | "circle-down" | "circle-info" | "circle-left" | "circle-ok" | "circle-pencil" | "circle-question" | "circle-remove" | "circle-right" | "circle-up" | "circle-warning" | "clock-3" | "clock" | "cloud-download" | "cloud-upload" | "cog" | "coin" | "contacts" | "credit-card" | "diamond" | "direction-arrows" | "directory" | "document" | "dollar-coin-shine" | "double-buildings" | "edit-template" | "envelope" | "expense" | "eye-circle" | "eye-invisible" | "eye" | "face-meh" | "face-sad" | "face-smiley" | "feed" | "feedbacks" | "file-certified" | "file-clone" | "file-copy" | "file-csv" | "file-dispose" | "file-doc" | "file-excel" | "file-export" | "file-lock" | "file-pdf" | "file-powerpoint" | "file-search" | "file-secured" | "file-sheets" | "file-slide" | "file-verified" | "file-word" | "file" | "folder-user" | "folder" | "format-bold" | "format-heading1" | "format-heading2" | "format-italic" | "format-list-bulleted" | "format-list-numbered" | "format-underlined" | "funnel-filter" | "global-dollar" | "globe" | "graduation-cap" | "graph" | "happy-sun" | "health-bag" | "heart" | "home" | "import" | "incident-siren" | "instapay" | "loading-2" | "loading" | "location" | "lock" | "looks-one" | "looks-two" | "media-content" | "money-notes" | "moneybag" | "moon" | "multiple-stars" | "multiple-users" | "node" | "open-folder" | "paperclip" | "payment-summary" | "pencil" | "phone" | "piggy-bank" | "plane" | "play-circle" | "print" | "raising-hands" | "reply-arrow" | "reply" | "reschedule" | "rostering" | "save" | "schedule-send" | "schedule" | "search-person" | "send" | "speaker-active" | "speaker" | "star-award" | "star-badge" | "star-circle" | "star-medal" | "star" | "steps-circle" | "stopwatch" | "suitcase" | "survey" | "tag" | "target" | "teams" | "timesheet" | "touch-id" | "trash-bin" | "unlock" | "user" | "video-1" | "video-2" | "activate-outlined" | "add-credit-card-outlined" | "add-person-outlined" | "add-section-outlined" | "add-time-outlined" | "add" | "adjustment-outlined" | "alignment-2-outlined" | "alignment-outlined" | "all-caps" | "arrow-down" | "arrow-downwards" | "arrow-left" | "arrow-leftwards" | "arrow-right" | "arrow-rightwards" | "arrow-up" | "arrow-upwards" | "article-outlined" | "at-sign" | "auto-graph-outlined" | "bell-active-outlined" | "bell-outlined" | "bell-slash-outlined" | "billing-outlined" | "body-outlined" | "bookmark-added-outlined" | "bookmark-outlined" | "box-check-outlined" | "box-outlined" | "bullet-points" | "cake-outlined" | "calendar-dates-outlined" | "calendar-star-outlined" | "camera-outlined" | "cancel" | "chat-bubble-outlined" | "chat-unread-outlined" | "checkmark" | "circle-add-outlined" | "circle-cancel-outlined" | "circle-down-outlined" | "circle-info-outlined" | "circle-left-outlined" | "circle-ok-outlined" | "circle-question-outlined" | "circle-remove-outlined" | "circle-right-outlined" | "circle-up-outlined" | "circle-warning-outlined" | "clock-2-outlined" | "clock-outlined" | "cog-outlined" | "coin-outlined" | "comment-outlined" | "contacts-outlined" | "credit-card-outlined" | "cup-outlined" | "direction-arrows-outlined" | "directory-outlined" | "document-outlined" | "dollar-card-outlined" | "dollar-coin-shine-outlined" | "dollar-credit-card-outlined" | "dollar-sign" | "double-buildings-outlined" | "double-left-arrows" | "double-right-arrows" | "download-outlined" | "edit-template-outlined" | "email-outlined" | "enter-arrow" | "envelope-outlined" | "expense-outlined" | "explore-outlined" | "external-link" | "eye-invisible-outlined" | "eye-outlined" | "face-id" | "face-meh-outlined" | "face-open-smiley-outlined" | "face-sad-outlined" | "face-smiley-outlined" | "feed-outlined" | "file-certified-outlined" | "file-clone-outlined" | "file-copy-outlined" | "file-dispose-outlined" | "file-dollar-outlined" | "file-download-outlined" | "file-export-outlined" | "file-lock-outlined" | "file-outlined" | "file-search-outlined" | "file-secured-outlined" | "file-statutory-outlined" | "file-verified-outlined" | "filter-outlined" | "folder-outlined" | "folder-user-outlined" | "funnel-filter-outline" | "graph-outlined" | "hand-holding-user-outlined" | "happy-sun-outlined" | "health-bag-outlined" | "heart-outlined" | "home-active-outlined" | "home-outlined" | "id-card-outlined" | "image-outlined" | "import-outlined" | "instapay-outlined" | "italic" | "link-1" | "link-2" | "list-outlined" | "live-help-outlined" | "location-outlined" | "lock-outlined" | "locked-file-outlined" | "log-out" | "media-content-outlined" | "menu-close" | "menu-expand" | "menu-fold-outlined" | "menu-unfold-outlined" | "moneybag-outlined" | "moon-outlined" | "more-horizontal" | "more-vertical" | "multiple-folders-outlined" | "multiple-users-outlined" | "near-me-outlined" | "node-outlined" | "number-points" | "overview-outlined" | "payment-summary-outlined" | "payslip-outlined" | "pencil-outlined" | "percentage" | "phone-outlined" | "piggy-bank-outlined" | "plane-outlined" | "play-circle-outlined" | "print-outlined" | "qr-code-outlined" | "qualification-outlined" | "re-assign" | "redeem" | "refresh" | "remove" | "reply-outlined" | "restart" | "return-arrow" | "rostering-outlined" | "save-outlined" | "schedule-outlined" | "search-outlined" | "search-secured-outlined" | "send-outlined" | "share-1" | "share-2" | "share-outlined" | "show-chart-outlined" | "single-down-arrow" | "single-left-arrow" | "single-right-arrow" | "single-up-arrow" | "speaker-active-outlined" | "speaker-outlined" | "star-circle-outlined" | "star-outlined" | "stopwatch-outlined" | "strikethrough" | "suitcase-clock-outlined" | "suitcase-outlined" | "survey-outlined" | "switch-outlined" | "sync" | "target-outlined" | "timesheet-outlined" | "today-outlined" | "transfer" | "trash-bin-outlined" | "umbrela-outlined" | "unavailable" | "underline" | "unlock-outlined" | "upload-outlined" | "user-circle-outlined" | "user-gear-outlined" | "user-outlined" | "user-rectangle-outlined" | "video-1-outlined" | "video-2-outlined" | "wallet-outlined";
1
+ declare const isHeroIcon: (x: any) => x is "number" | "swag" | "wallet" | "bold" | "menu" | "filter" | "image" | "switch" | "list" | "warning" | "activate" | "add-emoji" | "add-person" | "adjustment" | "alignment" | "antenna" | "archive" | "assignment-warning" | "bank" | "bell" | "billing" | "bookmark-added" | "bookmark" | "box-check" | "box" | "bpay" | "buildings" | "cake" | "calendar-clock" | "calendar" | "candy-box-menu" | "caret-down-small" | "caret-down" | "caret-left-small" | "caret-left" | "caret-right-small" | "caret-right" | "caret-up-small" | "caret-up" | "check-radio" | "circle-add" | "circle-cancel" | "circle-check" | "circle-down" | "circle-info" | "circle-left" | "circle-ok" | "circle-pencil" | "circle-question" | "circle-remove" | "circle-right" | "circle-up" | "circle-warning" | "clock-3" | "clock" | "cloud-download" | "cloud-upload" | "cog" | "coin" | "contacts" | "credit-card" | "diamond" | "direction-arrows" | "directory" | "document" | "dollar-coin-shine" | "double-buildings" | "edit-template" | "envelope" | "expense" | "eye-circle" | "eye-invisible" | "eye" | "face-meh" | "face-sad" | "face-smiley" | "feed" | "feedbacks" | "file-certified" | "file-clone" | "file-copy" | "file-csv" | "file-dispose" | "file-doc" | "file-excel" | "file-export" | "file-lock" | "file-pdf" | "file-powerpoint" | "file-search" | "file-secured" | "file-sheets" | "file-slide" | "file-verified" | "file-word" | "file" | "folder-user" | "folder" | "format-bold" | "format-heading1" | "format-heading2" | "format-italic" | "format-list-bulleted" | "format-list-numbered" | "format-underlined" | "funnel-filter" | "global-dollar" | "globe" | "graduation-cap" | "graph" | "happy-sun" | "health-bag" | "heart" | "home" | "import" | "incident-siren" | "instapay" | "loading-2" | "loading" | "location" | "lock" | "looks-one" | "looks-two" | "media-content" | "money-notes" | "moneybag" | "moon" | "multiple-stars" | "multiple-users" | "node" | "open-folder" | "paperclip" | "payment-summary" | "pencil" | "phone" | "piggy-bank" | "plane" | "play-circle" | "print" | "raising-hands" | "reply-arrow" | "reply" | "reschedule" | "rostering" | "save" | "schedule-send" | "schedule" | "search-person" | "send" | "speaker-active" | "speaker" | "star-award" | "star-badge" | "star-circle" | "star-medal" | "star" | "steps-circle" | "stopwatch" | "suitcase" | "survey" | "tag" | "target" | "teams" | "timesheet" | "touch-id" | "trash-bin" | "unlock" | "user" | "video-1" | "video-2" | "activate-outlined" | "add-credit-card-outlined" | "add-person-outlined" | "add-section-outlined" | "add-time-outlined" | "add" | "adjustment-outlined" | "alignment-2-outlined" | "alignment-outlined" | "all-caps" | "arrow-down" | "arrow-downwards" | "arrow-left" | "arrow-leftwards" | "arrow-right" | "arrow-rightwards" | "arrow-up" | "arrow-upwards" | "article-outlined" | "at-sign" | "auto-graph-outlined" | "bell-active-outlined" | "bell-outlined" | "bell-slash-outlined" | "billing-outlined" | "body-outlined" | "bookmark-added-outlined" | "bookmark-outlined" | "box-check-outlined" | "box-outlined" | "bullet-points" | "cake-outlined" | "calendar-dates-outlined" | "calendar-star-outlined" | "call-split-outlined" | "camera-outlined" | "cancel" | "charging-station-outlined" | "chat-bubble-outlined" | "chat-unread-outlined" | "checkmark" | "circle-add-outlined" | "circle-cancel-outlined" | "circle-down-outlined" | "circle-info-outlined" | "circle-left-outlined" | "circle-ok-outlined" | "circle-question-outlined" | "circle-remove-outlined" | "circle-right-outlined" | "circle-up-outlined" | "circle-warning-outlined" | "clock-2-outlined" | "clock-outlined" | "cog-outlined" | "coin-outlined" | "comment-outlined" | "contacts-outlined" | "contacts-user-outlined" | "credit-card-outlined" | "cup-outlined" | "direction-arrows-outlined" | "directory-outlined" | "document-outlined" | "dollar-box-outlined" | "dollar-card-outlined" | "dollar-coin-shine-outlined" | "dollar-credit-card-outlined" | "dollar-sign" | "double-buildings-outlined" | "double-left-arrows" | "double-right-arrows" | "download-outlined" | "edit-template-outlined" | "email-outlined" | "enter-arrow" | "envelope-outlined" | "expense-outlined" | "explore-outlined" | "external-link" | "eye-invisible-outlined" | "eye-outlined" | "face-id" | "face-meh-outlined" | "face-open-smiley-outlined" | "face-sad-outlined" | "face-smiley-outlined" | "feed-outlined" | "file-certified-outlined" | "file-clone-outlined" | "file-copy-outlined" | "file-dispose-outlined" | "file-dollar-certified-outlined" | "file-dollar-outlined" | "file-download-outlined" | "file-export-outlined" | "file-lock-outlined" | "file-outlined" | "file-search-outlined" | "file-secured-outlined" | "file-statutory-outlined" | "file-verified-outlined" | "filter-outlined" | "folder-outlined" | "folder-user-outlined" | "funnel-filter-outline" | "graph-outlined" | "hand-holding-user-outlined" | "happy-sun-outlined" | "health-bag-outlined" | "heart-outlined" | "home-active-outlined" | "home-outlined" | "id-card-outlined" | "image-outlined" | "import-outlined" | "instapay-outlined" | "italic" | "link-1" | "link-2" | "list-outlined" | "live-help-outlined" | "location-on-outlined" | "location-outlined" | "lock-outlined" | "locked-file-outlined" | "log-out" | "media-content-outlined" | "menu-close" | "menu-expand" | "menu-fold-outlined" | "menu-unfold-outlined" | "moneybag-outlined" | "moon-outlined" | "more-horizontal" | "more-vertical" | "multiple-folders-outlined" | "multiple-users-outlined" | "near-me-outlined" | "node-outlined" | "number-points" | "overview-outlined" | "payment-summary-outlined" | "payslip-outlined" | "pencil-outlined" | "percentage" | "phone-outlined" | "piggy-bank-outlined" | "plane-outlined" | "play-circle-outlined" | "print-outlined" | "qr-code-outlined" | "qualification-outlined" | "re-assign" | "redeem" | "refresh" | "remove" | "reply-outlined" | "restart" | "return-arrow" | "rostering-outlined" | "save-outlined" | "schedule-outlined" | "search-outlined" | "search-secured-outlined" | "send-outlined" | "share-1" | "share-2" | "share-outlined" | "show-chart-outlined" | "single-down-arrow" | "single-left-arrow" | "single-right-arrow" | "single-up-arrow" | "speaker-active-outlined" | "speaker-outlined" | "star-circle-outlined" | "star-outlined" | "stopwatch-outlined" | "strikethrough" | "suitcase-clock-outlined" | "suitcase-outlined" | "survey-outlined" | "switch-outlined" | "sync" | "target-outlined" | "timesheet-outlined" | "today-outlined" | "transfer" | "trash-bin-outlined" | "umbrela-outlined" | "unavailable" | "underline" | "unlock-outlined" | "upload-outlined" | "user-circle-outlined" | "user-gear-outlined" | "user-outlined" | "user-rectangle-outlined" | "video-1-outlined" | "video-2-outlined" | "wallet-outlined";
2
2
  export { isHeroIcon };
@@ -1,14 +1,14 @@
1
1
  import { Animated, View } from 'react-native';
2
- declare const StyledCarouselPaginator: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
2
+ declare const StyledPageControl: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  as?: import("react").ElementType<any> | undefined;
5
5
  }, {}, {
6
6
  ref?: import("react").Ref<View> | undefined;
7
7
  }>;
8
- declare const StyledCarouselPaginatorAnimatedView: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<View>> & {
8
+ declare const StyledPageControlAnimatedView: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<View>> & {
9
9
  children?: import("react").ReactNode;
10
10
  } & {
11
11
  theme?: import("@emotion/react").Theme | undefined;
12
12
  as?: import("react").ElementType<any> | undefined;
13
13
  }, {}, {}>;
14
- export { StyledCarouselPaginator, StyledCarouselPaginatorAnimatedView };
14
+ export { StyledPageControl, StyledPageControlAnimatedView };
@@ -0,0 +1,21 @@
1
+ import { StyleProp, ViewStyle } from 'react-native';
2
+ export interface PageControlProps {
3
+ /**
4
+ * The number of pages to display
5
+ */
6
+ numberOfPages: number;
7
+ /**
8
+ * The current page to display
9
+ */
10
+ currentPage: number;
11
+ /**
12
+ * Additional styles
13
+ */
14
+ style?: StyleProp<ViewStyle>;
15
+ /**
16
+ * Testing id of the component.
17
+ */
18
+ testID?: string;
19
+ }
20
+ declare const PageControl: ({ numberOfPages, currentPage, testID, style, }: PageControlProps) => JSX.Element;
21
+ export default PageControl;
@@ -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' | '6xlarge' | '7xlarge';
6
+ themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxlarge' | 'xxxxxlarge' | '6xlarge' | '7xlarge';
7
7
  themeFontWeight: 'light' | 'regular' | 'semi-bold';
8
8
  themeIntent: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted' | 'archived';
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' | '6xlarge' | '7xlarge';
11
+ fontSize?: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxlarge' | 'xxxxxlarge' | '6xlarge' | '7xlarge';
12
12
  /**
13
13
  * Font weight of the text.
14
14
  */
package/types/index.d.ts CHANGED
@@ -42,5 +42,6 @@ import Toolbar from './components/Toolbar';
42
42
  import Typography from './components/Typography';
43
43
  import RefreshControl from './components/RefreshControl';
44
44
  import RichTextEditor from './components/RichTextEditor';
45
- 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, SwipeableV2, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
45
+ import PageControl from './components/PageControl';
46
+ 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, PageControl, Slider, Spinner, Swipeable, SwipeableV2, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
46
47
  export * from './types';
@@ -1,20 +1,8 @@
1
1
  import type { GlobalTheme } from '../global';
2
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
3
  space: {
15
4
  headingMarginTop: number;
16
5
  headingMarginBottom: number;
17
- paginatorMarginHorizontal: number;
18
6
  footerPaddingHorizontal: number;
19
7
  footerPaddingVertical: number;
20
8
  footerMarginBottom: number;
@@ -0,0 +1,18 @@
1
+ import type { GlobalTheme } from '../global';
2
+ declare const getPageControlTheme: (theme: GlobalTheme) => {
3
+ colors: {
4
+ paginatorBackgroundColor: string;
5
+ };
6
+ sizes: {
7
+ indicatorWidth: number;
8
+ paginatorHeight: number;
9
+ paginatorWidth: number;
10
+ };
11
+ space: {
12
+ paginatorMarginHorizontal: number;
13
+ };
14
+ radii: {
15
+ paginatorBorderRadius: number;
16
+ };
17
+ };
18
+ export default getPageControlTheme;
@@ -19,6 +19,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
19
19
  large: number;
20
20
  xlarge: number;
21
21
  xxxlarge: number;
22
+ xxxxlarge: number;
22
23
  xxxxxlarge: number;
23
24
  '6xlarge': number;
24
25
  '7xlarge': number;
@@ -29,6 +30,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
29
30
  large: number;
30
31
  xlarge: number;
31
32
  xxxlarge: number;
33
+ xxxxlarge: number;
32
34
  xxxxxlarge: number;
33
35
  '6xlarge': number;
34
36
  '7xlarge': number;
@@ -19,6 +19,7 @@ import getFABTheme from './components/fab';
19
19
  import getIconTheme from './components/icon';
20
20
  import getImageTheme from './components/image';
21
21
  import getListTheme from './components/list';
22
+ import getPageControlTheme from './components/pageControl';
22
23
  import getPinInputTheme from './components/pinInput';
23
24
  import getProgressTheme from './components/progress';
24
25
  import getRadioTheme from './components/radio';
@@ -61,6 +62,7 @@ declare type Theme = GlobalTheme & {
61
62
  icon: ReturnType<typeof getIconTheme>;
62
63
  image: ReturnType<typeof getImageTheme>;
63
64
  list: ReturnType<typeof getListTheme>;
65
+ pageControl: ReturnType<typeof getPageControlTheme>;
64
66
  pinInput: ReturnType<typeof getPinInputTheme>;
65
67
  progress: ReturnType<typeof getProgressTheme>;
66
68
  radio: ReturnType<typeof getRadioTheme>;
@@ -8,6 +8,8 @@ interface Radii {
8
8
  medium: number;
9
9
  large: number;
10
10
  xlarge: number;
11
+ xxlarge: number;
12
+ xxxlarge: number;
11
13
  }
12
14
  declare const getBorderWidths: (baseBorderWidth: number) => BorderWidths;
13
15
  declare const getRadii: (baseRadius: number) => Radii;
@@ -1,20 +0,0 @@
1
- import { Animated, View } from 'react-native';
2
- import styled from '@emotion/native';
3
-
4
- const StyledCarouselPaginator = styled(View)(() => ({
5
- flexDirection: 'row',
6
- alignItems: 'center',
7
- marginStart: 'auto',
8
- }));
9
-
10
- const StyledCarouselPaginatorAnimatedView = styled(Animated.View)(
11
- ({ theme }) => ({
12
- height: theme.__hd__.carousel.sizes.paginatorHeight,
13
- width: theme.__hd__.carousel.sizes.paginatorWidth,
14
- borderRadius: theme.__hd__.carousel.radii.paginatorBorderRadius,
15
- backgroundColor: theme.__hd__.carousel.colors.paginatorBackgroundColor,
16
- marginHorizontal: theme.__hd__.carousel.space.paginatorMarginHorizontal,
17
- })
18
- );
19
-
20
- export { StyledCarouselPaginator, StyledCarouselPaginatorAnimatedView };
@@ -1,57 +0,0 @@
1
- import React from 'react';
2
- import { Animated, useWindowDimensions } from 'react-native';
3
-
4
- import {
5
- StyledCarouselPaginatorAnimatedView,
6
- StyledCarouselPaginator,
7
- } from './StyledCarouselPaginator';
8
- import { useTheme } from '../../../theme';
9
-
10
- interface CarouselPaginatorProps {
11
- numberOfSlides: number;
12
- scrollX: Animated.Value;
13
- }
14
- const CarouselPaginator = ({
15
- numberOfSlides,
16
- scrollX,
17
- }: CarouselPaginatorProps) => {
18
- const { width } = useWindowDimensions();
19
- const theme = useTheme();
20
-
21
- return (
22
- <StyledCarouselPaginator>
23
- {new Array(numberOfSlides).fill('').map((_, index) => {
24
- const inputRange = [
25
- (index - 1) * width - 1,
26
- index * width - 1,
27
- (index + 1) * width,
28
- ];
29
-
30
- const indicatorWidth = scrollX.interpolate({
31
- inputRange,
32
- outputRange: [
33
- theme.space.small,
34
- theme.space.large,
35
- theme.space.small,
36
- ],
37
- extrapolate: 'clamp',
38
- });
39
-
40
- const opacity = scrollX.interpolate({
41
- inputRange,
42
- outputRange: [0.5, 1, 0.5],
43
- extrapolate: 'clamp',
44
- });
45
-
46
- return (
47
- <StyledCarouselPaginatorAnimatedView
48
- style={[{ width: indicatorWidth, opacity }]}
49
- key={index.toString()}
50
- />
51
- );
52
- })}
53
- </StyledCarouselPaginator>
54
- );
55
- };
56
-
57
- export default CarouselPaginator;
@@ -1,7 +0,0 @@
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;