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.
- package/.eslintrc.js +33 -0
- package/README.md +5 -0
- package/example/README.md +50 -0
- package/example/app/_layout.tsx +32 -0
- package/example/app/buttonGallery.tsx +49 -0
- package/example/app/dateTimeInputGallery.tsx +28 -0
- package/example/app/index.tsx +58 -0
- package/example/app/selectInputGallery.tsx +45 -0
- package/example/app/sheetGallery.tsx +36 -0
- package/example/app/switchToggleInputGallery.tsx +28 -0
- package/example/app/textGallery.tsx +68 -0
- package/example/app/textInputGallery.tsx +28 -0
- package/example/app.json +37 -0
- package/example/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/example/assets/images/adaptive-icon.png +0 -0
- package/example/assets/images/favicon.png +0 -0
- package/example/assets/images/icon.png +0 -0
- package/example/assets/images/partial-react-logo.png +0 -0
- package/example/assets/images/react-logo.png +0 -0
- package/example/assets/images/react-logo@2x.png +0 -0
- package/example/assets/images/react-logo@3x.png +0 -0
- package/example/assets/images/splash.png +0 -0
- package/example/babel.config.js +6 -0
- package/example/components/Collapsible.tsx +41 -0
- package/example/components/ExternalLink.tsx +24 -0
- package/example/components/ParallaxScrollView.tsx +76 -0
- package/example/components/ThemedText.tsx +60 -0
- package/example/components/ThemedView.tsx +14 -0
- package/example/components/__tests__/ThemedText-test.tsx +10 -0
- package/example/components/__tests__/__snapshots__/ThemedText-test.tsx.snap +24 -0
- package/example/components/navigation/TabBarIcon.js +24 -0
- package/example/components/navigation/TabBarIcon.tsx +9 -0
- package/example/constants/Colors.ts +26 -0
- package/example/hooks/useColorScheme.ts +1 -0
- package/example/hooks/useThemeColor.ts +22 -0
- package/example/ios/.xcode.env +11 -0
- package/example/ios/Podfile +58 -0
- package/example/ios/Podfile.lock +1603 -0
- package/example/ios/Podfile.properties.json +4 -0
- package/example/ios/example/AppDelegate.h +7 -0
- package/example/ios/example/AppDelegate.mm +62 -0
- package/example/ios/example/Images.xcassets/AppIcon.appiconset/App-Icon-1024x1024@1x.png +0 -0
- package/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json +14 -0
- package/example/ios/example/Images.xcassets/Contents.json +6 -0
- package/example/ios/example/Images.xcassets/SplashScreen.imageset/Contents.json +21 -0
- package/example/ios/example/Images.xcassets/SplashScreen.imageset/image.png +0 -0
- package/example/ios/example/Images.xcassets/SplashScreenBackground.imageset/Contents.json +21 -0
- package/example/ios/example/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
- package/example/ios/example/Info.plist +81 -0
- package/example/ios/example/PrivacyInfo.xcprivacy +48 -0
- package/example/ios/example/SplashScreen.storyboard +51 -0
- package/example/ios/example/Supporting/Expo.plist +12 -0
- package/example/ios/example/example-Bridging-Header.h +3 -0
- package/example/ios/example/example.entitlements +5 -0
- package/example/ios/example/main.m +10 -0
- package/example/ios/example/noop-file.swift +4 -0
- package/example/ios/example.xcodeproj/project.pbxproj +555 -0
- package/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme +88 -0
- package/example/ios/example.xcworkspace/contents.xcworkspacedata +10 -0
- package/example/metro.config.js +34 -0
- package/example/package.json +53 -0
- package/example/react-native.config.js +9 -0
- package/example/scripts/reset-project.js +73 -0
- package/example/tsconfig.json +17 -0
- package/example/yarn.lock +8571 -0
- package/package.json +49 -0
- package/src/components/Button/Button.tsx +110 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Button/styles/ButtonStyle.ts +47 -0
- package/src/components/DateTimeInput/index.tsx +172 -0
- package/src/components/DragHandle/index.tsx +49 -0
- package/src/components/MenuItemDescription/MenuItemDescription.tsx +34 -0
- package/src/components/MenuItemDescription/index.ts +1 -0
- package/src/components/NavigationListRow/index.tsx +68 -0
- package/src/components/SelectInput/SelectInput.tsx +191 -0
- package/src/components/SelectInput/index.ts +2 -0
- package/src/components/SelectInput/types.ts +5 -0
- package/src/components/Sheet/index.tsx +189 -0
- package/src/components/SwitchToggle/index.tsx +31 -0
- package/src/components/Text/Text.tsx +74 -0
- package/src/components/Text/index.tsx +2 -0
- package/src/components/TextInput/TextInput.tsx +241 -0
- package/src/components/TextInput/index.tsx +2 -0
- package/src/components/TitleBar/TitleBar.tsx +150 -0
- package/src/components/TitleBar/index.ts +2 -0
- package/src/components/index.ts +11 -0
- package/src/context/index.ts +6 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useTheme.ts +7 -0
- package/src/hooks/useThemedStyle.ts +18 -0
- package/src/index.ts +5 -0
- package/src/shared/styles/index.ts +33 -0
- package/src/themes/AtlasLightTheme.ts +90 -0
- package/src/themes/index.ts +1 -0
- package/src/types/index.ts +3 -0
- package/src/types/theme.ts +45 -0
- package/src/types/typography.ts +14 -0
- 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,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
|
+
});
|