@startdownnotez404/ui 1.0.0 → 1.3.5

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 (439) hide show
  1. package/README.md +110 -0
  2. package/dist/AutocompleteField-ZKNU2IRR.mjs +181 -0
  3. package/dist/AutocompleteField-ZKNU2IRR.mjs.map +1 -0
  4. package/dist/AvatarField-SAODT3CZ.mjs +275 -0
  5. package/dist/AvatarField-SAODT3CZ.mjs.map +1 -0
  6. package/dist/CodeEditor-JF55ZNVD.mjs +34 -0
  7. package/dist/CodeEditor-JF55ZNVD.mjs.map +1 -0
  8. package/dist/DateField-ZYMZFHL4.mjs +82 -0
  9. package/dist/DateField-ZYMZFHL4.mjs.map +1 -0
  10. package/dist/DateTimeField-TPTJ7YIZ.mjs +65 -0
  11. package/dist/DateTimeField-TPTJ7YIZ.mjs.map +1 -0
  12. package/dist/FileUploadField-NTMWBJER.mjs +78 -0
  13. package/dist/FileUploadField-NTMWBJER.mjs.map +1 -0
  14. package/dist/JSONEditorField-TMRWGXVR.mjs +64 -0
  15. package/dist/JSONEditorField-TMRWGXVR.mjs.map +1 -0
  16. package/dist/PopperMenu-LJ36RPBW.mjs +416 -0
  17. package/dist/PopperMenu-LJ36RPBW.mjs.map +1 -0
  18. package/dist/TelField-LOGRVZ4I.mjs +88 -0
  19. package/dist/TelField-LOGRVZ4I.mjs.map +1 -0
  20. package/dist/alert.d.mts +202 -0
  21. package/dist/alert.d.ts +202 -0
  22. package/dist/alert.js +784 -0
  23. package/dist/alert.js.map +1 -0
  24. package/dist/alert.mjs +47 -0
  25. package/dist/alert.mjs.map +1 -0
  26. package/dist/appBar.d.mts +21 -0
  27. package/dist/appBar.d.ts +21 -0
  28. package/dist/appBar.js +64 -0
  29. package/dist/appBar.js.map +1 -0
  30. package/dist/appBar.mjs +12 -0
  31. package/dist/appBar.mjs.map +1 -0
  32. package/dist/autocomplete.d.mts +121 -0
  33. package/dist/autocomplete.d.ts +121 -0
  34. package/dist/autocomplete.js +2052 -0
  35. package/dist/autocomplete.js.map +1 -0
  36. package/dist/autocomplete.mjs +21 -0
  37. package/dist/autocomplete.mjs.map +1 -0
  38. package/dist/avatar.d.mts +253 -0
  39. package/dist/avatar.d.ts +253 -0
  40. package/dist/avatar.js +992 -0
  41. package/dist/avatar.js.map +1 -0
  42. package/dist/avatar.mjs +41 -0
  43. package/dist/avatar.mjs.map +1 -0
  44. package/dist/badge.d.mts +123 -0
  45. package/dist/badge.d.ts +123 -0
  46. package/dist/badge.js +151 -0
  47. package/dist/badge.js.map +1 -0
  48. package/dist/badge.mjs +10 -0
  49. package/dist/badge.mjs.map +1 -0
  50. package/dist/box.d.mts +36 -0
  51. package/dist/box.d.ts +36 -0
  52. package/dist/box.js +199 -0
  53. package/dist/box.js.map +1 -0
  54. package/dist/box.mjs +14 -0
  55. package/dist/box.mjs.map +1 -0
  56. package/dist/button.d.mts +230 -52
  57. package/dist/button.d.ts +230 -52
  58. package/dist/button.js +392 -60
  59. package/dist/button.js.map +1 -1
  60. package/dist/button.mjs +14 -8
  61. package/dist/card.d.mts +47 -0
  62. package/dist/card.d.ts +47 -0
  63. package/dist/card.js +135 -0
  64. package/dist/card.js.map +1 -0
  65. package/dist/card.mjs +24 -0
  66. package/dist/card.mjs.map +1 -0
  67. package/dist/chart.d.mts +40 -0
  68. package/dist/chart.d.ts +40 -0
  69. package/dist/chart.js +1234 -0
  70. package/dist/chart.js.map +1 -0
  71. package/dist/chart.mjs +10 -0
  72. package/dist/chart.mjs.map +1 -0
  73. package/dist/checkbox.d.mts +62 -0
  74. package/dist/checkbox.d.ts +62 -0
  75. package/dist/checkbox.js +299 -0
  76. package/dist/checkbox.js.map +1 -0
  77. package/dist/checkbox.mjs +14 -0
  78. package/dist/checkbox.mjs.map +1 -0
  79. package/dist/chip.d.mts +96 -0
  80. package/dist/chip.d.ts +96 -0
  81. package/dist/chip.js +112 -0
  82. package/dist/chip.js.map +1 -0
  83. package/dist/chip.mjs +10 -0
  84. package/dist/chip.mjs.map +1 -0
  85. package/dist/chunk-24XDGNJ6.mjs +1450 -0
  86. package/dist/chunk-24XDGNJ6.mjs.map +1 -0
  87. package/dist/chunk-27KYFU7R.mjs +30 -0
  88. package/dist/chunk-27KYFU7R.mjs.map +1 -0
  89. package/dist/chunk-2FFLT5VP.mjs +7 -0
  90. package/dist/chunk-2FFLT5VP.mjs.map +1 -0
  91. package/dist/chunk-2ZZJTBTE.mjs +148 -0
  92. package/dist/chunk-2ZZJTBTE.mjs.map +1 -0
  93. package/dist/chunk-3DQINB57.mjs +15 -0
  94. package/dist/chunk-3DQINB57.mjs.map +1 -0
  95. package/dist/chunk-3VUAM2GY.mjs +52 -0
  96. package/dist/chunk-3VUAM2GY.mjs.map +1 -0
  97. package/dist/chunk-4Q54P737.mjs +19 -0
  98. package/dist/chunk-4Q54P737.mjs.map +1 -0
  99. package/dist/chunk-4RPFRNXG.mjs +62 -0
  100. package/dist/chunk-4RPFRNXG.mjs.map +1 -0
  101. package/dist/chunk-56TI2ZBT.mjs +114 -0
  102. package/dist/chunk-56TI2ZBT.mjs.map +1 -0
  103. package/dist/chunk-6REEQBJI.mjs +62 -0
  104. package/dist/chunk-6REEQBJI.mjs.map +1 -0
  105. package/dist/chunk-AAH2O24U.mjs +325 -0
  106. package/dist/chunk-AAH2O24U.mjs.map +1 -0
  107. package/dist/chunk-B7DAB22K.mjs +16 -0
  108. package/dist/chunk-B7DAB22K.mjs.map +1 -0
  109. package/dist/chunk-BGB7JHIU.mjs +222 -0
  110. package/dist/chunk-BGB7JHIU.mjs.map +1 -0
  111. package/dist/chunk-CRYIEYZZ.mjs +756 -0
  112. package/dist/chunk-CRYIEYZZ.mjs.map +1 -0
  113. package/dist/chunk-CWFWRZWU.mjs +23 -0
  114. package/dist/chunk-CWFWRZWU.mjs.map +1 -0
  115. package/dist/chunk-DELCADNF.mjs +1926 -0
  116. package/dist/chunk-DELCADNF.mjs.map +1 -0
  117. package/dist/chunk-E3I2VDHZ.mjs +292 -0
  118. package/dist/chunk-E3I2VDHZ.mjs.map +1 -0
  119. package/dist/chunk-EEH7HACG.mjs +249 -0
  120. package/dist/chunk-EEH7HACG.mjs.map +1 -0
  121. package/dist/chunk-EKPULYPU.mjs +497 -0
  122. package/dist/chunk-EKPULYPU.mjs.map +1 -0
  123. package/dist/chunk-EW4DTFH3.mjs +69 -0
  124. package/dist/chunk-EW4DTFH3.mjs.map +1 -0
  125. package/dist/chunk-FJ6ZGZIA.mjs +43 -0
  126. package/dist/chunk-FJ6ZGZIA.mjs.map +1 -0
  127. package/dist/chunk-HE7MY3RT.mjs +23 -0
  128. package/dist/chunk-HE7MY3RT.mjs.map +1 -0
  129. package/dist/chunk-HR3A4H4E.mjs +1289 -0
  130. package/dist/chunk-HR3A4H4E.mjs.map +1 -0
  131. package/dist/chunk-I5JWS4Z7.mjs +91 -0
  132. package/dist/chunk-I5JWS4Z7.mjs.map +1 -0
  133. package/dist/chunk-IN3O4R7Q.mjs +932 -0
  134. package/dist/chunk-IN3O4R7Q.mjs.map +1 -0
  135. package/dist/chunk-JIU5GVM7.mjs +414 -0
  136. package/dist/chunk-JIU5GVM7.mjs.map +1 -0
  137. package/dist/chunk-JWANK42G.mjs +170 -0
  138. package/dist/chunk-JWANK42G.mjs.map +1 -0
  139. package/dist/chunk-MDAUF7IL.mjs +9 -0
  140. package/dist/chunk-MDAUF7IL.mjs.map +1 -0
  141. package/dist/chunk-MI64T62E.mjs +26 -0
  142. package/dist/chunk-MI64T62E.mjs.map +1 -0
  143. package/dist/chunk-NJYNJLT7.mjs +172 -0
  144. package/dist/chunk-NJYNJLT7.mjs.map +1 -0
  145. package/dist/chunk-NLBDBJ3R.mjs +97 -0
  146. package/dist/chunk-NLBDBJ3R.mjs.map +1 -0
  147. package/dist/chunk-OGNGPI3M.mjs +333 -0
  148. package/dist/chunk-OGNGPI3M.mjs.map +1 -0
  149. package/dist/chunk-OJV6V7YZ.mjs +552 -0
  150. package/dist/chunk-OJV6V7YZ.mjs.map +1 -0
  151. package/dist/chunk-ONQMRE2G.mjs +26 -0
  152. package/dist/chunk-ONQMRE2G.mjs.map +1 -0
  153. package/dist/chunk-OP6LKXPA.mjs +75 -0
  154. package/dist/chunk-OP6LKXPA.mjs.map +1 -0
  155. package/dist/chunk-QFF3HTHL.mjs +14 -0
  156. package/dist/chunk-QFF3HTHL.mjs.map +1 -0
  157. package/dist/chunk-QKGCW37O.mjs +1175 -0
  158. package/dist/chunk-QKGCW37O.mjs.map +1 -0
  159. package/dist/chunk-R5MKQN6D.mjs +227 -0
  160. package/dist/chunk-R5MKQN6D.mjs.map +1 -0
  161. package/dist/chunk-RXBQ7KXF.mjs +652 -0
  162. package/dist/chunk-RXBQ7KXF.mjs.map +1 -0
  163. package/dist/chunk-S6EZVRZC.mjs +161 -0
  164. package/dist/chunk-S6EZVRZC.mjs.map +1 -0
  165. package/dist/chunk-SGCUDWO3.mjs +396 -0
  166. package/dist/chunk-SGCUDWO3.mjs.map +1 -0
  167. package/dist/chunk-SRWPHN2N.mjs +188 -0
  168. package/dist/chunk-SRWPHN2N.mjs.map +1 -0
  169. package/dist/chunk-T34IULP5.mjs +242 -0
  170. package/dist/chunk-T34IULP5.mjs.map +1 -0
  171. package/dist/chunk-T4X375IG.mjs +100 -0
  172. package/dist/chunk-T4X375IG.mjs.map +1 -0
  173. package/dist/chunk-T6AMRENK.mjs +376 -0
  174. package/dist/chunk-T6AMRENK.mjs.map +1 -0
  175. package/dist/chunk-TDRA5EZI.mjs +325 -0
  176. package/dist/chunk-TDRA5EZI.mjs.map +1 -0
  177. package/dist/chunk-UDREPVEY.mjs +356 -0
  178. package/dist/chunk-UDREPVEY.mjs.map +1 -0
  179. package/dist/chunk-UGMRJMFZ.mjs +172 -0
  180. package/dist/chunk-UGMRJMFZ.mjs.map +1 -0
  181. package/dist/chunk-UMJ5SCIQ.mjs +438 -0
  182. package/dist/chunk-UMJ5SCIQ.mjs.map +1 -0
  183. package/dist/chunk-UTVSYS6S.mjs +270 -0
  184. package/dist/chunk-UTVSYS6S.mjs.map +1 -0
  185. package/dist/chunk-V26V2S3W.mjs +197 -0
  186. package/dist/chunk-V26V2S3W.mjs.map +1 -0
  187. package/dist/chunk-VYD3PDBB.mjs +38 -0
  188. package/dist/chunk-VYD3PDBB.mjs.map +1 -0
  189. package/dist/chunk-WYYP3Y34.mjs +55 -0
  190. package/dist/chunk-WYYP3Y34.mjs.map +1 -0
  191. package/dist/chunk-XIMFP6RB.mjs +161 -0
  192. package/dist/chunk-XIMFP6RB.mjs.map +1 -0
  193. package/dist/chunk-XJ2SXC2Q.mjs +558 -0
  194. package/dist/chunk-XJ2SXC2Q.mjs.map +1 -0
  195. package/dist/chunk-Y74ALKBL.mjs +565 -0
  196. package/dist/chunk-Y74ALKBL.mjs.map +1 -0
  197. package/dist/chunk-ZG3NQI77.mjs +353 -0
  198. package/dist/chunk-ZG3NQI77.mjs.map +1 -0
  199. package/dist/chunk-ZVFYOXDE.mjs +297 -0
  200. package/dist/chunk-ZVFYOXDE.mjs.map +1 -0
  201. package/dist/collapse.d.mts +10 -0
  202. package/dist/collapse.d.ts +10 -0
  203. package/dist/collapse.js +53 -0
  204. package/dist/collapse.js.map +1 -0
  205. package/dist/collapse.mjs +10 -0
  206. package/dist/collapse.mjs.map +1 -0
  207. package/dist/datePicker.d.mts +133 -0
  208. package/dist/datePicker.d.ts +133 -0
  209. package/dist/datePicker.js +482 -0
  210. package/dist/datePicker.js.map +1 -0
  211. package/dist/datePicker.mjs +29 -0
  212. package/dist/datePicker.mjs.map +1 -0
  213. package/dist/displayFile.d.mts +95 -0
  214. package/dist/displayFile.d.ts +95 -0
  215. package/dist/displayFile.js +357 -0
  216. package/dist/displayFile.js.map +1 -0
  217. package/dist/displayFile.mjs +19 -0
  218. package/dist/displayFile.mjs.map +1 -0
  219. package/dist/divider.d.mts +9 -0
  220. package/dist/divider.d.ts +9 -0
  221. package/dist/divider.js +52 -0
  222. package/dist/divider.js.map +1 -0
  223. package/dist/divider.mjs +10 -0
  224. package/dist/divider.mjs.map +1 -0
  225. package/dist/fileUploader.d.mts +86 -0
  226. package/dist/fileUploader.d.ts +86 -0
  227. package/dist/fileUploader.js +722 -0
  228. package/dist/fileUploader.js.map +1 -0
  229. package/dist/fileUploader.mjs +16 -0
  230. package/dist/fileUploader.mjs.map +1 -0
  231. package/dist/flowMap.d.mts +353 -0
  232. package/dist/flowMap.d.ts +353 -0
  233. package/dist/flowMap.js +94806 -0
  234. package/dist/flowMap.js.map +1 -0
  235. package/dist/flowMap.mjs +94585 -0
  236. package/dist/flowMap.mjs.map +1 -0
  237. package/dist/form.d.mts +84 -0
  238. package/dist/form.d.ts +84 -0
  239. package/dist/form.js +144 -0
  240. package/dist/form.js.map +1 -0
  241. package/dist/form.mjs +24 -0
  242. package/dist/form.mjs.map +1 -0
  243. package/dist/icons.d.mts +160 -0
  244. package/dist/icons.d.ts +160 -0
  245. package/dist/icons.js +540 -0
  246. package/dist/icons.js.map +1 -0
  247. package/dist/icons.mjs +306 -0
  248. package/dist/icons.mjs.map +1 -0
  249. package/dist/image.d.mts +49 -0
  250. package/dist/image.d.ts +49 -0
  251. package/dist/image.js +1348 -0
  252. package/dist/image.js.map +1 -0
  253. package/dist/image.mjs +19 -0
  254. package/dist/image.mjs.map +1 -0
  255. package/dist/index.d.ts +46 -0
  256. package/dist/index.js +20198 -0
  257. package/dist/index.js.map +1 -0
  258. package/dist/index.mjs +912 -0
  259. package/dist/index.mjs.map +1 -0
  260. package/dist/input.d.mts +195 -0
  261. package/dist/input.d.ts +195 -0
  262. package/dist/input.js +1101 -0
  263. package/dist/input.js.map +1 -0
  264. package/dist/input.mjs +32 -0
  265. package/dist/input.mjs.map +1 -0
  266. package/dist/jsonEditor.d.mts +13 -0
  267. package/dist/jsonEditor.d.ts +13 -0
  268. package/dist/jsonEditor.js +247 -0
  269. package/dist/jsonEditor.js.map +1 -0
  270. package/dist/jsonEditor.mjs +9 -0
  271. package/dist/jsonEditor.mjs.map +1 -0
  272. package/dist/list.d.mts +83 -0
  273. package/dist/list.d.ts +83 -0
  274. package/dist/list.js +564 -0
  275. package/dist/list.js.map +1 -0
  276. package/dist/list.mjs +39 -0
  277. package/dist/list.mjs.map +1 -0
  278. package/dist/loading.d.mts +48 -0
  279. package/dist/loading.d.ts +48 -0
  280. package/dist/loading.js +383 -0
  281. package/dist/loading.js.map +1 -0
  282. package/dist/loading.mjs +23 -0
  283. package/dist/loading.mjs.map +1 -0
  284. package/dist/markdown.d.mts +14 -0
  285. package/dist/markdown.d.ts +14 -0
  286. package/dist/markdown.js +25927 -0
  287. package/dist/markdown.js.map +1 -0
  288. package/dist/markdown.mjs +25623 -0
  289. package/dist/markdown.mjs.map +1 -0
  290. package/dist/menu.d.mts +368 -0
  291. package/dist/menu.d.ts +368 -0
  292. package/dist/menu.js +1571 -0
  293. package/dist/menu.js.map +1 -0
  294. package/dist/menu.mjs +43 -0
  295. package/dist/menu.mjs.map +1 -0
  296. package/dist/modal.d.mts +90 -0
  297. package/dist/modal.d.ts +90 -0
  298. package/dist/modal.js +883 -0
  299. package/dist/modal.js.map +1 -0
  300. package/dist/modal.mjs +25 -0
  301. package/dist/modal.mjs.map +1 -0
  302. package/dist/overlay.d.mts +2 -0
  303. package/dist/overlay.d.ts +2 -0
  304. package/dist/overlay.js +46 -0
  305. package/dist/overlay.js.map +1 -0
  306. package/dist/overlay.mjs +10 -0
  307. package/dist/overlay.mjs.map +1 -0
  308. package/dist/paper.d.mts +38 -0
  309. package/dist/paper.d.ts +38 -0
  310. package/dist/paper.js +90 -0
  311. package/dist/paper.js.map +1 -0
  312. package/dist/paper.mjs +12 -0
  313. package/dist/paper.mjs.map +1 -0
  314. package/dist/patterns.d.mts +133 -0
  315. package/dist/patterns.d.ts +133 -0
  316. package/dist/patterns.js +483 -0
  317. package/dist/patterns.js.map +1 -0
  318. package/dist/patterns.mjs +46 -0
  319. package/dist/patterns.mjs.map +1 -0
  320. package/dist/process.d.mts +125 -0
  321. package/dist/process.d.ts +125 -0
  322. package/dist/process.js +1471 -0
  323. package/dist/process.js.map +1 -0
  324. package/dist/process.mjs +30 -0
  325. package/dist/process.mjs.map +1 -0
  326. package/dist/progress.d.mts +44 -0
  327. package/dist/progress.d.ts +44 -0
  328. package/dist/progress.js +94 -0
  329. package/dist/progress.js.map +1 -0
  330. package/dist/progress.mjs +14 -0
  331. package/dist/progress.mjs.map +1 -0
  332. package/dist/resizablePanel.d.mts +297 -0
  333. package/dist/resizablePanel.d.ts +297 -0
  334. package/dist/resizablePanel.js +122 -0
  335. package/dist/resizablePanel.js.map +1 -0
  336. package/dist/resizablePanel.mjs +22 -0
  337. package/dist/resizablePanel.mjs.map +1 -0
  338. package/dist/scrollToLoad.d.mts +41 -0
  339. package/dist/scrollToLoad.d.ts +41 -0
  340. package/dist/scrollToLoad.js +256 -0
  341. package/dist/scrollToLoad.js.map +1 -0
  342. package/dist/scrollToLoad.mjs +16 -0
  343. package/dist/scrollToLoad.mjs.map +1 -0
  344. package/dist/select.d.mts +50 -0
  345. package/dist/select.d.ts +50 -0
  346. package/dist/select.js +426 -0
  347. package/dist/select.js.map +1 -0
  348. package/dist/select.mjs +24 -0
  349. package/dist/select.mjs.map +1 -0
  350. package/dist/skeleton.d.mts +13 -0
  351. package/dist/skeleton.d.ts +13 -0
  352. package/dist/skeleton.js +68 -0
  353. package/dist/skeleton.js.map +1 -0
  354. package/dist/skeleton.mjs +11 -0
  355. package/dist/skeleton.mjs.map +1 -0
  356. package/dist/slider.d.mts +65 -0
  357. package/dist/slider.d.ts +65 -0
  358. package/dist/slider.js +106 -0
  359. package/dist/slider.js.map +1 -0
  360. package/dist/slider.mjs +10 -0
  361. package/dist/slider.mjs.map +1 -0
  362. package/dist/stepper.d.mts +98 -0
  363. package/dist/stepper.d.ts +98 -0
  364. package/dist/stepper.js +313 -0
  365. package/dist/stepper.js.map +1 -0
  366. package/dist/stepper.mjs +38 -0
  367. package/dist/stepper.mjs.map +1 -0
  368. package/dist/switch.d.mts +151 -0
  369. package/dist/switch.d.ts +151 -0
  370. package/dist/switch.js +289 -0
  371. package/dist/switch.js.map +1 -0
  372. package/dist/switch.mjs +17 -0
  373. package/dist/switch.mjs.map +1 -0
  374. package/dist/tab.d.mts +182 -0
  375. package/dist/tab.d.ts +182 -0
  376. package/dist/tab.js +1418 -0
  377. package/dist/tab.js.map +1 -0
  378. package/dist/tab.mjs +34 -0
  379. package/dist/tab.mjs.map +1 -0
  380. package/dist/table.d.mts +720 -0
  381. package/dist/table.d.ts +720 -0
  382. package/dist/table.js +10882 -0
  383. package/dist/table.js.map +1 -0
  384. package/dist/table.mjs +63 -0
  385. package/dist/table.mjs.map +1 -0
  386. package/dist/theme.d.mts +30 -4
  387. package/dist/theme.d.ts +30 -4
  388. package/dist/theme.js +3210 -170
  389. package/dist/theme.js.map +1 -1
  390. package/dist/theme.mjs +52 -230
  391. package/dist/theme.mjs.map +1 -1
  392. package/dist/timeline.d.mts +30 -0
  393. package/dist/timeline.d.ts +30 -0
  394. package/dist/timeline.js +273 -0
  395. package/dist/timeline.js.map +1 -0
  396. package/dist/timeline.mjs +14 -0
  397. package/dist/timeline.mjs.map +1 -0
  398. package/dist/toggleButtonGroup.d.mts +125 -0
  399. package/dist/toggleButtonGroup.d.ts +125 -0
  400. package/dist/toggleButtonGroup.js +190 -0
  401. package/dist/toggleButtonGroup.js.map +1 -0
  402. package/dist/toggleButtonGroup.mjs +15 -0
  403. package/dist/toggleButtonGroup.mjs.map +1 -0
  404. package/dist/tooltip.d.mts +13 -0
  405. package/dist/tooltip.d.ts +13 -0
  406. package/dist/tooltip.js +56 -0
  407. package/dist/tooltip.js.map +1 -0
  408. package/dist/tooltip.mjs +10 -0
  409. package/dist/tooltip.mjs.map +1 -0
  410. package/dist/typography.d.mts +21 -23
  411. package/dist/typography.d.ts +21 -23
  412. package/dist/typography.js +37 -63
  413. package/dist/typography.js.map +1 -1
  414. package/dist/typography.mjs +2 -1
  415. package/dist/useForm.d.mts +588 -0
  416. package/dist/useForm.d.ts +588 -0
  417. package/dist/useForm.js +8743 -0
  418. package/dist/useForm.js.map +1 -0
  419. package/dist/useForm.mjs +45 -0
  420. package/dist/useForm.mjs.map +1 -0
  421. package/dist/useSearch.d.mts +126 -0
  422. package/dist/useSearch.d.ts +126 -0
  423. package/dist/useSearch.js +1125 -0
  424. package/dist/useSearch.js.map +1 -0
  425. package/dist/useSearch.mjs +42 -0
  426. package/dist/useSearch.mjs.map +1 -0
  427. package/dist/variablesRenderer.d.mts +45 -0
  428. package/dist/variablesRenderer.d.ts +45 -0
  429. package/dist/variablesRenderer.js +511 -0
  430. package/dist/variablesRenderer.js.map +1 -0
  431. package/dist/variablesRenderer.mjs +21 -0
  432. package/dist/variablesRenderer.mjs.map +1 -0
  433. package/package.json +109 -15
  434. package/dist/chunk-PKADXEAD.mjs +0 -116
  435. package/dist/chunk-PKADXEAD.mjs.map +0 -1
  436. package/dist/chunk-YGBJCPUS.mjs +0 -88
  437. package/dist/chunk-YGBJCPUS.mjs.map +0 -1
  438. package/dist/theme.css +0 -44
  439. package/dist/theme.css.map +0 -1
package/dist/chart.js ADDED
@@ -0,0 +1,1234 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/components/compound/Chart/index.ts
31
+ var Chart_exports = {};
32
+ __export(Chart_exports, {
33
+ Chart: () => Chart
34
+ });
35
+ module.exports = __toCommonJS(Chart_exports);
36
+
37
+ // src/components/compound/Chart/src/Chart.tsx
38
+ var import_react3 = require("react");
39
+
40
+ // src/_utils/_func/sx.ts
41
+ function flattenSx(part) {
42
+ if (part == null || typeof part === "boolean") {
43
+ return [];
44
+ }
45
+ if (Array.isArray(part)) {
46
+ return part.flatMap(flattenSx);
47
+ }
48
+ if (typeof part === "function" || typeof part === "object") {
49
+ return [part];
50
+ }
51
+ return [];
52
+ }
53
+ function mergeSx(...parts) {
54
+ const list = parts.flatMap(flattenSx);
55
+ if (list.length === 0) {
56
+ return void 0;
57
+ }
58
+ if (list.length === 1) {
59
+ return list[0];
60
+ }
61
+ return list;
62
+ }
63
+
64
+ // src/components/elemental/Box/src/index.ts
65
+ var import_Box = __toESM(require("@mui/material/Box"));
66
+ var import_Stack = __toESM(require("@mui/material/Stack"));
67
+ var import_Grid = __toESM(require("@mui/material/Grid"));
68
+
69
+ // src/components/elemental/Typography/src/Typography.ts
70
+ var import_Typography = __toESM(require("@mui/material/Typography"));
71
+
72
+ // src/components/compound/Chart/src/render/ChartHover.tsx
73
+ var import_react = require("react");
74
+
75
+ // src/components/compound/Chart/src/utils/chartLayout.ts
76
+ var CHART_WIDTH = 920;
77
+ var CHART_HEIGHT = 280;
78
+ var CHART_PAD = { top: 12, right: 8, bottom: 8, left: 8 };
79
+ var CHART_PIE_SIZE = 280;
80
+ var cartesianPlotSize = () => ({
81
+ plotWidth: CHART_WIDTH - CHART_PAD.left - CHART_PAD.right,
82
+ plotHeight: CHART_HEIGHT - CHART_PAD.top - CHART_PAD.bottom
83
+ });
84
+ var xTickLabels = (labels) => {
85
+ const step = Math.max(1, Math.ceil(labels.length / 7));
86
+ return labels.flatMap(
87
+ (label, index) => index % step === 0 || index === labels.length - 1 ? [{ label, index }] : []
88
+ );
89
+ };
90
+ var seriesColorToken = (index) => `var(--chart-series-${index})`;
91
+ var emptyGeometry = (kind) => {
92
+ const { plotWidth, plotHeight } = cartesianPlotSize();
93
+ const base = {
94
+ peak: 1,
95
+ hoverPoints: [],
96
+ yTicks: [1, 0.5, 0],
97
+ xLabels: [],
98
+ plotWidth,
99
+ plotHeight,
100
+ legend: []
101
+ };
102
+ if (kind === "pie") {
103
+ return {
104
+ ...base,
105
+ kind: "pie",
106
+ viewWidth: CHART_PIE_SIZE,
107
+ viewHeight: CHART_PIE_SIZE,
108
+ slices: [],
109
+ cx: CHART_PIE_SIZE / 2,
110
+ cy: CHART_PIE_SIZE / 2,
111
+ rOuter: 1,
112
+ rInner: 0
113
+ };
114
+ }
115
+ if (kind === "bar") {
116
+ return {
117
+ ...base,
118
+ kind: "bar",
119
+ viewWidth: CHART_WIDTH,
120
+ viewHeight: CHART_HEIGHT,
121
+ bars: []
122
+ };
123
+ }
124
+ if (kind === "line") {
125
+ return {
126
+ ...base,
127
+ kind: "line",
128
+ viewWidth: CHART_WIDTH,
129
+ viewHeight: CHART_HEIGHT,
130
+ lines: []
131
+ };
132
+ }
133
+ return {
134
+ ...base,
135
+ kind: "area",
136
+ viewWidth: CHART_WIDTH,
137
+ viewHeight: CHART_HEIGHT,
138
+ stacked: [],
139
+ lineD: ""
140
+ };
141
+ };
142
+ var indexFromClientX = (clientX, rect, labelCount, viewWidth = CHART_WIDTH) => {
143
+ if (labelCount <= 1) {
144
+ return 0;
145
+ }
146
+ const viewX = (clientX - rect.left) / Math.max(rect.width, 1) * viewWidth;
147
+ const t = (viewX - CHART_PAD.left) / (viewWidth - CHART_PAD.left - CHART_PAD.right);
148
+ return Math.round(Math.min(1, Math.max(0, t)) * (labelCount - 1));
149
+ };
150
+ var indexFromBandX = (clientX, rect, labelCount, viewWidth = CHART_WIDTH) => {
151
+ if (labelCount <= 1) {
152
+ return 0;
153
+ }
154
+ const viewX = (clientX - rect.left) / Math.max(rect.width, 1) * viewWidth;
155
+ const t = (viewX - CHART_PAD.left) / (viewWidth - CHART_PAD.left - CHART_PAD.right);
156
+ return Math.min(
157
+ labelCount - 1,
158
+ Math.max(0, Math.floor(t * labelCount))
159
+ );
160
+ };
161
+ var indexFromPiePointer = (clientX, clientY, rect, geometry) => {
162
+ if (geometry.slices.length === 0) {
163
+ return null;
164
+ }
165
+ const viewX = (clientX - rect.left) / Math.max(rect.width, 1) * geometry.viewWidth;
166
+ const viewY = (clientY - rect.top) / Math.max(rect.height, 1) * geometry.viewHeight;
167
+ const dx = viewX - geometry.cx;
168
+ const dy = viewY - geometry.cy;
169
+ const dist = Math.hypot(dx, dy);
170
+ if (dist > geometry.rOuter + 1 || dist < Math.max(geometry.rInner - 1, 0)) {
171
+ return null;
172
+ }
173
+ let turn = Math.atan2(dx, -dy);
174
+ if (turn < 0) {
175
+ turn += Math.PI * 2;
176
+ }
177
+ const hit = geometry.slices.findIndex(
178
+ (slice) => turn >= slice.start && turn < slice.end
179
+ );
180
+ return hit >= 0 ? hit : geometry.slices.length - 1;
181
+ };
182
+ var hitIndex = (clientX, clientY, rect, geometry) => {
183
+ if (geometry.kind === "pie") {
184
+ return indexFromPiePointer(clientX, clientY, rect, geometry);
185
+ }
186
+ if (geometry.hoverPoints.length === 0) {
187
+ return null;
188
+ }
189
+ if (geometry.kind === "bar") {
190
+ return indexFromBandX(
191
+ clientX,
192
+ rect,
193
+ geometry.hoverPoints.length,
194
+ geometry.viewWidth
195
+ );
196
+ }
197
+ return indexFromClientX(
198
+ clientX,
199
+ rect,
200
+ geometry.hoverPoints.length,
201
+ geometry.viewWidth
202
+ );
203
+ };
204
+
205
+ // src/components/compound/Chart/src/utils/paths.ts
206
+ var areaPath = (xs, yTop, yBottom) => {
207
+ if (xs.length === 0) {
208
+ return "";
209
+ }
210
+ const top = xs.map(
211
+ (x, index) => `${index === 0 ? "M" : "L"} ${x} ${yTop[index]}`
212
+ );
213
+ const bottom = [...xs].reverse().map((x, index) => `L ${x} ${yBottom[xs.length - 1 - index]}`);
214
+ return `${top.join(" ")} ${bottom.join(" ")} Z`;
215
+ };
216
+ var linePath = (xs, ys) => xs.map((x, index) => `${index === 0 ? "M" : "L"} ${x} ${ys[index]}`).join(" ");
217
+ var TAU = Math.PI * 2;
218
+ var polar = (cx, cy, radius, angleFromTop) => [
219
+ cx + radius * Math.sin(angleFromTop),
220
+ cy - radius * Math.cos(angleFromTop)
221
+ ];
222
+ var donutSlicePath = (cx, cy, rOuter, rInner, start, end) => {
223
+ const sweep = end - start;
224
+ if (sweep <= 0 || rOuter <= 0) {
225
+ return "";
226
+ }
227
+ if (sweep >= TAU - 1e-8) {
228
+ if (rInner <= 0) {
229
+ return `M ${cx + rOuter} ${cy} A ${rOuter} ${rOuter} 0 1 1 ${cx - rOuter} ${cy} A ${rOuter} ${rOuter} 0 1 1 ${cx + rOuter} ${cy} Z`;
230
+ }
231
+ return `M ${cx + rOuter} ${cy} A ${rOuter} ${rOuter} 0 1 1 ${cx - rOuter} ${cy} A ${rOuter} ${rOuter} 0 1 1 ${cx + rOuter} ${cy} M ${cx + rInner} ${cy} A ${rInner} ${rInner} 0 1 0 ${cx - rInner} ${cy} A ${rInner} ${rInner} 0 1 0 ${cx + rInner} ${cy} Z`;
232
+ }
233
+ const large = sweep > Math.PI ? 1 : 0;
234
+ const [x0, y0] = polar(cx, cy, rOuter, start);
235
+ const [x1, y1] = polar(cx, cy, rOuter, end);
236
+ if (rInner <= 0) {
237
+ return `M ${cx} ${cy} L ${x0} ${y0} A ${rOuter} ${rOuter} 0 ${large} 1 ${x1} ${y1} Z`;
238
+ }
239
+ const [ix0, iy0] = polar(cx, cy, rInner, start);
240
+ const [ix1, iy1] = polar(cx, cy, rInner, end);
241
+ return `M ${x0} ${y0} A ${rOuter} ${rOuter} 0 ${large} 1 ${x1} ${y1} L ${ix1} ${iy1} A ${rInner} ${rInner} 0 ${large} 0 ${ix0} ${iy0} Z`;
242
+ };
243
+
244
+ // src/components/compound/Chart/src/utils/areaGeometry.ts
245
+ var stretch = (values) => values.length === 1 ? [values[0], values[0]] : values;
246
+ var sumThrough = (seriesValues, dayIndex, endExclusive) => seriesValues.slice(0, endExclusive).reduce((sum, values) => sum + (values[dayIndex] ?? 0), 0);
247
+ var buildAreaGeometry = (series, labels) => {
248
+ const { plotWidth, plotHeight } = cartesianPlotSize();
249
+ const seriesValues = series.map(
250
+ (item) => labels.map((_, dayIndex) => item.values[dayIndex] ?? 0)
251
+ );
252
+ const totals = labels.map(
253
+ (_, dayIndex) => seriesValues.reduce((sum, values) => sum + (values[dayIndex] ?? 0), 0)
254
+ );
255
+ const peak = Math.max(1, ...totals);
256
+ const sampleCount = Math.max(labels.length, 2);
257
+ const xValues = Array.from(
258
+ { length: sampleCount },
259
+ (_, index) => CHART_PAD.left + index / (sampleCount - 1) * plotWidth
260
+ );
261
+ const stacked = series.map((item, seriesIndex) => {
262
+ const yTop = stretch(
263
+ labels.map((_, dayIndex) => {
264
+ const upper = sumThrough(seriesValues, dayIndex, seriesIndex + 1);
265
+ return CHART_PAD.top + plotHeight - upper / peak * plotHeight;
266
+ })
267
+ );
268
+ const yBottom = stretch(
269
+ labels.map((_, dayIndex) => {
270
+ const lower = sumThrough(seriesValues, dayIndex, seriesIndex);
271
+ return CHART_PAD.top + plotHeight - lower / peak * plotHeight;
272
+ })
273
+ );
274
+ return {
275
+ id: item.id,
276
+ label: item.label,
277
+ color: seriesColorToken(seriesIndex),
278
+ values: seriesValues[seriesIndex] ?? [],
279
+ yTop,
280
+ areaD: areaPath(xValues, yTop, yBottom)
281
+ };
282
+ });
283
+ const topSeries = stacked[stacked.length - 1];
284
+ const pointX = (index) => xValues[labels.length === 1 ? xValues.length - 1 : index] ?? CHART_PAD.left;
285
+ const pointYIndex = (index) => labels.length === 1 ? Math.max(xValues.length - 1, 0) : index;
286
+ const hoverPoints = labels.map((label, index) => {
287
+ const rows = stacked.map((item) => ({
288
+ id: item.id,
289
+ label: item.label,
290
+ color: item.color,
291
+ value: item.values[index] ?? 0
292
+ }));
293
+ const total = rows.reduce((sum, row) => sum + row.value, 0);
294
+ const visibleRows = rows.filter((row) => row.value > 0);
295
+ const y = topSeries?.yTop[pointYIndex(index)] ?? CHART_PAD.top + plotHeight;
296
+ const x = pointX(index);
297
+ return {
298
+ index,
299
+ label,
300
+ x,
301
+ y,
302
+ rows: visibleRows.length > 0 ? visibleRows : rows.slice(-1),
303
+ total,
304
+ showTotal: visibleRows.length > 1,
305
+ showGuide: true,
306
+ markers: [{ x, y, color: "var(--chart-line)" }]
307
+ };
308
+ });
309
+ return {
310
+ kind: "area",
311
+ stacked,
312
+ peak,
313
+ hoverPoints,
314
+ lineD: topSeries ? linePath(xValues, topSeries.yTop) : "",
315
+ yTicks: [peak, peak / 2, 0],
316
+ xLabels: xTickLabels(labels),
317
+ plotWidth,
318
+ plotHeight,
319
+ viewWidth: CHART_WIDTH,
320
+ viewHeight: CHART_HEIGHT,
321
+ legend: series.map((item) => ({ id: item.id, label: item.label }))
322
+ };
323
+ };
324
+
325
+ // src/components/compound/Chart/src/utils/barGeometry.ts
326
+ var GROUP_GAP = 0.22;
327
+ var buildBarGeometry = (series, labels, stacked) => {
328
+ const { plotWidth, plotHeight } = cartesianPlotSize();
329
+ const seriesValues = series.map(
330
+ (item) => labels.map((_, dayIndex) => Math.max(0, item.values[dayIndex] ?? 0))
331
+ );
332
+ const totals = labels.map(
333
+ (_, dayIndex) => seriesValues.reduce((sum, values) => sum + (values[dayIndex] ?? 0), 0)
334
+ );
335
+ const peak = stacked ? Math.max(1, ...totals) : Math.max(1, ...seriesValues.flatMap((values) => values));
336
+ const groupWidth = plotWidth / Math.max(labels.length, 1);
337
+ const gap = groupWidth * GROUP_GAP;
338
+ const inner = Math.max(groupWidth - gap, 1);
339
+ const barWidth = stacked ? inner : inner / Math.max(series.length, 1);
340
+ const bars = [];
341
+ labels.forEach((_, dayIndex) => {
342
+ const groupX = CHART_PAD.left + dayIndex * groupWidth + gap / 2;
343
+ if (stacked) {
344
+ let acc = 0;
345
+ series.forEach((item, seriesIndex) => {
346
+ const value = seriesValues[seriesIndex]?.[dayIndex] ?? 0;
347
+ const height = value / peak * plotHeight;
348
+ const y = CHART_PAD.top + plotHeight - (acc + value) / peak * plotHeight;
349
+ bars.push({
350
+ id: `${item.id}-${dayIndex}`,
351
+ color: seriesColorToken(seriesIndex),
352
+ x: groupX,
353
+ y,
354
+ width: barWidth,
355
+ height
356
+ });
357
+ acc += value;
358
+ });
359
+ return;
360
+ }
361
+ series.forEach((item, seriesIndex) => {
362
+ const value = seriesValues[seriesIndex]?.[dayIndex] ?? 0;
363
+ const height = value / peak * plotHeight;
364
+ bars.push({
365
+ id: `${item.id}-${dayIndex}`,
366
+ color: seriesColorToken(seriesIndex),
367
+ x: groupX + seriesIndex * barWidth,
368
+ y: CHART_PAD.top + plotHeight - height,
369
+ width: barWidth,
370
+ height
371
+ });
372
+ });
373
+ });
374
+ const hoverPoints = labels.map((label, index) => {
375
+ const rows = series.map((item, seriesIndex) => ({
376
+ id: item.id,
377
+ label: item.label,
378
+ color: seriesColorToken(seriesIndex),
379
+ value: seriesValues[seriesIndex]?.[index] ?? 0
380
+ }));
381
+ const total = rows.reduce((sum, row) => sum + row.value, 0);
382
+ const visibleRows = rows.filter((row) => row.value > 0);
383
+ const x = CHART_PAD.left + index * groupWidth + groupWidth / 2;
384
+ const y = CHART_PAD.top + plotHeight - (stacked ? total : Math.max(0, ...rows.map((row) => row.value))) / peak * plotHeight;
385
+ return {
386
+ index,
387
+ label,
388
+ x,
389
+ y,
390
+ rows: visibleRows.length > 0 ? visibleRows : rows.slice(-1),
391
+ total,
392
+ showTotal: stacked && visibleRows.length > 1,
393
+ showGuide: true,
394
+ markers: [{ x, y, color: "var(--chart-line)" }]
395
+ };
396
+ });
397
+ return {
398
+ kind: "bar",
399
+ bars,
400
+ peak,
401
+ hoverPoints,
402
+ yTicks: [peak, peak / 2, 0],
403
+ xLabels: xTickLabels(labels),
404
+ plotWidth,
405
+ plotHeight,
406
+ viewWidth: CHART_WIDTH,
407
+ viewHeight: CHART_HEIGHT,
408
+ legend: series.map((item) => ({ id: item.id, label: item.label }))
409
+ };
410
+ };
411
+
412
+ // src/components/compound/Chart/src/utils/lineGeometry.ts
413
+ var buildLineGeometry = (series, labels) => {
414
+ const { plotWidth, plotHeight } = cartesianPlotSize();
415
+ const seriesValues = series.map(
416
+ (item) => labels.map((_, dayIndex) => item.values[dayIndex] ?? 0)
417
+ );
418
+ const peak = Math.max(
419
+ 1,
420
+ ...seriesValues.flatMap((values) => values)
421
+ );
422
+ const sampleCount = Math.max(labels.length, 2);
423
+ const xValues = Array.from(
424
+ { length: sampleCount },
425
+ (_, index) => CHART_PAD.left + index / (sampleCount - 1) * plotWidth
426
+ );
427
+ const yAt = (value) => CHART_PAD.top + plotHeight - value / peak * plotHeight;
428
+ const stretchY = (values) => values.length === 1 ? [yAt(values[0] ?? 0), yAt(values[0] ?? 0)] : values.map(yAt);
429
+ const lines = series.map((item, seriesIndex) => ({
430
+ id: item.id,
431
+ color: seriesColorToken(seriesIndex),
432
+ d: linePath(xValues, stretchY(seriesValues[seriesIndex] ?? []))
433
+ }));
434
+ const hoverPoints = labels.map((label, index) => {
435
+ const x = xValues[labels.length === 1 ? xValues.length - 1 : index] ?? CHART_PAD.left;
436
+ const sampleIndex = labels.length === 1 ? Math.max(xValues.length - 1, 0) : index;
437
+ const rows = series.map((item, seriesIndex) => ({
438
+ id: item.id,
439
+ label: item.label,
440
+ color: seriesColorToken(seriesIndex),
441
+ value: seriesValues[seriesIndex]?.[index] ?? 0
442
+ }));
443
+ const markers = rows.map((row, seriesIndex) => ({
444
+ x,
445
+ y: stretchY(seriesValues[seriesIndex] ?? [])[sampleIndex] ?? yAt(0),
446
+ color: row.color
447
+ }));
448
+ const top = markers.reduce(
449
+ (min, marker) => marker.y < min.y ? marker : min,
450
+ markers[0] ?? { x, y: yAt(0), color: "var(--chart-line)" }
451
+ );
452
+ return {
453
+ index,
454
+ label,
455
+ x,
456
+ y: top.y,
457
+ rows,
458
+ total: rows.reduce((sum, row) => sum + row.value, 0),
459
+ showTotal: false,
460
+ showGuide: true,
461
+ markers
462
+ };
463
+ });
464
+ return {
465
+ kind: "line",
466
+ lines,
467
+ peak,
468
+ hoverPoints,
469
+ yTicks: [peak, peak / 2, 0],
470
+ xLabels: xTickLabels(labels),
471
+ plotWidth,
472
+ plotHeight,
473
+ viewWidth: CHART_WIDTH,
474
+ viewHeight: CHART_HEIGHT,
475
+ legend: series.map((item) => ({ id: item.id, label: item.label }))
476
+ };
477
+ };
478
+
479
+ // src/components/compound/Chart/src/utils/pieGeometry.ts
480
+ var sliceValue = (item) => item.values.reduce((sum, value) => sum + Math.max(0, value), 0);
481
+ var pieSlicesFrom = (series, labels) => {
482
+ if (series.length === 1 && labels.length > 1 && (series[0]?.values.length ?? 0) === labels.length) {
483
+ const only = series[0];
484
+ return labels.map((label, index) => ({
485
+ id: `${only.id}-${index}`,
486
+ label,
487
+ color: seriesColorToken(index),
488
+ value: Math.max(0, only.values[index] ?? 0)
489
+ }));
490
+ }
491
+ return series.map((item, index) => ({
492
+ id: item.id,
493
+ label: item.label,
494
+ color: seriesColorToken(index),
495
+ value: sliceValue(item)
496
+ }));
497
+ };
498
+ var buildPieGeometry = (series, labels, hole) => {
499
+ const cx = CHART_PIE_SIZE / 2;
500
+ const cy = CHART_PIE_SIZE / 2;
501
+ const rOuter = CHART_PIE_SIZE * 0.38;
502
+ const rInner = rOuter * Math.min(0.85, Math.max(0, hole));
503
+ const source = pieSlicesFrom(series, labels).filter((item) => item.value > 0);
504
+ const total = source.reduce((sum, item) => sum + item.value, 0);
505
+ if (total <= 0) {
506
+ return {
507
+ kind: "pie",
508
+ slices: [],
509
+ peak: 1,
510
+ hoverPoints: [],
511
+ yTicks: [],
512
+ xLabels: [],
513
+ plotWidth: CHART_PIE_SIZE,
514
+ plotHeight: CHART_PIE_SIZE,
515
+ viewWidth: CHART_PIE_SIZE,
516
+ viewHeight: CHART_PIE_SIZE,
517
+ legend: [],
518
+ cx,
519
+ cy,
520
+ rOuter,
521
+ rInner
522
+ };
523
+ }
524
+ let cursor = 0;
525
+ const slices = source.map((item) => {
526
+ const start = cursor;
527
+ const sweep = item.value / total * TAU;
528
+ const end = start + sweep;
529
+ cursor = end;
530
+ const mid = start + sweep / 2;
531
+ const markerR = (rOuter + rInner) / 2 || rOuter * 0.62;
532
+ const [mx, my] = polar(cx, cy, markerR, mid);
533
+ return {
534
+ ...item,
535
+ start,
536
+ end,
537
+ d: donutSlicePath(cx, cy, rOuter, rInner, start, end),
538
+ cx: mx,
539
+ cy: my
540
+ };
541
+ });
542
+ const hoverPoints = slices.map((slice, index) => ({
543
+ index,
544
+ label: slice.label,
545
+ x: slice.cx,
546
+ y: slice.cy,
547
+ rows: [
548
+ {
549
+ id: slice.id,
550
+ label: slice.label,
551
+ color: slice.color,
552
+ value: slice.value
553
+ }
554
+ ],
555
+ total,
556
+ showTotal: slices.length > 1,
557
+ showGuide: false,
558
+ markers: [{ x: slice.cx, y: slice.cy, color: slice.color }]
559
+ }));
560
+ return {
561
+ kind: "pie",
562
+ slices,
563
+ peak: total,
564
+ hoverPoints,
565
+ yTicks: [],
566
+ xLabels: [],
567
+ plotWidth: CHART_PIE_SIZE,
568
+ plotHeight: CHART_PIE_SIZE,
569
+ viewWidth: CHART_PIE_SIZE,
570
+ viewHeight: CHART_PIE_SIZE,
571
+ legend: source.map((item) => ({ id: item.id, label: item.label })),
572
+ cx,
573
+ cy,
574
+ rOuter,
575
+ rInner
576
+ };
577
+ };
578
+
579
+ // src/components/compound/Chart/src/utils/geometry.ts
580
+ var buildChartGeometry = (series, labels = [], options = {}) => {
581
+ const type = options.type ?? "area";
582
+ if (type === "pie") {
583
+ if (series.length === 0) {
584
+ return emptyGeometry("pie");
585
+ }
586
+ return buildPieGeometry(series, labels, options.hole ?? 0);
587
+ }
588
+ if (labels.length === 0 || series.length === 0) {
589
+ return emptyGeometry(type);
590
+ }
591
+ if (type === "bar") {
592
+ return buildBarGeometry(series, labels, options.stacked === true);
593
+ }
594
+ if (type === "line") {
595
+ return buildLineGeometry(series, labels);
596
+ }
597
+ return buildAreaGeometry(series, labels);
598
+ };
599
+
600
+ // src/components/compound/Chart/src/theme.ts
601
+ var import_material = require("@mui/material");
602
+ var chartTokenVars = {
603
+ "--chart-grid": "var(--mui-palette-divider)",
604
+ "--chart-grid-dasharray": "3 4",
605
+ "--chart-guide": "var(--mui-palette-text-primary)",
606
+ "--chart-guide-dasharray": "4 4",
607
+ "--chart-guide-opacity": "0.45",
608
+ "--chart-label": "var(--mui-palette-text-secondary)",
609
+ "--chart-ink": "var(--mui-palette-text-primary)",
610
+ "--chart-paper": "var(--mui-palette-background-paper)",
611
+ "--chart-tooltip-border": "var(--mui-palette-divider)",
612
+ "--chart-line": "var(--chart-series-1)",
613
+ "--chart-line-width": "2px",
614
+ "--chart-line-dasharray": "0 7",
615
+ "--chart-line-cap": "round",
616
+ "--chart-series-line-dasharray": "none",
617
+ "--chart-area-opacity": "0.72",
618
+ "--chart-bar-opacity": "1",
619
+ "--chart-bar-radius": "3px",
620
+ "--chart-pie-stroke": "var(--chart-paper)",
621
+ "--chart-pie-stroke-width": "2px",
622
+ "--chart-empty": "var(--mui-palette-text-secondary)",
623
+ // Hue tokens mixed with scheme chrome so series follow the theme (not raw primary/secondary).
624
+ "--chart-series-0": "color-mix(in lab, var(--mui-palette-info-main) 64%, var(--mui-palette-primary-main))",
625
+ "--chart-series-1": "color-mix(in lab, var(--mui-palette-system-main) 64%, var(--mui-palette-secondary-main))",
626
+ "--chart-series-2": "color-mix(in lab, var(--mui-palette-insight-main) 64%, var(--mui-palette-primary-dark))",
627
+ "--chart-series-3": "color-mix(in lab, var(--mui-palette-success-main) 64%, var(--mui-palette-secondary-dark))",
628
+ "--chart-series-4": "color-mix(in lab, var(--mui-palette-error-main) 64%, var(--mui-palette-primary-main))",
629
+ "--chart-series-5": "color-mix(in lab, var(--mui-palette-system-light) 58%, var(--mui-palette-primary-main))",
630
+ "--chart-series-6": "color-mix(in lab, var(--mui-palette-insight-light) 58%, var(--mui-palette-secondary-main))",
631
+ "--chart-series-7": "color-mix(in lab, var(--mui-palette-insight-dark) 58%, var(--mui-palette-text-primary))"
632
+ };
633
+ var ChartRoot = (0, import_material.styled)(import_Box.default)({
634
+ display: "flex",
635
+ flexDirection: "column",
636
+ gap: 12,
637
+ width: "100%",
638
+ minWidth: 0
639
+ });
640
+ var chartSeriesColorVar = (index) => `var(--chart-series-${index})`;
641
+ var chartSeriesTokenStyle = (series) => {
642
+ const vars = {};
643
+ series.forEach((item, index) => {
644
+ if (item.color) {
645
+ vars[`--chart-series-${index}`] = item.color;
646
+ }
647
+ });
648
+ if (series.length > 0) {
649
+ vars["--chart-line"] = chartSeriesColorVar(series.length - 1);
650
+ }
651
+ return vars;
652
+ };
653
+ var isCssVarKey = (key) => key.startsWith("--");
654
+ var hoistChartCssVars = (sx) => {
655
+ if (sx == null || typeof sx === "function") {
656
+ return { style: {}, sx };
657
+ }
658
+ if (Array.isArray(sx)) {
659
+ const style2 = {};
660
+ const rest2 = [];
661
+ for (const part of sx) {
662
+ const next = hoistChartCssVars(part);
663
+ Object.assign(style2, next.style);
664
+ if (next.sx != null) {
665
+ rest2.push(next.sx);
666
+ }
667
+ }
668
+ if (rest2.length === 0) {
669
+ return { style: style2 };
670
+ }
671
+ return {
672
+ style: style2,
673
+ sx: rest2.length === 1 ? rest2[0] : rest2
674
+ };
675
+ }
676
+ const style = {};
677
+ const rest = {};
678
+ for (const [key, value] of Object.entries(sx)) {
679
+ if (isCssVarKey(key) && value != null) {
680
+ style[key] = String(value);
681
+ } else {
682
+ rest[key] = value;
683
+ }
684
+ }
685
+ return {
686
+ style,
687
+ sx: Object.keys(rest).length > 0 ? rest : void 0
688
+ };
689
+ };
690
+ var toChartStyle = (...parts) => {
691
+ const merged = {};
692
+ for (const part of parts) {
693
+ if (part) {
694
+ Object.assign(merged, part);
695
+ }
696
+ }
697
+ return Object.keys(merged).length > 0 ? merged : void 0;
698
+ };
699
+ var chartLabelSx = {
700
+ fontSize: 12,
701
+ lineHeight: 1.2,
702
+ color: "var(--chart-label)",
703
+ fontVariantNumeric: "tabular-nums",
704
+ whiteSpace: "nowrap"
705
+ };
706
+ var chartInkSx = {
707
+ ...chartLabelSx,
708
+ color: "var(--chart-ink)"
709
+ };
710
+ var chartPlotBoxSx = {
711
+ position: "relative",
712
+ minWidth: 0,
713
+ minHeight: 220,
714
+ height: "100%",
715
+ overflow: "visible",
716
+ cursor: "crosshair"
717
+ };
718
+ var chartSvgSx = {
719
+ position: "absolute",
720
+ inset: 0,
721
+ width: "100%",
722
+ height: "100%",
723
+ display: "block",
724
+ overflow: "visible",
725
+ pointerEvents: "none",
726
+ "& [data-chart-grid]": {
727
+ stroke: "var(--chart-grid)",
728
+ strokeDasharray: "var(--chart-grid-dasharray)"
729
+ },
730
+ "& [data-chart-area]": {
731
+ fillOpacity: "var(--chart-area-opacity)"
732
+ },
733
+ "& [data-chart-bar]": {
734
+ fillOpacity: "var(--chart-bar-opacity)",
735
+ rx: "var(--chart-bar-radius)",
736
+ ry: "var(--chart-bar-radius)"
737
+ },
738
+ "& [data-chart-slice]": {
739
+ stroke: "var(--chart-pie-stroke)",
740
+ strokeWidth: "var(--chart-pie-stroke-width)"
741
+ },
742
+ "& [data-chart-series-line]": {
743
+ fill: "none",
744
+ strokeWidth: "var(--chart-line-width)",
745
+ strokeDasharray: "var(--chart-series-line-dasharray)",
746
+ strokeLinecap: "var(--chart-line-cap)"
747
+ },
748
+ "& [data-chart-line]": {
749
+ fill: "none",
750
+ stroke: "var(--chart-line)",
751
+ strokeWidth: "var(--chart-line-width)",
752
+ strokeDasharray: "var(--chart-line-dasharray)",
753
+ strokeLinecap: "var(--chart-line-cap)"
754
+ },
755
+ "& [data-chart-guide]": {
756
+ stroke: "var(--chart-guide)",
757
+ strokeOpacity: "var(--chart-guide-opacity)",
758
+ strokeDasharray: "var(--chart-guide-dasharray)"
759
+ },
760
+ "& [data-chart-marker]": {
761
+ fill: "var(--chart-paper)",
762
+ strokeWidth: "var(--chart-line-width)"
763
+ }
764
+ };
765
+ var chartTooltipSx = {
766
+ position: "absolute",
767
+ zIndex: 2,
768
+ pointerEvents: "none",
769
+ px: 1.25,
770
+ py: 0.75,
771
+ minWidth: 148,
772
+ borderRadius: 1.5,
773
+ border: "1px solid",
774
+ borderColor: "var(--chart-tooltip-border)",
775
+ bgcolor: "var(--chart-paper)",
776
+ boxShadow: 2,
777
+ color: "var(--chart-ink)"
778
+ };
779
+ var chartLiveRegionSx = {
780
+ position: "absolute",
781
+ width: 1,
782
+ height: 1,
783
+ overflow: "hidden",
784
+ clip: "rect(0 0 0 0)"
785
+ };
786
+
787
+ // src/components/compound/Chart/src/render/ChartHover.tsx
788
+ var import_jsx_runtime = require("react/jsx-runtime");
789
+ var tooltipTransform = (point, labelCount, viewWidth, viewHeight) => {
790
+ const flipX = point.showGuide === false ? point.x >= viewWidth * 0.5 : point.index >= labelCount * 0.65;
791
+ const flipY = point.showGuide === false ? point.y < viewHeight * 0.45 : point.y < CHART_PAD.top + 64;
792
+ return `translate(${flipX ? "-108%" : "10px"}, ${flipY ? "12px" : "calc(-100% - 10px)"})`;
793
+ };
794
+ var ChartHover = (0, import_react.memo)(function ChartHover2({
795
+ point,
796
+ labelCount,
797
+ plotHeight,
798
+ viewWidth,
799
+ viewHeight,
800
+ formatX,
801
+ formatY
802
+ }) {
803
+ const markers = point.markers ?? [
804
+ { x: point.x, y: point.y, color: "var(--chart-line)" }
805
+ ];
806
+ const liveValue = point.rows.length === 1 ? point.rows[0].value : point.total;
807
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
808
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
809
+ import_Box.default,
810
+ {
811
+ component: "svg",
812
+ viewBox: `0 0 ${viewWidth} ${viewHeight}`,
813
+ preserveAspectRatio: point.showGuide === false ? "xMidYMid meet" : "none",
814
+ sx: chartSvgSx,
815
+ "aria-hidden": true,
816
+ children: [
817
+ point.showGuide === false ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
818
+ "line",
819
+ {
820
+ "data-chart-guide": "",
821
+ x1: point.x,
822
+ x2: point.x,
823
+ y1: CHART_PAD.top,
824
+ y2: CHART_PAD.top + plotHeight,
825
+ vectorEffect: "non-scaling-stroke"
826
+ }
827
+ ),
828
+ markers.map((marker, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
829
+ "circle",
830
+ {
831
+ "data-chart-marker": "",
832
+ cx: marker.x,
833
+ cy: marker.y,
834
+ r: 4,
835
+ stroke: marker.color,
836
+ vectorEffect: "non-scaling-stroke"
837
+ },
838
+ `${marker.x}-${marker.y}-${index}`
839
+ ))
840
+ ]
841
+ }
842
+ ),
843
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
844
+ import_Box.default,
845
+ {
846
+ sx: chartTooltipSx,
847
+ style: {
848
+ left: `${point.x / viewWidth * 100}%`,
849
+ top: `${point.y / viewHeight * 100}%`,
850
+ transform: tooltipTransform(point, labelCount, viewWidth, viewHeight)
851
+ },
852
+ children: [
853
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Typography.default, { sx: mergeSx(chartInkSx, { fontWeight: 700 }), children: formatX(point.label) }),
854
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Stack.default, { spacing: 0.35, sx: { mt: 0.5 }, children: [
855
+ point.rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
856
+ import_Stack.default,
857
+ {
858
+ direction: "row",
859
+ spacing: 1,
860
+ sx: { alignItems: "center", justifyContent: "space-between" },
861
+ children: [
862
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
863
+ import_Stack.default,
864
+ {
865
+ direction: "row",
866
+ spacing: 0.75,
867
+ sx: { alignItems: "center", minWidth: 0 },
868
+ children: [
869
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
870
+ import_Box.default,
871
+ {
872
+ sx: {
873
+ width: 8,
874
+ height: 8,
875
+ borderRadius: 0.5,
876
+ backgroundColor: row.color,
877
+ flexShrink: 0
878
+ }
879
+ }
880
+ ),
881
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Typography.default, { sx: chartInkSx, children: row.label })
882
+ ]
883
+ }
884
+ ),
885
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Typography.default, { sx: mergeSx(chartInkSx, { fontWeight: 600 }), children: formatY(row.value) })
886
+ ]
887
+ },
888
+ row.id
889
+ )),
890
+ point.showTotal ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
891
+ import_Stack.default,
892
+ {
893
+ direction: "row",
894
+ spacing: 1,
895
+ sx: {
896
+ alignItems: "center",
897
+ justifyContent: "space-between",
898
+ pt: 0.35,
899
+ borderTop: "1px solid",
900
+ borderColor: "var(--chart-tooltip-border)"
901
+ },
902
+ children: [
903
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Typography.default, { sx: mergeSx(chartInkSx, { fontWeight: 700 }), children: "Total" }),
904
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Typography.default, { sx: mergeSx(chartInkSx, { fontWeight: 700 }), children: formatY(point.total) })
905
+ ]
906
+ }
907
+ ) : null
908
+ ] })
909
+ ]
910
+ }
911
+ ),
912
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Box.default, { component: "span", "aria-live": "polite", sx: chartLiveRegionSx, children: `${formatX(point.label)} ${formatY(liveValue)}` })
913
+ ] });
914
+ });
915
+
916
+ // src/components/compound/Chart/src/render/ChartLegend.tsx
917
+ var import_jsx_runtime2 = require("react/jsx-runtime");
918
+ function ChartLegend({
919
+ series
920
+ }) {
921
+ if (series.length === 0) {
922
+ return null;
923
+ }
924
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Stack.default, { direction: "row", spacing: 2, sx: { flexWrap: "wrap", rowGap: 1 }, children: series.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
925
+ import_Stack.default,
926
+ {
927
+ direction: "row",
928
+ spacing: 0.75,
929
+ sx: { alignItems: "center" },
930
+ children: [
931
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
932
+ import_Box.default,
933
+ {
934
+ sx: {
935
+ width: 10,
936
+ height: 10,
937
+ borderRadius: 0.5,
938
+ backgroundColor: chartSeriesColorVar(index),
939
+ flexShrink: 0
940
+ }
941
+ }
942
+ ),
943
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Typography.default, { sx: chartLabelSx, children: item.label })
944
+ ]
945
+ },
946
+ item.id
947
+ )) });
948
+ }
949
+
950
+ // src/components/compound/Chart/src/render/ChartPlot.tsx
951
+ var import_react2 = require("react");
952
+ var import_jsx_runtime3 = require("react/jsx-runtime");
953
+ var Grid = ({
954
+ yTicks,
955
+ peak,
956
+ plotHeight,
957
+ viewWidth
958
+ }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: yTicks.map((tick) => {
959
+ const y = CHART_PAD.top + plotHeight - tick / peak * plotHeight;
960
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
961
+ "line",
962
+ {
963
+ "data-chart-grid": "",
964
+ x1: CHART_PAD.left,
965
+ x2: viewWidth - CHART_PAD.right,
966
+ y1: y,
967
+ y2: y
968
+ },
969
+ tick
970
+ );
971
+ }) });
972
+ var ChartPlot = (0, import_react2.memo)(function ChartPlot2({
973
+ geometry,
974
+ showLine,
975
+ ariaLabel
976
+ }) {
977
+ const meet = geometry.kind === "pie";
978
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
979
+ import_Box.default,
980
+ {
981
+ component: "svg",
982
+ viewBox: `0 0 ${geometry.viewWidth} ${geometry.viewHeight}`,
983
+ preserveAspectRatio: meet ? "xMidYMid meet" : "none",
984
+ sx: chartSvgSx,
985
+ role: "img",
986
+ "aria-label": ariaLabel,
987
+ children: [
988
+ geometry.kind === "area" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
989
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
990
+ Grid,
991
+ {
992
+ yTicks: geometry.yTicks,
993
+ peak: geometry.peak,
994
+ plotHeight: geometry.plotHeight,
995
+ viewWidth: geometry.viewWidth
996
+ }
997
+ ),
998
+ geometry.stacked.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
999
+ "path",
1000
+ {
1001
+ "data-chart-area": "",
1002
+ d: item.areaD,
1003
+ fill: item.color
1004
+ },
1005
+ item.id
1006
+ )),
1007
+ showLine && geometry.lineD ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1008
+ "path",
1009
+ {
1010
+ "data-chart-line": "",
1011
+ d: geometry.lineD,
1012
+ vectorEffect: "non-scaling-stroke"
1013
+ }
1014
+ ) : null
1015
+ ] }) : null,
1016
+ geometry.kind === "line" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1017
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1018
+ Grid,
1019
+ {
1020
+ yTicks: geometry.yTicks,
1021
+ peak: geometry.peak,
1022
+ plotHeight: geometry.plotHeight,
1023
+ viewWidth: geometry.viewWidth
1024
+ }
1025
+ ),
1026
+ geometry.lines.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1027
+ "path",
1028
+ {
1029
+ "data-chart-series-line": "",
1030
+ d: item.d,
1031
+ stroke: item.color,
1032
+ vectorEffect: "non-scaling-stroke"
1033
+ },
1034
+ item.id
1035
+ ))
1036
+ ] }) : null,
1037
+ geometry.kind === "bar" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1038
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1039
+ Grid,
1040
+ {
1041
+ yTicks: geometry.yTicks,
1042
+ peak: geometry.peak,
1043
+ plotHeight: geometry.plotHeight,
1044
+ viewWidth: geometry.viewWidth
1045
+ }
1046
+ ),
1047
+ geometry.bars.map((item) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1048
+ "rect",
1049
+ {
1050
+ "data-chart-bar": "",
1051
+ x: item.x,
1052
+ y: item.y,
1053
+ width: item.width,
1054
+ height: item.height,
1055
+ fill: item.color
1056
+ },
1057
+ item.id
1058
+ ))
1059
+ ] }) : null,
1060
+ geometry.kind === "pie" ? geometry.slices.map((slice) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1061
+ "path",
1062
+ {
1063
+ "data-chart-slice": "",
1064
+ d: slice.d,
1065
+ fill: slice.color
1066
+ },
1067
+ slice.id
1068
+ )) : null
1069
+ ]
1070
+ }
1071
+ );
1072
+ });
1073
+
1074
+ // src/components/compound/Chart/src/Chart.tsx
1075
+ var import_jsx_runtime4 = require("react/jsx-runtime");
1076
+ var identity = (value) => value;
1077
+ var formatNumber = (value) => String(value);
1078
+ function Chart({
1079
+ type = "area",
1080
+ series,
1081
+ labels = [],
1082
+ stacked = false,
1083
+ hole = 0,
1084
+ showLine = true,
1085
+ formatX = identity,
1086
+ formatY = formatNumber,
1087
+ ariaLabel = "Chart",
1088
+ emptyMessage = "No data",
1089
+ sx
1090
+ }) {
1091
+ const geometry = (0, import_react3.useMemo)(
1092
+ () => buildChartGeometry(series, labels, { type, stacked, hole }),
1093
+ [hole, labels, series, stacked, type]
1094
+ );
1095
+ const [hoverIndex, setHoverIndex] = (0, import_react3.useState)(null);
1096
+ const isEmpty = geometry.hoverPoints.length === 0;
1097
+ const isPie = geometry.kind === "pie";
1098
+ const hoverPoint = hoverIndex == null ? null : geometry.hoverPoints[hoverIndex] ?? null;
1099
+ const onPointerMove = (0, import_react3.useCallback)(
1100
+ (event) => {
1101
+ const next = hitIndex(
1102
+ event.clientX,
1103
+ event.clientY,
1104
+ event.currentTarget.getBoundingClientRect(),
1105
+ geometry
1106
+ );
1107
+ setHoverIndex((current) => current === next ? current : next);
1108
+ },
1109
+ [geometry]
1110
+ );
1111
+ const onPointerLeave = (0, import_react3.useCallback)(() => {
1112
+ setHoverIndex(null);
1113
+ }, []);
1114
+ const hoisted = hoistChartCssVars(sx);
1115
+ const plot = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1116
+ import_Box.default,
1117
+ {
1118
+ sx: mergeSx(
1119
+ chartPlotBoxSx,
1120
+ isPie ? {
1121
+ aspectRatio: "1 / 1",
1122
+ maxWidth: 320,
1123
+ mx: "auto",
1124
+ height: "auto",
1125
+ minHeight: 240,
1126
+ cursor: "pointer"
1127
+ } : void 0
1128
+ ),
1129
+ onPointerMove: isEmpty ? void 0 : onPointerMove,
1130
+ onPointerLeave: isEmpty ? void 0 : onPointerLeave,
1131
+ children: [
1132
+ isEmpty ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1133
+ import_Box.default,
1134
+ {
1135
+ sx: {
1136
+ position: "absolute",
1137
+ inset: 0,
1138
+ display: "flex",
1139
+ alignItems: "center",
1140
+ justifyContent: "center"
1141
+ },
1142
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Typography.default, { sx: { color: "var(--chart-empty)" }, children: emptyMessage })
1143
+ }
1144
+ ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1145
+ ChartPlot,
1146
+ {
1147
+ geometry,
1148
+ showLine,
1149
+ ariaLabel
1150
+ }
1151
+ ),
1152
+ hoverPoint ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1153
+ ChartHover,
1154
+ {
1155
+ point: hoverPoint,
1156
+ labelCount: geometry.hoverPoints.length,
1157
+ plotHeight: geometry.plotHeight,
1158
+ viewWidth: geometry.viewWidth,
1159
+ viewHeight: geometry.viewHeight,
1160
+ formatX,
1161
+ formatY
1162
+ }
1163
+ ) : null
1164
+ ]
1165
+ }
1166
+ );
1167
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1168
+ ChartRoot,
1169
+ {
1170
+ style: toChartStyle(
1171
+ chartTokenVars,
1172
+ chartSeriesTokenStyle(series),
1173
+ hoisted.style
1174
+ ),
1175
+ sx: hoisted.sx,
1176
+ children: [
1177
+ isPie ? plot : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1178
+ import_Box.default,
1179
+ {
1180
+ sx: {
1181
+ display: "grid",
1182
+ gridTemplateColumns: "auto minmax(0, 1fr)",
1183
+ gridTemplateRows: "minmax(220px, 240px) auto",
1184
+ columnGap: 1,
1185
+ rowGap: 0.75,
1186
+ width: "100%"
1187
+ },
1188
+ children: [
1189
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1190
+ import_Stack.default,
1191
+ {
1192
+ sx: {
1193
+ justifyContent: "space-between",
1194
+ alignItems: "flex-end",
1195
+ py: 0.25,
1196
+ minWidth: 56
1197
+ },
1198
+ children: geometry.yTicks.map((tick) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Typography.default, { component: "span", sx: chartLabelSx, children: formatY(tick) }, tick))
1199
+ }
1200
+ ),
1201
+ plot,
1202
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Box.default, {}),
1203
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Box.default, { sx: { position: "relative", height: 16, minWidth: 0, overflow: "hidden" }, children: geometry.xLabels.map(({ label, index }) => {
1204
+ const x = labels.length === 1 ? 0.5 : index / Math.max(labels.length - 1, 1);
1205
+ const isFirst = labels.length > 1 && index === 0;
1206
+ const isLast = labels.length > 1 && index === labels.length - 1;
1207
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1208
+ import_Typography.default,
1209
+ {
1210
+ component: "span",
1211
+ sx: mergeSx(chartLabelSx, {
1212
+ position: "absolute",
1213
+ left: `${x * 100}%`,
1214
+ top: 0,
1215
+ transform: isFirst ? "none" : isLast ? "translateX(-100%)" : "translateX(-50%)"
1216
+ }),
1217
+ children: formatX(label)
1218
+ },
1219
+ `${label}-${index}`
1220
+ );
1221
+ }) })
1222
+ ]
1223
+ }
1224
+ ),
1225
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChartLegend, { series: geometry.legend })
1226
+ ]
1227
+ }
1228
+ );
1229
+ }
1230
+ // Annotate the CommonJS export names for ESM import in node:
1231
+ 0 && (module.exports = {
1232
+ Chart
1233
+ });
1234
+ //# sourceMappingURL=chart.js.map