tekivex-ui 2.5.15 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/dist/charts.cjs +1 -1
  2. package/dist/charts.js +22 -553
  3. package/dist/chunk-B3ph66Zb.js +1 -0
  4. package/dist/chunk-Bc16rJT-.js +1 -0
  5. package/dist/chunk-Dike2DLU.js +3 -0
  6. package/dist/chunk-DjxOP8W4.js +1 -0
  7. package/dist/chunk-DkoFTL1O.js +1 -0
  8. package/dist/chunk-DmRB1Blb.js +1 -0
  9. package/dist/chunk-DnCXUUx5.js +1 -0
  10. package/dist/chunk-LWkKqC8d.js +1 -0
  11. package/dist/chunk-PJ50l0JC.js +1 -0
  12. package/dist/headless.cjs +1 -1
  13. package/dist/headless.js +1 -442
  14. package/dist/i18n.cjs +1 -1
  15. package/dist/i18n.js +1 -733
  16. package/dist/index.cjs +1 -152
  17. package/dist/index.d.ts +4 -2
  18. package/dist/index.js +429 -16786
  19. package/dist/quantum.cjs +1 -89
  20. package/dist/quantum.js +74 -2551
  21. package/dist/realtime.cjs +1 -23
  22. package/dist/realtime.js +1 -804
  23. package/dist/src/a11y/index.d.ts +0 -1
  24. package/dist/src/charts/TkxAreaChart.d.ts +0 -5
  25. package/dist/src/charts/TkxBarChart.d.ts +0 -3
  26. package/dist/src/charts/TkxDonutChart.d.ts +0 -5
  27. package/dist/src/charts/TkxLineChart.d.ts +0 -1
  28. package/dist/src/charts/TkxPieChart.d.ts +0 -3
  29. package/dist/src/charts/TkxRadarChart.d.ts +0 -3
  30. package/dist/src/charts/TkxScatterChart.d.ts +0 -2
  31. package/dist/src/charts/index.d.ts +0 -1
  32. package/dist/src/charts/shared.d.ts +0 -3
  33. package/dist/src/components/TkxAIChatBubble.d.ts +0 -9
  34. package/dist/src/components/TkxAIConfidenceBar.d.ts +0 -6
  35. package/dist/src/components/TkxAIThinking.d.ts +0 -6
  36. package/dist/src/components/TkxAccordion.d.ts +0 -1
  37. package/dist/src/components/TkxAffix.d.ts +0 -1
  38. package/dist/src/components/TkxAlert.d.ts +0 -1
  39. package/dist/src/components/TkxAnchor.d.ts +0 -1
  40. package/dist/src/components/TkxAppBar.d.ts +0 -1
  41. package/dist/src/components/TkxAutocomplete.d.ts +0 -1
  42. package/dist/src/components/TkxAvatar.d.ts +0 -1
  43. package/dist/src/components/TkxBadge.d.ts +0 -1
  44. package/dist/src/components/TkxBottomNav.d.ts +0 -1
  45. package/dist/src/components/TkxBreadcrumb.d.ts +0 -1
  46. package/dist/src/components/TkxButton.d.ts +0 -1
  47. package/dist/src/components/TkxCard.d.ts +0 -1
  48. package/dist/src/components/TkxCarousel.d.ts +0 -1
  49. package/dist/src/components/TkxCascader.d.ts +0 -1
  50. package/dist/src/components/TkxChat.d.ts +0 -1
  51. package/dist/src/components/TkxCheckbox.d.ts +0 -1
  52. package/dist/src/components/TkxClock.d.ts +0 -1
  53. package/dist/src/components/TkxColorPicker.d.ts +0 -1
  54. package/dist/src/components/TkxCommand.d.ts +0 -1
  55. package/dist/src/components/TkxConfigProvider.d.ts +0 -30
  56. package/dist/src/components/TkxDataGrid.d.ts +0 -15
  57. package/dist/src/components/TkxDatePicker.d.ts +0 -1
  58. package/dist/src/components/TkxDivider.d.ts +0 -1
  59. package/dist/src/components/TkxDrawer.d.ts +0 -1
  60. package/dist/src/components/TkxDropdown.d.ts +0 -1
  61. package/dist/src/components/TkxEmpty.d.ts +0 -1
  62. package/dist/src/components/TkxFileUpload.d.ts +0 -1
  63. package/dist/src/components/TkxForm.d.ts +0 -35
  64. package/dist/src/components/TkxIcon.d.ts +0 -1
  65. package/dist/src/components/TkxImage.d.ts +0 -1
  66. package/dist/src/components/TkxInput.d.ts +1 -1
  67. package/dist/src/components/TkxLayout.d.ts +0 -22
  68. package/dist/src/components/TkxList.d.ts +0 -1
  69. package/dist/src/components/TkxLiveFeed.d.ts +0 -1
  70. package/dist/src/components/TkxLiveLog.d.ts +0 -1
  71. package/dist/src/components/TkxLiveMetrics.d.ts +0 -1
  72. package/dist/src/components/TkxLogo.d.ts +0 -1
  73. package/dist/src/components/TkxMarkdown.d.ts +0 -10
  74. package/dist/src/components/TkxMasonry.d.ts +0 -1
  75. package/dist/src/components/TkxMentions.d.ts +0 -1
  76. package/dist/src/components/TkxMenu.d.ts +0 -1
  77. package/dist/src/components/TkxModal.d.ts +0 -1
  78. package/dist/src/components/TkxNumberInput.d.ts +0 -1
  79. package/dist/src/components/TkxOTP.d.ts +0 -1
  80. package/dist/src/components/TkxOrgChart.d.ts +32 -0
  81. package/dist/src/components/TkxPagination.d.ts +0 -1
  82. package/dist/src/components/TkxPlayground.d.ts +0 -13
  83. package/dist/src/components/TkxPopover.d.ts +0 -1
  84. package/dist/src/components/TkxProgress.d.ts +0 -1
  85. package/dist/src/components/TkxQRCode.d.ts +0 -1
  86. package/dist/src/components/TkxQuantumForm.d.ts +0 -1
  87. package/dist/src/components/TkxRadio.d.ts +0 -1
  88. package/dist/src/components/TkxRating.d.ts +0 -1
  89. package/dist/src/components/TkxRealTimeChart.d.ts +0 -1
  90. package/dist/src/components/TkxResult.d.ts +0 -1
  91. package/dist/src/components/TkxRichTextDisplay.d.ts +0 -1
  92. package/dist/src/components/TkxSegmented.d.ts +0 -1
  93. package/dist/src/components/TkxSelect.d.ts +0 -3
  94. package/dist/src/components/TkxSkeleton.d.ts +0 -1
  95. package/dist/src/components/TkxSlider.d.ts +0 -1
  96. package/dist/src/components/TkxSnackbar.d.ts +0 -1
  97. package/dist/src/components/TkxSpeedDial.d.ts +0 -1
  98. package/dist/src/components/TkxSpin.d.ts +0 -1
  99. package/dist/src/components/TkxStatistic.d.ts +0 -1
  100. package/dist/src/components/TkxStepper.d.ts +0 -1
  101. package/dist/src/components/TkxTable.d.ts +0 -1
  102. package/dist/src/components/TkxTabs.d.ts +0 -1
  103. package/dist/src/components/TkxTag.d.ts +0 -1
  104. package/dist/src/components/TkxThemeBuilder.d.ts +0 -1
  105. package/dist/src/components/TkxTimeline.d.ts +0 -1
  106. package/dist/src/components/TkxToast.d.ts +0 -1
  107. package/dist/src/components/TkxToggle.d.ts +0 -1
  108. package/dist/src/components/TkxToolbar.d.ts +0 -1
  109. package/dist/src/components/TkxTooltip.d.ts +0 -1
  110. package/dist/src/components/TkxTour.d.ts +0 -1
  111. package/dist/src/components/TkxTransferList.d.ts +0 -1
  112. package/dist/src/components/TkxTreeView.d.ts +0 -1
  113. package/dist/src/components/TkxTypography.d.ts +0 -1
  114. package/dist/src/components/TkxVideoPlayer.d.ts +0 -1
  115. package/dist/src/components/TkxWatermark.d.ts +0 -1
  116. package/dist/src/components/index.d.ts +1 -1
  117. package/dist/src/engine/css.d.ts +0 -1
  118. package/dist/src/engine/index.d.ts +0 -1
  119. package/dist/src/engine/quantum-ai.d.ts +0 -73
  120. package/dist/src/engine/quantum.d.ts +0 -1
  121. package/dist/src/engine/security.d.ts +45 -9
  122. package/dist/src/engine/tkx.d.ts +0 -53
  123. package/dist/src/engine/wcag.d.ts +0 -1
  124. package/dist/src/headless/index.d.ts +0 -1
  125. package/dist/src/headless/useControllable.d.ts +0 -15
  126. package/dist/src/headless/useDebounce.d.ts +0 -12
  127. package/dist/src/headless/useDisclosure.d.ts +0 -13
  128. package/dist/src/headless/useFormState.d.ts +0 -13
  129. package/dist/src/headless/useInfiniteQuery.d.ts +0 -11
  130. package/dist/src/headless/useIntersectionObserver.d.ts +0 -10
  131. package/dist/src/headless/useListSelection.d.ts +0 -9
  132. package/dist/src/headless/useLocalStorage.d.ts +0 -8
  133. package/dist/src/headless/useMediaQuery.d.ts +0 -10
  134. package/dist/src/headless/useRovingTabIndex.d.ts +0 -15
  135. package/dist/src/headless/useSSE.d.ts +0 -9
  136. package/dist/src/headless/useThrottle.d.ts +0 -7
  137. package/dist/src/headless/useWebSocket.d.ts +0 -9
  138. package/dist/src/hooks/index.d.ts +0 -1
  139. package/dist/src/i18n/I18nProvider.d.ts +0 -1
  140. package/dist/src/i18n/index.d.ts +0 -1
  141. package/dist/src/quantum/index.d.ts +0 -1
  142. package/dist/src/realtime/index.d.ts +0 -1
  143. package/dist/src/themes/index.d.ts +0 -1
  144. package/package.json +5 -3
  145. package/dist/TkxForm-BaO4wvXt.js +0 -320
  146. package/dist/TkxForm-M6ttomry.cjs +0 -12
  147. package/dist/chunk-Bmb41Sf3.cjs +0 -1
  148. package/dist/hooks-6pRsPOyG.js +0 -58
  149. package/dist/hooks-mivgRljH.cjs +0 -1
  150. package/dist/index.d.ts.map +0 -1
  151. package/dist/src/a11y/index.d.ts.map +0 -1
  152. package/dist/src/charts/TkxAreaChart.d.ts.map +0 -1
  153. package/dist/src/charts/TkxBarChart.d.ts.map +0 -1
  154. package/dist/src/charts/TkxDonutChart.d.ts.map +0 -1
  155. package/dist/src/charts/TkxLineChart.d.ts.map +0 -1
  156. package/dist/src/charts/TkxPieChart.d.ts.map +0 -1
  157. package/dist/src/charts/TkxRadarChart.d.ts.map +0 -1
  158. package/dist/src/charts/TkxScatterChart.d.ts.map +0 -1
  159. package/dist/src/charts/index.d.ts.map +0 -1
  160. package/dist/src/charts/shared.d.ts.map +0 -1
  161. package/dist/src/components/TkxAIChatBubble.d.ts.map +0 -1
  162. package/dist/src/components/TkxAIConfidenceBar.d.ts.map +0 -1
  163. package/dist/src/components/TkxAIThinking.d.ts.map +0 -1
  164. package/dist/src/components/TkxAccordion.d.ts.map +0 -1
  165. package/dist/src/components/TkxAffix.d.ts.map +0 -1
  166. package/dist/src/components/TkxAlert.d.ts.map +0 -1
  167. package/dist/src/components/TkxAnchor.d.ts.map +0 -1
  168. package/dist/src/components/TkxAppBar.d.ts.map +0 -1
  169. package/dist/src/components/TkxAutocomplete.d.ts.map +0 -1
  170. package/dist/src/components/TkxAvatar.d.ts.map +0 -1
  171. package/dist/src/components/TkxBadge.d.ts.map +0 -1
  172. package/dist/src/components/TkxBottomNav.d.ts.map +0 -1
  173. package/dist/src/components/TkxBreadcrumb.d.ts.map +0 -1
  174. package/dist/src/components/TkxButton.d.ts.map +0 -1
  175. package/dist/src/components/TkxCard.d.ts.map +0 -1
  176. package/dist/src/components/TkxCarousel.d.ts.map +0 -1
  177. package/dist/src/components/TkxCascader.d.ts.map +0 -1
  178. package/dist/src/components/TkxChat.d.ts.map +0 -1
  179. package/dist/src/components/TkxCheckbox.d.ts.map +0 -1
  180. package/dist/src/components/TkxClock.d.ts.map +0 -1
  181. package/dist/src/components/TkxColorPicker.d.ts.map +0 -1
  182. package/dist/src/components/TkxCommand.d.ts.map +0 -1
  183. package/dist/src/components/TkxConfigProvider.d.ts.map +0 -1
  184. package/dist/src/components/TkxDataGrid.d.ts.map +0 -1
  185. package/dist/src/components/TkxDatePicker.d.ts.map +0 -1
  186. package/dist/src/components/TkxDivider.d.ts.map +0 -1
  187. package/dist/src/components/TkxDrawer.d.ts.map +0 -1
  188. package/dist/src/components/TkxDropdown.d.ts.map +0 -1
  189. package/dist/src/components/TkxEmpty.d.ts.map +0 -1
  190. package/dist/src/components/TkxFileUpload.d.ts.map +0 -1
  191. package/dist/src/components/TkxForm.d.ts.map +0 -1
  192. package/dist/src/components/TkxIcon.d.ts.map +0 -1
  193. package/dist/src/components/TkxImage.d.ts.map +0 -1
  194. package/dist/src/components/TkxInput.d.ts.map +0 -1
  195. package/dist/src/components/TkxLayout.d.ts.map +0 -1
  196. package/dist/src/components/TkxList.d.ts.map +0 -1
  197. package/dist/src/components/TkxLiveFeed.d.ts.map +0 -1
  198. package/dist/src/components/TkxLiveLog.d.ts.map +0 -1
  199. package/dist/src/components/TkxLiveMetrics.d.ts.map +0 -1
  200. package/dist/src/components/TkxLogo.d.ts.map +0 -1
  201. package/dist/src/components/TkxMarkdown.d.ts.map +0 -1
  202. package/dist/src/components/TkxMasonry.d.ts.map +0 -1
  203. package/dist/src/components/TkxMentions.d.ts.map +0 -1
  204. package/dist/src/components/TkxMenu.d.ts.map +0 -1
  205. package/dist/src/components/TkxModal.d.ts.map +0 -1
  206. package/dist/src/components/TkxNumberInput.d.ts.map +0 -1
  207. package/dist/src/components/TkxOTP.d.ts.map +0 -1
  208. package/dist/src/components/TkxPagination.d.ts.map +0 -1
  209. package/dist/src/components/TkxPlayground.d.ts.map +0 -1
  210. package/dist/src/components/TkxPopover.d.ts.map +0 -1
  211. package/dist/src/components/TkxProgress.d.ts.map +0 -1
  212. package/dist/src/components/TkxQRCode.d.ts.map +0 -1
  213. package/dist/src/components/TkxQuantumForm.d.ts.map +0 -1
  214. package/dist/src/components/TkxRadio.d.ts.map +0 -1
  215. package/dist/src/components/TkxRating.d.ts.map +0 -1
  216. package/dist/src/components/TkxRealTimeChart.d.ts.map +0 -1
  217. package/dist/src/components/TkxResult.d.ts.map +0 -1
  218. package/dist/src/components/TkxRichTextDisplay.d.ts.map +0 -1
  219. package/dist/src/components/TkxSegmented.d.ts.map +0 -1
  220. package/dist/src/components/TkxSelect.d.ts.map +0 -1
  221. package/dist/src/components/TkxSkeleton.d.ts.map +0 -1
  222. package/dist/src/components/TkxSlider.d.ts.map +0 -1
  223. package/dist/src/components/TkxSnackbar.d.ts.map +0 -1
  224. package/dist/src/components/TkxSpeedDial.d.ts.map +0 -1
  225. package/dist/src/components/TkxSpin.d.ts.map +0 -1
  226. package/dist/src/components/TkxStatistic.d.ts.map +0 -1
  227. package/dist/src/components/TkxStepper.d.ts.map +0 -1
  228. package/dist/src/components/TkxTable.d.ts.map +0 -1
  229. package/dist/src/components/TkxTabs.d.ts.map +0 -1
  230. package/dist/src/components/TkxTag.d.ts.map +0 -1
  231. package/dist/src/components/TkxThemeBuilder.d.ts.map +0 -1
  232. package/dist/src/components/TkxTimeline.d.ts.map +0 -1
  233. package/dist/src/components/TkxToast.d.ts.map +0 -1
  234. package/dist/src/components/TkxToggle.d.ts.map +0 -1
  235. package/dist/src/components/TkxToolbar.d.ts.map +0 -1
  236. package/dist/src/components/TkxTooltip.d.ts.map +0 -1
  237. package/dist/src/components/TkxTour.d.ts.map +0 -1
  238. package/dist/src/components/TkxTransferList.d.ts.map +0 -1
  239. package/dist/src/components/TkxTreeView.d.ts.map +0 -1
  240. package/dist/src/components/TkxTypography.d.ts.map +0 -1
  241. package/dist/src/components/TkxVideoPlayer.d.ts.map +0 -1
  242. package/dist/src/components/TkxWatermark.d.ts.map +0 -1
  243. package/dist/src/components/index.d.ts.map +0 -1
  244. package/dist/src/engine/css.d.ts.map +0 -1
  245. package/dist/src/engine/index.d.ts.map +0 -1
  246. package/dist/src/engine/quantum-ai.d.ts.map +0 -1
  247. package/dist/src/engine/quantum.d.ts.map +0 -1
  248. package/dist/src/engine/security.d.ts.map +0 -1
  249. package/dist/src/engine/tkx.d.ts.map +0 -1
  250. package/dist/src/engine/wcag.d.ts.map +0 -1
  251. package/dist/src/headless/index.d.ts.map +0 -1
  252. package/dist/src/headless/useControllable.d.ts.map +0 -1
  253. package/dist/src/headless/useDebounce.d.ts.map +0 -1
  254. package/dist/src/headless/useDisclosure.d.ts.map +0 -1
  255. package/dist/src/headless/useFormState.d.ts.map +0 -1
  256. package/dist/src/headless/useInfiniteQuery.d.ts.map +0 -1
  257. package/dist/src/headless/useIntersectionObserver.d.ts.map +0 -1
  258. package/dist/src/headless/useListSelection.d.ts.map +0 -1
  259. package/dist/src/headless/useLocalStorage.d.ts.map +0 -1
  260. package/dist/src/headless/useMediaQuery.d.ts.map +0 -1
  261. package/dist/src/headless/useRovingTabIndex.d.ts.map +0 -1
  262. package/dist/src/headless/useSSE.d.ts.map +0 -1
  263. package/dist/src/headless/useThrottle.d.ts.map +0 -1
  264. package/dist/src/headless/useWebSocket.d.ts.map +0 -1
  265. package/dist/src/hooks/index.d.ts.map +0 -1
  266. package/dist/src/i18n/I18nProvider.d.ts.map +0 -1
  267. package/dist/src/i18n/index.d.ts.map +0 -1
  268. package/dist/src/quantum/index.d.ts.map +0 -1
  269. package/dist/src/realtime/index.d.ts.map +0 -1
  270. package/dist/src/themes/index.d.ts.map +0 -1
  271. package/dist/themes-BbJanqiC.js +0 -498
  272. package/dist/themes-CMq2vWXj.cjs +0 -2
  273. package/dist/tkx-BoP5V5zy.cjs +0 -4
  274. package/dist/tkx-mOKMzvUK.js +0 -1174
  275. package/src/a11y/index.tsx +0 -87
  276. package/src/charts/TkxAreaChart.tsx +0 -121
  277. package/src/charts/TkxBarChart.tsx +0 -117
  278. package/src/charts/TkxDonutChart.tsx +0 -164
  279. package/src/charts/TkxLineChart.tsx +0 -137
  280. package/src/charts/TkxPieChart.tsx +0 -103
  281. package/src/charts/TkxRadarChart.tsx +0 -92
  282. package/src/charts/TkxScatterChart.tsx +0 -104
  283. package/src/charts/index.ts +0 -22
  284. package/src/charts/shared.ts +0 -47
  285. package/src/components/TkxAIChatBubble.tsx +0 -256
  286. package/src/components/TkxAIConfidenceBar.tsx +0 -133
  287. package/src/components/TkxAIThinking.tsx +0 -193
  288. package/src/components/TkxAccordion.tsx +0 -590
  289. package/src/components/TkxAffix.tsx +0 -140
  290. package/src/components/TkxAlert.tsx +0 -94
  291. package/src/components/TkxAnchor.tsx +0 -195
  292. package/src/components/TkxAppBar.tsx +0 -262
  293. package/src/components/TkxAutocomplete.tsx +0 -455
  294. package/src/components/TkxAvatar.tsx +0 -103
  295. package/src/components/TkxBadge.tsx +0 -75
  296. package/src/components/TkxBottomNav.tsx +0 -241
  297. package/src/components/TkxBreadcrumb.tsx +0 -324
  298. package/src/components/TkxButton.tsx +0 -155
  299. package/src/components/TkxCard.tsx +0 -96
  300. package/src/components/TkxCarousel.tsx +0 -554
  301. package/src/components/TkxCascader.tsx +0 -278
  302. package/src/components/TkxChat.tsx +0 -356
  303. package/src/components/TkxCheckbox.tsx +0 -220
  304. package/src/components/TkxClock.tsx +0 -603
  305. package/src/components/TkxColorPicker.tsx +0 -635
  306. package/src/components/TkxCommand.tsx +0 -646
  307. package/src/components/TkxConfigProvider.tsx +0 -460
  308. package/src/components/TkxDataGrid.tsx +0 -941
  309. package/src/components/TkxDatePicker.tsx +0 -1625
  310. package/src/components/TkxDivider.tsx +0 -51
  311. package/src/components/TkxDrawer.tsx +0 -236
  312. package/src/components/TkxDropdown.tsx +0 -804
  313. package/src/components/TkxEmpty.tsx +0 -221
  314. package/src/components/TkxFileUpload.tsx +0 -373
  315. package/src/components/TkxForm.tsx +0 -683
  316. package/src/components/TkxIcon.tsx +0 -685
  317. package/src/components/TkxImage.tsx +0 -279
  318. package/src/components/TkxInput.tsx +0 -103
  319. package/src/components/TkxLayout.tsx +0 -649
  320. package/src/components/TkxList.tsx +0 -244
  321. package/src/components/TkxLiveFeed.tsx +0 -331
  322. package/src/components/TkxLiveLog.tsx +0 -472
  323. package/src/components/TkxLiveMetrics.tsx +0 -315
  324. package/src/components/TkxLogo.tsx +0 -299
  325. package/src/components/TkxMarkdown.tsx +0 -855
  326. package/src/components/TkxMasonry.tsx +0 -178
  327. package/src/components/TkxMentions.tsx +0 -212
  328. package/src/components/TkxMenu.tsx +0 -1044
  329. package/src/components/TkxModal.tsx +0 -122
  330. package/src/components/TkxNumberInput.tsx +0 -410
  331. package/src/components/TkxOTP.tsx +0 -297
  332. package/src/components/TkxPagination.tsx +0 -390
  333. package/src/components/TkxPlayground.tsx +0 -845
  334. package/src/components/TkxPopover.tsx +0 -297
  335. package/src/components/TkxProgress.tsx +0 -114
  336. package/src/components/TkxQRCode.tsx +0 -176
  337. package/src/components/TkxQuantumForm.tsx +0 -594
  338. package/src/components/TkxRadio.tsx +0 -286
  339. package/src/components/TkxRating.tsx +0 -288
  340. package/src/components/TkxRealTimeChart.tsx +0 -383
  341. package/src/components/TkxResult.tsx +0 -130
  342. package/src/components/TkxRichTextDisplay.tsx +0 -396
  343. package/src/components/TkxSegmented.tsx +0 -171
  344. package/src/components/TkxSelect.tsx +0 -1130
  345. package/src/components/TkxSkeleton.tsx +0 -107
  346. package/src/components/TkxSlider.tsx +0 -495
  347. package/src/components/TkxSnackbar.tsx +0 -316
  348. package/src/components/TkxSpeedDial.tsx +0 -397
  349. package/src/components/TkxSpin.tsx +0 -263
  350. package/src/components/TkxStatistic.tsx +0 -263
  351. package/src/components/TkxStepper.tsx +0 -487
  352. package/src/components/TkxTable.tsx +0 -424
  353. package/src/components/TkxTabs.tsx +0 -126
  354. package/src/components/TkxTag.tsx +0 -321
  355. package/src/components/TkxThemeBuilder.tsx +0 -687
  356. package/src/components/TkxTimeline.tsx +0 -305
  357. package/src/components/TkxToast.tsx +0 -287
  358. package/src/components/TkxToggle.tsx +0 -95
  359. package/src/components/TkxToolbar.tsx +0 -262
  360. package/src/components/TkxTooltip.tsx +0 -85
  361. package/src/components/TkxTour.tsx +0 -241
  362. package/src/components/TkxTransferList.tsx +0 -489
  363. package/src/components/TkxTreeView.tsx +0 -423
  364. package/src/components/TkxTypography.tsx +0 -267
  365. package/src/components/TkxVideoPlayer.tsx +0 -1015
  366. package/src/components/TkxWatermark.tsx +0 -145
  367. package/src/components/index.ts +0 -80
  368. package/src/engine/css.ts +0 -126
  369. package/src/engine/index.ts +0 -12
  370. package/src/engine/quantum-ai.ts +0 -1045
  371. package/src/engine/quantum.ts +0 -207
  372. package/src/engine/security.ts +0 -232
  373. package/src/engine/tkx.ts +0 -1084
  374. package/src/engine/wcag.ts +0 -276
  375. package/src/headless/index.ts +0 -52
  376. package/src/headless/useControllable.ts +0 -42
  377. package/src/headless/useDebounce.ts +0 -37
  378. package/src/headless/useDisclosure.ts +0 -30
  379. package/src/headless/useFormState.ts +0 -113
  380. package/src/headless/useInfiniteQuery.ts +0 -155
  381. package/src/headless/useIntersectionObserver.ts +0 -53
  382. package/src/headless/useListSelection.ts +0 -103
  383. package/src/headless/useLocalStorage.ts +0 -48
  384. package/src/headless/useMediaQuery.ts +0 -39
  385. package/src/headless/useRovingTabIndex.ts +0 -86
  386. package/src/headless/useSSE.ts +0 -167
  387. package/src/headless/useThrottle.ts +0 -48
  388. package/src/headless/useWebSocket.ts +0 -231
  389. package/src/hooks/index.ts +0 -122
  390. package/src/i18n/I18nProvider.tsx +0 -36
  391. package/src/i18n/index.ts +0 -877
  392. package/src/quantum/index.ts +0 -39
  393. package/src/realtime/index.ts +0 -21
  394. package/src/styles/global.css +0 -167
  395. package/src/themes/index.ts +0 -294
package/dist/charts.cjs CHANGED
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./themes-CMq2vWXj.cjs`),t=require(`./hooks-mivgRljH.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`),i=require(`recharts`);function a(e){return[e.primary,e.secondary,e.info,e.success,e.warning,e.danger,e.primary+`aa`,e.secondary+`aa`,e.info+`aa`,e.success+`aa`]}var o={top:10,right:30,bottom:10,left:0};function s(e){return{contentStyle:{backgroundColor:e.surface,border:`1px solid ${e.border}`,borderRadius:8,boxShadow:`0 4px 12px rgba(0,0,0,0.15)`,color:e.text,fontSize:13},labelStyle:{color:e.textMuted,fontWeight:600,marginBottom:4},itemStyle:{color:e.text},cursor:{fill:`${e.primary}15`}}}function c({data:t,series:n,xKey:c,height:l=300,margin:u=o,showGrid:d=!0,showLegend:f=!0,showTooltip:p=!0,smooth:m=!0,xTickFormatter:h,yTickFormatter:g,yDomain:_,ariaLabel:v=`Area chart`}){let y=e.f(),b=a(y),x=s(y),S={fill:y.textMuted,fontSize:12};return(0,r.jsx)(`div`,{role:`img`,"aria-label":v,style:{width:`100%`,height:l},children:(0,r.jsx)(i.ResponsiveContainer,{width:`100%`,height:`100%`,children:(0,r.jsxs)(i.AreaChart,{data:t,margin:u,children:[d&&(0,r.jsx)(i.CartesianGrid,{strokeDasharray:`3 3`,stroke:y.border,vertical:!1}),(0,r.jsx)(i.XAxis,{dataKey:c,tick:S,axisLine:{stroke:y.border},tickLine:!1,tickFormatter:h}),(0,r.jsx)(i.YAxis,{tick:S,axisLine:!1,tickLine:!1,tickFormatter:g,domain:_}),p&&(0,r.jsx)(i.Tooltip,{contentStyle:x.contentStyle,labelStyle:x.labelStyle,itemStyle:x.itemStyle,cursor:x.cursor}),f&&(0,r.jsx)(i.Legend,{wrapperStyle:{fontSize:13,color:y.textMuted,paddingTop:8}}),n.map((e,t)=>{let n=e.color??b[t%b.length];return(0,r.jsx)(i.Area,{type:m?`monotone`:`linear`,dataKey:e.key,name:e.label??e.key,stroke:n,strokeWidth:2,fill:n,fillOpacity:e.fillOpacity??.2,stackId:e.stacked?`stack`:void 0,dot:!1,activeDot:{r:5,strokeWidth:0}},e.key)})]})})})}function l({data:t,series:n,xKey:c,height:l=300,margin:u=o,showGrid:d=!0,showLegend:f=!0,showTooltip:p=!0,layout:m=`horizontal`,barSize:h,xTickFormatter:g,yTickFormatter:_,ariaLabel:v=`Bar chart`}){let y=e.f(),b=a(y),x=s(y),S={fill:y.textMuted,fontSize:12},C=m===`vertical`;return(0,r.jsx)(`div`,{role:`img`,"aria-label":v,style:{width:`100%`,height:l},children:(0,r.jsx)(i.ResponsiveContainer,{width:`100%`,height:`100%`,children:(0,r.jsxs)(i.BarChart,{data:t,margin:u,layout:m,children:[d&&(0,r.jsx)(i.CartesianGrid,{strokeDasharray:`3 3`,stroke:y.border,vertical:C,horizontal:!C}),C?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.YAxis,{dataKey:c,type:`category`,tick:S,axisLine:!1,tickLine:!1,tickFormatter:g,width:100}),(0,r.jsx)(i.XAxis,{type:`number`,tick:S,axisLine:{stroke:y.border},tickLine:!1,tickFormatter:_})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.XAxis,{dataKey:c,tick:S,axisLine:{stroke:y.border},tickLine:!1,tickFormatter:g}),(0,r.jsx)(i.YAxis,{tick:S,axisLine:!1,tickLine:!1,tickFormatter:_})]}),p&&(0,r.jsx)(i.Tooltip,{contentStyle:x.contentStyle,labelStyle:x.labelStyle,itemStyle:x.itemStyle,cursor:{fill:`${y.surfaceAlt}`}}),f&&(0,r.jsx)(i.Legend,{wrapperStyle:{fontSize:13,color:y.textMuted,paddingTop:8}}),n.map((e,t)=>{let n=e.color??b[t%b.length];return(0,r.jsx)(i.Bar,{dataKey:e.key,name:e.label??e.key,fill:n,stackId:e.stackId,maxBarSize:h??40,radius:e.radius??[4,4,0,0]},e.key)})]})})})}function u({data:t,series:n,xKey:c,height:l=300,margin:u=o,showGrid:d=!0,showLegend:f=!0,showTooltip:p=!0,smooth:m=!0,referenceLines:h=[],xTickFormatter:g,yTickFormatter:_,yDomain:v,connectNulls:y=!1,ariaLabel:b=`Line chart`}){let x=e.f(),S=a(x),C=s(x),w={fill:x.textMuted,fontSize:12};return(0,r.jsx)(`div`,{role:`img`,"aria-label":b,style:{width:`100%`,height:l},children:(0,r.jsx)(i.ResponsiveContainer,{width:`100%`,height:`100%`,children:(0,r.jsxs)(i.LineChart,{data:t,margin:u,children:[d&&(0,r.jsx)(i.CartesianGrid,{strokeDasharray:`3 3`,stroke:x.border,vertical:!1}),(0,r.jsx)(i.XAxis,{dataKey:c,tick:w,axisLine:{stroke:x.border},tickLine:!1,tickFormatter:g}),(0,r.jsx)(i.YAxis,{tick:w,axisLine:!1,tickLine:!1,tickFormatter:_,domain:v}),p&&(0,r.jsx)(i.Tooltip,{contentStyle:C.contentStyle,labelStyle:C.labelStyle,itemStyle:C.itemStyle,cursor:{stroke:x.border,strokeWidth:1}}),f&&(0,r.jsx)(i.Legend,{wrapperStyle:{fontSize:13,color:x.textMuted,paddingTop:8}}),h.map((e,t)=>(0,r.jsx)(i.ReferenceLine,{y:e.y,x:e.x,label:e.label?{value:e.label,fill:x.textMuted,fontSize:11}:void 0,stroke:e.color??x.border,strokeDasharray:e.dashed?`4 4`:void 0},t)),n.map((e,t)=>{let n=e.color??S[t%S.length];return(0,r.jsx)(i.Line,{type:m?`monotone`:`linear`,dataKey:e.key,name:e.label??e.key,stroke:n,strokeWidth:e.strokeWidth??2,strokeDasharray:e.dashed?`6 3`:void 0,dot:e.dot??!1,activeDot:{r:5,strokeWidth:0,fill:n},connectNulls:y},e.key)})]})})})}function d({data:o,height:c=300,showLegend:l=!0,showTooltip:u=!0,showLabels:d=!1,outerRadius:f=`70%`,startAngle:p=90,ariaLabel:m=`Pie chart`}){let h=e.f(),g=t.o(),_=a(h),v=s(h),[y,b]=(0,n.useState)(g);return(0,n.useEffect)(()=>{if(g){b(!0);return}let e=requestAnimationFrame(()=>b(!0));return()=>cancelAnimationFrame(e)},[g]),(0,r.jsx)(`div`,{role:`img`,"aria-label":m,style:{width:`100%`,minWidth:240,height:c,position:`relative`},children:y&&(0,r.jsx)(i.ResponsiveContainer,{width:`100%`,height:`100%`,debounce:50,children:(0,r.jsxs)(i.PieChart,{children:[u&&(0,r.jsx)(i.Tooltip,{contentStyle:v.contentStyle,labelStyle:v.labelStyle,itemStyle:v.itemStyle}),l&&(0,r.jsx)(i.Legend,{wrapperStyle:{fontSize:13,color:h.textMuted}}),(0,r.jsx)(i.Pie,{data:o,dataKey:`value`,nameKey:`name`,outerRadius:f,startAngle:p,endAngle:p-360,label:d?({name:e,percent:t})=>`${e} (${((t??0)*100).toFixed(0)}%)`:void 0,labelLine:d,strokeWidth:2,stroke:h.bg,children:o.map((e,t)=>(0,r.jsx)(i.Cell,{fill:e.color??_[t%_.length]},e.name))})]})})})}function f({data:o,height:c=300,showLegend:l=!0,showTooltip:u=!0,centerLabel:d,centerSublabel:f,innerRadius:p=`55%`,outerRadius:m=`75%`,startAngle:h=90,ariaLabel:g=`Donut chart`}){let _=e.f(),v=t.o(),y=a(_),b=s(_),[x,S]=(0,n.useState)(v);return(0,n.useEffect)(()=>{if(v){S(!0);return}let e=requestAnimationFrame(()=>S(!0));return()=>cancelAnimationFrame(e)},[v]),(0,r.jsxs)(`div`,{role:`img`,"aria-label":g,style:{width:`100%`,minWidth:240,height:c,position:`relative`},children:[x&&(0,r.jsx)(i.ResponsiveContainer,{width:`100%`,height:`100%`,debounce:50,children:(0,r.jsxs)(i.PieChart,{children:[u&&(0,r.jsx)(i.Tooltip,{contentStyle:b.contentStyle,labelStyle:b.labelStyle,itemStyle:b.itemStyle}),l&&(0,r.jsx)(i.Legend,{wrapperStyle:{fontSize:13,color:_.textMuted}}),(0,r.jsx)(i.Pie,{data:o,dataKey:`value`,nameKey:`name`,innerRadius:p,outerRadius:m,startAngle:h,endAngle:h-360,strokeWidth:3,stroke:_.bg,label:!1,labelLine:!1,children:o.map((e,t)=>(0,r.jsx)(i.Cell,{fill:e.color??y[t%y.length]},e.name))}),(d||f)&&(0,r.jsx)(`text`,{})]})}),(d||f)&&(0,r.jsxs)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`,marginTop:l?-24:0},children:[d&&(0,r.jsx)(`span`,{style:{fontSize:22,fontWeight:700,color:_.text,lineHeight:1},children:d}),f&&(0,r.jsx)(`span`,{style:{fontSize:13,color:_.textMuted,marginTop:4},children:f})]})]})}function p({series:t,height:n=300,margin:c=o,showGrid:l=!0,showLegend:u=!0,showTooltip:d=!0,xTickFormatter:f,yTickFormatter:p,zRange:m=[20,400],ariaLabel:h=`Scatter chart`}){let g=e.f(),_=a(g),v=s(g),y={fill:g.textMuted,fontSize:12};return(0,r.jsx)(`div`,{role:`img`,"aria-label":h,style:{width:`100%`,height:n},children:(0,r.jsx)(i.ResponsiveContainer,{width:`100%`,height:`100%`,children:(0,r.jsxs)(i.ScatterChart,{margin:c,children:[l&&(0,r.jsx)(i.CartesianGrid,{strokeDasharray:`3 3`,stroke:g.border}),(0,r.jsx)(i.XAxis,{type:`number`,dataKey:`x`,tick:y,axisLine:{stroke:g.border},tickLine:!1,tickFormatter:f}),(0,r.jsx)(i.YAxis,{type:`number`,dataKey:`y`,tick:y,axisLine:!1,tickLine:!1,tickFormatter:p}),(0,r.jsx)(i.ZAxis,{type:`number`,dataKey:`z`,range:m}),d&&(0,r.jsx)(i.Tooltip,{contentStyle:v.contentStyle,labelStyle:v.labelStyle,itemStyle:v.itemStyle,cursor:{strokeDasharray:`3 3`}}),u&&(0,r.jsx)(i.Legend,{wrapperStyle:{fontSize:13,color:g.textMuted,paddingTop:8}}),t.map((e,t)=>(0,r.jsx)(i.Scatter,{name:e.name,data:e.data,fill:e.color??_[t%_.length],fillOpacity:.8},e.name??t))]})})})}function m({data:t,series:n,angleKey:o,height:c=300,showLegend:l=!0,showTooltip:u=!0,outerRadius:d=`70%`,ariaLabel:f=`Radar chart`}){let p=e.f(),m=a(p),h=s(p);return(0,r.jsx)(`div`,{role:`img`,"aria-label":f,style:{width:`100%`,height:c},children:(0,r.jsx)(i.ResponsiveContainer,{width:`100%`,height:`100%`,children:(0,r.jsxs)(i.RadarChart,{data:t,outerRadius:d,children:[(0,r.jsx)(i.PolarGrid,{stroke:p.border}),(0,r.jsx)(i.PolarAngleAxis,{dataKey:o,tick:{fill:p.textMuted,fontSize:12}}),(0,r.jsx)(i.PolarRadiusAxis,{tick:{fill:p.textMuted,fontSize:10},axisLine:!1,tickLine:!1}),u&&(0,r.jsx)(i.Tooltip,{contentStyle:h.contentStyle,labelStyle:h.labelStyle,itemStyle:h.itemStyle}),l&&(0,r.jsx)(i.Legend,{wrapperStyle:{fontSize:13,color:p.textMuted}}),n.map((e,t)=>{let n=e.color??m[t%m.length];return(0,r.jsx)(i.Radar,{name:e.label??e.key,dataKey:e.key,stroke:n,fill:n,fillOpacity:e.fillOpacity??.2,strokeWidth:2},e.key)})]})})})}exports.TkxAreaChart=c,exports.TkxBarChart=l,exports.TkxDonutChart=f,exports.TkxLineChart=u,exports.TkxPieChart=d,exports.TkxRadarChart=m,exports.TkxScatterChart=p;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./chunk-DmRB1Blb.js");const e=require("./chunk-DjxOP8W4.js"),t=require("./chunk-Bc16rJT-.js");let i=require("react"),r=require("react/jsx-runtime"),a=require("recharts");function o(e){return[e.primary,e.secondary,e.info,e.success,e.warning,e.danger,e.primary+"aa",e.secondary+"aa",e.info+"aa",e.success+"aa"]}var n={top:10,right:30,bottom:10,left:0};function l(e){return{contentStyle:{backgroundColor:e.surface,border:`1px solid ${e.border}`,borderRadius:8,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",color:e.text,fontSize:13},labelStyle:{color:e.textMuted,fontWeight:600,marginBottom:4},itemStyle:{color:e.text},cursor:{fill:`${e.primary}15`}}}exports.TkxAreaChart=function({data:t,series:i,xKey:c,height:s=300,margin:d=n,showGrid:h=!0,showLegend:y=!0,showTooltip:m=!0,smooth:k=!0,xTickFormatter:u,yTickFormatter:g,yDomain:p,ariaLabel:f="Area chart"}){const S=e.useTheme(),b=o(S),w=l(S),L={fill:S.textMuted,fontSize:12};return(0,r.jsx)("div",{role:"img","aria-label":f,style:{width:"100%",height:s},children:(0,r.jsx)(a.ResponsiveContainer,{width:"100%",height:"100%",children:(0,r.jsxs)(a.AreaChart,{data:t,margin:d,children:[h&&(0,r.jsx)(a.CartesianGrid,{strokeDasharray:"3 3",stroke:S.border,vertical:!1}),(0,r.jsx)(a.XAxis,{dataKey:c,tick:L,axisLine:{stroke:S.border},tickLine:!1,tickFormatter:u}),(0,r.jsx)(a.YAxis,{tick:L,axisLine:!1,tickLine:!1,tickFormatter:g,domain:p}),m&&(0,r.jsx)(a.Tooltip,{contentStyle:w.contentStyle,labelStyle:w.labelStyle,itemStyle:w.itemStyle,cursor:w.cursor}),y&&(0,r.jsx)(a.Legend,{wrapperStyle:{fontSize:13,color:S.textMuted,paddingTop:8}}),i.map((e,t)=>{const i=e.color??b[t%b.length];return(0,r.jsx)(a.Area,{type:k?"monotone":"linear",dataKey:e.key,name:e.label??e.key,stroke:i,strokeWidth:2,fill:i,fillOpacity:e.fillOpacity??.2,stackId:e.stacked?"stack":void 0,dot:!1,activeDot:{r:5,strokeWidth:0}},e.key)})]})})})},exports.TkxBarChart=function({data:t,series:i,xKey:c,height:s=300,margin:d=n,showGrid:h=!0,showLegend:y=!0,showTooltip:m=!0,layout:k="horizontal",barSize:u,xTickFormatter:g,yTickFormatter:p,ariaLabel:f="Bar chart"}){const S=e.useTheme(),b=o(S),w=l(S),L={fill:S.textMuted,fontSize:12},x="vertical"===k;return(0,r.jsx)("div",{role:"img","aria-label":f,style:{width:"100%",height:s},children:(0,r.jsx)(a.ResponsiveContainer,{width:"100%",height:"100%",children:(0,r.jsxs)(a.BarChart,{data:t,margin:d,layout:k,children:[h&&(0,r.jsx)(a.CartesianGrid,{strokeDasharray:"3 3",stroke:S.border,vertical:x,horizontal:!x}),x?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.YAxis,{dataKey:c,type:"category",tick:L,axisLine:!1,tickLine:!1,tickFormatter:g,width:100}),(0,r.jsx)(a.XAxis,{type:"number",tick:L,axisLine:{stroke:S.border},tickLine:!1,tickFormatter:p})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.XAxis,{dataKey:c,tick:L,axisLine:{stroke:S.border},tickLine:!1,tickFormatter:g}),(0,r.jsx)(a.YAxis,{tick:L,axisLine:!1,tickLine:!1,tickFormatter:p})]}),m&&(0,r.jsx)(a.Tooltip,{contentStyle:w.contentStyle,labelStyle:w.labelStyle,itemStyle:w.itemStyle,cursor:{fill:`${S.surfaceAlt}`}}),y&&(0,r.jsx)(a.Legend,{wrapperStyle:{fontSize:13,color:S.textMuted,paddingTop:8}}),i.map((e,t)=>{const i=e.color??b[t%b.length];return(0,r.jsx)(a.Bar,{dataKey:e.key,name:e.label??e.key,fill:i,stackId:e.stackId,maxBarSize:u??40,radius:e.radius??[4,4,0,0]},e.key)})]})})})},exports.TkxDonutChart=function({data:n,height:c=300,showLegend:s=!0,showTooltip:d=!0,centerLabel:h,centerSublabel:y,innerRadius:m="55%",outerRadius:k="75%",startAngle:u=90,ariaLabel:g="Donut chart"}){const p=e.useTheme(),f=t.useReducedMotion(),S=o(p),b=l(p),[w,L]=(0,i.useState)(f);return(0,i.useEffect)(()=>{if(f)return void L(!0);const e=requestAnimationFrame(()=>L(!0));return()=>cancelAnimationFrame(e)},[f]),(0,r.jsxs)("div",{role:"img","aria-label":g,style:{width:"100%",minWidth:240,height:c,position:"relative"},children:[w&&(0,r.jsx)(a.ResponsiveContainer,{width:"100%",height:"100%",debounce:50,children:(0,r.jsxs)(a.PieChart,{children:[d&&(0,r.jsx)(a.Tooltip,{contentStyle:b.contentStyle,labelStyle:b.labelStyle,itemStyle:b.itemStyle}),s&&(0,r.jsx)(a.Legend,{wrapperStyle:{fontSize:13,color:p.textMuted}}),(0,r.jsx)(a.Pie,{data:n,dataKey:"value",nameKey:"name",innerRadius:m,outerRadius:k,startAngle:u,endAngle:u-360,strokeWidth:3,stroke:p.bg,label:!1,labelLine:!1,children:n.map((e,t)=>(0,r.jsx)(a.Cell,{fill:e.color??S[t%S.length]},e.name))}),(h||y)&&(0,r.jsx)("text",{})]})}),(h||y)&&(0,r.jsxs)("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",pointerEvents:"none",marginTop:s?-24:0},children:[h&&(0,r.jsx)("span",{style:{fontSize:22,fontWeight:700,color:p.text,lineHeight:1},children:h}),y&&(0,r.jsx)("span",{style:{fontSize:13,color:p.textMuted,marginTop:4},children:y})]})]})},exports.TkxLineChart=function({data:t,series:i,xKey:c,height:s=300,margin:d=n,showGrid:h=!0,showLegend:y=!0,showTooltip:m=!0,smooth:k=!0,referenceLines:u=[],xTickFormatter:g,yTickFormatter:p,yDomain:f,connectNulls:S=!1,ariaLabel:b="Line chart"}){const w=e.useTheme(),L=o(w),x=l(w),v={fill:w.textMuted,fontSize:12};return(0,r.jsx)("div",{role:"img","aria-label":b,style:{width:"100%",height:s},children:(0,r.jsx)(a.ResponsiveContainer,{width:"100%",height:"100%",children:(0,r.jsxs)(a.LineChart,{data:t,margin:d,children:[h&&(0,r.jsx)(a.CartesianGrid,{strokeDasharray:"3 3",stroke:w.border,vertical:!1}),(0,r.jsx)(a.XAxis,{dataKey:c,tick:v,axisLine:{stroke:w.border},tickLine:!1,tickFormatter:g}),(0,r.jsx)(a.YAxis,{tick:v,axisLine:!1,tickLine:!1,tickFormatter:p,domain:f}),m&&(0,r.jsx)(a.Tooltip,{contentStyle:x.contentStyle,labelStyle:x.labelStyle,itemStyle:x.itemStyle,cursor:{stroke:w.border,strokeWidth:1}}),y&&(0,r.jsx)(a.Legend,{wrapperStyle:{fontSize:13,color:w.textMuted,paddingTop:8}}),u.map((e,t)=>(0,r.jsx)(a.ReferenceLine,{y:e.y,x:e.x,label:e.label?{value:e.label,fill:w.textMuted,fontSize:11}:void 0,stroke:e.color??w.border,strokeDasharray:e.dashed?"4 4":void 0},t)),i.map((e,t)=>{const i=e.color??L[t%L.length];return(0,r.jsx)(a.Line,{type:k?"monotone":"linear",dataKey:e.key,name:e.label??e.key,stroke:i,strokeWidth:e.strokeWidth??2,strokeDasharray:e.dashed?"6 3":void 0,dot:e.dot??!1,activeDot:{r:5,strokeWidth:0,fill:i},connectNulls:S},e.key)})]})})})},exports.TkxPieChart=function({data:n,height:c=300,showLegend:s=!0,showTooltip:d=!0,showLabels:h=!1,outerRadius:y="70%",startAngle:m=90,ariaLabel:k="Pie chart"}){const u=e.useTheme(),g=t.useReducedMotion(),p=o(u),f=l(u),[S,b]=(0,i.useState)(g);return(0,i.useEffect)(()=>{if(g)return void b(!0);const e=requestAnimationFrame(()=>b(!0));return()=>cancelAnimationFrame(e)},[g]),(0,r.jsx)("div",{role:"img","aria-label":k,style:{width:"100%",minWidth:240,height:c,position:"relative"},children:S&&(0,r.jsx)(a.ResponsiveContainer,{width:"100%",height:"100%",debounce:50,children:(0,r.jsxs)(a.PieChart,{children:[d&&(0,r.jsx)(a.Tooltip,{contentStyle:f.contentStyle,labelStyle:f.labelStyle,itemStyle:f.itemStyle}),s&&(0,r.jsx)(a.Legend,{wrapperStyle:{fontSize:13,color:u.textMuted}}),(0,r.jsx)(a.Pie,{data:n,dataKey:"value",nameKey:"name",outerRadius:y,startAngle:m,endAngle:m-360,label:h?({name:e,percent:t})=>`${e} (${(100*(t??0)).toFixed(0)}%)`:void 0,labelLine:h,strokeWidth:2,stroke:u.bg,children:n.map((e,t)=>(0,r.jsx)(a.Cell,{fill:e.color??p[t%p.length]},e.name))})]})})})},exports.TkxRadarChart=function({data:t,series:i,angleKey:n,height:c=300,showLegend:s=!0,showTooltip:d=!0,outerRadius:h="70%",ariaLabel:y="Radar chart"}){const m=e.useTheme(),k=o(m),u=l(m);return(0,r.jsx)("div",{role:"img","aria-label":y,style:{width:"100%",height:c},children:(0,r.jsx)(a.ResponsiveContainer,{width:"100%",height:"100%",children:(0,r.jsxs)(a.RadarChart,{data:t,outerRadius:h,children:[(0,r.jsx)(a.PolarGrid,{stroke:m.border}),(0,r.jsx)(a.PolarAngleAxis,{dataKey:n,tick:{fill:m.textMuted,fontSize:12}}),(0,r.jsx)(a.PolarRadiusAxis,{tick:{fill:m.textMuted,fontSize:10},axisLine:!1,tickLine:!1}),d&&(0,r.jsx)(a.Tooltip,{contentStyle:u.contentStyle,labelStyle:u.labelStyle,itemStyle:u.itemStyle}),s&&(0,r.jsx)(a.Legend,{wrapperStyle:{fontSize:13,color:m.textMuted}}),i.map((e,t)=>{const i=e.color??k[t%k.length];return(0,r.jsx)(a.Radar,{name:e.label??e.key,dataKey:e.key,stroke:i,fill:i,fillOpacity:e.fillOpacity??.2,strokeWidth:2},e.key)})]})})})},exports.TkxScatterChart=function({series:t,height:i=300,margin:c=n,showGrid:s=!0,showLegend:d=!0,showTooltip:h=!0,xTickFormatter:y,yTickFormatter:m,zRange:k=[20,400],ariaLabel:u="Scatter chart"}){const g=e.useTheme(),p=o(g),f=l(g),S={fill:g.textMuted,fontSize:12};return(0,r.jsx)("div",{role:"img","aria-label":u,style:{width:"100%",height:i},children:(0,r.jsx)(a.ResponsiveContainer,{width:"100%",height:"100%",children:(0,r.jsxs)(a.ScatterChart,{margin:c,children:[s&&(0,r.jsx)(a.CartesianGrid,{strokeDasharray:"3 3",stroke:g.border}),(0,r.jsx)(a.XAxis,{type:"number",dataKey:"x",tick:S,axisLine:{stroke:g.border},tickLine:!1,tickFormatter:y}),(0,r.jsx)(a.YAxis,{type:"number",dataKey:"y",tick:S,axisLine:!1,tickLine:!1,tickFormatter:m}),(0,r.jsx)(a.ZAxis,{type:"number",dataKey:"z",range:k}),h&&(0,r.jsx)(a.Tooltip,{contentStyle:f.contentStyle,labelStyle:f.labelStyle,itemStyle:f.itemStyle,cursor:{strokeDasharray:"3 3"}}),d&&(0,r.jsx)(a.Legend,{wrapperStyle:{fontSize:13,color:g.textMuted,paddingTop:8}}),t.map((e,t)=>(0,r.jsx)(a.Scatter,{name:e.name,data:e.data,fill:e.color??p[t%p.length],fillOpacity:.8},e.name??t))]})})})};
package/dist/charts.js CHANGED
@@ -1,553 +1,22 @@
1
- "use client";
2
- import { f as e } from "./themes-BbJanqiC.js";
3
- import { o as t } from "./hooks-6pRsPOyG.js";
4
- import { useEffect as n, useState as r } from "react";
5
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
- import { Area as s, AreaChart as c, Bar as l, BarChart as u, CartesianGrid as d, Cell as f, Legend as p, Line as m, LineChart as h, Pie as g, PieChart as _, PolarAngleAxis as v, PolarGrid as y, PolarRadiusAxis as b, Radar as x, RadarChart as S, ReferenceLine as C, ResponsiveContainer as w, Scatter as T, ScatterChart as E, Tooltip as D, XAxis as O, YAxis as k, ZAxis as A } from "recharts";
7
- //#region src/charts/shared.ts
8
- function j(e) {
9
- return [
10
- e.primary,
11
- e.secondary,
12
- e.info,
13
- e.success,
14
- e.warning,
15
- e.danger,
16
- e.primary + "aa",
17
- e.secondary + "aa",
18
- e.info + "aa",
19
- e.success + "aa"
20
- ];
21
- }
22
- var M = {
23
- top: 10,
24
- right: 30,
25
- bottom: 10,
26
- left: 0
27
- };
28
- function N(e) {
29
- return {
30
- contentStyle: {
31
- backgroundColor: e.surface,
32
- border: `1px solid ${e.border}`,
33
- borderRadius: 8,
34
- boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
35
- color: e.text,
36
- fontSize: 13
37
- },
38
- labelStyle: {
39
- color: e.textMuted,
40
- fontWeight: 600,
41
- marginBottom: 4
42
- },
43
- itemStyle: { color: e.text },
44
- cursor: { fill: `${e.primary}15` }
45
- };
46
- }
47
- //#endregion
48
- //#region src/charts/TkxAreaChart.tsx
49
- function P({ data: t, series: n, xKey: r, height: i = 300, margin: l = M, showGrid: u = !0, showLegend: f = !0, showTooltip: m = !0, smooth: h = !0, xTickFormatter: g, yTickFormatter: _, yDomain: v, ariaLabel: y = "Area chart" }) {
50
- let b = e(), x = j(b), S = N(b), C = {
51
- fill: b.textMuted,
52
- fontSize: 12
53
- };
54
- return /* @__PURE__ */ a("div", {
55
- role: "img",
56
- "aria-label": y,
57
- style: {
58
- width: "100%",
59
- height: i
60
- },
61
- children: /* @__PURE__ */ a(w, {
62
- width: "100%",
63
- height: "100%",
64
- children: /* @__PURE__ */ o(c, {
65
- data: t,
66
- margin: l,
67
- children: [
68
- u && /* @__PURE__ */ a(d, {
69
- strokeDasharray: "3 3",
70
- stroke: b.border,
71
- vertical: !1
72
- }),
73
- /* @__PURE__ */ a(O, {
74
- dataKey: r,
75
- tick: C,
76
- axisLine: { stroke: b.border },
77
- tickLine: !1,
78
- tickFormatter: g
79
- }),
80
- /* @__PURE__ */ a(k, {
81
- tick: C,
82
- axisLine: !1,
83
- tickLine: !1,
84
- tickFormatter: _,
85
- domain: v
86
- }),
87
- m && /* @__PURE__ */ a(D, {
88
- contentStyle: S.contentStyle,
89
- labelStyle: S.labelStyle,
90
- itemStyle: S.itemStyle,
91
- cursor: S.cursor
92
- }),
93
- f && /* @__PURE__ */ a(p, { wrapperStyle: {
94
- fontSize: 13,
95
- color: b.textMuted,
96
- paddingTop: 8
97
- } }),
98
- n.map((e, t) => {
99
- let n = e.color ?? x[t % x.length];
100
- return /* @__PURE__ */ a(s, {
101
- type: h ? "monotone" : "linear",
102
- dataKey: e.key,
103
- name: e.label ?? e.key,
104
- stroke: n,
105
- strokeWidth: 2,
106
- fill: n,
107
- fillOpacity: e.fillOpacity ?? .2,
108
- stackId: e.stacked ? "stack" : void 0,
109
- dot: !1,
110
- activeDot: {
111
- r: 5,
112
- strokeWidth: 0
113
- }
114
- }, e.key);
115
- })
116
- ]
117
- })
118
- })
119
- });
120
- }
121
- //#endregion
122
- //#region src/charts/TkxBarChart.tsx
123
- function F({ data: t, series: n, xKey: r, height: s = 300, margin: c = M, showGrid: f = !0, showLegend: m = !0, showTooltip: h = !0, layout: g = "horizontal", barSize: _, xTickFormatter: v, yTickFormatter: y, ariaLabel: b = "Bar chart" }) {
124
- let x = e(), S = j(x), C = N(x), T = {
125
- fill: x.textMuted,
126
- fontSize: 12
127
- }, E = g === "vertical";
128
- return /* @__PURE__ */ a("div", {
129
- role: "img",
130
- "aria-label": b,
131
- style: {
132
- width: "100%",
133
- height: s
134
- },
135
- children: /* @__PURE__ */ a(w, {
136
- width: "100%",
137
- height: "100%",
138
- children: /* @__PURE__ */ o(u, {
139
- data: t,
140
- margin: c,
141
- layout: g,
142
- children: [
143
- f && /* @__PURE__ */ a(d, {
144
- strokeDasharray: "3 3",
145
- stroke: x.border,
146
- vertical: E,
147
- horizontal: !E
148
- }),
149
- E ? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(k, {
150
- dataKey: r,
151
- type: "category",
152
- tick: T,
153
- axisLine: !1,
154
- tickLine: !1,
155
- tickFormatter: v,
156
- width: 100
157
- }), /* @__PURE__ */ a(O, {
158
- type: "number",
159
- tick: T,
160
- axisLine: { stroke: x.border },
161
- tickLine: !1,
162
- tickFormatter: y
163
- })] }) : /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(O, {
164
- dataKey: r,
165
- tick: T,
166
- axisLine: { stroke: x.border },
167
- tickLine: !1,
168
- tickFormatter: v
169
- }), /* @__PURE__ */ a(k, {
170
- tick: T,
171
- axisLine: !1,
172
- tickLine: !1,
173
- tickFormatter: y
174
- })] }),
175
- h && /* @__PURE__ */ a(D, {
176
- contentStyle: C.contentStyle,
177
- labelStyle: C.labelStyle,
178
- itemStyle: C.itemStyle,
179
- cursor: { fill: `${x.surfaceAlt}` }
180
- }),
181
- m && /* @__PURE__ */ a(p, { wrapperStyle: {
182
- fontSize: 13,
183
- color: x.textMuted,
184
- paddingTop: 8
185
- } }),
186
- n.map((e, t) => {
187
- let n = e.color ?? S[t % S.length];
188
- return /* @__PURE__ */ a(l, {
189
- dataKey: e.key,
190
- name: e.label ?? e.key,
191
- fill: n,
192
- stackId: e.stackId,
193
- maxBarSize: _ ?? 40,
194
- radius: e.radius ?? [
195
- 4,
196
- 4,
197
- 0,
198
- 0
199
- ]
200
- }, e.key);
201
- })
202
- ]
203
- })
204
- })
205
- });
206
- }
207
- //#endregion
208
- //#region src/charts/TkxLineChart.tsx
209
- function I({ data: t, series: n, xKey: r, height: i = 300, margin: s = M, showGrid: c = !0, showLegend: l = !0, showTooltip: u = !0, smooth: f = !0, referenceLines: g = [], xTickFormatter: _, yTickFormatter: v, yDomain: y, connectNulls: b = !1, ariaLabel: x = "Line chart" }) {
210
- let S = e(), T = j(S), E = N(S), A = {
211
- fill: S.textMuted,
212
- fontSize: 12
213
- };
214
- return /* @__PURE__ */ a("div", {
215
- role: "img",
216
- "aria-label": x,
217
- style: {
218
- width: "100%",
219
- height: i
220
- },
221
- children: /* @__PURE__ */ a(w, {
222
- width: "100%",
223
- height: "100%",
224
- children: /* @__PURE__ */ o(h, {
225
- data: t,
226
- margin: s,
227
- children: [
228
- c && /* @__PURE__ */ a(d, {
229
- strokeDasharray: "3 3",
230
- stroke: S.border,
231
- vertical: !1
232
- }),
233
- /* @__PURE__ */ a(O, {
234
- dataKey: r,
235
- tick: A,
236
- axisLine: { stroke: S.border },
237
- tickLine: !1,
238
- tickFormatter: _
239
- }),
240
- /* @__PURE__ */ a(k, {
241
- tick: A,
242
- axisLine: !1,
243
- tickLine: !1,
244
- tickFormatter: v,
245
- domain: y
246
- }),
247
- u && /* @__PURE__ */ a(D, {
248
- contentStyle: E.contentStyle,
249
- labelStyle: E.labelStyle,
250
- itemStyle: E.itemStyle,
251
- cursor: {
252
- stroke: S.border,
253
- strokeWidth: 1
254
- }
255
- }),
256
- l && /* @__PURE__ */ a(p, { wrapperStyle: {
257
- fontSize: 13,
258
- color: S.textMuted,
259
- paddingTop: 8
260
- } }),
261
- g.map((e, t) => /* @__PURE__ */ a(C, {
262
- y: e.y,
263
- x: e.x,
264
- label: e.label ? {
265
- value: e.label,
266
- fill: S.textMuted,
267
- fontSize: 11
268
- } : void 0,
269
- stroke: e.color ?? S.border,
270
- strokeDasharray: e.dashed ? "4 4" : void 0
271
- }, t)),
272
- n.map((e, t) => {
273
- let n = e.color ?? T[t % T.length];
274
- return /* @__PURE__ */ a(m, {
275
- type: f ? "monotone" : "linear",
276
- dataKey: e.key,
277
- name: e.label ?? e.key,
278
- stroke: n,
279
- strokeWidth: e.strokeWidth ?? 2,
280
- strokeDasharray: e.dashed ? "6 3" : void 0,
281
- dot: e.dot ?? !1,
282
- activeDot: {
283
- r: 5,
284
- strokeWidth: 0,
285
- fill: n
286
- },
287
- connectNulls: b
288
- }, e.key);
289
- })
290
- ]
291
- })
292
- })
293
- });
294
- }
295
- //#endregion
296
- //#region src/charts/TkxPieChart.tsx
297
- function L({ data: i, height: s = 300, showLegend: c = !0, showTooltip: l = !0, showLabels: u = !1, outerRadius: d = "70%", startAngle: m = 90, ariaLabel: h = "Pie chart" }) {
298
- let v = e(), y = t(), b = j(v), x = N(v), [S, C] = r(y);
299
- return n(() => {
300
- if (y) {
301
- C(!0);
302
- return;
303
- }
304
- let e = requestAnimationFrame(() => C(!0));
305
- return () => cancelAnimationFrame(e);
306
- }, [y]), /* @__PURE__ */ a("div", {
307
- role: "img",
308
- "aria-label": h,
309
- style: {
310
- width: "100%",
311
- minWidth: 240,
312
- height: s,
313
- position: "relative"
314
- },
315
- children: S && /* @__PURE__ */ a(w, {
316
- width: "100%",
317
- height: "100%",
318
- debounce: 50,
319
- children: /* @__PURE__ */ o(_, { children: [
320
- l && /* @__PURE__ */ a(D, {
321
- contentStyle: x.contentStyle,
322
- labelStyle: x.labelStyle,
323
- itemStyle: x.itemStyle
324
- }),
325
- c && /* @__PURE__ */ a(p, { wrapperStyle: {
326
- fontSize: 13,
327
- color: v.textMuted
328
- } }),
329
- /* @__PURE__ */ a(g, {
330
- data: i,
331
- dataKey: "value",
332
- nameKey: "name",
333
- outerRadius: d,
334
- startAngle: m,
335
- endAngle: m - 360,
336
- label: u ? ({ name: e, percent: t }) => `${e} (${((t ?? 0) * 100).toFixed(0)}%)` : void 0,
337
- labelLine: u,
338
- strokeWidth: 2,
339
- stroke: v.bg,
340
- children: i.map((e, t) => /* @__PURE__ */ a(f, { fill: e.color ?? b[t % b.length] }, e.name))
341
- })
342
- ] })
343
- })
344
- });
345
- }
346
- //#endregion
347
- //#region src/charts/TkxDonutChart.tsx
348
- function R({ data: i, height: s = 300, showLegend: c = !0, showTooltip: l = !0, centerLabel: u, centerSublabel: d, innerRadius: m = "55%", outerRadius: h = "75%", startAngle: v = 90, ariaLabel: y = "Donut chart" }) {
349
- let b = e(), x = t(), S = j(b), C = N(b), [T, E] = r(x);
350
- return n(() => {
351
- if (x) {
352
- E(!0);
353
- return;
354
- }
355
- let e = requestAnimationFrame(() => E(!0));
356
- return () => cancelAnimationFrame(e);
357
- }, [x]), /* @__PURE__ */ o("div", {
358
- role: "img",
359
- "aria-label": y,
360
- style: {
361
- width: "100%",
362
- minWidth: 240,
363
- height: s,
364
- position: "relative"
365
- },
366
- children: [T && /* @__PURE__ */ a(w, {
367
- width: "100%",
368
- height: "100%",
369
- debounce: 50,
370
- children: /* @__PURE__ */ o(_, { children: [
371
- l && /* @__PURE__ */ a(D, {
372
- contentStyle: C.contentStyle,
373
- labelStyle: C.labelStyle,
374
- itemStyle: C.itemStyle
375
- }),
376
- c && /* @__PURE__ */ a(p, { wrapperStyle: {
377
- fontSize: 13,
378
- color: b.textMuted
379
- } }),
380
- /* @__PURE__ */ a(g, {
381
- data: i,
382
- dataKey: "value",
383
- nameKey: "name",
384
- innerRadius: m,
385
- outerRadius: h,
386
- startAngle: v,
387
- endAngle: v - 360,
388
- strokeWidth: 3,
389
- stroke: b.bg,
390
- label: !1,
391
- labelLine: !1,
392
- children: i.map((e, t) => /* @__PURE__ */ a(f, { fill: e.color ?? S[t % S.length] }, e.name))
393
- }),
394
- (u || d) && /* @__PURE__ */ a("text", {})
395
- ] })
396
- }), (u || d) && /* @__PURE__ */ o("div", {
397
- style: {
398
- position: "absolute",
399
- inset: 0,
400
- display: "flex",
401
- flexDirection: "column",
402
- alignItems: "center",
403
- justifyContent: "center",
404
- pointerEvents: "none",
405
- marginTop: c ? -24 : 0
406
- },
407
- children: [u && /* @__PURE__ */ a("span", {
408
- style: {
409
- fontSize: 22,
410
- fontWeight: 700,
411
- color: b.text,
412
- lineHeight: 1
413
- },
414
- children: u
415
- }), d && /* @__PURE__ */ a("span", {
416
- style: {
417
- fontSize: 13,
418
- color: b.textMuted,
419
- marginTop: 4
420
- },
421
- children: d
422
- })]
423
- })]
424
- });
425
- }
426
- //#endregion
427
- //#region src/charts/TkxScatterChart.tsx
428
- function z({ series: t, height: n = 300, margin: r = M, showGrid: i = !0, showLegend: s = !0, showTooltip: c = !0, xTickFormatter: l, yTickFormatter: u, zRange: f = [20, 400], ariaLabel: m = "Scatter chart" }) {
429
- let h = e(), g = j(h), _ = N(h), v = {
430
- fill: h.textMuted,
431
- fontSize: 12
432
- };
433
- return /* @__PURE__ */ a("div", {
434
- role: "img",
435
- "aria-label": m,
436
- style: {
437
- width: "100%",
438
- height: n
439
- },
440
- children: /* @__PURE__ */ a(w, {
441
- width: "100%",
442
- height: "100%",
443
- children: /* @__PURE__ */ o(E, {
444
- margin: r,
445
- children: [
446
- i && /* @__PURE__ */ a(d, {
447
- strokeDasharray: "3 3",
448
- stroke: h.border
449
- }),
450
- /* @__PURE__ */ a(O, {
451
- type: "number",
452
- dataKey: "x",
453
- tick: v,
454
- axisLine: { stroke: h.border },
455
- tickLine: !1,
456
- tickFormatter: l
457
- }),
458
- /* @__PURE__ */ a(k, {
459
- type: "number",
460
- dataKey: "y",
461
- tick: v,
462
- axisLine: !1,
463
- tickLine: !1,
464
- tickFormatter: u
465
- }),
466
- /* @__PURE__ */ a(A, {
467
- type: "number",
468
- dataKey: "z",
469
- range: f
470
- }),
471
- c && /* @__PURE__ */ a(D, {
472
- contentStyle: _.contentStyle,
473
- labelStyle: _.labelStyle,
474
- itemStyle: _.itemStyle,
475
- cursor: { strokeDasharray: "3 3" }
476
- }),
477
- s && /* @__PURE__ */ a(p, { wrapperStyle: {
478
- fontSize: 13,
479
- color: h.textMuted,
480
- paddingTop: 8
481
- } }),
482
- t.map((e, t) => /* @__PURE__ */ a(T, {
483
- name: e.name,
484
- data: e.data,
485
- fill: e.color ?? g[t % g.length],
486
- fillOpacity: .8
487
- }, e.name ?? t))
488
- ]
489
- })
490
- })
491
- });
492
- }
493
- //#endregion
494
- //#region src/charts/TkxRadarChart.tsx
495
- function B({ data: t, series: n, angleKey: r, height: i = 300, showLegend: s = !0, showTooltip: c = !0, outerRadius: l = "70%", ariaLabel: u = "Radar chart" }) {
496
- let d = e(), f = j(d), m = N(d);
497
- return /* @__PURE__ */ a("div", {
498
- role: "img",
499
- "aria-label": u,
500
- style: {
501
- width: "100%",
502
- height: i
503
- },
504
- children: /* @__PURE__ */ a(w, {
505
- width: "100%",
506
- height: "100%",
507
- children: /* @__PURE__ */ o(S, {
508
- data: t,
509
- outerRadius: l,
510
- children: [
511
- /* @__PURE__ */ a(y, { stroke: d.border }),
512
- /* @__PURE__ */ a(v, {
513
- dataKey: r,
514
- tick: {
515
- fill: d.textMuted,
516
- fontSize: 12
517
- }
518
- }),
519
- /* @__PURE__ */ a(b, {
520
- tick: {
521
- fill: d.textMuted,
522
- fontSize: 10
523
- },
524
- axisLine: !1,
525
- tickLine: !1
526
- }),
527
- c && /* @__PURE__ */ a(D, {
528
- contentStyle: m.contentStyle,
529
- labelStyle: m.labelStyle,
530
- itemStyle: m.itemStyle
531
- }),
532
- s && /* @__PURE__ */ a(p, { wrapperStyle: {
533
- fontSize: 13,
534
- color: d.textMuted
535
- } }),
536
- n.map((e, t) => {
537
- let n = e.color ?? f[t % f.length];
538
- return /* @__PURE__ */ a(x, {
539
- name: e.label ?? e.key,
540
- dataKey: e.key,
541
- stroke: n,
542
- fill: n,
543
- fillOpacity: e.fillOpacity ?? .2,
544
- strokeWidth: 2
545
- }, e.key);
546
- })
547
- ]
548
- })
549
- })
550
- });
551
- }
552
- //#endregion
553
- export { P as TkxAreaChart, F as TkxBarChart, R as TkxDonutChart, I as TkxLineChart, L as TkxPieChart, B as TkxRadarChart, z as TkxScatterChart };
1
+ import{f as e}from"./chunk-PJ50l0JC.js";import{o as t}from"./chunk-B3ph66Zb.js";import{useEffect as i,useState as r}from"react";import{Fragment as a,jsx as o,jsxs as n}from"react/jsx-runtime";import{Area as l,AreaChart as c,Bar as s,BarChart as d,CartesianGrid as h,Cell as m,Legend as y,Line as k,LineChart as u,Pie as g,PieChart as f,PolarAngleAxis as p,PolarGrid as S,PolarRadiusAxis as b,Radar as w,RadarChart as L,ReferenceLine as x,ResponsiveContainer as v,Scatter as z,ScatterChart as F,Tooltip as T,XAxis as K,YAxis as D,ZAxis as W}from"recharts";function A(e){return[e.primary,e.secondary,e.info,e.success,e.warning,e.danger,e.primary+"aa",e.secondary+"aa",e.info+"aa",e.success+"aa"]}var R={top:10,right:30,bottom:10,left:0};function $(e){return{contentStyle:{backgroundColor:e.surface,border:`1px solid ${e.border}`,borderRadius:8,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",color:e.text,fontSize:13},labelStyle:{color:e.textMuted,fontWeight:600,marginBottom:4},itemStyle:{color:e.text},cursor:{fill:`${e.primary}15`}}}function j({data:t,series:i,xKey:r,height:a=300,margin:s=R,showGrid:d=!0,showLegend:m=!0,showTooltip:k=!0,smooth:u=!0,xTickFormatter:g,yTickFormatter:f,yDomain:p,ariaLabel:S="Area chart"}){const b=e(),w=A(b),L=$(b),x={fill:b.textMuted,fontSize:12};/* @__PURE__ */
2
+ return o("div",{role:"img","aria-label":S,style:{width:"100%",height:a},children:/* @__PURE__ */o(v,{width:"100%",height:"100%",children:/* @__PURE__ */n(c,{data:t,margin:s,children:[d&&/* @__PURE__ */o(h,{strokeDasharray:"3 3",stroke:b.border,vertical:!1}),
3
+ /* @__PURE__ */o(K,{dataKey:r,tick:x,axisLine:{stroke:b.border},tickLine:!1,tickFormatter:g}),
4
+ /* @__PURE__ */o(D,{tick:x,axisLine:!1,tickLine:!1,tickFormatter:f,domain:p}),k&&/* @__PURE__ */o(T,{contentStyle:L.contentStyle,labelStyle:L.labelStyle,itemStyle:L.itemStyle,cursor:L.cursor}),m&&/* @__PURE__ */o(y,{wrapperStyle:{fontSize:13,color:b.textMuted,paddingTop:8}}),i.map((e,t)=>{const i=e.color??w[t%w.length];/* @__PURE__ */
5
+ return o(l,{type:u?"monotone":"linear",dataKey:e.key,name:e.label??e.key,stroke:i,strokeWidth:2,fill:i,fillOpacity:e.fillOpacity??.2,stackId:e.stacked?"stack":void 0,dot:!1,activeDot:{r:5,strokeWidth:0}},e.key)})]})})})}function G({data:t,series:i,xKey:r,height:l=300,margin:c=R,showGrid:m=!0,showLegend:k=!0,showTooltip:u=!0,layout:g="horizontal",barSize:f,xTickFormatter:p,yTickFormatter:S,ariaLabel:b="Bar chart"}){const w=e(),L=A(w),x=$(w),z={fill:w.textMuted,fontSize:12},F="vertical"===g;/* @__PURE__ */
6
+ return o("div",{role:"img","aria-label":b,style:{width:"100%",height:l},children:/* @__PURE__ */o(v,{width:"100%",height:"100%",children:/* @__PURE__ */n(d,{data:t,margin:c,layout:g,children:[m&&/* @__PURE__ */o(h,{strokeDasharray:"3 3",stroke:w.border,vertical:F,horizontal:!F}),/* @__PURE__ */n(a,F?{children:[/* @__PURE__ */o(D,{dataKey:r,type:"category",tick:z,axisLine:!1,tickLine:!1,tickFormatter:p,width:100}),/* @__PURE__ */o(K,{type:"number",tick:z,axisLine:{stroke:w.border},tickLine:!1,tickFormatter:S})]}:{children:[/* @__PURE__ */o(K,{dataKey:r,tick:z,axisLine:{stroke:w.border},tickLine:!1,tickFormatter:p}),/* @__PURE__ */o(D,{tick:z,axisLine:!1,tickLine:!1,tickFormatter:S})]}),u&&/* @__PURE__ */o(T,{contentStyle:x.contentStyle,labelStyle:x.labelStyle,itemStyle:x.itemStyle,cursor:{fill:`${w.surfaceAlt}`}}),k&&/* @__PURE__ */o(y,{wrapperStyle:{fontSize:13,color:w.textMuted,paddingTop:8}}),i.map((e,t)=>{const i=e.color??L[t%L.length];/* @__PURE__ */
7
+ return o(s,{dataKey:e.key,name:e.label??e.key,fill:i,stackId:e.stackId,maxBarSize:f??40,radius:e.radius??[4,4,0,0]},e.key)})]})})})}function B({data:t,series:i,xKey:r,height:a=300,margin:l=R,showGrid:c=!0,showLegend:s=!0,showTooltip:d=!0,smooth:m=!0,referenceLines:g=[],xTickFormatter:f,yTickFormatter:p,yDomain:S,connectNulls:b=!1,ariaLabel:w="Line chart"}){const L=e(),z=A(L),F=$(L),W={fill:L.textMuted,fontSize:12};/* @__PURE__ */
8
+ return o("div",{role:"img","aria-label":w,style:{width:"100%",height:a},children:/* @__PURE__ */o(v,{width:"100%",height:"100%",children:/* @__PURE__ */n(u,{data:t,margin:l,children:[c&&/* @__PURE__ */o(h,{strokeDasharray:"3 3",stroke:L.border,vertical:!1}),
9
+ /* @__PURE__ */o(K,{dataKey:r,tick:W,axisLine:{stroke:L.border},tickLine:!1,tickFormatter:f}),
10
+ /* @__PURE__ */o(D,{tick:W,axisLine:!1,tickLine:!1,tickFormatter:p,domain:S}),d&&/* @__PURE__ */o(T,{contentStyle:F.contentStyle,labelStyle:F.labelStyle,itemStyle:F.itemStyle,cursor:{stroke:L.border,strokeWidth:1}}),s&&/* @__PURE__ */o(y,{wrapperStyle:{fontSize:13,color:L.textMuted,paddingTop:8}}),g.map((e,t)=>/* @__PURE__ */o(x,{y:e.y,x:e.x,label:e.label?{value:e.label,fill:L.textMuted,fontSize:11}:void 0,stroke:e.color??L.border,strokeDasharray:e.dashed?"4 4":void 0},t)),i.map((e,t)=>{const i=e.color??z[t%z.length];/* @__PURE__ */
11
+ return o(k,{type:m?"monotone":"linear",dataKey:e.key,name:e.label??e.key,stroke:i,strokeWidth:e.strokeWidth??2,strokeDasharray:e.dashed?"6 3":void 0,dot:e.dot??!1,activeDot:{r:5,strokeWidth:0,fill:i},connectNulls:b},e.key)})]})})})}function I({data:a,height:l=300,showLegend:c=!0,showTooltip:s=!0,showLabels:d=!1,outerRadius:h="70%",startAngle:k=90,ariaLabel:u="Pie chart"}){const p=e(),S=t(),b=A(p),w=$(p),[L,x]=r(S);return i(()=>{if(S)return void x(!0);const e=requestAnimationFrame(()=>x(!0));return()=>cancelAnimationFrame(e)},[S]),/* @__PURE__ */o("div",{role:"img","aria-label":u,style:{width:"100%",minWidth:240,height:l,position:"relative"},children:L&&/* @__PURE__ */o(v,{width:"100%",height:"100%",debounce:50,children:/* @__PURE__ */n(f,{children:[s&&/* @__PURE__ */o(T,{contentStyle:w.contentStyle,labelStyle:w.labelStyle,itemStyle:w.itemStyle}),c&&/* @__PURE__ */o(y,{wrapperStyle:{fontSize:13,color:p.textMuted}}),
12
+ /* @__PURE__ */o(g,{data:a,dataKey:"value",nameKey:"name",outerRadius:h,startAngle:k,endAngle:k-360,label:d?({name:e,percent:t})=>`${e} (${(100*(t??0)).toFixed(0)}%)`:void 0,labelLine:d,strokeWidth:2,stroke:p.bg,children:a.map((e,t)=>/* @__PURE__ */o(m,{fill:e.color??b[t%b.length]},e.name))})]})})})}function O({data:a,height:l=300,showLegend:c=!0,showTooltip:s=!0,centerLabel:d,centerSublabel:h,innerRadius:k="55%",outerRadius:u="75%",startAngle:p=90,ariaLabel:S="Donut chart"}){const b=e(),w=t(),L=A(b),x=$(b),[z,F]=r(w);return i(()=>{if(w)return void F(!0);const e=requestAnimationFrame(()=>F(!0));return()=>cancelAnimationFrame(e)},[w]),/* @__PURE__ */n("div",{role:"img","aria-label":S,style:{width:"100%",minWidth:240,height:l,position:"relative"},children:[z&&/* @__PURE__ */o(v,{width:"100%",height:"100%",debounce:50,children:/* @__PURE__ */n(f,{children:[s&&/* @__PURE__ */o(T,{contentStyle:x.contentStyle,labelStyle:x.labelStyle,itemStyle:x.itemStyle}),c&&/* @__PURE__ */o(y,{wrapperStyle:{fontSize:13,color:b.textMuted}}),
13
+ /* @__PURE__ */o(g,{data:a,dataKey:"value",nameKey:"name",innerRadius:k,outerRadius:u,startAngle:p,endAngle:p-360,strokeWidth:3,stroke:b.bg,label:!1,labelLine:!1,children:a.map((e,t)=>/* @__PURE__ */o(m,{fill:e.color??L[t%L.length]},e.name))}),(d||h)&&/* @__PURE__ */o("text",{})]})}),(d||h)&&/* @__PURE__ */n("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",pointerEvents:"none",marginTop:c?-24:0},children:[d&&/* @__PURE__ */o("span",{style:{fontSize:22,fontWeight:700,color:b.text,lineHeight:1},children:d}),h&&/* @__PURE__ */o("span",{style:{fontSize:13,color:b.textMuted,marginTop:4},children:h})]})]})}function q({series:t,height:i=300,margin:r=R,showGrid:a=!0,showLegend:l=!0,showTooltip:c=!0,xTickFormatter:s,yTickFormatter:d,zRange:m=[20,400],ariaLabel:k="Scatter chart"}){const u=e(),g=A(u),f=$(u),p={fill:u.textMuted,fontSize:12};/* @__PURE__ */
14
+ return o("div",{role:"img","aria-label":k,style:{width:"100%",height:i},children:/* @__PURE__ */o(v,{width:"100%",height:"100%",children:/* @__PURE__ */n(F,{margin:r,children:[a&&/* @__PURE__ */o(h,{strokeDasharray:"3 3",stroke:u.border}),
15
+ /* @__PURE__ */o(K,{type:"number",dataKey:"x",tick:p,axisLine:{stroke:u.border},tickLine:!1,tickFormatter:s}),
16
+ /* @__PURE__ */o(D,{type:"number",dataKey:"y",tick:p,axisLine:!1,tickLine:!1,tickFormatter:d}),
17
+ /* @__PURE__ */o(W,{type:"number",dataKey:"z",range:m}),c&&/* @__PURE__ */o(T,{contentStyle:f.contentStyle,labelStyle:f.labelStyle,itemStyle:f.itemStyle,cursor:{strokeDasharray:"3 3"}}),l&&/* @__PURE__ */o(y,{wrapperStyle:{fontSize:13,color:u.textMuted,paddingTop:8}}),t.map((e,t)=>/* @__PURE__ */o(z,{name:e.name,data:e.data,fill:e.color??g[t%g.length],fillOpacity:.8},e.name??t))]})})})}function C({data:t,series:i,angleKey:r,height:a=300,showLegend:l=!0,showTooltip:c=!0,outerRadius:s="70%",ariaLabel:d="Radar chart"}){const h=e(),m=A(h),k=$(h);/* @__PURE__ */
18
+ return o("div",{role:"img","aria-label":d,style:{width:"100%",height:a},children:/* @__PURE__ */o(v,{width:"100%",height:"100%",children:/* @__PURE__ */n(L,{data:t,outerRadius:s,children:[
19
+ /* @__PURE__ */o(S,{stroke:h.border}),
20
+ /* @__PURE__ */o(p,{dataKey:r,tick:{fill:h.textMuted,fontSize:12}}),
21
+ /* @__PURE__ */o(b,{tick:{fill:h.textMuted,fontSize:10},axisLine:!1,tickLine:!1}),c&&/* @__PURE__ */o(T,{contentStyle:k.contentStyle,labelStyle:k.labelStyle,itemStyle:k.itemStyle}),l&&/* @__PURE__ */o(y,{wrapperStyle:{fontSize:13,color:h.textMuted}}),i.map((e,t)=>{const i=e.color??m[t%m.length];/* @__PURE__ */
22
+ return o(w,{name:e.label??e.key,dataKey:e.key,stroke:i,fill:i,fillOpacity:e.fillOpacity??.2,strokeWidth:2},e.key)})]})})})}export{j as TkxAreaChart,G as TkxBarChart,O as TkxDonutChart,B as TkxLineChart,I as TkxPieChart,C as TkxRadarChart,q as TkxScatterChart};
@@ -0,0 +1 @@
1
+ import{C as n,S as e,_ as o,g as t}from"./chunk-PJ50l0JC.js";import{useCallback as r,useEffect as u,useRef as c,useState as d}from"react";function i(){const[e,o]=d(()=>"undefined"!=typeof window&&n());return u(()=>{if("undefined"==typeof window)return;const n=window.matchMedia("(prefers-reduced-motion: reduce)"),e=n=>o(n.matches);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)},[]),e}function f(){const[n,o]=d(()=>"undefined"!=typeof window&&e());return u(()=>{if("undefined"==typeof window)return;const n=window.matchMedia("(forced-colors: active)"),e=n=>o(n.matches);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)},[]),n}function s(n){const e=c(null);return u(()=>{if(!n||!e.current)return;const t=o(e.current);return t.activate(),()=>t.deactivate()},[n]),e}function a(){const n=c(null);return u(()=>{if("undefined"!=typeof document)return n.current=t(),()=>{n.current?.destroy()}},[]),r((e,o="polite")=>{n.current?.announce(e,o)},[])}function w(n,e=!0){const o=c(n);o.current=n,u(()=>{if(!e||"undefined"==typeof document)return;const n=n=>{"Escape"===n.key&&o.current()};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[e])}function p(n,e){const o=c(e);o.current=e,u(()=>{const e=e=>{n.current&&!n.current.contains(e.target)&&o.current()};return document.addEventListener("pointerdown",e),()=>document.removeEventListener("pointerdown",e)},[n])}export{f as a,s as i,p as n,i as o,w as r,a as t};
@@ -0,0 +1 @@
1
+ require("./chunk-DmRB1Blb.js");const e=require("./chunk-DjxOP8W4.js");let n=require("react");function t(){const[t,r]=(0,n.useState)(()=>"undefined"!=typeof window&&e.prefersReducedMotion());return(0,n.useEffect)(()=>{if("undefined"==typeof window)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=e=>r(e.matches);return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[]),t}function r(){const[t,r]=(0,n.useState)(()=>"undefined"!=typeof window&&e.prefersHighContrast());return(0,n.useEffect)(()=>{if("undefined"==typeof window)return;const e=window.matchMedia("(forced-colors: active)"),n=e=>r(e.matches);return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[]),t}function u(t){const r=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!t||!r.current)return;const n=e.createFocusTrap(r.current);return n.activate(),()=>n.deactivate()},[t]),r}function o(){const t=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if("undefined"!=typeof document)return t.current=e.createAnnouncer(),()=>{t.current?.destroy()}},[]),(0,n.useCallback)((e,n="polite")=>{t.current?.announce(e,n)},[])}function c(e,t=!0){const r=(0,n.useRef)(e);r.current=e,(0,n.useEffect)(()=>{if(!t||"undefined"==typeof document)return;const e=e=>{"Escape"===e.key&&r.current()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t])}function i(e,t){const r=(0,n.useRef)(t);r.current=t,(0,n.useEffect)(()=>{const n=n=>{e.current&&!e.current.contains(n.target)&&r.current()};return document.addEventListener("pointerdown",n),()=>document.removeEventListener("pointerdown",n)},[e])}Object.defineProperty(exports,"useAnnounce",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"useClickOutside",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"useEscapeKey",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"useFocusTrap",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"useHighContrast",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"useReducedMotion",{enumerable:!0,get:function(){return t}});