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.
- package/dist/charts.cjs +1 -1
- package/dist/charts.js +22 -553
- package/dist/chunk-B3ph66Zb.js +1 -0
- package/dist/chunk-Bc16rJT-.js +1 -0
- package/dist/chunk-Dike2DLU.js +3 -0
- package/dist/chunk-DjxOP8W4.js +1 -0
- package/dist/chunk-DkoFTL1O.js +1 -0
- package/dist/chunk-DmRB1Blb.js +1 -0
- package/dist/chunk-DnCXUUx5.js +1 -0
- package/dist/chunk-LWkKqC8d.js +1 -0
- package/dist/chunk-PJ50l0JC.js +1 -0
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +1 -442
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.js +1 -733
- package/dist/index.cjs +1 -152
- package/dist/index.d.ts +4 -2
- package/dist/index.js +429 -16786
- package/dist/quantum.cjs +1 -89
- package/dist/quantum.js +74 -2551
- package/dist/realtime.cjs +1 -23
- package/dist/realtime.js +1 -804
- package/dist/src/a11y/index.d.ts +0 -1
- package/dist/src/charts/TkxAreaChart.d.ts +0 -5
- package/dist/src/charts/TkxBarChart.d.ts +0 -3
- package/dist/src/charts/TkxDonutChart.d.ts +0 -5
- package/dist/src/charts/TkxLineChart.d.ts +0 -1
- package/dist/src/charts/TkxPieChart.d.ts +0 -3
- package/dist/src/charts/TkxRadarChart.d.ts +0 -3
- package/dist/src/charts/TkxScatterChart.d.ts +0 -2
- package/dist/src/charts/index.d.ts +0 -1
- package/dist/src/charts/shared.d.ts +0 -3
- package/dist/src/components/TkxAIChatBubble.d.ts +0 -9
- package/dist/src/components/TkxAIConfidenceBar.d.ts +0 -6
- package/dist/src/components/TkxAIThinking.d.ts +0 -6
- package/dist/src/components/TkxAccordion.d.ts +0 -1
- package/dist/src/components/TkxAffix.d.ts +0 -1
- package/dist/src/components/TkxAlert.d.ts +0 -1
- package/dist/src/components/TkxAnchor.d.ts +0 -1
- package/dist/src/components/TkxAppBar.d.ts +0 -1
- package/dist/src/components/TkxAutocomplete.d.ts +0 -1
- package/dist/src/components/TkxAvatar.d.ts +0 -1
- package/dist/src/components/TkxBadge.d.ts +0 -1
- package/dist/src/components/TkxBottomNav.d.ts +0 -1
- package/dist/src/components/TkxBreadcrumb.d.ts +0 -1
- package/dist/src/components/TkxButton.d.ts +0 -1
- package/dist/src/components/TkxCard.d.ts +0 -1
- package/dist/src/components/TkxCarousel.d.ts +0 -1
- package/dist/src/components/TkxCascader.d.ts +0 -1
- package/dist/src/components/TkxChat.d.ts +0 -1
- package/dist/src/components/TkxCheckbox.d.ts +0 -1
- package/dist/src/components/TkxClock.d.ts +0 -1
- package/dist/src/components/TkxColorPicker.d.ts +0 -1
- package/dist/src/components/TkxCommand.d.ts +0 -1
- package/dist/src/components/TkxConfigProvider.d.ts +0 -30
- package/dist/src/components/TkxDataGrid.d.ts +0 -15
- package/dist/src/components/TkxDatePicker.d.ts +0 -1
- package/dist/src/components/TkxDivider.d.ts +0 -1
- package/dist/src/components/TkxDrawer.d.ts +0 -1
- package/dist/src/components/TkxDropdown.d.ts +0 -1
- package/dist/src/components/TkxEmpty.d.ts +0 -1
- package/dist/src/components/TkxFileUpload.d.ts +0 -1
- package/dist/src/components/TkxForm.d.ts +0 -35
- package/dist/src/components/TkxIcon.d.ts +0 -1
- package/dist/src/components/TkxImage.d.ts +0 -1
- package/dist/src/components/TkxInput.d.ts +1 -1
- package/dist/src/components/TkxLayout.d.ts +0 -22
- package/dist/src/components/TkxList.d.ts +0 -1
- package/dist/src/components/TkxLiveFeed.d.ts +0 -1
- package/dist/src/components/TkxLiveLog.d.ts +0 -1
- package/dist/src/components/TkxLiveMetrics.d.ts +0 -1
- package/dist/src/components/TkxLogo.d.ts +0 -1
- package/dist/src/components/TkxMarkdown.d.ts +0 -10
- package/dist/src/components/TkxMasonry.d.ts +0 -1
- package/dist/src/components/TkxMentions.d.ts +0 -1
- package/dist/src/components/TkxMenu.d.ts +0 -1
- package/dist/src/components/TkxModal.d.ts +0 -1
- package/dist/src/components/TkxNumberInput.d.ts +0 -1
- package/dist/src/components/TkxOTP.d.ts +0 -1
- package/dist/src/components/TkxOrgChart.d.ts +32 -0
- package/dist/src/components/TkxPagination.d.ts +0 -1
- package/dist/src/components/TkxPlayground.d.ts +0 -13
- package/dist/src/components/TkxPopover.d.ts +0 -1
- package/dist/src/components/TkxProgress.d.ts +0 -1
- package/dist/src/components/TkxQRCode.d.ts +0 -1
- package/dist/src/components/TkxQuantumForm.d.ts +0 -1
- package/dist/src/components/TkxRadio.d.ts +0 -1
- package/dist/src/components/TkxRating.d.ts +0 -1
- package/dist/src/components/TkxRealTimeChart.d.ts +0 -1
- package/dist/src/components/TkxResult.d.ts +0 -1
- package/dist/src/components/TkxRichTextDisplay.d.ts +0 -1
- package/dist/src/components/TkxSegmented.d.ts +0 -1
- package/dist/src/components/TkxSelect.d.ts +0 -3
- package/dist/src/components/TkxSkeleton.d.ts +0 -1
- package/dist/src/components/TkxSlider.d.ts +0 -1
- package/dist/src/components/TkxSnackbar.d.ts +0 -1
- package/dist/src/components/TkxSpeedDial.d.ts +0 -1
- package/dist/src/components/TkxSpin.d.ts +0 -1
- package/dist/src/components/TkxStatistic.d.ts +0 -1
- package/dist/src/components/TkxStepper.d.ts +0 -1
- package/dist/src/components/TkxTable.d.ts +0 -1
- package/dist/src/components/TkxTabs.d.ts +0 -1
- package/dist/src/components/TkxTag.d.ts +0 -1
- package/dist/src/components/TkxThemeBuilder.d.ts +0 -1
- package/dist/src/components/TkxTimeline.d.ts +0 -1
- package/dist/src/components/TkxToast.d.ts +0 -1
- package/dist/src/components/TkxToggle.d.ts +0 -1
- package/dist/src/components/TkxToolbar.d.ts +0 -1
- package/dist/src/components/TkxTooltip.d.ts +0 -1
- package/dist/src/components/TkxTour.d.ts +0 -1
- package/dist/src/components/TkxTransferList.d.ts +0 -1
- package/dist/src/components/TkxTreeView.d.ts +0 -1
- package/dist/src/components/TkxTypography.d.ts +0 -1
- package/dist/src/components/TkxVideoPlayer.d.ts +0 -1
- package/dist/src/components/TkxWatermark.d.ts +0 -1
- package/dist/src/components/index.d.ts +1 -1
- package/dist/src/engine/css.d.ts +0 -1
- package/dist/src/engine/index.d.ts +0 -1
- package/dist/src/engine/quantum-ai.d.ts +0 -73
- package/dist/src/engine/quantum.d.ts +0 -1
- package/dist/src/engine/security.d.ts +45 -9
- package/dist/src/engine/tkx.d.ts +0 -53
- package/dist/src/engine/wcag.d.ts +0 -1
- package/dist/src/headless/index.d.ts +0 -1
- package/dist/src/headless/useControllable.d.ts +0 -15
- package/dist/src/headless/useDebounce.d.ts +0 -12
- package/dist/src/headless/useDisclosure.d.ts +0 -13
- package/dist/src/headless/useFormState.d.ts +0 -13
- package/dist/src/headless/useInfiniteQuery.d.ts +0 -11
- package/dist/src/headless/useIntersectionObserver.d.ts +0 -10
- package/dist/src/headless/useListSelection.d.ts +0 -9
- package/dist/src/headless/useLocalStorage.d.ts +0 -8
- package/dist/src/headless/useMediaQuery.d.ts +0 -10
- package/dist/src/headless/useRovingTabIndex.d.ts +0 -15
- package/dist/src/headless/useSSE.d.ts +0 -9
- package/dist/src/headless/useThrottle.d.ts +0 -7
- package/dist/src/headless/useWebSocket.d.ts +0 -9
- package/dist/src/hooks/index.d.ts +0 -1
- package/dist/src/i18n/I18nProvider.d.ts +0 -1
- package/dist/src/i18n/index.d.ts +0 -1
- package/dist/src/quantum/index.d.ts +0 -1
- package/dist/src/realtime/index.d.ts +0 -1
- package/dist/src/themes/index.d.ts +0 -1
- package/package.json +5 -3
- package/dist/TkxForm-BaO4wvXt.js +0 -320
- package/dist/TkxForm-M6ttomry.cjs +0 -12
- package/dist/chunk-Bmb41Sf3.cjs +0 -1
- package/dist/hooks-6pRsPOyG.js +0 -58
- package/dist/hooks-mivgRljH.cjs +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/src/a11y/index.d.ts.map +0 -1
- package/dist/src/charts/TkxAreaChart.d.ts.map +0 -1
- package/dist/src/charts/TkxBarChart.d.ts.map +0 -1
- package/dist/src/charts/TkxDonutChart.d.ts.map +0 -1
- package/dist/src/charts/TkxLineChart.d.ts.map +0 -1
- package/dist/src/charts/TkxPieChart.d.ts.map +0 -1
- package/dist/src/charts/TkxRadarChart.d.ts.map +0 -1
- package/dist/src/charts/TkxScatterChart.d.ts.map +0 -1
- package/dist/src/charts/index.d.ts.map +0 -1
- package/dist/src/charts/shared.d.ts.map +0 -1
- package/dist/src/components/TkxAIChatBubble.d.ts.map +0 -1
- package/dist/src/components/TkxAIConfidenceBar.d.ts.map +0 -1
- package/dist/src/components/TkxAIThinking.d.ts.map +0 -1
- package/dist/src/components/TkxAccordion.d.ts.map +0 -1
- package/dist/src/components/TkxAffix.d.ts.map +0 -1
- package/dist/src/components/TkxAlert.d.ts.map +0 -1
- package/dist/src/components/TkxAnchor.d.ts.map +0 -1
- package/dist/src/components/TkxAppBar.d.ts.map +0 -1
- package/dist/src/components/TkxAutocomplete.d.ts.map +0 -1
- package/dist/src/components/TkxAvatar.d.ts.map +0 -1
- package/dist/src/components/TkxBadge.d.ts.map +0 -1
- package/dist/src/components/TkxBottomNav.d.ts.map +0 -1
- package/dist/src/components/TkxBreadcrumb.d.ts.map +0 -1
- package/dist/src/components/TkxButton.d.ts.map +0 -1
- package/dist/src/components/TkxCard.d.ts.map +0 -1
- package/dist/src/components/TkxCarousel.d.ts.map +0 -1
- package/dist/src/components/TkxCascader.d.ts.map +0 -1
- package/dist/src/components/TkxChat.d.ts.map +0 -1
- package/dist/src/components/TkxCheckbox.d.ts.map +0 -1
- package/dist/src/components/TkxClock.d.ts.map +0 -1
- package/dist/src/components/TkxColorPicker.d.ts.map +0 -1
- package/dist/src/components/TkxCommand.d.ts.map +0 -1
- package/dist/src/components/TkxConfigProvider.d.ts.map +0 -1
- package/dist/src/components/TkxDataGrid.d.ts.map +0 -1
- package/dist/src/components/TkxDatePicker.d.ts.map +0 -1
- package/dist/src/components/TkxDivider.d.ts.map +0 -1
- package/dist/src/components/TkxDrawer.d.ts.map +0 -1
- package/dist/src/components/TkxDropdown.d.ts.map +0 -1
- package/dist/src/components/TkxEmpty.d.ts.map +0 -1
- package/dist/src/components/TkxFileUpload.d.ts.map +0 -1
- package/dist/src/components/TkxForm.d.ts.map +0 -1
- package/dist/src/components/TkxIcon.d.ts.map +0 -1
- package/dist/src/components/TkxImage.d.ts.map +0 -1
- package/dist/src/components/TkxInput.d.ts.map +0 -1
- package/dist/src/components/TkxLayout.d.ts.map +0 -1
- package/dist/src/components/TkxList.d.ts.map +0 -1
- package/dist/src/components/TkxLiveFeed.d.ts.map +0 -1
- package/dist/src/components/TkxLiveLog.d.ts.map +0 -1
- package/dist/src/components/TkxLiveMetrics.d.ts.map +0 -1
- package/dist/src/components/TkxLogo.d.ts.map +0 -1
- package/dist/src/components/TkxMarkdown.d.ts.map +0 -1
- package/dist/src/components/TkxMasonry.d.ts.map +0 -1
- package/dist/src/components/TkxMentions.d.ts.map +0 -1
- package/dist/src/components/TkxMenu.d.ts.map +0 -1
- package/dist/src/components/TkxModal.d.ts.map +0 -1
- package/dist/src/components/TkxNumberInput.d.ts.map +0 -1
- package/dist/src/components/TkxOTP.d.ts.map +0 -1
- package/dist/src/components/TkxPagination.d.ts.map +0 -1
- package/dist/src/components/TkxPlayground.d.ts.map +0 -1
- package/dist/src/components/TkxPopover.d.ts.map +0 -1
- package/dist/src/components/TkxProgress.d.ts.map +0 -1
- package/dist/src/components/TkxQRCode.d.ts.map +0 -1
- package/dist/src/components/TkxQuantumForm.d.ts.map +0 -1
- package/dist/src/components/TkxRadio.d.ts.map +0 -1
- package/dist/src/components/TkxRating.d.ts.map +0 -1
- package/dist/src/components/TkxRealTimeChart.d.ts.map +0 -1
- package/dist/src/components/TkxResult.d.ts.map +0 -1
- package/dist/src/components/TkxRichTextDisplay.d.ts.map +0 -1
- package/dist/src/components/TkxSegmented.d.ts.map +0 -1
- package/dist/src/components/TkxSelect.d.ts.map +0 -1
- package/dist/src/components/TkxSkeleton.d.ts.map +0 -1
- package/dist/src/components/TkxSlider.d.ts.map +0 -1
- package/dist/src/components/TkxSnackbar.d.ts.map +0 -1
- package/dist/src/components/TkxSpeedDial.d.ts.map +0 -1
- package/dist/src/components/TkxSpin.d.ts.map +0 -1
- package/dist/src/components/TkxStatistic.d.ts.map +0 -1
- package/dist/src/components/TkxStepper.d.ts.map +0 -1
- package/dist/src/components/TkxTable.d.ts.map +0 -1
- package/dist/src/components/TkxTabs.d.ts.map +0 -1
- package/dist/src/components/TkxTag.d.ts.map +0 -1
- package/dist/src/components/TkxThemeBuilder.d.ts.map +0 -1
- package/dist/src/components/TkxTimeline.d.ts.map +0 -1
- package/dist/src/components/TkxToast.d.ts.map +0 -1
- package/dist/src/components/TkxToggle.d.ts.map +0 -1
- package/dist/src/components/TkxToolbar.d.ts.map +0 -1
- package/dist/src/components/TkxTooltip.d.ts.map +0 -1
- package/dist/src/components/TkxTour.d.ts.map +0 -1
- package/dist/src/components/TkxTransferList.d.ts.map +0 -1
- package/dist/src/components/TkxTreeView.d.ts.map +0 -1
- package/dist/src/components/TkxTypography.d.ts.map +0 -1
- package/dist/src/components/TkxVideoPlayer.d.ts.map +0 -1
- package/dist/src/components/TkxWatermark.d.ts.map +0 -1
- package/dist/src/components/index.d.ts.map +0 -1
- package/dist/src/engine/css.d.ts.map +0 -1
- package/dist/src/engine/index.d.ts.map +0 -1
- package/dist/src/engine/quantum-ai.d.ts.map +0 -1
- package/dist/src/engine/quantum.d.ts.map +0 -1
- package/dist/src/engine/security.d.ts.map +0 -1
- package/dist/src/engine/tkx.d.ts.map +0 -1
- package/dist/src/engine/wcag.d.ts.map +0 -1
- package/dist/src/headless/index.d.ts.map +0 -1
- package/dist/src/headless/useControllable.d.ts.map +0 -1
- package/dist/src/headless/useDebounce.d.ts.map +0 -1
- package/dist/src/headless/useDisclosure.d.ts.map +0 -1
- package/dist/src/headless/useFormState.d.ts.map +0 -1
- package/dist/src/headless/useInfiniteQuery.d.ts.map +0 -1
- package/dist/src/headless/useIntersectionObserver.d.ts.map +0 -1
- package/dist/src/headless/useListSelection.d.ts.map +0 -1
- package/dist/src/headless/useLocalStorage.d.ts.map +0 -1
- package/dist/src/headless/useMediaQuery.d.ts.map +0 -1
- package/dist/src/headless/useRovingTabIndex.d.ts.map +0 -1
- package/dist/src/headless/useSSE.d.ts.map +0 -1
- package/dist/src/headless/useThrottle.d.ts.map +0 -1
- package/dist/src/headless/useWebSocket.d.ts.map +0 -1
- package/dist/src/hooks/index.d.ts.map +0 -1
- package/dist/src/i18n/I18nProvider.d.ts.map +0 -1
- package/dist/src/i18n/index.d.ts.map +0 -1
- package/dist/src/quantum/index.d.ts.map +0 -1
- package/dist/src/realtime/index.d.ts.map +0 -1
- package/dist/src/themes/index.d.ts.map +0 -1
- package/dist/themes-BbJanqiC.js +0 -498
- package/dist/themes-CMq2vWXj.cjs +0 -2
- package/dist/tkx-BoP5V5zy.cjs +0 -4
- package/dist/tkx-mOKMzvUK.js +0 -1174
- package/src/a11y/index.tsx +0 -87
- package/src/charts/TkxAreaChart.tsx +0 -121
- package/src/charts/TkxBarChart.tsx +0 -117
- package/src/charts/TkxDonutChart.tsx +0 -164
- package/src/charts/TkxLineChart.tsx +0 -137
- package/src/charts/TkxPieChart.tsx +0 -103
- package/src/charts/TkxRadarChart.tsx +0 -92
- package/src/charts/TkxScatterChart.tsx +0 -104
- package/src/charts/index.ts +0 -22
- package/src/charts/shared.ts +0 -47
- package/src/components/TkxAIChatBubble.tsx +0 -256
- package/src/components/TkxAIConfidenceBar.tsx +0 -133
- package/src/components/TkxAIThinking.tsx +0 -193
- package/src/components/TkxAccordion.tsx +0 -590
- package/src/components/TkxAffix.tsx +0 -140
- package/src/components/TkxAlert.tsx +0 -94
- package/src/components/TkxAnchor.tsx +0 -195
- package/src/components/TkxAppBar.tsx +0 -262
- package/src/components/TkxAutocomplete.tsx +0 -455
- package/src/components/TkxAvatar.tsx +0 -103
- package/src/components/TkxBadge.tsx +0 -75
- package/src/components/TkxBottomNav.tsx +0 -241
- package/src/components/TkxBreadcrumb.tsx +0 -324
- package/src/components/TkxButton.tsx +0 -155
- package/src/components/TkxCard.tsx +0 -96
- package/src/components/TkxCarousel.tsx +0 -554
- package/src/components/TkxCascader.tsx +0 -278
- package/src/components/TkxChat.tsx +0 -356
- package/src/components/TkxCheckbox.tsx +0 -220
- package/src/components/TkxClock.tsx +0 -603
- package/src/components/TkxColorPicker.tsx +0 -635
- package/src/components/TkxCommand.tsx +0 -646
- package/src/components/TkxConfigProvider.tsx +0 -460
- package/src/components/TkxDataGrid.tsx +0 -941
- package/src/components/TkxDatePicker.tsx +0 -1625
- package/src/components/TkxDivider.tsx +0 -51
- package/src/components/TkxDrawer.tsx +0 -236
- package/src/components/TkxDropdown.tsx +0 -804
- package/src/components/TkxEmpty.tsx +0 -221
- package/src/components/TkxFileUpload.tsx +0 -373
- package/src/components/TkxForm.tsx +0 -683
- package/src/components/TkxIcon.tsx +0 -685
- package/src/components/TkxImage.tsx +0 -279
- package/src/components/TkxInput.tsx +0 -103
- package/src/components/TkxLayout.tsx +0 -649
- package/src/components/TkxList.tsx +0 -244
- package/src/components/TkxLiveFeed.tsx +0 -331
- package/src/components/TkxLiveLog.tsx +0 -472
- package/src/components/TkxLiveMetrics.tsx +0 -315
- package/src/components/TkxLogo.tsx +0 -299
- package/src/components/TkxMarkdown.tsx +0 -855
- package/src/components/TkxMasonry.tsx +0 -178
- package/src/components/TkxMentions.tsx +0 -212
- package/src/components/TkxMenu.tsx +0 -1044
- package/src/components/TkxModal.tsx +0 -122
- package/src/components/TkxNumberInput.tsx +0 -410
- package/src/components/TkxOTP.tsx +0 -297
- package/src/components/TkxPagination.tsx +0 -390
- package/src/components/TkxPlayground.tsx +0 -845
- package/src/components/TkxPopover.tsx +0 -297
- package/src/components/TkxProgress.tsx +0 -114
- package/src/components/TkxQRCode.tsx +0 -176
- package/src/components/TkxQuantumForm.tsx +0 -594
- package/src/components/TkxRadio.tsx +0 -286
- package/src/components/TkxRating.tsx +0 -288
- package/src/components/TkxRealTimeChart.tsx +0 -383
- package/src/components/TkxResult.tsx +0 -130
- package/src/components/TkxRichTextDisplay.tsx +0 -396
- package/src/components/TkxSegmented.tsx +0 -171
- package/src/components/TkxSelect.tsx +0 -1130
- package/src/components/TkxSkeleton.tsx +0 -107
- package/src/components/TkxSlider.tsx +0 -495
- package/src/components/TkxSnackbar.tsx +0 -316
- package/src/components/TkxSpeedDial.tsx +0 -397
- package/src/components/TkxSpin.tsx +0 -263
- package/src/components/TkxStatistic.tsx +0 -263
- package/src/components/TkxStepper.tsx +0 -487
- package/src/components/TkxTable.tsx +0 -424
- package/src/components/TkxTabs.tsx +0 -126
- package/src/components/TkxTag.tsx +0 -321
- package/src/components/TkxThemeBuilder.tsx +0 -687
- package/src/components/TkxTimeline.tsx +0 -305
- package/src/components/TkxToast.tsx +0 -287
- package/src/components/TkxToggle.tsx +0 -95
- package/src/components/TkxToolbar.tsx +0 -262
- package/src/components/TkxTooltip.tsx +0 -85
- package/src/components/TkxTour.tsx +0 -241
- package/src/components/TkxTransferList.tsx +0 -489
- package/src/components/TkxTreeView.tsx +0 -423
- package/src/components/TkxTypography.tsx +0 -267
- package/src/components/TkxVideoPlayer.tsx +0 -1015
- package/src/components/TkxWatermark.tsx +0 -145
- package/src/components/index.ts +0 -80
- package/src/engine/css.ts +0 -126
- package/src/engine/index.ts +0 -12
- package/src/engine/quantum-ai.ts +0 -1045
- package/src/engine/quantum.ts +0 -207
- package/src/engine/security.ts +0 -232
- package/src/engine/tkx.ts +0 -1084
- package/src/engine/wcag.ts +0 -276
- package/src/headless/index.ts +0 -52
- package/src/headless/useControllable.ts +0 -42
- package/src/headless/useDebounce.ts +0 -37
- package/src/headless/useDisclosure.ts +0 -30
- package/src/headless/useFormState.ts +0 -113
- package/src/headless/useInfiniteQuery.ts +0 -155
- package/src/headless/useIntersectionObserver.ts +0 -53
- package/src/headless/useListSelection.ts +0 -103
- package/src/headless/useLocalStorage.ts +0 -48
- package/src/headless/useMediaQuery.ts +0 -39
- package/src/headless/useRovingTabIndex.ts +0 -86
- package/src/headless/useSSE.ts +0 -167
- package/src/headless/useThrottle.ts +0 -48
- package/src/headless/useWebSocket.ts +0 -231
- package/src/hooks/index.ts +0 -122
- package/src/i18n/I18nProvider.tsx +0 -36
- package/src/i18n/index.ts +0 -877
- package/src/quantum/index.ts +0 -39
- package/src/realtime/index.ts +0 -21
- package/src/styles/global.css +0 -167
- package/src/themes/index.ts +0 -294
package/dist/charts.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
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
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
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}});
|