atlas-design-system 1.2.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 (98) hide show
  1. package/.eslintrc.js +33 -0
  2. package/README.md +5 -0
  3. package/example/README.md +50 -0
  4. package/example/app/_layout.tsx +32 -0
  5. package/example/app/buttonGallery.tsx +49 -0
  6. package/example/app/dateTimeInputGallery.tsx +28 -0
  7. package/example/app/index.tsx +58 -0
  8. package/example/app/selectInputGallery.tsx +45 -0
  9. package/example/app/sheetGallery.tsx +36 -0
  10. package/example/app/switchToggleInputGallery.tsx +28 -0
  11. package/example/app/textGallery.tsx +68 -0
  12. package/example/app/textInputGallery.tsx +28 -0
  13. package/example/app.json +37 -0
  14. package/example/assets/fonts/SpaceMono-Regular.ttf +0 -0
  15. package/example/assets/images/adaptive-icon.png +0 -0
  16. package/example/assets/images/favicon.png +0 -0
  17. package/example/assets/images/icon.png +0 -0
  18. package/example/assets/images/partial-react-logo.png +0 -0
  19. package/example/assets/images/react-logo.png +0 -0
  20. package/example/assets/images/react-logo@2x.png +0 -0
  21. package/example/assets/images/react-logo@3x.png +0 -0
  22. package/example/assets/images/splash.png +0 -0
  23. package/example/babel.config.js +6 -0
  24. package/example/components/Collapsible.tsx +41 -0
  25. package/example/components/ExternalLink.tsx +24 -0
  26. package/example/components/ParallaxScrollView.tsx +76 -0
  27. package/example/components/ThemedText.tsx +60 -0
  28. package/example/components/ThemedView.tsx +14 -0
  29. package/example/components/__tests__/ThemedText-test.tsx +10 -0
  30. package/example/components/__tests__/__snapshots__/ThemedText-test.tsx.snap +24 -0
  31. package/example/components/navigation/TabBarIcon.js +24 -0
  32. package/example/components/navigation/TabBarIcon.tsx +9 -0
  33. package/example/constants/Colors.ts +26 -0
  34. package/example/hooks/useColorScheme.ts +1 -0
  35. package/example/hooks/useThemeColor.ts +22 -0
  36. package/example/ios/.xcode.env +11 -0
  37. package/example/ios/Podfile +58 -0
  38. package/example/ios/Podfile.lock +1603 -0
  39. package/example/ios/Podfile.properties.json +4 -0
  40. package/example/ios/example/AppDelegate.h +7 -0
  41. package/example/ios/example/AppDelegate.mm +62 -0
  42. package/example/ios/example/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png +0 -0
  43. package/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json +14 -0
  44. package/example/ios/example/Images.xcassets/Contents.json +6 -0
  45. package/example/ios/example/Images.xcassets/SplashScreen.imageset/Contents.json +21 -0
  46. package/example/ios/example/Images.xcassets/SplashScreen.imageset/image.png +0 -0
  47. package/example/ios/example/Images.xcassets/SplashScreenBackground.imageset/Contents.json +21 -0
  48. package/example/ios/example/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
  49. package/example/ios/example/Info.plist +81 -0
  50. package/example/ios/example/PrivacyInfo.xcprivacy +48 -0
  51. package/example/ios/example/SplashScreen.storyboard +51 -0
  52. package/example/ios/example/Supporting/Expo.plist +12 -0
  53. package/example/ios/example/example-Bridging-Header.h +3 -0
  54. package/example/ios/example/example.entitlements +5 -0
  55. package/example/ios/example/main.m +10 -0
  56. package/example/ios/example/noop-file.swift +4 -0
  57. package/example/ios/example.xcodeproj/project.pbxproj +555 -0
  58. package/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme +88 -0
  59. package/example/ios/example.xcworkspace/contents.xcworkspacedata +10 -0
  60. package/example/metro.config.js +34 -0
  61. package/example/package.json +53 -0
  62. package/example/react-native.config.js +9 -0
  63. package/example/scripts/reset-project.js +73 -0
  64. package/example/tsconfig.json +17 -0
  65. package/example/yarn.lock +8571 -0
  66. package/package.json +49 -0
  67. package/src/components/Button/Button.tsx +110 -0
  68. package/src/components/Button/index.ts +2 -0
  69. package/src/components/Button/styles/ButtonStyle.ts +47 -0
  70. package/src/components/DateTimeInput/index.tsx +172 -0
  71. package/src/components/DragHandle/index.tsx +49 -0
  72. package/src/components/MenuItemDescription/MenuItemDescription.tsx +34 -0
  73. package/src/components/MenuItemDescription/index.ts +1 -0
  74. package/src/components/NavigationListRow/index.tsx +68 -0
  75. package/src/components/SelectInput/SelectInput.tsx +191 -0
  76. package/src/components/SelectInput/index.ts +2 -0
  77. package/src/components/SelectInput/types.ts +5 -0
  78. package/src/components/Sheet/index.tsx +189 -0
  79. package/src/components/SwitchToggle/index.tsx +31 -0
  80. package/src/components/Text/Text.tsx +74 -0
  81. package/src/components/Text/index.tsx +2 -0
  82. package/src/components/TextInput/TextInput.tsx +241 -0
  83. package/src/components/TextInput/index.tsx +2 -0
  84. package/src/components/TitleBar/TitleBar.tsx +150 -0
  85. package/src/components/TitleBar/index.ts +2 -0
  86. package/src/components/index.ts +11 -0
  87. package/src/context/index.ts +6 -0
  88. package/src/hooks/index.ts +2 -0
  89. package/src/hooks/useTheme.ts +7 -0
  90. package/src/hooks/useThemedStyle.ts +18 -0
  91. package/src/index.ts +5 -0
  92. package/src/shared/styles/index.ts +33 -0
  93. package/src/themes/AtlasLightTheme.ts +90 -0
  94. package/src/themes/index.ts +1 -0
  95. package/src/types/index.ts +3 -0
  96. package/src/types/theme.ts +45 -0
  97. package/src/types/typography.ts +14 -0
  98. package/tsconfig.json +111 -0
@@ -0,0 +1,34 @@
1
+ var path = require("path");
2
+ const { getDefaultConfig } = require("expo/metro-config");
3
+
4
+ // const extraNodeModules = {
5
+ // "atlas-design-system": path.resolve(__dirname, "../src"),
6
+ // react: path.resolve(__dirname, "node_modules/react"),
7
+ // "react-native": path.resolve(__dirname, "node_modules/react-native"),
8
+ // };
9
+
10
+ const extraNodeModules = new Proxy(
11
+ {
12
+ "atlas-design-system": path.resolve(__dirname, "../src"),
13
+ // Redirect any imports of 'react' or 'react-native' to the example app's node_modules
14
+ react: path.resolve(__dirname, "node_modules/react"),
15
+ "react-native": path.resolve(__dirname, "node_modules/react-native"),
16
+ "moment": path.resolve(__dirname, "node_modules/moment"),
17
+ },
18
+ {
19
+ get: (target, name) =>
20
+ name in target
21
+ ? target[name]
22
+ : path.join(process.cwd(), `node_modules/${name}`),
23
+ }
24
+ );
25
+
26
+ const watchFolders = [path.resolve(__dirname, "../src")];
27
+
28
+ /** @type {import('expo/metro-config').MetroConfig} */
29
+ const config = getDefaultConfig(__dirname);
30
+
31
+ config.resolver.extraNodeModules = extraNodeModules;
32
+ config.watchFolders = watchFolders;
33
+
34
+ module.exports = config;
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "example",
3
+ "main": "expo-router/entry",
4
+ "version": "1.0.0",
5
+ "scripts": {
6
+ "start": "expo start",
7
+ "reset-project": "node ./scripts/reset-project.js",
8
+ "android": "expo run:android",
9
+ "ios": "expo run:ios",
10
+ "web": "expo start --web",
11
+ "test": "jest --watchAll",
12
+ "lint": "expo lint"
13
+ },
14
+ "jest": {
15
+ "preset": "jest-expo"
16
+ },
17
+ "dependencies": {
18
+ "@expo/vector-icons": "^14.0.2",
19
+ "@react-native-community/datetimepicker": "~8.0.1",
20
+ "@react-navigation/native": "^6.0.2",
21
+ "expo": "~51.0.24",
22
+ "expo-constants": "~16.0.2",
23
+ "expo-font": "~12.0.9",
24
+ "expo-linking": "~6.3.1",
25
+ "expo-router": "~3.5.20",
26
+ "expo-splash-screen": "~0.27.5",
27
+ "expo-status-bar": "~1.12.1",
28
+ "expo-system-ui": "~3.0.7",
29
+ "expo-web-browser": "~13.0.3",
30
+ "moment": "^2.30.1",
31
+ "react": "18.2.0",
32
+ "react-dom": "18.2.0",
33
+ "react-native": "0.74.3",
34
+ "react-native-gesture-handler": "~2.16.1",
35
+ "react-native-reanimated": "~3.10.1",
36
+ "react-native-safe-area-context": "4.10.5",
37
+ "react-native-screens": "3.31.1",
38
+ "react-native-vector-icons": "^10.1.0",
39
+ "react-native-web": "~0.19.10"
40
+ },
41
+ "devDependencies": {
42
+ "@babel/core": "^7.20.0",
43
+ "@types/jest": "^29.5.12",
44
+ "@types/react": "~18.2.45",
45
+ "@types/react-test-renderer": "^18.0.7",
46
+ "babel-plugin-module-resolver": "^5.0.2",
47
+ "jest": "^29.2.1",
48
+ "jest-expo": "~51.0.3",
49
+ "react-test-renderer": "18.2.0",
50
+ "typescript": "~5.3.3"
51
+ },
52
+ "private": true
53
+ }
@@ -0,0 +1,9 @@
1
+ module.exports = {
2
+ dependencies: {
3
+ 'react-native-vector-icons': {
4
+ platforms: {
5
+ ios: null,
6
+ },
7
+ },
8
+ },
9
+ };
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * This script is used to reset the project to a blank state.
5
+ * It moves the /app directory to /app-example and creates a new /app directory with an index.tsx and _layout.tsx file.
6
+ * You can remove the `reset-project` script from package.json and safely delete this file after running it.
7
+ */
8
+
9
+ const fs = require('fs');
10
+ const path = require('path');
11
+
12
+ const root = process.cwd();
13
+ const oldDirPath = path.join(root, 'app');
14
+ const newDirPath = path.join(root, 'app-example');
15
+ const newAppDirPath = path.join(root, 'app');
16
+
17
+ const indexContent = `import { Text, View } from "react-native";
18
+
19
+ export default function Index() {
20
+ return (
21
+ <View
22
+ style={{
23
+ flex: 1,
24
+ justifyContent: "center",
25
+ alignItems: "center",
26
+ }}
27
+ >
28
+ <Text>Edit app/index.tsx to edit this screen.</Text>
29
+ </View>
30
+ );
31
+ }
32
+ `;
33
+
34
+ const layoutContent = `import { Stack } from "expo-router";
35
+
36
+ export default function RootLayout() {
37
+ return (
38
+ <Stack>
39
+ <Stack.Screen name="index" />
40
+ </Stack>
41
+ );
42
+ }
43
+ `;
44
+
45
+ fs.rename(oldDirPath, newDirPath, (error) => {
46
+ if (error) {
47
+ return console.error(`Error renaming directory: ${error}`);
48
+ }
49
+ console.log('/app moved to /app-example.');
50
+
51
+ fs.mkdir(newAppDirPath, { recursive: true }, (error) => {
52
+ if (error) {
53
+ return console.error(`Error creating new app directory: ${error}`);
54
+ }
55
+ console.log('New /app directory created.');
56
+
57
+ const indexPath = path.join(newAppDirPath, 'index.tsx');
58
+ fs.writeFile(indexPath, indexContent, (error) => {
59
+ if (error) {
60
+ return console.error(`Error creating index.tsx: ${error}`);
61
+ }
62
+ console.log('app/index.tsx created.');
63
+
64
+ const layoutPath = path.join(newAppDirPath, '_layout.tsx');
65
+ fs.writeFile(layoutPath, layoutContent, (error) => {
66
+ if (error) {
67
+ return console.error(`Error creating _layout.tsx: ${error}`);
68
+ }
69
+ console.log('app/_layout.tsx created.');
70
+ });
71
+ });
72
+ });
73
+ });
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "expo/tsconfig.base",
3
+ "compilerOptions": {
4
+ "strict": true,
5
+ "paths": {
6
+ "@/*": [
7
+ "./*"
8
+ ]
9
+ }
10
+ },
11
+ "include": [
12
+ "**/*.ts",
13
+ "**/*.tsx",
14
+ ".expo/types/**/*.ts",
15
+ "expo-env.d.ts"
16
+ ]
17
+ }