@holper/react-native-holper-storybook 0.7.0 → 0.7.1
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/README.md +1 -1
- package/package.json +5 -1
- package/.expo/README.md +0 -8
- package/.nvmrc +0 -1
- package/.prettierignore +0 -5
- package/.storybook/index.jsx +0 -11
- package/.storybook/main.js +0 -8
- package/.storybook/preview.jsx +0 -51
- package/.storybook/storybook.requires.js +0 -43
- package/.yarn/releases/yarn-4.5.0.cjs +0 -925
- package/.yarnrc.yml +0 -3
- package/App.jsx +0 -29
- package/app.config.js +0 -77
- 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 +0 -7
- package/build.sh +0 -11
- package/components/Button/index.tsx +0 -66
- package/components/Button/style.ts +0 -111
- package/components/Card/index.tsx +0 -33
- package/components/Card/style.ts +0 -34
- package/components/ConfirmationModal/index.tsx +0 -104
- package/components/ConfirmationModal/style.tsx +0 -53
- package/components/Container/index.tsx +0 -33
- package/components/Container/style.ts +0 -13
- package/components/CustomChatView/index.tsx +0 -65
- package/components/CustomChatView/style.ts +0 -10
- package/components/DeckSwiper/index.tsx +0 -90
- package/components/DeckSwiper/style.ts +0 -59
- package/components/DonutCountdown/index.tsx +0 -86
- package/components/DonutCountdown/style.ts +0 -8
- package/components/FloatingContainer/index.tsx +0 -35
- package/components/FloatingContainer/style.ts +0 -25
- package/components/Footer/index.tsx +0 -35
- package/components/Footer/style.ts +0 -40
- package/components/Header/index.tsx +0 -21
- package/components/Header/style.ts +0 -34
- package/components/ImagePicker/index.tsx +0 -18
- package/components/ImageResponsive/index.tsx +0 -24
- package/components/ImageResponsive/style.ts +0 -9
- package/components/ImageViewer/index.tsx +0 -36
- package/components/ImageViewer/style.ts +0 -38
- package/components/Input/index.tsx +0 -62
- package/components/Input/style.ts +0 -91
- package/components/InputPin/index.tsx +0 -21
- package/components/InputPin/style.ts +0 -22
- package/components/MenuItem/index.tsx +0 -25
- package/components/MenuItem/style.ts +0 -44
- package/components/NavigationTitle/index.tsx +0 -53
- package/components/NavigationTitle/style.ts +0 -49
- package/components/Notification/index.tsx +0 -44
- package/components/Notification/style.ts +0 -50
- package/components/PreventDoubleClick/index.tsx +0 -28
- package/components/Select/index.tsx +0 -51
- package/components/Select/style.ts +0 -64
- package/components/SwipeablePanel/index.tsx +0 -208
- package/components/SwipeablePanel/style.ts +0 -81
- package/components/Switch/index.tsx +0 -30
- package/components/TakePicture/confirmPictureModal.tsx +0 -37
- package/components/TakePicture/index.tsx +0 -148
- package/components/TakePicture/style.ts +0 -95
- package/components/Text/index.tsx +0 -33
- package/components/Text/style.ts +0 -101
- package/components/Textarea/index.tsx +0 -26
- package/components/Textarea/style.ts +0 -38
- package/components/TimeOutButton/index.tsx +0 -67
- package/components/TimeOutButton/style.ts +0 -42
- package/components/Toast/index.tsx +0 -34
- package/components/Toast/style.ts +0 -12
- package/components/UploadDocument/index.tsx +0 -179
- package/components/UploadDocument/style.ts +0 -57
- package/components/VirtualKeyboard/index.tsx +0 -75
- package/components/VirtualKeyboard/style.ts +0 -25
- package/components/index.ts +0 -29
- package/configs/constants.ts +0 -273
- package/configs/types.ts +0 -326
- package/eas.json +0 -27
- package/eslint.config.mjs +0 -205
- package/hooks/index.ts +0 -2
- package/hooks/useDebounce.tsx +0 -24
- package/hooks/useLoadFonts.tsx +0 -13
- package/metro.config.js +0 -11
- package/prettier.config.mjs +0 -23
- package/stories/Button.stories.tsx +0 -181
- package/stories/Card.stories.tsx +0 -22
- package/stories/Colors.stories.tsx +0 -57
- package/stories/ConfirmationModal.stories.tsx +0 -142
- package/stories/Container.stories.tsx +0 -105
- package/stories/DeckSwiper.stories.tsx +0 -43
- package/stories/DonutCountdown.stories.tsx +0 -134
- package/stories/FloatingContainer.stories.tsx +0 -139
- package/stories/Footer.stories.tsx +0 -65
- package/stories/Header.stories.tsx +0 -37
- package/stories/ImagePicker.stories.tsx +0 -14
- package/stories/ImageResponsive.stories.tsx +0 -18
- package/stories/ImageViewer.stories.tsx +0 -24
- package/stories/Input.stories.tsx +0 -119
- package/stories/InputPin.stories.tsx +0 -40
- package/stories/Menu.stories.tsx +0 -53
- package/stories/MenuItem.stories.tsx +0 -30
- package/stories/NavigationTitle.stories.tsx +0 -51
- package/stories/Notification.stories.tsx +0 -58
- package/stories/Select.stories.tsx +0 -270
- package/stories/SwipeablePanel.stories.tsx +0 -360
- package/stories/Switch.stories.tsx +0 -36
- package/stories/TakePicture.stories.tsx +0 -59
- package/stories/Text.stories.tsx +0 -61
- package/stories/Textarea.stories.tsx +0 -48
- package/stories/TimeOutButton.stories.tsx +0 -55
- package/stories/Toast.stories.tsx +0 -37
- package/stories/UploadDocument.stories.tsx +0 -179
- package/stories/VirtualKeyboard.stories.tsx +0 -14
- package/tsconfig.json +0 -21
- package/utilities/ScrollView.tsx +0 -19
- package/utilities/index.ts +0 -2
- package/utilities/utils.ts +0 -29
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Run the command: `npm publish` this will build the lib before publishing.
|
|
|
14
14
|
|
|
15
15
|
#### How to set up
|
|
16
16
|
|
|
17
|
-
`import {
|
|
17
|
+
`import { useLoadFonts } from from 'react-native-holper-storybook';` and call the `useLoadFonts` function in your app entry point.
|
|
18
18
|
|
|
19
19
|
```
|
|
20
20
|
import { useEffect, useState } from 'react';
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.7.
|
|
2
|
+
"version": "0.7.1",
|
|
3
3
|
"main": "lib/index.js",
|
|
4
4
|
"name": "@holper/react-native-holper-storybook",
|
|
5
5
|
"description": "A component library for Holper projects",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib",
|
|
9
|
+
"index.js"
|
|
10
|
+
],
|
|
7
11
|
"packageManager": "yarn@4.5.0",
|
|
8
12
|
"homepage": "https://github.com/holperapp/holper-storybook",
|
|
9
13
|
"repository": {
|
package/.expo/README.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
22.17.0
|
package/.prettierignore
DELETED
package/.storybook/index.jsx
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
package/.storybook/main.js
DELETED
package/.storybook/preview.jsx
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
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;
|
|
@@ -1,43 +0,0 @@
|
|
|
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;
|