@fde-desktop/fde-core 0.4.7 → 0.4.9

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 (284) hide show
  1. package/dist/AccordionChevron-DxpOyInK.js +26 -0
  2. package/dist/AccordionChevron-kn5kSrEc.cjs +1 -0
  3. package/dist/ActionIcon-Drh4p6Fv.js +145 -0
  4. package/dist/ActionIcon-alk2zZD6.cjs +1 -0
  5. package/dist/AppEmptyState-BWCUbf-B.cjs +1 -0
  6. package/dist/AppEmptyState-Bxpit0JV.js +49 -0
  7. package/dist/AppIcon-BU7a3ZNH.cjs +1 -0
  8. package/dist/AppIcon-XumS3bIG.js +80 -0
  9. package/dist/AppMenuBar-B9U0n1Vv.cjs +1 -0
  10. package/dist/AppMenuBar-CnIEVjr8.js +2049 -0
  11. package/dist/Box-DSKR_qaa.js +1579 -0
  12. package/dist/Box-zW6Twge8.cjs +1 -0
  13. package/dist/Button-DMlnrqyx.cjs +1 -0
  14. package/dist/Button-wTOTQKxF.js +178 -0
  15. package/dist/CalendarApp-B_e1B1Yn.cjs +1 -0
  16. package/dist/CalendarApp-C-l9D6nd.cjs +1 -0
  17. package/dist/CalendarApp-D0ftTCTG.js +1399 -0
  18. package/dist/Center-CmxXB9ql.js +25 -0
  19. package/dist/Center-DKUE2pER.cjs +1 -0
  20. package/dist/CheckIcon-CZhtJD1O.cjs +1 -0
  21. package/dist/CheckIcon-N5qBqXQJ.js +25 -0
  22. package/dist/CodeServerApp-BOoGwZ7r.cjs +1 -0
  23. package/dist/CodeServerApp-Be3I5EGg.cjs +1 -0
  24. package/dist/CodeServerApp-DW18EZxa.js +150 -0
  25. package/dist/ColorPicker-BCNqi02x.js +997 -0
  26. package/dist/ColorPicker-BrDE7tMO.cjs +1 -0
  27. package/dist/Colors-ClnDxnyA.js +15 -0
  28. package/dist/Colors-zP2AFgU3.cjs +1 -0
  29. package/dist/CreateItemApp-B12M1E_1.cjs +1 -0
  30. package/dist/CreateItemApp-TAAprby3.js +400 -0
  31. package/dist/CreateItemApp-ePB6ujNl.cjs +1 -0
  32. package/dist/DeviceInfoApp-BMF18BGo.cjs +1 -0
  33. package/dist/DeviceInfoApp-DRy0H3aT.cjs +1 -0
  34. package/dist/DeviceInfoApp-lgpwkeRR.js +223 -0
  35. package/dist/DownloadProgress-EoyCaD5O.js +174 -0
  36. package/dist/DownloadProgress-VNdj22U8.cjs +1 -0
  37. package/dist/FileIcon-7JaSR3Gn.js +89 -0
  38. package/dist/FileIcon-CIXopWLv.cjs +1 -0
  39. package/dist/FilePickerApp-DaMgEqKh.js +409 -0
  40. package/dist/FilePickerApp-DjmuSFqa.cjs +1 -0
  41. package/dist/FilesApp-Bp7wfrBZ.cjs +1 -0
  42. package/dist/FilesApp-BpJJRKhi.cjs +1 -0
  43. package/dist/FilesApp-Cj94QG5o.js +225 -0
  44. package/dist/Group-CtBJSfCo.js +48 -0
  45. package/dist/Group-Dsrf6lEK.cjs +1 -0
  46. package/dist/ImageViewerApp-BaLP3gkO.js +69 -0
  47. package/dist/ImageViewerApp-DlHGeB3S.cjs +1 -0
  48. package/dist/ImageViewerApp-DoXd_Swu.cjs +1 -0
  49. package/dist/ImageViewerMenuBar-CabGSi9r.js +87 -0
  50. package/dist/ImageViewerMenuBar-SAI7UNz7.cjs +1 -0
  51. package/dist/ImageViewerMenuBar-_Jr29gii.cjs +1 -0
  52. package/dist/MenuEditApp-BJjlPTOa.cjs +1 -0
  53. package/dist/MenuEditApp-BTRppYnD.js +497 -0
  54. package/dist/MenuEditApp-JPsGT-S3.cjs +1 -0
  55. package/dist/MenuEditMenuBar-BydGkqMw.cjs +1 -0
  56. package/dist/MenuEditMenuBar-DptlwVPQ.cjs +1 -0
  57. package/dist/MenuEditMenuBar-x1IQrHP2.js +60 -0
  58. package/dist/NotesApp-BOcRGO7w.cjs +1 -0
  59. package/dist/NotesApp-CQe7UfBC.js +364 -0
  60. package/dist/NotesApp-OL07JXRE.cjs +1 -0
  61. package/dist/NotesMenuBar-BSI_2Y7p.cjs +1 -0
  62. package/dist/NotesMenuBar-Df6aW85J.cjs +1 -0
  63. package/dist/NotesMenuBar-VhpIe68v.js +62 -0
  64. package/dist/Paper-BX_9odR6.js +30 -0
  65. package/dist/Paper-D8-BaBx2.cjs +1 -0
  66. package/dist/PdfApp-CNEbty5v.cjs +1 -0
  67. package/dist/PdfApp-CVv3ZCaM.cjs +1 -0
  68. package/dist/PdfApp-DL_R9-Nc.js +39 -0
  69. package/dist/PdfMenuBar--E6kDyrT.cjs +1 -0
  70. package/dist/PdfMenuBar-DZCLSOpR.js +39 -0
  71. package/dist/PdfMenuBar-Dj5cJUkg.cjs +1 -0
  72. package/dist/SettingsApp-BlmHuAjT.js +1831 -0
  73. package/dist/SettingsApp-CNvIgf5B.cjs +1 -0
  74. package/dist/SettingsApp-DWxanNE4.cjs +1 -0
  75. package/dist/SettingsMenuBar-CBoOBCfx.cjs +1 -0
  76. package/dist/SettingsMenuBar-DQooFkZN.cjs +1 -0
  77. package/dist/SettingsMenuBar-YWiJHaxq.js +42 -0
  78. package/dist/Slider-BUiHxjKO.cjs +1 -0
  79. package/dist/Slider-t-NcD60t.js +1176 -0
  80. package/dist/Stack-Bp1Ek2Gp.js +34 -0
  81. package/dist/Stack-D4jAiRfc.cjs +1 -0
  82. package/dist/StorybookApp-CDLV_kja.cjs +1 -0
  83. package/dist/StorybookApp-DKwlPCmo.js +10 -0
  84. package/dist/TerminalApp-BCB7i1lR.cjs +1 -0
  85. package/dist/TerminalApp-BYc_gHLe.js +326 -0
  86. package/dist/TerminalApp-Dviz6aP2.cjs +1 -0
  87. package/dist/TerminalMenuBar-D5tPmgR_.js +113 -0
  88. package/dist/TerminalMenuBar-DNshPmCa.cjs +1 -0
  89. package/dist/TerminalMenuBar-HzMSR7XP.cjs +1 -0
  90. package/dist/TextInput-C-JtGWn1.js +981 -0
  91. package/dist/TextInput-CrsmcOip.cjs +1 -0
  92. package/dist/Tooltip-D5Cd9wtz.cjs +1 -0
  93. package/dist/Tooltip-DOeIvhrO.js +1142 -0
  94. package/dist/UnstyledButton-DGaG-e_G.js +25 -0
  95. package/dist/UnstyledButton-DX2pTahr.cjs +1 -0
  96. package/dist/UploaderApp-C6xA5Rrf2.cjs +1 -0
  97. package/dist/UploaderApp-DnHIRxB_.cjs +1 -0
  98. package/dist/UploaderApp-qBfpukR_.js +488 -0
  99. package/dist/VscIcon-CcMdrFoJ.cjs +1 -0
  100. package/dist/VscIcon-DBfVnArE.js +8 -0
  101. package/dist/create-safe-context-Bboj0GWC.cjs +1 -0
  102. package/dist/create-safe-context-XT2cxc14.js +12 -0
  103. package/dist/desktopStore-CZoA9VHO.cjs +1 -0
  104. package/dist/desktopStore-F8bgLqFl.js +1768 -0
  105. package/dist/getRuntime-BFK0-8R1.cjs +1 -0
  106. package/dist/getRuntime-DAPqFH2W.js +63 -0
  107. package/dist/imageViewerStore-BB_tssZR.cjs +1 -0
  108. package/dist/imageViewerStore-C5kWz0o7.js +50 -0
  109. package/dist/index.cjs +1 -5642
  110. package/dist/index.css +2 -9192
  111. package/dist/index.d.ts +2258 -2019
  112. package/dist/index.js +4826 -4798
  113. package/dist/is-element-Bu_JY8Qy.js +7 -0
  114. package/dist/is-element-CdV0xajp.cjs +1 -0
  115. package/dist/menuEditStore-CTeM_dns.cjs +1 -0
  116. package/dist/menuEditStore-Cj1zAwxQ.js +38 -0
  117. package/dist/notesStore-BCEl1D_v.cjs +1 -0
  118. package/dist/notesStore-BPyRTHEc.js +36 -0
  119. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  120. package/dist/settingsAppStore-BDQ3ts1y.js +29 -0
  121. package/dist/settingsAppStore-CMBc13VU.cjs +1 -0
  122. package/dist/terminalStore-IWdf4Mm6.js +30 -0
  123. package/dist/terminalStore-iIuyodfK.cjs +1 -0
  124. package/dist/use-merged-ref-BT8_u6vW.js +25 -0
  125. package/dist/use-merged-ref-n9Gw9LNn.cjs +1 -0
  126. package/dist/use-resolved-styles-api-8OXE2oRq.cjs +1 -0
  127. package/dist/use-resolved-styles-api-DNUlJJZf.js +21 -0
  128. package/dist/use-uncontrolled-A4hm9ATM.js +23 -0
  129. package/dist/use-uncontrolled-DDJVQiM_.cjs +1 -0
  130. package/dist/useAdaptiveDimensions-AVDc_qPa.js +40 -0
  131. package/dist/useAdaptiveDimensions-CfITBJ_m.cjs +1 -0
  132. package/dist/useCloseInterceptor-BZd3VILp.js +51 -0
  133. package/dist/useCloseInterceptor-yntBEzNc.cjs +1 -0
  134. package/dist/useDynamicIcon-Bf0t2foA.js +22 -0
  135. package/dist/useDynamicIcon-DJ_il30E.cjs +1 -0
  136. package/dist/useMenuBarUtils-nJIPJGIQ.cjs +1 -0
  137. package/dist/useMenuBarUtils-nmu9yehT.js +6 -0
  138. package/dist/useOpenApp-CBIm7Gzl.js +279 -0
  139. package/dist/useOpenApp-DW4x79Zg.cjs +1 -0
  140. package/dist/useResolvedUrl-BkMPM1fM.cjs +1 -0
  141. package/dist/useResolvedUrl-DQpLqOoL.js +30 -0
  142. package/package.json +7 -3
  143. package/dist/CalendarApp-CHLUCAI7.css +0 -744
  144. package/dist/CalendarApp-K7ZOUZ6C.js +0 -2
  145. package/dist/CalendarApp-OTGEERSS.cjs +0 -8
  146. package/dist/CodeServerApp-5KZGO7HL.css +0 -75
  147. package/dist/CodeServerApp-LUZFCQBI.js +0 -3
  148. package/dist/CodeServerApp-P3TMJPLY.cjs +0 -9
  149. package/dist/CreateItemApp-ESQ42VHH.js +0 -8
  150. package/dist/CreateItemApp-PQB5GTFG.css +0 -107
  151. package/dist/CreateItemApp-RFE3REWZ.cjs +0 -14
  152. package/dist/DeviceInfoApp-XNIS6ZY6.js +0 -5
  153. package/dist/DeviceInfoApp-ZNLQNOKI.cjs +0 -11
  154. package/dist/DeviceInfoApp-ZSMRSITP.css +0 -7
  155. package/dist/FilesApp-4GEU64QN.js +0 -8
  156. package/dist/FilesApp-E6L5W3T2.css +0 -1817
  157. package/dist/FilesApp-QSLB5IWR.cjs +0 -14
  158. package/dist/ImageViewerApp-N2Q7E7WZ.css +0 -215
  159. package/dist/ImageViewerApp-NCVDKLB3.js +0 -11
  160. package/dist/ImageViewerApp-QB373H5Z.cjs +0 -17
  161. package/dist/ImageViewerMenuBar-I3TFKQPS.cjs +0 -14
  162. package/dist/ImageViewerMenuBar-TV5C6TM2.js +0 -5
  163. package/dist/ImageViewerMenuBar-XLK4LIHW.css +0 -56
  164. package/dist/MenuEditApp-5EFYAPFC.cjs +0 -15
  165. package/dist/MenuEditApp-V5XOPIHX.js +0 -9
  166. package/dist/MenuEditApp-YA6HSAMJ.css +0 -94
  167. package/dist/MenuEditMenuBar-7VHMZNRM.css +0 -56
  168. package/dist/MenuEditMenuBar-GF6L4PGZ.cjs +0 -15
  169. package/dist/MenuEditMenuBar-IUXFPZE5.js +0 -6
  170. package/dist/NotesApp-2YNT7Y3D.js +0 -10
  171. package/dist/NotesApp-IAEE7YHU.cjs +0 -16
  172. package/dist/NotesApp-TQ6IHDNX.css +0 -302
  173. package/dist/NotesMenuBar-25LKN3SE.cjs +0 -15
  174. package/dist/NotesMenuBar-MXLOX7OT.css +0 -56
  175. package/dist/NotesMenuBar-SRV3AIAL.js +0 -6
  176. package/dist/PdfApp-67XIX6AM.js +0 -10
  177. package/dist/PdfApp-BUIC5U5H.css +0 -206
  178. package/dist/PdfApp-GZ6RHTBR.cjs +0 -16
  179. package/dist/PdfMenuBar-NLZC6JHS.js +0 -4
  180. package/dist/PdfMenuBar-QUM72EE4.css +0 -56
  181. package/dist/PdfMenuBar-WBRTKMLN.cjs +0 -13
  182. package/dist/SettingsApp-BPLMGPNK.cjs +0 -20
  183. package/dist/SettingsApp-JVOSEFH3.css +0 -283
  184. package/dist/SettingsApp-LUDIXCYY.js +0 -14
  185. package/dist/SettingsMenuBar-5CBSSMVM.css +0 -56
  186. package/dist/SettingsMenuBar-VLT6TTCM.js +0 -6
  187. package/dist/SettingsMenuBar-Y5QEXDEO.cjs +0 -15
  188. package/dist/StorybookApp-NQ244BER.css +0 -7
  189. package/dist/StorybookApp-NZDV4X3Y.js +0 -1
  190. package/dist/StorybookApp-VF3KIMU3.cjs +0 -7
  191. package/dist/TerminalApp-CDGWRBFJ.cjs +0 -10
  192. package/dist/TerminalApp-EAATMIMX.css +0 -77
  193. package/dist/TerminalApp-GCKJCM55.js +0 -4
  194. package/dist/TerminalMenuBar-3J26O26Q.css +0 -56
  195. package/dist/TerminalMenuBar-7BH7MGNJ.cjs +0 -14
  196. package/dist/TerminalMenuBar-7JAEQUZ4.js +0 -5
  197. package/dist/UploaderApp-6KV3TGCT.css +0 -1817
  198. package/dist/UploaderApp-FJC2J4I5.js +0 -10
  199. package/dist/UploaderApp-HLXJYJZQ.cjs +0 -16
  200. package/dist/chunk-2PSTHGTD.cjs +0 -42
  201. package/dist/chunk-2RQX7QBP.cjs +0 -148
  202. package/dist/chunk-43W6UDUZ.cjs +0 -19
  203. package/dist/chunk-4E45FBAH.js +0 -223
  204. package/dist/chunk-4E4U2A25.cjs +0 -237
  205. package/dist/chunk-4QHX7CMN.cjs +0 -38
  206. package/dist/chunk-4XURSNM4.js +0 -43
  207. package/dist/chunk-4ZCRYHL6.js +0 -407
  208. package/dist/chunk-5C6IQE42.cjs +0 -35
  209. package/dist/chunk-5HUYQDQF.js +0 -36
  210. package/dist/chunk-5NOHYJNH.js +0 -84
  211. package/dist/chunk-5QFZW6HW.js +0 -2241
  212. package/dist/chunk-5YH6AKEO.js +0 -146
  213. package/dist/chunk-756GPSPM.js +0 -283
  214. package/dist/chunk-7WUYUTPN.js +0 -2293
  215. package/dist/chunk-7XCMBW64.js +0 -162
  216. package/dist/chunk-7Y7HB7FB.cjs +0 -53
  217. package/dist/chunk-ABIAPZ6S.cjs +0 -45
  218. package/dist/chunk-ACHGJKCI.cjs +0 -286
  219. package/dist/chunk-BQCD5RAF.cjs +0 -48
  220. package/dist/chunk-BQL3YXMV.js +0 -17429
  221. package/dist/chunk-C3XER4N3.js +0 -442
  222. package/dist/chunk-C6BEZNAM.cjs +0 -45
  223. package/dist/chunk-CILU6BWC.cjs +0 -548
  224. package/dist/chunk-CV5PUHAE.cjs +0 -86
  225. package/dist/chunk-D5MVFFID.js +0 -42
  226. package/dist/chunk-D7R55WWT.js +0 -1601
  227. package/dist/chunk-DFYDUXWP.cjs +0 -34
  228. package/dist/chunk-DWP2SYF7.js +0 -55
  229. package/dist/chunk-E55VXNLK.cjs +0 -17498
  230. package/dist/chunk-E5FW77FG.js +0 -77
  231. package/dist/chunk-EAELL43F.js +0 -42
  232. package/dist/chunk-EX5V2ZTU.js +0 -40
  233. package/dist/chunk-FD7QZCTN.cjs +0 -2329
  234. package/dist/chunk-FH4ILMKF.js +0 -38
  235. package/dist/chunk-FRHBM2U7.js +0 -33
  236. package/dist/chunk-FX2TPX3L.cjs +0 -45
  237. package/dist/chunk-GPXNLTPI.cjs +0 -451
  238. package/dist/chunk-GRYCUBJZ.js +0 -9
  239. package/dist/chunk-HPHHS7FJ.cjs +0 -49
  240. package/dist/chunk-HWHBSAUC.js +0 -40
  241. package/dist/chunk-IDHP3R4I.js +0 -31
  242. package/dist/chunk-IHWGT3DL.js +0 -86
  243. package/dist/chunk-JEBKLIMU.cjs +0 -123
  244. package/dist/chunk-KDZLBI6F.cjs +0 -324
  245. package/dist/chunk-KQHICFX3.js +0 -121
  246. package/dist/chunk-LMJE6V4N.cjs +0 -42
  247. package/dist/chunk-MCHPDWVH.js +0 -444
  248. package/dist/chunk-MVDGM5Y4.js +0 -68
  249. package/dist/chunk-N36HBL53.cjs +0 -165
  250. package/dist/chunk-NV5GNFA3.js +0 -541
  251. package/dist/chunk-NVEGEK3N.js +0 -31
  252. package/dist/chunk-OJIDKDKF.js +0 -68
  253. package/dist/chunk-PGGNSLM7.js +0 -215
  254. package/dist/chunk-PKPQA5NR.js +0 -15
  255. package/dist/chunk-PNDBLFJW.cjs +0 -50
  256. package/dist/chunk-Q3WA72BF.cjs +0 -70
  257. package/dist/chunk-RDIDAZ3S.cjs +0 -9
  258. package/dist/chunk-RGJPRXYY.js +0 -48
  259. package/dist/chunk-RPSYXORB.cjs +0 -219
  260. package/dist/chunk-RQ6OZRUW.cjs +0 -41
  261. package/dist/chunk-SBE4SZAN.cjs +0 -226
  262. package/dist/chunk-TAFNCDUI.js +0 -234
  263. package/dist/chunk-TFIDSENE.cjs +0 -88
  264. package/dist/chunk-TGWMOHAO.js +0 -17
  265. package/dist/chunk-UA6XSTW6.js +0 -48
  266. package/dist/chunk-UIQCTAVM.cjs +0 -59
  267. package/dist/chunk-UKYESVDS.cjs +0 -50
  268. package/dist/chunk-V4N255NL.cjs +0 -2309
  269. package/dist/chunk-VO6KXO2I.js +0 -32
  270. package/dist/chunk-WXSTSC3D.cjs +0 -83
  271. package/dist/chunk-XSK7BWYO.js +0 -47
  272. package/dist/chunk-XVAPJ4PP.cjs +0 -449
  273. package/dist/chunk-XVASHRCE.cjs +0 -70
  274. package/dist/chunk-XYSMVQQD.cjs +0 -1608
  275. package/dist/chunk-YAIWI4Z5.js +0 -7
  276. package/dist/chunk-YGYOLDKR.js +0 -280
  277. package/dist/chunk-YP2PLNOF.cjs +0 -34
  278. package/dist/chunk-YSOLW4FS.cjs +0 -11
  279. package/dist/chunk-YY6OUR2U.js +0 -44
  280. package/dist/chunk-YZWS7FDT.cjs +0 -409
  281. package/dist/chunk-Z5YGWL65.cjs +0 -39
  282. package/dist/chunk-ZHNDXNL4.js +0 -45
  283. package/dist/chunk-ZX3EDZ5C.cjs +0 -17
  284. package/dist/index.d.cts +0 -2019
@@ -1,1601 +0,0 @@
1
- import { createVarsResolver, getSize, factory, useProps, UnstyledButton, useStyles, getSpacing, getFontSize, Box, useResolvedStylesApi, AccordionChevron, useUncontrolled, useMergedRef, clamp } from './chunk-BQL3YXMV.js';
2
- import dayjs27 from 'dayjs';
3
- import { createContext, createElement, useRef, useImperativeHandle, useEffect, use, useCallback } from 'react';
4
- import { jsx, jsxs } from 'react/jsx-runtime';
5
- import isoWeek from 'dayjs/plugin/isoWeek.js';
6
-
7
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/utils/handle-control-key-down/handle-control-key-down.mjs
8
- function getNextIndex({ direction, levelIndex, rowIndex, cellIndex, size }) {
9
- switch (direction) {
10
- case "up":
11
- if (levelIndex === 0 && rowIndex === 0) return null;
12
- if (rowIndex === 0) return {
13
- levelIndex: levelIndex - 1,
14
- rowIndex: cellIndex <= size[levelIndex - 1][size[levelIndex - 1].length - 1] - 1 ? size[levelIndex - 1].length - 1 : size[levelIndex - 1].length - 2,
15
- cellIndex
16
- };
17
- return {
18
- levelIndex,
19
- rowIndex: rowIndex - 1,
20
- cellIndex
21
- };
22
- case "down":
23
- if (rowIndex === size[levelIndex].length - 1) return {
24
- levelIndex: levelIndex + 1,
25
- rowIndex: 0,
26
- cellIndex
27
- };
28
- if (rowIndex === size[levelIndex].length - 2 && cellIndex >= size[levelIndex][size[levelIndex].length - 1]) return {
29
- levelIndex: levelIndex + 1,
30
- rowIndex: 0,
31
- cellIndex
32
- };
33
- return {
34
- levelIndex,
35
- rowIndex: rowIndex + 1,
36
- cellIndex
37
- };
38
- case "left":
39
- if (levelIndex === 0 && rowIndex === 0 && cellIndex === 0) return null;
40
- if (rowIndex === 0 && cellIndex === 0) return {
41
- levelIndex: levelIndex - 1,
42
- rowIndex: size[levelIndex - 1].length - 1,
43
- cellIndex: size[levelIndex - 1][size[levelIndex - 1].length - 1] - 1
44
- };
45
- if (cellIndex === 0) return {
46
- levelIndex,
47
- rowIndex: rowIndex - 1,
48
- cellIndex: size[levelIndex][rowIndex - 1] - 1
49
- };
50
- return {
51
- levelIndex,
52
- rowIndex,
53
- cellIndex: cellIndex - 1
54
- };
55
- case "right":
56
- if (rowIndex === size[levelIndex].length - 1 && cellIndex === size[levelIndex][rowIndex] - 1) return {
57
- levelIndex: levelIndex + 1,
58
- rowIndex: 0,
59
- cellIndex: 0
60
- };
61
- if (cellIndex === size[levelIndex][rowIndex] - 1) return {
62
- levelIndex,
63
- rowIndex: rowIndex + 1,
64
- cellIndex: 0
65
- };
66
- return {
67
- levelIndex,
68
- rowIndex,
69
- cellIndex: cellIndex + 1
70
- };
71
- default:
72
- return {
73
- levelIndex,
74
- rowIndex,
75
- cellIndex
76
- };
77
- }
78
- }
79
- function focusOnNextFocusableControl({ controlsRef, direction, levelIndex, rowIndex, cellIndex, size }) {
80
- const nextIndex = getNextIndex({
81
- direction,
82
- size,
83
- rowIndex,
84
- cellIndex,
85
- levelIndex
86
- });
87
- if (!nextIndex) return;
88
- const controlToFocus = controlsRef.current?.[nextIndex.levelIndex]?.[nextIndex.rowIndex]?.[nextIndex.cellIndex];
89
- if (!controlToFocus) return;
90
- if (controlToFocus.disabled || controlToFocus.getAttribute("data-hidden") || controlToFocus.getAttribute("data-outside")) focusOnNextFocusableControl({
91
- controlsRef,
92
- direction,
93
- levelIndex: nextIndex.levelIndex,
94
- cellIndex: nextIndex.cellIndex,
95
- rowIndex: nextIndex.rowIndex,
96
- size
97
- });
98
- else controlToFocus.focus();
99
- }
100
- function getDirection(key) {
101
- switch (key) {
102
- case "ArrowDown":
103
- return "down";
104
- case "ArrowUp":
105
- return "up";
106
- case "ArrowRight":
107
- return "right";
108
- case "ArrowLeft":
109
- return "left";
110
- default:
111
- return null;
112
- }
113
- }
114
- function getControlsSize(controlsRef) {
115
- return controlsRef.current?.map((column) => column.map((row) => row.length));
116
- }
117
- function handleControlKeyDown({ controlsRef, levelIndex, rowIndex, cellIndex, event }) {
118
- const direction = getDirection(event.key);
119
- if (direction) {
120
- event.preventDefault();
121
- focusOnNextFocusableControl({
122
- controlsRef,
123
- direction,
124
- levelIndex,
125
- rowIndex,
126
- cellIndex,
127
- size: getControlsSize(controlsRef)
128
- });
129
- }
130
- }
131
- function toDateString(value) {
132
- return value == null || value === "" ? value : dayjs27(value).format("YYYY-MM-DD");
133
- }
134
- function toDateTimeString(value) {
135
- return value == null || value === "" ? value : dayjs27(value).format("YYYY-MM-DD HH:mm:ss");
136
- }
137
- var DATES_PROVIDER_DEFAULT_SETTINGS = {
138
- locale: "en",
139
- firstDayOfWeek: 1,
140
- weekendDays: [0, 6],
141
- labelSeparator: "\u2013",
142
- consistentWeeks: false
143
- };
144
- var DatesProviderContext = createContext(DATES_PROVIDER_DEFAULT_SETTINGS);
145
- function useDatesContext() {
146
- const ctx = use(DatesProviderContext);
147
- const getLocale = useCallback((input) => input || ctx.locale, [ctx.locale]);
148
- const getFirstDayOfWeek = useCallback((input) => typeof input === "number" ? input : ctx.firstDayOfWeek, [ctx.firstDayOfWeek]);
149
- const getWeekendDays = useCallback((input) => Array.isArray(input) ? input : ctx.weekendDays, [ctx.weekendDays]);
150
- const getLabelSeparator = useCallback((input) => typeof input === "string" ? input : ctx.labelSeparator, [ctx.labelSeparator]);
151
- return {
152
- ...ctx,
153
- getLocale,
154
- getFirstDayOfWeek,
155
- getWeekendDays,
156
- getLabelSeparator
157
- };
158
- }
159
-
160
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/Day/Day.module.mjs
161
- var Day_module_default = { "day": "m_396ce5cb" };
162
- var varsResolver = createVarsResolver((_, { size }) => ({ day: { "--day-size": getSize(size, "day-size") } }));
163
- var Day = factory((_props) => {
164
- const props = useProps("Day", null, _props);
165
- const { classNames, className, style, styles, unstyled, vars, date, disabled, __staticSelector, weekend, outside, selected, renderDay, inRange, firstInRange, lastInRange, hidden, static: isStatic, highlightToday, fullWidth, attributes, ...others } = props;
166
- return /* @__PURE__ */ jsx(UnstyledButton, {
167
- ...useStyles({
168
- name: __staticSelector || "Day",
169
- classes: Day_module_default,
170
- props,
171
- className,
172
- style,
173
- classNames,
174
- styles,
175
- unstyled,
176
- attributes,
177
- vars,
178
- varsResolver,
179
- rootSelector: "day"
180
- })("day", { style: hidden ? { display: "none" } : void 0 }),
181
- component: isStatic ? "div" : "button",
182
- disabled,
183
- "data-today": dayjs27(date).isSame(/* @__PURE__ */ new Date(), "day") || void 0,
184
- "data-hidden": hidden || void 0,
185
- "data-highlight-today": highlightToday || void 0,
186
- "data-disabled": disabled || void 0,
187
- "data-weekend": !disabled && !outside && weekend || void 0,
188
- "data-outside": !disabled && outside || void 0,
189
- "data-selected": !disabled && selected || void 0,
190
- "data-in-range": inRange && !disabled || void 0,
191
- "data-first-in-range": firstInRange && !disabled || void 0,
192
- "data-last-in-range": lastInRange && !disabled || void 0,
193
- "data-static": isStatic || void 0,
194
- "data-full-width": fullWidth || void 0,
195
- unstyled,
196
- ...others,
197
- children: renderDay?.(date) || dayjs27(date).date()
198
- });
199
- });
200
- Day.classes = Day_module_default;
201
- Day.varsResolver = varsResolver;
202
- Day.displayName = "@mantine/dates/Day";
203
- function getWeekdayNames({ locale, format = "dd", firstDayOfWeek = 1 }) {
204
- const baseDate = dayjs27().day(firstDayOfWeek);
205
- const labels = [];
206
- for (let i = 0; i < 7; i += 1) if (typeof format === "string") labels.push(dayjs27(baseDate).add(i, "days").locale(locale).format(format));
207
- else labels.push(format(dayjs27(baseDate).add(i, "days").format("YYYY-MM-DD")));
208
- return labels;
209
- }
210
-
211
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/WeekdaysRow/WeekdaysRow.module.mjs
212
- var WeekdaysRow_module_default = { "weekday": "m_18a3eca" };
213
- var varsResolver2 = createVarsResolver((_, { size }) => ({ weekdaysRow: {
214
- "--wr-fz": getFontSize(size),
215
- "--wr-spacing": getSpacing(size)
216
- } }));
217
- var WeekdaysRow = factory((_props) => {
218
- const props = useProps("WeekdaysRow", null, _props);
219
- const { classNames, className, style, styles, unstyled, vars, locale, firstDayOfWeek, weekdayFormat, cellComponent: CellComponent = "th", __staticSelector, withWeekNumbers, attributes, ...others } = props;
220
- const getStyles = useStyles({
221
- name: __staticSelector || "WeekdaysRow",
222
- classes: WeekdaysRow_module_default,
223
- props,
224
- className,
225
- style,
226
- classNames,
227
- styles,
228
- unstyled,
229
- attributes,
230
- vars,
231
- varsResolver: varsResolver2,
232
- rootSelector: "weekdaysRow"
233
- });
234
- const ctx = useDatesContext();
235
- const weekdays = getWeekdayNames({
236
- locale: ctx.getLocale(locale),
237
- format: weekdayFormat,
238
- firstDayOfWeek: ctx.getFirstDayOfWeek(firstDayOfWeek)
239
- }).map((weekday, index) => /* @__PURE__ */ jsx(CellComponent, {
240
- ...getStyles("weekday"),
241
- children: weekday
242
- }, index));
243
- return /* @__PURE__ */ jsxs(Box, {
244
- component: "tr",
245
- ...getStyles("weekdaysRow"),
246
- ...others,
247
- children: [withWeekNumbers && /* @__PURE__ */ jsx(CellComponent, {
248
- ...getStyles("weekday"),
249
- children: "#"
250
- }), weekdays]
251
- });
252
- });
253
- WeekdaysRow.classes = WeekdaysRow_module_default;
254
- WeekdaysRow.varsResolver = varsResolver2;
255
- WeekdaysRow.displayName = "@mantine/dates/WeekdaysRow";
256
- function getEndOfWeek(date, firstDayOfWeek = 1) {
257
- let value = dayjs27(date);
258
- if (!value.isValid()) return value;
259
- const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1;
260
- while (value.day() !== lastDayOfWeek) value = value.add(1, "day");
261
- return value.format("YYYY-MM-DD");
262
- }
263
- function getStartOfWeek(date, firstDayOfWeek = 1) {
264
- let value = dayjs27(date);
265
- while (value.day() !== firstDayOfWeek) value = value.subtract(1, "day");
266
- return value.format("YYYY-MM-DD");
267
- }
268
- function getMonthDays({ month, firstDayOfWeek = 1, consistentWeeks }) {
269
- const start = dayjs27(dayjs27(month).subtract(dayjs27(month).date() - 1, "day").format("YYYY-M-D"));
270
- const startOfMonth = start.format("YYYY-MM-DD");
271
- const endDate = getEndOfWeek(start.add(+start.daysInMonth() - 1, "day").format("YYYY-MM-DD"), firstDayOfWeek);
272
- const weeks = [];
273
- let date = dayjs27(getStartOfWeek(startOfMonth, firstDayOfWeek));
274
- while (dayjs27(date).isBefore(endDate, "day")) {
275
- const days = [];
276
- for (let i = 0; i < 7; i += 1) {
277
- days.push(date.format("YYYY-MM-DD"));
278
- date = date.add(1, "day");
279
- }
280
- weeks.push(days);
281
- }
282
- if (consistentWeeks && weeks.length < 6) {
283
- const lastWeek = weeks[weeks.length - 1];
284
- const lastDay = lastWeek[lastWeek.length - 1];
285
- let nextDay = dayjs27(lastDay).add(1, "day");
286
- while (weeks.length < 6) {
287
- const days = [];
288
- for (let i = 0; i < 7; i += 1) {
289
- days.push(nextDay.format("YYYY-MM-DD"));
290
- nextDay = nextDay.add(1, "day");
291
- }
292
- weeks.push(days);
293
- }
294
- }
295
- return weeks;
296
- }
297
- function isSameMonth(date, comparison) {
298
- return dayjs27(date).format("YYYY-MM") === dayjs27(comparison).format("YYYY-MM");
299
- }
300
- function isAfterMinDate(date, minDate) {
301
- return minDate ? dayjs27(date).isAfter(dayjs27(minDate).subtract(1, "day"), "day") : true;
302
- }
303
- function isBeforeMaxDate(date, maxDate) {
304
- return maxDate ? dayjs27(date).isBefore(dayjs27(maxDate).add(1, "day"), "day") : true;
305
- }
306
- function getDateInTabOrder({ dates, minDate, maxDate, getDayProps, excludeDate, hideOutsideDates, month }) {
307
- const enabledDates = dates.flat().filter((date) => isBeforeMaxDate(date, maxDate) && isAfterMinDate(date, minDate) && !excludeDate?.(date) && !getDayProps?.(date)?.disabled && (!hideOutsideDates || isSameMonth(date, month)));
308
- const selectedDate = enabledDates.find((date) => getDayProps?.(date)?.selected);
309
- if (selectedDate) return selectedDate;
310
- const currentDate = enabledDates.find((date) => dayjs27().isSame(date, "date"));
311
- if (currentDate) return currentDate;
312
- return enabledDates[0];
313
- }
314
- dayjs27.extend(isoWeek);
315
- function getWeekNumber(week) {
316
- return dayjs27(week.find((date) => dayjs27(date).day() === 1)).isoWeek();
317
- }
318
-
319
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/Month/Month.module.mjs
320
- var Month_module_default = {
321
- "month": "m_cc9820d3",
322
- "monthCell": "m_8f457cd5",
323
- "weekNumber": "m_6cff9dea"
324
- };
325
- var defaultProps = { withCellSpacing: true };
326
- var varsResolver3 = createVarsResolver((_, { size }) => ({ weekNumber: {
327
- "--wn-fz": getFontSize(size),
328
- "--wn-size": getSize(size, "wn-size")
329
- } }));
330
- var Month = factory((_props) => {
331
- const props = useProps("Month", defaultProps, _props);
332
- const { classNames, className, style, styles, unstyled, vars, __staticSelector, locale, firstDayOfWeek, weekdayFormat, month, weekendDays, getDayProps, excludeDate, minDate, maxDate, renderDay, hideOutsideDates, hideWeekdays, getDayAriaLabel, static: isStatic, __getDayRef, __onDayKeyDown, __onDayClick, __onDayMouseEnter, __preventFocus, __stopPropagation, withCellSpacing, size, highlightToday, withWeekNumbers, fullWidth, attributes, ...others } = props;
333
- const getStyles = useStyles({
334
- name: __staticSelector || "Month",
335
- classes: Month_module_default,
336
- props,
337
- className,
338
- style,
339
- classNames,
340
- styles,
341
- unstyled,
342
- attributes,
343
- vars,
344
- varsResolver: varsResolver3,
345
- rootSelector: "month"
346
- });
347
- const ctx = useDatesContext();
348
- const dates = getMonthDays({
349
- month,
350
- firstDayOfWeek: ctx.getFirstDayOfWeek(firstDayOfWeek),
351
- consistentWeeks: ctx.consistentWeeks
352
- });
353
- const dateInTabOrder = getDateInTabOrder({
354
- dates,
355
- minDate: toDateString(minDate),
356
- maxDate: toDateString(maxDate),
357
- getDayProps,
358
- excludeDate,
359
- hideOutsideDates,
360
- month
361
- });
362
- const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
363
- classNames,
364
- styles,
365
- props
366
- });
367
- const rows = dates.map((row, rowIndex) => {
368
- const cells = row.map((date, cellIndex) => {
369
- const outside = !isSameMonth(date, month);
370
- const ariaLabel = getDayAriaLabel?.(date) || dayjs27(date).locale(locale || ctx.locale).format("D MMMM YYYY");
371
- const dayProps = getDayProps?.(date);
372
- const isDateInTabOrder = dayjs27(date).isSame(dateInTabOrder, "date");
373
- return /* @__PURE__ */ jsx("td", {
374
- ...getStyles("monthCell"),
375
- "data-with-spacing": withCellSpacing || void 0,
376
- children: /* @__PURE__ */ jsx(Day, {
377
- __staticSelector: __staticSelector || "Month",
378
- classNames: resolvedClassNames,
379
- styles: resolvedStyles,
380
- attributes,
381
- unstyled,
382
- "data-mantine-stop-propagation": __stopPropagation || void 0,
383
- highlightToday,
384
- renderDay,
385
- date,
386
- size,
387
- weekend: ctx.getWeekendDays(weekendDays).includes(dayjs27(date).get("day")),
388
- outside,
389
- hidden: hideOutsideDates ? outside : false,
390
- "aria-label": ariaLabel,
391
- static: isStatic,
392
- fullWidth,
393
- disabled: excludeDate?.(date) || !isBeforeMaxDate(date, toDateString(maxDate)) || !isAfterMinDate(date, toDateString(minDate)),
394
- ref: (node) => {
395
- if (node) __getDayRef?.(rowIndex, cellIndex, node);
396
- },
397
- ...dayProps,
398
- onKeyDown: (event) => {
399
- dayProps?.onKeyDown?.(event);
400
- __onDayKeyDown?.(event, {
401
- rowIndex,
402
- cellIndex,
403
- date
404
- });
405
- },
406
- onMouseEnter: (event) => {
407
- dayProps?.onMouseEnter?.(event);
408
- __onDayMouseEnter?.(event, date);
409
- },
410
- onClick: (event) => {
411
- dayProps?.onClick?.(event);
412
- __onDayClick?.(event, date);
413
- },
414
- onMouseDown: (event) => {
415
- dayProps?.onMouseDown?.(event);
416
- __preventFocus && event.preventDefault();
417
- },
418
- tabIndex: __preventFocus || !isDateInTabOrder ? -1 : 0
419
- })
420
- }, date.toString());
421
- });
422
- return /* @__PURE__ */ jsxs("tr", {
423
- ...getStyles("monthRow"),
424
- children: [withWeekNumbers && /* @__PURE__ */ jsx("td", {
425
- ...getStyles("weekNumber"),
426
- children: getWeekNumber(row)
427
- }), cells]
428
- }, rowIndex);
429
- });
430
- return /* @__PURE__ */ jsxs(Box, {
431
- component: "table",
432
- ...getStyles("month"),
433
- size,
434
- "data-full-width": fullWidth || void 0,
435
- ...others,
436
- children: [!hideWeekdays && /* @__PURE__ */ jsx("thead", {
437
- ...getStyles("monthThead"),
438
- children: /* @__PURE__ */ jsx(WeekdaysRow, {
439
- __staticSelector: __staticSelector || "Month",
440
- locale,
441
- firstDayOfWeek,
442
- weekdayFormat,
443
- withWeekNumbers,
444
- size,
445
- classNames: resolvedClassNames,
446
- styles: resolvedStyles,
447
- unstyled,
448
- attributes
449
- })
450
- }), /* @__PURE__ */ jsx("tbody", {
451
- ...getStyles("monthTbody"),
452
- children: rows
453
- })]
454
- });
455
- });
456
- Month.classes = Month_module_default;
457
- Month.varsResolver = varsResolver3;
458
- Month.displayName = "@mantine/dates/Month";
459
-
460
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/PickerControl/PickerControl.module.mjs
461
- var PickerControl_module_default = { "pickerControl": "m_dc6a3c71" };
462
- var varsResolver4 = createVarsResolver((_, { size }) => ({ pickerControl: {
463
- "--dpc-fz": getFontSize(size),
464
- "--dpc-size": getSize(size, "dpc-size")
465
- } }));
466
- var PickerControl = factory((_props) => {
467
- const props = useProps("PickerControl", null, _props);
468
- const { classNames, className, style, styles, unstyled, vars, firstInRange, lastInRange, inRange, __staticSelector, selected, disabled, fullWidth, attributes, ...others } = props;
469
- return /* @__PURE__ */ jsx(UnstyledButton, {
470
- ...useStyles({
471
- name: __staticSelector || "PickerControl",
472
- classes: PickerControl_module_default,
473
- props,
474
- className,
475
- style,
476
- classNames,
477
- styles,
478
- unstyled,
479
- attributes,
480
- vars,
481
- varsResolver: varsResolver4,
482
- rootSelector: "pickerControl"
483
- })("pickerControl"),
484
- unstyled,
485
- "data-picker-control": true,
486
- "data-full-width": fullWidth || void 0,
487
- "data-selected": selected && !disabled || void 0,
488
- "data-disabled": disabled || void 0,
489
- "data-in-range": inRange && !disabled && !selected || void 0,
490
- "data-first-in-range": firstInRange && !disabled || void 0,
491
- "data-last-in-range": lastInRange && !disabled || void 0,
492
- disabled,
493
- ...others
494
- });
495
- });
496
- PickerControl.classes = PickerControl_module_default;
497
- PickerControl.varsResolver = varsResolver4;
498
- PickerControl.displayName = "@mantine/dates/PickerControl";
499
- function isYearDisabled({ year, minDate, maxDate }) {
500
- if (!minDate && !maxDate) return false;
501
- if (minDate && dayjs27(year).isBefore(minDate, "year")) return true;
502
- if (maxDate && dayjs27(year).isAfter(maxDate, "year")) return true;
503
- return false;
504
- }
505
- function getYearInTabOrder({ years, minDate, maxDate, getYearControlProps }) {
506
- const enabledYears = years.flat().filter((year) => !isYearDisabled({
507
- year,
508
- minDate,
509
- maxDate
510
- }) && !getYearControlProps?.(year)?.disabled);
511
- const selectedYear = enabledYears.find((year) => getYearControlProps?.(year)?.selected);
512
- if (selectedYear) return selectedYear;
513
- const currentYear = enabledYears.find((year) => dayjs27().isSame(year, "year"));
514
- if (currentYear) return currentYear;
515
- return enabledYears[0];
516
- }
517
- function getYearsData(decade) {
518
- const year = dayjs27(decade).year();
519
- const rounded = year - year % 10;
520
- let currentYearIndex = 0;
521
- const results = [
522
- [],
523
- [],
524
- [],
525
- []
526
- ];
527
- for (let i = 0; i < 4; i += 1) {
528
- const max = i === 3 ? 1 : 3;
529
- for (let j = 0; j < max; j += 1) {
530
- results[i].push(dayjs27(new Date(rounded + currentYearIndex, 0)).format("YYYY-MM-DD"));
531
- currentYearIndex += 1;
532
- }
533
- }
534
- return results;
535
- }
536
-
537
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/YearsList/YearsList.module.mjs
538
- var YearsList_module_default = {
539
- "yearsList": "m_9206547b",
540
- "yearsListCell": "m_c5a19c7d"
541
- };
542
- var defaultProps2 = {
543
- yearsListFormat: "YYYY",
544
- withCellSpacing: true
545
- };
546
- var YearsList = factory((_props) => {
547
- const props = useProps("YearsList", defaultProps2, _props);
548
- const { classNames, className, style, styles, unstyled, vars, decade, yearsListFormat, locale, minDate, maxDate, getYearControlProps, __staticSelector, __getControlRef, __onControlKeyDown, __onControlClick, __onControlMouseEnter, __preventFocus, __stopPropagation, withCellSpacing, fullWidth, size, attributes, ...others } = props;
549
- const getStyles = useStyles({
550
- name: __staticSelector || "YearsList",
551
- classes: YearsList_module_default,
552
- props,
553
- className,
554
- style,
555
- classNames,
556
- styles,
557
- unstyled,
558
- attributes,
559
- vars,
560
- rootSelector: "yearsList"
561
- });
562
- const ctx = useDatesContext();
563
- const years = getYearsData(decade);
564
- const yearInTabOrder = getYearInTabOrder({
565
- years,
566
- minDate,
567
- maxDate,
568
- getYearControlProps
569
- });
570
- const rows = years.map((yearsRow, rowIndex) => {
571
- const cells = yearsRow.map((year, cellIndex) => {
572
- const controlProps = getYearControlProps?.(year);
573
- const isYearInTabOrder = dayjs27(year).isSame(yearInTabOrder, "year");
574
- return /* @__PURE__ */ jsx("td", {
575
- ...getStyles("yearsListCell"),
576
- "data-with-spacing": withCellSpacing || void 0,
577
- children: /* @__PURE__ */ jsx(PickerControl, {
578
- ...getStyles("yearsListControl"),
579
- size,
580
- unstyled,
581
- fullWidth,
582
- "data-mantine-stop-propagation": __stopPropagation || void 0,
583
- disabled: isYearDisabled({
584
- year,
585
- minDate,
586
- maxDate
587
- }),
588
- ref: (node) => {
589
- if (node) __getControlRef?.(rowIndex, cellIndex, node);
590
- },
591
- ...controlProps,
592
- onKeyDown: (event) => {
593
- controlProps?.onKeyDown?.(event);
594
- __onControlKeyDown?.(event, {
595
- rowIndex,
596
- cellIndex,
597
- date: year
598
- });
599
- },
600
- onClick: (event) => {
601
- controlProps?.onClick?.(event);
602
- __onControlClick?.(event, year);
603
- },
604
- onMouseEnter: (event) => {
605
- controlProps?.onMouseEnter?.(event);
606
- __onControlMouseEnter?.(event, year);
607
- },
608
- onMouseDown: (event) => {
609
- controlProps?.onMouseDown?.(event);
610
- __preventFocus && event.preventDefault();
611
- },
612
- tabIndex: __preventFocus || !isYearInTabOrder ? -1 : 0,
613
- children: controlProps?.children ?? dayjs27(year).locale(ctx.getLocale(locale)).format(yearsListFormat)
614
- })
615
- }, cellIndex);
616
- });
617
- return /* @__PURE__ */ jsx("tr", {
618
- ...getStyles("yearsListRow"),
619
- children: cells
620
- }, rowIndex);
621
- });
622
- return /* @__PURE__ */ jsx(Box, {
623
- component: "table",
624
- size,
625
- ...getStyles("yearsList"),
626
- "data-full-width": fullWidth || void 0,
627
- ...others,
628
- children: /* @__PURE__ */ jsx("tbody", { children: rows })
629
- });
630
- });
631
- YearsList.classes = YearsList_module_default;
632
- YearsList.displayName = "@mantine/dates/YearsList";
633
- function isMonthDisabled({ month, minDate, maxDate }) {
634
- if (!minDate && !maxDate) return false;
635
- if (minDate && dayjs27(month).isBefore(minDate, "month")) return true;
636
- if (maxDate && dayjs27(month).isAfter(maxDate, "month")) return true;
637
- return false;
638
- }
639
- function getMonthInTabOrder({ months, minDate, maxDate, getMonthControlProps }) {
640
- const enabledMonths = months.flat().filter((month) => !isMonthDisabled({
641
- month,
642
- minDate,
643
- maxDate
644
- }) && !getMonthControlProps?.(month)?.disabled);
645
- const selectedMonth = enabledMonths.find((month) => getMonthControlProps?.(month)?.selected);
646
- if (selectedMonth) return selectedMonth;
647
- const currentMonth = enabledMonths.find((month) => dayjs27().isSame(month, "month"));
648
- if (currentMonth) return currentMonth;
649
- return enabledMonths[0];
650
- }
651
- function getMonthsData(year) {
652
- const startOfYear = dayjs27(year).startOf("year").toDate();
653
- const results = [
654
- [],
655
- [],
656
- [],
657
- []
658
- ];
659
- let currentMonthIndex = 0;
660
- for (let i = 0; i < 4; i += 1) for (let j = 0; j < 3; j += 1) {
661
- results[i].push(dayjs27(startOfYear).add(currentMonthIndex, "months").format("YYYY-MM-DD"));
662
- currentMonthIndex += 1;
663
- }
664
- return results;
665
- }
666
-
667
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/MonthsList/MonthsList.module.mjs
668
- var MonthsList_module_default = {
669
- "monthsList": "m_2a6c32d",
670
- "monthsListCell": "m_fe27622f"
671
- };
672
- var defaultProps3 = {
673
- monthsListFormat: "MMM",
674
- withCellSpacing: true
675
- };
676
- var MonthsList = factory((_props) => {
677
- const props = useProps("MonthsList", defaultProps3, _props);
678
- const { classNames, className, style, styles, unstyled, vars, __staticSelector, year, monthsListFormat, locale, minDate, maxDate, getMonthControlProps, __getControlRef, __onControlKeyDown, __onControlClick, __onControlMouseEnter, __preventFocus, __stopPropagation, withCellSpacing, fullWidth, size, attributes, ...others } = props;
679
- const getStyles = useStyles({
680
- name: __staticSelector || "MonthsList",
681
- classes: MonthsList_module_default,
682
- props,
683
- className,
684
- style,
685
- classNames,
686
- styles,
687
- unstyled,
688
- attributes,
689
- vars,
690
- rootSelector: "monthsList"
691
- });
692
- const ctx = useDatesContext();
693
- const months = getMonthsData(year);
694
- const monthInTabOrder = getMonthInTabOrder({
695
- months,
696
- minDate: toDateString(minDate),
697
- maxDate: toDateString(maxDate),
698
- getMonthControlProps
699
- });
700
- const rows = months.map((monthsRow, rowIndex) => {
701
- const cells = monthsRow.map((month, cellIndex) => {
702
- const controlProps = getMonthControlProps?.(month);
703
- const isMonthInTabOrder = dayjs27(month).isSame(monthInTabOrder, "month");
704
- return /* @__PURE__ */ jsx("td", {
705
- ...getStyles("monthsListCell"),
706
- "data-with-spacing": withCellSpacing || void 0,
707
- children: /* @__PURE__ */ jsx(PickerControl, {
708
- ...getStyles("monthsListControl"),
709
- size,
710
- unstyled,
711
- fullWidth,
712
- __staticSelector: __staticSelector || "MonthsList",
713
- "data-mantine-stop-propagation": __stopPropagation || void 0,
714
- disabled: isMonthDisabled({
715
- month,
716
- minDate: toDateString(minDate),
717
- maxDate: toDateString(maxDate)
718
- }),
719
- ref: (node) => {
720
- if (node) __getControlRef?.(rowIndex, cellIndex, node);
721
- },
722
- ...controlProps,
723
- onKeyDown: (event) => {
724
- controlProps?.onKeyDown?.(event);
725
- __onControlKeyDown?.(event, {
726
- rowIndex,
727
- cellIndex,
728
- date: month
729
- });
730
- },
731
- onClick: (event) => {
732
- controlProps?.onClick?.(event);
733
- __onControlClick?.(event, month);
734
- },
735
- onMouseEnter: (event) => {
736
- controlProps?.onMouseEnter?.(event);
737
- __onControlMouseEnter?.(event, month);
738
- },
739
- onMouseDown: (event) => {
740
- controlProps?.onMouseDown?.(event);
741
- __preventFocus && event.preventDefault();
742
- },
743
- tabIndex: __preventFocus || !isMonthInTabOrder ? -1 : 0,
744
- children: controlProps?.children ?? dayjs27(month).locale(ctx.getLocale(locale)).format(monthsListFormat)
745
- })
746
- }, cellIndex);
747
- });
748
- return /* @__PURE__ */ jsx("tr", {
749
- ...getStyles("monthsListRow"),
750
- children: cells
751
- }, rowIndex);
752
- });
753
- return /* @__PURE__ */ jsx(Box, {
754
- component: "table",
755
- size,
756
- ...getStyles("monthsList"),
757
- "data-full-width": fullWidth || void 0,
758
- ...others,
759
- children: /* @__PURE__ */ jsx("tbody", { children: rows })
760
- });
761
- });
762
- MonthsList.classes = MonthsList_module_default;
763
- MonthsList.displayName = "@mantine/dates/MonthsList";
764
-
765
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/CalendarHeader/CalendarHeader.module.mjs
766
- var CalendarHeader_module_default = {
767
- "calendarHeader": "m_730a79ed",
768
- "calendarHeaderLevel": "m_f6645d97",
769
- "calendarHeaderControl": "m_2351eeb0",
770
- "calendarHeaderControlIcon": "m_367dc749"
771
- };
772
- var defaultProps4 = {
773
- hasNextLevel: true,
774
- withNext: true,
775
- withPrevious: true,
776
- headerControlsOrder: [
777
- "previous",
778
- "level",
779
- "next"
780
- ]
781
- };
782
- var varsResolver5 = createVarsResolver((_, { size }) => ({ calendarHeader: {
783
- "--dch-control-size": getSize(size, "dch-control-size"),
784
- "--dch-fz": getFontSize(size)
785
- } }));
786
- var CalendarHeader = factory((_props) => {
787
- const props = useProps("CalendarHeader", defaultProps4, _props);
788
- const { classNames, className, style, styles, unstyled, vars, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, onLevelClick, label, nextDisabled, previousDisabled, hasNextLevel, levelControlAriaLabel, withNext, withPrevious, headerControlsOrder, fullWidth, __staticSelector, __preventFocus, __stopPropagation, attributes, ...others } = props;
789
- const getStyles = useStyles({
790
- name: __staticSelector || "CalendarHeader",
791
- classes: CalendarHeader_module_default,
792
- props,
793
- className,
794
- style,
795
- classNames,
796
- styles,
797
- unstyled,
798
- attributes,
799
- vars,
800
- varsResolver: varsResolver5,
801
- rootSelector: "calendarHeader"
802
- });
803
- const preventFocus = __preventFocus ? (event) => event.preventDefault() : void 0;
804
- const previousControl = withPrevious && /* @__PURE__ */ createElement(UnstyledButton, {
805
- ...getStyles("calendarHeaderControl"),
806
- key: "previous",
807
- "data-direction": "previous",
808
- "aria-label": previousLabel,
809
- onClick: onPrevious,
810
- unstyled,
811
- onMouseDown: preventFocus,
812
- disabled: previousDisabled,
813
- "data-disabled": previousDisabled || void 0,
814
- tabIndex: __preventFocus || previousDisabled ? -1 : 0,
815
- "data-mantine-stop-propagation": __stopPropagation || void 0
816
- }, previousIcon || /* @__PURE__ */ jsx(AccordionChevron, {
817
- ...getStyles("calendarHeaderControlIcon"),
818
- "data-direction": "previous",
819
- size: "45%"
820
- }));
821
- const levelControl = /* @__PURE__ */ createElement(UnstyledButton, {
822
- component: hasNextLevel ? "button" : "div",
823
- ...getStyles("calendarHeaderLevel"),
824
- key: "level",
825
- onClick: hasNextLevel ? onLevelClick : void 0,
826
- unstyled,
827
- onMouseDown: hasNextLevel ? preventFocus : void 0,
828
- disabled: !hasNextLevel,
829
- "data-static": !hasNextLevel || void 0,
830
- "aria-label": levelControlAriaLabel,
831
- tabIndex: __preventFocus || !hasNextLevel ? -1 : 0,
832
- "data-mantine-stop-propagation": __stopPropagation || void 0
833
- }, label);
834
- const nextControl = withNext && /* @__PURE__ */ createElement(UnstyledButton, {
835
- ...getStyles("calendarHeaderControl"),
836
- key: "next",
837
- "data-direction": "next",
838
- "aria-label": nextLabel,
839
- onClick: onNext,
840
- unstyled,
841
- onMouseDown: preventFocus,
842
- disabled: nextDisabled,
843
- "data-disabled": nextDisabled || void 0,
844
- tabIndex: __preventFocus || nextDisabled ? -1 : 0,
845
- "data-mantine-stop-propagation": __stopPropagation || void 0
846
- }, nextIcon || /* @__PURE__ */ jsx(AccordionChevron, {
847
- ...getStyles("calendarHeaderControlIcon"),
848
- "data-direction": "next",
849
- size: "45%"
850
- }));
851
- const controls = headerControlsOrder.map((control) => {
852
- if (control === "previous") return previousControl;
853
- if (control === "level") return levelControl;
854
- if (control === "next") return nextControl;
855
- return null;
856
- });
857
- return /* @__PURE__ */ jsx(Box, {
858
- ...getStyles("calendarHeader"),
859
- "data-full-width": fullWidth || void 0,
860
- ...others,
861
- children: controls
862
- });
863
- });
864
- CalendarHeader.classes = CalendarHeader_module_default;
865
- CalendarHeader.varsResolver = varsResolver5;
866
- CalendarHeader.displayName = "@mantine/dates/CalendarHeader";
867
-
868
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/DecadeLevel/get-decade-range/get-decade-range.mjs
869
- function getDecadeRange(decade) {
870
- const years = getYearsData(decade);
871
- return [years[0][0], years[3][0]];
872
- }
873
- var defaultProps5 = { decadeLabelFormat: "YYYY" };
874
- var DecadeLevel = factory((_props) => {
875
- const { decade, locale, minDate, maxDate, yearsListFormat, getYearControlProps, __getControlRef, __onControlKeyDown, __onControlClick, __onControlMouseEnter, withCellSpacing, __preventFocus, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, nextDisabled, previousDisabled, levelControlAriaLabel, withNext, withPrevious, headerControlsOrder, decadeLabelFormat, classNames, styles, unstyled, __staticSelector, __stopPropagation, size, fullWidth, attributes, ...others } = useProps("DecadeLevel", defaultProps5, _props);
876
- const ctx = useDatesContext();
877
- const [startOfDecade, endOfDecade] = getDecadeRange(decade);
878
- const stylesApiProps = {
879
- __staticSelector: __staticSelector || "DecadeLevel",
880
- classNames,
881
- styles,
882
- unstyled,
883
- size,
884
- attributes
885
- };
886
- const _nextDisabled = typeof nextDisabled === "boolean" ? nextDisabled : maxDate ? !dayjs27(endOfDecade).endOf("year").isBefore(maxDate) : false;
887
- const _previousDisabled = typeof previousDisabled === "boolean" ? previousDisabled : minDate ? !dayjs27(startOfDecade).startOf("year").isAfter(minDate) : false;
888
- const formatDecade = (date, format) => dayjs27(date).locale(locale || ctx.locale).format(format);
889
- return /* @__PURE__ */ jsxs(Box, {
890
- "data-decade-level": true,
891
- size,
892
- ...others,
893
- children: [/* @__PURE__ */ jsx(CalendarHeader, {
894
- label: typeof decadeLabelFormat === "function" ? decadeLabelFormat(startOfDecade, endOfDecade) : `${formatDecade(startOfDecade, decadeLabelFormat)} \u2013 ${formatDecade(endOfDecade, decadeLabelFormat)}`,
895
- __preventFocus,
896
- __stopPropagation,
897
- nextIcon,
898
- previousIcon,
899
- nextLabel,
900
- previousLabel,
901
- onNext,
902
- onPrevious,
903
- nextDisabled: _nextDisabled,
904
- previousDisabled: _previousDisabled,
905
- hasNextLevel: false,
906
- levelControlAriaLabel,
907
- withNext,
908
- withPrevious,
909
- headerControlsOrder,
910
- fullWidth,
911
- ...stylesApiProps
912
- }), /* @__PURE__ */ jsx(YearsList, {
913
- decade,
914
- locale,
915
- minDate,
916
- maxDate,
917
- yearsListFormat,
918
- getYearControlProps,
919
- __getControlRef,
920
- __onControlKeyDown,
921
- __onControlClick,
922
- __onControlMouseEnter,
923
- __preventFocus,
924
- __stopPropagation,
925
- withCellSpacing,
926
- fullWidth,
927
- ...stylesApiProps
928
- })]
929
- });
930
- });
931
- DecadeLevel.classes = {
932
- ...YearsList.classes,
933
- ...CalendarHeader.classes
934
- };
935
- DecadeLevel.displayName = "@mantine/dates/DecadeLevel";
936
- var defaultProps6 = { yearLabelFormat: "YYYY" };
937
- var YearLevel = factory((_props) => {
938
- const { year, locale, minDate, maxDate, monthsListFormat, getMonthControlProps, __getControlRef, __onControlKeyDown, __onControlClick, __onControlMouseEnter, withCellSpacing, __preventFocus, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, onLevelClick, nextDisabled, previousDisabled, hasNextLevel, levelControlAriaLabel, withNext, withPrevious, headerControlsOrder, yearLabelFormat, __staticSelector, __stopPropagation, size, classNames, styles, unstyled, fullWidth, attributes, ...others } = useProps("YearLevel", defaultProps6, _props);
939
- const ctx = useDatesContext();
940
- const stylesApiProps = {
941
- __staticSelector: __staticSelector || "YearLevel",
942
- classNames,
943
- styles,
944
- unstyled,
945
- size,
946
- attributes
947
- };
948
- const _nextDisabled = typeof nextDisabled === "boolean" ? nextDisabled : maxDate ? !dayjs27(year).endOf("year").isBefore(maxDate) : false;
949
- const _previousDisabled = typeof previousDisabled === "boolean" ? previousDisabled : minDate ? !dayjs27(year).startOf("year").isAfter(minDate) : false;
950
- return /* @__PURE__ */ jsxs(Box, {
951
- "data-year-level": true,
952
- size,
953
- ...others,
954
- children: [/* @__PURE__ */ jsx(CalendarHeader, {
955
- label: typeof yearLabelFormat === "function" ? yearLabelFormat(year) : dayjs27(year).locale(locale || ctx.locale).format(yearLabelFormat),
956
- __preventFocus,
957
- __stopPropagation,
958
- nextIcon,
959
- previousIcon,
960
- nextLabel,
961
- previousLabel,
962
- onNext,
963
- onPrevious,
964
- onLevelClick,
965
- nextDisabled: _nextDisabled,
966
- previousDisabled: _previousDisabled,
967
- hasNextLevel,
968
- levelControlAriaLabel,
969
- withNext,
970
- withPrevious,
971
- headerControlsOrder,
972
- fullWidth,
973
- ...stylesApiProps
974
- }), /* @__PURE__ */ jsx(MonthsList, {
975
- year,
976
- locale,
977
- minDate,
978
- maxDate,
979
- monthsListFormat,
980
- getMonthControlProps,
981
- __getControlRef,
982
- __onControlKeyDown,
983
- __onControlClick,
984
- __onControlMouseEnter,
985
- __preventFocus,
986
- __stopPropagation,
987
- withCellSpacing,
988
- fullWidth,
989
- ...stylesApiProps
990
- })]
991
- });
992
- });
993
- YearLevel.classes = {
994
- ...CalendarHeader.classes,
995
- ...MonthsList.classes
996
- };
997
- YearLevel.displayName = "@mantine/dates/YearLevel";
998
- var defaultProps7 = { monthLabelFormat: "MMMM YYYY" };
999
- var MonthLevel = factory((_props) => {
1000
- const { month, locale, firstDayOfWeek, weekdayFormat, weekendDays, getDayProps, excludeDate, minDate, maxDate, renderDay, hideOutsideDates, hideWeekdays, getDayAriaLabel, __getDayRef, __onDayKeyDown, __onDayClick, __onDayMouseEnter, withCellSpacing, highlightToday, withWeekNumbers, __preventFocus, __stopPropagation, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, onLevelClick, nextDisabled, previousDisabled, hasNextLevel, levelControlAriaLabel, withNext, withPrevious, headerControlsOrder, monthLabelFormat, classNames, styles, unstyled, __staticSelector, size, static: isStatic, fullWidth, attributes, ...others } = useProps("MonthLevel", defaultProps7, _props);
1001
- const ctx = useDatesContext();
1002
- const stylesApiProps = {
1003
- __staticSelector: __staticSelector || "MonthLevel",
1004
- classNames,
1005
- styles,
1006
- unstyled,
1007
- size,
1008
- attributes
1009
- };
1010
- const _nextDisabled = typeof nextDisabled === "boolean" ? nextDisabled : maxDate ? !dayjs27(month).endOf("month").isBefore(maxDate) : false;
1011
- const _previousDisabled = typeof previousDisabled === "boolean" ? previousDisabled : minDate ? !dayjs27(month).startOf("month").isAfter(minDate) : false;
1012
- return /* @__PURE__ */ jsxs(Box, {
1013
- "data-month-level": true,
1014
- size,
1015
- ...others,
1016
- children: [/* @__PURE__ */ jsx(CalendarHeader, {
1017
- label: typeof monthLabelFormat === "function" ? monthLabelFormat(month) : dayjs27(month).locale(locale || ctx.locale).format(monthLabelFormat),
1018
- __preventFocus,
1019
- __stopPropagation,
1020
- nextIcon,
1021
- previousIcon,
1022
- nextLabel,
1023
- previousLabel,
1024
- onNext,
1025
- onPrevious,
1026
- onLevelClick,
1027
- nextDisabled: _nextDisabled,
1028
- previousDisabled: _previousDisabled,
1029
- hasNextLevel,
1030
- levelControlAriaLabel,
1031
- withNext,
1032
- withPrevious,
1033
- headerControlsOrder,
1034
- fullWidth,
1035
- ...stylesApiProps
1036
- }), /* @__PURE__ */ jsx(Month, {
1037
- month,
1038
- locale,
1039
- firstDayOfWeek,
1040
- weekdayFormat,
1041
- weekendDays,
1042
- getDayProps,
1043
- excludeDate,
1044
- minDate,
1045
- maxDate,
1046
- renderDay,
1047
- hideOutsideDates,
1048
- hideWeekdays,
1049
- getDayAriaLabel,
1050
- __getDayRef,
1051
- __onDayKeyDown,
1052
- __onDayClick,
1053
- __onDayMouseEnter,
1054
- __preventFocus,
1055
- __stopPropagation,
1056
- static: isStatic,
1057
- withCellSpacing,
1058
- highlightToday,
1059
- withWeekNumbers,
1060
- fullWidth,
1061
- ...stylesApiProps
1062
- })]
1063
- });
1064
- });
1065
- MonthLevel.classes = {
1066
- ...Month.classes,
1067
- ...CalendarHeader.classes
1068
- };
1069
- MonthLevel.displayName = "@mantine/dates/MonthLevel";
1070
-
1071
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/LevelsGroup/LevelsGroup.module.mjs
1072
- var LevelsGroup_module_default = { "levelsGroup": "m_30b26e33" };
1073
- var LevelsGroup = factory((_props) => {
1074
- const props = useProps("LevelsGroup", null, _props);
1075
- const { classNames, className, style, styles, unstyled, vars, __staticSelector, fullWidth, attributes, ...others } = props;
1076
- return /* @__PURE__ */ jsx(Box, {
1077
- ...useStyles({
1078
- name: __staticSelector || "LevelsGroup",
1079
- classes: LevelsGroup_module_default,
1080
- props,
1081
- className,
1082
- style,
1083
- classNames,
1084
- styles,
1085
- unstyled,
1086
- attributes,
1087
- vars,
1088
- rootSelector: "levelsGroup"
1089
- })("levelsGroup"),
1090
- "data-full-width": fullWidth || void 0,
1091
- ...others
1092
- });
1093
- });
1094
- LevelsGroup.classes = LevelsGroup_module_default;
1095
- LevelsGroup.displayName = "@mantine/dates/LevelsGroup";
1096
- var defaultProps8 = { numberOfColumns: 1 };
1097
- var DecadeLevelGroup = factory((_props) => {
1098
- const { decade, locale, minDate, maxDate, yearsListFormat, getYearControlProps, __onControlClick, __onControlMouseEnter, withCellSpacing, __preventFocus, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, nextDisabled, previousDisabled, headerControlsOrder, classNames, styles, unstyled, __staticSelector, __stopPropagation, numberOfColumns, levelControlAriaLabel, decadeLabelFormat, size, fullWidth, vars, attributes, ...others } = useProps("DecadeLevelGroup", defaultProps8, _props);
1099
- const controlsRef = useRef([]);
1100
- const decades = Array(numberOfColumns).fill(0).map((_, decadeIndex) => {
1101
- const currentDecade = dayjs27(decade).add(decadeIndex * 10, "years").format("YYYY-MM-DD");
1102
- return /* @__PURE__ */ jsx(DecadeLevel, {
1103
- size,
1104
- yearsListFormat,
1105
- decade: currentDecade,
1106
- withNext: decadeIndex === numberOfColumns - 1,
1107
- withPrevious: decadeIndex === 0,
1108
- decadeLabelFormat,
1109
- __onControlClick,
1110
- __onControlMouseEnter,
1111
- __onControlKeyDown: (event, payload) => handleControlKeyDown({
1112
- levelIndex: decadeIndex,
1113
- rowIndex: payload.rowIndex,
1114
- cellIndex: payload.cellIndex,
1115
- event,
1116
- controlsRef
1117
- }),
1118
- __getControlRef: (rowIndex, cellIndex, node) => {
1119
- if (!Array.isArray(controlsRef.current[decadeIndex])) controlsRef.current[decadeIndex] = [];
1120
- if (!Array.isArray(controlsRef.current[decadeIndex][rowIndex])) controlsRef.current[decadeIndex][rowIndex] = [];
1121
- controlsRef.current[decadeIndex][rowIndex][cellIndex] = node;
1122
- },
1123
- levelControlAriaLabel: typeof levelControlAriaLabel === "function" ? levelControlAriaLabel(currentDecade) : levelControlAriaLabel,
1124
- locale,
1125
- minDate,
1126
- maxDate,
1127
- __preventFocus,
1128
- __stopPropagation,
1129
- nextIcon,
1130
- previousIcon,
1131
- nextLabel,
1132
- previousLabel,
1133
- onNext,
1134
- onPrevious,
1135
- nextDisabled,
1136
- previousDisabled,
1137
- getYearControlProps,
1138
- __staticSelector: __staticSelector || "DecadeLevelGroup",
1139
- classNames,
1140
- styles,
1141
- unstyled,
1142
- withCellSpacing,
1143
- headerControlsOrder,
1144
- fullWidth,
1145
- attributes
1146
- }, decadeIndex);
1147
- });
1148
- return /* @__PURE__ */ jsx(LevelsGroup, {
1149
- classNames,
1150
- styles,
1151
- __staticSelector: __staticSelector || "DecadeLevelGroup",
1152
- size,
1153
- unstyled,
1154
- fullWidth,
1155
- attributes,
1156
- ...others,
1157
- children: decades
1158
- });
1159
- });
1160
- DecadeLevelGroup.classes = {
1161
- ...LevelsGroup.classes,
1162
- ...DecadeLevel.classes
1163
- };
1164
- DecadeLevelGroup.displayName = "@mantine/dates/DecadeLevelGroup";
1165
- var defaultProps9 = { numberOfColumns: 1 };
1166
- var YearLevelGroup = factory((_props) => {
1167
- const { year, locale, minDate, maxDate, monthsListFormat, getMonthControlProps, __onControlClick, __onControlMouseEnter, withCellSpacing, __preventFocus, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, onLevelClick, nextDisabled, previousDisabled, hasNextLevel, headerControlsOrder, classNames, styles, unstyled, __staticSelector, __stopPropagation, numberOfColumns, levelControlAriaLabel, yearLabelFormat, size, fullWidth, vars, attributes, ...others } = useProps("YearLevelGroup", defaultProps9, _props);
1168
- const controlsRef = useRef([]);
1169
- const years = Array(numberOfColumns).fill(0).map((_, yearIndex) => {
1170
- const currentYear = dayjs27(year).add(yearIndex, "years").format("YYYY-MM-DD");
1171
- return /* @__PURE__ */ jsx(YearLevel, {
1172
- size,
1173
- monthsListFormat,
1174
- year: currentYear,
1175
- withNext: yearIndex === numberOfColumns - 1,
1176
- withPrevious: yearIndex === 0,
1177
- yearLabelFormat,
1178
- __stopPropagation,
1179
- __onControlClick,
1180
- __onControlMouseEnter,
1181
- __onControlKeyDown: (event, payload) => handleControlKeyDown({
1182
- levelIndex: yearIndex,
1183
- rowIndex: payload.rowIndex,
1184
- cellIndex: payload.cellIndex,
1185
- event,
1186
- controlsRef
1187
- }),
1188
- __getControlRef: (rowIndex, cellIndex, node) => {
1189
- if (!Array.isArray(controlsRef.current[yearIndex])) controlsRef.current[yearIndex] = [];
1190
- if (!Array.isArray(controlsRef.current[yearIndex][rowIndex])) controlsRef.current[yearIndex][rowIndex] = [];
1191
- controlsRef.current[yearIndex][rowIndex][cellIndex] = node;
1192
- },
1193
- levelControlAriaLabel: typeof levelControlAriaLabel === "function" ? levelControlAriaLabel(currentYear) : levelControlAriaLabel,
1194
- locale,
1195
- minDate,
1196
- maxDate,
1197
- __preventFocus,
1198
- nextIcon,
1199
- previousIcon,
1200
- nextLabel,
1201
- previousLabel,
1202
- onNext,
1203
- onPrevious,
1204
- onLevelClick,
1205
- nextDisabled,
1206
- previousDisabled,
1207
- hasNextLevel,
1208
- getMonthControlProps,
1209
- classNames,
1210
- styles,
1211
- unstyled,
1212
- __staticSelector: __staticSelector || "YearLevelGroup",
1213
- withCellSpacing,
1214
- headerControlsOrder,
1215
- fullWidth,
1216
- attributes
1217
- }, yearIndex);
1218
- });
1219
- return /* @__PURE__ */ jsx(LevelsGroup, {
1220
- classNames,
1221
- styles,
1222
- __staticSelector: __staticSelector || "YearLevelGroup",
1223
- size,
1224
- unstyled,
1225
- fullWidth,
1226
- attributes,
1227
- ...others,
1228
- children: years
1229
- });
1230
- });
1231
- YearLevelGroup.classes = {
1232
- ...YearLevel.classes,
1233
- ...LevelsGroup.classes
1234
- };
1235
- YearLevelGroup.displayName = "@mantine/dates/YearLevelGroup";
1236
- var defaultProps10 = { numberOfColumns: 1 };
1237
- var MonthLevelGroup = factory((_props) => {
1238
- const { month, locale, firstDayOfWeek, weekdayFormat, weekendDays, getDayProps, excludeDate, minDate, maxDate, renderDay, hideOutsideDates, hideWeekdays, getDayAriaLabel, __onDayClick, __onDayMouseEnter, withCellSpacing, highlightToday, withWeekNumbers, __preventFocus, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, onLevelClick, nextDisabled, previousDisabled, hasNextLevel, headerControlsOrder, classNames, styles, unstyled, numberOfColumns, levelControlAriaLabel, monthLabelFormat, __staticSelector, __stopPropagation, size, static: isStatic, fullWidth, vars, attributes, ...others } = useProps("MonthLevelGroup", defaultProps10, _props);
1239
- const daysRefs = useRef([]);
1240
- const months = Array(numberOfColumns).fill(0).map((_, monthIndex) => {
1241
- const currentMonth = dayjs27(month).add(monthIndex, "months").format("YYYY-MM-DD");
1242
- return /* @__PURE__ */ jsx(MonthLevel, {
1243
- month: currentMonth,
1244
- withNext: monthIndex === numberOfColumns - 1,
1245
- withPrevious: monthIndex === 0,
1246
- monthLabelFormat,
1247
- __stopPropagation,
1248
- __onDayClick,
1249
- __onDayMouseEnter,
1250
- __onDayKeyDown: (event, payload) => handleControlKeyDown({
1251
- levelIndex: monthIndex,
1252
- rowIndex: payload.rowIndex,
1253
- cellIndex: payload.cellIndex,
1254
- event,
1255
- controlsRef: daysRefs
1256
- }),
1257
- __getDayRef: (rowIndex, cellIndex, node) => {
1258
- if (!Array.isArray(daysRefs.current[monthIndex])) daysRefs.current[monthIndex] = [];
1259
- if (!Array.isArray(daysRefs.current[monthIndex][rowIndex])) daysRefs.current[monthIndex][rowIndex] = [];
1260
- daysRefs.current[monthIndex][rowIndex][cellIndex] = node;
1261
- },
1262
- levelControlAriaLabel: typeof levelControlAriaLabel === "function" ? levelControlAriaLabel(currentMonth) : levelControlAriaLabel,
1263
- locale,
1264
- firstDayOfWeek,
1265
- weekdayFormat,
1266
- weekendDays,
1267
- getDayProps,
1268
- excludeDate,
1269
- minDate,
1270
- maxDate,
1271
- renderDay,
1272
- hideOutsideDates,
1273
- hideWeekdays,
1274
- getDayAriaLabel,
1275
- __preventFocus,
1276
- nextIcon,
1277
- previousIcon,
1278
- nextLabel,
1279
- previousLabel,
1280
- onNext,
1281
- onPrevious,
1282
- onLevelClick,
1283
- nextDisabled,
1284
- previousDisabled,
1285
- hasNextLevel,
1286
- classNames,
1287
- styles,
1288
- unstyled,
1289
- __staticSelector: __staticSelector || "MonthLevelGroup",
1290
- size,
1291
- static: isStatic,
1292
- withCellSpacing,
1293
- highlightToday,
1294
- withWeekNumbers,
1295
- headerControlsOrder,
1296
- fullWidth,
1297
- attributes
1298
- }, monthIndex);
1299
- });
1300
- return /* @__PURE__ */ jsx(LevelsGroup, {
1301
- classNames,
1302
- styles,
1303
- __staticSelector: __staticSelector || "MonthLevelGroup",
1304
- size,
1305
- fullWidth,
1306
- attributes,
1307
- ...others,
1308
- children: months
1309
- });
1310
- });
1311
- MonthLevelGroup.classes = {
1312
- ...LevelsGroup.classes,
1313
- ...MonthLevel.classes
1314
- };
1315
- MonthLevelGroup.displayName = "@mantine/dates/MonthLevelGroup";
1316
- var getEmptyValue = (type) => type === "range" ? [null, null] : type === "multiple" ? [] : null;
1317
- var convertDatesValue = (value, withTime) => {
1318
- const converter = withTime ? toDateTimeString : toDateString;
1319
- return Array.isArray(value) ? value.map(converter) : converter(value);
1320
- };
1321
- function useUncontrolledDates({ type, value, defaultValue, onChange, withTime = false }) {
1322
- const storedType = useRef(type);
1323
- const [_value, _setValue, controlled] = useUncontrolled({
1324
- value: convertDatesValue(value, withTime),
1325
- defaultValue: convertDatesValue(defaultValue, withTime),
1326
- finalValue: getEmptyValue(type),
1327
- onChange
1328
- });
1329
- let _finalValue = _value;
1330
- if (storedType.current !== type) {
1331
- storedType.current = type;
1332
- if (value === void 0) {
1333
- _finalValue = defaultValue !== void 0 ? defaultValue : getEmptyValue(type);
1334
- _setValue(_finalValue);
1335
- }
1336
- }
1337
- return [
1338
- _finalValue,
1339
- _setValue,
1340
- controlled
1341
- ];
1342
- }
1343
-
1344
- // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/Calendar/clamp-level/clamp-level.mjs
1345
- function levelToNumber(level, fallback) {
1346
- if (!level) return fallback || 0;
1347
- return level === "month" ? 0 : level === "year" ? 1 : 2;
1348
- }
1349
- function levelNumberToLevel(levelNumber) {
1350
- return levelNumber === 0 ? "month" : levelNumber === 1 ? "year" : "decade";
1351
- }
1352
- function clampLevel(level, minLevel, maxLevel) {
1353
- return levelNumberToLevel(clamp(levelToNumber(level, 0), levelToNumber(minLevel, 0), levelToNumber(maxLevel, 2)));
1354
- }
1355
- var defaultProps11 = {
1356
- maxLevel: "decade",
1357
- minLevel: "month",
1358
- __updateDateOnYearSelect: true,
1359
- __updateDateOnMonthSelect: true,
1360
- enableKeyboardNavigation: true
1361
- };
1362
- var Calendar = factory((_props) => {
1363
- const props = useProps("Calendar", defaultProps11, _props);
1364
- const { vars, maxLevel, minLevel, defaultLevel, level, onLevelChange, date, defaultDate, onDateChange, numberOfColumns, columnsToScroll, ariaLabels, nextLabel, previousLabel, onYearSelect, onMonthSelect, onYearMouseEnter, onMonthMouseEnter, headerControlsOrder, __updateDateOnYearSelect, __updateDateOnMonthSelect, __setDateRef, __setLevelRef, firstDayOfWeek, weekdayFormat, weekendDays, getDayProps, excludeDate, renderDay, hideOutsideDates, hideWeekdays, getDayAriaLabel, monthLabelFormat, nextIcon, previousIcon, __onDayClick, __onDayMouseEnter, withCellSpacing, highlightToday, withWeekNumbers, monthsListFormat, getMonthControlProps, yearLabelFormat, yearsListFormat, getYearControlProps, decadeLabelFormat, classNames, styles, unstyled, minDate, maxDate, locale, __staticSelector, size, __preventFocus, __stopPropagation, onNextDecade, onPreviousDecade, onNextYear, onPreviousYear, onNextMonth, onPreviousMonth, static: isStatic, enableKeyboardNavigation, fullWidth, attributes, ref, ...others } = props;
1365
- const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi({
1366
- classNames,
1367
- styles,
1368
- props
1369
- });
1370
- const [_level, setLevel] = useUncontrolled({
1371
- value: level ? clampLevel(level, minLevel, maxLevel) : void 0,
1372
- defaultValue: defaultLevel ? clampLevel(defaultLevel, minLevel, maxLevel) : void 0,
1373
- finalValue: clampLevel(void 0, minLevel, maxLevel),
1374
- onChange: onLevelChange
1375
- });
1376
- const [_date, setDate] = useUncontrolledDates({
1377
- type: "default",
1378
- value: toDateString(date),
1379
- defaultValue: toDateString(defaultDate),
1380
- onChange: onDateChange
1381
- });
1382
- useImperativeHandle(__setDateRef, () => (date2) => {
1383
- setDate(date2);
1384
- });
1385
- useImperativeHandle(__setLevelRef, () => (level2) => {
1386
- setLevel(level2);
1387
- });
1388
- const stylesApiProps = {
1389
- __staticSelector: __staticSelector || "Calendar",
1390
- styles: resolvedStyles,
1391
- classNames: resolvedClassNames,
1392
- unstyled,
1393
- size,
1394
- attributes
1395
- };
1396
- const _columnsToScroll = columnsToScroll || numberOfColumns || 1;
1397
- const fallbackDateRef = useRef(null);
1398
- if (fallbackDateRef.current === null) {
1399
- const now = /* @__PURE__ */ new Date();
1400
- fallbackDateRef.current = minDate && dayjs27(now).isAfter(minDate) ? minDate : dayjs27(now).format("YYYY-MM-DD");
1401
- }
1402
- const currentDate = _date || fallbackDateRef.current;
1403
- const handleNextMonth = () => {
1404
- const nextDate = dayjs27(currentDate).add(_columnsToScroll, "month").format("YYYY-MM-DD");
1405
- onNextMonth?.(nextDate);
1406
- setDate(nextDate);
1407
- };
1408
- const handlePreviousMonth = () => {
1409
- const nextDate = dayjs27(currentDate).subtract(_columnsToScroll, "month").format("YYYY-MM-DD");
1410
- onPreviousMonth?.(nextDate);
1411
- setDate(nextDate);
1412
- };
1413
- const handleNextYear = () => {
1414
- const nextDate = dayjs27(currentDate).add(_columnsToScroll, "year").format("YYYY-MM-DD");
1415
- onNextYear?.(nextDate);
1416
- setDate(nextDate);
1417
- };
1418
- const handlePreviousYear = () => {
1419
- const nextDate = dayjs27(currentDate).subtract(_columnsToScroll, "year").format("YYYY-MM-DD");
1420
- onPreviousYear?.(nextDate);
1421
- setDate(nextDate);
1422
- };
1423
- const handleNextDecade = () => {
1424
- const nextDate = dayjs27(currentDate).add(10 * _columnsToScroll, "year").format("YYYY-MM-DD");
1425
- onNextDecade?.(nextDate);
1426
- setDate(nextDate);
1427
- };
1428
- const handlePreviousDecade = () => {
1429
- const nextDate = dayjs27(currentDate).subtract(10 * _columnsToScroll, "year").format("YYYY-MM-DD");
1430
- onPreviousDecade?.(nextDate);
1431
- setDate(nextDate);
1432
- };
1433
- const calendarRef = useRef(null);
1434
- useEffect(() => {
1435
- if (!enableKeyboardNavigation || isStatic) return;
1436
- const handleKeyDown = (event) => {
1437
- if (!calendarRef.current?.contains(document.activeElement)) return;
1438
- const isCtrlOrCmd = event.ctrlKey || event.metaKey;
1439
- const isShift = event.shiftKey;
1440
- switch (event.key) {
1441
- case "ArrowUp":
1442
- if (isCtrlOrCmd && isShift) {
1443
- event.preventDefault();
1444
- handlePreviousDecade();
1445
- } else if (isCtrlOrCmd) {
1446
- event.preventDefault();
1447
- handlePreviousYear();
1448
- }
1449
- break;
1450
- case "ArrowDown":
1451
- if (isCtrlOrCmd && isShift) {
1452
- event.preventDefault();
1453
- handleNextDecade();
1454
- } else if (isCtrlOrCmd) {
1455
- event.preventDefault();
1456
- handleNextYear();
1457
- }
1458
- break;
1459
- case "y":
1460
- case "Y":
1461
- if (_level === "month") {
1462
- event.preventDefault();
1463
- setLevel("year");
1464
- }
1465
- break;
1466
- }
1467
- };
1468
- document.addEventListener("keydown", handleKeyDown);
1469
- return () => {
1470
- document.removeEventListener("keydown", handleKeyDown);
1471
- };
1472
- }, [
1473
- enableKeyboardNavigation,
1474
- isStatic,
1475
- _level,
1476
- handleNextYear,
1477
- handlePreviousYear,
1478
- handleNextDecade,
1479
- handlePreviousDecade
1480
- ]);
1481
- return /* @__PURE__ */ jsxs(Box, {
1482
- ref: useMergedRef(calendarRef, ref),
1483
- size,
1484
- "data-calendar": true,
1485
- "data-full-width": fullWidth || void 0,
1486
- ...others,
1487
- children: [
1488
- _level === "month" && /* @__PURE__ */ jsx(MonthLevelGroup, {
1489
- month: currentDate,
1490
- minDate,
1491
- maxDate,
1492
- firstDayOfWeek,
1493
- weekdayFormat,
1494
- weekendDays,
1495
- getDayProps,
1496
- excludeDate,
1497
- renderDay,
1498
- hideOutsideDates,
1499
- hideWeekdays,
1500
- getDayAriaLabel,
1501
- onNext: handleNextMonth,
1502
- onPrevious: handlePreviousMonth,
1503
- hasNextLevel: maxLevel !== "month",
1504
- onLevelClick: () => setLevel("year"),
1505
- numberOfColumns,
1506
- locale,
1507
- levelControlAriaLabel: ariaLabels?.monthLevelControl,
1508
- nextLabel: ariaLabels?.nextMonth ?? nextLabel,
1509
- nextIcon,
1510
- previousLabel: ariaLabels?.previousMonth ?? previousLabel,
1511
- previousIcon,
1512
- monthLabelFormat,
1513
- __onDayClick,
1514
- __onDayMouseEnter,
1515
- __preventFocus,
1516
- __stopPropagation,
1517
- static: isStatic,
1518
- withCellSpacing,
1519
- highlightToday,
1520
- withWeekNumbers,
1521
- headerControlsOrder,
1522
- fullWidth,
1523
- ...stylesApiProps
1524
- }),
1525
- _level === "year" && /* @__PURE__ */ jsx(YearLevelGroup, {
1526
- year: currentDate,
1527
- numberOfColumns,
1528
- minDate,
1529
- maxDate,
1530
- monthsListFormat,
1531
- getMonthControlProps,
1532
- locale,
1533
- onNext: handleNextYear,
1534
- onPrevious: handlePreviousYear,
1535
- hasNextLevel: maxLevel !== "month" && maxLevel !== "year",
1536
- onLevelClick: () => setLevel("decade"),
1537
- levelControlAriaLabel: ariaLabels?.yearLevelControl,
1538
- nextLabel: ariaLabels?.nextYear ?? nextLabel,
1539
- nextIcon,
1540
- previousLabel: ariaLabels?.previousYear ?? previousLabel,
1541
- previousIcon,
1542
- yearLabelFormat,
1543
- __onControlMouseEnter: onMonthMouseEnter,
1544
- __onControlClick: (_event, payload) => {
1545
- __updateDateOnMonthSelect && setDate(payload);
1546
- setLevel(clampLevel("month", minLevel, maxLevel));
1547
- onMonthSelect?.(payload);
1548
- },
1549
- __preventFocus,
1550
- __stopPropagation,
1551
- withCellSpacing,
1552
- headerControlsOrder,
1553
- fullWidth,
1554
- ...stylesApiProps
1555
- }),
1556
- _level === "decade" && /* @__PURE__ */ jsx(DecadeLevelGroup, {
1557
- decade: currentDate,
1558
- minDate,
1559
- maxDate,
1560
- yearsListFormat,
1561
- getYearControlProps,
1562
- locale,
1563
- onNext: handleNextDecade,
1564
- onPrevious: handlePreviousDecade,
1565
- numberOfColumns,
1566
- nextLabel: ariaLabels?.nextDecade ?? nextLabel,
1567
- nextIcon,
1568
- previousLabel: ariaLabels?.previousDecade ?? previousLabel,
1569
- previousIcon,
1570
- decadeLabelFormat,
1571
- __onControlMouseEnter: onYearMouseEnter,
1572
- __onControlClick: (_event, payload) => {
1573
- __updateDateOnYearSelect && setDate(payload);
1574
- setLevel(clampLevel("year", minLevel, maxLevel));
1575
- onYearSelect?.(payload);
1576
- },
1577
- __preventFocus,
1578
- __stopPropagation,
1579
- withCellSpacing,
1580
- headerControlsOrder,
1581
- fullWidth,
1582
- ...stylesApiProps
1583
- })
1584
- ]
1585
- });
1586
- });
1587
- Calendar.classes = {
1588
- ...DecadeLevelGroup.classes,
1589
- ...YearLevelGroup.classes,
1590
- ...MonthLevelGroup.classes
1591
- };
1592
- Calendar.displayName = "@mantine/dates/Calendar";
1593
-
1594
- // src/components/Apps/CalendarApp/CalendarApp.module.css
1595
- var CalendarApp_default = {};
1596
- var CalendarApp = () => {
1597
- return /* @__PURE__ */ jsx("div", { className: CalendarApp_default.root, children: /* @__PURE__ */ jsx(Calendar, {}) });
1598
- };
1599
- var CalendarApp_default2 = CalendarApp;
1600
-
1601
- export { CalendarApp_default2 as CalendarApp_default };