@hero-design/rn 7.7.0 → 7.9.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/.turbo/turbo-build.log +2 -2
- package/es/index.js +1775 -333
- package/lib/index.js +1780 -336
- package/package.json +4 -8
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Avatar/index.tsx +1 -1
- package/src/components/Button/Button.tsx +4 -2
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +7 -2
- package/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.tsx +2 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +40 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +242 -0
- package/src/components/Button/LoadingIndicator/__tests__/index.spec.tsx +2 -0
- package/src/components/Button/LoadingIndicator/index.tsx +3 -1
- package/src/components/Button/StyledButton.tsx +15 -2
- package/src/components/Button/__tests__/Button.spec.tsx +2 -0
- package/src/components/Button/__tests__/StyledButton.spec.tsx +12 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +314 -0
- package/src/components/Card/DataCard/StyledDataCard.tsx +18 -0
- package/src/components/Card/DataCard/__tests__/StyledDataCard.spec.tsx +24 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +96 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +151 -0
- package/src/components/Card/DataCard/__tests__/index.spec.tsx +30 -0
- package/src/components/Card/DataCard/index.tsx +35 -0
- package/src/components/Card/StyledCard.tsx +1 -3
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +0 -1
- package/src/components/Card/index.tsx +7 -2
- package/src/components/Checkbox/index.tsx +1 -1
- package/src/components/Collapse/index.tsx +1 -1
- package/src/components/Icon/HeroIcon/index.tsx +3 -1
- package/src/components/Icon/index.tsx +3 -2
- package/src/components/List/BasicListItem.tsx +98 -0
- package/src/components/List/ListItem.tsx +142 -0
- package/src/components/List/StyledBasicListItem.tsx +34 -0
- package/src/components/List/StyledListItem.tsx +82 -0
- package/src/components/List/__tests__/BasicListItem.spec.tsx +37 -0
- package/src/components/List/__tests__/ListItem.spec.tsx +110 -0
- package/src/components/List/__tests__/StyledBasicListItem.spec.tsx +24 -0
- package/src/components/List/__tests__/StyledListItem.spec.tsx +48 -0
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +103 -0
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +760 -0
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +105 -0
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +200 -0
- package/src/components/List/index.tsx +14 -0
- package/src/components/SectionHeading/index.tsx +1 -1
- package/src/components/Select/Footer.tsx +13 -0
- package/src/components/Select/MultiSelect/Option.tsx +25 -0
- package/src/components/Select/MultiSelect/OptionList.tsx +30 -63
- package/src/components/Select/MultiSelect/__tests__/Option.spec.tsx +16 -0
- package/src/components/Select/MultiSelect/__tests__/OptionList.spec.tsx +42 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +70 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +627 -0
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +6 -6
- package/src/components/Select/MultiSelect/index.tsx +8 -7
- package/src/components/Select/SingleSelect/Option.tsx +23 -0
- package/src/components/Select/SingleSelect/OptionList.tsx +43 -0
- package/src/components/Select/SingleSelect/__tests__/Option.spec.tsx +16 -0
- package/src/components/Select/SingleSelect/__tests__/OptionList.spec.tsx +42 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +56 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +571 -0
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +1430 -0
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +89 -0
- package/src/components/Select/SingleSelect/index.tsx +89 -0
- package/src/components/Select/{MultiSelect/StyledMultiSelect.tsx → StyledSelect.tsx} +1 -1
- package/src/components/Select/{MultiSelect/__tests__/StyledMultiSelect.spec.tsx → __tests__/StyledSelect.spec.tsx} +2 -2
- package/src/components/Select/{MultiSelect/__tests__/__snapshots__/StyledMultiSelect.spec.tsx.snap → __tests__/__snapshots__/StyledSelect.spec.tsx.snap} +0 -0
- package/src/components/Select/helpers.tsx +18 -0
- package/src/components/Select/index.tsx +4 -3
- package/src/components/Select/{MultiSelect/types.ts → types.ts} +0 -0
- package/src/components/Switch/index.tsx +1 -1
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +2 -2
- package/src/components/Toolbar/StyledToolbar.tsx +42 -0
- package/src/components/Toolbar/ToolbarGroup.tsx +31 -0
- package/src/components/Toolbar/ToolbarItem.tsx +57 -0
- package/src/components/Toolbar/__tests__/ToolbarGroup.spec.tsx +32 -0
- package/src/components/Toolbar/__tests__/ToolbarItem.spec.tsx +57 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +391 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +355 -0
- package/src/components/Toolbar/index.tsx +18 -0
- package/src/components/Typography/Text/StyledText.tsx +8 -1
- package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +5 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +110 -0
- package/src/components/Typography/Text/index.tsx +9 -2
- package/src/index.ts +4 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +83 -3
- package/src/theme/components/button.ts +2 -0
- package/src/theme/components/card.ts +13 -2
- package/src/theme/components/icon.ts +1 -0
- package/src/theme/components/list.ts +46 -0
- package/src/theme/components/toolbar.ts +27 -0
- package/src/theme/components/typography.ts +4 -0
- package/src/theme/global/colors.ts +9 -2
- package/src/theme/global/space.ts +2 -0
- package/src/theme/index.ts +6 -0
- package/tsconfig.json +1 -2
- package/types/components/Avatar/index.d.ts +1 -1
- package/types/components/Button/Button.d.ts +2 -2
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +1 -1
- package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +2 -2
- package/types/components/Card/DataCard/StyledDataCard.d.ts +16 -0
- package/types/components/{Select/MultiSelect/__tests__/StyledMultiSelect.spec.d.ts → Card/DataCard/__tests__/StyledDataCard.spec.d.ts} +0 -0
- package/types/components/Card/DataCard/__tests__/index.spec.d.ts +1 -0
- package/types/components/Card/DataCard/index.d.ts +22 -0
- package/types/components/Card/index.d.ts +7 -3
- package/types/components/Checkbox/index.d.ts +1 -1
- package/types/components/Collapse/index.d.ts +1 -1
- package/types/components/Icon/HeroIcon/index.d.ts +1 -1
- package/types/components/Icon/index.d.ts +2 -2
- package/types/components/List/BasicListItem.d.ts +43 -0
- package/types/components/List/ListItem.d.ts +51 -0
- package/types/components/List/StyledBasicListItem.d.ts +29 -0
- package/types/components/List/StyledListItem.d.ts +51 -0
- package/types/components/List/__tests__/BasicListItem.spec.d.ts +1 -0
- package/types/components/List/__tests__/ListItem.spec.d.ts +1 -0
- package/types/components/List/__tests__/StyledBasicListItem.spec.d.ts +1 -0
- package/types/components/List/__tests__/StyledListItem.spec.d.ts +1 -0
- package/types/components/List/index.d.ts +8 -0
- package/types/components/SectionHeading/index.d.ts +1 -1
- package/types/components/Select/{MultiSelect/Footer.d.ts → Footer.d.ts} +2 -2
- package/types/components/Select/MultiSelect/Option.d.ts +6 -0
- package/types/components/Select/MultiSelect/OptionList.d.ts +7 -1
- package/types/components/Select/MultiSelect/__tests__/Option.spec.d.ts +1 -0
- package/types/components/Select/MultiSelect/__tests__/OptionList.spec.d.ts +1 -0
- package/types/components/Select/MultiSelect/index.d.ts +4 -4
- package/types/components/Select/SingleSelect/Option.d.ts +6 -0
- package/types/components/Select/SingleSelect/OptionList.d.ts +9 -0
- package/types/components/Select/SingleSelect/__tests__/Option.spec.d.ts +1 -0
- package/types/components/Select/SingleSelect/__tests__/OptionList.spec.d.ts +1 -0
- package/types/components/Select/SingleSelect/__tests__/index.spec.d.ts +1 -0
- package/types/components/Select/SingleSelect/index.d.ts +35 -0
- package/types/components/Select/{MultiSelect/StyledMultiSelect.d.ts → StyledSelect.d.ts} +1 -1
- package/types/components/Select/__tests__/StyledSelect.spec.d.ts +1 -0
- package/types/components/Select/helpers.d.ts +2 -0
- package/types/components/Select/index.d.ts +3 -3
- package/types/components/Select/{MultiSelect/types.d.ts → types.d.ts} +0 -0
- package/types/components/Switch/index.d.ts +1 -1
- package/types/components/Toolbar/StyledToolbar.d.ts +22 -0
- package/types/components/Toolbar/ToolbarGroup.d.ts +13 -0
- package/types/components/Toolbar/ToolbarItem.d.ts +25 -0
- package/types/components/Toolbar/__tests__/ToolbarGroup.spec.d.ts +1 -0
- package/types/components/Toolbar/__tests__/ToolbarItem.spec.d.ts +1 -0
- package/types/components/Toolbar/index.d.ts +11 -0
- package/types/components/Typography/Text/StyledText.d.ts +1 -1
- package/types/components/Typography/Text/index.d.ts +2 -2
- package/types/index.d.ts +3 -1
- package/types/theme/components/button.d.ts +2 -0
- package/types/theme/components/card.d.ts +10 -0
- package/types/theme/components/icon.d.ts +1 -0
- package/types/theme/components/list.d.ts +40 -0
- package/types/theme/components/toolbar.d.ts +21 -0
- package/types/theme/components/typography.d.ts +4 -0
- package/types/theme/global/colors.d.ts +5 -0
- package/types/theme/global/index.d.ts +5 -0
- package/types/theme/global/space.d.ts +1 -0
- package/types/theme/index.d.ts +4 -0
- package/playground/.detoxrc.json +0 -49
- package/playground/.prettierrc.json +0 -8
- package/playground/.turbo/turbo-type-check.log +0 -7
- package/playground/app.json +0 -9
- package/playground/babel.config.js +0 -63
- package/playground/e2e/config.json +0 -9
- package/playground/e2e/environment.js +0 -23
- package/playground/e2e/firstTest.e2e.js +0 -16
- package/playground/expoEntry.js +0 -5
- package/playground/fonts/be-vietnam-pro-light.ttf +0 -0
- package/playground/fonts/be-vietnam-pro-regular.ttf +0 -0
- package/playground/fonts/be-vietnam-pro-semibold.ttf +0 -0
- package/playground/fonts/hero-icons.ttf +0 -0
- package/playground/index.js +0 -7
- package/playground/ios/MobileHeroDesignPlayground/AppDelegate.h +0 -9
- package/playground/ios/MobileHeroDesignPlayground/AppDelegate.m +0 -75
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/Contents.json +0 -6
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/Contents.json +0 -21
- package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/SplashScreenBackground.imageset/image.png +0 -0
- package/playground/ios/MobileHeroDesignPlayground/Info.plist +0 -85
- package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground-Bridging-Header.h +0 -3
- package/playground/ios/MobileHeroDesignPlayground/MobileHeroDesignPlayground.entitlements +0 -8
- package/playground/ios/MobileHeroDesignPlayground/SplashScreen.storyboard +0 -40
- package/playground/ios/MobileHeroDesignPlayground/Supporting/Expo.plist +0 -16
- package/playground/ios/MobileHeroDesignPlayground/main.m +0 -10
- package/playground/ios/MobileHeroDesignPlayground/noop-file.swift +0 -4
- package/playground/ios/MobileHeroDesignPlayground.xcodeproj/project.pbxproj +0 -515
- package/playground/ios/MobileHeroDesignPlayground.xcodeproj/xcshareddata/xcschemes/MobileHeroDesignPlayground.xcscheme +0 -88
- package/playground/ios/MobileHeroDesignPlayground.xcworkspace/contents.xcworkspacedata +0 -10
- package/playground/ios/MobileHeroDesignPlayground.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/playground/ios/Podfile +0 -49
- package/playground/ios/Podfile.lock +0 -478
- package/playground/ios/Podfile.properties.json +0 -3
- package/playground/metro.config.js +0 -24
- package/playground/package.json +0 -63
- package/playground/src/Alert.tsx +0 -80
- package/playground/src/App.tsx +0 -210
- package/playground/src/Avatar.tsx +0 -102
- package/playground/src/Badge.tsx +0 -187
- package/playground/src/BottomNavigation.tsx +0 -72
- package/playground/src/BottomSheet.tsx +0 -43
- package/playground/src/Button.tsx +0 -170
- package/playground/src/Card.tsx +0 -342
- package/playground/src/Checkbox.tsx +0 -55
- package/playground/src/Collapse.tsx +0 -99
- package/playground/src/ContentNavigator.tsx +0 -58
- package/playground/src/Divider.tsx +0 -13
- package/playground/src/Drawer.tsx +0 -32
- package/playground/src/FAB.tsx +0 -66
- package/playground/src/Icon.tsx +0 -144
- package/playground/src/IconButton.tsx +0 -78
- package/playground/src/MultipleThemes.tsx +0 -34
- package/playground/src/Progress.tsx +0 -95
- package/playground/src/Radio.tsx +0 -25
- package/playground/src/SectionHeading.tsx +0 -68
- package/playground/src/Select.tsx +0 -32
- package/playground/src/Spinner.tsx +0 -19
- package/playground/src/Switch.tsx +0 -80
- package/playground/src/Tabs.tsx +0 -136
- package/playground/src/Tag.tsx +0 -45
- package/playground/src/TextInput.tsx +0 -14
- package/playground/src/Toast.tsx +0 -114
- package/playground/src/Typography.tsx +0 -23
- package/playground/tsconfig.json +0 -21
- package/src/components/Select/MultiSelect/Footer.tsx +0 -15
package/types/theme/index.d.ts
CHANGED
|
@@ -22,7 +22,9 @@ import getTabsTheme from './components/tabs';
|
|
|
22
22
|
import getTagTheme from './components/tag';
|
|
23
23
|
import getTextInputTheme from './components/textInput';
|
|
24
24
|
import getToastTheme from './components/toast';
|
|
25
|
+
import getToolbarTheme from './components/toolbar';
|
|
25
26
|
import getTypographyTheme from './components/typography';
|
|
27
|
+
import getListTheme from './components/list';
|
|
26
28
|
declare type Theme = GlobalTheme & {
|
|
27
29
|
__hd__: {
|
|
28
30
|
alert: ReturnType<typeof getAlertTheme>;
|
|
@@ -48,7 +50,9 @@ declare type Theme = GlobalTheme & {
|
|
|
48
50
|
tag: ReturnType<typeof getTagTheme>;
|
|
49
51
|
textInput: ReturnType<typeof getTextInputTheme>;
|
|
50
52
|
toast: ReturnType<typeof getToastTheme>;
|
|
53
|
+
toolbar: ReturnType<typeof getToolbarTheme>;
|
|
51
54
|
typography: ReturnType<typeof getTypographyTheme>;
|
|
55
|
+
list: ReturnType<typeof getListTheme>;
|
|
52
56
|
};
|
|
53
57
|
};
|
|
54
58
|
declare const getTheme: (scale?: Scale, systemPallete?: SystemPalette) => Theme;
|
package/playground/.detoxrc.json
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"testRunner": "jest",
|
|
3
|
-
"runnerConfig": "e2e/config.json",
|
|
4
|
-
"skipLegacyWorkersInjection": true,
|
|
5
|
-
"apps": {
|
|
6
|
-
"ios": {
|
|
7
|
-
"type": "ios.app",
|
|
8
|
-
"binaryPath": "SPECIFY_PATH_TO_YOUR_APP_BINARY"
|
|
9
|
-
},
|
|
10
|
-
"android": {
|
|
11
|
-
"type": "android.apk",
|
|
12
|
-
"binaryPath": "SPECIFY_PATH_TO_YOUR_APP_BINARY"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"devices": {
|
|
16
|
-
"simulator": {
|
|
17
|
-
"type": "ios.simulator",
|
|
18
|
-
"device": {
|
|
19
|
-
"type": "iPhone 11"
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"emulator": {
|
|
23
|
-
"type": "android.emulator",
|
|
24
|
-
"device": {
|
|
25
|
-
"avdName": "Pixel_3a_API_30_x86"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"configurations": {
|
|
30
|
-
"ios.sim.debug": {
|
|
31
|
-
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/MobileHeroDesignPlayground.app",
|
|
32
|
-
"build": "E2E_TEST=true xcodebuild -workspace ios/MobileHeroDesignPlayground.xcworkspace -configuration Debug -scheme MobileHeroDesignPlayground -derivedDataPath ios/build -sdk iphonesimulator -verbose",
|
|
33
|
-
"type": "ios.simulator",
|
|
34
|
-
"device": {
|
|
35
|
-
"type": "iPhone 13",
|
|
36
|
-
"os": "iOS 15.4"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"ios.sim.release": {
|
|
40
|
-
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/MobileHeroDesignPlayground.app",
|
|
41
|
-
"build": "E2E_TEST=true xcodebuild -workspace ios/MobileHeroDesignPlayground.xcworkspace -configuration Release -scheme MobileHeroDesignPlayground -derivedDataPath ios/build -sdk iphonesimulator -verbose",
|
|
42
|
-
"type": "ios.simulator",
|
|
43
|
-
"device": {
|
|
44
|
-
"type": "iPhone 13",
|
|
45
|
-
"os": "iOS 15.4"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
[36m@hero-design/playground:type-check[0m: cache hit, replaying output [2m7c10418dc02a32a7[0m
|
|
2
|
-
[36m@hero-design/playground:type-check: [0mwarning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
|
|
3
|
-
[36m@hero-design/playground:type-check: [0m$ tsc --noEmit --w
|
|
4
|
-
[36m@hero-design/playground:type-check: [0mc2:47:14 PM - Starting compilation in watch mode...
|
|
5
|
-
[36m@hero-design/playground:type-check: [0m
|
|
6
|
-
[36m@hero-design/playground:type-check: [0m
|
|
7
|
-
[36m@hero-design/playground:type-check: [0m2:47:15 PM - Found 0 errors. Watching for file changes.
|
package/playground/app.json
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
|
|
3
|
-
function isE2ETest() {
|
|
4
|
-
return process.env.E2E_TEST === 'true';
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
module.exports = api => {
|
|
8
|
-
const babelEnv = api.env();
|
|
9
|
-
const plugins = [];
|
|
10
|
-
const presets = [];
|
|
11
|
-
|
|
12
|
-
// resolve issue TypeError: Class constructor DetoxCircusEnvironment cannot be invoked without 'new'
|
|
13
|
-
if (babelEnv === 'test') {
|
|
14
|
-
presets.push(['@babel/preset-env']);
|
|
15
|
-
plugins.push(['@babel/plugin-transform-runtime']);
|
|
16
|
-
} else {
|
|
17
|
-
presets.push(['module:metro-react-native-babel-preset']);
|
|
18
|
-
presets.push(['babel-preset-expo']);
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
presets: ['@babel/preset-typescript', ...presets],
|
|
22
|
-
plugins: [
|
|
23
|
-
...plugins,
|
|
24
|
-
[
|
|
25
|
-
'module-resolver',
|
|
26
|
-
{
|
|
27
|
-
alias: {
|
|
28
|
-
'^react$': require.resolve('react', {
|
|
29
|
-
paths: [path.join(__dirname, './')],
|
|
30
|
-
}),
|
|
31
|
-
'^react-native$': require.resolve('react-native', {
|
|
32
|
-
paths: [path.join(__dirname, './')],
|
|
33
|
-
}),
|
|
34
|
-
'^react-native/(.+)': ([, name]) =>
|
|
35
|
-
require.resolve(`react-native/${name}`, {
|
|
36
|
-
paths: [path.join(__dirname, './')],
|
|
37
|
-
}),
|
|
38
|
-
'react-native-safe-area-context': require.resolve(
|
|
39
|
-
'react-native-safe-area-context',
|
|
40
|
-
{
|
|
41
|
-
paths: [path.join(__dirname, './')],
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
},
|
|
45
|
-
extensions: [
|
|
46
|
-
'.ios.js',
|
|
47
|
-
'.ios.ts',
|
|
48
|
-
'.ios.tsx',
|
|
49
|
-
'.android.js',
|
|
50
|
-
'.android.ts',
|
|
51
|
-
'.android.tsx',
|
|
52
|
-
'.native.js',
|
|
53
|
-
'.native.ts',
|
|
54
|
-
'.native.tsx',
|
|
55
|
-
'.js',
|
|
56
|
-
'.ts',
|
|
57
|
-
'.tsx',
|
|
58
|
-
],
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
],
|
|
62
|
-
};
|
|
63
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const {
|
|
2
|
-
DetoxCircusEnvironment,
|
|
3
|
-
SpecReporter,
|
|
4
|
-
WorkerAssignReporter,
|
|
5
|
-
} = require('detox/runners/jest-circus');
|
|
6
|
-
|
|
7
|
-
class CustomDetoxEnvironment extends DetoxCircusEnvironment {
|
|
8
|
-
constructor(config, context) {
|
|
9
|
-
super(config, context);
|
|
10
|
-
|
|
11
|
-
// Can be safely removed, if you are content with the default value (=300000ms)
|
|
12
|
-
this.initTimeout = 300000;
|
|
13
|
-
|
|
14
|
-
// This takes care of generating status logs on a per-spec basis. By default, Jest only reports at file-level.
|
|
15
|
-
// This is strictly optional.
|
|
16
|
-
this.registerListeners({
|
|
17
|
-
SpecReporter,
|
|
18
|
-
WorkerAssignReporter,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
module.exports = CustomDetoxEnvironment;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
describe('Example', () => {
|
|
2
|
-
beforeAll(async () => {
|
|
3
|
-
await device.launchApp();
|
|
4
|
-
});
|
|
5
|
-
|
|
6
|
-
beforeEach(async () => {
|
|
7
|
-
await device.reloadReactNative();
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
it('should go to Badge screen', async () => {
|
|
11
|
-
await waitFor(element(by.label('Badge')))
|
|
12
|
-
.toExist()
|
|
13
|
-
.withTimeout(60000);
|
|
14
|
-
await element(by.label('Badge')).tap();
|
|
15
|
-
});
|
|
16
|
-
});
|
package/playground/expoEntry.js
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/playground/index.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
#import "AppDelegate.h"
|
|
2
|
-
|
|
3
|
-
#import <React/RCTBridge.h>
|
|
4
|
-
#import <React/RCTBundleURLProvider.h>
|
|
5
|
-
#import <React/RCTRootView.h>
|
|
6
|
-
#import <React/RCTLinkingManager.h>
|
|
7
|
-
#import <React/RCTConvert.h>
|
|
8
|
-
|
|
9
|
-
#if defined(FB_SONARKIT_ENABLED) && __has_include(<FlipperKit/FlipperClient.h>)
|
|
10
|
-
#import <FlipperKit/FlipperClient.h>
|
|
11
|
-
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
|
|
12
|
-
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
|
|
13
|
-
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
|
|
14
|
-
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
|
|
15
|
-
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
|
|
16
|
-
|
|
17
|
-
static void InitializeFlipper(UIApplication *application) {
|
|
18
|
-
FlipperClient *client = [FlipperClient sharedClient];
|
|
19
|
-
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
|
|
20
|
-
[client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
|
|
21
|
-
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
|
|
22
|
-
[client addPlugin:[FlipperKitReactPlugin new]];
|
|
23
|
-
[client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
|
|
24
|
-
[client start];
|
|
25
|
-
}
|
|
26
|
-
#endif
|
|
27
|
-
|
|
28
|
-
@implementation AppDelegate
|
|
29
|
-
|
|
30
|
-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
|
31
|
-
{
|
|
32
|
-
#if defined(FB_SONARKIT_ENABLED) && __has_include(<FlipperKit/FlipperClient.h>)
|
|
33
|
-
InitializeFlipper(application);
|
|
34
|
-
#endif
|
|
35
|
-
|
|
36
|
-
RCTBridge *bridge = [self.reactDelegate createBridgeWithDelegate:self launchOptions:launchOptions];
|
|
37
|
-
RCTRootView *rootView = [self.reactDelegate createRootViewWithBridge:bridge moduleName:@"main" initialProperties:nil];
|
|
38
|
-
rootView.backgroundColor = [UIColor whiteColor];
|
|
39
|
-
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
|
40
|
-
UIViewController *rootViewController = [self.reactDelegate createRootViewController];
|
|
41
|
-
rootViewController.view = rootView;
|
|
42
|
-
self.window.rootViewController = rootViewController;
|
|
43
|
-
[self.window makeKeyAndVisible];
|
|
44
|
-
|
|
45
|
-
[super application:application didFinishLaunchingWithOptions:launchOptions];
|
|
46
|
-
|
|
47
|
-
return YES;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
|
|
51
|
-
{
|
|
52
|
-
// If you'd like to export some custom RCTBridgeModules, add them here!
|
|
53
|
-
return @[];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
|
|
57
|
-
#ifdef DEBUG
|
|
58
|
-
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
|
59
|
-
#else
|
|
60
|
-
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
|
|
61
|
-
#endif
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Linking API
|
|
65
|
-
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
|
|
66
|
-
return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options];
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Universal Links
|
|
70
|
-
- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
|
|
71
|
-
BOOL result = [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
|
|
72
|
-
return [super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || result;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
@end
|
package/playground/ios/MobileHeroDesignPlayground/Images.xcassets/AppIcon.appiconset/Contents.json
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"images" : [
|
|
3
|
-
{
|
|
4
|
-
"idiom" : "iphone",
|
|
5
|
-
"size" : "29x29",
|
|
6
|
-
"scale" : "2x"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"idiom" : "iphone",
|
|
10
|
-
"size" : "29x29",
|
|
11
|
-
"scale" : "3x"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"idiom" : "iphone",
|
|
15
|
-
"size" : "40x40",
|
|
16
|
-
"scale" : "2x"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"idiom" : "iphone",
|
|
20
|
-
"size" : "40x40",
|
|
21
|
-
"scale" : "3x"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"idiom" : "iphone",
|
|
25
|
-
"size" : "60x60",
|
|
26
|
-
"scale" : "2x"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"idiom" : "iphone",
|
|
30
|
-
"size" : "60x60",
|
|
31
|
-
"scale" : "3x"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"info" : {
|
|
35
|
-
"version" : 1,
|
|
36
|
-
"author" : "expo"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"images": [
|
|
3
|
-
{
|
|
4
|
-
"idiom": "universal",
|
|
5
|
-
"filename": "image.png",
|
|
6
|
-
"scale": "1x"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"idiom": "universal",
|
|
10
|
-
"scale": "2x"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"idiom": "universal",
|
|
14
|
-
"scale": "3x"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
"info": {
|
|
18
|
-
"version": 1,
|
|
19
|
-
"author": "expo"
|
|
20
|
-
}
|
|
21
|
-
}
|
|
Binary file
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
-
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
7
|
-
<key>CFBundleDisplayName</key>
|
|
8
|
-
<string>Mobile Hero Design Playground</string>
|
|
9
|
-
<key>CFBundleExecutable</key>
|
|
10
|
-
<string>$(EXECUTABLE_NAME)</string>
|
|
11
|
-
<key>CFBundleIdentifier</key>
|
|
12
|
-
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
13
|
-
<key>CFBundleInfoDictionaryVersion</key>
|
|
14
|
-
<string>6.0</string>
|
|
15
|
-
<key>CFBundleName</key>
|
|
16
|
-
<string>$(PRODUCT_NAME)</string>
|
|
17
|
-
<key>CFBundlePackageType</key>
|
|
18
|
-
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
|
|
19
|
-
<key>CFBundleShortVersionString</key>
|
|
20
|
-
<string>7.2.2</string>
|
|
21
|
-
<key>CFBundleSignature</key>
|
|
22
|
-
<string>????</string>
|
|
23
|
-
<key>CFBundleURLTypes</key>
|
|
24
|
-
<array>
|
|
25
|
-
<dict>
|
|
26
|
-
<key>CFBundleURLSchemes</key>
|
|
27
|
-
<array>
|
|
28
|
-
<string>com.thinkei.Mobile-Hero-Design-Playground</string>
|
|
29
|
-
</array>
|
|
30
|
-
</dict>
|
|
31
|
-
</array>
|
|
32
|
-
<key>CFBundleVersion</key>
|
|
33
|
-
<string>1</string>
|
|
34
|
-
<key>LSRequiresIPhoneOS</key>
|
|
35
|
-
<true/>
|
|
36
|
-
<key>NSAppTransportSecurity</key>
|
|
37
|
-
<dict>
|
|
38
|
-
<key>NSAllowsArbitraryLoads</key>
|
|
39
|
-
<true/>
|
|
40
|
-
<key>NSExceptionDomains</key>
|
|
41
|
-
<dict>
|
|
42
|
-
<key>localhost</key>
|
|
43
|
-
<dict>
|
|
44
|
-
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
|
45
|
-
<true/>
|
|
46
|
-
</dict>
|
|
47
|
-
</dict>
|
|
48
|
-
</dict>
|
|
49
|
-
<key>UIAppFonts</key>
|
|
50
|
-
<array>
|
|
51
|
-
<string>be-vietnam-pro-light.ttf</string>
|
|
52
|
-
<string>be-vietnam-pro-regular.ttf</string>
|
|
53
|
-
<string>be-vietnam-pro-semibold.ttf</string>
|
|
54
|
-
<string>hero-icons.ttf</string>
|
|
55
|
-
</array>
|
|
56
|
-
<key>UILaunchStoryboardName</key>
|
|
57
|
-
<string>SplashScreen</string>
|
|
58
|
-
<key>UIRequiredDeviceCapabilities</key>
|
|
59
|
-
<array>
|
|
60
|
-
<string>armv7</string>
|
|
61
|
-
</array>
|
|
62
|
-
<key>UIRequiresFullScreen</key>
|
|
63
|
-
<false/>
|
|
64
|
-
<key>UIStatusBarStyle</key>
|
|
65
|
-
<string>UIStatusBarStyleDefault</string>
|
|
66
|
-
<key>UISupportedInterfaceOrientations</key>
|
|
67
|
-
<array>
|
|
68
|
-
<string>UIInterfaceOrientationPortrait</string>
|
|
69
|
-
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
70
|
-
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
71
|
-
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
72
|
-
</array>
|
|
73
|
-
<key>UISupportedInterfaceOrientations~ipad</key>
|
|
74
|
-
<array>
|
|
75
|
-
<string>UIInterfaceOrientationPortrait</string>
|
|
76
|
-
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
|
77
|
-
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
78
|
-
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
79
|
-
</array>
|
|
80
|
-
<key>UIUserInterfaceStyle</key>
|
|
81
|
-
<string>Light</string>
|
|
82
|
-
<key>UIViewControllerBasedStatusBarAppearance</key>
|
|
83
|
-
<false/>
|
|
84
|
-
</dict>
|
|
85
|
-
</plist>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EXPO-VIEWCONTROLLER-1">
|
|
3
|
-
<device id="retina5_5" orientation="portrait" appearance="light"/>
|
|
4
|
-
<dependencies>
|
|
5
|
-
<deployment identifier="iOS"/>
|
|
6
|
-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
|
7
|
-
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
|
8
|
-
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
|
9
|
-
</dependencies>
|
|
10
|
-
<scenes>
|
|
11
|
-
<scene sceneID="EXPO-SCENE-1">
|
|
12
|
-
<objects>
|
|
13
|
-
<viewController storyboardIdentifier="SplashScreenViewController" id="EXPO-VIEWCONTROLLER-1" sceneMemberID="viewController">
|
|
14
|
-
<view key="view" userInteractionEnabled="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="EXPO-ContainerView" userLabel="ContainerView">
|
|
15
|
-
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
|
|
16
|
-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
17
|
-
<subviews>
|
|
18
|
-
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" insetsLayoutMarginsFromSafeArea="NO" image="SplashScreenBackground" translatesAutoresizingMaskIntoConstraints="NO" id="EXPO-SplashScreenBackground" userLabel="SplashScreenBackground">
|
|
19
|
-
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
|
|
20
|
-
</imageView>
|
|
21
|
-
</subviews>
|
|
22
|
-
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
|
23
|
-
<constraints>
|
|
24
|
-
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="top" secondItem="EXPO-ContainerView" secondAttribute="top" id="1gX-mQ-vu6"/>
|
|
25
|
-
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="leading" secondItem="EXPO-ContainerView" secondAttribute="leading" id="6tX-OG-Sck"/>
|
|
26
|
-
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="trailing" secondItem="EXPO-ContainerView" secondAttribute="trailing" id="ABX-8g-7v4"/>
|
|
27
|
-
<constraint firstItem="EXPO-SplashScreenBackground" firstAttribute="bottom" secondItem="EXPO-ContainerView" secondAttribute="bottom" id="jkI-2V-eW5"/>
|
|
28
|
-
</constraints>
|
|
29
|
-
<viewLayoutGuide key="safeArea" id="Rmq-lb-GrQ"/>
|
|
30
|
-
</view>
|
|
31
|
-
</viewController>
|
|
32
|
-
<placeholder placeholderIdentifier="IBFirstResponder" id="EXPO-PLACEHOLDER-1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
|
33
|
-
</objects>
|
|
34
|
-
<point key="canvasLocation" x="140.625" y="129.4921875"/>
|
|
35
|
-
</scene>
|
|
36
|
-
</scenes>
|
|
37
|
-
<resources>
|
|
38
|
-
<image name="SplashScreenBackground" width="1" height="1"/>
|
|
39
|
-
</resources>
|
|
40
|
-
</document>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>EXUpdatesCheckOnLaunch</key>
|
|
6
|
-
<string>ALWAYS</string>
|
|
7
|
-
<key>EXUpdatesEnabled</key>
|
|
8
|
-
<true/>
|
|
9
|
-
<key>EXUpdatesLaunchWaitMs</key>
|
|
10
|
-
<integer>0</integer>
|
|
11
|
-
<key>EXUpdatesSDKVersion</key>
|
|
12
|
-
<string>44.0.0</string>
|
|
13
|
-
<key>EXUpdatesURL</key>
|
|
14
|
-
<string>https://exp.host/@thinkei/Mobile-Hero-Design-Playground</string>
|
|
15
|
-
</dict>
|
|
16
|
-
</plist>
|