@storybook/react-native-ui-lite 10.1.0 → 10.1.2-alpha.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/dist/index.js +5 -0
- package/package.json +5 -5
- package/src/Layout.tsx +5 -1
- package/src/MobileAddonsPanel.tsx +2 -0
package/dist/index.js
CHANGED
|
@@ -1533,6 +1533,7 @@ var MobileAddonsPanel = (0, import_react13.forwardRef)(
|
|
|
1533
1533
|
{
|
|
1534
1534
|
onClose: () => {
|
|
1535
1535
|
setMobileMenuOpen(false);
|
|
1536
|
+
import_react_native7.Keyboard.dismiss();
|
|
1536
1537
|
},
|
|
1537
1538
|
storyId
|
|
1538
1539
|
}
|
|
@@ -1598,6 +1599,7 @@ var AddonsTabs = ({ onClose, storyId }) => {
|
|
|
1598
1599
|
horizontal: true,
|
|
1599
1600
|
showsHorizontalScrollIndicator: false,
|
|
1600
1601
|
contentContainerStyle: addonsTabsContentContainerStyle,
|
|
1602
|
+
keyboardShouldPersistTaps: "handled",
|
|
1601
1603
|
children: Object.values(panels).map(({ id, title }) => {
|
|
1602
1604
|
const resolvedTitle = typeof title === "function" ? title({}) : title;
|
|
1603
1605
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
@@ -1947,6 +1949,9 @@ var Layout = ({
|
|
|
1947
1949
|
true
|
|
1948
1950
|
);
|
|
1949
1951
|
const [uiHidden, setUiHidden] = (0, import_react16.useState)(false);
|
|
1952
|
+
(0, import_react16.useLayoutEffect)(() => {
|
|
1953
|
+
setUiHidden(story?.parameters?.storybookUIVisibility === "hidden");
|
|
1954
|
+
}, [story?.parameters?.storybookUIVisibility]);
|
|
1950
1955
|
const desktopSidebarStyle = (0, import_react_native_ui_common7.useStyle)(
|
|
1951
1956
|
() => ({
|
|
1952
1957
|
width: desktopSidebarOpen ? 240 : void 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native-ui-lite",
|
|
3
|
-
"version": "10.1.0",
|
|
3
|
+
"version": "10.1.2-alpha.0",
|
|
4
4
|
"description": "lightweight ui components for react native storybook",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@gorhom/portal": "^1.0.14",
|
|
62
|
-
"@storybook/react": "^10.1.
|
|
63
|
-
"@storybook/react-native-theming": "^10.1.0",
|
|
64
|
-
"@storybook/react-native-ui-common": "^10.1.0",
|
|
62
|
+
"@storybook/react": "^10.1.2",
|
|
63
|
+
"@storybook/react-native-theming": "^10.1.2-alpha.0",
|
|
64
|
+
"@storybook/react-native-ui-common": "^10.1.2-alpha.0",
|
|
65
65
|
"fuse.js": "^7.1.0",
|
|
66
66
|
"polished": "^4.3.1",
|
|
67
67
|
"react-native-safe-area-context": "^5"
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "3c47e12910793c447acdd33e6ce8f9628c63019b"
|
|
81
81
|
}
|
package/src/Layout.tsx
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useStoreBooleanState,
|
|
11
11
|
useStyle,
|
|
12
12
|
} from '@storybook/react-native-ui-common';
|
|
13
|
-
import { ReactElement, ReactNode, useCallback, useRef, useState } from 'react';
|
|
13
|
+
import { ReactElement, ReactNode, useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
14
14
|
import { ScrollView, Text, TouchableOpacity, View, ViewStyle } from 'react-native';
|
|
15
15
|
import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
16
16
|
import { SET_CURRENT_STORY } from 'storybook/internal/core-events';
|
|
@@ -102,6 +102,10 @@ export const Layout = ({
|
|
|
102
102
|
|
|
103
103
|
const [uiHidden, setUiHidden] = useState(false);
|
|
104
104
|
|
|
105
|
+
useLayoutEffect(() => {
|
|
106
|
+
setUiHidden(story?.parameters?.storybookUIVisibility === 'hidden');
|
|
107
|
+
}, [story?.parameters?.storybookUIVisibility]);
|
|
108
|
+
|
|
105
109
|
const desktopSidebarStyle = useStyle(
|
|
106
110
|
() => ({
|
|
107
111
|
width: desktopSidebarOpen ? 240 : undefined,
|
|
@@ -167,6 +167,7 @@ export const MobileAddonsPanel = forwardRef<MobileAddonsPanelRef, { storyId?: st
|
|
|
167
167
|
<AddonsTabs
|
|
168
168
|
onClose={() => {
|
|
169
169
|
setMobileMenuOpen(false);
|
|
170
|
+
Keyboard.dismiss();
|
|
170
171
|
}}
|
|
171
172
|
storyId={storyId}
|
|
172
173
|
/>
|
|
@@ -250,6 +251,7 @@ export const AddonsTabs = ({ onClose, storyId }: { onClose?: () => void; storyId
|
|
|
250
251
|
horizontal
|
|
251
252
|
showsHorizontalScrollIndicator={false}
|
|
252
253
|
contentContainerStyle={addonsTabsContentContainerStyle}
|
|
254
|
+
keyboardShouldPersistTaps="handled"
|
|
253
255
|
>
|
|
254
256
|
{Object.values(panels).map(({ id, title }) => {
|
|
255
257
|
const resolvedTitle = typeof title === 'function' ? title({}) : title;
|