@hero-design/rn 7.1.1 → 7.1.2

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 (36) hide show
  1. package/.eslintrc.json +4 -3
  2. package/es/index.js +283 -113
  3. package/lib/index.js +282 -111
  4. package/package.json +4 -3
  5. package/playground/components/BottomNavigation.tsx +69 -0
  6. package/playground/components/Card.tsx +149 -70
  7. package/playground/index.tsx +3 -0
  8. package/rollup.config.js +1 -1
  9. package/src/components/BottomNavigation/StyledBottomNavigation.tsx +58 -0
  10. package/src/components/BottomNavigation/__tests__/BottomNavigation.spec.tsx +95 -0
  11. package/src/components/BottomNavigation/__tests__/__snapshots__/BottomNavigation.spec.tsx.snap +315 -0
  12. package/src/components/BottomNavigation/index.tsx +169 -0
  13. package/src/components/Icon/utils.ts +6 -0
  14. package/src/components/Typography/Text/StyledText.tsx +5 -1
  15. package/src/components/Typography/Text/index.tsx +1 -1
  16. package/src/index.ts +2 -0
  17. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +16 -0
  18. package/src/theme/components/bottomNavigation.ts +23 -0
  19. package/src/theme/components/typography.ts +1 -0
  20. package/src/theme/index.ts +3 -0
  21. package/src/utils/helpers.ts +4 -0
  22. package/types/playground/components/BottomNavigation.d.ts +2 -0
  23. package/types/src/components/BottomNavigation/StyledBottomNavigation.d.ts +17 -0
  24. package/types/src/components/BottomNavigation/__tests__/BottomNavigation.spec.d.ts +1 -0
  25. package/types/src/components/BottomNavigation/index.d.ts +40 -0
  26. package/types/src/components/Icon/utils.d.ts +2 -0
  27. package/types/src/components/Typography/Text/StyledText.d.ts +1 -1
  28. package/types/src/components/Typography/Text/index.d.ts +1 -1
  29. package/types/src/index.d.ts +2 -1
  30. package/types/src/theme/components/bottomNavigation.d.ts +17 -0
  31. package/types/src/theme/components/typography.d.ts +1 -0
  32. package/types/src/theme/index.d.ts +2 -0
  33. package/types/src/utils/helpers.d.ts +2 -0
  34. package/.expo/README.md +0 -15
  35. package/.expo/packager-info.json +0 -10
  36. package/.expo/settings.json +0 -10
@@ -0,0 +1,2 @@
1
+ declare const isHeroIcon: (x: any) => x is "number" | "menu" | "image" | "switch" | "bold" | "target" | "restart" | "directory" | "document" | "feed" | "list" | "loading" | "sync" | "user" | "send" | "file" | "activate" | "add-person" | "adjustment" | "alignment" | "bank" | "bell" | "billing" | "bookmark" | "box-check" | "box" | "buildings" | "cake" | "calendar-clock" | "calendar" | "carat-down-small" | "carat-down" | "carat-left" | "carat-right" | "carat-up" | "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" | "cloud-download" | "cloud-upload" | "cog" | "coin" | "contacts" | "credit-card" | "diamond" | "direction-arrows" | "dollar-coin-shine" | "double-buildings" | "edit-template" | "envelope" | "expense" | "eye-circle" | "eye-invisible" | "eye" | "face-meh" | "face-sad" | "face-smiley" | "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" | "folder-user" | "folder" | "funnel-filter" | "global-dollar" | "globe" | "graduation-cap" | "graph" | "happy-sun" | "health-bag" | "heart" | "home" | "import" | "incident-siren" | "instapay" | "loading-2" | "location" | "lock" | "media-content" | "moneybag" | "moon" | "multiple-stars" | "multiple-users" | "node" | "open-folder" | "paperclip" | "payment-summary" | "pencil" | "phone" | "piggy-bank" | "plane" | "play-circle" | "print" | "raising-hands" | "reply" | "reschedule" | "rostering" | "save" | "schedule" | "search-person" | "speaker" | "star-medal" | "star" | "steps-circle" | "stopwatch" | "suitcase" | "survey" | "tag" | "teams" | "timesheet" | "touch-id" | "trash-bin" | "unlock" | "video-1" | "video-2" | "activate-outlined" | "add-person-outlined" | "add-section-outlined" | "add-time-outlined" | "add" | "adjustment-outlined" | "alignment-2-outlined" | "alignment-outlined" | "all-caps" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "at-sign" | "bell-outlined" | "billing-outlined" | "body-outlined" | "bookmark-outlined" | "box-check-outlined" | "box-outlined" | "bullet-points" | "cake-outlined" | "calendar-dates-outlined" | "calendar-star-outlined" | "camera-outlined" | "cancel" | "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" | "direction-arrows-outlined" | "directory-outlined" | "document-outlined" | "dollar-coin-shine-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" | "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-download-outlined" | "file-export-outlined" | "file-lock-outlined" | "file-outlined" | "file-search-outlined" | "file-secured-outlined" | "file-verified-outlined" | "folder-outlined" | "folder-user-outlined" | "funnel-filter-outline" | "graph-outlined" | "happy-sun-outlined" | "health-bag-outlined" | "heart-outlined" | "home-outlined" | "image-outlined" | "import-outlined" | "instapay-outlined" | "italic" | "link-1" | "link-2" | "list-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" | "node-outlined" | "number-points" | "payment-summary-outlined" | "payslip-outlined" | "pencil-outlined" | "percentage" | "phone-outlined" | "piggy-bank-outlined" | "plane-outlined" | "play-circle-outlined" | "print-outlined" | "qr-code-outlined" | "re-assign" | "refresh" | "remove" | "reply-outlined" | "return-arrow" | "rostering-outlined" | "save-outlined" | "schedule-outlined" | "search-outlined" | "send-outlined" | "share-1" | "share-2" | "single-down-arrow" | "single-left-arrow" | "single-right-arrow" | "single-up-arrow" | "speaker-outlined" | "star-outlined" | "stopwatch-outlined" | "strikethrough" | "survey-outlined" | "switch-outlined" | "target-outlined" | "timesheet-outlined" | "transfer" | "trash-bin-outlined" | "unavailable" | "underline" | "unlock-outlined" | "upload-outlined" | "user-outlined" | "video-1-outlined" | "video-2-outlined";
2
+ export { isHeroIcon };
@@ -2,6 +2,6 @@ import { Text } from 'react-native';
2
2
  declare const StyledText: import("styled-components").StyledComponent<typeof Text, import("../../../theme").Theme, {
3
3
  themeFontSize: 'small' | 'medium' | 'large' | 'xlarge';
4
4
  themeFontWeight: 'light' | 'regular' | 'semi-bold';
5
- themeIntent: 'body' | 'subdued';
5
+ themeIntent: 'body' | 'subdued' | 'primary';
6
6
  }, never>;
7
7
  export { StyledText };
@@ -16,7 +16,7 @@ interface TextProps extends NativeTextProps {
16
16
  /**
17
17
  * Visual intent color to apply to the text.
18
18
  */
19
- intent?: 'body' | 'subdued';
19
+ intent?: 'body' | 'subdued' | 'primary';
20
20
  /**
21
21
  * Addditional style.
22
22
  */
@@ -2,9 +2,10 @@ import { ThemeProvider, useTheme } from 'styled-components-native';
2
2
  import theme, { getTheme } from './theme';
3
3
  import { scale } from './utils/scale';
4
4
  import Badge from './components/Badge';
5
+ import BottomNavigation from './components/BottomNavigation';
5
6
  import Card from './components/Card';
6
7
  import Divider from './components/Divider';
7
8
  import Icon from './components/Icon';
8
9
  import Typography from './components/Typography';
9
10
  import FAB from './components/FAB';
10
- export { theme, getTheme, useTheme, scale, ThemeProvider, Badge, Card, Divider, Icon, Typography, FAB, };
11
+ export { theme, getTheme, useTheme, scale, ThemeProvider, Badge, BottomNavigation, Card, Divider, Icon, Typography, FAB, };
@@ -0,0 +1,17 @@
1
+ import { GlobalTheme } from '../global';
2
+ declare const getBottomNavigationTheme: (theme: GlobalTheme) => {
3
+ colors: {
4
+ shadow: string;
5
+ background: string;
6
+ };
7
+ shadows: {
8
+ offset: string;
9
+ opacity: number;
10
+ radius: string;
11
+ elevation: number;
12
+ };
13
+ sizes: {
14
+ height: number;
15
+ };
16
+ };
17
+ export default getBottomNavigationTheme;
@@ -3,6 +3,7 @@ declare const getTypographyTheme: (theme: GlobalTheme) => {
3
3
  colors: {
4
4
  body: string;
5
5
  subdued: string;
6
+ primary: string;
6
7
  };
7
8
  fontSizes: {
8
9
  small: number;
@@ -1,5 +1,6 @@
1
1
  import { GlobalTheme } from './global';
2
2
  import getBadgeTheme from './components/badge';
3
+ import getBottomNavigationTheme from './components/bottomNavigation';
3
4
  import getCardTheme from './components/card';
4
5
  import getDividerTheme from './components/divider';
5
6
  import getIconTheme from './components/icon';
@@ -8,6 +9,7 @@ import getFABTheme from './components/fab';
8
9
  declare type Theme = GlobalTheme & {
9
10
  __hd__: {
10
11
  badge: ReturnType<typeof getBadgeTheme>;
12
+ bottomNavigation: ReturnType<typeof getBottomNavigationTheme>;
11
13
  card: ReturnType<typeof getCardTheme>;
12
14
  divider: ReturnType<typeof getDividerTheme>;
13
15
  icon: ReturnType<typeof getIconTheme>;
@@ -0,0 +1,2 @@
1
+ export declare const isIOS: boolean;
2
+ export declare const isAndroid: boolean;
package/.expo/README.md DELETED
@@ -1,15 +0,0 @@
1
- > Why do I have a folder named ".expo" in my project?
2
-
3
- The ".expo" folder is created when an Expo project is started using "expo start" command.
4
-
5
- > What do the files contain?
6
-
7
- - "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
8
- - "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
9
- - "settings.json": contains the server configuration that is used to serve the application manifest.
10
-
11
- > Should I commit the ".expo" folder?
12
-
13
- No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
14
-
15
- Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
@@ -1,10 +0,0 @@
1
- {
2
- "devToolsPort": 19002,
3
- "expoServerPort": null,
4
- "packagerPort": null,
5
- "packagerPid": null,
6
- "expoServerNgrokUrl": null,
7
- "packagerNgrokUrl": null,
8
- "ngrokPid": null,
9
- "webpackServerPort": null
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "hostType": "lan",
3
- "lanType": "ip",
4
- "dev": true,
5
- "minify": false,
6
- "urlRandomness": null,
7
- "https": false,
8
- "scheme": null,
9
- "devClient": false
10
- }