@storybook/react-native-ui 10.2.2-alpha.4 → 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
@@ -332,9 +332,6 @@ var useSelectedNode = () => (0, import_react4.useContext)(SelectedNodeContext);
332
332
 
333
333
  // src/Tree.tsx
334
334
  var import_jsx_runtime9 = require("react/jsx-runtime");
335
- var TextItem = import_react_native_theming5.styled.Text(({ theme }) => ({
336
- color: theme.color.defaultText
337
- }));
338
335
  var Node = import_react5.default.memo(function Node2({
339
336
  item,
340
337
  refId,
@@ -390,7 +387,7 @@ var Node = import_react5.default.memo(function Node2({
390
387
  "aria-expanded": isExpanded,
391
388
  children: [
392
389
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CollapseIcon, { isExpanded }),
393
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TextItem, { children: item.renderLabel?.(item, {}) || item.name })
390
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(RootNodeText, { children: (0, import_react_native_ui_common.startCase)(item.name) })
394
391
  ]
395
392
  }
396
393
  ),
@@ -425,7 +422,7 @@ var Node = import_react5.default.memo(function Node2({
425
422
  event.preventDefault();
426
423
  setExpanded({ ids: [item.id], value: !isExpanded });
427
424
  },
428
- children: item.renderLabel?.(item) || item.name
425
+ children: (0, import_react_native_ui_common.startCase)(item.name)
429
426
  },
430
427
  id
431
428
  );
@@ -454,7 +451,7 @@ var RootNode = import_react_native_theming5.styled.View(() => ({
454
451
  minHeight: 28
455
452
  }));
456
453
  var RootNodeText = import_react_native_theming5.styled.Text(({ theme }) => ({
457
- fontSize: theme.typography.size.s1 - 1,
454
+ fontSize: theme.typography.size.s1,
458
455
  fontWeight: theme.typography.weight.bold,
459
456
  color: theme.textMutedColor,
460
457
  lineHeight: 16,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native-ui",
3
- "version": "10.2.2-alpha.4",
3
+ "version": "10.2.2-alpha.5",
4
4
  "description": "ui components for react native storybook",
5
5
  "keywords": [
6
6
  "react",
@@ -40,8 +40,8 @@
40
40
  "@gorhom/portal": "^1.0.14",
41
41
  "@nozbe/microfuzz": "^1.0.0",
42
42
  "@storybook/react": "^10.2.2",
43
- "@storybook/react-native-theming": "^10.2.2-alpha.4",
44
- "@storybook/react-native-ui-common": "^10.2.2-alpha.4",
43
+ "@storybook/react-native-theming": "^10.2.2-alpha.5",
44
+ "@storybook/react-native-ui-common": "^10.2.2-alpha.5",
45
45
  "polished": "^4.3.1"
46
46
  },
47
47
  "peerDependencies": {
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "f96bb7e3c60928bed07cae53a833fede3a65498a"
63
+ "gitHead": "51485fba2ef3d8f323905bdbee0ad1828ce45eb4"
64
64
  }
package/src/Tree.tsx CHANGED
@@ -17,6 +17,7 @@ import {
17
17
  getAncestorIds,
18
18
  getDescendantIds,
19
19
  isStoryHoistable,
20
+ startCase,
20
21
  } from '@storybook/react-native-ui-common';
21
22
  import { ComponentNode, GroupNode, StoryNode } from './TreeNode';
22
23
  import { CollapseAllIcon } from './icon/CollapseAllIcon';
@@ -41,10 +42,6 @@ interface NodeProps {
41
42
  status: State['status'][keyof State['status']];
42
43
  }
43
44
 
44
- const TextItem = styled.Text(({ theme }) => ({
45
- color: theme.color.defaultText,
46
- }));
47
-
48
45
  export const Node = React.memo<NodeProps>(function Node({
49
46
  item,
50
47
  refId,
@@ -106,7 +103,7 @@ export const Node = React.memo<NodeProps>(function Node({
106
103
  aria-expanded={isExpanded}
107
104
  >
108
105
  <CollapseIcon isExpanded={isExpanded} />
109
- <TextItem>{item.renderLabel?.(item, {}) || item.name}</TextItem>
106
+ <RootNodeText>{startCase(item.name)}</RootNodeText>
110
107
  </CollapseButton>
111
108
  {isExpanded && (
112
109
  <IconButton
@@ -142,7 +139,7 @@ export const Node = React.memo<NodeProps>(function Node({
142
139
  setExpanded({ ids: [item.id], value: !isExpanded });
143
140
  }}
144
141
  >
145
- {(item.renderLabel as (i: typeof item) => React.ReactNode)?.(item) || item.name}
142
+ {startCase(item.name)}
146
143
  </BranchNode>
147
144
  );
148
145
  }
@@ -174,7 +171,7 @@ export const RootNode = styled.View(() => ({
174
171
  }));
175
172
 
176
173
  export const RootNodeText = styled.Text(({ theme }) => ({
177
- fontSize: theme.typography.size.s1 - 1,
174
+ fontSize: theme.typography.size.s1,
178
175
  fontWeight: theme.typography.weight.bold,
179
176
  color: theme.textMutedColor,
180
177
  lineHeight: 16,