@storybook/react-native-ui 10.0.2-alpha.0 → 10.0.2
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/dist/index.d.ts +1 -1
- package/dist/index.js +5 -1
- package/package.json +6 -5
- package/src/Layout.tsx +4 -2
- package/src/MobileMenuDrawer.tsx +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { State, StoriesHash } from 'storybook/manager-api';
|
|
|
7
7
|
import { Item, ExpandAction, CombinedDataset, Selection, SBUI } from '@storybook/react-native-ui-common';
|
|
8
8
|
import { API_LoadedRefData, API_IndexHash } from 'storybook/internal/types';
|
|
9
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
|
-
import { StoryContext, Args } from 'storybook/internal/csf';
|
|
11
10
|
import { ReactRenderer } from '@storybook/react';
|
|
11
|
+
import { StoryContext, Args } from 'storybook/internal/csf';
|
|
12
12
|
|
|
13
13
|
interface NodeProps$1 {
|
|
14
14
|
children: React.ReactNode | React.ReactNode[];
|
package/dist/index.js
CHANGED
|
@@ -1277,6 +1277,7 @@ var Sidebar = import_react12.default.memo(function Sidebar2({
|
|
|
1277
1277
|
|
|
1278
1278
|
// src/Layout.tsx
|
|
1279
1279
|
var import_bottom_sheet4 = require("@gorhom/bottom-sheet");
|
|
1280
|
+
var import_portal = require("@gorhom/portal");
|
|
1280
1281
|
var import_react_native_theming15 = require("@storybook/react-native-theming");
|
|
1281
1282
|
var import_react_native_ui_common7 = require("@storybook/react-native-ui-common");
|
|
1282
1283
|
var import_react18 = require("react");
|
|
@@ -1888,7 +1889,10 @@ var mobileMenuDrawerContentStyle = {
|
|
|
1888
1889
|
};
|
|
1889
1890
|
var flex1 = { flex: 1 };
|
|
1890
1891
|
var FullUI = ({ storage, theme, storyHash, story, children }) => {
|
|
1891
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native_theming15.ThemeProvider, { theme, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native_safe_area_context3.SafeAreaProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native_gesture_handler2.GestureHandlerRootView, { style: flex1, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_bottom_sheet4.BottomSheetModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native_ui_common7.StorageProvider, { storage, children: /* @__PURE__ */ (0, import_jsx_runtime26.
|
|
1892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native_theming15.ThemeProvider, { theme, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native_safe_area_context3.SafeAreaProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native_gesture_handler2.GestureHandlerRootView, { style: flex1, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_bottom_sheet4.BottomSheetModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react_native_ui_common7.StorageProvider, { storage, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react_native_ui_common7.LayoutProvider, { children: [
|
|
1893
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Layout, { storyHash, story, children }),
|
|
1894
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_portal.PortalHost, { name: "storybook-lite-ui-root" })
|
|
1895
|
+
] }) }) }) }) }) });
|
|
1892
1896
|
};
|
|
1893
1897
|
var Layout = ({
|
|
1894
1898
|
storyHash,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native-ui",
|
|
3
|
-
"version": "10.0.2
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"description": "ui components for react native storybook",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -57,9 +57,10 @@
|
|
|
57
57
|
"typescript": "~5.9.3"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@
|
|
61
|
-
"@storybook/react
|
|
62
|
-
"@storybook/react-native-
|
|
60
|
+
"@gorhom/portal": "^1.0.14",
|
|
61
|
+
"@storybook/react": "^10.0.2",
|
|
62
|
+
"@storybook/react-native-theming": "^10.0.2",
|
|
63
|
+
"@storybook/react-native-ui-common": "^10.0.2",
|
|
63
64
|
"fuse.js": "^7.1.0",
|
|
64
65
|
"polished": "^4.3.1"
|
|
65
66
|
},
|
|
@@ -79,5 +80,5 @@
|
|
|
79
80
|
"publishConfig": {
|
|
80
81
|
"access": "public"
|
|
81
82
|
},
|
|
82
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "73ee48de3fba05ca66288b335059e1ec944b162b"
|
|
83
84
|
}
|
package/src/Layout.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
|
|
2
|
-
import
|
|
2
|
+
import { PortalHost, PortalProvider } from '@gorhom/portal';
|
|
3
3
|
import type { ReactRenderer } from '@storybook/react';
|
|
4
4
|
import { styled, ThemeProvider, useTheme } from '@storybook/react-native-theming';
|
|
5
5
|
import {
|
|
@@ -16,8 +16,9 @@ import { ScrollView, Text, TouchableOpacity, View, ViewStyle } from 'react-nativ
|
|
|
16
16
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
17
17
|
import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
18
18
|
import { SET_CURRENT_STORY } from 'storybook/internal/core-events';
|
|
19
|
-
import {
|
|
19
|
+
import type { Args, StoryContext } from 'storybook/internal/csf';
|
|
20
20
|
import type { API_IndexHash } from 'storybook/internal/types';
|
|
21
|
+
import { addons } from 'storybook/manager-api';
|
|
21
22
|
import { DEFAULT_REF_ID } from './constants';
|
|
22
23
|
import { BottomBarToggleIcon } from './icon/BottomBarToggleIcon';
|
|
23
24
|
import { CloseFullscreenIcon } from './icon/CloseFullscreenIcon';
|
|
@@ -70,6 +71,7 @@ export const FullUI: SBUI = ({ storage, theme, storyHash, story, children }) =>
|
|
|
70
71
|
<Layout storyHash={storyHash} story={story}>
|
|
71
72
|
{children}
|
|
72
73
|
</Layout>
|
|
74
|
+
<PortalHost name="storybook-lite-ui-root" />
|
|
73
75
|
</LayoutProvider>
|
|
74
76
|
</StorageProvider>
|
|
75
77
|
</BottomSheetModalProvider>
|
package/src/MobileMenuDrawer.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import BottomSheet, {
|
|
|
5
5
|
} from '@gorhom/bottom-sheet';
|
|
6
6
|
import { useTheme } from '@storybook/react-native-theming';
|
|
7
7
|
import { forwardRef, memo, ReactNode, useImperativeHandle, useMemo, useRef } from 'react';
|
|
8
|
-
import { Keyboard, Platform
|
|
8
|
+
import { Keyboard, Platform } from 'react-native';
|
|
9
9
|
import { useAnimatedStyle, useReducedMotion } from 'react-native-reanimated';
|
|
10
10
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
11
11
|
import { useSelectedNode } from './SelectedNodeProvider';
|