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
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
useState,
|
|
5
|
-
useEffect,
|
|
6
|
-
useRef,
|
|
7
|
-
useCallback,
|
|
8
|
-
createElement,
|
|
9
|
-
type CSSProperties,
|
|
10
|
-
} from 'react';
|
|
11
|
-
import { useTheme } from '../themes';
|
|
12
|
-
import { sanitizeString } from '../engine/security';
|
|
13
|
-
import { tkx } from '../engine/tkx';
|
|
14
|
-
|
|
15
|
-
// ── Types ────────────────────────────────────────────────────────────────────
|
|
16
|
-
|
|
17
|
-
export interface MetricItem {
|
|
18
|
-
id: string;
|
|
19
|
-
label: string;
|
|
20
|
-
value: number | string;
|
|
21
|
-
unit?: string;
|
|
22
|
-
previousValue?: number;
|
|
23
|
-
trend?: 'up' | 'down' | 'flat';
|
|
24
|
-
trendValue?: string;
|
|
25
|
-
color?: string;
|
|
26
|
-
sparkline?: number[];
|
|
27
|
-
status?: 'normal' | 'warning' | 'critical';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export interface TkxLiveMetricsProps {
|
|
31
|
-
metrics: MetricItem[];
|
|
32
|
-
columns?: number;
|
|
33
|
-
animate?: boolean;
|
|
34
|
-
refreshInterval?: number;
|
|
35
|
-
onMetricClick?: (metric: MetricItem) => void;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// ── CSS injection ────────────────────────────────────────────────────────────
|
|
39
|
-
|
|
40
|
-
let metricsStylesInjected = false;
|
|
41
|
-
function injectMetricsStyles() {
|
|
42
|
-
if (metricsStylesInjected || typeof document === 'undefined') return;
|
|
43
|
-
metricsStylesInjected = true;
|
|
44
|
-
const el = document.createElement('style');
|
|
45
|
-
el.id = 'tkx-live-metrics-styles';
|
|
46
|
-
el.textContent = `
|
|
47
|
-
@keyframes tkx-metric-pulse {
|
|
48
|
-
0% { opacity: 1; }
|
|
49
|
-
40% { opacity: 0.4; }
|
|
50
|
-
100% { opacity: 1; }
|
|
51
|
-
}
|
|
52
|
-
@keyframes tkx-metric-shimmer {
|
|
53
|
-
0% { background-position: -200% 0; }
|
|
54
|
-
100% { background-position: 200% 0; }
|
|
55
|
-
}
|
|
56
|
-
.tkx-metric-shimmer {
|
|
57
|
-
animation: tkx-metric-shimmer 0.6s ease-in-out;
|
|
58
|
-
}
|
|
59
|
-
@media (prefers-reduced-motion: reduce) {
|
|
60
|
-
.tkx-metric-shimmer { animation: none; }
|
|
61
|
-
.tkx-metric-pulse { animation: none; }
|
|
62
|
-
}
|
|
63
|
-
`.trim();
|
|
64
|
-
document.head.appendChild(el);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// ── Helpers ──────────────────────────────────────────────────────────────────
|
|
68
|
-
|
|
69
|
-
function formatValue(val: number | string, unit?: string): string {
|
|
70
|
-
if (typeof val === 'string') return val;
|
|
71
|
-
const formatted = val >= 1_000_000
|
|
72
|
-
? `${(val / 1_000_000).toFixed(1)}M`
|
|
73
|
-
: val >= 1_000
|
|
74
|
-
? `${(val / 1_000).toFixed(1)}k`
|
|
75
|
-
: String(Number.isInteger(val) ? val : val.toFixed(2));
|
|
76
|
-
return unit ? `${formatted}${unit}` : formatted;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function getStatusColor(status: MetricItem['status'], theme: ReturnType<typeof useTheme>): string {
|
|
80
|
-
switch (status) {
|
|
81
|
-
case 'warning': return theme.warning;
|
|
82
|
-
case 'critical': return theme.danger;
|
|
83
|
-
default: return theme.primary;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// ── useCountUp ───────────────────────────────────────────────────────────────
|
|
88
|
-
|
|
89
|
-
function useReducedMotion(): boolean {
|
|
90
|
-
const [reduced, setReduced] = useState(() =>
|
|
91
|
-
typeof window !== 'undefined'
|
|
92
|
-
? window.matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
93
|
-
: false
|
|
94
|
-
);
|
|
95
|
-
useEffect(() => {
|
|
96
|
-
if (typeof window === 'undefined') return;
|
|
97
|
-
const mq = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
98
|
-
const handler = (e: MediaQueryListEvent) => setReduced(e.matches);
|
|
99
|
-
mq.addEventListener('change', handler);
|
|
100
|
-
return () => mq.removeEventListener('change', handler);
|
|
101
|
-
}, []);
|
|
102
|
-
return reduced;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function useCountUp(target: number, duration: number, enabled: boolean): number {
|
|
106
|
-
const [displayed, setDisplayed] = useState(target);
|
|
107
|
-
const startRef = useRef(target);
|
|
108
|
-
const startTimeRef = useRef<number | null>(null);
|
|
109
|
-
const rafRef = useRef<number | null>(null);
|
|
110
|
-
const reducedMotion = useReducedMotion();
|
|
111
|
-
|
|
112
|
-
useEffect(() => {
|
|
113
|
-
if (!enabled || reducedMotion) {
|
|
114
|
-
setDisplayed(target);
|
|
115
|
-
startRef.current = target;
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
const from = startRef.current;
|
|
119
|
-
if (from === target) return;
|
|
120
|
-
startTimeRef.current = null;
|
|
121
|
-
|
|
122
|
-
const step = (now: number) => {
|
|
123
|
-
if (startTimeRef.current === null) startTimeRef.current = now;
|
|
124
|
-
const elapsed = now - startTimeRef.current;
|
|
125
|
-
const progress = Math.min(elapsed / duration, 1);
|
|
126
|
-
// ease-out cubic
|
|
127
|
-
const eased = 1 - Math.pow(1 - progress, 3);
|
|
128
|
-
setDisplayed(from + (target - from) * eased);
|
|
129
|
-
if (progress < 1) {
|
|
130
|
-
rafRef.current = requestAnimationFrame(step);
|
|
131
|
-
} else {
|
|
132
|
-
startRef.current = target;
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
rafRef.current = requestAnimationFrame(step);
|
|
137
|
-
return () => {
|
|
138
|
-
if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
|
|
139
|
-
};
|
|
140
|
-
}, [target, duration, enabled, reducedMotion]);
|
|
141
|
-
|
|
142
|
-
return displayed;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// ── Sparkline ────────────────────────────────────────────────────────────────
|
|
146
|
-
|
|
147
|
-
function Sparkline({ data, color }: { data: number[]; color: string }) {
|
|
148
|
-
if (data.length < 2) return null;
|
|
149
|
-
|
|
150
|
-
const W = 80;
|
|
151
|
-
const H = 24;
|
|
152
|
-
const minV = Math.min(...data);
|
|
153
|
-
const maxV = Math.max(...data);
|
|
154
|
-
const range = maxV - minV || 1;
|
|
155
|
-
|
|
156
|
-
const points = data.map((v, i) => {
|
|
157
|
-
const x = (i / (data.length - 1)) * W;
|
|
158
|
-
const y = H - ((v - minV) / range) * (H - 2) - 1;
|
|
159
|
-
return `${x.toFixed(1)},${y.toFixed(1)}`;
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
return createElement(
|
|
163
|
-
'svg',
|
|
164
|
-
{ width: W, height: H, viewBox: `0 0 ${W} ${H}`, 'aria-hidden': 'true' },
|
|
165
|
-
createElement('polyline', {
|
|
166
|
-
points: points.join(' '),
|
|
167
|
-
fill: 'none',
|
|
168
|
-
stroke: color,
|
|
169
|
-
strokeWidth: 1.5,
|
|
170
|
-
strokeLinejoin: 'round',
|
|
171
|
-
strokeLinecap: 'round',
|
|
172
|
-
}),
|
|
173
|
-
);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// ── TrendIcon ────────────────────────────────────────────────────────────────
|
|
177
|
-
|
|
178
|
-
function TrendIcon({ trend, theme }: { trend: MetricItem['trend']; theme: ReturnType<typeof useTheme> }) {
|
|
179
|
-
if (trend === 'up') return createElement('span', { style: { color: theme.success, fontSize: 14, fontWeight: 700 } }, '▲');
|
|
180
|
-
if (trend === 'down') return createElement('span', { style: { color: theme.danger, fontSize: 14, fontWeight: 700 } }, '▼');
|
|
181
|
-
return createElement('span', { style: { color: theme.textMuted, fontSize: 14 } }, '→');
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// ── MetricCard ───────────────────────────────────────────────────────────────
|
|
185
|
-
|
|
186
|
-
interface MetricCardProps {
|
|
187
|
-
metric: MetricItem;
|
|
188
|
-
animate: boolean;
|
|
189
|
-
onMetricClick?: (metric: MetricItem) => void;
|
|
190
|
-
theme: ReturnType<typeof useTheme>;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function MetricCard({ metric, animate, onMetricClick, theme }: MetricCardProps) {
|
|
194
|
-
const accentColor = metric.color ?? getStatusColor(metric.status, theme);
|
|
195
|
-
const numericValue = typeof metric.value === 'number' ? metric.value : NaN;
|
|
196
|
-
const animatedValue = useCountUp(isNaN(numericValue) ? 0 : numericValue, 600, animate && !isNaN(numericValue));
|
|
197
|
-
|
|
198
|
-
const [shimmer, setShimmer] = useState(false);
|
|
199
|
-
const prevValueRef = useRef(metric.value);
|
|
200
|
-
|
|
201
|
-
useEffect(() => {
|
|
202
|
-
if (prevValueRef.current !== metric.value) {
|
|
203
|
-
prevValueRef.current = metric.value;
|
|
204
|
-
setShimmer(true);
|
|
205
|
-
const t = window.setTimeout(() => setShimmer(false), 700);
|
|
206
|
-
return () => clearTimeout(t);
|
|
207
|
-
}
|
|
208
|
-
return undefined;
|
|
209
|
-
}, [metric.value]);
|
|
210
|
-
|
|
211
|
-
const hasPrev = metric.previousValue !== undefined && metric.previousValue !== numericValue;
|
|
212
|
-
|
|
213
|
-
const cardStyle: CSSProperties = {
|
|
214
|
-
background: theme.surface,
|
|
215
|
-
border: `1px solid ${theme.border}`,
|
|
216
|
-
borderLeft: `4px solid ${accentColor}`,
|
|
217
|
-
borderRadius: 8,
|
|
218
|
-
padding: '14px 16px',
|
|
219
|
-
cursor: onMetricClick ? 'pointer' : 'default',
|
|
220
|
-
position: 'relative',
|
|
221
|
-
overflow: 'hidden',
|
|
222
|
-
boxSizing: 'border-box',
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
const shimmerOverlay: CSSProperties = shimmer
|
|
226
|
-
? {
|
|
227
|
-
position: 'absolute',
|
|
228
|
-
inset: 0,
|
|
229
|
-
background: `linear-gradient(90deg, transparent 0%, ${accentColor}22 50%, transparent 100%)`,
|
|
230
|
-
backgroundSize: '200% 100%',
|
|
231
|
-
animation: 'tkx-metric-shimmer 0.6s ease-in-out',
|
|
232
|
-
pointerEvents: 'none',
|
|
233
|
-
}
|
|
234
|
-
: {};
|
|
235
|
-
|
|
236
|
-
const displayedText = isNaN(numericValue)
|
|
237
|
-
? sanitizeString(String(metric.value))
|
|
238
|
-
: formatValue(animatedValue, metric.unit);
|
|
239
|
-
|
|
240
|
-
return createElement(
|
|
241
|
-
'div',
|
|
242
|
-
{
|
|
243
|
-
style: cardStyle,
|
|
244
|
-
className: shimmer ? 'tkx-metric-shimmer' : undefined,
|
|
245
|
-
onClick: onMetricClick ? () => onMetricClick(metric) : undefined,
|
|
246
|
-
role: onMetricClick ? 'button' : undefined,
|
|
247
|
-
tabIndex: onMetricClick ? 0 : undefined,
|
|
248
|
-
},
|
|
249
|
-
// Shimmer overlay
|
|
250
|
-
shimmer && createElement('div', { style: shimmerOverlay }),
|
|
251
|
-
// Label
|
|
252
|
-
createElement('div', { style: { fontSize: 12, color: theme.textMuted, marginBottom: 6, fontWeight: 500, letterSpacing: '0.03em' } }, sanitizeString(metric.label)),
|
|
253
|
-
// Value row
|
|
254
|
-
createElement(
|
|
255
|
-
'div',
|
|
256
|
-
{ style: { display: 'flex', alignItems: 'flex-end', gap: 6, marginBottom: 6 } },
|
|
257
|
-
createElement('span', { style: { fontSize: 28, fontWeight: 700, color: theme.text, lineHeight: 1 } }, displayedText),
|
|
258
|
-
metric.unit && isNaN(numericValue) && createElement('span', { style: { fontSize: 14, color: theme.textMuted, marginBottom: 2 } }, sanitizeString(metric.unit)),
|
|
259
|
-
),
|
|
260
|
-
// Trend row
|
|
261
|
-
(metric.trend || metric.trendValue) && createElement(
|
|
262
|
-
'div',
|
|
263
|
-
{ style: { display: 'flex', alignItems: 'center', gap: 4, marginBottom: metric.sparkline ? 8 : 0 } },
|
|
264
|
-
metric.trend && createElement(TrendIcon, { trend: metric.trend, theme }),
|
|
265
|
-
metric.trendValue && createElement('span', { style: { fontSize: 12, color: theme.textMuted } }, sanitizeString(metric.trendValue)),
|
|
266
|
-
),
|
|
267
|
-
// Previous value
|
|
268
|
-
hasPrev && createElement(
|
|
269
|
-
'div',
|
|
270
|
-
{ style: { fontSize: 11, color: theme.textMuted, marginTop: 2 } },
|
|
271
|
-
`was ${formatValue(metric.previousValue as number)}`,
|
|
272
|
-
),
|
|
273
|
-
// Sparkline
|
|
274
|
-
metric.sparkline && metric.sparkline.length >= 2 && createElement(
|
|
275
|
-
'div',
|
|
276
|
-
{ style: { marginTop: 8 } },
|
|
277
|
-
createElement(Sparkline, { data: metric.sparkline, color: accentColor }),
|
|
278
|
-
),
|
|
279
|
-
);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
// ── TkxLiveMetrics ───────────────────────────────────────────────────────────
|
|
283
|
-
|
|
284
|
-
export function TkxLiveMetrics({
|
|
285
|
-
metrics,
|
|
286
|
-
columns = 3,
|
|
287
|
-
animate = true,
|
|
288
|
-
onMetricClick,
|
|
289
|
-
}: TkxLiveMetricsProps) {
|
|
290
|
-
const theme = useTheme();
|
|
291
|
-
injectMetricsStyles();
|
|
292
|
-
|
|
293
|
-
const gridStyle: CSSProperties = {
|
|
294
|
-
display: 'grid',
|
|
295
|
-
gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))`,
|
|
296
|
-
gap: 16,
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
return createElement(
|
|
300
|
-
'div',
|
|
301
|
-
{ style: gridStyle },
|
|
302
|
-
...metrics.map((metric) =>
|
|
303
|
-
createElement(MetricCard, {
|
|
304
|
-
key: metric.id,
|
|
305
|
-
metric,
|
|
306
|
-
animate,
|
|
307
|
-
onMetricClick,
|
|
308
|
-
theme,
|
|
309
|
-
}),
|
|
310
|
-
),
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
// Satisfy import requirement
|
|
315
|
-
void tkx;
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { type ReactNode, type CSSProperties } from 'react';
|
|
4
|
-
import { useTheme } from '../themes';
|
|
5
|
-
import { useReducedMotion } from '../hooks';
|
|
6
|
-
import { cx } from '../engine/tkx';
|
|
7
|
-
|
|
8
|
-
// ── Props ──────────────────────────────────────────────────────────────────────
|
|
9
|
-
|
|
10
|
-
export type LogoVariant = 'full' | 'icon-only' | 'text-only';
|
|
11
|
-
export type LogoSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
12
|
-
export type LogoOrientation = 'horizontal' | 'stacked';
|
|
13
|
-
|
|
14
|
-
export interface TkxLogoProps {
|
|
15
|
-
text?: string;
|
|
16
|
-
tagline?: string;
|
|
17
|
-
variant?: LogoVariant;
|
|
18
|
-
size?: LogoSize;
|
|
19
|
-
orientation?: LogoOrientation;
|
|
20
|
-
mark?: ReactNode;
|
|
21
|
-
color?: string;
|
|
22
|
-
className?: string;
|
|
23
|
-
style?: CSSProperties;
|
|
24
|
-
onClick?: () => void;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// ── Size config ────────────────────────────────────────────────────────────────
|
|
28
|
-
|
|
29
|
-
const SIZE_CONFIG: Record<LogoSize, {
|
|
30
|
-
markSize: number;
|
|
31
|
-
fontSize: number;
|
|
32
|
-
taglineSize: number;
|
|
33
|
-
gap: number;
|
|
34
|
-
letterSpacing: string;
|
|
35
|
-
}> = {
|
|
36
|
-
sm: { markSize: 24, fontSize: 14, taglineSize: 10, gap: 6, letterSpacing: '-0.01em' },
|
|
37
|
-
md: { markSize: 32, fontSize: 18, taglineSize: 11, gap: 8, letterSpacing: '-0.02em' },
|
|
38
|
-
lg: { markSize: 44, fontSize: 26, taglineSize: 13, gap: 12, letterSpacing: '-0.03em' },
|
|
39
|
-
xl: { markSize: 60, fontSize: 36, taglineSize: 15, gap: 16, letterSpacing: '-0.04em' },
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// ── Default SVG Mark ───────────────────────────────────────────────────────────
|
|
43
|
-
// Hexagonal quantum mark with a lightning bolt inside.
|
|
44
|
-
|
|
45
|
-
interface DefaultMarkProps {
|
|
46
|
-
size: number;
|
|
47
|
-
primaryColor: string;
|
|
48
|
-
reducedMotion: boolean;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function DefaultMark({ size, primaryColor, reducedMotion }: DefaultMarkProps) {
|
|
52
|
-
const id = 'tkx-logo-gradient';
|
|
53
|
-
const glowId = 'tkx-logo-glow';
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
<svg
|
|
57
|
-
width={size}
|
|
58
|
-
height={size}
|
|
59
|
-
viewBox="0 0 48 48"
|
|
60
|
-
fill="none"
|
|
61
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
62
|
-
aria-hidden="true"
|
|
63
|
-
style={{
|
|
64
|
-
filter: !reducedMotion ? `drop-shadow(0 0 ${size * 0.15}px ${primaryColor}60)` : undefined,
|
|
65
|
-
flexShrink: 0,
|
|
66
|
-
}}
|
|
67
|
-
>
|
|
68
|
-
<defs>
|
|
69
|
-
<linearGradient id={id} x1="0%" y1="0%" x2="100%" y2="100%">
|
|
70
|
-
<stop offset="0%" stopColor={primaryColor} stopOpacity="1" />
|
|
71
|
-
<stop offset="100%" stopColor={primaryColor} stopOpacity="0.6" />
|
|
72
|
-
</linearGradient>
|
|
73
|
-
<filter id={glowId} x="-20%" y="-20%" width="140%" height="140%">
|
|
74
|
-
<feGaussianBlur stdDeviation="1.5" result="blur" />
|
|
75
|
-
<feMerge>
|
|
76
|
-
<feMergeNode in="blur" />
|
|
77
|
-
<feMergeNode in="SourceGraphic" />
|
|
78
|
-
</feMerge>
|
|
79
|
-
</filter>
|
|
80
|
-
</defs>
|
|
81
|
-
|
|
82
|
-
{/* Outer hexagon */}
|
|
83
|
-
<polygon
|
|
84
|
-
points="24,3 42,13.5 42,34.5 24,45 6,34.5 6,13.5"
|
|
85
|
-
stroke={primaryColor}
|
|
86
|
-
strokeWidth="2"
|
|
87
|
-
fill={`${primaryColor}12`}
|
|
88
|
-
strokeLinejoin="round"
|
|
89
|
-
/>
|
|
90
|
-
|
|
91
|
-
{/* Inner hexagon (rotated) */}
|
|
92
|
-
<polygon
|
|
93
|
-
points="24,9 37,16.5 37,31.5 24,39 11,31.5 11,16.5"
|
|
94
|
-
stroke={primaryColor}
|
|
95
|
-
strokeWidth="1"
|
|
96
|
-
strokeOpacity="0.3"
|
|
97
|
-
fill="none"
|
|
98
|
-
strokeLinejoin="round"
|
|
99
|
-
/>
|
|
100
|
-
|
|
101
|
-
{/* Lightning bolt */}
|
|
102
|
-
<path
|
|
103
|
-
d="M27 10 L18 26 L24 26 L21 38 L30 22 L24 22 Z"
|
|
104
|
-
fill={`url(#${id})`}
|
|
105
|
-
stroke={primaryColor}
|
|
106
|
-
strokeWidth="0.5"
|
|
107
|
-
strokeLinejoin="round"
|
|
108
|
-
filter={`url(#${glowId})`}
|
|
109
|
-
/>
|
|
110
|
-
|
|
111
|
-
{/* Corner accents */}
|
|
112
|
-
<circle cx="24" cy="3" r="1.5" fill={primaryColor} opacity="0.7" />
|
|
113
|
-
<circle cx="42" cy="13.5" r="1.5" fill={primaryColor} opacity="0.5" />
|
|
114
|
-
<circle cx="42" cy="34.5" r="1.5" fill={primaryColor} opacity="0.5" />
|
|
115
|
-
<circle cx="24" cy="45" r="1.5" fill={primaryColor} opacity="0.7" />
|
|
116
|
-
<circle cx="6" cy="34.5" r="1.5" fill={primaryColor} opacity="0.5" />
|
|
117
|
-
<circle cx="6" cy="13.5" r="1.5" fill={primaryColor} opacity="0.5" />
|
|
118
|
-
</svg>
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// ── Glow animation style injection ────────────────────────────────────────────
|
|
123
|
-
|
|
124
|
-
let glowStyleInjected = false;
|
|
125
|
-
|
|
126
|
-
function injectGlowStyle() {
|
|
127
|
-
if (glowStyleInjected || typeof document === 'undefined') return;
|
|
128
|
-
glowStyleInjected = true;
|
|
129
|
-
const style = document.createElement('style');
|
|
130
|
-
style.id = 'tkx-logo-glow-anim';
|
|
131
|
-
style.textContent = `
|
|
132
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
133
|
-
.tkx-logo-glow {
|
|
134
|
-
animation: tkx-logo-pulse 3s ease-in-out infinite;
|
|
135
|
-
}
|
|
136
|
-
@keyframes tkx-logo-pulse {
|
|
137
|
-
0%, 100% { opacity: 1; }
|
|
138
|
-
50% { opacity: 0.75; }
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
`;
|
|
142
|
-
document.head.appendChild(style);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// ── TkxLogo Component ──────────────────────────────────────────────────────────
|
|
146
|
-
|
|
147
|
-
export function TkxLogo({
|
|
148
|
-
text = 'TekiVex',
|
|
149
|
-
tagline,
|
|
150
|
-
variant = 'full',
|
|
151
|
-
size = 'md',
|
|
152
|
-
orientation = 'horizontal',
|
|
153
|
-
mark,
|
|
154
|
-
color,
|
|
155
|
-
className,
|
|
156
|
-
style,
|
|
157
|
-
onClick,
|
|
158
|
-
}: TkxLogoProps) {
|
|
159
|
-
const theme = useTheme();
|
|
160
|
-
const reducedMotion = useReducedMotion();
|
|
161
|
-
const primaryColor = color ?? theme.primary;
|
|
162
|
-
const config = SIZE_CONFIG[size];
|
|
163
|
-
|
|
164
|
-
// Inject glow animation on first render
|
|
165
|
-
injectGlowStyle();
|
|
166
|
-
|
|
167
|
-
const showMark = variant !== 'text-only';
|
|
168
|
-
const showText = variant !== 'icon-only';
|
|
169
|
-
|
|
170
|
-
const isStacked = orientation === 'stacked';
|
|
171
|
-
const isClickable = typeof onClick === 'function';
|
|
172
|
-
|
|
173
|
-
const containerStyle: CSSProperties = {
|
|
174
|
-
display: 'inline-flex',
|
|
175
|
-
flexDirection: isStacked ? 'column' : 'row',
|
|
176
|
-
alignItems: isStacked ? 'center' : 'center',
|
|
177
|
-
gap: config.gap,
|
|
178
|
-
cursor: isClickable ? 'pointer' : 'default',
|
|
179
|
-
userSelect: 'none',
|
|
180
|
-
textDecoration: 'none',
|
|
181
|
-
...style,
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
const textGroupStyle: CSSProperties = {
|
|
185
|
-
display: 'flex',
|
|
186
|
-
flexDirection: 'column',
|
|
187
|
-
alignItems: isStacked ? 'center' : 'flex-start',
|
|
188
|
-
gap: 2,
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
const brandTextStyle: CSSProperties = {
|
|
192
|
-
fontSize: config.fontSize,
|
|
193
|
-
fontWeight: 800,
|
|
194
|
-
letterSpacing: config.letterSpacing,
|
|
195
|
-
lineHeight: 1,
|
|
196
|
-
color: theme.text,
|
|
197
|
-
fontFamily: 'inherit',
|
|
198
|
-
margin: 0,
|
|
199
|
-
padding: 0,
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
const taglineStyle: CSSProperties = {
|
|
203
|
-
fontSize: config.taglineSize,
|
|
204
|
-
fontWeight: 500,
|
|
205
|
-
color: theme.textMuted,
|
|
206
|
-
letterSpacing: '0.04em',
|
|
207
|
-
lineHeight: 1,
|
|
208
|
-
margin: 0,
|
|
209
|
-
padding: 0,
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
// Brand name: "Teki" in theme text color, "Vex" in primary color
|
|
213
|
-
const brandParts = splitBrand(text, primaryColor, theme.text);
|
|
214
|
-
|
|
215
|
-
const ariaLabel = tagline
|
|
216
|
-
? `${text} — ${tagline}`
|
|
217
|
-
: text;
|
|
218
|
-
|
|
219
|
-
const handleKeyDown = (e: React.KeyboardEvent) => {
|
|
220
|
-
if (isClickable && (e.key === 'Enter' || e.key === ' ')) {
|
|
221
|
-
e.preventDefault();
|
|
222
|
-
onClick?.();
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
return (
|
|
227
|
-
<div
|
|
228
|
-
className={cx('tkx-logo-glow', className ?? '')}
|
|
229
|
-
style={containerStyle}
|
|
230
|
-
role="img"
|
|
231
|
-
aria-label={ariaLabel}
|
|
232
|
-
onClick={isClickable ? onClick : undefined}
|
|
233
|
-
onKeyDown={isClickable ? handleKeyDown : undefined}
|
|
234
|
-
tabIndex={isClickable ? 0 : undefined}
|
|
235
|
-
>
|
|
236
|
-
{showMark && (
|
|
237
|
-
mark ?? (
|
|
238
|
-
<DefaultMark
|
|
239
|
-
size={config.markSize}
|
|
240
|
-
primaryColor={primaryColor}
|
|
241
|
-
reducedMotion={reducedMotion}
|
|
242
|
-
/>
|
|
243
|
-
)
|
|
244
|
-
)}
|
|
245
|
-
|
|
246
|
-
{showText && (
|
|
247
|
-
<div style={textGroupStyle}>
|
|
248
|
-
<span style={brandTextStyle} aria-hidden="true">
|
|
249
|
-
{brandParts}
|
|
250
|
-
</span>
|
|
251
|
-
{tagline && (
|
|
252
|
-
<span style={taglineStyle} aria-hidden="true">
|
|
253
|
-
{tagline}
|
|
254
|
-
</span>
|
|
255
|
-
)}
|
|
256
|
-
</div>
|
|
257
|
-
)}
|
|
258
|
-
</div>
|
|
259
|
-
);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
TkxLogo.displayName = 'TkxLogo';
|
|
263
|
-
|
|
264
|
-
// ── Helpers ────────────────────────────────────────────────────────────────────
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Splits the brand text so the last 3 characters are colored with the primary color.
|
|
268
|
-
* For "TekiVex" → "Teki" (text color) + "Vex" (primary color).
|
|
269
|
-
* Falls back to splitting at the midpoint for short names.
|
|
270
|
-
*/
|
|
271
|
-
function splitBrand(
|
|
272
|
-
text: string,
|
|
273
|
-
primaryColor: string,
|
|
274
|
-
textColor: string,
|
|
275
|
-
): ReactNode {
|
|
276
|
-
if (text.length <= 3) {
|
|
277
|
-
return <span style={{ color: primaryColor }}>{text}</span>;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
// Try to find a natural camelCase split point
|
|
281
|
-
const camelMatch = text.match(/^([A-Za-z]+?)([A-Z][a-z]*)$/);
|
|
282
|
-
if (camelMatch) {
|
|
283
|
-
return (
|
|
284
|
-
<>
|
|
285
|
-
<span style={{ color: textColor }}>{camelMatch[1]}</span>
|
|
286
|
-
<span style={{ color: primaryColor }}>{camelMatch[2]}</span>
|
|
287
|
-
</>
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
// Default: last 3 chars get primary color
|
|
292
|
-
const split = text.length - 3;
|
|
293
|
-
return (
|
|
294
|
-
<>
|
|
295
|
-
<span style={{ color: textColor }}>{text.slice(0, split)}</span>
|
|
296
|
-
<span style={{ color: primaryColor }}>{text.slice(split)}</span>
|
|
297
|
-
</>
|
|
298
|
-
);
|
|
299
|
-
}
|