react-native-timer-picker 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/README.md +22 -13
  2. package/package.json +143 -126
  3. package/dist/commonjs/components/DurationScroll/DurationScroll.js +0 -405
  4. package/dist/commonjs/components/DurationScroll/DurationScroll.js.map +0 -1
  5. package/dist/commonjs/components/DurationScroll/index.js +0 -27
  6. package/dist/commonjs/components/DurationScroll/index.js.map +0 -1
  7. package/dist/commonjs/components/DurationScroll/types.js +0 -6
  8. package/dist/commonjs/components/DurationScroll/types.js.map +0 -1
  9. package/dist/commonjs/components/Modal/Modal.js +0 -107
  10. package/dist/commonjs/components/Modal/Modal.js.map +0 -1
  11. package/dist/commonjs/components/Modal/index.js +0 -27
  12. package/dist/commonjs/components/Modal/index.js.map +0 -1
  13. package/dist/commonjs/components/Modal/styles.js +0 -25
  14. package/dist/commonjs/components/Modal/styles.js.map +0 -1
  15. package/dist/commonjs/components/Modal/types.js +0 -6
  16. package/dist/commonjs/components/Modal/types.js.map +0 -1
  17. package/dist/commonjs/components/PickerItem/PickerItem.js +0 -47
  18. package/dist/commonjs/components/PickerItem/PickerItem.js.map +0 -1
  19. package/dist/commonjs/components/PickerItem/index.js +0 -14
  20. package/dist/commonjs/components/PickerItem/index.js.map +0 -1
  21. package/dist/commonjs/components/TimerPicker/TimerPicker.js +0 -240
  22. package/dist/commonjs/components/TimerPicker/TimerPicker.js.map +0 -1
  23. package/dist/commonjs/components/TimerPicker/index.js +0 -39
  24. package/dist/commonjs/components/TimerPicker/index.js.map +0 -1
  25. package/dist/commonjs/components/TimerPicker/styles.js +0 -130
  26. package/dist/commonjs/components/TimerPicker/styles.js.map +0 -1
  27. package/dist/commonjs/components/TimerPicker/types.js +0 -6
  28. package/dist/commonjs/components/TimerPicker/types.js.map +0 -1
  29. package/dist/commonjs/components/TimerPickerModal/TimerPickerModal.js +0 -153
  30. package/dist/commonjs/components/TimerPickerModal/TimerPickerModal.js.map +0 -1
  31. package/dist/commonjs/components/TimerPickerModal/index.js +0 -39
  32. package/dist/commonjs/components/TimerPickerModal/index.js.map +0 -1
  33. package/dist/commonjs/components/TimerPickerModal/styles.js +0 -89
  34. package/dist/commonjs/components/TimerPickerModal/styles.js.map +0 -1
  35. package/dist/commonjs/components/TimerPickerModal/types.js +0 -6
  36. package/dist/commonjs/components/TimerPickerModal/types.js.map +0 -1
  37. package/dist/commonjs/index.js +0 -57
  38. package/dist/commonjs/index.js.map +0 -1
  39. package/dist/commonjs/tests/DurationScroll.test.js +0 -163
  40. package/dist/commonjs/tests/DurationScroll.test.js.map +0 -1
  41. package/dist/commonjs/tests/Modal.test.js +0 -99
  42. package/dist/commonjs/tests/Modal.test.js.map +0 -1
  43. package/dist/commonjs/tests/TimerPicker.test.js +0 -169
  44. package/dist/commonjs/tests/TimerPicker.test.js.map +0 -1
  45. package/dist/commonjs/tests/TimerPickerModal.test.js +0 -276
  46. package/dist/commonjs/tests/TimerPickerModal.test.js.map +0 -1
  47. package/dist/commonjs/tests/colorToRgba.test.js +0 -176
  48. package/dist/commonjs/tests/colorToRgba.test.js.map +0 -1
  49. package/dist/commonjs/tests/generateNumbers.test.js +0 -350
  50. package/dist/commonjs/tests/generateNumbers.test.js.map +0 -1
  51. package/dist/commonjs/tests/getAdjustedLimit.test.js +0 -324
  52. package/dist/commonjs/tests/getAdjustedLimit.test.js.map +0 -1
  53. package/dist/commonjs/tests/getDurationAndIndexFromScrollOffset.test.js +0 -424
  54. package/dist/commonjs/tests/getDurationAndIndexFromScrollOffset.test.js.map +0 -1
  55. package/dist/commonjs/tests/getInitialScrollIndex.test.js +0 -396
  56. package/dist/commonjs/tests/getInitialScrollIndex.test.js.map +0 -1
  57. package/dist/commonjs/tests/getSafeInitialValue.test.js +0 -497
  58. package/dist/commonjs/tests/getSafeInitialValue.test.js.map +0 -1
  59. package/dist/commonjs/tests/padNumber.test.js +0 -301
  60. package/dist/commonjs/tests/padNumber.test.js.map +0 -1
  61. package/dist/commonjs/utils/colorToRgba.js +0 -87
  62. package/dist/commonjs/utils/colorToRgba.js.map +0 -1
  63. package/dist/commonjs/utils/generateNumbers.js +0 -124
  64. package/dist/commonjs/utils/generateNumbers.js.map +0 -1
  65. package/dist/commonjs/utils/getAdjustedLimit.js +0 -58
  66. package/dist/commonjs/utils/getAdjustedLimit.js.map +0 -1
  67. package/dist/commonjs/utils/getDurationAndIndexFromScrollOffset.js +0 -62
  68. package/dist/commonjs/utils/getDurationAndIndexFromScrollOffset.js.map +0 -1
  69. package/dist/commonjs/utils/getInitialScrollIndex.js +0 -57
  70. package/dist/commonjs/utils/getInitialScrollIndex.js.map +0 -1
  71. package/dist/commonjs/utils/getSafeInitialValue.js +0 -41
  72. package/dist/commonjs/utils/getSafeInitialValue.js.map +0 -1
  73. package/dist/commonjs/utils/padNumber.js +0 -40
  74. package/dist/commonjs/utils/padNumber.js.map +0 -1
  75. package/dist/module/components/DurationScroll/DurationScroll.js +0 -397
  76. package/dist/module/components/DurationScroll/DurationScroll.js.map +0 -1
  77. package/dist/module/components/DurationScroll/index.js +0 -3
  78. package/dist/module/components/DurationScroll/index.js.map +0 -1
  79. package/dist/module/components/DurationScroll/types.js +0 -2
  80. package/dist/module/components/DurationScroll/types.js.map +0 -1
  81. package/dist/module/components/Modal/Modal.js +0 -99
  82. package/dist/module/components/Modal/Modal.js.map +0 -1
  83. package/dist/module/components/Modal/index.js +0 -3
  84. package/dist/module/components/Modal/index.js.map +0 -1
  85. package/dist/module/components/Modal/styles.js +0 -19
  86. package/dist/module/components/Modal/styles.js.map +0 -1
  87. package/dist/module/components/Modal/types.js +0 -2
  88. package/dist/module/components/Modal/types.js.map +0 -1
  89. package/dist/module/components/PickerItem/PickerItem.js +0 -40
  90. package/dist/module/components/PickerItem/PickerItem.js.map +0 -1
  91. package/dist/module/components/PickerItem/index.js +0 -2
  92. package/dist/module/components/PickerItem/index.js.map +0 -1
  93. package/dist/module/components/TimerPicker/TimerPicker.js +0 -232
  94. package/dist/module/components/TimerPicker/TimerPicker.js.map +0 -1
  95. package/dist/module/components/TimerPicker/index.js +0 -4
  96. package/dist/module/components/TimerPicker/index.js.map +0 -1
  97. package/dist/module/components/TimerPicker/styles.js +0 -123
  98. package/dist/module/components/TimerPicker/styles.js.map +0 -1
  99. package/dist/module/components/TimerPicker/types.js +0 -2
  100. package/dist/module/components/TimerPicker/types.js.map +0 -1
  101. package/dist/module/components/TimerPickerModal/TimerPickerModal.js +0 -145
  102. package/dist/module/components/TimerPickerModal/TimerPickerModal.js.map +0 -1
  103. package/dist/module/components/TimerPickerModal/index.js +0 -4
  104. package/dist/module/components/TimerPickerModal/index.js.map +0 -1
  105. package/dist/module/components/TimerPickerModal/styles.js +0 -82
  106. package/dist/module/components/TimerPickerModal/styles.js.map +0 -1
  107. package/dist/module/components/TimerPickerModal/types.js +0 -2
  108. package/dist/module/components/TimerPickerModal/types.js.map +0 -1
  109. package/dist/module/index.js +0 -3
  110. package/dist/module/index.js.map +0 -1
  111. package/dist/module/tests/DurationScroll.test.js +0 -160
  112. package/dist/module/tests/DurationScroll.test.js.map +0 -1
  113. package/dist/module/tests/Modal.test.js +0 -96
  114. package/dist/module/tests/Modal.test.js.map +0 -1
  115. package/dist/module/tests/TimerPicker.test.js +0 -166
  116. package/dist/module/tests/TimerPicker.test.js.map +0 -1
  117. package/dist/module/tests/TimerPickerModal.test.js +0 -273
  118. package/dist/module/tests/TimerPickerModal.test.js.map +0 -1
  119. package/dist/module/tests/colorToRgba.test.js +0 -174
  120. package/dist/module/tests/colorToRgba.test.js.map +0 -1
  121. package/dist/module/tests/generateNumbers.test.js +0 -348
  122. package/dist/module/tests/generateNumbers.test.js.map +0 -1
  123. package/dist/module/tests/getAdjustedLimit.test.js +0 -322
  124. package/dist/module/tests/getAdjustedLimit.test.js.map +0 -1
  125. package/dist/module/tests/getDurationAndIndexFromScrollOffset.test.js +0 -422
  126. package/dist/module/tests/getDurationAndIndexFromScrollOffset.test.js.map +0 -1
  127. package/dist/module/tests/getInitialScrollIndex.test.js +0 -394
  128. package/dist/module/tests/getInitialScrollIndex.test.js.map +0 -1
  129. package/dist/module/tests/getSafeInitialValue.test.js +0 -495
  130. package/dist/module/tests/getSafeInitialValue.test.js.map +0 -1
  131. package/dist/module/tests/padNumber.test.js +0 -299
  132. package/dist/module/tests/padNumber.test.js.map +0 -1
  133. package/dist/module/utils/colorToRgba.js +0 -80
  134. package/dist/module/utils/colorToRgba.js.map +0 -1
  135. package/dist/module/utils/generateNumbers.js +0 -117
  136. package/dist/module/utils/generateNumbers.js.map +0 -1
  137. package/dist/module/utils/getAdjustedLimit.js +0 -51
  138. package/dist/module/utils/getAdjustedLimit.js.map +0 -1
  139. package/dist/module/utils/getDurationAndIndexFromScrollOffset.js +0 -55
  140. package/dist/module/utils/getDurationAndIndexFromScrollOffset.js.map +0 -1
  141. package/dist/module/utils/getInitialScrollIndex.js +0 -50
  142. package/dist/module/utils/getInitialScrollIndex.js.map +0 -1
  143. package/dist/module/utils/getSafeInitialValue.js +0 -34
  144. package/dist/module/utils/getSafeInitialValue.js.map +0 -1
  145. package/dist/module/utils/padNumber.js +0 -33
  146. package/dist/module/utils/padNumber.js.map +0 -1
  147. package/dist/typescript/components/DurationScroll/DurationScroll.d.ts +0 -4
  148. package/dist/typescript/components/DurationScroll/index.d.ts +0 -2
  149. package/dist/typescript/components/DurationScroll/types.d.ts +0 -67
  150. package/dist/typescript/components/Modal/Modal.d.ts +0 -5
  151. package/dist/typescript/components/Modal/index.d.ts +0 -2
  152. package/dist/typescript/components/Modal/styles.d.ts +0 -17
  153. package/dist/typescript/components/Modal/types.d.ts +0 -15
  154. package/dist/typescript/components/PickerItem/PickerItem.d.ts +0 -15
  155. package/dist/typescript/components/PickerItem/index.d.ts +0 -1
  156. package/dist/typescript/components/TimerPicker/TimerPicker.d.ts +0 -4
  157. package/dist/typescript/components/TimerPicker/index.d.ts +0 -3
  158. package/dist/typescript/components/TimerPicker/styles.d.ts +0 -1578
  159. package/dist/typescript/components/TimerPicker/types.d.ts +0 -90
  160. package/dist/typescript/components/TimerPickerModal/TimerPickerModal.d.ts +0 -4
  161. package/dist/typescript/components/TimerPickerModal/index.d.ts +0 -3
  162. package/dist/typescript/components/TimerPickerModal/styles.d.ts +0 -948
  163. package/dist/typescript/components/TimerPickerModal/types.d.ts +0 -55
  164. package/dist/typescript/index.d.ts +0 -2
  165. package/dist/typescript/utils/colorToRgba.d.ts +0 -38
  166. package/dist/typescript/utils/generateNumbers.d.ts +0 -80
  167. package/dist/typescript/utils/getAdjustedLimit.d.ts +0 -30
  168. package/dist/typescript/utils/getDurationAndIndexFromScrollOffset.d.ts +0 -49
  169. package/dist/typescript/utils/getInitialScrollIndex.d.ts +0 -46
  170. package/dist/typescript/utils/getSafeInitialValue.d.ts +0 -38
  171. package/dist/typescript/utils/padNumber.d.ts +0 -28
@@ -1,130 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.generateStyles = void 0;
7
- var _reactNative = require("react-native");
8
- const DARK_MODE_BACKGROUND_COLOR = "#232323";
9
- const DARK_MODE_TEXT_COLOR = "#E9E9E9";
10
- const LIGHT_MODE_BACKGROUND_COLOR = "#F1F1F1";
11
- const LIGHT_MODE_TEXT_COLOR = "#1B1B1B";
12
- const generateStyles = customStyles => {
13
- var _customStyles$pickerL, _customStyles$text, _customStyles$pickerA, _customStyles$pickerL2, _customStyles$text2, _customStyles$pickerI, _customStyles$text3;
14
- const backgroundColor = (customStyles === null || customStyles === void 0 ? void 0 : customStyles.backgroundColor) ?? ((customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark" ? DARK_MODE_BACKGROUND_COLOR : LIGHT_MODE_BACKGROUND_COLOR);
15
- const textColor = (customStyles === null || customStyles === void 0 ? void 0 : customStyles.theme) === "dark" ? DARK_MODE_TEXT_COLOR : LIGHT_MODE_TEXT_COLOR;
16
- const pickerLabelFontSize = (customStyles === null || customStyles === void 0 || (_customStyles$pickerL = customStyles.pickerLabel) === null || _customStyles$pickerL === void 0 ? void 0 : _customStyles$pickerL.fontSize) ?? (customStyles === null || customStyles === void 0 || (_customStyles$text = customStyles.text) === null || _customStyles$text === void 0 ? void 0 : _customStyles$text.fontSize) ?? 18;
17
- const pickerAmPmFontSize = (customStyles === null || customStyles === void 0 || (_customStyles$pickerA = customStyles.pickerAmPmLabel) === null || _customStyles$pickerA === void 0 ? void 0 : _customStyles$pickerA.fontSize) ?? (customStyles === null || customStyles === void 0 || (_customStyles$pickerL2 = customStyles.pickerLabel) === null || _customStyles$pickerL2 === void 0 ? void 0 : _customStyles$pickerL2.fontSize) ?? (customStyles === null || customStyles === void 0 || (_customStyles$text2 = customStyles.text) === null || _customStyles$text2 === void 0 ? void 0 : _customStyles$text2.fontSize) ?? 18;
18
- const pickerItemFontSize = (customStyles === null || customStyles === void 0 || (_customStyles$pickerI = customStyles.pickerItem) === null || _customStyles$pickerI === void 0 ? void 0 : _customStyles$pickerI.fontSize) ?? (customStyles === null || customStyles === void 0 || (_customStyles$text3 = customStyles.text) === null || _customStyles$text3 === void 0 ? void 0 : _customStyles$text3.fontSize) ?? 25;
19
-
20
- // This offset makes the picker label appear to be aligned with the picker item
21
- // despite them having different font sizes
22
- const pickerLabelVerticalOffset = pickerItemFontSize - pickerLabelFontSize - 1;
23
- const pickerAmPmVerticalOffset = pickerItemFontSize - pickerAmPmFontSize - 1;
24
-
25
- // The label is absolutely positioned, so we need to offset it for it to appear
26
- // in the correct position. We offset it to the left of the container so that
27
- // the width of the label doesn't impact its position.
28
- const extraLabelOffsetPercentage = (customStyles === null || customStyles === void 0 ? void 0 : customStyles.labelOffsetPercentage) ?? 8;
29
- const baseLeftOffsetPercentage = 70;
30
- const labelOffsetPercentage = baseLeftOffsetPercentage + extraLabelOffsetPercentage;
31
- return _reactNative.StyleSheet.create({
32
- pickerContainer: {
33
- flexDirection: "row",
34
- backgroundColor,
35
- width: "100%",
36
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerContainer)
37
- },
38
- pickerLabelContainer: {
39
- position: "absolute",
40
- top: 0,
41
- bottom: 0,
42
- left: `${labelOffsetPercentage}%`,
43
- justifyContent: "center",
44
- marginTop: pickerLabelVerticalOffset,
45
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerLabelContainer)
46
- },
47
- pickerLabel: {
48
- fontSize: 18,
49
- fontWeight: "bold",
50
- color: textColor,
51
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.text),
52
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerLabel)
53
- },
54
- pickerItemContainer: {
55
- flexDirection: "row",
56
- height: 50,
57
- justifyContent: "center",
58
- alignItems: "center",
59
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItemContainer)
60
- },
61
- pickerItem: {
62
- textAlignVertical: "center",
63
- fontSize: 25,
64
- overflow: "visible",
65
- color: textColor,
66
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.text),
67
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItem)
68
- },
69
- selectedPickerItem: {
70
- textAlignVertical: "center",
71
- fontSize: 25,
72
- overflow: "visible",
73
- color: textColor,
74
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.text),
75
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerItem),
76
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.selectedPickerItem)
77
- },
78
- pickerAmPmContainer: {
79
- position: "absolute",
80
- top: 0,
81
- bottom: 0,
82
- left: `${labelOffsetPercentage}%`,
83
- justifyContent: "center",
84
- marginTop: pickerAmPmVerticalOffset,
85
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerLabelContainer),
86
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerAmPmContainer)
87
- },
88
- pickerAmPmLabel: {
89
- fontSize: 18,
90
- fontWeight: "bold",
91
- color: textColor,
92
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.text),
93
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerLabel),
94
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerAmPmLabel)
95
- },
96
- disabledPickerContainer: {
97
- opacity: 0.4,
98
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.disabledPickerContainer)
99
- },
100
- disabledPickerItem: {
101
- opacity: 0.2,
102
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.disabledPickerItem)
103
- },
104
- maskedView: {
105
- flex: 1
106
- },
107
- pickerGradientOverlay: {
108
- position: "absolute",
109
- width: "100%",
110
- height: "100%",
111
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.pickerGradientOverlay)
112
- },
113
- durationScrollFlatListContainer: {
114
- flex: 1,
115
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.durationScrollFlatListContainer)
116
- },
117
- durationScrollFlatList: {
118
- // These paddings allow the inner am/pm label to
119
- // spill out of the flatlist
120
- paddingRight: "25%",
121
- marginRight: "-25%",
122
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.durationScrollFlatList)
123
- },
124
- durationScrollFlatListContentContainer: {
125
- ...(customStyles === null || customStyles === void 0 ? void 0 : customStyles.durationScrollFlatListContentContainer)
126
- }
127
- });
128
- };
129
- exports.generateStyles = generateStyles;
130
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","DARK_MODE_BACKGROUND_COLOR","DARK_MODE_TEXT_COLOR","LIGHT_MODE_BACKGROUND_COLOR","LIGHT_MODE_TEXT_COLOR","generateStyles","customStyles","_customStyles$pickerL","_customStyles$text","_customStyles$pickerA","_customStyles$pickerL2","_customStyles$text2","_customStyles$pickerI","_customStyles$text3","backgroundColor","theme","textColor","pickerLabelFontSize","pickerLabel","fontSize","text","pickerAmPmFontSize","pickerAmPmLabel","pickerItemFontSize","pickerItem","pickerLabelVerticalOffset","pickerAmPmVerticalOffset","extraLabelOffsetPercentage","labelOffsetPercentage","baseLeftOffsetPercentage","StyleSheet","create","pickerContainer","flexDirection","width","pickerLabelContainer","position","top","bottom","left","justifyContent","marginTop","fontWeight","color","pickerItemContainer","height","alignItems","textAlignVertical","overflow","selectedPickerItem","pickerAmPmContainer","disabledPickerContainer","opacity","disabledPickerItem","maskedView","flex","pickerGradientOverlay","durationScrollFlatListContainer","durationScrollFlatList","paddingRight","marginRight","durationScrollFlatListContentContainer","exports"],"sources":["styles.ts"],"sourcesContent":["\nimport { StyleSheet } from \"react-native\";\nimport type { TextStyle, ViewStyle } from \"react-native\";\n\nexport interface CustomTimerPickerStyles {\n backgroundColor?: string;\n disabledPickerContainer?: ViewStyle;\n disabledPickerItem?: TextStyle;\n durationScrollFlatList?: ViewStyle;\n durationScrollFlatListContainer?: ViewStyle;\n durationScrollFlatListContentContainer?: ViewStyle;\n labelOffsetPercentage?: number;\n pickerAmPmContainer?: ViewStyle;\n pickerAmPmLabel?: TextStyle;\n pickerContainer?: ViewStyle & { backgroundColor?: string };\n pickerGradientOverlay?: ViewStyle;\n pickerItem?: TextStyle;\n pickerItemContainer?: ViewStyle & { height?: number };\n pickerLabel?: TextStyle;\n pickerLabelContainer?: ViewStyle;\n selectedPickerItem?: TextStyle;\n text?: TextStyle;\n theme?: \"light\" | \"dark\";\n}\n\nconst DARK_MODE_BACKGROUND_COLOR = \"#232323\";\nconst DARK_MODE_TEXT_COLOR = \"#E9E9E9\";\nconst LIGHT_MODE_BACKGROUND_COLOR = \"#F1F1F1\";\nconst LIGHT_MODE_TEXT_COLOR = \"#1B1B1B\";\n\nexport const generateStyles = (\n customStyles: CustomTimerPickerStyles | undefined\n) => {\n const backgroundColor =\n customStyles?.backgroundColor ??\n (customStyles?.theme === \"dark\"\n ? DARK_MODE_BACKGROUND_COLOR\n : LIGHT_MODE_BACKGROUND_COLOR);\n\n const textColor =\n customStyles?.theme === \"dark\"\n ? DARK_MODE_TEXT_COLOR\n : LIGHT_MODE_TEXT_COLOR;\n\n const pickerLabelFontSize =\n customStyles?.pickerLabel?.fontSize ??\n customStyles?.text?.fontSize ??\n 18;\n const pickerAmPmFontSize =\n customStyles?.pickerAmPmLabel?.fontSize ??\n customStyles?.pickerLabel?.fontSize ??\n customStyles?.text?.fontSize ??\n 18;\n const pickerItemFontSize =\n customStyles?.pickerItem?.fontSize ??\n customStyles?.text?.fontSize ??\n 25;\n\n // This offset makes the picker label appear to be aligned with the picker item\n // despite them having different font sizes\n const pickerLabelVerticalOffset =\n pickerItemFontSize - pickerLabelFontSize - 1;\n const pickerAmPmVerticalOffset =\n pickerItemFontSize - pickerAmPmFontSize - 1;\n\n // The label is absolutely positioned, so we need to offset it for it to appear\n // in the correct position. We offset it to the left of the container so that\n // the width of the label doesn't impact its position.\n const extraLabelOffsetPercentage = customStyles?.labelOffsetPercentage ?? 8;\n const baseLeftOffsetPercentage = 70;\n const labelOffsetPercentage =\n baseLeftOffsetPercentage + extraLabelOffsetPercentage;\n\n return StyleSheet.create({\n pickerContainer: {\n flexDirection: \"row\",\n backgroundColor,\n width: \"100%\",\n ...customStyles?.pickerContainer,\n },\n pickerLabelContainer: {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: `${labelOffsetPercentage}%`,\n justifyContent: \"center\",\n marginTop: pickerLabelVerticalOffset,\n ...customStyles?.pickerLabelContainer,\n },\n pickerLabel: {\n fontSize: 18,\n fontWeight: \"bold\",\n color: textColor,\n ...customStyles?.text,\n ...customStyles?.pickerLabel,\n },\n pickerItemContainer: {\n flexDirection: \"row\",\n height: 50,\n justifyContent: \"center\",\n alignItems: \"center\",\n ...customStyles?.pickerItemContainer,\n },\n pickerItem: {\n textAlignVertical: \"center\",\n fontSize: 25,\n overflow: \"visible\",\n color: textColor,\n ...customStyles?.text,\n ...customStyles?.pickerItem,\n },\n selectedPickerItem: {\n textAlignVertical: \"center\",\n fontSize: 25,\n overflow: \"visible\",\n color: textColor,\n ...customStyles?.text,\n ...customStyles?.pickerItem,\n ...customStyles?.selectedPickerItem,\n },\n pickerAmPmContainer: {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: `${labelOffsetPercentage}%`,\n justifyContent: \"center\",\n marginTop: pickerAmPmVerticalOffset,\n ...customStyles?.pickerLabelContainer,\n ...customStyles?.pickerAmPmContainer,\n },\n pickerAmPmLabel: {\n fontSize: 18,\n fontWeight: \"bold\",\n color: textColor,\n ...customStyles?.text,\n ...customStyles?.pickerLabel,\n ...customStyles?.pickerAmPmLabel,\n },\n disabledPickerContainer: {\n opacity: 0.4,\n ...customStyles?.disabledPickerContainer,\n },\n disabledPickerItem: {\n opacity: 0.2,\n ...customStyles?.disabledPickerItem,\n },\n maskedView: {\n flex: 1,\n },\n pickerGradientOverlay: {\n position: \"absolute\",\n width: \"100%\",\n height: \"100%\",\n ...customStyles?.pickerGradientOverlay,\n },\n durationScrollFlatListContainer: {\n flex: 1,\n ...customStyles?.durationScrollFlatListContainer,\n },\n durationScrollFlatList: {\n // These paddings allow the inner am/pm label to\n // spill out of the flatlist\n paddingRight: \"25%\",\n marginRight: \"-25%\",\n ...customStyles?.durationScrollFlatList,\n },\n durationScrollFlatListContentContainer: {\n ...customStyles?.durationScrollFlatListContentContainer,\n },\n });\n};"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAwBA,MAAMC,0BAA0B,GAAG,SAAS;AAC5C,MAAMC,oBAAoB,GAAG,SAAS;AACtC,MAAMC,2BAA2B,GAAG,SAAS;AAC7C,MAAMC,qBAAqB,GAAG,SAAS;AAEhC,MAAMC,cAAc,GACvBC,YAAiD,IAChD;EAAA,IAAAC,qBAAA,EAAAC,kBAAA,EAAAC,qBAAA,EAAAC,sBAAA,EAAAC,mBAAA,EAAAC,qBAAA,EAAAC,mBAAA;EACD,MAAMC,eAAe,GACjB,CAAAR,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEQ,eAAe,MAC5B,CAAAR,YAAY,aAAZA,YAA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,YAAY,CAAE6C,uBAAuB;IAC5C,CAAC;IACDE,kBAAkB,EAAE;MAChBD,OAAO,EAAE,GAAG;MACZ,IAAG9C,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAE+C,kBAAkB;IACvC,CAAC;IACDC,UAAU,EAAE;MACRC,IAAI,EAAE;IACV,CAAC;IACDC,qBAAqB,EAAE;MACnBpB,QAAQ,EAAE,UAAU;MACpBF,KAAK,EAAE,MAAM;MACbW,MAAM,EAAE,MAAM;MACd,IAAGvC,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEkD,qBAAqB;IAC1C,CAAC;IACDC,+BAA+B,EAAE;MAC7BF,IAAI,EAAE,CAAC;MACP,IAAGjD,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEmD,+BAA+B;IACpD,CAAC;IACDC,sBAAsB,EAAE;MACpB;MACA;MACAC,YAAY,EAAE,KAAK;MACnBC,WAAW,EAAE,MAAM;MACnB,IAAGtD,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEoD,sBAAsB;IAC3C,CAAC;IACDG,sCAAsC,EAAE;MACpC,IAAGvD,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEuD,sCAAsC;IAC3D;EACJ,CAAC,CAAC;AACN,CAAC;AAACC,OAAA,CAAAzD,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { RefObject } from \"react\";\n\nimport type { View } from \"react-native\";\n\nimport type {\n LinearGradientProps,\n SoundAsset,\n Limit,\n} from \"../DurationScroll/types\";\n\nimport type { CustomTimerPickerStyles } from \"./styles\";\n\nexport interface TimerPickerRef {\n latestDuration: {\n days: RefObject<number> | undefined;\n hours: RefObject<number> | undefined;\n minutes: RefObject<number> | undefined;\n seconds: RefObject<number> | undefined;\n };\n reset: (options?: { animated?: boolean }) => void;\n setValue: (\n value: {\n days?: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n },\n options?: { animated?: boolean }\n ) => void;\n}\n\nexport interface TimerPickerProps {\n /** @deprecated Use pickerFeedback prop instead. Will be removed in a future version. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Audio?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n FlatList?: any;\n /** @deprecated Use pickerFeedback prop instead. Will be removed in a future version. */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Haptics?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n LinearGradient?: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n MaskedView?: any;\n aggressivelyGetLatestDuration?: boolean;\n allowFontScaling?: boolean;\n amLabel?: string;\n /** @deprecated Use pickerFeedback prop instead. Will be removed in a future version. */\n clickSoundAsset?: SoundAsset;\n dayInterval?: number;\n dayLabel?: string | React.ReactElement;\n dayLimit?: Limit;\n daysPickerIsDisabled?: boolean;\n decelerationRate?: number | \"normal\" | \"fast\";\n disableInfiniteScroll?: boolean;\n hideDays?: boolean;\n hideHours?: boolean;\n hideMinutes?: boolean;\n hideSeconds?: boolean;\n hourInterval?: number;\n hourLabel?: string | React.ReactElement;\n hourLimit?: Limit;\n hoursPickerIsDisabled?: boolean;\n initialValue?: {\n days?: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n };\n maximumDays?: number;\n maximumHours?: number;\n maximumMinutes?: number;\n maximumSeconds?: number;\n minuteInterval?: number;\n minuteLabel?: string | React.ReactElement;\n minuteLimit?: Limit;\n minutesPickerIsDisabled?: boolean;\n onDurationChange?: (duration: {\n days: number;\n hours: number;\n minutes: number;\n seconds: number;\n }) => void;\n padDaysWithZero?: boolean;\n padHoursWithZero?: boolean;\n padMinutesWithZero?: boolean;\n padSecondsWithZero?: boolean;\n padWithNItems?: number;\n pickerContainerProps?: React.ComponentProps<typeof View>;\n pickerFeedback?: () => void | Promise<void>;\n pickerGradientOverlayProps?: Partial<LinearGradientProps>;\n pmLabel?: string;\n repeatDayNumbersNTimes?: number;\n repeatHourNumbersNTimes?: number;\n repeatMinuteNumbersNTimes?: number;\n repeatSecondNumbersNTimes?: number;\n secondInterval?: number;\n secondLabel?: string | React.ReactElement;\n secondLimit?: Limit;\n secondsPickerIsDisabled?: boolean;\n styles?: CustomTimerPickerStyles;\n use12HourPicker?: boolean;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,153 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _getSafeInitialValue = require("../../utils/getSafeInitialValue");
10
- var _Modal = _interopRequireDefault(require("../Modal"));
11
- var _TimerPicker = _interopRequireDefault(require("../TimerPicker"));
12
- var _styles = require("./styles");
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
16
- const TimerPickerModal = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
17
- const {
18
- buttonContainerProps,
19
- buttonTouchableOpacityProps,
20
- cancelButtonText = "Cancel",
21
- closeOnOverlayPress,
22
- confirmButtonText = "Confirm",
23
- containerProps,
24
- contentContainerProps,
25
- hideCancelButton = false,
26
- initialValue,
27
- modalProps,
28
- modalTitle,
29
- modalTitleProps,
30
- onCancel,
31
- onConfirm,
32
- onDurationChange,
33
- setIsVisible,
34
- styles: customStyles,
35
- visible,
36
- ...otherProps
37
- } = props;
38
- const styles = (0, _styles.generateStyles)(customStyles, {
39
- hasModalTitle: Boolean(modalTitle)
40
- });
41
- const timerPickerRef = (0, _react.useRef)(null);
42
- const safeInitialValue = (0, _getSafeInitialValue.getSafeInitialValue)({
43
- days: initialValue === null || initialValue === void 0 ? void 0 : initialValue.days,
44
- hours: initialValue === null || initialValue === void 0 ? void 0 : initialValue.hours,
45
- minutes: initialValue === null || initialValue === void 0 ? void 0 : initialValue.minutes,
46
- seconds: initialValue === null || initialValue === void 0 ? void 0 : initialValue.seconds
47
- });
48
- const [selectedDuration, setSelectedDuration] = (0, _react.useState)(safeInitialValue);
49
- const [confirmedDuration, setConfirmedDuration] = (0, _react.useState)(safeInitialValue);
50
- const reset = options => {
51
- var _timerPickerRef$curre;
52
- setSelectedDuration(safeInitialValue);
53
- setConfirmedDuration(safeInitialValue);
54
- (_timerPickerRef$curre = timerPickerRef.current) === null || _timerPickerRef$curre === void 0 || _timerPickerRef$curre.reset(options);
55
- };
56
-
57
- // reset state if the initial value changes
58
- (0, _react.useEffect)(() => {
59
- reset();
60
- // eslint-disable-next-line react-hooks/exhaustive-deps
61
- }, [safeInitialValue.days, safeInitialValue.hours, safeInitialValue.minutes, safeInitialValue.seconds]);
62
- const hideModalHandler = () => {
63
- setSelectedDuration({
64
- days: confirmedDuration.days,
65
- hours: confirmedDuration.hours,
66
- minutes: confirmedDuration.minutes,
67
- seconds: confirmedDuration.seconds
68
- });
69
- setIsVisible(false);
70
- };
71
- const confirmHandler = () => {
72
- var _timerPickerRef$curre2, _latestDuration$days, _latestDuration$hours, _latestDuration$minut, _latestDuration$secon;
73
- const latestDuration = (_timerPickerRef$curre2 = timerPickerRef.current) === null || _timerPickerRef$curre2 === void 0 ? void 0 : _timerPickerRef$curre2.latestDuration;
74
- const newDuration = {
75
- days: (latestDuration === null || latestDuration === void 0 || (_latestDuration$days = latestDuration.days) === null || _latestDuration$days === void 0 ? void 0 : _latestDuration$days.current) ?? selectedDuration.days,
76
- hours: (latestDuration === null || latestDuration === void 0 || (_latestDuration$hours = latestDuration.hours) === null || _latestDuration$hours === void 0 ? void 0 : _latestDuration$hours.current) ?? selectedDuration.hours,
77
- minutes: (latestDuration === null || latestDuration === void 0 || (_latestDuration$minut = latestDuration.minutes) === null || _latestDuration$minut === void 0 ? void 0 : _latestDuration$minut.current) ?? selectedDuration.minutes,
78
- seconds: (latestDuration === null || latestDuration === void 0 || (_latestDuration$secon = latestDuration.seconds) === null || _latestDuration$secon === void 0 ? void 0 : _latestDuration$secon.current) ?? selectedDuration.seconds
79
- };
80
- setConfirmedDuration(newDuration);
81
- onConfirm(newDuration);
82
- };
83
- const cancelHandler = () => {
84
- setIsVisible(false);
85
- setSelectedDuration(confirmedDuration);
86
- onCancel === null || onCancel === void 0 || onCancel();
87
- };
88
-
89
- // wrapped in useCallback to avoid unnecessary re-renders of TimerPicker
90
- const durationChangeHandler = (0, _react.useCallback)(duration => {
91
- setSelectedDuration(duration);
92
- onDurationChange === null || onDurationChange === void 0 || onDurationChange(duration);
93
- }, [onDurationChange]);
94
- (0, _react.useImperativeHandle)(ref, () => {
95
- var _timerPickerRef$curre4, _timerPickerRef$curre5, _timerPickerRef$curre6, _timerPickerRef$curre7;
96
- return {
97
- reset,
98
- setValue: (value, options) => {
99
- var _timerPickerRef$curre3;
100
- setSelectedDuration(prev => ({
101
- ...prev,
102
- ...value
103
- }));
104
- setConfirmedDuration(prev => ({
105
- ...prev,
106
- ...value
107
- }));
108
- (_timerPickerRef$curre3 = timerPickerRef.current) === null || _timerPickerRef$curre3 === void 0 || _timerPickerRef$curre3.setValue(value, options);
109
- },
110
- latestDuration: {
111
- days: (_timerPickerRef$curre4 = timerPickerRef.current) === null || _timerPickerRef$curre4 === void 0 || (_timerPickerRef$curre4 = _timerPickerRef$curre4.latestDuration) === null || _timerPickerRef$curre4 === void 0 ? void 0 : _timerPickerRef$curre4.days,
112
- hours: (_timerPickerRef$curre5 = timerPickerRef.current) === null || _timerPickerRef$curre5 === void 0 || (_timerPickerRef$curre5 = _timerPickerRef$curre5.latestDuration) === null || _timerPickerRef$curre5 === void 0 ? void 0 : _timerPickerRef$curre5.hours,
113
- minutes: (_timerPickerRef$curre6 = timerPickerRef.current) === null || _timerPickerRef$curre6 === void 0 || (_timerPickerRef$curre6 = _timerPickerRef$curre6.latestDuration) === null || _timerPickerRef$curre6 === void 0 ? void 0 : _timerPickerRef$curre6.minutes,
114
- seconds: (_timerPickerRef$curre7 = timerPickerRef.current) === null || _timerPickerRef$curre7 === void 0 || (_timerPickerRef$curre7 = _timerPickerRef$curre7.latestDuration) === null || _timerPickerRef$curre7 === void 0 ? void 0 : _timerPickerRef$curre7.seconds
115
- }
116
- };
117
- });
118
- return /*#__PURE__*/_react.default.createElement(_Modal.default, _extends({
119
- isVisible: visible,
120
- onOverlayPress: closeOnOverlayPress ? hideModalHandler : undefined
121
- }, modalProps, {
122
- testID: "timer-picker-modal"
123
- }), /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, containerProps, {
124
- style: styles.container
125
- }), /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, contentContainerProps, {
126
- style: styles.contentContainer
127
- }), modalTitle ? /*#__PURE__*/_react.default.createElement(_reactNative.Text, _extends({}, modalTitleProps, {
128
- style: styles.modalTitle
129
- }), modalTitle) : null, /*#__PURE__*/_react.default.createElement(_TimerPicker.default, _extends({
130
- ref: timerPickerRef,
131
- initialValue: confirmedDuration
132
- }, otherProps, {
133
- aggressivelyGetLatestDuration: true,
134
- onDurationChange: durationChangeHandler,
135
- styles: styles.timerPickerStyles
136
- })), /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({}, buttonContainerProps, {
137
- style: styles.buttonContainer
138
- }), !hideCancelButton ? /*#__PURE__*/_react.default.isValidElement(props.cancelButton) ? /*#__PURE__*/_react.default.cloneElement(props.cancelButton, {
139
- onPress: cancelHandler
140
- }) : /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, _extends({}, buttonTouchableOpacityProps, {
141
- onPress: cancelHandler
142
- }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
143
- style: [styles.button, styles.cancelButton]
144
- }, cancelButtonText)) : null, /*#__PURE__*/_react.default.isValidElement(props.confirmButton) ? /*#__PURE__*/_react.default.cloneElement(props.confirmButton, {
145
- onPress: confirmHandler
146
- }) : /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, _extends({}, buttonTouchableOpacityProps, {
147
- onPress: confirmHandler
148
- }), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
149
- style: [styles.button, styles.confirmButton]
150
- }, confirmButtonText))))));
151
- });
152
- var _default = exports.default = /*#__PURE__*/_react.default.memo(TimerPickerModal);
153
- //# sourceMappingURL=TimerPickerModal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_getSafeInitialValue","_Modal","_interopRequireDefault","_TimerPicker","_styles","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","TimerPickerModal","forwardRef","props","ref","buttonContainerProps","buttonTouchableOpacityProps","cancelButtonText","closeOnOverlayPress","confirmButtonText","containerProps","contentContainerProps","hideCancelButton","initialValue","modalProps","modalTitle","modalTitleProps","onCancel","onConfirm","onDurationChange","setIsVisible","styles","customStyles","visible","otherProps","generateStyles","hasModalTitle","Boolean","timerPickerRef","useRef","safeInitialValue","getSafeInitialValue","days","hours","minutes","seconds","selectedDuration","setSelectedDuration","useState","confirmedDuration","setConfirmedDuration","reset","options","_timerPickerRef$curre","current","useEffect","hideModalHandler","confirmHandler","_timerPickerRef$curre2","_latestDuration$days","_latestDuration$hours","_latestDuration$minut","_latestDuration$secon","latestDuration","newDuration","cancelHandler","durationChangeHandler","useCallback","duration","useImperativeHandle","_timerPickerRef$curre4","_timerPickerRef$curre5","_timerPickerRef$curre6","_timerPickerRef$curre7","setValue","value","_timerPickerRef$curre3","prev","createElement","isVisible","onOverlayPress","undefined","testID","View","style","container","contentContainer","Text","aggressivelyGetLatestDuration","timerPickerStyles","buttonContainer","React","isValidElement","cancelButton","cloneElement","onPress","TouchableOpacity","button","confirmButton","_default","exports","memo"],"sources":["TimerPickerModal.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\n\nimport { View, Text, TouchableOpacity } from \"react-native\";\n\nimport { getSafeInitialValue } from \"../../utils/getSafeInitialValue\";\nimport Modal from \"../Modal\";\nimport TimerPicker from \"../TimerPicker\";\nimport type { TimerPickerRef } from \"../TimerPicker\";\n\nimport { generateStyles } from \"./styles\";\nimport type { TimerPickerModalRef, TimerPickerModalProps } from \"./types\";\n\nconst TimerPickerModal = forwardRef<TimerPickerModalRef, TimerPickerModalProps>(\n (props, ref) => {\n const {\n buttonContainerProps,\n buttonTouchableOpacityProps,\n cancelButtonText = \"Cancel\",\n closeOnOverlayPress,\n confirmButtonText = \"Confirm\",\n containerProps,\n contentContainerProps,\n hideCancelButton = false,\n initialValue,\n modalProps,\n modalTitle,\n modalTitleProps,\n onCancel,\n onConfirm,\n onDurationChange,\n setIsVisible,\n styles: customStyles,\n visible,\n ...otherProps\n } = props;\n\n const styles = generateStyles(customStyles, {\n hasModalTitle: Boolean(modalTitle),\n });\n\n const timerPickerRef = useRef<TimerPickerRef>(null);\n\n const safeInitialValue = getSafeInitialValue({\n days: initialValue?.days,\n hours: initialValue?.hours,\n minutes: initialValue?.minutes,\n seconds: initialValue?.seconds,\n });\n\n const [selectedDuration, setSelectedDuration] =\n useState(safeInitialValue);\n const [confirmedDuration, setConfirmedDuration] =\n useState(safeInitialValue);\n\n const reset = (options?: { animated?: boolean }) => {\n setSelectedDuration(safeInitialValue);\n setConfirmedDuration(safeInitialValue);\n timerPickerRef.current?.reset(options);\n };\n\n // reset state if the initial value changes\n useEffect(() => {\n reset();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n safeInitialValue.days,\n safeInitialValue.hours,\n safeInitialValue.minutes,\n safeInitialValue.seconds,\n ]);\n\n const hideModalHandler = () => {\n setSelectedDuration({\n days: confirmedDuration.days,\n hours: confirmedDuration.hours,\n minutes: confirmedDuration.minutes,\n seconds: confirmedDuration.seconds,\n });\n setIsVisible(false);\n };\n\n const confirmHandler = () => {\n const latestDuration = timerPickerRef.current?.latestDuration;\n\n const newDuration = {\n days: latestDuration?.days?.current ?? selectedDuration.days,\n hours: latestDuration?.hours?.current ?? selectedDuration.hours,\n minutes:\n latestDuration?.minutes?.current ??\n selectedDuration.minutes,\n seconds:\n latestDuration?.seconds?.current ??\n selectedDuration.seconds,\n };\n setConfirmedDuration(newDuration);\n onConfirm(newDuration);\n };\n\n const cancelHandler = () => {\n setIsVisible(false);\n setSelectedDuration(confirmedDuration);\n onCancel?.();\n };\n\n // wrapped in useCallback to avoid unnecessary re-renders of TimerPicker\n const durationChangeHandler = useCallback(\n (duration: {\n days: number;\n hours: number;\n minutes: number;\n seconds: number;\n }) => {\n setSelectedDuration(duration);\n onDurationChange?.(duration);\n },\n [onDurationChange]\n );\n\n useImperativeHandle(ref, () => ({\n reset,\n setValue: (value, options) => {\n setSelectedDuration((prev) => ({\n ...prev,\n ...value,\n }));\n setConfirmedDuration((prev) => ({\n ...prev,\n ...value,\n }));\n timerPickerRef.current?.setValue(value, options);\n },\n latestDuration: {\n days: timerPickerRef.current?.latestDuration?.days,\n hours: timerPickerRef.current?.latestDuration?.hours,\n minutes: timerPickerRef.current?.latestDuration?.minutes,\n seconds: timerPickerRef.current?.latestDuration?.seconds,\n },\n }));\n\n return (\n <Modal\n isVisible={visible}\n onOverlayPress={\n closeOnOverlayPress ? hideModalHandler : undefined\n }\n {...modalProps}\n testID=\"timer-picker-modal\">\n <View {...containerProps} style={styles.container}>\n <View\n {...contentContainerProps}\n style={styles.contentContainer}>\n {modalTitle ? (\n <Text\n {...modalTitleProps}\n style={styles.modalTitle}>\n {modalTitle}\n </Text>\n ) : null}\n <TimerPicker\n ref={timerPickerRef}\n initialValue={confirmedDuration}\n {...otherProps}\n aggressivelyGetLatestDuration\n onDurationChange={durationChangeHandler}\n styles={styles.timerPickerStyles}\n />\n <View\n {...buttonContainerProps}\n style={styles.buttonContainer}>\n {!hideCancelButton\n ? (\n React.isValidElement(props.cancelButton)\n ? React.cloneElement(\n props.cancelButton,\n {\n onPress: cancelHandler,\n }\n )\n : (\n <TouchableOpacity\n {...buttonTouchableOpacityProps}\n onPress={cancelHandler}>\n <Text\n style={[\n styles.button,\n styles.cancelButton,\n ]}>\n {cancelButtonText}\n </Text>\n </TouchableOpacity>\n )\n )\n : null}\n {React.isValidElement(props.confirmButton)\n ? React.cloneElement(props.confirmButton, {\n onPress: confirmHandler,\n })\n : (\n <TouchableOpacity\n {...buttonTouchableOpacityProps}\n onPress={confirmHandler}>\n <Text\n style={[\n styles.button,\n styles.confirmButton,\n ]}>\n {confirmButtonText}\n </Text>\n </TouchableOpacity>\n )}\n </View>\n </View>\n </View>\n </Modal>\n );\n }\n);\n\nexport default React.memo(TimerPickerModal);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AASA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAGA,IAAAM,OAAA,GAAAN,OAAA;AAA0C,SAAAI,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CA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CAAA2G,IAAI;IACDH,KAAK,EAAE,CACHrD,MAAM,CAACkE,MAAM,EACblE,MAAM,CAAC8D,YAAY;EACrB,GACD5E,gBACC,CACQ,CACrB,GAEP,IAAI,EACT,aAAA0E,cAAK,CAACC,cAAc,CAAC/E,KAAK,CAACqF,aAAa,CAAC,gBACpCP,cAAK,CAACG,YAAY,CAACjF,KAAK,CAACqF,aAAa,EAAE;IACtCH,OAAO,EAAEtC;EACb,CAAC,CAAC,gBAEEhF,MAAA,CAAAW,OAAA,CAAA0F,aAAA,CAAClG,YAAA,CAAAoH,gBAAgB,EAAA3F,QAAA,KACTW,2BAA2B;IAC/B+E,OAAO,EAAEtC;EAAe,iBACxBhF,MAAA,CAAAW,OAAA,CAAA0F,aAAA,CAAClG,YAAA,CAAA2G,IAAI;IACDH,KAAK,EAAE,CACHrD,MAAM,CAACkE,MAAM,EACblE,MAAM,CAACmE,aAAa;EACtB,GACD/E,iBACC,CACQ,CAExB,CACJ,CACJ,CACH,CAAC;AAEhB,CACJ,CAAC;AAAC,IAAAgF,QAAA,GAAAC,OAAA,CAAAhH,OAAA,gBAEauG,cAAK,CAACU,IAAI,CAAC1F,gBAAgB,CAAC","ignoreList":[]}
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {};
7
- Object.defineProperty(exports, "default", {
8
- enumerable: true,
9
- get: function () {
10
- return _TimerPickerModal.default;
11
- }
12
- });
13
- var _TimerPickerModal = _interopRequireDefault(require("./TimerPickerModal"));
14
- var _types = require("./types");
15
- Object.keys(_types).forEach(function (key) {
16
- if (key === "default" || key === "__esModule") return;
17
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
18
- if (key in exports && exports[key] === _types[key]) return;
19
- Object.defineProperty(exports, key, {
20
- enumerable: true,
21
- get: function () {
22
- return _types[key];
23
- }
24
- });
25
- });
26
- var _styles = require("./styles");
27
- Object.keys(_styles).forEach(function (key) {
28
- if (key === "default" || key === "__esModule") return;
29
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
30
- if (key in exports && exports[key] === _styles[key]) return;
31
- Object.defineProperty(exports, key, {
32
- enumerable: true,
33
- get: function () {
34
- return _styles[key];
35
- }
36
- });
37
- });
38
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
39
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_TimerPickerModal","_interopRequireDefault","require","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_styles","e","__esModule","default"],"sources":["index.ts"],"sourcesContent":["export { default } from \"./TimerPickerModal\";\n\nexport * from \"./types\";\n\nexport * from \"./styles\";\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAS,OAAA,GAAAd,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAW,OAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,OAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,OAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AAAyB,SAAAN,uBAAAgB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
@@ -1,89 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.generateStyles = void 0;
7
- var _reactNative = require("react-native");
8
- const DARK_MODE_BACKGROUND_COLOR = "#232323";
9
- const DARK_MODE_TEXT_COLOR = "#E9E9E9";
10
- const LIGHT_MODE_BACKGROUND_COLOR = "#F1F1F1";
11
- const LIGHT_MODE_TEXT_COLOR = "#1B1B1B";
12
- const generateStyles = (customStyles, variables) => {
13
- const {
14
- button: customButtonStyle,
15
- buttonContainer: customButtonContainerStyle,
16
- cancelButton: customCancelButtonStyle,
17
- confirmButton: customConfirmButtonStyle,
18
- container: customContainerStyle,
19
- contentContainer: customContentContainerStyle,
20
- modalTitle: customModalTitleStyle,
21
- ...customTimerPickerStyles
22
- } = customStyles ?? {};
23
- return _reactNative.StyleSheet.create({
24
- container: {
25
- justifyContent: "center",
26
- overflow: "hidden",
27
- ...customContainerStyle
28
- },
29
- contentContainer: {
30
- backgroundColor: (customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.backgroundColor) ?? ((customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.theme) === "dark" ? DARK_MODE_BACKGROUND_COLOR : LIGHT_MODE_BACKGROUND_COLOR),
31
- justifyContent: "center",
32
- alignItems: "center",
33
- borderRadius: 20,
34
- overflow: "hidden",
35
- paddingHorizontal: 20,
36
- ...customContentContainerStyle
37
- },
38
- buttonContainer: {
39
- flexDirection: "row",
40
- marginTop: 25,
41
- marginBottom: 20,
42
- ...customButtonContainerStyle
43
- },
44
- button: {
45
- marginHorizontal: 12,
46
- paddingVertical: 10,
47
- paddingHorizontal: 20,
48
- borderWidth: 1,
49
- borderRadius: 10,
50
- fontSize: 16,
51
- overflow: "hidden",
52
- ...(customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.text),
53
- ...customButtonStyle
54
- },
55
- cancelButton: {
56
- borderColor: "gray",
57
- color: (customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.theme) === "dark" ? DARK_MODE_TEXT_COLOR : "gray",
58
- backgroundColor: (customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.theme) === "dark" ? "gray" : undefined,
59
- ...(customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.text),
60
- ...customCancelButtonStyle
61
- },
62
- confirmButton: {
63
- borderColor: "green",
64
- color: (customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.theme) === "dark" ? DARK_MODE_TEXT_COLOR : "green",
65
- backgroundColor: (customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.theme) === "dark" ? "green" : undefined,
66
- ...(customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.text),
67
- ...customConfirmButtonStyle
68
- },
69
- modalTitle: {
70
- fontSize: 24,
71
- fontWeight: "600",
72
- marginTop: 20,
73
- marginBottom: 15,
74
- color: (customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.theme) === "dark" ? DARK_MODE_TEXT_COLOR : LIGHT_MODE_TEXT_COLOR,
75
- ...(customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.text),
76
- ...customModalTitleStyle
77
- },
78
- timerPickerStyles: {
79
- ...customTimerPickerStyles,
80
- pickerContainer: {
81
- marginRight: "8%",
82
- paddingTop: !(variables !== null && variables !== void 0 && variables.hasModalTitle) ? 20 : 0,
83
- ...((customTimerPickerStyles === null || customTimerPickerStyles === void 0 ? void 0 : customTimerPickerStyles.pickerContainer) ?? {})
84
- }
85
- }
86
- });
87
- };
88
- exports.generateStyles = generateStyles;
89
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","DARK_MODE_BACKGROUND_COLOR","DARK_MODE_TEXT_COLOR","LIGHT_MODE_BACKGROUND_COLOR","LIGHT_MODE_TEXT_COLOR","generateStyles","customStyles","variables","button","customButtonStyle","buttonContainer","customButtonContainerStyle","cancelButton","customCancelButtonStyle","confirmButton","customConfirmButtonStyle","container","customContainerStyle","contentContainer","customContentContainerStyle","modalTitle","customModalTitleStyle","customTimerPickerStyles","StyleSheet","create","justifyContent","overflow","backgroundColor","theme","alignItems","borderRadius","paddingHorizontal","flexDirection","marginTop","marginBottom","marginHorizontal","paddingVertical","borderWidth","fontSize","text","borderColor","color","undefined","fontWeight","timerPickerStyles","pickerContainer","marginRight","paddingTop","hasModalTitle","exports"],"sources":["styles.ts"],"sourcesContent":["import { StyleSheet } from \"react-native\";\nimport type { DimensionValue, TextStyle, ViewStyle } from \"react-native\";\n\nimport type { CustomTimerPickerStyles } from \"../TimerPicker/styles\";\n\nexport interface CustomTimerPickerModalStyles extends CustomTimerPickerStyles {\n button?: TextStyle;\n buttonContainer?: ViewStyle;\n cancelButton?: TextStyle;\n confirmButton?: TextStyle;\n container?: ViewStyle;\n contentContainer?: ViewStyle;\n modalTitle?: TextStyle;\n}\n\nconst DARK_MODE_BACKGROUND_COLOR = \"#232323\";\nconst DARK_MODE_TEXT_COLOR = \"#E9E9E9\";\nconst LIGHT_MODE_BACKGROUND_COLOR = \"#F1F1F1\";\nconst LIGHT_MODE_TEXT_COLOR = \"#1B1B1B\";\n\nexport const generateStyles = (\n customStyles: CustomTimerPickerModalStyles | undefined,\n variables?: {\n hasModalTitle: boolean;\n }\n) => {\n const {\n button: customButtonStyle,\n buttonContainer: customButtonContainerStyle,\n cancelButton: customCancelButtonStyle,\n confirmButton: customConfirmButtonStyle,\n container: customContainerStyle,\n contentContainer: customContentContainerStyle,\n modalTitle: customModalTitleStyle,\n ...customTimerPickerStyles\n } = customStyles ?? {};\n\n return StyleSheet.create({\n container: {\n justifyContent: \"center\",\n overflow: \"hidden\",\n ...customContainerStyle,\n },\n contentContainer: {\n backgroundColor:\n customTimerPickerStyles?.backgroundColor ??\n (customTimerPickerStyles?.theme === \"dark\"\n ? DARK_MODE_BACKGROUND_COLOR\n : LIGHT_MODE_BACKGROUND_COLOR),\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: 20,\n overflow: \"hidden\",\n paddingHorizontal: 20,\n ...customContentContainerStyle,\n },\n buttonContainer: {\n flexDirection: \"row\",\n marginTop: 25,\n marginBottom: 20,\n ...customButtonContainerStyle,\n },\n button: {\n marginHorizontal: 12,\n paddingVertical: 10,\n paddingHorizontal: 20,\n borderWidth: 1,\n borderRadius: 10,\n fontSize: 16,\n overflow: \"hidden\",\n ...customTimerPickerStyles?.text,\n ...customButtonStyle,\n },\n cancelButton: {\n borderColor: \"gray\",\n color:\n customTimerPickerStyles?.theme === \"dark\"\n ? DARK_MODE_TEXT_COLOR\n : \"gray\",\n backgroundColor:\n customTimerPickerStyles?.theme === \"dark\" ? \"gray\" : undefined,\n ...customTimerPickerStyles?.text,\n ...customCancelButtonStyle,\n },\n confirmButton: {\n borderColor: \"green\",\n color:\n customTimerPickerStyles?.theme === \"dark\"\n ? DARK_MODE_TEXT_COLOR\n : \"green\",\n backgroundColor:\n customTimerPickerStyles?.theme === \"dark\" ? \"green\" : undefined,\n ...customTimerPickerStyles?.text,\n ...customConfirmButtonStyle,\n },\n modalTitle: {\n fontSize: 24,\n fontWeight: \"600\",\n marginTop: 20,\n marginBottom: 15,\n color:\n customTimerPickerStyles?.theme === \"dark\"\n ? DARK_MODE_TEXT_COLOR\n : LIGHT_MODE_TEXT_COLOR,\n ...customTimerPickerStyles?.text,\n ...customModalTitleStyle,\n },\n timerPickerStyles: {\n ...customTimerPickerStyles,\n pickerContainer: {\n marginRight: \"8%\" as DimensionValue,\n paddingTop: !variables?.hasModalTitle ? 20 : 0,\n ...(customTimerPickerStyles?.pickerContainer ?? {}),\n },\n },\n });\n};\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAeA,MAAMC,0BAA0B,GAAG,SAAS;AAC5C,MAAMC,oBAAoB,GAAG,SAAS;AACtC,MAAMC,2BAA2B,GAAG,SAAS;AAC7C,MAAMC,qBAAqB,GAAG,SAAS;AAEhC,MAAMC,cAAc,GAAGA,CAC1BC,YAAsD,EACtDC,SAEC,KACA;EACD,MAAM;IACFC,MAAM,EAAEC,iBAAiB;IACzBC,eAAe,EAAEC,0BAA0B;IAC3CC,YAAY,EAAEC,uBAAuB;IACrCC,aAAa,EAAEC,wBAAwB;IACvCC,SAAS,EAAEC,oBAAoB;IAC/BC,gBAAgB,EAAEC,2BAA2B;IAC7CC,UAAU,EAAEC,qBAAqB;IACjC,GAAGC;EACP,CAAC,GAAGhB,YAAY,IAAI,CAAC,CAAC;EAEtB,OAAOiB,uBAAU,CAACC,MAAM,CAAC;IACrBR,SAAS,EAAE;MACPS,cAAc,EAAE,QAAQ;MACxBC,QAAQ,EAAE,QAAQ;MAClB,GAAGT;IACP,CAAC;IACDC,gBAAgB,EAAE;MACdS,eAAe,EACX,CAAAL,uBAAuB,aAAvBA,uBAAuB,uBAAvBA,uBAAuB,CAAEK,eAAe,MACvC,CAAAL,uBAAuB,aAAvBA,uBAAuB,uBAAvBA,uBAAuB,CAAEM,KAAK,MAAK,MAAM,GACpC3B,0BAA0B,GAC1BE,2BAA2B,CAAC;MACtCsB,cAAc,EAAE,QAAQ;MACxBI,UAAU,EAAE,QAAQ;MACpBC,YAAY,EAAE,EAAE;MAChBJ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IAAI;MAChC,GAAGxB;IACP,CAAC;IACDK,UAAU,EAAE;MACRkB,QAAQ,EAAE,EAAE;MACZK,UAAU,EAAE,KAAK;MACjBV,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE,EAAE;MAChBO,KAAK,EACD,CAAAnB,uBAAuB,aAAvBA,uBAAuB,uBAAvBA,uBAAuB,CAAEM,KAAK,MAAK,MAAM,GACnC1B,oBAAoB,GACpBE,qBAAqB;MAC/B,IAAGkB,uBAAuB,aAAvBA,uBAAuB,uBAAvBA,uBAAuB,CAAEiB,IAAI;MAChC,GAAGlB;IACP,CAAC;IACDuB,iBAAiB,EAAE;MACf,GAAGtB,uBAAuB;MAC1BuB,eAAe,EAAE;QACbC,WAAW,EAAE,IAAsB;QACnCC,UAAU,EAAE,EAACxC,SAAS,aAATA,SAAS,eAATA,SAAS,CAAEyC,aAAa,IAAG,EAAE,GAAG,CAAC;QAC9C,IAAI,CAAA1B,uBAAuB,aAAvBA,uBAAuB,uBAAvBA,uBAAuB,CAAEuB,eAAe,KAAI,CAAC,CAAC;MACtD;IACJ;EACJ,CAAC,CAAC;AACN,CAAC;AAACI,OAAA,CAAA5C,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { RefObject, ReactElement } from \"react\";\n\nimport type { View, TouchableOpacity, Text } from \"react-native\";\n\nimport type Modal from \"../Modal\";\nimport type { TimerPickerProps } from \"../TimerPicker/types\";\n\nimport type { CustomTimerPickerModalStyles } from \"./styles\";\n\nexport interface TimerPickerModalRef {\n latestDuration: {\n days: RefObject<number> | undefined;\n hours: RefObject<number> | undefined;\n minutes: RefObject<number> | undefined;\n seconds: RefObject<number> | undefined;\n };\n reset: (options?: { animated?: boolean }) => void;\n setValue: (\n value: {\n days?: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n },\n options?: { animated?: boolean }\n ) => void;\n}\n\nexport interface TimerPickerModalProps extends TimerPickerProps {\n buttonContainerProps?: React.ComponentProps<typeof View>;\n buttonTouchableOpacityProps?: React.ComponentProps<typeof TouchableOpacity>;\n /** Custom cancel button component. If provided, replaces the default cancel button. */\n cancelButton?: ReactElement<{ onPress?: () => void }>;\n cancelButtonText?: string;\n closeOnOverlayPress?: boolean;\n /** Custom confirm button component. If provided, replaces the default confirm button. */\n confirmButton?: ReactElement<{ onPress?: () => void }>;\n confirmButtonText?: string;\n containerProps?: React.ComponentProps<typeof View>;\n contentContainerProps?: React.ComponentProps<typeof View>;\n hideCancelButton?: boolean;\n modalProps?: React.ComponentProps<typeof Modal>;\n modalTitle?: string;\n modalTitleProps?: React.ComponentProps<typeof Text>;\n onCancel?: () => void;\n onConfirm: ({\n days,\n hours,\n minutes,\n seconds,\n }: {\n days: number;\n hours: number;\n minutes: number;\n seconds: number;\n }) => void;\n setIsVisible: (isVisible: boolean) => void;\n styles?: CustomTimerPickerModalStyles;\n visible: boolean;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "CustomTimerPickerModalStyles", {
7
- enumerable: true,
8
- get: function () {
9
- return _TimerPickerModal.CustomTimerPickerModalStyles;
10
- }
11
- });
12
- Object.defineProperty(exports, "CustomTimerPickerStyles", {
13
- enumerable: true,
14
- get: function () {
15
- return _TimerPicker.CustomTimerPickerStyles;
16
- }
17
- });
18
- Object.defineProperty(exports, "TimerPicker", {
19
- enumerable: true,
20
- get: function () {
21
- return _TimerPicker.default;
22
- }
23
- });
24
- Object.defineProperty(exports, "TimerPickerModal", {
25
- enumerable: true,
26
- get: function () {
27
- return _TimerPickerModal.default;
28
- }
29
- });
30
- Object.defineProperty(exports, "TimerPickerModalProps", {
31
- enumerable: true,
32
- get: function () {
33
- return _TimerPickerModal.TimerPickerModalProps;
34
- }
35
- });
36
- Object.defineProperty(exports, "TimerPickerModalRef", {
37
- enumerable: true,
38
- get: function () {
39
- return _TimerPickerModal.TimerPickerModalRef;
40
- }
41
- });
42
- Object.defineProperty(exports, "TimerPickerProps", {
43
- enumerable: true,
44
- get: function () {
45
- return _TimerPicker.TimerPickerProps;
46
- }
47
- });
48
- Object.defineProperty(exports, "TimerPickerRef", {
49
- enumerable: true,
50
- get: function () {
51
- return _TimerPicker.TimerPickerRef;
52
- }
53
- });
54
- var _TimerPickerModal = _interopRequireWildcard(require("./components/TimerPickerModal"));
55
- var _TimerPicker = _interopRequireWildcard(require("./components/TimerPicker"));
56
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
57
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_TimerPickerModal","_interopRequireWildcard","require","_TimerPicker","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor"],"sources":["index.ts"],"sourcesContent":["export {\n default as TimerPickerModal,\n TimerPickerModalProps,\n TimerPickerModalRef,\n CustomTimerPickerModalStyles,\n} from \"./components/TimerPickerModal\";\n\nexport {\n default as TimerPicker,\n TimerPickerProps,\n TimerPickerRef,\n CustomTimerPickerStyles,\n} from \"./components/TimerPicker\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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