@xaui/native 0.9.1-alpha.93 → 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 (238) 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-OPLPLFGK.cjs → chunk-AHKKEM3K.cjs} +66 -23
  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-2SHWOFQV.js → chunk-VQ4OTVET.js} +29 -29
  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 +2 -2
  154. package/dist/components/pager/index.js +1 -1
  155. package/dist/components/phone-number-field/index.cjs +14 -14
  156. package/dist/components/phone-number-field/index.js +3 -3
  157. package/dist/components/popover/index.cjs +3 -3
  158. package/dist/components/popover/index.js +2 -2
  159. package/dist/components/radio/index.cjs +3 -3
  160. package/dist/components/radio/index.js +2 -2
  161. package/dist/components/range-calendar/index.cjs +4 -4
  162. package/dist/components/range-calendar/index.js +3 -3
  163. package/dist/components/rating/index.cjs +3 -3
  164. package/dist/components/rating/index.js +2 -2
  165. package/dist/components/search-field/index.cjs +4 -4
  166. package/dist/components/search-field/index.js +3 -3
  167. package/dist/components/segment/index.cjs +4 -4
  168. package/dist/components/segment/index.js +2 -2
  169. package/dist/components/select/index.cjs +3 -3
  170. package/dist/components/select/index.js +2 -2
  171. package/dist/components/slider/index.cjs +2 -2
  172. package/dist/components/slider/index.js +1 -1
  173. package/dist/components/snackbar/index.cjs +3 -3
  174. package/dist/components/snackbar/index.js +2 -2
  175. package/dist/components/switch/index.cjs +3 -3
  176. package/dist/components/switch/index.js +2 -2
  177. package/dist/components/table/index.cjs +4 -4
  178. package/dist/components/table/index.js +3 -3
  179. package/dist/components/tabs/index.cjs +4 -4
  180. package/dist/components/tabs/index.js +3 -3
  181. package/dist/components/tag-group/index.cjs +4 -4
  182. package/dist/components/tag-group/index.js +3 -3
  183. package/dist/components/time-picker/index.cjs +4 -5
  184. package/dist/components/time-picker/index.d.cts +1 -1
  185. package/dist/components/time-picker/index.d.ts +1 -1
  186. package/dist/components/time-picker/index.js +3 -4
  187. package/dist/components/time-picker/time-picker-display.d.cts +3 -3
  188. package/dist/components/time-picker/time-picker-display.d.ts +3 -3
  189. package/dist/components/time-picker/time-picker-indicator.d.cts +2 -2
  190. package/dist/components/time-picker/time-picker-indicator.d.ts +2 -2
  191. package/dist/components/time-picker/time-picker.d.cts +1 -1
  192. package/dist/components/time-picker/time-picker.d.ts +1 -1
  193. package/dist/components/time-picker/time-picker.type.d.cts +11 -1
  194. package/dist/components/time-picker/time-picker.type.d.ts +11 -1
  195. package/dist/components/toast/index.cjs +3 -3
  196. package/dist/components/toast/index.js +2 -2
  197. package/dist/components/toggle-button/index.cjs +3 -3
  198. package/dist/components/toggle-button/index.js +2 -2
  199. package/dist/components/wheel-picker/index.cjs +2 -2
  200. package/dist/components/wheel-picker/index.js +1 -1
  201. package/dist/index.cjs +47 -60
  202. package/dist/index.js +50 -63
  203. package/dist/system/index.cjs +3 -3
  204. package/dist/system/index.js +2 -2
  205. package/dist/utils/time.d.cts +29 -0
  206. package/dist/utils/time.d.ts +29 -0
  207. package/package.json +1 -11
  208. package/dist/chunk-3MRCSXGT.js +0 -73
  209. package/dist/chunk-5E6SHYEQ.cjs +0 -631
  210. package/dist/chunk-6JAGPPZU.cjs +0 -788
  211. package/dist/chunk-CEPX7CKM.cjs +0 -365
  212. package/dist/chunk-CHFPFYNV.js +0 -60
  213. package/dist/chunk-ECR6GPJ6.js +0 -198
  214. package/dist/chunk-GBTNFQXN.cjs +0 -33
  215. package/dist/chunk-GZAGWNQM.cjs +0 -719
  216. package/dist/chunk-ILXKBDC6.cjs +0 -209
  217. package/dist/chunk-IPD3IUE2.cjs +0 -640
  218. package/dist/chunk-P2V6PIM7.cjs +0 -478
  219. package/dist/chunk-Q2BWXT55.cjs +0 -1011
  220. package/dist/chunk-UFKSUELU.cjs +0 -453
  221. package/dist/chunk-W4IPOWLY.cjs +0 -198
  222. package/dist/chunk-YSTLHVQV.cjs +0 -73
  223. package/dist/components/time-field/index.cjs +0 -27
  224. package/dist/components/time-field/index.d.cts +0 -52
  225. package/dist/components/time-field/index.d.ts +0 -52
  226. package/dist/components/time-field/index.js +0 -27
  227. package/dist/components/time-field/time-field-field.d.cts +0 -11
  228. package/dist/components/time-field/time-field-field.d.ts +0 -11
  229. package/dist/components/time-field/time-field-period.d.cts +0 -34
  230. package/dist/components/time-field/time-field-period.d.ts +0 -34
  231. package/dist/components/time-field/time-field.context.d.cts +0 -9
  232. package/dist/components/time-field/time-field.context.d.ts +0 -9
  233. package/dist/components/time-field/time-field.d.cts +0 -56
  234. package/dist/components/time-field/time-field.d.ts +0 -56
  235. package/dist/components/time-field/time-field.type.d.cts +0 -72
  236. package/dist/components/time-field/time-field.type.d.ts +0 -72
  237. package/dist/utils/time-mask.d.cts +0 -68
  238. package/dist/utils/time-mask.d.ts +0 -68
@@ -0,0 +1,1039 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ function _interopRequireDefault(obj) {
7
+ return obj && obj.__esModule ? obj : {
8
+ default: obj
9
+ };
10
+ }
11
+ function _nullishCoalesce(lhs, rhsFn) {
12
+ if (lhs != null) {
13
+ return lhs;
14
+ } else {
15
+ return rhsFn();
16
+ }
17
+ }
18
+ function _optionalChain(ops) {
19
+ let lastAccessLHS = undefined;
20
+ let value = ops[0];
21
+ let i = 1;
22
+ while (i < ops.length) {
23
+ const op = ops[i];
24
+ const fn = ops[i + 1];
25
+ i += 2;
26
+ if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
27
+ return undefined;
28
+ }
29
+ if (op === 'access' || op === 'optionalAccess') {
30
+ lastAccessLHS = value;
31
+ value = fn(value);
32
+ } else if (op === 'call' || op === 'optionalCall') {
33
+ value = fn((...args) => value.call(lastAccessLHS, ...args));
34
+ lastAccessLHS = undefined;
35
+ }
36
+ }
37
+ return value;
38
+ }
39
+ var _chunk6ZWQDTGQcjs = require('./chunk-6ZWQDTGQ.cjs');
40
+ var _chunkISHMSP6Pcjs = require('./chunk-ISHMSP6P.cjs');
41
+ var _chunkWFEMJCXOcjs = require('./chunk-WFEMJCXO.cjs');
42
+ var _chunk7EIHHOHPcjs = require('./chunk-7EIHHOHP.cjs');
43
+ var _chunkHBYT7B47cjs = require('./chunk-HBYT7B47.cjs');
44
+ var _chunk7DPL3ZDScjs = require('./chunk-7DPL3ZDS.cjs');
45
+ var _chunkGSZDN6EZcjs = require('./chunk-GSZDN6EZ.cjs');
46
+ var _chunkFHNIGHN5cjs = require('./chunk-FHNIGHN5.cjs');
47
+ var _chunkSL3V7R2Ycjs = require('./chunk-SL3V7R2Y.cjs');
48
+ var _chunkCDRGTUYFcjs = require('./chunk-CDRGTUYF.cjs');
49
+ var _chunkIIAQISBGcjs = require('./chunk-IIAQISBG.cjs');
50
+ var _chunkTK44VBIEcjs = require('./chunk-TK44VBIE.cjs');
51
+
52
+ // src/components/agenda-calendar/agenda-calendar-day.tsx
53
+ var _react = require('react');
54
+ var _reactnative = require('react-native');
55
+
56
+ // src/components/agenda-calendar/agenda-calendar.context.ts
57
+ var [AgendaCalendarProvider, useAgendaCalendar] = _chunkCDRGTUYFcjs.createSlotContext.call(void 0, "AgendaCalendar");
58
+
59
+ // src/components/agenda-calendar/agenda-calendar-day.tsx
60
+ var _jsxruntime = require('react/jsx-runtime');
61
+ var AgendaCalendarDay = _react.forwardRef.call(void 0, function AgendaCalendarDay2({
62
+ date,
63
+ children,
64
+ isDisabled,
65
+ accessibilityRole,
66
+ accessibilityState,
67
+ accessibilityLabel,
68
+ style,
69
+ onPress,
70
+ onPressIn,
71
+ onPressOut,
72
+ ...props
73
+ }, ref) {
74
+ const {
75
+ dayStyle,
76
+ daySelectedStyle,
77
+ dayLabelStyle,
78
+ dayLabelSelectedStyle,
79
+ dayLabelMutedStyle,
80
+ dotStyle,
81
+ dotSelectedStyle,
82
+ value,
83
+ locale,
84
+ hasEvent,
85
+ isDayEnabled,
86
+ select
87
+ } = useAgendaCalendar();
88
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
89
+ const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, {
90
+ onPressIn,
91
+ onPressOut
92
+ });
93
+ const isSelected = value !== void 0 && _chunkISHMSP6Pcjs.isSameDay.call(void 0, date, value);
94
+ const disabled = _nullishCoalesce(isDisabled, () => !isDayEnabled(date));
95
+ const marked = hasEvent(date);
96
+ const handlePress = _react.useCallback.call(void 0, event => {
97
+ select(date);
98
+ _optionalChain([onPress, 'optionalCall', _2 => _2(event)]);
99
+ }, [date, onPress, select]);
100
+ const label = _react.useMemo.call(void 0, () => fullDate(date, locale), [date, locale]);
101
+ const content = _nullishCoalesce(children, () => (/* @__PURE__ */_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, {
102
+ children: [/* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
103
+ style: [dayLabelStyle, disabled && dayLabelMutedStyle, isSelected && dayLabelSelectedStyle],
104
+ children: date.getDate()
105
+ }), marked ? /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
106
+ style: isSelected ? dotSelectedStyle : dotStyle
107
+ }) : null]
108
+ })));
109
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkHBYT7B47cjs.PressableFeedback, {
110
+ ref,
111
+ isPressed,
112
+ isDisabled: disabled,
113
+ accessibilityRole: _nullishCoalesce(accessibilityRole, () => "button"),
114
+ accessibilityLabel: _nullishCoalesce(accessibilityLabel, () => marked ? `${label} \u2014 ${MARKED_SUFFIX}` : label),
115
+ accessibilityState: {
116
+ disabled,
117
+ selected: isSelected,
118
+ ...accessibilityState
119
+ },
120
+ ...rest,
121
+ style: [dayStyle, isSelected && daySelectedStyle, styleProps, typeof style === "function" ? style({
122
+ pressed: isPressed
123
+ }) : style],
124
+ onPress: handlePress,
125
+ onPressIn: press.onPressIn,
126
+ onPressOut: press.onPressOut,
127
+ children: content
128
+ });
129
+ });
130
+ AgendaCalendarDay.displayName = "XAUI.AgendaCalendar.Day";
131
+ var MARKED_SUFFIX = "has events";
132
+ function fullDate(date, locale) {
133
+ try {
134
+ return new Intl.DateTimeFormat(locale, {
135
+ weekday: "long",
136
+ day: "numeric",
137
+ month: "long",
138
+ year: "numeric"
139
+ }).format(date);
140
+ } catch (e) {
141
+ return `${date.getDate()} ${_chunkISHMSP6Pcjs.monthLabel.call(void 0, date, locale)}`;
142
+ }
143
+ }
144
+
145
+ // src/components/agenda-calendar/agenda-calendar-header.tsx
146
+
147
+ var AgendaCalendarHeader = _react.forwardRef.call(void 0, function AgendaCalendarHeader2({
148
+ children,
149
+ style,
150
+ ...props
151
+ }, ref) {
152
+ const {
153
+ headerStyle,
154
+ glyph
155
+ } = useAgendaCalendar();
156
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
157
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkGSZDN6EZcjs.IconContext.Provider, {
158
+ value: glyph,
159
+ children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
160
+ ref,
161
+ ...rest,
162
+ style: [headerStyle, styleProps, style],
163
+ children
164
+ })
165
+ });
166
+ });
167
+ AgendaCalendarHeader.displayName = "XAUI.AgendaCalendar.Header";
168
+
169
+ // src/components/agenda-calendar/agenda-calendar-month-picker.tsx
170
+
171
+ var _reactnativereanimated = require('react-native-reanimated');
172
+ var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
173
+ var AnimatedScrollView = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.ScrollView);
174
+ var MIDDLE = 3;
175
+ var OPEN_MS = 160;
176
+ var AgendaCalendarMonthPicker = _react.forwardRef.call(void 0, function AgendaCalendarMonthPicker2({
177
+ format = "short",
178
+ style,
179
+ contentContainerStyle,
180
+ ...props
181
+ }, ref) {
182
+ const {
183
+ pickerStyle,
184
+ pickerItemStyle,
185
+ pickerItemSelectedStyle,
186
+ pickerItemLabelStyle,
187
+ pickerItemLabelSelectedStyle,
188
+ days,
189
+ locale,
190
+ canGoByMonths,
191
+ goToMonthInYear
192
+ } = useAgendaCalendar();
193
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
194
+ const theme = _chunkIIAQISBGcjs.useXAUITheme.call(void 0);
195
+ const names = _react.useMemo.call(void 0, () => _chunkISHMSP6Pcjs.monthNames.call(void 0, locale, format), [locale, format]);
196
+ const shownMonth = days[MIDDLE].getMonth();
197
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, AnimatedScrollView, {
198
+ ref,
199
+ ...rest,
200
+ horizontal: true,
201
+ style: [pickerStyle, styleProps, style],
202
+ contentContainerStyle: [{
203
+ alignItems: "center",
204
+ gap: theme.spacing(2)
205
+ }, contentContainerStyle],
206
+ showsHorizontalScrollIndicator: false,
207
+ entering: _reactnativereanimated.FadeIn.duration(OPEN_MS),
208
+ children: names.map((name, index) => {
209
+ const disabled = !canGoByMonths(index - shownMonth);
210
+ const isSelected = index === shownMonth;
211
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkHBYT7B47cjs.PressableFeedback, {
212
+ isDisabled: disabled,
213
+ accessibilityRole: "button",
214
+ accessibilityLabel: name,
215
+ accessibilityState: {
216
+ selected: isSelected,
217
+ disabled
218
+ },
219
+ style: [pickerItemStyle, isSelected && pickerItemSelectedStyle],
220
+ onPress: () => goToMonthInYear(index),
221
+ children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
222
+ numberOfLines: 1,
223
+ style: [pickerItemLabelStyle, isSelected && pickerItemLabelSelectedStyle],
224
+ children: name
225
+ })
226
+ }, name);
227
+ })
228
+ });
229
+ });
230
+ AgendaCalendarMonthPicker.displayName = "XAUI.AgendaCalendar.MonthPicker";
231
+
232
+ // src/components/agenda-calendar/agenda-calendar-nav.tsx
233
+
234
+ var AgendaCalendarNav = _react.forwardRef.call(void 0, function AgendaCalendarNav2({
235
+ children,
236
+ style,
237
+ ...props
238
+ }, ref) {
239
+ const {
240
+ navStyle
241
+ } = useAgendaCalendar();
242
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
243
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
244
+ ref,
245
+ ...rest,
246
+ style: [navStyle, styleProps, style],
247
+ children
248
+ });
249
+ });
250
+ AgendaCalendarNav.displayName = "XAUI.AgendaCalendar.Nav";
251
+
252
+ // src/components/agenda-calendar/agenda-calendar-nav-button.tsx
253
+
254
+ var sheet = _reactnative.StyleSheet.create({
255
+ back: {
256
+ transform: [{
257
+ rotate: "90deg"
258
+ }]
259
+ },
260
+ forward: {
261
+ transform: [{
262
+ rotate: "-90deg"
263
+ }]
264
+ }
265
+ });
266
+ function navButton(step, name, rotation) {
267
+ const Component = _react.forwardRef.call(void 0, function NavButton({
268
+ children,
269
+ step: overrideStep,
270
+ accessibilityRole,
271
+ accessibilityState,
272
+ style,
273
+ onPress,
274
+ onPressIn,
275
+ onPressOut,
276
+ ...props
277
+ }, ref) {
278
+ const {
279
+ navButtonStyle,
280
+ page,
281
+ canPage,
282
+ isDisabled
283
+ } = useAgendaCalendar();
284
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
285
+ const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, {
286
+ onPressIn,
287
+ onPressOut
288
+ });
289
+ const steps = _nullishCoalesce(overrideStep, () => step);
290
+ const disabled = isDisabled || !canPage(steps);
291
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkHBYT7B47cjs.PressableFeedback, {
292
+ ref,
293
+ isPressed,
294
+ isDisabled: disabled,
295
+ accessibilityRole: _nullishCoalesce(accessibilityRole, () => "button"),
296
+ accessibilityState: {
297
+ disabled,
298
+ ...accessibilityState
299
+ },
300
+ ...rest,
301
+ style: [navButtonStyle, styleProps, style],
302
+ onPress: event => {
303
+ _optionalChain([onPress, 'optionalCall', _3 => _3(event)]);
304
+ page(steps);
305
+ },
306
+ onPressIn: press.onPressIn,
307
+ onPressOut: press.onPressOut,
308
+ children: _nullishCoalesce(children, () => (/* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
309
+ style: rotation,
310
+ children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkGSZDN6EZcjs.Icon, {
311
+ as: _chunkGSZDN6EZcjs.ChevronDownIcon
312
+ })
313
+ })))
314
+ });
315
+ });
316
+ Component.displayName = name;
317
+ return Component;
318
+ }
319
+ var AgendaCalendarPreviousButton = navButton(-1, "XAUI.AgendaCalendar.PreviousButton", sheet.back);
320
+ var AgendaCalendarNextButton = navButton(1, "XAUI.AgendaCalendar.NextButton", sheet.forward);
321
+
322
+ // src/components/agenda-calendar/agenda-calendar.tsx
323
+
324
+ // src/components/agenda-calendar/agenda-calendar.recipe.ts
325
+ var SLOTS = ["root", "header", "nav", "navButton", "today", "todayDisabled", "todayLabel", "week", "picker", "pickerItem"];
326
+ var VARIANT_TOKENS = {
327
+ // One entry, and it is still a table: `resolveTint` only maps roles a variant declared,
328
+ // and without one the `color` a caller writes would never reach the pill's word. `fg` is
329
+ // `accent` — the word reads as the accent by default and takes the tint when there is
330
+ // one; `foreground` here left it plain, and left it `undefined` (RN's black) in dark
331
+ // wherever the token failed to resolve.
332
+ default: {
333
+ bg: "default",
334
+ fg: "accent"
335
+ }
336
+ };
337
+ var SIZES = {
338
+ sm: {
339
+ button: 32,
340
+ today: "xs"
341
+ },
342
+ md: {
343
+ button: 36,
344
+ today: "sm"
345
+ },
346
+ lg: {
347
+ button: 40,
348
+ today: "md"
349
+ }
350
+ };
351
+ function sizeAxis(step) {
352
+ const {
353
+ button,
354
+ today
355
+ } = step;
356
+ return theme => ({
357
+ navButton: {
358
+ width: button,
359
+ height: button,
360
+ borderRadius: button / 2
361
+ },
362
+ // A pill the height of the strip's own cell and a nav button, so the row of months
363
+ // sits where the row of days did without the header shifting.
364
+ pickerItem: {
365
+ height: button,
366
+ paddingHorizontal: theme.spacing(3),
367
+ borderRadius: button / 2
368
+ },
369
+ today: {
370
+ height: button,
371
+ paddingHorizontal: theme.spacing(3),
372
+ borderRadius: button / 2
373
+ },
374
+ todayLabel: {
375
+ fontSize: theme.fontSizes[today],
376
+ lineHeight: theme.lineHeights[today]
377
+ },
378
+ // The header is at least a button tall whether or not it holds one, so a card with a
379
+ // bare title does not sit shorter than the one beside it.
380
+ header: {
381
+ minHeight: button
382
+ },
383
+ root: {
384
+ gap: theme.spacing(2)
385
+ }
386
+ });
387
+ }
388
+ var agendaCalendarRecipe = _chunkSL3V7R2Ycjs.createRecipe.call(void 0, {
389
+ slots: SLOTS,
390
+ base: theme => ({
391
+ root: {
392
+ width: "100%",
393
+ backgroundColor: theme.colors.surface,
394
+ borderRadius: theme.radius["2xl"],
395
+ padding: theme.spacing(3)
396
+ },
397
+ header: {
398
+ flexDirection: "row",
399
+ alignItems: "center",
400
+ justifyContent: "space-between",
401
+ gap: theme.spacing(2)
402
+ },
403
+ /** The cluster on the trailing end: back, today, forward. */
404
+ nav: {
405
+ flexDirection: "row",
406
+ alignItems: "center",
407
+ gap: theme.spacing(1)
408
+ },
409
+ navButton: {
410
+ alignItems: "center",
411
+ justifyContent: "center"
412
+ },
413
+ // A bordered pill rather than a filled one: it sits between two bare chevrons, and a
414
+ // filled button there would read as the primary action of the whole card.
415
+ today: {
416
+ alignItems: "center",
417
+ justifyContent: "center",
418
+ borderWidth: theme.borderWidth.default,
419
+ borderColor: theme.colors.border
420
+ },
421
+ todayLabel: {
422
+ fontFamily: theme.fontFamilies.body,
423
+ fontWeight: theme.fontWeights.medium,
424
+ color: theme.colors.accent
425
+ },
426
+ week: {
427
+ flexDirection: "row"
428
+ },
429
+ // A row that scrolls sideways where the week was. `flexGrow: 0` so the `ScrollView`
430
+ // does not eat the height the card gives it; the gap between pills is the
431
+ // `contentContainerStyle`'s, which a `ScrollView` refuses on its own style.
432
+ picker: {
433
+ flexGrow: 0
434
+ },
435
+ pickerItem: {
436
+ alignItems: "center",
437
+ justifyContent: "center"
438
+ },
439
+ // The pill goes dead once this week is the one on screen, and that is a **per-button**
440
+ // state rather than the recipe's `disabled` — which dims the whole card. Without a look
441
+ // of its own it would read as pressable and do nothing, which is the state the button
442
+ // exists to avoid on the chevrons beside it.
443
+ todayDisabled: {
444
+ opacity: theme.opacity.disabled
445
+ }
446
+ }),
447
+ variantTokens: VARIANT_TOKENS,
448
+ // The word is the one thing here a variant colours: the accent by default, the tint when
449
+ // a `color` is set. Guarded because a resolve pass with no variant token leaves `fg`
450
+ // unset, and spreading `{ color: undefined }` over the base would drop it to RN's black.
451
+ paint: (_theme, colors) => colors.fg ? {
452
+ todayLabel: {
453
+ color: colors.fg
454
+ }
455
+ } : {},
456
+ variants: {
457
+ size: {
458
+ sm: sizeAxis(SIZES.sm),
459
+ md: sizeAxis(SIZES.md),
460
+ lg: sizeAxis(SIZES.lg)
461
+ },
462
+ /** The card's own corner, not the chosen day's — that one is the calendar's. */
463
+ radius: _chunkSL3V7R2Ycjs.radiusAxis.call(void 0, "root")
464
+ },
465
+ states: {
466
+ disabled: theme => ({
467
+ root: {
468
+ opacity: theme.opacity.disabled
469
+ }
470
+ })
471
+ },
472
+ // `variant: 'default'` so both passes resolve the one token — without it `resolve` runs
473
+ // `paint` with no colours and `tint` bails before the word, so a `color` prop never
474
+ // reached the pill and dark mode fell through to black.
475
+ defaultVariants: {
476
+ variant: "default",
477
+ size: "md"
478
+ }
479
+ });
480
+
481
+ // src/components/agenda-calendar/agenda-calendar.tsx
482
+
483
+ var DAYS_IN_WEEK = 7;
484
+ var MONTHS_IN_YEAR = 12;
485
+ var DEFAULT_YEAR_SPAN = 50;
486
+ var AgendaCalendarRoot = _react.forwardRef.call(void 0, function AgendaCalendar({
487
+ children,
488
+ variant,
489
+ size = "md",
490
+ radius,
491
+ color,
492
+ value: controlledValue,
493
+ defaultValue,
494
+ onValueChange,
495
+ week: controlledWeek,
496
+ defaultWeek,
497
+ onWeekChange,
498
+ view: controlledView,
499
+ defaultView,
500
+ onViewChange,
501
+ events,
502
+ minValue,
503
+ maxValue,
504
+ firstDayOfWeek,
505
+ locale,
506
+ isDisabled = false,
507
+ asChild = false,
508
+ style,
509
+ ...props
510
+ }, ref) {
511
+ const theme = _chunkIIAQISBGcjs.useXAUITheme.call(void 0);
512
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
513
+ const [value, setValue] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
514
+ value: controlledValue,
515
+ defaultValue,
516
+ onChange: onValueChange
517
+ });
518
+ const [fallbackWeek] = _react.useState.call(void 0, () => _chunkISHMSP6Pcjs.startOfDay.call(void 0, _nullishCoalesce(defaultValue, () => (/* @__PURE__ */new Date()))));
519
+ const [week, setWeek] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
520
+ value: controlledWeek,
521
+ defaultValue: _nullishCoalesce(defaultWeek, () => fallbackWeek),
522
+ onChange: onWeekChange
523
+ });
524
+ const [view, setView] = _chunk7EIHHOHPcjs.useControllableState.call(void 0, {
525
+ value: controlledView,
526
+ defaultValue: _nullishCoalesce(defaultView, () => "week"),
527
+ onChange: onViewChange
528
+ });
529
+ const resolvedLocale = _nullishCoalesce(locale, () => deviceLocale());
530
+ const weekStart = _nullishCoalesce(firstDayOfWeek, () => _chunkISHMSP6Pcjs.firstDayOfWeekFor.call(void 0, resolvedLocale));
531
+ const cellSelection = {
532
+ variant,
533
+ size,
534
+ radius
535
+ };
536
+ const cells = _chunk6ZWQDTGQcjs.calendarRecipe.resolve({
537
+ theme,
538
+ selection: cellSelection,
539
+ states: {
540
+ disabled: isDisabled
541
+ }
542
+ });
543
+ const cellTint = color ? _chunk6ZWQDTGQcjs.calendarRecipe.tint({
544
+ theme,
545
+ color,
546
+ selection: cellSelection
547
+ }) : void 0;
548
+ const selection = {
549
+ size,
550
+ radius
551
+ };
552
+ const styles = agendaCalendarRecipe.resolve({
553
+ theme,
554
+ selection,
555
+ states: {
556
+ disabled: isDisabled
557
+ }
558
+ });
559
+ const tint = color ? agendaCalendarRecipe.tint({
560
+ theme,
561
+ color,
562
+ selection
563
+ }) : void 0;
564
+ const days = _react.useMemo.call(void 0, () => _chunkISHMSP6Pcjs.weekGrid.call(void 0, week, weekStart), [week, weekStart]);
565
+ const marked = _react.useMemo.call(void 0, () => {
566
+ const keys = /* @__PURE__ */new Set();
567
+ for (const event of _nullishCoalesce(events, () => [])) keys.add(_chunkISHMSP6Pcjs.startOfDay.call(void 0, event).getTime());
568
+ return keys;
569
+ }, [events]);
570
+ const bounds = _react.useMemo.call(void 0, () => ({
571
+ min: minValue,
572
+ max: maxValue
573
+ }), [minValue, maxValue]);
574
+ const hasEvent = _react.useCallback.call(void 0, date => marked.has(_chunkISHMSP6Pcjs.startOfDay.call(void 0, date).getTime()), [marked]);
575
+ const isDayEnabled = _react.useCallback.call(void 0, date => !isDisabled && _chunkISHMSP6Pcjs.isWithinBounds.call(void 0, date, bounds), [bounds, isDisabled]);
576
+ const select = _react.useCallback.call(void 0, date => {
577
+ if (!_chunkISHMSP6Pcjs.isWithinBounds.call(void 0, date, bounds)) return;
578
+ setValue(_chunkISHMSP6Pcjs.startOfDay.call(void 0, date));
579
+ }, [bounds, setValue]);
580
+ const goByWeeks = _react.useCallback.call(void 0, step => {
581
+ if (step === 0) return;
582
+ setWeek(current => _chunkISHMSP6Pcjs.addDays.call(void 0, current, step * DAYS_IN_WEEK));
583
+ }, [setWeek]);
584
+ const canGoByWeeks = _react.useCallback.call(void 0, step => {
585
+ const target = _chunkISHMSP6Pcjs.weekGrid.call(void 0, _chunkISHMSP6Pcjs.addDays.call(void 0, week, step * DAYS_IN_WEEK), weekStart);
586
+ return target.some(day => _chunkISHMSP6Pcjs.isWithinBounds.call(void 0, day, bounds));
587
+ }, [bounds, week, weekStart]);
588
+ const goByMonths = _react.useCallback.call(void 0, step => {
589
+ if (step === 0) return;
590
+ setWeek(current => _chunkISHMSP6Pcjs.addMonths.call(void 0, current, step));
591
+ }, [setWeek]);
592
+ const canGoByMonths = _react.useCallback.call(void 0, step => {
593
+ const target = _chunkISHMSP6Pcjs.weekGrid.call(void 0, _chunkISHMSP6Pcjs.addMonths.call(void 0, week, step), weekStart);
594
+ return target.some(day => _chunkISHMSP6Pcjs.isWithinBounds.call(void 0, day, bounds));
595
+ }, [bounds, week, weekStart]);
596
+ const goByYears = _react.useCallback.call(void 0, step => {
597
+ if (step === 0) return;
598
+ setWeek(current => _chunkISHMSP6Pcjs.addMonths.call(void 0, current, step * MONTHS_IN_YEAR));
599
+ }, [setWeek]);
600
+ const canGoByYears = _react.useCallback.call(void 0, step => {
601
+ const target = _chunkISHMSP6Pcjs.weekGrid.call(void 0, _chunkISHMSP6Pcjs.addMonths.call(void 0, week, step * MONTHS_IN_YEAR), weekStart);
602
+ return target.some(day => _chunkISHMSP6Pcjs.isWithinBounds.call(void 0, day, bounds));
603
+ }, [bounds, week, weekStart]);
604
+ const page = _react.useCallback.call(void 0, step => {
605
+ if (view === "year") goByYears(step);else if (view === "month") goByMonths(step);else goByWeeks(step);
606
+ }, [view, goByYears, goByMonths, goByWeeks]);
607
+ const canPage = _react.useCallback.call(void 0, step => {
608
+ if (view === "year") return canGoByYears(step);
609
+ if (view === "month") return canGoByMonths(step);
610
+ return canGoByWeeks(step);
611
+ }, [view, canGoByYears, canGoByMonths, canGoByWeeks]);
612
+ const goToYear = _react.useCallback.call(void 0, year => {
613
+ setWeek(current => _chunkISHMSP6Pcjs.addMonths.call(void 0, current, (year - current.getFullYear()) * MONTHS_IN_YEAR));
614
+ setView("month");
615
+ }, [setWeek, setView]);
616
+ const goToMonthInYear = _react.useCallback.call(void 0, monthIndex => {
617
+ setWeek(current => _chunkISHMSP6Pcjs.addMonths.call(void 0, current, monthIndex - current.getMonth()));
618
+ setView("week");
619
+ }, [setWeek, setView]);
620
+ const yearRange = _react.useMemo.call(void 0, () => {
621
+ const now = (/* @__PURE__ */new Date()).getFullYear();
622
+ return {
623
+ first: _nullishCoalesce(_optionalChain([bounds, 'access', _4 => _4.min, 'optionalAccess', _5 => _5.getFullYear, 'call', _6 => _6()]), () => now - DEFAULT_YEAR_SPAN),
624
+ last: _nullishCoalesce(_optionalChain([bounds, 'access', _7 => _7.max, 'optionalAccess', _8 => _8.getFullYear, 'call', _9 => _9()]), () => now + DEFAULT_YEAR_SPAN)
625
+ };
626
+ }, [bounds.min, bounds.max]);
627
+ const goToToday = _react.useCallback.call(void 0, () => {
628
+ const today = _chunkISHMSP6Pcjs.startOfDay.call(void 0, /* @__PURE__ */new Date());
629
+ setWeek(today);
630
+ setView("week");
631
+ select(today);
632
+ }, [setWeek, setView, select]);
633
+ const isOnToday = _react.useMemo.call(void 0, () => _chunkISHMSP6Pcjs.isSameDay.call(void 0, _chunkISHMSP6Pcjs.startOfWeek.call(void 0, week, weekStart), _chunkISHMSP6Pcjs.startOfWeek.call(void 0, /* @__PURE__ */new Date(), weekStart)), [week, weekStart]);
634
+ const isTodayResolved = _react.useMemo.call(void 0, () => view === "week" && isOnToday && value !== void 0 && _chunkISHMSP6Pcjs.isSameDay.call(void 0, value, /* @__PURE__ */new Date()), [view, isOnToday, value]);
635
+ const context = _react.useMemo.call(void 0, () => {
636
+ const title = _reactnative.StyleSheet.flatten([cells.title]);
637
+ const disc = _reactnative.StyleSheet.flatten([cells.daySelected, _optionalChain([cellTint, 'optionalAccess', _10 => _10.daySelected])]);
638
+ return {
639
+ headerStyle: styles.header,
640
+ navStyle: styles.nav,
641
+ navButtonStyle: styles.navButton,
642
+ pickerStyle: styles.picker,
643
+ pickerItemStyle: styles.pickerItem,
644
+ pickerItemSelectedStyle: {
645
+ backgroundColor: disc.backgroundColor
646
+ },
647
+ pickerItemLabelStyle: cells.dayLabel,
648
+ pickerItemLabelSelectedStyle: cellTint ? [cells.dayLabelSelected, cellTint.dayLabelSelected] : cells.dayLabelSelected,
649
+ todayStyle: styles.today,
650
+ todayDisabledStyle: styles.todayDisabled,
651
+ todayLabelStyle: tint ? [styles.todayLabel, tint.todayLabel] : styles.todayLabel,
652
+ weekStyle: styles.week,
653
+ // The four below are the calendar's own slots, unchanged: same title, same column
654
+ // headings, same cell, same mark.
655
+ titleStyle: cells.title,
656
+ weekdaysStyle: cells.weekdays,
657
+ weekdayStyle: cells.weekday,
658
+ dayStyle: cells.day,
659
+ daySelectedStyle: cellTint ? [cells.daySelected, cellTint.daySelected] : cells.daySelected,
660
+ dayLabelStyle: cells.dayLabel,
661
+ dayLabelSelectedStyle: cellTint ? [cells.dayLabelSelected, cellTint.dayLabelSelected] : cells.dayLabelSelected,
662
+ dayLabelMutedStyle: cells.dayLabelMuted,
663
+ dotStyle: cells.dot,
664
+ // `dot` first, because the size axis puts the mark's width and corner there and a
665
+ // `dotSelected` handed over alone is a coloured node with no size.
666
+ dotSelectedStyle: [cells.dot, cellTint ? cellTint.dotSelected : cells.dotSelected],
667
+ glyph: {
668
+ size: title.fontSize,
669
+ color: typeof title.color === "string" ? title.color : void 0
670
+ },
671
+ days,
672
+ value,
673
+ locale: resolvedLocale,
674
+ isDisabled,
675
+ view,
676
+ setView,
677
+ hasEvent,
678
+ isDayEnabled,
679
+ select,
680
+ goByWeeks,
681
+ canGoByWeeks,
682
+ goByMonths,
683
+ canGoByMonths,
684
+ goByYears,
685
+ canGoByYears,
686
+ page,
687
+ canPage,
688
+ goToYear,
689
+ goToMonthInYear,
690
+ yearRange,
691
+ goToToday,
692
+ isOnToday,
693
+ isTodayResolved
694
+ };
695
+ }, [styles, tint, cells, cellTint, days, value, resolvedLocale, isDisabled, view, setView, hasEvent, isDayEnabled, select, goByWeeks, canGoByWeeks, goByMonths, canGoByMonths, goByYears, canGoByYears, page, canPage, goToYear, goToMonthInYear, yearRange, goToToday, isOnToday, isTodayResolved]);
696
+ const rootStyle = [styles.root, styleProps, style];
697
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, AgendaCalendarProvider, {
698
+ value: context,
699
+ children: asChild ? /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkCDRGTUYFcjs.Slot, {
700
+ ref,
701
+ ...rest,
702
+ style: rootStyle,
703
+ children
704
+ }) : /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
705
+ ref,
706
+ ...rest,
707
+ style: rootStyle,
708
+ children
709
+ })
710
+ });
711
+ });
712
+ AgendaCalendarRoot.displayName = "XAUI.AgendaCalendar.Root";
713
+ function deviceLocale() {
714
+ try {
715
+ return new Intl.DateTimeFormat().resolvedOptions().locale;
716
+ } catch (e2) {
717
+ return "en";
718
+ }
719
+ }
720
+
721
+ // src/components/agenda-calendar/agenda-calendar-title.tsx
722
+
723
+ var MIDDLE2 = 3;
724
+ var AgendaCalendarTitle = _react.forwardRef.call(void 0, function AgendaCalendarTitle2({
725
+ children,
726
+ accessibilityRole,
727
+ style,
728
+ ...props
729
+ }, ref) {
730
+ const {
731
+ titleStyle,
732
+ days,
733
+ locale
734
+ } = useAgendaCalendar();
735
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
736
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
737
+ ref,
738
+ accessibilityRole: _nullishCoalesce(accessibilityRole, () => "header"),
739
+ style: [titleStyle, styleProps, style],
740
+ ...rest,
741
+ children: _nullishCoalesce(children, () => _chunkISHMSP6Pcjs.monthLabel.call(void 0, days[MIDDLE2], locale))
742
+ });
743
+ });
744
+ AgendaCalendarTitle.displayName = "XAUI.AgendaCalendar.Title";
745
+
746
+ // src/components/agenda-calendar/agenda-calendar-today-button.tsx
747
+
748
+ var AgendaCalendarTodayButton = _react.forwardRef.call(void 0, function AgendaCalendarTodayButton2({
749
+ children,
750
+ accessibilityRole,
751
+ accessibilityState,
752
+ style,
753
+ onPress,
754
+ onPressIn,
755
+ onPressOut,
756
+ ...props
757
+ }, ref) {
758
+ const {
759
+ todayStyle,
760
+ todayDisabledStyle,
761
+ todayLabelStyle,
762
+ goToToday,
763
+ isTodayResolved,
764
+ isDisabled
765
+ } = useAgendaCalendar();
766
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
767
+ const [isPressed, press] = _chunk7DPL3ZDScjs.usePressState.call(void 0, {
768
+ onPressIn,
769
+ onPressOut
770
+ });
771
+ const disabled = isDisabled || isTodayResolved;
772
+ const text = _chunkFHNIGHN5cjs.childrenToString.call(void 0, children);
773
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkHBYT7B47cjs.PressableFeedback, {
774
+ ref,
775
+ isPressed,
776
+ isDisabled: disabled,
777
+ accessibilityRole: _nullishCoalesce(accessibilityRole, () => "button"),
778
+ accessibilityState: {
779
+ disabled,
780
+ ...accessibilityState
781
+ },
782
+ ...rest,
783
+ style: [todayStyle, disabled && todayDisabledStyle, styleProps, style],
784
+ onPress: event => {
785
+ _optionalChain([onPress, 'optionalCall', _11 => _11(event)]);
786
+ goToToday();
787
+ },
788
+ onPressIn: press.onPressIn,
789
+ onPressOut: press.onPressOut,
790
+ children: text !== null ? /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
791
+ style: todayLabelStyle,
792
+ children: text
793
+ }) : children
794
+ });
795
+ });
796
+ AgendaCalendarTodayButton.displayName = "XAUI.AgendaCalendar.TodayButton";
797
+
798
+ // src/components/agenda-calendar/agenda-calendar-week.tsx
799
+
800
+ var _reactnativegesturehandler = require('react-native-gesture-handler');
801
+ var SWIPE_DISTANCE = 48;
802
+ var SWIPE_VELOCITY = 360;
803
+ var DRAG_FOLLOW = 0.5;
804
+ var SPRING = {
805
+ damping: 18,
806
+ stiffness: 220,
807
+ mass: 0.6
808
+ };
809
+ const _worklet_15620349857844_init_data = {
810
+ code: "function chunkSIOSYITDCjs1(){const{drag}=this.__closure;return{transform:[{translateX:drag.get()}]};}",
811
+ location: "/home/runner/work/xaui/xaui/packages/native/dist/chunk-SIOSYITD.cjs",
812
+ sourceMap: "{\"version\":3,\"names\":[\"chunkSIOSYITDCjs1\",\"drag\",\"__closure\",\"transform\",\"translateX\",\"get\"],\"sources\":[\"/home/runner/work/xaui/xaui/packages/native/dist/chunk-SIOSYITD.cjs\"],\"mappings\":\"AAs0BuE,SAAAA,iBAAMA,CAAA,QAAAC,IAAA,OAAAC,SAAA,CAEvE,MAAO,CAAEC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,IAAI,CAACI,GAAG,CAAC,CAAE,CAAC,CAAE,CAAC,CACpD\",\"ignoreList\":[]}"
813
+ };
814
+ var AgendaCalendarWeek = _react.forwardRef.call(void 0, function AgendaCalendarWeek2({
815
+ children,
816
+ swipeable = true,
817
+ style,
818
+ ...props
819
+ }, ref) {
820
+ const {
821
+ weekStyle,
822
+ days,
823
+ goByWeeks,
824
+ canGoByWeeks,
825
+ isDisabled
826
+ } = useAgendaCalendar();
827
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
828
+ const drag = _reactnativereanimated.useSharedValue.call(void 0, 0);
829
+ const page = _react.useCallback.call(void 0, direction => {
830
+ if (canGoByWeeks(direction)) goByWeeks(direction);
831
+ }, [canGoByWeeks, goByWeeks]);
832
+ const pan = _reactnativegesturehandler.Gesture.Pan().enabled(swipeable && !isDisabled).activeOffsetX([-12, 12]).failOffsetY([-16, 16]).onUpdate(event => {
833
+ drag.set(event.translationX * DRAG_FOLLOW);
834
+ }).onEnd(event => {
835
+ const forward = event.translationX <= -SWIPE_DISTANCE || event.velocityX <= -SWIPE_VELOCITY;
836
+ const backward = event.translationX >= SWIPE_DISTANCE || event.velocityX >= SWIPE_VELOCITY;
837
+ if (forward) _reactnativereanimated.runOnJS.call(void 0, page)(1);else if (backward) _reactnativereanimated.runOnJS.call(void 0, page)(-1);
838
+ drag.set(_reactnativereanimated.withSpring.call(void 0, 0, SPRING));
839
+ }).onFinalize(() => {
840
+ drag.set(_reactnativereanimated.withSpring.call(void 0, 0, SPRING));
841
+ });
842
+ const slide = _reactnativereanimated.useAnimatedStyle.call(void 0, function chunkSIOSYITDCjs1Factory({
843
+ _worklet_15620349857844_init_data,
844
+ drag
845
+ }) {
846
+ const _e = [new global.Error(), -2, -27];
847
+ const chunkSIOSYITDCjs1 = function () {
848
+ return {
849
+ transform: [{
850
+ translateX: drag.get()
851
+ }]
852
+ };
853
+ };
854
+ chunkSIOSYITDCjs1.__closure = {
855
+ drag
856
+ };
857
+ chunkSIOSYITDCjs1.__workletHash = 15620349857844;
858
+ chunkSIOSYITDCjs1.__pluginVersion = "0.7.4";
859
+ chunkSIOSYITDCjs1.__initData = _worklet_15620349857844_init_data;
860
+ chunkSIOSYITDCjs1.__stackDetails = _e;
861
+ return chunkSIOSYITDCjs1;
862
+ }({
863
+ _worklet_15620349857844_init_data,
864
+ drag
865
+ }), [drag]);
866
+ const cells = days.map(date => /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
867
+ style: CELL,
868
+ children: typeof children === "function" ? children(date) : /* @__PURE__ */_jsxruntime.jsx.call(void 0, AgendaCalendarDay, {
869
+ date
870
+ })
871
+ }, date.getTime()));
872
+ if (!swipeable) {
873
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
874
+ ref,
875
+ ...rest,
876
+ style: [weekStyle, styleProps, style],
877
+ children: cells
878
+ });
879
+ }
880
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativegesturehandler.GestureDetector, {
881
+ gesture: pan,
882
+ children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnativereanimated2.default.View, {
883
+ ref,
884
+ ...rest,
885
+ style: [weekStyle, slide, styleProps, style],
886
+ children: cells
887
+ })
888
+ });
889
+ });
890
+ AgendaCalendarWeek.displayName = "XAUI.AgendaCalendar.Week";
891
+ var CELL = {
892
+ width: "14.2857%",
893
+ alignItems: "center"
894
+ };
895
+
896
+ // src/components/agenda-calendar/agenda-calendar-weekdays.tsx
897
+
898
+ var AgendaCalendarWeekdays = _react.forwardRef.call(void 0, function AgendaCalendarWeekdays2({
899
+ children,
900
+ style,
901
+ ...props
902
+ }, ref) {
903
+ const {
904
+ weekdaysStyle,
905
+ weekdayStyle,
906
+ days,
907
+ locale
908
+ } = useAgendaCalendar();
909
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
910
+ const names = _chunkISHMSP6Pcjs.weekdayNames.call(void 0, locale, days[0].getDay());
911
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.View, {
912
+ ref,
913
+ accessibilityElementsHidden: true,
914
+ importantForAccessibility: "no-hide-descendants",
915
+ ...rest,
916
+ style: [weekdaysStyle, styleProps, style],
917
+ children: _nullishCoalesce(children, () => names.map((name, index) => /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
918
+ style: weekdayStyle,
919
+ children: name
920
+ }, days[index].getTime())))
921
+ });
922
+ });
923
+ AgendaCalendarWeekdays.displayName = "XAUI.AgendaCalendar.Weekdays";
924
+
925
+ // src/components/agenda-calendar/agenda-calendar-year-picker.tsx
926
+
927
+ var AnimatedScrollView2 = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.ScrollView);
928
+ var MIDDLE3 = 3;
929
+ var OPEN_MS2 = 160;
930
+ var AgendaCalendarYearPicker = _react.forwardRef.call(void 0, function AgendaCalendarYearPicker2({
931
+ firstYear,
932
+ lastYear,
933
+ style,
934
+ onLayout,
935
+ contentContainerStyle,
936
+ ...props
937
+ }, ref) {
938
+ const {
939
+ pickerStyle,
940
+ pickerItemStyle,
941
+ pickerItemSelectedStyle,
942
+ pickerItemLabelStyle,
943
+ pickerItemLabelSelectedStyle,
944
+ days,
945
+ yearRange,
946
+ canGoByYears,
947
+ goToYear
948
+ } = useAgendaCalendar();
949
+ const [styleProps, rest] = _chunkTK44VBIEcjs.useStyleProps.call(void 0, props);
950
+ const theme = _chunkIIAQISBGcjs.useXAUITheme.call(void 0);
951
+ const first = _nullishCoalesce(firstYear, () => yearRange.first);
952
+ const last = _nullishCoalesce(lastYear, () => yearRange.last);
953
+ const shownYear = days[MIDDLE3].getFullYear();
954
+ const years = _react.useMemo.call(void 0, () => Array.from({
955
+ length: last - first + 1
956
+ }, (_, index) => first + index), [first, last]);
957
+ const scroller = _react.useRef.call(void 0, null);
958
+ const refs = _chunkWFEMJCXOcjs.useMergedRef.call(void 0, scroller, ref);
959
+ const selectedX = _react.useRef.call(void 0, 0);
960
+ const [isPlaced, setIsPlaced] = _react.useState.call(void 0, false);
961
+ const centre = viewportWidth => {
962
+ if (isPlaced || viewportWidth === 0) return;
963
+ _optionalChain([scroller, 'access', _12 => _12.current, 'optionalAccess', _13 => _13.scrollTo, 'call', _14 => _14({
964
+ x: Math.max(0, selectedX.current - viewportWidth / 2),
965
+ animated: false
966
+ })]);
967
+ setIsPlaced(true);
968
+ };
969
+ const place = event => {
970
+ _optionalChain([onLayout, 'optionalCall', _15 => _15(event)]);
971
+ centre(event.nativeEvent.layout.width);
972
+ };
973
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, AnimatedScrollView2, {
974
+ ref: refs,
975
+ ...rest,
976
+ horizontal: true,
977
+ style: [pickerStyle, styleProps, style],
978
+ contentContainerStyle: [{
979
+ alignItems: "center",
980
+ gap: theme.spacing(2)
981
+ }, contentContainerStyle],
982
+ showsHorizontalScrollIndicator: false,
983
+ onLayout: place,
984
+ entering: _reactnativereanimated.FadeIn.duration(OPEN_MS2),
985
+ children: years.map(year => {
986
+ const disabled = !canGoByYears(year - shownYear);
987
+ const isSelected = year === shownYear;
988
+ return /* @__PURE__ */_jsxruntime.jsx.call(void 0, _chunkHBYT7B47cjs.PressableFeedback, {
989
+ isDisabled: disabled,
990
+ accessibilityRole: "button",
991
+ accessibilityLabel: `${year}`,
992
+ accessibilityState: {
993
+ selected: isSelected,
994
+ disabled
995
+ },
996
+ style: [pickerItemStyle, isSelected && pickerItemSelectedStyle],
997
+ onLayout: isSelected ? event => {
998
+ selectedX.current = event.nativeEvent.layout.x;
999
+ } : void 0,
1000
+ onPress: () => goToYear(year),
1001
+ children: /* @__PURE__ */_jsxruntime.jsx.call(void 0, _reactnative.Text, {
1002
+ style: [pickerItemLabelStyle, isSelected && pickerItemLabelSelectedStyle],
1003
+ children: year
1004
+ })
1005
+ }, year);
1006
+ })
1007
+ });
1008
+ });
1009
+ AgendaCalendarYearPicker.displayName = "XAUI.AgendaCalendar.YearPicker";
1010
+
1011
+ // src/components/agenda-calendar/index.ts
1012
+ var AgendaCalendar2 = Object.assign(AgendaCalendarRoot, {
1013
+ Header: AgendaCalendarHeader,
1014
+ Title: AgendaCalendarTitle,
1015
+ Nav: AgendaCalendarNav,
1016
+ PreviousButton: AgendaCalendarPreviousButton,
1017
+ NextButton: AgendaCalendarNextButton,
1018
+ TodayButton: AgendaCalendarTodayButton,
1019
+ Weekdays: AgendaCalendarWeekdays,
1020
+ Week: AgendaCalendarWeek,
1021
+ Day: AgendaCalendarDay,
1022
+ MonthPicker: AgendaCalendarMonthPicker,
1023
+ YearPicker: AgendaCalendarYearPicker
1024
+ });
1025
+ exports.useAgendaCalendar = useAgendaCalendar;
1026
+ exports.AgendaCalendarDay = AgendaCalendarDay;
1027
+ exports.AgendaCalendarHeader = AgendaCalendarHeader;
1028
+ exports.AgendaCalendarMonthPicker = AgendaCalendarMonthPicker;
1029
+ exports.AgendaCalendarNav = AgendaCalendarNav;
1030
+ exports.AgendaCalendarPreviousButton = AgendaCalendarPreviousButton;
1031
+ exports.AgendaCalendarNextButton = AgendaCalendarNextButton;
1032
+ exports.agendaCalendarRecipe = agendaCalendarRecipe;
1033
+ exports.AgendaCalendarRoot = AgendaCalendarRoot;
1034
+ exports.AgendaCalendarTitle = AgendaCalendarTitle;
1035
+ exports.AgendaCalendarTodayButton = AgendaCalendarTodayButton;
1036
+ exports.AgendaCalendarWeek = AgendaCalendarWeek;
1037
+ exports.AgendaCalendarWeekdays = AgendaCalendarWeekdays;
1038
+ exports.AgendaCalendarYearPicker = AgendaCalendarYearPicker;
1039
+ exports.AgendaCalendar = AgendaCalendar2;