cpk-ui 0.8.0-beta.2 → 0.8.0-beta.4

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 (201) hide show
  1. package/README.md +63 -1
  2. package/components/modals/AlertDialog/AlertDialog.d.ts +7 -0
  3. package/components/modals/AlertDialog/AlertDialog.d.ts.map +1 -1
  4. package/components/modals/AlertDialog/AlertDialog.js +34 -19
  5. package/components/uis/EditText/EditText.d.ts.map +1 -1
  6. package/components/uis/EditText/EditText.js +1 -1
  7. package/components/uis/PageIndicator/PageIndicator.d.ts +24 -0
  8. package/components/uis/PageIndicator/PageIndicator.d.ts.map +1 -0
  9. package/components/uis/PageIndicator/PageIndicator.js +57 -0
  10. package/components/uis/ReorderableList/ReorderableList.d.ts +37 -0
  11. package/components/uis/ReorderableList/ReorderableList.d.ts.map +1 -0
  12. package/components/uis/ReorderableList/ReorderableList.js +87 -0
  13. package/index.d.ts +2 -0
  14. package/index.d.ts.map +1 -1
  15. package/index.js +2 -0
  16. package/node_modules/react-native-drax/LICENSE.md +21 -0
  17. package/node_modules/react-native-drax/README.md +454 -0
  18. package/node_modules/react-native-drax/lib/module/DebugOverlay.js +121 -0
  19. package/node_modules/react-native-drax/lib/module/DebugOverlay.js.map +1 -0
  20. package/node_modules/react-native-drax/lib/module/Drax.js +36 -0
  21. package/node_modules/react-native-drax/lib/module/Drax.js.map +1 -0
  22. package/node_modules/react-native-drax/lib/module/DraxContext.js +6 -0
  23. package/node_modules/react-native-drax/lib/module/DraxContext.js.map +1 -0
  24. package/node_modules/react-native-drax/lib/module/DraxHandle.js +47 -0
  25. package/node_modules/react-native-drax/lib/module/DraxHandle.js.map +1 -0
  26. package/node_modules/react-native-drax/lib/module/DraxHandleContext.js +11 -0
  27. package/node_modules/react-native-drax/lib/module/DraxHandleContext.js.map +1 -0
  28. package/node_modules/react-native-drax/lib/module/DraxList.js +108 -0
  29. package/node_modules/react-native-drax/lib/module/DraxList.js.map +1 -0
  30. package/node_modules/react-native-drax/lib/module/DraxProvider.js +203 -0
  31. package/node_modules/react-native-drax/lib/module/DraxProvider.js.map +1 -0
  32. package/node_modules/react-native-drax/lib/module/DraxScrollView.js +167 -0
  33. package/node_modules/react-native-drax/lib/module/DraxScrollView.js.map +1 -0
  34. package/node_modules/react-native-drax/lib/module/DraxSubprovider.js +21 -0
  35. package/node_modules/react-native-drax/lib/module/DraxSubprovider.js.map +1 -0
  36. package/node_modules/react-native-drax/lib/module/DraxView.js +348 -0
  37. package/node_modules/react-native-drax/lib/module/DraxView.js.map +1 -0
  38. package/node_modules/react-native-drax/lib/module/HoverLayer.js +152 -0
  39. package/node_modules/react-native-drax/lib/module/HoverLayer.js.map +1 -0
  40. package/node_modules/react-native-drax/lib/module/SortableBoardContainer.js +386 -0
  41. package/node_modules/react-native-drax/lib/module/SortableBoardContainer.js.map +1 -0
  42. package/node_modules/react-native-drax/lib/module/SortableBoardContext.js +6 -0
  43. package/node_modules/react-native-drax/lib/module/SortableBoardContext.js.map +1 -0
  44. package/node_modules/react-native-drax/lib/module/SortableContainer.js +571 -0
  45. package/node_modules/react-native-drax/lib/module/SortableContainer.js.map +1 -0
  46. package/node_modules/react-native-drax/lib/module/SortableItem.js +225 -0
  47. package/node_modules/react-native-drax/lib/module/SortableItem.js.map +1 -0
  48. package/node_modules/react-native-drax/lib/module/SortableItemContext.js +38 -0
  49. package/node_modules/react-native-drax/lib/module/SortableItemContext.js.map +1 -0
  50. package/node_modules/react-native-drax/lib/module/compat/detectVersion.js +19 -0
  51. package/node_modules/react-native-drax/lib/module/compat/detectVersion.js.map +1 -0
  52. package/node_modules/react-native-drax/lib/module/compat/index.js +5 -0
  53. package/node_modules/react-native-drax/lib/module/compat/index.js.map +1 -0
  54. package/node_modules/react-native-drax/lib/module/compat/types.js +4 -0
  55. package/node_modules/react-native-drax/lib/module/compat/types.js.map +1 -0
  56. package/node_modules/react-native-drax/lib/module/compat/useDraxPanGesture.js +95 -0
  57. package/node_modules/react-native-drax/lib/module/compat/useDraxPanGesture.js.map +1 -0
  58. package/node_modules/react-native-drax/lib/module/hooks/index.js +5 -0
  59. package/node_modules/react-native-drax/lib/module/hooks/index.js.map +1 -0
  60. package/node_modules/react-native-drax/lib/module/hooks/useCallbackDispatch.js +688 -0
  61. package/node_modules/react-native-drax/lib/module/hooks/useCallbackDispatch.js.map +1 -0
  62. package/node_modules/react-native-drax/lib/module/hooks/useDragGesture.js +240 -0
  63. package/node_modules/react-native-drax/lib/module/hooks/useDragGesture.js.map +1 -0
  64. package/node_modules/react-native-drax/lib/module/hooks/useDraxContext.js +12 -0
  65. package/node_modules/react-native-drax/lib/module/hooks/useDraxContext.js.map +1 -0
  66. package/node_modules/react-native-drax/lib/module/hooks/useDraxId.js +13 -0
  67. package/node_modules/react-native-drax/lib/module/hooks/useDraxId.js.map +1 -0
  68. package/node_modules/react-native-drax/lib/module/hooks/useDraxMethods.js +73 -0
  69. package/node_modules/react-native-drax/lib/module/hooks/useDraxMethods.js.map +1 -0
  70. package/node_modules/react-native-drax/lib/module/hooks/useDraxScrollHandler.js +97 -0
  71. package/node_modules/react-native-drax/lib/module/hooks/useDraxScrollHandler.js.map +1 -0
  72. package/node_modules/react-native-drax/lib/module/hooks/useSortableBoard.js +37 -0
  73. package/node_modules/react-native-drax/lib/module/hooks/useSortableBoard.js.map +1 -0
  74. package/node_modules/react-native-drax/lib/module/hooks/useSortableList.js +1025 -0
  75. package/node_modules/react-native-drax/lib/module/hooks/useSortableList.js.map +1 -0
  76. package/node_modules/react-native-drax/lib/module/hooks/useSpatialIndex.js +283 -0
  77. package/node_modules/react-native-drax/lib/module/hooks/useSpatialIndex.js.map +1 -0
  78. package/node_modules/react-native-drax/lib/module/hooks/useViewStyles.js +158 -0
  79. package/node_modules/react-native-drax/lib/module/hooks/useViewStyles.js.map +1 -0
  80. package/node_modules/react-native-drax/lib/module/hooks/useWebScrollFreeze.js +52 -0
  81. package/node_modules/react-native-drax/lib/module/hooks/useWebScrollFreeze.js.map +1 -0
  82. package/node_modules/react-native-drax/lib/module/index.js +37 -0
  83. package/node_modules/react-native-drax/lib/module/index.js.map +1 -0
  84. package/node_modules/react-native-drax/lib/module/math.js +294 -0
  85. package/node_modules/react-native-drax/lib/module/math.js.map +1 -0
  86. package/node_modules/react-native-drax/lib/module/package.json +1 -0
  87. package/node_modules/react-native-drax/lib/module/params.js +88 -0
  88. package/node_modules/react-native-drax/lib/module/params.js.map +1 -0
  89. package/node_modules/react-native-drax/lib/module/types.js +215 -0
  90. package/node_modules/react-native-drax/lib/module/types.js.map +1 -0
  91. package/node_modules/react-native-drax/lib/typescript/package.json +1 -0
  92. package/node_modules/react-native-drax/lib/typescript/src/DebugOverlay.d.ts +17 -0
  93. package/node_modules/react-native-drax/lib/typescript/src/DebugOverlay.d.ts.map +1 -0
  94. package/node_modules/react-native-drax/lib/typescript/src/Drax.d.ts +28 -0
  95. package/node_modules/react-native-drax/lib/typescript/src/Drax.d.ts.map +1 -0
  96. package/node_modules/react-native-drax/lib/typescript/src/DraxContext.d.ts +3 -0
  97. package/node_modules/react-native-drax/lib/typescript/src/DraxContext.d.ts.map +1 -0
  98. package/node_modules/react-native-drax/lib/typescript/src/DraxHandle.d.ts +25 -0
  99. package/node_modules/react-native-drax/lib/typescript/src/DraxHandle.d.ts.map +1 -0
  100. package/node_modules/react-native-drax/lib/typescript/src/DraxHandleContext.d.ts +12 -0
  101. package/node_modules/react-native-drax/lib/typescript/src/DraxHandleContext.d.ts.map +1 -0
  102. package/node_modules/react-native-drax/lib/typescript/src/DraxList.d.ts +66 -0
  103. package/node_modules/react-native-drax/lib/typescript/src/DraxList.d.ts.map +1 -0
  104. package/node_modules/react-native-drax/lib/typescript/src/DraxProvider.d.ts +4 -0
  105. package/node_modules/react-native-drax/lib/typescript/src/DraxProvider.d.ts.map +1 -0
  106. package/node_modules/react-native-drax/lib/typescript/src/DraxScrollView.d.ts +7 -0
  107. package/node_modules/react-native-drax/lib/typescript/src/DraxScrollView.d.ts.map +1 -0
  108. package/node_modules/react-native-drax/lib/typescript/src/DraxSubprovider.d.ts +4 -0
  109. package/node_modules/react-native-drax/lib/typescript/src/DraxSubprovider.d.ts.map +1 -0
  110. package/node_modules/react-native-drax/lib/typescript/src/DraxView.d.ts +4 -0
  111. package/node_modules/react-native-drax/lib/typescript/src/DraxView.d.ts.map +1 -0
  112. package/node_modules/react-native-drax/lib/typescript/src/HoverLayer.d.ts +38 -0
  113. package/node_modules/react-native-drax/lib/typescript/src/HoverLayer.d.ts.map +1 -0
  114. package/node_modules/react-native-drax/lib/typescript/src/SortableBoardContainer.d.ts +11 -0
  115. package/node_modules/react-native-drax/lib/typescript/src/SortableBoardContainer.d.ts.map +1 -0
  116. package/node_modules/react-native-drax/lib/typescript/src/SortableBoardContext.d.ts +4 -0
  117. package/node_modules/react-native-drax/lib/typescript/src/SortableBoardContext.d.ts.map +1 -0
  118. package/node_modules/react-native-drax/lib/typescript/src/SortableContainer.d.ts +13 -0
  119. package/node_modules/react-native-drax/lib/typescript/src/SortableContainer.d.ts.map +1 -0
  120. package/node_modules/react-native-drax/lib/typescript/src/SortableItem.d.ts +14 -0
  121. package/node_modules/react-native-drax/lib/typescript/src/SortableItem.d.ts.map +1 -0
  122. package/node_modules/react-native-drax/lib/typescript/src/SortableItemContext.d.ts +37 -0
  123. package/node_modules/react-native-drax/lib/typescript/src/SortableItemContext.d.ts.map +1 -0
  124. package/node_modules/react-native-drax/lib/typescript/src/compat/detectVersion.d.ts +2 -0
  125. package/node_modules/react-native-drax/lib/typescript/src/compat/detectVersion.d.ts.map +1 -0
  126. package/node_modules/react-native-drax/lib/typescript/src/compat/index.d.ts +4 -0
  127. package/node_modules/react-native-drax/lib/typescript/src/compat/index.d.ts.map +1 -0
  128. package/node_modules/react-native-drax/lib/typescript/src/compat/types.d.ts +33 -0
  129. package/node_modules/react-native-drax/lib/typescript/src/compat/types.d.ts.map +1 -0
  130. package/node_modules/react-native-drax/lib/typescript/src/compat/useDraxPanGesture.d.ts +8 -0
  131. package/node_modules/react-native-drax/lib/typescript/src/compat/useDraxPanGesture.d.ts.map +1 -0
  132. package/node_modules/react-native-drax/lib/typescript/src/hooks/index.d.ts +3 -0
  133. package/node_modules/react-native-drax/lib/typescript/src/hooks/index.d.ts.map +1 -0
  134. package/node_modules/react-native-drax/lib/typescript/src/hooks/useCallbackDispatch.d.ts +40 -0
  135. package/node_modules/react-native-drax/lib/typescript/src/hooks/useCallbackDispatch.d.ts.map +1 -0
  136. package/node_modules/react-native-drax/lib/typescript/src/hooks/useDragGesture.d.ts +17 -0
  137. package/node_modules/react-native-drax/lib/typescript/src/hooks/useDragGesture.d.ts.map +1 -0
  138. package/node_modules/react-native-drax/lib/typescript/src/hooks/useDraxContext.d.ts +2 -0
  139. package/node_modules/react-native-drax/lib/typescript/src/hooks/useDraxContext.d.ts.map +1 -0
  140. package/node_modules/react-native-drax/lib/typescript/src/hooks/useDraxId.d.ts +2 -0
  141. package/node_modules/react-native-drax/lib/typescript/src/hooks/useDraxId.d.ts.map +1 -0
  142. package/node_modules/react-native-drax/lib/typescript/src/hooks/useDraxMethods.d.ts +13 -0
  143. package/node_modules/react-native-drax/lib/typescript/src/hooks/useDraxMethods.d.ts.map +1 -0
  144. package/node_modules/react-native-drax/lib/typescript/src/hooks/useDraxScrollHandler.d.ts +27 -0
  145. package/node_modules/react-native-drax/lib/typescript/src/hooks/useDraxScrollHandler.d.ts.map +1 -0
  146. package/node_modules/react-native-drax/lib/typescript/src/hooks/useSortableBoard.d.ts +10 -0
  147. package/node_modules/react-native-drax/lib/typescript/src/hooks/useSortableBoard.d.ts.map +1 -0
  148. package/node_modules/react-native-drax/lib/typescript/src/hooks/useSortableList.d.ts +11 -0
  149. package/node_modules/react-native-drax/lib/typescript/src/hooks/useSortableList.d.ts.map +1 -0
  150. package/node_modules/react-native-drax/lib/typescript/src/hooks/useSpatialIndex.d.ts +22 -0
  151. package/node_modules/react-native-drax/lib/typescript/src/hooks/useSpatialIndex.d.ts.map +1 -0
  152. package/node_modules/react-native-drax/lib/typescript/src/hooks/useViewStyles.d.ts +183 -0
  153. package/node_modules/react-native-drax/lib/typescript/src/hooks/useViewStyles.d.ts.map +1 -0
  154. package/node_modules/react-native-drax/lib/typescript/src/hooks/useWebScrollFreeze.d.ts +14 -0
  155. package/node_modules/react-native-drax/lib/typescript/src/hooks/useWebScrollFreeze.d.ts.map +1 -0
  156. package/node_modules/react-native-drax/lib/typescript/src/index.d.ts +25 -0
  157. package/node_modules/react-native-drax/lib/typescript/src/index.d.ts.map +1 -0
  158. package/node_modules/react-native-drax/lib/typescript/src/math.d.ts +76 -0
  159. package/node_modules/react-native-drax/lib/typescript/src/math.d.ts.map +1 -0
  160. package/node_modules/react-native-drax/lib/typescript/src/params.d.ts +31 -0
  161. package/node_modules/react-native-drax/lib/typescript/src/params.d.ts.map +1 -0
  162. package/node_modules/react-native-drax/lib/typescript/src/types.d.ts +756 -0
  163. package/node_modules/react-native-drax/lib/typescript/src/types.d.ts.map +1 -0
  164. package/node_modules/react-native-drax/package.json +175 -0
  165. package/node_modules/react-native-drax/src/DebugOverlay.tsx +140 -0
  166. package/node_modules/react-native-drax/src/Drax.ts +33 -0
  167. package/node_modules/react-native-drax/src/DraxContext.ts +8 -0
  168. package/node_modules/react-native-drax/src/DraxHandle.tsx +52 -0
  169. package/node_modules/react-native-drax/src/DraxHandleContext.ts +15 -0
  170. package/node_modules/react-native-drax/src/DraxList.tsx +181 -0
  171. package/node_modules/react-native-drax/src/DraxProvider.tsx +224 -0
  172. package/node_modules/react-native-drax/src/DraxScrollView.tsx +180 -0
  173. package/node_modules/react-native-drax/src/DraxSubprovider.tsx +22 -0
  174. package/node_modules/react-native-drax/src/DraxView.tsx +430 -0
  175. package/node_modules/react-native-drax/src/HoverLayer.tsx +167 -0
  176. package/node_modules/react-native-drax/src/SortableBoardContainer.tsx +439 -0
  177. package/node_modules/react-native-drax/src/SortableBoardContext.ts +6 -0
  178. package/node_modules/react-native-drax/src/SortableContainer.tsx +650 -0
  179. package/node_modules/react-native-drax/src/SortableItem.tsx +263 -0
  180. package/node_modules/react-native-drax/src/SortableItemContext.ts +46 -0
  181. package/node_modules/react-native-drax/src/compat/detectVersion.ts +17 -0
  182. package/node_modules/react-native-drax/src/compat/index.ts +7 -0
  183. package/node_modules/react-native-drax/src/compat/types.ts +35 -0
  184. package/node_modules/react-native-drax/src/compat/useDraxPanGesture.ts +111 -0
  185. package/node_modules/react-native-drax/src/hooks/index.ts +2 -0
  186. package/node_modules/react-native-drax/src/hooks/useCallbackDispatch.tsx +830 -0
  187. package/node_modules/react-native-drax/src/hooks/useDragGesture.ts +273 -0
  188. package/node_modules/react-native-drax/src/hooks/useDraxContext.ts +11 -0
  189. package/node_modules/react-native-drax/src/hooks/useDraxId.ts +11 -0
  190. package/node_modules/react-native-drax/src/hooks/useDraxMethods.ts +71 -0
  191. package/node_modules/react-native-drax/src/hooks/useDraxScrollHandler.ts +121 -0
  192. package/node_modules/react-native-drax/src/hooks/useSortableBoard.ts +44 -0
  193. package/node_modules/react-native-drax/src/hooks/useSortableList.ts +1102 -0
  194. package/node_modules/react-native-drax/src/hooks/useSpatialIndex.ts +336 -0
  195. package/node_modules/react-native-drax/src/hooks/useViewStyles.ts +180 -0
  196. package/node_modules/react-native-drax/src/hooks/useWebScrollFreeze.ts +60 -0
  197. package/node_modules/react-native-drax/src/index.ts +111 -0
  198. package/node_modules/react-native-drax/src/math.ts +333 -0
  199. package/node_modules/react-native-drax/src/params.ts +74 -0
  200. package/node_modules/react-native-drax/src/types.ts +933 -0
  201. package/package.json +11 -5
package/README.md CHANGED
@@ -82,7 +82,7 @@ dark theme tokens. Applications that provide product-specific tokens can pass
82
82
  | Actions | Button, CustomPressable, Fab, IconButton |
83
83
  | Inputs | Calendar, Checkbox, EditText, RadioGroup, Rating, SegmentedControl, SwitchToggle |
84
84
  | Feedback | AlertDialog, ErrorBoundary, LoadingIndicator, Snackbar |
85
- | Display | Accordion, Card, Hr, Icon, ParallaxHeader, Typography |
85
+ | Display | Accordion, Card, Hr, Icon, ParallaxHeader, ReorderableList, Typography |
86
86
  | Media and system | PinchZoom, StatusBarBrightness |
87
87
 
88
88
  Each public component has automated tests and Storybook coverage for its main
@@ -91,6 +91,41 @@ controls, responsive behavior, accessibility results, and source examples.
91
91
 
92
92
  ## Release Matrix
93
93
 
94
+ ### ReorderableList (0.8.0-beta.4)
95
+
96
+ `ReorderableList<T>` composes FlashList and react-native-drax. Provide stable
97
+ domain keys, `getItemLabel`, controlled `data`/`onReorder`, and place the
98
+ supplied `dragHandle` inside `renderItem`. Keep the host within
99
+ `GestureHandlerRootView` and give the list a bounded viewport. Apply the new
100
+ order optimistically and roll back on persistence failure. `disabled` removes
101
+ handles without hiding content. The 48pt handles also expose assistive
102
+ increment/decrement actions; no visible Move up/Move down controls are needed.
103
+ Variable row height, autoscroll and reduced motion are owned by the engine.
104
+ FlashList's default visible-item anchoring is disabled for this reorderable
105
+ surface: keeping the former first row anchored after a move would scroll the
106
+ viewport unexpectedly. Accepted orders become real row layout, not permanent
107
+ transforms, so subsequent inline editor height changes remain coherent.
108
+ The row renderer owns text semantics: compact titles may truncate, body copy
109
+ must not inherit that limit. See Display/ReorderableList stories.
110
+
111
+ Requires FlashList 2 (New Architecture), React 19 and Reanimated 4. The package
112
+ bundles its exact patched, JS-only Drax 1.1.0 dependency and MIT license. The
113
+ reproducible patch is `patches/react-native-drax@1.1.0.patch`; the build refuses
114
+ an unpatched engine. Consumers do not need a local patch, fork or postinstall
115
+ mutation. In RN 0.85+ overlays use `StyleSheet.absoluteFill` instead of removed
116
+ `absoluteFillObject`. Verify the packed engine, not only the source checkout.
117
+ The same patch late-binds SortableItem's snap callback: the container registers
118
+ it in a layout effect, so destructuring it during render captures `undefined`
119
+ and prevents the completed drop from committing. Package-boundary regression
120
+ guards cover source and module output; native drag/persistence remains required.
121
+ The patch also supports partially measured single-column virtualized lists:
122
+ hit testing uses known slots and displacement needs geometry only within the
123
+ changed range. Unknown row heights are not guessed, and grid behavior remains
124
+ unchanged. When the consumer accepts an order, flush the temporary visual
125
+ permutation into actual data and clear shifts in the layout phase. Tests cover
126
+ partial measurement, variable heights, horizontal lists and accepted order;
127
+ native reorder → expand/edit → save → reopen must still be replayed.
128
+
94
129
  The 0.8.0 beta is verified with Expo 54, React Native 0.81, React 19,
95
130
  kstyled 0.4, and React Native Web 0.21. This is the release validation matrix,
96
131
  not a claim that every consumer must use those exact React or React Native
@@ -119,6 +154,33 @@ main-branch GitHub Actions publish workflow with provenance.
119
154
  - [Changelog](./CHANGELOG.md)
120
155
  - [Contributing](./CONTRIBUTING.md)
121
156
 
157
+ ### Custom dialog slots
158
+
159
+ `AlertDialog` supports the same slots in controlled props and
160
+ `useCPK().alertDialog.open(options)`: `renderHeader`, `renderBody`, and
161
+ `renderActions`. Each receives `{close}`. Render functions take precedence
162
+ over the existing `title`, `body`, and `actions` content; keep `title` as a
163
+ plain string to name the dialog for assistive technology.
164
+
165
+ ```tsx
166
+ alertDialog.open({
167
+ title: 'Transfer ownership',
168
+ renderHeader: () => <OwnershipHeader />,
169
+ renderBody: () => <OwnershipExplanation />,
170
+ renderActions: ({close}) => [
171
+ <Button key="cancel" text="Cancel" onPress={close} />,
172
+ <Button key="confirm" text="Transfer" onPress={requestTransfer} />,
173
+ ],
174
+ closeOnTouchOutside: false,
175
+ });
176
+ ```
177
+
178
+ The header may contain an icon or any custom content. Keep its root's height
179
+ intrinsic (not `flex: 1` inside the title slot). Custom action `style` overrides
180
+ the equal-width defaults; `flex: 0, flexBasis: 'auto'` works for intrinsic-width
181
+ actions on native and web. Use `styles.actionContainer` to align the group.
182
+ The backdrop consistently darkens either theme and respects `backdropOpacity`.
183
+
122
184
  ## License
123
185
 
124
186
  MIT
@@ -18,6 +18,13 @@ export type AlertDialogOptions = {
18
18
  actions?: ReactElement[];
19
19
  showCloseButton?: boolean;
20
20
  size?: AlertDialogSizeType;
21
+ /** Custom slots take precedence over title/body/actions. Keep title for a11y. */
22
+ renderHeader?: (context: AlertDialogRenderContext) => ReactElement | null;
23
+ renderBody?: (context: AlertDialogRenderContext) => ReactElement | null;
24
+ renderActions?: (context: AlertDialogRenderContext) => ReactElement[] | null;
25
+ };
26
+ export type AlertDialogRenderContext = {
27
+ close: () => void;
21
28
  };
22
29
  export type AlertDialogProps = {
23
30
  style?: StyleProp<ViewStyle>;
@@ -1 +1 @@
1
- {"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/modals/AlertDialog/AlertDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAQZ,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,cAAc,CAAC;AA8DlE,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC5B,eAAe,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,eAAe,CAA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_jsxs } from "react/jsx-runtime";
2
- import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useState, useCallback, useMemo, } from 'react';
2
+ import React, { cloneElement, forwardRef, useEffect, useImperativeHandle, useState, useCallback, useMemo, isValidElement, } from 'react';
3
3
  import { KeyboardAvoidingView, Modal, Platform, StyleSheet, TouchableWithoutFeedback, View, } from 'react-native';
4
4
  import { styled, css } from 'kstyled';
5
5
  import { useTheme } from '../../../providers/ThemeProvider';
@@ -52,10 +52,10 @@ const ActionRow = styled.View `
52
52
  padding-right: 4px;
53
53
  flex-direction: row;
54
54
  `;
55
- function AlertDialogImpl({ actions: actionsProp, backdropOpacity: backdropOpacityProp, body: bodyProp, closeOnTouchOutside: closeOnTouchOutsideProp, onClose, showCloseButton: showCloseButtonProp, size: sizeProp, style, styles: stylesProp, title: titleProp, visible: visibleProp, }, ref) {
55
+ function AlertDialogImpl({ actions: actionsProp, backdropOpacity: backdropOpacityProp, body: bodyProp, closeOnTouchOutside: closeOnTouchOutsideProp, onClose, renderHeader: renderHeaderProp, renderBody: renderBodyProp, renderActions: renderActionsProp, showCloseButton: showCloseButtonProp, size: sizeProp, style, styles: stylesProp, title: titleProp, visible: visibleProp, }, ref) {
56
56
  const [openedOptions, setOpenedOptions] = useState(null);
57
57
  const [uncontrolledVisible, setUncontrolledVisible] = useState(false);
58
- const { theme, themeType } = useTheme();
58
+ const { theme } = useTheme();
59
59
  const isControlled = visibleProp !== undefined;
60
60
  const visible = isControlled ? visibleProp : uncontrolledVisible;
61
61
  const options = isControlled
@@ -63,6 +63,9 @@ function AlertDialogImpl({ actions: actionsProp, backdropOpacity: backdropOpacit
63
63
  actions: actionsProp,
64
64
  backdropOpacity: backdropOpacityProp,
65
65
  body: bodyProp,
66
+ renderHeader: renderHeaderProp,
67
+ renderBody: renderBodyProp,
68
+ renderActions: renderActionsProp,
66
69
  closeOnTouchOutside: closeOnTouchOutsideProp,
67
70
  showCloseButton: showCloseButtonProp,
68
71
  size: sizeProp,
@@ -95,7 +98,7 @@ function AlertDialogImpl({ actions: actionsProp, backdropOpacity: backdropOpacit
95
98
  open: handleOpen,
96
99
  close: handleClose,
97
100
  }), [handleOpen, handleClose]);
98
- const { backdropOpacity = 0.2, title, body, styles, actions, closeOnTouchOutside = true, showCloseButton = true, size = 'medium', } = options ?? {};
101
+ const { backdropOpacity = 0.2, title, body, renderHeader, renderBody, renderActions, styles, actions, closeOnTouchOutside = true, showCloseButton = true, size = 'medium', } = options ?? {};
99
102
  // Calculate sizes based on size prop
100
103
  const sizeConfig = useMemo(() => {
101
104
  if (typeof size === 'number') {
@@ -138,10 +141,9 @@ function AlertDialogImpl({ actions: actionsProp, backdropOpacity: backdropOpacit
138
141
  };
139
142
  }
140
143
  }, [size]);
141
- // Memoize backdrop color calculation
142
- const backdropColor = useMemo(() => themeType === 'light'
143
- ? `rgba(0,0,0,${backdropOpacity})`
144
- : `rgba(255,255,255,${backdropOpacity})`, [themeType, backdropOpacity]);
144
+ // A scrim subdues the background in either theme. A white dark-mode overlay
145
+ // washes out the page and reverses the dialog's foreground hierarchy.
146
+ const backdropColor = useMemo(() => `rgba(0,0,0,${backdropOpacity})`, [backdropOpacity]);
145
147
  // Memoize shadow styles
146
148
  const shadowStyles = useMemo(() => Platform.OS !== 'web'
147
149
  ? {
@@ -157,18 +159,31 @@ function AlertDialogImpl({ actions: actionsProp, backdropOpacity: backdropOpacit
157
159
  handleClose();
158
160
  }, [closeOnTouchOutside, handleClose]);
159
161
  const handleCloseButtonPress = handleClose;
162
+ const renderContext = useMemo(() => ({ close: handleClose }), [handleClose]);
160
163
  // Memoize title content
161
- const titleContent = useMemo(() => typeof title === 'string' ? (_jsx(Typography.Heading3, { style: [{ fontSize: sizeConfig.titleFontSize }, styles?.title], children: title })) : (title), [title, sizeConfig.titleFontSize, styles?.title]);
164
+ const titleContent = useMemo(() => renderHeader ? (renderHeader(renderContext)) : typeof title === 'string' ? (_jsx(Typography.Heading3, { style: [{ fontSize: sizeConfig.titleFontSize }, styles?.title], children: title })) : (title), [
165
+ renderHeader,
166
+ renderContext,
167
+ title,
168
+ sizeConfig.titleFontSize,
169
+ styles?.title,
170
+ ]);
162
171
  // Memoize body content
163
- const bodyContent = useMemo(() => typeof body === 'string' ? (_jsx(Typography.Body3, { style: [{ fontSize: sizeConfig.bodyFontSize }, styles?.body], children: body })) : (body), [body, sizeConfig.bodyFontSize, styles?.body]);
172
+ const bodyContent = useMemo(() => renderBody ? (renderBody(renderContext)) : typeof body === 'string' ? (_jsx(Typography.Body3, { style: [{ fontSize: sizeConfig.bodyFontSize }, styles?.body], children: body })) : (body), [renderBody, renderContext, body, sizeConfig.bodyFontSize, styles?.body]);
164
173
  // Memoize actions content
165
- const actionsContent = useMemo(() => actions ? (_jsx(ActionRow, { "$marginTop": sizeConfig.actionMarginTop, style: styles?.actionContainer, children: actions.map((action, index) => cloneElement(action, {
166
- key: `action-${index}`,
167
- style: {
168
- flex: 1,
169
- marginLeft: index !== 0 ? 12 : 0,
170
- },
171
- })) })) : null, [actions, sizeConfig.actionMarginTop, styles?.actionContainer]);
174
+ const renderedActions = useMemo(() => (renderActions ? renderActions(renderContext) : actions), [renderActions, renderContext, actions]);
175
+ const actionsContent = useMemo(() => renderedActions ? (_jsx(ActionRow, { "$marginTop": sizeConfig.actionMarginTop, style: styles?.actionContainer, children: renderedActions.map((action, index) => isValidElement(action)
176
+ ? cloneElement(action, {
177
+ key: `action-${index}`,
178
+ style: [
179
+ {
180
+ flex: 1,
181
+ marginLeft: index !== 0 ? 12 : 0,
182
+ },
183
+ action.props.style,
184
+ ],
185
+ })
186
+ : action) })) : null, [renderedActions, sizeConfig.actionMarginTop, styles?.actionContainer]);
172
187
  // Memoize close button content
173
188
  const closeButtonContent = useMemo(() => showCloseButton ? (_jsx(Button, { accessibilityLabel: "Close dialog", onPress: handleCloseButtonPress, borderRadius: 24, text: _jsx(Icon, { color: theme.text.basic, name: "X", size: sizeConfig.iconSize }), type: "text" })) : null, [
174
189
  showCloseButton,
@@ -177,7 +192,7 @@ function AlertDialogImpl({ actions: actionsProp, backdropOpacity: backdropOpacit
177
192
  theme.text.basic,
178
193
  ]);
179
194
  const titleSlotStyle = useMemo(() => ({ flex: 1, minWidth: 0 }), []);
180
- const AlertDialogContent = useMemo(() => (_jsxs(Container, { style: css `
195
+ const AlertDialogContent = useMemo(() => (_jsxs(Container, { testID: "alert-dialog-overlay", style: css `
181
196
  background-color: ${backdropColor};
182
197
  `, children: [_jsx(TouchableWithoutFeedback, { onPress: handleBackdropPress, children: _jsx(View, { style: StyleSheet.absoluteFill, testID: "alert-dialog-backdrop" }) }), _jsxs(AlertDialogContainer, { "$size": size, accessibilityRole: "alert", accessibilityLabel: typeof title === 'string' ? title : 'Alert dialog', style: containerStyles, children: [_jsxs(TitleRow, { style: styles?.titleContainer, children: [_jsx(View, { style: titleSlotStyle, children: titleContent }), closeButtonContent] }), _jsx(BodyRow, { "$marginTop": sizeConfig.bodyMarginTop, "$marginBottom": sizeConfig.bodyMarginBottom, style: styles?.bodyContainer, children: bodyContent }), actionsContent] })] })), [
183
198
  backdropColor,
@@ -197,7 +212,7 @@ function AlertDialogImpl({ actions: actionsProp, backdropOpacity: backdropOpacit
197
212
  ]);
198
213
  return (
199
214
  // https://github.com/facebook/react-native/issues/48526#issuecomment-2579478884
200
- _jsx(View, { style: style, children: _jsx(Modal, { animationType: "fade", onRequestClose: handleClose, transparent: true, visible: visible, children: _jsx(KeyboardAvoidingView, { behavior: Platform.OS === 'ios' ? 'padding' : undefined, style: keyboardAvoidingStyle, children: closeOnTouchOutside ? (_jsx(TouchableWithoutFeedback, { onPress: handleBackdropPress, children: AlertDialogContent })) : (AlertDialogContent) }) }) }));
215
+ _jsx(View, { style: style, children: _jsx(Modal, { animationType: "fade", onRequestClose: handleClose, transparent: true, visible: visible, children: _jsx(KeyboardAvoidingView, { behavior: Platform.OS === 'ios' ? 'padding' : undefined, style: keyboardAvoidingStyle, children: AlertDialogContent }) }) }));
201
216
  }
202
217
  const keyboardAvoidingStyle = { flex: 1 };
203
218
  export const AlertDialog = React.memo(forwardRef(AlertDialogImpl));
@@ -1 +1 @@
1
- {"version":3,"file":"EditText.d.ts","sourceRoot":"","sources":["../../../../src/components/uis/EditText/EditText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAa,SAAS,EAAC,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,EAOZ,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAO,SAAS,EAAiC,MAAM,cAAc,CAAC;AAU7E,MAAM,MAAM,cAAc,GAAG;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAErE,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,OAAO,GACP,SAAS,GACT,SAAS,GACT,OAAO,CAAC;AAEZ,KAAK,UAAU,GAAG,CAAC,KAAK,EAAE,cAAc,KAAK,YAAY,CAAC;AAE1D,KAAK,gBAAgB,GACjB,CAAC,CAAC,EAAC,KAAK,EAAE,MAAM,EAAC,EAAE;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,cAAc,CAAA;CAAC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AAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAC9C,cAAc,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAClD,eAAe,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACpD,eAAe,CAAC,EAAE,cAAc,CAAC,iBAAiB,CAAC,CAAC;IACpD,aAAa,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,cAAc,CAAC,EAAE,IAAI,CACnB,cAAc,EACZ,OAAO,GACP,UAAU,GACV,eAAe,GACf,WAAW,GACX,UAAU,GACV,cAAc,GACd,aAAa,GACb,sBAAsB,GACtB,SAAS,GACT,QAAQ,GACR,UAAU,GACV,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,WAAW,CACd,CAAC;IAEF,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,QAAQ,iFA+dpB,CAAC;wBAGqC,OAAO,QAAQ;AAAtD,wBAAuD"}
1
+ {"version":3,"file":"EditText.d.ts","sourceRoot":"","sources":["../../../../src/components/uis/EditText/EditText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,gBAAgB,EAAa,SAAS,EAAC,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,EAOZ,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,SAAS,EAC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AAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,cAAc,CAAC,EAAE,IAAI,CACnB,cAAc,EACZ,OAAO,GACP,UAAU,GACV,eAAe,GACf,WAAW,GACX,UAAU,GACV,cAAc,GACd,aAAa,GACb,sBAAsB,GACtB,SAAS,GACT,QAAQ,GACR,UAAU,GACV,cAAc,GACd,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,WAAW,CACd,CAAC;IAEF,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,QAAQ,iFAgepB,CAAC;wBAGqC,OAAO,QAAQ;AAAtD,wBAAuD"}
@@ -155,7 +155,7 @@ export const EditText = forwardRef(({ testID, textInputProps, style, styles, siz
155
155
  ]);
156
156
  // Memoize render container function
157
157
  const renderContainer = useCallback((children) => {
158
- return (_jsx(TouchableWithoutFeedback, { onPress: () => inputRef.current?.focus(), testID: "container-touch", children: _jsx(View, { style: [
158
+ return (_jsx(TouchableWithoutFeedback, { accessible: false, onPress: () => inputRef.current?.focus(), testID: "container-touch", children: _jsx(View, { style: [
159
159
  defaultContainerStyle,
160
160
  css `
161
161
  flex-direction: ${direction};
@@ -0,0 +1,24 @@
1
+ import { type ReactElement } from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ import { type SharedValue } from 'react-native-reanimated';
4
+ type DotStyle = Pick<ViewStyle, 'backgroundColor' | 'borderColor' | 'borderWidth'>;
5
+ export interface PageIndicatorProps {
6
+ /** Zero-based, continuous pager position. Drive it from a UI scroll worklet. */
7
+ progress: SharedValue<number>;
8
+ count: number;
9
+ /** Settled page, used for accessibility and reduced-motion positioning. */
10
+ currentIndex: number;
11
+ accessibilityLabel?: string;
12
+ reducedMotion?: boolean;
13
+ style?: StyleProp<ViewStyle>;
14
+ styles?: {
15
+ activeDot?: DotStyle;
16
+ inactiveDot?: DotStyle;
17
+ };
18
+ testID?: string;
19
+ }
20
+ export declare function pageIndicatorOffset(progress: number, count: number): number;
21
+ /** One pill follows the pager itself, with no second timing animation. */
22
+ export declare function PageIndicator({ progress, count, currentIndex, accessibilityLabel, reducedMotion, style, styles, testID, }: PageIndicatorProps): ReactElement | null;
23
+ export {};
24
+ //# sourceMappingURL=PageIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageIndicator.d.ts","sourceRoot":"","sources":["../../../../src/components/uis/PageIndicator/PageIndicator.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAU,KAAK,YAAY,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAC,MAAM,cAAc,CAAC;AAC9E,OAAiB,EAGf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAIjC,KAAK,QAAQ,GAAG,IAAI,CAClB,SAAS,EACT,iBAAiB,GAAG,aAAa,GAAG,aAAa,CAClD,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE;QAAC,SAAS,CAAC,EAAE,QAAQ,CAAC;QAAC,WAAW,CAAC,EAAE,QAAQ,CAAA;KAAC,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAI3E;AAED,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,KAAK,EACL,MAAM,EACN,MAAyB,GAC1B,EAAE,kBAAkB,GAAG,YAAY,GAAG,IAAI,CAiE1C"}
@@ -0,0 +1,57 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from 'react';
3
+ import { StyleSheet, View } from 'react-native';
4
+ import Animated, { useAnimatedStyle, useReducedMotion, } from 'react-native-reanimated';
5
+ import { useTheme } from '../../../providers/ThemeProvider';
6
+ export function pageIndicatorOffset(progress, count) {
7
+ 'worklet';
8
+ const bounded = Number.isFinite(progress) ? progress : 0;
9
+ return Math.max(0, Math.min(Math.max(0, count - 1), bounded)) * 28;
10
+ }
11
+ /** One pill follows the pager itself, with no second timing animation. */
12
+ export function PageIndicator({ progress, count, currentIndex, accessibilityLabel, reducedMotion, style, styles, testID = 'page-indicator', }) {
13
+ const { theme } = useTheme();
14
+ const systemReducedMotion = useReducedMotion();
15
+ const reduce = reducedMotion ?? systemReducedMotion;
16
+ const pageCount = Number.isFinite(count) ? Math.max(0, Math.floor(count)) : 0;
17
+ const selected = pageIndicatorOffset(currentIndex, pageCount) / 28;
18
+ const slots = useMemo(() => Array.from({ length: pageCount }, (_, i) => i), [pageCount]);
19
+ const inactiveStyle = useMemo(() => [
20
+ layout.dot,
21
+ { backgroundColor: theme.bg.basic, borderColor: theme.role.border },
22
+ styles?.inactiveDot,
23
+ ], [theme.bg.basic, theme.role.border, styles?.inactiveDot]);
24
+ const activeStyle = useMemo(() => [
25
+ layout.active,
26
+ { backgroundColor: theme.role.primary },
27
+ styles?.activeDot,
28
+ ], [theme.role.primary, styles?.activeDot]);
29
+ const motionStyle = useAnimatedStyle(() => ({
30
+ transform: [
31
+ {
32
+ translateX: pageIndicatorOffset(reduce ? selected : progress.get(), pageCount),
33
+ },
34
+ ],
35
+ }));
36
+ if (pageCount === 0)
37
+ return null;
38
+ return (_jsx(View, { accessible: true, accessibilityLabel: accessibilityLabel, accessibilityRole: "progressbar", accessibilityValue: { min: 0, max: pageCount, now: selected + 1 }, "aria-label": accessibilityLabel, "aria-valuemin": 0, "aria-valuemax": pageCount, "aria-valuenow": selected + 1, pointerEvents: "none", style: style, testID: testID, children: _jsxs(View, { style: layout.track, children: [slots.map((slot) => (_jsx(View, { style: layout.slot, children: _jsx(View, { style: inactiveStyle }) }, slot))), _jsx(Animated.View, { style: [activeStyle, motionStyle], testID: `${testID}-active` })] }) }));
39
+ }
40
+ const layout = StyleSheet.create({
41
+ track: {
42
+ flexDirection: 'row',
43
+ gap: 8,
44
+ position: 'relative',
45
+ alignSelf: 'flex-start',
46
+ },
47
+ slot: { alignItems: 'center', height: 8, width: 20 },
48
+ dot: { borderRadius: 4, borderWidth: 1, height: 8, width: 8 },
49
+ active: {
50
+ borderRadius: 4,
51
+ height: 8,
52
+ width: 20,
53
+ position: 'absolute',
54
+ left: 0,
55
+ top: 0,
56
+ },
57
+ });
@@ -0,0 +1,37 @@
1
+ import { type ReactElement } from 'react';
2
+ import { type StyleProp, type ViewStyle } from 'react-native';
3
+ export interface ReorderableListItem<T> {
4
+ item: T;
5
+ index: number;
6
+ /** Place this handle inside the row; other row actions remain independent. */
7
+ dragHandle: ReactElement | null;
8
+ }
9
+ export interface ReorderableListProps<T> {
10
+ data: T[];
11
+ /** Use a stable item identity; index-only keys cannot survive reordering. */
12
+ keyExtractor: (item: T, index: number) => string;
13
+ getItemLabel: (item: T) => string;
14
+ renderItem: (info: ReorderableListItem<T>) => ReactElement;
15
+ /** Controlled order: update data immediately, then persist/rollback upstream. */
16
+ onReorder: (data: T[]) => void;
17
+ disabled?: boolean;
18
+ extraData?: unknown;
19
+ accessibilityHint?: string;
20
+ testID?: string;
21
+ styles?: {
22
+ container?: StyleProp<ViewStyle>;
23
+ content?: ViewStyle;
24
+ item?: StyleProp<ViewStyle>;
25
+ handle?: StyleProp<ViewStyle>;
26
+ };
27
+ renderHandle?: (info: {
28
+ item: T;
29
+ index: number;
30
+ }) => ReactElement;
31
+ onDragStateChange?: (dragging: boolean) => void;
32
+ onEndReached?: () => void;
33
+ ListEmptyComponent?: ReactElement;
34
+ }
35
+ /** Virtualized, handle-only reordering. Requires the host's GestureHandlerRootView. */
36
+ export declare function ReorderableList<T>(props: ReorderableListProps<T>): ReactElement;
37
+ //# sourceMappingURL=ReorderableList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReorderableList.d.ts","sourceRoot":"","sources":["../../../../src/components/uis/ReorderableList/ReorderableList.tsx"],"names":[],"mappings":"AAAA,OAAc,EAA+B,KAAK,YAAY,EAAC,MAAM,OAAO,CAAC;AAC7E,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAYtB,MAAM,WAAW,mBAAmB,CAAC,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,UAAU,EAAE,YAAY,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,6EAA6E;IAC7E,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAClC,UAAU,EAAE,CAAC,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC;IAC3D,iFAAiF;IACjF,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE;QACP,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,CAAC,EAAE,SAAS,CAAC;QACpB,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KAC/B,CAAC;IACF,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE;QAAC,IAAI,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,KAAK,YAAY,CAAC;IAChE,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,kBAAkB,CAAC,EAAE,YAAY,CAAC;CACnC;AAED,uFAAuF;AACvF,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAC7B,YAAY,CAQd"}
@@ -0,0 +1,87 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useCallback, useMemo, useRef } from 'react';
3
+ import { Platform, StyleSheet, View, } from 'react-native';
4
+ import { FlashList } from '@shopify/flash-list';
5
+ import { DraxHandle, DraxProvider, SortableContainer, SortableItem, useSortableList, } from 'react-native-drax';
6
+ import { useTheme } from '../../../providers/ThemeProvider';
7
+ import { Icon } from '../Icon/Icon';
8
+ /** Virtualized, handle-only reordering. Requires the host's GestureHandlerRootView. */
9
+ export function ReorderableList(props) {
10
+ return (_jsx(View, { style: [layout.container, props.styles?.container], children: _jsx(DraxProvider, { children: _jsx(ReorderableContent, { ...props }) }) }));
11
+ }
12
+ function ReorderableContent({ data, keyExtractor, getItemLabel, renderItem, onReorder, disabled = false, extraData, accessibilityHint = 'Hold and drag to reorder. Adjust up or down to move one place.', testID = 'reorderable-list', styles, renderHandle, onDragStateChange, onEndReached, ListEmptyComponent, }) {
13
+ const { theme } = useTheme();
14
+ const scrollRef = useRef(null);
15
+ const acceptedPositions = useMemo(() => new Map(data.map((item, index) => [keyExtractor(item, index), index + 1])), [data, keyExtractor]);
16
+ const sortable = useSortableList({
17
+ data,
18
+ keyExtractor,
19
+ onReorder: (event) => {
20
+ if (!disabled && event.fromIndex !== event.toIndex)
21
+ onReorder(event.data);
22
+ },
23
+ lockToMainAxis: true,
24
+ // Mouse dragging should begin immediately; touch keeps scroll protection.
25
+ longPressDelay: Platform.OS === 'web' ? 0 : 220,
26
+ animationConfig: 'spring',
27
+ inactiveItemStyle: { opacity: 0.8 },
28
+ onDragStart: () => onDragStateChange?.(true),
29
+ onDragEnd: () => onDragStateChange?.(false),
30
+ });
31
+ const moveAccessible = useCallback((item, rowIndex, direction) => {
32
+ if (disabled)
33
+ return;
34
+ const key = keyExtractor(item, rowIndex);
35
+ const from = data.findIndex((row, index) => keyExtractor(row, index) === key);
36
+ const to = from + direction;
37
+ if (from < 0 || to < 0 || to >= data.length)
38
+ return;
39
+ const next = [...data];
40
+ next.splice(from, 1);
41
+ next.splice(to, 0, item);
42
+ onReorder(next);
43
+ }, [data, disabled, keyExtractor, onReorder]);
44
+ return (_jsx(SortableContainer, { sortable: sortable, scrollRef: scrollRef, style: layout.container, children: _jsx(FlashList, { ref: scrollRef, data: sortable.data, extraData: extraData,
45
+ // A committed reorder must not scroll to keep the former first item
46
+ // anchored. The gesture engine already owns motion and autoscroll.
47
+ maintainVisibleContentPosition: { disabled: true },
48
+ // Stable domain keys also keep recycled editors attached to their item.
49
+ keyExtractor: keyExtractor, contentContainerStyle: styles?.content, onScroll: sortable.onScroll, onContentSizeChange: sortable.onContentSizeChange, onEndReached: onEndReached, ListEmptyComponent: ListEmptyComponent, scrollEventThrottle: 16, testID: testID, renderItem: ({ item, index }) => (_jsx(SortableItem, { sortable: sortable, index: index, draggable: !disabled, dragHandle: true, style: styles?.item, accessible: false, accessibilityRole: "none", accessibilityLabel: undefined, accessibilityHint: undefined, children: renderItem({
50
+ item,
51
+ index,
52
+ dragHandle: disabled ? null : (_jsx(DraxHandle, { children: _jsx(View, { accessible: true, focusable: true, ...(Platform.OS === 'web'
53
+ ? {
54
+ tabIndex: 0,
55
+ onKeyDown: (event) => {
56
+ if (event.key !== 'ArrowUp' &&
57
+ event.key !== 'ArrowDown')
58
+ return;
59
+ event.preventDefault();
60
+ moveAccessible(item, index, event.key === 'ArrowUp' ? -1 : 1);
61
+ },
62
+ }
63
+ : {}), accessibilityRole: "adjustable", accessibilityLabel: getItemLabel(item), accessibilityHint: accessibilityHint, accessibilityValue: {
64
+ min: 1,
65
+ max: data.length,
66
+ now: acceptedPositions.get(keyExtractor(item, index)) ??
67
+ index + 1,
68
+ }, accessibilityActions: [
69
+ { name: 'increment' },
70
+ { name: 'decrement' },
71
+ ], onAccessibilityAction: ({ nativeEvent }) => {
72
+ if (nativeEvent.actionName === 'increment')
73
+ moveAccessible(item, index, 1);
74
+ if (nativeEvent.actionName === 'decrement')
75
+ moveAccessible(item, index, -1);
76
+ }, testID: `${testID}-handle-${keyExtractor(item, index)}`, style: [layout.handle, styles?.handle], children: renderHandle?.({ item, index }) ?? (_jsx(Icon, { name: "DotsSixVertical", size: 22, color: theme.text.label })) }) })),
77
+ }) })) }) }));
78
+ }
79
+ const layout = StyleSheet.create({
80
+ container: { flex: 1, minHeight: 0 },
81
+ handle: {
82
+ width: 48,
83
+ minHeight: 48,
84
+ alignItems: 'center',
85
+ justifyContent: 'center',
86
+ },
87
+ });
package/index.d.ts CHANGED
@@ -14,9 +14,11 @@ export * from './components/uis/Hr/Hr';
14
14
  export * from './components/uis/Icon/Icon';
15
15
  export * from './components/uis/IconButton/IconButton';
16
16
  export * from './components/uis/LoadingIndicator/LoadingIndicator';
17
+ export * from './components/uis/PageIndicator/PageIndicator';
17
18
  export * from './components/uis/PinchZoom/PinchZoom';
18
19
  export * from './components/uis/ParallaxHeader/ParallaxHeader';
19
20
  export * from './components/uis/Rating/Rating';
21
+ export * from './components/uis/ReorderableList/ReorderableList';
20
22
  export * from './components/uis/RadioGroup/RadioGroup';
21
23
  export * from './components/uis/SegmentedControl/SegmentedControl';
22
24
  export * from './components/uis/StatusbarBrightness/StatusBarBrightness';
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uCAAuC,CAAC;AAGtD,cAAc,iDAAiD,CAAC;AAGhE,cAAc,aAAa,CAAC;AAG5B,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kDAAkD,CAAC;AACjE,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,oDAAoD,CAAC;AACnE,cAAc,sCAAsC,CAAC;AACrD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,oDAAoD,CAAC;AACnE,cAAc,0DAA0D,CAAC;AACzE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uCAAuC,CAAC;AAGtD,cAAc,iDAAiD,CAAC;AAGhE,cAAc,aAAa,CAAC;AAG5B,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kDAAkD,CAAC;AACjE,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,oDAAoD,CAAC;AACnE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sCAAsC,CAAC;AACrD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kDAAkD,CAAC;AACjE,cAAc,wCAAwC,CAAC;AACvD,cAAc,oDAAoD,CAAC;AACnE,cAAc,0DAA0D,CAAC;AACzE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC;AAGxB,cAAc,SAAS,CAAC"}
package/index.js CHANGED
@@ -18,9 +18,11 @@ export * from './components/uis/Hr/Hr';
18
18
  export * from './components/uis/Icon/Icon';
19
19
  export * from './components/uis/IconButton/IconButton';
20
20
  export * from './components/uis/LoadingIndicator/LoadingIndicator';
21
+ export * from './components/uis/PageIndicator/PageIndicator';
21
22
  export * from './components/uis/PinchZoom/PinchZoom';
22
23
  export * from './components/uis/ParallaxHeader/ParallaxHeader';
23
24
  export * from './components/uis/Rating/Rating';
25
+ export * from './components/uis/ReorderableList/ReorderableList';
24
26
  export * from './components/uis/RadioGroup/RadioGroup';
25
27
  export * from './components/uis/SegmentedControl/SegmentedControl';
26
28
  export * from './components/uis/StatusbarBrightness/StatusBarBrightness';
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019-2026 Nuclear Pasta, SRL
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.