@xaui/native 0.9.1-alpha.92 → 0.9.1-alpha.94

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 (247) hide show
  1. package/dist/{chunk-PAQZOD2L.js → chunk-2JFMCW5E.js} +1 -1
  2. package/dist/chunk-2TLPFGGR.cjs +251 -0
  3. package/dist/{chunk-TPYOQSKT.js → chunk-2UNLQRXY.js} +1 -1
  4. package/dist/{chunk-JKDWYNSG.js → chunk-2XEQDQAN.js} +109 -107
  5. package/dist/{chunk-RXEUKYM5.js → chunk-33BA4LVN.js} +1 -1
  6. package/dist/{chunk-ODQHAPQW.js → chunk-4AIIAF6U.js} +24 -22
  7. package/dist/{chunk-QCH7X7O2.cjs → chunk-4LRVB6WR.cjs} +14 -14
  8. package/dist/{chunk-QUSQEYLP.cjs → chunk-53E2E7GS.cjs} +26 -28
  9. package/dist/{chunk-2B6PUYTP.cjs → chunk-55KGHYYU.cjs} +4 -4
  10. package/dist/{chunk-B33OU34Z.cjs → chunk-5O7E73QP.cjs} +12 -12
  11. package/dist/{chunk-FVEMTBU4.js → chunk-5XTF2JDK.js} +2 -2
  12. package/dist/{chunk-V2CEKPJ6.js → chunk-6MVKLRLZ.js} +1 -1
  13. package/dist/{chunk-RSIWSVXI.js → chunk-6NAZ2IHL.js} +1 -1
  14. package/dist/{chunk-LPJ3UBSO.cjs → chunk-6NRWZR7T.cjs} +2 -2
  15. package/dist/{chunk-FXN32S75.cjs → chunk-6SRFQSPR.cjs} +3 -3
  16. package/dist/{chunk-7EVW6O2Q.js → chunk-6W45YHTF.js} +1 -1
  17. package/dist/{chunk-7NQL5DXY.js → chunk-6XY3XAEQ.js} +1 -1
  18. package/dist/{chunk-UEW3GAP5.cjs → chunk-6ZWQDTGQ.cjs} +5 -5
  19. package/dist/{chunk-VMPCXS4S.js → chunk-7OVYYZ7H.js} +22 -20
  20. package/dist/{chunk-CYOUOQXT.cjs → chunk-AHJLQJOE.cjs} +5 -5
  21. package/dist/chunk-AHKKEM3K.cjs +536 -0
  22. package/dist/{chunk-WIX4SYZI.cjs → chunk-AIHKBSQ5.cjs} +2 -2
  23. package/dist/{chunk-WRZV6ORJ.js → chunk-AYOJXFHR.js} +1 -1
  24. package/dist/{chunk-OD6H7ANY.js → chunk-B5DBFS6M.js} +1 -1
  25. package/dist/{chunk-VQGNLX5C.js → chunk-BYDGJU5A.js} +1 -1
  26. package/dist/{chunk-NVODH2PR.js → chunk-CCTAJXZ3.js} +63 -61
  27. package/dist/{chunk-ORXVXYKC.cjs → chunk-CHGBWFDI.cjs} +63 -26
  28. package/dist/{chunk-WLJPO3AS.cjs → chunk-CZ2NUGUI.cjs} +357 -201
  29. package/dist/{chunk-PYQ2P3M5.cjs → chunk-CZEWWCWG.cjs} +58 -58
  30. package/dist/{chunk-PDSR42YC.cjs → chunk-D22K3NZU.cjs} +3 -3
  31. package/dist/{chunk-TRWZEOCO.js → chunk-DBP5CA5R.js} +2 -2
  32. package/dist/{chunk-QN2D5ZCS.cjs → chunk-DE4RSR7Q.cjs} +3 -3
  33. package/dist/{chunk-FOOXBVOQ.js → chunk-E5E2QA4K.js} +22 -20
  34. package/dist/{chunk-LECYGVIH.js → chunk-EQUD3NHO.js} +50 -48
  35. package/dist/chunk-ERIGD4SE.cjs +686 -0
  36. package/dist/{chunk-62AYYMZP.cjs → chunk-FDYPWVNP.cjs} +3 -3
  37. package/dist/chunk-GN7BWYXP.cjs +627 -0
  38. package/dist/chunk-GWTURY4S.cjs +999 -0
  39. package/dist/{chunk-OW4N2C3M.cjs → chunk-HBYT7B47.cjs} +88 -61
  40. package/dist/{chunk-XWIPLZTD.cjs → chunk-HOV25N3M.cjs} +2 -2
  41. package/dist/{chunk-5MMBEDZG.cjs → chunk-I3XIZWCV.cjs} +29 -29
  42. package/dist/{chunk-EDNCHCIN.cjs → chunk-IAJG7GYE.cjs} +2 -2
  43. package/dist/{chunk-P7OHZCU3.js → chunk-IAWLQN2W.js} +2 -2
  44. package/dist/{chunk-RCSEVEIR.js → chunk-ICVIWXK4.js} +1 -1
  45. package/dist/{chunk-RREJUSAS.cjs → chunk-IMIY34F4.cjs} +3 -3
  46. package/dist/{chunk-ZWS3FQ3J.js → chunk-IUDQG3JI.js} +57 -57
  47. package/dist/{chunk-O6B72H4B.js → chunk-K7VDLVLE.js} +6 -8
  48. package/dist/{chunk-P2CJNTAP.js → chunk-KFB24VYT.js} +22 -20
  49. package/dist/chunk-KHPODIQV.cjs +540 -0
  50. package/dist/{chunk-CBRW53GN.cjs → chunk-KMK6FUTK.cjs} +39 -23
  51. package/dist/{chunk-2AFA5HA2.js → chunk-KQW25RCC.js} +77 -75
  52. package/dist/{chunk-X4CZYJZ6.cjs → chunk-LCGJA37L.cjs} +12 -12
  53. package/dist/{chunk-SUJLTC2K.js → chunk-LPGY2IDX.js} +1 -1
  54. package/dist/{chunk-P5M5URAB.js → chunk-LSZW4G7B.js} +31 -31
  55. package/dist/{chunk-GYEQEF5H.js → chunk-LUPU7FJK.js} +1 -1
  56. package/dist/chunk-MNBEUNC5.cjs +792 -0
  57. package/dist/{chunk-AIND5F7P.js → chunk-MTQGFUW5.js} +29 -29
  58. package/dist/chunk-NGXLJ5ZF.cjs +395 -0
  59. package/dist/{chunk-DYQB54JA.cjs → chunk-NPAGA6SH.cjs} +2 -2
  60. package/dist/{chunk-QELEKXN3.cjs → chunk-OMI2FRCU.cjs} +5 -5
  61. package/dist/{chunk-EBCAPIBD.js → chunk-OX23MW5E.js} +70 -50
  62. package/dist/{chunk-MMFIMQMQ.js → chunk-OZLOYXLW.js} +2 -2
  63. package/dist/{chunk-JBZ7SBRV.cjs → chunk-Q3ZKZ2Y6.cjs} +3 -3
  64. package/dist/{chunk-TCWW7JI2.js → chunk-QT7KLGO3.js} +65 -63
  65. package/dist/{chunk-6RU6GUJP.js → chunk-QZF7RSVV.js} +1 -1
  66. package/dist/{chunk-UYQLW7OD.js → chunk-RAYO2TJL.js} +2 -2
  67. package/dist/{chunk-FRLWG5LM.js → chunk-RFT5MGJC.js} +25 -25
  68. package/dist/chunk-SIOSYITD.cjs +1039 -0
  69. package/dist/{chunk-USIWPESU.js → chunk-SIX5AVXG.js} +1 -1
  70. package/dist/{chunk-52XUGOLD.js → chunk-SX5U5UJQ.js} +3 -3
  71. package/dist/{chunk-GGP2ERSV.js → chunk-T5ES7FOL.js} +1 -1
  72. package/dist/{chunk-MSORLKO7.cjs → chunk-V3C3ATRO.cjs} +2 -2
  73. package/dist/{chunk-BI5ME4QP.cjs → chunk-VBS6VWW4.cjs} +5 -5
  74. package/dist/{chunk-KPKEZWZM.js → chunk-VQ4OTVET.js} +189 -211
  75. package/dist/{chunk-6GQ7UTJ7.cjs → chunk-VXAIFOXL.cjs} +2 -2
  76. package/dist/{chunk-BJVO7DWJ.js → chunk-W4F4NQXM.js} +1 -1
  77. package/dist/{chunk-ZE4IHUUO.cjs → chunk-WNEDQTH6.cjs} +2 -2
  78. package/dist/{chunk-CBXILKQZ.cjs → chunk-WPYJW3WM.cjs} +3 -3
  79. package/dist/{chunk-QHXTO525.js → chunk-WYJHDTU7.js} +1 -1
  80. package/dist/{chunk-PROLOLZ5.cjs → chunk-X22PLAP6.cjs} +2 -2
  81. package/dist/chunk-X6GT4H4I.cjs +662 -0
  82. package/dist/{chunk-RLC3EXMV.js → chunk-XM4IN4Q6.js} +2 -2
  83. package/dist/{chunk-ZKGVOXLQ.js → chunk-XOZMGNVS.js} +1 -1
  84. package/dist/chunk-XXXR2AD3.cjs +94 -0
  85. package/dist/{chunk-JC4YCKKL.js → chunk-YI5D4QZP.js} +22 -20
  86. package/dist/{chunk-AR7667VN.cjs → chunk-YJA7OQQZ.cjs} +4 -4
  87. package/dist/{chunk-PAQD6UUF.cjs → chunk-YJIVPYMG.cjs} +3 -3
  88. package/dist/{chunk-JJYHW4PV.js → chunk-YOPWQHNO.js} +1 -1
  89. package/dist/{chunk-LKRQUQZQ.cjs → chunk-YRANVNJG.cjs} +2 -2
  90. package/dist/chunk-ZDJQ643D.js +62 -0
  91. package/dist/components/accordion/index.cjs +3 -3
  92. package/dist/components/accordion/index.js +2 -2
  93. package/dist/components/agenda-calendar/index.cjs +4 -4
  94. package/dist/components/agenda-calendar/index.js +3 -3
  95. package/dist/components/alert/index.cjs +4 -4
  96. package/dist/components/alert/index.js +3 -3
  97. package/dist/components/autocomplete/index.cjs +3 -3
  98. package/dist/components/autocomplete/index.js +2 -2
  99. package/dist/components/bottom-sheet/index.cjs +3 -3
  100. package/dist/components/bottom-sheet/index.js +2 -2
  101. package/dist/components/button/index.cjs +3 -3
  102. package/dist/components/button/index.js +2 -2
  103. package/dist/components/calendar/index.cjs +3 -3
  104. package/dist/components/calendar/index.js +2 -2
  105. package/dist/components/card/index.cjs +3 -3
  106. package/dist/components/card/index.js +2 -2
  107. package/dist/components/carousel/index.cjs +3 -3
  108. package/dist/components/carousel/index.js +2 -2
  109. package/dist/components/checkbox/index.cjs +3 -3
  110. package/dist/components/checkbox/index.js +2 -2
  111. package/dist/components/chip/index.cjs +4 -4
  112. package/dist/components/chip/index.js +3 -3
  113. package/dist/components/close-button/index.cjs +4 -4
  114. package/dist/components/close-button/index.js +3 -3
  115. package/dist/components/color-picker/index.cjs +6 -6
  116. package/dist/components/color-picker/index.js +5 -5
  117. package/dist/components/combobox/index.cjs +4 -4
  118. package/dist/components/combobox/index.js +3 -3
  119. package/dist/components/date-picker/index.cjs +4 -4
  120. package/dist/components/date-picker/index.js +3 -3
  121. package/dist/components/date-range-picker/index.cjs +6 -6
  122. package/dist/components/date-range-picker/index.js +5 -5
  123. package/dist/components/date-time-picker/date-time-picker-indicator.d.cts +2 -2
  124. package/dist/components/date-time-picker/date-time-picker-indicator.d.ts +2 -2
  125. package/dist/components/date-time-picker/date-time-picker.type.d.cts +3 -2
  126. package/dist/components/date-time-picker/date-time-picker.type.d.ts +3 -2
  127. package/dist/components/date-time-picker/index.cjs +8 -9
  128. package/dist/components/date-time-picker/index.d.cts +1 -1
  129. package/dist/components/date-time-picker/index.d.ts +1 -1
  130. package/dist/components/date-time-picker/index.js +7 -8
  131. package/dist/components/dialog/index.cjs +4 -4
  132. package/dist/components/dialog/index.js +3 -3
  133. package/dist/components/dummy-field/index.cjs +3 -3
  134. package/dist/components/dummy-field/index.js +2 -2
  135. package/dist/components/fab/index.cjs +3 -3
  136. package/dist/components/fab/index.js +2 -2
  137. package/dist/components/flip-card/index.cjs +3 -3
  138. package/dist/components/flip-card/index.js +2 -2
  139. package/dist/components/index.d.cts +0 -1
  140. package/dist/components/index.d.ts +0 -1
  141. package/dist/components/list-box/index.cjs +2 -2
  142. package/dist/components/list-box/index.js +1 -1
  143. package/dist/components/menu/index.cjs +3 -3
  144. package/dist/components/menu/index.js +2 -2
  145. package/dist/components/morph-button/index.cjs +3 -3
  146. package/dist/components/morph-button/index.js +2 -2
  147. package/dist/components/number-field/number-field-increment.d.cts +2 -2
  148. package/dist/components/number-field/number-field-increment.d.ts +2 -2
  149. package/dist/components/number-pad/index.cjs +3 -3
  150. package/dist/components/number-pad/index.js +2 -2
  151. package/dist/components/number-stepper/index.cjs +3 -3
  152. package/dist/components/number-stepper/index.js +2 -2
  153. package/dist/components/pager/index.cjs +4 -2
  154. package/dist/components/pager/index.d.cts +2 -2
  155. package/dist/components/pager/index.d.ts +2 -2
  156. package/dist/components/pager/index.js +3 -1
  157. package/dist/components/pager/pager.d.cts +3 -4
  158. package/dist/components/pager/pager.d.ts +3 -4
  159. package/dist/components/pager/pager.recipe.d.cts +19 -1
  160. package/dist/components/pager/pager.recipe.d.ts +19 -1
  161. package/dist/components/pager/pager.type.d.cts +5 -6
  162. package/dist/components/pager/pager.type.d.ts +5 -6
  163. package/dist/components/phone-number-field/index.cjs +14 -14
  164. package/dist/components/phone-number-field/index.js +3 -3
  165. package/dist/components/popover/index.cjs +3 -3
  166. package/dist/components/popover/index.js +2 -2
  167. package/dist/components/radio/index.cjs +3 -3
  168. package/dist/components/radio/index.js +2 -2
  169. package/dist/components/range-calendar/index.cjs +4 -4
  170. package/dist/components/range-calendar/index.js +3 -3
  171. package/dist/components/rating/index.cjs +3 -3
  172. package/dist/components/rating/index.js +2 -2
  173. package/dist/components/search-field/index.cjs +4 -4
  174. package/dist/components/search-field/index.js +3 -3
  175. package/dist/components/segment/index.cjs +4 -4
  176. package/dist/components/segment/index.js +2 -2
  177. package/dist/components/select/index.cjs +3 -3
  178. package/dist/components/select/index.js +2 -2
  179. package/dist/components/slider/index.cjs +2 -2
  180. package/dist/components/slider/index.js +1 -1
  181. package/dist/components/snackbar/index.cjs +3 -3
  182. package/dist/components/snackbar/index.js +2 -2
  183. package/dist/components/switch/index.cjs +3 -3
  184. package/dist/components/switch/index.js +2 -2
  185. package/dist/components/table/index.cjs +4 -4
  186. package/dist/components/table/index.js +3 -3
  187. package/dist/components/tabs/index.cjs +4 -4
  188. package/dist/components/tabs/index.js +3 -3
  189. package/dist/components/tag-group/index.cjs +4 -4
  190. package/dist/components/tag-group/index.js +3 -3
  191. package/dist/components/time-picker/index.cjs +4 -5
  192. package/dist/components/time-picker/index.d.cts +1 -1
  193. package/dist/components/time-picker/index.d.ts +1 -1
  194. package/dist/components/time-picker/index.js +3 -4
  195. package/dist/components/time-picker/time-picker-display.d.cts +3 -3
  196. package/dist/components/time-picker/time-picker-display.d.ts +3 -3
  197. package/dist/components/time-picker/time-picker-indicator.d.cts +2 -2
  198. package/dist/components/time-picker/time-picker-indicator.d.ts +2 -2
  199. package/dist/components/time-picker/time-picker.d.cts +1 -1
  200. package/dist/components/time-picker/time-picker.d.ts +1 -1
  201. package/dist/components/time-picker/time-picker.type.d.cts +11 -1
  202. package/dist/components/time-picker/time-picker.type.d.ts +11 -1
  203. package/dist/components/toast/index.cjs +3 -3
  204. package/dist/components/toast/index.js +2 -2
  205. package/dist/components/toggle-button/index.cjs +3 -3
  206. package/dist/components/toggle-button/index.js +2 -2
  207. package/dist/components/wheel-picker/index.cjs +2 -2
  208. package/dist/components/wheel-picker/index.js +1 -1
  209. package/dist/index.cjs +48 -59
  210. package/dist/index.js +52 -63
  211. package/dist/system/index.cjs +3 -3
  212. package/dist/system/index.js +2 -2
  213. package/dist/utils/time.d.cts +29 -0
  214. package/dist/utils/time.d.ts +29 -0
  215. package/package.json +1 -11
  216. package/dist/chunk-3MRCSXGT.js +0 -73
  217. package/dist/chunk-5E6SHYEQ.cjs +0 -631
  218. package/dist/chunk-6JAGPPZU.cjs +0 -788
  219. package/dist/chunk-CEPX7CKM.cjs +0 -365
  220. package/dist/chunk-CHFPFYNV.js +0 -60
  221. package/dist/chunk-ECR6GPJ6.js +0 -198
  222. package/dist/chunk-GBTNFQXN.cjs +0 -33
  223. package/dist/chunk-GZAGWNQM.cjs +0 -719
  224. package/dist/chunk-ILXKBDC6.cjs +0 -209
  225. package/dist/chunk-IPD3IUE2.cjs +0 -640
  226. package/dist/chunk-P2V6PIM7.cjs +0 -478
  227. package/dist/chunk-Q2BWXT55.cjs +0 -1011
  228. package/dist/chunk-UFKSUELU.cjs +0 -453
  229. package/dist/chunk-UR37LVPU.cjs +0 -382
  230. package/dist/chunk-W4IPOWLY.cjs +0 -198
  231. package/dist/chunk-YSTLHVQV.cjs +0 -73
  232. package/dist/components/time-field/index.cjs +0 -27
  233. package/dist/components/time-field/index.d.cts +0 -52
  234. package/dist/components/time-field/index.d.ts +0 -52
  235. package/dist/components/time-field/index.js +0 -27
  236. package/dist/components/time-field/time-field-field.d.cts +0 -11
  237. package/dist/components/time-field/time-field-field.d.ts +0 -11
  238. package/dist/components/time-field/time-field-period.d.cts +0 -34
  239. package/dist/components/time-field/time-field-period.d.ts +0 -34
  240. package/dist/components/time-field/time-field.context.d.cts +0 -9
  241. package/dist/components/time-field/time-field.context.d.ts +0 -9
  242. package/dist/components/time-field/time-field.d.cts +0 -56
  243. package/dist/components/time-field/time-field.d.ts +0 -56
  244. package/dist/components/time-field/time-field.type.d.cts +0 -72
  245. package/dist/components/time-field/time-field.type.d.ts +0 -72
  246. package/dist/utils/time-mask.d.cts +0 -68
  247. package/dist/utils/time-mask.d.ts +0 -68
@@ -1,52 +0,0 @@
1
- /**
2
- * Three of the slots **are** the `TextField`'s, re-exported rather than wrapped — the
3
- * `TextArea`'s arrangement, and the `DateField`'s.
4
- */
5
- export declare const TimeField: import("react").ForwardRefExoticComponent<{
6
- value?: Date | null;
7
- defaultValue?: Date | null;
8
- onValueChange?: (value: Date | null) => void;
9
- granularity?: import("../../utils/time-mask").TimeGranularity;
10
- hourCycle?: import("../../utils/time-mask").HourCycle;
11
- locale?: string;
12
- timeLabels?: import("../../utils/time-mask").TimeLabels;
13
- periodLabels?: Record<import("../../utils/time-mask").DayPeriod, string>;
14
- children?: import("react").ReactNode;
15
- } & Omit<import("..").TextFieldProps, keyof {
16
- value?: Date | null;
17
- defaultValue?: Date | null;
18
- onValueChange?: (value: Date | null) => void;
19
- granularity?: import("../../utils/time-mask").TimeGranularity;
20
- hourCycle?: import("../../utils/time-mask").HourCycle;
21
- locale?: string;
22
- timeLabels?: import("../../utils/time-mask").TimeLabels;
23
- periodLabels?: Record<import("../../utils/time-mask").DayPeriod, string>;
24
- children?: import("react").ReactNode;
25
- }> & import("react").RefAttributes<import("react-native").View>> & {
26
- Label: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
27
- children?: import("react").ReactNode;
28
- } & import("react").RefAttributes<import("react-native").Text>>;
29
- Field: import("react").ForwardRefExoticComponent<Omit<import("react-native").TextInputProps, "value" | "editable" | "keyboardType" | "maxLength" | "onChangeText"> & Omit<import("../..").TextStyleProps, keyof import("react-native").TextInputProps> & import("react").RefAttributes<import("react-native").TextInput>>;
30
- Period: import("react").ForwardRefExoticComponent<Omit<{
31
- isDecorative?: boolean;
32
- style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
33
- children?: import("react").ReactNode;
34
- } & Omit<import("react-native").ViewProps, keyof {
35
- isDecorative?: boolean;
36
- style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
37
- children?: import("react").ReactNode;
38
- }> & Omit<import("../..").ViewStyleProps, "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDecorative">, "children"> & {
39
- accessibilityLabel?: string;
40
- } & import("react").RefAttributes<import("react-native").View>>;
41
- Description: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
42
- children?: import("react").ReactNode;
43
- } & import("react").RefAttributes<import("react-native").Text>>;
44
- Error: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
45
- children?: import("react").ReactNode;
46
- } & import("react").RefAttributes<import("react-native").Text>>;
47
- };
48
- export { TimeFieldRoot } from './time-field';
49
- export { TimeFieldField } from './time-field-field';
50
- export { TimeFieldPeriod } from './time-field-period';
51
- export { useTimeField } from './time-field.context';
52
- export type { TimeFieldContextValue, TimeFieldFieldProps, TimeFieldPeriodProps, TimeFieldProps, } from './time-field.type';
@@ -1,52 +0,0 @@
1
- /**
2
- * Three of the slots **are** the `TextField`'s, re-exported rather than wrapped — the
3
- * `TextArea`'s arrangement, and the `DateField`'s.
4
- */
5
- export declare const TimeField: import("react").ForwardRefExoticComponent<{
6
- value?: Date | null;
7
- defaultValue?: Date | null;
8
- onValueChange?: (value: Date | null) => void;
9
- granularity?: import("../../utils/time-mask").TimeGranularity;
10
- hourCycle?: import("../../utils/time-mask").HourCycle;
11
- locale?: string;
12
- timeLabels?: import("../../utils/time-mask").TimeLabels;
13
- periodLabels?: Record<import("../../utils/time-mask").DayPeriod, string>;
14
- children?: import("react").ReactNode;
15
- } & Omit<import("..").TextFieldProps, keyof {
16
- value?: Date | null;
17
- defaultValue?: Date | null;
18
- onValueChange?: (value: Date | null) => void;
19
- granularity?: import("../../utils/time-mask").TimeGranularity;
20
- hourCycle?: import("../../utils/time-mask").HourCycle;
21
- locale?: string;
22
- timeLabels?: import("../../utils/time-mask").TimeLabels;
23
- periodLabels?: Record<import("../../utils/time-mask").DayPeriod, string>;
24
- children?: import("react").ReactNode;
25
- }> & import("react").RefAttributes<import("react-native").View>> & {
26
- Label: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
27
- children?: import("react").ReactNode;
28
- } & import("react").RefAttributes<import("react-native").Text>>;
29
- Field: import("react").ForwardRefExoticComponent<Omit<import("react-native").TextInputProps, "value" | "editable" | "keyboardType" | "maxLength" | "onChangeText"> & Omit<import("../..").TextStyleProps, keyof import("react-native").TextInputProps> & import("react").RefAttributes<import("react-native").TextInput>>;
30
- Period: import("react").ForwardRefExoticComponent<Omit<{
31
- isDecorative?: boolean;
32
- style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
33
- children?: import("react").ReactNode;
34
- } & Omit<import("react-native").ViewProps, keyof {
35
- isDecorative?: boolean;
36
- style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
37
- children?: import("react").ReactNode;
38
- }> & Omit<import("../..").ViewStyleProps, "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDecorative">, "children"> & {
39
- accessibilityLabel?: string;
40
- } & import("react").RefAttributes<import("react-native").View>>;
41
- Description: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
42
- children?: import("react").ReactNode;
43
- } & import("react").RefAttributes<import("react-native").Text>>;
44
- Error: import("react").ForwardRefExoticComponent<import("react-native").TextProps & Omit<import("../..").TextStyleProps, keyof import("react-native").TextProps> & {
45
- children?: import("react").ReactNode;
46
- } & import("react").RefAttributes<import("react-native").Text>>;
47
- };
48
- export { TimeFieldRoot } from './time-field';
49
- export { TimeFieldField } from './time-field-field';
50
- export { TimeFieldPeriod } from './time-field-period';
51
- export { useTimeField } from './time-field.context';
52
- export type { TimeFieldContextValue, TimeFieldFieldProps, TimeFieldPeriodProps, TimeFieldProps, } from './time-field.type';
@@ -1,27 +0,0 @@
1
- import {
2
- TimeField,
3
- TimeFieldField,
4
- TimeFieldPeriod,
5
- TimeFieldRoot,
6
- useTimeField
7
- } from "../../chunk-ECR6GPJ6.js";
8
- import "../../chunk-3CPLJJWX.js";
9
- import "../../chunk-5YZUYSV7.js";
10
- import "../../chunk-43S673KF.js";
11
- import "../../chunk-3MRCSXGT.js";
12
- import "../../chunk-JN6IRT2M.js";
13
- import "../../chunk-WFZDAXDI.js";
14
- import "../../chunk-DKVXTMIJ.js";
15
- import "../../chunk-3Q42X6EQ.js";
16
- import "../../chunk-TTZOIXKE.js";
17
- import "../../chunk-36PRYGAM.js";
18
- import "../../chunk-EGLLDKN6.js";
19
- import "../../chunk-Z6JBWRPL.js";
20
- import "../../chunk-M63GFNKV.js";
21
- export {
22
- TimeField,
23
- TimeFieldField,
24
- TimeFieldPeriod,
25
- TimeFieldRoot,
26
- useTimeField
27
- };
@@ -1,11 +0,0 @@
1
- import type { TextInput } from 'react-native';
2
- /**
3
- * The box, masked.
4
- *
5
- * It **is** `TextField.Field` — the same node, the same resolved styles, the same focus
6
- * plumbing, the same `isInvalid` — with the value and the keystroke taken over by the mask.
7
- *
8
- * Inside a `FieldGroup` it leaves the decorators their room, which is what lets
9
- * `TimeField.Period` sit on the trailing edge without the digits running under it.
10
- */
11
- export declare const TimeFieldField: import("react").ForwardRefExoticComponent<Omit<import("react-native").TextInputProps, "value" | "editable" | "keyboardType" | "maxLength" | "onChangeText"> & Omit<import("../..").TextStyleProps, keyof import("react-native").TextInputProps> & import("react").RefAttributes<TextInput>>;
@@ -1,11 +0,0 @@
1
- import type { TextInput } from 'react-native';
2
- /**
3
- * The box, masked.
4
- *
5
- * It **is** `TextField.Field` — the same node, the same resolved styles, the same focus
6
- * plumbing, the same `isInvalid` — with the value and the keystroke taken over by the mask.
7
- *
8
- * Inside a `FieldGroup` it leaves the decorators their room, which is what lets
9
- * `TimeField.Period` sit on the trailing edge without the digits running under it.
10
- */
11
- export declare const TimeFieldField: import("react").ForwardRefExoticComponent<Omit<import("react-native").TextInputProps, "value" | "editable" | "keyboardType" | "maxLength" | "onChangeText"> & Omit<import("../..").TextStyleProps, keyof import("react-native").TextInputProps> & import("react").RefAttributes<TextInput>>;
@@ -1,34 +0,0 @@
1
- import { View } from 'react-native';
2
- /**
3
- * AM or PM, on the trailing edge, and pressing it swaps them.
4
- *
5
- * ```tsx
6
- * <FieldGroup>
7
- * <TimeField.Field />
8
- * <TimeField.Period accessibilityLabel="Morning or afternoon" />
9
- * </FieldGroup>
10
- * ```
11
- *
12
- * **A toggle rather than two letters typed into the box.** The keyboard a time field opens
13
- * is a number pad, which cannot produce them — the legacy field asked for exactly that and
14
- * the letters never arrived. Two halves of a day is also a choice between two things, which
15
- * is a control rather than a value.
16
- *
17
- * **It renders nothing on a twenty-four-hour field**, so the same JSX serves both and a
18
- * locale that switches cycle does not need a branch at the call site.
19
- *
20
- * It goes in a `FieldGroup`, like `DateField.Trigger`: that is the thing that lays a
21
- * decorator over a field and measures it, and the field reads the same measurement to leave
22
- * it room.
23
- */
24
- export declare const TimeFieldPeriod: import("react").ForwardRefExoticComponent<Omit<{
25
- isDecorative?: boolean;
26
- style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
27
- children?: import("react").ReactNode;
28
- } & Omit<import("react-native").ViewProps, keyof {
29
- isDecorative?: boolean;
30
- style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
31
- children?: import("react").ReactNode;
32
- }> & Omit<import("../..").ViewStyleProps, "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDecorative">, "children"> & {
33
- accessibilityLabel?: string;
34
- } & import("react").RefAttributes<View>>;
@@ -1,34 +0,0 @@
1
- import { View } from 'react-native';
2
- /**
3
- * AM or PM, on the trailing edge, and pressing it swaps them.
4
- *
5
- * ```tsx
6
- * <FieldGroup>
7
- * <TimeField.Field />
8
- * <TimeField.Period accessibilityLabel="Morning or afternoon" />
9
- * </FieldGroup>
10
- * ```
11
- *
12
- * **A toggle rather than two letters typed into the box.** The keyboard a time field opens
13
- * is a number pad, which cannot produce them — the legacy field asked for exactly that and
14
- * the letters never arrived. Two halves of a day is also a choice between two things, which
15
- * is a control rather than a value.
16
- *
17
- * **It renders nothing on a twenty-four-hour field**, so the same JSX serves both and a
18
- * locale that switches cycle does not need a branch at the call site.
19
- *
20
- * It goes in a `FieldGroup`, like `DateField.Trigger`: that is the thing that lays a
21
- * decorator over a field and measures it, and the field reads the same measurement to leave
22
- * it room.
23
- */
24
- export declare const TimeFieldPeriod: import("react").ForwardRefExoticComponent<Omit<{
25
- isDecorative?: boolean;
26
- style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
27
- children?: import("react").ReactNode;
28
- } & Omit<import("react-native").ViewProps, keyof {
29
- isDecorative?: boolean;
30
- style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
31
- children?: import("react").ReactNode;
32
- }> & Omit<import("../..").ViewStyleProps, "pointerEvents" | "style" | "children" | "hitSlop" | "id" | "needsOffscreenAlphaCompositing" | "onLayout" | "removeClippedSubviews" | "testID" | "nativeID" | "collapsable" | "collapsableChildren" | "onBlur" | "onFocus" | "renderToHardwareTextureAndroid" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "aria-label" | "accessibilityRole" | "accessibilityState" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "accessibilityHint" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "onAccessibilityAction" | "importantForAccessibility" | "aria-hidden" | "aria-modal" | "role" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "screenReaderFocusable" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "accessibilityLanguage" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "accessibilityRespondsToUserInteraction" | "isDecorative">, "children"> & {
33
- accessibilityLabel?: string;
34
- } & import("react").RefAttributes<View>>;
@@ -1,9 +0,0 @@
1
- import type { TimeFieldContextValue } from './time-field.type';
2
- /**
3
- * R10 — the masked text, the keystroke handler and the period.
4
- *
5
- * It sits **beside** the `TextField`'s context rather than replacing it: the field below
6
- * reads its styles from that one and its value from this one, which is what lets the two
7
- * halves stay the components they already are.
8
- */
9
- export declare const TimeFieldProvider: import("react").Provider<TimeFieldContextValue | null>, useTimeField: () => TimeFieldContextValue;
@@ -1,9 +0,0 @@
1
- import type { TimeFieldContextValue } from './time-field.type';
2
- /**
3
- * R10 — the masked text, the keystroke handler and the period.
4
- *
5
- * It sits **beside** the `TextField`'s context rather than replacing it: the field below
6
- * reads its styles from that one and its value from this one, which is what lets the two
7
- * halves stay the components they already are.
8
- */
9
- export declare const TimeFieldProvider: import("react").Provider<TimeFieldContextValue | null>, useTimeField: () => TimeFieldContextValue;
@@ -1,56 +0,0 @@
1
- import type { View } from 'react-native';
2
- import type { DayPeriod } from '../../utils/time-mask';
3
- /**
4
- * A time, typed.
5
- *
6
- * ```tsx
7
- * <TimeField locale="fr-FR" onValueChange={setStart}>
8
- * <TimeField.Label>Heure de début</TimeField.Label>
9
- * <TimeField.Field />
10
- * </TimeField>
11
- * ```
12
- *
13
- * **It is a `TextField`**, and `DateField`'s sibling in every way that matters: the same
14
- * root, the same variants, the same three text slots re-exported rather than wrapped, and
15
- * one representation — the digits, in order — that `maskTime` is the only thing to turn into
16
- * text.
17
- *
18
- * **The period is not typed.** On a twelve-hour clock the hours cap at 12 and AM or PM comes
19
- * from `TimeField.Period` beside the box. The legacy field asked for the letters to be typed
20
- * into a number pad, which is a keyboard that cannot produce them.
21
- *
22
- * ```tsx
23
- * <TimeField locale="en-US">
24
- * <TimeField.Label>Starts at</TimeField.Label>
25
- * <FieldGroup>
26
- * <TimeField.Field />
27
- * <TimeField.Period accessibilityLabel="Morning or afternoon" />
28
- * </FieldGroup>
29
- * </TimeField>
30
- * ```
31
- *
32
- * **The value is a `Date`**, on the day the field already holds or on today's. That is what
33
- * lets a time compose with a date rather than being a second shape a caller has to merge by
34
- * hand.
35
- */
36
- export declare const TimeFieldRoot: import("react").ForwardRefExoticComponent<{
37
- value?: Date | null;
38
- defaultValue?: Date | null;
39
- onValueChange?: (value: Date | null) => void;
40
- granularity?: import("../../utils/time-mask").TimeGranularity;
41
- hourCycle?: import("../../utils/time-mask").HourCycle;
42
- locale?: string;
43
- timeLabels?: import("../../utils/time-mask").TimeLabels;
44
- periodLabels?: Record<DayPeriod, string>;
45
- children?: import("react").ReactNode;
46
- } & Omit<import("..").TextFieldProps, keyof {
47
- value?: Date | null;
48
- defaultValue?: Date | null;
49
- onValueChange?: (value: Date | null) => void;
50
- granularity?: import("../../utils/time-mask").TimeGranularity;
51
- hourCycle?: import("../../utils/time-mask").HourCycle;
52
- locale?: string;
53
- timeLabels?: import("../../utils/time-mask").TimeLabels;
54
- periodLabels?: Record<DayPeriod, string>;
55
- children?: import("react").ReactNode;
56
- }> & import("react").RefAttributes<View>>;
@@ -1,56 +0,0 @@
1
- import type { View } from 'react-native';
2
- import type { DayPeriod } from '../../utils/time-mask';
3
- /**
4
- * A time, typed.
5
- *
6
- * ```tsx
7
- * <TimeField locale="fr-FR" onValueChange={setStart}>
8
- * <TimeField.Label>Heure de début</TimeField.Label>
9
- * <TimeField.Field />
10
- * </TimeField>
11
- * ```
12
- *
13
- * **It is a `TextField`**, and `DateField`'s sibling in every way that matters: the same
14
- * root, the same variants, the same three text slots re-exported rather than wrapped, and
15
- * one representation — the digits, in order — that `maskTime` is the only thing to turn into
16
- * text.
17
- *
18
- * **The period is not typed.** On a twelve-hour clock the hours cap at 12 and AM or PM comes
19
- * from `TimeField.Period` beside the box. The legacy field asked for the letters to be typed
20
- * into a number pad, which is a keyboard that cannot produce them.
21
- *
22
- * ```tsx
23
- * <TimeField locale="en-US">
24
- * <TimeField.Label>Starts at</TimeField.Label>
25
- * <FieldGroup>
26
- * <TimeField.Field />
27
- * <TimeField.Period accessibilityLabel="Morning or afternoon" />
28
- * </FieldGroup>
29
- * </TimeField>
30
- * ```
31
- *
32
- * **The value is a `Date`**, on the day the field already holds or on today's. That is what
33
- * lets a time compose with a date rather than being a second shape a caller has to merge by
34
- * hand.
35
- */
36
- export declare const TimeFieldRoot: import("react").ForwardRefExoticComponent<{
37
- value?: Date | null;
38
- defaultValue?: Date | null;
39
- onValueChange?: (value: Date | null) => void;
40
- granularity?: import("../../utils/time-mask").TimeGranularity;
41
- hourCycle?: import("../../utils/time-mask").HourCycle;
42
- locale?: string;
43
- timeLabels?: import("../../utils/time-mask").TimeLabels;
44
- periodLabels?: Record<DayPeriod, string>;
45
- children?: import("react").ReactNode;
46
- } & Omit<import("..").TextFieldProps, keyof {
47
- value?: Date | null;
48
- defaultValue?: Date | null;
49
- onValueChange?: (value: Date | null) => void;
50
- granularity?: import("../../utils/time-mask").TimeGranularity;
51
- hourCycle?: import("../../utils/time-mask").HourCycle;
52
- locale?: string;
53
- timeLabels?: import("../../utils/time-mask").TimeLabels;
54
- periodLabels?: Record<DayPeriod, string>;
55
- children?: import("react").ReactNode;
56
- }> & import("react").RefAttributes<View>>;
@@ -1,72 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { TextInputProps } from 'react-native';
3
- import type { TextStyleProps } from '../../system/style-props';
4
- import type { FieldGroupSuffixProps } from '../field-group';
5
- import type { TextFieldProps } from '../text-field';
6
- import type { DayPeriod, HourCycle, TimeGranularity, TimeLabels } from '../../utils/time-mask';
7
- type TimeFieldOwnProps = {
8
- /**
9
- * The time shown. Present means controlled — the field follows it, and `onValueChange` is
10
- * how it asks for a new one.
11
- *
12
- * A `Date`, like everything else in this library that carries a moment: a time on its own
13
- * still lands on a day, and keeping the type lets a `DateField`'s value pass straight
14
- * through. The day is the one already held, or today's when there is none.
15
- */
16
- value?: Date | null;
17
- /** Where an uncontrolled field starts. */
18
- defaultValue?: Date | null;
19
- /** Every edit, with the time the field now holds — or `null` while it is not one yet. */
20
- onValueChange?: (value: Date | null) => void;
21
- /** How far down the time is written. @default 'minute' */
22
- granularity?: TimeGranularity;
23
- /** Twelve hours and a period beside them, or twenty-four. Unset, it is `locale`'s. */
24
- hourCycle?: HourCycle;
25
- /** The hour cycle comes from here when it is not given. @default 'en-US' */
26
- locale?: string;
27
- /**
28
- * What the placeholder calls each part — `{ hours: 'HH', minutes: 'mm', seconds: 'ss' }`.
29
- *
30
- * The letters are a language's and this library does not pick one, so the default is the
31
- * one code is written in. A `placeholder` on the field wins over it.
32
- */
33
- timeLabels?: TimeLabels;
34
- /** What `TimeField.Period` says. @default `{ am: 'AM', pm: 'PM' }` */
35
- periodLabels?: Record<DayPeriod, string>;
36
- children?: ReactNode;
37
- };
38
- /**
39
- * The `TextField`'s root props, plus what a time adds.
40
- *
41
- * Everything the `TextField` understands is here because the root below **is** the
42
- * `TextField`'s.
43
- */
44
- export type TimeFieldProps = TimeFieldOwnProps & Omit<TextFieldProps, keyof TimeFieldOwnProps>;
45
- /**
46
- * `TextField.Field`'s props, less the four the mask owns — the same four `DateField.Field`
47
- * takes over, for the same reasons.
48
- */
49
- export type TimeFieldFieldProps = Omit<TextInputProps, 'editable' | 'value' | 'onChangeText' | 'keyboardType' | 'maxLength'> & Omit<TextStyleProps, keyof TextInputProps>;
50
- /** R14 — it renders a `FieldGroup.Suffix`, so it carries that node's props. */
51
- export type TimeFieldPeriodProps = Omit<FieldGroupSuffixProps, 'children'> & {
52
- /** What a screen reader says. There is no default, for the reason the arrows have none. */
53
- accessibilityLabel?: string;
54
- };
55
- /** R5 — what the slots need, decided once on the root. */
56
- export type TimeFieldContextValue = {
57
- /** What is in the box, masked. */
58
- text: string;
59
- /** A reader's keystroke, on its way through the mask. */
60
- onType: (input: string) => void;
61
- /** The shape being asked for, when the caller gave the field no placeholder of its own. */
62
- placeholder: string;
63
- /** How long a finished time is, so the field can stop the caret at its end. */
64
- length: number;
65
- /** Which half of the day, and how it is written. Meaningless on a twenty-four-hour field. */
66
- period: DayPeriod;
67
- periodLabels: Record<DayPeriod, string>;
68
- onPeriodChange: (period: DayPeriod) => void;
69
- /** Whether there is a period at all — `TimeField.Period` renders nothing without one. */
70
- hasPeriod: boolean;
71
- };
72
- export {};
@@ -1,72 +0,0 @@
1
- import type { ReactNode } from 'react';
2
- import type { TextInputProps } from 'react-native';
3
- import type { TextStyleProps } from '../../system/style-props';
4
- import type { FieldGroupSuffixProps } from '../field-group';
5
- import type { TextFieldProps } from '../text-field';
6
- import type { DayPeriod, HourCycle, TimeGranularity, TimeLabels } from '../../utils/time-mask';
7
- type TimeFieldOwnProps = {
8
- /**
9
- * The time shown. Present means controlled — the field follows it, and `onValueChange` is
10
- * how it asks for a new one.
11
- *
12
- * A `Date`, like everything else in this library that carries a moment: a time on its own
13
- * still lands on a day, and keeping the type lets a `DateField`'s value pass straight
14
- * through. The day is the one already held, or today's when there is none.
15
- */
16
- value?: Date | null;
17
- /** Where an uncontrolled field starts. */
18
- defaultValue?: Date | null;
19
- /** Every edit, with the time the field now holds — or `null` while it is not one yet. */
20
- onValueChange?: (value: Date | null) => void;
21
- /** How far down the time is written. @default 'minute' */
22
- granularity?: TimeGranularity;
23
- /** Twelve hours and a period beside them, or twenty-four. Unset, it is `locale`'s. */
24
- hourCycle?: HourCycle;
25
- /** The hour cycle comes from here when it is not given. @default 'en-US' */
26
- locale?: string;
27
- /**
28
- * What the placeholder calls each part — `{ hours: 'HH', minutes: 'mm', seconds: 'ss' }`.
29
- *
30
- * The letters are a language's and this library does not pick one, so the default is the
31
- * one code is written in. A `placeholder` on the field wins over it.
32
- */
33
- timeLabels?: TimeLabels;
34
- /** What `TimeField.Period` says. @default `{ am: 'AM', pm: 'PM' }` */
35
- periodLabels?: Record<DayPeriod, string>;
36
- children?: ReactNode;
37
- };
38
- /**
39
- * The `TextField`'s root props, plus what a time adds.
40
- *
41
- * Everything the `TextField` understands is here because the root below **is** the
42
- * `TextField`'s.
43
- */
44
- export type TimeFieldProps = TimeFieldOwnProps & Omit<TextFieldProps, keyof TimeFieldOwnProps>;
45
- /**
46
- * `TextField.Field`'s props, less the four the mask owns — the same four `DateField.Field`
47
- * takes over, for the same reasons.
48
- */
49
- export type TimeFieldFieldProps = Omit<TextInputProps, 'editable' | 'value' | 'onChangeText' | 'keyboardType' | 'maxLength'> & Omit<TextStyleProps, keyof TextInputProps>;
50
- /** R14 — it renders a `FieldGroup.Suffix`, so it carries that node's props. */
51
- export type TimeFieldPeriodProps = Omit<FieldGroupSuffixProps, 'children'> & {
52
- /** What a screen reader says. There is no default, for the reason the arrows have none. */
53
- accessibilityLabel?: string;
54
- };
55
- /** R5 — what the slots need, decided once on the root. */
56
- export type TimeFieldContextValue = {
57
- /** What is in the box, masked. */
58
- text: string;
59
- /** A reader's keystroke, on its way through the mask. */
60
- onType: (input: string) => void;
61
- /** The shape being asked for, when the caller gave the field no placeholder of its own. */
62
- placeholder: string;
63
- /** How long a finished time is, so the field can stop the caret at its end. */
64
- length: number;
65
- /** Which half of the day, and how it is written. Meaningless on a twenty-four-hour field. */
66
- period: DayPeriod;
67
- periodLabels: Record<DayPeriod, string>;
68
- onPeriodChange: (period: DayPeriod) => void;
69
- /** Whether there is a period at all — `TimeField.Period` renders nothing without one. */
70
- hasPeriod: boolean;
71
- };
72
- export {};
@@ -1,68 +0,0 @@
1
- /** How far down a time is written. Hours and minutes, or seconds as well. */
2
- export type TimeGranularity = 'minute' | 'second';
3
- /** Twenty-four hours, or twelve and a period beside them. */
4
- export type HourCycle = 12 | 24;
5
- /** Which half of a twelve-hour day. */
6
- export type DayPeriod = 'am' | 'pm';
7
- /** The parts of a time, in the units a clock names them. */
8
- export type TimeParts = {
9
- hours: number;
10
- minutes: number;
11
- seconds: number;
12
- };
13
- /**
14
- * Whether that locale writes twelve hours or twenty-four.
15
- *
16
- * Out of `Intl`, for the reason `dateOrderFor` gives: the platform ships the answer and a
17
- * table here would be a second one, shorter and out of date. `hour12` is what
18
- * `resolvedOptions` calls it, and it is absent on a locale with no hour in its default
19
- * format — twenty-four is the fallback, being what most of the world writes.
20
- */
21
- export declare function hourCycleFor(locale: string): HourCycle;
22
- /** How many characters a finished time is, so a field can stop the caret at the end. */
23
- export declare function timeLength(granularity: TimeGranularity): number;
24
- /** What a placeholder calls each part. The letters are a language's, so they are given. */
25
- export type TimeLabels = {
26
- hours: string;
27
- minutes: string;
28
- seconds: string;
29
- };
30
- /** The shape a reader is being asked for — `HH:mm`, `hh:mm:ss`. */
31
- export declare function timePlaceholder(granularity: TimeGranularity, labels: TimeLabels): string;
32
- /**
33
- * What the reader typed, as a time is written.
34
- *
35
- * Digits only, and the colons are **put back** rather than kept — the `maskDate` argument,
36
- * for the same four reasons: a paste, a keyboard with its own punctuation, a backspace over
37
- * a separator, and a caret dropped into the middle.
38
- *
39
- * **The period is not typed.** A twelve-hour field caps its hours at 12 and takes AM or PM
40
- * from `TimeField.Period` beside it. The legacy field asked for the letters to be typed into
41
- * a number pad, which is a keyboard that cannot produce them.
42
- *
43
- * Each part is clamped as it completes and never raised, exactly as a date's is: `9` on its
44
- * way to `09` is left alone, `75` minutes becomes `59`, and `00` stays `00`.
45
- */
46
- export declare function maskTime(input: string, granularity: TimeGranularity, hourCycle?: HourCycle): string;
47
- /**
48
- * The time those digits are, or `null` while they are not one yet.
49
- *
50
- * On a twelve-hour clock the `period` is what says which half of the day it is, so a time
51
- * with no period given is read as the morning — twelve o'clock included, which is why the
52
- * arithmetic below is a remainder rather than a subtraction: 12 AM is midnight and 12 PM is
53
- * noon, and the naive `hours + 12` gets exactly those two wrong.
54
- */
55
- export declare function parseTime(text: string, granularity: TimeGranularity, hourCycle?: HourCycle, period?: DayPeriod): TimeParts | null;
56
- /** A date's time as this cycle writes it — the inverse of `parseTime`. */
57
- export declare function formatTime(date: Date, granularity: TimeGranularity, hourCycle?: HourCycle): string;
58
- /** Which half of the day that date falls in, for a field that shows a period. */
59
- export declare function periodOf(date: Date): DayPeriod;
60
- /**
61
- * Those parts, on that day.
62
- *
63
- * A time on its own is still a `Date` in this library — the same type the `DateField`
64
- * reports and the one a `DateTimeField` composes from both halves. The day it lands on is
65
- * given rather than assumed, so a caller merging a time into a date they already hold gets
66
- * that date back and not today's.
67
- */
68
- export declare function withTime(day: Date, parts: TimeParts): Date;