@storybook/react-native-ui 8.5.5 → 8.6.0-alpha.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/dist/index.js CHANGED
@@ -3951,11 +3951,11 @@ var Explorer = import_react13.default.memo(function Explorer2({
3951
3951
 
3952
3952
  // src/Sidebar.tsx
3953
3953
  var import_react19 = __toESM(require("react"));
3954
- var import_react_native_theming11 = require("@storybook/react-native-theming");
3954
+ var import_react_native_theming12 = require("@storybook/react-native-theming");
3955
3955
 
3956
3956
  // src/Search.tsx
3957
3957
  var import_bottom_sheet = require("@gorhom/bottom-sheet");
3958
- var import_react_native_theming9 = require("@storybook/react-native-theming");
3958
+ var import_react_native_theming10 = require("@storybook/react-native-theming");
3959
3959
  var import_fuse = __toESM(require("fuse.js"));
3960
3960
  var import_react15 = __toESM(require("react"));
3961
3961
  var import_react_native3 = require("react-native");
@@ -3991,20 +3991,16 @@ var CloseIcon = ({
3991
3991
 
3992
3992
  // src/icon/SearchIcon.tsx
3993
3993
  var import_react_native_svg9 = require("react-native-svg");
3994
+ var import_react_native_theming9 = require("@storybook/react-native-theming");
3994
3995
  var import_jsx_runtime17 = require("react/jsx-runtime");
3995
- var SearchIcon = ({
3996
- color = "currentColor",
3997
- width = 14,
3998
- height = 14,
3999
- ...props
4000
- }) => {
4001
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native_svg9.Svg, { width, height, viewBox: "0 0 14 14", fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3996
+ var SearchIcon = ({ width = 14, height = 14, ...props }) => {
3997
+ const theme = (0, import_react_native_theming9.useTheme)();
3998
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native_svg9.Svg, { width, height, viewBox: "0 0 14 14", fill: theme.color.dark, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
4002
3999
  import_react_native_svg9.Path,
4003
4000
  {
4004
4001
  fillRule: "evenodd",
4005
4002
  clipRule: "evenodd",
4006
- d: "M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z",
4007
- fill: color
4003
+ d: "M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z"
4008
4004
  }
4009
4005
  ) });
4010
4006
  };
@@ -4033,24 +4029,23 @@ var options = {
4033
4029
  { name: "path", weight: 0.3 }
4034
4030
  ]
4035
4031
  };
4036
- var SearchIconWrapper = import_react_native_theming9.styled.View(({ theme }) => ({
4032
+ var SearchIconWrapper = import_react_native_theming10.styled.View({
4037
4033
  position: "absolute",
4038
4034
  top: 0,
4039
4035
  left: 8,
4040
4036
  zIndex: 1,
4041
4037
  pointerEvents: "none",
4042
- color: theme.textMutedColor,
4043
4038
  display: "flex",
4044
4039
  flexDirection: "row",
4045
4040
  alignItems: "center",
4046
4041
  height: "100%"
4047
- }));
4048
- var SearchField = import_react_native_theming9.styled.View({
4042
+ });
4043
+ var SearchField = import_react_native_theming10.styled.View({
4049
4044
  display: "flex",
4050
4045
  flexDirection: "column",
4051
4046
  position: "relative"
4052
4047
  });
4053
- var BottomSheetInput = (0, import_react_native_theming9.styled)(import_bottom_sheet.BottomSheetTextInput)(({ theme }) => ({
4048
+ var BottomSheetInput = (0, import_react_native_theming10.styled)(import_bottom_sheet.BottomSheetTextInput)(({ theme }) => ({
4054
4049
  height: 32,
4055
4050
  paddingLeft: 28,
4056
4051
  paddingRight: 28,
@@ -4064,7 +4059,7 @@ var BottomSheetInput = (0, import_react_native_theming9.styled)(import_bottom_sh
4064
4059
  color: theme.color.defaultText,
4065
4060
  width: "100%"
4066
4061
  }));
4067
- var Input = (0, import_react_native_theming9.styled)(import_react_native3.TextInput)(({ theme }) => ({
4062
+ var Input = (0, import_react_native_theming10.styled)(import_react_native3.TextInput)(({ theme }) => ({
4068
4063
  height: 32,
4069
4064
  paddingLeft: 28,
4070
4065
  paddingRight: 28,
@@ -4076,7 +4071,7 @@ var Input = (0, import_react_native_theming9.styled)(import_react_native3.TextIn
4076
4071
  color: theme.color.defaultText,
4077
4072
  width: "100%"
4078
4073
  }));
4079
- var ClearIcon = import_react_native_theming9.styled.TouchableOpacity(({ theme }) => ({
4074
+ var ClearIcon = import_react_native_theming10.styled.TouchableOpacity(({ theme }) => ({
4080
4075
  position: "absolute",
4081
4076
  top: 0,
4082
4077
  bottom: 0,
@@ -4228,18 +4223,18 @@ var Search = import_react15.default.memo(function Search2({ children, dataset, s
4228
4223
  });
4229
4224
 
4230
4225
  // src/SearchResults.tsx
4231
- var import_react_native_theming10 = require("@storybook/react-native-theming");
4226
+ var import_react_native_theming11 = require("@storybook/react-native-theming");
4232
4227
  var import_react16 = __toESM(require("react"));
4233
4228
  var import_polished2 = require("polished");
4234
4229
  var import_react_native4 = require("react-native");
4235
4230
  var import_jsx_runtime19 = require("react/jsx-runtime");
4236
4231
  var import_react17 = require("react");
4237
- var ResultsList = import_react_native_theming10.styled.View({
4232
+ var ResultsList = import_react_native_theming11.styled.View({
4238
4233
  margin: 0,
4239
4234
  padding: 0,
4240
4235
  marginTop: 8
4241
4236
  });
4242
- var ResultRow = import_react_native_theming10.styled.TouchableOpacity(
4237
+ var ResultRow = import_react_native_theming11.styled.TouchableOpacity(
4243
4238
  ({ theme, isHighlighted }) => ({
4244
4239
  width: "100%",
4245
4240
  border: "none",
@@ -4264,28 +4259,28 @@ var ResultRow = import_react_native_theming10.styled.TouchableOpacity(
4264
4259
  }
4265
4260
  })
4266
4261
  );
4267
- var IconWrapper = import_react_native_theming10.styled.View({
4262
+ var IconWrapper = import_react_native_theming11.styled.View({
4268
4263
  marginTop: 2
4269
4264
  });
4270
- var ResultRowContent = import_react_native_theming10.styled.View(() => ({
4265
+ var ResultRowContent = import_react_native_theming11.styled.View(() => ({
4271
4266
  display: "flex",
4272
4267
  flexDirection: "column"
4273
4268
  }));
4274
- var NoResults = import_react_native_theming10.styled.View(({ theme }) => ({
4269
+ var NoResults = import_react_native_theming11.styled.View(({ theme }) => ({
4275
4270
  marginTop: 20,
4276
4271
  textAlign: "center",
4277
4272
  fontSize: theme.typography.size.s2,
4278
4273
  lineHeight: 18,
4279
4274
  color: theme.color.defaultText
4280
4275
  }));
4281
- var Mark = import_react_native_theming10.styled.Text(({ theme }) => ({
4276
+ var Mark = import_react_native_theming11.styled.Text(({ theme }) => ({
4282
4277
  backgroundColor: "transparent",
4283
4278
  color: theme.color.secondary
4284
4279
  }));
4285
- var MoreWrapper = import_react_native_theming10.styled.View({
4280
+ var MoreWrapper = import_react_native_theming11.styled.View({
4286
4281
  marginTop: 8
4287
4282
  });
4288
- var RecentlyOpenedTitle = import_react_native_theming10.styled.View(({ theme }) => ({
4283
+ var RecentlyOpenedTitle = import_react_native_theming11.styled.View(({ theme }) => ({
4289
4284
  display: "flex",
4290
4285
  flexDirection: "row",
4291
4286
  justifyContent: "space-between",
@@ -4318,19 +4313,19 @@ var Highlight = import_react16.default.memo(
4318
4313
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Text, { children: result }, `end-${match.key}`);
4319
4314
  }
4320
4315
  );
4321
- var Title = import_react_native_theming10.styled.Text(({ theme }) => ({
4316
+ var Title = import_react_native_theming11.styled.Text(({ theme }) => ({
4322
4317
  justifyContent: "flex-start",
4323
4318
  color: theme.textMutedColor,
4324
4319
  fontSize: theme.typography.size.s2
4325
4320
  }));
4326
- var Path10 = import_react_native_theming10.styled.View(({ theme }) => ({
4321
+ var Path10 = import_react_native_theming11.styled.View(({ theme }) => ({
4327
4322
  justifyContent: "flex-start",
4328
4323
  marginVertical: 2,
4329
4324
  color: theme.textMutedColor,
4330
4325
  fontSize: theme.typography.size.s1 - 1,
4331
4326
  flexDirection: "row"
4332
4327
  }));
4333
- var PathText = import_react_native_theming10.styled.Text(({ theme }) => ({
4328
+ var PathText = import_react_native_theming11.styled.Text(({ theme }) => ({
4334
4329
  fontSize: theme.typography.size.s1 - 1,
4335
4330
  color: theme.textMutedColor
4336
4331
  }));
@@ -4372,7 +4367,7 @@ var Result = import_react16.default.memo(function Result2({
4372
4367
  item.status ? i : null
4373
4368
  ] });
4374
4369
  });
4375
- var Text = import_react_native_theming10.styled.Text(({ theme }) => ({
4370
+ var Text = import_react_native_theming11.styled.Text(({ theme }) => ({
4376
4371
  color: theme.color.defaultText
4377
4372
  }));
4378
4373
  var SearchResults = import_react16.default.memo(function SearchResults2({
@@ -4471,14 +4466,14 @@ var useLastViewed = (selection) => {
4471
4466
  // src/Sidebar.tsx
4472
4467
  var import_react_native5 = require("react-native");
4473
4468
  var import_jsx_runtime20 = require("react/jsx-runtime");
4474
- var Container2 = import_react_native_theming11.styled.View(({ theme }) => ({
4469
+ var Container2 = import_react_native_theming12.styled.View(({ theme }) => ({
4475
4470
  width: "100%",
4476
4471
  height: "100%",
4477
4472
  display: "flex",
4478
4473
  flexDirection: "column",
4479
4474
  backgroundColor: theme.background.content
4480
4475
  }));
4481
- var Top = import_react_native_theming11.styled.View({
4476
+ var Top = import_react_native_theming12.styled.View({
4482
4477
  paddingLeft: 4,
4483
4478
  paddingRight: 4,
4484
4479
  paddingTop: 16,
@@ -4555,7 +4550,7 @@ var Sidebar = import_react19.default.memo(function Sidebar2({
4555
4550
  // src/Layout.tsx
4556
4551
  var import_core_events = require("@storybook/core/core-events");
4557
4552
  var import_manager_api2 = require("@storybook/core/manager-api");
4558
- var import_react_native_theming17 = require("@storybook/react-native-theming");
4553
+ var import_react_native_theming18 = require("@storybook/react-native-theming");
4559
4554
  var import_react28 = require("react");
4560
4555
  var import_react_native9 = require("react-native");
4561
4556
  var import_react_native_safe_area_context3 = require("react-native-safe-area-context");
@@ -4563,14 +4558,14 @@ var import_react_native_safe_area_context3 = require("react-native-safe-area-con
4563
4558
  // src/MobileAddonsPanel.tsx
4564
4559
  var import_bottom_sheet2 = require("@gorhom/bottom-sheet");
4565
4560
  var import_manager_api = require("@storybook/core/manager-api");
4566
- var import_react_native_theming12 = require("@storybook/react-native-theming");
4561
+ var import_react_native_theming13 = require("@storybook/react-native-theming");
4567
4562
  var import_types3 = require("@storybook/core/types");
4568
4563
  var import_react21 = require("react");
4569
4564
  var import_react_native6 = require("react-native");
4570
4565
  var import_react_native_gesture_handler = require("react-native-gesture-handler");
4571
4566
  var import_react_native_reanimated = __toESM(require("react-native-reanimated"));
4572
4567
  var import_react_native_safe_area_context = require("react-native-safe-area-context");
4573
- var import_react_native_theming13 = require("@storybook/react-native-theming");
4568
+ var import_react_native_theming14 = require("@storybook/react-native-theming");
4574
4569
 
4575
4570
  // src/util/useStyle.ts
4576
4571
  var import_react20 = require("react");
@@ -4589,7 +4584,7 @@ var contentStyle = {
4589
4584
  };
4590
4585
  var MobileAddonsPanel = (0, import_react21.forwardRef)(
4591
4586
  ({ storyId }, ref) => {
4592
- const theme = (0, import_react_native_theming13.useTheme)();
4587
+ const theme = (0, import_react_native_theming14.useTheme)();
4593
4588
  const reducedMotion = (0, import_react_native_reanimated.useReducedMotion)();
4594
4589
  const addonsPanelBottomSheetRef = (0, import_react21.useRef)(null);
4595
4590
  const insets = (0, import_react_native_safe_area_context.useSafeAreaInsets)();
@@ -4741,7 +4736,7 @@ var AddonsTabs = ({ onClose, storyId }) => {
4741
4736
  var Tab = ({ active, onPress, text }) => {
4742
4737
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TabButton, { active, onPress, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TabText, { active, children: text }) });
4743
4738
  };
4744
- var TabButton = import_react_native_theming12.styled.TouchableOpacity(({ theme, active }) => ({
4739
+ var TabButton = import_react_native_theming13.styled.TouchableOpacity(({ theme, active }) => ({
4745
4740
  borderBottomWidth: active ? 2 : 0,
4746
4741
  borderBottomColor: active ? theme.barSelectedColor : void 0,
4747
4742
  overflow: "hidden",
@@ -4749,7 +4744,7 @@ var TabButton = import_react_native_theming12.styled.TouchableOpacity(({ theme,
4749
4744
  justifyContent: "center",
4750
4745
  alignItems: "center"
4751
4746
  }));
4752
- var TabText = import_react_native_theming12.styled.Text(({ theme, active }) => ({
4747
+ var TabText = import_react_native_theming13.styled.Text(({ theme, active }) => ({
4753
4748
  color: active ? theme.barSelectedColor : theme.color.mediumdark,
4754
4749
  textAlign: "center",
4755
4750
  fontWeight: "bold",
@@ -4759,7 +4754,7 @@ var TabText = import_react_native_theming12.styled.Text(({ theme, active }) => (
4759
4754
 
4760
4755
  // src/MobileMenuDrawer.tsx
4761
4756
  var import_bottom_sheet3 = __toESM(require("@gorhom/bottom-sheet"));
4762
- var import_react_native_theming14 = require("@storybook/react-native-theming");
4757
+ var import_react_native_theming15 = require("@storybook/react-native-theming");
4763
4758
  var import_react22 = require("react");
4764
4759
  var import_react_native7 = require("react-native");
4765
4760
  var import_react_native_reanimated2 = require("react-native-reanimated");
@@ -4780,7 +4775,7 @@ var MobileMenuDrawer = (0, import_react22.memo)(
4780
4775
  (0, import_react22.forwardRef)(({ children }, ref) => {
4781
4776
  const reducedMotion = (0, import_react_native_reanimated2.useReducedMotion)();
4782
4777
  const insets = (0, import_react_native_safe_area_context2.useSafeAreaInsets)();
4783
- const theme = (0, import_react_native_theming14.useTheme)();
4778
+ const theme = (0, import_react_native_theming15.useTheme)();
4784
4779
  const menuBottomSheetRef = (0, import_react22.useRef)(null);
4785
4780
  const { scrollToSelectedNode, scrollRef } = useSelectedNode();
4786
4781
  (0, import_react22.useImperativeHandle)(ref, () => ({
@@ -5122,10 +5117,10 @@ var BottomBarToggleIcon = ({
5122
5117
  // src/icon/CloseFullscreenIcon.tsx
5123
5118
  var import_react26 = require("react");
5124
5119
  var import_react_native_svg13 = __toESM(require("react-native-svg"));
5125
- var import_react_native_theming15 = require("@storybook/react-native-theming");
5120
+ var import_react_native_theming16 = require("@storybook/react-native-theming");
5126
5121
  var import_jsx_runtime28 = require("react/jsx-runtime");
5127
5122
  function CloseFullscreenIcon({ color, width = 14, height = 14, ...props }) {
5128
- const theme = (0, import_react_native_theming15.useTheme)();
5123
+ const theme = (0, import_react_native_theming16.useTheme)();
5129
5124
  const fillColor = (0, import_react26.useMemo)(() => {
5130
5125
  return color ?? theme.color.defaultText;
5131
5126
  }, [color, theme.color.defaultText]);
@@ -5134,11 +5129,11 @@ function CloseFullscreenIcon({ color, width = 14, height = 14, ...props }) {
5134
5129
 
5135
5130
  // src/icon/FullscreenIcon.tsx
5136
5131
  var import_react_native_svg14 = __toESM(require("react-native-svg"));
5137
- var import_react_native_theming16 = require("@storybook/react-native-theming");
5132
+ var import_react_native_theming17 = require("@storybook/react-native-theming");
5138
5133
  var import_react27 = require("react");
5139
5134
  var import_jsx_runtime29 = require("react/jsx-runtime");
5140
5135
  function FullscreenIcon({ color, width = 14, height = 14, ...props }) {
5141
- const theme = (0, import_react_native_theming16.useTheme)();
5136
+ const theme = (0, import_react_native_theming17.useTheme)();
5142
5137
  const fillColor = (0, import_react27.useMemo)(() => {
5143
5138
  return color ?? theme.color.defaultText;
5144
5139
  }, [color, theme.color.defaultText]);
@@ -5197,7 +5192,7 @@ var Layout = ({
5197
5192
  story,
5198
5193
  children
5199
5194
  }) => {
5200
- const theme = (0, import_react_native_theming17.useTheme)();
5195
+ const theme = (0, import_react_native_theming18.useTheme)();
5201
5196
  const mobileMenuDrawerRef = (0, import_react28.useRef)(null);
5202
5197
  const addonPanelRef = (0, import_react28.useRef)(null);
5203
5198
  const insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
@@ -5378,7 +5373,7 @@ var Layout = ({
5378
5373
  isDesktop ? null : /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MobileAddonsPanel, { ref: addonPanelRef, storyId: story?.id })
5379
5374
  ] });
5380
5375
  };
5381
- var Nav = import_react_native_theming17.styled.View({
5376
+ var Nav = import_react_native_theming18.styled.View({
5382
5377
  display: "flex",
5383
5378
  flexDirection: "row",
5384
5379
  alignItems: "center",
@@ -5387,14 +5382,14 @@ var Nav = import_react_native_theming17.styled.View({
5387
5382
  height: 40,
5388
5383
  paddingHorizontal: 6
5389
5384
  });
5390
- var Container3 = import_react_native_theming17.styled.View(({ theme }) => ({
5385
+ var Container3 = import_react_native_theming18.styled.View(({ theme }) => ({
5391
5386
  alignSelf: "flex-end",
5392
5387
  width: "100%",
5393
5388
  backgroundColor: theme.barBg,
5394
5389
  borderTopColor: theme.appBorderColor,
5395
5390
  borderTopWidth: 1
5396
5391
  }));
5397
- var Button2 = import_react_native_theming17.styled.TouchableOpacity(({ theme }) => ({
5392
+ var Button2 = import_react_native_theming18.styled.TouchableOpacity(({ theme }) => ({
5398
5393
  display: "flex",
5399
5394
  flexDirection: "row",
5400
5395
  alignItems: "center",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native-ui",
3
- "version": "8.5.5",
3
+ "version": "8.6.0-alpha.1",
4
4
  "description": "ui components for react native storybook",
5
5
  "keywords": [
6
6
  "react",
@@ -58,9 +58,9 @@
58
58
  "typescript": "^5.3.3"
59
59
  },
60
60
  "dependencies": {
61
- "@storybook/core": "^8.5.1",
62
- "@storybook/react": "^8.5.1",
63
- "@storybook/react-native-theming": "^8.5.5",
61
+ "@storybook/core": "^8.5.8",
62
+ "@storybook/react": "^8.5.8",
63
+ "@storybook/react-native-theming": "^8.6.0-alpha.1",
64
64
  "fuse.js": "^7.0.0",
65
65
  "memoizerific": "^1.11.3",
66
66
  "polished": "^4.3.1",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "08be202a23cb2490d295c6c3476d414163b8d40e"
84
+ "gitHead": "e3cb59f7869bbd1519c107895e2ae9b7e2ea6544"
85
85
  }
package/src/Search.tsx CHANGED
@@ -39,18 +39,17 @@ const options = {
39
39
  ],
40
40
  } as IFuseOptions<SearchItem>;
41
41
 
42
- const SearchIconWrapper = styled.View(({ theme }) => ({
42
+ const SearchIconWrapper = styled.View({
43
43
  position: 'absolute',
44
44
  top: 0,
45
45
  left: 8,
46
46
  zIndex: 1,
47
47
  pointerEvents: 'none',
48
- color: theme.textMutedColor,
49
48
  display: 'flex',
50
49
  flexDirection: 'row',
51
50
  alignItems: 'center',
52
51
  height: '100%',
53
- }));
52
+ });
54
53
 
55
54
  const SearchField = styled.View({
56
55
  display: 'flex',
@@ -1,19 +1,14 @@
1
- import * as React from 'react';
2
1
  import { Path, Svg, SvgProps } from 'react-native-svg';
2
+ import { useTheme } from '@storybook/react-native-theming';
3
3
 
4
- export const SearchIcon = ({
5
- color = 'currentColor',
6
- width = 14,
7
- height = 14,
8
- ...props
9
- }: SvgProps) => {
4
+ export const SearchIcon = ({ width = 14, height = 14, ...props }: SvgProps) => {
5
+ const theme = useTheme();
10
6
  return (
11
- <Svg width={width} height={height} viewBox="0 0 14 14" fill="none" {...props}>
7
+ <Svg width={width} height={height} viewBox="0 0 14 14" fill={theme.color.dark} {...props}>
12
8
  <Path
13
9
  fillRule="evenodd"
14
10
  clipRule="evenodd"
15
11
  d="M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z"
16
- fill={color}
17
12
  />
18
13
  </Svg>
19
14
  );