@delacour/react-native-ui 0.6.0-alpha.20261103164139 → 0.6.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.
Files changed (250) hide show
  1. package/package.json +13 -7
  2. package/src/components/accordion/AGENTS.md +1 -0
  3. package/src/components/accordion/accordion.render.test.tsx +330 -0
  4. package/src/components/alert/AGENTS.md +1 -0
  5. package/src/components/alert/alert.render.test.tsx +162 -0
  6. package/src/components/animated-badge/AGENTS.md +1 -0
  7. package/src/components/animated-badge/animated-badge.render.test.tsx +136 -0
  8. package/src/components/attachment/AGENTS.md +1 -0
  9. package/src/components/attachment/attachment.render.test.tsx +422 -0
  10. package/src/components/avatar/AGENTS.md +1 -0
  11. package/src/components/avatar/avatar.render.test.tsx +353 -0
  12. package/src/components/badge/AGENTS.md +1 -0
  13. package/src/components/badge/badge.render.test.tsx +216 -0
  14. package/src/components/bottom-sheet/AGENTS.md +1 -0
  15. package/src/components/bottom-sheet/bottom-sheet.render.test.tsx +190 -0
  16. package/src/components/breadcrumb/AGENTS.md +1 -0
  17. package/src/components/breadcrumb/breadcrumb.render.test.tsx +324 -0
  18. package/src/components/button/AGENTS.md +1 -0
  19. package/src/components/button/button.render.test.tsx +67 -0
  20. package/src/components/calendar/AGENTS.md +1 -0
  21. package/src/components/calendar/calendar.render.test.tsx +388 -0
  22. package/src/components/card/AGENTS.md +1 -0
  23. package/src/components/card/card.render.test.tsx +287 -0
  24. package/src/components/carousel/AGENTS.md +3 -0
  25. package/src/components/carousel/carousel-content.tsx +3 -1
  26. package/src/components/carousel/carousel.render.test.tsx +356 -0
  27. package/src/components/chart/AGENTS.md +1 -0
  28. package/src/components/chart/chart.render.test.tsx +443 -0
  29. package/src/components/checkbox/AGENTS.md +2 -0
  30. package/src/components/checkbox/checkbox.render.test.tsx +250 -0
  31. package/src/components/checkbox/checkbox.tsx +2 -1
  32. package/src/components/chip/chip.render.test.tsx +277 -0
  33. package/src/components/circular-text/AGENTS.md +1 -0
  34. package/src/components/circular-text/circular-text.render.test.tsx +154 -0
  35. package/src/components/collapsible/AGENTS.md +1 -0
  36. package/src/components/collapsible/collapsible.render.test.tsx +243 -0
  37. package/src/components/color-picker/AGENTS.md +1 -0
  38. package/src/components/color-picker/color-picker.render.test.tsx +347 -0
  39. package/src/components/combobox/AGENTS.md +1 -0
  40. package/src/components/combobox/combobox.render.test.tsx +464 -0
  41. package/src/components/compare/AGENTS.md +1 -0
  42. package/src/components/compare/compare.render.test.tsx +265 -0
  43. package/src/components/context-menu/AGENTS.md +1 -0
  44. package/src/components/context-menu/context-menu.render.test.tsx +183 -0
  45. package/src/components/countdown/AGENTS.md +1 -0
  46. package/src/components/countdown/countdown.render.test.tsx +194 -0
  47. package/src/components/date-picker/AGENTS.md +1 -0
  48. package/src/components/date-picker/date-picker.render.test.tsx +378 -0
  49. package/src/components/date-time-picker/AGENTS.md +1 -0
  50. package/src/components/date-time-picker/date-time-picker.render.test.tsx +356 -0
  51. package/src/components/dialog/AGENTS.md +1 -0
  52. package/src/components/dialog/dialog.render.test.tsx +67 -0
  53. package/src/components/direction/AGENTS.md +1 -0
  54. package/src/components/direction/direction.render.test.tsx +150 -0
  55. package/src/components/drawer/AGENTS.md +1 -0
  56. package/src/components/drawer/drawer.render.test.tsx +340 -0
  57. package/src/components/empty-state/AGENTS.md +1 -0
  58. package/src/components/empty-state/empty-state.render.test.tsx +134 -0
  59. package/src/components/fab/AGENTS.md +1 -0
  60. package/src/components/fab/fab.render.test.tsx +278 -0
  61. package/src/components/feedback/AGENTS.md +1 -0
  62. package/src/components/feedback/feedback.render.test.tsx +257 -0
  63. package/src/components/field/AGENTS.md +1 -0
  64. package/src/components/field/field.render.test.tsx +361 -0
  65. package/src/components/flip-card/AGENTS.md +1 -0
  66. package/src/components/flip-card/flip-card.render.test.tsx +259 -0
  67. package/src/components/flow/AGENTS.md +1 -0
  68. package/src/components/flow/flow.render.test.tsx +354 -0
  69. package/src/components/frame/AGENTS.md +1 -0
  70. package/src/components/frame/frame.render.test.tsx +273 -0
  71. package/src/components/grid-item/AGENTS.md +1 -0
  72. package/src/components/grid-item/grid-item.render.test.tsx +326 -0
  73. package/src/components/icon/AGENTS.md +1 -0
  74. package/src/components/icon/icon.render.test.tsx +110 -0
  75. package/src/components/image-viewer/AGENTS.md +5 -0
  76. package/src/components/image-viewer/image-viewer.render.test.tsx +244 -0
  77. package/src/components/image-viewer/image-viewer.tsx +6 -3
  78. package/src/components/input/AGENTS.md +1 -0
  79. package/src/components/input/input.render.test.tsx +246 -0
  80. package/src/components/item/AGENTS.md +1 -0
  81. package/src/components/item/item.render.test.tsx +276 -0
  82. package/src/components/kpi/AGENTS.md +1 -0
  83. package/src/components/kpi/kpi.render.test.tsx +232 -0
  84. package/src/components/label/AGENTS.md +1 -0
  85. package/src/components/label/label.render.test.tsx +81 -0
  86. package/src/components/leaderboard/AGENTS.md +1 -0
  87. package/src/components/leaderboard/leaderboard.render.test.tsx +198 -0
  88. package/src/components/list-group/AGENTS.md +1 -0
  89. package/src/components/list-group/list-group.render.test.tsx +279 -0
  90. package/src/components/map/AGENTS.md +1 -0
  91. package/src/components/map/map.render.test.tsx +460 -0
  92. package/src/components/markdown-editor/AGENTS.md +1 -0
  93. package/src/components/markdown-editor/markdown-editor.render.test.tsx +461 -0
  94. package/src/components/marker/AGENTS.md +1 -0
  95. package/src/components/marker/marker.render.test.tsx +232 -0
  96. package/src/components/marquee/AGENTS.md +1 -0
  97. package/src/components/marquee/marquee.render.test.tsx +145 -0
  98. package/src/components/menu/AGENTS.md +2 -0
  99. package/src/components/menu/menu-item.tsx +40 -1
  100. package/src/components/menu/menu.render.test.tsx +449 -0
  101. package/src/components/message/AGENTS.md +1 -0
  102. package/src/components/message/message.render.test.tsx +401 -0
  103. package/src/components/message-scroller/AGENTS.md +1 -0
  104. package/src/components/message-scroller/message-scroller.render.test.tsx +295 -0
  105. package/src/components/meter/AGENTS.md +1 -0
  106. package/src/components/meter/meter.render.test.tsx +249 -0
  107. package/src/components/number-input/AGENTS.md +2 -0
  108. package/src/components/number-input/number-input-field.tsx +3 -2
  109. package/src/components/number-input/number-input.render.test.tsx +426 -0
  110. package/src/components/otp-input/AGENTS.md +3 -0
  111. package/src/components/otp-input/otp-input.render.test.tsx +405 -0
  112. package/src/components/otp-input/otp-input.tsx +9 -2
  113. package/src/components/overlay/AGENTS.md +7 -1
  114. package/src/components/overlay/overlay-teleport.ts +21 -0
  115. package/src/components/overlay/overlay.render.test.tsx +367 -0
  116. package/src/components/overlay/overlay.tsx +5 -2
  117. package/src/components/page-header/AGENTS.md +1 -0
  118. package/src/components/page-header/page-header.render.test.tsx +217 -0
  119. package/src/components/pagination/AGENTS.md +1 -0
  120. package/src/components/pagination/pagination.render.test.tsx +293 -0
  121. package/src/components/planner/AGENTS.md +1 -0
  122. package/src/components/planner/planner.render.test.tsx +429 -0
  123. package/src/components/popover/AGENTS.md +1 -0
  124. package/src/components/popover/popover.render.test.tsx +206 -0
  125. package/src/components/post/AGENTS.md +4 -0
  126. package/src/components/post/post-author.tsx +8 -1
  127. package/src/components/post/post-community.tsx +7 -1
  128. package/src/components/post/post.render.test.tsx +456 -0
  129. package/src/components/pressable/AGENTS.md +7 -0
  130. package/src/components/pressable/pressable.render.test.tsx +183 -0
  131. package/src/components/pressable/pressable.tsx +1 -1
  132. package/src/components/progress/AGENTS.md +1 -0
  133. package/src/components/progress/progress.render.test.tsx +192 -0
  134. package/src/components/progress-button/AGENTS.md +1 -0
  135. package/src/components/progress-button/progress-button.render.test.tsx +251 -0
  136. package/src/components/provider/AGENTS.md +1 -0
  137. package/src/components/provider/provider.render.test.tsx +101 -0
  138. package/src/components/qr-code/AGENTS.md +1 -0
  139. package/src/components/qr-code/qr-code.render.test.tsx +117 -0
  140. package/src/components/questionnaire/AGENTS.md +1 -0
  141. package/src/components/questionnaire/questionnaire.render.test.tsx +549 -0
  142. package/src/components/radio/AGENTS.md +1 -0
  143. package/src/components/radio/radio.render.test.tsx +334 -0
  144. package/src/components/rating/AGENTS.md +5 -0
  145. package/src/components/rating/rating-stars.tsx +4 -0
  146. package/src/components/rating/rating.render.test.tsx +402 -0
  147. package/src/components/screen/AGENTS.md +9 -0
  148. package/src/components/screen/screen-error.tsx +3 -1
  149. package/src/components/screen/screen-navbar-title.tsx +6 -1
  150. package/src/components/screen/screen.render.test.tsx +309 -0
  151. package/src/components/scroll-blur/AGENTS.md +1 -0
  152. package/src/components/scroll-blur/scroll-blur.render.test.tsx +197 -0
  153. package/src/components/scroll-canvas/AGENTS.md +1 -0
  154. package/src/components/scroll-canvas/scroll-canvas.render.test.tsx +184 -0
  155. package/src/components/scroll-fade/AGENTS.md +1 -0
  156. package/src/components/scroll-fade/scroll-fade-edge.tsx +1 -0
  157. package/src/components/scroll-fade/scroll-fade.render.test.tsx +122 -0
  158. package/src/components/scroll-header/AGENTS.md +1 -0
  159. package/src/components/scroll-header/scroll-header.render.test.tsx +168 -0
  160. package/src/components/scroll-text/AGENTS.md +1 -0
  161. package/src/components/scroll-text/scroll-text.render.test.tsx +191 -0
  162. package/src/components/search-bar/AGENTS.md +1 -0
  163. package/src/components/search-bar/search-bar.render.test.tsx +377 -0
  164. package/src/components/section-progress/AGENTS.md +1 -0
  165. package/src/components/section-progress/section-progress.render.test.tsx +186 -0
  166. package/src/components/section-rail/AGENTS.md +1 -0
  167. package/src/components/section-rail/section-rail.render.test.tsx +341 -0
  168. package/src/components/select/AGENTS.md +1 -0
  169. package/src/components/select/select.render.test.tsx +466 -0
  170. package/src/components/selection-mode/AGENTS.md +1 -0
  171. package/src/components/selection-mode/selection-mode.render.test.tsx +487 -0
  172. package/src/components/separator/AGENTS.md +1 -0
  173. package/src/components/separator/separator.render.test.tsx +43 -0
  174. package/src/components/signature/AGENTS.md +4 -0
  175. package/src/components/signature/signature-pad.tsx +4 -0
  176. package/src/components/signature/signature.render.test.tsx +257 -0
  177. package/src/components/skeleton/AGENTS.md +2 -1
  178. package/src/components/skeleton/skeleton.render.test.tsx +222 -0
  179. package/src/components/sketch/AGENTS.md +2 -0
  180. package/src/components/sketch/sketch-canvas.tsx +4 -0
  181. package/src/components/sketch/sketch.render.test.tsx +527 -0
  182. package/src/components/slide-button/AGENTS.md +2 -0
  183. package/src/components/slide-button/slide-button.render.test.tsx +354 -0
  184. package/src/components/slide-button/slide-button.tsx +4 -0
  185. package/src/components/slider/AGENTS.md +12 -0
  186. package/src/components/slider/slider-thumb.tsx +2 -1
  187. package/src/components/slider/slider-track.tsx +4 -1
  188. package/src/components/slider/slider.render.test.tsx +254 -0
  189. package/src/components/slider/slider.tsx +11 -0
  190. package/src/components/sortable/AGENTS.md +2 -0
  191. package/src/components/sortable/sortable-item.tsx +2 -1
  192. package/src/components/sortable/sortable.render.test.tsx +204 -0
  193. package/src/components/spinner/AGENTS.md +3 -0
  194. package/src/components/spinner/spinner.render.test.tsx +88 -0
  195. package/src/components/spinner/spinner.tsx +1 -0
  196. package/src/components/split-view/AGENTS.md +1 -0
  197. package/src/components/split-view/split-view-drag-area.tsx +2 -0
  198. package/src/components/split-view/split-view.render.test.tsx +423 -0
  199. package/src/components/splitter/AGENTS.md +7 -0
  200. package/src/components/splitter/splitter-handle.tsx +2 -0
  201. package/src/components/splitter/splitter.render.test.tsx +307 -0
  202. package/src/components/stack-card/AGENTS.md +3 -0
  203. package/src/components/stack-card/stack-card.render.test.tsx +309 -0
  204. package/src/components/stack-card/stack-card.tsx +1 -1
  205. package/src/components/steps/AGENTS.md +1 -0
  206. package/src/components/steps/steps.render.test.tsx +318 -0
  207. package/src/components/support/AGENTS.md +1 -0
  208. package/src/components/support/support.render.test.tsx +331 -0
  209. package/src/components/surface/AGENTS.md +1 -0
  210. package/src/components/surface/surface.render.test.tsx +129 -0
  211. package/src/components/swipe/AGENTS.md +3 -0
  212. package/src/components/swipe/swipe.render.test.tsx +280 -0
  213. package/src/components/swipe/swipe.tsx +7 -4
  214. package/src/components/switch/AGENTS.md +5 -0
  215. package/src/components/switch/switch.render.test.tsx +46 -0
  216. package/src/components/switch/switch.tsx +5 -1
  217. package/src/components/table/AGENTS.md +1 -0
  218. package/src/components/table/table.render.test.tsx +294 -0
  219. package/src/components/tabs/AGENTS.md +6 -0
  220. package/src/components/tabs/tabs.render.test.tsx +325 -0
  221. package/src/components/tabs/tabs.tsx +12 -1
  222. package/src/components/tag-input/AGENTS.md +1 -0
  223. package/src/components/tag-input/tag-input.render.test.tsx +655 -0
  224. package/src/components/text/AGENTS.md +1 -0
  225. package/src/components/text/text.render.test.tsx +197 -0
  226. package/src/components/text-animation/AGENTS.md +1 -0
  227. package/src/components/text-animation/text-animation.render.test.tsx +283 -0
  228. package/src/components/textarea/AGENTS.md +1 -0
  229. package/src/components/textarea/textarea.render.test.tsx +192 -0
  230. package/src/components/theme-selector/AGENTS.md +1 -0
  231. package/src/components/theme-selector/theme-selector.render.test.tsx +196 -0
  232. package/src/components/time-picker/AGENTS.md +1 -0
  233. package/src/components/time-picker/time-picker.render.test.tsx +466 -0
  234. package/src/components/timeline/AGENTS.md +1 -0
  235. package/src/components/timeline/timeline.render.test.tsx +316 -0
  236. package/src/components/toast/AGENTS.md +1 -0
  237. package/src/components/toast/toast.render.test.tsx +245 -0
  238. package/src/components/toggle-button/AGENTS.md +1 -0
  239. package/src/components/toggle-button/toggle-button.render.test.tsx +392 -0
  240. package/src/components/tooltip/AGENTS.md +1 -0
  241. package/src/components/tooltip/tooltip.render.test.tsx +231 -0
  242. package/src/components/tour/AGENTS.md +1 -0
  243. package/src/components/tour/tour.render.test.tsx +217 -0
  244. package/src/components/tree/AGENTS.md +1 -0
  245. package/src/components/tree/tree.render.test.tsx +395 -0
  246. package/src/display-name.test.ts +9 -3
  247. package/src/render-tests.test.ts +27 -0
  248. package/src/test/AGENTS.md +121 -0
  249. package/src/test/render.tsx +22 -0
  250. package/src/test/setup.ts +142 -0
@@ -0,0 +1,307 @@
1
+ import { describe, expect, jest, test } from "@jest/globals";
2
+ import { Text } from "react-native";
3
+ import { fireGestureHandler, getByGestureTestId } from "react-native-gesture-handler/jest-utils";
4
+ import { act, fireEvent, renderWithProviders, screen } from "../../test/render";
5
+ import { Splitter, type SplitterLayout } from "./index";
6
+ import { useSplitter } from "./splitter.context";
7
+
8
+ const action = (actionName: string) => ({ nativeEvent: { actionName } });
9
+
10
+ function Two({
11
+ onLayoutChange,
12
+ ...props
13
+ }: {
14
+ onLayoutChange?: (layout: SplitterLayout) => void;
15
+ layout?: SplitterLayout;
16
+ defaultLayout?: SplitterLayout;
17
+ isDisabled?: boolean;
18
+ handleDisabled?: boolean;
19
+ collapsible?: boolean;
20
+ step?: number;
21
+ }) {
22
+ const { handleDisabled, collapsible, ...root } = props;
23
+ return (
24
+ <Splitter onLayoutChange={onLayoutChange} {...root}>
25
+ <Splitter.Pane isCollapsible={collapsible} minSize={20}>
26
+ <Text>Left</Text>
27
+ </Splitter.Pane>
28
+ <Splitter.Handle accessibilityLabel="Resize sidebar" isDisabled={handleDisabled} />
29
+ <Splitter.Pane minSize={20}>
30
+ <Text>Right</Text>
31
+ </Splitter.Pane>
32
+ </Splitter>
33
+ );
34
+ }
35
+
36
+ describe("Splitter", () => {
37
+ test("renders panes and an adjustable handle with a name and value", async () => {
38
+ await renderWithProviders(<Two defaultLayout={[30, 70]} />);
39
+ expect(screen.getByText("Left")).toBeOnTheScreen();
40
+ expect(screen.getByText("Right")).toBeOnTheScreen();
41
+ const handle = screen.getByRole("adjustable", { name: "Resize sidebar" });
42
+ expect(handle).toHaveAccessibilityValue({ max: 100, min: 0, now: 30, text: "30 percent" });
43
+ });
44
+
45
+ test("the handle is named Resize when the caller names nothing", async () => {
46
+ await renderWithProviders(
47
+ <Splitter>
48
+ <Splitter.Pane />
49
+ <Splitter.Handle />
50
+ <Splitter.Pane />
51
+ </Splitter>
52
+ );
53
+ expect(screen.getByRole("adjustable", { name: "Resize" })).toHaveAccessibilityValue({ now: 50 });
54
+ });
55
+
56
+ test("uncontrolled: increment and decrement move the seam by step and report it", async () => {
57
+ const onLayoutChange = jest.fn();
58
+ await renderWithProviders(<Two defaultLayout={[30, 70]} onLayoutChange={onLayoutChange} />);
59
+ const handle = screen.getByRole("adjustable");
60
+
61
+ await fireEvent(handle, "accessibilityAction", action("increment"));
62
+ expect(onLayoutChange).toHaveBeenLastCalledWith([35, 65]);
63
+ expect(screen.getByRole("adjustable")).toHaveAccessibilityValue({ now: 35, text: "35 percent" });
64
+
65
+ await fireEvent(screen.getByRole("adjustable"), "accessibilityAction", action("decrement"));
66
+ await fireEvent(screen.getByRole("adjustable"), "accessibilityAction", action("decrement"));
67
+ expect(onLayoutChange).toHaveBeenLastCalledWith([25, 75]);
68
+ expect(screen.getByRole("adjustable")).toHaveAccessibilityValue({ now: 25 });
69
+ });
70
+
71
+ test("step sets how far one increment moves", async () => {
72
+ const onLayoutChange = jest.fn();
73
+ await renderWithProviders(<Two defaultLayout={[30, 70]} onLayoutChange={onLayoutChange} step={10} />);
74
+ await fireEvent(screen.getByRole("adjustable"), "accessibilityAction", action("increment"));
75
+ expect(onLayoutChange).toHaveBeenCalledWith([40, 60]);
76
+ });
77
+
78
+ test("a step that would cross a pane's minSize stops at the bound and reports nothing", async () => {
79
+ const onLayoutChange = jest.fn();
80
+ await renderWithProviders(<Two defaultLayout={[20, 80]} onLayoutChange={onLayoutChange} />);
81
+ await fireEvent(screen.getByRole("adjustable"), "accessibilityAction", action("decrement"));
82
+ expect(onLayoutChange).not.toHaveBeenCalled();
83
+ expect(screen.getByRole("adjustable")).toHaveAccessibilityValue({ now: 20 });
84
+ });
85
+
86
+ test("controlled: reports the change and waits for the layout prop", async () => {
87
+ const onLayoutChange = jest.fn();
88
+ const view = await renderWithProviders(<Two layout={[30, 70]} onLayoutChange={onLayoutChange} />);
89
+ await fireEvent(screen.getByRole("adjustable"), "accessibilityAction", action("increment"));
90
+ expect(onLayoutChange).toHaveBeenCalledWith([35, 65]);
91
+ expect(screen.getByRole("adjustable")).toHaveAccessibilityValue({ now: 30 });
92
+
93
+ await view.rerender(<Two layout={[35, 65]} onLayoutChange={onLayoutChange} />);
94
+ expect(screen.getByRole("adjustable")).toHaveAccessibilityValue({ now: 35 });
95
+ });
96
+
97
+ test("the reset action restores the starting layout, and does nothing when already there", async () => {
98
+ const onLayoutChange = jest.fn();
99
+ await renderWithProviders(<Two defaultLayout={[30, 70]} onLayoutChange={onLayoutChange} />);
100
+ await fireEvent(screen.getByRole("adjustable"), "accessibilityAction", action("reset"));
101
+ expect(onLayoutChange).not.toHaveBeenCalled();
102
+
103
+ await fireEvent(screen.getByRole("adjustable"), "accessibilityAction", action("increment"));
104
+ await fireEvent(screen.getByRole("adjustable"), "accessibilityAction", action("reset"));
105
+ expect(onLayoutChange).toHaveBeenLastCalledWith([30, 70]);
106
+ expect(screen.getByRole("adjustable")).toHaveAccessibilityValue({ now: 30 });
107
+ });
108
+
109
+ test("offers increment, decrement and reset", async () => {
110
+ await renderWithProviders(<Two />);
111
+ expect(screen.getByRole("adjustable").props.accessibilityActions).toEqual([
112
+ { name: "increment" },
113
+ { name: "decrement" },
114
+ { label: "Reset sizes", name: "reset" },
115
+ ]);
116
+ });
117
+
118
+ test("a collapsible neighbour adds collapse / expand and announces expanded state", async () => {
119
+ const onLayoutChange = jest.fn();
120
+ await renderWithProviders(<Two collapsible defaultLayout={[30, 70]} onLayoutChange={onLayoutChange} />);
121
+ const handle = screen.getByRole("adjustable");
122
+ expect(handle).toBeExpanded();
123
+ expect(handle.props.accessibilityActions).toContainEqual({ label: "Collapse", name: "collapse" });
124
+
125
+ await fireEvent(handle, "accessibilityAction", action("collapse"));
126
+ expect(onLayoutChange).toHaveBeenLastCalledWith([0, 100]);
127
+ const collapsed = screen.getByRole("adjustable");
128
+ expect(collapsed).toBeCollapsed();
129
+ expect(collapsed.props.accessibilityActions).toContainEqual({ label: "Expand", name: "expand" });
130
+
131
+ await fireEvent(collapsed, "accessibilityAction", action("expand"));
132
+ expect(screen.getByRole("adjustable")).toBeExpanded();
133
+ });
134
+
135
+ test("a pane without isCollapsible leaves expanded state unset", async () => {
136
+ await renderWithProviders(<Two />);
137
+ expect(screen.getByRole("adjustable").props.accessibilityState.expanded).toBeUndefined();
138
+ });
139
+
140
+ test("a collapsed pane is hidden from assistive technology", async () => {
141
+ await renderWithProviders(<Two collapsible defaultLayout={[0, 100]} />);
142
+ expect(screen.getByText("Left", { includeHiddenElements: true })).toBeOnTheScreen();
143
+ expect(screen.queryByText("Left")).toBeNull();
144
+ expect(screen.getByText("Right")).toBeOnTheScreen();
145
+ });
146
+
147
+ test("root isDisabled is announced and ignores every action", async () => {
148
+ const onLayoutChange = jest.fn();
149
+ await renderWithProviders(<Two isDisabled onLayoutChange={onLayoutChange} />);
150
+ const handle = screen.getByRole("adjustable");
151
+ expect(handle).toBeDisabled();
152
+ await fireEvent(handle, "accessibilityAction", action("increment"));
153
+ await fireEvent(handle, "accessibilityAction", action("reset"));
154
+ expect(onLayoutChange).not.toHaveBeenCalled();
155
+ });
156
+
157
+ test("a handle's own isDisabled freezes that seam", async () => {
158
+ const onLayoutChange = jest.fn();
159
+ await renderWithProviders(<Two handleDisabled onLayoutChange={onLayoutChange} />);
160
+ const handle = screen.getByRole("adjustable");
161
+ expect(handle).toBeDisabled();
162
+ await fireEvent(handle, "accessibilityAction", action("increment"));
163
+ expect(onLayoutChange).not.toHaveBeenCalled();
164
+ });
165
+
166
+ test("vertical and panes variants keep the same accessible surface", async () => {
167
+ await renderWithProviders(
168
+ <Splitter orientation="vertical" variant="panes" defaultLayout={[40, 60]}>
169
+ <Splitter.Pane />
170
+ <Splitter.Handle accessibilityLabel="Resize editor" />
171
+ <Splitter.Pane />
172
+ </Splitter>
173
+ );
174
+ expect(screen.getByRole("adjustable", { name: "Resize editor" })).toHaveAccessibilityValue({ now: 40 });
175
+ });
176
+
177
+ test("three panes: each handle moves only its own seam", async () => {
178
+ const onLayoutChange = jest.fn();
179
+ await renderWithProviders(
180
+ <Splitter defaultLayout={[30, 30, 40]} onLayoutChange={onLayoutChange}>
181
+ <Splitter.Pane />
182
+ <Splitter.Handle accessibilityLabel="First" />
183
+ <Splitter.Pane />
184
+ <Splitter.Handle accessibilityLabel="Second" />
185
+ <Splitter.Pane />
186
+ </Splitter>
187
+ );
188
+ await fireEvent(screen.getByRole("adjustable", { name: "Second" }), "accessibilityAction", action("increment"));
189
+ expect(onLayoutChange).toHaveBeenLastCalledWith([30, 35, 35]);
190
+ });
191
+
192
+ test("useSplitter hands a custom child the layout and togglePane, setLayout, reset", async () => {
193
+ function Controls() {
194
+ const { layout, setLayout, togglePane, reset } = useSplitter();
195
+ return (
196
+ <>
197
+ <Text testID="readout">{layout.join("/")}</Text>
198
+ <Text onPress={() => togglePane(0)}>toggle</Text>
199
+ <Text onPress={() => setLayout([60, 40])}>set</Text>
200
+ <Text onPress={reset}>reset</Text>
201
+ </>
202
+ );
203
+ }
204
+ await renderWithProviders(
205
+ <Splitter defaultLayout={[30, 70]}>
206
+ <Splitter.Pane isCollapsible minSize={20}>
207
+ <Controls />
208
+ </Splitter.Pane>
209
+ <Splitter.Handle />
210
+ <Splitter.Pane />
211
+ </Splitter>
212
+ );
213
+ expect(screen.getByTestId("readout")).toHaveTextContent("30/70");
214
+ await fireEvent.press(screen.getByText("set"));
215
+ expect(screen.getByTestId("readout")).toHaveTextContent("60/40");
216
+ await fireEvent.press(screen.getByText("reset"));
217
+ expect(screen.getByTestId("readout")).toHaveTextContent("30/70");
218
+ await fireEvent.press(screen.getByText("toggle"));
219
+ expect(screen.getByTestId("readout", { includeHiddenElements: true })).toHaveTextContent("0/100");
220
+ });
221
+
222
+ test("a part outside a Splitter throws its documented error", async () => {
223
+ const original = console.error;
224
+ console.error = () => {};
225
+ try {
226
+ await expect(renderWithProviders(<Splitter.Handle />)).rejects.toThrow(
227
+ "Splitter.Handle must be rendered inside a <Splitter>."
228
+ );
229
+ await expect(renderWithProviders(<Splitter.Pane />)).rejects.toThrow(
230
+ "Splitter.Pane must be rendered inside a <Splitter>."
231
+ );
232
+ function Probe() {
233
+ useSplitter();
234
+ return null;
235
+ }
236
+ await expect(renderWithProviders(<Probe />)).rejects.toThrow("useSplitter must be called inside a <Splitter>.");
237
+ } finally {
238
+ console.error = original;
239
+ }
240
+ });
241
+
242
+ describe("drag", () => {
243
+ async function mountMeasured(onLayoutChange: (layout: SplitterLayout) => void, isDisabled = false) {
244
+ await renderWithProviders(
245
+ <Splitter defaultLayout={[30, 70]} isDisabled={isDisabled} onLayoutChange={onLayoutChange} testID="splitter">
246
+ <Splitter.Pane minSize={20} />
247
+ <Splitter.Handle />
248
+ <Splitter.Pane minSize={20} />
249
+ </Splitter>
250
+ );
251
+ await fireEvent(screen.getByTestId("splitter"), "layout", {
252
+ nativeEvent: { layout: { height: 100, width: 200, x: 0, y: 0 } },
253
+ });
254
+ }
255
+
256
+ test("a release reports the settled layout once, rounded to step", async () => {
257
+ const onLayoutChange = jest.fn();
258
+ await mountMeasured(onLayoutChange);
259
+ await act(async () => {
260
+ fireGestureHandler(getByGestureTestId("splitter-handle-0-pan"), [
261
+ { translationX: 0 },
262
+ { translationX: 20 },
263
+ { translationX: 20 },
264
+ ]);
265
+ });
266
+ expect(onLayoutChange).toHaveBeenCalledTimes(1);
267
+ expect(onLayoutChange).toHaveBeenCalledWith([40, 60]);
268
+ });
269
+
270
+ test("a drag past minSize is held at the bound", async () => {
271
+ const onLayoutChange = jest.fn();
272
+ await mountMeasured(onLayoutChange);
273
+ await act(async () => {
274
+ fireGestureHandler(getByGestureTestId("splitter-handle-0-pan"), [
275
+ { translationX: 0 },
276
+ { translationX: -150 },
277
+ { translationX: -150 },
278
+ ]);
279
+ });
280
+ expect(onLayoutChange).toHaveBeenCalledWith([20, 80]);
281
+ });
282
+
283
+ test("a disabled splitter ignores a drag", async () => {
284
+ const onLayoutChange = jest.fn();
285
+ await mountMeasured(onLayoutChange, true);
286
+ await act(async () => {
287
+ fireGestureHandler(getByGestureTestId("splitter-handle-0-pan"), [
288
+ { translationX: 0 },
289
+ { translationX: 20 },
290
+ { translationX: 20 },
291
+ ]);
292
+ });
293
+ expect(onLayoutChange).not.toHaveBeenCalled();
294
+ });
295
+
296
+ test("a double tap resets to the starting layout", async () => {
297
+ const onLayoutChange = jest.fn();
298
+ await mountMeasured(onLayoutChange);
299
+ await fireEvent(screen.getByRole("adjustable"), "accessibilityAction", action("increment"));
300
+ expect(onLayoutChange).toHaveBeenLastCalledWith([35, 65]);
301
+ await act(async () => {
302
+ fireGestureHandler(getByGestureTestId("splitter-handle-0-reset"), [{ state: 2 }, { state: 4 }, { state: 5 }]);
303
+ });
304
+ expect(onLayoutChange).toHaveBeenLastCalledWith([30, 70]);
305
+ });
306
+ });
307
+ });
@@ -39,6 +39,9 @@ row.
39
39
  | `stack-card.types.ts` | `StackCardHandle`, `StackCardState` — shared by the root and the context |
40
40
  | `stack-card.variants.ts` | The slotted `tv()` and every pure resolver, the gesture's worklets included — no RN imports |
41
41
  | `stack-card.variants.test.ts` | |
42
+ | `stack-card.render.test.tsx` | Mounted under Jest — the top card's accessibility actions and labels, throw and undo by action, button and ref, `onSwipe`/`onIndexChange`/`onEmpty`, controlled and declined throws, disabled, and a drag (`stack-card-pan`) past and short of the threshold |
43
+
44
+ The pan carries `.withTestId("stack-card-pan")` so a render test can drive it with `fireGestureHandler`.
42
45
 
43
46
  ## Axes
44
47
 
@@ -0,0 +1,309 @@
1
+ import { afterEach, beforeEach, describe, expect, jest, test } from "@jest/globals";
2
+ import { createRef, type ReactElement } from "react";
3
+ import { fireGestureHandler, getByGestureTestId } from "react-native-gesture-handler/jest-utils";
4
+ import { act, fireEvent, renderWithProviders, screen } from "../../test/render";
5
+ import { Text } from "../text";
6
+ import { StackCard, type StackCardHandle, type StackCardProps, useStackCard } from "./index";
7
+
8
+ const NAMES = ["Ada", "Grace", "Linus"] as const;
9
+
10
+ type TestProps = Partial<Omit<StackCardProps, "children">>;
11
+
12
+ function Counter(): ReactElement {
13
+ const { index, count } = useStackCard();
14
+ return <Text testID="counter">{`${index}/${count}`}</Text>;
15
+ }
16
+
17
+ function Deck(props: TestProps): ReactElement {
18
+ return (
19
+ <StackCard haptic={false} {...props}>
20
+ <StackCard.Stamp color="success" direction="right">
21
+ Yes
22
+ </StackCard.Stamp>
23
+ {NAMES.map((name) => (
24
+ <StackCard.Card key={name} testID={`card-${name}`}>
25
+ <Text>{name}</Text>
26
+ </StackCard.Card>
27
+ ))}
28
+ <StackCard.Empty>All caught up</StackCard.Empty>
29
+ <StackCard.Actions>
30
+ <StackCard.Action action="left" icon={() => null} label="Skip" />
31
+ <StackCard.Action action="undo" icon={() => null} />
32
+ <StackCard.Action action="right" icon={() => null} label="Save" />
33
+ <Counter />
34
+ </StackCard.Actions>
35
+ </StackCard>
36
+ );
37
+ }
38
+
39
+ const HIDDEN = { includeHiddenElements: true } as const;
40
+
41
+ function card(name: string) {
42
+ return screen.getByTestId(`card-${name}`, HIDDEN);
43
+ }
44
+
45
+ function pile() {
46
+ let node = card("Ada").parent;
47
+ while (node && typeof node.props.onLayout !== "function") node = node.parent;
48
+ if (!node) throw new Error("the pile was not found");
49
+ return node;
50
+ }
51
+
52
+ async function runAnimations(): Promise<void> {
53
+ await act(async () => {
54
+ jest.advanceTimersByTime(1000);
55
+ });
56
+ }
57
+
58
+ async function press(name: string): Promise<void> {
59
+ await fireEvent(screen.getByRole("button", { name }), "accessibilityTap");
60
+ await runAnimations();
61
+ }
62
+
63
+ async function cardAction(name: string, actionName: string): Promise<void> {
64
+ await fireEvent(card(name), "accessibilityAction", { nativeEvent: { actionName } });
65
+ await runAnimations();
66
+ }
67
+
68
+ beforeEach(() => {
69
+ jest.useFakeTimers();
70
+ });
71
+
72
+ afterEach(() => {
73
+ jest.useRealTimers();
74
+ });
75
+
76
+ describe("StackCard", () => {
77
+ test("mounts the cards and offers the deck's actions on the top card only", async () => {
78
+ await renderWithProviders(<Deck />);
79
+ for (const name of NAMES) expect(screen.getByText(name, HIDDEN)).toBeOnTheScreen();
80
+ expect(screen.queryByText("All caught up", HIDDEN)).not.toBeOnTheScreen();
81
+ expect(card("Ada").props.accessible).toBe(true);
82
+ expect(card("Ada").props.accessibilityActions).toEqual([
83
+ { label: "Swipe left", name: "swipe-left" },
84
+ { label: "Swipe right", name: "swipe-right" },
85
+ ]);
86
+ expect(card("Grace").props.accessible).toBe(false);
87
+ expect(card("Grace").props.accessibilityActions).toBeUndefined();
88
+ });
89
+
90
+ test("directionLabels rename the card's actions and the buttons", async () => {
91
+ await renderWithProviders(<Deck directionLabels={{ left: "Pass", right: "Like" }} />);
92
+ expect(card("Ada").props.accessibilityActions).toEqual([
93
+ { label: "Pass", name: "swipe-left" },
94
+ { label: "Like", name: "swipe-right" },
95
+ ]);
96
+ });
97
+
98
+ test("directions decide which actions the card offers", async () => {
99
+ await renderWithProviders(<Deck directions={["up", "down"]} />);
100
+ expect(card("Ada").props.accessibilityActions).toEqual([
101
+ { label: "Swipe up", name: "swipe-up" },
102
+ { label: "Swipe down", name: "swipe-down" },
103
+ ]);
104
+ });
105
+
106
+ test("a card action throws the top card: onSwipe then onIndexChange", async () => {
107
+ const calls: string[] = [];
108
+ const onSwipe = jest.fn((direction: string, index: number) => calls.push(`swipe ${direction} ${index}`));
109
+ const onIndexChange = jest.fn((index: number) => calls.push(`index ${index}`));
110
+ await renderWithProviders(<Deck onIndexChange={onIndexChange} onSwipe={onSwipe} />);
111
+
112
+ await cardAction("Ada", "swipe-right");
113
+
114
+ expect(calls).toEqual(["swipe right 0", "index 1"]);
115
+ expect(screen.getByTestId("counter")).toHaveTextContent("1/3");
116
+ expect(card("Grace").props.accessible).toBe(true);
117
+ });
118
+
119
+ test("an action button throws the top card in its direction", async () => {
120
+ const onSwipe = jest.fn();
121
+ await renderWithProviders(<Deck onSwipe={onSwipe} />);
122
+ await press("Skip");
123
+ expect(onSwipe).toHaveBeenCalledWith("left", 0);
124
+ expect(screen.getByTestId("counter")).toHaveTextContent("1/3");
125
+ });
126
+
127
+ test("an action's onPress is called before the deck acts", async () => {
128
+ const calls: string[] = [];
129
+ await renderWithProviders(
130
+ <StackCard haptic={false} onSwipe={() => calls.push("swipe")}>
131
+ <StackCard.Card>
132
+ <Text>Only</Text>
133
+ </StackCard.Card>
134
+ <StackCard.Actions>
135
+ <StackCard.Action action="right" icon={() => null} label="Save" onPress={() => calls.push("press")} />
136
+ </StackCard.Actions>
137
+ </StackCard>
138
+ );
139
+ await press("Save");
140
+ expect(calls).toEqual(["press", "swipe"]);
141
+ });
142
+
143
+ test("undo is disabled until a card has been thrown, then brings it back without onSwipe", async () => {
144
+ const onSwipe = jest.fn();
145
+ const onIndexChange = jest.fn();
146
+ await renderWithProviders(<Deck onIndexChange={onIndexChange} onSwipe={onSwipe} />);
147
+ expect(screen.getByRole("button", { name: "Undo" })).toBeDisabled();
148
+ expect(card("Ada").props.accessibilityActions).toHaveLength(2);
149
+
150
+ await press("Save");
151
+ expect(screen.getByRole("button", { name: "Undo" })).not.toBeDisabled();
152
+ expect(card("Grace").props.accessibilityActions).toContainEqual({ label: "Undo", name: "undo" });
153
+
154
+ await press("Undo");
155
+ expect(onIndexChange).toHaveBeenLastCalledWith(0);
156
+ expect(onSwipe).toHaveBeenCalledTimes(1);
157
+ expect(screen.getByTestId("counter")).toHaveTextContent("0/3");
158
+ expect(screen.getByRole("button", { name: "Undo" })).toBeDisabled();
159
+ });
160
+
161
+ test("the card's undo action brings the last card back", async () => {
162
+ await renderWithProviders(<Deck />);
163
+ await cardAction("Ada", "swipe-left");
164
+ await cardAction("Grace", "undo");
165
+ expect(screen.getByTestId("counter")).toHaveTextContent("0/3");
166
+ expect(card("Ada").props.accessible).toBe(true);
167
+ });
168
+
169
+ test("the ref throws and undoes", async () => {
170
+ const ref = createRef<StackCardHandle>();
171
+ const onSwipe = jest.fn();
172
+ await renderWithProviders(<Deck onSwipe={onSwipe} ref={ref} />);
173
+
174
+ await act(async () => {
175
+ ref.current?.swipe("up");
176
+ });
177
+ await runAnimations();
178
+ expect(onSwipe).toHaveBeenCalledWith("up", 0);
179
+ expect(screen.getByTestId("counter")).toHaveTextContent("1/3");
180
+
181
+ await act(async () => {
182
+ ref.current?.undo();
183
+ });
184
+ await runAnimations();
185
+ expect(screen.getByTestId("counter")).toHaveTextContent("0/3");
186
+ });
187
+
188
+ test("emptying the deck shows Empty, calls onEmpty once and disables the directions", async () => {
189
+ const onEmpty = jest.fn();
190
+ await renderWithProviders(<Deck defaultIndex={2} onEmpty={onEmpty} />);
191
+ expect(onEmpty).not.toHaveBeenCalled();
192
+
193
+ await press("Save");
194
+
195
+ expect(onEmpty).toHaveBeenCalledTimes(1);
196
+ expect(screen.getByText("All caught up", HIDDEN)).toBeOnTheScreen();
197
+ expect(screen.getByRole("button", { name: "Skip" })).toBeDisabled();
198
+ expect(screen.getByRole("button", { name: "Save" })).toBeDisabled();
199
+ });
200
+
201
+ test("a deck that starts empty does not call onEmpty", async () => {
202
+ const onEmpty = jest.fn();
203
+ await renderWithProviders(<Deck defaultIndex={3} onEmpty={onEmpty} />);
204
+ expect(screen.getByText("All caught up", HIDDEN)).toBeOnTheScreen();
205
+ expect(onEmpty).not.toHaveBeenCalled();
206
+ });
207
+
208
+ test("isDisabled disables the buttons and the gesture, and offers no undo", async () => {
209
+ await renderWithProviders(<Deck isDisabled />);
210
+ expect(screen.getByRole("button", { name: "Skip" })).toBeDisabled();
211
+ expect(screen.getByRole("button", { name: "Save" })).toBeDisabled();
212
+ expect(screen.getByRole("button", { name: "Undo" })).toBeDisabled();
213
+ expect(getByGestureTestId("stack-card-pan").config.enabled).toBe(false);
214
+ });
215
+
216
+ test("the gesture is enabled while there are cards and off once empty", async () => {
217
+ const { rerender } = await renderWithProviders(<Deck index={0} />);
218
+ expect(getByGestureTestId("stack-card-pan").config.enabled).toBe(true);
219
+ await rerender(<Deck index={3} />);
220
+ expect(getByGestureTestId("stack-card-pan").config.enabled).toBe(false);
221
+ });
222
+
223
+ test("uncontrolled: defaultIndex seeds the top card", async () => {
224
+ await renderWithProviders(<Deck defaultIndex={1} />);
225
+ expect(screen.getByTestId("counter")).toHaveTextContent("1/3");
226
+ expect(card("Grace").props.accessible).toBe(true);
227
+ });
228
+
229
+ test("controlled: a throw reports and the pile waits for the prop", async () => {
230
+ const onIndexChange = jest.fn();
231
+ const { rerender } = await renderWithProviders(<Deck index={0} onIndexChange={onIndexChange} />);
232
+
233
+ await cardAction("Ada", "swipe-right");
234
+ expect(onIndexChange).toHaveBeenCalledWith(1);
235
+ expect(screen.getByTestId("counter")).toHaveTextContent("0/3");
236
+ expect(card("Ada").props.accessible).toBe(true);
237
+
238
+ await rerender(<Deck index={1} onIndexChange={onIndexChange} />);
239
+ await runAnimations();
240
+ expect(screen.getByTestId("counter")).toHaveTextContent("1/3");
241
+ expect(card("Grace").props.accessible).toBe(true);
242
+ });
243
+
244
+ test("a controlled deck that declines a throw keeps its top card and offers no undo", async () => {
245
+ await renderWithProviders(<Deck index={0} onIndexChange={() => undefined} />);
246
+ await cardAction("Ada", "swipe-left");
247
+ expect(screen.getByTestId("counter")).toHaveTextContent("0/3");
248
+ expect(card("Ada").props.accessible).toBe(true);
249
+ expect(screen.getByRole("button", { name: "Undo" })).toBeDisabled();
250
+ });
251
+
252
+ test("a drag past the threshold throws the card", async () => {
253
+ const onSwipe = jest.fn();
254
+ await renderWithProviders(<Deck onSwipe={onSwipe} />);
255
+ await act(async () => {
256
+ await fireEvent(pile(), "layout", { nativeEvent: { layout: { height: 400, width: 300, x: 0, y: 0 } } });
257
+ });
258
+ await act(async () => {
259
+ fireGestureHandler(getByGestureTestId("stack-card-pan"), [
260
+ { translationX: 0, translationY: 0 },
261
+ { translationX: 200, translationY: 0 },
262
+ { translationX: 200, translationY: 0, velocityX: 0, velocityY: 0 },
263
+ ]);
264
+ });
265
+ await runAnimations();
266
+ expect(onSwipe).toHaveBeenCalledWith("right", 0);
267
+ });
268
+
269
+ test("a short drag springs back without throwing", async () => {
270
+ const onSwipe = jest.fn();
271
+ await renderWithProviders(<Deck onSwipe={onSwipe} />);
272
+ await act(async () => {
273
+ fireGestureHandler(getByGestureTestId("stack-card-pan"), [
274
+ { translationX: 0, translationY: 0 },
275
+ { translationX: 10, translationY: 0 },
276
+ { translationX: 10, translationY: 0, velocityX: 0, velocityY: 0 },
277
+ ]);
278
+ });
279
+ await runAnimations();
280
+ expect(onSwipe).not.toHaveBeenCalled();
281
+ expect(screen.getByTestId("counter")).toHaveTextContent("0/3");
282
+ });
283
+
284
+ test("Stamp is hidden from assistive technology", async () => {
285
+ await renderWithProviders(<Deck />);
286
+ expect(screen.queryByText("Yes")).not.toBeOnTheScreen();
287
+ expect(screen.getByText("Yes", HIDDEN)).toBeOnTheScreen();
288
+ });
289
+
290
+ test("parts outside a StackCard throw their documented error", async () => {
291
+ const spy = jest.spyOn(console, "error").mockImplementation(() => undefined);
292
+ try {
293
+ await expect(renderWithProviders(<StackCard.Card />)).rejects.toThrow(
294
+ "StackCard.Card must be rendered inside a <StackCard>."
295
+ );
296
+ await expect(renderWithProviders(<StackCard.Action action="left" icon={() => null} />)).rejects.toThrow(
297
+ "StackCard.Action must be rendered inside a <StackCard>."
298
+ );
299
+ await expect(renderWithProviders(<StackCard.Stamp>Yes</StackCard.Stamp>)).rejects.toThrow(
300
+ "StackCard.Stamp must be rendered inside a <StackCard>."
301
+ );
302
+ await expect(renderWithProviders(<Counter />)).rejects.toThrow(
303
+ "useStackCard must be called inside a <StackCard>."
304
+ );
305
+ } finally {
306
+ spy.mockRestore();
307
+ }
308
+ });
309
+ });
@@ -325,7 +325,7 @@ function StackCardRoot({
325
325
  const isGestureEnabled = !isDisabled && index < count;
326
326
 
327
327
  const gesture = useMemo(() => {
328
- const pan = Gesture.Pan().enabled(isGestureEnabled);
328
+ const pan = Gesture.Pan().withTestId("stack-card-pan").enabled(isGestureEnabled);
329
329
  // A horizontal deck lets a vertical drag fall through to the scroll view
330
330
  // around it. A deck that throws both ways claims both axes, so it cannot
331
331
  // sit inside a scroller.
@@ -22,6 +22,7 @@ internal and drawn by the items themselves.
22
22
  | `steps.context.tsx` | The stepper's and the step's contexts, with their hooks |
23
23
  | `steps.variants.ts` | Pure `tv()` slots + every resolver, no RN imports |
24
24
  | `steps.variants.test.ts` | |
25
+ | `steps.render.test.tsx` | Mounted under Jest — step role/name/value/selected, press and onValueChange, controlled vs uncontrolled, read-only, disabled/busy/isLinear, panel, parts outside their root |
25
26
 
26
27
  ## Design
27
28