@storybook/react-native-ui-lite 10.2.2-alpha.3 → 10.2.2-alpha.5

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
@@ -464,10 +464,6 @@ var useSelectedNode = () => (0, import_react3.useContext)(SelectedNodeContext);
464
464
 
465
465
  // src/Tree.tsx
466
466
  var import_jsx_runtime4 = require("react/jsx-runtime");
467
- var TextItem = import_react_native_theming3.styled.Text(({ theme }) => ({
468
- fontSize: theme.typography.size.s2 + 1,
469
- color: theme.color.defaultText
470
- }));
471
467
  var Node = import_react4.default.memo(function Node2({
472
468
  item,
473
469
  refId,
@@ -512,7 +508,7 @@ var Node = import_react4.default.memo(function Node2({
512
508
  "aria-expanded": isExpanded,
513
509
  children: [
514
510
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CollapseIcon, { isExpanded }),
515
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TextItem, { children: item.renderLabel?.(item, {}) || item.name })
511
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RootNodeText, { children: (0, import_react_native_ui_common.startCase)(item.name) })
516
512
  ]
517
513
  }
518
514
  ),
@@ -548,7 +544,7 @@ var Node = import_react4.default.memo(function Node2({
548
544
  event.preventDefault();
549
545
  setExpanded({ ids: [item.id], value: !isExpanded });
550
546
  },
551
- children: item.renderLabel?.(item) || item.name
547
+ children: (0, import_react_native_ui_common.startCase)(item.name)
552
548
  },
553
549
  id
554
550
  );
@@ -577,7 +573,7 @@ var RootNode = import_react_native_theming3.styled.View(() => ({
577
573
  minHeight: 34
578
574
  }));
579
575
  var RootNodeText = import_react_native_theming3.styled.Text(({ theme }) => ({
580
- fontSize: theme.typography.size.s1 - 1,
576
+ fontSize: theme.typography.size.s2 - 1,
581
577
  fontWeight: theme.typography.weight.bold,
582
578
  color: theme.textMutedColor,
583
579
  lineHeight: 16,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native-ui-lite",
3
- "version": "10.2.2-alpha.3",
3
+ "version": "10.2.2-alpha.5",
4
4
  "description": "lightweight ui components for react native storybook",
5
5
  "keywords": [
6
6
  "react",
@@ -42,8 +42,8 @@
42
42
  "@legendapp/list": "3.0.0-beta.31",
43
43
  "@nozbe/microfuzz": "^1.0.0",
44
44
  "@storybook/react": "^10.2.2",
45
- "@storybook/react-native-theming": "^10.2.2-alpha.3",
46
- "@storybook/react-native-ui-common": "^10.2.2-alpha.3",
45
+ "@storybook/react-native-theming": "^10.2.2-alpha.5",
46
+ "@storybook/react-native-ui-common": "^10.2.2-alpha.5",
47
47
  "polished": "^4.3.1",
48
48
  "react-native-safe-area-context": "^5"
49
49
  },
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "b996f5156b78ae94b967434130a6af1bee2876a2"
61
+ "gitHead": "51485fba2ef3d8f323905bdbee0ad1828ce45eb4"
62
62
  }
package/src/Tree.tsx CHANGED
@@ -8,6 +8,7 @@ import {
8
8
  isStoryHoistable,
9
9
  Item,
10
10
  useExpanded,
11
+ startCase,
11
12
  } from '@storybook/react-native-ui-common';
12
13
  import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
13
14
  import { View, ViewStyle } from 'react-native';
@@ -40,11 +41,6 @@ interface NodeProps {
40
41
  status: State['status'][keyof State['status']];
41
42
  }
42
43
 
43
- const TextItem = styled.Text(({ theme }) => ({
44
- fontSize: theme.typography.size.s2 + 1,
45
- color: theme.color.defaultText,
46
- }));
47
-
48
44
  export const Node = React.memo<NodeProps>(function Node({
49
45
  item,
50
46
  refId,
@@ -92,7 +88,7 @@ export const Node = React.memo<NodeProps>(function Node({
92
88
  aria-expanded={isExpanded}
93
89
  >
94
90
  <CollapseIcon isExpanded={isExpanded} />
95
- <TextItem>{item.renderLabel?.(item, {}) || item.name}</TextItem>
91
+ <RootNodeText>{startCase(item.name)}</RootNodeText>
96
92
  </CollapseButton>
97
93
  {isExpanded && (
98
94
  <IconButton
@@ -129,7 +125,7 @@ export const Node = React.memo<NodeProps>(function Node({
129
125
  setExpanded({ ids: [item.id], value: !isExpanded });
130
126
  }}
131
127
  >
132
- {(item.renderLabel as (i: typeof item) => React.ReactNode)?.(item) || item.name}
128
+ {startCase(item.name)}
133
129
  </BranchNode>
134
130
  );
135
131
  }
@@ -161,7 +157,7 @@ export const RootNode = styled.View(() => ({
161
157
  }));
162
158
 
163
159
  export const RootNodeText = styled.Text(({ theme }) => ({
164
- fontSize: theme.typography.size.s1 - 1,
160
+ fontSize: theme.typography.size.s2 - 1,
165
161
  fontWeight: theme.typography.weight.bold,
166
162
  color: theme.textMutedColor,
167
163
  lineHeight: 16,