@chem-po/react-native 0.0.30 → 0.0.31

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 (147) hide show
  1. package/lib/commonjs/components/button/DeleteButton.js +7 -8
  2. package/lib/commonjs/components/button/DeleteButton.js.map +1 -1
  3. package/lib/commonjs/components/button/LoadingButton.js +3 -3
  4. package/lib/commonjs/components/button/LoadingButton.js.map +1 -1
  5. package/lib/commonjs/components/button/Toggle.js +2 -1
  6. package/lib/commonjs/components/button/Toggle.js.map +1 -1
  7. package/lib/commonjs/components/form/Form.js +30 -4
  8. package/lib/commonjs/components/form/Form.js.map +1 -1
  9. package/lib/commonjs/components/form/FormFooter.js +3 -2
  10. package/lib/commonjs/components/form/FormFooter.js.map +1 -1
  11. package/lib/commonjs/components/form/input/Editable.js +4 -6
  12. package/lib/commonjs/components/form/input/Editable.js.map +1 -1
  13. package/lib/commonjs/components/form/input/common/InputClearButton.js +2 -1
  14. package/lib/commonjs/components/form/input/common/InputClearButton.js.map +1 -1
  15. package/lib/commonjs/components/form/input/date/index.js +23 -10
  16. package/lib/commonjs/components/form/input/date/index.js.map +1 -1
  17. package/lib/commonjs/components/form/input/datetime/index.js +27 -11
  18. package/lib/commonjs/components/form/input/datetime/index.js.map +1 -1
  19. package/lib/commonjs/components/form/input/file/index.js +27 -27
  20. package/lib/commonjs/components/form/input/file/index.js.map +1 -1
  21. package/lib/commonjs/components/form/input/hooks/useInputStyles.js +5 -6
  22. package/lib/commonjs/components/form/input/hooks/useInputStyles.js.map +1 -1
  23. package/lib/commonjs/components/form/input/input.js +3 -3
  24. package/lib/commonjs/components/form/input/input.js.map +1 -1
  25. package/lib/commonjs/components/form/input/multipleSelect/index.js +35 -23
  26. package/lib/commonjs/components/form/input/multipleSelect/index.js.map +1 -1
  27. package/lib/commonjs/components/form/input/socialMedia/index.js +3 -2
  28. package/lib/commonjs/components/form/input/socialMedia/index.js.map +1 -1
  29. package/lib/commonjs/components/form/input/text/AutoResizeTextarea.js +1 -6
  30. package/lib/commonjs/components/form/input/text/AutoResizeTextarea.js.map +1 -1
  31. package/lib/commonjs/components/form/input/text/index.js +2 -1
  32. package/lib/commonjs/components/form/input/text/index.js.map +1 -1
  33. package/lib/commonjs/components/form/input/text/textarea.js +2 -1
  34. package/lib/commonjs/components/form/input/text/textarea.js.map +1 -1
  35. package/lib/commonjs/components/form/input/text/useWebAutoResize.js +4 -4
  36. package/lib/commonjs/components/form/input/text/useWebAutoResize.js.map +1 -1
  37. package/lib/commonjs/components/form/input/time/index.js +2 -1
  38. package/lib/commonjs/components/form/input/time/index.js.map +1 -1
  39. package/lib/commonjs/components/form/view/select.js +6 -2
  40. package/lib/commonjs/components/form/view/select.js.map +1 -1
  41. package/lib/commonjs/components/image/ImageViewModal.js +18 -15
  42. package/lib/commonjs/components/image/ImageViewModal.js.map +1 -1
  43. package/lib/commonjs/components/layout/CollapseHorizontal.js +23 -11
  44. package/lib/commonjs/components/layout/CollapseHorizontal.js.map +1 -1
  45. package/lib/commonjs/components/loading/LoadingImage.js +20 -13
  46. package/lib/commonjs/components/loading/LoadingImage.js.map +1 -1
  47. package/lib/commonjs/components/theme/colorMode/DarkModeToggle.js +2 -1
  48. package/lib/commonjs/components/theme/colorMode/DarkModeToggle.js.map +1 -1
  49. package/lib/module/components/button/DeleteButton.js +8 -9
  50. package/lib/module/components/button/DeleteButton.js.map +1 -1
  51. package/lib/module/components/button/LoadingButton.js +4 -4
  52. package/lib/module/components/button/LoadingButton.js.map +1 -1
  53. package/lib/module/components/button/Toggle.js +3 -2
  54. package/lib/module/components/button/Toggle.js.map +1 -1
  55. package/lib/module/components/form/Form.js +31 -5
  56. package/lib/module/components/form/Form.js.map +1 -1
  57. package/lib/module/components/form/FormFooter.js +4 -3
  58. package/lib/module/components/form/FormFooter.js.map +1 -1
  59. package/lib/module/components/form/input/Editable.js +5 -7
  60. package/lib/module/components/form/input/Editable.js.map +1 -1
  61. package/lib/module/components/form/input/common/InputClearButton.js +3 -2
  62. package/lib/module/components/form/input/common/InputClearButton.js.map +1 -1
  63. package/lib/module/components/form/input/date/index.js +24 -11
  64. package/lib/module/components/form/input/date/index.js.map +1 -1
  65. package/lib/module/components/form/input/datetime/index.js +29 -13
  66. package/lib/module/components/form/input/datetime/index.js.map +1 -1
  67. package/lib/module/components/form/input/file/index.js +29 -29
  68. package/lib/module/components/form/input/file/index.js.map +1 -1
  69. package/lib/module/components/form/input/hooks/useInputStyles.js +5 -6
  70. package/lib/module/components/form/input/hooks/useInputStyles.js.map +1 -1
  71. package/lib/module/components/form/input/input.js +3 -3
  72. package/lib/module/components/form/input/input.js.map +1 -1
  73. package/lib/module/components/form/input/multipleSelect/index.js +35 -23
  74. package/lib/module/components/form/input/multipleSelect/index.js.map +1 -1
  75. package/lib/module/components/form/input/socialMedia/index.js +4 -3
  76. package/lib/module/components/form/input/socialMedia/index.js.map +1 -1
  77. package/lib/module/components/form/input/text/AutoResizeTextarea.js +1 -6
  78. package/lib/module/components/form/input/text/AutoResizeTextarea.js.map +1 -1
  79. package/lib/module/components/form/input/text/index.js +3 -2
  80. package/lib/module/components/form/input/text/index.js.map +1 -1
  81. package/lib/module/components/form/input/text/textarea.js +2 -1
  82. package/lib/module/components/form/input/text/textarea.js.map +1 -1
  83. package/lib/module/components/form/input/text/useWebAutoResize.js +4 -4
  84. package/lib/module/components/form/input/text/useWebAutoResize.js.map +1 -1
  85. package/lib/module/components/form/input/time/index.js +3 -2
  86. package/lib/module/components/form/input/time/index.js.map +1 -1
  87. package/lib/module/components/form/view/select.js +6 -2
  88. package/lib/module/components/form/view/select.js.map +1 -1
  89. package/lib/module/components/image/ImageViewModal.js +20 -17
  90. package/lib/module/components/image/ImageViewModal.js.map +1 -1
  91. package/lib/module/components/layout/CollapseHorizontal.js +24 -12
  92. package/lib/module/components/layout/CollapseHorizontal.js.map +1 -1
  93. package/lib/module/components/loading/LoadingImage.js +21 -14
  94. package/lib/module/components/loading/LoadingImage.js.map +1 -1
  95. package/lib/module/components/theme/colorMode/DarkModeToggle.js +3 -2
  96. package/lib/module/components/theme/colorMode/DarkModeToggle.js.map +1 -1
  97. package/lib/typescript/components/button/DeleteButton.d.ts.map +1 -1
  98. package/lib/typescript/components/button/LoadingButton.d.ts.map +1 -1
  99. package/lib/typescript/components/button/Toggle.d.ts.map +1 -1
  100. package/lib/typescript/components/form/Form.d.ts.map +1 -1
  101. package/lib/typescript/components/form/FormFooter.d.ts.map +1 -1
  102. package/lib/typescript/components/form/input/Editable.d.ts.map +1 -1
  103. package/lib/typescript/components/form/input/common/InputClearButton.d.ts.map +1 -1
  104. package/lib/typescript/components/form/input/date/index.d.ts.map +1 -1
  105. package/lib/typescript/components/form/input/datetime/index.d.ts.map +1 -1
  106. package/lib/typescript/components/form/input/file/index.d.ts +2 -1
  107. package/lib/typescript/components/form/input/file/index.d.ts.map +1 -1
  108. package/lib/typescript/components/form/input/hooks/useInputStyles.d.ts +3 -6
  109. package/lib/typescript/components/form/input/hooks/useInputStyles.d.ts.map +1 -1
  110. package/lib/typescript/components/form/input/multipleSelect/index.d.ts.map +1 -1
  111. package/lib/typescript/components/form/input/socialMedia/index.d.ts.map +1 -1
  112. package/lib/typescript/components/form/input/text/AutoResizeTextarea.d.ts.map +1 -1
  113. package/lib/typescript/components/form/input/text/index.d.ts.map +1 -1
  114. package/lib/typescript/components/form/input/text/useWebAutoResize.d.ts +2 -3
  115. package/lib/typescript/components/form/input/text/useWebAutoResize.d.ts.map +1 -1
  116. package/lib/typescript/components/form/input/time/index.d.ts.map +1 -1
  117. package/lib/typescript/components/form/view/select.d.ts.map +1 -1
  118. package/lib/typescript/components/image/ImageViewModal.d.ts.map +1 -1
  119. package/lib/typescript/components/layout/CollapseHorizontal.d.ts.map +1 -1
  120. package/lib/typescript/components/loading/LoadingImage.d.ts +4 -1
  121. package/lib/typescript/components/loading/LoadingImage.d.ts.map +1 -1
  122. package/lib/typescript/components/theme/colorMode/DarkModeToggle.d.ts.map +1 -1
  123. package/package.json +4 -4
  124. package/src/components/button/DeleteButton.tsx +12 -25
  125. package/src/components/button/LoadingButton.tsx +4 -5
  126. package/src/components/button/Toggle.tsx +4 -3
  127. package/src/components/form/Form.tsx +31 -11
  128. package/src/components/form/FormFooter.tsx +6 -5
  129. package/src/components/form/input/Editable.tsx +8 -9
  130. package/src/components/form/input/common/InputClearButton.tsx +4 -3
  131. package/src/components/form/input/date/index.tsx +24 -11
  132. package/src/components/form/input/datetime/index.tsx +33 -16
  133. package/src/components/form/input/file/index.tsx +34 -35
  134. package/src/components/form/input/hooks/useInputStyles.ts +10 -7
  135. package/src/components/form/input/input.tsx +2 -2
  136. package/src/components/form/input/multipleSelect/index.tsx +35 -35
  137. package/src/components/form/input/socialMedia/index.tsx +6 -5
  138. package/src/components/form/input/text/AutoResizeTextarea.tsx +1 -5
  139. package/src/components/form/input/text/index.tsx +4 -3
  140. package/src/components/form/input/text/textarea.tsx +1 -1
  141. package/src/components/form/input/text/useWebAutoResize.tsx +6 -4
  142. package/src/components/form/input/time/index.tsx +4 -3
  143. package/src/components/form/view/select.tsx +5 -1
  144. package/src/components/image/ImageViewModal.tsx +56 -50
  145. package/src/components/layout/CollapseHorizontal.tsx +20 -10
  146. package/src/components/loading/LoadingImage.tsx +19 -19
  147. package/src/components/theme/colorMode/DarkModeToggle.tsx +4 -3
@@ -3,13 +3,14 @@ import { FileField } from '@chem-po/react';
3
3
  import React from 'react';
4
4
  import { StyleProp, ViewStyle } from 'react-native';
5
5
  import { FieldProps } from '../../types';
6
- export declare const FileView: ({ value, hasUpload, imageOptions, withFullView, nonImageContainerStyle, withDownload, }: {
6
+ export declare const FileView: ({ value, hasUpload, imageOptions, withFullView, nonImageContainerStyle, withDownload, onUploadPress, }: {
7
7
  value?: FileValue | null;
8
8
  hasUpload?: boolean;
9
9
  imageOptions?: ImageViewOptions;
10
10
  withFullView?: boolean;
11
11
  nonImageContainerStyle?: StyleProp<ViewStyle>;
12
12
  withDownload?: boolean;
13
+ onUploadPress?: () => void;
13
14
  }) => React.JSX.Element;
14
15
  export declare const FileComponent: React.ForwardRefExoticComponent<FieldProps<FileField> & React.RefAttributes<InputRef>>;
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/file/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAkB,MAAM,eAAe,CAAA;AACrF,OAAO,EACL,SAAS,EAQV,MAAM,gBAAgB,CAAA;AAIvB,OAAO,KAA0E,MAAM,OAAO,CAAA;AAC9F,OAAO,EAAE,SAAS,EAA4C,SAAS,EAAE,MAAM,cAAc,CAAA;AAG7F,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA+BxC,eAAO,MAAM,QAAQ,GAAI,yFAOtB;IACD,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,gBAAgB,CAAA;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,sBAkFA,CAAA;AAED,eAAO,MAAM,aAAa,wFA2FzB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/file/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAkB,MAAM,eAAe,CAAA;AACrF,OAAO,EACL,SAAS,EAQV,MAAM,gBAAgB,CAAA;AAIvB,OAAO,KAAgE,MAAM,OAAO,CAAA;AACpF,OAAO,EAAE,SAAS,EAA0B,SAAS,EAAE,MAAM,cAAc,CAAA;AAI3E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA+BxC,eAAO,MAAM,QAAQ,GAAI,wGAQtB;IACD,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,gBAAgB,CAAA;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;CAC3B,sBAgFA,CAAA;AAED,eAAO,MAAM,aAAa,wFAyFzB,CAAA"}
@@ -12,18 +12,15 @@ export declare const inputStyles: {
12
12
  borderRadius: number;
13
13
  };
14
14
  inputSmall: {
15
- paddingVertical: number;
16
- paddingHorizontal: number;
15
+ padding: number;
17
16
  borderRadius: number;
18
17
  };
19
18
  inputMedium: {
20
- paddingVertical: number;
21
- paddingHorizontal: number;
19
+ padding: number;
22
20
  borderRadius: number;
23
21
  };
24
22
  inputLarge: {
25
- paddingVertical: number;
26
- paddingHorizontal: number;
23
+ padding: number;
27
24
  borderRadius: number;
28
25
  };
29
26
  inputTextSmall: {
@@ -1 +1 @@
1
- {"version":3,"file":"useInputStyles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/hooks/useInputStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGzC,OAAO,EAAE,SAAS,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE1E,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDtB,CAAA;AAsCF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAA;IACf,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CACtC;AACD,eAAO,MAAM,cAAc,GACzB,YAAY,OAAO,GAAG,SAAS,EAC/B,MAAM,SAAS,GAAG,SAAS,EAC3B,WAAU,SAAgB,KACzB,cAoBF,CAAA"}
1
+ {"version":3,"file":"useInputStyles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/hooks/useInputStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGzC,OAAO,EAAE,SAAS,EAAc,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE1E,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CtB,CAAA;AAsCF,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,SAAS,CAAA;IACf,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CACtC;AACD,eAAO,MAAM,cAAc,GACzB,YAAY,OAAO,GAAG,SAAS,EAC/B,MAAM,SAAS,GAAG,SAAS,EAC3B,WAAU,SAAgB,KACzB,cA0BF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/multipleSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA2B,MAAM,eAAe,CAAA;AACjE,OAAO,EACL,mBAAmB,EAQpB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,EAGZ,iBAAiB,EAIlB,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAGrE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAIxC,eAAO,MAAM,uBAAuB,GAAI,sBAGrC,iBAAiB,CAAC;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,CAAC,sBAQnE,CAAA;AAkJD,eAAO,MAAM,uBAAuB,kGAA0C,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/multipleSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAA2B,MAAM,eAAe,CAAA;AACjE,OAAO,EACL,mBAAmB,EAQpB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,EAGZ,iBAAiB,EAIlB,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAGrE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAIxC,eAAO,MAAM,uBAAuB,GAAI,sBAGrC,iBAAiB,CAAC;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,CAAC,sBAQnE,CAAA;AAoJD,eAAO,MAAM,uBAAuB,kGAA0C,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/socialMedia/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAoB,MAAM,eAAe,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAQN,MAAM,OAAO,CAAA;AAEd,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAiExC,eAAO,MAAM,oBAAoB,+FA+EhC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/socialMedia/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAoB,MAAM,eAAe,CAAA;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAQN,MAAM,OAAO,CAAA;AAGd,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAiExC,eAAO,MAAM,oBAAoB,+FA+EhC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AutoResizeTextarea.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/text/AutoResizeTextarea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAIpE,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,kBAAkB,kFAuB9B,CAAA"}
1
+ {"version":3,"file":"AutoResizeTextarea.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/text/AutoResizeTextarea.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAIpE,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,kBAAkB,kFAoB9B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,SAAS,EAAqC,MAAM,gBAAgB,CAAA;AAE7E,OAAO,KAA4D,MAAM,OAAO,CAAA;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAIxC,eAAO,MAAM,aAAa,wFAgEzB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/text/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,SAAS,EAAqC,MAAM,gBAAgB,CAAA;AAE7E,OAAO,KAA4D,MAAM,OAAO,CAAA;AAGhF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAIxC,eAAO,MAAM,aAAa,wFAgEzB,CAAA"}
@@ -1,8 +1,7 @@
1
1
  import { StyleProp, TextStyle } from 'react-native';
2
2
  export declare const useWebAutoResize: (onChangeText: ((e: string) => void) | undefined, style: StyleProp<TextStyle> | undefined) => {
3
- getWebTextHeight: (text: string, spanRef: React.RefObject<HTMLSpanElement | null>) => number | null;
4
3
  handleChange: ((e: string) => void) | undefined;
5
- height: number;
6
- setHeight: import("react").Dispatch<import("react").SetStateAction<number>>;
4
+ height: number | "auto";
5
+ setHeight: import("react").Dispatch<import("react").SetStateAction<number | "auto">>;
7
6
  };
8
7
  //# sourceMappingURL=useWebAutoResize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWebAutoResize.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/text/useWebAutoResize.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAA;AAmCzE,eAAO,MAAM,gBAAgB,GAC3B,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,EAC/C,OAAO,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS;6BAlCT,MAAM,WAAW,KAAK,CAAC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC;uBAiCnE,MAAM,KAAK,IAAI;;;CAiCnC,CAAA"}
1
+ {"version":3,"file":"useWebAutoResize.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/text/useWebAutoResize.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAA;AAmCzE,eAAO,MAAM,gBAAgB,GAC3B,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,EAC/C,OAAO,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS;uBADpB,MAAM,KAAK,IAAI;;;CAmCnC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/time/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAgB,MAAM,gBAAgB,CAAA;AAExD,OAAO,KAA6D,MAAM,OAAO,CAAA;AAIjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKxC,eAAO,MAAM,SAAS,wFA6FrB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/form/input/time/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAY,MAAM,eAAe,CAAA;AAClD,OAAO,EAAE,SAAS,EAAgB,MAAM,gBAAgB,CAAA;AAExD,OAAO,KAA6D,MAAM,OAAO,CAAA;AAKjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAKxC,eAAO,MAAM,SAAS,wFA6FrB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/view/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACpF,OAAO,EAAE,WAAW,EAAqC,MAAM,gBAAgB,CAAA;AAC/E,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAA0B,SAAS,EAAE,MAAM,cAAc,CAAA;AAiBhE,eAAO,MAAM,mBAAmB,GAC9B,KAAK,GAAG,MAAM,EACd,MAAM,SAAS,gBAAgB,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,EAChE,aAEC,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,sBAExC,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,+DAO7B;IACD,KAAK,EAAE,WAAW,CAAA;IAClB,KAAK,EAAE,GAAG,CAAA;IACV,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,sBA2BA,CAAA"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/view/select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AACpF,OAAO,EAAE,WAAW,EAAqC,MAAM,gBAAgB,CAAA;AAC/E,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAA0B,SAAS,EAAE,MAAM,cAAc,CAAA;AAiBhE,eAAO,MAAM,mBAAmB,GAC9B,KAAK,GAAG,MAAM,EACd,MAAM,SAAS,gBAAgB,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,EAChE,aAEC,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,sBAMxC,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,+DAO7B;IACD,KAAK,EAAE,WAAW,CAAA;IAClB,KAAK,EAAE,GAAG,CAAA;IACV,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,sBA2BA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ImageViewModal.d.ts","sourceRoot":"","sources":["../../../../src/components/image/ImageViewModal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAOxE,UAAU,mBAAmB;IAC3B,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4OxD,CAAA"}
1
+ {"version":3,"file":"ImageViewModal.d.ts","sourceRoot":"","sources":["../../../../src/components/image/ImageViewModal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAYxE,UAAU,mBAAmB;IAC3B,MAAM,EAAE,OAAO,CAAA;IACf,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4OxD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"CollapseHorizontal.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/CollapseHorizontal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAqB,SAAS,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAA;AAQ5E,eAAO,MAAM,kBAAkB,GAAI,0CAKhC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,EAAE,EAAE,OAAO,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,sBA8DA,CAAA"}
1
+ {"version":3,"file":"CollapseHorizontal.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/CollapseHorizontal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAA;AAC7E,OAAO,EAAqB,SAAS,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAA;AAQ5E,eAAO,MAAM,kBAAkB,GAAI,0CAKhC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,EAAE,EAAE,OAAO,CAAA;IACX,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,sBAwEA,CAAA"}
@@ -3,7 +3,10 @@ import { DimensionValue, ViewStyle } from 'react-native';
3
3
  export interface LoadingImageProps {
4
4
  src?: string | null;
5
5
  loadingOverride?: boolean;
6
- onLoad?: (e: any) => void;
6
+ onLoad?: (dims: {
7
+ width: number;
8
+ height: number;
9
+ }) => void;
7
10
  filename?: string;
8
11
  fileType?: string;
9
12
  withFullView?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingImage.d.ts","sourceRoot":"","sources":["../../../../src/components/loading/LoadingImage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAChF,OAAO,EAAE,cAAc,EAA6C,SAAS,EAAE,MAAM,cAAc,CAAA;AAInG,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAKD,eAAO,MAAM,YAAY,GAAI,yHAY1B,iBAAiB,sBA4FnB,CAAA"}
1
+ {"version":3,"file":"LoadingImage.d.ts","sourceRoot":"","sources":["../../../../src/components/loading/LoadingImage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAChF,OAAO,EAAE,cAAc,EAA2B,SAAS,EAAE,MAAM,cAAc,CAAA;AAKjF,MAAM,WAAW,iBAAiB;IAChC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAKD,eAAO,MAAM,YAAY,GAAI,yHAY1B,iBAAiB,sBA2FnB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"DarkModeToggle.d.ts","sourceRoot":"","sources":["../../../../../src/components/theme/colorMode/DarkModeToggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,eAAO,MAAM,cAAc,yBAmB1B,CAAA;AAED,eAAO,MAAM,sBAAsB,yBAIlC,CAAA"}
1
+ {"version":3,"file":"DarkModeToggle.d.ts","sourceRoot":"","sources":["../../../../../src/components/theme/colorMode/DarkModeToggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,eAAO,MAAM,cAAc,yBAmB1B,CAAA;AAED,eAAO,MAAM,sBAAsB,yBAIlC,CAAA"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@chem-po/react-native",
3
3
  "author": "Elan Canfield",
4
4
  "license": "MIT",
5
- "version": "0.0.30",
5
+ "version": "0.0.31",
6
6
  "main": "lib/commonjs/index.js",
7
7
  "types": "lib/typescript/index.d.ts",
8
8
  "source": "src/index.ts",
@@ -51,8 +51,8 @@
51
51
  "react-native-paper-dates": "^0.22.42",
52
52
  "react-native-svg": "15.11.2",
53
53
  "zustand": "^4.3.3",
54
- "@chem-po/core": "0.0.30",
55
- "@chem-po/react": "0.0.30"
54
+ "@chem-po/core": "0.0.31",
55
+ "@chem-po/react": "0.0.31"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@babel/core": "^7.26.0",
@@ -68,7 +68,7 @@
68
68
  "vite": "^6.2.2"
69
69
  },
70
70
  "peerDependencies": {
71
- "expo": "~53.0.11",
71
+ "expo": "~53.0.22",
72
72
  "react": "19.0.0",
73
73
  "react-dom": "19.0.0",
74
74
  "react-native": "0.79.4"
@@ -1,16 +1,8 @@
1
1
  import { useToast } from '@chem-po/react'
2
2
  import { Ionicons } from '@expo/vector-icons'
3
3
  import React, { ReactNode, useCallback, useEffect, useRef, useState } from 'react'
4
- import {
5
- ActivityIndicator,
6
- Animated,
7
- Modal,
8
- StyleSheet,
9
- Text,
10
- TouchableOpacity,
11
- View,
12
- ViewStyle,
13
- } from 'react-native'
4
+ import { ActivityIndicator, Animated, Modal, StyleSheet, Text, View, ViewStyle } from 'react-native'
5
+ import { Pressable } from 'react-native-gesture-handler'
14
6
  import { Txt } from '../text/Txt'
15
7
 
16
8
  const defaultAlertBodyText = "Are you sure? You can't undo this action afterwards."
@@ -45,19 +37,16 @@ export const DeleteConfirmAlert = ({
45
37
  </Txt>
46
38
  {typeof body === 'string' ? <Txt style={styles.alertBody}>{body}</Txt> : body}
47
39
  <View style={styles.buttonContainer}>
48
- <TouchableOpacity style={styles.cancelButton} onPress={onCancel}>
40
+ <Pressable style={styles.cancelButton} onPress={onCancel}>
49
41
  <Txt style={styles.cancelText}>Cancel</Txt>
50
- </TouchableOpacity>
51
- <TouchableOpacity
52
- style={styles.confirmButton}
53
- onPress={onConfirm}
54
- disabled={actionLoading}>
42
+ </Pressable>
43
+ <Pressable style={styles.confirmButton} onPress={onConfirm} disabled={actionLoading}>
55
44
  {actionLoading ? (
56
45
  <ActivityIndicator color="#fff" />
57
46
  ) : (
58
47
  <Txt style={[styles.buttonText, styles.confirmButtonText]}>{actionName}</Txt>
59
48
  )}
60
- </TouchableOpacity>
49
+ </Pressable>
61
50
  </View>
62
51
  </View>
63
52
  </View>
@@ -132,10 +121,9 @@ export const DeleteButton: React.FC<{
132
121
  return (
133
122
  <>
134
123
  {text ? (
135
- <TouchableOpacity
124
+ <Pressable
136
125
  style={[styles.button, style]}
137
- onPress={e => {
138
- e.stopPropagation()
126
+ onPress={() => {
139
127
  if (noConfirm) handleDelete()
140
128
  else setConfirmActive(true)
141
129
  }}
@@ -150,12 +138,11 @@ export const DeleteButton: React.FC<{
150
138
  <ActivityIndicator color="#ff0000" size="small" />
151
139
  </Animated.View>
152
140
  </View>
153
- </TouchableOpacity>
141
+ </Pressable>
154
142
  ) : (
155
- <TouchableOpacity
143
+ <Pressable
156
144
  style={[styles.iconButton, style]}
157
- onPress={e => {
158
- e.stopPropagation()
145
+ onPress={() => {
159
146
  if (noConfirm) handleDelete()
160
147
  else setConfirmActive(true)
161
148
  }}
@@ -169,7 +156,7 @@ export const DeleteButton: React.FC<{
169
156
  <ActivityIndicator color="#ff0000" size="small" />
170
157
  </Animated.View>
171
158
  </View>
172
- </TouchableOpacity>
159
+ </Pressable>
173
160
  )}
174
161
  {noConfirm ? null : (
175
162
  <DeleteConfirmAlert
@@ -7,10 +7,10 @@ import {
7
7
  StyleSheet,
8
8
  Text,
9
9
  TextStyle,
10
- TouchableOpacity,
11
10
  View,
12
11
  ViewStyle,
13
12
  } from 'react-native'
13
+ import { Pressable } from 'react-native-gesture-handler'
14
14
 
15
15
  export interface LoadingButtonProps {
16
16
  onPress: (() => Promise<any>) | (() => void)
@@ -89,14 +89,13 @@ export const LoadingButton: React.FC<LoadingButtonProps> = ({
89
89
  const fallbackColor = useTextColor()
90
90
  const color = useMemo(() => colorProp ?? fallbackColor, [colorProp, fallbackColor])
91
91
  return (
92
- <TouchableOpacity
92
+ <Pressable
93
93
  style={[
94
94
  styles.button,
95
95
  { borderColor: color, backgroundColor: disabled ? '#f0f0f0' : 'transparent' },
96
96
  style,
97
97
  ]}
98
- onPress={e => {
99
- e.stopPropagation()
98
+ onPress={() => {
100
99
  handlePress()
101
100
  }}
102
101
  disabled={loading || disabled}>
@@ -119,7 +118,7 @@ export const LoadingButton: React.FC<LoadingButtonProps> = ({
119
118
  <ActivityIndicator color={color} size="small" />
120
119
  </Animated.View>
121
120
  </View>
122
- </TouchableOpacity>
121
+ </Pressable>
123
122
  )
124
123
  }
125
124
 
@@ -1,6 +1,7 @@
1
1
  import { useBackgroundColor, useBorderColor, useThemeValue, useToast } from '@chem-po/react'
2
2
  import React, { JSX, useCallback, useMemo } from 'react'
3
- import { StyleProp, StyleSheet, TouchableOpacity, View, ViewStyle } from 'react-native'
3
+ import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native'
4
+ import { Pressable } from 'react-native-gesture-handler'
4
5
 
5
6
  export interface ToggleOption<Option extends string = string> {
6
7
  id: Option
@@ -43,7 +44,7 @@ const ToggleButton = <Option extends string>({
43
44
  const [width, height] = useMemo(() => (typeof size === 'number' ? [size, size] : size), [size])
44
45
  const body = (
45
46
  <View style={[styles.buttonContainer, { width, height, opacity: !disabledMessage ? 1 : 0.6 }]}>
46
- <TouchableOpacity
47
+ <Pressable
47
48
  style={[
48
49
  styles.button,
49
50
  {
@@ -55,7 +56,7 @@ const ToggleButton = <Option extends string>({
55
56
  onPress={handlePress}
56
57
  disabled={!!disabledMessage}>
57
58
  {Render(selected)}
58
- </TouchableOpacity>
59
+ </Pressable>
59
60
  </View>
60
61
  )
61
62
 
@@ -20,7 +20,8 @@ import {
20
20
  } from '@chem-po/react'
21
21
  import React, { FC, useMemo, useState } from 'react'
22
22
  import { useFieldArray, useFormContext } from 'react-hook-form'
23
- import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
23
+ import { StyleSheet, Text, View } from 'react-native'
24
+ import { Pressable } from 'react-native-gesture-handler'
24
25
  import { Expandable } from '../box/Expandable'
25
26
  import { DeleteButton } from '../button/DeleteButton'
26
27
  import { Condition } from './Condition'
@@ -108,6 +109,27 @@ const styles = StyleSheet.create({
108
109
  paddingHorizontal: 16,
109
110
  paddingVertical: 8,
110
111
  },
112
+ submitButton: {
113
+ paddingVertical: 10,
114
+ paddingHorizontal: 20,
115
+ borderRadius: 8,
116
+ alignItems: 'center',
117
+ justifyContent: 'center',
118
+ },
119
+ submitButtonText: {
120
+ fontSize: 16,
121
+ fontWeight: 'bold',
122
+ },
123
+ editButtonText: {
124
+ fontSize: 16,
125
+ fontWeight: 'bold',
126
+ color: '#4a5568',
127
+ },
128
+ cancelButtonText: {
129
+ fontSize: 16,
130
+ fontWeight: 'bold',
131
+ color: '#4a5568',
132
+ },
111
133
  })
112
134
 
113
135
  export const ListFieldInput: FC<{
@@ -150,11 +172,11 @@ export const ListFieldInput: FC<{
150
172
  <Text style={styles.emptyListText}>No items</Text>
151
173
  )}
152
174
  </View>
153
- <TouchableOpacity
175
+ <Pressable
154
176
  style={[styles.newButton, { backgroundColor: buttonColor }]}
155
177
  onPress={() => append(emptyData)}>
156
178
  <Text style={styles.newButtonText}>+ NEW</Text>
157
- </TouchableOpacity>
179
+ </Pressable>
158
180
  </View>
159
181
  )
160
182
  }
@@ -306,15 +328,13 @@ export const DataView = ({
306
328
  <Text style={styles.dataViewTitle}>{fieldName}</Text>
307
329
  <View style={styles.dataViewActions}>
308
330
  {onDelete && <DeleteButton onDelete={onDelete} itemName={itemName ?? 'item'} />}
309
- {onSubmit && (
310
- <TouchableOpacity onPress={() => setIsEditing(true)}>
311
- <Text>Edit</Text>
312
- </TouchableOpacity>
313
- )}
331
+ <Pressable onPress={() => setIsEditing(true)}>
332
+ <Text style={styles.editButtonText}>Edit</Text>
333
+ </Pressable>
314
334
  {onClose && (
315
- <TouchableOpacity onPress={onClose}>
316
- <Text>Close</Text>
317
- </TouchableOpacity>
335
+ <Pressable onPress={onClose}>
336
+ <Text style={styles.cancelButtonText}>Cancel</Text>
337
+ </Pressable>
318
338
  )}
319
339
  </View>
320
340
  </View>
@@ -7,7 +7,8 @@ import {
7
7
  } from '@chem-po/react'
8
8
  import React, { FC, PropsWithChildren, useEffect, useMemo, useRef } from 'react'
9
9
  import { useFormContext, useFormState } from 'react-hook-form'
10
- import { ActivityIndicator, Animated, StyleSheet, Text, TouchableOpacity, View } from 'react-native'
10
+ import { ActivityIndicator, Animated, StyleSheet, Text, View } from 'react-native'
11
+ import { Pressable } from 'react-native-gesture-handler'
11
12
  import { UploadProgress } from './UploadProgress'
12
13
 
13
14
  const buttonTextColor = '#ffffff'
@@ -75,12 +76,12 @@ const CancelButton = ({
75
76
  const placeholderColor = usePlaceholderColor()
76
77
  const borderColor = useBorderColor()
77
78
  return (
78
- <TouchableOpacity
79
+ <Pressable
79
80
  disabled={submitting}
80
81
  style={[styles.cancelButton, { borderColor }]}
81
82
  onPress={onBack}>
82
83
  <Text style={[styles.cancelButtonText, { color: placeholderColor }]}>{children}</Text>
83
- </TouchableOpacity>
84
+ </Pressable>
84
85
  )
85
86
  }
86
87
 
@@ -109,7 +110,7 @@ export const SubmitButton: FC<
109
110
  styles.submitButtonContainer,
110
111
  { opacity: animatedOpacity, backgroundColor: buttonBg },
111
112
  ]}>
112
- <TouchableOpacity
113
+ <Pressable
113
114
  style={styles.submitButton}
114
115
  onPress={() => {
115
116
  onSubmitClick()
@@ -120,7 +121,7 @@ export const SubmitButton: FC<
120
121
  ) : (
121
122
  <Text style={[styles.submitButtonText, { textShadowColor }]}>{children}</Text>
122
123
  )}
123
- </TouchableOpacity>
124
+ </Pressable>
124
125
  </Animated.View>
125
126
  )
126
127
  }
@@ -10,7 +10,8 @@ import {
10
10
  } from '@chem-po/react'
11
11
  import { Ionicons } from '@expo/vector-icons'
12
12
  import React, { ForwardedRef, useCallback, useEffect, useMemo } from 'react'
13
- import { StyleSheet, TextStyle, TouchableOpacity, View, ViewStyle } from 'react-native'
13
+ import { StyleSheet, TextStyle, View, ViewStyle } from 'react-native'
14
+ import { Pressable } from 'react-native-gesture-handler'
14
15
  import { CustomInputProps } from '../../../types/forms'
15
16
  import { CollapseHorizontal } from '../../layout/CollapseHorizontal'
16
17
  import { LoadingOverlay } from '../../loading/LoadingOverlay'
@@ -95,8 +96,6 @@ export const Editable = <T extends Field>({
95
96
  [CustomView, field],
96
97
  )
97
98
 
98
- console.log({ isEditing })
99
-
100
99
  return (
101
100
  <View style={[styles.container, containerStyle]}>
102
101
  <View style={styles.contentContainer}>
@@ -124,7 +123,7 @@ export const Editable = <T extends Field>({
124
123
  {!alwaysEditing && (
125
124
  <View style={styles.buttonsContainer}>
126
125
  <CollapseHorizontal in={!isEditing}>
127
- <TouchableOpacity
126
+ <Pressable
128
127
  onPress={() => {
129
128
  handleEditOpen()
130
129
  }}
@@ -132,10 +131,10 @@ export const Editable = <T extends Field>({
132
131
  onPressIn={() => setEditHovered(true)}
133
132
  onPressOut={() => setEditHovered(false)}>
134
133
  <Ionicons name="create-outline" size={20} color={iconColor} />
135
- </TouchableOpacity>
134
+ </Pressable>
136
135
  </CollapseHorizontal>
137
136
  <CollapseHorizontal in={isEditing} style={styles.submitButtonContainer}>
138
- <TouchableOpacity
137
+ <Pressable
139
138
  onPress={() => {
140
139
  handleEditClose()
141
140
  }}
@@ -143,14 +142,14 @@ export const Editable = <T extends Field>({
143
142
  onPressIn={() => setEditHovered(true)}
144
143
  onPressOut={() => setEditHovered(false)}>
145
144
  <Ionicons name="close" size={20} color={iconColor} />
146
- </TouchableOpacity>
147
- <TouchableOpacity
145
+ </Pressable>
146
+ <Pressable
148
147
  style={[styles.submitButton, { backgroundColor: submitColor }]}
149
148
  onPress={() => {
150
149
  submit()
151
150
  }}>
152
151
  <Ionicons name="checkmark" size={20} color="#fff" />
153
- </TouchableOpacity>
152
+ </Pressable>
154
153
  </CollapseHorizontal>
155
154
  </View>
156
155
  )}
@@ -1,7 +1,8 @@
1
1
  import { useBackgroundColor, useBorderColor, useIconColor } from '@chem-po/react'
2
2
  import { Ionicons } from '@expo/vector-icons'
3
3
  import React from 'react'
4
- import { StyleSheet, TouchableOpacity } from 'react-native'
4
+ import { StyleSheet } from 'react-native'
5
+ import { Pressable } from 'react-native-gesture-handler'
5
6
 
6
7
  export const InputClearButton = ({
7
8
  onPress,
@@ -18,7 +19,7 @@ export const InputClearButton = ({
18
19
  const borderColor = useBorderColor()
19
20
  const backgroundColor = useBackgroundColor(100)
20
21
  return (
21
- <TouchableOpacity
22
+ <Pressable
22
23
  onPress={onPress}
23
24
  style={[
24
25
  styles.closeButton,
@@ -27,7 +28,7 @@ export const InputClearButton = ({
27
28
  hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
28
29
  disabled={!isActive}>
29
30
  <Ionicons name="close" size={size} color={iconColor} style={{ alignSelf: 'center' }} />
30
- </TouchableOpacity>
31
+ </Pressable>
31
32
  )
32
33
  }
33
34
 
@@ -2,9 +2,11 @@ import { getDateString, InputRef } from '@chem-po/core'
2
2
  import { DateField, useIconColor } from '@chem-po/react'
3
3
  import { Ionicons } from '@expo/vector-icons'
4
4
  import React, { forwardRef, useImperativeHandle, useMemo } from 'react'
5
- import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
5
+ import { StyleSheet, Text, View } from 'react-native'
6
+ import { Gesture, GestureDetector } from 'react-native-gesture-handler'
6
7
  import { Portal } from 'react-native-paper'
7
8
  import { DatePickerModal } from 'react-native-paper-dates'
9
+ import { runOnJS } from 'react-native-reanimated'
8
10
  import { FieldProps } from '../../types'
9
11
  import { DateInputClearButton } from '../common/InputClearButton'
10
12
  import { useInputColor } from '../hooks/useInputColor'
@@ -46,24 +48,28 @@ export const DateInput = forwardRef<InputRef, FieldProps<DateField>>(
46
48
  },
47
49
  }))
48
50
 
49
- const showDialog = () => {
50
- onFocus()
51
- }
52
-
53
51
  const iconColor = useIconColor()
54
52
  const inputColor = useInputColor(value)
55
53
 
56
54
  const minDateObj = minDate === 'now' ? new Date() : minDate ? new Date(minDate) : undefined
57
55
  const maxDateObj = maxDate === 'now' ? new Date() : maxDate ? new Date(maxDate) : undefined
58
56
 
57
+ const mainTap = Gesture.Tap().onStart(() => {
58
+ runOnJS(onFocus)()
59
+ })
60
+
59
61
  return (
60
62
  <View style={styles.container}>
61
- <TouchableOpacity style={[styles.button, inputStyles]} onPress={showDialog}>
62
- <Text style={[styles.text, text, { color: inputColor }]}>
63
- {value ? getDateString(value, 'short') : placeholder}
64
- </Text>
63
+ <View style={[styles.button, inputStyles]}>
64
+ <GestureDetector gesture={mainTap}>
65
+ <View style={styles.textContainer}>
66
+ <Text numberOfLines={1} style={[styles.text, text, { color: inputColor }]}>
67
+ {value ? getDateString(value, 'short') : placeholder}
68
+ </Text>
69
+ <Ionicons name="calendar" size={iconSize} color={iconColor} />
70
+ </View>
71
+ </GestureDetector>
65
72
  <View style={buttonContainer}>
66
- <Ionicons name="calendar" size={iconSize} color={iconColor} />
67
73
  {optional && value ? (
68
74
  <DateInputClearButton
69
75
  size={clearButtonSize}
@@ -72,7 +78,7 @@ export const DateInput = forwardRef<InputRef, FieldProps<DateField>>(
72
78
  />
73
79
  ) : null}
74
80
  </View>
75
- </TouchableOpacity>
81
+ </View>
76
82
  <Portal>
77
83
  <DatePickerModal
78
84
  locale="en"
@@ -104,8 +110,15 @@ const styles = StyleSheet.create({
104
110
  flexDirection: 'row',
105
111
  alignItems: 'center',
106
112
  justifyContent: 'space-between',
113
+ gap: 8,
107
114
  width: '100%',
108
115
  },
116
+ textContainer: {
117
+ flex: 1,
118
+ flexDirection: 'row',
119
+ alignItems: 'center',
120
+ gap: 8,
121
+ },
109
122
  text: {
110
123
  flex: 1,
111
124
  },