@webority/mobile-ui 0.161.0 → 0.164.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 (123) hide show
  1. package/android/src/newarch/java/com/webority/mobileui/pdfrasterizer/PdfRasterizerModule.kt +4 -4
  2. package/dist/canvas-kit/kit.js +7 -7
  3. package/dist/canvas-kit/manifest.json +6 -1
  4. package/dist/canvas-kit/release.json +6 -6
  5. package/ios/PdfRasterizer.mm +3 -3
  6. package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
  7. package/lib/commonjs/components/Confetti/Confetti.js +1 -1
  8. package/lib/commonjs/components/Drawer/Drawer.js +1 -1
  9. package/lib/commonjs/components/FileViewer/useFileViewerZoom.js +1 -1
  10. package/lib/commonjs/components/ImageGallery/ImageGallery.js +1 -1
  11. package/lib/commonjs/components/NonModalBottomSheet/NonModalBottomSheet.js +1 -1
  12. package/lib/commonjs/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  13. package/lib/commonjs/components/SlideToConfirm/SlideToConfirm.js +1 -1
  14. package/lib/commonjs/components/Slider/Slider.js +1 -1
  15. package/lib/commonjs/components/SortableList/SortableList.js +1 -1
  16. package/lib/commonjs/components/Swipeable/Swipeable.js +1 -1
  17. package/lib/commonjs/components/TagInput/TagInput.js +1 -1
  18. package/lib/commonjs/components/ZoomableImage/ZoomableImage.js +1 -1
  19. package/lib/commonjs/utils/warnUnknownProps.js +1 -1
  20. package/lib/module/components/BottomSheet/BottomSheet.js +1 -1
  21. package/lib/module/components/Confetti/Confetti.js +1 -1
  22. package/lib/module/components/Drawer/Drawer.js +1 -1
  23. package/lib/module/components/FileViewer/useFileViewerZoom.js +1 -1
  24. package/lib/module/components/ImageGallery/ImageGallery.js +1 -1
  25. package/lib/module/components/NonModalBottomSheet/NonModalBottomSheet.js +1 -1
  26. package/lib/module/components/PhoneNumberInput/PhoneNumberInput.js +1 -1
  27. package/lib/module/components/SlideToConfirm/SlideToConfirm.js +1 -1
  28. package/lib/module/components/Slider/Slider.js +1 -1
  29. package/lib/module/components/SortableList/SortableList.js +1 -1
  30. package/lib/module/components/Swipeable/Swipeable.js +1 -1
  31. package/lib/module/components/TagInput/TagInput.js +1 -1
  32. package/lib/module/components/ZoomableImage/ZoomableImage.js +1 -1
  33. package/lib/module/utils/warnUnknownProps.js +1 -1
  34. package/lib/typescript/commonjs/components/Autocomplete/Autocomplete.d.ts +1 -1
  35. package/lib/typescript/commonjs/components/Avatar/Avatar.d.ts +1 -1
  36. package/lib/typescript/commonjs/components/BottomSheet/BottomSheet.d.ts +4 -4
  37. package/lib/typescript/commonjs/components/Carousel/Carousel.d.ts +1 -1
  38. package/lib/typescript/commonjs/components/ChoiceGroup/ChoiceGroup.d.ts +4 -4
  39. package/lib/typescript/commonjs/components/DateRangePicker/DateRangePicker.d.ts +1 -1
  40. package/lib/typescript/commonjs/components/Descriptions/Descriptions.d.ts +2 -2
  41. package/lib/typescript/commonjs/components/Drawer/Drawer.d.ts +1 -1
  42. package/lib/typescript/commonjs/components/FieldBase/Chevron.d.ts +1 -1
  43. package/lib/typescript/commonjs/components/FieldBase/FieldBase.d.ts +13 -13
  44. package/lib/typescript/commonjs/components/FilePicker/FilePicker.d.ts +10 -10
  45. package/lib/typescript/commonjs/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +2 -2
  46. package/lib/typescript/commonjs/components/FormField/FormField.d.ts +1 -1
  47. package/lib/typescript/commonjs/components/IconButton/IconButton.d.ts +2 -2
  48. package/lib/typescript/commonjs/components/ImageGallery/ImageGallery.d.ts +1 -1
  49. package/lib/typescript/commonjs/components/InlineSelect/InlineSelect.d.ts +7 -7
  50. package/lib/typescript/commonjs/components/Input/Input.d.ts +2 -2
  51. package/lib/typescript/commonjs/components/Modal/Modal.d.ts +1 -1
  52. package/lib/typescript/commonjs/components/OptionSheet/OptionSheet.d.ts +4 -4
  53. package/lib/typescript/commonjs/components/PhoneNumberInput/PhoneNumberInput.d.ts +1 -1
  54. package/lib/typescript/commonjs/components/PickerTrigger/PickerTrigger.d.ts +4 -4
  55. package/lib/typescript/commonjs/components/ProfilePicker/ProfilePicker.d.ts +1 -1
  56. package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +1 -1
  57. package/lib/typescript/commonjs/components/Radio/RadioDot.d.ts +2 -2
  58. package/lib/typescript/commonjs/components/Repeater/Repeater.d.ts +2 -2
  59. package/lib/typescript/commonjs/components/RichTextEditor/markdownActions.d.ts +3 -3
  60. package/lib/typescript/commonjs/components/SearchBar/SearchBar.d.ts +1 -1
  61. package/lib/typescript/commonjs/components/SegmentedControl/SegmentedControl.d.ts +1 -1
  62. package/lib/typescript/commonjs/components/Select/Select.d.ts +6 -6
  63. package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +3 -3
  64. package/lib/typescript/commonjs/components/Skeleton/SkeletonClock.d.ts +3 -3
  65. package/lib/typescript/commonjs/components/Skeleton/SkeletonContent.d.ts +6 -6
  66. package/lib/typescript/commonjs/components/Skeleton/SkeletonList.d.ts +2 -2
  67. package/lib/typescript/commonjs/components/Skeleton/SkeletonProvider.d.ts +5 -5
  68. package/lib/typescript/commonjs/components/Skeleton/SkeletonSkip.d.ts +2 -2
  69. package/lib/typescript/commonjs/components/SlideToConfirm/SlideToConfirm.d.ts +1 -1
  70. package/lib/typescript/commonjs/components/Tabs/Tabs.d.ts +2 -2
  71. package/lib/typescript/commonjs/components/TagInput/TagInput.d.ts +1 -1
  72. package/lib/typescript/commonjs/components/Timeline/Timeline.d.ts +8 -8
  73. package/lib/typescript/commonjs/components/ZoomableImage/ZoomableImage.d.ts +4 -4
  74. package/lib/typescript/commonjs/specs/NativePdfRasterizer.d.ts +4 -4
  75. package/lib/typescript/commonjs/theme/animatedValue.d.ts +4 -4
  76. package/lib/typescript/commonjs/utils/feedback.d.ts +3 -3
  77. package/lib/typescript/commonjs/utils/warnUnknownProps.d.ts +2 -2
  78. package/lib/typescript/module/components/Autocomplete/Autocomplete.d.ts +1 -1
  79. package/lib/typescript/module/components/Avatar/Avatar.d.ts +1 -1
  80. package/lib/typescript/module/components/BottomSheet/BottomSheet.d.ts +4 -4
  81. package/lib/typescript/module/components/Carousel/Carousel.d.ts +1 -1
  82. package/lib/typescript/module/components/ChoiceGroup/ChoiceGroup.d.ts +4 -4
  83. package/lib/typescript/module/components/DateRangePicker/DateRangePicker.d.ts +1 -1
  84. package/lib/typescript/module/components/Descriptions/Descriptions.d.ts +2 -2
  85. package/lib/typescript/module/components/Drawer/Drawer.d.ts +1 -1
  86. package/lib/typescript/module/components/FieldBase/Chevron.d.ts +1 -1
  87. package/lib/typescript/module/components/FieldBase/FieldBase.d.ts +13 -13
  88. package/lib/typescript/module/components/FilePicker/FilePicker.d.ts +10 -10
  89. package/lib/typescript/module/components/ForceUpdateDialog/ForceUpdateDialog.d.ts +2 -2
  90. package/lib/typescript/module/components/FormField/FormField.d.ts +1 -1
  91. package/lib/typescript/module/components/IconButton/IconButton.d.ts +2 -2
  92. package/lib/typescript/module/components/ImageGallery/ImageGallery.d.ts +1 -1
  93. package/lib/typescript/module/components/InlineSelect/InlineSelect.d.ts +7 -7
  94. package/lib/typescript/module/components/Input/Input.d.ts +2 -2
  95. package/lib/typescript/module/components/Modal/Modal.d.ts +1 -1
  96. package/lib/typescript/module/components/OptionSheet/OptionSheet.d.ts +4 -4
  97. package/lib/typescript/module/components/PhoneNumberInput/PhoneNumberInput.d.ts +1 -1
  98. package/lib/typescript/module/components/PickerTrigger/PickerTrigger.d.ts +4 -4
  99. package/lib/typescript/module/components/ProfilePicker/ProfilePicker.d.ts +1 -1
  100. package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +1 -1
  101. package/lib/typescript/module/components/Radio/RadioDot.d.ts +2 -2
  102. package/lib/typescript/module/components/Repeater/Repeater.d.ts +2 -2
  103. package/lib/typescript/module/components/RichTextEditor/markdownActions.d.ts +3 -3
  104. package/lib/typescript/module/components/SearchBar/SearchBar.d.ts +1 -1
  105. package/lib/typescript/module/components/SegmentedControl/SegmentedControl.d.ts +1 -1
  106. package/lib/typescript/module/components/Select/Select.d.ts +6 -6
  107. package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +3 -3
  108. package/lib/typescript/module/components/Skeleton/SkeletonClock.d.ts +3 -3
  109. package/lib/typescript/module/components/Skeleton/SkeletonContent.d.ts +6 -6
  110. package/lib/typescript/module/components/Skeleton/SkeletonList.d.ts +2 -2
  111. package/lib/typescript/module/components/Skeleton/SkeletonProvider.d.ts +5 -5
  112. package/lib/typescript/module/components/Skeleton/SkeletonSkip.d.ts +2 -2
  113. package/lib/typescript/module/components/SlideToConfirm/SlideToConfirm.d.ts +1 -1
  114. package/lib/typescript/module/components/Tabs/Tabs.d.ts +2 -2
  115. package/lib/typescript/module/components/TagInput/TagInput.d.ts +1 -1
  116. package/lib/typescript/module/components/Timeline/Timeline.d.ts +8 -8
  117. package/lib/typescript/module/components/ZoomableImage/ZoomableImage.d.ts +4 -4
  118. package/lib/typescript/module/specs/NativePdfRasterizer.d.ts +4 -4
  119. package/lib/typescript/module/theme/animatedValue.d.ts +4 -4
  120. package/lib/typescript/module/utils/feedback.d.ts +3 -3
  121. package/lib/typescript/module/utils/warnUnknownProps.d.ts +2 -2
  122. package/package.json +7 -7
  123. package/src/specs/NativePdfRasterizer.ts +4 -4
@@ -1 +1 @@
1
- "use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{cancelAnimation,measure,runOnJS,scrollTo,useAnimatedRef,useAnimatedScrollHandler,useAnimatedStyle,useFrameCallback,useSharedValue,withSpring}from"react-native-reanimated";import{useTheme}from"../../theme/index.js";import{triggerHaptic}from"../../utils/index.js";import{useScrollHost}from"../Screen/ScrollHost.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_SORTABLE_LIST_LABELS=Object.freeze({moveUp:"Move up",moveDown:"Move down"});const LONG_PRESS_MS=350,EDGE_PX=48,SCROLL_STEP_PX=12,SCROLL_SLACK_PX=1,SPRING_CONFIG={damping:22,stiffness:260,mass:1},ACTION_STEP={moveUp:-1,moveDown:1},noop=e=>{};export function moveItem(e,t,a){const l=e.slice();if(t<0||t>=l.length)return l;const[o]=l.splice(t,1);return void 0===o||l.splice(a,0,o),l}export function topOf(e,t){"worklet";let a=0;for(let l=0;l<t;l++)a+=e[l]??0;return a}export function slotTop(e,t,a){"worklet";let l=0,o=0;for(let r=0;r<e.length&&o<a;r++)r!==t&&(l+=e[r]??0,o++);return l}export function dropIndex(e,t,a){"worklet";const l=topOf(e,t)+(e[t]??0)/2+a;let o=0,r=0;for(let a=0;a<e.length;a++){const s=e[a]??0;a!==t&&r+s/2<l&&o++,r+=s}return o}export function rowShifts(e,t,a){const l=[];let o=0;for(const t of e)l.push(o),o+=t;const r=e.map(()=>0),s=moveItem(e.map((e,t)=>t),t,a);let n=0;for(const t of s)r[t]=n-(l[t]??0),n+=e[t]??0;return r}const buildStyles=e=>StyleSheet.create({handleRow:{flexDirection:"row",alignItems:"center"},handle:{paddingHorizontal:e.space.sm,paddingVertical:e.space.md,gap:e.space.xxs},bar:{width:e.space.md,height:e.space.xxs,backgroundColor:e.colors["text-muted"]},body:{flex:1}});function SortableRow({rowKey:e,index:t,count:a,shift:l,isActive:o,dragging:r,handle:s,disabled:n,shared:u,callbacks:i,labels:c,children:d}){const m=useTheme(),v=useMemo(()=>buildStyles(m),[m]),h=useSharedValue(0);useEffect(()=>{h.value=r&&!o?withSpring(l,SPRING_CONFIG):l},[r,o,l,h]),useEffect(()=>()=>{cancelAnimation(h)},[h]);const S=useAnimatedStyle(()=>({transform:[{translateY:o?u.dragY.value:h.value}],zIndex:o?1:0}),[o,u,h]),f=useMemo(()=>{const{dragIndex:e,dropTo:a,dragY:l,translation:o,absoluteY:r,scrollY:c,scrollStart:d,hostOffset:m,hostStart:v,hostTarget:h,heights:S}=u,{onLift:f,onDrop:g,onSettled:p}=i;return{enabled:!n,...s?{}:{activateAfterLongPress:350},onActivate:s=>{"worklet";r.value=s.absoluteY,e.value=t,a.value=t,d.value=c.value,v.value=m.value,h.value=m.value,o.value=0,l.value=0,runOnJS(f)(t)},onUpdate:a=>{"worklet";e.value===t&&(o.value=a.translationY,r.value=a.absoluteY)},onFinalize:()=>{"worklet";if(e.value!==t)return;const o=a.value,r=S.value;e.value=-1,l.value=topOf(r,t)+l.value-slotTop(r,t,o),l.value=withSpring(0,SPRING_CONFIG,e=>{"worklet";e&&runOnJS(p)()}),runOnJS(g)(t,o)}}},[n,s,t,i,u]),g=usePanGesture(f),p=n?[]:[...t>0?[{name:"moveUp",label:c.moveUp}]:[],...t<a-1?[{name:"moveDown",label:c.moveDown}]:[]];return _jsx(Animated.View,{style:S,onLayout:t=>i.onHeight(e,t.nativeEvent.layout.height),accessibilityActions:p,onAccessibilityAction:e=>{if(n)return;const l=t+(ACTION_STEP[e.nativeEvent.actionName]??0);l!==t&&l>=0&&l<a&&i.onMove(t,l)},testID:`sortable-row-${e}`,children:s?_jsxs(View,{style:v.handleRow,children:[_jsx(GestureDetector,{gesture:g,children:_jsxs(View,{style:v.handle,children:[_jsx(View,{style:v.bar}),_jsx(View,{style:v.bar}),_jsx(View,{style:v.bar})]})}),_jsx(View,{style:v.body,children:d})]}):_jsx(GestureDetector,{gesture:g,children:_jsx(View,{children:d})})})}export function SortableList(e){const{data:t,keyExtractor:a,renderItem:l,onReorder:o,handle:r=!1,disabled:s=!1,accessibilityLabel:n,labels:u,testID:i}=e,c=useMemo(()=>({...DEFAULT_SORTABLE_LIST_LABELS,...u}),[u]),d=useMemo(()=>t.map((e,t)=>({key:a(e,t),item:e})),[t,a]),m=useMemo(()=>d.map(e=>e.key),[d]),v=useAnimatedRef(),h=useSharedValue(0),S=useSharedValue(0),f=useSharedValue(0),g=useScrollHost(),p=useSharedValue(0),b=null!==g,x=g?.top??p,w=g?.bottom??p,y=g?.offset??p,_=g?.maxOffset??p,k=g?.scrollTo??noop,A=useSharedValue(0),L=useSharedValue(0),O=useSharedValue(0),V=useSharedValue(0),I=useSharedValue(-1),T=useSharedValue(-1),C=useSharedValue(0),E=useSharedValue([]),j=useRef(new Map),M=useRef(m),[R,D]=useState(null),Y=useCallback(()=>{E.value=M.current.map(e=>j.current.get(e)??0)},[E]);useEffect(()=>{M.current=m,Y()},[m,Y]),useEffect(()=>()=>{cancelAnimation(C)},[C]);const P=useCallback(e=>{D(t=>t?.dragging?{...t,to:e}:t)},[]),G=useFrameCallback(()=>{"worklet";const e=I.value;if(e<0)return;const t=measure(v);if(t){const e=b?Math.max(t.pageY,x.value):t.pageY,a=b?Math.min(t.pageY+t.height,w.value):t.pageY+t.height,l=Math.max(0,f.value-t.height-1);V.value<e+48?h.value>1?scrollTo(v,0,Math.max(0,h.value-12),!1):b&&L.value>0&&(L.value=Math.max(0,L.value-12),runOnJS(k)(L.value)):V.value>a-48&&(h.value<l?scrollTo(v,0,Math.min(l,h.value+12),!1):b&&L.value<_.value&&(L.value=Math.min(_.value,L.value+12),runOnJS(k)(L.value)))}C.value=O.value+h.value-S.value+y.value-A.value;const a=dropIndex(E.value,e,C.value);a!==T.value&&(T.value=a,runOnJS(P)(a))},!1),N=useCallback(e=>{triggerHaptic("longPress"),G.setActive(!0),D({key:m[e]??"",from:e,to:e,dragging:!0})},[G,m]),H=useCallback((e,t)=>{G.setActive(!1),D(e=>e?{...e,to:t,dragging:!1}:e),t!==e&&o(moveItem(m,e,t))},[G,m,o]),F=useCallback(()=>{D(e=>e&&!e.dragging?null:e)},[]),J=useCallback((e,t)=>{o(moveItem(m,e,t))},[m,o]),U=useCallback((e,t)=>{j.current.set(e,t),Y()},[Y]),z=useAnimatedScrollHandler({onScroll:e=>{"worklet";h.value=e.contentOffset.y}}),B=useCallback((e,t)=>{f.value=t},[f]),K=useMemo(()=>({scrollRef:v,scrollY:h,scrollStart:S,hostOffset:y,hostStart:A,hostTarget:L,translation:O,absoluteY:V,dragIndex:I,dropTo:T,dragY:C,heights:E}),[v,h,S,y,A,L,O,V,I,T,C,E]),X=useMemo(()=>({onLift:N,onDrop:H,onSettled:F,onMove:J,onHeight:U}),[N,H,F,J,U]),$=!0===R?.dragging,q=$&&R?rowShifts(m.map(e=>j.current.get(e)??0),R.from,R.to):null;return _jsx(Animated.ScrollView,{ref:v,onScroll:z,onContentSizeChange:B,scrollEventThrottle:16,scrollEnabled:!$,accessibilityLabel:n,testID:i,children:d.map((e,t)=>{const a=R?.key===e.key;return _jsx(SortableRow,{rowKey:e.key,index:t,count:d.length,shift:q?.[t]??0,isActive:a,dragging:$,handle:r,disabled:s,shared:K,callbacks:X,labels:c,children:l({item:e.item,index:t,isActive:a})},e.key)})})}SortableList.displayName="SortableList";export default SortableList;
1
+ "use strict";import{useCallback,useEffect,useMemo,useRef,useState}from"react";import{StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{cancelAnimation,measure,scrollTo,useAnimatedRef,useAnimatedScrollHandler,useAnimatedStyle,useFrameCallback,useSharedValue,withSpring}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{useTheme}from"../../theme/index.js";import{triggerHaptic}from"../../utils/index.js";import{useScrollHost}from"../Screen/ScrollHost.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const DEFAULT_SORTABLE_LIST_LABELS=Object.freeze({moveUp:"Move up",moveDown:"Move down"});const LONG_PRESS_MS=350,EDGE_PX=48,SCROLL_STEP_PX=12,SCROLL_SLACK_PX=1,SPRING_CONFIG={damping:22,stiffness:260,mass:1},ACTION_STEP={moveUp:-1,moveDown:1},noop=e=>{};export function moveItem(e,t,a){const l=e.slice();if(t<0||t>=l.length)return l;const[o]=l.splice(t,1);return void 0===o||l.splice(a,0,o),l}export function topOf(e,t){"worklet";let a=0;for(let l=0;l<t;l++)a+=e[l]??0;return a}export function slotTop(e,t,a){"worklet";let l=0,o=0;for(let s=0;s<e.length&&o<a;s++)s!==t&&(l+=e[s]??0,o++);return l}export function dropIndex(e,t,a){"worklet";const l=topOf(e,t)+(e[t]??0)/2+a;let o=0,s=0;for(let a=0;a<e.length;a++){const r=e[a]??0;a!==t&&s+r/2<l&&o++,s+=r}return o}export function rowShifts(e,t,a){const l=[];let o=0;for(const t of e)l.push(o),o+=t;const s=e.map(()=>0),r=moveItem(e.map((e,t)=>t),t,a);let n=0;for(const t of r)s[t]=n-(l[t]??0),n+=e[t]??0;return s}const buildStyles=e=>StyleSheet.create({handleRow:{flexDirection:"row",alignItems:"center"},handle:{paddingHorizontal:e.space.sm,paddingVertical:e.space.md,gap:e.space.xxs},bar:{width:e.space.md,height:e.space.xxs,backgroundColor:e.colors["text-muted"]},body:{flex:1}});function SortableRow({rowKey:e,index:t,count:a,shift:l,isActive:o,dragging:s,handle:r,disabled:n,shared:u,callbacks:i,labels:c,children:d}){const m=useTheme(),h=useMemo(()=>buildStyles(m),[m]),v=useSharedValue(0);useEffect(()=>{v.value=s&&!o?withSpring(l,SPRING_CONFIG):l},[s,o,l,v]),useEffect(()=>()=>{cancelAnimation(v)},[v]);const f=useAnimatedStyle(()=>({transform:[{translateY:o?u.dragY.value:v.value}],zIndex:o?1:0}),[o,u,v]),S=useMemo(()=>{const{dragIndex:e,dropTo:a,dragY:l,translation:o,absoluteY:s,scrollY:c,scrollStart:d,hostOffset:m,hostStart:h,hostTarget:v,heights:f}=u,{onLift:S,onDrop:p,onSettled:g}=i;return{enabled:!n,...r?{}:{activateAfterLongPress:350},onActivate:r=>{"worklet";s.value=r.absoluteY,e.value=t,a.value=t,d.value=c.value,h.value=m.value,v.value=m.value,o.value=0,l.value=0,scheduleOnRN(S,t)},onUpdate:a=>{"worklet";e.value===t&&(o.value=a.translationY,s.value=a.absoluteY)},onFinalize:()=>{"worklet";if(e.value!==t)return;const o=a.value,s=f.value;e.value=-1,l.value=topOf(s,t)+l.value-slotTop(s,t,o),l.value=withSpring(0,SPRING_CONFIG,e=>{"worklet";e&&scheduleOnRN(g)}),scheduleOnRN(p,t,o)}}},[n,r,t,i,u]),p=usePanGesture(S),g=n?[]:[...t>0?[{name:"moveUp",label:c.moveUp}]:[],...t<a-1?[{name:"moveDown",label:c.moveDown}]:[]];return _jsx(Animated.View,{style:f,onLayout:t=>i.onHeight(e,t.nativeEvent.layout.height),accessibilityActions:g,onAccessibilityAction:e=>{if(n)return;const l=t+(ACTION_STEP[e.nativeEvent.actionName]??0);l!==t&&l>=0&&l<a&&i.onMove(t,l)},testID:`sortable-row-${e}`,children:r?_jsxs(View,{style:h.handleRow,children:[_jsx(GestureDetector,{gesture:p,children:_jsxs(View,{style:h.handle,children:[_jsx(View,{style:h.bar}),_jsx(View,{style:h.bar}),_jsx(View,{style:h.bar})]})}),_jsx(View,{style:h.body,children:d})]}):_jsx(GestureDetector,{gesture:p,children:_jsx(View,{children:d})})})}export function SortableList(e){const{data:t,keyExtractor:a,renderItem:l,onReorder:o,handle:s=!1,disabled:r=!1,accessibilityLabel:n,labels:u,testID:i}=e,c=useMemo(()=>({...DEFAULT_SORTABLE_LIST_LABELS,...u}),[u]),d=useMemo(()=>t.map((e,t)=>({key:a(e,t),item:e})),[t,a]),m=useMemo(()=>d.map(e=>e.key),[d]),h=useAnimatedRef(),v=useSharedValue(0),f=useSharedValue(0),S=useSharedValue(0),p=useScrollHost(),g=useSharedValue(0),b=null!==p,x=p?.top??g,w=p?.bottom??g,y=p?.offset??g,k=p?.maxOffset??g,_=p?.scrollTo??noop,A=useSharedValue(0),L=useSharedValue(0),R=useSharedValue(0),O=useSharedValue(0),V=useSharedValue(-1),I=useSharedValue(-1),T=useSharedValue(0),C=useSharedValue([]),E=useRef(new Map),j=useRef(m),[M,N]=useState(null),D=useCallback(()=>{C.value=j.current.map(e=>E.current.get(e)??0)},[C]);useEffect(()=>{j.current=m,D()},[m,D]),useEffect(()=>()=>{cancelAnimation(T)},[T]);const Y=useCallback(e=>{N(t=>t?.dragging?{...t,to:e}:t)},[]),P=useFrameCallback(()=>{"worklet";const e=V.value;if(e<0)return;const t=measure(h);if(t){const e=b?Math.max(t.pageY,x.value):t.pageY,a=b?Math.min(t.pageY+t.height,w.value):t.pageY+t.height,l=Math.max(0,S.value-t.height-1);O.value<e+48?v.value>1?scrollTo(h,0,Math.max(0,v.value-12),!1):b&&L.value>0&&(L.value=Math.max(0,L.value-12),scheduleOnRN(_,L.value)):O.value>a-48&&(v.value<l?scrollTo(h,0,Math.min(l,v.value+12),!1):b&&L.value<k.value&&(L.value=Math.min(k.value,L.value+12),scheduleOnRN(_,L.value)))}T.value=R.value+v.value-f.value+y.value-A.value;const a=dropIndex(C.value,e,T.value);a!==I.value&&(I.value=a,scheduleOnRN(Y,a))},!1),G=useCallback(e=>{triggerHaptic("longPress"),P.setActive(!0),N({key:m[e]??"",from:e,to:e,dragging:!0})},[P,m]),H=useCallback((e,t)=>{P.setActive(!1),N(e=>e?{...e,to:t,dragging:!1}:e),t!==e&&o(moveItem(m,e,t))},[P,m,o]),F=useCallback(()=>{N(e=>e&&!e.dragging?null:e)},[]),U=useCallback((e,t)=>{o(moveItem(m,e,t))},[m,o]),z=useCallback((e,t)=>{E.current.set(e,t),D()},[D]),B=useAnimatedScrollHandler({onScroll:e=>{"worklet";v.value=e.contentOffset.y}}),K=useCallback((e,t)=>{S.value=t},[S]),X=useMemo(()=>({scrollRef:h,scrollY:v,scrollStart:f,hostOffset:y,hostStart:A,hostTarget:L,translation:R,absoluteY:O,dragIndex:V,dropTo:I,dragY:T,heights:C}),[h,v,f,y,A,L,R,O,V,I,T,C]),$=useMemo(()=>({onLift:G,onDrop:H,onSettled:F,onMove:U,onHeight:z}),[G,H,F,U,z]),q=!0===M?.dragging,J=q&&M?rowShifts(m.map(e=>E.current.get(e)??0),M.from,M.to):null;return _jsx(Animated.ScrollView,{ref:h,onScroll:B,onContentSizeChange:K,scrollEventThrottle:16,scrollEnabled:!q,accessibilityLabel:n,testID:i,children:d.map((e,t)=>{const a=M?.key===e.key;return _jsx(SortableRow,{rowKey:e.key,index:t,count:d.length,shift:J?.[t]??0,isActive:a,dragging:q,handle:s,disabled:r,shared:X,callbacks:$,labels:c,children:l({item:e.item,index:t,isActive:a})},e.key)})})}SortableList.displayName="SortableList";export default SortableList;
@@ -1 +1 @@
1
- "use strict";import{useCallback,useEffect,useMemo,useRef}from"react";import{Dimensions,Pressable,StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{cancelAnimation,runOnJS,useAnimatedStyle,useSharedValue,withSpring}from"react-native-reanimated";import{useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const SPRING_CONFIG={damping:22,stiffness:260,mass:1},DRAG_ACTIVATION_OFFSET=10,RUBBER_BAND_FACTOR=.35,FAIL_OFFSET_Y=15,ACTION_ICON_SIZE=20,toneToBg=(e,t)=>{switch(t){case"primary":return e.colors.primary;case"success":return e.colors.success;case"warning":return e.colors.warning;case"danger":return e.colors.danger;case"info":return e.colors.info;default:return e.colors.neutral}},toneToOnColor=(e,t)=>{switch(t){case"primary":return e.colors["on-primary"];case"success":return e.colors["on-success"];case"warning":return e.colors["on-warning"];case"danger":return e.colors["on-danger"];case"info":return e.colors["on-info"];default:return e.colors["on-neutral"]}},Swipeable=e=>{const{children:t,leftActions:n,rightActions:i,threshold:s,fullSwipeThreshold:o,onSwipeOpen:r,onSwipeClose:a,disabled:l=!1,haptic:c,containerStyle:u,contentStyle:d,actionStyle:m,accessibilityLabel:h,testID:p}=e,S=useTheme(),b=s??80,f=o??200,g=useMemo(()=>buildStyles(S),[S]),w=useMemo(()=>buildActionStyles(S),[S]),y=!!n&&n.length>0,v=!!i&&i.length>0,x=Dimensions.get("window").width,A=y?b*(n?.length??0):0,I=v?b*(i?.length??0):0,_=useSharedValue(0),C=useSharedValue(0),O=useRef(null);useEffect(()=>()=>{cancelAnimation(_),cancelAnimation(C)},[_,C]);const j=useCallback(e=>{O.current!==e&&(O.current=e,r?.(e))},[r]),G=useCallback(()=>{null!==O.current&&(O.current=null,a?.())},[a]),N=useCallback(e=>{const t="left"===e?n:i,s=t?.[0];s&&(!1!==c&&triggerHaptic("notificationSuccess"),s.onPress(),_.value=withSpring(0,SPRING_CONFIG),O.current=null,a?.())},[n,i,_,a,c]),R=useCallback(()=>{_.value=withSpring(0,SPRING_CONFIG),G()},[_,G]),P=useCallback(e=>{const t=resolveHaptic(c,"selection");t&&triggerHaptic(t),e.onPress(),R()},[R,c]),k=useMemo(()=>{const e=A,t=I,n=f,i=-f,s=x,o=-x,r=b,a=y,c=v;return{enabled:!l,testID:p?`${p}-gesture`:"swipeable-gesture",activeOffsetX:[-10,10],failOffsetY:[-15,15],onActivate:()=>{"worklet";C.value=_.value},onUpdate:n=>{"worklet";const i=C.value+n.translationX;_.value=i>0&&!a||i<0&&!c?0:i>e&&a?e+.35*(i-e):i<-t&&c?.35*(i+t)-t:i},onDeactivate:()=>{"worklet";const l=_.value;return a&&l>=n?(_.value=withSpring(s,SPRING_CONFIG),void runOnJS(N)("left")):c&&l<=i?(_.value=withSpring(o,SPRING_CONFIG),void runOnJS(N)("right")):a&&l>=r?(_.value=withSpring(e,SPRING_CONFIG),void runOnJS(j)("left")):c&&l<=-r?(_.value=withSpring(-t,SPRING_CONFIG),void runOnJS(j)("right")):(_.value=withSpring(0,SPRING_CONFIG),void runOnJS(G)())}}},[l,C,N,f,y,v,A,G,j,I,x,b,_,p]),T=usePanGesture(k),V=useAnimatedStyle(()=>({transform:[{translateX:_.value}]}),[_]),F=useAnimatedStyle(()=>({opacity:A>0?Math.min(1,Math.max(0,_.value/A)):0}),[A,_]),D=useAnimatedStyle(()=>({opacity:I>0?Math.min(1,Math.max(0,-_.value/I)):0}),[I,_]),E=useMemo(()=>{const e=[];return n?.forEach(t=>{e.push({name:t.key,label:t.label})}),i?.forEach(t=>{e.push({name:t.key,label:t.label})}),e},[n,i]),B=useCallback(e=>{const t=e.nativeEvent.actionName,s=[...n??[],...i??[]].find(e=>e.key===t);s&&(!1!==c&&triggerHaptic("selection"),s.onPress())},[n,i,c]);return y||v?_jsxs(View,{style:[g.root,u],testID:p,accessibilityLabel:h,accessibilityActions:E,onAccessibilityAction:B,children:[y?_jsx(Animated.View,{style:[g.actionsRow,g.actionsLeft,{width:A},m,F],pointerEvents:"box-none",children:n?.map(e=>_jsx(ActionButton,{action:e,theme:S,actionStyles:w,width:b,onPress:P},e.key))}):null,v?_jsx(Animated.View,{style:[g.actionsRow,g.actionsRight,{width:I},m,D],pointerEvents:"box-none",children:i?.map(e=>_jsx(ActionButton,{action:e,theme:S,actionStyles:w,width:b,onPress:P},e.key))}):null,_jsx(GestureDetector,{gesture:T,children:_jsx(Animated.View,{style:[g.content,d,V],children:t})})]}):_jsx(View,{style:u,testID:p,children:t})};Swipeable.displayName="Swipeable";const ActionButton=({action:e,theme:t,actionStyles:n,width:i,onPress:s})=>{assertValidValue("Swipeable","tone",e.tone,["primary","success","warning","danger","info","neutral"]);const o=e.tone??"neutral",r=toneToBg(t,o),a=renderSlotIcon(e.icon,{color:toneToOnColor(t,o),size:20,disabled:!1});return _jsxs(Pressable,{onPress:()=>s(e),accessibilityRole:"button",accessibilityLabel:e.label,style:[n.button,{width:i,backgroundColor:r,paddingHorizontal:t.space.sm}],children:[a?_jsx(View,{style:n.icon,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants","aria-hidden":!0,children:a}):null,_jsx(Text,{variant:"bodySmall",weight:"semibold",style:[n.label,{color:toneToOnColor(t,o)}],numberOfLines:1,children:e.label})]})},buildActionStyles=e=>StyleSheet.create({button:{flexGrow:0,flexShrink:0,alignItems:"center",justifyContent:"center"},icon:{marginBottom:e.space.xxs},label:{textAlign:"center"}}),buildStyles=e=>StyleSheet.create({root:{position:"relative",overflow:"hidden"},content:{backgroundColor:"transparent"},actionsRow:{position:"absolute",top:0,bottom:0,flexDirection:"row"},actionsLeft:{left:0},actionsRight:{right:0,justifyContent:"flex-end"}});export{Swipeable};export default Swipeable;
1
+ "use strict";import{useCallback,useEffect,useMemo,useRef}from"react";import{Dimensions,Pressable,StyleSheet,View}from"react-native";import{GestureDetector,usePanGesture}from"react-native-gesture-handler";import Animated,{cancelAnimation,useAnimatedStyle,useSharedValue,withSpring}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{useTheme}from"../../theme/index.js";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{renderSlotIcon}from"../AppIcon/slotIcon.js";import{Text}from"../Text/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";const SPRING_CONFIG={damping:22,stiffness:260,mass:1},DRAG_ACTIVATION_OFFSET=10,RUBBER_BAND_FACTOR=.35,FAIL_OFFSET_Y=15,ACTION_ICON_SIZE=20,toneToBg=(e,t)=>{switch(t){case"primary":return e.colors.primary;case"success":return e.colors.success;case"warning":return e.colors.warning;case"danger":return e.colors.danger;case"info":return e.colors.info;default:return e.colors.neutral}},toneToOnColor=(e,t)=>{switch(t){case"primary":return e.colors["on-primary"];case"success":return e.colors["on-success"];case"warning":return e.colors["on-warning"];case"danger":return e.colors["on-danger"];case"info":return e.colors["on-info"];default:return e.colors["on-neutral"]}},Swipeable=e=>{const{children:t,leftActions:n,rightActions:s,threshold:i,fullSwipeThreshold:o,onSwipeOpen:r,onSwipeClose:a,disabled:l=!1,haptic:c,containerStyle:u,contentStyle:d,actionStyle:m,accessibilityLabel:h,testID:p}=e,S=useTheme(),b=i??80,f=o??200,w=useMemo(()=>buildStyles(S),[S]),g=useMemo(()=>buildActionStyles(S),[S]),y=!!n&&n.length>0,v=!!s&&s.length>0,x=Dimensions.get("window").width,A=y?b*(n?.length??0):0,I=v?b*(s?.length??0):0,_=useSharedValue(0),N=useSharedValue(0),C=useRef(null);useEffect(()=>()=>{cancelAnimation(_),cancelAnimation(N)},[_,N]);const O=useCallback(e=>{C.current!==e&&(C.current=e,r?.(e))},[r]),R=useCallback(()=>{null!==C.current&&(C.current=null,a?.())},[a]),j=useCallback(e=>{const t="left"===e?n:s,i=t?.[0];i&&(!1!==c&&triggerHaptic("notificationSuccess"),i.onPress(),_.value=withSpring(0,SPRING_CONFIG),C.current=null,a?.())},[n,s,_,a,c]),G=useCallback(()=>{_.value=withSpring(0,SPRING_CONFIG),R()},[_,R]),k=useCallback(e=>{const t=resolveHaptic(c,"selection");t&&triggerHaptic(t),e.onPress(),G()},[G,c]),P=useMemo(()=>{const e=A,t=I,n=f,s=-f,i=x,o=-x,r=b,a=y,c=v;return{enabled:!l,testID:p?`${p}-gesture`:"swipeable-gesture",activeOffsetX:[-10,10],failOffsetY:[-15,15],onActivate:()=>{"worklet";N.value=_.value},onUpdate:n=>{"worklet";const s=N.value+n.translationX;_.value=s>0&&!a||s<0&&!c?0:s>e&&a?e+.35*(s-e):s<-t&&c?.35*(s+t)-t:s},onDeactivate:()=>{"worklet";const l=_.value;return a&&l>=n?(_.value=withSpring(i,SPRING_CONFIG),void scheduleOnRN(j,"left")):c&&l<=s?(_.value=withSpring(o,SPRING_CONFIG),void scheduleOnRN(j,"right")):a&&l>=r?(_.value=withSpring(e,SPRING_CONFIG),void scheduleOnRN(O,"left")):c&&l<=-r?(_.value=withSpring(-t,SPRING_CONFIG),void scheduleOnRN(O,"right")):(_.value=withSpring(0,SPRING_CONFIG),void scheduleOnRN(R))}}},[l,N,j,f,y,v,A,R,O,I,x,b,_,p]),T=usePanGesture(P),V=useAnimatedStyle(()=>({transform:[{translateX:_.value}]}),[_]),F=useAnimatedStyle(()=>({opacity:A>0?Math.min(1,Math.max(0,_.value/A)):0}),[A,_]),D=useAnimatedStyle(()=>({opacity:I>0?Math.min(1,Math.max(0,-_.value/I)):0}),[I,_]),E=useMemo(()=>{const e=[];return n?.forEach(t=>{e.push({name:t.key,label:t.label})}),s?.forEach(t=>{e.push({name:t.key,label:t.label})}),e},[n,s]),B=useCallback(e=>{const t=e.nativeEvent.actionName,i=[...n??[],...s??[]].find(e=>e.key===t);i&&(!1!==c&&triggerHaptic("selection"),i.onPress())},[n,s,c]);return y||v?_jsxs(View,{style:[w.root,u],testID:p,accessibilityLabel:h,accessibilityActions:E,onAccessibilityAction:B,children:[y?_jsx(Animated.View,{style:[w.actionsRow,w.actionsLeft,{width:A},m,F],pointerEvents:"box-none",children:n?.map(e=>_jsx(ActionButton,{action:e,theme:S,actionStyles:g,width:b,onPress:k},e.key))}):null,v?_jsx(Animated.View,{style:[w.actionsRow,w.actionsRight,{width:I},m,D],pointerEvents:"box-none",children:s?.map(e=>_jsx(ActionButton,{action:e,theme:S,actionStyles:g,width:b,onPress:k},e.key))}):null,_jsx(GestureDetector,{gesture:T,children:_jsx(Animated.View,{style:[w.content,d,V],children:t})})]}):_jsx(View,{style:u,testID:p,children:t})};Swipeable.displayName="Swipeable";const ActionButton=({action:e,theme:t,actionStyles:n,width:s,onPress:i})=>{assertValidValue("Swipeable","tone",e.tone,["primary","success","warning","danger","info","neutral"]);const o=e.tone??"neutral",r=toneToBg(t,o),a=renderSlotIcon(e.icon,{color:toneToOnColor(t,o),size:20,disabled:!1});return _jsxs(Pressable,{onPress:()=>i(e),accessibilityRole:"button",accessibilityLabel:e.label,style:[n.button,{width:s,backgroundColor:r,paddingHorizontal:t.space.sm}],children:[a?_jsx(View,{style:n.icon,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants","aria-hidden":!0,children:a}):null,_jsx(Text,{variant:"bodySmall",weight:"semibold",style:[n.label,{color:toneToOnColor(t,o)}],numberOfLines:1,children:e.label})]})},buildActionStyles=e=>StyleSheet.create({button:{flexGrow:0,flexShrink:0,alignItems:"center",justifyContent:"center"},icon:{marginBottom:e.space.xxs},label:{textAlign:"center"}}),buildStyles=e=>StyleSheet.create({root:{position:"relative",overflow:"hidden"},content:{backgroundColor:"transparent"},actionsRow:{position:"absolute",top:0,bottom:0,flexDirection:"row"},actionsLeft:{left:0},actionsRight:{right:0,justifyContent:"flex-end"}});export{Swipeable};export default Swipeable;
@@ -1 +1 @@
1
- "use strict";import{forwardRef,useCallback,useMemo,useRef,useState}from"react";import{StyleSheet,TextInput,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{fontFor,useTheme}from"../../theme/index.js";import{mergeRefs,resolveHaptic,triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{Chip}from"../Chip/index.js";import{FieldBase,FieldLabel,FieldMessage,hasFieldText,RequiredPlaceholder}from"../FieldBase/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const TagInput=forwardRef((e,t)=>{const{value:s,defaultValue:l,onChange:a,placeholder:r,label:i,helperText:o,error:n,required:u,disabled:d=!1,size:c="md",variant:p,maxTags:m,unique:x=!0,transform:f,separators:g=[","],haptic:h,onFocus:b,style:j,testID:y}=e;assertValidValue("TagInput","size",e.size,["sm","md","lg"]),assertValidValue("TagInput","variant",e.variant,["outline","filled","underline"]);const v=useTheme(),C=useMemo(()=>buildStyles(v),[v]),[T,S]=useControllableState({value:s,defaultValue:l??[],onChange:a}),[F,V]=useState(""),[w,k]=useState(!1),I=useRef(null),z=useMemo(()=>mergeRefs(I,t),[t]),_=useCallback(()=>{d||I.current?.focus()},[d]),R="number"==typeof m&&T.length>=m,B=!0===n||hasFieldText(n),H=u&&!i&&0===T.length&&0===F.length&&Boolean(r),M=useCallback(e=>{const t=f?f(e.trim()):e.trim();if(!t)return;if(R)return;if(x&&T.some(e=>e.toLowerCase()===t.toLowerCase()))return void V("");S([...T,t]),V("");const s=resolveHaptic(h,"selection");s&&triggerHaptic(s)},[R,h,S,T,f,x]),q=useCallback(e=>{const t=T.filter((t,s)=>s!==e);S(t);const s=resolveHaptic(h,"selection");s&&triggerHaptic(s)},[h,S,T]),L=useCallback(e=>{const t=g.find(t=>t.length>0&&e.includes(t));t?M(e.slice(0,e.indexOf(t))):V(e)},[M,g]),D=useCallback(e=>{d||"Backspace"===e.nativeEvent.key&&""===F&&T.length>0&&q(T.length-1)},[d,F,q,T.length]),P=useMemo(()=>T.map((e,t)=>({key:`${e}-${t}`,tag:e,index:t})),[T]),$=_jsx(FieldBase,{size:c,variant:p,focused:w,disabled:d,error:B,filled:T.length>0||F.length>0,onPress:_,pressFeedback:!1,style:j,children:_jsxs(View,{style:C.wrap,children:[P.map(({key:e,tag:t,index:s})=>_jsx(Chip,{label:t,size:"sm",onRemove:d?void 0:()=>q(s),haptic:h},e)),_jsxs(View,{style:C.inputBox,children:[_jsx(TextInput,{ref:z,value:F,onChangeText:L,onKeyPress:D,onSubmitEditing:()=>M(F),onFocus:e=>{k(!0),b?.(e)},onBlur:()=>{k(!1),M(F)},editable:!d&&!R,placeholder:R||H?void 0:r,placeholderTextColor:v.colors["text-subtle"],blurOnSubmit:!1,returnKeyType:"done",accessibilityLabel:i??r,style:[C.input,{color:v.colors["text-body"],fontSize:v.text.base.size}],testID:y?`${y}-input`:void 0}),H?_jsx(RequiredPlaceholder,{text:r??"",color:v.colors["text-subtle"],fontSize:v.text.base.size,weightStyle:fontFor(v,"normal")}):null]})]})});return _jsxs(View,{testID:y,children:[i?_jsx(FieldLabel,{size:c,required:u,children:i}):null,$,_jsx(FieldMessage,{size:c,error:B,text:B?n:o})]})});TagInput.displayName="TagInput";const buildStyles=e=>StyleSheet.create({wrap:{flex:1,flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:e.space.xs,paddingVertical:e.space.xs},inputBox:{flexGrow:1,minWidth:80},input:{...fontFor(e,"normal"),padding:e.space.none}});export default TagInput;
1
+ "use strict";import{forwardRef,useCallback,useMemo,useRef,useState}from"react";import{StyleSheet,TextInput,View}from"react-native";import{useControllableState}from"../../hooks/index.js";import{fontFor,useTheme}from"../../theme/index.js";import{mergeRefs,resolveHaptic,triggerHaptic}from"../../utils/index.js";import{assertValidValue}from"../../utils/assertValidValue.js";import{Chip}from"../Chip/index.js";import{FieldBase,FieldLabel,FieldMessage,hasFieldText,RequiredPlaceholder}from"../FieldBase/index.js";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export const TagInput=forwardRef((e,t)=>{const{value:s,defaultValue:l,onChange:a,placeholder:i,label:r,helperText:o,error:n,required:u,disabled:d=!1,size:c="md",variant:p,maxTags:m,unique:x=!0,transform:f,separators:h=[","],haptic:g,onFocus:b,style:j,testID:y}=e;assertValidValue("TagInput","size",e.size,["sm","md","lg"]),assertValidValue("TagInput","variant",e.variant,["outline","filled","underline"]);const v=useTheme(),C=useMemo(()=>buildStyles(v),[v]),[T,F]=useControllableState({value:s,defaultValue:l??[],onChange:a}),[S,V]=useState(""),[w,k]=useState(!1),I=useRef(null),z=useMemo(()=>mergeRefs(I,t),[t]),_=useCallback(()=>{d||I.current?.focus()},[d]),B="number"==typeof m&&T.length>=m,R=!0===n||hasFieldText(n),H=u&&!r&&0===T.length&&0===S.length&&Boolean(i),M=useCallback(e=>{const t=f?f(e.trim()):e.trim();if(!t)return;if(B)return;if(x&&T.some(e=>e.toLowerCase()===t.toLowerCase()))return void V("");F([...T,t]),V("");const s=resolveHaptic(g,"selection");s&&triggerHaptic(s)},[B,g,F,T,f,x]),q=useCallback(e=>{const t=T.filter((t,s)=>s!==e);F(t);const s=resolveHaptic(g,"selection");s&&triggerHaptic(s)},[g,F,T]),L=useCallback(e=>{const t=h.find(t=>t.length>0&&e.includes(t));t?M(e.slice(0,e.indexOf(t))):V(e)},[M,h]),D=useCallback(e=>{d||"Backspace"===e.nativeEvent.key&&""===S&&T.length>0&&q(T.length-1)},[d,S,q,T.length]),P=useMemo(()=>T.map((e,t)=>({key:`${e}-${t}`,tag:e,index:t})),[T]),$=_jsx(FieldBase,{size:c,variant:p,focused:w,disabled:d,error:R,filled:T.length>0||S.length>0,onPress:_,pressFeedback:!1,style:j,children:_jsxs(View,{style:C.wrap,children:[P.map(({key:e,tag:t,index:s})=>_jsx(Chip,{label:t,size:"sm",onRemove:d?void 0:()=>q(s),haptic:g},e)),_jsxs(View,{style:C.inputBox,children:[_jsx(TextInput,{ref:z,value:S,onChangeText:L,onKeyPress:D,onSubmitEditing:()=>M(S),onFocus:e=>{k(!0),b?.(e)},onBlur:()=>{k(!1),M(S)},editable:!d&&!B,placeholder:B||H?void 0:i,placeholderTextColor:v.colors["text-subtle"],submitBehavior:"submit",returnKeyType:"done",accessibilityLabel:r??i,style:[C.input,{color:v.colors["text-body"],fontSize:v.text.base.size}],testID:y?`${y}-input`:void 0}),H?_jsx(RequiredPlaceholder,{text:i??"",color:v.colors["text-subtle"],fontSize:v.text.base.size,weightStyle:fontFor(v,"normal")}):null]})]})});return _jsxs(View,{testID:y,children:[r?_jsx(FieldLabel,{size:c,required:u,children:r}):null,$,_jsx(FieldMessage,{size:c,error:R,text:R?n:o})]})});TagInput.displayName="TagInput";const buildStyles=e=>StyleSheet.create({wrap:{flex:1,flexDirection:"row",flexWrap:"wrap",alignItems:"center",gap:e.space.xs,paddingVertical:e.space.xs},inputBox:{flexGrow:1,minWidth:80},input:{...fontFor(e,"normal"),padding:e.space.none}});export default TagInput;
@@ -1 +1 @@
1
- "use strict";import{useCallback,useEffect,useMemo}from"react";import{StyleSheet}from"react-native";import{GestureDetector,useCompetingGestures,usePanGesture,usePinchGesture,useTapGesture}from"react-native-gesture-handler";import Animated,{runOnJS,useAnimatedStyle,useSharedValue,withSpring}from"react-native-reanimated";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{jsx as _jsx}from"react/jsx-runtime";const DEFAULT_MAX_SCALE=4,DEFAULT_MIN_SCALE=1,DEFAULT_DOUBLE_TAP_SCALE=2,SPRING_CONFIG={damping:18,stiffness:220,mass:1};export const ZoomableImage=({children:e,maxScale:a=4,minScale:t=1,doubleTapScale:l=2,disabled:u=!1,haptic:i,style:s,accessibilityLabel:r,testID:n})=>{const o=useSharedValue(1),v=useSharedValue(1),c=useSharedValue(0),S=useSharedValue(0),m=useSharedValue(0),d=useSharedValue(0),p=useCallback(()=>{o.value=withSpring(1,SPRING_CONFIG),v.value=1,c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),m.value=0,d.value=0},[o,v,c,S,m,d]);useEffect(()=>{u&&p()},[u,p]);const h=useCallback(()=>{const e=resolveHaptic(i,"impactLight");e&&triggerHaptic(e)},[i]),G=useMemo(()=>({enabled:!u,onActivate:()=>{"worklet";v.value=o.value},onUpdate:e=>{"worklet";const l=v.value*e.scale;o.value=l<t?t+.3*(l-t):l>a?a+.2*(l-a):l},onDeactivate:()=>{"worklet";return o.value<t?(o.value=withSpring(t,SPRING_CONFIG),c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),v.value=t,m.value=0,void(d.value=0)):o.value>a?(o.value=withSpring(a,SPRING_CONFIG),void(v.value=a)):void(v.value=o.value)}}),[u,o,v,c,S,m,d,t,a]),I=usePinchGesture(G),g=useMemo(()=>({enabled:!u,minPointers:1,maxPointers:1,onActivate:()=>{"worklet";m.value=c.value,d.value=S.value},onUpdate:e=>{"worklet";o.value<=1||(c.value=m.value+e.translationX,S.value=d.value+e.translationY)},onDeactivate:()=>{"worklet";m.value=c.value,d.value=S.value}}),[u,o,c,S,m,d]),N=usePanGesture(g),w=useMemo(()=>({enabled:!u,numberOfTaps:2,onDeactivate:()=>{"worklet";runOnJS(h)(),o.value>1?(o.value=withSpring(1,SPRING_CONFIG),c.value=withSpring(0,SPRING_CONFIG),S.value=withSpring(0,SPRING_CONFIG),v.value=1,m.value=0,d.value=0):(o.value=withSpring(l,SPRING_CONFIG),v.value=l)}}),[u,o,v,c,S,m,d,h,l]),_=useTapGesture(w),C=useCompetingGestures(I,N,_),b=useAnimatedStyle(()=>({transform:[{translateX:c.value},{translateY:S.value},{scale:o.value}]}),[c,S,o]);return _jsx(GestureDetector,{gesture:C,children:_jsx(Animated.View,{style:[styles.container,s],testID:n,accessibilityLabel:r,accessibilityState:{disabled:u},"aria-disabled":u,children:_jsx(Animated.View,{style:[styles.content,b],children:e})})})};ZoomableImage.displayName="ZoomableImage";const styles=StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",overflow:"hidden"},content:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"}});export default ZoomableImage;
1
+ "use strict";import{useCallback,useEffect,useMemo}from"react";import{StyleSheet}from"react-native";import{GestureDetector,useCompetingGestures,usePanGesture,usePinchGesture,useTapGesture}from"react-native-gesture-handler";import Animated,{useAnimatedStyle,useSharedValue,withSpring}from"react-native-reanimated";import{scheduleOnRN}from"react-native-worklets";import{resolveHaptic,triggerHaptic}from"../../utils/index.js";import{jsx as _jsx}from"react/jsx-runtime";const DEFAULT_MAX_SCALE=4,DEFAULT_MIN_SCALE=1,DEFAULT_DOUBLE_TAP_SCALE=2,SPRING_CONFIG={damping:18,stiffness:220,mass:1};export const ZoomableImage=({children:e,maxScale:a=4,minScale:t=1,doubleTapScale:l=2,disabled:u=!1,haptic:i,style:s,accessibilityLabel:r,testID:n})=>{const o=useSharedValue(1),v=useSharedValue(1),c=useSharedValue(0),m=useSharedValue(0),S=useSharedValue(0),d=useSharedValue(0),p=useCallback(()=>{o.value=withSpring(1,SPRING_CONFIG),v.value=1,c.value=withSpring(0,SPRING_CONFIG),m.value=withSpring(0,SPRING_CONFIG),S.value=0,d.value=0},[o,v,c,m,S,d]);useEffect(()=>{u&&p()},[u,p]);const h=useCallback(()=>{const e=resolveHaptic(i,"impactLight");e&&triggerHaptic(e)},[i]),G=useMemo(()=>({enabled:!u,onActivate:()=>{"worklet";v.value=o.value},onUpdate:e=>{"worklet";const l=v.value*e.scale;o.value=l<t?t+.3*(l-t):l>a?a+.2*(l-a):l},onDeactivate:()=>{"worklet";return o.value<t?(o.value=withSpring(t,SPRING_CONFIG),c.value=withSpring(0,SPRING_CONFIG),m.value=withSpring(0,SPRING_CONFIG),v.value=t,S.value=0,void(d.value=0)):o.value>a?(o.value=withSpring(a,SPRING_CONFIG),void(v.value=a)):void(v.value=o.value)}}),[u,o,v,c,m,S,d,t,a]),I=usePinchGesture(G),g=useMemo(()=>({enabled:!u,minPointers:1,maxPointers:1,onActivate:()=>{"worklet";S.value=c.value,d.value=m.value},onUpdate:e=>{"worklet";o.value<=1||(c.value=S.value+e.translationX,m.value=d.value+e.translationY)},onDeactivate:()=>{"worklet";S.value=c.value,d.value=m.value}}),[u,o,c,m,S,d]),N=usePanGesture(g),w=useMemo(()=>({enabled:!u,numberOfTaps:2,onDeactivate:()=>{"worklet";scheduleOnRN(h),o.value>1?(o.value=withSpring(1,SPRING_CONFIG),c.value=withSpring(0,SPRING_CONFIG),m.value=withSpring(0,SPRING_CONFIG),v.value=1,S.value=0,d.value=0):(o.value=withSpring(l,SPRING_CONFIG),v.value=l)}}),[u,o,v,c,m,S,d,h,l]),_=useTapGesture(w),C=useCompetingGestures(I,N,_),b=useAnimatedStyle(()=>({transform:[{translateX:c.value},{translateY:m.value},{scale:o.value}]}),[c,m,o]);return _jsx(GestureDetector,{gesture:C,children:_jsx(Animated.View,{style:[styles.container,s],testID:n,accessibilityLabel:r,accessibilityState:{disabled:u},"aria-disabled":u,children:_jsx(Animated.View,{style:[styles.content,b],children:e})})})};ZoomableImage.displayName="ZoomableImage";const styles=StyleSheet.create({container:{flex:1,alignItems:"center",justifyContent:"center",overflow:"hidden"},content:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"}});export default ZoomableImage;
@@ -1 +1 @@
1
- "use strict";import{Logger}from"@webority/mobile-core";export const warnUnknownProps=(e,o)=>{if(!__DEV__||!o)return;const r=Object.keys(o).filter(e=>!isAllowed(e));0!==r.length&&Logger.warn(`[${e}] received prop(s) it does not accept: ${r.join(", ")}. They were ignored — check for a rename or a typo against the component's props.`)};const ALLOWED_EXACT=new Set(["children","key","ref","style","testID","collapsable","nativeID","pointerEvents","removeClippedSubviews","renderToHardwareTextureAndroid","shouldRasterizeIOS","needsOffscreenAlphaCompositing","hitSlop","onLayout","importantForAccessibility","role"]),ALLOWED_PREFIXES=["accessibility","aria-","on","data-"],isAllowed=e=>ALLOWED_EXACT.has(e)||ALLOWED_PREFIXES.some(o=>e.startsWith(o));
1
+ "use strict";import{Logger}from"@webority/mobile-core";export const warnUnknownProps=(e,o)=>{if(!__DEV__||!o)return;const r=Object.keys(o).filter(e=>!isAllowed(e));0!==r.length&&Logger.warn(`[${e}] received prop(s) it does not accept: ${r.join(", ")}. They were ignored: check for a rename or a typo against the component's props.`)};const ALLOWED_EXACT=new Set(["children","key","ref","style","testID","collapsable","nativeID","pointerEvents","removeClippedSubviews","renderToHardwareTextureAndroid","shouldRasterizeIOS","needsOffscreenAlphaCompositing","hitSlop","onLayout","importantForAccessibility","role"]),ALLOWED_PREFIXES=["accessibility","aria-","on","data-"],isAllowed=e=>ALLOWED_EXACT.has(e)||ALLOWED_PREFIXES.some(o=>e.startsWith(o));
@@ -27,7 +27,7 @@ export interface AutocompleteProps<T = string> {
27
27
  minChars?: number | undefined;
28
28
  /** Cap the number of suggestions shown. Default 8. */
29
29
  maxResults?: number | undefined;
30
- /** Show a loading spinner in the dropdown — e.g. while fetching remote results. */
30
+ /** Show a loading spinner in the dropdown, e.g. while fetching remote results. */
31
31
  loading?: boolean | undefined;
32
32
  /** `'client'` filters `options` locally; `'none'` shows them as-is (for server-side search). Default `'client'`. */
33
33
  filterMode?: "client" | "none" | undefined;
@@ -63,7 +63,7 @@ export interface AvatarProps {
63
63
  /**
64
64
  * Custom component used to render the image instead of the built-in `<Image>`.
65
65
  * Receives {@link AvatarImageProps}. Use this when `source` points at a secured
66
- * endpoint that needs auth headers / token refresh / caching — plug in the
66
+ * endpoint that needs auth headers / token refresh / caching: plug in the
67
67
  * app's authenticated image loader. On error it should call `onError`, which
68
68
  * triggers the initials fallback. When omitted, expo-image's `<Image>` is used.
69
69
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * BottomSheet — Reanimated 3 + Gesture Handler 3 implementation.
2
+ * BottomSheet: Reanimated 3 + Gesture Handler 3 implementation.
3
3
  *
4
4
  * A polished, theme-aware bottom sheet with multi-snap-point support,
5
5
  * UI-thread driven pan gestures, and native-driver spring animations.
@@ -152,7 +152,7 @@ export interface BottomSheetProps {
152
152
  /**
153
153
  * Sticky region pinned to the bottom of the sheet, above the safe-area
154
154
  * inset. Does not scroll with `children`, and rides up with the keyboard
155
- * when `keyboardBehavior='shift'` (no extra wiring needed — the whole sheet
155
+ * when `keyboardBehavior='shift'` (no extra wiring needed; the whole sheet
156
156
  * shifts). Typical use: action button rows.
157
157
  */
158
158
  footer?: React.ReactNode | undefined;
@@ -166,14 +166,14 @@ export interface BottomSheetProps {
166
166
  testID?: string | undefined;
167
167
  }
168
168
  /**
169
- * State + actions exposed to anything rendered inside a `<BottomSheet>` —
169
+ * State + actions exposed to anything rendered inside a `<BottomSheet>`,
170
170
  * including the `header` and `footer` slots. Read via `useBottomSheet()`.
171
171
  *
172
172
  * `snapIndex` is the JS-thread mirror of the current snap point. -1 means the
173
173
  * sheet is closed (mid-close-animation included). Use it to drive footer
174
174
  * button enable state, conditional headers, etc. If you need per-frame
175
175
  * progress (e.g. fade a header in as the sheet expands), reach for the
176
- * animated value via a future enhancement — not exposed today to keep the
176
+ * animated value via a future enhancement, not exposed today to keep the
177
177
  * surface minimal.
178
178
  */
179
179
  export interface BottomSheetContextValue {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Carousel — generic horizontal carousel with pagination, auto-play, and looping.
2
+ * Carousel: generic horizontal carousel with pagination, auto-play, and looping.
3
3
  *
4
4
  * Backed by a virtualized FlatList for memory efficiency. Dot and bar
5
5
  * pagination track the scroll gesture through `Animated.event`.
@@ -1,11 +1,11 @@
1
1
  /**
2
- * ChoiceGroup — headless choice group (one option, or `selectionMode="multiple"` for many) with templated options.
2
+ * ChoiceGroup: headless choice group (one option, or `selectionMode="multiple"` for many) with templated options.
3
3
  *
4
4
  * The component owns the BEHAVIOUR: selection state (controlled or
5
5
  * uncontrolled), per-option press handling, haptics, radio/radiogroup a11y,
6
6
  * and row/column/wrap layout. Each option's LOOK comes from a template:
7
7
  *
8
- * - `card` (default): a bordered card — label (+ optional icon /
8
+ * - `card` (default): a bordered card: label (+ optional icon /
9
9
  * description) with a RadioDot after the content (or before it, with
10
10
  * `indicatorPosition="leading"`), tinted with the option's colour when
11
11
  * selected. The "Hot / Warm / Cold" status-picker pattern works
@@ -19,7 +19,7 @@
19
19
  * indicator inside a custom layout.
20
20
  *
21
21
  * Cross-option visuals (a single indicator sliding BETWEEN options, joined
22
- * segments) are out of scope by design — that's SegmentedControl.
22
+ * segments) are out of scope by design; that's SegmentedControl.
23
23
  *
24
24
  * Same data contract as Select: `ChoiceOption[]` by default, `getOption*`
25
25
  * accessors for custom shapes.
@@ -82,7 +82,7 @@ interface BaseChoiceGroupProps<T = ChoiceOption> {
82
82
  getOptionColor?: ((option: T) => string | undefined) | undefined;
83
83
  /**
84
84
  * Custom option template. The library still owns press handling, haptics
85
- * and a11y — the template only paints. Selected-state styling is the
85
+ * and a11y: the template only paints. Selected-state styling is the
86
86
  * template's job (it gets the booleans).
87
87
  */
88
88
  renderOption?: ((state: ChoiceOptionState<T>) => React.ReactNode) | undefined;
@@ -17,7 +17,7 @@ export interface DateRangePickerLabels {
17
17
  }
18
18
  export declare const DEFAULT_DATE_RANGE_PICKER_LABELS: Readonly<DateRangePickerLabels>;
19
19
  /**
20
- * DateRangePicker — supports two usage modes:
20
+ * DateRangePicker: supports two usage modes:
21
21
  *
22
22
  * 1. Controlled-modal mode (pass `open` + `onClose`): renders only the
23
23
  * modal; parent owns open/close state.
@@ -29,7 +29,7 @@ export interface DescriptionItem {
29
29
  }
30
30
  export interface DescriptionsProps {
31
31
  items: ReadonlyArray<DescriptionItem>;
32
- /** 1 stacks label above value; 2 puts them side by side. Default 1 — phone widths are narrow. */
32
+ /** 1 stacks label above value; 2 puts them side by side. Default 1, since phone widths are narrow. */
33
33
  columns?: 1 | 2 | undefined;
34
34
  size?: DescriptionsSize | undefined;
35
35
  /** Hairlines between rows. */
@@ -44,7 +44,7 @@ export interface DescriptionsProps {
44
44
  testID?: string | undefined;
45
45
  }
46
46
  /**
47
- * A labelled key-value list for record detail — the "what are this thing's
47
+ * A labelled key-value list for record detail: the "what are this thing's
48
48
  * fields" view that every detail screen needs and that ListItem (a tappable row
49
49
  * with a title) is the wrong shape for.
50
50
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Drawer — slide-in side drawer (left / right / top / bottom).
2
+ * Drawer: slide-in side drawer (left / right / top / bottom).
3
3
  *
4
4
  * Built on Reanimated 4 and Gesture Handler 3's hooks: gestures and animations run on the
5
5
  * UI thread for buttery 60/120fps motion. Mirrors the BottomSheet ergonomics:
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Chevron — the shared dropdown indicator for the field family.
2
+ * Chevron: the shared dropdown indicator for the field family.
3
3
  *
4
4
  * One glyph for Select, InlineSelect, PickerTrigger and PhoneNumberInput so
5
5
  * the indicator never drifts between trigger components. It is the design
@@ -1,12 +1,12 @@
1
1
  /**
2
- * FieldBase — the unified field-box primitive.
2
+ * FieldBase: the unified field-box primitive.
3
3
  *
4
4
  * Every input-like control in the library (Input, Select, SearchBar,
5
5
  * NumberInput, OTPInput cell, PickerTrigger) composes FieldBase so the
6
6
  * height / radius / padding / border / fill / focus + disabled + error
7
7
  * states stay identical across the library. Differences (pill SearchBar,
8
8
  * OTP underline, NumberInput steppers) become explicit overrides via
9
- * props or via theme tokens — never accidental drift.
9
+ * props or via theme tokens; never accidental drift.
10
10
  *
11
11
  * Responsibilities:
12
12
  * - Resolve size dimensions from `theme.components.field`.
@@ -45,11 +45,11 @@ export interface FieldBaseProps {
45
45
  * (`theme.settings.components.field.defaultVariant`) via this prop. Default `'outline'`.
46
46
  */
47
47
  variant?: FieldBaseVariant | undefined;
48
- /** Parent-controlled focus state — drives the border + fill animation. */
48
+ /** Parent-controlled focus state; drives the border + fill animation. */
49
49
  focused?: boolean | undefined;
50
- /** Disabled state — wins over `focused` / `error`. */
50
+ /** Disabled state; wins over `focused` / `error`. */
51
51
  disabled?: boolean | undefined;
52
- /** Error state — visually wins over `focused`. */
52
+ /** Error state; visually wins over `focused`. */
53
53
  error?: boolean | undefined;
54
54
  /** Whether the field currently holds a value. Affects idle-empty vs idle-filled fill. */
55
55
  filled?: boolean | undefined;
@@ -104,9 +104,9 @@ export interface FieldBaseProps {
104
104
  minHeight?: number | undefined;
105
105
  /** Override `maxHeight` (rarely needed). */
106
106
  maxHeight?: number | undefined;
107
- /** Fixed pixel width — used by OTP cells. Suppresses default `flex: 1`. */
107
+ /** Fixed pixel width: used by OTP cells. Suppresses default `flex: 1`. */
108
108
  width?: number | undefined;
109
- /** Fixed pixel height — used by OTP cells. Wins over `minHeight`. */
109
+ /** Fixed pixel height: used by OTP cells. Wins over `minHeight`. */
110
110
  height?: number | undefined;
111
111
  /** Override horizontal padding. */
112
112
  paddingHorizontal?: number | undefined;
@@ -126,7 +126,7 @@ export interface FieldBaseProps {
126
126
  borderBottomLeftRadius?: number | undefined;
127
127
  /** Bottom-right corner radius. Wins over `radius`. */
128
128
  borderBottomRightRadius?: number | undefined;
129
- /** Override border width (shorthand — all four sides). OTP uses 1.5; everything else inherits `size.border`. */
129
+ /** Override border width (shorthand for all four sides). OTP uses 1.5; everything else inherits `size.border`. */
130
130
  borderWidth?: number | undefined;
131
131
  /** Top border width. Wins over `borderWidth`. */
132
132
  borderTopWidth?: number | undefined;
@@ -151,7 +151,7 @@ export interface FieldBaseProps {
151
151
  * Resolved text styling for the editable / displayed content inside a field.
152
152
  * Single source of truth so every field component (Input, NumberInput,
153
153
  * Select, SearchBar, PickerTrigger) renders identical colour + weight +
154
- * fontFamily for value text — and reads the placeholder colour from the
154
+ * fontFamily for value text, and reads the placeholder colour from the
155
155
  * same place. OTPInput intentionally overrides this with its own semibold
156
156
  * display weight.
157
157
  */
@@ -260,15 +260,15 @@ export declare const FieldMessage: React.FC<{
260
260
  * width is expanded to a 4-side record by the time the box renders, so the
261
261
  * animation pipeline can treat per-side and shorthand the same way.
262
262
  * `borderFocusedRepresentative` is a single colour pulled from the focused
263
- * sides — exposed for consumers (Input's selectionColor) that need to mirror
263
+ * sides; exposed for consumers (Input's selectionColor) that need to mirror
264
264
  * the visible focus indicator without re-resolving per side.
265
265
  */
266
266
  interface ResolvedFieldColors {
267
267
  backgroundIdleEmpty: string;
268
268
  backgroundIdleFilled: string;
269
- /** Optional override fill while focused — when undefined, focus animates from idle to idle (no fill change). */
269
+ /** Optional override fill while focused; when undefined, focus animates from idle to idle (no fill change). */
270
270
  backgroundFocused: string | undefined;
271
- /** Optional override fill while in error — when undefined, error animates from idle to idle. */
271
+ /** Optional override fill while in error; when undefined, error animates from idle to idle. */
272
272
  backgroundError: string | undefined;
273
273
  backgroundDisabled: string;
274
274
  borderIdle: Record<FieldSide, string>;
@@ -276,7 +276,7 @@ interface ResolvedFieldColors {
276
276
  borderError: Record<FieldSide, string>;
277
277
  borderDisabled: Record<FieldSide, string>;
278
278
  borderWidth: Record<FieldSide, number>;
279
- /** Single representative colour from `borderFocused` — first non-transparent side, bottom-priority. */
279
+ /** Single representative colour from `borderFocused`: first non-transparent side, bottom-priority. */
280
280
  borderFocusedRepresentative: string;
281
281
  }
282
282
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * FilePicker — attachment picking UI with pluggable native sources.
2
+ * FilePicker: attachment picking UI with pluggable native sources.
3
3
  *
4
4
  * The library owns the UI and behaviour: trigger (dashed card / list row /
5
5
  * custom render prop), the source-chooser sheet (shared OptionSheet), enforced
@@ -17,7 +17,7 @@
17
17
  * reflects them back via per-file `status` / `progress` and gets retry
18
18
  * taps through `onRetry`.
19
19
  * - Heavy processing. The async `process` hook runs per accepted file
20
- * (compression, EXIF strip, local copy) before it lands in `files` —
20
+ * (compression, EXIF strip, local copy) before it lands in `files`;
21
21
  * plug the app's image pipeline in there.
22
22
  */
23
23
  import type { PickedFile, PickerSource } from "@webority/mobile-core/pickers";
@@ -27,7 +27,7 @@ import type { HapticType } from "../../utils";
27
27
  export type FilePickerVariant = "card" | "list";
28
28
  export type FilePickerFileStatus = "idle" | "processing" | "uploading" | "done" | "error";
29
29
  export interface FilePickerFile {
30
- /** Stable identity — generated by the library when the source doesn't provide one. */
30
+ /** Stable identity, generated by the library when the source doesn't provide one. */
31
31
  id: string;
32
32
  name: string;
33
33
  /** Local content URI (freshly picked files). */
@@ -40,13 +40,13 @@ export interface FilePickerFile {
40
40
  type?: string | undefined;
41
41
  /** Bytes. */
42
42
  bytes?: number | undefined;
43
- /** Display-only upload state — the app sets these, the library renders them. */
43
+ /** Display-only upload state: the app sets these, the library renders them. */
44
44
  status?: FilePickerFileStatus | undefined;
45
- /** 0–1, rendered while `status === 'uploading'`. */
45
+ /** 0-1, rendered while `status === 'uploading'`. */
46
46
  progress?: number | undefined;
47
47
  /** Shown on the file while `status === 'error'`. */
48
48
  error?: string | undefined;
49
- /** Consumer payload — preserved untouched through every operation. */
49
+ /** Consumer payload, preserved untouched through every operation. */
50
50
  meta?: Record<string, unknown> | undefined;
51
51
  }
52
52
  /** Launch native picking through `pick()`: resolve `[]` for user-cancel, throw for real failures. */
@@ -110,11 +110,11 @@ export interface FilePickerProps {
110
110
  /** Native picking adapters. One source launches directly; several open the chooser sheet. */
111
111
  sources: ReadonlyArray<FilePickerSource>;
112
112
  maxFiles?: number | undefined;
113
- /** Per-file size cap — oversized picks are rejected with a visible error. */
113
+ /** Per-file size cap; oversized picks are rejected with a visible error. */
114
114
  maxSizeMB?: number | undefined;
115
115
  /** Accepted mime globs, e.g. `['image/*', 'application/pdf']`. Unset = accept all. */
116
116
  accept?: ReadonlyArray<string> | undefined;
117
- /** Custom per-file rule — return an error string to reject. */
117
+ /** Custom per-file rule: return an error string to reject. */
118
118
  validate?: ((file: FilePickerFile) => string | null | undefined) | undefined;
119
119
  /**
120
120
  * Async per-file transform between pick and `files` (compression, local
@@ -131,7 +131,7 @@ export interface FilePickerProps {
131
131
  disabled?: boolean | undefined;
132
132
  /** Hint under the trigger (e.g. "Up to 5 files, max 100MB each."). */
133
133
  helperText?: string | undefined;
134
- /** External error — wins over internal validation errors (form binding). */
134
+ /** External error. It wins over internal validation errors (form binding). */
135
135
  error?: React.ReactNode | undefined;
136
136
  labels?: Partial<FilePickerLabels> | undefined;
137
137
  /** Haptics for pick/remove (selection) and rejections (error). Pass false to disable. */
@@ -141,7 +141,7 @@ export interface FilePickerProps {
141
141
  onRemove?: ((file: FilePickerFile) => void) | undefined;
142
142
  /** Each rejection message (also shown as the field error). */
143
143
  onError?: ((message: string, file?: FilePickerFile) => void) | undefined;
144
- /** Tap on a file tile/row — wire previews (ImageGallery) here. */
144
+ /** Tap on a file tile/row: wire previews (ImageGallery) here. */
145
145
  onFilePress?: ((file: FilePickerFile) => void) | undefined;
146
146
  /** When set, files with `status 'error'` show a retry affordance that calls this. */
147
147
  onRetry?: ((file: FilePickerFile) => void) | undefined;
@@ -13,7 +13,7 @@ export interface ForceUpdateDialogProps {
13
13
  /** Called when the dialog is dismissed (only fired when `mandatory` is `false`). */
14
14
  onClose?: (() => void) | undefined;
15
15
  /**
16
- * If `true`, hides the "Later" action and disables backdrop dismissal —
16
+ * If `true`, hides the "Later" action and disables backdrop dismissal;
17
17
  * use this for major version bumps that must not be skipped.
18
18
  */
19
19
  mandatory?: boolean | undefined;
@@ -37,7 +37,7 @@ export interface ForceUpdateDialogProps {
37
37
  }
38
38
  /**
39
39
  * Drop-in update prompt that opens the App Store / Play Store on tap.
40
- * Pair this with `useVersionCheck()` — render it when `isUpdateRequired` is true.
40
+ * Pair this with `useVersionCheck()`: render it when `isUpdateRequired` is true.
41
41
  *
42
42
  * @example
43
43
  * const { isUpdateRequired, updateUrl } = useVersionCheck(isAppReady);
@@ -39,7 +39,7 @@ export interface FormFieldProps {
39
39
  /**
40
40
  * Style override for the wrapper View that hosts `children` (the input slot).
41
41
  * Useful for the `inline` layout when callers need to tweak the right-hand
42
- * column (e.g., set a max width, align differently). Additive only — the
42
+ * column (e.g., set a max width, align differently). Additive only; the
43
43
  * library's base style still applies underneath.
44
44
  */
45
45
  inputContainerStyle?: StyleProp<ViewStyle> | undefined;
@@ -28,7 +28,7 @@ export interface IconButtonProps {
28
28
  */
29
29
  iconVariant?: IconVariant | undefined;
30
30
  onPress?: ((e: GestureResponderEvent) => void) | undefined;
31
- /** Required — icon-only controls need an accessible name. */
31
+ /** Required: icon-only controls need an accessible name. */
32
32
  accessibilityLabel: string;
33
33
  /** Read after the name, never drawn: what the press does, for a control whose name alone is not enough. */
34
34
  accessibilityHint?: string | undefined;
@@ -38,7 +38,7 @@ export interface IconButtonProps {
38
38
  variant?: IconButtonVariant | undefined;
39
39
  size?: IconButtonSize | undefined;
40
40
  shape?: IconButtonShape | undefined;
41
- /** Selected/active — renders filled (solid) regardless of `variant` (e.g. an active nav tile). */
41
+ /** Selected/active: renders filled (solid) regardless of `variant` (e.g. an active nav tile). */
42
42
  active?: boolean | undefined;
43
43
  disabled?: boolean | undefined;
44
44
  loading?: boolean | undefined;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * ImageGallery — themed gallery built on top of Carousel.
2
+ * ImageGallery: themed gallery built on top of Carousel.
3
3
  *
4
4
  * Base view: a Carousel of cover-fitted images with optional thumbnails strip
5
5
  * and counter pill. Tapping an image opens a fullscreen Lightbox that re-uses
@@ -1,10 +1,10 @@
1
1
  /**
2
- * InlineSelect — a compact, borderless select trigger for inside other fields.
2
+ * InlineSelect: a compact, borderless select trigger for inside other fields.
3
3
  *
4
4
  * Renders just the selected label + chevron (no FieldBase box) and opens the
5
5
  * shared OptionSheet picker. Designed to live in Input's `leftIcon` /
6
- * `rightIcon` slots — currency prefix on an amount field, country code on a
7
- * phone field, unit suffix on a measurement — but works anywhere a bare
6
+ * `rightIcon` slots (currency prefix on an amount field, country code on a
7
+ * phone field, unit suffix on a measurement), but works anywhere a bare
8
8
  * dropdown trigger is needed (toolbars, list headers).
9
9
  *
10
10
  * Single-select only by design: a multi-select crammed into a field affix has
@@ -35,7 +35,7 @@ export interface InlineSelectLabels {
35
35
  }
36
36
  export declare const DEFAULT_INLINE_SELECT_LABELS: InlineSelectLabels;
37
37
  export interface InlineSelectProps<T = SelectOption> {
38
- /** Same contract as Select's `options` — `SelectOption` shape by default, accessors for anything else. */
38
+ /** Same contract as Select's `options`: `SelectOption` shape by default, accessors for anything else. */
39
39
  options: ReadonlyArray<T>;
40
40
  /** Defaults to the option's `label` field when it is a `SelectOption`. */
41
41
  getOptionLabel?: ((option: T) => string) | undefined;
@@ -82,7 +82,7 @@ export interface InlineSelectProps<T = SelectOption> {
82
82
  * (`text-disabled` when disabled).
83
83
  */
84
84
  color?: string | undefined;
85
- /** Chevron colour override — falls back to `color`'s resolution. */
85
+ /** Chevron colour override. Falls back to `color`'s resolution. */
86
86
  chevronColor?: string | undefined;
87
87
  /** Chevron size in pixels. Default: the field size's `icon`. */
88
88
  chevronSize?: number | undefined;
@@ -90,11 +90,11 @@ export interface InlineSelectProps<T = SelectOption> {
90
90
  style?: StyleProp<ViewStyle> | undefined;
91
91
  /** Style for every option row in the sheet (padding, background, …). */
92
92
  optionStyle?: StyleProp<ViewStyle> | undefined;
93
- /** Extra style for the selected option row — wins over `optionStyle` and the default selected fill. */
93
+ /** Extra style for the selected option row. It wins over `optionStyle` and the default selected fill. */
94
94
  selectedOptionStyle?: StyleProp<ViewStyle> | undefined;
95
95
  /** Style for every option's label text in the sheet. */
96
96
  optionTextStyle?: StyleProp<TextStyle> | undefined;
97
- /** Extra style for the selected option's label text — wins over `optionTextStyle` and the default selected colour. */
97
+ /** Extra style for the selected option's label text. It wins over `optionTextStyle` and the default selected colour. */
98
98
  selectedOptionTextStyle?: StyleProp<TextStyle> | undefined;
99
99
  accessibilityLabel?: string | undefined;
100
100
  testID?: string | undefined;
@@ -103,7 +103,7 @@ export interface InputProps extends Omit<TextInputProps, "style"> {
103
103
  /** Trailing slot; same contract as `leftIcon`. */
104
104
  rightIcon?: InputSlotIcon | undefined;
105
105
  /**
106
- * A fixed unit drawn after the value in the trailing slot — `'km'`, `'%'`,
106
+ * A fixed unit drawn after the value in the trailing slot: `'km'`, `'%'`,
107
107
  * `'/month'`. Same prop and same look as NumberInput's `unit`: the field's
108
108
  * font size in the placeholder colour, so it reads as part of the field
109
109
  * rather than of what was typed. Sits before `rightIcon` when both are set;
@@ -160,7 +160,7 @@ export interface InputProps extends Omit<TextInputProps, "style"> {
160
160
  */
161
161
  format?: ((raw: string) => string) | undefined;
162
162
  /**
163
- * Reverse of `format` — strips the formatted display back to the canonical
163
+ * Reverse of `format`: strips the formatted display back to the canonical
164
164
  * value the consumer wants in state. If omitted, defaults to identity.
165
165
  */
166
166
  parse?: ((formatted: string) => string) | undefined;
@@ -41,7 +41,7 @@ export interface ModalProps {
41
41
  restoreFocusRef?: React.RefObject<HostInstance | null> | undefined;
42
42
  /**
43
43
  * Fired once after the modal closes, MODAL_DISMISS_GRACE_MS after `open`
44
- * flips false — the earliest point it is safe to unmount the surrounding
44
+ * flips false, the earliest point it is safe to unmount the surrounding
45
45
  * tree (navigate away, flip auth state) without racing the native dismiss
46
46
  * on Android. Sequence follow-up work (or a follow-up modal) from here.
47
47
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * OptionSheet — the shared bottom-sheet option picker.
2
+ * OptionSheet: the shared bottom-sheet option picker.
3
3
  *
4
4
  * The picker behind Select and InlineSelect, exported so an app can open the
5
5
  * same sheet from its own trigger: a slide-up sheet built on the library
@@ -117,16 +117,16 @@ export interface OptionSheetProps<T = SelectOption> {
117
117
  /** Multi mode: checkboxes + Done footer instead of the selected dot. */
118
118
  multi?: boolean | undefined;
119
119
  searchable?: boolean | undefined;
120
- /** Caret/selection colour of the search input — callers mirror their focus colour. Default: `colors["focus-ring"]`. */
120
+ /** Caret/selection colour of the search input; callers mirror their focus colour. Default: `colors["focus-ring"]`. */
121
121
  searchSelectionColor?: string | undefined;
122
122
  accessibilityLabel?: string | undefined;
123
123
  /** Style for every option row container (padding, background, etc.). Wins over the row defaults. */
124
124
  optionStyle?: StyleProp<ViewStyle> | undefined;
125
- /** Extra style merged onto the selected option row — wins over `optionStyle` and the default selected fill. */
125
+ /** Extra style merged onto the selected option row. It wins over `optionStyle` and the default selected fill. */
126
126
  selectedOptionStyle?: StyleProp<ViewStyle> | undefined;
127
127
  /** Style for every option's label text. Wins over the label defaults. */
128
128
  optionTextStyle?: StyleProp<TextStyle> | undefined;
129
- /** Extra style merged onto the selected option's label text — wins over `optionTextStyle` and the default selected colour. */
129
+ /** Extra style merged onto the selected option's label text. It wins over `optionTextStyle` and the default selected colour. */
130
130
  selectedOptionTextStyle?: StyleProp<TextStyle> | undefined;
131
131
  /** The haptic for the sheet's own open and dismiss; false turns it off. Default: the Modal's default. */
132
132
  haptic?: HapticType | false | undefined;
@@ -80,7 +80,7 @@ export interface PhoneNumberInfo {
80
80
  /** Validity under the `validation` prop. */
81
81
  valid: boolean;
82
82
  }
83
- export interface PhoneNumberInputProps extends Pick<TextInputProps, "returnKeyType" | "submitBehavior" | "onSubmitEditing" | "blurOnSubmit"> {
83
+ export interface PhoneNumberInputProps extends Pick<TextInputProps, "returnKeyType" | "submitBehavior" | "onSubmitEditing"> {
84
84
  value?: PhoneNumberValue | undefined;
85
85
  /**
86
86
  * Controlled value as one E.164 string (`'+14155550123'`, `''` for empty),