@holper/react-native-holper-storybook 0.6.101 → 0.7.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/.expo/README.md +8 -0
- package/.nvmrc +1 -0
- package/.prettierignore +5 -0
- package/.storybook/index.jsx +11 -0
- package/.storybook/main.js +8 -0
- package/.storybook/preview.jsx +51 -0
- package/.storybook/storybook.requires.js +43 -0
- package/.yarn/releases/yarn-4.5.0.cjs +925 -0
- package/.yarnrc.yml +3 -0
- package/App.jsx +29 -0
- package/LICENSE +21 -0
- package/{readme.md → README.md} +18 -19
- package/app.config.js +77 -0
- package/assets/adaptive-icon.png +0 -0
- package/assets/favicon.png +0 -0
- package/assets/fonts/Poppins-Bold.ttf +0 -0
- package/assets/fonts/Poppins-Regular.ttf +0 -0
- package/assets/fonts/Poppins-SemiBold.ttf +0 -0
- package/assets/icon.png +0 -0
- package/assets/splash.png +0 -0
- package/babel.config.js +7 -0
- package/build.sh +11 -0
- package/components/Button/index.tsx +66 -0
- package/{lib/components/Button/style.js → components/Button/style.ts} +8 -7
- package/components/Card/index.tsx +33 -0
- package/{lib/components/Card/style.js → components/Card/style.ts} +5 -4
- package/{lib/components/ConfirmationModal/index.js → components/ConfirmationModal/index.tsx} +25 -79
- package/{lib/components/ConfirmationModal/style.js → components/ConfirmationModal/style.tsx} +14 -13
- package/{lib/components/Container/index.js → components/Container/index.tsx} +7 -28
- package/{lib/components/Container/style.js → components/Container/style.ts} +6 -5
- package/{lib/components/CustomChatView/index.js → components/CustomChatView/index.tsx} +22 -30
- package/{lib/components/CustomChatView/style.js → components/CustomChatView/style.ts} +1 -1
- package/components/DeckSwiper/index.tsx +90 -0
- package/{lib/components/DeckSwiper/style.js → components/DeckSwiper/style.ts} +13 -12
- package/components/DonutCountdown/index.tsx +86 -0
- package/components/DonutCountdown/style.ts +8 -0
- package/components/FloatingContainer/index.tsx +35 -0
- package/{lib/components/FloatingContainer/style.js → components/FloatingContainer/style.ts} +7 -6
- package/components/Footer/index.tsx +35 -0
- package/{lib/components/Footer/style.js → components/Footer/style.ts} +4 -3
- package/components/Header/index.tsx +21 -0
- package/{lib/components/Header/style.js → components/Header/style.ts} +4 -3
- package/{lib/components/ImagePicker/index.js → components/ImagePicker/index.tsx} +3 -12
- package/components/ImageResponsive/index.tsx +24 -0
- package/components/ImageResponsive/style.ts +9 -0
- package/components/ImageViewer/index.tsx +36 -0
- package/{lib/components/ImageViewer/style.js → components/ImageViewer/style.ts} +11 -10
- package/{lib/components/Input/index.js → components/Input/index.tsx} +6 -33
- package/{lib/components/Input/style.js → components/Input/style.ts} +7 -18
- package/{lib/components/InputPin/index.js → components/InputPin/index.tsx} +6 -13
- package/{lib/components/InputPin/style.js → components/InputPin/style.ts} +7 -6
- package/components/MenuItem/index.tsx +25 -0
- package/{lib/components/MenuItem/style.js → components/MenuItem/style.ts} +9 -7
- package/{lib/components/NavigationTitle/index.js → components/NavigationTitle/index.tsx} +9 -30
- package/{lib/components/NavigationTitle/style.js → components/NavigationTitle/style.ts} +12 -11
- package/components/Notification/index.tsx +44 -0
- package/{lib/components/Notification/style.js → components/Notification/style.ts} +13 -11
- package/components/PreventDoubleClick/index.tsx +28 -0
- package/components/Select/index.tsx +51 -0
- package/components/Select/style.ts +64 -0
- package/{lib/components/SwipeablePanel/index.js → components/SwipeablePanel/index.tsx} +58 -85
- package/{lib/components/SwipeablePanel/style.js → components/SwipeablePanel/style.ts} +15 -14
- package/components/Switch/index.tsx +30 -0
- package/components/TakePicture/confirmPictureModal.tsx +37 -0
- package/components/TakePicture/index.tsx +148 -0
- package/{lib/components/TakePicture/style.js → components/TakePicture/style.ts} +4 -4
- package/components/Text/index.tsx +33 -0
- package/{lib/components/Text/style.js → components/Text/style.ts} +4 -2
- package/{lib/components/Textarea/index.js → components/Textarea/index.tsx} +5 -24
- package/{lib/components/Textarea/style.js → components/Textarea/style.ts} +5 -4
- package/components/TimeOutButton/index.tsx +67 -0
- package/{lib/components/TimeOutButton/style.js → components/TimeOutButton/style.ts} +4 -3
- package/components/Toast/index.tsx +34 -0
- package/components/Toast/style.ts +12 -0
- package/{lib/components/UploadDocument/index.js → components/UploadDocument/index.tsx} +49 -105
- package/{lib/components/UploadDocument/style.js → components/UploadDocument/style.ts} +16 -15
- package/components/VirtualKeyboard/index.tsx +75 -0
- package/{lib/components/VirtualKeyboard/style.js → components/VirtualKeyboard/style.ts} +9 -8
- package/components/index.ts +29 -0
- package/{lib/configs/constants.js → configs/constants.ts} +50 -48
- package/configs/types.ts +326 -0
- package/eas.json +27 -0
- package/eslint.config.mjs +205 -0
- package/hooks/index.ts +2 -0
- package/{lib/hooks/useDebounce.js → hooks/useDebounce.tsx} +6 -4
- package/hooks/useLoadFonts.tsx +13 -0
- package/index.js +3 -2
- package/lib/components/Button/index.tsx +66 -0
- package/lib/components/Button/style.ts +111 -0
- package/lib/components/Card/index.tsx +33 -0
- package/lib/components/Card/style.ts +34 -0
- package/lib/components/ConfirmationModal/index.tsx +104 -0
- package/lib/components/ConfirmationModal/style.tsx +53 -0
- package/lib/components/Container/index.tsx +33 -0
- package/lib/components/Container/style.ts +13 -0
- package/lib/components/CustomChatView/index.tsx +65 -0
- package/lib/components/CustomChatView/style.ts +10 -0
- package/lib/components/DeckSwiper/index.tsx +90 -0
- package/lib/components/DeckSwiper/style.ts +59 -0
- package/lib/components/DonutCountdown/index.tsx +86 -0
- package/lib/components/DonutCountdown/style.ts +8 -0
- package/lib/components/FloatingContainer/index.tsx +35 -0
- package/lib/components/FloatingContainer/style.ts +25 -0
- package/lib/components/Footer/index.tsx +35 -0
- package/lib/components/Footer/style.ts +40 -0
- package/lib/components/Header/index.tsx +21 -0
- package/lib/components/Header/style.ts +34 -0
- package/lib/components/ImagePicker/index.tsx +18 -0
- package/lib/components/ImageResponsive/index.tsx +24 -0
- package/lib/components/ImageResponsive/style.ts +9 -0
- package/lib/components/ImageViewer/index.tsx +36 -0
- package/lib/components/ImageViewer/style.ts +38 -0
- package/lib/components/Input/index.tsx +62 -0
- package/lib/components/Input/style.ts +91 -0
- package/lib/components/InputPin/index.tsx +21 -0
- package/lib/components/InputPin/style.ts +22 -0
- package/lib/components/MenuItem/index.tsx +25 -0
- package/lib/components/MenuItem/style.ts +44 -0
- package/lib/components/NavigationTitle/index.tsx +53 -0
- package/lib/components/NavigationTitle/style.ts +49 -0
- package/lib/components/Notification/index.tsx +44 -0
- package/lib/components/Notification/style.ts +50 -0
- package/lib/components/PreventDoubleClick/index.tsx +28 -0
- package/lib/components/Select/index.tsx +51 -0
- package/lib/components/Select/style.ts +64 -0
- package/lib/components/SwipeablePanel/index.tsx +208 -0
- package/lib/components/SwipeablePanel/style.ts +81 -0
- package/lib/components/Switch/index.tsx +30 -0
- package/lib/components/TakePicture/confirmPictureModal.tsx +37 -0
- package/lib/components/TakePicture/index.tsx +148 -0
- package/lib/components/TakePicture/style.ts +95 -0
- package/lib/components/Text/index.tsx +33 -0
- package/lib/components/Text/style.ts +101 -0
- package/lib/components/Textarea/index.tsx +26 -0
- package/lib/components/Textarea/style.ts +38 -0
- package/lib/components/TimeOutButton/index.tsx +67 -0
- package/lib/components/TimeOutButton/style.ts +42 -0
- package/lib/components/Toast/index.tsx +34 -0
- package/lib/components/Toast/style.ts +12 -0
- package/lib/components/UploadDocument/index.tsx +179 -0
- package/lib/components/UploadDocument/style.ts +57 -0
- package/lib/components/VirtualKeyboard/index.tsx +75 -0
- package/lib/components/VirtualKeyboard/style.ts +25 -0
- package/lib/components/index.ts +29 -0
- package/lib/configs/constants.ts +273 -0
- package/lib/configs/types.ts +326 -0
- package/lib/hooks/index.ts +2 -0
- package/lib/hooks/useDebounce.tsx +24 -0
- package/lib/hooks/useLoadFonts.tsx +13 -0
- package/lib/index.js +3 -2
- package/metro.config.js +11 -0
- package/package.json +72 -63
- package/prettier.config.mjs +23 -0
- package/stories/Button.stories.tsx +181 -0
- package/stories/Card.stories.tsx +22 -0
- package/stories/Colors.stories.tsx +57 -0
- package/stories/ConfirmationModal.stories.tsx +142 -0
- package/stories/Container.stories.tsx +105 -0
- package/stories/DeckSwiper.stories.tsx +43 -0
- package/stories/DonutCountdown.stories.tsx +134 -0
- package/stories/FloatingContainer.stories.tsx +139 -0
- package/stories/Footer.stories.tsx +65 -0
- package/stories/Header.stories.tsx +37 -0
- package/stories/ImagePicker.stories.tsx +14 -0
- package/stories/ImageResponsive.stories.tsx +18 -0
- package/stories/ImageViewer.stories.tsx +24 -0
- package/stories/Input.stories.tsx +119 -0
- package/stories/InputPin.stories.tsx +40 -0
- package/stories/Menu.stories.tsx +53 -0
- package/stories/MenuItem.stories.tsx +30 -0
- package/stories/NavigationTitle.stories.tsx +51 -0
- package/stories/Notification.stories.tsx +58 -0
- package/stories/Select.stories.tsx +270 -0
- package/stories/SwipeablePanel.stories.tsx +360 -0
- package/stories/Switch.stories.tsx +36 -0
- package/stories/TakePicture.stories.tsx +59 -0
- package/stories/Text.stories.tsx +61 -0
- package/stories/Textarea.stories.tsx +48 -0
- package/stories/TimeOutButton.stories.tsx +55 -0
- package/stories/Toast.stories.tsx +37 -0
- package/stories/UploadDocument.stories.tsx +179 -0
- package/stories/VirtualKeyboard.stories.tsx +14 -0
- package/tsconfig.json +21 -0
- package/utilities/ScrollView.tsx +19 -0
- package/utilities/index.ts +2 -0
- package/utilities/utils.ts +29 -0
- package/lib/components/Button/index.js +0 -104
- package/lib/components/Card/index.js +0 -49
- package/lib/components/DeckSwiper/index.js +0 -118
- package/lib/components/FlashMessage/index.js +0 -81
- package/lib/components/FloatingContainer/index.js +0 -69
- package/lib/components/Footer/index.js +0 -61
- package/lib/components/Header/index.js +0 -45
- package/lib/components/ImageResponsive/index.js +0 -39
- package/lib/components/ImageResponsive/style.js +0 -7
- package/lib/components/ImageViewer/index.js +0 -62
- package/lib/components/MenuItem/index.js +0 -44
- package/lib/components/Notification/index.js +0 -80
- package/lib/components/PreventDoubleClick/index.js +0 -21
- package/lib/components/Select/index.js +0 -89
- package/lib/components/Select/style.js +0 -81
- package/lib/components/Switch/index.js +0 -57
- package/lib/components/TakePicture/confirmPictureModal.js +0 -64
- package/lib/components/TakePicture/index.js +0 -198
- package/lib/components/Text/index.js +0 -75
- package/lib/components/TimeOutButton/index.js +0 -104
- package/lib/components/VirtualKeyboard/index.js +0 -86
- package/lib/components/index.js +0 -28
- package/lib/configs/loadFonts.js +0 -11
- package/lib/hooks/index.js +0 -1
package/.expo/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
> Why do I have a folder named ".expo" in my project?
|
|
2
|
+
The ".expo" folder is created when an Expo project is started using "expo start" command.
|
|
3
|
+
> What do the files contain?
|
|
4
|
+
- "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.
|
|
5
|
+
- "settings.json": contains the server configuration that is used to serve the application manifest.
|
|
6
|
+
> Should I commit the ".expo" folder?
|
|
7
|
+
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.
|
|
8
|
+
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
22.17.0
|
package/.prettierignore
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
2
|
+
import { view } from './storybook.requires';
|
|
3
|
+
|
|
4
|
+
const StorybookUIRoot = view.getStorybookUI({
|
|
5
|
+
storage: {
|
|
6
|
+
getItem: AsyncStorage.getItem,
|
|
7
|
+
setItem: AsyncStorage.setItem,
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export default StorybookUIRoot;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import * as SplashScreen from 'expo-splash-screen';
|
|
3
|
+
import { useLoadFonts } from '../hooks';
|
|
4
|
+
import { Colors } from '../configs/constants';
|
|
5
|
+
import { useEffect } from 'react';
|
|
6
|
+
|
|
7
|
+
SplashScreen.preventAutoHideAsync();
|
|
8
|
+
|
|
9
|
+
/** @type{import("@storybook/react").Preview} */
|
|
10
|
+
const preview = {
|
|
11
|
+
parameters: {
|
|
12
|
+
controls: {
|
|
13
|
+
matchers: {
|
|
14
|
+
color: /(background|color)$/i,
|
|
15
|
+
date: /Date$/,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
decorators: [
|
|
21
|
+
(Story, { parameters }) => {
|
|
22
|
+
const { loaded, error } = useLoadFonts();
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (loaded || error) {
|
|
26
|
+
SplashScreen.hideAsync();
|
|
27
|
+
}
|
|
28
|
+
}, [loaded, error]);
|
|
29
|
+
|
|
30
|
+
if (!loaded && !error) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<View
|
|
36
|
+
style={{
|
|
37
|
+
flex: 1,
|
|
38
|
+
justifyContent: 'center',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
backgroundColor: parameters.noBackground === true ? undefined : Colors.whiteice,
|
|
41
|
+
padding: 8,
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
<Story />
|
|
45
|
+
</View>
|
|
46
|
+
);
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default preview;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* do not change this file, it is auto generated by storybook. */
|
|
2
|
+
|
|
3
|
+
import { start, updateView } from "@storybook/react-native";
|
|
4
|
+
|
|
5
|
+
import "@storybook/addon-ondevice-controls/register";
|
|
6
|
+
import "@storybook/addon-ondevice-actions/register";
|
|
7
|
+
|
|
8
|
+
const normalizedStories = [
|
|
9
|
+
{
|
|
10
|
+
titlePrefix: "",
|
|
11
|
+
directory: "./stories",
|
|
12
|
+
files: "**/*.stories.?(ts|tsx|js|jsx)",
|
|
13
|
+
importPathMatcher:
|
|
14
|
+
/^\.(?:(?:^|\/|(?:(?:(?!(?:^|\/)\.).)*?)\/)(?!\.)(?=.)[^/]*?\.stories\.(?:ts|tsx|js|jsx)?)$/,
|
|
15
|
+
|
|
16
|
+
req: require.context(
|
|
17
|
+
"../stories",
|
|
18
|
+
true,
|
|
19
|
+
/^\.(?:(?:^|\/|(?:(?:(?!(?:^|\/)\.).)*?)\/)(?!\.)(?=.)[^/]*?\.stories\.(?:ts|tsx|js|jsx)?)$/
|
|
20
|
+
),
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
const annotations = [
|
|
25
|
+
require("./preview"),
|
|
26
|
+
require("@storybook/react-native/dist/preview"),
|
|
27
|
+
require("@storybook/addon-actions/preview"),
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
global.STORIES = normalizedStories;
|
|
31
|
+
|
|
32
|
+
module?.hot?.accept?.();
|
|
33
|
+
|
|
34
|
+
if (!global.view) {
|
|
35
|
+
global.view = start({
|
|
36
|
+
annotations,
|
|
37
|
+
storyEntries: normalizedStories,
|
|
38
|
+
});
|
|
39
|
+
} else {
|
|
40
|
+
updateView(global.view, annotations, normalizedStories);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const view = global.view;
|