@storybook/react-native-ui 10.0.0-beta.0 → 10.0.0-beta.8
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 +29 -12
- package/package.json +5 -5
- package/src/Layout.tsx +1 -1
- package/src/MobileAddonsPanel.tsx +1 -1
- package/src/MobileMenuDrawer.tsx +29 -11
- package/src/Refs.tsx +1 -1
- package/src/Sidebar.stories.tsx +1 -1
- package/src/Sidebar.tsx +1 -1
- package/src/Tree.stories.tsx +1 -1
- package/src/Tree.tsx +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _storybook_react_native_theming from '@storybook/react-native-themin
|
|
|
2
2
|
import * as react_native from 'react-native';
|
|
3
3
|
import { View } from 'react-native';
|
|
4
4
|
import React, { FC, ComponentProps, ReactNode } from 'react';
|
|
5
|
-
import { State, StoriesHash } from 'storybook/
|
|
5
|
+
import { State, StoriesHash } from 'storybook/manager-api';
|
|
6
6
|
import { Item, ExpandAction, CombinedDataset, Selection, SBUI } from '@storybook/react-native-ui-common';
|
|
7
7
|
import { API_LoadedRefData, API_IndexHash } from 'storybook/internal/types';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
package/dist/index.js
CHANGED
|
@@ -1284,7 +1284,7 @@ var import_react_native8 = require("react-native");
|
|
|
1284
1284
|
var import_react_native_gesture_handler2 = require("react-native-gesture-handler");
|
|
1285
1285
|
var import_react_native_safe_area_context3 = require("react-native-safe-area-context");
|
|
1286
1286
|
var import_core_events = require("storybook/internal/core-events");
|
|
1287
|
-
var import_manager_api2 = require("storybook/
|
|
1287
|
+
var import_manager_api2 = require("storybook/manager-api");
|
|
1288
1288
|
|
|
1289
1289
|
// src/icon/BottomBarToggleIcon.tsx
|
|
1290
1290
|
var import_react_native_svg9 = require("react-native-svg");
|
|
@@ -1367,7 +1367,7 @@ var MenuIcon = ({
|
|
|
1367
1367
|
|
|
1368
1368
|
// src/MobileAddonsPanel.tsx
|
|
1369
1369
|
var import_bottom_sheet2 = require("@gorhom/bottom-sheet");
|
|
1370
|
-
var import_manager_api = require("storybook/
|
|
1370
|
+
var import_manager_api = require("storybook/manager-api");
|
|
1371
1371
|
var import_react_native_theming13 = require("@storybook/react-native-theming");
|
|
1372
1372
|
var import_types = require("storybook/internal/types");
|
|
1373
1373
|
var import_react15 = require("react");
|
|
@@ -1562,16 +1562,33 @@ var import_react_native6 = require("react-native");
|
|
|
1562
1562
|
var import_react_native_reanimated2 = require("react-native-reanimated");
|
|
1563
1563
|
var import_react_native_safe_area_context2 = require("react-native-safe-area-context");
|
|
1564
1564
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1565
|
-
var BottomSheetBackdropComponent = (backdropComponentProps) =>
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
}
|
|
1574
|
-
)
|
|
1565
|
+
var BottomSheetBackdropComponent = (backdropComponentProps) => {
|
|
1566
|
+
const androidTouchEventFix = (0, import_react_native_reanimated2.useAnimatedStyle)(() => {
|
|
1567
|
+
if (import_react_native6.Platform.OS === "android") {
|
|
1568
|
+
return {
|
|
1569
|
+
zIndex: backdropComponentProps.animatedIndex.value >= 0 ? 0 : -1
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1572
|
+
return {};
|
|
1573
|
+
});
|
|
1574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1575
|
+
import_bottom_sheet3.BottomSheetBackdrop,
|
|
1576
|
+
{
|
|
1577
|
+
...backdropComponentProps,
|
|
1578
|
+
appearsOnIndex: 0,
|
|
1579
|
+
disappearsOnIndex: -1,
|
|
1580
|
+
pressBehavior: "close",
|
|
1581
|
+
style: [
|
|
1582
|
+
backdropComponentProps.style,
|
|
1583
|
+
androidTouchEventFix,
|
|
1584
|
+
{
|
|
1585
|
+
backgroundColor: "rgba(0,0,0,0.5)",
|
|
1586
|
+
paddingTop: import_react_native6.Platform.OS === "android" ? 1 : void 0
|
|
1587
|
+
}
|
|
1588
|
+
]
|
|
1589
|
+
}
|
|
1590
|
+
);
|
|
1591
|
+
};
|
|
1575
1592
|
var snapPoints = ["50%", "75%"];
|
|
1576
1593
|
var MobileMenuDrawer = (0, import_react16.memo)(
|
|
1577
1594
|
(0, import_react16.forwardRef)(({ children }, ref) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native-ui",
|
|
3
|
-
"version": "10.0.0-beta.
|
|
3
|
+
"version": "10.0.0-beta.8",
|
|
4
4
|
"description": "ui components for react native storybook",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"typescript": "~5.9.2"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@storybook/react": "10.0.0-beta.
|
|
62
|
-
"@storybook/react-native-theming": "^10.0.0-beta.
|
|
63
|
-
"@storybook/react-native-ui-common": "^10.0.0-beta.
|
|
61
|
+
"@storybook/react": "10.0.0-beta.8",
|
|
62
|
+
"@storybook/react-native-theming": "^10.0.0-beta.8",
|
|
63
|
+
"@storybook/react-native-ui-common": "^10.0.0-beta.8",
|
|
64
64
|
"es-toolkit": "^1.38.0",
|
|
65
65
|
"fuse.js": "^7.0.0",
|
|
66
66
|
"memoizerific": "^1.11.3",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "18834e54853a10911b05fb67d78d5ad3f1f35635"
|
|
87
87
|
}
|
package/src/Layout.tsx
CHANGED
|
@@ -16,7 +16,7 @@ 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 { addons } from 'storybook/
|
|
19
|
+
import { addons } from 'storybook/manager-api';
|
|
20
20
|
import type { API_IndexHash } from 'storybook/internal/types';
|
|
21
21
|
import { DEFAULT_REF_ID } from './constants';
|
|
22
22
|
import { BottomBarToggleIcon } from './icon/BottomBarToggleIcon';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BottomSheetModal } from '@gorhom/bottom-sheet';
|
|
2
|
-
import { addons } from 'storybook/
|
|
2
|
+
import { addons } from 'storybook/manager-api';
|
|
3
3
|
import { styled, useTheme } from '@storybook/react-native-theming';
|
|
4
4
|
import { Addon_TypesEnum } from 'storybook/internal/types';
|
|
5
5
|
import { forwardRef, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
package/src/MobileMenuDrawer.tsx
CHANGED
|
@@ -5,8 +5,8 @@ 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 } from 'react-native';
|
|
9
|
-
import { useReducedMotion } from 'react-native-reanimated';
|
|
8
|
+
import { Keyboard, Platform, StyleSheet } from 'react-native';
|
|
9
|
+
import { useAnimatedStyle, useReducedMotion } from 'react-native-reanimated';
|
|
10
10
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
11
11
|
import { useSelectedNode } from './SelectedNodeProvider';
|
|
12
12
|
|
|
@@ -18,15 +18,33 @@ export interface MobileMenuDrawerRef {
|
|
|
18
18
|
setMobileMenuOpen: (isOpen: boolean) => void;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export const BottomSheetBackdropComponent = (backdropComponentProps: BottomSheetBackdropProps) =>
|
|
22
|
-
|
|
23
|
-
{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
);
|
|
21
|
+
export const BottomSheetBackdropComponent = (backdropComponentProps: BottomSheetBackdropProps) => {
|
|
22
|
+
const androidTouchEventFix = useAnimatedStyle(() => {
|
|
23
|
+
if (Platform.OS === 'android') {
|
|
24
|
+
return {
|
|
25
|
+
zIndex: backdropComponentProps.animatedIndex.value >= 0 ? 0 : -1,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return {};
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<BottomSheetBackdrop
|
|
33
|
+
{...backdropComponentProps}
|
|
34
|
+
appearsOnIndex={0}
|
|
35
|
+
disappearsOnIndex={-1}
|
|
36
|
+
pressBehavior={'close'}
|
|
37
|
+
style={[
|
|
38
|
+
backdropComponentProps.style,
|
|
39
|
+
androidTouchEventFix,
|
|
40
|
+
{
|
|
41
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
42
|
+
paddingTop: Platform.OS === 'android' ? 1 : undefined,
|
|
43
|
+
},
|
|
44
|
+
]}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
30
48
|
|
|
31
49
|
const snapPoints = ['50%', '75%'];
|
|
32
50
|
|
package/src/Refs.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import React, { useMemo, useCallback, useEffect, useState } from 'react';
|
|
3
|
-
import type { State } from 'storybook/
|
|
3
|
+
import type { State } from 'storybook/manager-api';
|
|
4
4
|
import { styled } from '@storybook/react-native-theming';
|
|
5
5
|
import { Tree } from './Tree';
|
|
6
6
|
import type { RefType } from '@storybook/react-native-ui-common';
|
package/src/Sidebar.stories.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { IndexHash, State } from 'storybook/
|
|
3
|
+
import type { IndexHash, State } from 'storybook/manager-api';
|
|
4
4
|
import { Button, type RefType } from '@storybook/react-native-ui-common';
|
|
5
5
|
import { Sidebar } from './Sidebar';
|
|
6
6
|
import { DEFAULT_REF_ID } from './constants';
|
package/src/Sidebar.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import { styled } from '@storybook/react-native-theming';
|
|
3
|
-
import type { State } from 'storybook/
|
|
3
|
+
import type { State } from 'storybook/manager-api';
|
|
4
4
|
import type { API_LoadedRefData } from 'storybook/internal/types';
|
|
5
5
|
import { Explorer } from './Explorer';
|
|
6
6
|
import { Search } from './Search';
|
package/src/Tree.stories.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import type { ComponentEntry, IndexHash } from 'storybook/
|
|
2
|
+
import type { ComponentEntry, IndexHash } from 'storybook/manager-api';
|
|
3
3
|
import type { StoryObj, Meta } from '@storybook/react';
|
|
4
4
|
import { Tree } from './Tree';
|
|
5
5
|
import type { Dataset } from '@storybook/react-native-ui-common';
|
package/src/Tree.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import type {
|
|
|
4
4
|
State,
|
|
5
5
|
StoriesHash,
|
|
6
6
|
StoryEntry,
|
|
7
|
-
} from 'storybook/
|
|
7
|
+
} from 'storybook/manager-api';
|
|
8
8
|
import { styled } from '@storybook/react-native-theming';
|
|
9
9
|
import React, { useCallback, useMemo, useRef } from 'react';
|
|
10
10
|
import { View } from 'react-native';
|